@atlaskit/editor-common 97.1.2 → 97.1.3
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 +8 -0
- package/dist/cjs/analytics/analytics-queue.js +8 -0
- package/dist/cjs/analytics/linking-utils.js +2 -0
- package/dist/cjs/card/LinkToolbarButtonGroup.js +2 -0
- package/dist/cjs/card/MediaAndEmbedsToolbar/index.js +15 -3
- package/dist/cjs/card/ui/assets/card.js +4 -0
- package/dist/cjs/card/ui/assets/embed.js +4 -0
- package/dist/cjs/card/ui/assets/inline.js +4 -0
- package/dist/cjs/card/ui/assets/url.js +4 -0
- package/dist/cjs/clipboard/index.js +12 -1
- package/dist/cjs/collab/index.js +2 -0
- package/dist/cjs/commands/index.js +50 -42
- package/dist/cjs/commands/insert-block.js +10 -2
- package/dist/cjs/core-utils/document-logger.js +4 -0
- package/dist/cjs/doc-utils/editor-use-only.js +8 -3
- package/dist/cjs/element-browser/ElementBrowser.js +2 -0
- package/dist/cjs/element-browser/ViewMore.js +8 -2
- package/dist/cjs/element-browser/components/CategoryList.js +2 -0
- package/dist/cjs/element-browser/components/ElementList/ElementList.js +12 -0
- package/dist/cjs/element-browser/components/StatelessElementBrowser.js +8 -2
- package/dist/cjs/element-browser/hooks/use-select-and-focus-on-arrow-navigation.js +13 -2
- package/dist/cjs/event-dispatcher/index.js +6 -0
- package/dist/cjs/extensibility/Extension/Extension/index.js +2 -0
- package/dist/cjs/extensibility/Extension/Lozenge/ExtensionLabel.js +10 -2
- package/dist/cjs/extensibility/Extension/Lozenge/index.js +3 -1
- package/dist/cjs/extensibility/Extension.js +2 -0
- package/dist/cjs/extensibility/ExtensionComponent.js +17 -2
- package/dist/cjs/extensibility/MultiBodiedExtension/index.js +4 -0
- package/dist/cjs/extensibility/extensionNodeView.js +2 -1
- package/dist/cjs/extensions/extension-fields-helpers.js +4 -1
- package/dist/cjs/extensions/extension-handlers.js +4 -0
- package/dist/cjs/extensions/module-helpers.js +14 -6
- package/dist/cjs/extensions/types/field-definitions.js +5 -0
- package/dist/cjs/floating-toolbar/index.js +18 -2
- package/dist/cjs/guideline/dynamicGuideline.js +4 -1
- package/dist/cjs/guideline/relativeGuideline.js +12 -3
- package/dist/cjs/guideline/updateGuideline.js +4 -1
- package/dist/cjs/hooks/usePluginStateEffect.js +3 -0
- package/dist/cjs/hooks/useSharedPluginState.js +3 -0
- package/dist/cjs/hooks/useSharedPluginStateSelector/useSharedPluginStateSelector.js +3 -0
- package/dist/cjs/icons/shared/BorderIcon.js +4 -0
- package/dist/cjs/icons/shared/PanelErrorIcon.js +4 -0
- package/dist/cjs/icons/shared/PanelInfoIcon.js +4 -0
- package/dist/cjs/icons/shared/PanelNoteIcon.js +4 -0
- package/dist/cjs/icons/shared/PanelSuccessIcon.js +4 -0
- package/dist/cjs/icons/shared/PanelWarningIcon.js +4 -0
- package/dist/cjs/insert/index.js +6 -1
- package/dist/cjs/keymaps/index.js +48 -5
- package/dist/cjs/keymaps/keymap.js +4 -0
- package/dist/cjs/lazy-node-view/css-helper.js +4 -0
- package/dist/cjs/lazy-node-view/index.js +6 -1
- package/dist/cjs/lazy-node-view/node-view.js +2 -0
- package/dist/cjs/link/ConfigureLinkOverlay/Dropdown.js +2 -0
- package/dist/cjs/link/ConfigureLinkOverlay/StyledButton.js +4 -1
- package/dist/cjs/link/LinkPicker/EditorLinkPicker/index.js +4 -1
- package/dist/cjs/link/LinkPicker/EditorLinkPicker/useEscapeClickaway.js +9 -0
- package/dist/cjs/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +16 -1
- package/dist/cjs/link/LinkPicker/HyperlinkAddToolbar/index.js +2 -0
- package/dist/cjs/link/LinkSearch/LinkSearchList.js +2 -0
- package/dist/cjs/link/LinkSearch/LinkSearchListItem.js +2 -0
- package/dist/cjs/link/LinkSearch/index.js +9 -1
- package/dist/cjs/link/LinkSearch/withActivityProvider.js +3 -0
- package/dist/cjs/lists/analytics.js +2 -0
- package/dist/cjs/mark/commands.js +24 -3
- package/dist/cjs/media-inline/inline-image-wrapper.js +2 -0
- package/dist/cjs/media-single/MediaBadges.js +2 -0
- package/dist/cjs/media-single/utils.js +5 -0
- package/dist/cjs/monitoring/environment.js +6 -1
- package/dist/cjs/monitoring/error.js +19 -3
- package/dist/cjs/node-width/index.js +6 -1
- package/dist/cjs/normalize-feature-flags.js +4 -1
- package/dist/cjs/paste/clipboard.js +2 -0
- package/dist/cjs/paste/md-plugins/ignore-list-heading-md-plugin.js +5 -0
- package/dist/cjs/paste/md-plugins/linkify-md-plugin.js +20 -0
- package/dist/cjs/paste/md-plugins/newline-md-plugin.js +5 -0
- package/dist/cjs/paste/md-plugins/paragraph-md-plugin.js +5 -0
- package/dist/cjs/portal/common.js +4 -1
- package/dist/cjs/preset/builder.js +8 -0
- package/dist/cjs/preset/core-plugin/index.js +5 -0
- package/dist/cjs/preset/core-plugin/requestDocument.js +3 -0
- package/dist/cjs/preset/plugin-injection-api.js +61 -6
- package/dist/cjs/provider-factory/provider-factory.js +8 -1
- package/dist/cjs/provider-factory/with-providers.js +12 -0
- package/dist/cjs/provider-helpers/combine-providers.js +7 -0
- package/dist/cjs/provider-helpers/promise-helpers.js +3 -0
- package/dist/cjs/quick-insert/assets/index.js +2 -0
- package/dist/cjs/react-node-view/getInlineNodeViewProducer.js +4 -0
- package/dist/cjs/react-node-view/index.js +33 -2
- package/dist/cjs/resizer/BreakoutResizer.js +0 -6
- package/dist/cjs/resizer/Resizer.js +10 -2
- package/dist/cjs/safe-plugin/index.js +3 -0
- package/dist/cjs/selection/gap-cursor/actions.js +11 -2
- package/dist/cjs/selection/gap-cursor/selection.js +8 -0
- package/dist/cjs/selection/index.js +2 -0
- package/dist/cjs/selection-based-node-view/SelectionBasedNodeView.js +10 -1
- package/dist/cjs/styles/shared/lists.js +4 -1
- package/dist/cjs/transforms/code-block.js +6 -0
- package/dist/cjs/transforms/extension.js +14 -2
- package/dist/cjs/transforms/layout.js +6 -0
- package/dist/cjs/types/annotation/emitter.js +8 -2
- package/dist/cjs/types/index.js +3 -1
- package/dist/cjs/ui/Caption/index.js +4 -0
- package/dist/cjs/ui/ContextPanel/context.js +4 -0
- package/dist/cjs/ui/DropList/index.js +11 -1
- package/dist/cjs/ui/Emoji/index.js +2 -0
- package/dist/cjs/ui/ErrorBoundary/index.js +2 -0
- package/dist/cjs/ui/Expand/index.js +13 -6
- package/dist/cjs/ui/FloatingToolbar/Button.js +2 -0
- package/dist/cjs/ui/FloatingToolbar/ButtonSpotlightCard.js +4 -1
- package/dist/cjs/ui/FloatingToolbar/styles.js +3 -0
- package/dist/cjs/ui/IntlErrorBoundary/index.js +3 -0
- package/dist/cjs/ui/Layer/index.js +8 -0
- package/dist/cjs/ui/MediaSingle/grid.js +12 -2
- package/dist/cjs/ui/MediaSingle/index.js +2 -0
- package/dist/cjs/ui/MediaSingle/styled.js +6 -0
- package/dist/cjs/ui/Mention/mention-with-profilecard.js +4 -1
- package/dist/cjs/ui/Mention/mention-with-providers.js +20 -3
- package/dist/cjs/ui/OverflowShadow/index.js +18 -4
- package/dist/cjs/ui/OverflowShadow/shadowObserver.js +12 -2
- package/dist/cjs/ui/PanelTextInput/index.js +16 -1
- package/dist/cjs/ui/Popup/index.js +23 -2
- package/dist/cjs/ui/Popup/utils.js +19 -0
- package/dist/cjs/ui/ResizerLegacy/index.js +7 -0
- package/dist/cjs/ui/unsupported-content-helper.js +6 -1
- package/dist/cjs/ui/with-outer-listeners.js +12 -1
- package/dist/cjs/ui-color/ColorPalette/utils.js +2 -0
- package/dist/cjs/ui-menu/ArrowKeyNavigationProvider/ColorPaletteArrowKeyNavigationProvider/index.js +9 -0
- package/dist/cjs/ui-menu/ArrowKeyNavigationProvider/MenuArrowKeyNavigationProvider/index.js +12 -0
- package/dist/cjs/ui-menu/ArrowKeyNavigationProvider/index.js +4 -0
- package/dist/cjs/ui-menu/Dropdown/index.js +9 -2
- package/dist/cjs/ui-menu/DropdownContainer/index.js +4 -1
- package/dist/cjs/ui-menu/DropdownMenu/index.js +20 -3
- package/dist/cjs/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +17 -0
- package/dist/cjs/ui-menu/ToolbarButton/styles.js +2 -0
- package/dist/cjs/ui-react/with-react-editor-view-outer-listeners.js +29 -4
- package/dist/cjs/utils/breakout.js +4 -0
- package/dist/cjs/utils/browser-extensions.js +4 -0
- package/dist/cjs/utils/browser.js +47 -5
- package/dist/cjs/utils/commands.js +4 -1
- package/dist/cjs/utils/compareNodes.js +7 -0
- package/dist/cjs/utils/compose.js +2 -0
- package/dist/cjs/utils/create-wrap-selection-transaction.js +9 -1
- package/dist/cjs/utils/dom.js +2 -0
- package/dist/cjs/utils/editor-core-utils.js +5 -0
- package/dist/cjs/utils/filter/privacy-filter.js +2 -0
- package/dist/cjs/utils/get-performance-options.js +2 -0
- package/dist/cjs/utils/hyperlink.js +16 -0
- package/dist/cjs/utils/imageLoader.js +23 -0
- package/dist/cjs/utils/index.js +10 -0
- package/dist/cjs/utils/input-rules.js +4 -1
- package/dist/cjs/utils/macro.js +2 -0
- package/dist/cjs/utils/nodes.js +6 -1
- package/dist/cjs/utils/outdated-browsers.js +21 -1
- package/dist/cjs/utils/performance/is-performance-api-available.js +4 -1
- package/dist/cjs/utils/performance/measure-render.js +5 -0
- package/dist/cjs/utils/performance/measure-tti.js +5 -0
- package/dist/cjs/utils/plugin-state-factory.js +4 -0
- package/dist/cjs/utils/processRawValue.js +13 -1
- package/dist/cjs/utils/prosemirror/autojoin.js +2 -0
- package/dist/cjs/utils/referentiality.js +5 -0
- package/dist/cjs/utils/rich-media-utils.js +4 -1
- package/dist/cjs/utils/should-auto-linkify-tld.js +5 -0
- package/dist/cjs/utils/should-force-tracking.js +2 -0
- package/dist/cjs/utils/slice.js +2 -0
- package/dist/cjs/utils/track-unsupported-content.js +15 -2
- package/dist/cjs/utils/traversor.js +6 -0
- package/dist/cjs/utils/validate-using-spec.js +13 -1
- package/dist/cjs/utils/validator.js +19 -0
- package/dist/cjs/utils/withFeatureFlaggedComponent.js +4 -0
- package/dist/cjs/with-plugin-state/index.js +94 -20
- package/dist/es2019/analytics/analytics-queue.js +8 -0
- package/dist/es2019/analytics/linking-utils.js +2 -0
- package/dist/es2019/card/LinkToolbarButtonGroup.js +2 -0
- package/dist/es2019/card/MediaAndEmbedsToolbar/index.js +15 -3
- package/dist/es2019/card/ui/assets/card.js +4 -0
- package/dist/es2019/card/ui/assets/embed.js +4 -0
- package/dist/es2019/card/ui/assets/inline.js +4 -0
- package/dist/es2019/card/ui/assets/url.js +4 -0
- package/dist/es2019/clipboard/index.js +12 -1
- package/dist/es2019/collab/index.js +2 -0
- package/dist/es2019/commands/index.js +8 -2
- package/dist/es2019/commands/insert-block.js +10 -2
- package/dist/es2019/core-utils/document-logger.js +4 -0
- package/dist/es2019/doc-utils/editor-use-only.js +5 -1
- package/dist/es2019/element-browser/ElementBrowser.js +2 -0
- package/dist/es2019/element-browser/ViewMore.js +8 -2
- package/dist/es2019/element-browser/components/CategoryList.js +2 -0
- package/dist/es2019/element-browser/components/ElementList/ElementList.js +12 -0
- package/dist/es2019/element-browser/components/StatelessElementBrowser.js +8 -2
- package/dist/es2019/element-browser/hooks/use-select-and-focus-on-arrow-navigation.js +13 -2
- package/dist/es2019/event-dispatcher/index.js +8 -0
- package/dist/es2019/extensibility/Extension/Extension/index.js +2 -0
- package/dist/es2019/extensibility/Extension/Lozenge/ExtensionLabel.js +10 -2
- package/dist/es2019/extensibility/Extension/Lozenge/index.js +3 -1
- package/dist/es2019/extensibility/Extension.js +2 -0
- package/dist/es2019/extensibility/ExtensionComponent.js +15 -1
- package/dist/es2019/extensibility/MultiBodiedExtension/index.js +4 -0
- package/dist/es2019/extensibility/extensionNodeView.js +3 -0
- package/dist/es2019/extensions/extension-fields-helpers.js +4 -0
- package/dist/es2019/extensions/extension-handlers.js +4 -0
- package/dist/es2019/extensions/module-helpers.js +11 -2
- package/dist/es2019/extensions/types/field-definitions.js +5 -0
- package/dist/es2019/floating-toolbar/index.js +18 -2
- package/dist/es2019/guideline/dynamicGuideline.js +4 -1
- package/dist/es2019/guideline/relativeGuideline.js +12 -3
- package/dist/es2019/guideline/snapping.js +4 -1
- package/dist/es2019/guideline/updateGuideline.js +4 -1
- package/dist/es2019/hooks/usePluginStateEffect.js +4 -0
- package/dist/es2019/hooks/useSharedPluginState.js +4 -0
- package/dist/es2019/hooks/useSharedPluginStateSelector/useSharedPluginStateSelector.js +3 -0
- package/dist/es2019/icons/shared/BorderIcon.js +4 -0
- package/dist/es2019/icons/shared/PanelErrorIcon.js +4 -0
- package/dist/es2019/icons/shared/PanelInfoIcon.js +4 -0
- package/dist/es2019/icons/shared/PanelNoteIcon.js +4 -0
- package/dist/es2019/icons/shared/PanelSuccessIcon.js +4 -0
- package/dist/es2019/icons/shared/PanelWarningIcon.js +4 -0
- package/dist/es2019/insert/index.js +6 -1
- package/dist/es2019/keymaps/index.js +46 -4
- package/dist/es2019/keymaps/keymap.js +4 -0
- package/dist/es2019/lazy-node-view/css-helper.js +4 -0
- package/dist/es2019/lazy-node-view/index.js +6 -1
- package/dist/es2019/lazy-node-view/node-view.js +2 -0
- package/dist/es2019/link/ConfigureLinkOverlay/Dropdown.js +2 -0
- package/dist/es2019/link/ConfigureLinkOverlay/StyledButton.js +4 -1
- package/dist/es2019/link/LinkPicker/EditorLinkPicker/index.js +4 -1
- package/dist/es2019/link/LinkPicker/EditorLinkPicker/useEscapeClickaway.js +9 -0
- package/dist/es2019/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +19 -0
- package/dist/es2019/link/LinkPicker/HyperlinkAddToolbar/index.js +2 -0
- package/dist/es2019/link/LinkSearch/LinkSearchList.js +2 -0
- package/dist/es2019/link/LinkSearch/LinkSearchListItem.js +2 -0
- package/dist/es2019/link/LinkSearch/index.js +13 -0
- package/dist/es2019/link/LinkSearch/withActivityProvider.js +3 -0
- package/dist/es2019/lists/analytics.js +2 -0
- package/dist/es2019/mark/commands.js +24 -3
- package/dist/es2019/media-inline/inline-image-wrapper.js +2 -0
- package/dist/es2019/media-single/MediaBadges.js +2 -0
- package/dist/es2019/media-single/utils.js +5 -0
- package/dist/es2019/monitoring/environment.js +6 -1
- package/dist/es2019/monitoring/error.js +19 -3
- package/dist/es2019/node-width/index.js +6 -1
- package/dist/es2019/normalize-feature-flags.js +4 -1
- package/dist/es2019/paste/clipboard.js +2 -0
- package/dist/es2019/paste/md-plugins/ignore-list-heading-md-plugin.js +5 -0
- package/dist/es2019/paste/md-plugins/linkify-md-plugin.js +20 -0
- package/dist/es2019/paste/md-plugins/newline-md-plugin.js +5 -0
- package/dist/es2019/paste/md-plugins/paragraph-md-plugin.js +5 -0
- package/dist/es2019/portal/common.js +4 -1
- package/dist/es2019/preset/builder.js +8 -0
- package/dist/es2019/preset/core-plugin/index.js +5 -0
- package/dist/es2019/preset/core-plugin/requestDocument.js +3 -0
- package/dist/es2019/preset/plugin-injection-api.js +62 -6
- package/dist/es2019/provider-factory/provider-factory.js +8 -1
- package/dist/es2019/provider-factory/with-providers.js +12 -0
- package/dist/es2019/provider-helpers/combine-providers.js +7 -0
- package/dist/es2019/provider-helpers/promise-helpers.js +3 -0
- package/dist/es2019/quick-insert/assets/index.js +2 -0
- package/dist/es2019/react-node-view/getInlineNodeViewProducer.js +4 -0
- package/dist/es2019/react-node-view/index.js +32 -2
- package/dist/es2019/resizer/BreakoutResizer.js +1 -7
- package/dist/es2019/resizer/Resizer.js +10 -2
- package/dist/es2019/safe-plugin/index.js +3 -0
- package/dist/es2019/selection/gap-cursor/actions.js +11 -2
- package/dist/es2019/selection/gap-cursor/selection.js +8 -0
- package/dist/es2019/selection/index.js +2 -0
- package/dist/es2019/selection-based-node-view/SelectionBasedNodeView.js +10 -1
- package/dist/es2019/styles/shared/lists.js +4 -1
- package/dist/es2019/transforms/code-block.js +6 -0
- package/dist/es2019/transforms/extension.js +14 -2
- package/dist/es2019/transforms/layout.js +6 -0
- package/dist/es2019/types/annotation/emitter.js +4 -0
- package/dist/es2019/types/index.js +3 -1
- package/dist/es2019/ui/Caption/index.js +4 -0
- package/dist/es2019/ui/ContextPanel/context.js +4 -0
- package/dist/es2019/ui/DropList/index.js +12 -2
- package/dist/es2019/ui/Emoji/index.js +2 -0
- package/dist/es2019/ui/ErrorBoundary/index.js +2 -0
- package/dist/es2019/ui/Expand/index.js +13 -6
- package/dist/es2019/ui/FloatingToolbar/Button.js +2 -0
- package/dist/es2019/ui/FloatingToolbar/ButtonSpotlightCard.js +4 -1
- package/dist/es2019/ui/FloatingToolbar/styles.js +3 -0
- package/dist/es2019/ui/IntlErrorBoundary/index.js +3 -0
- package/dist/es2019/ui/Layer/index.js +8 -0
- package/dist/es2019/ui/MediaSingle/grid.js +12 -2
- package/dist/es2019/ui/MediaSingle/index.js +2 -0
- package/dist/es2019/ui/MediaSingle/styled.js +6 -0
- package/dist/es2019/ui/Mention/mention-with-profilecard.js +4 -1
- package/dist/es2019/ui/Mention/mention-with-providers.js +18 -2
- package/dist/es2019/ui/OverflowShadow/index.js +19 -5
- package/dist/es2019/ui/OverflowShadow/shadowObserver.js +12 -2
- package/dist/es2019/ui/PanelTextInput/index.js +14 -0
- package/dist/es2019/ui/Popup/index.js +21 -1
- package/dist/es2019/ui/Popup/utils.js +19 -0
- package/dist/es2019/ui/ResizerLegacy/index.js +7 -0
- package/dist/es2019/ui/unsupported-content-helper.js +6 -1
- package/dist/es2019/ui/with-outer-listeners.js +12 -1
- package/dist/es2019/ui-color/ColorPalette/utils.js +2 -0
- package/dist/es2019/ui-menu/ArrowKeyNavigationProvider/ColorPaletteArrowKeyNavigationProvider/index.js +9 -0
- package/dist/es2019/ui-menu/ArrowKeyNavigationProvider/MenuArrowKeyNavigationProvider/index.js +12 -0
- package/dist/es2019/ui-menu/ArrowKeyNavigationProvider/index.js +4 -0
- package/dist/es2019/ui-menu/Dropdown/index.js +9 -2
- package/dist/es2019/ui-menu/DropdownContainer/index.js +4 -1
- package/dist/es2019/ui-menu/DropdownMenu/index.js +20 -3
- package/dist/es2019/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +17 -0
- package/dist/es2019/ui-menu/ToolbarButton/styles.js +2 -0
- package/dist/es2019/ui-react/with-react-editor-view-outer-listeners.js +27 -4
- package/dist/es2019/utils/breakout.js +4 -0
- package/dist/es2019/utils/browser-extensions.js +4 -0
- package/dist/es2019/utils/browser.js +47 -5
- package/dist/es2019/utils/commands.js +4 -1
- package/dist/es2019/utils/compare-props.js +4 -1
- package/dist/es2019/utils/compareNodes.js +7 -0
- package/dist/es2019/utils/compose.js +2 -0
- package/dist/es2019/utils/create-wrap-selection-transaction.js +9 -1
- package/dist/es2019/utils/dom.js +2 -0
- package/dist/es2019/utils/editor-core-utils.js +5 -0
- package/dist/es2019/utils/filter/privacy-filter.js +2 -0
- package/dist/es2019/utils/get-performance-options.js +2 -0
- package/dist/es2019/utils/hyperlink.js +16 -0
- package/dist/es2019/utils/imageLoader.js +23 -0
- package/dist/es2019/utils/index.js +11 -0
- package/dist/es2019/utils/input-rules.js +4 -1
- package/dist/es2019/utils/macro.js +2 -0
- package/dist/es2019/utils/nodes.js +6 -1
- package/dist/es2019/utils/outdated-browsers.js +21 -1
- package/dist/es2019/utils/performance/is-performance-api-available.js +4 -1
- package/dist/es2019/utils/performance/measure-render.js +6 -1
- package/dist/es2019/utils/performance/measure-tti.js +6 -0
- package/dist/es2019/utils/plugin-state-factory.js +4 -0
- package/dist/es2019/utils/processRawValue.js +13 -1
- package/dist/es2019/utils/prosemirror/autojoin.js +2 -0
- package/dist/es2019/utils/referentiality.js +5 -0
- package/dist/es2019/utils/rich-media-utils.js +4 -1
- package/dist/es2019/utils/should-auto-linkify-tld.js +5 -0
- package/dist/es2019/utils/should-force-tracking.js +2 -0
- package/dist/es2019/utils/slice.js +2 -0
- package/dist/es2019/utils/track-unsupported-content.js +19 -3
- package/dist/es2019/utils/traversor.js +7 -0
- package/dist/es2019/utils/validate-using-spec.js +13 -1
- package/dist/es2019/utils/validator.js +19 -0
- package/dist/es2019/utils/withFeatureFlaggedComponent.js +4 -0
- package/dist/es2019/with-plugin-state/index.js +77 -3
- package/dist/esm/analytics/analytics-queue.js +8 -0
- package/dist/esm/analytics/linking-utils.js +2 -0
- package/dist/esm/card/LinkToolbarButtonGroup.js +2 -0
- package/dist/esm/card/MediaAndEmbedsToolbar/index.js +15 -3
- package/dist/esm/card/ui/assets/card.js +4 -0
- package/dist/esm/card/ui/assets/embed.js +4 -0
- package/dist/esm/card/ui/assets/inline.js +4 -0
- package/dist/esm/card/ui/assets/url.js +4 -0
- package/dist/esm/clipboard/index.js +11 -1
- package/dist/esm/collab/index.js +2 -0
- package/dist/esm/commands/index.js +50 -42
- package/dist/esm/commands/insert-block.js +10 -2
- package/dist/esm/core-utils/document-logger.js +4 -0
- package/dist/esm/doc-utils/editor-use-only.js +8 -3
- package/dist/esm/element-browser/ElementBrowser.js +2 -0
- package/dist/esm/element-browser/ViewMore.js +8 -2
- package/dist/esm/element-browser/components/CategoryList.js +2 -0
- package/dist/esm/element-browser/components/ElementList/ElementList.js +12 -0
- package/dist/esm/element-browser/components/StatelessElementBrowser.js +8 -2
- package/dist/esm/element-browser/hooks/use-select-and-focus-on-arrow-navigation.js +13 -2
- package/dist/esm/event-dispatcher/index.js +8 -0
- package/dist/esm/extensibility/Extension/Extension/index.js +2 -0
- package/dist/esm/extensibility/Extension/Lozenge/ExtensionLabel.js +10 -2
- package/dist/esm/extensibility/Extension/Lozenge/index.js +3 -1
- package/dist/esm/extensibility/Extension.js +2 -0
- package/dist/esm/extensibility/ExtensionComponent.js +17 -2
- package/dist/esm/extensibility/MultiBodiedExtension/index.js +4 -0
- package/dist/esm/extensibility/extensionNodeView.js +3 -0
- package/dist/esm/extensions/extension-fields-helpers.js +4 -1
- package/dist/esm/extensions/extension-handlers.js +4 -0
- package/dist/esm/extensions/module-helpers.js +15 -5
- package/dist/esm/extensions/types/field-definitions.js +5 -0
- package/dist/esm/floating-toolbar/index.js +18 -2
- package/dist/esm/guideline/dynamicGuideline.js +4 -1
- package/dist/esm/guideline/relativeGuideline.js +12 -3
- package/dist/esm/guideline/updateGuideline.js +4 -1
- package/dist/esm/hooks/usePluginStateEffect.js +4 -0
- package/dist/esm/hooks/useSharedPluginState.js +4 -0
- package/dist/esm/hooks/useSharedPluginStateSelector/useSharedPluginStateSelector.js +3 -0
- package/dist/esm/icons/shared/BorderIcon.js +4 -0
- package/dist/esm/icons/shared/PanelErrorIcon.js +4 -0
- package/dist/esm/icons/shared/PanelInfoIcon.js +4 -0
- package/dist/esm/icons/shared/PanelNoteIcon.js +4 -0
- package/dist/esm/icons/shared/PanelSuccessIcon.js +4 -0
- package/dist/esm/icons/shared/PanelWarningIcon.js +4 -0
- package/dist/esm/insert/index.js +6 -1
- package/dist/esm/keymaps/index.js +48 -5
- package/dist/esm/keymaps/keymap.js +4 -0
- package/dist/esm/lazy-node-view/css-helper.js +4 -0
- package/dist/esm/lazy-node-view/index.js +6 -1
- package/dist/esm/lazy-node-view/node-view.js +2 -0
- package/dist/esm/link/ConfigureLinkOverlay/Dropdown.js +2 -0
- package/dist/esm/link/ConfigureLinkOverlay/StyledButton.js +4 -1
- package/dist/esm/link/LinkPicker/EditorLinkPicker/index.js +4 -1
- package/dist/esm/link/LinkPicker/EditorLinkPicker/useEscapeClickaway.js +9 -0
- package/dist/esm/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +16 -1
- package/dist/esm/link/LinkPicker/HyperlinkAddToolbar/index.js +2 -0
- package/dist/esm/link/LinkSearch/LinkSearchList.js +2 -0
- package/dist/esm/link/LinkSearch/LinkSearchListItem.js +2 -0
- package/dist/esm/link/LinkSearch/index.js +9 -1
- package/dist/esm/link/LinkSearch/withActivityProvider.js +3 -0
- package/dist/esm/lists/analytics.js +2 -0
- package/dist/esm/mark/commands.js +24 -3
- package/dist/esm/media-inline/inline-image-wrapper.js +2 -0
- package/dist/esm/media-single/MediaBadges.js +2 -0
- package/dist/esm/media-single/utils.js +5 -0
- package/dist/esm/monitoring/environment.js +6 -1
- package/dist/esm/monitoring/error.js +19 -3
- package/dist/esm/node-width/index.js +6 -1
- package/dist/esm/normalize-feature-flags.js +4 -1
- package/dist/esm/paste/clipboard.js +2 -0
- package/dist/esm/paste/md-plugins/ignore-list-heading-md-plugin.js +5 -0
- package/dist/esm/paste/md-plugins/linkify-md-plugin.js +20 -0
- package/dist/esm/paste/md-plugins/newline-md-plugin.js +5 -0
- package/dist/esm/paste/md-plugins/paragraph-md-plugin.js +5 -0
- package/dist/esm/portal/common.js +4 -1
- package/dist/esm/preset/builder.js +8 -0
- package/dist/esm/preset/core-plugin/index.js +5 -0
- package/dist/esm/preset/core-plugin/requestDocument.js +3 -0
- package/dist/esm/preset/plugin-injection-api.js +62 -6
- package/dist/esm/provider-factory/provider-factory.js +8 -1
- package/dist/esm/provider-factory/with-providers.js +12 -0
- package/dist/esm/provider-helpers/combine-providers.js +7 -0
- package/dist/esm/provider-helpers/promise-helpers.js +3 -0
- package/dist/esm/quick-insert/assets/index.js +2 -0
- package/dist/esm/react-node-view/getInlineNodeViewProducer.js +4 -0
- package/dist/esm/react-node-view/index.js +33 -2
- package/dist/esm/resizer/BreakoutResizer.js +1 -7
- package/dist/esm/resizer/Resizer.js +10 -2
- package/dist/esm/safe-plugin/index.js +3 -0
- package/dist/esm/selection/gap-cursor/actions.js +11 -2
- package/dist/esm/selection/gap-cursor/selection.js +8 -0
- package/dist/esm/selection/index.js +2 -0
- package/dist/esm/selection-based-node-view/SelectionBasedNodeView.js +10 -1
- package/dist/esm/styles/shared/lists.js +4 -1
- package/dist/esm/transforms/code-block.js +6 -0
- package/dist/esm/transforms/extension.js +14 -2
- package/dist/esm/transforms/layout.js +6 -0
- package/dist/esm/types/annotation/emitter.js +8 -2
- package/dist/esm/types/index.js +3 -1
- package/dist/esm/ui/Caption/index.js +4 -0
- package/dist/esm/ui/ContextPanel/context.js +4 -0
- package/dist/esm/ui/DropList/index.js +11 -1
- package/dist/esm/ui/Emoji/index.js +2 -0
- package/dist/esm/ui/ErrorBoundary/index.js +2 -0
- package/dist/esm/ui/Expand/index.js +13 -6
- package/dist/esm/ui/FloatingToolbar/Button.js +2 -0
- package/dist/esm/ui/FloatingToolbar/ButtonSpotlightCard.js +4 -1
- package/dist/esm/ui/FloatingToolbar/styles.js +3 -0
- package/dist/esm/ui/IntlErrorBoundary/index.js +3 -0
- package/dist/esm/ui/Layer/index.js +8 -0
- package/dist/esm/ui/MediaSingle/grid.js +12 -2
- package/dist/esm/ui/MediaSingle/index.js +2 -0
- package/dist/esm/ui/MediaSingle/styled.js +6 -0
- package/dist/esm/ui/Mention/mention-with-profilecard.js +4 -1
- package/dist/esm/ui/Mention/mention-with-providers.js +20 -3
- package/dist/esm/ui/OverflowShadow/index.js +18 -4
- package/dist/esm/ui/OverflowShadow/shadowObserver.js +12 -2
- package/dist/esm/ui/PanelTextInput/index.js +16 -1
- package/dist/esm/ui/Popup/index.js +23 -2
- package/dist/esm/ui/Popup/utils.js +19 -0
- package/dist/esm/ui/ResizerLegacy/index.js +7 -0
- package/dist/esm/ui/unsupported-content-helper.js +6 -1
- package/dist/esm/ui/with-outer-listeners.js +12 -1
- package/dist/esm/ui-color/ColorPalette/utils.js +2 -0
- package/dist/esm/ui-menu/ArrowKeyNavigationProvider/ColorPaletteArrowKeyNavigationProvider/index.js +9 -0
- package/dist/esm/ui-menu/ArrowKeyNavigationProvider/MenuArrowKeyNavigationProvider/index.js +12 -0
- package/dist/esm/ui-menu/ArrowKeyNavigationProvider/index.js +4 -0
- package/dist/esm/ui-menu/Dropdown/index.js +9 -2
- package/dist/esm/ui-menu/DropdownContainer/index.js +4 -1
- package/dist/esm/ui-menu/DropdownMenu/index.js +20 -3
- package/dist/esm/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +17 -0
- package/dist/esm/ui-menu/ToolbarButton/styles.js +2 -0
- package/dist/esm/ui-react/with-react-editor-view-outer-listeners.js +29 -4
- package/dist/esm/utils/breakout.js +4 -0
- package/dist/esm/utils/browser-extensions.js +4 -0
- package/dist/esm/utils/browser.js +47 -5
- package/dist/esm/utils/commands.js +4 -1
- package/dist/esm/utils/compareNodes.js +7 -0
- package/dist/esm/utils/compose.js +2 -0
- package/dist/esm/utils/create-wrap-selection-transaction.js +9 -1
- package/dist/esm/utils/dom.js +2 -0
- package/dist/esm/utils/editor-core-utils.js +5 -0
- package/dist/esm/utils/filter/privacy-filter.js +2 -0
- package/dist/esm/utils/get-performance-options.js +2 -0
- package/dist/esm/utils/hyperlink.js +16 -0
- package/dist/esm/utils/imageLoader.js +23 -0
- package/dist/esm/utils/index.js +11 -0
- package/dist/esm/utils/input-rules.js +4 -1
- package/dist/esm/utils/macro.js +2 -0
- package/dist/esm/utils/nodes.js +6 -1
- package/dist/esm/utils/outdated-browsers.js +21 -1
- package/dist/esm/utils/performance/is-performance-api-available.js +4 -1
- package/dist/esm/utils/performance/measure-render.js +5 -0
- package/dist/esm/utils/performance/measure-tti.js +6 -0
- package/dist/esm/utils/plugin-state-factory.js +4 -0
- package/dist/esm/utils/processRawValue.js +13 -1
- package/dist/esm/utils/prosemirror/autojoin.js +2 -0
- package/dist/esm/utils/referentiality.js +5 -0
- package/dist/esm/utils/rich-media-utils.js +4 -1
- package/dist/esm/utils/should-auto-linkify-tld.js +5 -0
- package/dist/esm/utils/should-force-tracking.js +2 -0
- package/dist/esm/utils/slice.js +2 -0
- package/dist/esm/utils/track-unsupported-content.js +15 -2
- package/dist/esm/utils/traversor.js +6 -0
- package/dist/esm/utils/validate-using-spec.js +13 -1
- package/dist/esm/utils/validator.js +19 -0
- package/dist/esm/utils/withFeatureFlaggedComponent.js +4 -0
- package/dist/esm/with-plugin-state/index.js +95 -19
- package/dist/types/analytics/types/avatar.d.ts +1 -1
- package/dist/types/analytics/types/toolbar-button.d.ts +1 -1
- package/dist/types/analytics/types/utils.d.ts +2 -2
- package/dist/types/annotation/index.d.ts +1 -1
- package/dist/types/commands/index.d.ts +3 -3
- package/dist/types/guideline/types.d.ts +1 -2
- package/dist/types/hooks/usePluginStateEffect.d.ts +2 -1
- package/dist/types/link/LinkPicker/EditorLinkPicker/index.d.ts +1 -1
- package/dist/types/link/LinkSearch/LinkSearchList.d.ts +1 -1
- package/dist/types/provider-factory/macro-provider.d.ts +1 -1
- package/dist/types/selection/types.d.ts +1 -2
- package/dist/types/types/floating-toolbar.d.ts +16 -16
- package/dist/types/types/hyperlink.d.ts +1 -2
- package/dist/types/ui/Mention/index.d.ts +1 -1
- package/dist/types/ui-react/with-react-editor-view-outer-listeners.d.ts +1 -1
- package/dist/types/utils/imageLoader.d.ts +2 -2
- package/dist/types-ts4.5/analytics/types/avatar.d.ts +1 -1
- package/dist/types-ts4.5/analytics/types/toolbar-button.d.ts +1 -1
- package/dist/types-ts4.5/analytics/types/utils.d.ts +2 -2
- package/dist/types-ts4.5/annotation/index.d.ts +1 -1
- package/dist/types-ts4.5/commands/index.d.ts +3 -3
- package/dist/types-ts4.5/guideline/types.d.ts +1 -2
- package/dist/types-ts4.5/hooks/usePluginStateEffect.d.ts +2 -1
- package/dist/types-ts4.5/link/LinkPicker/EditorLinkPicker/index.d.ts +1 -1
- package/dist/types-ts4.5/link/LinkSearch/LinkSearchList.d.ts +1 -1
- package/dist/types-ts4.5/provider-factory/macro-provider.d.ts +1 -1
- package/dist/types-ts4.5/selection/types.d.ts +1 -2
- package/dist/types-ts4.5/types/floating-toolbar.d.ts +16 -16
- package/dist/types-ts4.5/types/hyperlink.d.ts +1 -2
- package/dist/types-ts4.5/ui/Mention/index.d.ts +1 -1
- package/dist/types-ts4.5/ui-react/with-react-editor-view-outer-listeners.d.ts +1 -1
- package/dist/types-ts4.5/utils/imageLoader.d.ts +2 -2
- package/package.json +1 -1
- package/tsconfig.json +0 -1
|
@@ -60,6 +60,8 @@ var DEFAULT_SLOW_THRESHOLD = 4;
|
|
|
60
60
|
* ```
|
|
61
61
|
*
|
|
62
62
|
*/
|
|
63
|
+
// Ignored via go/ees005
|
|
64
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components, react/prefer-stateless-function
|
|
63
65
|
var WithPluginState = /*#__PURE__*/function (_React$Component) {
|
|
64
66
|
function WithPluginState(props) {
|
|
65
67
|
_classCallCheck(this, WithPluginState);
|
|
@@ -70,18 +72,27 @@ var WithPluginState = /*#__PURE__*/function (_React$Component) {
|
|
|
70
72
|
key: "render",
|
|
71
73
|
value: function render() {
|
|
72
74
|
if (fg('platform_editor_react18_phase2_v2')) {
|
|
75
|
+
// Ignored via go/ees005
|
|
76
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
73
77
|
return /*#__PURE__*/React.createElement(WithPluginStateNew, this.props);
|
|
74
78
|
}
|
|
79
|
+
// Ignored via go/ees005
|
|
80
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
75
81
|
return /*#__PURE__*/React.createElement(WithPluginStateOld, this.props);
|
|
76
82
|
}
|
|
77
83
|
}]);
|
|
78
84
|
}(React.Component);
|
|
79
85
|
function WithPluginStateNew(props) {
|
|
80
86
|
var context = React.useContext(EditorContext);
|
|
81
|
-
return /*#__PURE__*/React.createElement(WithPluginStateInner
|
|
87
|
+
return /*#__PURE__*/React.createElement(WithPluginStateInner
|
|
88
|
+
// Ignored via go/ees005
|
|
89
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
90
|
+
, _extends({}, props, {
|
|
82
91
|
editorActions: context === null || context === void 0 ? void 0 : context.editorActions
|
|
83
92
|
}));
|
|
84
93
|
}
|
|
94
|
+
// Ignored via go/ees005
|
|
95
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
85
96
|
export var WithPluginStateInner = /*#__PURE__*/function (_React$Component2) {
|
|
86
97
|
function WithPluginStateInner(props) {
|
|
87
98
|
var _this;
|
|
@@ -92,17 +103,25 @@ export var WithPluginStateInner = /*#__PURE__*/function (_React$Component2) {
|
|
|
92
103
|
_defineProperty(_this, "notAppliedState", {});
|
|
93
104
|
_defineProperty(_this, "isSubscribed", false);
|
|
94
105
|
_defineProperty(_this, "callsCount", 0);
|
|
106
|
+
// Ignored via go/ees005
|
|
107
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
95
108
|
_defineProperty(_this, "handlePluginStateChange", function (propName, pluginName, performanceOptions, skipEqualityCheck) {
|
|
96
|
-
return
|
|
97
|
-
//
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
109
|
+
return (
|
|
110
|
+
// Ignored via go/ees005
|
|
111
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
112
|
+
function (pluginState) {
|
|
113
|
+
// skipEqualityCheck is being used for old plugins since they are mutating plugin state instead of creating a new one
|
|
114
|
+
// Ignored via go/ees005
|
|
115
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
116
|
+
if (_this.state[propName] !== pluginState || skipEqualityCheck) {
|
|
117
|
+
_this.updateState({
|
|
118
|
+
stateSubset: _defineProperty({}, propName, pluginState),
|
|
119
|
+
pluginName: pluginName,
|
|
120
|
+
performanceOptions: performanceOptions
|
|
121
|
+
});
|
|
122
|
+
}
|
|
104
123
|
}
|
|
105
|
-
|
|
124
|
+
);
|
|
106
125
|
});
|
|
107
126
|
/**
|
|
108
127
|
* Debounces setState calls in order to reduce number of re-renders caused by several plugin state changes.
|
|
@@ -205,6 +224,8 @@ export var WithPluginStateInner = /*#__PURE__*/function (_React$Component2) {
|
|
|
205
224
|
var fakePluginKey = {
|
|
206
225
|
key: 'analyticsPlugin$',
|
|
207
226
|
getState: function getState(state) {
|
|
227
|
+
// Ignored via go/ees005
|
|
228
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
208
229
|
return state['analyticsPlugin$'];
|
|
209
230
|
}
|
|
210
231
|
};
|
|
@@ -221,7 +242,12 @@ export var WithPluginStateInner = /*#__PURE__*/function (_React$Component2) {
|
|
|
221
242
|
if (!pluginKey) {
|
|
222
243
|
return;
|
|
223
244
|
}
|
|
245
|
+
|
|
246
|
+
// Ignored via go/ees005
|
|
247
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
224
248
|
var pluginName = pluginKey.key;
|
|
249
|
+
// Ignored via go/ees005
|
|
250
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
225
251
|
var pluginState = pluginsStates[propName];
|
|
226
252
|
var isPluginWithSubscribe = pluginState && pluginState.subscribe;
|
|
227
253
|
var handler = _this2.handlePluginStateChange(propName, pluginName, {
|
|
@@ -232,8 +258,15 @@ export var WithPluginStateInner = /*#__PURE__*/function (_React$Component2) {
|
|
|
232
258
|
if (isPluginWithSubscribe) {
|
|
233
259
|
pluginState.subscribe(handler);
|
|
234
260
|
} else {
|
|
261
|
+
// Ignored via go/ees005
|
|
262
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
235
263
|
eventDispatcher.on(pluginKey.key, handler);
|
|
236
264
|
}
|
|
265
|
+
|
|
266
|
+
// Ignored via go/ees005
|
|
267
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
268
|
+
// Ignored via go/ees005
|
|
269
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
237
270
|
_this2.listeners[pluginKey.key] = {
|
|
238
271
|
handler: handler,
|
|
239
272
|
pluginKey: pluginKey
|
|
@@ -250,10 +283,16 @@ export var WithPluginStateInner = /*#__PURE__*/function (_React$Component2) {
|
|
|
250
283
|
return;
|
|
251
284
|
}
|
|
252
285
|
Object.keys(this.listeners).forEach(function (key) {
|
|
286
|
+
// Ignored via go/ees005
|
|
287
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
253
288
|
var pluginState = _this3.listeners[key].pluginKey.getState(editorView.state);
|
|
254
289
|
if (pluginState && pluginState.unsubscribe) {
|
|
290
|
+
// Ignored via go/ees005
|
|
291
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
255
292
|
pluginState.unsubscribe(_this3.listeners[key].handler);
|
|
256
293
|
} else {
|
|
294
|
+
// Ignored via go/ees005
|
|
295
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
257
296
|
eventDispatcher.off(key, _this3.listeners[key].handler);
|
|
258
297
|
}
|
|
259
298
|
});
|
|
@@ -283,6 +322,9 @@ export var WithPluginStateInner = /*#__PURE__*/function (_React$Component2) {
|
|
|
283
322
|
this.subscribe(this.props);
|
|
284
323
|
this.subscribeToContextUpdates();
|
|
285
324
|
}
|
|
325
|
+
|
|
326
|
+
// Ignored via go/ees005
|
|
327
|
+
// eslint-disable-next-line react/no-unsafe
|
|
286
328
|
}, {
|
|
287
329
|
key: "UNSAFE_componentWillReceiveProps",
|
|
288
330
|
value: function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
@@ -307,6 +349,9 @@ export var WithPluginStateInner = /*#__PURE__*/function (_React$Component2) {
|
|
|
307
349
|
}
|
|
308
350
|
}]);
|
|
309
351
|
}(React.Component);
|
|
352
|
+
|
|
353
|
+
// Ignored via go/ees005
|
|
354
|
+
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
310
355
|
_defineProperty(WithPluginStateInner, "displayName", 'WithPluginState');
|
|
311
356
|
export var WithPluginStateOld = /*#__PURE__*/function (_React$Component3) {
|
|
312
357
|
function WithPluginStateOld(props, context) {
|
|
@@ -318,17 +363,25 @@ export var WithPluginStateOld = /*#__PURE__*/function (_React$Component3) {
|
|
|
318
363
|
_defineProperty(_this6, "notAppliedState", {});
|
|
319
364
|
_defineProperty(_this6, "isSubscribed", false);
|
|
320
365
|
_defineProperty(_this6, "callsCount", 0);
|
|
366
|
+
// Ignored via go/ees005
|
|
367
|
+
// eslint-disable-next-line @typescript-eslint/max-params
|
|
321
368
|
_defineProperty(_this6, "handlePluginStateChange", function (propName, pluginName, performanceOptions, skipEqualityCheck) {
|
|
322
|
-
return
|
|
323
|
-
//
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
369
|
+
return (
|
|
370
|
+
// Ignored via go/ees005
|
|
371
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
372
|
+
function (pluginState) {
|
|
373
|
+
// skipEqualityCheck is being used for old plugins since they are mutating plugin state instead of creating a new one
|
|
374
|
+
// Ignored via go/ees005
|
|
375
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
376
|
+
if (_this6.state[propName] !== pluginState || skipEqualityCheck) {
|
|
377
|
+
_this6.updateState({
|
|
378
|
+
stateSubset: _defineProperty({}, propName, pluginState),
|
|
379
|
+
pluginName: pluginName,
|
|
380
|
+
performanceOptions: performanceOptions
|
|
381
|
+
});
|
|
382
|
+
}
|
|
330
383
|
}
|
|
331
|
-
|
|
384
|
+
);
|
|
332
385
|
});
|
|
333
386
|
/**
|
|
334
387
|
* Debounces setState calls in order to reduce number of re-renders caused by several plugin state changes.
|
|
@@ -433,6 +486,8 @@ export var WithPluginStateOld = /*#__PURE__*/function (_React$Component3) {
|
|
|
433
486
|
var fakePluginKey = {
|
|
434
487
|
key: 'analyticsPlugin$',
|
|
435
488
|
getState: function getState(state) {
|
|
489
|
+
// Ignored via go/ees005
|
|
490
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
436
491
|
return state['analyticsPlugin$'];
|
|
437
492
|
}
|
|
438
493
|
};
|
|
@@ -449,7 +504,12 @@ export var WithPluginStateOld = /*#__PURE__*/function (_React$Component3) {
|
|
|
449
504
|
if (!pluginKey) {
|
|
450
505
|
return;
|
|
451
506
|
}
|
|
507
|
+
|
|
508
|
+
// Ignored via go/ees005
|
|
509
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
452
510
|
var pluginName = pluginKey.key;
|
|
511
|
+
// Ignored via go/ees005
|
|
512
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
453
513
|
var pluginState = pluginsStates[propName];
|
|
454
514
|
var isPluginWithSubscribe = pluginState && pluginState.subscribe;
|
|
455
515
|
var handler = _this7.handlePluginStateChange(propName, pluginName, {
|
|
@@ -460,8 +520,15 @@ export var WithPluginStateOld = /*#__PURE__*/function (_React$Component3) {
|
|
|
460
520
|
if (isPluginWithSubscribe) {
|
|
461
521
|
pluginState.subscribe(handler);
|
|
462
522
|
} else {
|
|
523
|
+
// Ignored via go/ees005
|
|
524
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
463
525
|
eventDispatcher.on(pluginKey.key, handler);
|
|
464
526
|
}
|
|
527
|
+
|
|
528
|
+
// Ignored via go/ees005
|
|
529
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
530
|
+
// Ignored via go/ees005
|
|
531
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
465
532
|
_this7.listeners[pluginKey.key] = {
|
|
466
533
|
handler: handler,
|
|
467
534
|
pluginKey: pluginKey
|
|
@@ -478,10 +545,16 @@ export var WithPluginStateOld = /*#__PURE__*/function (_React$Component3) {
|
|
|
478
545
|
return;
|
|
479
546
|
}
|
|
480
547
|
Object.keys(this.listeners).forEach(function (key) {
|
|
548
|
+
// Ignored via go/ees005
|
|
549
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
481
550
|
var pluginState = _this8.listeners[key].pluginKey.getState(editorView.state);
|
|
482
551
|
if (pluginState && pluginState.unsubscribe) {
|
|
552
|
+
// Ignored via go/ees005
|
|
553
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
483
554
|
pluginState.unsubscribe(_this8.listeners[key].handler);
|
|
484
555
|
} else {
|
|
556
|
+
// Ignored via go/ees005
|
|
557
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
485
558
|
eventDispatcher.off(key, _this8.listeners[key].handler);
|
|
486
559
|
}
|
|
487
560
|
});
|
|
@@ -507,6 +580,9 @@ export var WithPluginStateOld = /*#__PURE__*/function (_React$Component3) {
|
|
|
507
580
|
this.subscribe(this.props);
|
|
508
581
|
this.subscribeToContextUpdates(this.context);
|
|
509
582
|
}
|
|
583
|
+
|
|
584
|
+
// Ignored via go/ees005
|
|
585
|
+
// eslint-disable-next-line react/no-unsafe
|
|
510
586
|
}, {
|
|
511
587
|
key: "UNSAFE_componentWillReceiveProps",
|
|
512
588
|
value: function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ACTION, type ACTION_SUBJECT, type ACTION_SUBJECT_ID } from './enums';
|
|
2
2
|
import { type UIAEP } from './utils';
|
|
3
|
-
type AvatarButtonViewedAEP = UIAEP<ACTION.VIEWED, ACTION_SUBJECT.BUTTON, ACTION_SUBJECT_ID.AVATAR_GROUP_PLUGIN,
|
|
3
|
+
type AvatarButtonViewedAEP = UIAEP<ACTION.VIEWED, ACTION_SUBJECT.BUTTON, ACTION_SUBJECT_ID.AVATAR_GROUP_PLUGIN, Object, undefined>;
|
|
4
4
|
export type AvatarEventPayload = AvatarButtonViewedAEP;
|
|
5
5
|
export {};
|
|
@@ -20,6 +20,6 @@ export declare enum TOOLBAR_ACTION_SUBJECT_ID {
|
|
|
20
20
|
RECORD_VIDEO = "recordVideo",
|
|
21
21
|
AI = "atlassian-intelligence"
|
|
22
22
|
}
|
|
23
|
-
type ToolbarButtonClickedAEP = UIAEP<ACTION.CLICKED, ACTION_SUBJECT.TOOLBAR_BUTTON, undefined,
|
|
23
|
+
type ToolbarButtonClickedAEP = UIAEP<ACTION.CLICKED, ACTION_SUBJECT.TOOLBAR_BUTTON, undefined, Object, undefined>;
|
|
24
24
|
export type ToolbarEventPayload = ToolbarButtonClickedAEP;
|
|
25
25
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ACTION, ACTION_SUBJECT, EVENT_TYPE } from './enums';
|
|
2
|
-
type AEP<Action, ActionSubject, ActionSubjectID, Attributes, NonPrivacySafeAttributes, EventType, ImplicitAttributes extends
|
|
2
|
+
type AEP<Action, ActionSubject, ActionSubjectID, Attributes, NonPrivacySafeAttributes, EventType, ImplicitAttributes extends Object = {}> = {
|
|
3
3
|
action: Action;
|
|
4
4
|
actionSubject: ActionSubject;
|
|
5
5
|
actionSubjectId?: ActionSubjectID;
|
|
@@ -13,7 +13,7 @@ type AEP<Action, ActionSubject, ActionSubjectID, Attributes, NonPrivacySafeAttri
|
|
|
13
13
|
eventType: EVENT_TYPE.OPERATIONAL;
|
|
14
14
|
});
|
|
15
15
|
export type UIAEP<Action, ActionSubject, ActionSubjectID, Attributes, NonPrivacySafeAttributes> = AEP<Action, ActionSubject, ActionSubjectID, Attributes, NonPrivacySafeAttributes, EVENT_TYPE.UI>;
|
|
16
|
-
export type TrackAEP<Action, ActionSubject, ActionSubjectID, Attributes, NonPrivacySafeAttributes, ImplicitAttributes extends
|
|
16
|
+
export type TrackAEP<Action, ActionSubject, ActionSubjectID, Attributes, NonPrivacySafeAttributes, ImplicitAttributes extends Object = {}> = AEP<Action, ActionSubject, ActionSubjectID, Attributes, NonPrivacySafeAttributes, EVENT_TYPE.TRACK, ImplicitAttributes>;
|
|
17
17
|
export type OperationalAEP<Action, ActionSubject, ActionSubjectID, Attributes> = AEP<Action, ActionSubject, ActionSubjectID, Attributes, undefined, EVENT_TYPE.OPERATIONAL>;
|
|
18
18
|
export type OperationalExposureAEP<Action, ActionSubject, ActionSubjectID, Attributes> = OperationalAEP<Action, ActionSubject, ActionSubjectID, Attributes> & {
|
|
19
19
|
source?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/// <reference path="../../../../../../typings/events.d.ts" />
|
|
2
1
|
/// <reference types="node" />
|
|
3
2
|
/// <reference types="node/events" />
|
|
3
|
+
/// <reference types="typings/events" />
|
|
4
4
|
import { EventEmitter } from 'events';
|
|
5
5
|
export type UpdateEvent = 'create' | 'delete' | 'resolve' | 'unresolve' | 'setselectedannotation' | 'sethoveredannotation' | 'removehoveredannotation';
|
|
6
6
|
export type VisibilityEvent = 'setvisibility';
|
|
@@ -6,8 +6,8 @@ type AlignmentState = 'start' | 'end' | 'center';
|
|
|
6
6
|
export declare function addParagraphAtEnd(tr: Transaction): void;
|
|
7
7
|
export declare function createParagraphAtEnd(): Command;
|
|
8
8
|
export declare const changeImageAlignment: (align?: AlignmentState) => Command;
|
|
9
|
-
export declare const createToggleBlockMarkOnRange: <T extends
|
|
10
|
-
export declare const createToggleInlineMarkOnRange: <T extends
|
|
9
|
+
export declare const createToggleBlockMarkOnRange: <T extends Object = object>(markType: MarkType, getAttrs: (prevAttrs?: T, node?: PMNode) => T | undefined | false, allowedBlocks?: NodeType[] | ((schema: Schema, node: PMNode, parent: PMNode | null) => boolean) | undefined) => (from: number, to: number, tr: Transaction, state: EditorState) => boolean;
|
|
10
|
+
export declare const createToggleInlineMarkOnRange: <T extends Object = object>(markType: MarkType, getAttrs: (prevAttrs?: T, node?: PMNode) => T | undefined | false) => (from: number, to: number, tr: Transaction, state: EditorState) => boolean;
|
|
11
11
|
/**
|
|
12
12
|
* Toggles block mark based on the return type of `getAttrs`.
|
|
13
13
|
* This is similar to ProseMirror's `getAttrs` from `AttributeSpec`
|
|
@@ -15,7 +15,7 @@ export declare const createToggleInlineMarkOnRange: <T extends {} = object>(mark
|
|
|
15
15
|
* return `undefined for no-op.
|
|
16
16
|
* return an `object` to update the mark.
|
|
17
17
|
*/
|
|
18
|
-
export declare const toggleBlockMark: <T extends
|
|
18
|
+
export declare const toggleBlockMark: <T extends Object = object>(markType: MarkType, getAttrs: (prevAttrs?: T, node?: PMNode) => T | undefined | false, allowedBlocks?: NodeType[] | ((schema: Schema, node: PMNode, parent: PMNode | null) => boolean) | undefined) => Command;
|
|
19
19
|
export declare const clearEditorContent: Command;
|
|
20
20
|
export declare function findCutBefore($pos: ResolvedPos): ResolvedPos | null;
|
|
21
21
|
/**
|
|
@@ -43,8 +43,7 @@ export type GuidelinePluginState = {
|
|
|
43
43
|
guidelines: GuidelineConfig[];
|
|
44
44
|
rect?: GuidelineContainerRect;
|
|
45
45
|
};
|
|
46
|
-
export
|
|
47
|
-
}
|
|
46
|
+
export type GuidelinePluginOptions = Object;
|
|
48
47
|
export type DisplayGrid = (props: GuidelinePluginState) => boolean;
|
|
49
48
|
export type DisplayGuideline = (view: EditorView) => DisplayGrid;
|
|
50
49
|
export type GuidelineSnap = {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { BasePluginDependenciesAPI, EditorInjectionAPI, ExtractInjectionAPI, NextEditorPlugin } from '../types/next-editor-plugin';
|
|
2
2
|
type NamedPluginStatesFromInjectionAPI<API extends ExtractInjectionAPI<NextEditorPlugin<any, any>>, PluginNames extends string | number | symbol> = Readonly<{
|
|
3
|
-
[K in PluginNames as `${K extends string ? K : never}State`]: API[K] extends
|
|
3
|
+
[K in PluginNames as `${K extends string ? K : never}State`]: API[K] extends // eslint-disable-next-line @typescript-eslint/no-explicit-any -- Ignored via go/ees005
|
|
4
|
+
BasePluginDependenciesAPI<any> | undefined ? ReturnType<API[K]['sharedState']['currentState']> : never;
|
|
4
5
|
}>;
|
|
5
6
|
type ExtractPluginNames<API extends EditorInjectionAPI<any, any>> = keyof API;
|
|
6
7
|
type Cleanup = () => void;
|
|
@@ -5,7 +5,7 @@ import type { Command, EditorAppearance } from '../../../types';
|
|
|
5
5
|
/**
|
|
6
6
|
* Returns a type that matches T but where keys (K) are now optional
|
|
7
7
|
*/
|
|
8
|
-
type OptionalKeys<T extends
|
|
8
|
+
type OptionalKeys<T extends Object, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
9
9
|
export interface EditorLinkPickerProps extends OptionalKeys<React.ComponentProps<typeof LazyLinkPicker>, 'onCancel'> {
|
|
10
10
|
view: EditorView;
|
|
11
11
|
/**
|
|
@@ -26,8 +26,7 @@ export type EditorSelectionAPI = {
|
|
|
26
26
|
setSelectionRelativeToNode: SetSelectionRelativeToNode;
|
|
27
27
|
getSelectionPluginState: (state: EditorState) => SelectionPluginState;
|
|
28
28
|
};
|
|
29
|
-
export
|
|
30
|
-
}
|
|
29
|
+
export type SelectionPluginOptions = LongPressSelectionPluginOptions;
|
|
31
30
|
export type SelectionSharedState = {
|
|
32
31
|
selectionRelativeToNode?: RelativeSelectionPos | undefined;
|
|
33
32
|
selection?: Selection | undefined;
|
|
@@ -12,11 +12,11 @@ import type { ProviderFactory } from '../provider-factory';
|
|
|
12
12
|
import type { PaletteColor } from '../ui-color/ColorPalette/Palettes/type';
|
|
13
13
|
import type { Command, CommandDispatch } from './command';
|
|
14
14
|
import type { MarkOptions, NodeOptions } from './copy-button';
|
|
15
|
-
export interface RenderOptionsPropsT<T extends
|
|
15
|
+
export interface RenderOptionsPropsT<T extends Object> {
|
|
16
16
|
hide: () => void;
|
|
17
17
|
dispatchCommand: (command: T) => void;
|
|
18
18
|
}
|
|
19
|
-
export interface DropdownOptionT<T extends
|
|
19
|
+
export interface DropdownOptionT<T extends Object> {
|
|
20
20
|
id?: string;
|
|
21
21
|
title: string;
|
|
22
22
|
onClick: T;
|
|
@@ -43,12 +43,12 @@ export type typeOption =
|
|
|
43
43
|
* @default 'item'
|
|
44
44
|
*/
|
|
45
45
|
'item' | 'item-checkbox';
|
|
46
|
-
export type DropdownOptions<T extends
|
|
46
|
+
export type DropdownOptions<T extends Object> = Array<DropdownOptionT<T>> | {
|
|
47
47
|
render: (props: RenderOptionsPropsT<T>) => React.ReactElement<any> | null;
|
|
48
48
|
height: number;
|
|
49
49
|
width: number;
|
|
50
50
|
};
|
|
51
|
-
export interface SelectOption<T extends
|
|
51
|
+
export interface SelectOption<T extends Object = Object> {
|
|
52
52
|
value: string;
|
|
53
53
|
label: string;
|
|
54
54
|
selected?: boolean;
|
|
@@ -110,7 +110,7 @@ export type FloatingToolbarCopyButton = {
|
|
|
110
110
|
hidden?: boolean;
|
|
111
111
|
supportsViewMode?: boolean;
|
|
112
112
|
};
|
|
113
|
-
export type FloatingToolbarButton<T extends
|
|
113
|
+
export type FloatingToolbarButton<T extends Object> = {
|
|
114
114
|
id?: string;
|
|
115
115
|
type: 'button';
|
|
116
116
|
isRadioButton?: boolean;
|
|
@@ -147,7 +147,7 @@ export type FloatingToolbarButton<T extends {}> = {
|
|
|
147
147
|
pulse?: boolean;
|
|
148
148
|
spotlightConfig?: FloatingToolbarButtonSpotlightConfig;
|
|
149
149
|
};
|
|
150
|
-
export type FloatingToolbarInput<T extends
|
|
150
|
+
export type FloatingToolbarInput<T extends Object> = {
|
|
151
151
|
id: string;
|
|
152
152
|
type: 'input';
|
|
153
153
|
title?: string;
|
|
@@ -158,7 +158,7 @@ export type FloatingToolbarInput<T extends {}> = {
|
|
|
158
158
|
placeholder?: string;
|
|
159
159
|
hidden?: boolean;
|
|
160
160
|
};
|
|
161
|
-
export type FloatingToolbarCustom<T extends
|
|
161
|
+
export type FloatingToolbarCustom<T extends Object> = {
|
|
162
162
|
type: 'custom';
|
|
163
163
|
/**
|
|
164
164
|
* By default -- the floating toolbar supports navigating between
|
|
@@ -176,7 +176,7 @@ export type FloatingToolbarCustom<T extends {}> = {
|
|
|
176
176
|
hidden?: boolean;
|
|
177
177
|
supportsViewMode?: boolean;
|
|
178
178
|
};
|
|
179
|
-
type FloatingToolbarSelectBase<T extends
|
|
179
|
+
type FloatingToolbarSelectBase<T extends Object, V = SelectOption> = {
|
|
180
180
|
id: string;
|
|
181
181
|
type: 'select';
|
|
182
182
|
selectType: 'list' | 'emoji' | 'date' | 'color';
|
|
@@ -191,28 +191,28 @@ type FloatingToolbarSelectBase<T extends {}, V = SelectOption> = {
|
|
|
191
191
|
onChange: (selected: V) => T;
|
|
192
192
|
filterOption?: ((option: V, rawInput: string) => boolean) | null;
|
|
193
193
|
};
|
|
194
|
-
export type FloatingToolbarListPicker<T extends
|
|
194
|
+
export type FloatingToolbarListPicker<T extends Object> = FloatingToolbarSelectBase<T> & {
|
|
195
195
|
selectType: 'list';
|
|
196
196
|
};
|
|
197
|
-
export type FloatingToolbarColorPicker<T extends
|
|
197
|
+
export type FloatingToolbarColorPicker<T extends Object> = FloatingToolbarSelectBase<T, PaletteColor> & {
|
|
198
198
|
selectType: 'color';
|
|
199
199
|
};
|
|
200
|
-
export type FloatingToolbarEmojiPicker<T extends
|
|
200
|
+
export type FloatingToolbarEmojiPicker<T extends Object> = FloatingToolbarSelectBase<T, EmojiId> & {
|
|
201
201
|
selectType: 'emoji';
|
|
202
202
|
selected?: boolean;
|
|
203
203
|
options: never[];
|
|
204
204
|
};
|
|
205
|
-
export type FloatingToolbarDatePicker<T extends
|
|
205
|
+
export type FloatingToolbarDatePicker<T extends Object> = FloatingToolbarSelectBase<T, number> & {
|
|
206
206
|
selectType: 'date';
|
|
207
207
|
options: never[];
|
|
208
208
|
};
|
|
209
|
-
export type FloatingToolbarSelect<T extends
|
|
209
|
+
export type FloatingToolbarSelect<T extends Object> = FloatingToolbarEmojiPicker<T> | FloatingToolbarColorPicker<T> | FloatingToolbarListPicker<T> | FloatingToolbarDatePicker<T>;
|
|
210
210
|
export type FloatingToolbarSeparator = {
|
|
211
211
|
type: 'separator';
|
|
212
212
|
hidden?: boolean;
|
|
213
213
|
supportsViewMode?: boolean;
|
|
214
214
|
};
|
|
215
|
-
export type FloatingToolbarDropdown<T extends
|
|
215
|
+
export type FloatingToolbarDropdown<T extends Object> = {
|
|
216
216
|
testId?: string;
|
|
217
217
|
id?: string;
|
|
218
218
|
type: 'dropdown';
|
|
@@ -251,8 +251,8 @@ type FloatingToolbarExtensionsPlaceholder = {
|
|
|
251
251
|
* This type is restricted with the items that can be used for fallback.
|
|
252
252
|
* Make sure that this type is not a FloatingToolbarCustom type.
|
|
253
253
|
*/
|
|
254
|
-
export type FloatingToolbarFallbackItem<T extends
|
|
255
|
-
export type FloatingToolbarItem<T extends
|
|
254
|
+
export type FloatingToolbarFallbackItem<T extends Object> = FloatingToolbarButton<T> | FloatingToolbarCopyButton | FloatingToolbarDropdown<T> | FloatingToolbarSelect<T> | FloatingToolbarInput<T> | FloatingToolbarSeparator;
|
|
255
|
+
export type FloatingToolbarItem<T extends Object> = FloatingToolbarButton<T> | FloatingToolbarCopyButton | FloatingToolbarDropdown<T> | FloatingToolbarSelect<T> | FloatingToolbarInput<T> | FloatingToolbarCustom<T> | FloatingToolbarSeparator | FloatingToolbarExtensionsPlaceholder;
|
|
256
256
|
export interface FloatingToolbarConfig {
|
|
257
257
|
/** Used for the ariaLabel on the <Popup /> component */
|
|
258
258
|
title: string;
|
|
@@ -8,8 +8,7 @@ export type LinkInputType = INPUT_METHOD.MANUAL | INPUT_METHOD.TYPEAHEAD;
|
|
|
8
8
|
* Configuration for the link picker
|
|
9
9
|
* Extends `LinkPickerProps` to provide future extensibility out-of-the-box
|
|
10
10
|
*/
|
|
11
|
-
export
|
|
12
|
-
}
|
|
11
|
+
export type LinkPickerOptions = Partial<LinkPickerProps>;
|
|
13
12
|
/**
|
|
14
13
|
* Configuration for editor linking behaviours
|
|
15
14
|
*/
|
|
@@ -13,7 +13,7 @@ export interface MentionProps {
|
|
|
13
13
|
export interface MentionState {
|
|
14
14
|
profilecardProvider: ProfilecardProvider | null;
|
|
15
15
|
}
|
|
16
|
-
export default class Mention extends PureComponent<MentionProps,
|
|
16
|
+
export default class Mention extends PureComponent<MentionProps, Object> {
|
|
17
17
|
private providerFactory;
|
|
18
18
|
constructor(props: MentionProps);
|
|
19
19
|
componentWillUnmount(): void;
|
|
@@ -8,5 +8,5 @@ export interface WithOutsideClickProps {
|
|
|
8
8
|
targetRef?: any;
|
|
9
9
|
closeOnTab?: boolean;
|
|
10
10
|
}
|
|
11
|
-
export default function withReactEditorViewOuterListeners<P extends
|
|
11
|
+
export default function withReactEditorViewOuterListeners<P extends Object>(Component: React.ComponentType<React.PropsWithChildren<P>>): React.ComponentType<React.PropsWithChildren<P & WithOutsideClickProps>>;
|
|
12
12
|
export {};
|
|
@@ -12,5 +12,5 @@ export interface ImageLoaderState {
|
|
|
12
12
|
imageStatus: ImageStatus;
|
|
13
13
|
}
|
|
14
14
|
export type ImageStatus = 'complete' | 'loading' | 'error';
|
|
15
|
-
export declare const withImageLoaderOld: <P extends
|
|
16
|
-
export declare const withImageLoader: <P extends
|
|
15
|
+
export declare const withImageLoaderOld: <P extends Object>(Wrapped: ComponentType<React.PropsWithChildren<P & ImageLoaderProps>>) => React.ComponentClass<P & ImageLoaderProps>;
|
|
16
|
+
export declare const withImageLoader: <P extends Object>(Wrapped: ComponentType<React.PropsWithChildren<P & ImageLoaderProps>>) => React.ComponentClass<P & ImageLoaderProps>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ACTION, type ACTION_SUBJECT, type ACTION_SUBJECT_ID } from './enums';
|
|
2
2
|
import { type UIAEP } from './utils';
|
|
3
|
-
type AvatarButtonViewedAEP = UIAEP<ACTION.VIEWED, ACTION_SUBJECT.BUTTON, ACTION_SUBJECT_ID.AVATAR_GROUP_PLUGIN,
|
|
3
|
+
type AvatarButtonViewedAEP = UIAEP<ACTION.VIEWED, ACTION_SUBJECT.BUTTON, ACTION_SUBJECT_ID.AVATAR_GROUP_PLUGIN, Object, undefined>;
|
|
4
4
|
export type AvatarEventPayload = AvatarButtonViewedAEP;
|
|
5
5
|
export {};
|
|
@@ -20,6 +20,6 @@ export declare enum TOOLBAR_ACTION_SUBJECT_ID {
|
|
|
20
20
|
RECORD_VIDEO = "recordVideo",
|
|
21
21
|
AI = "atlassian-intelligence"
|
|
22
22
|
}
|
|
23
|
-
type ToolbarButtonClickedAEP = UIAEP<ACTION.CLICKED, ACTION_SUBJECT.TOOLBAR_BUTTON, undefined,
|
|
23
|
+
type ToolbarButtonClickedAEP = UIAEP<ACTION.CLICKED, ACTION_SUBJECT.TOOLBAR_BUTTON, undefined, Object, undefined>;
|
|
24
24
|
export type ToolbarEventPayload = ToolbarButtonClickedAEP;
|
|
25
25
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ACTION, ACTION_SUBJECT, EVENT_TYPE } from './enums';
|
|
2
|
-
type AEP<Action, ActionSubject, ActionSubjectID, Attributes, NonPrivacySafeAttributes, EventType, ImplicitAttributes extends
|
|
2
|
+
type AEP<Action, ActionSubject, ActionSubjectID, Attributes, NonPrivacySafeAttributes, EventType, ImplicitAttributes extends Object = {}> = {
|
|
3
3
|
action: Action;
|
|
4
4
|
actionSubject: ActionSubject;
|
|
5
5
|
actionSubjectId?: ActionSubjectID;
|
|
@@ -13,7 +13,7 @@ type AEP<Action, ActionSubject, ActionSubjectID, Attributes, NonPrivacySafeAttri
|
|
|
13
13
|
eventType: EVENT_TYPE.OPERATIONAL;
|
|
14
14
|
});
|
|
15
15
|
export type UIAEP<Action, ActionSubject, ActionSubjectID, Attributes, NonPrivacySafeAttributes> = AEP<Action, ActionSubject, ActionSubjectID, Attributes, NonPrivacySafeAttributes, EVENT_TYPE.UI>;
|
|
16
|
-
export type TrackAEP<Action, ActionSubject, ActionSubjectID, Attributes, NonPrivacySafeAttributes, ImplicitAttributes extends
|
|
16
|
+
export type TrackAEP<Action, ActionSubject, ActionSubjectID, Attributes, NonPrivacySafeAttributes, ImplicitAttributes extends Object = {}> = AEP<Action, ActionSubject, ActionSubjectID, Attributes, NonPrivacySafeAttributes, EVENT_TYPE.TRACK, ImplicitAttributes>;
|
|
17
17
|
export type OperationalAEP<Action, ActionSubject, ActionSubjectID, Attributes> = AEP<Action, ActionSubject, ActionSubjectID, Attributes, undefined, EVENT_TYPE.OPERATIONAL>;
|
|
18
18
|
export type OperationalExposureAEP<Action, ActionSubject, ActionSubjectID, Attributes> = OperationalAEP<Action, ActionSubject, ActionSubjectID, Attributes> & {
|
|
19
19
|
source?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/// <reference path="../../../../../../typings/events.d.ts" />
|
|
2
1
|
/// <reference types="node" />
|
|
3
2
|
/// <reference types="node/events" />
|
|
3
|
+
/// <reference types="typings/events" />
|
|
4
4
|
import { EventEmitter } from 'events';
|
|
5
5
|
export type UpdateEvent = 'create' | 'delete' | 'resolve' | 'unresolve' | 'setselectedannotation' | 'sethoveredannotation' | 'removehoveredannotation';
|
|
6
6
|
export type VisibilityEvent = 'setvisibility';
|
|
@@ -6,8 +6,8 @@ type AlignmentState = 'start' | 'end' | 'center';
|
|
|
6
6
|
export declare function addParagraphAtEnd(tr: Transaction): void;
|
|
7
7
|
export declare function createParagraphAtEnd(): Command;
|
|
8
8
|
export declare const changeImageAlignment: (align?: AlignmentState) => Command;
|
|
9
|
-
export declare const createToggleBlockMarkOnRange: <T extends
|
|
10
|
-
export declare const createToggleInlineMarkOnRange: <T extends
|
|
9
|
+
export declare const createToggleBlockMarkOnRange: <T extends Object = object>(markType: MarkType, getAttrs: (prevAttrs?: T, node?: PMNode) => T | undefined | false, allowedBlocks?: NodeType[] | ((schema: Schema, node: PMNode, parent: PMNode | null) => boolean) | undefined) => (from: number, to: number, tr: Transaction, state: EditorState) => boolean;
|
|
10
|
+
export declare const createToggleInlineMarkOnRange: <T extends Object = object>(markType: MarkType, getAttrs: (prevAttrs?: T, node?: PMNode) => T | undefined | false) => (from: number, to: number, tr: Transaction, state: EditorState) => boolean;
|
|
11
11
|
/**
|
|
12
12
|
* Toggles block mark based on the return type of `getAttrs`.
|
|
13
13
|
* This is similar to ProseMirror's `getAttrs` from `AttributeSpec`
|
|
@@ -15,7 +15,7 @@ export declare const createToggleInlineMarkOnRange: <T extends {} = object>(mark
|
|
|
15
15
|
* return `undefined for no-op.
|
|
16
16
|
* return an `object` to update the mark.
|
|
17
17
|
*/
|
|
18
|
-
export declare const toggleBlockMark: <T extends
|
|
18
|
+
export declare const toggleBlockMark: <T extends Object = object>(markType: MarkType, getAttrs: (prevAttrs?: T, node?: PMNode) => T | undefined | false, allowedBlocks?: NodeType[] | ((schema: Schema, node: PMNode, parent: PMNode | null) => boolean) | undefined) => Command;
|
|
19
19
|
export declare const clearEditorContent: Command;
|
|
20
20
|
export declare function findCutBefore($pos: ResolvedPos): ResolvedPos | null;
|
|
21
21
|
/**
|
|
@@ -43,8 +43,7 @@ export type GuidelinePluginState = {
|
|
|
43
43
|
guidelines: GuidelineConfig[];
|
|
44
44
|
rect?: GuidelineContainerRect;
|
|
45
45
|
};
|
|
46
|
-
export
|
|
47
|
-
}
|
|
46
|
+
export type GuidelinePluginOptions = Object;
|
|
48
47
|
export type DisplayGrid = (props: GuidelinePluginState) => boolean;
|
|
49
48
|
export type DisplayGuideline = (view: EditorView) => DisplayGrid;
|
|
50
49
|
export type GuidelineSnap = {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { BasePluginDependenciesAPI, EditorInjectionAPI, ExtractInjectionAPI, NextEditorPlugin } from '../types/next-editor-plugin';
|
|
2
2
|
type NamedPluginStatesFromInjectionAPI<API extends ExtractInjectionAPI<NextEditorPlugin<any, any>>, PluginNames extends string | number | symbol> = Readonly<{
|
|
3
|
-
[K in PluginNames as `${K extends string ? K : never}State`]: API[K] extends
|
|
3
|
+
[K in PluginNames as `${K extends string ? K : never}State`]: API[K] extends // eslint-disable-next-line @typescript-eslint/no-explicit-any -- Ignored via go/ees005
|
|
4
|
+
BasePluginDependenciesAPI<any> | undefined ? ReturnType<API[K]['sharedState']['currentState']> : never;
|
|
4
5
|
}>;
|
|
5
6
|
type ExtractPluginNames<API extends EditorInjectionAPI<any, any>> = keyof API;
|
|
6
7
|
type Cleanup = () => void;
|
|
@@ -5,7 +5,7 @@ import type { Command, EditorAppearance } from '../../../types';
|
|
|
5
5
|
/**
|
|
6
6
|
* Returns a type that matches T but where keys (K) are now optional
|
|
7
7
|
*/
|
|
8
|
-
type OptionalKeys<T extends
|
|
8
|
+
type OptionalKeys<T extends Object, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
9
9
|
export interface EditorLinkPickerProps extends OptionalKeys<React.ComponentProps<typeof LazyLinkPicker>, 'onCancel'> {
|
|
10
10
|
view: EditorView;
|
|
11
11
|
/**
|