@atlaskit/editor-common 76.9.1 → 76.9.2
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 +6 -0
- package/dist/cjs/element-browser/components/ElementList/ElementList.js +2 -2
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/element-browser/components/ElementList/ElementList.js +5 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/element-browser/components/ElementList/ElementList.js +2 -2
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types-ts4.5/__tests_external__/cases/fundamentals/collection.d.ts +3 -0
- package/dist/types-ts4.5/__tests_external__/cases/fundamentals/test-cases/editor-is-present.d.ts +3 -0
- package/dist/types-ts4.5/__tests_external__/cases/fundamentals/test-cases/editor-typing.d.ts +3 -0
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/index.d.ts +4 -0
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/block/delete.d.ts +3 -0
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/block/edit.d.ts +4 -0
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/block/index.d.ts +3 -0
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/block/insert.d.ts +3 -0
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/embed/delete.d.ts +3 -0
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/embed/edit.d.ts +4 -0
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/embed/index.d.ts +3 -0
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/embed/insert.d.ts +3 -0
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/inline/delete.d.ts +3 -0
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/inline/edit.d.ts +4 -0
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/inline/index.d.ts +3 -0
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/inline/insert.d.ts +3 -0
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/inline/unlink.d.ts +3 -0
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/types.d.ts +4 -0
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/url/index.d.ts +3 -0
- package/dist/types-ts4.5/__tests_external__/cases/smart-links/test-cases/url/insert.d.ts +3 -0
- package/dist/types-ts4.5/__tests_external__/cases/types.d.ts +7 -0
- package/dist/types-ts4.5/__tests_external__/index.d.ts +3 -0
- package/dist/types-ts4.5/__tests_external__/page-objects/Editor.d.ts +9 -0
- package/dist/types-ts4.5/__tests_external__/page-objects/EditorSmartLink.d.ts +41 -0
- package/dist/types-ts4.5/__tests_external__/page-objects/Renderer.d.ts +6 -0
- package/dist/types-ts4.5/analytics/analytics-queue.d.ts +10 -0
- package/dist/types-ts4.5/analytics/api.d.ts +5 -0
- package/dist/types-ts4.5/analytics/fire-analytics-event.d.ts +4 -0
- package/dist/types-ts4.5/analytics/index.d.ts +7 -0
- package/dist/types-ts4.5/analytics/linking-utils.d.ts +14 -0
- package/dist/types-ts4.5/analytics/types/avatar.d.ts +5 -0
- package/dist/types-ts4.5/analytics/types/block.d.ts +3 -0
- package/dist/types-ts4.5/analytics/types/config-panel-events.d.ts +17 -0
- package/dist/types-ts4.5/analytics/types/cut-copy-events.d.ts +12 -0
- package/dist/types-ts4.5/analytics/types/date-events.d.ts +17 -0
- package/dist/types-ts4.5/analytics/types/dispatch-analytics-event.d.ts +2 -0
- package/dist/types-ts4.5/analytics/types/element-browser-events.d.ts +11 -0
- package/dist/types-ts4.5/analytics/types/enums.d.ts +357 -0
- package/dist/types-ts4.5/analytics/types/events.d.ts +130 -0
- package/dist/types-ts4.5/analytics/types/experimental-events.d.ts +16 -0
- package/dist/types-ts4.5/analytics/types/extension-events.d.ts +37 -0
- package/dist/types-ts4.5/analytics/types/find-replace-events.d.ts +23 -0
- package/dist/types-ts4.5/analytics/types/format-events.d.ts +49 -0
- package/dist/types-ts4.5/analytics/types/general-events.d.ts +182 -0
- package/dist/types-ts4.5/analytics/types/index.d.ts +36 -0
- package/dist/types-ts4.5/analytics/types/inline-comment-events.d.ts +17 -0
- package/dist/types-ts4.5/analytics/types/insert-events.d.ts +128 -0
- package/dist/types-ts4.5/analytics/types/link-tool-bar-events.d.ts +76 -0
- package/dist/types-ts4.5/analytics/types/list-events.d.ts +66 -0
- package/dist/types-ts4.5/analytics/types/media-events.d.ts +35 -0
- package/dist/types-ts4.5/analytics/types/node-events.d.ts +56 -0
- package/dist/types-ts4.5/analytics/types/paste-events.d.ts +39 -0
- package/dist/types-ts4.5/analytics/types/performance-report.d.ts +24 -0
- package/dist/types-ts4.5/analytics/types/referentiality-events.d.ts +52 -0
- package/dist/types-ts4.5/analytics/types/selection-events.d.ts +21 -0
- package/dist/types-ts4.5/analytics/types/smart-links.d.ts +14 -0
- package/dist/types-ts4.5/analytics/types/substitute-events.d.ts +26 -0
- package/dist/types-ts4.5/analytics/types/table-events.d.ts +142 -0
- package/dist/types-ts4.5/analytics/types/toolbar-button.d.ts +22 -0
- package/dist/types-ts4.5/analytics/types/type-ahead.d.ts +27 -0
- package/dist/types-ts4.5/analytics/types/utils.d.ts +46 -0
- package/dist/types-ts4.5/analytics/utils.d.ts +3 -0
- package/dist/types-ts4.5/card/LinkToolbarButtonGroup.d.ts +16 -0
- package/dist/types-ts4.5/card/MediaAndEmbedsToolbar/index.d.ts +11 -0
- package/dist/types-ts4.5/card/cardOptions.d.ts +13 -0
- package/dist/types-ts4.5/card/index.d.ts +7 -0
- package/dist/types-ts4.5/card/link-toolbar-button-group-options.d.ts +5 -0
- package/dist/types-ts4.5/card/types.d.ts +27 -0
- package/dist/types-ts4.5/card/ui/assets/card.d.ts +3 -0
- package/dist/types-ts4.5/card/ui/assets/embed.d.ts +3 -0
- package/dist/types-ts4.5/card/ui/assets/inline.d.ts +3 -0
- package/dist/types-ts4.5/card/ui/assets/url.d.ts +3 -0
- package/dist/types-ts4.5/card/utils.d.ts +18 -0
- package/dist/types-ts4.5/clipboard/index.d.ts +6 -0
- package/dist/types-ts4.5/collab/index.d.ts +379 -0
- package/dist/types-ts4.5/commands/index.d.ts +21 -0
- package/dist/types-ts4.5/commands/insert-block.d.ts +5 -0
- package/dist/types-ts4.5/copy-button/index.d.ts +7 -0
- package/dist/types-ts4.5/core-utils/index.d.ts +1 -0
- package/dist/types-ts4.5/core-utils/inside.d.ts +2 -0
- package/dist/types-ts4.5/editor-analytics/index.d.ts +1 -0
- package/dist/types-ts4.5/editor-analytics/withAnalytics.d.ts +34 -0
- package/dist/types-ts4.5/element-browser/ElementBrowser.d.ts +37 -0
- package/dist/types-ts4.5/element-browser/ViewMore.d.ts +6 -0
- package/dist/types-ts4.5/element-browser/components/CategoryList.d.ts +10 -0
- package/dist/types-ts4.5/element-browser/components/ElementBrowserLoader.d.ts +6 -0
- package/dist/types-ts4.5/element-browser/components/ElementList/ElementList.d.ts +33 -0
- package/dist/types-ts4.5/element-browser/components/ElementList/EmptyState.d.ts +6 -0
- package/dist/types-ts4.5/element-browser/components/ElementList/NotFoundIllustration.d.ts +2 -0
- package/dist/types-ts4.5/element-browser/components/ElementList/cellSizeAndPositionGetter.d.ts +7 -0
- package/dist/types-ts4.5/element-browser/components/ElementList/utils.d.ts +12 -0
- package/dist/types-ts4.5/element-browser/components/ElementSearch.d.ts +18 -0
- package/dist/types-ts4.5/element-browser/components/StatelessElementBrowser.d.ts +23 -0
- package/dist/types-ts4.5/element-browser/constants.d.ts +19 -0
- package/dist/types-ts4.5/element-browser/hooks/use-container-width.d.ts +33 -0
- package/dist/types-ts4.5/element-browser/hooks/use-focus.d.ts +35 -0
- package/dist/types-ts4.5/element-browser/hooks/use-select-and-focus-on-arrow-navigation.d.ts +72 -0
- package/dist/types-ts4.5/element-browser/index.d.ts +2 -0
- package/dist/types-ts4.5/element-browser/types.d.ts +12 -0
- package/dist/types-ts4.5/emoji.d.ts +3 -0
- package/dist/types-ts4.5/event-dispatcher/index.d.ts +21 -0
- package/dist/types-ts4.5/extensions/combine-extension-providers.d.ts +7 -0
- package/dist/types-ts4.5/extensions/default-extension-provider.d.ts +17 -0
- package/dist/types-ts4.5/extensions/extension-fields-helpers.d.ts +10 -0
- package/dist/types-ts4.5/extensions/extension-handlers.d.ts +13 -0
- package/dist/types-ts4.5/extensions/index.d.ts +8 -0
- package/dist/types-ts4.5/extensions/manifest-helpers.d.ts +9 -0
- package/dist/types-ts4.5/extensions/module-helpers.d.ts +11 -0
- package/dist/types-ts4.5/extensions/types/extension-handler.d.ts +40 -0
- package/dist/types-ts4.5/extensions/types/extension-manifest-common.d.ts +8 -0
- package/dist/types-ts4.5/extensions/types/extension-manifest-toolbar-item.d.ts +45 -0
- package/dist/types-ts4.5/extensions/types/extension-manifest.d.ts +101 -0
- package/dist/types-ts4.5/extensions/types/extension-parameters.d.ts +5 -0
- package/dist/types-ts4.5/extensions/types/extension-provider.d.ts +8 -0
- package/dist/types-ts4.5/extensions/types/field-definitions.d.ts +171 -0
- package/dist/types-ts4.5/extensions/types/index.d.ts +8 -0
- package/dist/types-ts4.5/extensions/types/utils.d.ts +18 -0
- package/dist/types-ts4.5/extensions.d.ts +2 -0
- package/dist/types-ts4.5/floating-toolbar/index.d.ts +6 -0
- package/dist/types-ts4.5/guideline/constants.d.ts +2 -0
- package/dist/types-ts4.5/guideline/defaultGuideline.d.ts +2 -0
- package/dist/types-ts4.5/guideline/dynamicGuideline.d.ts +6 -0
- package/dist/types-ts4.5/guideline/fixedGuideline.d.ts +32 -0
- package/dist/types-ts4.5/guideline/index.d.ts +9 -0
- package/dist/types-ts4.5/guideline/relativeGuideline.d.ts +8 -0
- package/dist/types-ts4.5/guideline/snapping.d.ts +19 -0
- package/dist/types-ts4.5/guideline/types.d.ts +67 -0
- package/dist/types-ts4.5/guideline/updateGuideline.d.ts +5 -0
- package/dist/types-ts4.5/guideline/utils.d.ts +27 -0
- package/dist/types-ts4.5/hooks/index.d.ts +3 -0
- package/dist/types-ts4.5/hooks/useConstructor.d.ts +9 -0
- package/dist/types-ts4.5/hooks/usePreviousState.d.ts +11 -0
- package/dist/types-ts4.5/hooks/useSharedPluginState.d.ts +68 -0
- package/dist/types-ts4.5/i18n/cs.d.ts +211 -0
- package/dist/types-ts4.5/i18n/da.d.ts +211 -0
- package/dist/types-ts4.5/i18n/de.d.ts +211 -0
- package/dist/types-ts4.5/i18n/en.d.ts +211 -0
- package/dist/types-ts4.5/i18n/en_GB.d.ts +211 -0
- package/dist/types-ts4.5/i18n/en_ZZ.d.ts +211 -0
- package/dist/types-ts4.5/i18n/es.d.ts +211 -0
- package/dist/types-ts4.5/i18n/et.d.ts +8 -0
- package/dist/types-ts4.5/i18n/fi.d.ts +211 -0
- package/dist/types-ts4.5/i18n/fr.d.ts +211 -0
- package/dist/types-ts4.5/i18n/hu.d.ts +211 -0
- package/dist/types-ts4.5/i18n/index.d.ts +32 -0
- package/dist/types-ts4.5/i18n/it.d.ts +211 -0
- package/dist/types-ts4.5/i18n/ja.d.ts +211 -0
- package/dist/types-ts4.5/i18n/ko.d.ts +211 -0
- package/dist/types-ts4.5/i18n/languages.d.ts +35 -0
- package/dist/types-ts4.5/i18n/nb.d.ts +211 -0
- package/dist/types-ts4.5/i18n/nl.d.ts +211 -0
- package/dist/types-ts4.5/i18n/pl.d.ts +211 -0
- package/dist/types-ts4.5/i18n/pt_BR.d.ts +211 -0
- package/dist/types-ts4.5/i18n/pt_PT.d.ts +8 -0
- package/dist/types-ts4.5/i18n/ru.d.ts +211 -0
- package/dist/types-ts4.5/i18n/sk.d.ts +8 -0
- package/dist/types-ts4.5/i18n/sv.d.ts +211 -0
- package/dist/types-ts4.5/i18n/th.d.ts +211 -0
- package/dist/types-ts4.5/i18n/tr.d.ts +211 -0
- package/dist/types-ts4.5/i18n/uk.d.ts +211 -0
- package/dist/types-ts4.5/i18n/vi.d.ts +211 -0
- package/dist/types-ts4.5/i18n/zh.d.ts +211 -0
- package/dist/types-ts4.5/i18n/zh_TW.d.ts +211 -0
- package/dist/types-ts4.5/icons/index.d.ts +10 -0
- package/dist/types-ts4.5/icons/shared/BorderIcon.d.ts +3 -0
- package/dist/types-ts4.5/icons/shared/PanelErrorIcon.d.ts +3 -0
- package/dist/types-ts4.5/icons/shared/PanelInfoIcon.d.ts +3 -0
- package/dist/types-ts4.5/icons/shared/PanelNoteIcon.d.ts +3 -0
- package/dist/types-ts4.5/icons/shared/PanelSuccessIcon.d.ts +3 -0
- package/dist/types-ts4.5/icons/shared/PanelWarningIcon.d.ts +3 -0
- package/dist/types-ts4.5/icons/shared/table.d.ts +2 -0
- package/dist/types-ts4.5/in-product.d.ts +1 -0
- package/dist/types-ts4.5/index.d.ts +1 -0
- package/dist/types-ts4.5/insert/index.d.ts +26 -0
- package/dist/types-ts4.5/keymaps/consts.d.ts +12 -0
- package/dist/types-ts4.5/keymaps/index.d.ts +97 -0
- package/dist/types-ts4.5/keymaps/keymap.d.ts +11 -0
- package/dist/types-ts4.5/link/LinkPicker/EditorLinkPicker/index.d.ts +23 -0
- package/dist/types-ts4.5/link/LinkPicker/EditorLinkPicker/useEscapeClickaway.d.ts +2 -0
- package/dist/types-ts4.5/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.d.ts +119 -0
- package/dist/types-ts4.5/link/LinkPicker/HyperlinkAddToolbar/index.d.ts +21 -0
- package/dist/types-ts4.5/link/LinkPicker/HyperlinkAddToolbar/messages.d.ts +32 -0
- package/dist/types-ts4.5/link/LinkPicker/HyperlinkAddToolbar/utils.d.ts +8 -0
- package/dist/types-ts4.5/link/LinkSearch/LinkSearchList.d.ts +20 -0
- package/dist/types-ts4.5/link/LinkSearch/LinkSearchListItem.d.ts +22 -0
- package/dist/types-ts4.5/link/LinkSearch/ToolbarComponents.d.ts +3 -0
- package/dist/types-ts4.5/link/LinkSearch/index.d.ts +59 -0
- package/dist/types-ts4.5/link/LinkSearch/listItemAlts.d.ts +2 -0
- package/dist/types-ts4.5/link/LinkSearch/transformTimeStamp.d.ts +10 -0
- package/dist/types-ts4.5/link/LinkSearch/types.d.ts +49 -0
- package/dist/types-ts4.5/link/LinkSearch/withActivityProvider.d.ts +66 -0
- package/dist/types-ts4.5/link/index.d.ts +16 -0
- package/dist/types-ts4.5/link/types.d.ts +40 -0
- package/dist/types-ts4.5/link/utils.d.ts +3 -0
- package/dist/types-ts4.5/lists/analytics.d.ts +4 -0
- package/dist/types-ts4.5/lists/indentation.d.ts +5 -0
- package/dist/types-ts4.5/lists/index.d.ts +6 -0
- package/dist/types-ts4.5/lists/node.d.ts +18 -0
- package/dist/types-ts4.5/lists/replace-content.d.ts +8 -0
- package/dist/types-ts4.5/lists/selection.d.ts +13 -0
- package/dist/types-ts4.5/mark/commands.d.ts +18 -0
- package/dist/types-ts4.5/mark/index.d.ts +2 -0
- package/dist/types-ts4.5/mark/text-formatting.d.ts +8 -0
- package/dist/types-ts4.5/media-single/constants.d.ts +22 -0
- package/dist/types-ts4.5/media-single/index.d.ts +2 -0
- package/dist/types-ts4.5/media-single/utils.d.ts +92 -0
- package/dist/types-ts4.5/mention.d.ts +2 -0
- package/dist/types-ts4.5/messages/alignment.d.ts +17 -0
- package/dist/types-ts4.5/messages/annotation.d.ts +17 -0
- package/dist/types-ts4.5/messages/block-type.d.ts +152 -0
- package/dist/types-ts4.5/messages/card.d.ts +87 -0
- package/dist/types-ts4.5/messages/codeBidiWarning.d.ts +11 -0
- package/dist/types-ts4.5/messages/codeBlockButton.d.ts +22 -0
- package/dist/types-ts4.5/messages/full-page.d.ts +17 -0
- package/dist/types-ts4.5/messages/index.d.ts +138 -0
- package/dist/types-ts4.5/messages/insert-block.d.ts +172 -0
- package/dist/types-ts4.5/messages/link-toolbar.d.ts +57 -0
- package/dist/types-ts4.5/messages/link.d.ts +7 -0
- package/dist/types-ts4.5/messages/list.d.ts +27 -0
- package/dist/types-ts4.5/messages/media-and-embed-toolbar.d.ts +12 -0
- package/dist/types-ts4.5/messages/toolbar.d.ts +92 -0
- package/dist/types-ts4.5/messages/undo-redo.d.ts +12 -0
- package/dist/types-ts4.5/messages/unsupportedContent.d.ts +17 -0
- package/dist/types-ts4.5/monitoring/error.d.ts +4 -0
- package/dist/types-ts4.5/monitoring/index.d.ts +1 -0
- package/dist/types-ts4.5/node-width/index.d.ts +15 -0
- package/dist/types-ts4.5/normalize-feature-flags.d.ts +27 -0
- package/dist/types-ts4.5/panel.d.ts +1 -0
- package/dist/types-ts4.5/paste/clipboard.d.ts +2 -0
- package/dist/types-ts4.5/paste/index.d.ts +2 -0
- package/dist/types-ts4.5/paste/md-plugins/ignore-list-heading-md-plugin.d.ts +2 -0
- package/dist/types-ts4.5/paste/md-plugins/linkify-md-plugin.d.ts +2 -0
- package/dist/types-ts4.5/paste/md-plugins/newline-md-plugin.d.ts +2 -0
- package/dist/types-ts4.5/paste/md-plugins/paragraph-md-plugin.d.ts +2 -0
- package/dist/types-ts4.5/paste/md.d.ts +2 -0
- package/dist/types-ts4.5/preset/builder.d.ts +36 -0
- package/dist/types-ts4.5/preset/core-plugin.d.ts +22 -0
- package/dist/types-ts4.5/preset/editor-commands.d.ts +21 -0
- package/dist/types-ts4.5/preset/index.d.ts +3 -0
- package/dist/types-ts4.5/preset/plugin-injection-api.d.ts +53 -0
- package/dist/types-ts4.5/provider-factory/autoformatting-provider.d.ts +9 -0
- package/dist/types-ts4.5/provider-factory/card-provider.d.ts +7 -0
- package/dist/types-ts4.5/provider-factory/context-identifier-provider.d.ts +6 -0
- package/dist/types-ts4.5/provider-factory/context.d.ts +6 -0
- package/dist/types-ts4.5/provider-factory/image-upload-provider.d.ts +7 -0
- package/dist/types-ts4.5/provider-factory/macro-provider.d.ts +25 -0
- package/dist/types-ts4.5/provider-factory/media-provider.d.ts +15 -0
- package/dist/types-ts4.5/provider-factory/profile-card-provider.d.ts +6 -0
- package/dist/types-ts4.5/provider-factory/provider-factory.d.ts +17 -0
- package/dist/types-ts4.5/provider-factory/quick-insert-provider.d.ts +30 -0
- package/dist/types-ts4.5/provider-factory/search-provider.d.ts +12 -0
- package/dist/types-ts4.5/provider-factory/types.d.ts +37 -0
- package/dist/types-ts4.5/provider-factory/with-providers.d.ts +18 -0
- package/dist/types-ts4.5/provider-factory.d.ts +13 -0
- package/dist/types-ts4.5/provider-helpers/combine-providers.d.ts +9 -0
- package/dist/types-ts4.5/provider-helpers/index.d.ts +1 -0
- package/dist/types-ts4.5/provider-helpers/promise-helpers.d.ts +32 -0
- package/dist/types-ts4.5/quick-insert/assets/action.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/code.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/custom-panel.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/datasource-assets-objects.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/datasource-jira-issue.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/date.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/decision.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/divider.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/emoji.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/expand.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/fallback.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/feedback.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/heading1.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/heading2.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/heading3.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/heading4.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/heading5.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/heading6.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/images.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/index.d.ts +32 -0
- package/dist/types-ts4.5/quick-insert/assets/layout.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/link.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/list-number.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/list.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/mention.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/panel-error.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/panel-note.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/panel-success.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/panel-warning.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/panel.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/quote.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/assets/status.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/index.d.ts +2 -0
- package/dist/types-ts4.5/quick-insert/use-icon-themed.d.ts +9 -0
- package/dist/types-ts4.5/quick-insert/utils.d.ts +7 -0
- package/dist/types-ts4.5/react-node-view/getInlineNodeViewProducer.d.ts +20 -0
- package/dist/types-ts4.5/react-node-view/index.d.ts +56 -0
- package/dist/types-ts4.5/react-node-view/types.d.ts +12 -0
- package/dist/types-ts4.5/resizer/Resizer.d.ts +52 -0
- package/dist/types-ts4.5/resizer/index.d.ts +2 -0
- package/dist/types-ts4.5/resizer/types.d.ts +28 -0
- package/dist/types-ts4.5/resizer/utils.d.ts +6 -0
- package/dist/types-ts4.5/safe-plugin/index.d.ts +6 -0
- package/dist/types-ts4.5/selection/gap-cursor/actions.d.ts +11 -0
- package/dist/types-ts4.5/selection/gap-cursor/selection.d.ts +41 -0
- package/dist/types-ts4.5/selection/gap-cursor/styles.d.ts +2 -0
- package/dist/types-ts4.5/selection/gap-cursor/utils/index.d.ts +2 -0
- package/dist/types-ts4.5/selection/gap-cursor/utils/is-ignored.d.ts +2 -0
- package/dist/types-ts4.5/selection/gap-cursor/utils/is-valid-target-node.d.ts +2 -0
- package/dist/types-ts4.5/selection/gap-cursor/utils/setGapCursorSelection.d.ts +3 -0
- package/dist/types-ts4.5/selection/index.d.ts +31 -0
- package/dist/types-ts4.5/selection/types.d.ts +33 -0
- package/dist/types-ts4.5/selection/utils.d.ts +11 -0
- package/dist/types-ts4.5/selection-based-node-view/SelectionBasedNodeView.d.ts +49 -0
- package/dist/types-ts4.5/selection-based-node-view/index.d.ts +1 -0
- package/dist/types-ts4.5/styles/index.d.ts +32 -0
- package/dist/types-ts4.5/styles/shared/annotation.d.ts +12 -0
- package/dist/types-ts4.5/styles/shared/block-marks.d.ts +1 -0
- package/dist/types-ts4.5/styles/shared/blockquote.d.ts +1 -0
- package/dist/types-ts4.5/styles/shared/code-block.d.ts +12 -0
- package/dist/types-ts4.5/styles/shared/code-mark.d.ts +2 -0
- package/dist/types-ts4.5/styles/shared/column-layout.d.ts +2 -0
- package/dist/types-ts4.5/styles/shared/date.d.ts +5 -0
- package/dist/types-ts4.5/styles/shared/dropdown-menu.d.ts +4 -0
- package/dist/types-ts4.5/styles/shared/embedCard.d.ts +2 -0
- package/dist/types-ts4.5/styles/shared/emoji.d.ts +7 -0
- package/dist/types-ts4.5/styles/shared/expand.d.ts +1 -0
- package/dist/types-ts4.5/styles/shared/extension.d.ts +2 -0
- package/dist/types-ts4.5/styles/shared/grid.d.ts +2 -0
- package/dist/types-ts4.5/styles/shared/headings.d.ts +2 -0
- package/dist/types-ts4.5/styles/shared/indentation.d.ts +1 -0
- package/dist/types-ts4.5/styles/shared/layout.d.ts +2 -0
- package/dist/types-ts4.5/styles/shared/link.d.ts +2 -0
- package/dist/types-ts4.5/styles/shared/lists.d.ts +4 -0
- package/dist/types-ts4.5/styles/shared/media-single.d.ts +3 -0
- package/dist/types-ts4.5/styles/shared/media.d.ts +3 -0
- package/dist/types-ts4.5/styles/shared/mention.d.ts +3 -0
- package/dist/types-ts4.5/styles/shared/panel.d.ts +85 -0
- package/dist/types-ts4.5/styles/shared/paragraph.d.ts +1 -0
- package/dist/types-ts4.5/styles/shared/plugins.d.ts +4 -0
- package/dist/types-ts4.5/styles/shared/resizer.d.ts +9 -0
- package/dist/types-ts4.5/styles/shared/rule.d.ts +2 -0
- package/dist/types-ts4.5/styles/shared/shadow.d.ts +15 -0
- package/dist/types-ts4.5/styles/shared/smart-card.d.ts +8 -0
- package/dist/types-ts4.5/styles/shared/smartCard.d.ts +3 -0
- package/dist/types-ts4.5/styles/shared/status.d.ts +4 -0
- package/dist/types-ts4.5/styles/shared/table.d.ts +35 -0
- package/dist/types-ts4.5/styles/shared/tableCell.d.ts +1 -0
- package/dist/types-ts4.5/styles/shared/task-decision.d.ts +6 -0
- package/dist/types-ts4.5/styles/shared/text-color.d.ts +1 -0
- package/dist/types-ts4.5/styles/shared/unsupported-content.d.ts +5 -0
- package/dist/types-ts4.5/styles/shared/whitespace.d.ts +2 -0
- package/dist/types-ts4.5/transforms/expand.d.ts +5 -0
- package/dist/types-ts4.5/transforms/extension.d.ts +6 -0
- package/dist/types-ts4.5/transforms/index.d.ts +3 -0
- package/dist/types-ts4.5/transforms/layout.d.ts +15 -0
- package/dist/types-ts4.5/type-ahead/index.d.ts +12 -0
- package/dist/types-ts4.5/types/annotation/emitter.d.ts +33 -0
- package/dist/types-ts4.5/types/annotation/index.d.ts +85 -0
- package/dist/types-ts4.5/types/block-type.d.ts +4 -0
- package/dist/types-ts4.5/types/breakout.d.ts +1 -0
- package/dist/types-ts4.5/types/command.d.ts +6 -0
- package/dist/types-ts4.5/types/context-panel.d.ts +3 -0
- package/dist/types-ts4.5/types/copy-button.d.ts +24 -0
- package/dist/types-ts4.5/types/datasource.d.ts +1 -0
- package/dist/types-ts4.5/types/doc-builder.d.ts +26 -0
- package/dist/types-ts4.5/types/editor-actions.d.ts +21 -0
- package/dist/types-ts4.5/types/editor-appearance.d.ts +1 -0
- package/dist/types-ts4.5/types/editor-command.d.ts +5 -0
- package/dist/types-ts4.5/types/editor-container-width.d.ts +19 -0
- package/dist/types-ts4.5/types/editor-plugin.d.ts +92 -0
- package/dist/types-ts4.5/types/editor-public-api.d.ts +4 -0
- package/dist/types-ts4.5/types/editor-react-context.d.ts +6 -0
- package/dist/types-ts4.5/types/empty-state-handler.d.ts +7 -0
- package/dist/types-ts4.5/types/feature-flags.d.ts +311 -0
- package/dist/types-ts4.5/types/floating-toolbar.d.ts +260 -0
- package/dist/types-ts4.5/types/grid.d.ts +1 -0
- package/dist/types-ts4.5/types/hyperlink.d.ts +35 -0
- package/dist/types-ts4.5/types/image-upload-reference-event.d.ts +10 -0
- package/dist/types-ts4.5/types/index.d.ts +52 -0
- package/dist/types-ts4.5/types/input-rules.d.ts +8 -0
- package/dist/types-ts4.5/types/insert-block.d.ts +2 -0
- package/dist/types-ts4.5/types/layout.d.ts +6 -0
- package/dist/types-ts4.5/types/next-editor-plugin.d.ts +157 -0
- package/dist/types-ts4.5/types/performance-tracking.d.ts +343 -0
- package/dist/types-ts4.5/types/plugin-factory.d.ts +27 -0
- package/dist/types-ts4.5/types/prosemirror-config.d.ts +14 -0
- package/dist/types-ts4.5/types/quick-insert.d.ts +38 -0
- package/dist/types-ts4.5/types/resizable-media-single.d.ts +15 -0
- package/dist/types-ts4.5/types/selection.d.ts +3 -0
- package/dist/types-ts4.5/types/supported-browsers.d.ts +15 -0
- package/dist/types-ts4.5/types/tables.d.ts +13 -0
- package/dist/types-ts4.5/types/text-formatting.d.ts +36 -0
- package/dist/types-ts4.5/types/toolbar.d.ts +30 -0
- package/dist/types-ts4.5/types/type-ahead.d.ts +72 -0
- package/dist/types-ts4.5/types/ui-components.d.ts +23 -0
- package/dist/types-ts4.5/ufo/experience-store.d.ts +33 -0
- package/dist/types-ts4.5/ufo/index.d.ts +1 -0
- package/dist/types-ts4.5/ui/Announcer/announcer.d.ts +23 -0
- package/dist/types-ts4.5/ui/BaseTheme/index.d.ts +15 -0
- package/dist/types-ts4.5/ui/Caption/index.d.ts +19 -0
- package/dist/types-ts4.5/ui/Caption/messages.d.ts +7 -0
- package/dist/types-ts4.5/ui/ContextPanel/context.d.ts +24 -0
- package/dist/types-ts4.5/ui/DropList/index.d.ts +21 -0
- package/dist/types-ts4.5/ui/Emoji/index.d.ts +22 -0
- package/dist/types-ts4.5/ui/ErrorBoundary/index.d.ts +25 -0
- package/dist/types-ts4.5/ui/EventHandlers/index.d.ts +36 -0
- package/dist/types-ts4.5/ui/Expand/index.d.ts +42 -0
- package/dist/types-ts4.5/ui/FloatingToolbar/Button.d.ts +30 -0
- package/dist/types-ts4.5/ui/FloatingToolbar/Separator.d.ts +4 -0
- package/dist/types-ts4.5/ui/FloatingToolbar/SmallerEditIcon.d.ts +3 -0
- package/dist/types-ts4.5/ui/FloatingToolbar/styles.d.ts +20 -0
- package/dist/types-ts4.5/ui/IntlErrorBoundary/index.d.ts +15 -0
- package/dist/types-ts4.5/ui/IntlProviderIfMissingWrapper/index.d.ts +6 -0
- package/dist/types-ts4.5/ui/Layer/index.d.ts +47 -0
- package/dist/types-ts4.5/ui/Layer/internal/helpers.d.ts +5 -0
- package/dist/types-ts4.5/ui/LinkSearch/const.d.ts +4 -0
- package/dist/types-ts4.5/ui/MediaSingle/grid.d.ts +25 -0
- package/dist/types-ts4.5/ui/MediaSingle/index.d.ts +28 -0
- package/dist/types-ts4.5/ui/MediaSingle/link.d.ts +1 -0
- package/dist/types-ts4.5/ui/MediaSingle/styled.d.ts +57 -0
- package/dist/types-ts4.5/ui/MediaSingle/types.d.ts +12 -0
- package/dist/types-ts4.5/ui/Mention/index.d.ts +21 -0
- package/dist/types-ts4.5/ui/Mention/mention-with-profilecard.d.ts +15 -0
- package/dist/types-ts4.5/ui/Mention/mention-with-providers.d.ts +22 -0
- package/dist/types-ts4.5/ui/Mention/types.d.ts +2 -0
- package/dist/types-ts4.5/ui/Messages/index.d.ts +11 -0
- package/dist/types-ts4.5/ui/OverflowShadow/index.d.ts +103 -0
- package/dist/types-ts4.5/ui/OverflowShadow/shadowObserver.d.ts +27 -0
- package/dist/types-ts4.5/ui/PanelTextInput/index.d.ts +47 -0
- package/dist/types-ts4.5/ui/PanelTextInput/styles.d.ts +2 -0
- package/dist/types-ts4.5/ui/Popup/index.d.ts +85 -0
- package/dist/types-ts4.5/ui/Popup/utils.d.ts +42 -0
- package/dist/types-ts4.5/ui/PortalProvider/PortalProviderThemesProvider.d.ts +6 -0
- package/dist/types-ts4.5/ui/PortalProvider/index.d.ts +51 -0
- package/dist/types-ts4.5/ui/ResizerLegacy/index.d.ts +43 -0
- package/dist/types-ts4.5/ui/ResizerLegacy/styled.d.ts +2 -0
- package/dist/types-ts4.5/ui/ResizerLegacy/types.d.ts +26 -0
- package/dist/types-ts4.5/ui/ResizerLegacy/utils.d.ts +6 -0
- package/dist/types-ts4.5/ui/Toolbar/index.d.ts +5 -0
- package/dist/types-ts4.5/ui/UnsupportedBlock/index.d.ts +14 -0
- package/dist/types-ts4.5/ui/UnsupportedInline/index.d.ts +14 -0
- package/dist/types-ts4.5/ui/WidthProvider/index.d.ts +29 -0
- package/dist/types-ts4.5/ui/WithCreateAnalyticsEvent/index.d.ts +6 -0
- package/dist/types-ts4.5/ui/clear-next-sibling-margin-top.d.ts +2 -0
- package/dist/types-ts4.5/ui/index.d.ts +43 -0
- package/dist/types-ts4.5/ui/unsupported-content-helper.d.ts +3 -0
- package/dist/types-ts4.5/ui/with-outer-listeners.d.ts +8 -0
- package/dist/types-ts4.5/ui-color/ColorPalette/Color/index.d.ts +20 -0
- package/dist/types-ts4.5/ui-color/ColorPalette/Color/styles.d.ts +4 -0
- package/dist/types-ts4.5/ui-color/ColorPalette/Palettes/borderColorPalette.d.ts +3 -0
- package/dist/types-ts4.5/ui-color/ColorPalette/Palettes/cellBackgroundColorPalette.d.ts +3 -0
- package/dist/types-ts4.5/ui-color/ColorPalette/Palettes/common.d.ts +2 -0
- package/dist/types-ts4.5/ui-color/ColorPalette/Palettes/getColorMessage.d.ts +2 -0
- package/dist/types-ts4.5/ui-color/ColorPalette/Palettes/index.d.ts +3 -0
- package/dist/types-ts4.5/ui-color/ColorPalette/Palettes/paletteMessages.d.ts +123 -0
- package/dist/types-ts4.5/ui-color/ColorPalette/Palettes/paletteMessagesTokenModeNames.d.ts +1444 -0
- package/dist/types-ts4.5/ui-color/ColorPalette/Palettes/panelBackgroundPalette.d.ts +4 -0
- package/dist/types-ts4.5/ui-color/ColorPalette/Palettes/statusColorPalette.d.ts +4 -0
- package/dist/types-ts4.5/ui-color/ColorPalette/Palettes/textColorPalette.d.ts +2 -0
- package/dist/types-ts4.5/ui-color/ColorPalette/Palettes/type.d.ts +12 -0
- package/dist/types-ts4.5/ui-color/ColorPalette/index.d.ts +38 -0
- package/dist/types-ts4.5/ui-color/ColorPalette/styles.d.ts +1 -0
- package/dist/types-ts4.5/ui-color/ColorPalette/utils.d.ts +12 -0
- package/dist/types-ts4.5/ui-color/index.d.ts +12 -0
- package/dist/types-ts4.5/ui-menu/ArrowKeyNavigationProvider/ColorPaletteArrowKeyNavigationProvider/index.d.ts +7 -0
- package/dist/types-ts4.5/ui-menu/ArrowKeyNavigationProvider/MenuArrowKeyNavigationProvider/index.d.ts +7 -0
- package/dist/types-ts4.5/ui-menu/ArrowKeyNavigationProvider/index.d.ts +3 -0
- package/dist/types-ts4.5/ui-menu/ArrowKeyNavigationProvider/types.d.ts +36 -0
- package/dist/types-ts4.5/ui-menu/ColorPickerButton/index.d.ts +28 -0
- package/dist/types-ts4.5/ui-menu/Dropdown/index.d.ts +44 -0
- package/dist/types-ts4.5/ui-menu/DropdownContainer/index.d.ts +3 -0
- package/dist/types-ts4.5/ui-menu/DropdownMenu/index.d.ts +22 -0
- package/dist/types-ts4.5/ui-menu/DropdownMenu/types.d.ts +52 -0
- package/dist/types-ts4.5/ui-menu/ToolbarArrowKeyNavigationProvider/index.d.ts +31 -0
- package/dist/types-ts4.5/ui-menu/ToolbarButton/index.d.ts +57 -0
- package/dist/types-ts4.5/ui-menu/ToolbarButton/styles.d.ts +4 -0
- package/dist/types-ts4.5/ui-menu/index.d.ts +11 -0
- package/dist/types-ts4.5/ui-react/ReactEditorViewContext.d.ts +8 -0
- package/dist/types-ts4.5/ui-react/index.d.ts +2 -0
- package/dist/types-ts4.5/ui-react/with-react-editor-view-outer-listeners.d.ts +12 -0
- package/dist/types-ts4.5/utils/analytics.d.ts +29 -0
- package/dist/types-ts4.5/utils/annotation/index.d.ts +8 -0
- package/dist/types-ts4.5/utils/breakout.d.ts +50 -0
- package/dist/types-ts4.5/utils/browser-extensions.d.ts +43 -0
- package/dist/types-ts4.5/utils/browser.d.ts +4 -0
- package/dist/types-ts4.5/utils/commands.d.ts +48 -0
- package/dist/types-ts4.5/utils/compare-props.d.ts +32 -0
- package/dist/types-ts4.5/utils/compareNodes.d.ts +49 -0
- package/dist/types-ts4.5/utils/compose.d.ts +30 -0
- package/dist/types-ts4.5/utils/count-nodes.d.ts +8 -0
- package/dist/types-ts4.5/utils/create-wrap-selection-transaction.d.ts +15 -0
- package/dist/types-ts4.5/utils/datasource.d.ts +3 -0
- package/dist/types-ts4.5/utils/date.d.ts +18 -0
- package/dist/types-ts4.5/utils/dedupe.d.ts +1 -0
- package/dist/types-ts4.5/utils/document.d.ts +25 -0
- package/dist/types-ts4.5/utils/dom.d.ts +40 -0
- package/dist/types-ts4.5/utils/editor-core-utils.d.ts +37 -0
- package/dist/types-ts4.5/utils/error-reporter.d.ts +13 -0
- package/dist/types-ts4.5/utils/extension-handler.d.ts +2 -0
- package/dist/types-ts4.5/utils/filter/privacy-filter.d.ts +9 -0
- package/dist/types-ts4.5/utils/get-performance-options.d.ts +16 -0
- package/dist/types-ts4.5/utils/getModeFromTheme.d.ts +1 -0
- package/dist/types-ts4.5/utils/grid.d.ts +3 -0
- package/dist/types-ts4.5/utils/hyperlink.d.ts +29 -0
- package/dist/types-ts4.5/utils/imageLoader.d.ts +14 -0
- package/dist/types-ts4.5/utils/index.d.ts +86 -0
- package/dist/types-ts4.5/utils/input-rules.d.ts +16 -0
- package/dist/types-ts4.5/utils/is-text-input.d.ts +2 -0
- package/dist/types-ts4.5/utils/list.d.ts +14 -0
- package/dist/types-ts4.5/utils/macro.d.ts +10 -0
- package/dist/types-ts4.5/utils/nodes.d.ts +52 -0
- package/dist/types-ts4.5/utils/outdated-browsers.d.ts +1 -0
- package/dist/types-ts4.5/utils/performance/get-performance-timing.d.ts +8 -0
- package/dist/types-ts4.5/utils/performance/hooks/use-component-render-tracking/index.d.ts +19 -0
- package/dist/types-ts4.5/utils/performance/is-performance-api-available.d.ts +3 -0
- package/dist/types-ts4.5/utils/performance/measure-render.d.ts +52 -0
- package/dist/types-ts4.5/utils/performance/measure-tti.d.ts +14 -0
- package/dist/types-ts4.5/utils/performance/measure.d.ts +3 -0
- package/dist/types-ts4.5/utils/performance/navigation.d.ts +1 -0
- package/dist/types-ts4.5/utils/plugin-state-factory.d.ts +16 -0
- package/dist/types-ts4.5/utils/profiler/render-count.d.ts +50 -0
- package/dist/types-ts4.5/utils/prosemirror/autojoin.d.ts +13 -0
- package/dist/types-ts4.5/utils/referentiality.d.ts +18 -0
- package/dist/types-ts4.5/utils/rich-media-utils.d.ts +9 -0
- package/dist/types-ts4.5/utils/scroll-gutter.d.ts +3 -0
- package/dist/types-ts4.5/utils/should-force-tracking.d.ts +1 -0
- package/dist/types-ts4.5/utils/slice.d.ts +11 -0
- package/dist/types-ts4.5/utils/table.d.ts +5 -0
- package/dist/types-ts4.5/utils/track-unsupported-content.d.ts +20 -0
- package/dist/types-ts4.5/utils/traversor.d.ts +9 -0
- package/dist/types-ts4.5/utils/types.d.ts +2 -0
- package/dist/types-ts4.5/utils/unsupportedContent/get-unsupported-content-level-data.d.ts +57 -0
- package/dist/types-ts4.5/utils/validate-using-spec.d.ts +19 -0
- package/dist/types-ts4.5/utils/validator.d.ts +42 -0
- package/dist/types-ts4.5/utils/whitespace.d.ts +2 -0
- package/dist/types-ts4.5/utils/wrap-selection-in.d.ts +9 -0
- package/dist/types-ts4.5/validator.d.ts +2 -0
- package/dist/types-ts4.5/with-plugin-state/index.d.ts +108 -0
- package/dist/types-ts4.5/with-plugin-state/types.d.ts +10 -0
- package/package.json +2 -2
- package/tmp/api-report-tmp.d.ts +9 -0
|
@@ -0,0 +1,379 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { JSONDocNode } from '@atlaskit/editor-json-transformer';
|
|
3
|
+
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
+
import type { Step } from '@atlaskit/editor-prosemirror/transform';
|
|
5
|
+
import type { Providers } from '../provider-factory';
|
|
6
|
+
export type NewCollabSyncUpErrorAttributes = {
|
|
7
|
+
lengthOfUnconfirmedSteps?: number;
|
|
8
|
+
tries: number;
|
|
9
|
+
maxRetries: number;
|
|
10
|
+
clientId?: number | string;
|
|
11
|
+
version: number;
|
|
12
|
+
};
|
|
13
|
+
export type ResolvedEditorState<T = any> = {
|
|
14
|
+
content: JSONDocNode | T;
|
|
15
|
+
title: string | null;
|
|
16
|
+
stepVersion: number;
|
|
17
|
+
};
|
|
18
|
+
export declare enum PROVIDER_ERROR_CODE {
|
|
19
|
+
NO_PERMISSION_ERROR = "NO_PERMISSION_ERROR",
|
|
20
|
+
INVALID_USER_TOKEN = "INVALID_USER_TOKEN",
|
|
21
|
+
DOCUMENT_NOT_FOUND = "DOCUMENT_NOT_FOUND",
|
|
22
|
+
LOCKED = "LOCKED",
|
|
23
|
+
FAIL_TO_SAVE = "FAIL_TO_SAVE",
|
|
24
|
+
DOCUMENT_RESTORE_ERROR = "DOCUMENT_RESTORE_ERROR",
|
|
25
|
+
INITIALISATION_ERROR = "INITIALISATION_ERROR",
|
|
26
|
+
NETWORK_ISSUE = "NETWORK_ISSUE",
|
|
27
|
+
INVALID_PROVIDER_CONFIGURATION = "INVALID_PROVIDER_CONFIGURATION",
|
|
28
|
+
INTERNAL_SERVICE_ERROR = "INTERNAL_SERVICE_ERROR",
|
|
29
|
+
DOCUMENT_UPDATE_ERROR = "DOCUMENT_UPDATE_ERROR"
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* This occurs when the provided user token is considered invalid for the given document ARI.
|
|
33
|
+
* It happens during initialisation of the provider.
|
|
34
|
+
* It could mean the document has been deleted (hence not found).
|
|
35
|
+
* @message Message returned to editor, i.e User does not have permissions to access this document or document is not found
|
|
36
|
+
* @recoverable It is recoverable, as we will try to refresh the token.
|
|
37
|
+
*/
|
|
38
|
+
type InsufficientEditingPermission = {
|
|
39
|
+
code: PROVIDER_ERROR_CODE.NO_PERMISSION_ERROR;
|
|
40
|
+
message: string;
|
|
41
|
+
recoverable: boolean;
|
|
42
|
+
reason?: string;
|
|
43
|
+
/**
|
|
44
|
+
* @deprecated switch to using either the error code or the recoverable flag
|
|
45
|
+
*/
|
|
46
|
+
status?: number;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Similar to InsufficientEditingPermission, but the user token is invalid because it has expired or been revoked.
|
|
50
|
+
* It may also be an invalid token format.
|
|
51
|
+
* This error is given to the provider by NCS.
|
|
52
|
+
* @message Message returned to editor, i.e. The user token was invalid
|
|
53
|
+
* @recoverable It is recoverable, as we will try to refresh the token.
|
|
54
|
+
*/
|
|
55
|
+
type InvalidUserToken = {
|
|
56
|
+
code: PROVIDER_ERROR_CODE.INVALID_USER_TOKEN;
|
|
57
|
+
message: string;
|
|
58
|
+
recoverable: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* @deprecated switch to using either the error code or the recoverable flag
|
|
61
|
+
*/
|
|
62
|
+
status?: number;
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Document not found error, thrown when the provider is unable to find a document with the given ARI and user token.
|
|
66
|
+
* It occurs during fetchCatchup, a function that fetches the latest document state during catchup.
|
|
67
|
+
* We need to recieve a 404 from the document service to throw this error.
|
|
68
|
+
* @message Message returned to editor, i.e. The requested document is not found
|
|
69
|
+
* @recoverable It is recoverable, as the provider can try again later.
|
|
70
|
+
*/
|
|
71
|
+
type DocumentNotFound = {
|
|
72
|
+
code: PROVIDER_ERROR_CODE.DOCUMENT_NOT_FOUND;
|
|
73
|
+
message: string;
|
|
74
|
+
recoverable: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* @deprecated switch to using either the error code or the recoverable flag
|
|
77
|
+
*/
|
|
78
|
+
status?: number;
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* This error is thrown when the document is locked by another user.
|
|
82
|
+
* The error is passed to us by NCS.
|
|
83
|
+
* @message Message returned to editor, i.e. The document is currently not available, please try again later
|
|
84
|
+
* @recoverable It is recoverable, as the provider can try again later.
|
|
85
|
+
*/
|
|
86
|
+
type Locked = {
|
|
87
|
+
code: PROVIDER_ERROR_CODE.LOCKED;
|
|
88
|
+
message: string;
|
|
89
|
+
recoverable: boolean;
|
|
90
|
+
status?: number;
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* This error is thrown when the provider is unable to save the document.
|
|
94
|
+
* This can happen when the connection to dynamoDB is lost, or when we do not have sufficient permissions (DYNAMO ERROR).
|
|
95
|
+
* This error is given to us by NCS.
|
|
96
|
+
* @message Message returned to editor, i.e. Collab service is not able to save changes
|
|
97
|
+
* @recoverable It is not recoverable, as we don't want the user to continue editing a document that is not being saved.
|
|
98
|
+
*/
|
|
99
|
+
type FailToSave = {
|
|
100
|
+
code: PROVIDER_ERROR_CODE.FAIL_TO_SAVE;
|
|
101
|
+
message: string;
|
|
102
|
+
recoverable: boolean;
|
|
103
|
+
/**
|
|
104
|
+
* @deprecated switch to using either the error code or the recoverable flag
|
|
105
|
+
*/
|
|
106
|
+
status?: number;
|
|
107
|
+
};
|
|
108
|
+
/**
|
|
109
|
+
* This error is thrown when the provider is unable to restore the document.
|
|
110
|
+
* It occurs during onRestore, a function that restores the document to a previous version and reapplies unconfirmed steps.
|
|
111
|
+
* onRestore is called when page recovery has emitted an 'init' event on a page client is currently connected to.
|
|
112
|
+
* It could mean we failed to update the page metadata, or we failed to reapply unconfirmed steps.
|
|
113
|
+
* @message Message returned to editor, i.e. Collab service unable to restore document
|
|
114
|
+
* @recoverable It is not recoverable, as the provider has no further options after this.
|
|
115
|
+
* The user will need to refresh the page to try again.
|
|
116
|
+
*/
|
|
117
|
+
type DocumentNotRestore = {
|
|
118
|
+
code: PROVIDER_ERROR_CODE.DOCUMENT_RESTORE_ERROR;
|
|
119
|
+
message: string;
|
|
120
|
+
recoverable: boolean;
|
|
121
|
+
/**
|
|
122
|
+
* @deprecated switch to using either the error code or the recoverable flag
|
|
123
|
+
*/
|
|
124
|
+
status?: number;
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* The initial document couldn't be loaded from the collab service.
|
|
128
|
+
* This error is given to us by NCS.
|
|
129
|
+
* It could indicate either a network issue, or an internal service error in NCS.
|
|
130
|
+
* @message Message returned to editor, i.e. The initial document couldn't be loaded from the collab service
|
|
131
|
+
* @recoverable It is not recoverable, as the provider cannot do anything to fix it.
|
|
132
|
+
* The user will need to refresh the page to try again.
|
|
133
|
+
*/
|
|
134
|
+
type InitialisationError = {
|
|
135
|
+
code: PROVIDER_ERROR_CODE.INITIALISATION_ERROR;
|
|
136
|
+
message: string;
|
|
137
|
+
recoverable: boolean;
|
|
138
|
+
/**
|
|
139
|
+
* @deprecated switch to using either the error code or the recoverable flag
|
|
140
|
+
*/
|
|
141
|
+
status?: number;
|
|
142
|
+
};
|
|
143
|
+
/**
|
|
144
|
+
* Couldn't reconnect to the collab service (NCS) due to network issues.
|
|
145
|
+
* NCS could be down, or the user could be offline. It's also possible the url is incorrect, or the user is behind a proxy blocking the connection.
|
|
146
|
+
* Fired upon a reconnection attempt error (from Socket.IO Manager)
|
|
147
|
+
* @message Message returned to editor, i.e. Couldn't reconnect to the collab service due to network issues
|
|
148
|
+
* @recoverable It is recoverable, as the provider will try to reconnect.
|
|
149
|
+
*/
|
|
150
|
+
type NetworkIssue = {
|
|
151
|
+
code: PROVIDER_ERROR_CODE.NETWORK_ISSUE;
|
|
152
|
+
message: string;
|
|
153
|
+
recoverable: boolean;
|
|
154
|
+
/**
|
|
155
|
+
* @deprecated switch to using either the error code or the recoverable flag
|
|
156
|
+
*/
|
|
157
|
+
status?: number;
|
|
158
|
+
};
|
|
159
|
+
/**
|
|
160
|
+
* This error is thrown when the provider has an invalid configuration.
|
|
161
|
+
* It could happen due to these errors from NCS:
|
|
162
|
+
* NAMESPACE_INVALID
|
|
163
|
+
INVALID_ACTIVATION_ID
|
|
164
|
+
INVALID_DOCUMENT_ARI
|
|
165
|
+
INVALID_CLOUD_ID
|
|
166
|
+
* @message Message returned to editor, i.e. Invalid provider configuration
|
|
167
|
+
* @recoverable It is not recoverable, as the provider cannot do anything to fix it.
|
|
168
|
+
* The service using the provider will need to fix the configuration.
|
|
169
|
+
*/
|
|
170
|
+
type InvalidProviderConfiguration = {
|
|
171
|
+
code: PROVIDER_ERROR_CODE.INVALID_PROVIDER_CONFIGURATION;
|
|
172
|
+
message: string;
|
|
173
|
+
recoverable: boolean;
|
|
174
|
+
reason: string;
|
|
175
|
+
/**
|
|
176
|
+
* @deprecated switch to using either the error code or the recoverable flag
|
|
177
|
+
*/
|
|
178
|
+
status?: number;
|
|
179
|
+
};
|
|
180
|
+
/**
|
|
181
|
+
* This error is thrown when the provider encounters an internal service error, not otherwise accounted for.
|
|
182
|
+
* @message Message returned to editor, i.e. Collab Provider experienced an unrecoverable error
|
|
183
|
+
* @recoverable It is not recoverable, as the provider cannot do anything to fix it.
|
|
184
|
+
*/
|
|
185
|
+
type InternalServiceError = {
|
|
186
|
+
code: PROVIDER_ERROR_CODE.INTERNAL_SERVICE_ERROR;
|
|
187
|
+
message: string;
|
|
188
|
+
recoverable: boolean;
|
|
189
|
+
reason: string;
|
|
190
|
+
/**
|
|
191
|
+
* @deprecated switch to using either the error code or the recoverable flag
|
|
192
|
+
*/
|
|
193
|
+
status?: number;
|
|
194
|
+
};
|
|
195
|
+
type ProviderDocumentUpdateError = {
|
|
196
|
+
code: PROVIDER_ERROR_CODE.DOCUMENT_UPDATE_ERROR;
|
|
197
|
+
message: 'The provider failed to apply changes to the editor';
|
|
198
|
+
recoverable: boolean;
|
|
199
|
+
/**
|
|
200
|
+
* @deprecated switch to using either the error code or the recoverable flag
|
|
201
|
+
*/
|
|
202
|
+
status?: number;
|
|
203
|
+
};
|
|
204
|
+
/**
|
|
205
|
+
* A union of all possible provider errors that can be emitted back to the editor.
|
|
206
|
+
*/
|
|
207
|
+
export type ProviderError = InsufficientEditingPermission | InvalidUserToken | DocumentNotFound | Locked | FailToSave | DocumentNotRestore | InitialisationError | NetworkIssue | InvalidProviderConfiguration | InternalServiceError | ProviderDocumentUpdateError;
|
|
208
|
+
export interface Metadata {
|
|
209
|
+
[key: string]: string | number | boolean;
|
|
210
|
+
}
|
|
211
|
+
export type CollabMetadataPayload = Metadata;
|
|
212
|
+
export interface CollabEventInitData {
|
|
213
|
+
doc?: any;
|
|
214
|
+
json?: any;
|
|
215
|
+
version?: number;
|
|
216
|
+
sid?: string;
|
|
217
|
+
reserveCursor?: boolean;
|
|
218
|
+
}
|
|
219
|
+
export interface CollabInitPayload extends CollabEventInitData {
|
|
220
|
+
doc: any;
|
|
221
|
+
version: number;
|
|
222
|
+
metadata?: Metadata;
|
|
223
|
+
reserveCursor?: boolean;
|
|
224
|
+
}
|
|
225
|
+
export interface CollabEventConnectionData {
|
|
226
|
+
sid: string;
|
|
227
|
+
initial: boolean;
|
|
228
|
+
}
|
|
229
|
+
export type CollabConnectedPayload = CollabEventConnectionData;
|
|
230
|
+
export declare enum DisconnectReason {
|
|
231
|
+
CLIENT_DISCONNECT = "CLIENT_DISCONNECT",
|
|
232
|
+
SERVER_DISCONNECT = "SERVER_DISCONNECT",
|
|
233
|
+
SOCKET_CLOSED = "SOCKET_CLOSED",
|
|
234
|
+
SOCKET_ERROR = "SOCKET_ERROR",
|
|
235
|
+
SOCKET_TIMEOUT = "SOCKET_TIMEOUT",
|
|
236
|
+
UNKNOWN_DISCONNECT = "UNKNOWN_DISCONNECT"
|
|
237
|
+
}
|
|
238
|
+
export interface CollabDisconnectedPayload {
|
|
239
|
+
reason: DisconnectReason;
|
|
240
|
+
sid: string;
|
|
241
|
+
}
|
|
242
|
+
export interface CollabEventRemoteData {
|
|
243
|
+
json?: any;
|
|
244
|
+
newState?: EditorState;
|
|
245
|
+
userIds?: (number | string)[];
|
|
246
|
+
}
|
|
247
|
+
type MarkJson = {
|
|
248
|
+
type: string;
|
|
249
|
+
attrs: {
|
|
250
|
+
[key: string]: any;
|
|
251
|
+
};
|
|
252
|
+
};
|
|
253
|
+
type NodeJson = {
|
|
254
|
+
type: string;
|
|
255
|
+
attrs: {
|
|
256
|
+
[key: string]: any;
|
|
257
|
+
};
|
|
258
|
+
content: NodeJson[];
|
|
259
|
+
marks: MarkJson[];
|
|
260
|
+
text?: string;
|
|
261
|
+
};
|
|
262
|
+
type SliceJson = {
|
|
263
|
+
content: NodeJson[];
|
|
264
|
+
openStart: number;
|
|
265
|
+
openEnd: number;
|
|
266
|
+
};
|
|
267
|
+
export type StepJson = {
|
|
268
|
+
stepType?: string;
|
|
269
|
+
from?: number;
|
|
270
|
+
to?: number;
|
|
271
|
+
slice?: SliceJson;
|
|
272
|
+
clientId: number | string;
|
|
273
|
+
userId: string;
|
|
274
|
+
createdAt?: number;
|
|
275
|
+
structure?: boolean;
|
|
276
|
+
};
|
|
277
|
+
export interface CollabDataPayload extends CollabEventRemoteData {
|
|
278
|
+
version: number;
|
|
279
|
+
json: StepJson[];
|
|
280
|
+
userIds: (number | string)[];
|
|
281
|
+
}
|
|
282
|
+
export interface CollabSendableSelection {
|
|
283
|
+
type: 'textSelection' | 'nodeSelection';
|
|
284
|
+
anchor?: number | string;
|
|
285
|
+
head?: number | string;
|
|
286
|
+
}
|
|
287
|
+
export interface CollabEventTelepointerData {
|
|
288
|
+
type: 'telepointer';
|
|
289
|
+
selection: CollabSendableSelection;
|
|
290
|
+
sessionId: string;
|
|
291
|
+
}
|
|
292
|
+
export type CollabTelepointerPayload = CollabEventTelepointerData;
|
|
293
|
+
export interface CollabParticipant {
|
|
294
|
+
lastActive: number;
|
|
295
|
+
sessionId: string;
|
|
296
|
+
avatar: string;
|
|
297
|
+
name: string;
|
|
298
|
+
cursorPos?: number;
|
|
299
|
+
}
|
|
300
|
+
export type ProviderParticipant = CollabParticipant & {
|
|
301
|
+
userId: string;
|
|
302
|
+
clientId: number | string;
|
|
303
|
+
email: string;
|
|
304
|
+
};
|
|
305
|
+
export interface CollabEventPresenceData {
|
|
306
|
+
joined?: ProviderParticipant[];
|
|
307
|
+
left?: {
|
|
308
|
+
sessionId: string;
|
|
309
|
+
}[];
|
|
310
|
+
}
|
|
311
|
+
export type CollabPresencePayload = CollabEventPresenceData;
|
|
312
|
+
export type CollabLocalStepsPayload = {
|
|
313
|
+
steps: readonly Step[];
|
|
314
|
+
};
|
|
315
|
+
export interface CollabEventConnectingData {
|
|
316
|
+
initial: boolean;
|
|
317
|
+
}
|
|
318
|
+
export type CollabConnectingPayload = CollabEventConnectingData;
|
|
319
|
+
export type CollabCommitStatusEventPayload = {
|
|
320
|
+
status: 'attempt' | 'success' | 'failure';
|
|
321
|
+
version: number;
|
|
322
|
+
};
|
|
323
|
+
export interface CollabEvents {
|
|
324
|
+
'metadata:changed': Metadata;
|
|
325
|
+
init: CollabInitPayload;
|
|
326
|
+
connected: CollabConnectedPayload;
|
|
327
|
+
disconnected: CollabDisconnectedPayload;
|
|
328
|
+
data: CollabDataPayload;
|
|
329
|
+
telepointer: CollabTelepointerPayload;
|
|
330
|
+
presence: CollabPresencePayload;
|
|
331
|
+
'local-steps': CollabLocalStepsPayload;
|
|
332
|
+
error: ProviderError;
|
|
333
|
+
entity: any;
|
|
334
|
+
connecting: CollabConnectingPayload;
|
|
335
|
+
'commit-status': CollabCommitStatusEventPayload;
|
|
336
|
+
}
|
|
337
|
+
export type SyncUpErrorFunction = (attributes: NewCollabSyncUpErrorAttributes) => void;
|
|
338
|
+
export interface CollabEditProvider<Events extends CollabEvents = CollabEvents> {
|
|
339
|
+
initialize(getState: () => any, createStep: (json: object) => Step): this;
|
|
340
|
+
setup(props: {
|
|
341
|
+
getState?: () => EditorState;
|
|
342
|
+
onSyncUpError?: SyncUpErrorFunction;
|
|
343
|
+
}): this;
|
|
344
|
+
send(tr: Transaction, oldState: EditorState, newState: EditorState): void;
|
|
345
|
+
on(evt: keyof Events, handler: (...args: any) => void): this;
|
|
346
|
+
off(evt: keyof Events, handler: (...args: any) => void): this;
|
|
347
|
+
unsubscribeAll(evt: keyof Events): this;
|
|
348
|
+
sendMessage<K extends keyof Events>(data: {
|
|
349
|
+
type: K;
|
|
350
|
+
} & Events[K]): void;
|
|
351
|
+
getFinalAcknowledgedState(): Promise<ResolvedEditorState>;
|
|
352
|
+
}
|
|
353
|
+
export type CollabEditOptions = {
|
|
354
|
+
provider?: Providers['collabEditProvider'];
|
|
355
|
+
userId?: string;
|
|
356
|
+
useNativePlugin?: boolean;
|
|
357
|
+
} & CollabInviteToEditProps & CollabAnalyticsProps;
|
|
358
|
+
export type InviteToEditButtonProps = {
|
|
359
|
+
onClick: (event: React.MouseEvent<HTMLElement>) => void;
|
|
360
|
+
selected: boolean;
|
|
361
|
+
};
|
|
362
|
+
export type InviteToEditComponentProps = {
|
|
363
|
+
children: ReactElement<InviteToEditButtonProps>;
|
|
364
|
+
};
|
|
365
|
+
export interface CollabInviteToEditProps {
|
|
366
|
+
inviteToEditHandler?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
367
|
+
isInviteToEditButtonSelected?: boolean;
|
|
368
|
+
inviteToEditComponent?: React.ComponentType<InviteToEditComponentProps>;
|
|
369
|
+
}
|
|
370
|
+
export interface CollabAnalyticsProps {
|
|
371
|
+
/**
|
|
372
|
+
* @description Control whether Synchrony entity error events are tracked
|
|
373
|
+
*/
|
|
374
|
+
EXPERIMENTAL_allowInternalErrorAnalytics?: boolean;
|
|
375
|
+
}
|
|
376
|
+
export interface CollabEventLocalStepData {
|
|
377
|
+
steps: Array<Step>;
|
|
378
|
+
}
|
|
379
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { MarkType, NodeType, Node as PMNode, ResolvedPos, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
+
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
+
import type { HeadingLevelsAndNormalText } from '../types/block-type';
|
|
4
|
+
import type { Command } from '../types/command';
|
|
5
|
+
type AlignmentState = 'start' | 'end' | 'center';
|
|
6
|
+
export declare function addParagraphAtEnd(tr: Transaction): void;
|
|
7
|
+
export declare function createParagraphAtEnd(): Command;
|
|
8
|
+
export declare const changeImageAlignment: (align?: AlignmentState) => Command;
|
|
9
|
+
export declare const createToggleBlockMarkOnRange: <T extends {} = object>(markType: MarkType, getAttrs: (prevAttrs?: T | undefined, node?: PMNode) => false | T | undefined, allowedBlocks?: NodeType[] | ((schema: Schema, node: PMNode, parent: PMNode | null) => boolean) | undefined) => (from: number, to: number, tr: Transaction, state: EditorState) => boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Toggles block mark based on the return type of `getAttrs`.
|
|
12
|
+
* This is similar to ProseMirror's `getAttrs` from `AttributeSpec`
|
|
13
|
+
* return `false` to remove the mark.
|
|
14
|
+
* return `undefined for no-op.
|
|
15
|
+
* return an `object` to update the mark.
|
|
16
|
+
*/
|
|
17
|
+
export declare const toggleBlockMark: <T extends {} = object>(markType: MarkType, getAttrs: (prevAttrs?: T | undefined, node?: PMNode) => false | T | undefined, allowedBlocks?: NodeType[] | ((schema: Schema, node: PMNode, parent: PMNode | null) => boolean) | undefined) => Command;
|
|
18
|
+
export declare const clearEditorContent: Command;
|
|
19
|
+
export declare function findCutBefore($pos: ResolvedPos): ResolvedPos | null;
|
|
20
|
+
export declare function setHeading(level: HeadingLevelsAndNormalText): Command;
|
|
21
|
+
export { insertBlock } from './insert-block';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
+
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
+
export declare const insertBlock: (state: EditorState, nodeType: NodeType, start: number, end: number, attrs?: {
|
|
4
|
+
[key: string]: any;
|
|
5
|
+
} | undefined) => Transaction | null;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { NodeType, Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
+
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
+
export declare function getSelectedNodeOrNodeParentByNodeType({ nodeType, selection, }: {
|
|
4
|
+
nodeType: NodeType | Array<NodeType>;
|
|
5
|
+
selection: Transaction['selection'];
|
|
6
|
+
}): import("prosemirror-utils/dist/types").FindResult;
|
|
7
|
+
export declare const toDOM: (node: PMNode, schema: Schema) => Node;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { insideTable } from './inside';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { withAnalytics } from './withAnalytics';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
+
import type { AnalyticsEventPayload, EditorAnalyticsAPI } from '../analytics';
|
|
3
|
+
import type { HigherOrderCommand } from '../types';
|
|
4
|
+
/**
|
|
5
|
+
* Callback accepts EditorState
|
|
6
|
+
*
|
|
7
|
+
* @remarks
|
|
8
|
+
* The plugin using the Analytics may using an Optional<Analytics> dependency
|
|
9
|
+
* It can be undefined during testing, we may not have included analytics
|
|
10
|
+
* Also in cases where Analytics fails to load, the editor doesn't crash.
|
|
11
|
+
*
|
|
12
|
+
* @param state - EditorState, passed to the callback
|
|
13
|
+
*/
|
|
14
|
+
type AnalyticsEventPayloadCallback = (state: EditorState) => AnalyticsEventPayload | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* Analytics API
|
|
17
|
+
* @example
|
|
18
|
+
* ```
|
|
19
|
+
* withAnalytics({
|
|
20
|
+
* eventType: EVENT_TYPE.TRACK,
|
|
21
|
+
* action: ACTION.REPLACED_ONE,
|
|
22
|
+
* actionSubject: ACTION_SUBJECT.TEXT,
|
|
23
|
+
* attributes: {
|
|
24
|
+
* triggerMethod,
|
|
25
|
+
* },
|
|
26
|
+
* })(replace(replaceText))
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* @param analyticsApi - EditorAnalyticsAPI, undefined in tests or if analytics fails to load
|
|
30
|
+
* @param payload - AnalyticsEventPayload | AnalyticsEventPayloadCallback - payload to be attached to the transaction
|
|
31
|
+
* @param channel - string - channel to be used for analytics
|
|
32
|
+
*/
|
|
33
|
+
export declare function withAnalytics(analyticsApi: EditorAnalyticsAPI | undefined, payload: AnalyticsEventPayload | AnalyticsEventPayloadCallback, channel?: string): HigherOrderCommand;
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { PureComponent } from 'react';
|
|
2
|
+
import type { QuickInsertItem } from '../provider-factory';
|
|
3
|
+
import type { EmptyStateHandler } from '../types';
|
|
4
|
+
import type { Category, Modes } from './types';
|
|
5
|
+
export interface Props {
|
|
6
|
+
categories?: Category[];
|
|
7
|
+
mode: keyof typeof Modes;
|
|
8
|
+
getItems: (query?: string, category?: string) => QuickInsertItem[];
|
|
9
|
+
onSelectItem?: (item: QuickInsertItem) => void;
|
|
10
|
+
onInsertItem: (item: QuickInsertItem) => void;
|
|
11
|
+
showSearch: boolean;
|
|
12
|
+
showCategories: boolean;
|
|
13
|
+
defaultCategory?: string;
|
|
14
|
+
emptyStateHandler?: EmptyStateHandler;
|
|
15
|
+
viewMoreItem?: QuickInsertItem;
|
|
16
|
+
}
|
|
17
|
+
export interface State {
|
|
18
|
+
items: QuickInsertItem[];
|
|
19
|
+
categories: Category[];
|
|
20
|
+
selectedCategory?: string;
|
|
21
|
+
searchTerm?: string;
|
|
22
|
+
}
|
|
23
|
+
export default class ElementBrowser extends PureComponent<Props, State> {
|
|
24
|
+
static defaultProps: {
|
|
25
|
+
defaultCategory: string;
|
|
26
|
+
onInsertItem: () => void;
|
|
27
|
+
};
|
|
28
|
+
state: State;
|
|
29
|
+
componentDidMount(): void;
|
|
30
|
+
getCategories: (items?: QuickInsertItem[]) => Category[];
|
|
31
|
+
filterCategories: (items: QuickInsertItem[], categories?: Category[]) => Category[];
|
|
32
|
+
fetchItems: (query?: string, category?: string) => QuickInsertItem[];
|
|
33
|
+
componentDidUpdate(prevProps: Props, prevState: State): void;
|
|
34
|
+
handleSearch: (searchTerm: string) => void;
|
|
35
|
+
handleCategorySelection: (clickedCategory: Category) => void;
|
|
36
|
+
render(): JSX.Element;
|
|
37
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
3
|
+
import type { Category } from '../types';
|
|
4
|
+
interface Props {
|
|
5
|
+
categories?: Category[];
|
|
6
|
+
onSelectCategory: (category: Category) => void;
|
|
7
|
+
selectedCategory?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const MemoizedCategoryListWithAnalytics: React.MemoExoticComponent<React.ForwardRefExoticComponent<Pick<Props & WithAnalyticsEventsProps & import("@atlaskit/analytics-next").WithContextProps, "createAnalyticsEvent" | "analyticsContext" | keyof Props> & React.RefAttributes<any>>>;
|
|
10
|
+
export default MemoizedCategoryListWithAnalytics;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import Loadable from 'react-loadable';
|
|
4
|
+
import type { Props as ElementBrowserProps } from '../ElementBrowser';
|
|
5
|
+
declare const ElementBrowserLoader: React.ComponentType<ElementBrowserProps> & Loadable.LoadableComponent;
|
|
6
|
+
export default ElementBrowserLoader;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
|
+
import type { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
5
|
+
import type { QuickInsertItem } from '../../../provider-factory';
|
|
6
|
+
import type { EmptyStateHandler } from '../../../types';
|
|
7
|
+
import type { SelectedItemProps } from '../../types';
|
|
8
|
+
import { Modes } from '../../types';
|
|
9
|
+
export declare const ICON_HEIGHT = 40;
|
|
10
|
+
export declare const ICON_WIDTH = 40;
|
|
11
|
+
export declare const itemIcon: import("@emotion/react").SerializedStyles;
|
|
12
|
+
export interface Props {
|
|
13
|
+
items: QuickInsertItem[];
|
|
14
|
+
mode: keyof typeof Modes;
|
|
15
|
+
onInsertItem: (item: QuickInsertItem) => void;
|
|
16
|
+
setColumnCount: (columnCount: number) => void;
|
|
17
|
+
setFocusedItemIndex: (index: number) => void;
|
|
18
|
+
emptyStateHandler?: EmptyStateHandler;
|
|
19
|
+
selectedCategory?: string;
|
|
20
|
+
searchTerm?: string;
|
|
21
|
+
}
|
|
22
|
+
type ElementItemType = {
|
|
23
|
+
inlineMode: boolean;
|
|
24
|
+
item: QuickInsertItem;
|
|
25
|
+
onInsertItem: (item: QuickInsertItem) => void;
|
|
26
|
+
selected: boolean;
|
|
27
|
+
focus: boolean;
|
|
28
|
+
setFocusedItemIndex: (index: number) => void;
|
|
29
|
+
index: number;
|
|
30
|
+
};
|
|
31
|
+
export declare function ElementItem({ inlineMode, selected, item, index, onInsertItem, focus, setFocusedItemIndex, }: ElementItemType): jsx.JSX.Element;
|
|
32
|
+
declare const MemoizedElementListWithAnalytics: React.MemoExoticComponent<React.ForwardRefExoticComponent<Pick<Props & SelectedItemProps & WithAnalyticsEventsProps & import("@atlaskit/analytics-next").WithContextProps, "createAnalyticsEvent" | "analyticsContext" | keyof Props | keyof SelectedItemProps> & React.RefAttributes<any>>>;
|
|
33
|
+
export default MemoizedElementListWithAnalytics;
|
package/dist/types-ts4.5/element-browser/components/ElementList/cellSizeAndPositionGetter.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CollectionCellSizeAndPositionGetter } from 'react-virtualized/dist/commonjs/Collection';
|
|
2
|
+
/**
|
|
3
|
+
* Callback responsible for returning size and offset/position information
|
|
4
|
+
* for a given cell.
|
|
5
|
+
* https://github.com/bvaughn/react-virtualized/blob/master/docs/Collection.md
|
|
6
|
+
**/
|
|
7
|
+
export default function cellSizeAndPositionGetter(containerWidth: number, scrollbarWidth: number): CollectionCellSizeAndPositionGetter;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare function getColumnCount(clientWidth: number): number;
|
|
2
|
+
type DatumReturnType = {
|
|
3
|
+
availableWidth: number;
|
|
4
|
+
columnCount: number;
|
|
5
|
+
};
|
|
6
|
+
type Options = {
|
|
7
|
+
gutterSize: number;
|
|
8
|
+
scrollbarWidth: number;
|
|
9
|
+
};
|
|
10
|
+
export declare function generateVirtualizedContainerDatum(containerWidth: number, options: Options): DatumReturnType;
|
|
11
|
+
export declare function getScrollbarWidth(): number;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { WrappedComponentProps } from 'react-intl-next';
|
|
4
|
+
import { Modes } from '../types';
|
|
5
|
+
interface Props {
|
|
6
|
+
onSearch: (value: string) => void;
|
|
7
|
+
mode: keyof typeof Modes;
|
|
8
|
+
focus: boolean;
|
|
9
|
+
onClick: (e: React.MouseEvent) => void;
|
|
10
|
+
onKeyDown: (e: React.KeyboardEvent) => void;
|
|
11
|
+
searchTerm?: string;
|
|
12
|
+
}
|
|
13
|
+
declare const MemoizedElementSearchWithAnalytics: React.MemoExoticComponent<React.ForwardRefExoticComponent<Omit<Props & WrappedComponentProps<"intl">, "intl"> & {
|
|
14
|
+
forwardedRef?: React.Ref<any> | undefined;
|
|
15
|
+
} & {
|
|
16
|
+
children?: React.ReactNode;
|
|
17
|
+
} & import("@atlaskit/analytics-next").WithContextProps & React.RefAttributes<any>>>;
|
|
18
|
+
export default MemoizedElementSearchWithAnalytics;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
4
|
+
import type { QuickInsertItem } from '../../provider-factory';
|
|
5
|
+
import type { EmptyStateHandler } from '../../types';
|
|
6
|
+
import type { Category, Modes } from '../types';
|
|
7
|
+
export type StatelessElementBrowserProps = {
|
|
8
|
+
categories?: Category[];
|
|
9
|
+
items: QuickInsertItem[];
|
|
10
|
+
onSearch: (searchTerm: string) => void;
|
|
11
|
+
onSelectCategory: (category: Category) => void;
|
|
12
|
+
onSelectItem?: (item: QuickInsertItem) => void;
|
|
13
|
+
onInsertItem: (item: QuickInsertItem) => void;
|
|
14
|
+
selectedCategory?: string;
|
|
15
|
+
showSearch: boolean;
|
|
16
|
+
showCategories: boolean;
|
|
17
|
+
mode: keyof typeof Modes;
|
|
18
|
+
searchTerm?: string;
|
|
19
|
+
emptyStateHandler?: EmptyStateHandler;
|
|
20
|
+
viewMoreItem?: QuickInsertItem;
|
|
21
|
+
} & WithAnalyticsEventsProps;
|
|
22
|
+
declare const MemoizedElementBrowser: React.MemoExoticComponent<React.ForwardRefExoticComponent<Pick<Omit<StatelessElementBrowserProps, keyof WithAnalyticsEventsProps> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "key" | "mode" | "analyticsContext" | "categories" | "onSelectCategory" | "selectedCategory" | "items" | "emptyStateHandler" | "searchTerm" | "onInsertItem" | "onSearch" | "onSelectItem" | "viewMoreItem" | "showCategories" | "showSearch"> & React.RefAttributes<any>>>;
|
|
23
|
+
export default MemoizedElementBrowser;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const GRID_SIZE: number;
|
|
2
|
+
export declare const DEVICE_BREAKPOINT_NUMBERS: {
|
|
3
|
+
small: number;
|
|
4
|
+
medium: number;
|
|
5
|
+
large: number;
|
|
6
|
+
};
|
|
7
|
+
export declare const FLEX_ITEMS_CONTAINER_BREAKPOINT_NUMBERS: {
|
|
8
|
+
small: number;
|
|
9
|
+
medium: number;
|
|
10
|
+
large: number;
|
|
11
|
+
};
|
|
12
|
+
export declare const SIDEBAR_WIDTH: string;
|
|
13
|
+
export declare const SIDEBAR_HEADING_WRAPPER_HEIGHT: string;
|
|
14
|
+
export declare const SIDEBAR_HEADING_PADDING_LEFT = "12px";
|
|
15
|
+
export declare const INLINE_SIDEBAR_HEIGHT = "54px";
|
|
16
|
+
export declare const SEARCH_ITEM_HEIGHT_WIDTH = "20px";
|
|
17
|
+
export declare const SCROLLBAR_WIDTH = 15;
|
|
18
|
+
export declare const ELEMENT_LIST_PADDING = 2;
|
|
19
|
+
export declare const ELEMENT_ITEM_HEIGHT = 75;
|