@riverbankcms/sdk 0.80.0 → 0.81.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/dist/{PreviewEditorSidebar-QZG37QIF.mjs → PreviewEditorSidebar-RDCMEXIJ.mjs} +763 -255
- package/dist/{PreviewEditorUI-AXIKSMZA.mjs → PreviewEditorUI-NYGQ6K7B.mjs} +170 -29
- package/dist/SdkPreviewModeRuntime-AKCSCZEC.mjs +8 -0
- package/dist/_dts/api/src/contentRuntime.d.ts +12 -0
- package/dist/_dts/api/src/contentTypes.d.ts +6 -0
- package/dist/_dts/api/src/index.d.ts +2 -2
- package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +53 -0
- package/dist/_dts/block-form/src/backend/store-backend.d.ts +3 -1
- package/dist/_dts/block-form/src/backend/types.d.ts +3 -3
- package/dist/_dts/blocks/src/PageRenderer.d.ts +3 -0
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +20 -28
- package/dist/_dts/blocks/src/index.d.ts +6 -4
- package/dist/_dts/blocks/src/primitives/content/components/Text.d.ts +1 -1
- package/dist/_dts/blocks/src/primitives/content/primitives.d.ts +1 -0
- package/dist/_dts/blocks/src/server.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/events/event-calendar.d.ts +3 -2
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +135 -0
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +5 -0
- package/dist/_dts/blocks/src/system/blocks/feature-cards.d.ts +2 -0
- package/dist/_dts/blocks/src/system/blocks/form.d.ts +20 -1
- package/dist/_dts/blocks/src/system/blocks/hero.d.ts +2 -0
- package/dist/_dts/blocks/src/system/blocks/offerings-preview/index.d.ts +19 -0
- package/dist/_dts/blocks/src/system/blocks/offerings-preview/model.d.ts +134 -0
- package/dist/_dts/blocks/src/system/componentFactory.d.ts +1 -0
- package/dist/_dts/blocks/src/system/constants/background.d.ts +1 -1
- package/dist/_dts/blocks/src/system/constants/blockKinds.d.ts +1 -1
- package/dist/_dts/blocks/src/system/customize/backgrounds.d.ts +13 -3
- package/dist/_dts/blocks/src/system/data/index.d.ts +2 -0
- package/dist/_dts/blocks/src/system/data/linkedContentEntries.d.ts +64 -0
- package/dist/_dts/blocks/src/system/data/loaderEndpoints.d.ts +1 -1
- package/dist/_dts/blocks/src/system/designCapabilities.d.ts +2 -2
- package/dist/_dts/blocks/src/system/fields/boxStyles.d.ts +6 -1
- package/dist/_dts/blocks/src/system/fragments/library/faqHeading.d.ts +0 -1
- package/dist/_dts/blocks/src/system/media/slotContracts.d.ts +2 -0
- package/dist/_dts/blocks/src/system/node/types.d.ts +8 -1
- package/dist/_dts/blocks/src/system/node/validation-constants.d.ts +1 -1
- package/dist/_dts/blocks/src/system/registry.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +44 -50
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +21 -24
- package/dist/_dts/blocks/src/system/runtime/headingDecoration.d.ts +21 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.d.ts +45 -14
- package/dist/_dts/blocks/src/system/runtime/hooks/useEventFilters.d.ts +2 -9
- package/dist/_dts/blocks/src/system/runtime/hooks/useEventPagination.d.ts +1 -10
- package/dist/_dts/blocks/src/system/runtime/nodes/basic.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCalendar.interactive.d.ts +21 -16
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.client.d.ts +3 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.interactive.d.ts +21 -16
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventListing.interactive.d.ts +17 -28
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventPaginatedListView.client.d.ts +2 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekAgendaView.d.ts +3 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/listOptions.d.ts +50 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/utils.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/media.d.ts +29 -14
- package/dist/_dts/blocks/src/system/runtime/nodes/offerings-preview.d.ts +21 -0
- package/dist/_dts/blocks/src/system/runtime/resolver.d.ts +7 -0
- package/dist/_dts/blocks/src/system/transforms/registry/_utils/sectionForegroundStyles.d.ts +2 -0
- package/dist/_dts/blocks/src/system/transforms/registry/boxStyles.d.ts +4 -2
- package/dist/_dts/calendar/src/grid.d.ts +27 -0
- package/dist/_dts/calendar/src/index.d.ts +2 -2
- package/dist/_dts/content-editor/src/controller/useAutosaveTriggers.d.ts +3 -1
- package/dist/_dts/content-editor/src/editorTransactionState.d.ts +1 -0
- package/dist/_dts/content-editor/src/hooks/autosaveScopePlanning.d.ts +26 -0
- package/dist/_dts/content-editor/src/hooks/publishability.d.ts +1 -0
- package/dist/_dts/content-editor/src/hooks/useLinkedEntryAutosave.d.ts +23 -0
- package/dist/_dts/content-editor/src/hooks/useReactiveToolbar.d.ts +1 -1
- package/dist/_dts/content-editor/src/hooks/useSimpleAutosave.d.ts +2 -2
- package/dist/_dts/content-editor/src/index.d.ts +3 -1
- package/dist/_dts/content-editor/src/lib/json.d.ts +2 -0
- package/dist/_dts/content-editor/src/linkedEntries/domain.d.ts +8 -0
- package/dist/_dts/content-editor/src/ui/editorSnapshot.d.ts +58 -0
- package/dist/_dts/content-editor/src/ui/editorTransactionState.d.ts +93 -0
- package/dist/_dts/content-editor/src/ui/editorUiStore.d.ts +60 -3
- package/dist/_dts/content-editor/src/ui/stores/autosaveStore.d.ts +2 -0
- package/dist/_dts/content-editor/src/ui/stores/types.d.ts +1 -1
- package/dist/_dts/content-model/src/content-types/builtins.d.ts +43 -0
- package/dist/_dts/content-model/src/metadataConfig.d.ts +87 -47
- package/dist/_dts/core/src/branded.d.ts +5 -0
- package/dist/_dts/core/src/index.d.ts +1 -0
- package/dist/_dts/core/src/stable-json.d.ts +1 -0
- package/dist/_dts/editor/src/EditorProvider.d.ts +26 -0
- package/dist/_dts/editor/src/chrome/EditorChrome.d.ts +26 -0
- package/dist/_dts/editor/src/chrome/EditorStatusBar.d.ts +45 -0
- package/dist/_dts/editor/src/chrome/statusBarPresentation.d.ts +25 -0
- package/dist/_dts/editor/src/components/EditingToggle.d.ts +9 -0
- package/dist/_dts/editor/src/hooks/useEditableElement.d.ts +18 -0
- package/dist/_dts/editor/src/index.d.ts +29 -0
- package/dist/_dts/editor/src/inline/InlineTextEditor.d.ts +1 -0
- package/dist/_dts/editor/src/lib/utils.d.ts +1 -0
- package/dist/_dts/editor/src/primitives/EditorPrimitivesProvider.d.ts +20 -0
- package/dist/_dts/editor/src/primitives/InlineFieldContext.d.ts +11 -0
- package/dist/_dts/editor/src/primitives/SaveContext.d.ts +12 -0
- package/dist/_dts/editor/src/primitives/helpers.d.ts +1 -0
- package/dist/_dts/editor/src/primitives/rich-text/RichTextEditorSurface.d.ts +26 -0
- package/dist/_dts/editor/src/primitives/rich-text/RichTextToolbar.d.ts +16 -0
- package/dist/_dts/editor/src/primitives/rich-text/config.d.ts +23 -0
- package/dist/_dts/editor/src/primitives/rich-text/extensions/RichTextImage.d.ts +2 -0
- package/dist/_dts/editor/src/primitives/rich-text/extensions/RichTextLink.d.ts +1 -0
- package/dist/_dts/editor/src/primitives/rich-text/imageActions.d.ts +22 -0
- package/dist/_dts/editor/src/primitives/rich-text/sanitize.d.ts +23 -0
- package/dist/_dts/editor/src/primitives/rich-text/toolbar/BlockTypeDropdown.d.ts +6 -0
- package/dist/_dts/editor/src/primitives/rich-text/toolbar/LinkPopover.d.ts +10 -0
- package/dist/_dts/editor/src/primitives/rich-text/toolbar/ToolbarIconButton.d.ts +11 -0
- package/dist/_dts/editor/src/primitives/rich-text/toolbar/linkPopoverUtils.d.ts +58 -0
- package/dist/_dts/editor/src/primitives/rich-text/useRichTextEditor.d.ts +19 -0
- package/dist/_dts/editor/src/primitives/rich-text/utils.d.ts +20 -0
- package/dist/_dts/editor/src/utils/optimisticTokens.d.ts +27 -0
- package/dist/_dts/editor-blocks/src/BlockEditor.d.ts +2 -2
- package/dist/_dts/editor-blocks/src/block-editor/BlockCard.d.ts +3 -3
- package/dist/_dts/editor-blocks/src/block-editor/BlockCardHeader.d.ts +4 -4
- package/dist/_dts/editor-blocks/src/block-editor/SortableBlockItem.d.ts +2 -2
- package/dist/_dts/editor-blocks/src/block-editor/actionPresentation.d.ts +15 -0
- package/dist/_dts/editor-blocks/src/block-editor/blockHeaderActionPlan.d.ts +49 -0
- package/dist/_dts/editor-blocks/src/widgets/index.d.ts +1 -0
- package/dist/_dts/editor-blocks/src/widgets/rich-text/RichTextWidgetProvider.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/rich-text/useImagePicker.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/site-option-picker/SiteOptionPickerField.d.ts +3 -0
- package/dist/_dts/editor-blocks/src/widgets/site-option-picker/SiteOptionWidgetProvider.d.ts +14 -0
- package/dist/_dts/editor-blocks/src/widgets/site-option-picker/index.d.ts +6 -0
- package/dist/_dts/editor-blocks/src/widgets/site-option-picker/loaders.d.ts +51 -0
- package/dist/_dts/editor-blocks/src/widgets/site-option-picker/types.d.ts +20 -0
- package/dist/_dts/editor-blocks/src/widgets/site-option-picker/utils.d.ts +5 -0
- package/dist/_dts/media-core/src/index.d.ts +1 -0
- package/dist/_dts/media-core/src/renderableMediaAsset.d.ts +18 -0
- package/dist/_dts/media-editor/src/MediaEditor.d.ts +4 -1
- package/dist/_dts/media-editor/src/MediaPickerDialog.d.ts +2 -1
- package/dist/_dts/media-editor/src/index.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/blocks/BlockToolbar.d.ts +3 -2
- package/dist/_dts/preview-next/src/client/blocks/EditablePageRenderer.d.ts +5 -1
- package/dist/_dts/preview-next/src/client/blocks/blockCustomizePopoverRows.d.ts +25 -0
- package/dist/_dts/preview-next/src/client/blocks/composer/mergeDrafts.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/blocks/composer/types.d.ts +4 -30
- package/dist/_dts/preview-next/src/client/blocks/linkedEntryRenderOverlay.d.ts +11 -0
- package/dist/_dts/preview-next/src/client/blocks/previewCustomizeActions.d.ts +3 -9
- package/dist/_dts/preview-next/src/client/blocks/useBlockCustomizeControls.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/index.d.ts +0 -1
- package/dist/_dts/preview-next/src/client/preview/EntryEditorPanel.d.ts +3 -1
- package/dist/_dts/preview-next/src/client/preview/LinkedEntryEditEventBridge.d.ts +1 -0
- package/dist/_dts/preview-next/src/client/preview/PageBlockEditorPanel.d.ts +3 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewChromeLayer.d.ts +20 -0
- package/dist/_dts/preview-next/src/client/preview/PreviewDesignHistoryOrderContext.d.ts +13 -0
- package/dist/_dts/preview-next/src/client/preview/PreviewOpenEditorButton.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +19 -19
- package/dist/_dts/preview-next/src/client/preview/PreviewSidebarSection.d.ts +13 -0
- package/dist/_dts/preview-next/src/client/preview/SiteChromeCustomizeContext.d.ts +47 -4
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.state.d.ts +14 -1
- package/dist/_dts/preview-next/src/client/preview/linkedEntryEditEvents.d.ts +5 -0
- package/dist/_dts/preview-next/src/client/preview/previewChromePlacement.d.ts +46 -0
- package/dist/_dts/preview-next/src/client/preview/previewCustomizeControls.d.ts +68 -0
- package/dist/_dts/preview-next/src/client/preview/previewCustomizeHistory.d.ts +8 -1
- package/dist/_dts/preview-next/src/client/preview/previewCustomizeWorkflowState.d.ts +11 -9
- package/dist/_dts/preview-next/src/client/preview/previewDesignHistoryOrder.d.ts +18 -0
- package/dist/_dts/preview-next/src/client/preview/previewUndoDomains.d.ts +1 -1
- package/dist/_dts/preview-next/src/client/preview/siteChromeBrandPreferences.d.ts +41 -0
- package/dist/_dts/preview-next/src/client/preview/siteChromeQuickControlHistoryState.d.ts +101 -0
- package/dist/_dts/preview-next/src/client/preview/siteChromeSavePlan.d.ts +29 -0
- package/dist/_dts/preview-next/src/client/preview/siteStyleHistoryState.d.ts +55 -0
- package/dist/_dts/preview-next/src/client/preview/styleConfiguratorApplyPayload.d.ts +1 -0
- package/dist/_dts/preview-next/src/client/widgets/widgetAdapters.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/widgets/widgetOverrides.d.ts +3 -2
- package/dist/_dts/preview-next/src/constants.d.ts +0 -1
- package/dist/_dts/sdk/src/cli/config-loader.d.ts +3 -1
- package/dist/_dts/sdk/src/cli/content/reader.d.ts +5 -3
- package/dist/_dts/sdk/src/cli/site-commands/commandSurfaceDispatch.d.ts +1 -0
- package/dist/_dts/sdk/src/cli/site-commands/pageCommands.d.ts +3 -1
- package/dist/_dts/sdk/src/cli/site-commands/pushExecution.d.ts +1 -0
- package/dist/_dts/sdk/src/config/types.d.ts +1 -1
- package/dist/_dts/sdk/src/config/validation.d.ts +3 -3
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +28 -2
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +10 -0
- package/dist/_dts/sdk/src/rendering/islands/types.d.ts +42 -0
- package/dist/_dts/sdk/src/rendering/mediaAssets.d.ts +4 -0
- package/dist/_dts/sdk/src/types/block-kinds.d.ts +1 -1
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/buttons/constants.d.ts +26 -1
- package/dist/_dts/theme-core/src/buttons/personalities/index.d.ts +11 -0
- package/dist/_dts/theme-core/src/buttons/personalities/joy-stamp.d.ts +22 -0
- package/dist/_dts/theme-core/src/buttons/personalities/types.d.ts +1 -0
- package/dist/_dts/theme-core/src/buttons/types.d.ts +9 -0
- package/dist/_dts/theme-core/src/cards/siteStyleDefaults.d.ts +44 -0
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/interactive/types.d.ts +10 -0
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +27 -6
- package/dist/_dts/theme-core/src/palette/variants/index.d.ts +15 -0
- package/dist/_dts/theme-core/src/palette/variants/warm-dark.d.ts +27 -0
- package/dist/_dts/theme-core/src/schema.d.ts +40 -3
- package/dist/_dts/theme-core/src/site-styles/accessibleSurfaces.d.ts +4 -1
- package/dist/_dts/theme-core/src/site-styles/appearancePresetCatalog.d.ts +87 -31
- package/dist/_dts/theme-core/src/site-styles/appearancePresetResolution.d.ts +6 -2
- package/dist/_dts/theme-core/src/site-styles/blockAppearancePresets.d.ts +87 -31
- package/dist/_dts/theme-core/src/site-styles/curatedSiteStyles.d.ts +30 -1
- package/dist/_dts/theme-core/src/site-styles/designState.d.ts +18 -2
- package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +6 -2
- package/dist/_dts/theme-core/src/site-styles/headerLooks.d.ts +5 -0
- package/dist/_dts/theme-core/src/site-styles/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/site-styles/pageDesignEditorModel.d.ts +3 -23
- package/dist/_dts/theme-core/src/site-styles/pageDesignIntent.d.ts +276 -4
- package/dist/_dts/theme-core/src/site-styles/runtimeCompiler.d.ts +33 -3
- package/dist/_dts/theme-core/src/site-styles/sectionTransitions.d.ts +508 -0
- package/dist/_dts/theme-core/src/site-styles/sourceCatalogs.d.ts +10 -10
- package/dist/_dts/theme-core/src/site-styles/types.d.ts +24 -6
- package/dist/_dts/theme-core/src/site-styles/typographyPresets.d.ts +16 -1
- package/dist/{chunk-7PCYG6YV.mjs → chunk-3PTVPAT4.mjs} +1863 -1099
- package/dist/{chunk-5NZGBSJF.mjs → chunk-3QWQ2MUQ.mjs} +469 -1000
- package/dist/{chunk-HTB4BMKD.mjs → chunk-3VT7LZY2.mjs} +321 -113
- package/dist/{chunk-MPBNEVPB.mjs → chunk-4T5JIPWY.mjs} +1 -1
- package/dist/{chunk-BBLZSQEY.mjs → chunk-E3NZYEKF.mjs} +1 -7
- package/dist/{chunk-GYXKAUFV.mjs → chunk-WUHKQBB6.mjs} +9509 -2658
- package/dist/cli/index.mjs +1347 -324
- package/dist/client/{accordion-QFZMNB7O.mjs → accordion-SFIIZWNH.mjs} +2 -2
- package/dist/client/{bookingForm-NCIXFWIG.mjs → bookingForm-CFKZVWGA.mjs} +5 -5
- package/dist/client/bookings.mjs +281 -19
- package/dist/client/{carousel-EO4BJMWD.mjs → carousel-ELXWSBLA.mjs} +3 -3
- package/dist/client/{cart-FTYCLYUW.mjs → cart-6SSCPYY5.mjs} +6 -6
- package/dist/client/{checkout-NFGLVCOX.mjs → checkout-UFQ34HPV.mjs} +6 -6
- package/dist/client/{chunk-6GVVWSPU.mjs → chunk-76JUETXQ.mjs} +139 -186
- package/dist/client/{chunk-AUJ5DBZJ.mjs → chunk-7BXX7WXH.mjs} +112 -28
- package/dist/client/{chunk-IWFZSQNZ.mjs → chunk-G56BSZAM.mjs} +2 -2
- package/dist/client/{chunk-VDS5YFLX.mjs → chunk-IUEDYLFJ.mjs} +1 -1
- package/dist/client/{chunk-PYRBIURC.mjs → chunk-NP47RHIX.mjs} +5 -5
- package/dist/client/{chunk-PUOELU4O.mjs → chunk-NX6X3GRF.mjs} +330 -80
- package/dist/client/{chunk-Y37KDO7P.mjs → chunk-PA2LJH2M.mjs} +2 -2
- package/dist/client/{chunk-CE7IBGVW.mjs → chunk-RMWMT3ZD.mjs} +1 -1
- package/dist/client/{chunk-4W66ALYT.mjs → chunk-TCJS3NY5.mjs} +1 -1
- package/dist/client/{chunk-T6UIP6UZ.mjs → chunk-V6XI4M2Q.mjs} +1 -1
- package/dist/client/client.mjs +5924 -3138
- package/dist/client/{courseRegistration-2EORROPS.mjs → courseRegistration-HJIISAAG.mjs} +5 -5
- package/dist/client/{eventCalendar-WZI4VL6N.mjs → eventCalendar-F6YVUCZR.mjs} +7 -7
- package/dist/client/{eventCombined-QCB2TCNL.mjs → eventCombined-B5DSTIOK.mjs} +7 -7
- package/dist/client/{eventDetails-TFTATAPH.mjs → eventDetails-SEJDDHQC.mjs} +7 -7
- package/dist/client/{eventListing-A2CQEHEQ.mjs → eventListing-TPMWIIBO.mjs} +7 -7
- package/dist/client/{eventRegistration-OELPVLUY.mjs → eventRegistration-QU6W2PV6.mjs} +7 -7
- package/dist/client/{form-NTIFD6WQ.mjs → form-LVTYNTDE.mjs} +2 -2
- package/dist/client/{headerSection-7TBNKCLA.mjs → headerSection-SO3MFC4U.mjs} +54 -13
- package/dist/client/hooks.mjs +2266 -1179
- package/dist/client/{locationMap-LRLB5A3H.mjs → locationMap-5E5FLAKO.mjs} +2 -2
- package/dist/client/{newsletterForm-XI52RZSN.mjs → newsletterForm-GN32JEBQ.mjs} +2 -2
- package/dist/client/{productDetail-GSNKBFLY.mjs → productDetail-Q346KSVR.mjs} +6 -6
- package/dist/client/{productList-BGCGT4KZ.mjs → productList-DTDMQYGZ.mjs} +6 -6
- package/dist/client/rendering/client.mjs +4618 -3318
- package/dist/client/rendering/islands.mjs +32 -20
- package/dist/client/rendering.mjs +4898 -2108
- package/dist/client/{shop-RQHUCLNY.mjs → shop-OFUW7KPN.mjs} +6 -6
- package/dist/preview-next/client/runtime.mjs +5 -5
- package/dist/preview-next/constants.mjs +0 -2
- package/dist/preview-next/index.mjs +0 -2
- package/dist/{sdk-runtime-A4LHT2RS.mjs → sdk-runtime-2GIX6I7X.mjs} +6 -6
- package/dist/server/components.mjs +4377 -1852
- package/dist/server/config-validation.mjs +2283 -1303
- package/dist/server/config.mjs +2283 -1303
- package/dist/server/data.mjs +2267 -1180
- package/dist/server/index.mjs +2 -1
- package/dist/server/next.mjs +4394 -1773
- package/dist/server/page-converter.mjs +1999 -1015
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +4482 -1857
- package/dist/server/rendering.mjs +4484 -1859
- package/dist/server/routing.mjs +2302 -1120
- package/dist/server/server.mjs +2284 -1197
- package/dist/server/theme-bridge.mjs +757 -85
- package/dist/server/theme.mjs +69 -4
- package/dist/styles/index.css +474 -65
- package/package.json +1 -1
- package/dist/SdkPreviewModeRuntime-XE5M4UKM.mjs +0 -8
- package/dist/_dts/editor-blocks/src/block-editor/actionControlMode.d.ts +0 -2
- package/dist/_dts/preview-next/src/client/preview/previewSurface.d.ts +0 -3
|
@@ -11,9 +11,11 @@ export type AutosaveState = {
|
|
|
11
11
|
metadata: AutosaveStatus;
|
|
12
12
|
content: AutosaveStatus;
|
|
13
13
|
blocks: AutosaveStatus;
|
|
14
|
+
linkedEntries: AutosaveStatus;
|
|
14
15
|
setMetadataStatus: (status: Partial<AutosaveStatus>) => void;
|
|
15
16
|
setContentStatus: (status: Partial<AutosaveStatus>) => void;
|
|
16
17
|
setBlocksStatus: (status: Partial<AutosaveStatus>) => void;
|
|
18
|
+
setLinkedEntriesStatus: (status: Partial<AutosaveStatus>) => void;
|
|
17
19
|
registerAutosave: (type: AutosaveType, handle: AutosaveHandle) => void;
|
|
18
20
|
unregisterAutosave: (type: AutosaveType) => void;
|
|
19
21
|
/**
|
|
@@ -11,7 +11,7 @@ export type AutosaveHandle = {
|
|
|
11
11
|
flush: () => void;
|
|
12
12
|
isPending: () => boolean;
|
|
13
13
|
};
|
|
14
|
-
export type AutosaveType = 'metadata' | 'content' | 'blocks';
|
|
14
|
+
export type AutosaveType = 'metadata' | 'content' | 'blocks' | 'linkedEntries';
|
|
15
15
|
export type FocusRequest = {
|
|
16
16
|
requestId: number;
|
|
17
17
|
blockId: EditorBlockId;
|
|
@@ -475,4 +475,47 @@ export declare const BUILTIN_CONTENT_TYPE_FIELD_IDS: {
|
|
|
475
475
|
readonly page: ReadonlySet<string>;
|
|
476
476
|
readonly 'product-category': ReadonlySet<string>;
|
|
477
477
|
};
|
|
478
|
+
export type BuiltinPreviewLinkedEntryEditing = Readonly<{
|
|
479
|
+
kind: 'generic';
|
|
480
|
+
}> | Readonly<{
|
|
481
|
+
kind: 'unsupported-domain-backed';
|
|
482
|
+
reason: string;
|
|
483
|
+
}>;
|
|
484
|
+
/**
|
|
485
|
+
* Preview editing support for built-in content entries when they appear as
|
|
486
|
+
* linked data inside a block. Generic editorial content can use the shared
|
|
487
|
+
* content-entry form; domain-backed content stays closed until its workflow
|
|
488
|
+
* can preserve domain invariants such as occurrences, booking, or commerce.
|
|
489
|
+
*/
|
|
490
|
+
export declare const BUILTIN_PREVIEW_LINKED_ENTRY_EDITING: {
|
|
491
|
+
readonly post: {
|
|
492
|
+
readonly kind: "generic";
|
|
493
|
+
};
|
|
494
|
+
readonly event: {
|
|
495
|
+
readonly kind: "unsupported-domain-backed";
|
|
496
|
+
readonly reason: "Domain-backed entries need a dedicated editor workflow.";
|
|
497
|
+
};
|
|
498
|
+
readonly course: {
|
|
499
|
+
readonly kind: "unsupported-domain-backed";
|
|
500
|
+
readonly reason: "Domain-backed entries need a dedicated editor workflow.";
|
|
501
|
+
};
|
|
502
|
+
readonly 'team-member': {
|
|
503
|
+
readonly kind: "generic";
|
|
504
|
+
};
|
|
505
|
+
readonly product: {
|
|
506
|
+
readonly kind: "unsupported-domain-backed";
|
|
507
|
+
readonly reason: "Domain-backed entries need a dedicated editor workflow.";
|
|
508
|
+
};
|
|
509
|
+
readonly testimonial: {
|
|
510
|
+
readonly kind: "generic";
|
|
511
|
+
};
|
|
512
|
+
readonly page: {
|
|
513
|
+
readonly kind: "generic";
|
|
514
|
+
};
|
|
515
|
+
readonly 'product-category': {
|
|
516
|
+
readonly kind: "unsupported-domain-backed";
|
|
517
|
+
readonly reason: "Domain-backed entries need a dedicated editor workflow.";
|
|
518
|
+
};
|
|
519
|
+
};
|
|
520
|
+
export declare function getBuiltinPreviewLinkedEntryEditing(key: string): BuiltinPreviewLinkedEntryEditing | null;
|
|
478
521
|
export {};
|
|
@@ -1,77 +1,113 @@
|
|
|
1
|
-
type
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
max: number;
|
|
6
|
-
};
|
|
7
|
-
visibleWhen?: {
|
|
8
|
-
field: string;
|
|
9
|
-
equals?: unknown;
|
|
10
|
-
notEquals?: unknown;
|
|
11
|
-
oneOf?: unknown[];
|
|
12
|
-
notIn?: unknown[];
|
|
13
|
-
};
|
|
1
|
+
import type { ContentEntrySnapshot } from "./types";
|
|
2
|
+
declare const nonEmptyPageRouteSlugBrand: unique symbol;
|
|
3
|
+
export type NonEmptyPageRouteSlug = string & {
|
|
4
|
+
readonly [nonEmptyPageRouteSlugBrand]: "NonEmptyPageRouteSlug";
|
|
14
5
|
};
|
|
15
|
-
type
|
|
16
|
-
|
|
6
|
+
export type PageRouteSlug = Readonly<{
|
|
7
|
+
kind: "homepage";
|
|
8
|
+
}> | Readonly<{
|
|
9
|
+
kind: "slug";
|
|
10
|
+
value: NonEmptyPageRouteSlug;
|
|
11
|
+
}>;
|
|
12
|
+
export type RouteMetadataManifestContext = Readonly<{
|
|
13
|
+
kind: "page";
|
|
14
|
+
routeSlug: PageRouteSlug;
|
|
15
|
+
}> | Readonly<{
|
|
16
|
+
kind: "content";
|
|
17
|
+
typeKey?: string | null;
|
|
18
|
+
}>;
|
|
19
|
+
export type RouteMetadataPresentation = Readonly<{
|
|
20
|
+
kind: "page-homepage";
|
|
21
|
+
manifest: RouteMetadataManifest;
|
|
22
|
+
routeSlug: Extract<PageRouteSlug, {
|
|
23
|
+
kind: "homepage";
|
|
24
|
+
}>;
|
|
25
|
+
}> | Readonly<{
|
|
26
|
+
kind: "page-routable";
|
|
27
|
+
manifest: RouteMetadataManifest;
|
|
28
|
+
routeSlug: Extract<PageRouteSlug, {
|
|
29
|
+
kind: "slug";
|
|
30
|
+
}>;
|
|
31
|
+
}> | Readonly<{
|
|
32
|
+
kind: "content";
|
|
33
|
+
manifest: RouteMetadataManifest;
|
|
34
|
+
typeKey: string | null;
|
|
35
|
+
}>;
|
|
36
|
+
export type RouteMetadataFieldId = "draftTitle" | "draftSlug" | "draftStatus" | "scheduledPublishAt" | "draftMetaTitle" | "draftMetaDescription" | "ogImageId";
|
|
37
|
+
type RouteMetadataTextField = {
|
|
38
|
+
id: "draftTitle" | "draftMetaTitle" | "draftMetaDescription" | "ogImageId";
|
|
39
|
+
type: "text";
|
|
17
40
|
label: string;
|
|
18
41
|
description?: string;
|
|
19
|
-
visibleRoles?: VisibilityRole[];
|
|
20
|
-
defaultValue?: unknown;
|
|
21
42
|
required: boolean;
|
|
22
|
-
ui?: BlockManifestUi;
|
|
23
|
-
};
|
|
24
|
-
type TextBlockManifestField = BaseBlockManifestField & {
|
|
25
|
-
type: "text";
|
|
26
43
|
multiline: boolean;
|
|
27
|
-
|
|
44
|
+
ui?: {
|
|
45
|
+
showCharCount?: {
|
|
46
|
+
max: number;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
28
49
|
};
|
|
29
|
-
type
|
|
50
|
+
type RouteMetadataSlugField = {
|
|
51
|
+
id: "draftSlug";
|
|
30
52
|
type: "slug";
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
53
|
+
label: string;
|
|
54
|
+
description: string;
|
|
55
|
+
required: true;
|
|
56
|
+
sourceFieldId?: "draftTitle";
|
|
57
|
+
statusFieldId: "draftStatus";
|
|
58
|
+
maxLength: number;
|
|
59
|
+
ui: {
|
|
60
|
+
showSlugPreview: true;
|
|
61
|
+
};
|
|
34
62
|
};
|
|
35
|
-
type
|
|
63
|
+
type RouteMetadataSelectField = {
|
|
64
|
+
id: "draftStatus";
|
|
36
65
|
type: "select";
|
|
66
|
+
label: string;
|
|
67
|
+
description: string;
|
|
68
|
+
required: true;
|
|
69
|
+
defaultValue: string;
|
|
37
70
|
options: Array<{
|
|
38
71
|
value: string;
|
|
39
72
|
label: string;
|
|
40
|
-
description?: string;
|
|
41
|
-
icon?: string;
|
|
42
73
|
}>;
|
|
43
|
-
multiple:
|
|
74
|
+
multiple: false;
|
|
44
75
|
};
|
|
45
|
-
type
|
|
76
|
+
type RouteMetadataDatetimeField = {
|
|
77
|
+
id: "scheduledPublishAt";
|
|
46
78
|
type: "datetime";
|
|
47
|
-
};
|
|
48
|
-
type BlockManifestField = TextBlockManifestField | SlugBlockManifestField | SelectBlockManifestField | DateTimeBlockManifestField;
|
|
49
|
-
type BlockManifestSlot = {
|
|
50
|
-
id: string;
|
|
51
79
|
label: string;
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
80
|
+
description: string;
|
|
81
|
+
required: false;
|
|
82
|
+
ui: {
|
|
83
|
+
visibleWhen: {
|
|
84
|
+
field: "draftStatus";
|
|
85
|
+
equals: "scheduled";
|
|
86
|
+
};
|
|
87
|
+
};
|
|
57
88
|
};
|
|
58
|
-
type
|
|
89
|
+
export type RouteMetadataField = RouteMetadataTextField | RouteMetadataSlugField | RouteMetadataSelectField | RouteMetadataDatetimeField;
|
|
90
|
+
export type RouteMetadataManifest = {
|
|
59
91
|
name: string;
|
|
60
92
|
version: string;
|
|
61
93
|
title: string;
|
|
62
94
|
description: string;
|
|
63
95
|
component: string;
|
|
64
|
-
fields:
|
|
65
|
-
slots:
|
|
96
|
+
fields: RouteMetadataField[];
|
|
97
|
+
slots: [];
|
|
66
98
|
};
|
|
67
|
-
export
|
|
68
|
-
export declare const ROUTE_METADATA_MANIFEST: BlockManifest;
|
|
99
|
+
export declare const ROUTE_METADATA_MANIFEST: RouteMetadataManifest;
|
|
69
100
|
export declare const METADATA_WORKFLOW_FIELDS: {
|
|
70
101
|
readonly title: "draftTitle";
|
|
71
102
|
readonly slug: "draftSlug";
|
|
72
103
|
readonly status: "draftStatus";
|
|
73
104
|
readonly publishAt: "scheduledPublishAt";
|
|
74
105
|
};
|
|
106
|
+
export declare function pageRouteSlugFromEditorValue(value: string | null | undefined): PageRouteSlug;
|
|
107
|
+
export declare function pageRouteSlugToEditorValue(slug: PageRouteSlug): string;
|
|
108
|
+
export declare function pageRouteSlugToStoredValue(slug: PageRouteSlug): string | null;
|
|
109
|
+
export declare function isHomepagePageRouteSlug(slug: PageRouteSlug): boolean;
|
|
110
|
+
export declare function resolvePageRouteSlug(entry: ContentEntrySnapshot, currentSlug?: string | null): PageRouteSlug | null;
|
|
75
111
|
export declare const ROUTE_METADATA_MANAGED_FIELDS_BY_TYPE: {
|
|
76
112
|
readonly event: readonly ["draftTitle", "draftSlug", "draftStatus", "scheduledPublishAt"];
|
|
77
113
|
readonly course: readonly ["draftTitle", "draftSlug", "draftStatus", "scheduledPublishAt"];
|
|
@@ -82,13 +118,17 @@ export declare const ROUTE_METADATA_MANAGED_FIELDS_BY_TYPE: {
|
|
|
82
118
|
export declare function getManagedRouteMetadataFieldIdsForType(typeKey: string | null | undefined): ReadonlyArray<RouteMetadataFieldId>;
|
|
83
119
|
export declare function isRouteMetadataFieldEditableForType(typeKey: string | null | undefined, fieldId: string): boolean;
|
|
84
120
|
export declare function getEditableRouteMetadataFieldIdsForType(typeKey: string | null | undefined): ReadonlyArray<RouteMetadataFieldId>;
|
|
85
|
-
export declare function getRouteMetadataManifestForType(typeKey: string | null | undefined):
|
|
121
|
+
export declare function getRouteMetadataManifestForType(typeKey: string | null | undefined): RouteMetadataManifest;
|
|
122
|
+
export declare function getRouteMetadataManifestForContext(context: RouteMetadataManifestContext): RouteMetadataManifest;
|
|
123
|
+
export declare function deriveRouteMetadataPresentation(context: RouteMetadataManifestContext, options?: Readonly<{
|
|
124
|
+
omitTitle?: boolean;
|
|
125
|
+
}>): RouteMetadataPresentation;
|
|
86
126
|
/**
|
|
87
127
|
* Remove the legacy route title editor from a route metadata manifest.
|
|
88
128
|
*
|
|
89
129
|
* Entry titles are now derived from entry data (single source of truth) and the route title is a denormalized copy.
|
|
90
130
|
* We still keep `draftTitle` in the underlying manifest for page creation flows, but we omit it from entry editors.
|
|
91
131
|
*/
|
|
92
|
-
export declare function omitRouteTitleFieldFromManifest(manifest:
|
|
132
|
+
export declare function omitRouteTitleFieldFromManifest(manifest: RouteMetadataManifest): RouteMetadataManifest;
|
|
93
133
|
export declare function sanitizeSlug(value: string): string;
|
|
94
134
|
export {};
|
|
@@ -75,6 +75,8 @@ export type BookingCalendarFeedTokenPublicId = Brand<string, 'BookingCalendarFee
|
|
|
75
75
|
export type BookingCalendarFeedTokenSecret = Brand<string, 'BookingCalendarFeedTokenSecret'>;
|
|
76
76
|
export type BookingCalendarFeedTokenSecretHash = Brand<string, 'BookingCalendarFeedTokenSecretHash'>;
|
|
77
77
|
export type ContentEntryId = Brand<string, 'ContentEntryId'>;
|
|
78
|
+
export type ContentVersionId = Brand<string, 'ContentVersionId'>;
|
|
79
|
+
export type EntryContentHash = Brand<string, 'EntryContentHash'>;
|
|
78
80
|
export type StripeInvoiceId = Brand<string, 'StripeInvoiceId'>;
|
|
79
81
|
export type NewsletterSubscriberId = Brand<string, 'NewsletterSubscriberId'>;
|
|
80
82
|
export type NavigationMenuId = Brand<string, 'NavigationMenuId'>;
|
|
@@ -186,6 +188,8 @@ export declare const unsafeAsBookingCalendarFeedTokenPublicId: (id: string) => B
|
|
|
186
188
|
export declare const unsafeAsBookingCalendarFeedTokenSecret: (value: string) => BookingCalendarFeedTokenSecret;
|
|
187
189
|
export declare const unsafeAsBookingCalendarFeedTokenSecretHash: (value: string) => BookingCalendarFeedTokenSecretHash;
|
|
188
190
|
export declare const unsafeAsContentEntryId: (id: string) => ContentEntryId;
|
|
191
|
+
export declare const unsafeAsContentVersionId: (id: string) => ContentVersionId;
|
|
192
|
+
export declare const unsafeAsEntryContentHash: (value: string) => EntryContentHash;
|
|
189
193
|
export declare const unsafeAsStripeInvoiceId: (id: string) => StripeInvoiceId;
|
|
190
194
|
export declare const unsafeAsNewsletterSubscriberId: (id: string) => NewsletterSubscriberId;
|
|
191
195
|
export declare const unsafeAsNavigationMenuId: (id: string) => NavigationMenuId;
|
|
@@ -229,6 +233,7 @@ export declare const parseProductVariantId: (value: unknown) => Result<ProductVa
|
|
|
229
233
|
export declare const parseProductCategoryId: (value: unknown) => Result<ProductCategoryId, BrandedIdParseError>;
|
|
230
234
|
export declare const parseMediaAssetId: (value: unknown) => Result<MediaAssetId, BrandedIdParseError>;
|
|
231
235
|
export declare const parseContentEntryId: (value: unknown) => Result<ContentEntryId, BrandedIdParseError>;
|
|
236
|
+
export declare const parseContentVersionId: (value: unknown) => Result<ContentVersionId, BrandedIdParseError>;
|
|
232
237
|
export declare const parseNavigationMenuId: (value: unknown) => Result<NavigationMenuId, BrandedIdParseError>;
|
|
233
238
|
export declare const parseNavigationItemId: (value: unknown) => Result<NavigationItemId, BrandedIdParseError>;
|
|
234
239
|
export declare const parsePassId: (value: unknown) => Result<PassId, BrandedIdParseError>;
|
|
@@ -41,5 +41,6 @@ export * from "./email-format";
|
|
|
41
41
|
export * from "./slug";
|
|
42
42
|
export * from "./string";
|
|
43
43
|
export * from "./uuid";
|
|
44
|
+
export * from "./stable-json";
|
|
44
45
|
export { disabledSelection, enabledSelection, plannerNoChange, plannerPatch, plannerUpdate, resolvePlanningDateInput, resolvePlanningNow, resolvePlanningNowDate, systemPlanningClock, } from "./planner";
|
|
45
46
|
export type { DisabledSelection, EnabledSelection, OptionalSelection, PlannerNoChange, PlannerPatch, PlannerUpdate, PlanningClock, PlanningDateInput, PlanningTimeOptions, } from "./planner";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function stableJsonStringify(value: unknown): string;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React, { type ReactNode } from 'react';
|
|
2
|
+
export type DrawerFocusTarget = {
|
|
3
|
+
blockId: string | null;
|
|
4
|
+
fieldPath?: string | null;
|
|
5
|
+
itemIndex?: number | null;
|
|
6
|
+
};
|
|
7
|
+
export type DraftSyncState = 'baseline' | 'pending' | 'failed';
|
|
8
|
+
interface EditorContextType {
|
|
9
|
+
isEditingMode: boolean;
|
|
10
|
+
toggleEditingMode: () => void;
|
|
11
|
+
setEditingMode: (value: boolean) => void;
|
|
12
|
+
editingElement: string | null;
|
|
13
|
+
setEditingElement: (elementId: string | null) => void;
|
|
14
|
+
currentBlockId?: string;
|
|
15
|
+
setCurrentBlock: (id: string | undefined) => void;
|
|
16
|
+
drawerFocus: DrawerFocusTarget | null;
|
|
17
|
+
setDrawerFocus: (target: DrawerFocusTarget | null) => void;
|
|
18
|
+
clearDrawerFocus: () => void;
|
|
19
|
+
}
|
|
20
|
+
export declare const useEditor: () => EditorContextType;
|
|
21
|
+
interface EditorProviderProps {
|
|
22
|
+
children: ReactNode;
|
|
23
|
+
initialEditingMode?: boolean;
|
|
24
|
+
}
|
|
25
|
+
export declare const EditorProvider: React.FC<EditorProviderProps>;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type EditorHistoryBarControls, type EditorStatusBarToolbar, type StatusBarMenuItem } from './EditorStatusBar';
|
|
3
|
+
type EditorChromeProps = {
|
|
4
|
+
toolbarOverrides?: Partial<EditorStatusBarToolbar>;
|
|
5
|
+
onPublish?: () => void | Promise<void>;
|
|
6
|
+
onDiscard?: () => void | Promise<void>;
|
|
7
|
+
publishMenuItems?: StatusBarMenuItem[];
|
|
8
|
+
actionsSlot?: ReactNode;
|
|
9
|
+
messageOverride?: string | null;
|
|
10
|
+
messageVariant?: 'default' | 'manual-save';
|
|
11
|
+
actionButtonSize?: 'sm' | 'default' | 'lg';
|
|
12
|
+
showStatusBar?: boolean;
|
|
13
|
+
showToggle?: boolean;
|
|
14
|
+
/** Override kebab menu items; pass [] to hide menu entirely. */
|
|
15
|
+
menuItems?: StatusBarMenuItem[];
|
|
16
|
+
/** Add kebab menu items that only appear on mobile. */
|
|
17
|
+
mobileMenuItems?: StatusBarMenuItem[];
|
|
18
|
+
status?: 'idle' | 'saving' | 'success' | 'error';
|
|
19
|
+
lastSavedAt?: string | null;
|
|
20
|
+
draftSyncState?: 'baseline' | 'pending' | 'failed';
|
|
21
|
+
hasFailedSaves?: boolean;
|
|
22
|
+
onRetryFailedSaves?: () => void | Promise<void>;
|
|
23
|
+
historyControls?: EditorHistoryBarControls;
|
|
24
|
+
};
|
|
25
|
+
export declare function EditorChrome({ toolbarOverrides, onPublish, onDiscard, publishMenuItems, actionsSlot, messageOverride, messageVariant, actionButtonSize, showStatusBar, showToggle, menuItems: menuItemsOverride, mobileMenuItems, status, lastSavedAt, draftSyncState, hasFailedSaves, onRetryFailedSaves, historyControls, }: EditorChromeProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { type ReactElement, type ReactNode } from "react";
|
|
2
|
+
import type { DraftSyncState } from "../EditorProvider";
|
|
3
|
+
export type DraftWorkflowStatus = "idle" | "saving" | "success" | "error";
|
|
4
|
+
export type EditorStatusBarToolbar = {
|
|
5
|
+
publishLabel?: string;
|
|
6
|
+
hasUnpublishedChanges?: boolean;
|
|
7
|
+
disablePublish?: boolean;
|
|
8
|
+
disableDiscard?: boolean;
|
|
9
|
+
currentStatus?: string | null;
|
|
10
|
+
publishedMessage?: string | null;
|
|
11
|
+
};
|
|
12
|
+
export type EditorHistoryBarControls = {
|
|
13
|
+
canUndo: boolean;
|
|
14
|
+
canRedo: boolean;
|
|
15
|
+
onUndo: () => void;
|
|
16
|
+
onRedo: () => void;
|
|
17
|
+
};
|
|
18
|
+
export type StatusBarMenuItem = {
|
|
19
|
+
label: string;
|
|
20
|
+
onClick: () => void;
|
|
21
|
+
variant?: "default" | "destructive";
|
|
22
|
+
};
|
|
23
|
+
export type EditorStatusBarProps = {
|
|
24
|
+
status: DraftWorkflowStatus;
|
|
25
|
+
lastSavedAt: string | null;
|
|
26
|
+
toolbar?: EditorStatusBarToolbar;
|
|
27
|
+
draftSyncState?: DraftSyncState;
|
|
28
|
+
onPublish?: () => void | Promise<void>;
|
|
29
|
+
onDiscard?: () => void | Promise<void>;
|
|
30
|
+
publishMenuItems?: StatusBarMenuItem[];
|
|
31
|
+
actionsSlot?: ReactNode;
|
|
32
|
+
toggleSlot?: ReactNode;
|
|
33
|
+
messageOverride?: string | null;
|
|
34
|
+
messageVariant?: "default" | "manual-save";
|
|
35
|
+
actionButtonSize?: "sm" | "default" | "lg";
|
|
36
|
+
hasFailedSaves?: boolean;
|
|
37
|
+
onRetryFailedSaves?: () => void | Promise<void>;
|
|
38
|
+
historyControls?: EditorHistoryBarControls;
|
|
39
|
+
secondaryMessage?: string | null;
|
|
40
|
+
/** Menu items for the kebab menu */
|
|
41
|
+
menuItems?: StatusBarMenuItem[];
|
|
42
|
+
/** Menu items that only appear in the mobile kebab menu. */
|
|
43
|
+
mobileMenuItems?: StatusBarMenuItem[];
|
|
44
|
+
};
|
|
45
|
+
export declare function EditorStatusBar({ status, lastSavedAt, toolbar, draftSyncState, onPublish, publishMenuItems, actionsSlot, toggleSlot, messageOverride, messageVariant, actionButtonSize, hasFailedSaves, onRetryFailedSaves, historyControls, secondaryMessage, menuItems, mobileMenuItems, }: EditorStatusBarProps): ReactElement;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { DraftSyncState } from '../EditorProvider';
|
|
3
|
+
import type { DraftWorkflowStatus, EditorStatusBarProps, EditorStatusBarToolbar, StatusBarMenuItem } from './EditorStatusBar';
|
|
4
|
+
export declare function getLatestSavedAt(values: readonly (string | null)[]): string | null;
|
|
5
|
+
export type EditorStatusBarPresentationInput = Readonly<{
|
|
6
|
+
status: DraftWorkflowStatus;
|
|
7
|
+
lastSavedAt: string | null;
|
|
8
|
+
toolbar: EditorStatusBarToolbar;
|
|
9
|
+
draftSyncState: DraftSyncState;
|
|
10
|
+
hasFailedSaves: boolean;
|
|
11
|
+
errorMessage?: string | null;
|
|
12
|
+
unfinishedSummary: string | null;
|
|
13
|
+
canUndo: boolean;
|
|
14
|
+
canRedo: boolean;
|
|
15
|
+
onUndo: () => void;
|
|
16
|
+
onRedo: () => void;
|
|
17
|
+
onPublish?: () => Promise<void>;
|
|
18
|
+
onDiscard?: () => Promise<void>;
|
|
19
|
+
publishMenuItems?: StatusBarMenuItem[];
|
|
20
|
+
actionsSlot?: ReactNode;
|
|
21
|
+
menuItems?: StatusBarMenuItem[];
|
|
22
|
+
messageVariant: 'default' | 'manual-save';
|
|
23
|
+
actionButtonSize: 'sm' | 'default' | 'lg';
|
|
24
|
+
}>;
|
|
25
|
+
export declare function buildEditorStatusBarPresentationProps({ status, lastSavedAt, toolbar, draftSyncState, hasFailedSaves, errorMessage, unfinishedSummary, canUndo, canRedo, onUndo, onRedo, onPublish, onDiscard, publishMenuItems, actionsSlot, menuItems, messageVariant, actionButtonSize, }: EditorStatusBarPresentationInput): EditorStatusBarProps;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type KeyboardEvent } from 'react';
|
|
2
|
+
export interface UseEditableElementOptions {
|
|
3
|
+
id: string;
|
|
4
|
+
value: string;
|
|
5
|
+
onChange: (value: string) => void;
|
|
6
|
+
onStartEdit?: () => void;
|
|
7
|
+
onEndEdit?: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function useEditableElement({ id, onChange, onStartEdit, onEndEdit, }: UseEditableElementOptions): {
|
|
10
|
+
isEditingMode: boolean;
|
|
11
|
+
isEditing: boolean;
|
|
12
|
+
isHovered: boolean;
|
|
13
|
+
setIsHovered: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
14
|
+
editRef: import("react").RefObject<HTMLElement | null>;
|
|
15
|
+
handleStartEdit: () => void;
|
|
16
|
+
handleEndEdit: (newValue?: string) => void;
|
|
17
|
+
handleKeyDown: (e: KeyboardEvent) => void;
|
|
18
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export { EditorChrome } from './chrome/EditorChrome';
|
|
2
|
+
export { EditorStatusBar } from './chrome/EditorStatusBar';
|
|
3
|
+
export { buildEditorStatusBarPresentationProps, getLatestSavedAt, } from './chrome/statusBarPresentation';
|
|
4
|
+
export type { DraftWorkflowStatus, EditorHistoryBarControls, EditorStatusBarProps, EditorStatusBarToolbar, StatusBarMenuItem, } from './chrome/EditorStatusBar';
|
|
5
|
+
export type { EditorStatusBarPresentationInput } from './chrome/statusBarPresentation';
|
|
6
|
+
export { EditingToggle } from './components/EditingToggle';
|
|
7
|
+
export { EditorProvider, useEditor } from './EditorProvider';
|
|
8
|
+
export type { DraftSyncState, DrawerFocusTarget } from './EditorProvider';
|
|
9
|
+
export { useEditableElement } from './hooks/useEditableElement';
|
|
10
|
+
export type { UseEditableElementOptions } from './hooks/useEditableElement';
|
|
11
|
+
export { InlineTextEditor } from './inline/InlineTextEditor';
|
|
12
|
+
export { EditorPrimitivesProvider } from './primitives/EditorPrimitivesProvider';
|
|
13
|
+
export type { InlineFieldAdapter } from './primitives/InlineFieldContext';
|
|
14
|
+
export { deriveChannelId } from './primitives/helpers';
|
|
15
|
+
export { richTextConfigs } from './primitives/rich-text/config';
|
|
16
|
+
export type { RichTextEditorConfig, ToolbarButtonConfig, } from './primitives/rich-text/config';
|
|
17
|
+
export { RichTextToolbar } from './primitives/rich-text/RichTextToolbar';
|
|
18
|
+
export { RichTextEditorSurface } from './primitives/rich-text/RichTextEditorSurface';
|
|
19
|
+
export type { RichTextRoutableItem } from './primitives/rich-text/toolbar/linkPopoverUtils';
|
|
20
|
+
export { useRichTextEditor } from './primitives/rich-text/useRichTextEditor';
|
|
21
|
+
export { buildRichTextImageAttrs, getRichTextImagePositionFromTarget, getSelectedRichTextImagePosition, insertOrReplaceRichTextImage, } from './primitives/rich-text/imageActions';
|
|
22
|
+
export type { PickedRichTextImage } from './primitives/rich-text/imageActions';
|
|
23
|
+
export { EMPTY_DOC, isDocEmpty, normaliseDoc, } from './primitives/rich-text/utils';
|
|
24
|
+
export { formatUnsupportedRichTextSummary, hasUnsupportedRichTextContent, sanitizeRichTextContentForSchema, } from './primitives/rich-text/sanitize';
|
|
25
|
+
export type { RichTextContentWarnings } from './primitives/rich-text/sanitize';
|
|
26
|
+
export { EditorContent } from '@tiptap/react';
|
|
27
|
+
export { EditorSaveProvider, useSaveField } from './primitives/SaveContext';
|
|
28
|
+
export { createOptimisticTokenStore, OptimisticTokenStore, } from './utils/optimisticTokens';
|
|
29
|
+
export type { OptimisticToken, OptimisticTokenSnapshot, } from './utils/optimisticTokens';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const InlineTextEditor: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function cn(...values: Array<string | false | null | undefined>): string;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type InlineFieldAdapter } from './InlineFieldContext';
|
|
3
|
+
type SaveArgs = {
|
|
4
|
+
path: string;
|
|
5
|
+
value: unknown;
|
|
6
|
+
};
|
|
7
|
+
type SaveFieldArgs = {
|
|
8
|
+
blockId: string;
|
|
9
|
+
path: string;
|
|
10
|
+
value: unknown;
|
|
11
|
+
};
|
|
12
|
+
type SaveFieldFn = (args: SaveFieldArgs) => Promise<unknown>;
|
|
13
|
+
export declare function EditorPrimitivesProvider({ canEdit, saveField, onSave, inlineFieldAdapter, children, }: {
|
|
14
|
+
canEdit?: boolean;
|
|
15
|
+
saveField?: SaveFieldFn;
|
|
16
|
+
onSave?: (args: SaveArgs) => Promise<void>;
|
|
17
|
+
inlineFieldAdapter?: InlineFieldAdapter | null;
|
|
18
|
+
children: React.ReactNode;
|
|
19
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export type InlineFieldAdapter = {
|
|
3
|
+
getValue: (path: string) => unknown;
|
|
4
|
+
setValue: (path: string, value: unknown) => void;
|
|
5
|
+
subscribe: (path: string, callback: () => void) => () => void;
|
|
6
|
+
};
|
|
7
|
+
export declare function InlineFieldProvider({ adapter, children, }: {
|
|
8
|
+
adapter?: InlineFieldAdapter | null;
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function useInlineFieldAdapter(): InlineFieldAdapter | null;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type SaveArgs = {
|
|
3
|
+
path: string;
|
|
4
|
+
value: unknown;
|
|
5
|
+
};
|
|
6
|
+
type SaveFn = (args: SaveArgs) => Promise<void>;
|
|
7
|
+
export declare function EditorSaveProvider({ save, children }: {
|
|
8
|
+
save: SaveFn;
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function useSaveField(): SaveFn;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function deriveChannelId(path: string | undefined): string | null;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import { type Editor } from '@tiptap/react';
|
|
3
|
+
import type { RichTextEditorConfig } from './config';
|
|
4
|
+
import type { PickedRichTextImage } from './imageActions';
|
|
5
|
+
import type { RichTextRoutableItem } from './toolbar/linkPopoverUtils';
|
|
6
|
+
export type RichTextEditorSurfaceProps = Readonly<{
|
|
7
|
+
editor: Editor | null;
|
|
8
|
+
config: RichTextEditorConfig;
|
|
9
|
+
isEmpty: boolean;
|
|
10
|
+
className?: string;
|
|
11
|
+
contentClassName?: string;
|
|
12
|
+
placeholderClassName?: string;
|
|
13
|
+
placeholderText?: string;
|
|
14
|
+
linkItems?: RichTextRoutableItem[];
|
|
15
|
+
onRequestLinkItems?: () => Promise<RichTextRoutableItem[]>;
|
|
16
|
+
onPickImage?: () => Promise<PickedRichTextImage | null | undefined>;
|
|
17
|
+
toolbarTone?: 'light' | 'dark';
|
|
18
|
+
toolbarAlwaysVisible?: boolean;
|
|
19
|
+
toolbarPortalToChrome?: boolean;
|
|
20
|
+
hideToolbar?: boolean;
|
|
21
|
+
hideContent?: boolean;
|
|
22
|
+
onClick?: () => void;
|
|
23
|
+
renderContent?: (content: ReactNode) => ReactNode;
|
|
24
|
+
}>;
|
|
25
|
+
export declare function shouldHandleRichTextActivationKey(container: HTMLElement, target: EventTarget | null): boolean;
|
|
26
|
+
export declare function RichTextEditorSurface({ editor, config, isEmpty, className, contentClassName, placeholderClassName, placeholderText, linkItems, onRequestLinkItems, onPickImage, toolbarTone, toolbarAlwaysVisible, toolbarPortalToChrome, hideToolbar, hideContent, onClick, renderContent, }: RichTextEditorSurfaceProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Editor } from '@tiptap/react';
|
|
2
|
+
import type { ToolbarButtonConfig } from './config';
|
|
3
|
+
import type { PickedRichTextImage } from './imageActions';
|
|
4
|
+
import { type RichTextRoutableItem } from './toolbar/LinkPopover';
|
|
5
|
+
interface RichTextToolbarProps {
|
|
6
|
+
editor: Editor | null;
|
|
7
|
+
buttons: ToolbarButtonConfig[];
|
|
8
|
+
onPickImage?: () => Promise<PickedRichTextImage | null | undefined>;
|
|
9
|
+
linkItems?: RichTextRoutableItem[];
|
|
10
|
+
onRequestLinkItems?: () => Promise<RichTextRoutableItem[]>;
|
|
11
|
+
alwaysVisible?: boolean;
|
|
12
|
+
tone?: 'light' | 'dark';
|
|
13
|
+
portalToChrome?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare function RichTextToolbar({ editor, buttons, onPickImage, linkItems, onRequestLinkItems, alwaysVisible, tone, portalToChrome, }: RichTextToolbarProps): import("react/jsx-runtime").JSX.Element | null;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { AnyExtension } from '@tiptap/core';
|
|
2
|
+
import type { RichTextVariant } from '../../../../blocks/src/index';
|
|
3
|
+
export type ToolbarButtonConfig = {
|
|
4
|
+
type: 'blockType';
|
|
5
|
+
} | {
|
|
6
|
+
type: 'bold';
|
|
7
|
+
} | {
|
|
8
|
+
type: 'italic';
|
|
9
|
+
} | {
|
|
10
|
+
type: 'link';
|
|
11
|
+
} | {
|
|
12
|
+
type: 'bulletList';
|
|
13
|
+
} | {
|
|
14
|
+
type: 'orderedList';
|
|
15
|
+
} | {
|
|
16
|
+
type: 'image';
|
|
17
|
+
};
|
|
18
|
+
export type RichTextEditorConfig = {
|
|
19
|
+
extensions: AnyExtension[];
|
|
20
|
+
toolbar: ToolbarButtonConfig[];
|
|
21
|
+
placeholder: string;
|
|
22
|
+
};
|
|
23
|
+
export declare const richTextConfigs: Record<RichTextVariant, RichTextEditorConfig>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const RichTextLink: import("@tiptap/core").Mark<import("@tiptap/extension-link").LinkOptions, any>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Editor } from '@tiptap/react';
|
|
2
|
+
export type PickedRichTextImage = {
|
|
3
|
+
identifier: string;
|
|
4
|
+
src?: string;
|
|
5
|
+
alt?: string;
|
|
6
|
+
width?: number;
|
|
7
|
+
height?: number;
|
|
8
|
+
};
|
|
9
|
+
type RichTextImageAttrs = {
|
|
10
|
+
identifier: string;
|
|
11
|
+
alt: string;
|
|
12
|
+
src?: string;
|
|
13
|
+
width?: number;
|
|
14
|
+
height?: number;
|
|
15
|
+
};
|
|
16
|
+
export declare function buildRichTextImageAttrs(picked: PickedRichTextImage): RichTextImageAttrs | null;
|
|
17
|
+
export declare function getSelectedRichTextImagePosition(editor: Editor): number | null;
|
|
18
|
+
export declare function getRichTextImagePositionFromTarget(editor: Editor, target: EventTarget | null): number | null;
|
|
19
|
+
export declare function insertOrReplaceRichTextImage(editor: Editor, picked: PickedRichTextImage, options?: {
|
|
20
|
+
replaceAtPos?: number | null;
|
|
21
|
+
}): 'inserted' | 'replaced' | null;
|
|
22
|
+
export {};
|