@atlaskit/editor-common 72.1.2 → 72.2.1
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 +21 -0
- package/dist/cjs/__tests_external__/cases/fundamentals/collection.js +0 -5
- package/dist/cjs/__tests_external__/cases/fundamentals/test-cases/editor-is-present.js +0 -4
- package/dist/cjs/__tests_external__/cases/fundamentals/test-cases/editor-typing.js +0 -8
- package/dist/cjs/__tests_external__/cases/smart-links/index.js +0 -4
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/block/delete.js +1 -8
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/block/edit.js +2 -12
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/block/index.js +0 -6
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/block/insert.js +1 -8
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/embed/delete.js +1 -8
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/embed/edit.js +2 -12
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/embed/index.js +0 -6
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/embed/insert.js +1 -8
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/inline/delete.js +1 -8
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/inline/edit.js +2 -12
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/inline/index.js +0 -7
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/inline/insert.js +1 -8
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/inline/unlink.js +1 -8
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/url/index.js +0 -4
- package/dist/cjs/__tests_external__/cases/smart-links/test-cases/url/insert.js +1 -8
- package/dist/cjs/__tests_external__/index.js +0 -3
- package/dist/cjs/__tests_external__/page-objects/Editor.js +0 -16
- package/dist/cjs/__tests_external__/page-objects/EditorSmartLink.js +0 -29
- package/dist/cjs/__tests_external__/page-objects/Renderer.js +0 -14
- package/dist/cjs/analytics/index.js +0 -1
- package/dist/cjs/analytics/types/enums.js +1 -16
- package/dist/cjs/analytics/types/extension-events.js +0 -4
- package/dist/cjs/analytics/types/format-events.js +0 -3
- package/dist/cjs/analytics/types/general-events.js +0 -7
- package/dist/cjs/analytics/types/index.js +0 -14
- package/dist/cjs/analytics/types/inline-comment-events.js +0 -1
- package/dist/cjs/analytics/types/insert-events.js +0 -7
- package/dist/cjs/analytics/types/list-events.js +0 -3
- package/dist/cjs/analytics/types/node-events.js +0 -3
- package/dist/cjs/analytics/types/substitute-events.js +0 -3
- package/dist/cjs/analytics/types/table-events.js +0 -4
- package/dist/cjs/analytics/types/toolbar-button.js +0 -1
- package/dist/cjs/analytics/types/utils.js +0 -3
- package/dist/cjs/core-utils/index.js +0 -1
- package/dist/cjs/core-utils/inside.js +2 -5
- package/dist/cjs/emoji.js +0 -3
- package/dist/cjs/event-dispatcher/index.js +0 -14
- package/dist/cjs/extensions/combine-extension-providers.js +2 -6
- package/dist/cjs/extensions/default-extension-provider.js +0 -26
- package/dist/cjs/extensions/extension-fields-helpers.js +0 -35
- package/dist/cjs/extensions/extension-handlers.js +0 -27
- package/dist/cjs/extensions/index.js +0 -8
- package/dist/cjs/extensions/manifest-helpers.js +4 -30
- package/dist/cjs/extensions/module-helpers.js +17 -89
- package/dist/cjs/extensions/types/field-definitions.js +1 -10
- package/dist/cjs/extensions/types/index.js +0 -1
- package/dist/cjs/extensions.js +0 -1
- package/dist/cjs/i18n/cs.js +0 -1
- package/dist/cjs/i18n/da.js +0 -1
- package/dist/cjs/i18n/de.js +0 -1
- package/dist/cjs/i18n/en.js +0 -1
- package/dist/cjs/i18n/en_GB.js +0 -1
- package/dist/cjs/i18n/en_ZZ.js +0 -1
- package/dist/cjs/i18n/es.js +0 -1
- package/dist/cjs/i18n/et.js +0 -1
- package/dist/cjs/i18n/fi.js +0 -1
- package/dist/cjs/i18n/fr.js +0 -1
- package/dist/cjs/i18n/hu.js +0 -1
- package/dist/cjs/i18n/index.js +0 -27
- package/dist/cjs/i18n/it.js +0 -1
- package/dist/cjs/i18n/ja.js +0 -1
- package/dist/cjs/i18n/ko.js +0 -1
- package/dist/cjs/i18n/languages.js +0 -1
- package/dist/cjs/i18n/nb.js +0 -1
- package/dist/cjs/i18n/nl.js +0 -1
- package/dist/cjs/i18n/pl.js +0 -1
- package/dist/cjs/i18n/pt_BR.js +0 -1
- package/dist/cjs/i18n/pt_PT.js +0 -1
- package/dist/cjs/i18n/ru.js +0 -1
- package/dist/cjs/i18n/sk.js +0 -1
- package/dist/cjs/i18n/sv.js +0 -1
- package/dist/cjs/i18n/th.js +0 -1
- package/dist/cjs/i18n/tr.js +0 -1
- package/dist/cjs/i18n/uk.js +0 -1
- package/dist/cjs/i18n/vi.js +0 -1
- package/dist/cjs/i18n/zh.js +0 -1
- package/dist/cjs/i18n/zh_TW.js +0 -1
- package/dist/cjs/icons/index.js +0 -11
- package/dist/cjs/icons/shared/PanelErrorIcon.js +0 -7
- package/dist/cjs/icons/shared/PanelInfoIcon.js +0 -7
- package/dist/cjs/icons/shared/PanelNoteIcon.js +0 -7
- package/dist/cjs/icons/shared/PanelSuccessIcon.js +0 -7
- package/dist/cjs/icons/shared/PanelWarningIcon.js +0 -7
- package/dist/cjs/icons/shared/table.js +1 -3
- package/dist/cjs/in-product.js +0 -1
- package/dist/cjs/keymaps/index.js +2 -50
- package/dist/cjs/mention.js +0 -3
- package/dist/cjs/messages/codeBidiWarning.js +0 -2
- package/dist/cjs/messages/codeBlockCopyButton.js +0 -2
- package/dist/cjs/messages/index.js +0 -8
- package/dist/cjs/messages/insert-block.js +0 -2
- package/dist/cjs/messages/link.js +0 -2
- package/dist/cjs/messages/unsupportedContent.js +0 -2
- package/dist/cjs/node-width/index.js +2 -20
- package/dist/cjs/normalize-feature-flags.js +6 -25
- package/dist/cjs/panel.js +0 -1
- package/dist/cjs/provider-factory/context.js +3 -17
- package/dist/cjs/provider-factory/provider-factory.js +0 -19
- package/dist/cjs/provider-factory/with-providers.js +5 -28
- package/dist/cjs/provider-factory.js +0 -4
- package/dist/cjs/provider-helpers/combine-providers.js +3 -33
- package/dist/cjs/provider-helpers/index.js +0 -2
- package/dist/cjs/provider-helpers/promise-helpers.js +3 -15
- package/dist/cjs/react-node-view/index.js +18 -48
- package/dist/cjs/safe-plugin/index.js +1 -14
- package/dist/cjs/selection/gap-cursor/selection.js +8 -44
- package/dist/cjs/selection/gap-cursor/utils/index.js +0 -2
- package/dist/cjs/selection/gap-cursor/utils/is-ignored.js +0 -2
- package/dist/cjs/selection/gap-cursor/utils/is-valid-target-node.js +0 -3
- package/dist/cjs/selection/index.js +0 -4
- package/dist/cjs/selection/types.js +0 -1
- package/dist/cjs/selection/utils.js +0 -12
- package/dist/cjs/styles/index.js +0 -23
- package/dist/cjs/styles/shared/annotation.js +0 -11
- package/dist/cjs/styles/shared/block-marks.js +0 -5
- package/dist/cjs/styles/shared/blockquote.js +0 -7
- package/dist/cjs/styles/shared/code-block.js +0 -11
- package/dist/cjs/styles/shared/code-mark.js +0 -9
- package/dist/cjs/styles/shared/column-layout.js +0 -6
- package/dist/cjs/styles/shared/date.js +0 -5
- package/dist/cjs/styles/shared/emoji.js +0 -2
- package/dist/cjs/styles/shared/extension.js +0 -2
- package/dist/cjs/styles/shared/headings.js +0 -7
- package/dist/cjs/styles/shared/indentation.js +0 -5
- package/dist/cjs/styles/shared/layout.js +0 -2
- package/dist/cjs/styles/shared/link.js +0 -5
- package/dist/cjs/styles/shared/lists.js +2 -21
- package/dist/cjs/styles/shared/media-single.js +0 -5
- package/dist/cjs/styles/shared/panel.js +15 -41
- package/dist/cjs/styles/shared/paragraph.js +0 -6
- package/dist/cjs/styles/shared/rule.js +2 -10
- package/dist/cjs/styles/shared/shadow.js +1 -9
- package/dist/cjs/styles/shared/smart-card.js +0 -3
- package/dist/cjs/styles/shared/table.js +0 -20
- package/dist/cjs/styles/shared/task-decision.js +0 -6
- package/dist/cjs/styles/shared/text-color.js +0 -5
- package/dist/cjs/styles/shared/whitespace.js +0 -5
- package/dist/cjs/transforms/expand.js +7 -16
- package/dist/cjs/transforms/extension.js +2 -7
- package/dist/cjs/transforms/index.js +0 -3
- package/dist/cjs/transforms/layout.js +9 -15
- package/dist/cjs/type-ahead/index.js +0 -3
- package/dist/cjs/types/annotation/emitter.js +0 -11
- package/dist/cjs/types/annotation/index.js +0 -1
- package/dist/cjs/types/index.js +0 -4
- package/dist/cjs/types/toolbar.js +0 -5
- package/dist/cjs/ufo/experience-store.js +0 -24
- package/dist/cjs/ufo/index.js +0 -1
- package/dist/cjs/ui/BaseTheme/index.js +3 -21
- package/dist/cjs/ui/Caption/index.js +5 -29
- package/dist/cjs/ui/Caption/messages.js +0 -2
- package/dist/cjs/ui/DropList/index.js +18 -51
- package/dist/cjs/ui/Emoji/index.js +7 -33
- package/dist/cjs/ui/ErrorBoundary/index.js +0 -22
- package/dist/cjs/ui/Expand/index.js +5 -31
- package/dist/cjs/ui/IntlErrorBoundary/index.js +0 -24
- package/dist/cjs/ui/IntlProviderIfMissingWrapper/index.js +0 -9
- package/dist/cjs/ui/Layer/index.js +16 -46
- package/dist/cjs/ui/Layer/internal/helpers.js +0 -2
- package/dist/cjs/ui/MediaSingle/grid.js +0 -8
- package/dist/cjs/ui/MediaSingle/index.js +26 -44
- package/dist/cjs/ui/MediaSingle/link.js +0 -5
- package/dist/cjs/ui/MediaSingle/styled.js +11 -50
- package/dist/cjs/ui/Mention/index.js +5 -27
- package/dist/cjs/ui/Mention/mention-with-profilecard.js +8 -16
- package/dist/cjs/ui/Mention/mention-with-providers.js +5 -33
- package/dist/cjs/ui/Messages/index.js +0 -18
- package/dist/cjs/ui/OverflowShadow/index.js +3 -48
- package/dist/cjs/ui/OverflowShadow/shadowObserver.js +2 -26
- package/dist/cjs/ui/Popup/index.js +28 -80
- package/dist/cjs/ui/Popup/utils.js +67 -132
- package/dist/cjs/ui/PortalProvider/PortalProviderThemesProvider.js +3 -13
- package/dist/cjs/ui/PortalProvider/index.js +16 -73
- package/dist/cjs/ui/UnsupportedBlock/index.js +5 -29
- package/dist/cjs/ui/UnsupportedInline/index.js +5 -29
- package/dist/cjs/ui/WidthProvider/index.js +1 -31
- package/dist/cjs/ui/WithCreateAnalyticsEvent/index.js +2 -16
- package/dist/cjs/ui/clear-next-sibling-margin-top.js +0 -5
- package/dist/cjs/ui/index.js +0 -23
- package/dist/cjs/ui/unsupported-content-helper.js +0 -5
- package/dist/cjs/ui/with-outer-listeners.js +0 -25
- package/dist/cjs/ui-color/ColorPalette/Color/index.js +12 -40
- package/dist/cjs/ui-color/ColorPalette/Color/styles.js +0 -10
- package/dist/cjs/ui-color/ColorPalette/Palettes/cellBackgroundColorPalette.js +0 -7
- package/dist/cjs/ui-color/ColorPalette/Palettes/common.js +4 -12
- package/dist/cjs/ui-color/ColorPalette/Palettes/getColorMessage.js +0 -3
- package/dist/cjs/ui-color/ColorPalette/Palettes/index.js +0 -1
- package/dist/cjs/ui-color/ColorPalette/Palettes/paletteMessages.js +0 -3
- package/dist/cjs/ui-color/ColorPalette/Palettes/paletteMessagesTokenModeNames.js +0 -8
- package/dist/cjs/ui-color/ColorPalette/Palettes/panelBackgroundPalette.js +0 -10
- package/dist/cjs/ui-color/ColorPalette/Palettes/statusColorPalette.js +0 -7
- package/dist/cjs/ui-color/ColorPalette/Palettes/textColorPalette.js +2 -9
- package/dist/cjs/ui-color/ColorPalette/index.js +16 -38
- package/dist/cjs/ui-color/ColorPalette/styles.js +0 -6
- package/dist/cjs/ui-color/index.js +0 -9
- package/dist/cjs/ui-menu/Dropdown/index.js +15 -39
- package/dist/cjs/ui-menu/DropdownMenu/index.js +43 -79
- package/dist/cjs/ui-menu/MenuArrowKeyNavigationProvider/index.js +66 -82
- package/dist/cjs/ui-menu/ToolbarButton/index.js +23 -46
- package/dist/cjs/ui-menu/ToolbarButton/styles.js +0 -6
- package/dist/cjs/ui-menu/index.js +0 -7
- package/dist/cjs/ui-react/ReactEditorViewContext.js +0 -4
- package/dist/cjs/ui-react/index.js +0 -3
- package/dist/cjs/ui-react/with-react-editor-view-outer-listeners.js +12 -52
- package/dist/cjs/utils/analytics.js +0 -14
- package/dist/cjs/utils/annotation/index.js +5 -13
- package/dist/cjs/utils/breakout.js +7 -23
- package/dist/cjs/utils/browser-extensions.js +28 -56
- package/dist/cjs/utils/browser.js +0 -2
- package/dist/cjs/utils/builder.js +0 -10
- package/dist/cjs/utils/collab.js +0 -4
- package/dist/cjs/utils/compare-props.js +11 -25
- package/dist/cjs/utils/compareNodes.js +7 -53
- package/dist/cjs/utils/compose.js +0 -2
- package/dist/cjs/utils/date.js +4 -25
- package/dist/cjs/utils/dom.js +6 -29
- package/dist/cjs/utils/editor-core-utils.js +8 -33
- package/dist/cjs/utils/error-reporter.js +0 -7
- package/dist/cjs/utils/extension-handler.js +0 -3
- package/dist/cjs/utils/get-performance-options.js +4 -12
- package/dist/cjs/utils/getModeFromTheme.js +0 -1
- package/dist/cjs/utils/imageLoader.js +0 -27
- package/dist/cjs/utils/index.js +0 -40
- package/dist/cjs/utils/is-text-input.js +5 -11
- package/dist/cjs/utils/list.js +3 -13
- package/dist/cjs/utils/macro.js +1 -7
- package/dist/cjs/utils/nodes.js +4 -31
- package/dist/cjs/utils/outdated-browsers.js +0 -10
- package/dist/cjs/utils/performance/hooks/use-component-render-tracking/index.js +4 -14
- package/dist/cjs/utils/performance/is-performance-api-available.js +0 -4
- package/dist/cjs/utils/performance/measure-render.js +1 -11
- package/dist/cjs/utils/performance/measure-tti.js +3 -17
- package/dist/cjs/utils/performance/measure.js +0 -11
- package/dist/cjs/utils/performance/navigation.js +0 -5
- package/dist/cjs/utils/plugin-state-factory.js +3 -11
- package/dist/cjs/utils/profiler/render-count.js +4 -24
- package/dist/cjs/utils/referentiality.js +30 -88
- package/dist/cjs/utils/sendLogs.js +0 -2
- package/dist/cjs/utils/should-force-tracking.js +4 -7
- package/dist/cjs/utils/slice.js +0 -17
- package/dist/cjs/utils/table.js +4 -13
- package/dist/cjs/utils/track-unsupported-content.js +14 -39
- package/dist/cjs/utils/traversor.js +0 -14
- package/dist/cjs/utils/unsupportedContent/get-unsupported-content-level-data.js +5 -21
- package/dist/cjs/utils/validate-using-spec.js +5 -36
- package/dist/cjs/utils/validator.js +26 -188
- package/dist/cjs/validator.js +0 -1
- package/dist/cjs/version.json +1 -1
- package/dist/cjs/with-plugin-state/index.js +7 -55
- package/dist/es2019/__tests_external__/cases/fundamentals/test-cases/editor-typing.js +0 -3
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/block/delete.js +0 -1
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/block/edit.js +0 -2
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/block/insert.js +0 -1
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/embed/delete.js +0 -1
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/embed/edit.js +0 -2
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/embed/insert.js +0 -1
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/inline/delete.js +0 -1
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/inline/edit.js +0 -2
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/inline/insert.js +0 -1
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/inline/unlink.js +0 -1
- package/dist/es2019/__tests_external__/cases/smart-links/test-cases/url/insert.js +0 -1
- package/dist/es2019/__tests_external__/page-objects/Editor.js +0 -4
- package/dist/es2019/__tests_external__/page-objects/EditorSmartLink.js +0 -28
- package/dist/es2019/__tests_external__/page-objects/Renderer.js +0 -2
- package/dist/es2019/analytics/types/enums.js +1 -16
- package/dist/es2019/analytics/types/extension-events.js +2 -3
- package/dist/es2019/analytics/types/format-events.js +0 -3
- package/dist/es2019/analytics/types/general-events.js +0 -7
- package/dist/es2019/analytics/types/inline-comment-events.js +0 -1
- package/dist/es2019/analytics/types/insert-events.js +0 -7
- package/dist/es2019/analytics/types/list-events.js +0 -3
- package/dist/es2019/analytics/types/node-events.js +0 -3
- package/dist/es2019/analytics/types/substitute-events.js +0 -3
- package/dist/es2019/analytics/types/table-events.js +2 -3
- package/dist/es2019/analytics/types/toolbar-button.js +0 -1
- package/dist/es2019/analytics/types/utils.js +0 -3
- package/dist/es2019/event-dispatcher/index.js +1 -12
- package/dist/es2019/extensions/combine-extension-providers.js +0 -5
- package/dist/es2019/extensions/default-extension-provider.js +0 -8
- package/dist/es2019/extensions/extension-fields-helpers.js +4 -10
- package/dist/es2019/extensions/extension-handlers.js +1 -8
- package/dist/es2019/extensions/manifest-helpers.js +2 -7
- package/dist/es2019/extensions/module-helpers.js +10 -43
- package/dist/es2019/extensions/types/field-definitions.js +1 -0
- package/dist/es2019/icons/index.js +1 -3
- package/dist/es2019/icons/shared/PanelErrorIcon.js +0 -2
- package/dist/es2019/icons/shared/PanelInfoIcon.js +0 -2
- package/dist/es2019/icons/shared/PanelNoteIcon.js +0 -2
- package/dist/es2019/icons/shared/PanelSuccessIcon.js +0 -2
- package/dist/es2019/icons/shared/PanelWarningIcon.js +0 -2
- package/dist/es2019/keymaps/index.js +0 -24
- package/dist/es2019/node-width/index.js +3 -14
- package/dist/es2019/normalize-feature-flags.js +1 -11
- package/dist/es2019/provider-factory/context.js +0 -1
- package/dist/es2019/provider-factory/provider-factory.js +0 -25
- package/dist/es2019/provider-factory/with-providers.js +2 -8
- package/dist/es2019/provider-helpers/combine-providers.js +3 -13
- package/dist/es2019/provider-helpers/promise-helpers.js +3 -10
- package/dist/es2019/react-node-view/index.js +10 -34
- package/dist/es2019/safe-plugin/index.js +1 -1
- package/dist/es2019/selection/gap-cursor/selection.js +6 -31
- package/dist/es2019/selection/types.js +0 -1
- package/dist/es2019/selection/utils.js +0 -8
- package/dist/es2019/styles/shared/headings.js +3 -2
- package/dist/es2019/styles/shared/lists.js +0 -8
- package/dist/es2019/styles/shared/panel.js +13 -12
- package/dist/es2019/styles/shared/paragraph.js +2 -1
- package/dist/es2019/styles/shared/rule.js +2 -1
- package/dist/es2019/styles/shared/shadow.js +2 -0
- package/dist/es2019/styles/shared/table.js +1 -5
- package/dist/es2019/transforms/expand.js +3 -3
- package/dist/es2019/transforms/extension.js +3 -4
- package/dist/es2019/transforms/layout.js +9 -10
- package/dist/es2019/type-ahead/index.js +0 -3
- package/dist/es2019/types/annotation/emitter.js +0 -8
- package/dist/es2019/types/index.js +0 -2
- package/dist/es2019/types/toolbar.js +0 -5
- package/dist/es2019/ufo/experience-store.js +0 -25
- package/dist/es2019/ui/BaseTheme/index.js +0 -2
- package/dist/es2019/ui/Caption/index.js +0 -2
- package/dist/es2019/ui/DropList/index.js +9 -25
- package/dist/es2019/ui/Emoji/index.js +0 -11
- package/dist/es2019/ui/ErrorBoundary/index.js +0 -8
- package/dist/es2019/ui/Expand/index.js +2 -10
- package/dist/es2019/ui/IntlErrorBoundary/index.js +0 -8
- package/dist/es2019/ui/IntlProviderIfMissingWrapper/index.js +0 -4
- package/dist/es2019/ui/Layer/index.js +13 -29
- package/dist/es2019/ui/Layer/internal/helpers.js +0 -2
- package/dist/es2019/ui/MediaSingle/index.js +7 -12
- package/dist/es2019/ui/MediaSingle/styled.js +2 -25
- package/dist/es2019/ui/Mention/index.js +0 -5
- package/dist/es2019/ui/Mention/mention-with-providers.js +0 -8
- package/dist/es2019/ui/Messages/index.js +1 -2
- package/dist/es2019/ui/OverflowShadow/index.js +0 -32
- package/dist/es2019/ui/OverflowShadow/shadowObserver.js +0 -14
- package/dist/es2019/ui/Popup/index.js +11 -59
- package/dist/es2019/ui/Popup/utils.js +18 -57
- package/dist/es2019/ui/PortalProvider/PortalProviderThemesProvider.js +2 -1
- package/dist/es2019/ui/PortalProvider/index.js +7 -35
- package/dist/es2019/ui/UnsupportedBlock/index.js +0 -2
- package/dist/es2019/ui/UnsupportedInline/index.js +0 -2
- package/dist/es2019/ui/WidthProvider/index.js +0 -9
- package/dist/es2019/ui/WithCreateAnalyticsEvent/index.js +0 -1
- package/dist/es2019/ui/clear-next-sibling-margin-top.js +2 -1
- package/dist/es2019/ui/unsupported-content-helper.js +0 -4
- package/dist/es2019/ui/with-outer-listeners.js +0 -8
- package/dist/es2019/ui-color/ColorPalette/Color/index.js +0 -10
- package/dist/es2019/ui-color/ColorPalette/Color/styles.js +1 -4
- package/dist/es2019/ui-color/ColorPalette/Palettes/common.js +2 -4
- package/dist/es2019/ui-color/ColorPalette/Palettes/getColorMessage.js +0 -2
- package/dist/es2019/ui-color/ColorPalette/Palettes/paletteMessagesTokenModeNames.js +5 -3
- package/dist/es2019/ui-color/ColorPalette/Palettes/panelBackgroundPalette.js +4 -4
- package/dist/es2019/ui-color/ColorPalette/Palettes/statusColorPalette.js +0 -2
- package/dist/es2019/ui-color/ColorPalette/Palettes/textColorPalette.js +2 -3
- package/dist/es2019/ui-color/ColorPalette/index.js +3 -10
- package/dist/es2019/ui-menu/Dropdown/index.js +1 -8
- package/dist/es2019/ui-menu/DropdownMenu/index.js +23 -27
- package/dist/es2019/ui-menu/MenuArrowKeyNavigationProvider/index.js +59 -73
- package/dist/es2019/ui-menu/ToolbarButton/index.js +2 -6
- package/dist/es2019/ui-react/with-react-editor-view-outer-listeners.js +7 -25
- package/dist/es2019/utils/analytics.js +0 -8
- package/dist/es2019/utils/annotation/index.js +3 -7
- package/dist/es2019/utils/breakout.js +6 -13
- package/dist/es2019/utils/browser-extensions.js +10 -22
- package/dist/es2019/utils/browser.js +0 -2
- package/dist/es2019/utils/builder.js +0 -2
- package/dist/es2019/utils/collab.js +0 -2
- package/dist/es2019/utils/compare-props.js +5 -4
- package/dist/es2019/utils/compareNodes.js +3 -42
- package/dist/es2019/utils/date.js +4 -11
- package/dist/es2019/utils/dom.js +6 -19
- package/dist/es2019/utils/editor-core-utils.js +6 -11
- package/dist/es2019/utils/error-reporter.js +0 -4
- package/dist/es2019/utils/get-performance-options.js +3 -3
- package/dist/es2019/utils/imageLoader.js +0 -11
- package/dist/es2019/utils/is-text-input.js +1 -2
- package/dist/es2019/utils/list.js +3 -7
- package/dist/es2019/utils/macro.js +0 -3
- package/dist/es2019/utils/nodes.js +3 -11
- package/dist/es2019/utils/outdated-browsers.js +0 -8
- package/dist/es2019/utils/performance/hooks/use-component-render-tracking/index.js +0 -4
- package/dist/es2019/utils/performance/is-performance-api-available.js +0 -1
- package/dist/es2019/utils/performance/measure-render.js +2 -10
- package/dist/es2019/utils/performance/measure-tti.js +3 -11
- package/dist/es2019/utils/performance/measure.js +0 -6
- package/dist/es2019/utils/performance/navigation.js +0 -3
- package/dist/es2019/utils/plugin-state-factory.js +1 -10
- package/dist/es2019/utils/profiler/render-count.js +10 -23
- package/dist/es2019/utils/referentiality.js +24 -65
- package/dist/es2019/utils/should-force-tracking.js +2 -1
- package/dist/es2019/utils/slice.js +1 -9
- package/dist/es2019/utils/table.js +2 -6
- package/dist/es2019/utils/track-unsupported-content.js +6 -11
- package/dist/es2019/utils/traversor.js +0 -13
- package/dist/es2019/utils/unsupportedContent/get-unsupported-content-level-data.js +3 -15
- package/dist/es2019/utils/validate-using-spec.js +3 -25
- package/dist/es2019/utils/validator.js +10 -149
- package/dist/es2019/version.json +1 -1
- package/dist/es2019/with-plugin-state/index.js +5 -46
- package/dist/esm/__tests_external__/cases/fundamentals/test-cases/editor-typing.js +0 -3
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/block/delete.js +1 -2
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/block/edit.js +2 -4
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/block/insert.js +1 -2
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/embed/delete.js +1 -2
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/embed/edit.js +2 -4
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/embed/insert.js +1 -2
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/inline/delete.js +1 -2
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/inline/edit.js +2 -4
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/inline/insert.js +1 -2
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/inline/unlink.js +1 -2
- package/dist/esm/__tests_external__/cases/smart-links/test-cases/url/insert.js +1 -2
- package/dist/esm/__tests_external__/page-objects/Editor.js +0 -9
- package/dist/esm/__tests_external__/page-objects/EditorSmartLink.js +0 -23
- package/dist/esm/__tests_external__/page-objects/Renderer.js +0 -8
- package/dist/esm/analytics/types/enums.js +1 -16
- package/dist/esm/analytics/types/extension-events.js +2 -3
- package/dist/esm/analytics/types/format-events.js +0 -3
- package/dist/esm/analytics/types/general-events.js +0 -7
- package/dist/esm/analytics/types/inline-comment-events.js +0 -1
- package/dist/esm/analytics/types/insert-events.js +0 -7
- package/dist/esm/analytics/types/list-events.js +0 -3
- package/dist/esm/analytics/types/node-events.js +0 -3
- package/dist/esm/analytics/types/substitute-events.js +0 -3
- package/dist/esm/analytics/types/table-events.js +2 -3
- package/dist/esm/analytics/types/toolbar-button.js +0 -1
- package/dist/esm/analytics/types/utils.js +0 -3
- package/dist/esm/core-utils/inside.js +2 -2
- package/dist/esm/event-dispatcher/index.js +1 -9
- package/dist/esm/extensions/combine-extension-providers.js +2 -4
- package/dist/esm/extensions/default-extension-provider.js +0 -22
- package/dist/esm/extensions/extension-fields-helpers.js +3 -29
- package/dist/esm/extensions/extension-handlers.js +1 -18
- package/dist/esm/extensions/manifest-helpers.js +4 -17
- package/dist/esm/extensions/module-helpers.js +17 -74
- package/dist/esm/extensions/types/field-definitions.js +1 -0
- package/dist/esm/icons/index.js +1 -3
- package/dist/esm/icons/shared/PanelErrorIcon.js +0 -2
- package/dist/esm/icons/shared/PanelInfoIcon.js +0 -2
- package/dist/esm/icons/shared/PanelNoteIcon.js +0 -2
- package/dist/esm/icons/shared/PanelSuccessIcon.js +0 -2
- package/dist/esm/icons/shared/PanelWarningIcon.js +0 -2
- package/dist/esm/keymaps/index.js +2 -28
- package/dist/esm/node-width/index.js +3 -14
- package/dist/esm/normalize-feature-flags.js +6 -19
- package/dist/esm/provider-factory/context.js +3 -5
- package/dist/esm/provider-factory/provider-factory.js +0 -18
- package/dist/esm/provider-factory/with-providers.js +5 -23
- package/dist/esm/provider-helpers/combine-providers.js +3 -27
- package/dist/esm/provider-helpers/promise-helpers.js +3 -10
- package/dist/esm/react-node-view/index.js +18 -42
- package/dist/esm/safe-plugin/index.js +1 -7
- package/dist/esm/selection/gap-cursor/selection.js +8 -35
- package/dist/esm/selection/types.js +0 -1
- package/dist/esm/selection/utils.js +0 -8
- package/dist/esm/styles/shared/annotation.js +0 -2
- package/dist/esm/styles/shared/block-marks.js +0 -2
- package/dist/esm/styles/shared/blockquote.js +0 -2
- package/dist/esm/styles/shared/code-block.js +0 -2
- package/dist/esm/styles/shared/code-mark.js +0 -2
- package/dist/esm/styles/shared/column-layout.js +0 -2
- package/dist/esm/styles/shared/date.js +0 -2
- package/dist/esm/styles/shared/headings.js +3 -4
- package/dist/esm/styles/shared/indentation.js +0 -2
- package/dist/esm/styles/shared/link.js +0 -2
- package/dist/esm/styles/shared/lists.js +2 -13
- package/dist/esm/styles/shared/media-single.js +0 -2
- package/dist/esm/styles/shared/panel.js +15 -17
- package/dist/esm/styles/shared/paragraph.js +2 -3
- package/dist/esm/styles/shared/rule.js +2 -3
- package/dist/esm/styles/shared/shadow.js +2 -2
- package/dist/esm/styles/shared/table.js +1 -8
- package/dist/esm/styles/shared/task-decision.js +0 -2
- package/dist/esm/styles/shared/text-color.js +0 -2
- package/dist/esm/styles/shared/whitespace.js +0 -2
- package/dist/esm/transforms/expand.js +7 -7
- package/dist/esm/transforms/extension.js +3 -4
- package/dist/esm/transforms/layout.js +9 -10
- package/dist/esm/type-ahead/index.js +0 -3
- package/dist/esm/types/annotation/emitter.js +0 -6
- package/dist/esm/types/index.js +0 -2
- package/dist/esm/types/toolbar.js +0 -5
- package/dist/esm/ufo/experience-store.js +0 -19
- package/dist/esm/ui/BaseTheme/index.js +3 -7
- package/dist/esm/ui/Caption/index.js +5 -14
- package/dist/esm/ui/DropList/index.js +18 -47
- package/dist/esm/ui/Emoji/index.js +7 -26
- package/dist/esm/ui/ErrorBoundary/index.js +0 -14
- package/dist/esm/ui/Expand/index.js +5 -15
- package/dist/esm/ui/IntlErrorBoundary/index.js +0 -16
- package/dist/esm/ui/IntlProviderIfMissingWrapper/index.js +0 -4
- package/dist/esm/ui/Layer/index.js +16 -39
- package/dist/esm/ui/Layer/internal/helpers.js +0 -2
- package/dist/esm/ui/MediaSingle/index.js +25 -32
- package/dist/esm/ui/MediaSingle/link.js +0 -2
- package/dist/esm/ui/MediaSingle/styled.js +11 -39
- package/dist/esm/ui/Mention/index.js +5 -18
- package/dist/esm/ui/Mention/mention-with-profilecard.js +8 -8
- package/dist/esm/ui/Mention/mention-with-providers.js +5 -21
- package/dist/esm/ui/Messages/index.js +1 -4
- package/dist/esm/ui/OverflowShadow/index.js +3 -46
- package/dist/esm/ui/OverflowShadow/shadowObserver.js +2 -27
- package/dist/esm/ui/Popup/index.js +28 -80
- package/dist/esm/ui/Popup/utils.js +67 -123
- package/dist/esm/ui/PortalProvider/PortalProviderThemesProvider.js +3 -3
- package/dist/esm/ui/PortalProvider/index.js +17 -61
- package/dist/esm/ui/UnsupportedBlock/index.js +5 -11
- package/dist/esm/ui/UnsupportedInline/index.js +5 -11
- package/dist/esm/ui/WidthProvider/index.js +1 -17
- package/dist/esm/ui/WithCreateAnalyticsEvent/index.js +2 -10
- package/dist/esm/ui/clear-next-sibling-margin-top.js +2 -3
- package/dist/esm/ui/unsupported-content-helper.js +0 -4
- package/dist/esm/ui/with-outer-listeners.js +0 -15
- package/dist/esm/ui-color/ColorPalette/Color/index.js +12 -27
- package/dist/esm/ui-color/ColorPalette/Color/styles.js +1 -6
- package/dist/esm/ui-color/ColorPalette/Palettes/common.js +5 -7
- package/dist/esm/ui-color/ColorPalette/Palettes/getColorMessage.js +0 -2
- package/dist/esm/ui-color/ColorPalette/Palettes/paletteMessagesTokenModeNames.js +2 -4
- package/dist/esm/ui-color/ColorPalette/Palettes/panelBackgroundPalette.js +0 -5
- package/dist/esm/ui-color/ColorPalette/Palettes/statusColorPalette.js +0 -2
- package/dist/esm/ui-color/ColorPalette/Palettes/textColorPalette.js +2 -3
- package/dist/esm/ui-color/ColorPalette/index.js +16 -24
- package/dist/esm/ui-color/ColorPalette/styles.js +0 -2
- package/dist/esm/ui-menu/Dropdown/index.js +15 -28
- package/dist/esm/ui-menu/DropdownMenu/index.js +43 -60
- package/dist/esm/ui-menu/MenuArrowKeyNavigationProvider/index.js +66 -78
- package/dist/esm/ui-menu/ToolbarButton/index.js +23 -32
- package/dist/esm/ui-react/with-react-editor-view-outer-listeners.js +12 -41
- package/dist/esm/utils/analytics.js +0 -8
- package/dist/esm/utils/annotation/index.js +5 -9
- package/dist/esm/utils/breakout.js +8 -15
- package/dist/esm/utils/browser-extensions.js +28 -55
- package/dist/esm/utils/browser.js +0 -2
- package/dist/esm/utils/builder.js +0 -4
- package/dist/esm/utils/collab.js +0 -2
- package/dist/esm/utils/compare-props.js +10 -15
- package/dist/esm/utils/compareNodes.js +7 -48
- package/dist/esm/utils/compose.js +0 -1
- package/dist/esm/utils/date.js +4 -11
- package/dist/esm/utils/dom.js +6 -19
- package/dist/esm/utils/editor-core-utils.js +8 -13
- package/dist/esm/utils/error-reporter.js +0 -5
- package/dist/esm/utils/get-performance-options.js +7 -7
- package/dist/esm/utils/imageLoader.js +0 -18
- package/dist/esm/utils/is-text-input.js +5 -6
- package/dist/esm/utils/list.js +3 -7
- package/dist/esm/utils/macro.js +1 -5
- package/dist/esm/utils/nodes.js +5 -13
- package/dist/esm/utils/outdated-browsers.js +0 -8
- package/dist/esm/utils/performance/hooks/use-component-render-tracking/index.js +4 -10
- package/dist/esm/utils/performance/is-performance-api-available.js +0 -1
- package/dist/esm/utils/performance/measure-render.js +2 -9
- package/dist/esm/utils/performance/measure-tti.js +3 -12
- package/dist/esm/utils/performance/measure.js +0 -6
- package/dist/esm/utils/performance/navigation.js +0 -3
- package/dist/esm/utils/plugin-state-factory.js +3 -10
- package/dist/esm/utils/profiler/render-count.js +4 -21
- package/dist/esm/utils/referentiality.js +30 -80
- package/dist/esm/utils/should-force-tracking.js +4 -4
- package/dist/esm/utils/slice.js +1 -10
- package/dist/esm/utils/table.js +4 -8
- package/dist/esm/utils/track-unsupported-content.js +14 -31
- package/dist/esm/utils/traversor.js +0 -13
- package/dist/esm/utils/unsupportedContent/get-unsupported-content-level-data.js +5 -18
- package/dist/esm/utils/validate-using-spec.js +5 -29
- package/dist/esm/utils/validator.js +26 -170
- package/dist/esm/version.json +1 -1
- package/dist/esm/with-plugin-state/index.js +7 -55
- package/dist/types/analytics/types/enums.d.ts +1 -1
- package/dist/types/analytics/types/events.d.ts +3 -2
- package/dist/types/analytics/types/general-events.d.ts +8 -3
- package/dist/types/types/editor-plugin.d.ts +24 -2
- package/dist/types/types/floating-toolbar.d.ts +10 -0
- package/dist/types/types/type-ahead.d.ts +8 -0
- package/dist/types/ui-menu/DropdownMenu/index.d.ts +1 -1
- package/dist/types/ui-menu/DropdownMenu/types.d.ts +1 -0
- package/dist/types/ui-menu/MenuArrowKeyNavigationProvider/index.d.ts +3 -2
- package/dist/types/ui-react/with-react-editor-view-outer-listeners.d.ts +1 -1
- package/package.json +8 -8
package/dist/esm/version.json
CHANGED
|
@@ -5,15 +5,10 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
5
5
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
6
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
7
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
|
-
|
|
9
8
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
10
|
-
|
|
11
9
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
12
|
-
|
|
13
10
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
14
|
-
|
|
15
11
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
16
|
-
|
|
17
12
|
import React from 'react';
|
|
18
13
|
import PropTypes from 'prop-types';
|
|
19
14
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '../analytics';
|
|
@@ -22,7 +17,6 @@ import { analyticsEventKey, startMeasure, stopMeasure } from '../utils';
|
|
|
22
17
|
import { getParticipantsCount } from '../utils/collab';
|
|
23
18
|
var DEFAULT_SAMPLING_RATE = 100;
|
|
24
19
|
var DEFAULT_SLOW_THRESHOLD = 4;
|
|
25
|
-
|
|
26
20
|
/**
|
|
27
21
|
* Wraps component in a high order component that watches state changes of given plugins
|
|
28
22
|
* and passes those states to the wrapped component.
|
|
@@ -41,32 +35,20 @@ var DEFAULT_SLOW_THRESHOLD = 4;
|
|
|
41
35
|
*/
|
|
42
36
|
var WithPluginState = /*#__PURE__*/function (_React$Component) {
|
|
43
37
|
_inherits(WithPluginState, _React$Component);
|
|
44
|
-
|
|
45
38
|
var _super = _createSuper(WithPluginState);
|
|
46
|
-
|
|
47
39
|
function WithPluginState() {
|
|
48
40
|
var _this;
|
|
49
|
-
|
|
50
41
|
_classCallCheck(this, WithPluginState);
|
|
51
|
-
|
|
52
42
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
53
43
|
args[_key] = arguments[_key];
|
|
54
44
|
}
|
|
55
|
-
|
|
56
45
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
57
|
-
|
|
58
46
|
_defineProperty(_assertThisInitialized(_this), "listeners", {});
|
|
59
|
-
|
|
60
47
|
_defineProperty(_assertThisInitialized(_this), "debounce", null);
|
|
61
|
-
|
|
62
48
|
_defineProperty(_assertThisInitialized(_this), "notAppliedState", {});
|
|
63
|
-
|
|
64
49
|
_defineProperty(_assertThisInitialized(_this), "isSubscribed", false);
|
|
65
|
-
|
|
66
50
|
_defineProperty(_assertThisInitialized(_this), "callsCount", 0);
|
|
67
|
-
|
|
68
51
|
_defineProperty(_assertThisInitialized(_this), "state", _this.getPluginsStates(_this.props.plugins, _this.getEditorView(_this.props, _this.context)));
|
|
69
|
-
|
|
70
52
|
_defineProperty(_assertThisInitialized(_this), "handlePluginStateChange", function (propName, pluginName, performanceOptions, skipEqualityCheck) {
|
|
71
53
|
return function (pluginState) {
|
|
72
54
|
// skipEqualityCheck is being used for old plugins since they are mutating plugin state instead of creating a new one
|
|
@@ -79,17 +61,14 @@ var WithPluginState = /*#__PURE__*/function (_React$Component) {
|
|
|
79
61
|
}
|
|
80
62
|
};
|
|
81
63
|
});
|
|
82
|
-
|
|
83
64
|
_defineProperty(_assertThisInitialized(_this), "updateState", function (_ref) {
|
|
84
65
|
var stateSubset = _ref.stateSubset,
|
|
85
|
-
|
|
86
|
-
|
|
66
|
+
pluginName = _ref.pluginName,
|
|
67
|
+
performanceOptions = _ref.performanceOptions;
|
|
87
68
|
_this.notAppliedState = _objectSpread(_objectSpread({}, _this.notAppliedState), stateSubset);
|
|
88
|
-
|
|
89
69
|
if (_this.debounce) {
|
|
90
70
|
window.clearTimeout(_this.debounce);
|
|
91
71
|
}
|
|
92
|
-
|
|
93
72
|
var debounce = _this.props.debounce !== false ? function (fn) {
|
|
94
73
|
return window.setTimeout(fn, 0);
|
|
95
74
|
} : function (fn) {
|
|
@@ -98,13 +77,11 @@ var WithPluginState = /*#__PURE__*/function (_React$Component) {
|
|
|
98
77
|
_this.debounce = debounce(function () {
|
|
99
78
|
var measure = "\uD83E\uDD89".concat(pluginName, "::WithPluginState");
|
|
100
79
|
performanceOptions.trackingEnabled && startMeasure(measure);
|
|
101
|
-
|
|
102
80
|
_this.setState(_this.notAppliedState, function () {
|
|
103
81
|
performanceOptions.trackingEnabled && stopMeasure(measure, function (duration) {
|
|
104
82
|
// Each WithPluginState component will fire analytics event no more than once every `samplingLimit` times
|
|
105
83
|
if (++_this.callsCount % performanceOptions.samplingRate === 0 && duration > performanceOptions.slowThreshold) {
|
|
106
84
|
var _editorView = _this.getEditorView();
|
|
107
|
-
|
|
108
85
|
_this.dispatchAnalyticsEvent({
|
|
109
86
|
action: ACTION.WITH_PLUGIN_STATE_CALLED,
|
|
110
87
|
actionSubject: ACTION_SUBJECT.EDITOR,
|
|
@@ -118,15 +95,12 @@ var WithPluginState = /*#__PURE__*/function (_React$Component) {
|
|
|
118
95
|
}
|
|
119
96
|
});
|
|
120
97
|
});
|
|
121
|
-
|
|
122
98
|
_this.debounce = null;
|
|
123
99
|
_this.notAppliedState = {};
|
|
124
100
|
});
|
|
125
101
|
});
|
|
126
|
-
|
|
127
102
|
_defineProperty(_assertThisInitialized(_this), "dispatchAnalyticsEvent", function (payload) {
|
|
128
103
|
var eventDispatcher = _this.getEventDispatcher();
|
|
129
|
-
|
|
130
104
|
if (eventDispatcher) {
|
|
131
105
|
var dispatch = createDispatch(eventDispatcher);
|
|
132
106
|
dispatch(analyticsEventKey, {
|
|
@@ -134,14 +108,11 @@ var WithPluginState = /*#__PURE__*/function (_React$Component) {
|
|
|
134
108
|
});
|
|
135
109
|
}
|
|
136
110
|
});
|
|
137
|
-
|
|
138
111
|
_defineProperty(_assertThisInitialized(_this), "onContextUpdate", function () {
|
|
139
112
|
_this.subscribe(_this.props);
|
|
140
113
|
});
|
|
141
|
-
|
|
142
114
|
return _this;
|
|
143
115
|
}
|
|
144
|
-
|
|
145
116
|
_createClass(WithPluginState, [{
|
|
146
117
|
key: "getEditorView",
|
|
147
118
|
value: function getEditorView(maybeProps, maybeContext) {
|
|
@@ -161,15 +132,12 @@ var WithPluginState = /*#__PURE__*/function (_React$Component) {
|
|
|
161
132
|
if (!editorView || !plugins) {
|
|
162
133
|
return {};
|
|
163
134
|
}
|
|
164
|
-
|
|
165
135
|
var keys = Object.keys(plugins);
|
|
166
136
|
return keys.reduce(function (acc, propName) {
|
|
167
137
|
var pluginKey = plugins[propName];
|
|
168
|
-
|
|
169
138
|
if (!pluginKey) {
|
|
170
139
|
return acc;
|
|
171
140
|
}
|
|
172
|
-
|
|
173
141
|
acc[propName] = pluginKey.getState(editorView.state);
|
|
174
142
|
return acc;
|
|
175
143
|
}, {});
|
|
@@ -178,20 +146,18 @@ var WithPluginState = /*#__PURE__*/function (_React$Component) {
|
|
|
178
146
|
key: "subscribe",
|
|
179
147
|
value: function subscribe(props) {
|
|
180
148
|
var _uiTracking$samplingR,
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
149
|
+
_uiTracking$slowThres,
|
|
150
|
+
_this2 = this;
|
|
184
151
|
var plugins = props.plugins;
|
|
185
152
|
var eventDispatcher = this.getEventDispatcher(props);
|
|
186
153
|
var editorView = this.getEditorView(props);
|
|
187
|
-
|
|
188
154
|
if (!eventDispatcher || !editorView || this.isSubscribed) {
|
|
189
155
|
return;
|
|
190
|
-
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// TODO: ED-15663
|
|
191
159
|
// Please, do not copy or use this kind of code below
|
|
192
160
|
// @ts-ignore
|
|
193
|
-
|
|
194
|
-
|
|
195
161
|
var fakePluginKey = {
|
|
196
162
|
key: 'analyticsPlugin$',
|
|
197
163
|
getState: function getState(state) {
|
|
@@ -208,27 +174,22 @@ var WithPluginState = /*#__PURE__*/function (_React$Component) {
|
|
|
208
174
|
this.setState(pluginsStates);
|
|
209
175
|
Object.keys(plugins).forEach(function (propName) {
|
|
210
176
|
var pluginKey = plugins[propName];
|
|
211
|
-
|
|
212
177
|
if (!pluginKey) {
|
|
213
178
|
return;
|
|
214
179
|
}
|
|
215
|
-
|
|
216
180
|
var pluginName = pluginKey.key;
|
|
217
181
|
var pluginState = pluginsStates[propName];
|
|
218
182
|
var isPluginWithSubscribe = pluginState && pluginState.subscribe;
|
|
219
|
-
|
|
220
183
|
var handler = _this2.handlePluginStateChange(propName, pluginName, {
|
|
221
184
|
samplingRate: samplingRate,
|
|
222
185
|
slowThreshold: slowThreshold,
|
|
223
186
|
trackingEnabled: trackingEnabled
|
|
224
187
|
}, isPluginWithSubscribe);
|
|
225
|
-
|
|
226
188
|
if (isPluginWithSubscribe) {
|
|
227
189
|
pluginState.subscribe(handler);
|
|
228
190
|
} else {
|
|
229
191
|
eventDispatcher.on(pluginKey.key, handler);
|
|
230
192
|
}
|
|
231
|
-
|
|
232
193
|
_this2.listeners[pluginKey.key] = {
|
|
233
194
|
handler: handler,
|
|
234
195
|
pluginKey: pluginKey
|
|
@@ -239,17 +200,13 @@ var WithPluginState = /*#__PURE__*/function (_React$Component) {
|
|
|
239
200
|
key: "unsubscribe",
|
|
240
201
|
value: function unsubscribe() {
|
|
241
202
|
var _this3 = this;
|
|
242
|
-
|
|
243
203
|
var eventDispatcher = this.getEventDispatcher();
|
|
244
204
|
var editorView = this.getEditorView();
|
|
245
|
-
|
|
246
205
|
if (!eventDispatcher || !editorView || !this.isSubscribed) {
|
|
247
206
|
return;
|
|
248
207
|
}
|
|
249
|
-
|
|
250
208
|
Object.keys(this.listeners).forEach(function (key) {
|
|
251
209
|
var pluginState = _this3.listeners[key].pluginKey.getState(editorView.state);
|
|
252
|
-
|
|
253
210
|
if (pluginState && pluginState.unsubscribe) {
|
|
254
211
|
pluginState.unsubscribe(_this3.listeners[key].handler);
|
|
255
212
|
} else {
|
|
@@ -291,7 +248,6 @@ var WithPluginState = /*#__PURE__*/function (_React$Component) {
|
|
|
291
248
|
if (this.debounce) {
|
|
292
249
|
window.clearTimeout(this.debounce);
|
|
293
250
|
}
|
|
294
|
-
|
|
295
251
|
this.unsubscribeFromContextUpdates(this.context);
|
|
296
252
|
this.unsubscribe();
|
|
297
253
|
}
|
|
@@ -302,15 +258,11 @@ var WithPluginState = /*#__PURE__*/function (_React$Component) {
|
|
|
302
258
|
return render(this.state);
|
|
303
259
|
}
|
|
304
260
|
}]);
|
|
305
|
-
|
|
306
261
|
return WithPluginState;
|
|
307
262
|
}(React.Component);
|
|
308
|
-
|
|
309
263
|
_defineProperty(WithPluginState, "displayName", 'WithPluginState');
|
|
310
|
-
|
|
311
264
|
_defineProperty(WithPluginState, "contextTypes", {
|
|
312
265
|
editorActions: PropTypes.object,
|
|
313
266
|
editorSharedConfig: PropTypes.object
|
|
314
267
|
});
|
|
315
|
-
|
|
316
268
|
export { WithPluginState };
|
|
@@ -89,7 +89,7 @@ export declare enum ACTION {
|
|
|
89
89
|
SYNCHRONY_ENTITY_ERROR = "synchronyEntityError",
|
|
90
90
|
SYNCHRONY_ERROR = "synchronyError",
|
|
91
91
|
TEXT_LINK_MARK_TRANSFORMED = "textLinkMarkTransformed",
|
|
92
|
-
|
|
92
|
+
DEDUPE_MARKS_TRANSFORMED_V2 = "dedupeMarksTransformedV2",
|
|
93
93
|
NODES_MISSING_CONTENT_TRANSFORMED = "nodesMissingContentTransformed",
|
|
94
94
|
INDENTATION_MARKS_TRANSFORMED = "indentationMarksTransformed",
|
|
95
95
|
INVALID_MEDIA_CONTENT_TRANSFORMED = "invalidMediaContentTransformed",
|
|
@@ -90,13 +90,14 @@ declare type SynchronyEntityErrorAEP = OperationalAEP<ACTION.SYNCHRONY_ENTITY_ER
|
|
|
90
90
|
declare type ContentComponentErrorAEP = OperationalAEP<ACTION.ERRORED, ACTION_SUBJECT.CONTENT_COMPONENT, undefined, {
|
|
91
91
|
component: CONTENT_COMPONENT;
|
|
92
92
|
error: string;
|
|
93
|
-
errorStack?: string;
|
|
94
93
|
selection: {
|
|
95
94
|
[key: string]: string;
|
|
96
95
|
};
|
|
97
96
|
position: number;
|
|
98
97
|
docSize: number;
|
|
99
|
-
},
|
|
98
|
+
}, {
|
|
99
|
+
errorStack?: string;
|
|
100
|
+
}>;
|
|
100
101
|
export declare type ErrorEventAttributes = {
|
|
101
102
|
error: Error;
|
|
102
103
|
errorInfo: React.ErrorInfo;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { RichMediaLayout } from '@atlaskit/adf-schema';
|
|
2
|
-
import type { ADFEntityMark } from '@atlaskit/adf-utils/types';
|
|
3
2
|
import type { FeatureFlagKey } from '../../types/feature-flags';
|
|
4
3
|
import { PropsDifference, ShallowPropsDifference } from '../../utils';
|
|
5
4
|
import type { SEVERITY } from '../../utils/analytics';
|
|
@@ -172,8 +171,14 @@ declare type CodeBlockLanguageSelectedAEP = TrackAEP<ACTION.LANGUAGE_SELECTED, A
|
|
|
172
171
|
}, undefined>;
|
|
173
172
|
declare type MediaLinkTransformedAEP = OperationalAEP<ACTION.MEDIA_LINK_TRANSFORMED, ACTION_SUBJECT.EDITOR, undefined, undefined, undefined>;
|
|
174
173
|
declare type TextLinkCodeMarkTransformedAEP = OperationalAEP<ACTION.TEXT_LINK_MARK_TRANSFORMED, ACTION_SUBJECT.EDITOR, undefined, undefined, undefined>;
|
|
175
|
-
declare type DedupeMarksTransformedAEP = OperationalAEP<ACTION.
|
|
176
|
-
|
|
174
|
+
declare type DedupeMarksTransformedAEP = OperationalAEP<ACTION.DEDUPE_MARKS_TRANSFORMED_V2, ACTION_SUBJECT.EDITOR, undefined,
|
|
175
|
+
/** UGC WARNING
|
|
176
|
+
*
|
|
177
|
+
* DO NOT include `mark` attributes - only the types
|
|
178
|
+
*
|
|
179
|
+
*/
|
|
180
|
+
{
|
|
181
|
+
discardedMarkTypes: string[];
|
|
177
182
|
}, undefined>;
|
|
178
183
|
declare type IndentationMarksTransformedAEP = OperationalAEP<ACTION.INDENTATION_MARKS_TRANSFORMED, ACTION_SUBJECT.EDITOR, undefined, undefined, undefined>;
|
|
179
184
|
declare type NodesMissingContentTransformedAEP = OperationalAEP<ACTION.NODES_MISSING_CONTENT_TRANSFORMED, ACTION_SUBJECT.EDITOR, undefined, undefined, undefined>;
|
|
@@ -9,9 +9,20 @@ import type { TypeAheadHandler } from './type-ahead';
|
|
|
9
9
|
import type { UIComponentFactory } from './ui-components';
|
|
10
10
|
export declare type PluginsOptions = {
|
|
11
11
|
[pluginName: string]: any;
|
|
12
|
+
/**
|
|
13
|
+
* Handler returns an array of QuickInsertItem that are added to the Element Browser, Insert Menu and Quick Insert
|
|
14
|
+
*/
|
|
12
15
|
quickInsert?: QuickInsertHandler;
|
|
13
16
|
typeAhead?: TypeAheadHandler;
|
|
17
|
+
/**
|
|
18
|
+
* See: `FloatingToolbarConfig`
|
|
19
|
+
*/
|
|
14
20
|
floatingToolbar?: FloatingToolbarHandler;
|
|
21
|
+
/**
|
|
22
|
+
* Handler returning a React component that is added to the context panel.
|
|
23
|
+
*
|
|
24
|
+
* See https://product-fabric.atlassian.net/wiki/spaces/E/pages/1406016239/Context+Panel
|
|
25
|
+
*/
|
|
15
26
|
contextPanel?: ContextPanelHandler;
|
|
16
27
|
};
|
|
17
28
|
declare type EditorViewStateUpdatedCallbackProps = {
|
|
@@ -34,19 +45,27 @@ export interface EditorPlugin {
|
|
|
34
45
|
*/
|
|
35
46
|
pmPlugins?: (pluginOptions?: any) => Array<PMPlugin>;
|
|
36
47
|
/**
|
|
37
|
-
*
|
|
48
|
+
* A list of `NodeConfig`s with a name and a `NodeSpec`. (`NodeSpec` is imported from @atlaskit/adf-schema)
|
|
49
|
+
*
|
|
38
50
|
*/
|
|
39
51
|
nodes?: () => NodeConfig[];
|
|
40
52
|
/**
|
|
41
|
-
*
|
|
53
|
+
* A list of `MarkConfig`s with a name and a `MarkSpec` (`MarkSpec` is imported from @atlaskit/adf-schema)
|
|
42
54
|
*/
|
|
43
55
|
marks?: () => MarkConfig[];
|
|
44
56
|
/**
|
|
45
57
|
* Optional UI-component that lives inside the actual content-area (like mention-picker, floating toolbar for links, etc.)
|
|
58
|
+
*
|
|
59
|
+
* Handler returns a React component that is added to the top of the editor content area (PluginSlot).
|
|
60
|
+
* Although it’s common to specify a custom mount point (eg. date picker)
|
|
46
61
|
*/
|
|
47
62
|
contentComponent?: UIComponentFactory;
|
|
48
63
|
/**
|
|
49
64
|
* Optional UI-component that will be added to the toolbar at the top of the editor (doesn't exist in the compact-editor).
|
|
65
|
+
*
|
|
66
|
+
* Handler returns a React component that is added to the toolbar at the top of the editor
|
|
67
|
+
*
|
|
68
|
+
* Plugins use <ToolbarButton> component to maintain design consistency.
|
|
50
69
|
*/
|
|
51
70
|
primaryToolbarComponent?: ToolbarUIComponentFactory;
|
|
52
71
|
/**
|
|
@@ -54,6 +73,9 @@ export interface EditorPlugin {
|
|
|
54
73
|
* In compact mode this toolbar lives on the right-hand side of the editor.
|
|
55
74
|
*/
|
|
56
75
|
secondaryToolbarComponent?: UIComponentFactory;
|
|
76
|
+
/**
|
|
77
|
+
* Called after EditorView state is updated.
|
|
78
|
+
*/
|
|
57
79
|
onEditorViewStateUpdated?: (props: EditorViewStateUpdatedCallbackProps) => void;
|
|
58
80
|
}
|
|
59
81
|
export declare type getPosHandler = getPosHandlerNode | boolean;
|
|
@@ -204,6 +204,7 @@ declare type FloatingToolbarExtensionsPlaceholder = {
|
|
|
204
204
|
export declare type FloatingToolbarFallbackItem<T> = FloatingToolbarButton<T> | FloatingToolbarCopyButton | FloatingToolbarDropdown<T> | FloatingToolbarSelect<T> | FloatingToolbarInput<T> | FloatingToolbarSeparator;
|
|
205
205
|
export declare type FloatingToolbarItem<T> = FloatingToolbarButton<T> | FloatingToolbarCopyButton | FloatingToolbarDropdown<T> | FloatingToolbarSelect<T> | FloatingToolbarInput<T> | FloatingToolbarCustom<T> | FloatingToolbarSeparator | FloatingToolbarExtensionsPlaceholder;
|
|
206
206
|
export interface FloatingToolbarConfig {
|
|
207
|
+
/** Used for the ariaLabel on the <Popup /> component */
|
|
207
208
|
title: string;
|
|
208
209
|
/**
|
|
209
210
|
* Override the DOM reference used to apply as the target for the
|
|
@@ -213,17 +214,26 @@ export interface FloatingToolbarConfig {
|
|
|
213
214
|
* head of the current selection.
|
|
214
215
|
*/
|
|
215
216
|
getDomRef?: (view: EditorView) => HTMLElement | undefined;
|
|
217
|
+
/** Can prevent the Toolbar from rendering */
|
|
216
218
|
visible?: boolean;
|
|
217
219
|
/**
|
|
218
220
|
* nodeType or list of `nodeType`s this floating toolbar should be shown for.
|
|
219
221
|
**/
|
|
220
222
|
nodeType: NodeType | NodeType[];
|
|
223
|
+
/** Items that will populate the Toolbar.
|
|
224
|
+
*
|
|
225
|
+
* See: `FloatingToolbarItem`
|
|
226
|
+
*/
|
|
221
227
|
items: Array<FloatingToolbarItem<Command>> | ((node: Node) => Array<FloatingToolbarItem<Command>>);
|
|
222
228
|
align?: AlignType;
|
|
229
|
+
/** Class added to Toolbar wrapper */
|
|
223
230
|
className?: string;
|
|
231
|
+
/** Toolbar height */
|
|
224
232
|
height?: number;
|
|
233
|
+
/** Toolbar width */
|
|
225
234
|
width?: number;
|
|
226
235
|
zIndex?: number;
|
|
236
|
+
/** Offset the position of the toolbar. */
|
|
227
237
|
offset?: [number, number];
|
|
228
238
|
forcePlacement?: boolean;
|
|
229
239
|
onPositionCalculated?: (editorView: EditorView, nextPos: Position) => Position;
|
|
@@ -42,17 +42,25 @@ export declare type TypeAheadItem = {
|
|
|
42
42
|
export declare type TypeAheadForceSelect = (props: TypeAheadForceSelectProps) => TypeAheadItem | undefined;
|
|
43
43
|
export declare type TypeAheadHandler = {
|
|
44
44
|
id: TypeAheadAvailableNodes;
|
|
45
|
+
/** Pattern that will trigger the TypeAhead */
|
|
45
46
|
trigger: string;
|
|
47
|
+
/** Custom regex must have a capture group around trigger so it's possible to
|
|
48
|
+
* use it without needing to scan through all triggers again */
|
|
46
49
|
customRegex?: string;
|
|
47
50
|
headless?: boolean;
|
|
51
|
+
/** Handler returns typeahead item based on query. Used to find which item to insert. */
|
|
48
52
|
forceSelect?: TypeAheadForceSelect;
|
|
49
53
|
onInvokeAnalytics?: TypeAheadPayload;
|
|
54
|
+
/** Handler executes logic when TypeAhead opens */
|
|
50
55
|
onOpen?: (editorState: EditorState) => void;
|
|
56
|
+
/** Handler returns an array of TypeAheadItem based on query to be displayed in the TypeAhead */
|
|
51
57
|
getItems: (props: {
|
|
52
58
|
query: string;
|
|
53
59
|
editorState: EditorState;
|
|
54
60
|
}) => Promise<Array<TypeAheadItem>>;
|
|
61
|
+
/** Handler returns a transaction which inserts the TypeAheadItem into the doc */
|
|
55
62
|
selectItem: TypeAheadSelectItem;
|
|
63
|
+
/** Handler executes logic when TypeAhead is dismissed */
|
|
56
64
|
dismiss?: (props: {
|
|
57
65
|
editorState: EditorState;
|
|
58
66
|
query: string;
|
|
@@ -13,7 +13,7 @@ export default class DropdownMenuWrapper extends PureComponent<Props, State> {
|
|
|
13
13
|
state: State;
|
|
14
14
|
private handleRef;
|
|
15
15
|
private updatePopupPlacement;
|
|
16
|
-
private
|
|
16
|
+
private handleCloseAndFocus;
|
|
17
17
|
private handleClose;
|
|
18
18
|
private renderDropdownMenu;
|
|
19
19
|
render(): jsx.JSX.Element;
|
|
@@ -5,11 +5,12 @@ declare type SimpleEventHandler<T> = (event: T) => void;
|
|
|
5
5
|
* This component is a wrapper of vertical menus which listens to keydown events of children
|
|
6
6
|
* and handles up/down arrow key navigation
|
|
7
7
|
*/
|
|
8
|
-
export declare const MenuArrowKeyNavigationProvider: ({ children, handleClose, disableArrowKeyNavigation, keyDownHandlerContext,
|
|
8
|
+
export declare const MenuArrowKeyNavigationProvider: ({ children, handleClose, disableArrowKeyNavigation, keyDownHandlerContext, closeOnTab, onSelection, }: {
|
|
9
9
|
children: ReactNode;
|
|
10
10
|
handleClose?: SimpleEventHandler<KeyboardEvent> | undefined;
|
|
11
11
|
disableArrowKeyNavigation?: boolean | undefined;
|
|
12
12
|
keyDownHandlerContext?: KeyDownHandlerContext | undefined;
|
|
13
|
-
|
|
13
|
+
onSelection?: ((index: number) => void) | undefined;
|
|
14
|
+
closeOnTab?: boolean | undefined;
|
|
14
15
|
}) => JSX.Element;
|
|
15
16
|
export {};
|
|
@@ -5,7 +5,7 @@ export interface WithOutsideClickProps {
|
|
|
5
5
|
handleEscapeKeydown?: SimpleEventHandler<KeyboardEvent>;
|
|
6
6
|
handleEnterKeydown?: SimpleEventHandler<KeyboardEvent>;
|
|
7
7
|
targetRef?: any;
|
|
8
|
-
|
|
8
|
+
closeOnTab?: boolean;
|
|
9
9
|
}
|
|
10
10
|
export default function withReactEditorViewOuterListeners<P>(Component: ComponentClass<P> | StatelessComponent<P>): React.FC<P & WithOutsideClickProps>;
|
|
11
11
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "72.1
|
|
3
|
+
"version": "72.2.1",
|
|
4
4
|
"description": "A package that contains common classes and components for editor and renderer",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -67,22 +67,22 @@
|
|
|
67
67
|
"@atlaskit/code": "^14.4.0",
|
|
68
68
|
"@atlaskit/codemod-utils": "^4.1.0",
|
|
69
69
|
"@atlaskit/editor-json-transformer": "^8.8.0",
|
|
70
|
-
"@atlaskit/editor-palette": "
|
|
70
|
+
"@atlaskit/editor-palette": "1.0.0",
|
|
71
71
|
"@atlaskit/editor-shared-styles": "^2.3.0",
|
|
72
72
|
"@atlaskit/emoji": "^67.0.0",
|
|
73
73
|
"@atlaskit/icon": "^21.11.0",
|
|
74
74
|
"@atlaskit/in-product-testing": "^0.1.0",
|
|
75
|
-
"@atlaskit/media-card": "^74.
|
|
75
|
+
"@atlaskit/media-card": "^74.5.0",
|
|
76
76
|
"@atlaskit/media-client": "^20.0.0",
|
|
77
|
-
"@atlaskit/media-picker": "^64.
|
|
77
|
+
"@atlaskit/media-picker": "^64.2.0",
|
|
78
78
|
"@atlaskit/mention": "^21.0.0",
|
|
79
79
|
"@atlaskit/menu": "^1.4.0",
|
|
80
80
|
"@atlaskit/profilecard": "^18.2.0",
|
|
81
|
-
"@atlaskit/smart-card": "^23.
|
|
81
|
+
"@atlaskit/smart-card": "^23.14.0",
|
|
82
82
|
"@atlaskit/smart-user-picker": "^6.0.0",
|
|
83
83
|
"@atlaskit/task-decision": "^17.5.0",
|
|
84
84
|
"@atlaskit/theme": "^12.2.0",
|
|
85
|
-
"@atlaskit/tokens": "^0.
|
|
85
|
+
"@atlaskit/tokens": "^1.0.0",
|
|
86
86
|
"@atlaskit/tooltip": "^17.6.0",
|
|
87
87
|
"@atlaskit/ufo": "^0.1.0",
|
|
88
88
|
"@atlaskit/width-detector": "^4.0.0",
|
|
@@ -114,9 +114,9 @@
|
|
|
114
114
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
115
115
|
},
|
|
116
116
|
"devDependencies": {
|
|
117
|
-
"@atlaskit/editor-core": "^178.
|
|
117
|
+
"@atlaskit/editor-core": "^178.1.0",
|
|
118
118
|
"@atlaskit/editor-json-transformer": "^8.8.0",
|
|
119
|
-
"@atlaskit/editor-plugin-table": "^1.
|
|
119
|
+
"@atlaskit/editor-plugin-table": "^1.1.0",
|
|
120
120
|
"@atlaskit/editor-test-helpers": "^18.0.0",
|
|
121
121
|
"@atlaskit/media-core": "^34.0.0",
|
|
122
122
|
"@atlaskit/util-data-test": "^17.6.0",
|