efficient-web-builder 44.0.0 → 45.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/README.md +8 -0
- package/dist/editor/components/BlogPostSource.js +1 -1
- package/dist/editor/components/CanvasPartsBridge.js +1 -1
- package/dist/editor/components/CardShadowField.js +1 -1
- package/dist/editor/components/ChatSettingsPanel.js +1 -1
- package/dist/editor/components/FieldGlyph.js +1 -1
- package/dist/editor/components/LocationsGroupedField.js +1 -1
- package/dist/editor/components/PartInkControl.js +1 -1
- package/dist/editor/components/PartSettingsPanel.d.ts +0 -2
- package/dist/editor/components/PartSettingsPanel.js +1 -1
- package/dist/editor/components/PartTextBox.d.ts +6 -3
- package/dist/editor/components/PartTextBox.js +1 -1
- package/dist/editor/components/PreviewChatContext.d.ts +1 -2
- package/dist/editor/components/PreviewChatContext.js +1 -1
- package/dist/editor/components/PreviewPartAnchors.js +1 -1
- package/dist/editor/components/SectionIcon.js +1 -1
- package/dist/editor/components/SectionThemePicker.js +1 -1
- package/dist/editor/components/SectionWidthRows.d.ts +6 -13
- package/dist/editor/components/SectionWidthRows.js +1 -1
- package/dist/editor/components/SourceStatus.d.ts +2 -1
- package/dist/editor/components/SourceStatus.js +1 -1
- package/dist/editor/components/ThemeCard.js +1 -1
- package/dist/editor/components/ThemeColourField.js +1 -1
- package/dist/editor/components/ThemeField.js +1 -1
- package/dist/editor/components/TickerSettingsPanel.js +1 -1
- package/dist/editor/components/WebsiteScreenParts.js +1 -1
- package/dist/editor/components/WebsiteSettingsPanel.js +1 -1
- package/dist/editor/components/storefront-editor.css +90 -359
- package/dist/editor/components/useHostDocumentBridge.js +1 -1
- package/dist/editor/components/useLocationsTree.js +1 -1
- package/dist/editor/lib/animation/AnimationDurationRow.d.ts +3 -0
- package/dist/editor/lib/animation/AnimationDurationRow.js +1 -0
- package/dist/editor/lib/animation/entrance-fields.d.ts +4 -0
- package/dist/editor/lib/animation/entrance-fields.js +1 -0
- package/dist/editor/lib/animation/fields.d.ts +2 -0
- package/dist/editor/lib/animation/fields.js +1 -0
- package/dist/editor/lib/animation/loop-fields.d.ts +2 -0
- package/dist/editor/lib/animation/loop-fields.js +1 -0
- package/dist/editor/lib/document/ColourControl.js +1 -1
- package/dist/editor/lib/document/add-palette.js +1 -1
- package/dist/editor/lib/document/block-offer.js +1 -1
- package/dist/editor/lib/document/block-source-fields.d.ts +1 -1
- package/dist/editor/lib/document/block-source-fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Banner/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Breadcrumb/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/ButtonBlock/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Cards/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/CategoryBar/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Chart/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Divider/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/DocBody/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/DocMasthead/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/DocTabs/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Eyebrow/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/FAQ/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/FeaturedCover/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Footprint/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Grid/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Heading/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Hero/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/HeroGroup/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/HeroSingle/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/HeroSlide/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/ImageBlock/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Integrations/fields.js +2 -2
- package/dist/editor/lib/document/blocks/general/IntroBleed/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/KeyFeatures/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/LocationMap/fields.d.ts +10 -0
- package/dist/editor/lib/document/blocks/general/LocationMap/fields.js +1 -0
- package/dist/editor/lib/document/blocks/general/LogoBlock/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Logos/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/LongRead/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Manifesto/fields.js +2 -2
- package/dist/editor/lib/document/blocks/general/Masthead/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Mockup/fields.js +2 -2
- package/dist/editor/lib/document/blocks/general/OrderSummary/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/ParagraphsA/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/PaymentBadges/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/PostCard/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/ProcessSteps/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Prose/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/SectionHeader/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Series/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/SpecStrip/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Split/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Stats/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/StatsParagraph/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Testimonials/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Text/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Ticker/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Timeline/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/TimelineTrack/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/TitleWithButtons/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/index.d.ts +2 -2
- package/dist/editor/lib/document/blocks/general/index.js +1 -1
- package/dist/editor/lib/document/blocks/shared-fields.d.ts +3 -4
- package/dist/editor/lib/document/blocks/shared-fields.js +1 -1
- package/dist/editor/lib/document/box-fields.d.ts +32 -0
- package/dist/editor/lib/document/box-fields.js +1 -0
- package/dist/editor/lib/document/box-gutter-field.d.ts +1 -0
- package/dist/editor/lib/document/box-gutter-field.js +1 -0
- package/dist/editor/lib/document/card-row-fields.d.ts +1 -1
- package/dist/editor/lib/document/card-row-fields.js +1 -1
- package/dist/editor/lib/document/consent-words-field.d.ts +2 -3
- package/dist/editor/lib/document/consent-words-field.js +1 -1
- package/dist/editor/lib/document/controls.d.ts +34 -94
- package/dist/editor/lib/document/controls.js +1 -1
- package/dist/editor/lib/document/enclosing-section.d.ts +5 -1
- package/dist/editor/lib/document/enclosing-section.js +1 -1
- package/dist/editor/lib/document/field-groups.js +1 -1
- package/dist/editor/lib/document/general-registry.js +1 -1
- package/dist/editor/lib/document/overrides.js +1 -1
- package/dist/editor/lib/document/page-root-fields.d.ts +1 -1
- package/dist/editor/lib/document/page-root-fields.js +1 -1
- package/dist/editor/lib/document/page-root.d.ts +2 -7
- package/dist/editor/lib/document/page-root.js +2 -2
- package/dist/editor/lib/document/part-anchors.d.ts +0 -1
- package/dist/editor/lib/document/part-anchors.js +1 -1
- package/dist/editor/lib/document/part-panel-rows.d.ts +75 -0
- package/dist/editor/lib/document/part-panel-rows.js +1 -0
- package/dist/editor/lib/document/passes/inspector.js +1 -1
- package/dist/editor/lib/document/separator-field.d.ts +10 -0
- package/dist/editor/lib/document/separator-field.js +1 -0
- package/dist/editor/lib/document/shell-glyph.d.ts +2 -0
- package/dist/editor/lib/document/shell-glyph.js +1 -0
- package/dist/{format → editor}/lib/host-document-bridge.d.ts +1 -3
- package/dist/editor/lib/host-document-bridge.js +1 -0
- package/dist/editor/lib/pinned-chrome-doc.js +1 -1
- package/dist/editor/lib/sections/new-section-node.js +1 -1
- package/dist/editor/lib/sections/section-dry-run.d.ts +13 -2
- package/dist/editor/lib/sections/section-dry-run.js +2 -2
- package/dist/editor/lib/sections/text-layouts.d.ts +6 -0
- package/dist/editor/lib/sections/text-layouts.js +1 -0
- package/dist/editor/lib/source-rules/part-slider-fills-row.d.ts +1 -0
- package/dist/editor/lib/source-rules/part-slider-fills-row.js +5 -5
- package/dist/format/lib/animation/index.d.ts +1 -0
- package/dist/format/lib/animation/index.js +1 -0
- package/dist/format/lib/animation/loop.d.ts +29 -0
- package/dist/format/lib/animation/loop.js +1 -0
- package/dist/format/lib/content/block-size.d.ts +59 -0
- package/dist/format/lib/content/block-size.js +1 -0
- package/dist/format/lib/content/box-background.js +1 -1
- package/dist/format/lib/content/box-layout.d.ts +16 -37
- package/dist/format/lib/content/box-layout.js +1 -1
- package/dist/format/lib/content/box-link.d.ts +13 -0
- package/dist/format/lib/content/box-link.js +13 -0
- package/dist/format/lib/content/box-separator.d.ts +10 -0
- package/dist/format/lib/content/box-separator.js +1 -0
- package/dist/format/lib/content/box-shape.d.ts +10 -0
- package/dist/format/lib/content/box-shape.js +1 -0
- package/dist/format/lib/content/button-icon.d.ts +1 -0
- package/dist/format/lib/content/button-icon.js +1 -1
- package/dist/format/lib/content/card-corners.d.ts +0 -3
- package/dist/format/lib/content/card-corners.js +1 -1
- package/dist/format/lib/content/card-template.d.ts +2 -0
- package/dist/format/lib/content/card-template.js +1 -1
- package/dist/format/lib/content/cart-drawer.d.ts +7 -0
- package/dist/format/lib/content/cart-drawer.js +1 -1
- package/dist/format/lib/content/chat-launcher.js +1 -1
- package/dist/format/lib/content/container-gap.d.ts +9 -1
- package/dist/format/lib/content/container-gap.js +1 -1
- package/dist/format/lib/content/gallery-card-layout.js +1 -1
- package/dist/format/lib/content/gallery-layout.d.ts +1 -0
- package/dist/format/lib/content/gallery-layout.js +1 -1
- package/dist/format/lib/content/page-background.js +1 -1
- package/dist/format/lib/content/post-date.d.ts +1 -0
- package/dist/format/lib/content/post-date.js +1 -0
- package/dist/format/lib/content/scrim.d.ts +1 -0
- package/dist/format/lib/content/scrim.js +1 -0
- package/dist/format/lib/content/section-min-height.d.ts +4 -0
- package/dist/format/lib/content/section-min-height.js +1 -1
- package/dist/format/lib/content/section-width.d.ts +2 -18
- package/dist/format/lib/content/section-width.js +1 -1
- package/dist/format/lib/content/site-gutter.d.ts +11 -1
- package/dist/format/lib/content/site-gutter.js +1 -1
- package/dist/format/lib/content/tint.d.ts +1 -0
- package/dist/format/lib/content/tint.js +1 -0
- package/dist/format/lib/document/blocks/block-types.d.ts +0 -1
- package/dist/format/lib/document/blocks/general/HeroSingle/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/HeroSlide/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/IntroBleed/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/LocationMap/meta.d.ts +2 -0
- package/dist/format/lib/document/blocks/general/LocationMap/meta.js +1 -0
- package/dist/format/lib/document/blocks/general/SpecStrip/meta.d.ts +5 -0
- package/dist/format/lib/document/blocks/general/SpecStrip/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/Ticker/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/metas.d.ts +1 -0
- package/dist/format/lib/document/blocks/general/metas.js +1 -1
- package/dist/format/lib/document/blocks/general/text-part-shapes.json +30 -0
- package/dist/format/lib/document/box-footer.d.ts +1 -0
- package/dist/format/lib/document/box-footer.js +1 -1
- package/dist/format/lib/document/cap-hero-groups.js +1 -1
- package/dist/format/lib/document/container-blocks.js +1 -1
- package/dist/format/lib/document/editor-site-widths.d.ts +2 -0
- package/dist/format/lib/document/editor-site-widths.js +1 -0
- package/dist/format/lib/document/general-order.d.ts +1 -1
- package/dist/format/lib/document/general-order.js +1 -1
- package/dist/format/lib/document/media-manifest.json +3 -2
- package/dist/format/lib/document/part-inks.js +1 -1
- package/dist/format/lib/document/passes/document-position.js +1 -1
- package/dist/format/lib/document/passes/settings-groups.js +1 -1
- package/dist/format/lib/document/passes/types.d.ts +10 -5
- package/dist/format/lib/document/renamed-props.js +1 -1
- package/dist/format/lib/document/section-catalog.js +2 -2
- package/dist/format/lib/editor-words-catalogue.d.ts +32 -31
- package/dist/format/lib/editor-words-catalogue.js +6 -6
- package/dist/format/lib/fit-words.js +77 -18
- package/dist/format/lib/fonts.d.ts +1 -0
- package/dist/format/lib/fonts.js +1 -1
- package/dist/format/lib/hero-group-placement.js +1 -1
- package/dist/format/lib/hero-texture.d.ts +1 -1
- package/dist/format/lib/hero-texture.js +1 -1
- package/dist/format/lib/locations-grid.d.ts +1 -0
- package/dist/format/lib/locations-grid.js +1 -1
- package/dist/format/lib/map-styles.d.ts +0 -1
- package/dist/format/lib/map-styles.js +1 -1
- package/dist/format/lib/popup/look.js +1 -1
- package/dist/format/lib/popup/text-kinds.d.ts +0 -1
- package/dist/format/lib/popup/text-kinds.js +1 -1
- package/dist/format/lib/sections/hero-overlay.d.ts +1 -1
- package/dist/format/lib/sections/hero-overlay.js +1 -1
- package/dist/format/lib/sections/section-head-placement.d.ts +0 -4
- package/dist/format/lib/sections/section-head-placement.js +1 -1
- package/dist/format/lib/sections/section-presets.js +1 -1
- package/dist/format/lib/sections/strip-shape.d.ts +16 -0
- package/dist/format/lib/sections/strip-shape.js +1 -0
- package/dist/format/lib/sections/timeline-year-shape.d.ts +4 -0
- package/dist/format/lib/sections/timeline-year-shape.js +1 -0
- package/dist/format/lib/source-rules/box-fields-from-easel.d.ts +4 -0
- package/dist/format/lib/source-rules/box-fields-from-easel.js +8 -0
- package/dist/format/lib/source-rules/editor-chrome-note.js +1 -1
- package/dist/format/lib/source-rules/editor-words.js +2 -2
- package/dist/format/lib/source-rules/no-glyph-rows.d.ts +0 -4
- package/dist/format/lib/source-rules/no-glyph-rows.js +4 -4
- package/dist/format/lib/source-rules/one-loop-module.d.ts +7 -0
- package/dist/format/lib/source-rules/one-loop-module.js +6 -0
- package/dist/format/lib/source-rules/one-node-list.d.ts +2 -0
- package/dist/format/lib/source-rules/one-node-list.js +1 -0
- package/dist/format/lib/source-rules/one-page-theme-reader.d.ts +6 -0
- package/dist/format/lib/source-rules/one-page-theme-reader.js +6 -0
- package/dist/format/lib/source-rules/part-style-naming.js +1 -1
- package/dist/format/lib/source-rules/shell-width-token-not-colour.d.ts +5 -0
- package/dist/format/lib/source-rules/shell-width-token-not-colour.js +2 -0
- package/dist/format/lib/source-rules/site-square-by-default.js +3 -3
- package/dist/format/lib/source-rules/support/panel-select-cascade.js +2 -2
- package/dist/format/lib/theme.d.ts +3 -0
- package/dist/format/lib/theme.js +4 -4
- package/dist/render/components/Banner.js +1 -1
- package/dist/render/components/ButtonBlock.d.ts +1 -0
- package/dist/render/components/ButtonBlock.js +1 -1
- package/dist/render/components/CardRowContext.d.ts +4 -4
- package/dist/render/components/CardRowContext.js +1 -1
- package/dist/render/components/Cards.d.ts +1 -0
- package/dist/render/components/Cards.js +1 -1
- package/dist/render/components/ContactLocations.js +2 -14
- package/dist/render/components/FeaturedCover.js +1 -1
- package/dist/render/components/Flex.d.ts +19 -1
- package/dist/render/components/Flex.js +1 -1
- package/dist/render/components/Grid.js +1 -1
- package/dist/render/components/Heading.d.ts +1 -0
- package/dist/render/components/Heading.js +1 -1
- package/dist/render/components/HeroSection.js +1 -1
- package/dist/render/components/HeroSingle.js +1 -1
- package/dist/render/components/HeroSlide.js +1 -1
- package/dist/render/components/HeroVideoPlay.js +1 -1
- package/dist/render/components/ImageBlock.d.ts +1 -2
- package/dist/render/components/ImageBlock.js +1 -1
- package/dist/render/components/InBoxContext.d.ts +2 -0
- package/dist/render/components/InBoxContext.js +1 -0
- package/dist/render/components/KeyFeatures.js +1 -1
- package/dist/render/components/LocationMap.d.ts +23 -0
- package/dist/render/components/LocationMap.js +1 -0
- package/dist/render/components/Logo.js +1 -1
- package/dist/render/components/LongRead.js +1 -1
- package/dist/render/components/Manifesto.d.ts +2 -1
- package/dist/render/components/Manifesto.js +1 -1
- package/dist/render/components/PreviewHeaderContext.d.ts +1 -4
- package/dist/render/components/PreviewHeaderContext.js +1 -1
- package/dist/render/components/PreviewLocationPartContext.d.ts +1 -1
- package/dist/render/components/PreviewLocationPartContext.js +1 -1
- package/dist/render/components/ProcessSteps.js +1 -1
- package/dist/render/components/SectionAnimation.d.ts +16 -3
- package/dist/render/components/SectionAnimation.js +1 -1
- package/dist/render/components/SiteGutterFrame.d.ts +7 -1
- package/dist/render/components/SiteGutterFrame.js +1 -1
- package/dist/render/components/SiteMap.js +1 -1
- package/dist/render/components/SpecStrip.d.ts +2 -4
- package/dist/render/components/SpecStrip.js +1 -1
- package/dist/render/components/Split.d.ts +2 -1
- package/dist/render/components/Split.js +1 -1
- package/dist/render/components/Text.d.ts +2 -0
- package/dist/render/components/Text.js +1 -1
- package/dist/render/components/Ticker.d.ts +5 -4
- package/dist/render/components/Ticker.js +1 -1
- package/dist/render/components/TickerSection.d.ts +5 -4
- package/dist/render/components/TickerSection.js +1 -1
- package/dist/render/components/Timeline.js +1 -1
- package/dist/render/components/TimelineRail.d.ts +55 -0
- package/dist/render/components/TimelineRail.js +1 -0
- package/dist/render/components/TimelineTrack.js +1 -1
- package/dist/render/components/goldPhrases.js +1 -1
- package/dist/render/lib/animation/LoopTrack.d.ts +14 -0
- package/dist/render/lib/animation/LoopTrack.js +1 -0
- package/dist/render/lib/animation/entrance.d.ts +18 -0
- package/dist/render/lib/animation/entrance.js +1 -0
- package/dist/render/lib/document/blocks/general/ButtonBlock/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
- package/dist/render/lib/document/blocks/general/ImageBlock/render.js +1 -1
- package/dist/render/lib/document/blocks/general/LocationMap/render.d.ts +2 -0
- package/dist/render/lib/document/blocks/general/LocationMap/render.js +1 -0
- package/dist/render/lib/document/blocks/general/Manifesto/render.js +1 -1
- package/dist/render/lib/document/blocks/general/SectionHeader/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Split/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Text/render.js +1 -1
- package/dist/render/lib/document/blocks/general/Ticker/render.js +1 -1
- package/dist/render/lib/document/blocks/general/renders.d.ts +1 -0
- package/dist/render/lib/document/blocks/general/renders.js +1 -1
- package/dist/render/lib/document/blocks/general/section-head-looks.d.ts +9 -0
- package/dist/render/lib/document/blocks/general/section-head-looks.js +2 -0
- package/dist/render/lib/document/blocks/general/section-to-box-row-parts.d.ts +9 -1
- package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-cards.d.ts +2 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-cards.js +1 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-head.d.ts +4 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-head.js +1 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-locations.d.ts +2 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-locations.js +1 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-logos.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-stats.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-strip.d.ts +2 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-strip.js +1 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-timeline.d.ts +2 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-timeline.js +3 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
- package/dist/render/lib/document/page-frame.d.ts +3 -21
- package/dist/render/lib/document/page-frame.js +1 -1
- package/dist/render/lib/document/part-styles.d.ts +14 -13
- package/dist/render/lib/document/part-styles.js +2 -2
- package/dist/render/lib/document/passes/block-size.d.ts +3 -0
- package/dist/render/lib/document/passes/block-size.js +1 -0
- package/dist/render/lib/document/passes/cell-width.d.ts +1 -0
- package/dist/render/lib/document/passes/cell-width.js +1 -1
- package/dist/render/lib/document/passes/clickable-parts.js +1 -1
- package/dist/render/lib/document/passes/corners.js +1 -1
- package/dist/render/lib/document/passes/index.js +1 -1
- package/dist/render/lib/document/passes/section-anchor.d.ts +1 -0
- package/dist/render/lib/document/passes/section-anchor.js +1 -1
- package/dist/render/lib/document/passes/section-animation.d.ts +1 -0
- package/dist/render/lib/document/passes/section-animation.js +1 -1
- package/dist/render/lib/document/passes/section-padding.js +1 -1
- package/dist/render/lib/document/passes/section-width.d.ts +1 -4
- package/dist/render/lib/document/passes/section-width.js +1 -1
- package/dist/render/lib/sections/section-to-box.d.ts +28 -7
- package/dist/render/lib/sections/section-to-box.js +1 -1
- package/dist/render/lib/text-styles/site-text-styles.js +2 -2
- package/package.json +5 -5
- package/dist/editor/components/PartResetDot.d.ts +0 -5
- package/dist/editor/components/PartResetDot.js +0 -1
- package/dist/editor/lib/document/section-width-fields.d.ts +0 -2
- package/dist/editor/lib/document/section-width-fields.js +0 -1
- package/dist/format/lib/content/image-width.d.ts +0 -9
- package/dist/format/lib/content/image-width.js +0 -1
- package/dist/format/lib/content/section-animation.d.ts +0 -13
- package/dist/format/lib/content/section-animation.js +0 -1
- package/dist/format/lib/host-document-bridge.js +0 -1
- package/dist/format/lib/sections/ticker-scroll.d.ts +0 -11
- package/dist/format/lib/sections/ticker-scroll.js +0 -1
|
@@ -4,17 +4,18 @@ import { type LoadingShows } from "../../../format/lib/hero-video.js";
|
|
|
4
4
|
import { readHidable, hidableText, type HidableValue } from "efficient-easel/draw";
|
|
5
5
|
import { FOLD_FIELD_MARKER, LINK_FIELD_MARKER, MEDIA_FIELD_MARKER, SCAFFOLD_FIELD_MARKER, TEXT_FIELD_MARKER, foldMetaOf, textFieldIdentifier, type EdgeCell, type FoldFieldMeta, type TextFieldMeta, type TextListRendering } from "efficient-easel/draw";
|
|
6
6
|
import type { ShowWhenRule } from "../../../render/lib/document/show-when.js";
|
|
7
|
-
import { type
|
|
8
|
-
import { type
|
|
9
|
-
import { type AlignmentPoint, FOCAL_DEFAULT, type PositionValue } from "efficient-shell/ui";
|
|
7
|
+
import { type SettingsBorderValue } from "efficient-easel/panel";
|
|
8
|
+
import { type AlignmentPoint, FOCAL_DEFAULT } from "efficient-shell/ui";
|
|
10
9
|
import type { GeocodeState } from "../../../format/lib/content/contact.js";
|
|
10
|
+
import { type TextFit } from "../../../format/lib/content/block-size.js";
|
|
11
11
|
import { type DirectionContainer } from "../../../format/lib/content/container-direction.js";
|
|
12
|
+
import { BOX_SHARE_POINTS } from "../../../format/lib/content/box-layout.js";
|
|
12
13
|
import { GAP_FIELD_CONTAINER, type GapContainer } from "../../../format/lib/content/container-gap.js";
|
|
13
14
|
import { type SectionBackground } from "../../../format/lib/content/section-background.js";
|
|
14
15
|
import { type TypeRole, type TypeSizeValue } from "../../../format/lib/content/section-type-size.js";
|
|
15
16
|
import { type WidthMode } from "../../../format/lib/content/section-width.js";
|
|
16
17
|
import type { Bucket, DesignGroup } from "./field-groups.js";
|
|
17
|
-
|
|
18
|
+
import { type SelectField, type SelectOption } from "efficient-easel/screen/lib/document/box-fields";
|
|
18
19
|
type SelectData = {
|
|
19
20
|
options: readonly SelectOption[];
|
|
20
21
|
fallback: string;
|
|
@@ -43,21 +44,26 @@ export type CustomField<V> = {
|
|
|
43
44
|
export declare function Label({ children }: {
|
|
44
45
|
children: ReactNode;
|
|
45
46
|
}): import("react").JSX.Element;
|
|
46
|
-
export declare function noGlyph(reason: string): ReactElement;
|
|
47
|
-
export declare function isNoGlyph(icon: ReactElement): boolean;
|
|
48
|
-
export declare function iconOf(icon: ReactElement): ReactElement | undefined;
|
|
49
47
|
export declare function backTo(value: string, from: string): string;
|
|
50
48
|
type MarkProps = {
|
|
51
49
|
changed?: boolean;
|
|
52
50
|
onReset?: () => void;
|
|
53
51
|
};
|
|
54
|
-
export declare function usePageWidthDetail(): string;
|
|
55
52
|
export declare function useSiteGapDetail(): string;
|
|
56
53
|
export declare function SiteGapDefaultReset({ inherited, onReset, label, }: {
|
|
57
54
|
inherited: boolean;
|
|
58
55
|
onReset: () => void;
|
|
59
56
|
label: string;
|
|
60
57
|
}): import("react").JSX.Element;
|
|
58
|
+
export declare function containerGapField(container: GapContainer): import("efficient-easel/screen/lib/document/box-fields").BoxField<string | number>;
|
|
59
|
+
export declare function containerGapPhoneField(container: GapContainer): CustomField<string | number>;
|
|
60
|
+
export declare function containerDirectionField(container: DirectionContainer): import("efficient-easel/screen/lib/document/box-fields").BoxField<string>;
|
|
61
|
+
export declare function heroGroupPlacementPoints(data: unknown, id: string | undefined): {
|
|
62
|
+
value: string;
|
|
63
|
+
label: string;
|
|
64
|
+
disabled?: boolean;
|
|
65
|
+
title?: string;
|
|
66
|
+
}[];
|
|
61
67
|
export declare function WidthDefaultReset({ inherited, onReset, label, }: {
|
|
62
68
|
inherited: boolean;
|
|
63
69
|
onReset: () => void;
|
|
@@ -104,12 +110,10 @@ export declare const BUCKET_ICONS: Record<Bucket, (props: {
|
|
|
104
110
|
size?: number;
|
|
105
111
|
}) => ReactElement>;
|
|
106
112
|
export declare function entriesHiddenForTab(buckets: readonly Bucket[], active: string): boolean | null;
|
|
107
|
-
export declare function group(label: string): CustomField<undefined>;
|
|
108
113
|
export declare function panelNote(text: string): CustomField<undefined>;
|
|
109
114
|
export declare function PanelNoteLine({ text }: {
|
|
110
115
|
text: string;
|
|
111
116
|
}): import("react").JSX.Element;
|
|
112
|
-
export declare function section(label: string): CustomField<undefined>;
|
|
113
117
|
export declare function isBucketHeader(field: unknown): boolean;
|
|
114
118
|
export declare function bucketHeader(bucket: Bucket, tabs: readonly Bucket[] | null): CustomField<undefined>;
|
|
115
119
|
export declare function designGroupHeader(group: DesignGroup): CustomField<undefined>;
|
|
@@ -144,12 +148,12 @@ export declare function Slider({ min, max, step, value, onChange, suffix, readou
|
|
|
144
148
|
ariaLabel?: string;
|
|
145
149
|
disabled?: boolean;
|
|
146
150
|
}): import("react").JSX.Element;
|
|
147
|
-
export declare function slider(label: string, icon: ReactElement, min: number, max: number, step: number, fallback: number, suffix?: string, action?: (value: unknown, onChange: (v: unknown) => void) => ReactNode): CustomField<number>;
|
|
148
151
|
export declare function pxField(label: string, opts: {
|
|
149
152
|
min: number;
|
|
150
153
|
max: number;
|
|
151
154
|
step?: number;
|
|
152
155
|
unsetLabel?: string;
|
|
156
|
+
unit?: string;
|
|
153
157
|
icon?: ReactElement;
|
|
154
158
|
hint?: ReactNode;
|
|
155
159
|
unsetMark?: ReactElement<MarkProps>;
|
|
@@ -162,38 +166,41 @@ export declare function pxField(label: string, opts: {
|
|
|
162
166
|
onChange: (v: number) => void;
|
|
163
167
|
}) => ReactElement;
|
|
164
168
|
}): CustomField<number | null>;
|
|
165
|
-
export declare function gapField(container: GapContainer): CustomField<number | string>;
|
|
166
169
|
interface CornersRowTier {
|
|
167
170
|
sidesKey: string;
|
|
168
171
|
step?: number;
|
|
169
172
|
useFollowed: () => number;
|
|
170
|
-
useClosedReason?: () => string | null;
|
|
171
173
|
mark: ReactElement<MarkProps>;
|
|
172
174
|
hint: ReactNode;
|
|
173
175
|
}
|
|
174
176
|
export declare function cornersRowField(tier: CornersRowTier): CustomField<number | null>;
|
|
175
177
|
export declare function useSelectedSibling(key: string): [unknown, (next: unknown) => void];
|
|
178
|
+
export declare function keptBy<T = unknown>(reachedBy: string): CustomField<T> & {
|
|
179
|
+
reachedBy: string;
|
|
180
|
+
};
|
|
181
|
+
export declare function keptBy<T = unknown>(): CustomField<T>;
|
|
176
182
|
export declare function useSelectedPatch(): (patch: Record<string, unknown>) => void;
|
|
177
183
|
export declare function cornerSidesField(): CustomField<string[] | null>;
|
|
178
184
|
export declare function sectionCornersField(): CustomField<number | null>;
|
|
179
|
-
export declare const SECTION_BLEEDS_HINT = "This section runs edge to edge, so its corners sit off the page. Set Width to Content width to use them.";
|
|
180
185
|
export declare function sectionShapeFields(): Record<string, unknown>;
|
|
181
186
|
export declare function sectionBorderField(tier: "desktop" | "mobile"): CustomField<SettingsBorderValue | undefined>;
|
|
182
187
|
export declare function buttonWordsEntryField(partKey: string): CustomField<undefined>;
|
|
183
188
|
export declare function buttonBorderField(): CustomField<SettingsBorderValue | undefined>;
|
|
184
|
-
export declare function sectionAnimationFields(): Record<string, unknown>;
|
|
185
189
|
export declare function cardCornersField(): CustomField<number | null>;
|
|
186
190
|
export declare function templateField<V>(inner: CustomField<V>): CustomField<V>;
|
|
187
191
|
export declare function cardShapeFields(): Record<string, unknown>;
|
|
188
|
-
export declare function
|
|
189
|
-
export declare function boxAlignField(): SelectField;
|
|
190
|
-
export declare function boxWrapField(): SelectField;
|
|
191
|
-
export declare function boxShareField(): CustomField<string>;
|
|
192
|
+
export declare function boxShareField(points?: readonly (typeof BOX_SHARE_POINTS)[number][], fallback?: string): CustomField<string>;
|
|
192
193
|
export declare function boxBlockSpacingField(): SelectField;
|
|
193
|
-
export declare function
|
|
194
|
-
export declare function
|
|
194
|
+
export declare function boxSharePhoneField(): CustomField<string>;
|
|
195
|
+
export declare function boxPhoneRowField(): import("efficient-easel/screen/lib/document/box-fields").BoxField<number>;
|
|
195
196
|
export declare function sizeField(label: string, min: number, max: number, step: number, fallback: number, role: TypeRole): CustomField<TypeSizeValue>;
|
|
196
197
|
export declare function cellWidthFields(): Record<string, unknown>;
|
|
198
|
+
export declare function blockSizeFields(opts?: {
|
|
199
|
+
textFit?: TextFit;
|
|
200
|
+
}): {
|
|
201
|
+
size: Record<string, unknown>;
|
|
202
|
+
text: Record<string, unknown>;
|
|
203
|
+
};
|
|
197
204
|
export declare function useSelectedProps(): Record<string, unknown>;
|
|
198
205
|
export declare function phoneOverrideField(opts: {
|
|
199
206
|
label: string;
|
|
@@ -203,6 +210,7 @@ export declare function phoneOverrideField(opts: {
|
|
|
203
210
|
max: number;
|
|
204
211
|
step: number;
|
|
205
212
|
fallback: number;
|
|
213
|
+
unit?: string;
|
|
206
214
|
}): CustomField<number | null>;
|
|
207
215
|
export declare function phoneChoiceField<V extends string>(opts: {
|
|
208
216
|
label: string;
|
|
@@ -260,40 +268,15 @@ export declare function spacingFields(opts?: {
|
|
|
260
268
|
step: number;
|
|
261
269
|
};
|
|
262
270
|
}): Record<string, CustomField<undefined> | CustomField<number>>;
|
|
263
|
-
type PadSide = "top" | "right" | "bottom" | "left";
|
|
264
|
-
export declare const SIDE_PAD_KEYS: Record<PadSide, string>;
|
|
265
|
-
export declare function sidesPaddingPatch(keys: Record<PadSide, string>, before: SettingsSidesValue, next: SettingsSidesValue): Record<string, number | undefined>;
|
|
266
|
-
export type SidesPaddingOptions = {
|
|
267
|
-
keys?: Partial<Record<PadSide, string>>;
|
|
268
|
-
phone?: boolean;
|
|
269
|
-
fallback?: Partial<Record<PadSide, number>>;
|
|
270
|
-
group?: boolean;
|
|
271
|
-
min?: number;
|
|
272
|
-
max?: number;
|
|
273
|
-
step?: number;
|
|
274
|
-
};
|
|
275
|
-
export declare function sidesPaddingFields(opts?: SidesPaddingOptions): Record<string, CustomField<undefined> | CustomField<number>>;
|
|
276
271
|
export declare function swapPadding(fields: Record<string, unknown>, padding: Record<string, unknown>): Record<string, unknown>;
|
|
277
|
-
|
|
278
|
-
x: string;
|
|
279
|
-
y: string;
|
|
280
|
-
};
|
|
281
|
-
export declare function positionPatch(keys: PositionKeys, before: PositionValue, next: PositionValue): Record<string, number | undefined>;
|
|
282
|
-
export type PositionOptions = {
|
|
283
|
-
keys: PositionKeys;
|
|
284
|
-
min: number;
|
|
285
|
-
max: number;
|
|
286
|
-
step?: number;
|
|
287
|
-
label?: string | null;
|
|
288
|
-
};
|
|
289
|
-
export declare function positionFields(o: PositionOptions): Record<string, CustomField<number>>;
|
|
272
|
+
export declare const WIDTH_LABEL = "Width";
|
|
290
273
|
export declare function widthField(defaultMode: WidthMode, modes?: readonly WidthMode[], inheritable?: boolean): Record<string, CustomField<undefined> | CustomField<string> | CustomField<number>>;
|
|
291
274
|
export declare function heightFields(): Record<string, CustomField<undefined> | CustomField<string> | CustomField<number>>;
|
|
292
275
|
export declare function stickFields(): Record<string, CustomField<undefined> | CustomField<boolean> | CustomField<number>>;
|
|
293
276
|
export declare function anchorFields(): Record<string, CustomField<undefined> | CustomField<HidableValue>>;
|
|
294
277
|
export declare function dateTime(label: string, icon?: ReactNode, hint?: string): CustomField<string>;
|
|
295
278
|
export declare function date(label: string, icon?: ReactNode, hint?: string): CustomField<string>;
|
|
296
|
-
export declare function toggle(label: string, fallback: boolean, icon?: ReactNode): CustomField<boolean>;
|
|
279
|
+
export declare function toggle(label: string, fallback: boolean, icon?: ReactNode, hint?: string): CustomField<boolean>;
|
|
297
280
|
export declare function pageBackgroundField(): CustomField<string>;
|
|
298
281
|
export declare function checkbox(label: string, fallback: boolean): CustomField<boolean>;
|
|
299
282
|
export type FollowsSiteButton = {
|
|
@@ -307,6 +290,8 @@ export type ColourOpacity = {
|
|
|
307
290
|
unset: (from: unknown) => number;
|
|
308
291
|
};
|
|
309
292
|
export declare function colorInput(label: string, fallback: string | FollowsSiteButton, icon?: ReactElement, opacity?: ColourOpacity): CustomField<string>;
|
|
293
|
+
export declare function boxFillField(): CustomField<string>;
|
|
294
|
+
export declare function boxThemeIndexOf(data: unknown, id: string, own: unknown): number | null;
|
|
310
295
|
export declare const FOCAL_POINTS: {
|
|
311
296
|
value: string;
|
|
312
297
|
label: string;
|
|
@@ -319,22 +304,6 @@ export declare function FocalPicker({ label, value, onChange, points, }: {
|
|
|
319
304
|
points?: readonly AlignmentPoint[];
|
|
320
305
|
}): import("react").JSX.Element;
|
|
321
306
|
export declare function focusKeptField(): CustomField<string>;
|
|
322
|
-
export interface PlacementFieldOptions {
|
|
323
|
-
stacking: boolean;
|
|
324
|
-
fallback?: HeroGroupPlacement;
|
|
325
|
-
}
|
|
326
|
-
export declare function placementField(label: string, { stacking, fallback }: PlacementFieldOptions): CustomField<string>;
|
|
327
|
-
export declare function PlacementGridView({ label, value, onChange, points, }: {
|
|
328
|
-
label: string;
|
|
329
|
-
value: string;
|
|
330
|
-
onChange: (next: string) => void;
|
|
331
|
-
points: readonly {
|
|
332
|
-
value: string;
|
|
333
|
-
label: string;
|
|
334
|
-
disabled?: boolean;
|
|
335
|
-
title?: string;
|
|
336
|
-
}[];
|
|
337
|
-
}): import("react").JSX.Element;
|
|
338
307
|
export type { EdgeCell };
|
|
339
308
|
export declare const EDGE_ARROWS: Record<EdgeCell, ReactNode>;
|
|
340
309
|
export declare function edgePad(label: string, options: readonly {
|
|
@@ -342,12 +311,6 @@ export declare function edgePad(label: string, options: readonly {
|
|
|
342
311
|
value: string;
|
|
343
312
|
cell: EdgeCell;
|
|
344
313
|
}[], fallback: string, hint: string, glyph: ReactNode, icons?: Partial<Record<EdgeCell, ReactNode>>): CustomField<string>;
|
|
345
|
-
export interface SelectOption {
|
|
346
|
-
value: string;
|
|
347
|
-
label: string;
|
|
348
|
-
}
|
|
349
|
-
export type SelectField = CustomField<string> & SelectData;
|
|
350
|
-
export declare function select(label: string, icon: ReactElement, options: readonly SelectOption[], fallback: string, note?: string): SelectField;
|
|
351
314
|
export type MultiSelectFieldType = CustomField<string[]> & {
|
|
352
315
|
options: readonly SelectOption[];
|
|
353
316
|
};
|
|
@@ -357,32 +320,10 @@ export declare function sourceField<V, E extends object = Record<never, never>>(
|
|
|
357
320
|
value: V;
|
|
358
321
|
onChange: (v: V) => void;
|
|
359
322
|
} & E) => ReactElement, extra?: E): CustomField<V>;
|
|
360
|
-
export declare function Segmented<V = string>({ options, value, onChange, ariaLabel, disabled, }: {
|
|
361
|
-
options: readonly {
|
|
362
|
-
label: string;
|
|
363
|
-
value: V;
|
|
364
|
-
title?: string;
|
|
365
|
-
picture?: ReactElement;
|
|
366
|
-
}[];
|
|
367
|
-
value: V;
|
|
368
|
-
onChange: (next: V) => void;
|
|
369
|
-
ariaLabel: string;
|
|
370
|
-
disabled?: boolean;
|
|
371
|
-
}): import("react").JSX.Element;
|
|
372
323
|
export declare const MEDIA_TYPE_OPTIONS: {
|
|
373
324
|
label: string;
|
|
374
325
|
value: "image" | "video";
|
|
375
326
|
}[];
|
|
376
|
-
export declare function segmented(label: string, icon: ReactElement, options: (string | {
|
|
377
|
-
label: string;
|
|
378
|
-
value: string;
|
|
379
|
-
picture?: ReactElement;
|
|
380
|
-
})[], fallback: string): CustomField<string>;
|
|
381
|
-
export declare function segmented<V>(label: string, icon: ReactElement, options: {
|
|
382
|
-
label: string;
|
|
383
|
-
value: V;
|
|
384
|
-
picture?: ReactElement;
|
|
385
|
-
}[], fallback: V): CustomField<V>;
|
|
386
327
|
export declare function loadingShowsField(label: string, icon: ReactElement, pictures: Readonly<Record<LoadingShows, ReactElement>>): CustomField<LoadingShows>;
|
|
387
328
|
export declare function upload(label: string, accept: string, placeholder?: string, opts?: {
|
|
388
329
|
focus?: string;
|
|
@@ -390,6 +331,7 @@ export declare function upload(label: string, accept: string, placeholder?: stri
|
|
|
390
331
|
frame?: string;
|
|
391
332
|
}): CustomField<MediaValue>;
|
|
392
333
|
export declare const CUSTOM_FIELD_MEDIA: Record<string, string[]>;
|
|
334
|
+
export declare function coordsResultTip(v: GeocodeState): string;
|
|
393
335
|
export declare function CoordsField({ value, onChange, label, }: {
|
|
394
336
|
value: GeocodeState | undefined;
|
|
395
337
|
onChange: (v: GeocodeState) => void;
|
|
@@ -437,8 +379,6 @@ export interface CardShowDefaults {
|
|
|
437
379
|
showCardPage: boolean;
|
|
438
380
|
}
|
|
439
381
|
export declare function cardShowFields(opts?: {
|
|
440
|
-
bottomDefault: boolean;
|
|
441
|
-
} | {
|
|
442
382
|
defaults: CardShowDefaults;
|
|
443
383
|
}): Record<string, CustomField<unknown>>;
|
|
444
384
|
export declare function displayFields(parts: readonly {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as i,jsxs as O,Fragment as I}from"react/jsx-runtime";import{cloneElement as be,useId as It,useRef as ae,useState as j}from"react";import{useEasel as X}from"efficient-easel/easel";import{toDateKey as Et,fromDateKey as Tt}from"efficient-shell/format";import{say as a,editorEaselWords as y}from"../../../format/lib/editor-words.js";import{mediaValueSrc as ye}from"../../../format/lib/media-value.js";import{LOADING_SHOWS_LABELS as xe,loadingShowsOf as wt}from"../../../format/lib/hero-video.js";import{readHidable as Se,hidableText as Ce}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as Q,LINK_FIELD_MARKER as _e,MEDIA_FIELD_MARKER as Ie,SCAFFOLD_FIELD_MARKER as Ee,TEXT_FIELD_MARKER as E,foldMetaOf as ee,textFieldIdentifier as Ot}from"efficient-easel/draw";import Rt from"../../components/ApplyCornersToSiblings.js";import Pt from"../../components/TemplateFieldRow.js";import{CARD_IMAGE_RADIUS_STEP as vt,CORNER_RADIUS_MAX as Te,CORNER_RADIUS_MIN as G}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as kt,IMAGE_CORNERS_LABEL as Lt}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as Nt}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as Ft,GALLERY_LAYOUTS as $,GALLERY_LAYOUT_KEYS as we,galleryPictureCells as At}from"../../../format/lib/content/gallery-layout.js";import{anchorSiblingsOf as Dt,HERO_GROUP_PLACEMENTS as Bt,HERO_GROUP_PLACEMENT_DEFAULT as Ht,normalisePlacement as Gt,placementPoints as Oe}from"../../../format/lib/hero-group-placement.js";import Mt from"../../components/KeepHint.js";import Kt from"../../components/AnchorField.js";import{AdjustIcon as Wt,AlignLeftIcon as Ut,EyeIcon as jt,AlignSeparateIcon as Xt,AnimationIcon as Re,BackgroundIcon as $t,BorderAllIcon as zt,BlockSectionIcon as Vt,CartIcon as Yt,ColumnWidthsIcon as Pe,ColumnsIcon as ve,CornerIcon as qt,DirectionDownIcon as Jt,DirectionLeftIcon as Zt,DirectionRightIcon as Qt,DirectionUpIcon as en,DollarIcon as tn,FinishIcon as nn,GapIcon as ke,GridIcon as on,GroundIcon as rn,HashIcon as Le,HeightIcon as ln,ImageIcon as an,ListIcon as sn,LocationIcon as se,NudgeIcon as cn,PaddingAllIcon as dn,PaddingBottomIcon as Ne,PaddingLeftIcon as Fe,PaddingRightIcon as Ae,PaddingTopIcon as De,PageIcon as Be,PlacementIcon as un,ProductSizeIcon as pn,StickyIcon as fn,RotateIcon as mn,SquareIcon as hn,TypeIcon as gn,WidthIcon as bn,WrapIcon as yn}from"efficient-easel/icons";import{FieldGlyph as He}from"../../components/FieldGlyph.js";import{resolvePageBackground as xn}from"../../../format/lib/content/page-background.js";import{CORNER_SIDES as Ge,CORNER_SIDE_POINTS as Sn,hasOwnSectionCorners as Cn,normalizeCornerSides as Me}from"../../../format/lib/content/section-corners.js";import{SECTION_MOTION_NONE as _n,SECTION_MOTION_OPTIONS as In}from"../../../format/lib/content/section-animation.js";import{enclosingSectionProps as Ke}from"./enclosing-section.js";import{SettingsDefaultReset as x,SettingsDrill as En,SettingsField as h,SettingsGroup as Tn,SettingsGroupSub as wn,SettingsBorder as On,SettingsSegmented as Rn,SettingsSides as Pn,SettingsSidesEach as We,sidesStartEach as vn,SettingsSwitch as Ue,borderSides as kn,borderStartEach as Ln}from"efficient-easel/panel";import{FieldSelect as Nn,ListField as Fn}from"efficient-easel/fields";import{DisplayChips as An}from"efficient-shell/ui";import{desktopDisplayChanged as Dn,partShownOnDesktop as Bn,partShownOnPhone as Hn,phoneDisplayChanged as Gn,withDesktopPart as Mn,withPhonePart as Kn}from"../../../format/lib/content/part-display.js";import{AlignmentGrid as Wn,Checkbox as Un,CornersInput as jn,DatePicker as Xn,DateTimePicker as $n,FOCAL_DEFAULT as zn,PictureTiles as je,PositionInput as Vn,Slider as Yn,Tooltip as Xe}from"efficient-shell/ui";import{ColourRow as $e,InheritedColourRow as qn}from"./ColourControl.js";import ze from"./MarkupToolbar.js";import{deviceField as g}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as Jn,NoControlMark as te,noControlField as z}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as Zn}from"../../../format/lib/document/own-box.js";import{PHONE_CLEAR as Qn,resolvePhoneValue as ce}from"../../../format/lib/document/phone-override.js";import{phoneKey as M}from"efficient-easel/draw";import{SuppressibleText as eo}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as to,CARD_OUTLINE_OPTIONS as no,DEFAULT_CARD_INDEX_FORMAT as oo,DEFAULT_CARD_OUTLINE as ro}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as io,DEFAULT_COVER_INDEX as lo}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as ao}from"efficient-easel/draw";import so from"../../components/MediaUploadField.js";import{useSelectedHost as V}from"./selected-host.js";import co from"../../components/MultiSelectField.js";import uo from"../../components/SectionThemePicker.js";import po from"../../components/SearchSelectField.js";import fo from"../../components/StorefrontLinkField.js";import{UiIcon as Ve}from"efficient-easel/draw/client";import{SECTION_PADDING as T}from"../../../render/lib/content/section-padding.js";import{buttonLook as mo,buttonWordsSummary as ho}from"../../../render/lib/content/button-look.js";import{nonEmptyString as go}from"../../../format/lib/non-empty-string.js";import{usePreviewParts as bo}from"efficient-easel/draw/client";import{encodePartId as yo}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as xo,useEaselStrings as So}from"efficient-easel/strings";import{hasPhoneHeight as Co,resolveSectionMinHeight as _o}from"../../../format/lib/content/section-min-height.js";import{SECTION_STICK_DISTANCE as ne,SECTION_STICK_LABEL as de,hasPhoneStick as Io,resolveSectionStick as Eo}from"../../../format/lib/content/section-sticky.js";import{SECTION_MIN_HEIGHT as To,SECTION_MIN_HEIGHT_GROUP_LABEL as Y,SECTION_SCREEN_PCT as wo}from"../../../format/lib/content/section-min-height.js";import{CONTAINER_DIRECTION_LABEL as Oo,containerDirectionPoints as Ro,resolveContainerDirection as Ye}from"../../../format/lib/content/container-direction.js";import{BOX_ALIGN_POINTS as Po,BOX_BLOCK_SPACING_LABEL as vo,BOX_BLOCK_SPACING_POINTS as qe,BOX_JUSTIFY_POINTS as Je,BOX_PHONE_ROW_LABEL as ko,BOX_PHONE_ROW_MAX as Lo,BOX_PHONE_ROW_MIN as Ze,BOX_SHARE_LABEL as Qe,BOX_SHARE_POINTS as ue,BOX_WRAP_LABEL as No,BOX_WRAP_POINTS as et}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as k}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as Fo}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as Ao,normalizeTheme as Do,selectedThemeColors as Bo,siteButtonPaint as tt}from"../../../format/lib/theme.js";import{CONTAINER_GAP as pe,CONTAINER_GAP_BUILT_IN as Ho,GAP_FIELD_CONTAINER as Go,hasOwnContainerGap as Mo,resolveContainerGap as Ko}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as Wo,CARD_IMAGE_BG_OFF as Uo,CARD_IMAGE_BG_SWATCH_NAMES as jo,CARD_IMAGE_BG_SWATCHES as Xo,isCardImageBackgroundInheriting as $o,cardImageBackgroundChoice as zo,THEME_CARD_IMAGE_BG as Vo}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as Yo,SECTION_BG_SWATCHES as qo,SECTION_BG_SWATCH_NAMES as Jo,THEME_SECTION_BG as Zo,isSectionBackgroundInheriting as Qo}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as er}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as tr,TYPE_SIZE_INHERIT as nr,isTypeSizeInheriting as or}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as rr,WIDTH_CHOICE_LABEL as ir,WIDTH_INHERIT as lr,resolveWidth as ar,sectionRunsFullWidth as nt}from"../../../format/lib/content/section-width.js";import{useFoldHeadingLevel as sr}from"./panel-heading-scope.js";import{withStyleKind as cr}from"efficient-easel/style-clipboard";import{useEaselSession as dr}from"efficient-easel/screen/lib/session-context";import{backendOf as ur}from"../website-session.js";import{describedAs as w}from"../../../format/lib/host-document-bridge.js";function K(e){for(const[t,n]of Object.entries(e))n&&typeof n=="object"&&!ee(n)&&cr(n,`section:${t}`);return e}function Dl({children:e}){return i("div",{className:"sf-field-label",children:typeof e=="string"?a(e):e})}function ot(){return null}function pr(e){if(!e.trim())throw new Error("noGlyph() needs a reason naming the ruling that decided it.");return i(ot,{},e)}function fr(e){return e.type===ot}function R(e){return fr(e)?void 0:e}function F(e,t){return a("{value} from {from}",{value:e,from:t})}function mr(){const{appState:e}=X(r=>r),t=e.data.root?.props??{},{mode:n,pageWidth:o}=ar(t,"full");return n==="page"?F(`${o}px`,a("the page")):n==="contained"?F(a("Contained"),a("the page")):F(a("Full"),a("the page"))}function hr(){const{blockGap:e}=k();return e===null?a("this container's own spacing"):F(`${e}px`,a("Styles"))}function gr({inherited:e,onReset:t,label:n}){return i(x,{words:y()?.panel,label:a(n),changed:!e,detail:hr(),onReset:t})}function br({inherited:e,onReset:t,label:n}){return i(x,{words:y()?.panel,label:a(n),changed:!e,detail:mr(),onReset:t})}function A({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:l,hideable:s=!0,markup:c=!0}){const{text:d,hidden:u}=Se(e),f=ae(null),p=ae(null),m=v=>t(s?{text:v,hidden:u}:v),b=()=>t({text:d,hidden:!u}),C=s&&u,P=It(),_=r?_r(r)?i("span",{className:"sf-hint-keep sf-hint-while-typing",children:a(r)}):i(Mt,{children:a(r)}):void 0,Z=u?a("Show {label} on the slide",{label:a(n)}):a("Hide {label} on the slide",{label:a(n)});return i(h,{label:a(n),icon:i(gn,{}),htmlFor:P,className:C?"is-hidden":void 0,hint:_,action:s?i(Xe,{content:Z,children:i("button",{type:"button",className:"sf-field-eye","aria-pressed":u,"aria-label":Z,onClick:b,children:u?i(Ve,{name:"eye-off",size:14}):i(Ve,{name:"eye",size:14})})}):void 0,children:O("div",{className:"sf-copybox",children:[c&&i(ze,{target:l?p:f,value:d,onChange:m}),l?i("textarea",{id:P,ref:p,value:d,placeholder:o===void 0?void 0:a(o),onChange:v=>m(v.target.value)}):i("input",{id:P,ref:f,type:"text",value:d,placeholder:o===void 0?void 0:a(o),onChange:v=>m(v.target.value)})]})})}function Bl(e,t){return{...e,[Ee]:t}}function Hl(e){const t=e[E];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[E]:{...t,offPage:!0}}}function Gl(e){return!e||typeof e!="object"?!1:e[E]?.offPage===!0}const rt="sfPanelOnly";function Ml(e){if(!e[E])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[rt]:!0}}function Kl(e){return!!e&&typeof e=="object"&&e[rt]===!0}function Wl(e){const t=e[E];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[E]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as ms,SCALAR_TEXT_CONTROLS as hs}from"efficient-easel/draw";function Ul(e,t){if(!e[E])throw new Error("inOwnBox: the field holds no authored text");const{[Jn]:o,...r}=e;return{...r,[Zn]:!0,render:t}}const yr=new Set(ao),oe={type:"radio",options:[{value:!0},{value:!1}]},it={text:{type:"object",objectFields:{text:{type:"text"},hidden:oe}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:oe}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},D=(e,t)=>{const n=w({...t,[E]:e},{...it[e.control],label:e.label});if(!yr.has(e.control))return n;const o=t.render;return{...z(n,"authored-copy"),render:r=>i(eo,{name:r.name,children:o(r)})}},jl="Everything else on this block comes from the linked post. Unlink it to edit by hand.",xr={field:"source.slug",set:!0},Xl={not:xr},Sr="Select a word, then press the highlighter.",Cr=new Set([Sr]),_r=e=>Cr.has(e);function $l(e,t,n){return D({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(A,{value:o,onChange:r,label:e,placeholder:t,hint:n})})}function zl(e,t,n){return D({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(A,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0})})}function Vl(e,t,n){return D({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(A,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function Yl(e,t,n){return D({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(A,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1})})}function ql(e){return{type:"custom",[_e]:{label:e},...w({},{type:"text",label:e}),render:({value:t,onChange:n})=>i(fo,{value:Ce(t),onChange:n,label:e})}}function Jl(e,t,n){return D({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(A,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const Zl={Design:Wt,Animation:Re};function Ql(e,t){return e.includes("Design")?t!=="Design":null}function lt(e,t){return{type:"custom",[Q]:{label:e,level:t},marker:!0,fold:e,render:()=>i(I,{})}}function S(e){return lt(e,2)}function ea(e){return{type:"custom",render:()=>i(Ir,{text:e})}}function Ir({text:e}){return i("p",{className:"sf-note",children:a(e)})}function ta(e){return lt(e,1)}function na(e){return ee(e)!==null&&e?.tabs!==void 0}const at=new Map;function oa(e,t){const n=`${e}\0${t?t.join(""):""}`,o=at.get(n)??{type:"custom",tabs:t,[Q]:{label:e,level:1},bucket:e,marker:!0,render:()=>i(I,{})};return at.set(n,o),o}const st=new Map;function ra(e){const t=st.get(e)??{type:"custom",[Q]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>i(I,{})};return st.set(e,t),t}function Er(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function ia(e,t){return Er(e)===t?e:{...e,marker:!0,fold:t,render:()=>i(I,{})}}function la(e){const t=e;if(t.marker===!0&&t.fold===void 0)return e;const{fold:n,...o}=e;return{...o,marker:!0,render:()=>i(I,{})}}function aa({title:e,children:t}){const[n,o]=j(()=>!fe.has(e));return i(Tn,{title:e,open:n,onToggle:r=>{o(r),r?fe.delete(e):fe.add(e)},children:t})}const fe=new Set;function sa({label:e}){return i(wn,{title:a(e),level:sr(2)})}function ct({swatches:e,current:t,onPick:n,names:o}){const r=e.find(c=>c.toLowerCase()===t.toLowerCase()),l=r?o?.[r]:void 0,s=l?a(l):t;return O("div",{className:"sf-swatches",children:[e.map(c=>{const d=o?.[c]?a(o[c]):c;return i(Xe,{content:d,children:i("button",{type:"button","aria-pressed":t.toLowerCase()===c.toLowerCase(),className:`sf-swatch ${t.toLowerCase()===c.toLowerCase()?"is-active":""}`,style:{background:c},onClick:()=>n(c),"aria-label":d})},c)}),i("span",{className:"sf-swatch-hex",children:s})]})}function ca(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=Qo(n,t);return i(h,{label:a(e),icon:i($t,{}),changed:!r,action:i(x,{words:y()?.panel,label:a(e),changed:!r,detail:a("the theme's section background"),onReset:()=>o(Yo)}),children:ct({swatches:qo,current:r?Zo:n??t??"",onPick:o,names:Jo})})}}}function Tr(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,l=$o(r,t);return i(h,{label:a(e),icon:i(rn,{}),changed:!l,action:i(x,{words:y()?.panel,label:a(e),changed:!l,detail:a("the theme's image stage"),onReset:()=>o(Wo)}),children:ct({swatches:Xo,current:l?Vo:zo(r,t),onPick:o,names:jo})})}}}function da(e=n=>n,t){return K({_gSectionTheme:S(er),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(uo,{value:e(n),onChange:o,followLabel:t})}})}function W({min:e,max:t,step:n,value:o,onChange:r,suffix:l="",readout:s=!0,notch:c,ariaLabel:d,disabled:u=!1}){const f=c!==void 0&&Number.isFinite(c)&&c>=e&&c<=t;return i("div",{className:f?"sf-slider has-notch":"sf-slider",style:f?{"--sf-notch":(c-e)/(t-e)}:void 0,children:i(Yn,{min:e,max:t,step:n,value:o,suffix:l||void 0,showInput:s,label:d===void 0?void 0:a(d),disabled:u,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:p=>{p!==null&&p!==o&&r(p)}})})}function U(e,t,n,o,r,l,s="",c){return{type:"custom",...w({},{type:"number",label:e}),render:d=>i(h,{label:a(e),icon:R(t),action:c?c("storedValue"in d?d.storedValue:d.value,d.onChange):void 0,children:W({min:n,max:o,step:r,value:typeof d.value=="number"?d.value:l,suffix:s,ariaLabel:e,onChange:d.onChange})})}}function dt(e,t){const{min:n,max:o,step:r=1,unsetLabel:l,hint:s,restTrack:c,unsetMark:d,icon:u}=t;return{type:"custom",render:({value:f,onChange:p})=>{const m=typeof f=="number"?f:null,b=m===null;return i(h,{label:a(e),icon:u?R(u):void 0,value:b?d||l===void 0?void 0:a(l):`${m}px`,changed:!b,action:d?be(d,{changed:!b,onReset:()=>p(null)}):i(x,{words:y()?.panel,label:a(e),changed:!b,onReset:()=>p(null)}),hint:typeof s=="string"?a(s):s,children:c?c({min:n,max:o,step:r,px:m,label:e,onChange:p}):W({min:n,max:o,step:r,value:m??n,readout:!1,ariaLabel:e,onChange:p})})}}}function ua(e){const t=U("Gap",i(ke,{}),pe.min,pe.max,pe.step,Ho[e],"px",(n,o)=>i(gr,{inherited:!Mo(e,n),onReset:()=>o(void 0),label:"Gap"}));return{type:"custom",[Go]:e,render:n=>t.render({...n,value:Ko(e,n.value,n.field?.siteGap),storedValue:n.value,onChange:o=>n.onChange(o)})}}const re="Corners";function me(e){return{type:"custom",render:({value:t,onChange:n})=>{const o=typeof t=="number"&&Number.isFinite(t)?t:null,r=o!==null;return i(h,{label:a(re),icon:i(qt,{}),changed:r,action:be(e.mark,{changed:r,onReset:()=>n(null)}),hint:e.hint,children:i(wr,{tier:e,px:o,onRadius:n})})}}}function L(e){const t=V();return[t?.values?.[e],n=>t?.onChange(e,n)]}function pa(){const e=V();return t=>e?.onChangeMany(t)}function wr({tier:e,px:t,onRadius:n}){const o=e.useFollowed(),r=e.useClosedReason?e.useClosedReason():null,[l,s]=L(e.sidesKey),c=Me(l)??[...Ge];return i(jn,{label:a(re),value:c,corners:Sn,onChange:d=>{const u=Me(d)??[];s(u.length===Ge.length?null:u)},radius:t,onRadiusChange:n,radiusMin:G,radiusMax:Te,radiusStep:e.step??1,radiusPlaceholder:String(o),disabled:r!==null,disabledReason:r??void 0})}function ut(){return z({type:"custom",render:()=>i(te,{})},"always")}function Or({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=k(),r=typeof o=="number"?`${o}px`:a("not set");return i(x,{words:y()?.panel,label:a(e),changed:t,detail:o==null?a("the built-in corners"):F(r,a("Styles")),onReset:n})}function Rr(){const{cornerRadiusPx:e}=k();return typeof e=="number"?e:G}function Pr(){return me({sidesKey:"sectionCornerSides",useFollowed:Rr,useClosedReason:()=>ft()?a(pt):null,mark:i(Or,{label:re}),hint:i(vr,{})})}const pt="This section runs edge to edge, so its corners sit off the page. Set Width to Content width to use them.";function ft(){return nt(B())}function vr(){return i(I,{children:ft()?pt:"Follows Styles ▸ Basics ▸ Corners until you set a number here."})}function fa(){return K({_gShape:S("Shape"),sectionCorners:Pr(),sectionCornerSides:ut(),sectionBorder:ht("desktop"),sectionBorderPhone:ht("mobile")})}const kr=()=>({width:a("Border width"),sides:{top:a("Border top"),right:a("Border right"),bottom:a("Border bottom"),left:a("Border left")},style:a("Border style"),styles:{solid:a("Solid"),dashed:a("Dashed"),dotted:a("Dotted")},color:a("Border color"),unit:"px"});function Lr(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function Nr(){let e;try{const t=Do(k().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||Ao.line}function mt({value:e,onChange:t,placeholder:n,presets:o,sides:r=!0,styles:l=!0,above:s={}}){const c=e&&typeof e=="object"?e:{},[d,u]=j(()=>r?Ln(c,s):!1),f=kr(),p=m=>Lr(r&&l?m:{width:m.width,color:m.color,...l?{style:m.style}:{}});return i(h,{label:a("Border"),icon:i(zt,{}),action:r?i(We,{each:d,label:a("Each side"),onChange:u}):void 0,children:i(On,{label:a("Border"),value:c,each:d,onChange:m=>t(p(m)),placeholder:n,presets:o,words:f,styles:l,max:Fo})})}function Fr({value:e,onChange:t,tier:n}){const[o]=L("sectionBorder"),r=Nr(),l=n==="mobile"?o&&typeof o=="object"?o:{}:{};return i(mt,{value:e,onChange:t,placeholder:{sides:kn(l),style:l.style??"solid",color:l.color||r},presets:[r],above:l})}function ht(e){return g(e,{type:"custom",render:({value:t,onChange:n})=>i(Fr,{value:t,onChange:n,tier:e})})}function ma(e){return{type:"custom",render:()=>i(Ar,{partKey:e})}}function Ar({partKey:e}){const[t]=L("id"),[n]=L("_partStyles"),{textStyles:o}=k(),r=So();let l=null;try{l=bo().select}catch{l=null}const s=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return i(En,{name:a("Text"),preview:ho(s,c,{noStyle:a("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??xo.copy.panel).cases}),onOpen:()=>{l&&typeof t=="string"&&l(yo(t,e))}})}function ha(){return{type:"custom",render:({value:e,onChange:t})=>i(Dr,{value:e,onChange:t})}}function Dr({value:e,onChange:t}){const[n]=L("variant"),[o]=L("buttonColor"),{theme:r}=k(),s=mo({variant:n,buttonColor:o,buttonBorder:e&&typeof e=="object"?e:{}}).border.width,c=go(o)??(n==="ghost"?Bo(r).text:tt(r).fill);return i(mt,{value:e,onChange:t,placeholder:{sides:{top:s,right:s,bottom:s,left:s},style:"solid",color:c},presets:[c],sides:!1,styles:!1})}function ga(){return{_gMotion:S("Motion"),sectionAnimation:ge("Entrance",i(Re,{}),[...In],_n)}}function he(){let e=null;try{const{appState:t,selectedItem:n}=X(r=>r),o=n?.props?.id?String(n.props.id):void 0;e=o?Ke(t?.data,o):null}catch{e=null}return e!==null&&nt(e)}function gt(e){const{cornerRadiusPx:t}=k(),n=he(),o=typeof t=="number"?t:e;let r=null;try{const{appState:s,selectedItem:c}=X(u=>u),d=c?.props?.id?String(c.props.id):void 0;r=d?Ke(s?.data,d):null}catch{r=null}if(n||!r)return o;const l=r.sectionCorners;return Cn(l)?l:o}function Br({label:e,changed:t=!1,onReset:n=()=>{}}){const o=he(),r=gt(G),l=o?"Site":"Section";return i(x,{words:y()?.panel,label:a(e),changed:t,detail:F(`${r}px`,o?a("Styles"):a("the section")),onReset:n})}function Hr(){return i(I,{children:he()?a("The section is full width, so this card follows Styles ▸ Basics ▸ Corners."):a("Follows the section's Corners until you set a number here.")})}function Gr(){return me({sidesKey:"cardCornerSides",useFollowed:()=>gt(G),mark:i(Br,{label:re}),hint:i(Hr,{})})}function Mr(){return{type:"custom",render:()=>i(Rt,{})}}function ba(e){return{...e,render:t=>i(Pt,{render:e.render,props:t})}}function ya(){return{_gShape:S("Shape"),cardCorners:Gr(),cardCornerSides:ut(),cardCornersApplyAll:Mr()}}function xa(){return N("Justify",i(Xt,{}),Je,Je[0].value)}function Sa(){return N("Item alignment",i(Ut,{}),Po,"stretch")}function Ca(){return N(No,i(yn,{}),et,et[0].value)}function _a(){return{type:"custom",render:({value:e,onChange:t})=>{const n=ue.find(o=>o.value===e)??ue[0];return i(h,{label:a(Qe),icon:i(Pe,{}),value:a(n.label),children:i(je,{className:"sf-gallery-layouts",label:a(Qe),value:n.value,onChange:t,options:ue.map(o=>({value:o.value,label:a(o.label),picture:i("span",{className:"sf-gallery-pic",children:Kr(o.weights).map((r,l)=>i("i",{style:{gridColumn:`span ${r}`}},l))})}))})})}}}function Kr(e){if(!e)return[3,4];const t=e.reduce((n,o)=>n+o,0);return e.map(n=>Math.round(n/t*12))}function Ia(){return N(vo,i(ke,{}),qe,qe[0].value)}function Ea(){return g("mobile",U(ko,i(ve,{}),Ze,Lo,1,Ze))}function Ta(e){const t=ge(Oo,pr("`Direction` names how a container's children run — a MODIFIER, not a thing. doc/naming.md N10.1 gives the idea a dash in its Glyph column; editor-shell's own `direction` meaning says the bare row is CORRECT and not an omission (SS seat, 2026-09-11)."),Ro(e),Ye(e,void 0));return{type:"custom",render:n=>t.render({...n,value:Ye(e,n.value),onChange:o=>n.onChange(o)})}}function wa(e,t,n,o,r,l){return{type:"custom",render:({value:s,onChange:c})=>i(h,{label:a(e),icon:i(He,{noun:l}),action:i(x,{words:y()?.panel,label:a(e),changed:!or(s),detail:a("the Text style in Styles"),onReset:()=>c(nr),defaultAction:{onPress:()=>c(tr),title:a("Keep this section's own built-in size"),icon:i(Vt,{})}}),children:W({min:t,max:n,step:o,value:typeof s=="number"?s:r,suffix:"px",ariaLabel:e,onChange:c})})}}function Oa(){return{_gCellWidth:S("Cell width"),gridSpan:N("Positions",i(Pe,{}),[{label:"Auto",value:""},...Array.from({length:Nt},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function B(){let e=null;try{e=X(t=>t).selectedItem}catch{e=null}return e?.props??{}}function Wr({min:e,max:t,step:n,px:o,label:r,onChange:l,desktopKey:s,fallback:c}){const d=B()[s],u=ce(void 0,d,c);return i(I,{children:W({min:e,max:t,step:n,value:ce(o,d,c),readout:!1,ariaLabel:r,notch:u,onChange:l})})}function Ur({label:e,desktopKey:t,fallback:n,changed:o=!1,onReset:r=()=>{}}){const l=B()[t],s=ce(void 0,l,n);return i(x,{words:y()?.panel,label:a(e),changed:o,detail:a("{value} on desktop",{value:`${s}px`}),onReset:r})}function jr(e){return dt(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unsetLabel:"Follows Desktop",unsetMark:i(Ur,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback}),restTrack:t=>i(Wr,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}function Ra(e){return{type:"custom",render:({value:t,onChange:n})=>i($r,{...e,value:t,onChange:n})}}function Xr({label:e,icon:t,options:n,value:o,resolved:r,restWord:l,onChange:s}){const c=n.some(d=>d.value===o);return i(h,{label:a(e),icon:R(t),action:i(x,{words:y()?.panel,label:a(e),changed:c,detail:a("{value} on desktop",{value:a(l)}),onReset:()=>s(void 0)}),children:J({options:n,value:c?o:r,onChange:d=>s(d),ariaLabel:e})})}function $r({label:e,icon:t,options:n,desktopKey:o,resolve:r,value:l,onChange:s}){const c=B()[o],d=r(void 0,c),u=n.find(f=>f.value===d)?.label??"";return i(Xr,{label:e,icon:t,options:n,value:l,resolved:d,restWord:u,onChange:s})}const zr={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},Vr={Top:De,Bottom:Ne,Left:Fe,Right:Ae},Yr=e=>{const t=Vr[e];return i(t,{})};function Pa(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=_=>zr[_],l=_=>U(r("Top"),i(De,{}),T.min,T.max,T.step,_,"px"),s=(_,Z,v,le=T)=>g("mobile",jr({label:r(_),icon:Yr(_),desktopKey:Z,min:le.min,max:le.max,step:le.step,fallback:v})),c=e.top??T.min,d=e.bottom??T.min,u="sectionPaddingLeft",f="sectionPaddingRight",p=e.sideBounds??T,m=e.side??p.min,b=e.sidePhone??m,C=e.phone===!0,P=_=>C?g("desktop",_):_;return K({...o?{_gSpacing:S("Padding")}:{},[t]:P(l(c)),...C?{[M(t)]:s("Top",t,c)}:{},...e.only==="top"?{}:{[n]:P(U(r("Bottom"),i(Ne,{}),T.min,T.max,T.step,d,"px")),...C?{[M(n)]:s("Bottom",n,d)}:{}},...e.sides?{[u]:P(U(r("Left"),i(Fe,{}),p.min,p.max,p.step,m,"px")),...C?{[M(u)]:s("Left",u,b,p)}:{},[f]:P(U(r("Right"),i(Ae,{}),p.min,p.max,p.step,m,"px")),...C?{[M(f)]:s("Right",f,b,p)}:{}}:{}})}const q=["top","right","bottom","left"],qr={top:"sectionPaddingTop",right:"sectionPaddingRight",bottom:"sectionPaddingBottom",left:"sectionPaddingLeft"},bt=e=>typeof e=="number"?e:null;function Jr(e,t,n){const o={};for(const r of q)n[r]!==t[r]&&(o[e[r]]=n[r]??void 0);return o}function Zr({tier:e,o:t}){const n=V(),o=n?.values??{},r=e==="mobile"?t.phoneKeys:t.keys,l=Object.fromEntries(q.map(u=>[u,bt(o[r[u]])])),s=Object.fromEntries(q.map(u=>[u,String(e==="mobile"?bt(o[t.keys[u]])??t.fallback[u]:t.fallback[u])])),[c,d]=j(()=>vn(l,s));return i(h,{label:a("Padding"),icon:i(dn,{}),action:i(We,{each:c,label:a("Each side"),onChange:d}),children:i(Pn,{label:a("Padding"),each:c,value:l,placeholder:s,min:t.min,max:t.max,step:t.step,onChange:u=>{const f=Jr(r,l,u);Object.keys(f).length&&n?.onChangeMany(f)},words:{sides:{top:a("Padding top"),right:a("Padding right"),bottom:a("Padding bottom"),left:a("Padding left")},vertical:a("Top and bottom"),horizontal:a("Left and right"),unit:"px"}})})}function va(e={}){const t={...qr,...e.keys},n={keys:t,phoneKeys:Object.fromEntries(q.map(c=>[c,M(t[c])])),fallback:{top:0,right:0,bottom:0,left:0,...e.fallback},min:e.min??0,max:e.max??200,step:e.step??4},o=e.phone!==!1,r=c=>{const d={type:"custom",render:()=>i(Zr,{tier:c,o:n})};return o?g(c,d):d},l=()=>z({type:"custom",render:()=>i(te,{})},"always"),s=q.filter(c=>c!=="top");return K({...e.group===!1?{}:{_gSpacing:S("Padding")},[n.keys.top]:r("desktop"),...o?{[n.phoneKeys.top]:r("mobile")}:{},...Object.fromEntries(s.map(c=>[n.keys[c],{...l(),reachedBy:n.keys.top}])),...o?Object.fromEntries(s.map(c=>[n.phoneKeys[c],g("mobile",l())])):{}})}function ka(e,t){const n=Object.fromEntries(Object.entries(t).map(([l,s])=>[l,l in e&&ee(s)?e[l]:s])),o={};let r=!1;for(const[l,s]of Object.entries(e)){if(l in t){r||Object.assign(o,n),r=!0;continue}o[l]=s}return r||Object.assign(o,n),o}const yt=e=>typeof e=="number"?e:null;function Qr(e,t,n){const o={};for(const r of["x","y"])n[r]!==t[r]&&(o[e[r]]=n[r]??void 0);return o}function ei({o:e}){const t=V(),n=t?.values??{},o={x:yt(n[e.keys.x]),y:yt(n[e.keys.y])},r=a(e.label??"Position"),l=!!(o.x||o.y),s=u=>{const f=Qr(e.keys,o,u);Object.keys(f).length&&t?.onChangeMany(f)},c=i(Vn,{label:r,value:o,onChange:s,words:{x:a("Left and right"),y:a("Up and down"),unit:"px"},placeholder:{x:"0",y:"0"},min:e.min,max:e.max,step:e.step??1}),d=i(x,{words:y()?.panel,label:r,changed:l,detail:"0 px, 0 px",onReset:()=>s({x:null,y:null})});return e.label===null?O("div",{className:"sf-position-line",children:[c,d]}):i(h,{label:r,icon:i(cn,{}),changed:l,action:d,children:c})}function La(e){return{[e.keys.x]:{type:"custom",render:()=>i(ei,{o:e})},[e.keys.y]:{...z({type:"custom",render:()=>i(te,{})},"always"),reachedBy:e.keys.x}}}const ti={contained:"Contained",page:"Page",full:"Full"},ie="Width";function Na(e,t=rr,n=!0){const o=t.map(r=>({label:ir[r]??ti[r],value:r}));return K({...n?{_gWidth:S(ie)}:{},widthMode:{type:"custom",render:({onChange:r,field:l})=>i(h,{label:a(ie),icon:i(bn,{}),action:n?i(br,{inherited:l?.inherited??!1,onReset:()=>r(lr),label:ie}):void 0,children:J({options:o,value:l?.currentValue||e,onChange:r,ariaLabel:ie})})}})}function Fa(){const e=o=>({type:"custom",render:({value:r,onChange:l})=>i(h,{label:Y,icon:R(i(ln,{})),action:o?o(l):void 0,children:J({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:["auto","fixed","screen"].includes(r)?r:"auto",onChange:l,ariaLabel:Y})})}),t=()=>({type:"custom",render:({value:o,onChange:r,field:l})=>{const s=l?.unit==="%"?"%":"px",c=s==="%"?wo:To;return i("div",{className:"sf-field",children:W({min:c.min,max:c.max,step:c.step,value:typeof o=="number"?o:c.fallback,suffix:s,ariaLabel:Y,onChange:r})})}}),n=()=>ge("Unit",i(Le,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");return K({_gHeight:S(Y),sectionHeightMode:g("desktop",e()),sectionHeightValue:g("desktop",t()),sectionHeightUnit:g("desktop",n()),sectionHeightModePhone:g("mobile",e(o=>i(ni,{onClear:()=>o(void 0)}))),sectionHeightValuePhone:g("mobile",t()),sectionHeightUnitPhone:g("mobile",n())})}function ni({onClear:e}){const t=B(),n=Co(t),o=_o(t),r=a("{value} on desktop",{value:o.mode==="auto"?a("Auto"):`${o.value}${o.unit}`});return i(x,{words:y()?.panel,label:a(Y),changed:n,detail:r,onReset:e})}function Aa(){const e=n=>({type:"custom",render:({value:o,onChange:r,id:l,name:s})=>i(oi,{value:o,onChange:r,labelId:`${l??s??"stickTop"}-label`,phone:n})}),t=()=>({type:"custom",render:({value:n,onChange:o})=>i("div",{className:"sf-field",children:W({min:ne.min,max:ne.max,step:ne.step,value:typeof n=="number"?n:ne.fallback,suffix:"px",ariaLabel:a("Distance from top"),onChange:o})})});return{_gStick:S(de),stickTop:g("desktop",e(!1)),stickTopDistance:g("desktop",t()),stickTopPhone:g("mobile",e(!0)),stickTopDistancePhone:g("mobile",t())}}function oi({value:e,onChange:t,labelId:n,phone:o}){const r=B(),l=Eo(r),s=o?l.phone:e===!0;return i(h,{label:a(de),labelId:n,icon:R(i(fn,{})),action:O(I,{children:[o?i(x,{words:y()?.panel,label:a(de),changed:Io(r),detail:a("{value} on desktop",{value:l.desktop?`${l.desktopDistance}px`:a("Off")}),onReset:()=>t(void 0)}):null,i(Ue,{checked:s,onChange:t,ariaLabelledBy:n})]})})}const xt="e.g. about";function Da(){return{_gAnchor:S("Anchor"),anchor:D({control:"plainText",label:"Name",placeholder:xt},{type:"custom",render:({value:e,onChange:t})=>i(Kt,{value:e,onChange:t,nameBox:(n,o)=>i(A,{value:n,onChange:o,label:"Name",placeholder:xt,hideable:!1,markup:!1})})})}}function Ba(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:l,name:s})=>{const c=`${l??s??e}-datetime`,d=Date.parse(typeof o=="string"?o:"");return i(h,{label:a(e),icon:t,htmlFor:c,hint:n===void 0?void 0:a(n),children:i($n,{id:c,value:Number.isFinite(d)?new Date(d):null,onChange:u=>r(u?u.toISOString():"")})})}}}function Ha(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:l,name:s})=>{const c=`${l??s??e}-date`;return i(h,{label:a(e),icon:t,htmlFor:c,hint:n===void 0?void 0:a(n),children:i(Xn,{id:c,value:Tt(typeof o=="string"?o:null),onChange:d=>r(d?Et(d):"")})})}}}function H(e,t,n){return{type:"custom",...w({},{...oe,label:e}),render:({value:o,onChange:r,id:l,name:s})=>{const c=typeof o=="boolean"?o:t,d=`${l??s??e}-label`;return i(h,{label:a(e),labelId:d,icon:n,action:i(Ue,{checked:c,onChange:r,ariaLabelledBy:d})})}}}function Ga(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return i($e,{label:a("Background"),icon:i(Be,{}),id:r,value:xn(e),onChange:t})}}}function Ma(e,t){return{type:"custom",...w({},{...oe,label:e}),render:({value:n,onChange:o,id:r})=>{const l=typeof n=="boolean"?n:t,s=`${r??e}-checkbox`;return i(h,{label:a(e),htmlFor:s,className:"sf-checkbox",action:i(Un,{id:s,checked:l,onChange:o})})}}}const Ka={follows:"fill"},Wa={follows:"ink"};function Ua(e,t,n,o){if(typeof t!="string"){const r=t.follows;return{type:"custom",render:({value:l,onChange:s})=>i(ri,{label:e,part:r,icon:n,value:l,onChange:s,opacity:o})}}return{type:"custom",render:({value:r,onChange:l})=>i($e,{label:a(e),icon:n,value:r||t,onChange:l})}}function ri({label:e,part:t,icon:n,value:o,onChange:r,opacity:l}){const s=tt(k().theme),c=t==="fill"?s.fill:s.ink,[d,u]=L(l?.key??""),[f]=L(l?.unsetFrom??""),p=typeof d=="number";return i(qn,{label:a(e),icon:n,value:o||"",inherited:c,resetTo:F(c.toUpperCase(),a("Styles")),onChange:r,onReset:()=>{r(""),l&&p&&u(void 0)},...l?{opacity:p?d:l.unset(f),onOpacityChange:m=>u(m),changed:!!o||p}:{}})}const ii=[{value:"0% 0%",label:"Top left"},{value:"50% 0%",label:"Top"},{value:"100% 0%",label:"Top right"},{value:"0% 50%",label:"Left"},{value:"50% 50%",label:"Center"},{value:"100% 50%",label:"Right"},{value:"0% 100%",label:"Bottom left"},{value:"50% 100%",label:"Bottom"},{value:"100% 100%",label:"Bottom right"}];function St({label:e,value:t,onChange:n,points:o=ii}){const r=o.map(l=>({...l,label:a(l.label),...l.title?{title:a(l.title)}:null}));return i(Wn,{label:a(e),value:t,points:r,onChange:n})}function ja(){return z({type:"custom",render:()=>i(te,{})},"always")}const li=Oe([]);function Xa(e,{stacking:t,fallback:n=Ht}){return{type:"custom",render:({value:o,onChange:r})=>{const l=Bt.includes(o)?o:n;return t?i(ai,{label:e,value:l,onChange:r}):Ct({label:e,value:l,onChange:r,points:li})}}}function ai({label:e,value:t,onChange:n}){const{appState:o,selectedItem:r}=X(c=>c),l=r?.props?.id?String(r.props.id):void 0,s=l?Dt(o?.data,l):[];return Ct({label:e,value:t,onChange:n,points:Oe(s,l)})}function Ct({label:e,value:t,onChange:n,points:o}){const r=o.find(l=>l.disabled);return i(h,{label:a(e),icon:i(un,{}),hint:r?.title?a(r.title):void 0,children:St({label:e,value:Gt(t),onChange:n,points:o})})}const $a={top:i(en,{}),right:i(Qt,{}),bottom:i(Jt,{}),left:i(Zt,{})};function za(e,t,n,o,r,l){const s=f=>t.find(p=>p.value===f),c=f=>({value:f,label:"",disabled:!0,title:o}),d=f=>{const p=t.find(b=>b.cell===f);if(!p)return c(`missing-${f}`);const m=l?.[f];return m?{value:p.value,label:p.label,icon:m}:{value:p.value,label:p.label}},u=[c("corner-top-left"),d("top"),c("corner-top-right"),d("left"),c("centre"),d("right"),c("corner-bottom-left"),d("bottom"),c("corner-bottom-right")];return{type:"custom",render:({value:f,onChange:p})=>{const m=t.some(b=>b.value===f)?f:n;return i(h,{label:a(e),icon:r,value:s(m)?.label?a(s(m).label):"",children:St({label:e,value:m,onChange:p,points:u})})}}}const si="\0note";function N(e,t,n,o,r){return{type:"custom",options:n,fallback:o,...r?{note:r}:{},...w({},{type:"select",label:e}),render:({value:l,onChange:s,field:c})=>{const d=c.options??n,u=c.fallback??o,f=d.some(p=>p.value===l)?l:u;return i(h,{label:a(e),icon:R(t),children:i(Nn,{value:f,ariaLabel:a(e),onChange:s,options:[...r?[{label:a(r),value:si,disabled:!0}]:[],...d.map(p=>({label:a(p.label),value:p.value}))]})})}}}function Va(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:r,field:l})=>i(co,{label:e,options:(l.options??t).map(s=>({...s,label:a(s.label)})),value:Array.isArray(o)?o:[],onChange:r,...n?{emptyLabel:a(n)}:{}})}}function Ya(e,t,n,o){return{type:"custom",options:t,fallback:n,...w({},{type:"select",label:e}),render:({value:r,onChange:l,field:s})=>i(po,{label:e,options:(s.options??t).map(c=>({...c,label:a(c.label)})),fallback:s.fallback??n,value:r,onChange:l,placeholder:o===void 0?void 0:a(o)})}}function qa(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return i(e,{...r})}}}function J({options:e,value:t,onChange:n,ariaLabel:o,disabled:r=!1}){return i(Rn,{options:e.map(l=>l.picture?{id:l.value,label:l.picture,title:a(l.title??l.label)}:{id:l.value,label:a(l.label),title:l.title===void 0?void 0:a(l.title)}),value:t,onChange:n,ariaLabel:a(o),disabled:r})}const Ja=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function ge(e,t,n,o){const r=n.map(l=>typeof l=="string"?{label:l,value:l}:l);return{type:"custom",...w({},{type:"radio",label:e,options:r.map(l=>({value:l.value,label:l.label}))}),render:({value:l,onChange:s,field:c})=>i(h,{label:a(e),icon:R(t),children:J({options:r,value:r.some(d=>d.value===l)?l:l||c?.currentValue||o,onChange:s,ariaLabel:e})})}}function Za(e,t,n){const o=Object.keys(xe).map(r=>({label:xe[r],value:r,picture:n[r]}));return{type:"custom",...w({},{type:"radio",label:e,options:o.map(r=>({value:r.value,label:r.label}))}),render:({onChange:r})=>i(ci,{label:e,icon:t,options:o,onChange:r})}}function ci({label:e,icon:t,options:n,onChange:o}){const r=V()?.values??{},l=wt(r),s=l==="frame"&&!!ye(r.mediaVideo)&&!ye(r.videoFrame);return i(h,{label:a(e),icon:R(t),hint:s?a("This video has no frame yet. The slide shows its background colour until one is made."):void 0,children:J({options:n,value:l,onChange:o,ariaLabel:e})})}function Qa(e,t,n,o={}){return{type:"custom",[Ie]:!0,render:({value:r,onChange:l,name:s})=>i(so,{value:r||"",onChange:l,fieldKey:s,label:e,accept:t,placeholder:n,focusKey:o.focus,focusWhen:o.focusWhen,frameKey:o.frame})}}const es={HeroSingle:["imageFocal"],HeroSlide:["videoFrame"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function ts({value:e,onChange:t,label:n}){const o=e||{},r=!!o.pending,l=r?"var(--fg-dim, #888)":o.ok?"#1d9e75":"#d85a30",s=!!ur(dr()).geocode,c=(d,u)=>t({...o,[d]:u===""?void 0:Number(u)});return O(h,{label:a(n),icon:i(se,{}),children:[s&&O(I,{children:[i("button",{type:"button",disabled:r,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:6,padding:"8px 10px",fontSize:13,cursor:r?"default":"pointer",opacity:r?.6:1,border:"1px solid var(--border-strong, #ccc)",borderRadius:6,background:"transparent",color:"inherit"},children:r?a("Finding…"):a("Find coordinates")}),o.status&&i("div",{style:{marginTop:6,fontSize:12,lineHeight:1.4,color:l},children:a(o.status)}),i("div",{style:{marginTop:6,fontSize:11,color:"var(--fg-dim, #999)"},children:a("Coordinates from OpenStreetMap")})]}),i("button",{type:"button",onClick:()=>t({...o,manual:!o.manual}),style:{marginTop:8,padding:0,border:"none",background:"none",font:"inherit",fontSize:12,color:"var(--sf-accent, #2563eb)",cursor:"pointer",textDecoration:"underline"},children:o.manual?a("Hide manual coordinates"):a("Enter coordinates manually")}),o.manual&&O("div",{style:{marginTop:8,display:"grid",gap:8},children:[i(h,{label:a("Latitude"),icon:i(se,{}),children:i("input",{type:"number",step:"any",placeholder:a("e.g. {example}",{example:"34.0990198"}),value:typeof o.lat=="number"?o.lat:"",onChange:d=>c("lat",d.target.value)})}),i(h,{label:a("Longitude"),icon:i(se,{}),children:i("input",{type:"number",step:"any",placeholder:a("e.g. {example}",{example:"-117.9842833"}),value:typeof o.lng=="number"?o.lng:"",onChange:d=>c("lng",d.target.value)})})]})]})}function di(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function ui(e,t,n){const o=e.map(r=>({text:r?.text??""}));return t===null||t<0||t>=e.length?o:o.map((r,l)=>l===t?{text:n}:r)}function ns(e,t){return e===null?null:t>e?e:null}function pi(e,t,n){if(n===null||n>=t.length)return null;for(let o=0;o<n;o+=1)if(e[o]!==t[o])return null;return e[n]!==t[n]&&t.includes(e[n])||e[n]!==t[n]&&t.length!==e.length?null:n}const os={label:"Ticker items",icon:i(sn,{})};function rs(e,t,n,o){return{type:"custom",[E]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...w({},{...it.textList,label:e}),render:({value:r,onChange:l})=>i(fi,{label:e,icon:R(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:l,markup:o==="markup"})}}function fi({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:l=!1}){const s=ae(null),[c,d]=j(null),u=p=>p.map(m=>({text:m?.text??""})),f=p=>{const m=pi(n,p,c);m===null&&(s.current=null),d(m),r(u(p))};return i(Fn,{label:a(e),icon:t,noun:a("item"),items:n,onChange:f,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:l?i(ze,{target:s,value:di(n,c),onChange:p=>r(ui(n,c??-1,p)),disabled:c===null,label:c===null?a("Formatting — click a row first"):a("Formatting — row {n}",{n:c+1})}):void 0,renderRow:(p,m,b)=>i("input",{type:"text",className:l&&c===m?"sf-list-marking":void 0,value:p?.text??"",placeholder:a(o),"aria-label":a("{label} {n}",{label:a(e),n:m+1}),onChange:C=>b({text:C.target.value}),onFocus:C=>{s.current=C.currentTarget,d(m)}})})}function is(e,t){const n=`${e.label} — row ${t+1}`;return D({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:r})=>i(A,{value:o,onChange:r,label:a("{label} — row {n}",{label:a(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function ls(e){return{_gCards:S("Cards"),coverIndex:N("Cover image",i(an,{}),io,String(lo),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:Tr("Image background",Uo),cardImage:hi(),spinOnHover:H("Rotate on hover",e?.spinDefault??!0,i(mn,{}))}}function as(){return{outline:N("Card outline",i(hn,{}),no,ro),indexBadge:N("Card number",i(Le,{}),to,oo),showBadge:H("Product badge",!0,i(He,{noun:"tag"}))}}function ss(e){const t=e&&"bottomDefault"in e?e.bottomDefault:!0,n=e&&"defaults"in e?e.defaults:{showCardSizes:t,showCardBuy:t,showCardPage:t};return{_gShowOnCard:S("Show on a card"),showCardPrice:H("Price",!0,i(tn,{})),showCardFinishes:H("Finish swatches",!0,i(nn,{})),showCardSizes:H("Sizes",n.showCardSizes,i(pn,{})),showCardBuy:H("Buy button",n.showCardBuy,i(Yt,{})),showCardPage:H("Page button",n.showCardPage,i(Be,{}))}}function cs(e,t="display"){const n=M(t);return{[t]:g("desktop",{type:"custom",render:({value:o,onChange:r})=>i(_t,{parts:e,changed:Dn(o),shown:l=>Bn(o,l),onPress:(l,s)=>r(Mn(o,l,s)),onReset:()=>r(void 0)})}),[n]:g("mobile",{type:"custom",render:({value:o,onChange:r})=>i(mi,{parts:e,desktopKey:t,value:o,onChange:r})})}}function _t({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:l}){const s=a("Display");return i(h,{label:s,icon:i(jt,{}),changed:t,action:i(x,{words:y()?.panel,label:s,changed:t,detail:l,onReset:r}),children:i(An,{label:s,items:e.map(c=>({id:c.id,label:a(c.label),shown:n(c.id)})),onChange:o})})}function mi({parts:e,desktopKey:t,value:n,onChange:o}){const r=B()[t];return i(_t,{parts:e,changed:Gn(n),shown:l=>Hn(r,n,l),onPress:(l,s)=>o(Kn(n,l,s)),onReset:()=>o(Qn),detail:a("the same as Desktop")})}function hi(){return dt("Card image",{min:G,max:Te,step:vt,hint:"Rounds the picture. The card's own corner is in Styles."})}function ds(){return me({sidesKey:"cornerSides",step:kt,useFollowed:()=>G,mark:i(gi,{label:Lt}),hint:a("Rounds the picture. Left alone it stays square.")})}function gi({label:e,changed:t=!1,onReset:n=()=>{}}){return i(x,{words:y()?.panel,label:a(e),changed:t,onReset:n})}function us(){return{type:"custom",render:({value:e,onChange:t})=>i(bi,{value:typeof e=="string"?e:"",onChange:t})}}function bi({value:e,onChange:t}){const[n,o]=j(null),r=we.filter(s=>n===null||$[s].across===n),l=e&&e in $?$[e]:null;return O(I,{children:[i(h,{label:a("Photos in a row"),icon:i(ve,{}),children:O("div",{className:"sf-gallery-filter",children:[i("button",{type:"button","aria-pressed":n===null,onClick:()=>o(null),children:a("All")}),Ft.map(s=>i("button",{type:"button","aria-pressed":n===s,onClick:()=>o(s),children:s},s))]})}),i(h,{label:a("Layout"),icon:i(on,{}),value:l?a(l.label):a("Not chosen"),hint:a("{n} of {total} layouts",{n:r.length,total:we.length}),children:i(je,{className:"sf-gallery-layouts",label:a("Layout"),value:e,onChange:t,onClear:()=>t(""),options:r.map(s=>({value:s,label:a($[s].label),picture:i("span",{className:"sf-gallery-pic",children:At($[s]).map(([c,d],u)=>i("i",{style:{gridColumn:`span ${c}`,gridRow:`span ${d}`}},u))})}))})})]})}export{xr as BOUND_TO_POST,jl as BOUND_TO_POST_NOTE,Zl as BUCKET_ICONS,es as CUSTOM_FIELD_MEDIA,ts as CoordsField,$a as EDGE_ARROWS,zn as FOCAL_DEFAULT,ii as FOCAL_POINTS,Q as FOLD_FIELD_MARKER,Ka as FOLLOWS_SITE_BUTTON,Wa as FOLLOWS_SITE_BUTTON_INK,St as FocalPicker,sa as GroupLabel,Sr as HIGHLIGHT_HINT,A as HidableTextField,_e as LINK_FIELD_MARKER,Dl as Label,Ie as MEDIA_FIELD_MARKER,Ja as MEDIA_TYPE_OPTIONS,Xl as NOT_BOUND_TO_POST,aa as PanelBand,Ir as PanelNoteLine,$r as PhoneChoiceRow,Xr as PhoneChoiceStrip,Ct as PlacementGridView,Ee as SCAFFOLD_FIELD_MARKER,hs as SCALAR_TEXT_CONTROLS,pt as SECTION_BLEEDS_HINT,qr as SIDE_PAD_KEYS,J as Segmented,gr as SiteGapDefaultReset,W as Slider,ct as Swatches,ms as TEXT_CONTROL_KINDS,E as TEXT_FIELD_MARKER,os as TICKER_ITEMS_ROW,fi as TextListField,br as WidthDefaultReset,pi as aimAfterListChange,Da as anchorFields,F as backTo,ca as backgroundField,Sa as boxAlignField,Ia as boxBlockSpacingField,xa as boxJustifyField,Ea as boxPhoneRowField,_a as boxShareField,Ca as boxWrapField,oa as bucketHeader,ha as buttonBorderField,ma as buttonWordsEntryField,Gr as cardCornersField,Tr as cardImageBackgroundField,hi as cardImageField,ls as cardMediaFields,ya as cardShapeFields,ss as cardShowFields,as as cardStyleFields,Oa as cellWidthFields,Ma as checkbox,Ua as colorInput,Yl as copyText,ut as cornerSidesField,me as cornersRowField,Ha as date,Ba as dateTime,ra as designGroupHeader,Ta as directionField,cs as displayFields,za as edgePad,Ql as entriesHiddenForTab,ns as focusAfterRemove,ja as focusKeptField,ia as foldMarker,ee as foldMetaOf,Er as foldTitleOf,us as galleryLayoutField,ua as gapField,S as group,Fa as heightFields,Ce as hidableText,_r as hintIsWhileTyping,R as iconOf,ds as imageCornersField,Ul as inOwnBox,na as isBucketHeader,fr as isNoGlyph,ql as linkField,Za as loadingShowsField,Va as multiSelect,pr as noGlyph,Ga as pageBackgroundField,ea as panelNote,Ra as phoneChoiceField,jr as phoneOverrideField,Xa as placementField,Vl as plainText,Jl as plainTextarea,La as positionFields,Qr as positionPatch,dt as pxField,la as quietMarker,Se as readHidable,di as rowText,Ya as searchSelect,ta as section,ga as sectionAnimationFields,ht as sectionBorderField,Pr as sectionCornersField,fa as sectionShapeFields,da as sectionThemeFields,ge as segmented,N as select,ui as setRowText,K as sharedStyleKinds,va as sidesPaddingFields,Jr as sidesPaddingPatch,wa as sizeField,U as slider,qa as sourceField,Pa as spacingFields,Aa as stickFields,ka as swapPadding,ba as templateField,$l as text,Ot as textFieldIdentifier,Gl as textFieldOffPage,Kl as textFieldPanelOnly,rs as textList,is as textListRowField,zl as textarea,H as toggle,Qa as upload,mr as usePageWidthDetail,pa as useSelectedPatch,B as useSelectedProps,L as useSelectedSibling,hr as useSiteGapDetail,Na as widthField,Wl as withIdentifier,Hl as withOffPage,Ml as withPanelOnly,Bl as withScaffold};
|
|
1
|
+
"use client";import{jsx as i,jsxs as B,Fragment as L}from"react/jsx-runtime";import{cloneElement as _e,useEffect as Rt,useId as we,useRef as z,useState as M}from"react";import{useEasel as ie}from"efficient-easel/easel";import{toDateKey as Ft,fromDateKey as Lt}from"efficient-shell/format";import{say as s,editorEaselWords as S}from"../../../format/lib/editor-words.js";import{mediaValueSrc as Ie}from"../../../format/lib/media-value.js";import{LOADING_SHOWS_LABELS as Te,loadingShowsOf as Pt}from"../../../format/lib/hero-video.js";import{readHidable as Ee,hidableText as Oe}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as le,LINK_FIELD_MARKER as Re,MEDIA_FIELD_MARKER as Fe,SCAFFOLD_FIELD_MARKER as Le,TEXT_FIELD_MARKER as w,foldMetaOf as se,textFieldIdentifier as Nt}from"efficient-easel/draw";import kt from"../../components/ApplyCornersToSiblings.js";import At from"../../components/TemplateFieldRow.js";import{CARD_IMAGE_RADIUS_STEP as vt,CORNER_RADIUS_MAX as Pe,CORNER_RADIUS_MIN as D}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as Bt,IMAGE_CORNERS_LABEL as Dt}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as Ht}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as Gt,GALLERY_LAYOUTS as Y,GALLERY_LAYOUT_KEYS as Mt,galleryChoices as Ne,galleryPictureCells as Wt}from"../../../format/lib/content/gallery-layout.js";import{shellGlyphOf as Kt}from"./shell-glyph.js";import{anchorSiblingsOf as Ut,placementPoints as $t}from"../../../format/lib/hero-group-placement.js";import Xt,{KEEP_HINT_CLASS as jt}from"../../components/KeepHint.js";import zt from"../../components/AnchorField.js";import{AdjustIcon as Yt,EyeIcon as Vt,AnimationIcon as qt,BackgroundIcon as Zt,BorderAllIcon as Jt,BlockSectionIcon as Qt,ColumnWidthsIcon as ke,ColumnsIcon as en,CornerIcon as tn,DirectionDownIcon as nn,DirectionLeftIcon as on,DirectionRightIcon as rn,DirectionUpIcon as ln,EditIcon as sn,GapIcon as an,GridIcon as cn,GroundIcon as Ae,HashIcon as ve,HeightIcon as dn,ImageIcon as un,ListIcon as pn,LocationIcon as Be,PaddingBottomIcon as De,PaddingLeftIcon as He,PaddingRightIcon as Ge,PaddingTopIcon as Me,PageIcon as fn,StickyIcon as hn,RotateIcon as mn,SearchIcon as gn,SquareIcon as bn,TextLinesIcon as We,TypeIcon as xn,WidthIcon as ae}from"efficient-easel/icons";import{FieldGlyph as Ke}from"../../components/FieldGlyph.js";import{resolvePageBackground as Sn}from"../../../format/lib/content/page-background.js";import{CORNER_SIDES as Ue,CORNER_SIDE_POINTS as yn,hasOwnSectionCorners as Cn,normalizeCornerSides as $e}from"../../../format/lib/content/section-corners.js";import{enclosingPath as _n,enclosingSection as wn}from"./enclosing-section.js";import{SettingsDefaultReset as y,SettingsDrill as In,SettingsField as m,SettingsGroup as Tn,SettingsGroupSub as En,SettingsSegmented as On,SettingsBorder as Rn,SettingsSidesEach as Fn,SettingsSwitch as ce,borderSides as Ln,borderStartEach as Pn}from"efficient-easel/panel";import{ListField as Nn}from"efficient-easel/fields";import{DisplayChips as kn}from"efficient-shell/ui";import{desktopDisplayChanged as An,partShownOnDesktop as vn,partShownOnPhone as Bn,phoneDisplayChanged as Dn,withDesktopPart as Hn,withPhonePart as Gn}from"../../../format/lib/content/part-display.js";import{AlignmentGrid as Mn,Checkbox as Wn,ColorSwatch as Kn,CornersInput as Un,DatePicker as $n,DateTimePicker as Xn,FOCAL_DEFAULT as jn,PictureTiles as zn,IconPicker as Yn,IconButton as Xe,InputNumber as je,Slider as Vn,Tooltip as V}from"efficient-shell/ui";import{ColourRow as ze,InheritedColourRow as Ye}from"./ColourControl.js";import Ve from"./MarkupToolbar.js";import{deviceField as g}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as qn,NoControlMark as Zn,noControlField as qe}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as Jn}from"../../../format/lib/document/own-box.js";import{PHONE_CLEAR as Qn,resolvePhoneValue as de}from"../../../format/lib/document/phone-override.js";import{phoneKey as P}from"efficient-easel/draw";import{SuppressibleText as eo}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as to,CARD_OUTLINE_OPTIONS as no,DEFAULT_CARD_INDEX_FORMAT as oo,DEFAULT_CARD_OUTLINE as ro}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as io,DEFAULT_COVER_INDEX as lo}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as so}from"efficient-easel/draw";import ao from"../../components/MediaUploadField.js";import{useSelectedHost as ue}from"./selected-host.js";import co from"../../components/MultiSelectField.js";import uo from"../../components/SectionThemePicker.js";import po from"../../components/SearchSelectField.js";import fo from"../../components/StorefrontLinkField.js";import{UiIcon as Ze}from"efficient-easel/draw/client";import{SECTION_PADDING as I}from"../../../render/lib/content/section-padding.js";import{BLOCK_FIXED_WIDTH as Je,BLOCK_WIDTH_FIT_DEFAULT as Qe,BLOCK_WIDTH_FIT_POINTS as et,BLOCK_WIDTH_LIMIT as q,TEXT_FIT_MIN_FONT as tt,TEXT_FIT_POINTS as nt,parseBlockWidthFit as ho,parseTextFit as mo}from"../../../format/lib/content/block-size.js";import{buttonLook as go,buttonWordsSummary as bo}from"../../../render/lib/content/button-look.js";import{nonEmptyString as xo}from"../../../format/lib/non-empty-string.js";import{usePreviewParts as So}from"efficient-easel/draw/client";import{encodePartId as yo}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as Co,useEaselStrings as _o}from"efficient-easel/strings";import{hasPhoneHeight as wo,resolveSectionMinHeight as Io}from"../../../format/lib/content/section-min-height.js";import{SECTION_STICK_DISTANCE as Z,SECTION_STICK_LABEL as pe,hasPhoneStick as To,resolveSectionStick as Eo}from"../../../format/lib/content/section-sticky.js";import{SECTION_MIN_HEIGHT as Oo,SECTION_MIN_HEIGHT_GROUP_LABEL as W,SECTION_SCREEN_PCT as Ro}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as Fo,resolveContainerDirection as ot}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as Lo,BOX_BLOCK_SPACING_POINTS as rt,BOX_PHONE_ROW_LABEL as Po,BOX_PHONE_ROW_MAX as No,BOX_PHONE_ROW_MIN as it,BOX_SHARE_LABEL as fe,BOX_SHARE_PHONE_DEFAULT as ko,BOX_SHARE_PHONE_POINTS as Ao,BOX_SHARE_POINTS as vo}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as O}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as Bo}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as lt,normalizeTheme as st,selectedThemeColors as Do,siteButtonPaint as at}from"../../../format/lib/theme.js";import{CONTAINER_GAP_BUILT_IN as Ho,CONTAINER_GAP_PHONE as Go,GAP_FIELD_CONTAINER as ct,hasOwnContainerGap as Mo,hasOwnPhoneGap as Wo,resolveContainerGap as Ko,resolvePhoneContainerGap as dt}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as Uo,CARD_IMAGE_BG_OFF as $o,CARD_IMAGE_BG_SWATCH_NAMES as Xo,CARD_IMAGE_BG_SWATCHES as jo,isCardImageBackgroundInheriting as zo,cardImageBackgroundChoice as Yo,THEME_CARD_IMAGE_BG as Vo}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as qo,SECTION_BG_SWATCHES as Zo,SECTION_BG_SWATCH_NAMES as Jo,THEME_SECTION_BG as Qo,isSectionBackgroundInheriting as er}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as tr,nestedAccentValue as ut,resolveSectionAccent as J}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as nr,TYPE_SIZE_INHERIT as or,isTypeSizeInheriting as rr}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as ir,WIDTH_CHOICE_LABEL as lr,WIDTH_INHERIT as sr}from"../../../format/lib/content/section-width.js";import{useFoldHeadingLevel as ar}from"./panel-heading-scope.js";import{useEaselSession as cr}from"efficient-easel/screen/lib/session-context";import{backendOf as dr}from"../website-session.js";import{BOX_GAP as ur,describedAs as T,group as C,iconOf as H,noGlyph as pt,sharedStyleKinds as K}from"efficient-easel/screen/lib/document/box-fields";import{directionField as pr,gapField as ft,Segmented as Q,segmented as he,select as U,slider as G}from"./box-fields.js";function Hl({children:e}){return i("div",{className:"sf-field-label",children:typeof e=="string"?s(e):e})}function N(e,t){return s("{value} from {from}",{value:e,from:t})}function fr(){const{blockGap:e}=O();return e===null?s("this container's own spacing"):N(`${e}px`,s("Styles"))}function hr({inherited:e,onReset:t,label:n}){return i(y,{words:S()?.panel,label:s(n),changed:!e,detail:fr(),onReset:t})}function Gl(e){return ft({...ur,builtIn:Ho[e],resolve:(t,n)=>Ko(e,t,n?.siteGap),action:(t,n)=>i(hr,{inherited:!Mo(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[ct]:e}})}function Ml(e){return g("mobile",{[ct]:e,type:"custom",render:t=>i(mr,{container:e,...t})})}function mr({container:e,...t}){const[n]=E("gap"),o=t.field?.siteGap,r=dt(e,void 0,n,o);return ft({...Go,builtIn:r,resolve:a=>dt(e,a,n,o),action:(a,c)=>i(y,{words:S()?.panel,label:s("Gap"),changed:Wo(a),detail:N(`${r}px`,s("Desktop")),onReset:()=>c(void 0)})}).render(t)}function Wl(e){return pr({offered:Fo(e),fallback:ot(e,void 0),resolve:t=>ot(e,t)})}function Kl(e,t){return $t(t?Ut(e,t):[],t)}function gr({inherited:e,onReset:t,label:n}){return i(y,{words:S()?.panel,label:s(n),changed:!e,detail:N(s("Full"),s("the page")),onReset:t})}function k({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:l,hideable:a=!0,markup:c=!0}){const{text:d,hidden:p}=Ee(e),h=z(null),f=z(null),u=F=>t(a?{text:F,hidden:p}:F),x=()=>t({text:d,hidden:!p}),b=a&&p,R=we(),_=r?Cr(r)?i("span",{className:"sf-hint-keep sf-hint-while-typing",children:s(r)}):i(Xt,{children:s(r)}):void 0,j=p?s("Show {label} on the slide",{label:s(n)}):s("Hide {label} on the slide",{label:s(n)});return i(m,{label:s(n),icon:i(xn,{}),htmlFor:R,className:b?"is-hidden":void 0,hint:_,action:a?i(V,{content:j,children:i(Xe,{"aria-pressed":p,"aria-label":j,onClick:x,children:p?i(Ze,{name:"eye-off",size:14}):i(Ze,{name:"eye",size:14})})}):void 0,children:B("div",{className:"sf-copybox",children:[c&&i(Ve,{target:l?f:h,value:d,onChange:u}),l?i("textarea",{id:R,ref:f,value:d,placeholder:o===void 0?void 0:s(o),onChange:F=>u(F.target.value)}):i("input",{id:R,ref:h,type:"text",value:d,placeholder:o===void 0?void 0:s(o),onChange:F=>u(F.target.value)})]})})}function Ul(e,t){return{...e,[Le]:t}}function $l(e){const t=e[w];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[w]:{...t,offPage:!0}}}function Xl(e){return!e||typeof e!="object"?!1:e[w]?.offPage===!0}const ht="sfPanelOnly";function jl(e){if(!e[w])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[ht]:!0}}function zl(e){return!!e&&typeof e=="object"&&e[ht]===!0}function Yl(e){const t=e[w];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[w]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as da,SCALAR_TEXT_CONTROLS as ua}from"efficient-easel/draw";function Vl(e,t){if(!e[w])throw new Error("inOwnBox: the field holds no authored text");const{[qn]:o,...r}=e;return{...r,[Jn]:!0,render:t}}const br=new Set(so),$={type:"radio",options:[{value:!0},{value:!1}]},mt={text:{type:"object",objectFields:{text:{type:"text"},hidden:$}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:$}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},A=(e,t)=>{const n=T({...t,[w]:e},{...mt[e.control],label:e.label});if(!br.has(e.control))return n;const o=t.render;return{...qe(n,"authored-copy"),render:r=>i(eo,{name:r.name,children:o(r)})}},ql="Everything else on this block comes from the linked post. Unlink it to edit by hand.",xr={field:"source.slug",set:!0},Zl={not:xr},Sr="Select a word, then press the highlighter.",yr=new Set([Sr]),Cr=e=>yr.has(e);function Jl(e,t,n){return A({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(k,{value:o,onChange:r,label:e,placeholder:t,hint:n})})}function Ql(e,t,n){return A({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(k,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0})})}function es(e,t,n){return A({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(k,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function ts(e,t,n){return A({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(k,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1})})}function ns(e){return{type:"custom",[Re]:{label:e},...T({},{type:"text",label:e}),render:({value:t,onChange:n})=>i(fo,{value:Oe(t),onChange:n,label:e})}}function os(e,t,n){return A({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(k,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const rs={Design:Yt,Animation:qt};function is(e,t){return e.includes("Design")?t!=="Design":null}function ls(e){return{type:"custom",render:()=>i(_r,{text:e})}}function _r({text:e}){return i("p",{className:"sf-note",children:s(e)})}function ss(e){return se(e)!==null&&e?.tabs!==void 0}const gt=new Map;function as(e,t){const n=`${e}\0${t?t.join(""):""}`,o=gt.get(n)??{type:"custom",tabs:t,[le]:{label:e,level:1},bucket:e,marker:!0,render:()=>i(L,{})};return gt.set(n,o),o}const bt=new Map;function cs(e){const t=bt.get(e)??{type:"custom",[le]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>i(L,{})};return bt.set(e,t),t}function wr(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function ds(e,t){return wr(e)===t?e:{...e,marker:!0,fold:t,render:()=>i(L,{})}}function us(e){const t=e;if(t.marker===!0&&t.fold===void 0)return e;const{fold:n,...o}=e;return{...o,marker:!0,render:()=>i(L,{})}}function ps({title:e,children:t}){const[n,o]=M(()=>!me.has(e));return i(Tn,{title:e,open:n,onToggle:r=>{o(r),r?me.delete(e):me.add(e)},children:t})}const me=new Set;function fs({label:e}){return i(En,{title:s(e),level:ar(2)})}function xt({swatches:e,current:t,onPick:n,names:o}){const r=e.find(c=>c.toLowerCase()===t.toLowerCase()),l=r?o?.[r]:void 0,a=l?s(l):t;return B("div",{className:"sf-swatches",children:[e.map(c=>{const d=o?.[c]?s(o[c]):c;return i(V,{content:d,children:i(Kn,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":d})},c)}),i("span",{className:"sf-swatch-hex",children:a})]})}function hs(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=er(n,t);return i(m,{label:s(e),icon:i(Zt,{}),changed:!r,action:i(y,{words:S()?.panel,label:s(e),changed:!r,detail:s("the theme's section background"),onReset:()=>o(qo)}),children:xt({swatches:Zo,current:r?Qo:n??t??"",onPick:o,names:Jo})})}}}function Ir(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,l=zo(r,t);return i(m,{label:s(e),icon:i(Ae,{}),changed:!l,action:i(y,{words:S()?.panel,label:s(e),changed:!l,detail:s("the theme's image stage"),onReset:()=>o(Uo)}),children:xt({swatches:jo,current:l?Vo:Yo(r,t),onPick:o,names:Xo})})}}}function ms(e=n=>n,t){return K({_gSectionTheme:C(tr),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(uo,{value:e(n),onChange:o,followLabel:t})}})}function X({min:e,max:t,step:n,value:o,onChange:r,suffix:l="",readout:a=!0,notch:c,ariaLabel:d,disabled:p=!1}){const h=c!==void 0&&Number.isFinite(c)&&c>=e&&c<=t;return i("div",{className:h?"sf-slider has-notch":"sf-slider",style:h?{"--sf-notch":(c-e)/(t-e)}:void 0,children:i(Vn,{min:e,max:t,step:n,value:o,suffix:l||void 0,showInput:a,label:d===void 0?void 0:s(d),disabled:p,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:f=>{f!==null&&f!==o&&r(f)}})})}function ge(e,t){const{min:n,max:o,step:r=1,unsetLabel:l,hint:a,restTrack:c,unsetMark:d,icon:p,unit:h="px"}=t;return{type:"custom",render:({value:f,onChange:u})=>{const x=typeof f=="number"?f:null,b=x===null;return i(m,{label:s(e),icon:p?H(p):void 0,value:b?d||l===void 0?void 0:s(l):`${x}${h}`,changed:!b,action:d?_e(d,{changed:!b,onReset:()=>u(null)}):i(y,{words:S()?.panel,label:s(e),changed:!b,onReset:()=>u(null)}),hint:typeof a=="string"?s(a):a,children:c?c({min:n,max:o,step:r,px:x,label:e,onChange:u}):X({min:n,max:o,step:r,value:x??n,readout:!1,ariaLabel:e,onChange:u})})}}}const ee="Corners";function be(e){return{type:"custom",render:({value:t,onChange:n})=>{const o=typeof t=="number"&&Number.isFinite(t)?t:null,r=o!==null;return i(m,{label:s(ee),icon:i(tn,{}),changed:r,action:_e(e.mark,{changed:r,onReset:()=>n(null)}),hint:e.hint,children:i(Er,{tier:e,px:o,onRadius:n})})}}}function E(e){const t=ue();return[t?.values?.[e],n=>t?.onChange(e,n)]}function xe(e){const t=qe({type:"custom",render:()=>i(Zn,{})},"always");return e===void 0?t:{...t,reachedBy:e}}function Tr(){const e=ue();return t=>e?.onChangeMany(t)}function Er({tier:e,px:t,onRadius:n}){const o=e.useFollowed(),[r,l]=E(e.sidesKey),a=$e(r)??[...Ue];return i(Un,{label:s(ee),value:a,corners:yn,onChange:c=>{const d=$e(c)??[];l(d.length===Ue.length?null:d)},radius:t,onRadiusChange:n,radiusMin:D,radiusMax:Pe,radiusStep:e.step??1,radiusPlaceholder:String(o)})}function St(){return xe()}function Or({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=O(),r=typeof o=="number"?`${o}px`:s("not set");return i(y,{words:S()?.panel,label:s(e),changed:t,detail:o==null?s("the built-in corners"):N(r,s("Styles")),onReset:n})}function Rr(){const{cornerRadiusPx:e}=O();return typeof e=="number"?e:D}function Fr(){return be({sidesKey:"sectionCornerSides",useFollowed:Rr,mark:i(Or,{label:ee}),hint:Lr})}const Lr="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function gs(){return K({_gShape:C("Shape"),sectionCorners:Fr(),sectionCornerSides:St(),sectionBorder:Ct("desktop"),sectionBorderPhone:Ct("mobile")})}const Pr=()=>({width:s("Border width"),sides:{top:s("Border top"),right:s("Border right"),bottom:s("Border bottom"),left:s("Border left")},style:s("Border style"),styles:{solid:s("Solid"),dashed:s("Dashed"),dotted:s("Dotted")},color:s("Border color"),unit:"px"});function Nr(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function kr(){let e;try{const t=st(O().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||lt.line}function yt({value:e,onChange:t,placeholder:n,presets:o,sides:r=!0,styles:l=!0,above:a={}}){const c=e&&typeof e=="object"?e:{},[d,p]=M(()=>r?Pn(c,a):!1),h=Pr(),f=u=>Nr(r&&l?u:{width:u.width,color:u.color,...l?{style:u.style}:{}});return i(m,{label:s("Border"),icon:i(Jt,{}),action:r?i(Fn,{each:d,label:s("Each side"),onChange:p}):void 0,children:i(Rn,{label:s("Border"),value:c,each:d,onChange:u=>t(f(u)),placeholder:n,presets:o,words:h,styles:l,max:Bo})})}function Ar({value:e,onChange:t,tier:n}){const[o]=E("sectionBorder"),r=kr(),l=n==="mobile"?o&&typeof o=="object"?o:{}:{};return i(yt,{value:e,onChange:t,placeholder:{sides:Ln(l),style:l.style??"solid",color:l.color||r},presets:[r],above:l})}function Ct(e){return g(e,{type:"custom",render:({value:t,onChange:n})=>i(Ar,{value:t,onChange:n,tier:e})})}function bs(e){return{type:"custom",render:()=>i(vr,{partKey:e})}}function vr({partKey:e}){const[t]=E("id"),[n]=E("_partStyles"),{textStyles:o}=O(),r=_o();let l=null;try{l=So().select}catch{l=null}const a=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return i(In,{name:s("Text"),preview:bo(a,c,{noStyle:s("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??Co.copy.panel).cases}),onOpen:()=>{l&&typeof t=="string"&&l(yo(t,e))}})}function xs(){return{type:"custom",render:({value:e,onChange:t})=>i(Br,{value:e,onChange:t})}}function Br({value:e,onChange:t}){const[n]=E("variant"),[o]=E("buttonColor"),{theme:r}=O(),a=go({variant:n,buttonColor:o,buttonBorder:e&&typeof e=="object"?e:{}}).border.width,c=xo(o)??(n==="ghost"?Do(r).text:at(r).fill);return i(yt,{value:e,onChange:t,placeholder:{sides:{top:a,right:a,bottom:a,left:a},style:"solid",color:c},presets:[c],sides:!1,styles:!1})}function _t(e){const{cornerRadiusPx:t}=O(),n=typeof t=="number"?t:e;let o=null;try{const{appState:l,selectedItem:a}=ie(d=>d),c=a?.props?.id?String(a.props.id):void 0;o=c?wn(l?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return Cn(r)?r:n}function Dr({label:e,changed:t=!1,onReset:n=()=>{}}){const o=_t(D);return i(y,{words:S()?.panel,label:s(e),changed:t,detail:N(`${o}px`,s("the section")),onReset:n})}function Hr(){return i(L,{children:s("Follows the section's Corners until you set a number here.")})}function Gr(){return be({sidesKey:"cardCornerSides",useFollowed:()=>_t(D),mark:i(Dr,{label:ee}),hint:i(Hr,{})})}function Mr(){return{type:"custom",render:()=>i(kt,{})}}function Ss(e){return{...e,render:t=>i(At,{render:e.render,props:t})}}function ys(){return{_gShape:C("Shape"),cardCorners:Gr(),cardCornerSides:St(),cardCornersApplyAll:Mr()}}function Wr(e=vo,t=e[0].value){return T({type:"custom",render:({value:n,onChange:o})=>{const r=e.find(l=>l.value===n)??e.find(l=>l.value===t)??e[0];return i(m,{label:s(fe),icon:i(ke,{}),value:s(r.label),children:i(zn,{className:"sf-gallery-layouts",label:s(fe),value:r.value,onChange:o,options:e.map(l=>({value:l.value,label:s(l.label),picture:i("span",{className:"sf-gallery-pic",children:Kr(l.weights).map((a,c)=>i("i",{style:{gridColumn:`span ${a}`}},c))})}))})})}},{type:"select",label:fe,options:e.map(n=>({value:n.value,label:n.label}))})}function Kr(e){if(!e)return[3,4];const t=e.reduce((n,o)=>n+o,0);return e.map(n=>Math.round(n/t*12))}function Cs(){return U(Lo,i(an,{}),rt,rt[0].value)}function _s(){return g("mobile",Wr(Ao,ko))}function ws(){return g("mobile",G(Po,i(en,{}),it,No,1,it))}function Is(e,t,n,o,r,l){return{type:"custom",render:({value:a,onChange:c})=>i(m,{label:s(e),icon:i(Ke,{noun:l}),action:i(y,{words:S()?.panel,label:s(e),changed:!rr(a),detail:s("the Text style in Styles"),onReset:()=>c(or),defaultAction:{onPress:()=>c(nr),title:s("Keep this section's own built-in size"),icon:i(Qt,{})}}),children:X({min:t,max:n,step:o,value:typeof a=="number"?a:r,suffix:"px",ariaLabel:e,onChange:c})})}}function Ts(){return{_gCellWidth:C("Cell width"),gridSpan:U("Positions",i(ke,{}),[{label:"Auto",value:""},...Array.from({length:Ht},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}const wt=pt("a value or limit row under the Width and text-fit choices; drawn bare in the approved design (owner 2026-10-29, c25 row 4); no shell glyph names a min, max or fixed width");function te(e,t,n,o,r){const l=r===void 0?G(t,pt("a fixed width or min font size under its choice; drawn bare in the approved design (owner 2026-10-29, c25 row 4)"),n.min,n.max,n.step,o,"px"):ge(t,{...n,unsetLabel:r,icon:wt});return{[e]:g("desktop",l),[P(e)]:g("mobile",Tt({label:t,desktopKey:e,icon:wt,...n,fallback:o}))}}const Se=e=>e.map(t=>({label:t.label,value:t.value}));function It(e,t,n,o,r,l,a){const c=Se(r);return{[e]:g("desktop",t),[P(e)]:g("mobile",Xr({label:n,icon:o,options:c,desktopKey:e,resolve:(d,p)=>l(d)??l(p)??a}))}}function Es(e={}){const t={_gBlockSize:C("Size"),...It("widthFit",he("Width",i(ae,{}),Se(et),Qe),"Width",i(ae,{}),et,ho,Qe),...te("width","Fixed width",Je,Je.fallback),...te("minWidth","Min width",q,q.min,"None"),...te("maxWidth","Content width",q,q.min,"None")},n=e.textFit?{_gText:C("Text"),...It("textFit",he("When the text does not fit",i(We,{}),Se(nt),e.textFit),"When the text does not fit",i(We,{}),nt,mo,e.textFit),...te("minFont","Min font size",tt,tt.fallback)}:{};return{size:t,text:n}}function v(){let e=null;try{e=ie(t=>t).selectedItem}catch{e=null}return e?.props??{}}function Ur({min:e,max:t,step:n,px:o,label:r,onChange:l,desktopKey:a,fallback:c}){const d=v()[a],p=de(void 0,d,c);return i(L,{children:X({min:e,max:t,step:n,value:de(o,d,c),readout:!1,ariaLabel:r,notch:p,onChange:l})})}function $r({label:e,desktopKey:t,fallback:n,unit:o="px",changed:r=!1,onReset:l=()=>{}}){const a=v()[t],c=de(void 0,a,n);return i(y,{words:S()?.panel,label:s(e),changed:r,detail:s("{value} on desktop",{value:`${c}${o}`}),onReset:l})}function Tt(e){return ge(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:i($r,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>i(Ur,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}function Xr(e){return{type:"custom",render:({value:t,onChange:n})=>i(zr,{...e,value:t,onChange:n})}}function jr({label:e,icon:t,options:n,value:o,resolved:r,restWord:l,onChange:a}){const c=n.some(d=>d.value===o);return i(m,{label:s(e),icon:H(t),action:i(y,{words:S()?.panel,label:s(e),changed:c,detail:s("{value} on desktop",{value:s(l)}),onReset:()=>a(void 0)}),children:Q({options:n,value:c?o:r,onChange:d=>a(d),ariaLabel:e})})}function zr({label:e,icon:t,options:n,desktopKey:o,resolve:r,value:l,onChange:a}){const c=v()[o],d=r(void 0,c),p=n.find(h=>h.value===d)?.label??"";return i(jr,{label:e,icon:t,options:n,value:l,resolved:d,restWord:p,onChange:a})}const Yr={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},Vr={Top:Me,Bottom:De,Left:He,Right:Ge},qr=e=>{const t=Vr[e];return i(t,{})};function Os(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=_=>Yr[_],l=_=>G(r("Top"),i(Me,{}),I.min,I.max,I.step,_,"px"),a=(_,j,F,re=I)=>g("mobile",Tt({label:r(_),icon:qr(_),desktopKey:j,min:re.min,max:re.max,step:re.step,fallback:F})),c=e.top??I.min,d=e.bottom??I.min,p="sectionPaddingLeft",h="sectionPaddingRight",f=e.sideBounds??I,u=e.side??f.min,x=e.sidePhone??u,b=e.phone===!0,R=_=>b?g("desktop",_):_;return K({...o?{_gSpacing:C("Padding")}:{},[t]:R(l(c)),...b?{[P(t)]:a("Top",t,c)}:{},...e.only==="top"?{}:{[n]:R(G(r("Bottom"),i(De,{}),I.min,I.max,I.step,d,"px")),...b?{[P(n)]:a("Bottom",n,d)}:{}},...e.sides?{[p]:R(G(r("Left"),i(He,{}),f.min,f.max,f.step,u,"px")),...b?{[P(p)]:a("Left",p,x,f)}:{},[h]:R(G(r("Right"),i(Ge,{}),f.min,f.max,f.step,u,"px")),...b?{[P(h)]:a("Right",h,x,f)}:{}}:{}})}function Rs(e,t){const n=Object.fromEntries(Object.entries(t).map(([l,a])=>[l,l in e&&se(a)?e[l]:a])),o={};let r=!1;for(const[l,a]of Object.entries(e)){if(l in t){r||Object.assign(o,n),r=!0;continue}o[l]=a}return r||Object.assign(o,n),o}const ne="Width";function Fs(e,t=ir,n=!0){const o=t.map(r=>({label:lr[r],value:r}));return K({...n?{_gWidth:C(ne)}:{},widthMode:{type:"custom",render:({onChange:r,field:l})=>i(m,{label:s(ne),icon:i(ae,{}),action:n?i(gr,{inherited:l?.inherited??!1,onReset:()=>r(sr),label:ne}):void 0,children:Q({options:o,value:l?.currentValue||e,onChange:r,ariaLabel:ne})})}})}function Ls(){const e=o=>({type:"custom",render:({value:r,onChange:l})=>i(m,{label:W,icon:H(i(dn,{})),action:o?o(l):void 0,children:Q({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:["auto","fixed","screen"].includes(r)?r:"auto",onChange:l,ariaLabel:W})})}),t=()=>({type:"custom",render:({value:o,onChange:r,field:l})=>{const a=l?.unit==="%"?"%":"px",c=a==="%"?Ro:Oo;return i("div",{className:"sf-field",children:X({min:c.min,max:c.max,step:c.step,value:typeof o=="number"?o:c.fallback,suffix:a,ariaLabel:W,onChange:r})})}}),n=()=>he("Unit",i(ve,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");return K({_gHeight:C(W),sectionHeightMode:g("desktop",e()),sectionHeightValue:g("desktop",t()),sectionHeightUnit:g("desktop",n()),sectionHeightModePhone:g("mobile",e(o=>i(Zr,{onClear:()=>o(void 0)}))),sectionHeightValuePhone:g("mobile",t()),sectionHeightUnitPhone:g("mobile",n())})}function Zr({onClear:e}){const t=v(),n=wo(t),o=Io(t),r=s("{value} on desktop",{value:o.mode==="auto"?s("Auto"):`${o.value}${o.unit}`});return i(y,{words:S()?.panel,label:s(W),changed:n,detail:r,onReset:e})}function Ps(){const e=n=>({type:"custom",render:({value:o,onChange:r,id:l,name:a})=>i(Jr,{value:o,onChange:r,labelId:`${l??a??"stickTop"}-label`,phone:n})}),t=()=>({type:"custom",render:({value:n,onChange:o})=>i("div",{className:"sf-field",children:X({min:Z.min,max:Z.max,step:Z.step,value:typeof n=="number"?n:Z.fallback,suffix:"px",ariaLabel:s("Distance from top"),onChange:o})})});return{_gStick:C(pe),stickTop:g("desktop",e(!1)),stickTopDistance:g("desktop",t()),stickTopPhone:g("mobile",e(!0)),stickTopDistancePhone:g("mobile",t())}}function Jr({value:e,onChange:t,labelId:n,phone:o}){const r=v(),l=Eo(r),a=o?l.phone:e===!0;return i(m,{label:s(pe),labelId:n,icon:H(i(hn,{})),action:B(L,{children:[o?i(y,{words:S()?.panel,label:s(pe),changed:To(r),detail:s("{value} on desktop",{value:l.desktop?`${l.desktopDistance}px`:s("Off")}),onReset:()=>t(void 0)}):null,i(ce,{checked:a,onChange:t,ariaLabelledBy:n})]})})}const Et="e.g. about";function Ns(){return{_gAnchor:C("Anchor"),anchor:A({control:"plainText",label:"Name",placeholder:Et},{type:"custom",render:({value:e,onChange:t})=>i(zt,{value:e,onChange:t,nameBox:(n,o)=>i(k,{value:n,onChange:o,label:"Name",placeholder:Et,hideable:!1,markup:!1})})})}}function ks(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:l,name:a})=>{const c=`${l??a??e}-datetime`,d=Date.parse(typeof o=="string"?o:"");return i(m,{label:s(e),icon:t,htmlFor:c,hint:n===void 0?void 0:s(n),children:i(Xn,{id:c,value:Number.isFinite(d)?new Date(d):null,onChange:p=>r(p?p.toISOString():"")})})}}}function As(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:l,name:a})=>{const c=`${l??a??e}-date`;return i(m,{label:s(e),icon:t,htmlFor:c,hint:n===void 0?void 0:s(n),children:i($n,{id:c,value:Lt(typeof o=="string"?o:null),onChange:d=>r(d?Ft(d):"")})})}}}function Ot(e,t,n,o){return{type:"custom",...T({},{...$,label:e}),render:({value:r,onChange:l,id:a,name:c})=>{const d=typeof r=="boolean"?r:t,p=`${a??c??e}-label`;return i(m,{label:s(e),labelId:p,icon:n,hint:o===void 0?void 0:s(o),action:i(ce,{checked:d,onChange:l,ariaLabelledBy:p})})}}}function vs(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return i(ze,{label:s("Background"),icon:i(fn,{}),id:r,value:Sn(e),onChange:t})}}}function Bs(e,t){return{type:"custom",...T({},{...$,label:e}),render:({value:n,onChange:o,id:r})=>{const l=typeof n=="boolean"?n:t,a=`${r??e}-checkbox`;return i(m,{label:s(e),htmlFor:a,className:"sf-checkbox",action:i(Wn,{id:a,checked:l,onChange:o})})}}}const Ds={follows:"fill"},Hs={follows:"ink"};function Gs(e,t,n,o){if(typeof t!="string"){const r=t.follows;return{type:"custom",render:({value:l,onChange:a})=>i(Qr,{label:e,part:r,icon:n,value:l,onChange:a,opacity:o})}}return{type:"custom",render:({value:r,onChange:l})=>i(ze,{label:s(e),icon:n,value:r||t,onChange:l})}}function Qr({label:e,part:t,icon:n,value:o,onChange:r,opacity:l}){const a=at(O().theme),c=t==="fill"?a.fill:a.ink,[d,p]=E(l?.key??""),[h]=E(l?.unsetFrom??""),f=typeof d=="number";return i(Ye,{label:s(e),icon:n,value:o||"",inherited:c,resetTo:N(c.toUpperCase(),s("Styles")),onChange:r,onReset:()=>{r(""),l&&f&&p(void 0)},...l?{opacity:f?d:l.unset(h),onOpacityChange:u=>p(u),changed:!!o||f}:{}})}function Ms(){return{type:"custom",render:({value:e,onChange:t})=>i(ei,{value:typeof e=="string"?e:"",onChange:t})}}function ei({value:e,onChange:t}){const{hex:n,n:o}=ni();return i(Ye,{label:s("Fill"),icon:i(Ae,{}),value:e,inherited:n,resetTo:N(n.toUpperCase(),s("Theme {n} background",{n:o})),onChange:t,onReset:()=>t("")})}function ti(e,t,n){if((e?.content??[]).some(a=>a?.props?.id===t))return J(n);const r=_n(e,t);if(r.length===0)return null;const l=J(ut(n));if(l!==null)return l;for(let a=r.length-1;a>0;a-=1){const c=J(ut(r[a].sectionAccent));if(c!==null)return c}return J(r[0].sectionAccent)}function ni(){const e=st(O().theme),[t]=E("sectionAccent");let n=null;try{const{appState:r,selectedItem:l}=ie(c=>c),a=l?.props?.id?String(l.props.id):void 0;n=a?ti(r?.data,a,t):null}catch{n=null}const o=n!==null&&e.themes[n]?n:e.selected;return{hex:e.themes[o].background??lt.background,n:o+1}}const oi=[{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 ri({label:e,value:t,onChange:n,points:o=oi}){const r=o.map(l=>({...l,label:s(l.label),...l.title?{title:s(l.title)}:null}));return i(Mn,{label:s(e),value:t,points:r,onChange:n})}function Ws(){return xe()}const Ks={top:i(ln,{}),right:i(rn,{}),bottom:i(nn,{}),left:i(on,{})};function Us(e,t,n,o,r,l){const a=h=>t.find(f=>f.value===h),c=h=>({value:h,label:"",disabled:!0,title:o}),d=h=>{const f=t.find(x=>x.cell===h);if(!f)return c(`missing-${h}`);const u=l?.[h];return u?{value:f.value,label:f.label,icon:u}:{value:f.value,label:f.label}},p=[c("corner-top-left"),d("top"),c("corner-top-right"),d("left"),c("centre"),d("right"),c("corner-bottom-left"),d("bottom"),c("corner-bottom-right")];return{type:"custom",render:({value:h,onChange:f})=>{const u=t.some(x=>x.value===h)?h:n;return i(m,{label:s(e),icon:r,value:a(u)?.label?s(a(u).label):"",children:ri({label:e,value:u,onChange:f,points:p})})}}}function $s(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:r,field:l})=>i(co,{label:e,options:(l.options??t).map(a=>({...a,label:s(a.label)})),value:Array.isArray(o)?o:[],onChange:r,...n?{emptyLabel:s(n)}:{}})}}function Xs(e,t,n,o){return{type:"custom",options:t,fallback:n,...T({},{type:"select",label:e}),render:({value:r,onChange:l,field:a})=>i(po,{label:e,options:(a.options??t).map(c=>({...c,label:s(c.label)})),fallback:a.fallback??n,value:r,onChange:l,placeholder:o===void 0?void 0:s(o)})}}function js(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return i(e,{...r})}}}const zs=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function Ys(e,t,n){const o=Object.keys(Te).map(r=>({label:Te[r],value:r,picture:n[r]}));return{type:"custom",...T({},{type:"radio",label:e,options:o.map(r=>({value:r.value,label:r.label}))}),render:({onChange:r})=>i(ii,{label:e,icon:t,options:o,onChange:r})}}function ii({label:e,icon:t,options:n,onChange:o}){const r=ue()?.values??{},l=Pt(r),a=l==="frame"&&!!Ie(r.mediaVideo)&&!Ie(r.videoFrame);return i(m,{label:s(e),icon:H(t),hint:a?s("This video has no frame yet. The slide shows its background colour until one is made."):void 0,children:Q({options:n,value:l,onChange:o,ariaLabel:e})})}function Vs(e,t,n,o={}){return{type:"custom",[Fe]:!0,render:({value:r,onChange:l,name:a})=>i(ao,{value:r||"",onChange:l,fieldKey:a,label:e,accept:t,placeholder:n,focusKey:o.focus,focusWhen:o.focusWhen,frameKey:o.frame})}}const qs={HeroSingle:["imageFocal"],HeroSlide:["videoFrame"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function li(e){const t=s(e.status??"");return e.ok&&typeof e.lat=="number"&&typeof e.lng=="number"?`${t} · ${e.lat.toFixed(4)}, ${e.lng.toFixed(4)}`:t}function Zs({value:e,onChange:t,label:n}){const o=e||{},r=!!o.pending,l=r?"var(--ink-faint)":o.ok?"var(--status-success-soft-ink)":"var(--status-danger-soft-ink)",a=!!dr(cr()).geocode,c=we(),d=(p,h)=>t({...o,[p]:h??void 0});return B(L,{children:[i(m,{label:s(n),icon:i(Be,{}),action:a?i(V,{content:s("Find from the address (OpenStreetMap)"),children:i(Xe,{"aria-label":s("Find from the address"),"aria-busy":r||void 0,disabled:r,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),children:i(gn,{})})}):void 0,children:a&&o.status?i(V,{content:li(o),className:"sf-name-tip",children:i("div",{className:`es-field-hint ${jt}`,style:{margin:0,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",minWidth:0,color:l},children:r?s("Finding…"):s(o.status)})}):null}),i(m,{label:s("Enter by hand"),labelId:c,icon:i(sn,{}),action:i(ce,{checked:!!o.manual,onChange:p=>t({...o,manual:p}),ariaLabelledBy:c})}),o.manual&&i(m,{label:s("Latitude, longitude"),icon:i(Be,{}),children:B("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[i(je,{value:typeof o.lat=="number"?o.lat:null,onChange:p=>d("lat",p),min:-90,max:90,step:1e-4,placeholder:s("Latitude")}),i(je,{value:typeof o.lng=="number"?o.lng:null,onChange:p=>d("lng",p),min:-180,max:180,step:1e-4,placeholder:s("Longitude")})]})})]})}function si(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function ai(e,t,n){const o=e.map(r=>({text:r?.text??""}));return t===null||t<0||t>=e.length?o:o.map((r,l)=>l===t?{text:n}:r)}function Js(e,t){return e===null?null:t>e?e:null}function ci(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 Qs={label:"Ticker items",icon:i(pn,{})};function ea(e,t,n,o){return{type:"custom",[w]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...T({},{...mt.textList,label:e}),render:({value:r,onChange:l})=>i(di,{label:e,icon:H(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:l,markup:o==="markup"})}}function di({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:l=!1}){const a=z(null),[c,d]=M(null),p=f=>f.map(u=>({text:u?.text??""})),h=f=>{const u=ci(n,f,c);u===null&&(a.current=null),d(u),r(p(f))};return i(Nn,{label:s(e),icon:t,noun:s("item"),items:n,onChange:h,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:l?i(Ve,{target:a,value:si(n,c),onChange:f=>r(ai(n,c??-1,f)),disabled:c===null,label:c===null?s("Formatting — click a row first"):s("Formatting — row {n}",{n:c+1})}):void 0,renderRow:(f,u,x)=>i("input",{type:"text",className:l&&c===u?"sf-list-marking":void 0,value:f?.text??"",placeholder:s(o),"aria-label":s("{label} {n}",{label:s(e),n:u+1}),onChange:b=>x({text:b.target.value}),onFocus:b=>{a.current=b.currentTarget,d(u)}})})}function ta(e,t){const n=`${e.label} — row ${t+1}`;return A({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:r})=>i(k,{value:o,onChange:r,label:s("{label} — row {n}",{label:s(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function na(e){return{_gCards:C("Cards"),coverIndex:U("Cover image",i(un,{}),io,String(lo),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:Ir("Image background",$o),cardImage:fi(),spinOnHover:Ot("Rotate on hover",e?.spinDefault??!0,i(mn,{}))}}function oa(){return{outline:U("Card outline",i(bn,{}),no,ro),indexBadge:U("Card number",i(ve,{}),to,oo),showBadge:Ot("Product badge",!0,i(Ke,{noun:"tag"}))}}function ra(e){const t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=r=>({...$,label:oe.find(l=>l.id===r).label}),o=r=>T(xe(ye),n(r));return{_gShowOnCard:C("Show on a card"),[ye]:T({type:"custom",render:()=>i(ui,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(ye)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const ye="showCardPrice",oe=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function ui({rest:e}){const t=v(),n=Tr(),o=a=>typeof t[a]=="boolean"?t[a]:void 0,r=a=>o(a)??e[a],l=oe.some(({id:a})=>o(a)!==void 0&&o(a)!==e[a]);return i(Ce,{parts:oe,changed:l,shown:r,onPress:(a,c)=>n({[a]:c}),onReset:()=>n(Object.fromEntries(oe.map(({id:a})=>[a,void 0])))})}function ia(e,t="display"){const n=P(t);return{[t]:g("desktop",{type:"custom",render:({value:o,onChange:r})=>i(Ce,{parts:e,changed:An(o),shown:l=>vn(o,l),onPress:(l,a)=>r(Hn(o,l,a)),onReset:()=>r(void 0)})}),[n]:g("mobile",{type:"custom",render:({value:o,onChange:r})=>i(pi,{parts:e,desktopKey:t,value:o,onChange:r})})}}function Ce({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:l}){const a=s("Display");return i(m,{label:a,icon:i(Vt,{}),changed:t,action:i(y,{words:S()?.panel,label:a,changed:t,detail:l,onReset:r}),children:i(kn,{label:a,items:e.map(c=>({id:c.id,label:s(c.label),shown:n(c.id)})),onChange:o})})}function pi({parts:e,desktopKey:t,value:n,onChange:o}){const r=v()[t];return i(Ce,{parts:e,changed:Dn(n),shown:l=>Bn(r,n,l),onPress:(l,a)=>o(Gn(n,l,a)),onReset:()=>o(Qn),detail:s("the same as Desktop")})}function fi(){return ge("Card image",{min:D,max:Pe,step:vt,hint:"Rounds the picture. The card's own corner is in Styles."})}function la(){return be({sidesKey:"cornerSides",step:Bt,useFollowed:()=>D,mark:i(hi,{label:Dt}),hint:s("Rounds the picture. Left alone it stays square.")})}function hi({label:e,changed:t=!1,onReset:n=()=>{}}){return i(y,{words:S()?.panel,label:s(e),changed:t,onReset:n})}function sa(){return{type:"custom",render:({value:e,onChange:t})=>i(xi,{value:typeof e=="string"?e:"",onChange:t})}}function mi({layout:e,width:t}){return i("span",{"aria-hidden":"true",style:{display:"grid",width:t,gridTemplateColumns:"repeat(12, minmax(0, 1fr))",gridAutoRows:6,gridAutoFlow:"row dense",gap:2},children:Wt(e).map(([n,o],r)=>i("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${n}`,gridRow:`span ${o}`}},r))})}const gi={width:"3.5rem",height:"2.5rem"},bi=200;function xi({value:e,onChange:t}){const[n,o]=M(null),[r,l]=M(4),a=z(null);Rt(()=>{const u=a.current;if(!u||typeof ResizeObserver!="function")return;const x=()=>l(u.getBoundingClientRect().width>=bi?4:3);x();const b=new ResizeObserver(x);return b.observe(u),()=>b.disconnect()},[]);const c=e&&e in Y?e:"",d=Ne(n,c),p=Ne(n,"").length,h=Kt("no-symbol"),f=[{value:"",label:s("Not chosen"),icon:h},...d.map(u=>({value:u,label:s(Y[u].label),icon:i(mi,{layout:Y[u],width:40})}))];return i(m,{label:s("Layout"),icon:i(cn,{}),value:c?s(Y[c].label):s("Not chosen"),children:i("div",{ref:a,style:{flex:"1 1 auto",minWidth:0},children:i(Yn,{label:s("Layout"),value:c,emptyValue:"",options:f,onChange:t,columns:r,cell:gi,header:B("div",{className:"mb-2 flex flex-col gap-1",style:{minWidth:"11rem"},children:[i("span",{className:"text-2xs text-ink-faint",children:s("Photos in a row")}),i(On,{options:[{id:"all",label:s("All")},...Gt.map(u=>({id:String(u),label:String(u)}))],value:n===null?"all":String(n),ariaLabel:s("Photos in a row"),onChange:u=>o(u==="all"?null:Number(u))}),i("span",{className:"text-2xs text-ink-faint",children:s("{n} of {total} layouts",{n:p,total:Mt.length})})]})})})})}export{xr as BOUND_TO_POST,ql as BOUND_TO_POST_NOTE,rs as BUCKET_ICONS,qs as CUSTOM_FIELD_MEDIA,Zs as CoordsField,Ks as EDGE_ARROWS,jn as FOCAL_DEFAULT,oi as FOCAL_POINTS,le as FOLD_FIELD_MARKER,Ds as FOLLOWS_SITE_BUTTON,Hs as FOLLOWS_SITE_BUTTON_INK,ri as FocalPicker,fs as GroupLabel,Sr as HIGHLIGHT_HINT,k as HidableTextField,Re as LINK_FIELD_MARKER,Hl as Label,Fe as MEDIA_FIELD_MARKER,zs as MEDIA_TYPE_OPTIONS,Zl as NOT_BOUND_TO_POST,ps as PanelBand,_r as PanelNoteLine,zr as PhoneChoiceRow,jr as PhoneChoiceStrip,Le as SCAFFOLD_FIELD_MARKER,ua as SCALAR_TEXT_CONTROLS,hr as SiteGapDefaultReset,X as Slider,xt as Swatches,da as TEXT_CONTROL_KINDS,w as TEXT_FIELD_MARKER,Qs as TICKER_ITEMS_ROW,di as TextListField,ne as WIDTH_LABEL,gr as WidthDefaultReset,ci as aimAfterListChange,Ns as anchorFields,N as backTo,hs as backgroundField,Es as blockSizeFields,Cs as boxBlockSpacingField,Ms as boxFillField,ws as boxPhoneRowField,Wr as boxShareField,_s as boxSharePhoneField,ti as boxThemeIndexOf,as as bucketHeader,xs as buttonBorderField,bs as buttonWordsEntryField,Gr as cardCornersField,Ir as cardImageBackgroundField,fi as cardImageField,na as cardMediaFields,ys as cardShapeFields,ra as cardShowFields,oa as cardStyleFields,Ts as cellWidthFields,Bs as checkbox,Gs as colorInput,Wl as containerDirectionField,Gl as containerGapField,Ml as containerGapPhoneField,li as coordsResultTip,ts as copyText,St as cornerSidesField,be as cornersRowField,As as date,ks as dateTime,cs as designGroupHeader,ia as displayFields,Us as edgePad,is as entriesHiddenForTab,Js as focusAfterRemove,Ws as focusKeptField,ds as foldMarker,se as foldMetaOf,wr as foldTitleOf,sa as galleryLayoutField,Ls as heightFields,Kl as heroGroupPlacementPoints,Oe as hidableText,Cr as hintIsWhileTyping,la as imageCornersField,Vl as inOwnBox,ss as isBucketHeader,xe as keptBy,ns as linkField,Ys as loadingShowsField,$s as multiSelect,vs as pageBackgroundField,ls as panelNote,Xr as phoneChoiceField,Tt as phoneOverrideField,es as plainText,os as plainTextarea,ge as pxField,us as quietMarker,Ee as readHidable,si as rowText,Xs as searchSelect,Ct as sectionBorderField,Fr as sectionCornersField,gs as sectionShapeFields,ms as sectionThemeFields,ai as setRowText,Is as sizeField,js as sourceField,Os as spacingFields,Ps as stickFields,Rs as swapPadding,Ss as templateField,Jl as text,Nt as textFieldIdentifier,Xl as textFieldOffPage,zl as textFieldPanelOnly,ea as textList,ta as textListRowField,Ql as textarea,Ot as toggle,Vs as upload,Tr as useSelectedPatch,v as useSelectedProps,E as useSelectedSibling,fr as useSiteGapDetail,Fs as widthField,Yl as withIdentifier,$l as withOffPage,jl as withPanelOnly,Ul as withScaffold};
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
export declare function
|
|
1
|
+
export declare function enclosingSection(data: unknown, id: string): {
|
|
2
|
+
type: string;
|
|
3
|
+
props: Record<string, unknown>;
|
|
4
|
+
} | null;
|
|
5
|
+
export declare function enclosingPath(data: unknown, id: string): Record<string, unknown>[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function u(r,t){const o=r?.content;if(!Array.isArray(o))return null;for(const n of o){if(!n||typeof n!="object")continue;const{type:f,props:e}=n;if(e?.id===t)return null;if(c(n,t,0))return{type:typeof f=="string"?f:"",props:e??{}}}return null}function c(r,t,o){if(o>12||!r||typeof r!="object")return!1;if(Array.isArray(r))return r.some(f=>c(f,t,o+1));const n=r.props;return n&&typeof n=="object"&&n.id===t?!0:Object.values(r).some(f=>c(f,t,o+1))}function i(r,t){const o=r?.content;return Array.isArray(o)?s(o,t,0)??[]:[]}function s(r,t,o){if(o>12||!r||typeof r!="object")return null;if(Array.isArray(r)){for(const f of r){const e=s(f,t,o+1);if(e)return e}return null}const n=r.props;if(n&&typeof n=="object"){if(n.id===t)return[];for(const f of Object.values(n)){const e=s(f,t,o+1);if(e)return[n,...e]}return null}for(const f of Object.values(r)){const e=s(f,t,o+1);if(e)return e}return null}export{i as enclosingPath,u as enclosingSection};
|