@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,33 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* Problem:
|
|
6
|
+
* While using WidthObserver, there's no initial width.
|
|
7
|
+
* That may cause problems, but not limited to, something like a lag between
|
|
8
|
+
* renders for conditionally rendered components.
|
|
9
|
+
*
|
|
10
|
+
* solution:
|
|
11
|
+
* useContainerWidth() hook
|
|
12
|
+
* it pre-measures the width of a parent container on initial mount
|
|
13
|
+
* and gives you back the containerWidth.
|
|
14
|
+
*
|
|
15
|
+
*
|
|
16
|
+
* Example hook usage:
|
|
17
|
+
*
|
|
18
|
+
* const { containerWidth, ContainerWidthMonitor } = useContainerWidth();
|
|
19
|
+
*
|
|
20
|
+
* return (
|
|
21
|
+
* <>
|
|
22
|
+
* <ContainerWidthMonitor />
|
|
23
|
+
* {containerWidth < 600 ? <MobileComponent /> : <DesktopComponent />}
|
|
24
|
+
* </>
|
|
25
|
+
* );
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
type useContainerWidthReturnType = {
|
|
29
|
+
containerWidth: number;
|
|
30
|
+
ContainerWidthMonitor: React.ElementType;
|
|
31
|
+
};
|
|
32
|
+
export default function useContainerWidth(): useContainerWidthReturnType;
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* A custom hook that handles focus on a DOM element.
|
|
4
|
+
* Takes in a boolean value and calls element.focus
|
|
5
|
+
*
|
|
6
|
+
* @param {boolean} focus
|
|
7
|
+
*
|
|
8
|
+
* Example usage:
|
|
9
|
+
*******************************************************************************
|
|
10
|
+
* const SearchBar = ({ focus }) => {
|
|
11
|
+
* const ref = useFocus(focus);
|
|
12
|
+
* return <input ref={ref} />
|
|
13
|
+
* }
|
|
14
|
+
*******************************************************************************
|
|
15
|
+
* const ItemList = ({ items, focus }) => (
|
|
16
|
+
* <ul>
|
|
17
|
+
* {items.map((item, index) => (
|
|
18
|
+
* <Item key={item.uuid} item={item} focus={focus} />
|
|
19
|
+
* ))}
|
|
20
|
+
* </ul>
|
|
21
|
+
* );
|
|
22
|
+
*
|
|
23
|
+
* const Item = ({ item, focus }) => {
|
|
24
|
+
* const ref = useFocus(focus);
|
|
25
|
+
* return (
|
|
26
|
+
* <li ref={ref}>
|
|
27
|
+
* {item.name}
|
|
28
|
+
* </li>
|
|
29
|
+
* )
|
|
30
|
+
* }
|
|
31
|
+
*******************************************************************************
|
|
32
|
+
*/
|
|
33
|
+
type RefType = null | HTMLInputElement | HTMLDivElement;
|
|
34
|
+
export default function useFocus(focus: boolean): import("react").MutableRefObject<RefType>;
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* a custom hook that handles keyboard navigation for Arrow keys based on a
|
|
4
|
+
* given listSize, and a step (for up and down arrows).
|
|
5
|
+
*
|
|
6
|
+
* @param {number} listSize
|
|
7
|
+
* @param {number} upDownStep
|
|
8
|
+
*
|
|
9
|
+
* Example usage:
|
|
10
|
+
* const list = ['Confluence','Jira','Atlaskit'];
|
|
11
|
+
* const {
|
|
12
|
+
* selectedItemIndex,
|
|
13
|
+
* focusedItemIndex,
|
|
14
|
+
* focusOnSearch,
|
|
15
|
+
* focusOnViewMore,
|
|
16
|
+
* setFocusedItemIndex,
|
|
17
|
+
* onKeyDown
|
|
18
|
+
* } = useSelectAndFocusOnArrowNavigation(list.length - 1, 1);
|
|
19
|
+
*
|
|
20
|
+
* return (
|
|
21
|
+
* <div onKeyDown={onKeyDown}>
|
|
22
|
+
* <SearchBar onClick={() => setFocusedItemIndex(undefined)} focus={focusOnSearch} />
|
|
23
|
+
* {list.map((item, index) => (
|
|
24
|
+
* <ListItem
|
|
25
|
+
* title={item}
|
|
26
|
+
* style={{ ..., color: selected ? 'selectedStateColor' : defaultColor }}
|
|
27
|
+
* onClick={() => {
|
|
28
|
+
* setFocusedItemIndex(index);
|
|
29
|
+
* }
|
|
30
|
+
* />
|
|
31
|
+
* )}
|
|
32
|
+
* </div>
|
|
33
|
+
* );
|
|
34
|
+
*
|
|
35
|
+
* const SearchBar = ({ focus }) => {
|
|
36
|
+
* const ref = useRefToFocusOrScroll(focus);
|
|
37
|
+
* return <input ref={ref} />
|
|
38
|
+
* }
|
|
39
|
+
*
|
|
40
|
+
*/
|
|
41
|
+
type ReducerState = {
|
|
42
|
+
focusOnSearch: boolean;
|
|
43
|
+
focusOnViewMore: boolean;
|
|
44
|
+
selectedItemIndex?: number;
|
|
45
|
+
focusedItemIndex?: number;
|
|
46
|
+
listSize: number;
|
|
47
|
+
canFocusViewMore?: boolean;
|
|
48
|
+
};
|
|
49
|
+
export declare enum ACTIONS {
|
|
50
|
+
FOCUS_SEARCH = "focusOnSearch",
|
|
51
|
+
UPDATE_STATE = "updateState",
|
|
52
|
+
MOVE = "move"
|
|
53
|
+
}
|
|
54
|
+
export type ReducerAction = {
|
|
55
|
+
type: ACTIONS;
|
|
56
|
+
payload: Partial<ReducerState> & {
|
|
57
|
+
positions?: number;
|
|
58
|
+
step?: number;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
export type useSelectAndFocusReturnType = {
|
|
62
|
+
selectedItemIndex?: number;
|
|
63
|
+
onKeyDown: (e: React.KeyboardEvent<HTMLDivElement>) => void;
|
|
64
|
+
focusOnSearch: boolean;
|
|
65
|
+
focusOnViewMore: boolean;
|
|
66
|
+
focusedItemIndex?: number;
|
|
67
|
+
setFocusedItemIndex: (index?: number) => void;
|
|
68
|
+
setFocusOnSearch: () => void;
|
|
69
|
+
};
|
|
70
|
+
declare function useSelectAndFocusOnArrowNavigation(listSize: number, step: number, canFocusViewMore: boolean): useSelectAndFocusReturnType;
|
|
71
|
+
export declare const ensureSafeIndex: (index: number, listSize: number) => number;
|
|
72
|
+
export default useSelectAndFocusOnArrowNavigation;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
+
export interface Listeners {
|
|
3
|
+
[name: string]: Set<Listener>;
|
|
4
|
+
}
|
|
5
|
+
export type Listener<T = any> = (data: T) => void;
|
|
6
|
+
type EventName = PluginKey | string;
|
|
7
|
+
export type Dispatch<T = any> = (eventName: EventName, data: T) => void;
|
|
8
|
+
export declare class EventDispatcher<T = any> {
|
|
9
|
+
private listeners;
|
|
10
|
+
on(event: string, cb: Listener<T>): void;
|
|
11
|
+
has(event: string, cb: Listener<T>): boolean;
|
|
12
|
+
off(event: string, cb: Listener<T>): void;
|
|
13
|
+
emit(event: string, data: T): void;
|
|
14
|
+
destroy(): void;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Creates a dispatch function that can be called inside ProseMirror Plugin
|
|
18
|
+
* to notify listeners about that plugin's state change.
|
|
19
|
+
*/
|
|
20
|
+
export declare function createDispatch<T>(eventDispatcher: EventDispatcher<T>): Dispatch<T>;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ExtensionProvider } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Allow to run methods from the `ExtensionProvider` interface across all providers seamlessly.
|
|
4
|
+
* This handles promise racing and discards rejected promises safely.
|
|
5
|
+
*/
|
|
6
|
+
declare const _default: (extensionProviders: (ExtensionProvider | Promise<ExtensionProvider>)[]) => ExtensionProvider;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ExtensionAutoConvertHandler, ExtensionKey, ExtensionManifest, ExtensionProvider, ExtensionType, Parameters } from './types';
|
|
2
|
+
export default class DefaultExtensionProvider<T extends Parameters> implements ExtensionProvider<T> {
|
|
3
|
+
private manifestsPromise;
|
|
4
|
+
private autoConvertHandlers?;
|
|
5
|
+
constructor(manifests: ExtensionManifest<T>[] | Promise<ExtensionManifest<T>[]>,
|
|
6
|
+
/**
|
|
7
|
+
* Allows for an optional list of pre compiled auto convert handlers to be passed.
|
|
8
|
+
* Useful for performance improvements or to support legacy converters.
|
|
9
|
+
*
|
|
10
|
+
* Warning: If this attribute is passed, this provider will ignore auto convert patterns from the manifests.
|
|
11
|
+
*/
|
|
12
|
+
autoConvertHandlers?: ExtensionAutoConvertHandler[]);
|
|
13
|
+
getExtensions(): Promise<ExtensionManifest<T>[]>;
|
|
14
|
+
getExtension(type: ExtensionType, key: ExtensionKey): Promise<ExtensionManifest<T>>;
|
|
15
|
+
search(keyword: string): Promise<ExtensionManifest<T>[]>;
|
|
16
|
+
getAutoConverter(): Promise<ExtensionAutoConvertHandler[]>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CustomFieldResolver, Deserializer, ExtensionManifest, Serializer, UserFieldContextProvider } from './types/extension-manifest';
|
|
2
|
+
import { FieldHandlerLink } from './types/field-definitions';
|
|
3
|
+
/** attempt to get the custom resolver for this field, or throw */
|
|
4
|
+
export declare function getCustomFieldResolver(manifest: ExtensionManifest, handlerLink: FieldHandlerLink): Promise<CustomFieldResolver>;
|
|
5
|
+
/** attempt to get the serializer for this field, or throw */
|
|
6
|
+
export declare function getFieldSerializer(manifest: ExtensionManifest, handlerLink: FieldHandlerLink): Promise<Serializer | undefined>;
|
|
7
|
+
/** attempt to get the deserializer for this field, or throw */
|
|
8
|
+
export declare function getFieldDeserializer(manifest: ExtensionManifest, handlerLink: FieldHandlerLink): Promise<Deserializer | undefined>;
|
|
9
|
+
/** attempt to get the user field context provider for this field, or throw */
|
|
10
|
+
export declare function getUserFieldContextProvider(manifest: ExtensionManifest, handlerLink: FieldHandlerLink): Promise<UserFieldContextProvider>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Loadable from 'react-loadable';
|
|
3
|
+
import { ExtensionKey, ExtensionParams, ExtensionProvider, ExtensionType, Parameters } from './types';
|
|
4
|
+
import { ReferenceEntity } from './types/extension-handler';
|
|
5
|
+
export declare function getExtensionModuleNode(extensionProvider: ExtensionProvider, extensionType: ExtensionType, extensionKey: ExtensionKey): Promise<import("./types").ExtensionModuleNode<any>>;
|
|
6
|
+
/**
|
|
7
|
+
* Gets `__` prefixed properties from an extension node module definition
|
|
8
|
+
*/
|
|
9
|
+
export declare function getExtensionModuleNodePrivateProps(extensionProvider: ExtensionProvider, extensionType: ExtensionType, extensionKey: ExtensionKey): Promise<any>;
|
|
10
|
+
export declare function getNodeRenderer<T extends Parameters>(extensionProvider: ExtensionProvider, extensionType: ExtensionType, extensionKey: ExtensionKey): React.ComponentType<{
|
|
11
|
+
node: ExtensionParams<T>;
|
|
12
|
+
references?: ReferenceEntity[] | undefined;
|
|
13
|
+
}> & Loadable.LoadableComponent;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { isFieldset, isTabGroup, isTabField, isExpand, isDateRange, } from './types';
|
|
2
|
+
export type { Extension, ExtensionAutoConvertHandler, ExtensionComponentProps, ExtensionHandler, ExtensionHandlers, ExtensionKey, ExtensionManifest, ExtensionModule, ExtensionModuleAction, ExtensionModuleActionHandler, ExtensionModuleActionObject, ExtensionModuleNode, ExtensionModuleNodes, ExtensionModules, ExtensionParams, ExtensionProvider, ExtensionQuickInsertModule, ExtensionType, ExtensionToolbarButton, ContextualToolbar, ToolbarItem, Icon, MaybeADFEntity, MenuItem, MenuItemMap, UpdateExtension, Parameters, ParametersWithDuplicateFields, BooleanField, CustomField, CustomFieldResolver, UserFieldContext, UserField, UserFieldContextProvider, ColorField, DateField, DateRangeField, DateRangeResult, EnumField, EnumCheckboxField, EnumRadioField, EnumSelectField, ExpandField, FieldDefinition, DynamicFieldDefinitions, Fieldset, GroupingField, NativeField, NestedFieldDefinition, NumberField, Option, StringField, StringOneLineField, StringMultilineField, TabGroupField, TabField, FieldHandlerLink, OnSaveCallback, ExtensionAPI, TransformBefore, TransformAfter, ReferenceEntity, ParametersGetter, AsyncParametersGetter, } from './types';
|
|
3
|
+
export { getExtensionKeyAndNodeKey, resolveImport } from './manifest-helpers';
|
|
4
|
+
export { default as DefaultExtensionProvider } from './default-extension-provider';
|
|
5
|
+
export { createAutoConverterRunner, getExtensionAutoConvertersFromProvider, getQuickInsertItemsFromModule, getContextualToolbarItemsFromModule, buildMenuItem, } from './module-helpers';
|
|
6
|
+
export { getExtensionModuleNode, getExtensionModuleNodePrivateProps, getNodeRenderer, } from './extension-handlers';
|
|
7
|
+
export { default as combineExtensionProviders } from './combine-extension-providers';
|
|
8
|
+
export { getCustomFieldResolver, getUserFieldContextProvider, getFieldSerializer, getFieldDeserializer, } from './extension-fields-helpers';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ADFEntity } from '@atlaskit/adf-utils/types';
|
|
2
|
+
import { ExtensionKey, ExtensionManifest, ExtensionModuleAction, ExtensionModuleActionObject, ExtensionModuleKey, ExtensionType, Module } from './types/extension-manifest';
|
|
3
|
+
import { Parameters } from './types/extension-parameters';
|
|
4
|
+
export declare const FORGE_EXTENSION_TYPE = "com.atlassian.ecosystem";
|
|
5
|
+
export declare const getExtensionKeyAndNodeKey: (extensionKey: ExtensionKey, extensionType: ExtensionType) => string[];
|
|
6
|
+
export declare const buildExtensionKeyAndNodeKey: (extensionKey: ExtensionKey, nodeKey?: ExtensionModuleKey) => string;
|
|
7
|
+
export declare function buildAction<T extends Parameters>(action: ExtensionModuleAction<T>, manifest: ExtensionManifest<T>): ADFEntity | import("./types/extension-manifest").ExtensionModuleActionHandler | undefined;
|
|
8
|
+
export declare const resolveImport: <T extends Parameters>(importPromise: Module<T>) => Promise<T>;
|
|
9
|
+
export declare function buildNode<T extends Parameters>(action: ExtensionModuleActionObject<T>, manifest: ExtensionManifest<T>): ADFEntity | undefined;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ADFEntity } from '@atlaskit/adf-utils/types';
|
|
2
|
+
import type { ExtensionAPI, ExtensionAutoConvertHandler, ExtensionManifest, ExtensionModule, ExtensionProvider, ExtensionToolbarButton, MenuItem, Parameters } from './types';
|
|
3
|
+
export declare const groupBy: <T>(arr: T[], attr: keyof T, keyRenamer: (key: T[keyof T]) => string) => {
|
|
4
|
+
[k: string]: T;
|
|
5
|
+
};
|
|
6
|
+
export declare function buildMenuItem<T extends Parameters>(manifest: ExtensionManifest<T>, extensionModule: ExtensionModule<T>): MenuItem;
|
|
7
|
+
export declare const getQuickInsertItemsFromModule: <T extends Parameters>(extensions: ExtensionManifest<T>[], transformFunction: (value: MenuItem, index: number) => T) => T[];
|
|
8
|
+
export declare function getAutoConvertPatternsFromModule<T extends Parameters>(extensions: ExtensionManifest<T>[]): Promise<ExtensionAutoConvertHandler[]>;
|
|
9
|
+
export declare const createAutoConverterRunner: (autoConvertHandlers: ExtensionAutoConvertHandler[]) => ExtensionAutoConvertHandler;
|
|
10
|
+
export declare function getExtensionAutoConvertersFromProvider(extensionProviderPromise: Promise<ExtensionProvider>): Promise<ExtensionAutoConvertHandler>;
|
|
11
|
+
export declare const getContextualToolbarItemsFromModule: (extensions: ExtensionManifest[], node: ADFEntity, api: ExtensionAPI) => ExtensionToolbarButton[];
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ADFEntity } from '@atlaskit/adf-utils/types';
|
|
3
|
+
import { Parameters } from './extension-parameters';
|
|
4
|
+
export interface ExtensionParams<T extends Parameters> {
|
|
5
|
+
extensionKey: string;
|
|
6
|
+
extensionType: string;
|
|
7
|
+
type?: 'extension' | 'inlineExtension' | 'bodiedExtension';
|
|
8
|
+
parameters?: T;
|
|
9
|
+
content?: object | string;
|
|
10
|
+
localId?: string;
|
|
11
|
+
fragmentLocalId?: string;
|
|
12
|
+
}
|
|
13
|
+
export type ExtensionHandler<T extends Parameters = Parameters> = (ext: ExtensionParams<T>, doc: object) => JSX.Element | null;
|
|
14
|
+
export type OnSaveCallback<T extends Parameters = Parameters> = (params: T) => void;
|
|
15
|
+
export type TransformBefore<T extends Parameters = Parameters> = (data: T) => any;
|
|
16
|
+
export type TransformAfter<T extends Parameters = Parameters> = (data: any) => Promise<Partial<T>>;
|
|
17
|
+
export type ExtensionAPI<T extends Parameters = Parameters> = {
|
|
18
|
+
editInContextPanel: (transformBefore: TransformBefore<T>, transformAfter: TransformAfter<T>) => void;
|
|
19
|
+
_editInLegacyMacroBrowser: () => void;
|
|
20
|
+
doc: {
|
|
21
|
+
insertAfter: (localId: string, adf: ADFEntity, options?: {
|
|
22
|
+
allowSelectionToNewNode?: boolean;
|
|
23
|
+
}) => void;
|
|
24
|
+
scrollTo: (localId: string) => void;
|
|
25
|
+
update: (localId: string, mutationCallback: (currentValue: Pick<ADFEntity, 'content' | 'attrs' | 'marks'>) => Pick<ADFEntity, 'content' | 'attrs' | 'marks'>) => void;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
export type UpdateExtension<T extends Parameters = Parameters> = (extensionParameters: T, actions?: ExtensionAPI<T>) => Promise<T | void>;
|
|
29
|
+
export interface Extension<T extends Parameters = Parameters> {
|
|
30
|
+
render: ExtensionHandler<T>;
|
|
31
|
+
update?: UpdateExtension<T>;
|
|
32
|
+
}
|
|
33
|
+
export interface ExtensionHandlers<T extends Parameters = any> {
|
|
34
|
+
[key: string]: Extension<T> | ExtensionHandler<T>;
|
|
35
|
+
}
|
|
36
|
+
export type ReferenceEntity = {
|
|
37
|
+
[prop: string]: ADFEntity | Object;
|
|
38
|
+
};
|
|
39
|
+
export type ParametersGetter<T extends Parameters = Parameters> = TransformBefore<T>;
|
|
40
|
+
export type AsyncParametersGetter<T extends Parameters = Parameters> = TransformAfter<T>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
export type ESModule<T> = {
|
|
3
|
+
__esModule?: boolean;
|
|
4
|
+
default: T;
|
|
5
|
+
};
|
|
6
|
+
export type MaybeESModule<T> = ESModule<T> | T;
|
|
7
|
+
export type ExtensionIcon = ComponentType<any>;
|
|
8
|
+
export type ExtensionIconModule = Promise<MaybeESModule<ExtensionIcon>>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { ADFEntity } from '@atlaskit/adf-utils/types';
|
|
2
|
+
import { ExtensionAPI } from './extension-handler';
|
|
3
|
+
import { ExtensionIconModule } from './extension-manifest-common';
|
|
4
|
+
export type ToolbarButtonAction = (contextNode: ADFEntity, api: ExtensionAPI) => Promise<void>;
|
|
5
|
+
export type ToolbarButton = ExtensionModuleToolbarButtonLabelOrIcon & {
|
|
6
|
+
key: string;
|
|
7
|
+
action: ToolbarButtonAction;
|
|
8
|
+
label: string;
|
|
9
|
+
tooltip?: string;
|
|
10
|
+
icon?: () => ExtensionIconModule;
|
|
11
|
+
display?: 'icon' | 'label' | 'icon-and-label';
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
};
|
|
14
|
+
export type ToolbarItem = ToolbarButton;
|
|
15
|
+
export type ToolbarContext = ExtensionNodeContext | StandardNodeContext;
|
|
16
|
+
export type ContextualToolbar = {
|
|
17
|
+
context: ToolbarContext;
|
|
18
|
+
toolbarItems: ToolbarItem[] | ((contextNode: ADFEntity, api: ExtensionAPI) => ToolbarItem[]);
|
|
19
|
+
};
|
|
20
|
+
export type ExtensionModuleToolbarButtonLabelOrIcon = ExtensionModuleToolbarButtonWithIcon | ExtensionModuleToolbarButtonWithLabel;
|
|
21
|
+
export type ExtensionModuleToolbarButtonWithIcon = {
|
|
22
|
+
icon: () => ExtensionIconModule;
|
|
23
|
+
display?: 'icon' | 'icon-and-label';
|
|
24
|
+
};
|
|
25
|
+
export type ExtensionModuleToolbarButtonWithLabel = {
|
|
26
|
+
display?: 'label';
|
|
27
|
+
};
|
|
28
|
+
export type ExtensionNodeContext = {
|
|
29
|
+
type: 'extension';
|
|
30
|
+
nodeType: 'extension' | 'inlineExtension' | 'bodiedExtension';
|
|
31
|
+
extensionKey: string | string[];
|
|
32
|
+
extensionType?: string;
|
|
33
|
+
};
|
|
34
|
+
export type StandardNodeContext = {
|
|
35
|
+
type: 'node';
|
|
36
|
+
nodeType: 'table';
|
|
37
|
+
};
|
|
38
|
+
export type ExtensionToolbarButton = {
|
|
39
|
+
key: string;
|
|
40
|
+
label?: string;
|
|
41
|
+
tooltip?: string;
|
|
42
|
+
icon?: () => ExtensionIconModule;
|
|
43
|
+
action: ToolbarButtonAction;
|
|
44
|
+
disabled?: boolean;
|
|
45
|
+
};
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
import type { ADFEntity } from '@atlaskit/adf-utils/types';
|
|
3
|
+
import { ExtensionParams, UpdateExtension } from './extension-handler';
|
|
4
|
+
import { ExtensionIconModule, MaybeESModule } from './extension-manifest-common';
|
|
5
|
+
import { ContextualToolbar } from './extension-manifest-toolbar-item';
|
|
6
|
+
import { Parameters } from './extension-parameters';
|
|
7
|
+
import { FieldDefinition, Option, UserFieldContext } from './field-definitions';
|
|
8
|
+
export type ExtensionType = string;
|
|
9
|
+
export type ExtensionKey = string;
|
|
10
|
+
export type ExtensionModuleKey = string;
|
|
11
|
+
export type ExtensionComponentProps<T extends Parameters = Parameters> = {
|
|
12
|
+
node: ExtensionParams<T>;
|
|
13
|
+
[key: string]: any;
|
|
14
|
+
};
|
|
15
|
+
export type ExtensionComponent<T extends Parameters> = ComponentType<ExtensionComponentProps<T>>;
|
|
16
|
+
export type ExtensionComponentModule<T extends Parameters> = Promise<MaybeESModule<ExtensionComponent<T>>>;
|
|
17
|
+
export type Serializer<T extends Parameters = Parameters> = (data: T) => string;
|
|
18
|
+
export type Deserializer<T extends Parameters = Parameters> = (value: string) => T;
|
|
19
|
+
export type ExtensionModuleActionObject<T extends Parameters = Parameters> = {
|
|
20
|
+
key: ExtensionModuleKey;
|
|
21
|
+
type: 'node';
|
|
22
|
+
parameters?: T;
|
|
23
|
+
};
|
|
24
|
+
export type MaybeADFEntity = MaybeESModule<ADFEntity | Array<ADFEntity> | void>;
|
|
25
|
+
export type ExtensionModuleActionHandler = () => Promise<MaybeADFEntity>;
|
|
26
|
+
export type ExtensionModuleAction<T extends Parameters = Parameters> = ExtensionModuleActionObject<T> | ExtensionModuleActionHandler;
|
|
27
|
+
export type ExtensionModule<T extends Parameters = Parameters> = {
|
|
28
|
+
key: string;
|
|
29
|
+
title?: string;
|
|
30
|
+
description?: string;
|
|
31
|
+
icon?: () => ExtensionIconModule;
|
|
32
|
+
priority?: number;
|
|
33
|
+
featured?: boolean;
|
|
34
|
+
keywords?: string[];
|
|
35
|
+
categories?: string[];
|
|
36
|
+
action: ExtensionModuleAction<T>;
|
|
37
|
+
parameters?: T;
|
|
38
|
+
};
|
|
39
|
+
export type DynamicFieldDefinitions<T> = (parameters: T) => FieldDefinition[];
|
|
40
|
+
export type ExtensionModuleNode<T extends Parameters = Parameters> = {
|
|
41
|
+
type: 'extension' | 'inlineExtension' | 'bodiedExtension';
|
|
42
|
+
render: () => ExtensionComponentModule<T>;
|
|
43
|
+
update?: UpdateExtension<T>;
|
|
44
|
+
getFieldsDefinition?: (extensionParameters: T) => Promise<FieldDefinition[] | DynamicFieldDefinitions<T>>;
|
|
45
|
+
};
|
|
46
|
+
export type ExtensionModuleNodes<T extends Parameters = Parameters> = {
|
|
47
|
+
[key: string]: ExtensionModuleNode<T>;
|
|
48
|
+
};
|
|
49
|
+
export type ExtensionAutoConvertHandler = (text: string) => ADFEntity | undefined;
|
|
50
|
+
export type ExtensionModuleAutoConvert = {
|
|
51
|
+
url?: ExtensionAutoConvertHandler[];
|
|
52
|
+
};
|
|
53
|
+
export type CustomFieldResolver = (searchTerm?: string, defaultValue?: string | string[], parameters?: Parameters) => Promise<Option[]>;
|
|
54
|
+
export type UserFieldContextProvider = () => Promise<UserFieldContext>;
|
|
55
|
+
export type ExtensionModuleFieldTypeCustom = {
|
|
56
|
+
resolver: CustomFieldResolver;
|
|
57
|
+
};
|
|
58
|
+
export type ExtensionModuleFieldTypeUser = {
|
|
59
|
+
provider: UserFieldContextProvider;
|
|
60
|
+
};
|
|
61
|
+
export type ExtensionModuleFieldTypeFieldset<T extends Parameters = Parameters> = {
|
|
62
|
+
serializer?: Serializer<T>;
|
|
63
|
+
deserializer?: Deserializer<T>;
|
|
64
|
+
};
|
|
65
|
+
export type ExtensionModuleFields<T extends Parameters = Parameters> = {
|
|
66
|
+
custom?: {
|
|
67
|
+
[key: string]: ExtensionModuleFieldTypeCustom;
|
|
68
|
+
};
|
|
69
|
+
fieldset?: {
|
|
70
|
+
[key: string]: ExtensionModuleFieldTypeFieldset<T>;
|
|
71
|
+
};
|
|
72
|
+
user?: {
|
|
73
|
+
[key: string]: ExtensionModuleFieldTypeUser;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
export type ExtensionModules<T extends Parameters = Parameters> = {
|
|
77
|
+
quickInsert?: ExtensionModule<T>[];
|
|
78
|
+
nodes?: ExtensionModuleNodes<T>;
|
|
79
|
+
fields?: ExtensionModuleFields<T>;
|
|
80
|
+
autoConvert?: ExtensionModuleAutoConvert;
|
|
81
|
+
contextualToolbars?: ContextualToolbar[];
|
|
82
|
+
};
|
|
83
|
+
export type ExtensionQuickInsertModule = 'quickInsert';
|
|
84
|
+
export type ExtensionModuleType<T extends Parameters = Parameters> = Exclude<keyof ExtensionModules<T>, 'nodes' | 'fields'>;
|
|
85
|
+
export type ExtensionManifest<T extends Parameters = Parameters> = {
|
|
86
|
+
type: ExtensionType;
|
|
87
|
+
key: ExtensionKey;
|
|
88
|
+
title: string;
|
|
89
|
+
description?: string;
|
|
90
|
+
summary?: string;
|
|
91
|
+
categories?: string[];
|
|
92
|
+
keywords?: string[];
|
|
93
|
+
documentationUrl?: string;
|
|
94
|
+
icons: {
|
|
95
|
+
'48': () => ExtensionIconModule;
|
|
96
|
+
[dimensions: string]: () => ExtensionIconModule;
|
|
97
|
+
};
|
|
98
|
+
modules: ExtensionModules<T>;
|
|
99
|
+
};
|
|
100
|
+
export type Icon = () => ExtensionIconModule;
|
|
101
|
+
export type Module<T extends Parameters> = MaybeESModule<T>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ExtensionAutoConvertHandler, ExtensionKey, ExtensionManifest, ExtensionType } from './extension-manifest';
|
|
2
|
+
import { Parameters } from './extension-parameters';
|
|
3
|
+
export interface ExtensionProvider<T extends Parameters = any> {
|
|
4
|
+
getExtensions(): Promise<ExtensionManifest<T>[]>;
|
|
5
|
+
getExtension(type: ExtensionType, key: ExtensionKey): Promise<ExtensionManifest<T> | undefined>;
|
|
6
|
+
search(keyword: string): Promise<ExtensionManifest<T>[]>;
|
|
7
|
+
getAutoConverter(): Promise<ExtensionAutoConvertHandler[]>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export type Option = {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
/**
|
|
7
|
+
* If a string is passed, we use a image tag to create an icon.
|
|
8
|
+
* If a react component is passed, we render as is.
|
|
9
|
+
* The recommendation is to pass a 16x16 icon if no description is provided, or 24x24 if provided.
|
|
10
|
+
* We can't enforce the size if a React component is passed so it's on the consumer to make the appropriate choice.
|
|
11
|
+
*/
|
|
12
|
+
icon?: string | React.ReactNode;
|
|
13
|
+
};
|
|
14
|
+
import { Props as SmartUserPickerProps } from '@atlaskit/smart-user-picker';
|
|
15
|
+
export type UserFieldContext = Pick<SmartUserPickerProps, 'siteId' | 'principalId' | 'fieldId' | 'productKey' | 'containerId' | 'objectId' | 'childObjectId' | 'productAttributes' | 'includeUsers'>;
|
|
16
|
+
interface BaseFieldDefinition {
|
|
17
|
+
description?: string;
|
|
18
|
+
label: string;
|
|
19
|
+
name: string;
|
|
20
|
+
isRequired?: boolean;
|
|
21
|
+
allowDuplicates?: boolean;
|
|
22
|
+
isHidden?: boolean;
|
|
23
|
+
}
|
|
24
|
+
interface BaseEnumField extends BaseFieldDefinition {
|
|
25
|
+
type: 'enum';
|
|
26
|
+
items: Option[];
|
|
27
|
+
}
|
|
28
|
+
export interface EnumSingleSelectField extends BaseEnumField {
|
|
29
|
+
style: 'select';
|
|
30
|
+
isMultiple?: false;
|
|
31
|
+
defaultValue?: string;
|
|
32
|
+
placeholder?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface EnumRadioFieldBase extends BaseEnumField {
|
|
35
|
+
style: 'radio';
|
|
36
|
+
isMultiple?: false;
|
|
37
|
+
}
|
|
38
|
+
export interface EnumRadioFieldDefaulted extends EnumRadioFieldBase {
|
|
39
|
+
isRequired?: false;
|
|
40
|
+
defaultValue: string;
|
|
41
|
+
}
|
|
42
|
+
export interface EnumRadioFieldRequired extends EnumRadioFieldBase {
|
|
43
|
+
isRequired: true;
|
|
44
|
+
defaultValue?: string;
|
|
45
|
+
}
|
|
46
|
+
export type EnumRadioField = EnumRadioFieldDefaulted | EnumRadioFieldRequired;
|
|
47
|
+
export interface EnumMultipleSelectField extends BaseEnumField {
|
|
48
|
+
style: 'select';
|
|
49
|
+
isMultiple: true;
|
|
50
|
+
defaultValue?: string[];
|
|
51
|
+
placeholder?: string;
|
|
52
|
+
}
|
|
53
|
+
export interface EnumCheckboxField extends BaseEnumField {
|
|
54
|
+
style: 'checkbox';
|
|
55
|
+
isMultiple: true;
|
|
56
|
+
defaultValue?: string[];
|
|
57
|
+
}
|
|
58
|
+
export type EnumSelectField = EnumSingleSelectField | EnumMultipleSelectField;
|
|
59
|
+
export type EnumField = EnumSelectField | EnumRadioField | EnumCheckboxField;
|
|
60
|
+
export interface StringOneLineField extends BaseFieldDefinition {
|
|
61
|
+
type: 'string';
|
|
62
|
+
style?: 'oneline';
|
|
63
|
+
defaultValue?: string;
|
|
64
|
+
placeholder?: string;
|
|
65
|
+
}
|
|
66
|
+
export interface StringMultilineField extends BaseFieldDefinition {
|
|
67
|
+
type: 'string';
|
|
68
|
+
style: 'multiline';
|
|
69
|
+
defaultValue?: string;
|
|
70
|
+
placeholder?: string;
|
|
71
|
+
options?: {
|
|
72
|
+
minimumRows: number;
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
export type StringField = StringOneLineField | StringMultilineField;
|
|
76
|
+
export interface NumberField extends BaseFieldDefinition {
|
|
77
|
+
type: 'number';
|
|
78
|
+
defaultValue?: number;
|
|
79
|
+
placeholder?: string;
|
|
80
|
+
}
|
|
81
|
+
export interface BooleanField extends BaseFieldDefinition {
|
|
82
|
+
type: 'boolean';
|
|
83
|
+
defaultValue?: boolean;
|
|
84
|
+
style?: 'checkbox' | 'toggle';
|
|
85
|
+
}
|
|
86
|
+
export interface ColorField extends BaseFieldDefinition {
|
|
87
|
+
type: 'color';
|
|
88
|
+
defaultValue?: string;
|
|
89
|
+
}
|
|
90
|
+
export interface DateField extends BaseFieldDefinition {
|
|
91
|
+
type: 'date';
|
|
92
|
+
defaultValue?: string;
|
|
93
|
+
placeholder?: string;
|
|
94
|
+
}
|
|
95
|
+
export interface DateRangeField extends BaseFieldDefinition {
|
|
96
|
+
type: 'date-range';
|
|
97
|
+
defaultValue?: DateRangeResult;
|
|
98
|
+
items: Option[];
|
|
99
|
+
}
|
|
100
|
+
export interface DateRangeResult {
|
|
101
|
+
type: 'date-range';
|
|
102
|
+
value: 'custom' | any;
|
|
103
|
+
from?: string;
|
|
104
|
+
to?: string;
|
|
105
|
+
}
|
|
106
|
+
export type FieldHandlerLink = {
|
|
107
|
+
type: string;
|
|
108
|
+
};
|
|
109
|
+
interface BaseCustomField extends BaseFieldDefinition {
|
|
110
|
+
type: 'custom';
|
|
111
|
+
style?: 'select';
|
|
112
|
+
options: {
|
|
113
|
+
isCreatable?: boolean;
|
|
114
|
+
resolver: FieldHandlerLink;
|
|
115
|
+
};
|
|
116
|
+
placeholder?: string;
|
|
117
|
+
}
|
|
118
|
+
export interface CustomSingleField extends BaseCustomField {
|
|
119
|
+
isMultiple?: false;
|
|
120
|
+
defaultValue?: string;
|
|
121
|
+
}
|
|
122
|
+
export interface CustomMultipleField extends BaseCustomField {
|
|
123
|
+
isMultiple: true;
|
|
124
|
+
defaultValue?: string[];
|
|
125
|
+
}
|
|
126
|
+
export interface UserField extends BaseFieldDefinition {
|
|
127
|
+
type: 'user';
|
|
128
|
+
defaultValue?: string | string[] | null | undefined;
|
|
129
|
+
placeholder?: string;
|
|
130
|
+
isMultiple?: boolean;
|
|
131
|
+
options: {
|
|
132
|
+
provider: FieldHandlerLink;
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
export type CustomField = CustomSingleField | CustomMultipleField;
|
|
136
|
+
export type NativeField = EnumField | StringField | NumberField | BooleanField | ColorField | DateField | DateRangeField;
|
|
137
|
+
export type NestedFieldDefinition = NativeField | CustomField | UserField;
|
|
138
|
+
export interface Fieldset extends BaseFieldDefinition {
|
|
139
|
+
type: 'fieldset';
|
|
140
|
+
fields: NestedFieldDefinition[];
|
|
141
|
+
options: {
|
|
142
|
+
isDynamic?: boolean;
|
|
143
|
+
transformer: FieldHandlerLink;
|
|
144
|
+
showTitle?: boolean;
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
export type FieldDefinition = NestedFieldDefinition | Fieldset | GroupingField;
|
|
148
|
+
export declare const isFieldset: (field: FieldDefinition) => field is Fieldset;
|
|
149
|
+
export declare const isTabGroup: (field: FieldDefinition) => field is TabGroupField;
|
|
150
|
+
export declare const isTabField: (field: any) => field is TabField;
|
|
151
|
+
export declare const isExpand: (field: FieldDefinition) => field is ExpandField;
|
|
152
|
+
export declare const isDateRange: (value: any) => value is DateRangeResult;
|
|
153
|
+
export interface GroupedField extends BaseFieldDefinition {
|
|
154
|
+
fields: NestedFieldDefinition[];
|
|
155
|
+
hasGroupedValues?: boolean;
|
|
156
|
+
}
|
|
157
|
+
export interface ExpandField extends GroupedField {
|
|
158
|
+
type: 'expand';
|
|
159
|
+
isExpanded?: boolean;
|
|
160
|
+
}
|
|
161
|
+
export interface TabGroupField extends Omit<GroupedField, 'fields'> {
|
|
162
|
+
type: 'tab-group';
|
|
163
|
+
defaultTab?: string;
|
|
164
|
+
fields: TabField[];
|
|
165
|
+
}
|
|
166
|
+
export interface TabField extends Omit<GroupedField, 'fields'> {
|
|
167
|
+
type: 'tab';
|
|
168
|
+
fields: (NestedFieldDefinition | ExpandField)[];
|
|
169
|
+
}
|
|
170
|
+
export type GroupingField = ExpandField | TabGroupField;
|
|
171
|
+
export {};
|