efficient-web-builder 1.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +47 -0
- package/README.md +2 -1
- package/dist/components/AddBlockRow.d.ts +1 -7
- package/dist/components/AddBlockRow.js +1 -1
- package/dist/components/AddChildRow.d.ts +1 -6
- package/dist/components/AddChildRow.js +1 -1
- package/dist/components/AddSidePanel.d.ts +2 -39
- package/dist/components/AddSidePanel.js +1 -1
- package/dist/components/BlockGapField.js +1 -1
- package/dist/components/BlogPostSource.js +1 -1
- package/dist/components/Breadcrumb.js +1 -1
- package/dist/components/Btn.js +1 -1
- package/dist/components/CardShadowField.js +1 -1
- package/dist/components/CategoryBar.js +1 -1
- package/dist/components/ChartSection.js +1 -1
- package/dist/components/ChatSettingsPanel.js +1 -1
- package/dist/components/ClearColoursDialog.js +1 -1
- package/dist/components/ContactLocations.js +5 -5
- package/dist/components/CornersField.d.ts +0 -1
- package/dist/components/CornersField.js +1 -1
- package/dist/components/DocBody.js +1 -1
- package/dist/components/DuplicateToPageMenu.js +1 -1
- package/dist/components/EditorScreenMount.d.ts +1 -0
- package/dist/components/EditorScreenMount.js +1 -0
- package/dist/components/EditorStoreProvider.d.ts +1 -0
- package/dist/components/EditorStoreProvider.js +1 -0
- package/dist/components/FeaturedCover.js +1 -1
- package/dist/components/FieldGlyph.js +1 -1
- package/dist/components/Footprint.js +1 -1
- package/dist/components/HeadingAudit.js +1 -1
- package/dist/components/HeroImageField.js +1 -1
- package/dist/components/HeroSection.d.ts +2 -6
- package/dist/components/HeroSection.js +4 -4
- package/dist/components/HoverEffectField.js +1 -1
- package/dist/components/ImageBlock.js +1 -1
- package/dist/components/ImageFocusRow.js +1 -1
- package/dist/components/KeepHint.d.ts +5 -0
- package/dist/components/KeepHint.js +1 -0
- package/dist/components/LocationsGroupedField.js +1 -1
- package/dist/components/LongRead.js +1 -1
- package/dist/components/MediaSidePanel.d.ts +1 -6
- package/dist/components/MediaSidePanel.js +1 -1
- package/dist/components/MediaUploadField.js +1 -1
- package/dist/components/MockupSection.js +1 -1
- package/dist/components/MultiSelectField.d.ts +4 -1
- package/dist/components/MultiSelectField.js +1 -1
- package/dist/components/NodeContextMenu.d.ts +2 -96
- package/dist/components/NodeContextMenu.js +1 -1
- package/dist/components/PageEditGuardNotices.d.ts +1 -1
- package/dist/components/PageEditGuardNotices.js +1 -1
- package/dist/components/PagesPanel.js +1 -1
- package/dist/components/PanelToggleIcon.d.ts +1 -3
- package/dist/components/PanelToggleIcon.js +1 -1
- package/dist/components/PartResetDot.js +1 -1
- package/dist/components/PartSettingsPanel.d.ts +5 -0
- package/dist/components/PartSettingsPanel.js +1 -1
- package/dist/components/PhotographyField.js +1 -1
- package/dist/components/PostCard.js +1 -1
- package/dist/components/PreviewDeviceContext.d.ts +2 -4
- package/dist/components/PreviewDeviceContext.js +1 -1
- package/dist/components/PreviewPartsContext.d.ts +1 -3
- package/dist/components/PreviewPartsContext.js +1 -1
- package/dist/components/ProcessSteps.js +1 -1
- package/dist/components/RMark.js +1 -1
- package/dist/components/Reel.js +1 -1
- package/dist/components/SearchSelectField.d.ts +3 -1
- package/dist/components/SearchSelectField.js +1 -1
- package/dist/components/SectionEditor.d.ts +2 -5
- package/dist/components/SectionEditor.js +1 -1
- package/dist/components/SectionEditorShell.d.ts +1 -1
- package/dist/components/SectionEditorShell.js +1 -1
- package/dist/components/SectionHeader.js +1 -1
- package/dist/components/SectionThemePicker.d.ts +3 -1
- package/dist/components/SectionThemePicker.js +1 -1
- package/dist/components/SectionThumbnail.js +1 -1
- package/dist/components/ShadowColourField.js +1 -1
- package/dist/components/SidePanelHead.d.ts +1 -23
- package/dist/components/SidePanelHead.js +1 -1
- package/dist/components/SideSpaceField.d.ts +0 -1
- package/dist/components/SideSpaceField.js +1 -1
- package/dist/components/SiteEditorProvider.d.ts +3 -10
- package/dist/components/SiteEditorProvider.js +1 -1
- package/dist/components/SiteWidthField.d.ts +0 -1
- package/dist/components/SiteWidthField.js +1 -1
- package/dist/components/SlotChildActionsContext.d.ts +2 -13
- package/dist/components/SlotChildActionsContext.js +1 -1
- package/dist/components/SlotChildRows.js +1 -1
- package/dist/components/SocialLinksPanel.js +1 -1
- package/dist/components/SourceStatus.js +1 -1
- package/dist/components/Split.js +1 -1
- package/dist/components/StandaloneSectionEditor.d.ts +1 -0
- package/dist/components/StandaloneSectionEditor.js +1 -1
- package/dist/components/StorefrontDocumentContext.d.ts +2 -67
- package/dist/components/StorefrontDocumentContext.js +1 -1
- package/dist/components/StorefrontEditor.d.ts +1 -0
- package/dist/components/StorefrontEditor.js +1 -1
- package/dist/components/StorefrontEditorChrome.d.ts +1 -1
- package/dist/components/StorefrontEditorChrome.js +1 -1
- package/dist/components/StorefrontLinkField.d.ts +9 -0
- package/dist/components/StorefrontLinkField.js +1 -1
- package/dist/components/StylesPanel.js +1 -1
- package/dist/components/Testimonials.js +1 -1
- package/dist/components/TextStylesField.js +1 -1
- package/dist/components/ThemeCard.js +1 -1
- package/dist/components/ThemeColourField.js +1 -1
- package/dist/components/ThemeField.js +1 -1
- package/dist/components/TickerSettingsPanel.js +1 -1
- package/dist/components/Timeline.js +1 -1
- package/dist/components/TimelineTrack.js +1 -1
- package/dist/components/TitleWithButtons.js +1 -1
- package/dist/components/UiIcon.d.ts +2 -10
- package/dist/components/UiIcon.js +1 -1
- package/dist/components/WebsiteScreenParts.d.ts +2 -0
- package/dist/components/WebsiteScreenParts.js +1 -0
- package/dist/components/WebsiteSettingsPanel.js +1 -1
- package/dist/components/WidthFollowField.js +1 -1
- package/dist/components/goldPhrases.js +1 -1
- package/dist/components/panel-widths.d.ts +2 -12
- package/dist/components/panel-widths.js +1 -1
- package/dist/components/storefront-editor.css +147 -1195
- package/dist/components/useFooterFocus.d.ts +2 -0
- package/dist/components/useFooterFocus.js +1 -0
- package/dist/components/useLocationsTree.d.ts +6 -0
- package/dist/components/useLocationsTree.js +1 -0
- package/dist/components/usePartBridge.d.ts +1 -9
- package/dist/components/usePartBridge.js +1 -1
- package/dist/components/usePinnedChromeSeed.d.ts +2 -0
- package/dist/components/usePinnedChromeSeed.js +1 -0
- package/dist/components/useSocialSettings.js +1 -1
- package/dist/components/useStorefrontBlogPosts.js +1 -1
- package/dist/lib/client-only.d.ts +1 -0
- package/dist/lib/client-only.js +1 -0
- package/dist/lib/content/contact.js +3 -3
- package/dist/lib/content/subscribe.js +1 -1
- package/dist/lib/content/view-tiers.d.ts +2 -6
- package/dist/lib/content/view-tiers.js +1 -1
- package/dist/lib/editor-admin-bridge.d.ts +2 -29
- package/dist/lib/editor-admin-bridge.js +1 -1
- package/dist/lib/editor-backend-error.d.ts +2 -0
- package/dist/lib/editor-backend-error.js +1 -0
- package/dist/lib/editor-blocks.d.ts +2 -2
- package/dist/lib/editor-chrome.d.ts +2 -52
- package/dist/lib/editor-chrome.js +1 -1
- package/dist/lib/editor-document-adapter.d.ts +3 -51
- package/dist/lib/editor-document-adapter.js +1 -1
- package/dist/lib/editor-document-addressing.d.ts +2 -0
- package/dist/lib/editor-document-addressing.js +1 -0
- package/dist/lib/editor-document-contract.d.ts +1 -0
- package/dist/lib/editor-document-contract.js +0 -0
- package/dist/lib/editor-document-hooks.d.ts +1 -15
- package/dist/lib/editor-document-switch.d.ts +2 -0
- package/dist/lib/editor-document-switch.js +1 -0
- package/dist/lib/editor-failure.d.ts +1 -4
- package/dist/lib/editor-failure.js +1 -1
- package/dist/lib/editor-host-inbound.d.ts +1 -1
- package/dist/lib/editor-host-inbound.js +1 -1
- package/dist/lib/editor-host.d.ts +2 -135
- package/dist/lib/editor-host.js +1 -1
- package/dist/lib/editor-key-scope.d.ts +1 -3
- package/dist/lib/editor-key-scope.js +1 -1
- package/dist/lib/editor-load-error.d.ts +1 -4
- package/dist/lib/editor-load-error.js +1 -1
- package/dist/lib/editor-media-panel.d.ts +2 -23
- package/dist/lib/editor-media-panel.js +1 -1
- package/dist/lib/editor-media-picker.d.ts +2 -12
- package/dist/lib/editor-media-picker.js +1 -1
- package/dist/lib/editor-page-lock.d.ts +1 -1
- package/dist/lib/editor-page-lock.js +1 -1
- package/dist/lib/editor-screen.d.ts +2 -0
- package/dist/lib/editor-screen.js +1 -0
- package/dist/lib/editor-section-templates.d.ts +1 -2
- package/dist/lib/editor-section-templates.js +1 -1
- package/dist/lib/editor-session-context.d.ts +1 -7
- package/dist/lib/editor-session-context.js +1 -1
- package/dist/lib/editor-session.d.ts +2 -45
- package/dist/lib/editor-session.js +1 -1
- package/dist/lib/editor-site-slug.js +1 -1
- package/dist/lib/editor-theme.d.ts +1 -1
- package/dist/lib/editor-theme.js +1 -1
- package/dist/lib/hero-arrows.d.ts +1 -1
- package/dist/lib/links/link-filters.d.ts +1 -0
- package/dist/lib/links/link-filters.js +0 -0
- package/dist/lib/links/link-picker-setup.d.ts +29 -0
- package/dist/lib/links/link-picker-setup.js +1 -0
- package/dist/lib/puck/ColourControl.d.ts +4 -1
- package/dist/lib/puck/ColourControl.js +1 -1
- package/dist/lib/puck/MarkupToolbar.js +1 -1
- package/dist/lib/puck/add-palette.d.ts +3 -9
- package/dist/lib/puck/add-palette.js +1 -1
- package/dist/lib/puck/add-target-types.d.ts +1 -0
- package/dist/lib/puck/add-target-types.js +0 -0
- package/dist/lib/puck/add-target.d.ts +2 -9
- package/dist/lib/puck/block-choice.d.ts +2 -0
- package/dist/lib/puck/block-choice.js +1 -0
- package/dist/lib/puck/block-offer.js +1 -1
- package/dist/lib/puck/block-types-in.d.ts +1 -1
- package/dist/lib/puck/block-types-in.js +1 -1
- package/dist/lib/puck/blocks/general/CategoryBar/fields.js +1 -1
- package/dist/lib/puck/blocks/general/Chart/fields.js +1 -1
- package/dist/lib/puck/blocks/general/FAQ/render.js +1 -1
- package/dist/lib/puck/blocks/general/FeaturedCover/render.js +1 -1
- package/dist/lib/puck/blocks/general/Footprint/fields.js +1 -1
- package/dist/lib/puck/blocks/general/IntroBleed/render.js +1 -1
- package/dist/lib/puck/blocks/general/LogoBlock/fields.js +1 -1
- package/dist/lib/puck/blocks/general/LongRead/render.js +1 -1
- package/dist/lib/puck/blocks/general/Masthead/render.js +1 -1
- package/dist/lib/puck/blocks/general/Mockup/fields.js +1 -1
- package/dist/lib/puck/blocks/general/OrderSummary/render.js +1 -1
- package/dist/lib/puck/blocks/general/ParagraphsA/render.js +1 -1
- package/dist/lib/puck/blocks/general/PostCard/render.js +1 -1
- package/dist/lib/puck/blocks/general/ProcessSteps/render.js +1 -1
- package/dist/lib/puck/blocks/general/Series/render.js +1 -1
- package/dist/lib/puck/blocks/general/Split/render.js +1 -1
- package/dist/lib/puck/blocks/general/Testimonials/fields.js +1 -1
- package/dist/lib/puck/blocks/general/Testimonials/render.js +1 -1
- package/dist/lib/puck/blocks/general/TimelineTrack/render.js +1 -1
- package/dist/lib/puck/blocks/general/index.d.ts +2 -2
- package/dist/lib/puck/blocks/placeholders.js +1 -1
- package/dist/lib/puck/content-tree.d.ts +2 -43
- package/dist/lib/puck/content-tree.js +1 -1
- package/dist/lib/puck/controls.d.ts +11 -22
- package/dist/lib/puck/controls.js +1 -1
- package/dist/lib/puck/device-fields.d.ts +2 -24
- package/dist/lib/puck/device-fields.js +1 -1
- package/dist/lib/puck/field-buckets.d.ts +2 -0
- package/dist/lib/puck/field-buckets.js +1 -0
- package/dist/lib/puck/field-groups.d.ts +3 -3
- package/dist/lib/puck/field-groups.js +1 -1
- package/dist/lib/puck/field-markers.d.ts +2 -16
- package/dist/lib/puck/field-markers.js +1 -1
- package/dist/lib/puck/footer-block-row-name.d.ts +4 -0
- package/dist/lib/puck/footer-block-row-name.js +1 -0
- package/dist/lib/puck/footer-blocks.d.ts +2 -10
- package/dist/lib/puck/footer-blocks.js +1 -1
- package/dist/lib/puck/geocode-resolve.js +1 -1
- package/dist/lib/puck/hidable.d.ts +2 -9
- package/dist/lib/puck/hidable.js +1 -1
- package/dist/lib/puck/locations-tree.js +2 -2
- package/dist/lib/puck/neutralization-contracts.js +1 -1
- package/dist/lib/puck/palette-sections.d.ts +2 -0
- package/dist/lib/puck/palette-sections.js +1 -0
- package/dist/lib/puck/panel-fields.d.ts +2 -12
- package/dist/lib/puck/panel-fields.js +1 -1
- package/dist/lib/puck/panel-no-control-mark.d.ts +2 -7
- package/dist/lib/puck/panel-no-control-mark.js +1 -1
- package/dist/lib/puck/part-id.d.ts +1 -0
- package/dist/lib/puck/part-id.js +1 -0
- package/dist/lib/puck/part-rows.js +1 -1
- package/dist/lib/puck/pinned-seed-gate.d.ts +2 -12
- package/dist/lib/puck/pinned-seed-gate.js +1 -1
- package/dist/lib/puck/preview-click.d.ts +1 -2
- package/dist/lib/puck/preview-click.js +1 -1
- package/dist/lib/puck/preview-dom.d.ts +1 -6
- package/dist/lib/puck/preview-dom.js +1 -1
- package/dist/lib/puck/preview-events.d.ts +2 -0
- package/dist/lib/puck/preview-events.js +1 -0
- package/dist/lib/puck/preview-selection-context.d.ts +2 -19
- package/dist/lib/puck/preview-selection-context.js +1 -1
- package/dist/lib/puck/section-catalog.js +1 -1
- package/dist/lib/puck/section-descriptions.js +1 -1
- package/dist/lib/puck/section-doc.d.ts +1 -5
- package/dist/lib/puck/section-doc.js +1 -1
- package/dist/lib/puck/section-groups.d.ts +1 -1
- package/dist/lib/puck/slot-child-name.d.ts +2 -8
- package/dist/lib/puck/slot-child-name.js +1 -1
- package/dist/lib/puck/slot-heal.d.ts +1 -2
- package/dist/lib/puck/slot-heal.js +1 -1
- package/dist/lib/puck/slot-section-spec.d.ts +1 -0
- package/dist/lib/puck/slot-section-spec.js +0 -0
- package/dist/lib/puck/slot-specs.d.ts +2 -13
- package/dist/lib/puck/style-clipboard.d.ts +1 -19
- package/dist/lib/puck/style-clipboard.js +1 -1
- package/dist/lib/puck/text-control-kinds.d.ts +2 -13
- package/dist/lib/puck/text-control-kinds.js +1 -1
- package/dist/lib/puck/text-parts.d.ts +2 -5
- package/dist/lib/puck/text-parts.js +1 -1
- package/dist/lib/puck/tree-reveal.d.ts +1 -11
- package/dist/lib/puck/tree-reveal.js +1 -1
- package/dist/lib/puck/use-section-ops.d.ts +2 -25
- package/dist/lib/puck/use-section-ops.js +1 -1
- package/dist/lib/reel.d.ts +1 -1
- package/dist/lib/section-template-types.d.ts +1 -21
- package/dist/lib/sections/divider-style.js +1 -1
- package/dist/lib/sections/new-section-node.d.ts +2 -0
- package/dist/lib/sections/new-section-node.js +1 -0
- package/dist/lib/sections/product-card-style.js +1 -1
- package/dist/lib/sections/ticker-style.js +1 -1
- package/dist/lib/source-rules/accent-token-name.d.ts +20 -0
- package/dist/lib/source-rules/accent-token-name.js +4 -0
- package/dist/lib/source-rules/button-corners.d.ts +13 -0
- package/dist/lib/source-rules/button-corners.js +2 -0
- package/dist/lib/source-rules/editor-chrome-note.d.ts +16 -0
- package/dist/lib/source-rules/editor-chrome-note.js +13 -0
- package/dist/lib/source-rules/editor-context-menu.d.ts +5 -0
- package/dist/lib/source-rules/editor-context-menu.js +4 -0
- package/dist/lib/source-rules/editor-puck-drag-off.d.ts +8 -0
- package/dist/lib/source-rules/editor-puck-drag-off.js +4 -0
- package/dist/lib/source-rules/efficient-easel-version.d.ts +9 -0
- package/dist/lib/source-rules/efficient-easel-version.js +2 -0
- package/dist/lib/source-rules/every-button-follows-the-button-colour.d.ts +12 -0
- package/dist/lib/source-rules/every-button-follows-the-button-colour.js +7 -0
- package/dist/lib/source-rules/flat-theme-palette.d.ts +10 -0
- package/dist/lib/source-rules/flat-theme-palette.js +8 -0
- package/dist/lib/source-rules/full-width-means-full.d.ts +8 -0
- package/dist/lib/source-rules/full-width-means-full.js +2 -0
- package/dist/lib/source-rules/heading-ceiling-sweep.d.ts +11 -0
- package/dist/lib/source-rules/heading-ceiling-sweep.js +8 -0
- package/dist/lib/source-rules/label-hints.d.ts +7 -0
- package/dist/lib/source-rules/label-hints.js +5 -0
- package/dist/lib/source-rules/label-vocabulary.d.ts +14 -0
- package/dist/lib/source-rules/label-vocabulary.js +5 -0
- package/dist/lib/source-rules/mirrored-rows-agree.d.ts +19 -0
- package/dist/lib/source-rules/mirrored-rows-agree.js +10 -0
- package/dist/lib/source-rules/no-comment-in-jsx.d.ts +9 -0
- package/dist/lib/source-rules/no-comment-in-jsx.js +7 -0
- package/dist/lib/source-rules/no-glyph-rows.d.ts +15 -0
- package/dist/lib/source-rules/no-glyph-rows.js +4 -0
- package/dist/lib/source-rules/one-colour-control.d.ts +7 -0
- package/dist/lib/source-rules/one-colour-control.js +2 -0
- package/dist/lib/source-rules/one-dropdown.d.ts +10 -0
- package/dist/lib/source-rules/one-dropdown.js +4 -0
- package/dist/lib/source-rules/one-editable-list.d.ts +16 -0
- package/dist/lib/source-rules/one-editable-list.js +6 -0
- package/dist/lib/source-rules/one-editor-list.d.ts +7 -0
- package/dist/lib/source-rules/one-editor-list.js +3 -0
- package/dist/lib/source-rules/one-right-click.d.ts +10 -0
- package/dist/lib/source-rules/one-right-click.js +2 -0
- package/dist/lib/source-rules/one-switch.d.ts +9 -0
- package/dist/lib/source-rules/one-switch.js +7 -0
- package/dist/lib/source-rules/one-up-level-link.d.ts +16 -0
- package/dist/lib/source-rules/one-up-level-link.js +18 -0
- package/dist/lib/source-rules/panel-colour-tokens.d.ts +48 -0
- package/dist/lib/source-rules/panel-colour-tokens.js +20 -0
- package/dist/lib/source-rules/panel-no-divider-lines.d.ts +14 -0
- package/dist/lib/source-rules/panel-no-divider-lines.js +10 -0
- package/dist/lib/source-rules/panel-one-arrow.d.ts +21 -0
- package/dist/lib/source-rules/panel-one-arrow.js +1 -0
- package/dist/lib/source-rules/panel-one-hover.d.ts +8 -0
- package/dist/lib/source-rules/panel-one-hover.js +2 -0
- package/dist/lib/source-rules/panel-rows-use-the-shared-row.d.ts +23 -0
- package/dist/lib/source-rules/panel-rows-use-the-shared-row.js +22 -0
- package/dist/lib/source-rules/part-slider-fills-row.d.ts +11 -0
- package/dist/lib/source-rules/part-slider-fills-row.js +29 -0
- package/dist/lib/source-rules/part-style-naming.d.ts +10 -0
- package/dist/lib/source-rules/part-style-naming.js +2 -0
- package/dist/lib/source-rules/puck-document-surfaces.d.ts +16 -0
- package/dist/lib/source-rules/puck-document-surfaces.js +8 -0
- package/dist/lib/source-rules/reduced-motion.d.ts +26 -0
- package/dist/lib/source-rules/reduced-motion.js +9 -0
- package/dist/lib/source-rules/route-content-width.d.ts +22 -0
- package/dist/lib/source-rules/route-content-width.js +5 -0
- package/dist/lib/source-rules/rule.d.ts +21 -0
- package/dist/lib/source-rules/rule.js +1 -0
- package/dist/lib/source-rules/section-theme-preview.d.ts +9 -0
- package/dist/lib/source-rules/section-theme-preview.js +8 -0
- package/dist/lib/source-rules/site-gutter.d.ts +6 -0
- package/dist/lib/source-rules/site-gutter.js +4 -0
- package/dist/lib/source-rules/site-square-by-default.d.ts +17 -0
- package/dist/lib/source-rules/site-square-by-default.js +3 -0
- package/dist/lib/source-rules/site-width.d.ts +11 -0
- package/dist/lib/source-rules/site-width.js +7 -0
- package/dist/lib/source-rules/size-token-paints.d.ts +8 -0
- package/dist/lib/source-rules/size-token-paints.js +11 -0
- package/dist/lib/source-rules/social-icons-import.d.ts +6 -0
- package/dist/lib/source-rules/social-icons-import.js +6 -0
- package/dist/lib/source-rules/source-status-is-shared.d.ts +7 -0
- package/dist/lib/source-rules/source-status-is-shared.js +1 -0
- package/dist/lib/source-rules/style-face-matches-size.d.ts +10 -0
- package/dist/lib/source-rules/style-face-matches-size.js +4 -0
- package/dist/lib/source-rules/support/accent-rename-bytes.d.ts +5 -0
- package/dist/lib/source-rules/support/accent-rename-bytes.js +1 -0
- package/dist/lib/source-rules/support/css-box-model.d.ts +5 -0
- package/dist/lib/source-rules/support/css-box-model.js +1 -0
- package/dist/lib/source-rules/support/css-length.d.ts +2 -0
- package/dist/lib/source-rules/support/css-length.js +1 -0
- package/dist/lib/source-rules/support/css-rules.d.ts +12 -0
- package/dist/lib/source-rules/support/css-rules.js +1 -0
- package/dist/lib/source-rules/support/css-source.d.ts +2 -0
- package/dist/lib/source-rules/support/css-source.js +3 -0
- package/dist/lib/source-rules/support/label-extraction.d.ts +14 -0
- package/dist/lib/source-rules/support/label-extraction.js +5 -0
- package/dist/lib/source-rules/support/panel-select-cascade.d.ts +72 -0
- package/dist/lib/source-rules/support/panel-select-cascade.js +2 -0
- package/dist/lib/source-rules/support/part-slider-call-sites.d.ts +9 -0
- package/dist/lib/source-rules/support/part-slider-call-sites.js +17 -0
- package/dist/lib/source-rules/support/registry-source.d.ts +14 -0
- package/dist/lib/source-rules/support/registry-source.js +3 -0
- package/dist/lib/source-rules/support/ts-source.d.ts +2 -0
- package/dist/lib/source-rules/support/ts-source.js +3 -0
- package/dist/lib/source-rules/theme-mode-controls-gone.d.ts +10 -0
- package/dist/lib/source-rules/theme-mode-controls-gone.js +5 -0
- package/dist/lib/source-rules/upload-intake-guard.d.ts +11 -0
- package/dist/lib/source-rules/upload-intake-guard.js +6 -0
- package/dist/lib/source-rules/word-styles.d.ts +8 -0
- package/dist/lib/source-rules/word-styles.js +4 -0
- package/dist/lib/theme-row-persist.js +1 -1
- package/dist/lib/theme-save-message.js +1 -1
- package/dist/lib/web-backend.d.ts +4 -59
- package/dist/lib/web-backend.js +1 -1
- package/dist/lib/website-document-addressing.d.ts +2 -0
- package/dist/lib/website-document-addressing.js +1 -0
- package/dist/lib/website-host-inbound.d.ts +1 -0
- package/dist/lib/website-host-inbound.js +1 -0
- package/dist/lib/website-session.d.ts +5 -0
- package/dist/lib/website-session.js +1 -0
- package/package.json +18 -8
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
"use client";import{jsx as c,jsxs as R}from"react/jsx-runtime";import{useCallback as p,useEffect as f,useId as Re,useRef as i,useState as b}from"react";import{markOverlayPortal as I}from"../lib/puck/overlay-portal.js";import Le from"./Ticker.js";import{HeroSlideStyleContext as Oe}from"./HeroSlide.js";import Te from"./HeroArrows.js";import He from"./Reel.js";import{usePreviewTicker as Ae}from"./PreviewTickerContext.js";import{useReducedMotion as Ce}from"./useReducedMotion.js";import{tk as
|
|
1
|
+
"use client";import{jsx as c,jsxs as R}from"react/jsx-runtime";import{useCallback as p,useEffect as f,useId as Re,useRef as i,useState as b}from"react";import{markOverlayPortal as I}from"../lib/puck/overlay-portal.js";import Le from"./Ticker.js";import{HeroSlideStyleContext as Oe}from"./HeroSlide.js";import Te from"./HeroArrows.js";import He from"./Reel.js";import{usePreviewTicker as Ae}from"./PreviewTickerContext.js";import{useReducedMotion as Ce}from"./useReducedMotion.js";import{tk as Z}from"./floating-editor/tokens.js";import{hasSectionHeight as Ie,resolveSectionHeight as ee}from"../lib/content/section-height.js";import{HEADER_HEIGHT_CSS as Ne}from"../lib/puck/header-clearance.js";import{nextReel as Me,normaliseHeroReelShape as Pe,reelShown as De}from"../lib/reel.js";import{arrowsShown as $e,arrowStep as Ve}from"../lib/hero-arrows.js";import{swipeEnabled as ze,swipeStep as Xe}from"../lib/hero-swipe.js";import{videoControlShown as qe,videoHeld as Ge}from"../lib/hero-video-control.js";import{HERO_SLIDER_GOTO_EVENT as N}from"../lib/puck/preview-events.js";const je=`
|
|
2
2
|
.hero-ticker-pick { cursor: pointer; }
|
|
3
3
|
.hero-ticker-pick:hover {
|
|
4
|
-
outline: 2px solid color-mix(in srgb, ${
|
|
4
|
+
outline: 2px solid color-mix(in srgb, ${Z.accent} 45%, transparent);
|
|
5
5
|
outline-offset: -2px;
|
|
6
6
|
}
|
|
7
7
|
.hero-ticker-pick[data-selected] {
|
|
8
|
-
outline: 2px solid ${
|
|
8
|
+
outline: 2px solid ${Z.accent};
|
|
9
9
|
outline-offset: -2px;
|
|
10
10
|
}
|
|
11
|
-
`,Be="Play video",Ke="Hold video",Ye="flex h-7 cursor-pointer items-center gap-1.5 rounded-full border border-overlay-chrome/25 bg-overlay-scrim/80 px-[11px] font-mono text-[11px] leading-none tracking-[0.05em] text-overlay-fg",Fe="item",Ue=["","","","","",""],
|
|
11
|
+
`,Be="Play video",Ke="Hold video",Ye="flex h-7 cursor-pointer items-center gap-1.5 rounded-full border border-overlay-chrome/25 bg-overlay-scrim/80 px-[11px] font-mono text-[11px] leading-none tracking-[0.05em] text-overlay-fg",Fe="item",Ue=["","","","","",""],te=new Map;function Je(L,w){const h=L?.ownerDocument?.defaultView;if(h)return h.addEventListener(N,w),()=>h.removeEventListener(N,w)}function Qe({slides:L,alignment:w,textureOpacity:h,showTexture:re,textureColor:oe,phoneUpDown:ne,phoneSideways:se,autoplay:M,autoplayInterval:O,showTicker:ce,tickerItems:ae,heightDesktop:P,heightMobile:D,showPicker:ie,pickerShape:le,pickerPlacement:ue,showArrows:de,arrowsShape:me,arrowsPlacement:pe,editing:n}){const $=Ie(P,D),fe=$?"h-[var(--sf-hero-h-m)] min-[720px]:h-[var(--sf-hero-h-d)]":"h-screen min-h-[680px]",he=$?{"--sf-hero-h-d":ee(P),"--sf-hero-h-m":ee(D)}:void 0,T=(ae??Ue.map(e=>({text:e}))).map(e=>e?.text?.trim()?e.text:n?Fe:"").filter(Boolean),V=ce!==!1,u=i(null),z=i(null),X=i(null),q=i(null),G=i(null),j=Re(),E=i(j),[y,ve]=b([]),[xe,B]=b(0),v=i(0),[K,Y]=b(!1),[g,ke]=b(!1),[F,be]=b(null),H=Ce(),{selectedHeroId:we,select:U}=Ae(),S=p(()=>u.current?.querySelector(".hero-track")??null,[]),l=p((e,t=!1)=>{B(e),v.current=e,te.set(E.current,e);const r=u.current?.querySelector(".hero-track");if(r)if(t){const o=r.style.transition;r.style.transition="none",r.style.transform=`translateX(-${Math.max(0,e)*100}%)`,r.offsetHeight,r.style.transition=o}else r.style.transform=`translateX(-${Math.max(0,e)*100}%)`},[]);f(()=>{const e=u.current,t=e?.getAttribute("data-puck-component")||e?.closest("[data-puck-component]")?.getAttribute("data-puck-component")||j;E.current=t,be(t);const r=te.get(t);typeof r=="number"&&(B(r),v.current=r)},[]),f(()=>{const e=S();if(!e)return;const t=()=>{ve(o=>Me(o,e.querySelectorAll("[data-slide-name]")))};t();const r=new MutationObserver(t);return r.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-slide-name","data-slide-process","data-slide-media"]}),()=>{r.disconnect()}},[S]),f(()=>{if(!n)return;const e=t=>{const r=t.detail;if(!r||typeof r.index!="number")return;const o=u.current,a=o?.getAttribute("data-puck-component")||o?.closest("[data-puck-component]")?.getAttribute("data-puck-component")||E.current;r.id&&r.id!==a||l(r.index,!0)};return Je(u.current,e)},[n,l]);const s=y.length,d=Math.min(Math.max(xe,0),Math.max(0,s-1)),A=De({shown:ie,count:s}),J=$e({shown:de,count:s}),Q=qe({editing:n,shown:d,slides:y}),Ee=Ge({editing:n,playing:g,controlShown:Q}),_=ze({count:s,editing:n}),m=i(null),x=i(null),ye=p(e=>{if(m.current=null,x.current=null,!_||e.touches.length!==1)return;const t=e.touches[0];m.current={x:t.clientX,y:t.clientY},x.current={x:t.clientX,y:t.clientY}},[_]),ge=p(e=>{if(!m.current)return;if(e.touches.length!==1){m.current=null;return}const t=e.touches[0];x.current={x:t.clientX,y:t.clientY}},[]),Se=p(()=>{const e=m.current,t=x.current;if(m.current=null,x.current=null,!_||!e||!t)return;const r=Xe(t.x-e.x,t.y-e.y,v.current,s);r!==v.current&&l(r)},[_,s,l]);f(()=>{if(n||!M||K||H||s<=1)return;const t=Math.max(1,typeof O=="number"?O:6)*1e3,r=window.setTimeout(()=>l((d+1)%s),t);return()=>window.clearTimeout(r)},[n,M,O,K,H,s,d,l]),f(()=>{const e=[z.current,X.current,q.current].filter(Boolean),t=e.map(o=>I(o)),r=o=>{const a=o.target,k=a.closest("[data-hero-nav]"),W=k??a.closest("[data-idx]");if(!W)return;o.stopPropagation(),o.preventDefault();const C=k?Ve(k.dataset.heroNav,v.current,s):Number(W.dataset.idx);Number.isNaN(C)||(l(C,n),S()?.querySelectorAll("[data-slide-name]")[C]?.click())};return e.forEach(o=>o.addEventListener("click",r,{capture:!0})),()=>{t.forEach(o=>o?.()),e.forEach(o=>o.removeEventListener("click",r,{capture:!0}))}},[s,l,S,n]),f(()=>{if(!n)return;const e=G.current;if(!e)return;const t=I(e),r=o=>{o.stopPropagation(),o.preventDefault();const a=u.current,k=a?.getAttribute("data-puck-component")||a?.closest("[data-puck-component]")?.getAttribute("data-puck-component")||E.current;U(k)};return e.addEventListener("click",r,{capture:!0}),()=>{t?.(),e.removeEventListener("click",r,{capture:!0})}},[n,U,V,T.length]);const _e=p(e=>{if(!e)return;const t=I(e),r=o=>{o.stopPropagation(),o.preventDefault(),ke(a=>!a)};return e.addEventListener("click",r,{capture:!0}),()=>{t?.(),e.removeEventListener("click",r,{capture:!0})}},[]);return c(Oe.Provider,{value:{alignment:w,textureOpacity:h,textureOn:re,textureColor:oe,quietVideo:Ee,phoneUpDown:ne,phoneSideways:se},children:R("div",{ref:u,className:`relative mx-[var(--sf-hero-bleed-m,calc(50%_-_50vw))] w-[var(--sf-hero-bleed-w,100vw)] ${fe} max-w-[var(--sf-hero-cap,none)] overflow-hidden`,style:he,onMouseEnter:()=>Y(!0),onMouseLeave:()=>Y(!1),onTouchStart:ye,onTouchMove:ge,onTouchEnd:Se,children:[c(L,{className:"hero-track flex h-full [&>*]:h-full [&>*]:min-w-full [&>*]:shrink-0 [&>*]:basis-full",style:{transform:`translateX(-${d*100}%)`,transition:H?"none":"transform 600ms cubic-bezier(.22,.61,.36,1)"},minEmptyHeight:400}),Q&&c("div",{ref:_e,"data-hero-video-control":g?"playing":"held",className:"sf-hero-video-control absolute left-6 z-[7]",style:{top:`calc(${Ne} + 16px)`},children:R("button",{type:"button",className:Ye,children:[c("span",{"aria-hidden":"true",children:g?"❚❚":"▶"}),g?Ke:Be]})}),(A||J)&&R("div",{className:"pointer-events-none absolute inset-y-0 left-[var(--sf-hero-chrome-x,var(--sf-site-gutter,40px))] right-[var(--sf-hero-chrome-x,var(--sf-site-gutter,40px))] z-[6] mx-auto max-w-[var(--sf-hero-chrome-cap,calc(min(var(--sf-page-cap,var(--sf-site-width,1600px)),var(--sf-site-width,1600px))_-_var(--sf-site-gutter,40px)*2))]",children:[A&&c(He,{ref:z,slides:y,active:d,shape:Pe(le),placement:ue}),J&&c(Te,{ref:q,shape:me,placement:pe})]}),A&&c("div",{ref:X,className:"sf-hero-phone-dots absolute bottom-[80px] left-1/2 z-[6] hidden -translate-x-1/2 items-center gap-2",children:y.map((e,t)=>c("button",{type:"button","data-idx":t,"aria-label":`Go to slide ${t+1}`,className:`h-2 rounded-full transition-all motion-reduce:transition-none ${t===d?"w-5 bg-accent":"w-2 bg-white/45 hover:bg-white/70"}`},t))}),V&&T.length>0&&R("div",{ref:G,className:`sf-hero-ticker absolute inset-x-0 bottom-0 z-[5] border-t border-overlay-chrome/10 py-3.5${n?" hero-ticker-pick":""}`,"data-selected":n&&F!=null&&we===F?"":void 0,style:{background:"rgba(10,10,10,.55)"},children:[n&&c("style",{children:je}),c(Le,{items:T,backdrop:"dark-media"})]})]})})}export{Ue as DEFAULT_TICKER_ITEMS,N as HERO_SLIDER_GOTO_EVENT,Ke as HERO_VIDEO_HOLD_LABEL,Be as HERO_VIDEO_PLAY_LABEL,Qe as default,Je as subscribeSliderGoto};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e}from"react/jsx-runtime";import{SettingsField as
|
|
1
|
+
"use client";import{jsx as e}from"react/jsx-runtime";import{SettingsDefaultReset as s,SettingsField as c,SettingsSegmented as d}from"efficient-easel/panel";import{HoverIcon as h}from"efficient-easel/icons";import{HOVER_EFFECTS as u,DEFAULT_HOVER_EFFECT as l}from"../lib/theme.js";const t={none:"None",lift:"Lift",highlight:"Highlight"},g="What a card does when a shopper points at it — or taps it, on a phone. Highlight is the effect your cards already use.";function p({value:o,onChange:i,showHint:f=!0}){const n=o===null,a=o??l;return e(c,{label:"Hover effect",icon:e(h,{}),value:t[a],changed:!n,action:e(s,{label:"Hover effect",changed:!n,detail:t[l],onReset:()=>i(null)}),hint:f?g:void 0,children:e(d,{options:u.map(r=>({id:r,label:t[r]})),value:a,ariaLabel:"Hover effect",onChange:i})})}export{p as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{SiteLink as v}from"../lib/site-runtime.js";import N from"./BlockFrame.js";import{useSitePhotography as S}from"./SitePhotographyContext.js";import{media as x}from"../lib/media.js";import{imageCornerStyle as w}from"../lib/content/image-corners.js";import{imageFitClass as j,imageIsCropped as I,parseImageFit as C}from"../lib/content/image-fit.js";import{resolveImageTreatment as F}from"../lib/content/image-treatment.js";import{imageWidthStyle as $}from"../lib/content/image-width.js";const P={auto:"","21/9":"aspect-[21/9]","16/9":"aspect-[16/9]","4/3":"aspect-[4/3]","1/1":"aspect-square"};function B({src:r,alt:f,aspect:l,contained:d,grayscale:p,href:h,width:u,fit:g,focal:a,corners:y,cornerSides:b}){const o=F(p,S()),i=$(u),m=C(g,"cover"),c=w(y,b),n={...o.style??{},...a&&I(l,m)?{objectPosition:a}:{}},s=r?e("img",{src:x(r),alt:f,className:`h-full w-full ${l==="auto"?"":j(m)}${o.className?` ${o.className}`:""}`,...Object.keys(n).length?{style:n}:{}}):e("div",{className:"flex aspect-[16/9] items-center justify-center border border-dashed border-line font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.2em] text-fg-dim",children:"Image
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{SiteLink as v}from"../lib/site-runtime.js";import N from"./BlockFrame.js";import{useSitePhotography as S}from"./SitePhotographyContext.js";import{media as x}from"../lib/media.js";import{imageCornerStyle as w}from"../lib/content/image-corners.js";import{imageFitClass as j,imageIsCropped as I,parseImageFit as C}from"../lib/content/image-fit.js";import{resolveImageTreatment as F}from"../lib/content/image-treatment.js";import{imageWidthStyle as $}from"../lib/content/image-width.js";const P={auto:"","21/9":"aspect-[21/9]","16/9":"aspect-[16/9]","4/3":"aspect-[4/3]","1/1":"aspect-square"};function B({src:r,alt:f,aspect:l,contained:d,grayscale:p,href:h,width:u,fit:g,focal:a,corners:y,cornerSides:b}){const o=F(p,S()),i=$(u),m=C(g,"cover"),c=w(y,b),n={...o.style??{},...a&&I(l,m)?{objectPosition:a}:{}},s=r?e("img",{src:x(r),alt:f,className:`h-full w-full ${l==="auto"?"":j(m)}${o.className?` ${o.className}`:""}`,...Object.keys(n).length?{style:n}:{}}):e("div",{className:"flex aspect-[16/9] items-center justify-center border border-dashed border-line font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.2em] text-fg-dim",children:"Image — set a path"}),t=(h??"").trim(),k=t&&r?t.startsWith("/")?e(v,{href:t,className:"block h-full w-full",children:s}):e("a",{href:t,className:"block h-full w-full",children:s}):s;return e(N,{contained:d,className:"py-6",children:e("figure",{...i?{style:i}:{},children:e("div",{className:`relative w-full overflow-hidden bg-surface ${P[l]}`,...c?{style:c}:{},children:k})})})}export{B as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as s,jsxs as a,Fragment as P}from"react/jsx-runtime";import{useRef as N,useState as F}from"react";import k from"./TextStyleRow.js";import{focalFromRect as D,formatFocal as $,nudgeFocal as C,parseFocal as R}from"../lib/image-focus.js";function j({label:c,value:t,onChange:l,image:i}){const[f,u]=F(!1),m=N(null),n=N(!1),{x:p,y:d}=R(t),g=(e,o)=>{const h=m.current?.getBoundingClientRect();if(!h)return;const y=D(h,e,o);l($(y.x,y.y))},b=e=>{const o=C(t,e.key,e.shiftKey);o!==null&&(e.preventDefault(),l(o))},x=e=>{e.currentTarget.setPointerCapture?.(e.pointerId),n.current=!0,g(e.clientX,e.clientY)},w=e=>{n.current&&g(e.clientX,e.clientY)},r=()=>{n.current=!1};return s(k,{styleKey:"imageFocal",label:c,value:t,sampleStyle:{fontSize:11,fontVariantNumeric:"tabular-nums"},open:f,onToggle:()=>u(e=>!e),children:f?s("div",{className:"sf-focus","data-sf-focusing":"",children:i?a(P,{children:[s("button",{type:"button",className:"sf-focus-canvas","aria-label":`${c}: ${t}. Use the arrow keys to move the point.`,onKeyDown:b,onPointerDown:x,onPointerMove:w,onPointerUp:r,onPointerCancel:r,onLostPointerCapture:r,children:a("span",{className:"sf-focus-pane",ref:m,children:[s("img",{className:"sf-focus-img",src:i,alt:"",draggable:!1}),s("span",{className:"sf-focus-cross sf-focus-cross--h",style:{top:`${d}%`}}),s("span",{className:"sf-focus-cross sf-focus-cross--v",style:{left:`${p}%`}}),s("span",{className:"sf-focus-marker",style:{left:`${p}%`,top:`${d}%`}})]})}),a("div",{className:"sf-focus-bar",children:[s("span",{className:"sf-focus-hint",children:"Press the picture, or nudge the point with the arrow keys."}),s("button",{type:"button",className:"sf-image-btn",onClick:()=>u(!1),children:"Done"})]})]}):s("p",{className:"es-field-hint sf-hint-keep",children:"Choose a background image first — there’s nothing to focus yet."})}):null})}export{j as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";const n="sf-hint-keep";function s({children:e}){return t("span",{className:n,children:e})}export{n as KEEP_HINT_CLASS,s as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,
|
|
1
|
+
"use client";import{jsx as e,Fragment as L,jsxs as m}from"react/jsx-runtime";import{useId as U,useState as q}from"react";import{InspectorUpLevel as N}from"efficient-easel/chrome";import{useEasel as $}from"efficient-easel/easel";import{ListField as D}from"efficient-easel/fields";import{SettingsField as E}from"efficient-easel/panel";import{ClockIcon as F,ContrastIcon as V,GlobeIcon as Y,LinkIcon as Z,LocationIcon as J,PhoneIcon as Q,SquareIcon as X,TypeIcon as O}from"efficient-easel/icons";import K from"./MediaUploadField.js";import{useLocationsHasTree as ee}from"./LocationsTreeContext.js";import{CoordsField as ne}from"../lib/puck/controls.js";import{useLocationsFocus as te,setLocationsFocus as f}from"../lib/puck/locations-focus.js";import{groupKeyOf as S,groupLabelOf as A,NEW_CITY as G,writeGroupCities as ie,writeGroupOrder as oe}from"../lib/puck/locations-tree.js";import{useSectionOps as re}from"../lib/puck/use-section-ops.js";import{ROOT_ZONE as le}from"../lib/puck/content-tree.js";import{CONTACT_LOCATIONS_DEFAULTS as H,parseLocationTileShape as ae}from"../lib/content/contact.js";function se(a){const t=[];return a.forEach((s,o)=>{const u=S(s);let l=t.find(i=>i.key===u);l||(l={key:u,name:String(s?.groupName??""),indices:[]},t.push(l)),l.indices.push(o)}),t}function z({children:a}){return e("div",{style:{fontSize:11,fontWeight:600,letterSpacing:"0.06em",textTransform:"uppercase",color:"var(--fg-dim, #999)",margin:"14px 0 6px"},children:a})}const W={width:"100%",height:32,textAlign:"left",display:"flex",alignItems:"center",justifyContent:"space-between",gap:8,padding:"0 12px",fontSize:12,border:"1px solid var(--border-strong, #d0d0d0)",borderRadius:6,background:"transparent",color:"inherit",cursor:"inherit"},ce={padding:0,border:"none",background:"none",font:"inherit",fontSize:12,color:"var(--sf-accent, #2563eb)",cursor:"pointer"},_={...ce,color:"#d85a30"};function y({label:a,value:t,placeholder:s,textarea:o,icon:u,onChange:l,onBlur:i,onKeyDown:h}){const b=U();return e(E,{label:a,icon:u??e(O,{}),htmlFor:b,children:o?e("textarea",{id:b,value:t,placeholder:s,onChange:g=>l(g.target.value)}):e("input",{id:b,type:"text",value:t,placeholder:s,onChange:g=>l(g.target.value),onBlur:i,onKeyDown:h})})}const de=[{label:"Auto",value:"auto"},{label:"Dark",value:"dark"},{label:"Light",value:"light"}],pe=[{label:"Tall (3:4)",value:"tall"},{label:"Square",value:"square"},{label:"Wide (2:1)",value:"wide"}];function R({label:a,icon:t,options:s,value:o,onChange:u}){return e(E,{label:a,icon:t,children:e("div",{role:"group","aria-label":a,style:{display:"flex",gap:4,flex:1},children:s.map(l=>{const i=o===l.value;return e("button",{type:"button","aria-pressed":i,onClick:()=>u(l.value),style:{flex:1,padding:"6px 8px",fontSize:12,borderRadius:6,cursor:"pointer",border:`1px solid ${i?"var(--sf-accent, #2563eb)":"var(--border-strong, #d0d0d0)"}`,background:i?"var(--sf-accent, #2563eb)":"transparent",color:i?"#fff":"inherit",fontWeight:i?500:400},children:l.label},l.value)})})})}function B({props:a,setSection:t,headOnly:s}){const o=i=>String(a[i]??""),u=a.mapTheme||H.mapTheme,l=H;return m(L,{children:[!s&&e(z,{children:"Section"}),e(y,{label:"Section number",value:o("sectionNumber"),placeholder:l.sectionNumber,onChange:i=>t({sectionNumber:i})}),e(y,{label:"Heading",textarea:!0,value:o("heading"),placeholder:l.heading,onChange:i=>t({heading:i})}),e(y,{label:"Body",textarea:!0,value:o("tagline"),placeholder:l.tagline,onChange:i=>t({tagline:i})}),s?null:m(L,{children:[e(z,{children:"City strip"}),e(y,{label:"Eyebrow",value:o("galleryKicker"),placeholder:l.galleryKicker,onChange:i=>t({galleryKicker:i})}),e(y,{label:"Hint",value:o("galleryHint"),placeholder:l.galleryHint,onChange:i=>t({galleryHint:i})}),e(R,{label:"Shape",icon:e(X,{}),options:pe,value:ae(a.imageShape),onChange:i=>t({imageShape:i})}),e(z,{children:"Map & Theme"}),e(R,{label:"Map theme",icon:e(V,{}),options:de,value:u,onChange:i=>t({mapTheme:i})})]})]})}function ue({cards:a,groupKey:t,onChange:s,onBack:o,onOpenCity:u,onNavigate:l}){const i=a.map((r,p)=>S(r)===t?p:-1).filter(r=>r>=0),h=String(a[i[0]]?.groupName??""),b=new Set(a.map(S).filter(r=>r!==t)),[g,C]=q(t),k=r=>s(a.map(p=>S(p)===t?{...p,...r}:p)),I=()=>{const r=g;if(r!==t){if(b.has(r)){C(t);return}s(a.map(p=>S(p)===t?{...p,group:r}:p)),l(r)}};return m("div",{className:"sf-locations-view",children:[e(N,{inline:!0,name:"Section",onSelect:o}),e("div",{style:{fontSize:14,fontWeight:500,margin:"6px 0 10px"},children:A(t,h)}),e(y,{label:"Group heading",value:g,placeholder:"e.g. Americas",onChange:C,onBlur:I,onKeyDown:r=>{r.key==="Enter"&&r.currentTarget.blur()}}),b.has(g)&&g!==t&&e("p",{className:"sf-note sf-note--error",role:"alert",children:"Another group already uses this heading — pick a different one."}),e(y,{label:"Group name",value:h,placeholder:"Shown beside the heading",onChange:r=>k({groupName:r})}),e(D,{label:"Cities in this group",noun:"city",items:i.map(r=>a[r]),onChange:r=>s(ie(a,t,r)),newItem:()=>({...G,group:t,groupName:h}),open:null,onOpen:()=>{},renderItem:()=>null,removeOnRow:!1,canDuplicate:()=>!1,renderRow:(r,p)=>m("button",{type:"button",style:W,onClick:()=>u(i[p]),children:[e("span",{children:r?.name||"City"}),e("span",{"aria-hidden":"true",children:"›"})]})}),e("div",{style:{marginTop:12},children:m("button",{type:"button",style:_,onClick:()=>{s(a.filter(r=>S(r)!==t)),o()},children:["Delete group (",i.length," ",i.length===1?"city":"cities",")"]})})]})}function me({value:a,onChange:t}){const s=Array.isArray(a)?a:[],o=te(),u=ee(),l=se(s),{appState:i,selectedItem:h}=$(n=>n),b=re(),g=h?.props??{},C=n=>{if(!h)return;const d=(i.data.content??[]).findIndex(v=>v.props.id===h.props.id);d<0||b.replaceComponent(le,d,{type:h.type,props:{...h.props,...n}})},k=(n,c)=>t(s.map((d,v)=>v===n?{...d,...c}:d)),I=()=>{const n=new Set(l.map(v=>v.key));let c=l.length+1,d=`Group ${c}`;for(;n.has(d);)d=`Group ${++c}`;return d};if(o.level==="texts")return m("div",{className:"sf-locations-view",children:[e(N,{inline:!0,name:"Locations",onSelect:()=>f({level:"groups"})}),e("div",{style:{fontSize:14,fontWeight:500,margin:"6px 0 10px"},children:"Texts"}),e(B,{props:g,setSection:C,headOnly:!0})]});if(o.level==="image"){const n=s[o.index];return n?m("div",{className:"sf-locations-view",children:[e(N,{inline:!0,name:String(n.name??"")||"City",onSelect:()=>f({level:"city",index:o.index})}),e("div",{style:{fontSize:14,fontWeight:500,margin:"6px 0 10px"},children:"Image"}),e(K,{value:n.photo||"",onChange:c=>k(o.index,{photo:c}),label:"Image",accept:"image/*"})]}):r()}if(o.level==="map"){const n=s[o.index];return n?m("div",{className:"sf-locations-view",children:[e(N,{inline:!0,name:String(n.name??"")||"City",onSelect:()=>f({level:"city",index:o.index})}),e("div",{style:{fontSize:14,fontWeight:500,margin:"6px 0 10px"},children:"Map"}),e(ne,{value:n.geocode,onChange:c=>k(o.index,{geocode:c}),label:"Coordinates"}),e(y,{label:"Directions link",icon:e(Z,{}),value:String(n.mapsUrl??""),onChange:c=>k(o.index,{mapsUrl:c})})]}):r()}if(o.level==="city"){const n=o.index,c=s[n];if(!c)return r();const d=S(c),v=(w,T)=>k(n,{[w]:T}),x=(w,T,M,P=!1)=>e(y,{label:T,icon:M,textarea:P,value:String(c[w]??""),onChange:j=>v(w,j)});return m("div",{className:"sf-locations-view",children:[e(N,{inline:!0,name:A(d,String(c.groupName??"")),onSelect:()=>f({level:"group",key:d})}),e("div",{style:{fontSize:14,fontWeight:500,margin:"6px 0 10px"},children:c.name||"City"}),x("name","Location name",e(O,{})),x("state","State / Province",e(O,{})),x("country","Country",e(Y,{})),x("address","Address",e(J,{}),!0),x("phone","Phone",e(Q,{})),x("hours","Opening hours",e(F,{})),x("timezone","Timezone chip",e(F,{})),e("div",{style:{marginTop:12},children:e("button",{type:"button",style:_,onClick:()=>{t(s.filter((w,T)=>T!==n)),f({level:"group",key:d})},children:"Delete city"})})]})}if(o.level==="group")return l.some(n=>n.key===o.key)?e(ue,{cards:s,groupKey:o.key,onChange:t,onBack:()=>f({level:"groups"}),onOpenCity:n=>f({level:"city",index:n}),onNavigate:n=>f({level:"group",key:n})},o.key):r();function r(){return m("div",{className:"sf-locations-view",children:[e(B,{props:g,setSection:C}),!u&&e(L,{children:p()})]})}function p(){return e(D,{label:"Locations",noun:"group",items:l,onChange:n=>{const c=n.find(d=>!l.some(v=>v.key===d.key));t(oe(s,n.map(d=>d.key),d=>[{...G,group:d,groupName:""}])),c&&f({level:"group",key:c.key})},newItem:()=>({key:I(),name:"",indices:[]}),open:null,onOpen:()=>{},renderItem:()=>null,removeOnRow:!1,canDuplicate:()=>!1,above:l.length===0?e("div",{style:{fontSize:12,color:"var(--fg-dim, #999)",padding:"4px 0"},children:"No locations yet."}):void 0,renderRow:n=>m("button",{type:"button",style:W,onClick:()=>f({level:"group",key:n.key}),children:[e("span",{style:{fontWeight:500},children:A(n.key,n.name)}),m("span",{style:{color:"var(--fg-dim, #999)"},children:[n.indices.length," ",n.indices.length===1?"city":"cities"," ›"]})]})})}return r()}export{me as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as r,Fragment as c}from"react/jsx-runtime";import{sectionRunsFullWidth as B}from"../lib/content/section-width.js";import{Fragment as N}from"react";import{SiteLink as S}from"../lib/site-runtime.js";import{stripMarkup as E}from"../lib/markup.js";import L from"./EditorialSectionHead.js";import C from"./Placeholder.js";import G from"./SectionEyebrow.js";import{renderGold as t,renderHeadline as z}from"./goldPhrases.js";function M({headNum:k,headTitle:m,headDesc:d,category:f,metaMiddle:g,readLabel:b,title:n,dek:h,quote:i,quoteAttribution:l,ctaText:u,ctaHref:w,image:j,imageLabel:v,metaPublished:s,metaReads:p,omitHead:x=!1,...F}){const y=[f?e("span",{className:"text-accent",children:t(f)}):null,g?e("span",{children:t(g)}):null,b?e("span",{children:t(b)}):null].filter(Boolean),_=!!s||!!p;return r("section",{className:B(F)?x?"border-b border-line px-[var(--sf-site-gutter,40px)] pt-0 pb-[120px] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))] max-[1100px]:pt-0 max-[1100px]:pb-20":"border-b border-line px-[var(--sf-site-gutter,40px)] py-[120px] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))] max-[1100px]:py-20":x?"mx-auto max-w-[var(--sf-site-width,1600px)] border-b border-line px-[var(--sf-site-gutter,40px)] pt-0 pb-[120px] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))] max-[1100px]:pt-0 max-[1100px]:pb-20":"mx-auto max-w-[var(--sf-site-width,1600px)] border-b border-line px-[var(--sf-site-gutter,40px)] py-[120px] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))] max-[1100px]:py-20",children:[x?null:e(L,{num:k,title:m?z(m,!0):void 0,desc:d?t(d):void 0}),r("article",{className:"sf-card grid min-h-[640px] grid-cols-[1fr_1.2fr] border border-line max-[1100px]:grid-cols-1",children:[r("div",{className:"flex flex-col justify-center gap-7 border-r border-line bg-surface px-14 py-16 max-[1100px]:border-r-0 max-[1100px]:border-b max-[1100px]:px-7 max-[1100px]:py-12",children:[y.length>0&&e("div",{className:"flex items-center gap-3.5 font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.3em] text-fg-dim",children:y.map((o,a)=>r(N,{children:[a>0&&e("span",{className:"opacity-40",children:"
|
|
1
|
+
import{jsx as e,jsxs as r,Fragment as c}from"react/jsx-runtime";import{sectionRunsFullWidth as B}from"../lib/content/section-width.js";import{Fragment as N}from"react";import{SiteLink as S}from"../lib/site-runtime.js";import{stripMarkup as E}from"../lib/markup.js";import L from"./EditorialSectionHead.js";import C from"./Placeholder.js";import G from"./SectionEyebrow.js";import{renderGold as t,renderHeadline as z}from"./goldPhrases.js";function M({headNum:k,headTitle:m,headDesc:d,category:f,metaMiddle:g,readLabel:b,title:n,dek:h,quote:i,quoteAttribution:l,ctaText:u,ctaHref:w,image:j,imageLabel:v,metaPublished:s,metaReads:p,omitHead:x=!1,...F}){const y=[f?e("span",{className:"text-accent",children:t(f)}):null,g?e("span",{children:t(g)}):null,b?e("span",{children:t(b)}):null].filter(Boolean),_=!!s||!!p;return r("section",{className:B(F)?x?"border-b border-line px-[var(--sf-site-gutter,40px)] pt-0 pb-[120px] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))] max-[1100px]:pt-0 max-[1100px]:pb-20":"border-b border-line px-[var(--sf-site-gutter,40px)] py-[120px] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))] max-[1100px]:py-20":x?"mx-auto max-w-[var(--sf-site-width,1600px)] border-b border-line px-[var(--sf-site-gutter,40px)] pt-0 pb-[120px] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))] max-[1100px]:pt-0 max-[1100px]:pb-20":"mx-auto max-w-[var(--sf-site-width,1600px)] border-b border-line px-[var(--sf-site-gutter,40px)] py-[120px] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))] max-[1100px]:py-20",children:[x?null:e(L,{num:k,title:m?z(m,!0):void 0,desc:d?t(d):void 0}),r("article",{className:"sf-card grid min-h-[640px] grid-cols-[1fr_1.2fr] border border-line max-[1100px]:grid-cols-1",children:[r("div",{className:"flex flex-col justify-center gap-7 border-r border-line bg-surface px-14 py-16 max-[1100px]:border-r-0 max-[1100px]:border-b max-[1100px]:px-7 max-[1100px]:py-12",children:[y.length>0&&e("div",{className:"flex items-center gap-3.5 font-mono text-[length:var(--size-label,12px)] uppercase tracking-[0.3em] text-fg-dim",children:y.map((o,a)=>r(N,{children:[a>0&&e("span",{className:"opacity-40",children:"·"}),o]},a))}),n&&e("h2",{className:"font-heading2 text-[length:min(var(--size-headingMedium,clamp(36px,4.2vw,68px)),var(--sf-heading-max,9999px))] font-medium uppercase leading-[0.95] tracking-[-0.035em]",children:z(n,!0)}),h&&e("p",{className:"font-serif text-[length:var(--size-body,22px)] italic leading-[1.45] text-fg",children:t(h)}),(i||l)&&r("blockquote",{className:"max-w-[520px] border-l-2 border-accent py-1.5 pl-[22px] font-serif text-[length:var(--size-body,17px)] italic leading-[1.6] text-fg-dim",children:[i&&r(c,{children:["“",t(i),"”"]}),l&&e("strong",{className:"mt-2.5 block font-display text-[length:var(--size-body,14px)] font-normal not-italic uppercase tracking-[0.22em] text-fg",children:t(l)})]}),u&&r(S,{href:w||"#",className:"inline-flex items-center gap-3.5 self-start border border-btn px-7 py-4 font-mono text-[length:var(--size-label,13px)] uppercase tracking-[0.3em] text-btn transition-colors hover:bg-btn hover:text-btn-ink",children:[t(u)," ",e("span",{children:"→"})]})]}),r("div",{className:"relative overflow-hidden bg-surface-2 max-[1100px]:aspect-[4/3]",children:[e(C,{label:"long-read",src:j||void 0,alt:E(n||"Long read"),sizes:"(max-width: 1100px) 100vw, 56vw"}),e("div",{className:"pointer-events-none absolute inset-0 z-[1]",style:{background:"linear-gradient(180deg, rgba(10,10,10,0.55) 0%, transparent 25%, transparent 60%, rgba(10,10,10,0.7) 100%)"}}),v&&e(G,{text:v,size:12,className:"absolute right-6 top-6 z-[2]"}),_&&e("div",{className:"absolute bottom-6 left-6 z-[2] font-mono text-[length:var(--size-label,12px)] uppercase leading-[1.8] tracking-[0.22em] text-overlay-fg",children:[s?r(c,{children:[e("strong",{className:"font-normal text-accent",children:"Published"})," ",t(s)]}):null,p?r(c,{children:[e("strong",{className:"font-normal text-accent",children:"Reads in"})," ",t(p)]}):null].filter(Boolean).map((o,a)=>r(N,{children:[a>0&&e("br",{}),o]},a))})]})]})]})}export{M as default};
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export default function MediaSidePanel({ panel: Panel, pick, onHide, }: {
|
|
3
|
-
panel: MediaPanelComponent;
|
|
4
|
-
pick: MediaPickRequest | null;
|
|
5
|
-
onHide?: () => void;
|
|
6
|
-
}): import("react").JSX.Element;
|
|
1
|
+
export { default } from "efficient-easel/screen/components/MediaSidePanel";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{
|
|
1
|
+
"use client";import{default as f}from"efficient-easel/screen/components/MediaSidePanel";export{f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsxs as p,jsx as e}from"react/jsx-runtime";import{SettingsField as g}from"efficient-easel/panel";import{ImageIcon as h,PlayIcon as v}from"efficient-easel/icons";import{ImageBox as E}from"efficient-easel/pick";import{useContext as N,useState as y}from"react";import{FileIntakeAlert as S,useFileIntake as B}from"efficient-shell/file-intake";import{StorefrontDocumentContext as F}from"./StorefrontDocumentContext.js";import{requestMediaPick as x}from"../lib/editor-media-picker.js";import{useEditorHost as C}from"../lib/editor-host.js";import{backendOf as O}from"../lib/
|
|
1
|
+
"use client";import{jsxs as p,jsx as e}from"react/jsx-runtime";import{SettingsField as g}from"efficient-easel/panel";import{ImageIcon as h,PlayIcon as v}from"efficient-easel/icons";import{ImageBox as E}from"efficient-easel/pick";import{useContext as N,useState as y}from"react";import{FileIntakeAlert as S,useFileIntake as B}from"efficient-shell/file-intake";import{StorefrontDocumentContext as F}from"./StorefrontDocumentContext.js";import{requestMediaPick as x}from"../lib/editor-media-picker.js";import{useEditorHost as C}from"../lib/editor-host.js";import{backendOf as O}from"../lib/website-session.js";import{useEditorSession as P}from"../lib/editor-session-context.js";function w({value:k,onChange:l,label:t,accept:i,placeholder:j}){const m=C(),b=P(),[r,d]=y(!1),[c,a]=y(null),s=i.startsWith("video"),u=N(F),o=B({accept:i,maxSizeBytes:O(b).media.maxUploadBytes,acceptHint:s?"videos only":"images only",multiple:!1,disabled:r,onAccept:([n])=>{a(null),d(!0),x(m,{accept:i,title:t,file:n}).then(f=>{f&&l(f.url)}).catch(()=>a("Couldn’t open the media picker — please try again.")).finally(()=>d(!1))}}),I=()=>(o.clearRejections(),a(null),x(m,{accept:i,title:t}).then(n=>n?.url??null));return u&&!u.capabilities.mediaEditing?e(g,{label:t,icon:s?e(v,{}):e(h,{}),children:p("div",{className:"sf-image-slot-inert",children:["Templates don’t store ",s?"videos":"images"," — this slot stays a placeholder. Each website picks its own after it’s created."]})}):p("div",{children:[e(g,{label:t,icon:s?e(v,{}):e(h,{}),children:e("div",{className:`sf-image-drop${o.dragOver?" is-dragover":""}`,...o.zoneProps,children:e(E,{value:k,onChange:l,label:t,kind:s?"video":"image",placeholder:j,openLibrary:r?void 0:I})})}),r&&e("div",{className:"sf-image-status",role:"status",children:"Opening the picker…"}),c&&e("div",{className:"sf-image-status sf-image-status--error",role:"alert",children:c}),e(S,{rejections:o.rejections,className:"sf-image-status sf-image-status--error"})]})}export{w as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as r,Fragment as $}from"react/jsx-runtime";import{renderGold as te,renderHeadline as ae}from"./goldPhrases.js";const C="#ffffff",d="#16181d",o="#5b6470",u="#9aa3ae",p="#f4f6f8",m="#e3e7ec",g="#1f9d55";function re({rows:n}){return e("div",{className:"flex flex-col gap-3",children:n.map((l,c)=>{const a=l.state??"ok",s=a==="no";return r("div",{className:"flex items-center gap-3 rounded-lg border px-4 py-3",style:{background:s?"#fbfbfc":p,borderColor:m},children:[a==="no"?e("span",{"aria-hidden":!0,className:"text-[15px] font-bold",style:{color:u},children:"\u2715"}):e("span",{"aria-hidden":!0,className:"h-[11px] w-[11px] flex-shrink-0 rounded-full",style:{background:a==="warn"?"var(--accent)":g}}),e("span",{className:"text-[14px] font-semibold",style:{color:s?u:d},children:l.lead}),e("span",{className:"text-[13px]",style:{color:s?u:o},children:l.detail}),(l.status??"").trim()&&e("span",{className:"ml-auto whitespace-nowrap text-[12px] font-bold",style:{color:a==="ok"?g:a==="warn"?"var(--accent)":u},children:l.status})]},c)})})}const I=["#c7cdd5","var(--accent)","#c7cdd5",g];function ne({columns:n}){return e("div",{className:"grid gap-2 rounded-xl p-3",style:{background:p,gridTemplateColumns:`repeat(${n.length}, minmax(0, 1fr))`},children:n.map((l,c)=>r("div",{className:"flex flex-col gap-2",children:[r("div",{className:"flex items-baseline justify-between px-1",children:[e("span",{className:"font-mono text-[9px] font-semibold uppercase tracking-[0.14em]",style:{color:o},children:l.title}),e("span",{className:"font-mono text-[9px] font-bold",style:{color:"var(--accent)"},children:l.cards.length})]}),l.cards.map((a,s)=>r("div",{className:"rounded-md border px-2.5 py-2",style:{background:C,borderColor:c===n.length-1?"#bfe3ce":m},children:[e("span",{"aria-hidden":!0,className:"mb-1.5 block h-[8px] w-[8px] rounded-full",style:{background:I[c%I.length]}}),e("span",{className:"block text-[11px] font-semibold leading-snug",style:{color:d},children:a})]},s))]},c))})}function se({heading:n,bars:l}){const c=Math.max(...l.map(s=>s.value),0)||1,a=l.findIndex(s=>s.value===c);return r("div",{className:"border-t pt-4",style:{borderColor:m},children:[n.trim()&&e("div",{className:"mb-3 font-mono text-[10px] font-semibold uppercase tracking-[0.18em]",style:{color:o},children:n}),e("div",{className:"flex flex-col gap-2.5",children:l.map((s,i)=>r("div",{className:"flex items-center gap-3",children:[e("span",{className:"w-[84px] flex-shrink-0 text-[12px] font-bold",style:{color:d},children:s.label}),e("span",{className:"h-[12px] rounded-full",style:{width:`${Math.max(s.value/c*60,4)}%`,background:i===a?"var(--accent)":i%2?"#c7cdd5":"#9aa3ae"}}),r("span",{className:"text-[12px]",style:{color:o},children:[s.value,"%"]})]},i))})]})}function E({size:n}){const l=n/2;return r("svg",{width:n,height:n,viewBox:`0 0 ${n} ${n}`,"aria-hidden":!0,children:[e("circle",{cx:l,cy:l,r:l*.82,fill:"none",stroke:"#9aa3ae",strokeWidth:"2.5"}),e("circle",{cx:l,cy:l,r:l*.5,fill:"none",stroke:"var(--accent)",strokeWidth:"2"}),e("circle",{cx:l,cy:l,r:l*.14,fill:"var(--accent)"})]})}function ce({header:n,lines:l}){return r("div",{style:{background:"#0c0e11"},children:[r("div",{className:"relative flex items-center gap-2 px-4 py-3",style:{background:"#161a20"},children:[e("span",{"aria-hidden":!0,className:"h-[10px] w-[10px] rounded-full",style:{background:"#e85d5d"}}),e("span",{"aria-hidden":!0,className:"h-[10px] w-[10px] rounded-full",style:{background:"#efc65a"}}),e("span",{"aria-hidden":!0,className:"h-[10px] w-[10px] rounded-full",style:{background:"#6fcf7e"}}),n.trim()&&e("span",{className:"absolute inset-x-0 text-center font-mono text-[11px]",style:{color:"rgba(244,246,242,0.45)"},children:n})]}),r("div",{className:"flex flex-col gap-1.5 px-5 py-5 font-mono text-[13px] leading-relaxed",children:[l.map((c,a)=>c.startsWith("$ ")?r("div",{children:[e("span",{style:{color:"var(--accent)"},children:"$ "}),e("span",{style:{color:"#f4f6f2"},children:c.slice(2)})]},a):c.startsWith("\u2713")?e("div",{style:{color:"#6fcf7e"},children:c},a):e("div",{style:{color:"rgba(244,246,242,0.55)"},children:c},a)),e("div",{"aria-hidden":!0,className:"mt-1 h-[15px] w-[8px]",style:{background:"var(--accent)"}})]})]})}function de({urlText:n,heroTitle:l,heroButton:c,products:a}){return r("div",{children:[r("div",{className:"flex items-center gap-2 px-4 py-3",style:{background:p},children:[e("span",{"aria-hidden":!0,className:"h-[10px] w-[10px] rounded-full",style:{background:"#e85d5d"}}),e("span",{"aria-hidden":!0,className:"h-[10px] w-[10px] rounded-full",style:{background:"#efc65a"}}),e("span",{"aria-hidden":!0,className:"h-[10px] w-[10px] rounded-full",style:{background:"#6fcf7e"}}),n.trim()&&e("span",{className:"mx-auto rounded border px-6 py-1 text-[11px]",style:{background:C,borderColor:m,color:o},children:n}),e("span",{className:"w-[54px]","aria-hidden":!0})]}),r("div",{className:"relative overflow-hidden px-5 py-6",style:{background:d},children:[e("div",{className:"absolute -right-4 top-1/2 -translate-y-1/2 opacity-90",children:e(E,{size:104})}),l.trim()&&e("div",{className:"max-w-[240px] text-[15px] font-bold uppercase leading-snug tracking-wide text-white",children:l}),c.trim()&&e("div",{className:"mt-3 inline-block rounded px-3.5 py-1.5 text-[11px] font-bold text-white",style:{background:"var(--accent)"},"aria-hidden":!0,children:c})]}),a.length>0&&e("div",{className:"grid grid-cols-3 gap-3 p-4",children:a.map((s,i)=>r("div",{className:"overflow-hidden rounded-lg border",style:{borderColor:m},children:[e("div",{className:"flex items-center justify-center py-3",style:{background:p},children:e(E,{size:56})}),r("div",{className:"flex flex-col gap-1 p-2.5",children:[e("span",{className:"text-[10.5px] font-bold leading-tight",style:{color:d},children:s.name}),e("span",{className:"text-[11px] font-bold",style:{color:"var(--accent)"},children:s.price}),e("span",{className:"mt-0.5 rounded px-2 py-1 text-center text-[9px] font-bold text-white",style:{background:d},"aria-hidden":!0,children:"Add to cart"})]})]},i))})]})}function ie({eyebrow:n,title:l,body:c,variant:a="spec-card",cardHeader:s,badge:i,cardTitle:f,cardSubtitle:b,pills:F,tiles:W,rows:K,button:_,footnote:j,col1Title:T,col1Cards:G,col2Title:L,col2Cards:O,col3Title:P,col3Cards:z,col4Title:U,col4Cards:q,barsHeading:J,bars:Q,termLines:S,urlText:V,heroTitle:A,heroButton:X,products:Y,align:Z="right",editing:x=!1}={}){const y=(F??[]).filter(t=>x||(t.value??"").trim()),v=(W??[]).filter(t=>x||(t.label??"").trim()),N=(K??[]).filter(t=>x||(t.lead??"").trim()),k=[[T,G],[L,O],[P,z],[U,q]].map(([t,h])=>({title:(t??"").trim(),cards:(h??[]).map(le=>(le.text??"").trim()).filter(Boolean)})).filter(t=>t.title||t.cards.length>0),w=(Q??[]).map(t=>({label:(t.label??"").trim(),value:parseFloat(t.value??"")})).filter(t=>t.label&&Number.isFinite(t.value)),R=(S??[]).map(t=>t.text??"").filter(t=>x||t.trim()),D=(Y??[]).map(t=>({name:(t.name??"").trim(),price:(t.price??"").trim()})).filter(t=>t.name),H=!!(n??"").trim()||!!(l??"").trim(),ee=!!(s??"").trim()||!!(f??"").trim()||y.length>0||v.length>0||N.length>0||k.length>0||w.length>0||D.length>0||R.length>0||!!(A??"").trim();if(!x&&!H&&!ee)return null;const M=r("div",{className:`w-full overflow-hidden rounded-2xl shadow-[0_24px_60px_rgba(0,0,0,0.35)] ${a==="kanban"||a==="browser"||a==="terminal"?"max-w-[600px]":"max-w-[520px]"}`,style:{background:C},children:[a!=="terminal"&&(s??"").trim()&&r("div",{className:"flex items-center justify-between px-6 py-4",style:{background:d},children:[e("span",{className:"font-mono text-[12px] font-semibold uppercase tracking-[0.22em] text-white",children:s}),(i??"").trim()&&r("span",{className:"flex items-center gap-2 font-mono text-[11px] font-semibold uppercase tracking-[0.16em] text-white",children:[e("span",{"aria-hidden":!0,className:"h-[9px] w-[9px] rounded-full",style:{background:g}}),i]})]}),a==="terminal"?e(ce,{header:s??"",lines:R}):a==="browser"?e(de,{urlText:V??"",heroTitle:A??"",heroButton:X??"",products:D}):r("div",{className:"flex flex-col gap-5 p-6",children:[((f??"").trim()||(b??"").trim())&&r("div",{children:[(f??"").trim()&&e("div",{className:"text-[22px] font-bold leading-tight",style:{color:d},children:f}),(b??"").trim()&&e("div",{className:"mt-1 text-[14px]",style:{color:o},children:b})]}),a==="fitment"&&y.length>0&&e("div",{className:"flex flex-wrap gap-2.5",children:y.map((t,h)=>r("span",{className:"flex items-baseline gap-2 rounded border px-4 py-2",style:{background:p,borderColor:m},children:[e("span",{className:"text-[11px]",style:{color:o},children:t.label}),e("span",{className:"text-[13px] font-bold",style:{color:d},children:t.value})]},h))}),a!=="fitment"&&v.length>0&&e("div",{className:"grid grid-cols-2 gap-3",children:v.map((t,h)=>r("div",{className:"rounded-lg px-4 py-3",style:{background:p},children:[e("div",{className:"font-mono text-[10px] font-semibold uppercase tracking-[0.18em]",style:{color:o},children:t.label}),e("div",{className:"mt-1 text-[17px] font-bold",style:{color:d},children:t.value})]},h))}),N.length>0&&e(re,{rows:N}),(_??"").trim()&&e("div",{className:"self-start rounded-lg px-6 py-2.5 text-[14px] font-bold text-white",style:{background:"var(--accent)"},"aria-hidden":!0,children:_}),a==="kanban"&&k.length>0&&e(ne,{columns:k}),a==="claims"&&w.length>0&&e(se,{heading:J??"",bars:w}),(j??"").trim()&&e("div",{className:"border-t pt-4",style:{borderColor:m},children:e("span",{className:"text-[15px] font-bold",style:{color:"var(--accent)"},children:j})})]})]}),B=r("div",{children:[(n??"").trim()&&e("span",{className:"inline-block bg-accent px-3.5 py-1.5 font-mono text-[12px] font-semibold uppercase tracking-[0.16em] text-bg",children:te(n??"")}),(l??"").trim()&&e("h2",{className:"mt-5 font-heading2 text-[length:min(var(--size-headingMedium,44px),var(--sf-heading-max,9999px))] font-medium uppercase leading-[1.04] tracking-[-0.02em] text-fg max-[800px]:text-[length:min(var(--size-headingMedium,32px),var(--sf-heading-max,9999px))]",children:ae(l??"",!1)}),(c??"").trim()&&e("p",{className:"mt-5 max-w-[46ch] text-[15px] leading-relaxed text-fg/65",children:c})]});return e("section",{className:"relative z-[2] border-y border-line bg-surface",children:e("div",{className:"mx-auto grid max-w-[var(--sf-site-width,1600px)] items-center gap-14 px-[var(--sf-site-gutter,40px)] py-[76px] min-[960px]:grid-cols-2 max-[960px]:px-[min(24px,var(--sf-site-gutter,40px))]",children:Z==="left"?r($,{children:[e("div",{className:"flex justify-center min-[960px]:justify-start",children:M}),B]}):r($,{children:[B,e("div",{className:"flex justify-center min-[960px]:justify-end",children:M})]})})})}export{ie as default};
|
|
1
|
+
import{jsx as e,jsxs as r,Fragment as $}from"react/jsx-runtime";import{renderGold as te,renderHeadline as ae}from"./goldPhrases.js";const C="#ffffff",d="#16181d",o="#5b6470",u="#9aa3ae",p="#f4f6f8",m="#e3e7ec",g="#1f9d55";function re({rows:n}){return e("div",{className:"flex flex-col gap-3",children:n.map((l,c)=>{const a=l.state??"ok",s=a==="no";return r("div",{className:"flex items-center gap-3 rounded-lg border px-4 py-3",style:{background:s?"#fbfbfc":p,borderColor:m},children:[a==="no"?e("span",{"aria-hidden":!0,className:"text-[15px] font-bold",style:{color:u},children:"✕"}):e("span",{"aria-hidden":!0,className:"h-[11px] w-[11px] flex-shrink-0 rounded-full",style:{background:a==="warn"?"var(--accent)":g}}),e("span",{className:"text-[14px] font-semibold",style:{color:s?u:d},children:l.lead}),e("span",{className:"text-[13px]",style:{color:s?u:o},children:l.detail}),(l.status??"").trim()&&e("span",{className:"ml-auto whitespace-nowrap text-[12px] font-bold",style:{color:a==="ok"?g:a==="warn"?"var(--accent)":u},children:l.status})]},c)})})}const I=["#c7cdd5","var(--accent)","#c7cdd5",g];function ne({columns:n}){return e("div",{className:"grid gap-2 rounded-xl p-3",style:{background:p,gridTemplateColumns:`repeat(${n.length}, minmax(0, 1fr))`},children:n.map((l,c)=>r("div",{className:"flex flex-col gap-2",children:[r("div",{className:"flex items-baseline justify-between px-1",children:[e("span",{className:"font-mono text-[9px] font-semibold uppercase tracking-[0.14em]",style:{color:o},children:l.title}),e("span",{className:"font-mono text-[9px] font-bold",style:{color:"var(--accent)"},children:l.cards.length})]}),l.cards.map((a,s)=>r("div",{className:"rounded-md border px-2.5 py-2",style:{background:C,borderColor:c===n.length-1?"#bfe3ce":m},children:[e("span",{"aria-hidden":!0,className:"mb-1.5 block h-[8px] w-[8px] rounded-full",style:{background:I[c%I.length]}}),e("span",{className:"block text-[11px] font-semibold leading-snug",style:{color:d},children:a})]},s))]},c))})}function se({heading:n,bars:l}){const c=Math.max(...l.map(s=>s.value),0)||1,a=l.findIndex(s=>s.value===c);return r("div",{className:"border-t pt-4",style:{borderColor:m},children:[n.trim()&&e("div",{className:"mb-3 font-mono text-[10px] font-semibold uppercase tracking-[0.18em]",style:{color:o},children:n}),e("div",{className:"flex flex-col gap-2.5",children:l.map((s,i)=>r("div",{className:"flex items-center gap-3",children:[e("span",{className:"w-[84px] flex-shrink-0 text-[12px] font-bold",style:{color:d},children:s.label}),e("span",{className:"h-[12px] rounded-full",style:{width:`${Math.max(s.value/c*60,4)}%`,background:i===a?"var(--accent)":i%2?"#c7cdd5":"#9aa3ae"}}),r("span",{className:"text-[12px]",style:{color:o},children:[s.value,"%"]})]},i))})]})}function E({size:n}){const l=n/2;return r("svg",{width:n,height:n,viewBox:`0 0 ${n} ${n}`,"aria-hidden":!0,children:[e("circle",{cx:l,cy:l,r:l*.82,fill:"none",stroke:"#9aa3ae",strokeWidth:"2.5"}),e("circle",{cx:l,cy:l,r:l*.5,fill:"none",stroke:"var(--accent)",strokeWidth:"2"}),e("circle",{cx:l,cy:l,r:l*.14,fill:"var(--accent)"})]})}function ce({header:n,lines:l}){return r("div",{style:{background:"#0c0e11"},children:[r("div",{className:"relative flex items-center gap-2 px-4 py-3",style:{background:"#161a20"},children:[e("span",{"aria-hidden":!0,className:"h-[10px] w-[10px] rounded-full",style:{background:"#e85d5d"}}),e("span",{"aria-hidden":!0,className:"h-[10px] w-[10px] rounded-full",style:{background:"#efc65a"}}),e("span",{"aria-hidden":!0,className:"h-[10px] w-[10px] rounded-full",style:{background:"#6fcf7e"}}),n.trim()&&e("span",{className:"absolute inset-x-0 text-center font-mono text-[11px]",style:{color:"rgba(244,246,242,0.45)"},children:n})]}),r("div",{className:"flex flex-col gap-1.5 px-5 py-5 font-mono text-[13px] leading-relaxed",children:[l.map((c,a)=>c.startsWith("$ ")?r("div",{children:[e("span",{style:{color:"var(--accent)"},children:"$ "}),e("span",{style:{color:"#f4f6f2"},children:c.slice(2)})]},a):c.startsWith("✓")?e("div",{style:{color:"#6fcf7e"},children:c},a):e("div",{style:{color:"rgba(244,246,242,0.55)"},children:c},a)),e("div",{"aria-hidden":!0,className:"mt-1 h-[15px] w-[8px]",style:{background:"var(--accent)"}})]})]})}function de({urlText:n,heroTitle:l,heroButton:c,products:a}){return r("div",{children:[r("div",{className:"flex items-center gap-2 px-4 py-3",style:{background:p},children:[e("span",{"aria-hidden":!0,className:"h-[10px] w-[10px] rounded-full",style:{background:"#e85d5d"}}),e("span",{"aria-hidden":!0,className:"h-[10px] w-[10px] rounded-full",style:{background:"#efc65a"}}),e("span",{"aria-hidden":!0,className:"h-[10px] w-[10px] rounded-full",style:{background:"#6fcf7e"}}),n.trim()&&e("span",{className:"mx-auto rounded border px-6 py-1 text-[11px]",style:{background:C,borderColor:m,color:o},children:n}),e("span",{className:"w-[54px]","aria-hidden":!0})]}),r("div",{className:"relative overflow-hidden px-5 py-6",style:{background:d},children:[e("div",{className:"absolute -right-4 top-1/2 -translate-y-1/2 opacity-90",children:e(E,{size:104})}),l.trim()&&e("div",{className:"max-w-[240px] text-[15px] font-bold uppercase leading-snug tracking-wide text-white",children:l}),c.trim()&&e("div",{className:"mt-3 inline-block rounded px-3.5 py-1.5 text-[11px] font-bold text-white",style:{background:"var(--accent)"},"aria-hidden":!0,children:c})]}),a.length>0&&e("div",{className:"grid grid-cols-3 gap-3 p-4",children:a.map((s,i)=>r("div",{className:"overflow-hidden rounded-lg border",style:{borderColor:m},children:[e("div",{className:"flex items-center justify-center py-3",style:{background:p},children:e(E,{size:56})}),r("div",{className:"flex flex-col gap-1 p-2.5",children:[e("span",{className:"text-[10.5px] font-bold leading-tight",style:{color:d},children:s.name}),e("span",{className:"text-[11px] font-bold",style:{color:"var(--accent)"},children:s.price}),e("span",{className:"mt-0.5 rounded px-2 py-1 text-center text-[9px] font-bold text-white",style:{background:d},"aria-hidden":!0,children:"Add to cart"})]})]},i))})]})}function ie({eyebrow:n,title:l,body:c,variant:a="spec-card",cardHeader:s,badge:i,cardTitle:f,cardSubtitle:b,pills:F,tiles:W,rows:K,button:_,footnote:j,col1Title:T,col1Cards:G,col2Title:L,col2Cards:O,col3Title:P,col3Cards:z,col4Title:U,col4Cards:q,barsHeading:J,bars:Q,termLines:S,urlText:V,heroTitle:A,heroButton:X,products:Y,align:Z="right",editing:x=!1}={}){const y=(F??[]).filter(t=>x||(t.value??"").trim()),v=(W??[]).filter(t=>x||(t.label??"").trim()),N=(K??[]).filter(t=>x||(t.lead??"").trim()),k=[[T,G],[L,O],[P,z],[U,q]].map(([t,h])=>({title:(t??"").trim(),cards:(h??[]).map(le=>(le.text??"").trim()).filter(Boolean)})).filter(t=>t.title||t.cards.length>0),w=(Q??[]).map(t=>({label:(t.label??"").trim(),value:parseFloat(t.value??"")})).filter(t=>t.label&&Number.isFinite(t.value)),R=(S??[]).map(t=>t.text??"").filter(t=>x||t.trim()),D=(Y??[]).map(t=>({name:(t.name??"").trim(),price:(t.price??"").trim()})).filter(t=>t.name),H=!!(n??"").trim()||!!(l??"").trim(),ee=!!(s??"").trim()||!!(f??"").trim()||y.length>0||v.length>0||N.length>0||k.length>0||w.length>0||D.length>0||R.length>0||!!(A??"").trim();if(!x&&!H&&!ee)return null;const M=r("div",{className:`w-full overflow-hidden rounded-2xl shadow-[0_24px_60px_rgba(0,0,0,0.35)] ${a==="kanban"||a==="browser"||a==="terminal"?"max-w-[600px]":"max-w-[520px]"}`,style:{background:C},children:[a!=="terminal"&&(s??"").trim()&&r("div",{className:"flex items-center justify-between px-6 py-4",style:{background:d},children:[e("span",{className:"font-mono text-[12px] font-semibold uppercase tracking-[0.22em] text-white",children:s}),(i??"").trim()&&r("span",{className:"flex items-center gap-2 font-mono text-[11px] font-semibold uppercase tracking-[0.16em] text-white",children:[e("span",{"aria-hidden":!0,className:"h-[9px] w-[9px] rounded-full",style:{background:g}}),i]})]}),a==="terminal"?e(ce,{header:s??"",lines:R}):a==="browser"?e(de,{urlText:V??"",heroTitle:A??"",heroButton:X??"",products:D}):r("div",{className:"flex flex-col gap-5 p-6",children:[((f??"").trim()||(b??"").trim())&&r("div",{children:[(f??"").trim()&&e("div",{className:"text-[22px] font-bold leading-tight",style:{color:d},children:f}),(b??"").trim()&&e("div",{className:"mt-1 text-[14px]",style:{color:o},children:b})]}),a==="fitment"&&y.length>0&&e("div",{className:"flex flex-wrap gap-2.5",children:y.map((t,h)=>r("span",{className:"flex items-baseline gap-2 rounded border px-4 py-2",style:{background:p,borderColor:m},children:[e("span",{className:"text-[11px]",style:{color:o},children:t.label}),e("span",{className:"text-[13px] font-bold",style:{color:d},children:t.value})]},h))}),a!=="fitment"&&v.length>0&&e("div",{className:"grid grid-cols-2 gap-3",children:v.map((t,h)=>r("div",{className:"rounded-lg px-4 py-3",style:{background:p},children:[e("div",{className:"font-mono text-[10px] font-semibold uppercase tracking-[0.18em]",style:{color:o},children:t.label}),e("div",{className:"mt-1 text-[17px] font-bold",style:{color:d},children:t.value})]},h))}),N.length>0&&e(re,{rows:N}),(_??"").trim()&&e("div",{className:"self-start rounded-lg px-6 py-2.5 text-[14px] font-bold text-white",style:{background:"var(--accent)"},"aria-hidden":!0,children:_}),a==="kanban"&&k.length>0&&e(ne,{columns:k}),a==="claims"&&w.length>0&&e(se,{heading:J??"",bars:w}),(j??"").trim()&&e("div",{className:"border-t pt-4",style:{borderColor:m},children:e("span",{className:"text-[15px] font-bold",style:{color:"var(--accent)"},children:j})})]})]}),B=r("div",{children:[(n??"").trim()&&e("span",{className:"inline-block bg-accent px-3.5 py-1.5 font-mono text-[12px] font-semibold uppercase tracking-[0.16em] text-bg",children:te(n??"")}),(l??"").trim()&&e("h2",{className:"mt-5 font-heading2 text-[length:min(var(--size-headingMedium,44px),var(--sf-heading-max,9999px))] font-medium uppercase leading-[1.04] tracking-[-0.02em] text-fg max-[800px]:text-[length:min(var(--size-headingMedium,32px),var(--sf-heading-max,9999px))]",children:ae(l??"",!1)}),(c??"").trim()&&e("p",{className:"mt-5 max-w-[46ch] text-[15px] leading-relaxed text-fg/65",children:c})]});return e("section",{className:"relative z-[2] border-y border-line bg-surface",children:e("div",{className:"mx-auto grid max-w-[var(--sf-site-width,1600px)] items-center gap-14 px-[var(--sf-site-gutter,40px)] py-[76px] min-[960px]:grid-cols-2 max-[960px]:px-[min(24px,var(--sf-site-gutter,40px))]",children:Z==="left"?r($,{children:[e("div",{className:"flex justify-center min-[960px]:justify-start",children:M}),B]}):r($,{children:[B,e("div",{className:"flex justify-center min-[960px]:justify-end",children:M})]})})})}export{ie as default};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
1
2
|
import { type FieldOption } from "efficient-easel/fields";
|
|
2
3
|
interface Option {
|
|
3
4
|
value: string;
|
|
@@ -11,6 +12,8 @@ interface Props {
|
|
|
11
12
|
value: string[];
|
|
12
13
|
onChange: (value: string[]) => void;
|
|
13
14
|
emptyLabel?: string;
|
|
15
|
+
icon?: ReactNode;
|
|
16
|
+
hint?: ReactNode;
|
|
14
17
|
}
|
|
15
|
-
export default function MultiSelectField({ label, options, value, onChange, emptyLabel, }: Props): import("react").JSX.Element;
|
|
18
|
+
export default function MultiSelectField({ label, options, value, onChange, emptyLabel, icon, hint, }: Props): import("react").JSX.Element;
|
|
16
19
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as a}from"react/jsx-runtime";import{useId as m}from"react";import{FieldSelect as p}from"efficient-easel/fields";import{SettingsField as b}from"efficient-easel/panel";function f(i){return i.map(({value:l,label:e,note:t})=>({value:l,label:e,...t?{meta:t}:{}}))}function h({label:i,options:l,value:e,onChange:t,emptyLabel:c="None",icon:d,hint:u}){const o=m(),n=`${o}-label`,r=`${o}-button`,s=Array.isArray(e)?e:[];return a(b,{label:i,labelId:n,icon:d,hint:u,children:a(p,{id:r,multiple:!0,value:s,options:f(l),onChange:t,placeholder:c,ariaLabelledBy:`${n} ${r}`,inline:!0})})}export{h as default,f as multiSelectOptions};
|
|
@@ -1,96 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { type StyleSnapshot } from "efficient-easel/style-clipboard";
|
|
4
|
-
import { type CanvasTarget } from "efficient-easel/canvas";
|
|
5
|
-
export type NodeMenuTarget = {
|
|
6
|
-
kind: "node";
|
|
7
|
-
x: number;
|
|
8
|
-
y: number;
|
|
9
|
-
zone: string;
|
|
10
|
-
index: number;
|
|
11
|
-
} | {
|
|
12
|
-
kind: "empty";
|
|
13
|
-
x: number;
|
|
14
|
-
y: number;
|
|
15
|
-
} | {
|
|
16
|
-
kind: "input";
|
|
17
|
-
x: number;
|
|
18
|
-
y: number;
|
|
19
|
-
el: TextEl;
|
|
20
|
-
};
|
|
21
|
-
type TextEl = {
|
|
22
|
-
value: string;
|
|
23
|
-
selectionStart: number | null;
|
|
24
|
-
selectionEnd: number | null;
|
|
25
|
-
setRangeText: (t: string, s: number, e: number, m?: string) => void;
|
|
26
|
-
select: () => void;
|
|
27
|
-
focus: () => void;
|
|
28
|
-
dispatchEvent: (e: Event) => boolean;
|
|
29
|
-
};
|
|
30
|
-
type NodeLike = {
|
|
31
|
-
type: string;
|
|
32
|
-
props: {
|
|
33
|
-
[key: string]: unknown;
|
|
34
|
-
id: string;
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
export type NodeMenuHost = {
|
|
38
|
-
nodesIn: (zone: string) => NodeLike[];
|
|
39
|
-
nodeAt: (zone: string, index: number) => NodeLike | null;
|
|
40
|
-
labelOf: (type: string, zone: string) => string;
|
|
41
|
-
rowNameOf: (node: NodeLike, zone: string) => string;
|
|
42
|
-
renamePropOf: (node: NodeLike, zone: string) => string | null;
|
|
43
|
-
beginRename: (zone: string, index: number) => void;
|
|
44
|
-
history: {
|
|
45
|
-
hasPast: boolean;
|
|
46
|
-
hasFuture: boolean;
|
|
47
|
-
back: () => void;
|
|
48
|
-
forward: () => void;
|
|
49
|
-
};
|
|
50
|
-
openAddSection: () => void;
|
|
51
|
-
openPageSettings: () => void;
|
|
52
|
-
collapseAll: () => void;
|
|
53
|
-
onPasteRefused: () => void;
|
|
54
|
-
document: unknown;
|
|
55
|
-
nodeOps: Pick<NodeOps, "held" | "remove" | "duplicate" | "step" | "canStep" | "setProps" | "copy" | "cut" | "paste">;
|
|
56
|
-
isPinned: (node: NodeLike, zone: string) => boolean;
|
|
57
|
-
sectionBand: () => {
|
|
58
|
-
floor: number;
|
|
59
|
-
cap: number;
|
|
60
|
-
};
|
|
61
|
-
selectAt: (zone: string, index: number, id: string, parentType: string | null) => void;
|
|
62
|
-
openAddInside: (zone: string, index: number) => void;
|
|
63
|
-
locate: (id: string) => {
|
|
64
|
-
zone: string;
|
|
65
|
-
index: number;
|
|
66
|
-
} | null;
|
|
67
|
-
style?: {
|
|
68
|
-
held: () => StyleSnapshot | null;
|
|
69
|
-
canCopy: (node: NodeLike, zone: string) => boolean;
|
|
70
|
-
copy: (node: NodeLike, zone: string) => void;
|
|
71
|
-
paste: (zone: string, index: number, node: NodeLike) => void;
|
|
72
|
-
};
|
|
73
|
-
};
|
|
74
|
-
export type ChainRung = {
|
|
75
|
-
zone: string;
|
|
76
|
-
index: number;
|
|
77
|
-
node: NodeLike;
|
|
78
|
-
parentType: string | null;
|
|
79
|
-
};
|
|
80
|
-
export declare function ancestorChain(host: NodeMenuHost, target: {
|
|
81
|
-
zone: string;
|
|
82
|
-
index: number;
|
|
83
|
-
}): ChainRung[];
|
|
84
|
-
export declare const EDITOR_NODE_CLIPBOARD: import("efficient-easel/node-ops").NodeClipboard;
|
|
85
|
-
export declare function nodeMenuItems(host: NodeMenuHost, target: {
|
|
86
|
-
zone: string;
|
|
87
|
-
index: number;
|
|
88
|
-
}): EaselContextMenuItem[];
|
|
89
|
-
export declare function pageMenuItems(host: NodeMenuHost): EaselContextMenuItem[];
|
|
90
|
-
export declare function textMenuItems(host: NodeMenuHost, el: TextEl): EaselContextMenuItem[];
|
|
91
|
-
export declare function useNodeContextMenu(host: NodeMenuHost, canvas: CanvasTarget | null): {
|
|
92
|
-
onEditorContextMenu: (e: React.MouseEvent) => void;
|
|
93
|
-
menu: import("react").JSX.Element | null;
|
|
94
|
-
closeMenu: () => void;
|
|
95
|
-
};
|
|
96
|
-
export {};
|
|
1
|
+
export { ancestorChain, EASEL_NODE_CLIPBOARD as EDITOR_NODE_CLIPBOARD, nodeMenuItems, pageMenuItems, textMenuItems, useNodeContextMenu } from "efficient-easel/screen/components/NodeContextMenu";
|
|
2
|
+
export type { ChainRung, NodeMenuHost, NodeMenuTarget } from "efficient-easel/screen/components/NodeContextMenu";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{
|
|
1
|
+
"use client";import{ancestorChain as n,EASEL_NODE_CLIPBOARD as s,nodeMenuItems as o,pageMenuItems as u,textMenuItems as I,useNodeContextMenu as D}from"efficient-easel/screen/components/NodeContextMenu";export{s as EDITOR_NODE_CLIPBOARD,n as ancestorChain,o as nodeMenuItems,u as pageMenuItems,I as textMenuItems,D as useNodeContextMenu};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default
|
|
1
|
+
export { default } from "efficient-easel/screen/components/PageEditGuardNotices";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{
|
|
1
|
+
"use client";import{default as f}from"efficient-easel/screen/components/PageEditGuardNotices";export{f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as t,jsxs as
|
|
1
|
+
"use client";import{jsx as t,jsxs as a,Fragment as ne}from"react/jsx-runtime";import{useCallback as ae,useEffect as G,useId as re,useMemo as M,useState as c}from"react";import{useStorefrontDocument as oe}from"./StorefrontDocumentContext.js";import f from"./UiIcon.js";import le from"./SidePanelHead.js";import{useWebsiteName as ie}from"./WebsiteSettingsPanel.js";import{InspectorIconButton as ce}from"efficient-easel/chrome";import{Button as J,Dialog as de,FormField as pe,Input as ue,Tooltip as L}from"efficient-shell/ui";import{AddIcon as he}from"efficient-easel/icons";import{PagesIcon as me}from"efficient-easel/rail";import{useEditorHost as fe}from"../lib/editor-host.js";import{bucketEditorPageRows as ge,isDynamicPageRow as be}from"../lib/editor-page-rows.js";import{useEditorSession as we}from"../lib/editor-session-context.js";const K="sf-editor-pages-collapsed-groups",ye=o=>o.toLowerCase().trim().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,""),U=(o,g)=>{const l=ye(o)||"page";if(!g.has(l))return l;let u=2;for(;g.has(`${l}-${u}`);)u+=1;return`${l}-${u}`};function Ne({onNavigate:o,onClose:g,activeSurface:l,onPreviewSurface:u}){const b=we().chrome?.pageRows,R=fe(),{adapter:d,capabilities:w,ready:y,currentSlug:z}=oe(),Q=ie(),[r,N]=c(null),[P,T]=c(""),[p,k]=c(!1),[v,h]=c(null),[O,C]=c(!1),[m,S]=c(""),F=re(),I=ae(async()=>{if(y)try{N(await d.listPages())}catch{N([])}},[d,y]);G(()=>{N(null),I()},[I]);const[$,V]=c(()=>{if(typeof window>"u")return new Set;try{const e=window.localStorage.getItem(K);return new Set(e?JSON.parse(e):[])}catch{return new Set}});G(()=>{try{window.localStorage.setItem(K,JSON.stringify([...$]))}catch{}},[$]);const Y=e=>V(s=>{const n=new Set(s);return n.has(e)?n.delete(e):n.add(e),n}),X=M(()=>ge(r??[]),[r]),x=P.trim().toLowerCase(),W=e=>!x||e.toLowerCase().includes(x),Z=e=>x?!0:!$.has(e),B=M(()=>new Set((r??[]).map(e=>e.slug)),[r]),j=()=>{if(w.pageCreationInAdminForm){R.send("storefront-editor:new-page");return}S(""),h(null),C(!0)},H=async()=>{const e=m.trim();if(!(!e||!y||p||!d.createPage)){k(!0),h(null);try{const s=await d.createPage({slug:U(e,B),title:e,layout:{}});await I(),C(!1),S(""),o(s.slug)}catch{h("Couldn’t add the page — please retry.")}finally{k(!1)}}},ee=async e=>{if(!(!y||p||!d.deletePage||(r??[]).length<=1)){k(!0);try{await d.deletePage(e.id);const s=(r??[]).filter(n=>n.id!==e.id);N(s),h(null),e.slug===z&&s[0]&&o(s[0].slug)}catch{h("Couldn’t delete the page — please retry.")}finally{k(!1)}}},te=e=>R.send("storefront-editor:open-page",{slug:e}),se=e=>{if(!W(e.label))return null;const s=!l&&e.slug===z,n=w.canDeletePagesInline&&(r??[]).length>1;return a("div",{className:`sf-row sf-prow ${s?"is-selected":""}`,onClick:()=>o(e.slug),children:[t("span",{className:"sf-chip",children:t(ke,{})}),t("span",{className:"sf-row-name",children:e.label}),be(e)&&t("span",{className:"sf-badge-dynamic",children:"Dynamic"}),e.kind==="lightbox"&&t("span",{className:"sf-badge-lightbox",children:"Lightbox"}),e.draft&&t("span",{className:"sf-page-draft",children:"draft"}),w.pageCreationInAdminForm&&t(L,{content:`Edit “${e.label}” in the admin`,children:t("button",{type:"button",className:"sf-page-edit","aria-label":`Edit ${e.label} in the admin`,onClick:i=>{i.stopPropagation(),te(e.slug)},children:t(f,{name:"pencil",size:13,strokeWidth:1.7,rounded:!0})})}),n&&t(L,{content:`Delete “${e.label}”`,children:t("button",{type:"button",className:"sf-page-edit sf-page-edit--danger",disabled:p,"aria-label":`Delete ${e.label}`,onClick:i=>{i.stopPropagation(),ee(e)},children:t(f,{name:"trash",size:13,strokeWidth:1.7,rounded:!0})})})]},e.id)},A=(e,s,n)=>{const i=n.filter(Boolean);if(i.length===0)return null;const E=Z(e);return a("div",{className:"sf-pgroup",children:[a("button",{type:"button",className:"sf-pgroup-head","aria-expanded":E,onClick:()=>Y(e),children:[t(f,{name:"chevron-right",size:10,strokeWidth:2.6,rounded:!0,style:{transform:E?"rotate(90deg)":"none",transition:"transform 0.14s"}}),t("span",{className:"sf-pgroup-label",children:s}),t("span",{className:"sf-pgroup-count",children:i.length})]}),E&&t("div",{className:"sf-pgroup-body",children:i})]},e)},_=(b?.rows??[]).filter(e=>W(e.label)).map(e=>{const s=l===e.key;return a("div",{className:`sf-row sf-prow sf-prow--shop ${s?"is-selected":""}`,onClick:()=>u(e.key),children:[t("span",{className:"sf-chip",children:e.icon}),t("span",{className:"sf-row-name",children:e.label}),t("span",{className:"sf-badge-preview",children:"Preview"}),t(L,{content:`Open the ${e.label} in a new tab`,children:t("a",{className:"sf-page-edit",href:e.href,target:"_blank",rel:"noopener noreferrer","aria-label":`Open the ${e.label} in a new tab`,onClick:n=>n.stopPropagation(),children:t(f,{name:"external-link",size:13,strokeWidth:1.7,rounded:!0})})})]},e.key)}),q=w.hasSiteSettings&&!!b,D=(()=>{if(r===null)return null;const e=[];let s=!1;for(const n of X)q&&!s&&n.key.startsWith("system:")&&(e.push(A("shop",b.title,_)),s=!0),e.push(A(n.key,n.label,n.rows.map(se)));return q&&!s&&e.push(A("shop",b.title,_)),e})();return a("div",{className:"sf-pages",children:[t(le,{icon:t(me,{}),title:"Pages",context:Q,actions:t(ce,{label:"New page",onClick:j,children:t(he,{size:15})}),onHide:g}),a("div",{className:"sf-pages-search",children:[t(f,{name:"search",size:14,rounded:!0}),t("input",{type:"search",className:"sf-pages-search-input",placeholder:"Search all pages…",value:P,onChange:e=>T(e.target.value),"aria-label":"Search all pages"})]}),a("div",{className:"sf-pages-list sf-scroll",children:[v&&!O&&t("div",{className:"sf-note sf-note--error",role:"alert",children:v}),D===null?t("div",{className:"sf-note",children:"Loading…"}):D.some(Boolean)?D:t("div",{className:"sf-note",children:P.trim()?"No pages match your search":"No pages yet"})]}),a("button",{type:"button",className:"sf-pages-new",onClick:j,children:[t("span",{className:"sf-plus",children:"+"}),"New page"]}),t(de,{open:O,onClose:()=>C(!1),size:"sm",title:"Add a page",description:"Give the new template page a name. It starts blank — add sections once it opens.",footer:a(ne,{children:[t(J,{variant:"secondary",onClick:()=>C(!1),children:"Cancel"}),t(J,{onClick:()=>{H()},disabled:p||!m.trim(),loading:p,children:p?"Adding…":"Add page"})]}),children:t(pe,{label:"Page name",htmlFor:F,hint:m.trim()?`URL: /${U(m,B)}`:void 0,error:v??void 0,children:t(ue,{id:F,value:m,invalid:!!v,onChange:e=>S(e.target.value),onKeyDown:e=>{e.key==="Enter"&&H()},placeholder:"e.g. About"})})})]})}function ke(){return a("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[t("path",{d:"M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z"}),t("path",{d:"M14 3v5h5"})]})}export{Ne as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{
|
|
1
|
+
"use client";import{default as f}from"efficient-easel/screen/components/PanelToggleIcon";export{f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as r,jsxs as t}from"react/jsx-runtime";function
|
|
1
|
+
import{jsx as r,jsxs as t}from"react/jsx-runtime";import{Tooltip as s}from"efficient-shell/ui";function c({label:o,onClear:a,what:e="override"}){return r(s,{content:`Clear ${e}`,children:r("button",{type:"button",className:"sf-part-mark","aria-label":`Clear ${e}: ${o}`,onClick:a,children:r(i,{})})})}function i(){return t("svg",{width:"12",height:"12",viewBox:"0 0 16 16","aria-hidden":"true",children:[r("circle",{className:"sf-part-mark-dot",cx:"8",cy:"8",r:"3",fill:"currentColor"}),t("g",{className:"sf-part-mark-arrow",fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",children:[r("path",{d:"M13 8a5 5 0 1 1-1.6-3.7"}),r("path",{d:"M13 2.5V5h-2.6"})]})]})}export{c as PartResetDot};
|
|
@@ -36,6 +36,11 @@ export declare function partStyleName(props: Record<string, unknown>, propKey: s
|
|
|
36
36
|
faceRole: FontRole;
|
|
37
37
|
base: PartStyleBase;
|
|
38
38
|
} | null, fonts: FontsValue): string | null;
|
|
39
|
+
export declare function PartStyleSelect({ face, base, onPick, }: {
|
|
40
|
+
face: PartFace;
|
|
41
|
+
base: PartStyleBase | null;
|
|
42
|
+
onPick: (role: FontRole | null) => void;
|
|
43
|
+
}): import("react").JSX.Element;
|
|
39
44
|
export declare function PartStyleCard({ parts, onEditStyle, onClearAll, onFollowStyle, kindLabel, }: {
|
|
40
45
|
parts: readonly PanelPart[];
|
|
41
46
|
onEditStyle?: () => void;
|