efficient-web-builder 1.0.0 → 2.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 +30 -0
- package/README.md +2 -1
- package/dist/components/AddBlockRow.d.ts +1 -7
- package/dist/components/AddBlockRow.js +1 -1
- package/dist/components/AddChildRow.d.ts +1 -6
- package/dist/components/AddChildRow.js +1 -1
- package/dist/components/AddSidePanel.d.ts +2 -39
- package/dist/components/AddSidePanel.js +1 -1
- package/dist/components/BlockGapField.js +1 -1
- package/dist/components/BlogPostSource.js +1 -1
- package/dist/components/CardShadowField.js +1 -1
- package/dist/components/ChatSettingsPanel.js +1 -1
- package/dist/components/CornersField.d.ts +0 -1
- package/dist/components/CornersField.js +1 -1
- package/dist/components/DuplicateToPageMenu.js +1 -1
- package/dist/components/EditorScreenMount.d.ts +1 -0
- package/dist/components/EditorScreenMount.js +1 -0
- package/dist/components/EditorStoreProvider.d.ts +1 -0
- package/dist/components/EditorStoreProvider.js +1 -0
- package/dist/components/HeroImageField.js +1 -1
- package/dist/components/HeroSection.d.ts +2 -6
- package/dist/components/HeroSection.js +4 -4
- package/dist/components/HoverEffectField.js +1 -1
- package/dist/components/ImageFocusRow.js +1 -1
- package/dist/components/KeepHint.d.ts +5 -0
- package/dist/components/KeepHint.js +1 -0
- package/dist/components/LocationsGroupedField.js +1 -1
- package/dist/components/MediaSidePanel.d.ts +1 -6
- package/dist/components/MediaSidePanel.js +1 -1
- package/dist/components/MediaUploadField.js +1 -1
- package/dist/components/MultiSelectField.d.ts +4 -1
- package/dist/components/MultiSelectField.js +1 -1
- package/dist/components/NodeContextMenu.d.ts +2 -96
- package/dist/components/NodeContextMenu.js +1 -1
- package/dist/components/PageEditGuardNotices.d.ts +1 -1
- package/dist/components/PageEditGuardNotices.js +1 -1
- package/dist/components/PanelToggleIcon.d.ts +1 -3
- package/dist/components/PanelToggleIcon.js +1 -1
- package/dist/components/PartSettingsPanel.d.ts +5 -0
- package/dist/components/PartSettingsPanel.js +1 -1
- package/dist/components/PhotographyField.js +1 -1
- package/dist/components/PreviewDeviceContext.d.ts +2 -4
- package/dist/components/PreviewDeviceContext.js +1 -1
- package/dist/components/PreviewPartsContext.d.ts +1 -3
- package/dist/components/PreviewPartsContext.js +1 -1
- package/dist/components/SearchSelectField.d.ts +3 -1
- package/dist/components/SearchSelectField.js +1 -1
- package/dist/components/SectionEditor.d.ts +2 -5
- package/dist/components/SectionEditor.js +1 -1
- package/dist/components/SectionEditorShell.d.ts +1 -1
- package/dist/components/SectionEditorShell.js +1 -1
- package/dist/components/SectionThemePicker.d.ts +3 -1
- package/dist/components/SectionThemePicker.js +1 -1
- package/dist/components/ShadowColourField.js +1 -1
- package/dist/components/SidePanelHead.d.ts +1 -23
- package/dist/components/SidePanelHead.js +1 -1
- package/dist/components/SideSpaceField.d.ts +0 -1
- package/dist/components/SideSpaceField.js +1 -1
- package/dist/components/SiteEditorProvider.d.ts +3 -10
- package/dist/components/SiteEditorProvider.js +1 -1
- package/dist/components/SiteWidthField.d.ts +0 -1
- package/dist/components/SiteWidthField.js +1 -1
- package/dist/components/SlotChildActionsContext.d.ts +2 -13
- package/dist/components/SlotChildActionsContext.js +1 -1
- package/dist/components/SocialLinksPanel.js +1 -1
- package/dist/components/SourceStatus.js +1 -1
- package/dist/components/StandaloneSectionEditor.d.ts +1 -0
- package/dist/components/StandaloneSectionEditor.js +1 -1
- package/dist/components/StorefrontDocumentContext.d.ts +2 -67
- package/dist/components/StorefrontDocumentContext.js +1 -1
- package/dist/components/StorefrontEditor.d.ts +1 -0
- package/dist/components/StorefrontEditor.js +1 -1
- package/dist/components/StorefrontEditorChrome.d.ts +1 -1
- package/dist/components/StorefrontEditorChrome.js +1 -1
- package/dist/components/StorefrontLinkField.d.ts +9 -0
- package/dist/components/StorefrontLinkField.js +1 -1
- package/dist/components/ThemeField.js +1 -1
- package/dist/components/TickerSettingsPanel.js +1 -1
- package/dist/components/UiIcon.d.ts +2 -10
- package/dist/components/UiIcon.js +1 -1
- package/dist/components/WebsiteScreenParts.d.ts +2 -0
- package/dist/components/WebsiteScreenParts.js +1 -0
- package/dist/components/WidthFollowField.js +1 -1
- package/dist/components/panel-widths.d.ts +2 -12
- package/dist/components/panel-widths.js +1 -1
- package/dist/components/storefront-editor.css +125 -986
- package/dist/components/useFooterFocus.d.ts +2 -0
- package/dist/components/useFooterFocus.js +1 -0
- package/dist/components/useLocationsTree.d.ts +6 -0
- package/dist/components/useLocationsTree.js +1 -0
- package/dist/components/usePartBridge.d.ts +1 -9
- package/dist/components/usePartBridge.js +1 -1
- package/dist/components/usePinnedChromeSeed.d.ts +2 -0
- package/dist/components/usePinnedChromeSeed.js +1 -0
- package/dist/components/useSocialSettings.js +1 -1
- package/dist/components/useStorefrontBlogPosts.js +1 -1
- package/dist/lib/client-only.d.ts +1 -0
- package/dist/lib/client-only.js +1 -0
- package/dist/lib/content/view-tiers.d.ts +2 -6
- package/dist/lib/content/view-tiers.js +1 -1
- package/dist/lib/editor-admin-bridge.d.ts +2 -29
- package/dist/lib/editor-admin-bridge.js +1 -1
- package/dist/lib/editor-backend-error.d.ts +2 -0
- package/dist/lib/editor-backend-error.js +1 -0
- package/dist/lib/editor-blocks.d.ts +2 -2
- package/dist/lib/editor-chrome.d.ts +2 -52
- package/dist/lib/editor-chrome.js +1 -1
- package/dist/lib/editor-document-adapter.d.ts +3 -51
- package/dist/lib/editor-document-adapter.js +1 -1
- package/dist/lib/editor-document-addressing.d.ts +2 -0
- package/dist/lib/editor-document-addressing.js +1 -0
- package/dist/lib/editor-document-contract.d.ts +1 -0
- package/dist/lib/editor-document-contract.js +0 -0
- package/dist/lib/editor-document-hooks.d.ts +1 -15
- package/dist/lib/editor-document-switch.d.ts +2 -0
- package/dist/lib/editor-document-switch.js +1 -0
- package/dist/lib/editor-failure.d.ts +1 -4
- package/dist/lib/editor-failure.js +1 -1
- package/dist/lib/editor-host-inbound.d.ts +1 -1
- package/dist/lib/editor-host-inbound.js +1 -1
- package/dist/lib/editor-host.d.ts +2 -135
- package/dist/lib/editor-host.js +1 -1
- package/dist/lib/editor-key-scope.d.ts +1 -3
- package/dist/lib/editor-key-scope.js +1 -1
- package/dist/lib/editor-load-error.d.ts +1 -4
- package/dist/lib/editor-load-error.js +1 -1
- package/dist/lib/editor-media-panel.d.ts +2 -23
- package/dist/lib/editor-media-panel.js +1 -1
- package/dist/lib/editor-media-picker.d.ts +2 -12
- package/dist/lib/editor-media-picker.js +1 -1
- package/dist/lib/editor-page-lock.d.ts +1 -1
- package/dist/lib/editor-page-lock.js +1 -1
- package/dist/lib/editor-screen.d.ts +2 -0
- package/dist/lib/editor-screen.js +1 -0
- package/dist/lib/editor-section-templates.d.ts +1 -2
- package/dist/lib/editor-section-templates.js +1 -1
- package/dist/lib/editor-session-context.d.ts +1 -7
- package/dist/lib/editor-session-context.js +1 -1
- package/dist/lib/editor-session.d.ts +2 -45
- package/dist/lib/editor-session.js +1 -1
- package/dist/lib/editor-site-slug.js +1 -1
- package/dist/lib/editor-theme.d.ts +1 -1
- package/dist/lib/editor-theme.js +1 -1
- package/dist/lib/hero-arrows.d.ts +1 -1
- package/dist/lib/links/link-filters.d.ts +1 -0
- package/dist/lib/links/link-filters.js +0 -0
- package/dist/lib/links/link-picker-setup.d.ts +29 -0
- package/dist/lib/links/link-picker-setup.js +1 -0
- package/dist/lib/puck/ColourControl.d.ts +4 -1
- package/dist/lib/puck/ColourControl.js +1 -1
- package/dist/lib/puck/add-palette.d.ts +3 -9
- package/dist/lib/puck/add-palette.js +1 -1
- package/dist/lib/puck/add-target-types.d.ts +1 -0
- package/dist/lib/puck/add-target-types.js +0 -0
- package/dist/lib/puck/add-target.d.ts +2 -9
- package/dist/lib/puck/block-choice.d.ts +2 -0
- package/dist/lib/puck/block-choice.js +1 -0
- package/dist/lib/puck/block-offer.js +1 -1
- package/dist/lib/puck/block-types-in.d.ts +1 -1
- package/dist/lib/puck/block-types-in.js +1 -1
- package/dist/lib/puck/blocks/general/index.d.ts +2 -2
- package/dist/lib/puck/content-tree.d.ts +2 -43
- package/dist/lib/puck/content-tree.js +1 -1
- package/dist/lib/puck/controls.d.ts +11 -22
- package/dist/lib/puck/controls.js +1 -1
- package/dist/lib/puck/device-fields.d.ts +2 -24
- package/dist/lib/puck/device-fields.js +1 -1
- package/dist/lib/puck/field-buckets.d.ts +2 -0
- package/dist/lib/puck/field-buckets.js +1 -0
- package/dist/lib/puck/field-groups.d.ts +3 -3
- package/dist/lib/puck/field-groups.js +1 -1
- package/dist/lib/puck/field-markers.d.ts +2 -16
- package/dist/lib/puck/field-markers.js +1 -1
- package/dist/lib/puck/footer-block-row-name.d.ts +4 -0
- package/dist/lib/puck/footer-block-row-name.js +1 -0
- package/dist/lib/puck/footer-blocks.d.ts +2 -10
- package/dist/lib/puck/footer-blocks.js +1 -1
- package/dist/lib/puck/hidable.d.ts +2 -9
- package/dist/lib/puck/hidable.js +1 -1
- package/dist/lib/puck/palette-sections.d.ts +2 -0
- package/dist/lib/puck/palette-sections.js +1 -0
- package/dist/lib/puck/panel-fields.d.ts +2 -12
- package/dist/lib/puck/panel-fields.js +1 -1
- package/dist/lib/puck/panel-no-control-mark.d.ts +2 -7
- package/dist/lib/puck/panel-no-control-mark.js +1 -1
- package/dist/lib/puck/part-id.d.ts +1 -0
- package/dist/lib/puck/part-id.js +1 -0
- package/dist/lib/puck/pinned-seed-gate.d.ts +2 -12
- package/dist/lib/puck/pinned-seed-gate.js +1 -1
- package/dist/lib/puck/preview-click.d.ts +1 -2
- package/dist/lib/puck/preview-click.js +1 -1
- package/dist/lib/puck/preview-dom.d.ts +1 -6
- package/dist/lib/puck/preview-dom.js +1 -1
- package/dist/lib/puck/preview-events.d.ts +2 -0
- package/dist/lib/puck/preview-events.js +1 -0
- package/dist/lib/puck/preview-selection-context.d.ts +2 -19
- package/dist/lib/puck/preview-selection-context.js +1 -1
- package/dist/lib/puck/section-doc.d.ts +1 -5
- package/dist/lib/puck/section-doc.js +1 -1
- package/dist/lib/puck/section-groups.d.ts +1 -1
- package/dist/lib/puck/slot-child-name.d.ts +2 -8
- package/dist/lib/puck/slot-child-name.js +1 -1
- package/dist/lib/puck/slot-heal.d.ts +1 -2
- package/dist/lib/puck/slot-heal.js +1 -1
- package/dist/lib/puck/slot-section-spec.d.ts +1 -0
- package/dist/lib/puck/slot-section-spec.js +0 -0
- package/dist/lib/puck/slot-specs.d.ts +2 -13
- package/dist/lib/puck/style-clipboard.d.ts +1 -19
- package/dist/lib/puck/style-clipboard.js +1 -1
- package/dist/lib/puck/text-control-kinds.d.ts +2 -13
- package/dist/lib/puck/text-control-kinds.js +1 -1
- package/dist/lib/puck/text-parts.d.ts +2 -5
- package/dist/lib/puck/text-parts.js +1 -1
- package/dist/lib/puck/tree-reveal.d.ts +1 -11
- package/dist/lib/puck/tree-reveal.js +1 -1
- package/dist/lib/puck/use-section-ops.d.ts +2 -25
- package/dist/lib/puck/use-section-ops.js +1 -1
- package/dist/lib/reel.d.ts +1 -1
- package/dist/lib/section-template-types.d.ts +1 -21
- package/dist/lib/sections/new-section-node.d.ts +2 -0
- package/dist/lib/sections/new-section-node.js +1 -0
- package/dist/lib/source-rules/accent-token-name.d.ts +20 -0
- package/dist/lib/source-rules/accent-token-name.js +4 -0
- package/dist/lib/source-rules/button-corners.d.ts +13 -0
- package/dist/lib/source-rules/button-corners.js +2 -0
- package/dist/lib/source-rules/editor-chrome-note.d.ts +16 -0
- package/dist/lib/source-rules/editor-chrome-note.js +13 -0
- package/dist/lib/source-rules/editor-context-menu.d.ts +5 -0
- package/dist/lib/source-rules/editor-context-menu.js +4 -0
- package/dist/lib/source-rules/editor-puck-drag-off.d.ts +8 -0
- package/dist/lib/source-rules/editor-puck-drag-off.js +4 -0
- package/dist/lib/source-rules/efficient-easel-version.d.ts +9 -0
- package/dist/lib/source-rules/efficient-easel-version.js +2 -0
- package/dist/lib/source-rules/every-button-follows-the-button-colour.d.ts +12 -0
- package/dist/lib/source-rules/every-button-follows-the-button-colour.js +7 -0
- package/dist/lib/source-rules/flat-theme-palette.d.ts +10 -0
- package/dist/lib/source-rules/flat-theme-palette.js +8 -0
- package/dist/lib/source-rules/full-width-means-full.d.ts +8 -0
- package/dist/lib/source-rules/full-width-means-full.js +2 -0
- package/dist/lib/source-rules/heading-ceiling-sweep.d.ts +11 -0
- package/dist/lib/source-rules/heading-ceiling-sweep.js +8 -0
- package/dist/lib/source-rules/label-hints.d.ts +7 -0
- package/dist/lib/source-rules/label-hints.js +5 -0
- package/dist/lib/source-rules/label-vocabulary.d.ts +14 -0
- package/dist/lib/source-rules/label-vocabulary.js +5 -0
- package/dist/lib/source-rules/mirrored-rows-agree.d.ts +19 -0
- package/dist/lib/source-rules/mirrored-rows-agree.js +10 -0
- package/dist/lib/source-rules/no-comment-in-jsx.d.ts +9 -0
- package/dist/lib/source-rules/no-comment-in-jsx.js +7 -0
- package/dist/lib/source-rules/no-glyph-rows.d.ts +15 -0
- package/dist/lib/source-rules/no-glyph-rows.js +4 -0
- package/dist/lib/source-rules/one-colour-control.d.ts +7 -0
- package/dist/lib/source-rules/one-colour-control.js +2 -0
- package/dist/lib/source-rules/one-dropdown.d.ts +10 -0
- package/dist/lib/source-rules/one-dropdown.js +4 -0
- package/dist/lib/source-rules/one-editable-list.d.ts +16 -0
- package/dist/lib/source-rules/one-editable-list.js +6 -0
- package/dist/lib/source-rules/one-editor-list.d.ts +7 -0
- package/dist/lib/source-rules/one-editor-list.js +3 -0
- package/dist/lib/source-rules/one-right-click.d.ts +10 -0
- package/dist/lib/source-rules/one-right-click.js +2 -0
- package/dist/lib/source-rules/one-switch.d.ts +9 -0
- package/dist/lib/source-rules/one-switch.js +7 -0
- package/dist/lib/source-rules/one-up-level-link.d.ts +16 -0
- package/dist/lib/source-rules/one-up-level-link.js +18 -0
- package/dist/lib/source-rules/panel-colour-tokens.d.ts +48 -0
- package/dist/lib/source-rules/panel-colour-tokens.js +20 -0
- package/dist/lib/source-rules/panel-no-divider-lines.d.ts +14 -0
- package/dist/lib/source-rules/panel-no-divider-lines.js +10 -0
- package/dist/lib/source-rules/panel-one-arrow.d.ts +21 -0
- package/dist/lib/source-rules/panel-one-arrow.js +1 -0
- package/dist/lib/source-rules/panel-one-hover.d.ts +8 -0
- package/dist/lib/source-rules/panel-one-hover.js +2 -0
- package/dist/lib/source-rules/panel-rows-use-the-shared-row.d.ts +23 -0
- package/dist/lib/source-rules/panel-rows-use-the-shared-row.js +22 -0
- package/dist/lib/source-rules/part-slider-fills-row.d.ts +11 -0
- package/dist/lib/source-rules/part-slider-fills-row.js +29 -0
- package/dist/lib/source-rules/part-style-naming.d.ts +10 -0
- package/dist/lib/source-rules/part-style-naming.js +2 -0
- package/dist/lib/source-rules/puck-document-surfaces.d.ts +16 -0
- package/dist/lib/source-rules/puck-document-surfaces.js +8 -0
- package/dist/lib/source-rules/reduced-motion.d.ts +26 -0
- package/dist/lib/source-rules/reduced-motion.js +9 -0
- package/dist/lib/source-rules/route-content-width.d.ts +22 -0
- package/dist/lib/source-rules/route-content-width.js +5 -0
- package/dist/lib/source-rules/rule.d.ts +21 -0
- package/dist/lib/source-rules/rule.js +1 -0
- package/dist/lib/source-rules/section-theme-preview.d.ts +9 -0
- package/dist/lib/source-rules/section-theme-preview.js +8 -0
- package/dist/lib/source-rules/site-gutter.d.ts +6 -0
- package/dist/lib/source-rules/site-gutter.js +4 -0
- package/dist/lib/source-rules/site-square-by-default.d.ts +17 -0
- package/dist/lib/source-rules/site-square-by-default.js +3 -0
- package/dist/lib/source-rules/site-width.d.ts +11 -0
- package/dist/lib/source-rules/site-width.js +7 -0
- package/dist/lib/source-rules/size-token-paints.d.ts +8 -0
- package/dist/lib/source-rules/size-token-paints.js +11 -0
- package/dist/lib/source-rules/social-icons-import.d.ts +6 -0
- package/dist/lib/source-rules/social-icons-import.js +6 -0
- package/dist/lib/source-rules/source-status-is-shared.d.ts +7 -0
- package/dist/lib/source-rules/source-status-is-shared.js +1 -0
- package/dist/lib/source-rules/style-face-matches-size.d.ts +10 -0
- package/dist/lib/source-rules/style-face-matches-size.js +4 -0
- package/dist/lib/source-rules/support/accent-rename-bytes.d.ts +5 -0
- package/dist/lib/source-rules/support/accent-rename-bytes.js +1 -0
- package/dist/lib/source-rules/support/css-box-model.d.ts +5 -0
- package/dist/lib/source-rules/support/css-box-model.js +1 -0
- package/dist/lib/source-rules/support/css-length.d.ts +2 -0
- package/dist/lib/source-rules/support/css-length.js +1 -0
- package/dist/lib/source-rules/support/css-rules.d.ts +12 -0
- package/dist/lib/source-rules/support/css-rules.js +1 -0
- package/dist/lib/source-rules/support/css-source.d.ts +2 -0
- package/dist/lib/source-rules/support/css-source.js +3 -0
- package/dist/lib/source-rules/support/label-extraction.d.ts +14 -0
- package/dist/lib/source-rules/support/label-extraction.js +5 -0
- package/dist/lib/source-rules/support/panel-select-cascade.d.ts +72 -0
- package/dist/lib/source-rules/support/panel-select-cascade.js +2 -0
- package/dist/lib/source-rules/support/part-slider-call-sites.d.ts +9 -0
- package/dist/lib/source-rules/support/part-slider-call-sites.js +17 -0
- package/dist/lib/source-rules/support/registry-source.d.ts +14 -0
- package/dist/lib/source-rules/support/registry-source.js +3 -0
- package/dist/lib/source-rules/support/ts-source.d.ts +2 -0
- package/dist/lib/source-rules/support/ts-source.js +3 -0
- package/dist/lib/source-rules/theme-mode-controls-gone.d.ts +10 -0
- package/dist/lib/source-rules/theme-mode-controls-gone.js +5 -0
- package/dist/lib/source-rules/upload-intake-guard.d.ts +11 -0
- package/dist/lib/source-rules/upload-intake-guard.js +6 -0
- package/dist/lib/source-rules/word-styles.d.ts +8 -0
- package/dist/lib/source-rules/word-styles.js +4 -0
- package/dist/lib/theme-row-persist.js +1 -1
- package/dist/lib/theme-save-message.js +1 -1
- package/dist/lib/web-backend.d.ts +4 -59
- package/dist/lib/web-backend.js +1 -1
- package/dist/lib/website-document-addressing.d.ts +2 -0
- package/dist/lib/website-document-addressing.js +1 -0
- package/dist/lib/website-host-inbound.d.ts +1 -0
- package/dist/lib/website-host-inbound.js +1 -0
- package/dist/lib/website-session.d.ts +5 -0
- package/dist/lib/website-session.js +1 -0
- package/package.json +15 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as r,jsxs as m,Fragment as y}from"react/jsx-runtime";import{useRef as z,useState as Y}from"react";import{useEasel as O}from"efficient-easel/easel";import{readHidable as se,hidableText as ce}from"./hidable.js";import{FOCAL_DEFAULT as ue}from"../image-focus.js";import{LINK_FIELD_MARKER as de,SCAFFOLD_FIELD_MARKER as pe,TEXT_FIELD_MARKER as I}from"./field-markers.js";import je from"../../components/ApplyCornersToSiblings.js";import{PartResetDot as j}from"../../components/PartResetDot.js";import{CARD_IMAGE_RADIUS_STEP as qe,CORNER_RADIUS_MAX as $,CORNER_RADIUS_MIN as B}from"../content/card-image-shape.js";import{IMAGE_CORNER_STEP as Je,IMAGE_CORNERS_LABEL as Ze}from"../content/image-corners.js";import{GRID_MAX_COLUMNS as Qe}from"../content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as et,GALLERY_LAYOUTS as L,GALLERY_LAYOUT_KEYS as fe}from"../content/gallery-layout.js";import{anchorSiblingsOf as tt,HERO_GROUP_PLACEMENTS as nt,HERO_GROUP_PLACEMENT_DEFAULT as ot,normalisePlacement as rt,placementPoints as he}from"../hero-group-placement.js";import{AlignLeftIcon as it,AlignSeparateIcon as lt,AnimationIcon as me,BackgroundIcon as at,CartIcon as st,ColumnWidthsIcon as ge,ColumnsIcon as ct,CornerIcon as be,DirectionDownIcon as ut,DirectionLeftIcon as dt,DirectionRightIcon as pt,DirectionUpIcon as ft,DollarIcon as ht,FinishIcon as mt,GapIcon as Ce,GridIcon as gt,GroundIcon as bt,HashIcon as xe,ImageIcon as Ct,LayoutIcon as xt,ListIcon as St,LocationIcon as q,PaddingBottomIcon as _t,PaddingLeftIcon as yt,PaddingRightIcon as It,PaddingTopIcon as Tt,PageIcon as Se,PhoneIcon as Et,PlacementIcon as vt,ProductSizeIcon as Nt,RotateIcon as Rt,SquareIcon as Ot,StylesIcon as Lt,TextLinesIcon as At,WidthIcon as Ft,WrapIcon as wt}from"efficient-easel/icons";import{FieldGlyph as _e}from"../../components/FieldGlyph.js";import{resolvePageBackground as Pt}from"../content/page-background.js";import{CORNER_SIDES as A,CORNER_SIDE_POINTS as J,CORNER_SIDES_LABEL as F,cornerSidesSummary as ye,hasOwnSectionCorners as kt,normalizeCornerSides as W}from"../content/section-corners.js";import{hasOwnCardCorners as Bt}from"../content/card-corners.js";import{SECTION_MOTION_NONE as Dt,SECTION_MOTION_OPTIONS as Ht}from"../content/section-animation.js";import{enclosingSectionProps as Ie}from"./enclosing-section.js";import{SettingsCorners as Te,SettingsField as h,SettingsGroupHead as Gt,SettingsGroupSub as Mt,SettingsPlacement as $t,SettingsSegmented as Wt,SettingsSwitch as Ut}from"efficient-easel/panel";import{FieldSelect as Kt,ListField as Xt}from"efficient-easel/fields";import{ColourControl as Ee}from"./ColourControl.js";import ve from"./MarkupToolbar.js";import{deviceField as T}from"./device-fields.js";import{noControlField as Vt}from"./panel-no-control-mark.js";import{phoneKey as U,resolvePhoneValue as Z}from"./phone-override.js";import{SuppressibleText as zt}from"./section-text-suppress.js";import{TYPED_NUMBER_COMMIT as Yt,typedNumberKey as Ne}from"./slider-typing.js";import{CARD_INDEX_OPTIONS as jt,CARD_OUTLINE_OPTIONS as qt,DEFAULT_CARD_INDEX_FORMAT as Jt,DEFAULT_CARD_OUTLINE as Zt}from"../sections/product-card-style.js";import{COVER_INDEX_OPTIONS as Qt,DEFAULT_COVER_INDEX as en}from"../sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as tn}from"./text-control-kinds.js";import nn from"../../components/ImageFocusRow.js";import on from"../../components/MediaUploadField.js";import rn from"../../components/MultiSelectField.js";import ln from"../../components/SectionThemePicker.js";import an from"../../components/SearchSelectField.js";import sn from"../../components/StorefrontLinkField.js";import Re from"../../components/UiIcon.js";import{SECTION_PADDING as S}from"../content/section-padding.js";import{hasPhoneHeight as cn,resolveSectionMinHeight as un}from"../content/section-min-height.js";import{VIEW_TIER_LABEL as D}from"../content/view-tiers.js";import{SECTION_MIN_HEIGHT as dn,SECTION_MIN_HEIGHT_GROUP_LABEL as H,SECTION_SCREEN_PCT as pn}from"../content/section-min-height.js";import{CONTAINER_DIRECTION_LABEL as fn,containerDirectionPoints as hn,resolveContainerDirection as Oe}from"../content/container-direction.js";import{BOX_ALIGN_POINTS as mn,BOX_BLOCK_SPACING_LABEL as gn,BOX_BLOCK_SPACING_POINTS as Le,BOX_JUSTIFY_POINTS as Ae,BOX_PHONE_ROW_LABEL as bn,BOX_PHONE_ROW_MAX as Cn,BOX_PHONE_ROW_MIN as Fe,BOX_SHARE_LABEL as we,BOX_SHARE_POINTS as Q,BOX_WRAP_LABEL as xn,BOX_WRAP_POINTS as Pe}from"../content/box-layout.js";import{usePreviewHeader as ee}from"../../components/PreviewHeaderContext.js";import{CONTAINER_GAP as te,CONTAINER_GAP_BUILT_IN as Sn,GAP_FIELD_CONTAINER as _n,hasOwnContainerGap as yn,resolveContainerGap as In}from"../content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as Tn,CARD_IMAGE_BG_OFF as En,CARD_IMAGE_BG_SWATCH_NAMES as vn,CARD_IMAGE_BG_SWATCHES as Nn,isCardImageBackgroundInheriting as Rn,resolveCardImageBackground as On,THEME_CARD_IMAGE_BG as Ln}from"../content/card-image-background.js";import{SECTION_BG_INHERIT as An,SECTION_BG_SWATCHES as Fn,SECTION_BG_SWATCH_NAMES as wn,THEME_SECTION_BG as Pn,isSectionBackgroundInheriting as kn}from"../content/section-background.js";import{SECTION_THEME_GROUP_LABEL as Bn}from"../content/section-surface.js";import{TYPE_SIZE_FIXED as Dn,TYPE_SIZE_INHERIT as Hn,isTypeSizeInheriting as Gn}from"../content/section-type-size.js";import{SECTION_WIDTH_CHOICES as Mn,WIDTH_CHOICE_LABEL as $n,WIDTH_INHERIT as Wn,resolveWidth as Un,sectionRunsFullWidth as ke}from"../content/section-width.js";import{useFoldHeadingLevel as Be}from"./panel-heading-scope.js";import{withStyleKind as Kn}from"efficient-easel/style-clipboard";function G(e){for(const[t,n]of Object.entries(e))n&&typeof n=="object"&&!He(n)&&Kn(n,`section:${t}`);return e}function Wr({children:e}){return r("div",{className:"sf-field-label",children:e})}function De(){return null}function Xn(e){if(!e.trim())throw new Error("noGlyph() needs a reason naming the ruling that decided it.");return r(De,{},e)}function Vn(e){return e.type===De}function K(e){return Vn(e)?void 0:e}function E({inherited:e,source:t,detail:n,onReset:o,onOptOut:i,optOutTitle:l,label:a}){if(e){const c=n?`Following the ${t.toLowerCase()} setting \u2014 ${n}`:`Following the ${t.toLowerCase()} setting`;if(!i)return m("span",{className:"sf-inherit",title:n?c:void 0,children:["Inherits \xB7 ",t]});const d=`${c}. ${l??`Click to keep ${a} at this section's own size instead`}`;return m("button",{type:"button",className:"sf-inherit sf-inherit--following",onClick:i,title:d,"aria-label":d,children:["Inherits \xB7 ",t,r("span",{className:"sf-inherit-revert","aria-hidden":"true",children:"\u21F1"})]})}const s=`Reset ${a} to follow the ${t.toLowerCase()} setting${n?` (${n})`:""}`;return m("button",{type:"button",className:"sf-inherit sf-inherit--over",onClick:o,title:s,"aria-label":s,children:["Overridden",r("span",{className:"sf-inherit-revert","aria-hidden":"true",children:"\u21BA"})]})}function zn(){const{appState:e}=O(i=>i),t=e.data.root?.props??{},{mode:n,pageWidth:o}=Un(t,"full");return n==="page"?`Page width \u2014 ${o}px`:n==="contained"?"Page width \u2014 Contained":"Page width \u2014 Full"}function Yn(){const{blockGap:e}=ee();return e===null?"Site block gap \u2014 not set, so this container keeps its own spacing":`Site block gap \u2014 ${e}px`}function jn({inherited:e,onReset:t,label:n}){return r(E,{inherited:e,source:"Site",detail:Yn(),onReset:t,label:n})}function qn({inherited:e,onReset:t,label:n}){return r(E,{inherited:e,source:"Page",detail:zn(),onReset:t,label:n})}function Jn(){return m("svg",{className:"sf-field-type",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.8,"aria-hidden":"true",children:[r("polyline",{points:"4 7 4 4 20 4 20 7"}),r("line",{x1:"9",x2:"15",y1:"20",y2:"20"}),r("line",{x1:"12",x2:"12",y1:"4",y2:"20"})]})}function w({value:e,onChange:t,label:n,placeholder:o,hint:i,multiline:l,hideable:a=!0,markup:s=!0}){const{text:c,hidden:d}=se(e),f=z(null),u=z(null),p=b=>t(a?{text:b,hidden:d}:b),g=()=>t({text:c,hidden:!d});return m("div",{className:`sf-field${a&&d?" is-hidden":""}`,children:[m("div",{className:"sf-field-head",children:[r(Jn,{}),r("span",{className:"sf-field-label sf-field-label--inline",children:n}),a&&r("button",{type:"button",className:"sf-field-eye","aria-pressed":d,"aria-label":d?`Show ${n} on the slide`:`Hide ${n} on the slide`,title:d?`Show ${n} on the slide`:`Hide ${n} on the slide`,onClick:g,children:d?r(Re,{name:"eye-off",size:14}):r(Re,{name:"eye",size:14})})]}),m("div",{className:"sf-copybox",children:[s&&r(ve,{target:l?u:f,value:c,onChange:p}),l?r("textarea",{ref:u,value:c,placeholder:o,onChange:b=>p(b.target.value)}):r("input",{ref:f,type:"text",value:c,placeholder:o,onChange:b=>p(b.target.value)})]}),i&&r("p",{className:`sf-field-hint${no(i)?" sf-field-hint--while-typing":""}`,children:i})]})}function Ur(e,t){return{...e,[pe]:t}}function Kr(e){const t=e[I];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[I]:{...t,offPage:!0}}}function Xr(e){return!e||typeof e!="object"?!1:e[I]?.offPage===!0}function Vr(e){const t=e[I];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[I]:{...t,identifier:!0}}}function zr(e){return!e||typeof e!="object"?!1:e[I]?.identifier===!0}import{TEXT_CONTROL_KINDS as qi,SCALAR_TEXT_CONTROLS as Ji}from"./text-control-kinds.js";const Zn=new Set(tn),P=(e,t)=>{const n={...t,[I]:e};if(!Zn.has(e.control))return n;const o=t.render;return{...Vt(n,"authored-copy"),render:i=>r(zt,{name:i.name,children:o(i)})}},Yr="Everything else on this block comes from the linked post. Unlink it to edit by hand.",Qn="Select a word, then press the highlighter.",eo="A short name so a link can jump straight to this section, like yoursite.com/page#about.",to=new Set([Qn]),no=e=>to.has(e);function jr(e,t,n){return P({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(w,{value:o,onChange:i,label:e,placeholder:t,hint:n})})}function qr(e,t,n){return P({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(w,{value:o,onChange:i,label:e,placeholder:t,hint:n,multiline:!0})})}function oo(e,t,n){return P({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(w,{value:o,onChange:i,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function Jr(e,t,n){return P({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(w,{value:o,onChange:i,label:e,placeholder:t,hint:n,hideable:!1})})}function Zr(e){return{type:"custom",[de]:{label:e},render:({value:t,onChange:n})=>r(sn,{value:ce(t),onChange:n,label:e})}}function Qr(e,t,n){return P({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(w,{value:o,onChange:i,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const ei={Content:At,Style:Lt,Layout:xt,Animation:me};function ti(e,t){return e.includes("Content")?t!=="Content":null}function ro({label:e}){return r(Gt,{title:e,level:Be(1)})}function io({level:e,label:t}){return e===1?r(ro,{label:t}):r(ao,{label:t})}const ne="__fold";function He(e){return e?.[ne]??null}function Ge(e,t){return{type:"custom",[ne]:{label:e,level:t},render:()=>r(io,{level:t,label:e})}}function C(e){return Ge(e,2)}function ni(e){return{type:"custom",render:()=>r(lo,{text:e})}}function lo({text:e}){return r("p",{className:"sf-note",children:e})}function oi(e){return Ge(e,1)}function ri(e){return He(e)!==null&&e?.tabs!==void 0}const Me=new Map;function ii(e,t){const n=`${e}\0${t?t.join(""):""}`,o=Me.get(n)??{type:"custom",tabs:t,[ne]:{label:e,level:1},bucket:e,marker:!0,render:()=>r(y,{})};return Me.set(n,o),o}function ao({label:e}){return r(Mt,{title:e,level:Be(2)})}function $e({swatches:e,current:t,onPick:n,names:o}){const i=e.find(a=>a.toLowerCase()===t.toLowerCase()),l=(i?o?.[i]:void 0)??t;return m("div",{className:"sf-swatches",children:[e.map(a=>{const s=o?.[a]??a;return r("button",{type:"button","aria-pressed":t.toLowerCase()===a.toLowerCase(),className:`sf-swatch ${t.toLowerCase()===a.toLowerCase()?"is-active":""}`,style:{background:a},onClick:()=>n(a),"aria-label":s,title:s},a)}),r("span",{className:"sf-swatch-hex",children:l})]})}function li(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=kn(n,t);return r(h,{label:e,icon:r(at,{}),action:r(E,{inherited:i,source:"Theme",detail:"the theme's section background",onReset:()=>o(An),label:e}),children:$e({swatches:Fn,current:i?Pn:n??t??"",onPick:o,names:wn})})}}}function so(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=n,l=Rn(i,t);return r(h,{label:e,icon:r(bt,{}),action:r(E,{inherited:l,source:"Theme",detail:"the theme's image stage",onReset:()=>o(Tn),label:e}),children:$e({swatches:Nn,current:l?Ln:On(i,t),onPick:o,names:vn})})}}}function ai(e=n=>n,t){return G({_gSectionTheme:C(Bn),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>r(ln,{value:e(n),onChange:o,followLabel:t})}})}function N({min:e,max:t,step:n,value:o,onChange:i,suffix:l="",readout:a=!0,notch:s,ariaLabel:c,disabled:d=!1}){const f=s!==void 0&&Number.isFinite(s)&&s>=e&&s<=t;return m("div",{className:f?"sf-slider has-notch":"sf-slider",style:f?{"--sf-notch":(s-e)/(t-e)}:void 0,children:[r("input",{type:"range",min:e,max:t,step:n,value:o,"aria-label":c,disabled:d||void 0,onChange:u=>i(Number(u.target.value))}),a&&r(co,{value:o,min:e,max:t,step:n,suffix:l,ariaLabel:c,onChange:i})]})}function co({value:e,min:t,max:n,step:o,onChange:i,suffix:l="",ariaLabel:a,children:s}){const[c,d]=Y(null),f=u=>{u.editing||d(null),u.commit!==null&&u.commit!==e&&i(u.commit)};return c===null?r("button",{type:"button",className:"sf-slider-val",title:"Click to type a value","aria-label":a?`${a}: type a value`:"Type a value",onClick:()=>d(String(e)),children:s??m(y,{children:[e,l]})}):r("input",{autoFocus:!0,type:"text",inputMode:"decimal",className:"sf-slider-val sf-slider-typed",value:c,"aria-label":a,onChange:u=>d(u.target.value),onFocus:u=>u.currentTarget.select(),onKeyDown:u=>{const p=Ne(u.key,c,t,n,o);p.handled&&(u.preventDefault(),u.stopPropagation(),f(p))},onBlur:()=>f(Ne(Yt,c,t,n,o))})}function k(e,t,n,o,i,l,a="",s){return{type:"custom",render:c=>r(h,{label:e,icon:K(t),action:s?s("storedValue"in c?c.storedValue:c.value,c.onChange):void 0,children:N({min:n,max:o,step:i,value:typeof c.value=="number"?c.value:l,suffix:a,onChange:c.onChange})})}}function We({min:e,max:t,step:n,px:o,label:i,onChange:l,disabled:a=!1}){const{cornerRadiusPx:s}=ee();return r(y,{children:N({min:e,max:t,step:n,value:o??(typeof s=="number"?s:e),readout:!1,ariaLabel:i,disabled:a,onChange:l})})}function M(e,t){const{min:n,max:o,step:i=1,unsetLabel:l="Not set",hint:a,restAtSite:s=!1,restTrack:c,unsetMark:d}=t;return{type:"custom",render:({value:f,onChange:u})=>{const p=typeof f=="number"?f:null,g=p===null;return r(h,{label:e,value:g?d?"":l:`${p}px`,changed:!g,action:g?d??null:r(j,{label:e,what:"change",onClear:()=>u(null)}),hint:a,children:c?c({min:n,max:o,step:i,px:p,label:e,onChange:u}):s?r(We,{min:n,max:o,step:i,px:p,label:e,onChange:u}):N({min:n,max:o,step:i,value:p??n,readout:!1,ariaLabel:e,onChange:u})})}}}function si(e){const t=k("Gap",r(Ce,{}),te.min,te.max,te.step,Sn[e],"px",(n,o)=>r(jn,{inherited:!yn(e,n),onReset:()=>o(void 0),label:"Gap"}));return{type:"custom",[_n]:e,render:n=>t.render({...n,value:In(e,n.value,n.field?.siteGap),storedValue:n.value,onChange:o=>n.onChange(o)})}}function uo(){return{type:"custom",render:({value:e,onChange:t})=>{const o=W(e)??[...A],i=o.length===A.length;return r(h,{label:F,icon:r(be,{}),value:ye(o),changed:!i,action:i?null:r(j,{label:F,what:"change",onClear:()=>t(null)}),hint:"Corners left off stay square. The row above sets how round the others are.",children:r(mo,{value:o,onChange:l=>{const a=W(l)??[];t(a.length===A.length?null:a)}})})}}}function po(){return M("Corners",{min:B,max:$,unsetLabel:"Inherits \xB7 Site",restTrack:e=>r(fo,{...e}),hint:r(ho,{})})}const Ue="This section runs edge to edge, so its corners sit off the page. Set Width to Content width to use them.";function oe(){return ke(X())}function fo(e){return r(We,{...e,disabled:oe()})}function ho(){return r(y,{children:oe()?Ue:"Follows Site styles \u25B8 Basics \u25B8 Corners until you set a number here."})}function mo({value:e,onChange:t}){const n=oe();return r(Te,{label:F,value:e,corners:n?J.map(o=>({...o,disabled:!0,title:Ue})):J,onChange:t})}function ci(){return G({_gShape:C("Shape"),sectionCorners:po(),sectionCornerSides:uo()})}function ui(){return{_gMotion:C("Motion"),sectionAnimation:ae("Entrance",r(me,{}),[...Ht],Dt)}}function re(){let e=null;try{const{appState:t,selectedItem:n}=O(i=>i),o=n?.props?.id?String(n.props.id):void 0;e=o?Ie(t?.data,o):null}catch{e=null}return e!==null&&ke(e)}function Ke(e){const{cornerRadiusPx:t}=ee(),n=re(),o=typeof t=="number"?t:e;let i=null;try{const{appState:a,selectedItem:s}=O(d=>d),c=s?.props?.id?String(s.props.id):void 0;i=c?Ie(a?.data,c):null}catch{i=null}if(n||!i)return o;const l=i.sectionCorners;return kt(l)?l:o}function go({min:e,max:t,step:n,px:o,label:i,onChange:l}){const a=Ke(e);return r(y,{children:N({min:e,max:t,step:n,value:o??a,readout:!1,ariaLabel:i,onChange:l})})}function bo({label:e}){const t=re(),n=Ke(B);return r(E,{inherited:!0,source:t?"Site":"Section",detail:`${t?"Site":"Section"} \u2014 ${n}px`,onReset:()=>{},label:e})}function Co(){return r(y,{children:re()?"The section is full width, so this card follows Site styles \u25B8 Basics \u25B8 Corners.":"Follows the section's Corners until you set a number here."})}function xo(){return M("Corners",{min:B,max:$,unsetLabel:"Inherits \xB7 Section",unsetMark:r(bo,{label:"Corners"}),restTrack:e=>r(go,{...e}),hint:r(Co,{})})}function So({value:e,onChange:t}){return r(Te,{label:F,value:e,corners:J,onChange:t})}function _o({unset:e}){return r(y,{children:e?"Set a number above first \u2014 there is nothing to shape yet.":"Corners left off stay square. The row above sets how round the others are."})}function yo(){return{type:"custom",render:({value:e,onChange:t})=>{const o=W(e)??[...A],i=o.length===A.length;return r(h,{label:F,icon:r(be,{}),value:ye(o),changed:!i,action:i?null:r(j,{label:F,what:"change",onClear:()=>t(null)}),hint:r(_o,{unset:!Bt(e)}),children:r(So,{value:o,onChange:l=>{const a=W(l)??[];t(a.length===A.length?null:a)}})})}}}function Io(){return{type:"custom",render:()=>r(je,{})}}function di(){return{_gShape:C("Shape"),cardCorners:xo(),cardCornerSides:yo(),cardCornersApplyAll:Io()}}function pi(){return v("Justify",r(lt,{}),Ae,Ae[0].value)}function fi(){return v("Item alignment",r(it,{}),mn,"stretch")}function hi(){return v(xn,r(wt,{}),Pe,Pe[0].value)}function mi(){return{type:"custom",render:({value:e,onChange:t})=>{const n=Q.find(o=>o.value===e)??Q[0];return r(h,{label:we,icon:r(ge,{}),value:n.label,children:r("div",{className:"sf-gallery-layouts",role:"group","aria-label":we,children:Q.map(o=>r("button",{type:"button","aria-pressed":n.value===o.value,"aria-label":o.label,title:o.label,onClick:()=>t(o.value),children:r("span",{className:"sf-gallery-pic",children:To(o.weights).map((i,l)=>r("i",{style:{gridColumn:`span ${i}`}},l))})},o.value))})})}}}function To(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 gi(){return v(gn,r(Ce,{}),Le,Le[0].value)}function bi(){return k(bn,r(Et,{}),Fe,Cn,1,Fe)}function Ci(e){const t=ae(fn,Xn("`Direction` names how a container's children run \u2014 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)."),hn(e),Oe(e,void 0));return{type:"custom",render:n=>t.render({...n,value:Oe(e,n.value),onChange:o=>n.onChange(o)})}}function xi(e,t,n,o,i,l){return{type:"custom",render:({value:a,onChange:s})=>r(h,{label:e,icon:r(_e,{noun:l}),action:r(E,{inherited:Gn(a),source:"Text",detail:"Website settings \u2192 Text",onReset:()=>s(Hn),onOptOut:()=>s(Dn),optOutTitle:`Click to keep ${e} at this section's own built-in size instead`,label:e}),children:N({min:t,max:n,step:o,value:typeof a=="number"?a:i,suffix:"px",onChange:s})})}}function Si(){return{_gCellWidth:C("Cell width"),gridSpan:v("Positions",r(ge,{}),[{label:"Auto",value:""},...Array.from({length:Qe},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function X(){let e=null;try{e=O(t=>t).selectedItem}catch{e=null}return e?.props??{}}function Eo({min:e,max:t,step:n,px:o,label:i,onChange:l,desktopKey:a,fallback:s}){const c=X()[a],d=Z(void 0,c,s);return r(y,{children:N({min:e,max:t,step:n,value:Z(o,c,s),readout:!1,ariaLabel:i,notch:d,onChange:l})})}function vo({label:e,desktopKey:t,fallback:n}){const o=X()[t],i=Z(void 0,o,n);return r(E,{inherited:!0,source:D.desktop,detail:`${D.desktop} \u2014 ${i}px`,onReset:()=>{},label:e})}function No(e){return M(e.label,{min:e.min,max:e.max,step:e.step,unsetLabel:`Inherits \xB7 ${D.desktop}`,unsetMark:r(vo,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback}),restTrack:t=>r(Eo,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}function _i(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,i=_=>o?_:`Padding ${_.toLowerCase()}`,l=_=>k(i("Top"),r(Tt,{}),S.min,S.max,S.step,_,"px"),a=(_,ze,Ye,V=S)=>T("mobile",No({label:i(_),desktopKey:ze,min:V.min,max:V.max,step:V.step,fallback:Ye})),s=e.top??S.min,c=e.bottom??S.min,d="sectionPaddingLeft",f="sectionPaddingRight",u=e.sideBounds??S,p=e.side??u.min,g=e.sidePhone??p,x=e.phone===!0,b=_=>x?T("desktop",_):_;return G({...o?{_gSpacing:C("Padding")}:{},[t]:b(l(s)),...x?{[U(t)]:a("Top",t,s)}:{},...e.only==="top"?{}:{[n]:b(k(i("Bottom"),r(_t,{}),S.min,S.max,S.step,c,"px")),...x?{[U(n)]:a("Bottom",n,c)}:{}},...e.sides?{[d]:b(k(i("Left"),r(yt,{}),u.min,u.max,u.step,p,"px")),...x?{[U(d)]:a("Left",d,g,u)}:{},[f]:b(k(i("Right"),r(It,{}),u.min,u.max,u.step,p,"px")),...x?{[U(f)]:a("Right",f,g,u)}:{}}:{}})}const Ro={contained:"Contained",page:"Page",full:"Full"},ie="Width";function yi(e,t=Mn,n=!0){const o=t.map(i=>({label:$n[i]??Ro[i],value:i}));return G({...n?{_gWidth:C(ie)}:{},widthMode:{type:"custom",render:({onChange:i,field:l})=>r(h,{label:"Width",icon:r(Ft,{}),action:n?r(qn,{inherited:l?.inherited??!1,onReset:()=>i(Wn),label:ie}):void 0,children:le({options:o,value:l?.currentValue||e,onChange:i,ariaLabel:ie})})}})}function Ii(){const e=o=>({type:"custom",render:({value:i,onChange:l})=>m("div",{className:"sf-field",children:[o?m("div",{className:"sf-field-head",children:[r("span",{className:"sf-field-label sf-field-label--inline",children:H}),o(l)]}):null,r("div",{children:le({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:["auto","fixed","screen"].includes(i)?i:"auto",onChange:l,ariaLabel:H})})]})}),t=()=>({type:"custom",render:({value:o,onChange:i,field:l})=>{const a=l?.unit==="%"?"%":"px",s=a==="%"?pn:dn;return r("div",{className:"sf-field",children:N({min:s.min,max:s.max,step:s.step,value:typeof o=="number"?o:s.fallback,suffix:a,ariaLabel:H,onChange:i})})}}),n=()=>ae("Unit",r(xe,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");return G({_gHeight:C(H),sectionHeightMode:T("desktop",e()),sectionHeightValue:T("desktop",t()),sectionHeightUnit:T("desktop",n()),sectionHeightModePhone:T("mobile",e(o=>r(Oo,{onClear:()=>o(void 0)}))),sectionHeightValuePhone:T("mobile",t()),sectionHeightUnitPhone:T("mobile",n())})}function Oo({onClear:e}){const t=X(),n=cn(t),o=un(t),i=`${D.desktop} \u2014 ${o.mode==="auto"?"Auto":`${o.value}${o.unit}`}`;return r(E,{inherited:!n,source:D.desktop,detail:i,onReset:e,label:H})}function Ti(){return{_gAnchor:C("Anchor"),anchor:oo("Anchor name","e.g. about",eo)}}function R(e,t,n){return{type:"custom",render:({value:o,onChange:i,id:l,name:a})=>{const s=typeof o=="boolean"?o:t,c=`${l??a??e}-label`;return r(h,{label:e,labelId:c,icon:n,action:r(Ut,{checked:s,onChange:i,ariaLabelledBy:c})})}}}function Ei(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const i=`${String(n??o??"pageBackground")}-colour`;return r(h,{label:"Background",icon:r(Se,{}),htmlFor:i,action:r(Ee,{id:i,label:"Background",value:Pt(e),onChange:t})})}}}function vi(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=typeof n=="boolean"?n:t;return m("label",{className:"sf-field sf-field--row sf-checkbox",children:[r("span",{className:"sf-field-label sf-field-label--inline",children:e}),r("input",{type:"checkbox",checked:i,onChange:l=>o(l.target.checked)})]})}}}function Ni(e,t){return{type:"custom",render:({value:n,onChange:o})=>m("div",{className:"sf-field sf-field--row",children:[r("span",{className:"sf-field-label sf-field-label--inline",children:e}),Ee({value:n||t,onChange:o,label:e})]})}}const Lo=[{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 Xe({label:e,value:t,onChange:n,points:o=Lo}){return r($t,{label:e,value:t,points:o,onChange:n})}function Ri(e,t=ue,n="mediaImage"){return{type:"custom",render:({value:o,onChange:i})=>r("div",{className:"sf-field",children:r(Ao,{label:e,value:o||t,onChange:i,imageProp:n})})}}function Ao({label:e,value:t,onChange:n,imageProp:o}){const{selectedItem:i}=O(a=>a),l=i?.props?.[o];return r(nn,{label:e,value:t,onChange:n,image:typeof l=="string"?l:void 0})}const Fo=he([]);function Oi(e,{stacking:t,fallback:n=ot}){return{type:"custom",render:({value:o,onChange:i})=>{const l=nt.includes(o)?o:n;return t?r(wo,{label:e,value:l,onChange:i}):Ve({label:e,value:l,onChange:i,points:Fo})}}}function wo({label:e,value:t,onChange:n}){const{appState:o,selectedItem:i}=O(s=>s),l=i?.props?.id?String(i.props.id):void 0,a=l?tt(o?.data,l):[];return Ve({label:e,value:t,onChange:n,points:he(a,l)})}function Ve({label:e,value:t,onChange:n,points:o}){const i=o.find(l=>l.disabled);return r(h,{label:e,icon:r(vt,{}),hint:i?i.title:void 0,children:Xe({label:e,value:rt(t),onChange:n,points:o})})}const Li={top:r(ft,{}),right:r(pt,{}),bottom:r(ut,{}),left:r(dt,{})};function Ai(e,t,n,o,i,l){const a=f=>t.find(u=>u.value===f),s=f=>({value:f,label:"",disabled:!0,title:o}),c=f=>{const u=t.find(g=>g.cell===f);if(!u)return s(`missing-${f}`);const p=l?.[f];return p?{value:u.value,label:u.label,icon:p}:{value:u.value,label:u.label}},d=[s("corner-top-left"),c("top"),s("corner-top-right"),c("left"),s("centre"),c("right"),s("corner-bottom-left"),c("bottom"),s("corner-bottom-right")];return{type:"custom",render:({value:f,onChange:u})=>{const p=t.some(g=>g.value===f)?f:n;return r(h,{label:e,icon:i,value:a(p)?.label??"",children:Xe({label:e,value:p,onChange:u,points:d})})}}}const Po="\0note";function v(e,t,n,o,i){return{type:"custom",options:n,fallback:o,...i?{note:i}:{},render:({value:l,onChange:a,field:s})=>{const c=s.options??n,d=s.fallback??o,f=c.some(u=>u.value===l)?l:d;return r(h,{label:e,icon:K(t),children:r(Kt,{value:f,ariaLabel:e,onChange:a,options:[...i?[{label:i,value:Po,disabled:!0}]:[],...c.map(u=>({label:u.label,value:u.value}))]})})}}}function Fi(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:i,field:l})=>r(rn,{label:e,options:l.options??t,value:Array.isArray(o)?o:[],onChange:i,...n?{emptyLabel:n}:{}})}}function wi(e,t,n,o){return{type:"custom",options:t,fallback:n,render:({value:i,onChange:l,field:a})=>r(an,{label:e,options:a.options??t,fallback:a.fallback??n,value:i,onChange:l,placeholder:o})}}function Pi(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const i={value:n,onChange:o,...t};return r(e,{...i})}}}function le({options:e,value:t,onChange:n,ariaLabel:o,disabled:i=!1}){return r(Wt,{options:e.map(l=>({id:l.value,label:l.label,title:l.title})),value:t,onChange:n,ariaLabel:o,disabled:i})}const ki=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function ae(e,t,n,o){const i=n.map(l=>typeof l=="string"?{label:l,value:l}:l);return{type:"custom",render:({value:l,onChange:a,field:s})=>r(h,{label:e,icon:K(t),children:le({options:i,value:i.some(c=>c.value===l)?l:l||s?.currentValue||o,onChange:a,ariaLabel:e})})}}const ko="__media";function Bi(e,t,n){return{type:"custom",[ko]:!0,render:({value:o,onChange:i})=>r(on,{value:o||"",onChange:i,label:e,accept:t,placeholder:n})}}const Di={HeroSingle:["imageFocal"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function Hi({value:e,onChange:t,label:n}){const o=e||{},i=!!o.pending,l=i?"var(--fg-dim, #888)":o.ok?"#1d9e75":"#d85a30",a=(s,c)=>t({...o,[s]:c===""?void 0:Number(c)});return m(h,{label:n,icon:r(q,{}),children:[r("button",{type:"button",disabled:i,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding\u2026"}),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?"Finding\u2026":"Find coordinates"}),o.status&&r("div",{style:{marginTop:6,fontSize:12,lineHeight:1.4,color:l},children:o.status}),r("div",{style:{marginTop:6,fontSize:11,color:"var(--fg-dim, #999)"},children:"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?"Hide manual coordinates":"Enter coordinates manually"}),o.manual&&m("div",{style:{marginTop:8,display:"grid",gap:8},children:[r(h,{label:"Latitude",icon:r(q,{}),children:r("input",{type:"number",step:"any",placeholder:"e.g. 34.0990198",value:typeof o.lat=="number"?o.lat:"",onChange:s=>a("lat",s.target.value)})}),r(h,{label:"Longitude",icon:r(q,{}),children:r("input",{type:"number",step:"any",placeholder:"e.g. -117.9842833",value:typeof o.lng=="number"?o.lng:"",onChange:s=>a("lng",s.target.value)})})]})]})}function Bo(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function Do(e,t,n){const o=e.map(i=>({text:i?.text??""}));return t===null||t<0||t>=e.length?o:o.map((i,l)=>l===t?{text:n}:i)}function Gi(e,t){return e===null?null:t>e?e:null}function Ho(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 Mi={label:"Ticker items",icon:r(St,{})};function $i(e,t,n,o){return{type:"custom",[I]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},render:({value:i,onChange:l})=>r(Go,{label:e,icon:K(t),items:Array.isArray(i)?i:[],placeholder:n,onChange:l,markup:o==="markup"})}}function Go({label:e,icon:t,items:n,placeholder:o,onChange:i,markup:l=!1}){const a=z(null),[s,c]=Y(null),d=u=>u.map(p=>({text:p?.text??""}));return r(Xt,{label:e,icon:t,noun:"item",items:n,onChange:u=>{const p=Ho(n,u,s);p===null&&(a.current=null),c(p),i(d(u))},newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:l?r(ve,{target:a,value:Bo(n,s),onChange:u=>i(Do(n,s??-1,u)),disabled:s===null,label:s===null?"Formatting \u2014 click a row first":`Formatting \u2014 row ${s+1}`}):void 0,renderRow:(u,p,g)=>r("input",{type:"text",className:l&&s===p?"sf-list-marking":void 0,value:u?.text??"",placeholder:o,"aria-label":`${e} ${p+1}`,onChange:x=>g({text:x.target.value}),onFocus:x=>{a.current=x.currentTarget,c(p)}})})}function Wi(e,t){const n=`${e.label} \u2014 row ${t+1}`;return P({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:i})=>r(w,{value:o,onChange:i,label:n,placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function Ui(e){return{_gCards:C("Cards"),coverIndex:v("Cover image",r(Ct,{}),Qt,String(en),e?.coverHint??"A card's opening picture \u2014 a card pinned to a finish keeps its own."),imageBackground:so("Image background",En),cardImage:Mo(),spinOnHover:R("Rotate on hover",e?.spinDefault??!0,r(Rt,{}))}}function Ki(){return{outline:v("Card outline",r(Ot,{}),qt,Zt),indexBadge:v("Card number",r(xe,{}),jt,Jt),showBadge:R("Product badge",!0,r(_e,{noun:"tag"}))}}function Xi(e){const t=e?.bottomDefault??!0;return{_gShowOnCard:C("Show on a card"),showCardPrice:R("Price",!0,r(ht,{})),showCardFinishes:R("Finish swatches",!0,r(mt,{})),showCardSizes:R("Sizes",t,r(Nt,{})),showCardBuy:R("Buy button",t,r(st,{})),showCardPage:R("Page button",t,r(Se,{}))}}function Mo(){return M("Card image",{min:B,max:$,step:qe,hint:"Rounds the picture. The card's own corner is in Site styles."})}function Vi(){return M(Ze,{min:B,max:$,step:Je,unsetLabel:"Square",hint:"Rounds the picture. Left alone it stays square."})}function zi(){return{type:"custom",render:({value:e,onChange:t})=>r($o,{value:typeof e=="string"?e:"",onChange:t})}}function $o({value:e,onChange:t}){const[n,o]=Y(null),i=fe.filter(a=>n===null||L[a].across===n),l=e&&e in L?L[e]:null;return m(y,{children:[r(h,{label:"Photos in a row",icon:r(ct,{}),children:m("div",{className:"sf-gallery-filter",children:[r("button",{type:"button","aria-pressed":n===null,onClick:()=>o(null),children:"All"}),et.map(a=>r("button",{type:"button","aria-pressed":n===a,onClick:()=>o(a),children:a},a))]})}),r(h,{label:"Layout",icon:r(gt,{}),value:l?l.label:"Not chosen",hint:`${i.length} of ${fe.length} layouts`,children:r("div",{className:"sf-gallery-layouts",children:i.map(a=>r("button",{type:"button","aria-pressed":e===a,"aria-label":L[a].label,title:L[a].label,onClick:()=>t(e===a?"":a),children:r("span",{className:"sf-gallery-pic",children:L[a].desktop.map(([s,c],d)=>r("i",{style:{gridColumn:`span ${s}`,gridRow:`span ${c}`}},d))})},a))})})]})}export{eo as ANCHOR_HINT,Yr as BOUND_TO_POST_NOTE,ei as BUCKET_ICONS,Di as CUSTOM_FIELD_MEDIA,Hi as CoordsField,Li as EDGE_ARROWS,ue as FOCAL_DEFAULT,Lo as FOCAL_POINTS,ne as FOLD_FIELD_MARKER,Xe as FocalPicker,ao as GroupLabel,Qn as HIGHLIGHT_HINT,w as HidableTextField,E as InheritBadge,de as LINK_FIELD_MARKER,Wr as Label,ko as MEDIA_FIELD_MARKER,ki as MEDIA_TYPE_OPTIONS,lo as PanelNoteLine,Ve as PlacementGridView,pe as SCAFFOLD_FIELD_MARKER,Ji as SCALAR_TEXT_CONTROLS,Ue as SECTION_BLEEDS_HINT,ro as SectionHeading,le as Segmented,jn as SiteGapInheritBadge,N as Slider,co as SliderValue,$e as Swatches,qi as TEXT_CONTROL_KINDS,I as TEXT_FIELD_MARKER,Mi as TICKER_ITEMS_ROW,Go as TextListField,Jn as TypeGlyph,qn as WidthInheritBadge,Ho as aimAfterListChange,Ti as anchorFields,li as backgroundField,fi as boxAlignField,gi as boxBlockSpacingField,pi as boxJustifyField,bi as boxPhoneRowField,mi as boxShareField,hi as boxWrapField,ii as bucketHeader,yo as cardCornerSidesField,xo as cardCornersField,so as cardImageBackgroundField,Mo as cardImageField,Ui as cardMediaFields,di as cardShapeFields,Xi as cardShowFields,Ki as cardStyleFields,Si as cellWidthFields,vi as checkbox,Ni as colorInput,Jr as copyText,Ci as directionField,Ai as edgePad,ti as entriesHiddenForTab,Ri as focalPicker,Gi as focusAfterRemove,He as foldMetaOf,zi as galleryLayoutField,si as gapField,C as group,Ii as heightFields,ce as hidableText,no as hintIsWhileTyping,K as iconOf,Vi as imageCornersField,ri as isBucketHeader,Vn as isNoGlyph,Zr as linkField,Fi as multiSelect,Xn as noGlyph,Ei as pageBackgroundField,ni as panelNote,No as phoneOverrideField,Oi as placementField,oo as plainText,Qr as plainTextarea,M as pxField,se as readHidable,Bo as rowText,wi as searchSelect,oi as section,ui as sectionAnimationFields,uo as sectionCornerSidesField,po as sectionCornersField,ci as sectionShapeFields,ai as sectionThemeFields,ae as segmented,v as select,Do as setRowText,xi as sizeField,k as slider,Pi as sourceField,_i as spacingFields,jr as text,zr as textFieldIdentifier,Xr as textFieldOffPage,$i as textList,Wi as textListRowField,qr as textarea,R as toggle,Bi as upload,zn as usePageWidthDetail,Yn as useSiteGapDetail,yi as widthField,Vr as withIdentifier,Kr as withOffPage,Ur as withScaffold};
|
|
1
|
+
"use client";import{jsx as r,jsxs as S,Fragment as I}from"react/jsx-runtime";import{cloneElement as qe,useId as Je,useRef as j,useState as q}from"react";import{useEasel as O}from"efficient-easel/easel";import{readHidable as ue,hidableText as de}from"./hidable.js";import{FOCAL_DEFAULT as pe}from"../image-focus.js";import{FOLD_FIELD_MARKER as J,LINK_FIELD_MARKER as fe,MEDIA_FIELD_MARKER as me,SCAFFOLD_FIELD_MARKER as he,TEXT_FIELD_MARKER as T,foldMetaOf as Z,textFieldIdentifier as Ze}from"./field-markers.js";import Qe from"../../components/ApplyCornersToSiblings.js";import{CARD_IMAGE_RADIUS_STEP as et,CORNER_RADIUS_MAX as W,CORNER_RADIUS_MIN as H}from"../content/card-image-shape.js";import{IMAGE_CORNER_STEP as tt,IMAGE_CORNERS_LABEL as nt}from"../content/image-corners.js";import{GRID_MAX_COLUMNS as ot}from"../content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as rt,GALLERY_LAYOUTS as A,GALLERY_LAYOUT_KEYS as ge}from"../content/gallery-layout.js";import{anchorSiblingsOf as it,HERO_GROUP_PLACEMENTS as lt,HERO_GROUP_PLACEMENT_DEFAULT as at,normalisePlacement as st,placementPoints as be}from"../hero-group-placement.js";import ct from"../../components/KeepHint.js";import{AlignLeftIcon as ut,AlignSeparateIcon as dt,AnimationIcon as xe,BackgroundIcon as pt,BlockSectionIcon as ft,CartIcon as mt,ColumnWidthsIcon as Ce,ColumnsIcon as ht,CornerIcon as Se,DirectionDownIcon as gt,DirectionLeftIcon as bt,DirectionRightIcon as xt,DirectionUpIcon as Ct,DollarIcon as St,FinishIcon as _t,GapIcon as _e,GridIcon as It,GroundIcon as yt,HashIcon as Ie,ImageIcon as Et,LayoutIcon as Tt,ListIcon as Rt,LocationIcon as Q,PaddingBottomIcon as vt,PaddingLeftIcon as Lt,PaddingRightIcon as Nt,PaddingTopIcon as Ot,PageIcon as ye,PhoneIcon as At,PlacementIcon as Ft,ProductSizeIcon as Pt,RotateIcon as wt,SquareIcon as kt,StylesIcon as Dt,TextLinesIcon as Bt,TypeIcon as Ht,WidthIcon as Mt,WrapIcon as Gt}from"efficient-easel/icons";import{FieldGlyph as Ee}from"../../components/FieldGlyph.js";import{resolvePageBackground as $t}from"../content/page-background.js";import{CORNER_SIDES as F,CORNER_SIDE_POINTS as ee,CORNER_SIDES_LABEL as P,cornerSidesSummary as Te,hasOwnSectionCorners as Wt,normalizeCornerSides as U}from"../content/section-corners.js";import{hasOwnCardCorners as Ut}from"../content/card-corners.js";import{SECTION_MOTION_NONE as Kt,SECTION_MOTION_OPTIONS as Xt}from"../content/section-animation.js";import{enclosingSectionProps as Re}from"./enclosing-section.js";import{SettingsCorners as ve,SettingsDefaultReset as g,SettingsField as m,SettingsGroupHead as Vt,SettingsGroupSub as zt,SettingsPlacement as Yt,SettingsSegmented as jt,SettingsSwitch as qt}from"efficient-easel/panel";import{FieldSelect as Jt,ListField as Zt}from"efficient-easel/fields";import{ColourControl as Le}from"./ColourControl.js";import Ne from"./MarkupToolbar.js";import{deviceField as R}from"./device-fields.js";import{noControlField as Qt}from"./panel-no-control-mark.js";import{phoneKey as K,resolvePhoneValue as te}from"./phone-override.js";import{SuppressibleText as en}from"./section-text-suppress.js";import{TYPED_NUMBER_COMMIT as tn,typedNumberKey as Oe}from"./slider-typing.js";import{CARD_INDEX_OPTIONS as nn,CARD_OUTLINE_OPTIONS as on,DEFAULT_CARD_INDEX_FORMAT as rn,DEFAULT_CARD_OUTLINE as ln}from"../sections/product-card-style.js";import{COVER_INDEX_OPTIONS as an,DEFAULT_COVER_INDEX as sn}from"../sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as cn}from"./text-control-kinds.js";import un from"../../components/ImageFocusRow.js";import dn from"../../components/MediaUploadField.js";import pn from"../../components/MultiSelectField.js";import fn from"../../components/SectionThemePicker.js";import mn from"../../components/SearchSelectField.js";import hn from"../../components/StorefrontLinkField.js";import Ae from"../../components/UiIcon.js";import{SECTION_PADDING as _}from"../content/section-padding.js";import{hasPhoneHeight as gn,resolveSectionMinHeight as bn}from"../content/section-min-height.js";import{VIEW_TIER_LABEL as ne}from"../content/view-tiers.js";import{SECTION_MIN_HEIGHT as xn,SECTION_MIN_HEIGHT_GROUP_LABEL as M,SECTION_SCREEN_PCT as Cn}from"../content/section-min-height.js";import{CONTAINER_DIRECTION_LABEL as Sn,containerDirectionPoints as _n,resolveContainerDirection as Fe}from"../content/container-direction.js";import{BOX_ALIGN_POINTS as In,BOX_BLOCK_SPACING_LABEL as yn,BOX_BLOCK_SPACING_POINTS as Pe,BOX_JUSTIFY_POINTS as we,BOX_PHONE_ROW_LABEL as En,BOX_PHONE_ROW_MAX as Tn,BOX_PHONE_ROW_MIN as ke,BOX_SHARE_LABEL as De,BOX_SHARE_POINTS as oe,BOX_WRAP_LABEL as Rn,BOX_WRAP_POINTS as Be}from"../content/box-layout.js";import{usePreviewHeader as X}from"../../components/PreviewHeaderContext.js";import{CONTAINER_GAP as re,CONTAINER_GAP_BUILT_IN as vn,GAP_FIELD_CONTAINER as Ln,hasOwnContainerGap as Nn,resolveContainerGap as On}from"../content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as An,CARD_IMAGE_BG_OFF as Fn,CARD_IMAGE_BG_SWATCH_NAMES as Pn,CARD_IMAGE_BG_SWATCHES as wn,isCardImageBackgroundInheriting as kn,resolveCardImageBackground as Dn,THEME_CARD_IMAGE_BG as Bn}from"../content/card-image-background.js";import{SECTION_BG_INHERIT as Hn,SECTION_BG_SWATCHES as Mn,SECTION_BG_SWATCH_NAMES as Gn,THEME_SECTION_BG as $n,isSectionBackgroundInheriting as Wn}from"../content/section-background.js";import{SECTION_THEME_GROUP_LABEL as Un}from"../content/section-surface.js";import{TYPE_SIZE_FIXED as Kn,TYPE_SIZE_INHERIT as Xn,isTypeSizeInheriting as Vn}from"../content/section-type-size.js";import{SECTION_WIDTH_CHOICES as zn,WIDTH_CHOICE_LABEL as Yn,WIDTH_INHERIT as jn,resolveWidth as qn,sectionRunsFullWidth as He}from"../content/section-width.js";import{useFoldHeadingLevel as Me}from"./panel-heading-scope.js";import{withStyleKind as Jn}from"efficient-easel/style-clipboard";function G(e){for(const[t,n]of Object.entries(e))n&&typeof n=="object"&&!Z(n)&&Jn(n,`section:${t}`);return e}function Yr({children:e}){return r("div",{className:"sf-field-label",children:e})}function Ge(){return null}function Zn(e){if(!e.trim())throw new Error("noGlyph() needs a reason naming the ruling that decided it.");return r(Ge,{},e)}function Qn(e){return e.type===Ge}function V(e){return Qn(e)?void 0:e}function w(e,t){return`${e} from ${t}`}function eo(){const{appState:e}=O(i=>i),t=e.data.root?.props??{},{mode:n,pageWidth:o}=qn(t,"full");return w(n==="page"?`${o}px`:n==="contained"?"Contained":"Full","the page")}function to(){const{blockGap:e}=X();return e===null?"this container's own spacing":w(`${e}px`,"Site styles")}function no({inherited:e,onReset:t,label:n}){return r(g,{label:n,changed:!e,detail:to(),onReset:t})}function oo({inherited:e,onReset:t,label:n}){return r(g,{label:n,changed:!e,detail:eo(),onReset:t})}function k({value:e,onChange:t,label:n,placeholder:o,hint:i,multiline:l,hideable:a=!0,markup:s=!0}){const{text:u,hidden:d}=ue(e),f=j(null),c=j(null),p=E=>t(a?{text:E,hidden:d}:E),h=()=>t({text:u,hidden:!d}),b=a&&d,y=Je(),x=i?so(i)?r("span",{className:"sf-hint-keep sf-hint-while-typing",children:i}):r(ct,{children:i}):void 0;return r(m,{label:n,icon:r(Ht,{}),htmlFor:y,className:b?"is-hidden":void 0,hint:x,action:a?r("button",{type:"button",className:"sf-field-eye","aria-pressed":d,"aria-label":d?`Show ${n} on the slide`:`Hide ${n} on the slide`,title:d?`Show ${n} on the slide`:`Hide ${n} on the slide`,onClick:h,children:d?r(Ae,{name:"eye-off",size:14}):r(Ae,{name:"eye",size:14})}):void 0,children:S("div",{className:"sf-copybox",children:[s&&r(Ne,{target:l?c:f,value:u,onChange:p}),l?r("textarea",{id:y,ref:c,value:u,placeholder:o,onChange:E=>p(E.target.value)}):r("input",{id:y,ref:f,type:"text",value:u,placeholder:o,onChange:E=>p(E.target.value)})]})})}function jr(e,t){return{...e,[he]:t}}function qr(e){const t=e[T];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[T]:{...t,offPage:!0}}}function Jr(e){return!e||typeof e!="object"?!1:e[T]?.offPage===!0}function Zr(e){const t=e[T];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[T]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as tl,SCALAR_TEXT_CONTROLS as nl}from"./text-control-kinds.js";const ro=new Set(cn),D=(e,t)=>{const n={...t,[T]:e};if(!ro.has(e.control))return n;const o=t.render;return{...Qt(n,"authored-copy"),render:i=>r(en,{name:i.name,children:o(i)})}},Qr="Everything else on this block comes from the linked post. Unlink it to edit by hand.",io="Select a word, then press the highlighter.",lo="A short name so a link can jump straight to this section, like yoursite.com/page#about.",ao=new Set([io]),so=e=>ao.has(e);function ei(e,t,n){return D({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(k,{value:o,onChange:i,label:e,placeholder:t,hint:n})})}function ti(e,t,n){return D({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(k,{value:o,onChange:i,label:e,placeholder:t,hint:n,multiline:!0})})}function co(e,t,n){return D({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(k,{value:o,onChange:i,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function ni(e,t,n){return D({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(k,{value:o,onChange:i,label:e,placeholder:t,hint:n,hideable:!1})})}function oi(e){return{type:"custom",[fe]:{label:e},render:({value:t,onChange:n})=>r(hn,{value:de(t),onChange:n,label:e})}}function ri(e,t,n){return D({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:i})=>r(k,{value:o,onChange:i,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const ii={Content:Bt,Style:Dt,Layout:Tt,Animation:xe};function li(e,t){return e.includes("Content")?t!=="Content":null}function uo({label:e}){return r(Vt,{title:e,level:Me(1)})}function po({level:e,label:t}){return e===1?r(uo,{label:t}):r(mo,{label:t})}function $e(e,t){return{type:"custom",[J]:{label:e,level:t},render:()=>r(po,{level:t,label:e})}}function C(e){return $e(e,2)}function ai(e){return{type:"custom",render:()=>r(fo,{text:e})}}function fo({text:e}){return r("p",{className:"sf-note",children:e})}function si(e){return $e(e,1)}function ci(e){return Z(e)!==null&&e?.tabs!==void 0}const We=new Map;function ui(e,t){const n=`${e}\0${t?t.join(""):""}`,o=We.get(n)??{type:"custom",tabs:t,[J]:{label:e,level:1},bucket:e,marker:!0,render:()=>r(I,{})};return We.set(n,o),o}function mo({label:e}){return r(zt,{title:e,level:Me(2)})}function Ue({swatches:e,current:t,onPick:n,names:o}){const i=e.find(a=>a.toLowerCase()===t.toLowerCase()),l=(i?o?.[i]:void 0)??t;return S("div",{className:"sf-swatches",children:[e.map(a=>{const s=o?.[a]??a;return r("button",{type:"button","aria-pressed":t.toLowerCase()===a.toLowerCase(),className:`sf-swatch ${t.toLowerCase()===a.toLowerCase()?"is-active":""}`,style:{background:a},onClick:()=>n(a),"aria-label":s,title:s},a)}),r("span",{className:"sf-swatch-hex",children:l})]})}function di(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=Wn(n,t);return r(m,{label:e,icon:r(pt,{}),changed:!i,action:r(g,{label:e,changed:!i,detail:"the theme's section background",onReset:()=>o(Hn)}),children:Ue({swatches:Mn,current:i?$n:n??t??"",onPick:o,names:Gn})})}}}function ho(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const i=n,l=kn(i,t);return r(m,{label:e,icon:r(yt,{}),changed:!l,action:r(g,{label:e,changed:!l,detail:"the theme's image stage",onReset:()=>o(An)}),children:Ue({swatches:wn,current:l?Bn:Dn(i,t),onPick:o,names:Pn})})}}}function pi(e=n=>n,t){return G({_gSectionTheme:C(Un),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>r(fn,{value:e(n),onChange:o,followLabel:t})}})}function L({min:e,max:t,step:n,value:o,onChange:i,suffix:l="",readout:a=!0,notch:s,ariaLabel:u,disabled:d=!1}){const f=s!==void 0&&Number.isFinite(s)&&s>=e&&s<=t;return S("div",{className:f?"sf-slider has-notch":"sf-slider",style:f?{"--sf-notch":(s-e)/(t-e)}:void 0,children:[r("input",{type:"range",min:e,max:t,step:n,value:o,"aria-label":u,disabled:d||void 0,onChange:c=>i(Number(c.target.value))}),a&&r(go,{value:o,min:e,max:t,step:n,suffix:l,ariaLabel:u,onChange:i})]})}function go({value:e,min:t,max:n,step:o,onChange:i,suffix:l="",ariaLabel:a,children:s}){const[u,d]=q(null),f=c=>{c.editing||d(null),c.commit!==null&&c.commit!==e&&i(c.commit)};return u===null?r("button",{type:"button",className:"sf-slider-val",title:"Click to type a value","aria-label":a?`${a}: type a value`:"Type a value",onClick:()=>d(String(e)),children:s??S(I,{children:[e,l]})}):r("input",{autoFocus:!0,type:"text",inputMode:"decimal",className:"sf-slider-val sf-slider-typed",value:u,"aria-label":a,onChange:c=>d(c.target.value),onFocus:c=>c.currentTarget.select(),onKeyDown:c=>{const p=Oe(c.key,u,t,n,o);p.handled&&(c.preventDefault(),c.stopPropagation(),f(p))},onBlur:()=>f(Oe(tn,u,t,n,o))})}function B(e,t,n,o,i,l,a="",s){return{type:"custom",render:u=>r(m,{label:e,icon:V(t),action:s?s("storedValue"in u?u.storedValue:u.value,u.onChange):void 0,children:L({min:n,max:o,step:i,value:typeof u.value=="number"?u.value:l,suffix:a,onChange:u.onChange})})}}function Ke({min:e,max:t,step:n,px:o,label:i,onChange:l,disabled:a=!1}){const{cornerRadiusPx:s}=X();return r(I,{children:L({min:e,max:t,step:n,value:o??(typeof s=="number"?s:e),readout:!1,ariaLabel:i,disabled:a,onChange:l})})}function $(e,t){const{min:n,max:o,step:i=1,unsetLabel:l,hint:a,restAtSite:s=!1,restTrack:u,unsetMark:d}=t;return{type:"custom",render:({value:f,onChange:c})=>{const p=typeof f=="number"?f:null,h=p===null;return r(m,{label:e,value:h?d?void 0:l:`${p}px`,changed:!h,action:d?qe(d,{changed:!h,onReset:()=>c(null)}):r(g,{label:e,changed:!h,onReset:()=>c(null)}),hint:a,children:u?u({min:n,max:o,step:i,px:p,label:e,onChange:c}):s?r(Ke,{min:n,max:o,step:i,px:p,label:e,onChange:c}):L({min:n,max:o,step:i,value:p??n,readout:!1,ariaLabel:e,onChange:c})})}}}function fi(e){const t=B("Gap",r(_e,{}),re.min,re.max,re.step,vn[e],"px",(n,o)=>r(no,{inherited:!Nn(e,n),onReset:()=>o(void 0),label:"Gap"}));return{type:"custom",[Ln]:e,render:n=>t.render({...n,value:On(e,n.value,n.field?.siteGap),storedValue:n.value,onChange:o=>n.onChange(o)})}}function bo(){return{type:"custom",render:({value:e,onChange:t})=>{const o=U(e)??[...F],i=o.length===F.length;return r(m,{label:P,icon:r(Se,{}),value:Te(o),changed:!i,action:r(g,{label:P,changed:!i,onReset:()=>t(null)}),hint:"Corners left off stay square. The row above sets how round the others are.",children:r(Io,{value:o,onChange:l=>{const a=U(l)??[];t(a.length===F.length?null:a)}})})}}}function xo({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=X(),i=typeof o=="number"?`${o}px`:"not set";return r(g,{label:e,changed:t,detail:o==null?"the built-in corners":w(i,"Site styles"),onReset:n})}function Co(){return $("Corners",{min:H,max:W,unsetLabel:"Follows the site",unsetMark:r(xo,{label:"Corners"}),restTrack:e=>r(So,{...e}),hint:r(_o,{})})}const Xe="This section runs edge to edge, so its corners sit off the page. Set Width to Content width to use them.";function ie(){return He(z())}function So(e){return r(Ke,{...e,disabled:ie()})}function _o(){return r(I,{children:ie()?Xe:"Follows Site styles \u25B8 Basics \u25B8 Corners until you set a number here."})}function Io({value:e,onChange:t}){const n=ie();return r(ve,{label:P,value:e,corners:n?ee.map(o=>({...o,disabled:!0,title:Xe})):ee,onChange:t})}function mi(){return G({_gShape:C("Shape"),sectionCorners:Co(),sectionCornerSides:bo()})}function hi(){return{_gMotion:C("Motion"),sectionAnimation:ce("Entrance",r(xe,{}),[...Xt],Kt)}}function le(){let e=null;try{const{appState:t,selectedItem:n}=O(i=>i),o=n?.props?.id?String(n.props.id):void 0;e=o?Re(t?.data,o):null}catch{e=null}return e!==null&&He(e)}function Ve(e){const{cornerRadiusPx:t}=X(),n=le(),o=typeof t=="number"?t:e;let i=null;try{const{appState:a,selectedItem:s}=O(d=>d),u=s?.props?.id?String(s.props.id):void 0;i=u?Re(a?.data,u):null}catch{i=null}if(n||!i)return o;const l=i.sectionCorners;return Wt(l)?l:o}function yo({min:e,max:t,step:n,px:o,label:i,onChange:l}){const a=Ve(e);return r(I,{children:L({min:e,max:t,step:n,value:o??a,readout:!1,ariaLabel:i,onChange:l})})}function Eo({label:e,changed:t=!1,onReset:n=()=>{}}){const o=le(),i=Ve(H),l=o?"Site":"Section";return r(g,{label:e,changed:t,detail:w(`${i}px`,o?"Site styles":"the section"),onReset:n})}function To(){return r(I,{children:le()?"The section is full width, so this card follows Site styles \u25B8 Basics \u25B8 Corners.":"Follows the section's Corners until you set a number here."})}function Ro(){return $("Corners",{min:H,max:W,unsetLabel:"Follows the section",unsetMark:r(Eo,{label:"Corners"}),restTrack:e=>r(yo,{...e}),hint:r(To,{})})}function vo({value:e,onChange:t}){return r(ve,{label:P,value:e,corners:ee,onChange:t})}function Lo({unset:e}){return r(I,{children:e?"Set a number above first \u2014 there is nothing to shape yet.":"Corners left off stay square. The row above sets how round the others are."})}function No(){return{type:"custom",render:({value:e,onChange:t})=>{const o=U(e)??[...F],i=o.length===F.length;return r(m,{label:P,icon:r(Se,{}),value:Te(o),changed:!i,action:r(g,{label:P,changed:!i,onReset:()=>t(null)}),hint:r(Lo,{unset:!Ut(e)}),children:r(vo,{value:o,onChange:l=>{const a=U(l)??[];t(a.length===F.length?null:a)}})})}}}function Oo(){return{type:"custom",render:()=>r(Qe,{})}}function gi(){return{_gShape:C("Shape"),cardCorners:Ro(),cardCornerSides:No(),cardCornersApplyAll:Oo()}}function bi(){return v("Justify",r(dt,{}),we,we[0].value)}function xi(){return v("Item alignment",r(ut,{}),In,"stretch")}function Ci(){return v(Rn,r(Gt,{}),Be,Be[0].value)}function Si(){return{type:"custom",render:({value:e,onChange:t})=>{const n=oe.find(o=>o.value===e)??oe[0];return r(m,{label:De,icon:r(Ce,{}),value:n.label,children:r("div",{className:"sf-gallery-layouts",role:"group","aria-label":De,children:oe.map(o=>r("button",{type:"button","aria-pressed":n.value===o.value,"aria-label":o.label,title:o.label,onClick:()=>t(o.value),children:r("span",{className:"sf-gallery-pic",children:Ao(o.weights).map((i,l)=>r("i",{style:{gridColumn:`span ${i}`}},l))})},o.value))})})}}}function Ao(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 _i(){return v(yn,r(_e,{}),Pe,Pe[0].value)}function Ii(){return B(En,r(At,{}),ke,Tn,1,ke)}function yi(e){const t=ce(Sn,Zn("`Direction` names how a container's children run \u2014 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)."),_n(e),Fe(e,void 0));return{type:"custom",render:n=>t.render({...n,value:Fe(e,n.value),onChange:o=>n.onChange(o)})}}function Ei(e,t,n,o,i,l){return{type:"custom",render:({value:a,onChange:s})=>r(m,{label:e,icon:r(Ee,{noun:l}),action:r(g,{label:e,changed:!Vn(a),detail:"the Text style in Site styles",onReset:()=>s(Xn),defaultAction:{onPress:()=>s(Kn),title:"Keep this section's own built-in size",icon:r(ft,{})}}),children:L({min:t,max:n,step:o,value:typeof a=="number"?a:i,suffix:"px",onChange:s})})}}function Ti(){return{_gCellWidth:C("Cell width"),gridSpan:v("Positions",r(Ce,{}),[{label:"Auto",value:""},...Array.from({length:ot},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function z(){let e=null;try{e=O(t=>t).selectedItem}catch{e=null}return e?.props??{}}function Fo({min:e,max:t,step:n,px:o,label:i,onChange:l,desktopKey:a,fallback:s}){const u=z()[a],d=te(void 0,u,s);return r(I,{children:L({min:e,max:t,step:n,value:te(o,u,s),readout:!1,ariaLabel:i,notch:d,onChange:l})})}function Po({label:e,desktopKey:t,fallback:n,changed:o=!1,onReset:i=()=>{}}){const l=z()[t],a=te(void 0,l,n);return r(g,{label:e,changed:o,detail:`${a}px on ${ne.desktop.toLowerCase()}`,onReset:i})}function wo(e){return $(e.label,{min:e.min,max:e.max,step:e.step,unsetLabel:`Follows ${ne.desktop}`,unsetMark:r(Po,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback}),restTrack:t=>r(Fo,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}function Ri(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,i=x=>o?x:`Padding ${x.toLowerCase()}`,l=x=>B(i("Top"),r(Ot,{}),_.min,_.max,_.step,x,"px"),a=(x,E,je,Y=_)=>R("mobile",wo({label:i(x),desktopKey:E,min:Y.min,max:Y.max,step:Y.step,fallback:je})),s=e.top??_.min,u=e.bottom??_.min,d="sectionPaddingLeft",f="sectionPaddingRight",c=e.sideBounds??_,p=e.side??c.min,h=e.sidePhone??p,b=e.phone===!0,y=x=>b?R("desktop",x):x;return G({...o?{_gSpacing:C("Padding")}:{},[t]:y(l(s)),...b?{[K(t)]:a("Top",t,s)}:{},...e.only==="top"?{}:{[n]:y(B(i("Bottom"),r(vt,{}),_.min,_.max,_.step,u,"px")),...b?{[K(n)]:a("Bottom",n,u)}:{}},...e.sides?{[d]:y(B(i("Left"),r(Lt,{}),c.min,c.max,c.step,p,"px")),...b?{[K(d)]:a("Left",d,h,c)}:{},[f]:y(B(i("Right"),r(Nt,{}),c.min,c.max,c.step,p,"px")),...b?{[K(f)]:a("Right",f,h,c)}:{}}:{}})}const ko={contained:"Contained",page:"Page",full:"Full"},ae="Width";function vi(e,t=zn,n=!0){const o=t.map(i=>({label:Yn[i]??ko[i],value:i}));return G({...n?{_gWidth:C(ae)}:{},widthMode:{type:"custom",render:({onChange:i,field:l})=>r(m,{label:"Width",icon:r(Mt,{}),action:n?r(oo,{inherited:l?.inherited??!1,onReset:()=>i(jn),label:ae}):void 0,children:se({options:o,value:l?.currentValue||e,onChange:i,ariaLabel:ae})})}})}function Li(){const e=o=>({type:"custom",render:({value:i,onChange:l})=>S("div",{className:"sf-field",children:[o?S("div",{className:"sf-field-head",children:[r("span",{className:"sf-field-label sf-field-label--inline",children:M}),o(l)]}):null,r("div",{children:se({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:["auto","fixed","screen"].includes(i)?i:"auto",onChange:l,ariaLabel:M})})]})}),t=()=>({type:"custom",render:({value:o,onChange:i,field:l})=>{const a=l?.unit==="%"?"%":"px",s=a==="%"?Cn:xn;return r("div",{className:"sf-field",children:L({min:s.min,max:s.max,step:s.step,value:typeof o=="number"?o:s.fallback,suffix:a,ariaLabel:M,onChange:i})})}}),n=()=>ce("Unit",r(Ie,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");return G({_gHeight:C(M),sectionHeightMode:R("desktop",e()),sectionHeightValue:R("desktop",t()),sectionHeightUnit:R("desktop",n()),sectionHeightModePhone:R("mobile",e(o=>r(Do,{onClear:()=>o(void 0)}))),sectionHeightValuePhone:R("mobile",t()),sectionHeightUnitPhone:R("mobile",n())})}function Do({onClear:e}){const t=z(),n=gn(t),o=bn(t),i=`${o.mode==="auto"?"Auto":`${o.value}${o.unit}`} on ${ne.desktop.toLowerCase()}`;return r(g,{label:M,changed:n,detail:i,onReset:e})}function Ni(){return{_gAnchor:C("Anchor"),anchor:co("Anchor name","e.g. about",lo)}}function N(e,t,n){return{type:"custom",render:({value:o,onChange:i,id:l,name:a})=>{const s=typeof o=="boolean"?o:t,u=`${l??a??e}-label`;return r(m,{label:e,labelId:u,icon:n,action:r(qt,{checked:s,onChange:i,ariaLabelledBy:u})})}}}function Oi(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const i=`${String(n??o??"pageBackground")}-colour`;return r(m,{label:"Background",icon:r(ye,{}),htmlFor:i,action:r(Le,{id:i,label:"Background",value:$t(e),onChange:t})})}}}function Ai(e,t){return{type:"custom",render:({value:n,onChange:o,id:i})=>{const l=typeof n=="boolean"?n:t,a=`${i??e}-checkbox`;return r(m,{label:e,htmlFor:a,className:"sf-checkbox",action:r("input",{id:a,type:"checkbox",checked:l,onChange:s=>o(s.target.checked)})})}}}function Fi(e,t){return{type:"custom",render:({value:n,onChange:o})=>r(m,{label:e,action:Le({value:n||t,onChange:o,label:e})})}}const Bo=[{value:"0% 0%",label:"Top left"},{value:"50% 0%",label:"Top"},{value:"100% 0%",label:"Top right"},{value:"0% 50%",label:"Left"},{value:"50% 50%",label:"Center"},{value:"100% 50%",label:"Right"},{value:"0% 100%",label:"Bottom left"},{value:"50% 100%",label:"Bottom"},{value:"100% 100%",label:"Bottom right"}];function ze({label:e,value:t,onChange:n,points:o=Bo}){return r(Yt,{label:e,value:t,points:o,onChange:n})}function Pi(e,t=pe,n="mediaImage"){return{type:"custom",render:({value:o,onChange:i})=>r("div",{className:"sf-focal-row",children:r(Ho,{label:e,value:o||t,onChange:i,imageProp:n})})}}function Ho({label:e,value:t,onChange:n,imageProp:o}){const{selectedItem:i}=O(a=>a),l=i?.props?.[o];return r(un,{label:e,value:t,onChange:n,image:typeof l=="string"?l:void 0})}const Mo=be([]);function wi(e,{stacking:t,fallback:n=at}){return{type:"custom",render:({value:o,onChange:i})=>{const l=lt.includes(o)?o:n;return t?r(Go,{label:e,value:l,onChange:i}):Ye({label:e,value:l,onChange:i,points:Mo})}}}function Go({label:e,value:t,onChange:n}){const{appState:o,selectedItem:i}=O(s=>s),l=i?.props?.id?String(i.props.id):void 0,a=l?it(o?.data,l):[];return Ye({label:e,value:t,onChange:n,points:be(a,l)})}function Ye({label:e,value:t,onChange:n,points:o}){const i=o.find(l=>l.disabled);return r(m,{label:e,icon:r(Ft,{}),hint:i?i.title:void 0,children:ze({label:e,value:st(t),onChange:n,points:o})})}const ki={top:r(Ct,{}),right:r(xt,{}),bottom:r(gt,{}),left:r(bt,{})};function Di(e,t,n,o,i,l){const a=f=>t.find(c=>c.value===f),s=f=>({value:f,label:"",disabled:!0,title:o}),u=f=>{const c=t.find(h=>h.cell===f);if(!c)return s(`missing-${f}`);const p=l?.[f];return p?{value:c.value,label:c.label,icon:p}:{value:c.value,label:c.label}},d=[s("corner-top-left"),u("top"),s("corner-top-right"),u("left"),s("centre"),u("right"),s("corner-bottom-left"),u("bottom"),s("corner-bottom-right")];return{type:"custom",render:({value:f,onChange:c})=>{const p=t.some(h=>h.value===f)?f:n;return r(m,{label:e,icon:i,value:a(p)?.label??"",children:ze({label:e,value:p,onChange:c,points:d})})}}}const $o="\0note";function v(e,t,n,o,i){return{type:"custom",options:n,fallback:o,...i?{note:i}:{},render:({value:l,onChange:a,field:s})=>{const u=s.options??n,d=s.fallback??o,f=u.some(c=>c.value===l)?l:d;return r(m,{label:e,icon:V(t),children:r(Jt,{value:f,ariaLabel:e,onChange:a,options:[...i?[{label:i,value:$o,disabled:!0}]:[],...u.map(c=>({label:c.label,value:c.value}))]})})}}}function Bi(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:i,field:l})=>r(pn,{label:e,options:l.options??t,value:Array.isArray(o)?o:[],onChange:i,...n?{emptyLabel:n}:{}})}}function Hi(e,t,n,o){return{type:"custom",options:t,fallback:n,render:({value:i,onChange:l,field:a})=>r(mn,{label:e,options:a.options??t,fallback:a.fallback??n,value:i,onChange:l,placeholder:o})}}function Mi(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const i={value:n,onChange:o,...t};return r(e,{...i})}}}function se({options:e,value:t,onChange:n,ariaLabel:o,disabled:i=!1}){return r(jt,{options:e.map(l=>({id:l.value,label:l.label,title:l.title})),value:t,onChange:n,ariaLabel:o,disabled:i})}const Gi=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function ce(e,t,n,o){const i=n.map(l=>typeof l=="string"?{label:l,value:l}:l);return{type:"custom",render:({value:l,onChange:a,field:s})=>r(m,{label:e,icon:V(t),children:se({options:i,value:i.some(u=>u.value===l)?l:l||s?.currentValue||o,onChange:a,ariaLabel:e})})}}function $i(e,t,n){return{type:"custom",[me]:!0,render:({value:o,onChange:i})=>r(dn,{value:o||"",onChange:i,label:e,accept:t,placeholder:n})}}const Wi={HeroSingle:["imageFocal"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function Ui({value:e,onChange:t,label:n}){const o=e||{},i=!!o.pending,l=i?"var(--fg-dim, #888)":o.ok?"#1d9e75":"#d85a30",a=(s,u)=>t({...o,[s]:u===""?void 0:Number(u)});return S(m,{label:n,icon:r(Q,{}),children:[r("button",{type:"button",disabled:i,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding\u2026"}),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?"Finding\u2026":"Find coordinates"}),o.status&&r("div",{style:{marginTop:6,fontSize:12,lineHeight:1.4,color:l},children:o.status}),r("div",{style:{marginTop:6,fontSize:11,color:"var(--fg-dim, #999)"},children:"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?"Hide manual coordinates":"Enter coordinates manually"}),o.manual&&S("div",{style:{marginTop:8,display:"grid",gap:8},children:[r(m,{label:"Latitude",icon:r(Q,{}),children:r("input",{type:"number",step:"any",placeholder:"e.g. 34.0990198",value:typeof o.lat=="number"?o.lat:"",onChange:s=>a("lat",s.target.value)})}),r(m,{label:"Longitude",icon:r(Q,{}),children:r("input",{type:"number",step:"any",placeholder:"e.g. -117.9842833",value:typeof o.lng=="number"?o.lng:"",onChange:s=>a("lng",s.target.value)})})]})]})}function Wo(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function Uo(e,t,n){const o=e.map(i=>({text:i?.text??""}));return t===null||t<0||t>=e.length?o:o.map((i,l)=>l===t?{text:n}:i)}function Ki(e,t){return e===null?null:t>e?e:null}function Ko(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 Xi={label:"Ticker items",icon:r(Rt,{})};function Vi(e,t,n,o){return{type:"custom",[T]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},render:({value:i,onChange:l})=>r(Xo,{label:e,icon:V(t),items:Array.isArray(i)?i:[],placeholder:n,onChange:l,markup:o==="markup"})}}function Xo({label:e,icon:t,items:n,placeholder:o,onChange:i,markup:l=!1}){const a=j(null),[s,u]=q(null),d=c=>c.map(p=>({text:p?.text??""}));return r(Zt,{label:e,icon:t,noun:"item",items:n,onChange:c=>{const p=Ko(n,c,s);p===null&&(a.current=null),u(p),i(d(c))},newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:l?r(Ne,{target:a,value:Wo(n,s),onChange:c=>i(Uo(n,s??-1,c)),disabled:s===null,label:s===null?"Formatting \u2014 click a row first":`Formatting \u2014 row ${s+1}`}):void 0,renderRow:(c,p,h)=>r("input",{type:"text",className:l&&s===p?"sf-list-marking":void 0,value:c?.text??"",placeholder:o,"aria-label":`${e} ${p+1}`,onChange:b=>h({text:b.target.value}),onFocus:b=>{a.current=b.currentTarget,u(p)}})})}function zi(e,t){const n=`${e.label} \u2014 row ${t+1}`;return D({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:i})=>r(k,{value:o,onChange:i,label:n,placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function Yi(e){return{_gCards:C("Cards"),coverIndex:v("Cover image",r(Et,{}),an,String(sn),e?.coverHint??"A card's opening picture \u2014 a card pinned to a finish keeps its own."),imageBackground:ho("Image background",Fn),cardImage:Vo(),spinOnHover:N("Rotate on hover",e?.spinDefault??!0,r(wt,{}))}}function ji(){return{outline:v("Card outline",r(kt,{}),on,ln),indexBadge:v("Card number",r(Ie,{}),nn,rn),showBadge:N("Product badge",!0,r(Ee,{noun:"tag"}))}}function qi(e){const t=e?.bottomDefault??!0;return{_gShowOnCard:C("Show on a card"),showCardPrice:N("Price",!0,r(St,{})),showCardFinishes:N("Finish swatches",!0,r(_t,{})),showCardSizes:N("Sizes",t,r(Pt,{})),showCardBuy:N("Buy button",t,r(mt,{})),showCardPage:N("Page button",t,r(ye,{}))}}function Vo(){return $("Card image",{min:H,max:W,step:et,hint:"Rounds the picture. The card's own corner is in Site styles."})}function Ji(){return $(nt,{min:H,max:W,step:tt,unsetLabel:"Square",hint:"Rounds the picture. Left alone it stays square."})}function Zi(){return{type:"custom",render:({value:e,onChange:t})=>r(zo,{value:typeof e=="string"?e:"",onChange:t})}}function zo({value:e,onChange:t}){const[n,o]=q(null),i=ge.filter(a=>n===null||A[a].across===n),l=e&&e in A?A[e]:null;return S(I,{children:[r(m,{label:"Photos in a row",icon:r(ht,{}),children:S("div",{className:"sf-gallery-filter",children:[r("button",{type:"button","aria-pressed":n===null,onClick:()=>o(null),children:"All"}),rt.map(a=>r("button",{type:"button","aria-pressed":n===a,onClick:()=>o(a),children:a},a))]})}),r(m,{label:"Layout",icon:r(It,{}),value:l?l.label:"Not chosen",hint:`${i.length} of ${ge.length} layouts`,children:r("div",{className:"sf-gallery-layouts",children:i.map(a=>r("button",{type:"button","aria-pressed":e===a,"aria-label":A[a].label,title:A[a].label,onClick:()=>t(e===a?"":a),children:r("span",{className:"sf-gallery-pic",children:A[a].desktop.map(([s,u],d)=>r("i",{style:{gridColumn:`span ${s}`,gridRow:`span ${u}`}},d))})},a))})})]})}export{lo as ANCHOR_HINT,Qr as BOUND_TO_POST_NOTE,ii as BUCKET_ICONS,Wi as CUSTOM_FIELD_MEDIA,Ui as CoordsField,ki as EDGE_ARROWS,pe as FOCAL_DEFAULT,Bo as FOCAL_POINTS,J as FOLD_FIELD_MARKER,ze as FocalPicker,mo as GroupLabel,io as HIGHLIGHT_HINT,k as HidableTextField,fe as LINK_FIELD_MARKER,Yr as Label,me as MEDIA_FIELD_MARKER,Gi as MEDIA_TYPE_OPTIONS,fo as PanelNoteLine,Ye as PlacementGridView,he as SCAFFOLD_FIELD_MARKER,nl as SCALAR_TEXT_CONTROLS,Xe as SECTION_BLEEDS_HINT,uo as SectionHeading,se as Segmented,no as SiteGapDefaultReset,L as Slider,go as SliderValue,Ue as Swatches,tl as TEXT_CONTROL_KINDS,T as TEXT_FIELD_MARKER,Xi as TICKER_ITEMS_ROW,Xo as TextListField,oo as WidthDefaultReset,Ko as aimAfterListChange,Ni as anchorFields,w as backTo,di as backgroundField,xi as boxAlignField,_i as boxBlockSpacingField,bi as boxJustifyField,Ii as boxPhoneRowField,Si as boxShareField,Ci as boxWrapField,ui as bucketHeader,No as cardCornerSidesField,Ro as cardCornersField,ho as cardImageBackgroundField,Vo as cardImageField,Yi as cardMediaFields,gi as cardShapeFields,qi as cardShowFields,ji as cardStyleFields,Ti as cellWidthFields,Ai as checkbox,Fi as colorInput,ni as copyText,yi as directionField,Di as edgePad,li as entriesHiddenForTab,Pi as focalPicker,Ki as focusAfterRemove,Z as foldMetaOf,Zi as galleryLayoutField,fi as gapField,C as group,Li as heightFields,de as hidableText,so as hintIsWhileTyping,V as iconOf,Ji as imageCornersField,ci as isBucketHeader,Qn as isNoGlyph,oi as linkField,Bi as multiSelect,Zn as noGlyph,Oi as pageBackgroundField,ai as panelNote,wo as phoneOverrideField,wi as placementField,co as plainText,ri as plainTextarea,$ as pxField,ue as readHidable,Wo as rowText,Hi as searchSelect,si as section,hi as sectionAnimationFields,bo as sectionCornerSidesField,Co as sectionCornersField,mi as sectionShapeFields,pi as sectionThemeFields,ce as segmented,v as select,Uo as setRowText,Ei as sizeField,B as slider,Mi as sourceField,Ri as spacingFields,ei as text,Ze as textFieldIdentifier,Jr as textFieldOffPage,Vi as textList,zi as textListRowField,ti as textarea,N as toggle,$i as upload,eo as usePageWidthDetail,to as useSiteGapDetail,vi as widthField,Zr as withIdentifier,qr as withOffPage,jr as withScaffold};
|
|
@@ -1,24 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export type DeviceTier = "desktop" | "mobile";
|
|
4
|
-
export declare function shownTier(device: PreviewDevice): DeviceTier;
|
|
5
|
-
export declare const DEVICE_NOTE: Readonly<Record<PreviewDevice, string | null>>;
|
|
6
|
-
export declare const DEVICE_HIDDEN_ATTR = "data-sf-device-hidden";
|
|
7
|
-
type FieldRender = (props: Record<string, unknown>) => ReactElement;
|
|
8
|
-
type AnyCustomField = {
|
|
9
|
-
type: "custom";
|
|
10
|
-
render: FieldRender;
|
|
11
|
-
};
|
|
12
|
-
export declare const DEVICE_FIELD_MARKER: "__device";
|
|
13
|
-
export type DeviceFieldMeta = {
|
|
14
|
-
tier: DeviceTier;
|
|
15
|
-
inner: unknown;
|
|
16
|
-
};
|
|
17
|
-
export declare function deviceMetaOf(field: unknown): DeviceFieldMeta | null;
|
|
18
|
-
export declare function withoutDeviceGate(field: unknown): unknown;
|
|
19
|
-
export declare function deviceField<F extends {
|
|
20
|
-
type: "custom";
|
|
21
|
-
render: (p: never) => ReactElement;
|
|
22
|
-
}>(tier: DeviceTier, field: F): F;
|
|
23
|
-
export declare function deviceNote(): AnyCustomField;
|
|
24
|
-
export {};
|
|
1
|
+
export { DEVICE_FIELD_MARKER, DEVICE_HIDDEN_ATTR, DEVICE_NOTE, deviceField, deviceMetaOf, deviceNote, shownTier, withoutDeviceGate } from "efficient-easel/screen/lib/puck/device-fields";
|
|
2
|
+
export type { DeviceFieldMeta, DeviceTier } from "efficient-easel/screen/lib/puck/device-fields";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{
|
|
1
|
+
"use client";import{DEVICE_FIELD_MARKER as i,DEVICE_HIDDEN_ATTR as t,DEVICE_NOTE as D,deviceField as c,deviceMetaOf as o,deviceNote as I,shownTier as _,withoutDeviceGate as d}from"efficient-easel/screen/lib/puck/device-fields";export{i as DEVICE_FIELD_MARKER,t as DEVICE_HIDDEN_ATTR,D as DEVICE_NOTE,c as deviceField,o as deviceMetaOf,I as deviceNote,_ as shownTier,d as withoutDeviceGate};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{BUCKET_KEY as E}from"efficient-easel/screen/lib/puck/field-buckets";export{E as BUCKET_KEY};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { BUCKET_KEY, type Bucket } from "./field-buckets.js";
|
|
2
2
|
export declare const BUCKETS: readonly ["Content", "Style", "Layout", "Animation"];
|
|
3
|
-
export type Bucket
|
|
4
|
-
export
|
|
3
|
+
export type { Bucket };
|
|
4
|
+
export { BUCKET_KEY };
|
|
5
5
|
export declare const LAYOUT_FIELD_KEYS: readonly string[];
|
|
6
6
|
export declare const SECTION_THEME_FIELD_KEYS: readonly string[];
|
|
7
7
|
export declare const SECTION_SHAPE_FIELD_KEYS: readonly string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{anchorFields as m,bucketHeader as y,cardMediaFields as B,cardShowFields as E,cardStyleFields as w,foldMetaOf as p,group as O,heightFields as T,sectionAnimationFields as F,sectionShapeFields as I,sectionThemeFields as x,spacingFields as A,widthField as H}from"./controls.js";import{deviceField as R,deviceMetaOf as D}from"./device-fields.js";import{SETTINGS_BUCKETS as $}from"efficient-easel/panel";const s=$,r={Content:"_sContent",Style:"_sStyle",Layout:"_sLayout",Animation:"_sAnimation"},J=[r.Layout,...Object.keys(A({phone:!0})),...Object.keys(H("full")),...Object.keys(T()),...Object.keys(m())],V=[r.Style,...Object.keys(x())],z=[r.Style,...Object.keys(I())],X=[r.Animation,...Object.keys(F())],K=Object.keys(B()),M=new Set(["cardImage","imageBackground"]),Z=[r.Style,...K.filter(o=>o.startsWith("_g")||M.has(o))],ee=Object.keys(w()),te=Object.keys(E({bottomDefault:!0})),P="Editor only \u2014 not shown live",_={"Archive link":"Content",Article:"Content",Boxes:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content","Opening filter":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content","Message form":"Content",Metadata:"Content",Milestones:"Content","Mockup card":"Content","Newsletter panel":"Content",Offices:"Content",Options:"Content","Others gallery":"Content","Overlay button":"Content",Product:"Content","Product page":"Content",Products:"Content","Pull quote":"Content",Questions:"Content","Recent issues":"Content","Recent posts":"Content",Reviews:"Content","Right panel \xB7 actions":"Content","Right panel \xB7 choices":"Content","Right panel \xB7 form":"Content","Routing groups":"Content",Rows:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content","Source product":"Content","Stat & note":"Content",Stats:"Content","Submit button":"Content","Success state":"Content",Wheel:"Content",Terminal:"Content",Text:"Content","Text column":"Content","Timeline entries":"Content","Top row":"Content",Total:"Content","Trailing note":"Content","\u201COther\u201D reason":"Content","Background images":"Style",Gallery:"Style",Image:"Style","Image column":"Style",Images:"Style",Logo:"Style",Media:"Style","Background image":"Style",Color:"Style","Image tint":"Style",Style:"Style",Shape:"Style",Texture:"Style","Text style":"Style",Motion:"Animation",Animation:"Animation",Anchor:"Layout",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Layout",Behavior:"Layout",Controls:"Layout",Diagram:"Layout",[P]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Nudge:"Layout","Image gallery":"Layout",Grid:"Layout",Layout:"Layout",Padding:"Layout",Price:"Layout",Preview:"Layout",Setup:"Layout","Show / hide elements":"Layout","Show in the buy box":"Layout",Visibility:"Layout",Width:"Layout",Height:"Layout"},v={"AlloyWheelsListing._gCards":"Style","ProductGrid._gCards":"Style"};function j(o,t,n){return v[`${o}.${t}`]??_[n]}const G={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","EmailFormBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","SocialLogosBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gLayout":"duplicated the Layout bucket header above it (born tabbed, H.1)","SearchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CartBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","Split._gContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gVehicleContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gWheelContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gOthersContent":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gHeadCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gLeftCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gRightCopy":"duplicated the Content bucket header above it (2026-09-04)","CollectionCard._gContent":"duplicated the Content bucket header above it (A Card Sets Its Own Corners)","HeroSlide._gContent":"duplicated the Content bucket header above it (Hero Slide Tabs And Theme)","BrandStrip._gContent":"duplicated the Content bucket header above it (66338)","BrandStrip._gStyle":"duplicated the Style bucket header above it (66338)","BrandStrip._gLayout":"duplicated the Layout bucket header above it (66338)","KeyFeatures._gContent":"duplicated the Content bucket header above it (66049)","KeyFeatures._gStyle":"duplicated the Style bucket header above it (66049)","ParagraphsA._gContent":"duplicated the Content bucket header above it (66049)","ParagraphsA._gStyle":"duplicated the Style bucket header above it (66049)","Chart._gContent":"duplicated the Content bucket header above it (66049)","Chart._gStyle":"duplicated the Style bucket header above it (66049)","Logos._gContent":"duplicated the Content bucket header above it (66049)","Logos._gStyle":"duplicated the Style bucket header above it (66049)","Mockup._gContent":"duplicated the Content bucket header above it (66049)","Mockup._gStyle":"duplicated the Style bucket header above it (66049)","Stats._gContent":"duplicated the Content bucket header above it (66049)","Stats._gStyle":"duplicated the Style bucket header above it (66049)","StatsParagraph._gContent":"duplicated the Content bucket header above it (66049)","StatsParagraph._gStyle":"duplicated the Style bucket header above it (66049)","Testimonials._gContent":"duplicated the Content bucket header above it (66049)","Testimonials._gStyle":"duplicated the Style bucket header above it (66049)","AppointmentBooking._gContent":"duplicated the Content bucket header above it (66050)","BookingBox._gContent":"duplicated the Content bucket header above it ([SPLIT] Booking Form Into Three Boxes) \u2014 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) \u2014 the same fault its own section retired in 66050, one level down","CheckoutCTA._gContent":"duplicated the Content bucket header above it (66051)","CheckoutCTA._gLayout":"duplicated the Layout bucket header above it (66051)","DeliveryOptions._gContent":"duplicated the Content bucket header above it (66051)","DeliveryOptions._gLayout":"duplicated the Layout bucket header above it (66051)","OrderSummary._gContent":"duplicated the Content bucket header above it (66051)","OrderSummary._gLayout":"duplicated the Layout bucket header above it (66051)","PaymentBadges._gContent":"duplicated the Content bucket header above it (66051)","PaymentBadges._gLayout":"duplicated the Layout bucket header above it (66051)","Collections._gContent":"duplicated the Content bucket header above it (66052)","Collections._gLayout":"duplicated the Layout bucket header above it (66052)","DocMasthead._gContent":"duplicated the Content bucket header above it (66053)","Events._gContent":"duplicated the Content bucket header above it (66054)","Events._gLayout":"duplicated the Layout bucket header above it (66054)","FeaturedCover._gContent":"duplicated the Content bucket header above it (66054)","Series._gStyle":"duplicated the Style bucket header above it (66054)","Flex._gContent":"duplicated the Content bucket header above it (66055)","Flex._gLayout":"duplicated the Layout bucket header above it (66055)","SectionHeader._gContent":"duplicated the Content bucket header above it (66055)","Breadcrumb._gContent":"duplicated the Content bucket header above it (66056)","CategoryBar._gStyle":"duplicated the Style bucket header above it (66056)","Hero._gContent":"duplicated the Content bucket header above it (66056)","Hero._gStyle":"duplicated the Style bucket header above it (66056)","HeroSingle._gStyle":"duplicated the Style bucket header above it (66056)","IntroBleed._gContent":"duplicated the Content bucket header above it (66056)","IntroBleed._gLayout":"duplicated the Layout bucket header above it (66056)","BundleOffer._gLayout":"duplicated the Layout bucket header above it (66059)","ProcessSteps._gContent":"duplicated the Content bucket header above it (66059)","Banner._gContent":"duplicated the Content bucket header above it (66060.1)","Banner._gLayout":"duplicated the Layout bucket header above it, and governed no controls (66060.1)","Manifesto._gContent":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gHeadCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gLeftCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gRightCopy":"duplicated the Content bucket header above it (66060.1)","Ticker._gContent":"duplicated the Content bucket header above it (66060.1)","Ticker._gStyle":"duplicated the Style bucket header above it (66060.1)","Timeline._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gStyle":"duplicated the Style bucket header above it (66060.1)","Cards._gContent":"duplicated the Content bucket header above it (66218)","Cards._gStyle":"duplicated the Style bucket header above it (66218)","Prose._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gStyle":"duplicated the Style bucket header above it (66218)"};function oe(o){const t=new Set(Object.values(r));for(const[n,d]of Object.entries(o))if(!t.has(n)&&p(d)?.level===1)return 1;return 2}function Y(o){const t=`${o}.`;return Object.keys(G).filter(n=>n.startsWith(t)).map(n=>n.slice(t.length))}function N(o,t){const n=D(o),d=O(t);return n?R(n.tier,d):d}function ne(o,t){const n=[],d=new Set(Y(t)),g=new Set;let h=null;for(const[e,i]of Object.entries(o)){const a=p(i);if(!a){h||n.push(h={bucket:"Content",entries:[]}),h.entries.push([e,i]);continue}if(d.has(e)){const c=_[a.label];if(a.level!==2||!c||a.label!==c)throw new Error(`${t}.${e}: RETIRED (lib/puck/field-groups.ts) lists this sub-heading as one whose name duplicates its bucket, but it is a level-${a.level} "${a.label}" header in the ${c??"(unclassified)"} bucket. Only a level-2 header whose label IS its bucket's name may be retired \u2014 anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);g.add(e),n.push(h={bucket:c,entries:[]});continue}const l=j(t,e,a.label);if(!l)throw new Error(`${t}.${e}: the inspector group "${a.label}" is not classified in LABEL_BUCKET (lib/puck/field-groups.ts), so there is no way to say which of ${s.join(" / ")} its controls belong under. Classify it \u2014 an unclassified group silently lands wherever it was declared, which is the whole bug.`);const u=e===r[l]&&a.level===1;if(!u&&e===r[l])throw new Error(`${t}.${e}: that key is reserved for the ${l} bucket header, but this field is a level-${a.level} "${a.label}" header, so it cannot serve as one. Rename the section's own field.`);n.push(h={bucket:l,entries:[[e,u||a.level===2?i:N(i,a.label)]],isBucketHeader:u})}const L=new Set(Object.entries(o).filter(([,e])=>p(e)).map(([e])=>e)),k=Object.keys(v).filter(e=>e.startsWith(`${t}.`)).filter(e=>!L.has(e.slice(t.length+1)));if(k.length)throw new Error(`${t}: KEY_BUCKET (lib/puck/field-groups.ts) lists ${JSON.stringify(k)}, but no fold header by that key is in this section's panel. Either the heading was renamed or removed and the row is stale, or the row names the wrong key \u2014 an override that quietly matches nothing is worse than no override.`);const b=n.some(e=>e.isBucketHeader)?[]:[...d].filter(e=>!g.has(e));if(b.length)throw new Error(`${t}: RETIRED (lib/puck/field-groups.ts) lists ${JSON.stringify(b)}, but this section has no such fold header${b.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section \u2014 a list that quietly matches nothing is worse than no list.`);for(const e of s){const i=r[e];if(i in o&&!n.some(a=>a.isBucketHeader&&a.entries[0]?.[0]===i))throw new Error(`${t}.${i} is reserved for the ${e} bucket header but is not a level-1 "${e}" fold header. Rename the section's own field.`)}const S=s.filter(e=>n.some(i=>i.bucket===e)),C={};for(const e of s){const i=n.filter(u=>u.bucket===e);if(!i.length)continue;const a=i.findIndex(u=>u.isBucketHeader);a>0&&i.unshift(...i.splice(a,1));const l=y(e,e===S[0]?S:null);a<0&&(C[r[e]]=l);for(const u of i)for(const[c,f]of u.entries)C[c]=u.isBucketHeader&&c===r[e]?l:f}return C}function ae(o){return r.Content in o?o:{[r.Content]:y("Content",null),...o}}function ie(o){return s.some(t=>r[t]in o)}function re(o){const t=s.filter(d=>r[d]in o);if(t.length===0)return o;const n={...o};for(const d of t)n[r[d]]=y(d,d===t[0]?t:null);return n}export{Z as BOUND_CARD_MEDIA_FIELD_KEYS,s as BUCKETS,r as BUCKET_KEY,K as CARD_MEDIA_FIELD_KEYS,te as CARD_SHOW_FIELD_KEYS,ee as CARD_STYLE_FIELD_KEYS,P as EDITOR_ONLY_GROUP,v as KEY_BUCKET,_ as LABEL_BUCKET,J as LAYOUT_FIELD_KEYS,G as RETIRED,X as SECTION_ANIM_FIELD_KEYS,z as SECTION_SHAPE_FIELD_KEYS,V as SECTION_THEME_FIELD_KEYS,ne as assignSectionGroups,j as bucketOf,oe as foldTopTier,ie as hasBucketTabs,re as reseatBucketTabs,Y as retiredHeadings,ae as seatContentBucket};
|
|
1
|
+
import{anchorFields as m,bucketHeader as p,cardMediaFields as B,cardShowFields as E,cardStyleFields as w,foldMetaOf as y,group as O,heightFields as T,sectionAnimationFields as F,sectionShapeFields as I,sectionThemeFields as x,spacingFields as A,widthField as H}from"./controls.js";import{deviceField as R,deviceMetaOf as D}from"./device-fields.js";import{SETTINGS_BUCKETS as $}from"efficient-easel/panel";import{BUCKET_KEY as i}from"./field-buckets.js";const s=$,V=[i.Layout,...Object.keys(A({phone:!0})),...Object.keys(H("full")),...Object.keys(T()),...Object.keys(m())],z=[i.Style,...Object.keys(x())],X=[i.Style,...Object.keys(I())],Z=[i.Animation,...Object.keys(F())],K=Object.keys(B()),M=new Set(["cardImage","imageBackground"]),ee=[i.Style,...K.filter(o=>o.startsWith("_g")||M.has(o))],te=Object.keys(w()),oe=Object.keys(E({bottomDefault:!0})),P="Editor only \u2014 not shown live",v={"Archive link":"Content",Article:"Content",Boxes:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content","Opening filter":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content","Message form":"Content",Metadata:"Content",Milestones:"Content","Mockup card":"Content","Newsletter panel":"Content",Offices:"Content",Options:"Content","Others gallery":"Content","Overlay button":"Content",Product:"Content","Product page":"Content",Products:"Content","Pull quote":"Content",Questions:"Content","Recent issues":"Content","Recent posts":"Content",Reviews:"Content","Right panel \xB7 actions":"Content","Right panel \xB7 choices":"Content","Right panel \xB7 form":"Content","Routing groups":"Content",Rows:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content","Source product":"Content","Stat & note":"Content",Stats:"Content","Submit button":"Content","Success state":"Content",Wheel:"Content",Terminal:"Content",Text:"Content","Text column":"Content","Timeline entries":"Content","Top row":"Content",Total:"Content","Trailing note":"Content","\u201COther\u201D reason":"Content","Background images":"Style",Gallery:"Style",Image:"Style","Image column":"Style",Images:"Style",Logo:"Style",Media:"Style","Background image":"Style",Color:"Style","Image tint":"Style",Style:"Style",Shape:"Style",Texture:"Style","Text style":"Style",Motion:"Animation",Animation:"Animation",Anchor:"Layout",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Layout",Behavior:"Layout",Controls:"Layout",Diagram:"Layout",[P]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Nudge:"Layout","Image gallery":"Layout",Grid:"Layout",Layout:"Layout",Padding:"Layout",Price:"Layout",Preview:"Layout",Setup:"Layout","Show / hide elements":"Layout","Show in the buy box":"Layout",Visibility:"Layout",Width:"Layout",Height:"Layout"},_={"AlloyWheelsListing._gCards":"Style","ProductGrid._gCards":"Style"};function j(o,t,n){return _[`${o}.${t}`]??v[n]}const G={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","EmailFormBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","SocialLogosBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gLayout":"duplicated the Layout bucket header above it (born tabbed, H.1)","SearchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CartBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","Split._gContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gVehicleContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gWheelContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gOthersContent":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gHeadCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gLeftCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gRightCopy":"duplicated the Content bucket header above it (2026-09-04)","CollectionCard._gContent":"duplicated the Content bucket header above it (A Card Sets Its Own Corners)","HeroSlide._gContent":"duplicated the Content bucket header above it (Hero Slide Tabs And Theme)","BrandStrip._gContent":"duplicated the Content bucket header above it (66338)","BrandStrip._gStyle":"duplicated the Style bucket header above it (66338)","BrandStrip._gLayout":"duplicated the Layout bucket header above it (66338)","KeyFeatures._gContent":"duplicated the Content bucket header above it (66049)","KeyFeatures._gStyle":"duplicated the Style bucket header above it (66049)","ParagraphsA._gContent":"duplicated the Content bucket header above it (66049)","ParagraphsA._gStyle":"duplicated the Style bucket header above it (66049)","Chart._gContent":"duplicated the Content bucket header above it (66049)","Chart._gStyle":"duplicated the Style bucket header above it (66049)","Logos._gContent":"duplicated the Content bucket header above it (66049)","Logos._gStyle":"duplicated the Style bucket header above it (66049)","Mockup._gContent":"duplicated the Content bucket header above it (66049)","Mockup._gStyle":"duplicated the Style bucket header above it (66049)","Stats._gContent":"duplicated the Content bucket header above it (66049)","Stats._gStyle":"duplicated the Style bucket header above it (66049)","StatsParagraph._gContent":"duplicated the Content bucket header above it (66049)","StatsParagraph._gStyle":"duplicated the Style bucket header above it (66049)","Testimonials._gContent":"duplicated the Content bucket header above it (66049)","Testimonials._gStyle":"duplicated the Style bucket header above it (66049)","AppointmentBooking._gContent":"duplicated the Content bucket header above it (66050)","BookingBox._gContent":"duplicated the Content bucket header above it ([SPLIT] Booking Form Into Three Boxes) \u2014 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) \u2014 the same fault its own section retired in 66050, one level down","CheckoutCTA._gContent":"duplicated the Content bucket header above it (66051)","CheckoutCTA._gLayout":"duplicated the Layout bucket header above it (66051)","DeliveryOptions._gContent":"duplicated the Content bucket header above it (66051)","DeliveryOptions._gLayout":"duplicated the Layout bucket header above it (66051)","OrderSummary._gContent":"duplicated the Content bucket header above it (66051)","OrderSummary._gLayout":"duplicated the Layout bucket header above it (66051)","PaymentBadges._gContent":"duplicated the Content bucket header above it (66051)","PaymentBadges._gLayout":"duplicated the Layout bucket header above it (66051)","Collections._gContent":"duplicated the Content bucket header above it (66052)","Collections._gLayout":"duplicated the Layout bucket header above it (66052)","DocMasthead._gContent":"duplicated the Content bucket header above it (66053)","Events._gContent":"duplicated the Content bucket header above it (66054)","Events._gLayout":"duplicated the Layout bucket header above it (66054)","FeaturedCover._gContent":"duplicated the Content bucket header above it (66054)","Series._gStyle":"duplicated the Style bucket header above it (66054)","Flex._gContent":"duplicated the Content bucket header above it (66055)","Flex._gLayout":"duplicated the Layout bucket header above it (66055)","SectionHeader._gContent":"duplicated the Content bucket header above it (66055)","Breadcrumb._gContent":"duplicated the Content bucket header above it (66056)","CategoryBar._gStyle":"duplicated the Style bucket header above it (66056)","Hero._gContent":"duplicated the Content bucket header above it (66056)","Hero._gStyle":"duplicated the Style bucket header above it (66056)","HeroSingle._gStyle":"duplicated the Style bucket header above it (66056)","IntroBleed._gContent":"duplicated the Content bucket header above it (66056)","IntroBleed._gLayout":"duplicated the Layout bucket header above it (66056)","BundleOffer._gLayout":"duplicated the Layout bucket header above it (66059)","ProcessSteps._gContent":"duplicated the Content bucket header above it (66059)","Banner._gContent":"duplicated the Content bucket header above it (66060.1)","Banner._gLayout":"duplicated the Layout bucket header above it, and governed no controls (66060.1)","Manifesto._gContent":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gHeadCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gLeftCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gRightCopy":"duplicated the Content bucket header above it (66060.1)","Ticker._gContent":"duplicated the Content bucket header above it (66060.1)","Ticker._gStyle":"duplicated the Style bucket header above it (66060.1)","Timeline._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gStyle":"duplicated the Style bucket header above it (66060.1)","Cards._gContent":"duplicated the Content bucket header above it (66218)","Cards._gStyle":"duplicated the Style bucket header above it (66218)","Prose._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gStyle":"duplicated the Style bucket header above it (66218)"};function ne(o){const t=new Set(Object.values(i));for(const[n,d]of Object.entries(o))if(!t.has(n)&&y(d)?.level===1)return 1;return 2}function Y(o){const t=`${o}.`;return Object.keys(G).filter(n=>n.startsWith(t)).map(n=>n.slice(t.length))}function N(o,t){const n=D(o),d=O(t);return n?R(n.tier,d):d}function ae(o,t){const n=[],d=new Set(Y(t)),g=new Set;let h=null;for(const[e,r]of Object.entries(o)){const a=y(r);if(!a){h||n.push(h={bucket:"Content",entries:[]}),h.entries.push([e,r]);continue}if(d.has(e)){const l=v[a.label];if(a.level!==2||!l||a.label!==l)throw new Error(`${t}.${e}: RETIRED (lib/puck/field-groups.ts) lists this sub-heading as one whose name duplicates its bucket, but it is a level-${a.level} "${a.label}" header in the ${l??"(unclassified)"} bucket. Only a level-2 header whose label IS its bucket's name may be retired \u2014 anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);g.add(e),n.push(h={bucket:l,entries:[]});continue}const c=j(t,e,a.label);if(!c)throw new Error(`${t}.${e}: the inspector group "${a.label}" is not classified in LABEL_BUCKET (lib/puck/field-groups.ts), so there is no way to say which of ${s.join(" / ")} its controls belong under. Classify it \u2014 an unclassified group silently lands wherever it was declared, which is the whole bug.`);const u=e===i[c]&&a.level===1;if(!u&&e===i[c])throw new Error(`${t}.${e}: that key is reserved for the ${c} bucket header, but this field is a level-${a.level} "${a.label}" header, so it cannot serve as one. Rename the section's own field.`);n.push(h={bucket:c,entries:[[e,u||a.level===2?r:N(r,a.label)]],isBucketHeader:u})}const f=new Set(Object.entries(o).filter(([,e])=>y(e)).map(([e])=>e)),k=Object.keys(_).filter(e=>e.startsWith(`${t}.`)).filter(e=>!f.has(e.slice(t.length+1)));if(k.length)throw new Error(`${t}: KEY_BUCKET (lib/puck/field-groups.ts) lists ${JSON.stringify(k)}, but no fold header by that key is in this section's panel. Either the heading was renamed or removed and the row is stale, or the row names the wrong key \u2014 an override that quietly matches nothing is worse than no override.`);const b=n.some(e=>e.isBucketHeader)?[]:[...d].filter(e=>!g.has(e));if(b.length)throw new Error(`${t}: RETIRED (lib/puck/field-groups.ts) lists ${JSON.stringify(b)}, but this section has no such fold header${b.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section \u2014 a list that quietly matches nothing is worse than no list.`);for(const e of s){const r=i[e];if(r in o&&!n.some(a=>a.isBucketHeader&&a.entries[0]?.[0]===r))throw new Error(`${t}.${r} is reserved for the ${e} bucket header but is not a level-1 "${e}" fold header. Rename the section's own field.`)}const S=s.filter(e=>n.some(r=>r.bucket===e)),C={};for(const e of s){const r=n.filter(u=>u.bucket===e);if(!r.length)continue;const a=r.findIndex(u=>u.isBucketHeader);a>0&&r.unshift(...r.splice(a,1));const c=p(e,e===S[0]?S:null);a<0&&(C[i[e]]=c);for(const u of r)for(const[l,L]of u.entries)C[l]=u.isBucketHeader&&l===i[e]?c:L}return C}function ie(o){return i.Content in o?o:{[i.Content]:p("Content",null),...o}}function re(o){return s.some(t=>i[t]in o)}function de(o){const t=s.filter(d=>i[d]in o);if(t.length===0)return o;const n={...o};for(const d of t)n[i[d]]=p(d,d===t[0]?t:null);return n}export{ee as BOUND_CARD_MEDIA_FIELD_KEYS,s as BUCKETS,i as BUCKET_KEY,K as CARD_MEDIA_FIELD_KEYS,oe as CARD_SHOW_FIELD_KEYS,te as CARD_STYLE_FIELD_KEYS,P as EDITOR_ONLY_GROUP,_ as KEY_BUCKET,v as LABEL_BUCKET,V as LAYOUT_FIELD_KEYS,G as RETIRED,Z as SECTION_ANIM_FIELD_KEYS,X as SECTION_SHAPE_FIELD_KEYS,z as SECTION_THEME_FIELD_KEYS,ae as assignSectionGroups,j as bucketOf,ne as foldTopTier,re as hasBucketTabs,de as reseatBucketTabs,Y as retiredHeadings,ie as seatContentBucket};
|
|
@@ -1,16 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
export declare const LINK_FIELD_MARKER: "__link";
|
|
4
|
-
export declare const SCAFFOLD_FIELD_MARKER: "__scaffold";
|
|
5
|
-
export type TextListRendering = "markup" | "verbatim";
|
|
6
|
-
export type TextFieldMeta = {
|
|
7
|
-
control: TextControlKind;
|
|
8
|
-
label: string;
|
|
9
|
-
placeholder?: string;
|
|
10
|
-
hint?: string;
|
|
11
|
-
offPage?: true;
|
|
12
|
-
identifier?: true;
|
|
13
|
-
itemKey?: string;
|
|
14
|
-
rendering?: TextListRendering;
|
|
15
|
-
};
|
|
16
|
-
export type EdgeCell = "top" | "right" | "bottom" | "left";
|
|
1
|
+
export { ANCHOR_FIELD_KEYS, FOLD_FIELD_MARKER, foldMetaOf, LINK_FIELD_MARKER, MEDIA_FIELD_MARKER, SCAFFOLD_FIELD_MARKER, TEXT_FIELD_MARKER, textFieldIdentifier } from "efficient-easel/screen/lib/puck/field-markers";
|
|
2
|
+
export type { EdgeCell, FoldFieldMeta, TextFieldMeta, TextListRendering } from "efficient-easel/screen/lib/puck/field-markers";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{ANCHOR_FIELD_KEYS as R,FOLD_FIELD_MARKER as F,foldMetaOf as D,LINK_FIELD_MARKER as I,MEDIA_FIELD_MARKER as L,SCAFFOLD_FIELD_MARKER as A,TEXT_FIELD_MARKER as K,textFieldIdentifier as M}from"efficient-easel/screen/lib/puck/field-markers";export{R as ANCHOR_FIELD_KEYS,F as FOLD_FIELD_MARKER,I as LINK_FIELD_MARKER,L as MEDIA_FIELD_MARKER,A as SCAFFOLD_FIELD_MARKER,K as TEXT_FIELD_MARKER,D as foldMetaOf,M as textFieldIdentifier};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function r(t,o){const n=t.props;if(t.type==="FooterMenu"){const e=n.menu;return n.heading||e?.name||"Menu"}if(t.type==="FooterText"){const e=typeof n.text=="string"?n.text.trim():"";return e?e.length>28?`${e.slice(0,28)}\u2026`:e:"Text"}return t.type==="FooterEmailSignup"?n.heading||"Email signup":o(t.type)}export{r as footerBlockRowName};
|
|
@@ -1,16 +1,8 @@
|
|
|
1
|
+
import type { BlockChoice } from "./block-choice.js";
|
|
1
2
|
import { HEADER_TYPE, FOOTER_TYPE, type TreeItem } from "./content-tree.js";
|
|
2
3
|
export { HEADER_TYPE, FOOTER_TYPE };
|
|
3
4
|
export declare function buildDefaultHeaderNode(): TreeItem;
|
|
4
|
-
export type BlockChoice
|
|
5
|
-
type: string;
|
|
6
|
-
label: string;
|
|
7
|
-
group?: string;
|
|
8
|
-
};
|
|
9
|
-
export type BlockChoiceRun = {
|
|
10
|
-
group?: string;
|
|
11
|
-
items: BlockChoice[];
|
|
12
|
-
};
|
|
13
|
-
export declare function blockRuns(choices: BlockChoice[]): BlockChoiceRun[];
|
|
5
|
+
export { blockRuns, type BlockChoice, type BlockChoiceRun } from "./block-choice.js";
|
|
14
6
|
export declare const FOOTER_BLOCK_CHOICES: BlockChoice[];
|
|
15
7
|
export declare const GROUP_BLOCK_CHOICES: BlockChoice[];
|
|
16
8
|
export declare const FOOTER_GROUP_TYPE = "FooterGroup";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{HEADER_TYPE as
|
|
1
|
+
import{HEADER_TYPE as e,FOOTER_TYPE as r,newNodeId as n}from"./content-tree.js";function c(){return{type:e,props:{id:n(e)}}}import{blockRuns as E}from"./block-choice.js";const l=[{type:"FooterLogo",label:"Logo"},{type:"FooterMenu",label:"Menu"},{type:"FooterText",label:"Text"},{type:"FooterEmailSignup",label:"Email Form"},{type:"FooterSocial",label:"Social Logos"},{type:"FooterGroup",label:"Footer Box"},{type:"FooterDivider",label:"Divider"}],p=l.filter(o=>o.type!=="FooterLogo"&&o.type!=="FooterGroup"),a="FooterGroup",F="blocks";function d(o){return o===r?l:o===a?p:null}function s(){const o=(t,i)=>({type:t,props:{id:`${t}-${crypto.randomUUID()}`,...i}});return[o("FooterLogo",{widthPct:100,align:"left",tagline:""}),o("FooterGroup",{direction:"vertical",align:"start",blocks:[o("FooterText",{text:"Join our email list",size:"md",tone:"default"}),o("FooterEmailSignup",{heading:"",placeholder:"Email address",buttonLabel:"Subscribe"})]})]}export{F as FOOTER_BLOCKS_SLOT,l as FOOTER_BLOCK_CHOICES,a as FOOTER_GROUP_TYPE,r as FOOTER_TYPE,p as GROUP_BLOCK_CHOICES,e as HEADER_TYPE,d as blockChoicesFor,E as blockRuns,s as buildDefaultFooterBlocks,c as buildDefaultHeaderNode};
|
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
hidden?: boolean;
|
|
4
|
-
} | string | undefined;
|
|
5
|
-
export declare function readHidable(v: HidableValue): {
|
|
6
|
-
text: string;
|
|
7
|
-
hidden: boolean;
|
|
8
|
-
};
|
|
9
|
-
export declare function hidableText(v: HidableValue): string;
|
|
1
|
+
export { hidableText, readHidable } from "efficient-easel/screen/lib/puck/hidable";
|
|
2
|
+
export type { HidableValue } from "efficient-easel/screen/lib/puck/hidable";
|
package/dist/lib/puck/hidable.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{hidableText as d,readHidable as r}from"efficient-easel/screen/lib/puck/hidable";export{d as hidableText,r as readHidable};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{buildPaletteSections as i,categoryLabel as n,matchesQuery as o,paletteWithoutPinned as a,pinnedSection as c}from"efficient-easel/screen/lib/puck/palette-sections";export{i as buildPaletteSections,n as categoryLabel,o as matchesQuery,a as paletteWithoutPinned,c as pinnedSection};
|
|
@@ -1,12 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
fields?: PanelFieldMap;
|
|
4
|
-
resolveFields?: (data: unknown, params: Record<string, unknown>) => unknown;
|
|
5
|
-
}
|
|
6
|
-
export declare function panelFieldsOf(config: {
|
|
7
|
-
components?: Record<string, PanelComponent>;
|
|
8
|
-
}, node: {
|
|
9
|
-
type: string;
|
|
10
|
-
props: Record<string, unknown>;
|
|
11
|
-
} | null | undefined): PanelFieldMap | null;
|
|
12
|
-
export {};
|
|
1
|
+
export { panelFieldsOf } from "efficient-easel/screen/lib/puck/panel-fields";
|
|
2
|
+
export type { PanelFieldMap } from "efficient-easel/screen/lib/puck/panel-fields";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{panelFieldsOf as l}from"efficient-easel/screen/lib/puck/panel-fields";export{l as panelFieldsOf};
|
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
export declare function NoControlMark(): ReactElement;
|
|
4
|
-
export declare const NO_CONTROL_FIELD: "__noControl";
|
|
5
|
-
export type NoControlFieldMeta = "always" | "authored-copy";
|
|
6
|
-
export declare function noControlMetaOf(field: unknown): NoControlFieldMeta | null;
|
|
7
|
-
export declare function noControlField<F>(field: F, reason: NoControlFieldMeta): F;
|
|
1
|
+
export { NO_CONTROL_ATTR, NO_CONTROL_FIELD, noControlField, NoControlMark, noControlMetaOf } from "efficient-easel/screen/lib/puck/panel-no-control-mark";
|
|
2
|
+
export type { NoControlFieldMeta } from "efficient-easel/screen/lib/puck/panel-no-control-mark";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{
|
|
1
|
+
"use client";import{NO_CONTROL_ATTR as n,NO_CONTROL_FIELD as r,noControlField as t,NoControlMark as e,noControlMetaOf as l}from"efficient-easel/screen/lib/puck/panel-no-control-mark";export{n as NO_CONTROL_ATTR,r as NO_CONTROL_FIELD,e as NoControlMark,t as noControlField,l as noControlMetaOf};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { decodePartId, encodePartId, PART_SEP } from "efficient-easel/screen/lib/puck/part-id";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{decodePartId as o,encodePartId as r,PART_SEP as P}from"efficient-easel/screen/lib/puck/part-id";export{P as PART_SEP,o as decodePartId,r as encodePartId};
|
|
@@ -1,17 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
export type SaveStatus = "idle" | "saving" | "saved" | "error";
|
|
4
|
-
export declare function saveStatusOf(state: AutosaveSnapshot): SaveStatus;
|
|
1
|
+
import type { SaveStatus } from "../editor-document-switch.js";
|
|
2
|
+
export { resetForDocumentSwitch, saveStatusForNewDocument, saveStatusOf, type DocumentSwitchSetters, type SaveStatus, } from "../editor-document-switch.js";
|
|
5
3
|
export declare function canSeedPinnedChrome(state: {
|
|
6
4
|
docId: string | null;
|
|
7
5
|
saveStatus: SaveStatus;
|
|
8
6
|
seededDocId: string | null;
|
|
9
7
|
}): boolean;
|
|
10
|
-
export declare function saveStatusForNewDocument(_previous: SaveStatus): SaveStatus;
|
|
11
|
-
export type DocumentSwitchSetters = {
|
|
12
|
-
resetAutosave: () => void;
|
|
13
|
-
setVersion: (version: string | null) => void;
|
|
14
|
-
setSaveConflict: (conflict: null) => void;
|
|
15
|
-
setAccess: (access: EditAccess) => void;
|
|
16
|
-
};
|
|
17
|
-
export declare function resetForDocumentSwitch(hasEditLock: boolean, apply: DocumentSwitchSetters): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{resetForDocumentSwitch as d,saveStatusForNewDocument as t,saveStatusOf as c}from"../editor-document-switch.js";function o(e){return!e.docId||e.saveStatus==="saving"?!1:e.seededDocId!==e.docId}export{o as canSeedPinnedChrome,d as resetForDocumentSwitch,t as saveStatusForNewDocument,c as saveStatusOf};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export declare function isPreviewClick(): boolean;
|
|
1
|
+
export { isPreviewClick, runAsPreviewClick } from "efficient-easel/screen/lib/puck/preview-click";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{isPreviewClick as r,runAsPreviewClick as c}from"efficient-easel/screen/lib/puck/preview-click";export{r as isPreviewClick,c as runAsPreviewClick};
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export declare function scrollPreviewToSection(id: string): void;
|
|
3
|
-
export declare function gotoPreviewSlide(heroId: string, index: number): void;
|
|
4
|
-
export declare function scrollPreviewToTop(): void;
|
|
5
|
-
export declare function pinPreviewToSection(id: string): () => void;
|
|
6
|
-
export declare function pinPreviewToBottom(onPinned?: () => void): () => void;
|
|
1
|
+
export { gotoPreviewSlide, pinPreviewToBottom, pinPreviewToSection, previewFrame, scrollPreviewToSection, scrollPreviewToTop } from "efficient-easel/screen/lib/puck/preview-dom";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{gotoPreviewSlide as i,pinPreviewToBottom as r,pinPreviewToSection as t,previewFrame as v,scrollPreviewToSection as w,scrollPreviewToTop as l}from"efficient-easel/screen/lib/puck/preview-dom";export{i as gotoPreviewSlide,r as pinPreviewToBottom,t as pinPreviewToSection,v as previewFrame,w as scrollPreviewToSection,l as scrollPreviewToTop};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{HERO_SLIDER_GOTO_EVENT as _}from"efficient-easel/screen/lib/puck/preview-events";export{_ as HERO_SLIDER_GOTO_EVENT};
|
|
@@ -1,19 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
select: (...args: Args) => void;
|
|
4
|
-
setSelectHandler: (fn: (...args: Args) => void) => void;
|
|
5
|
-
};
|
|
6
|
-
export type PreviewIdSelection<Key extends string> = {
|
|
7
|
-
[P in Key]: string | null;
|
|
8
|
-
} & {
|
|
9
|
-
[P in Key as `set${Capitalize<P>}`]: (id: string | null) => void;
|
|
10
|
-
} & {
|
|
11
|
-
select: (id: string) => void;
|
|
12
|
-
setSelectHandler: (fn: (id: string) => void) => void;
|
|
13
|
-
};
|
|
14
|
-
export declare function createPreviewSelectionContext<Key extends string>(idKey: Key): {
|
|
15
|
-
Provider: ({ children }: {
|
|
16
|
-
children: ReactNode;
|
|
17
|
-
}) => import("react").JSX.Element;
|
|
18
|
-
useSelection: () => PreviewIdSelection<Key>;
|
|
19
|
-
};
|
|
1
|
+
export { createPreviewSelectionContext, useSelectHandler } from "efficient-easel/screen/lib/puck/preview-selection-context";
|
|
2
|
+
export type { PreviewIdSelection } from "efficient-easel/screen/lib/puck/preview-selection-context";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{
|
|
1
|
+
"use client";import{createPreviewSelectionContext as r,useSelectHandler as c}from"efficient-easel/screen/lib/puck/preview-selection-context";export{r as createPreviewSelectionContext,c as useSelectHandler};
|
|
@@ -1,5 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { type TreeItem } from "./content-tree.js";
|
|
3
|
-
export declare function nodeToDoc(node: TreeItem): Data;
|
|
4
|
-
export declare function docToNode(data: Data): TreeItem | null;
|
|
5
|
-
export declare function cloneNodeWithFreshIds(node: TreeItem): TreeItem;
|
|
1
|
+
export { cloneNodeWithFreshIds, docToNode, nodeToDoc } from "efficient-easel/screen/lib/puck/section-doc";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{cloneNodeWithFreshIds as d,docToNode as c,nodeToDoc as r}from"efficient-easel/screen/lib/puck/section-doc";export{d as cloneNodeWithFreshIds,c as docToNode,r as nodeToDoc};
|