@atlaskit/editor-common 72.2.0 → 72.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -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 +0 -15
- 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 +14 -38
- package/dist/cjs/ui-menu/DropdownMenu/index.js +23 -75
- package/dist/cjs/ui-menu/MenuArrowKeyNavigationProvider/index.js +16 -49
- 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 +9 -49
- 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 +0 -15
- 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 +0 -7
- package/dist/es2019/ui-menu/DropdownMenu/index.js +1 -21
- package/dist/es2019/ui-menu/MenuArrowKeyNavigationProvider/index.js +8 -31
- package/dist/es2019/ui-menu/ToolbarButton/index.js +2 -6
- package/dist/es2019/ui-react/with-react-editor-view-outer-listeners.js +4 -22
- 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 +0 -15
- 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 +14 -27
- package/dist/esm/ui-menu/DropdownMenu/index.js +23 -56
- package/dist/esm/ui-menu/MenuArrowKeyNavigationProvider/index.js +16 -42
- package/dist/esm/ui-menu/ToolbarButton/index.js +23 -32
- package/dist/esm/ui-react/with-react-editor-view-outer-listeners.js +9 -38
- 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/package.json +4 -4
|
@@ -1,36 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = void 0;
|
|
9
|
-
|
|
10
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
-
|
|
12
9
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
13
|
-
|
|
14
10
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
15
|
-
|
|
16
11
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
17
|
-
|
|
18
12
|
var _react = _interopRequireDefault(require("react"));
|
|
19
|
-
|
|
20
13
|
var _analytics = require("../analytics");
|
|
21
|
-
|
|
22
14
|
var _eventDispatcher = require("../event-dispatcher");
|
|
23
|
-
|
|
24
15
|
var _ErrorBoundary = require("../ui/ErrorBoundary");
|
|
25
|
-
|
|
26
16
|
var _utils = require("../utils");
|
|
27
|
-
|
|
28
17
|
var _analytics2 = require("../utils/analytics");
|
|
29
|
-
|
|
30
18
|
var ReactNodeView = /*#__PURE__*/function () {
|
|
31
19
|
function ReactNodeView(_node, view, getPos, portalProviderAPI, eventDispatcher, reactComponentProps, reactComponent) {
|
|
32
20
|
var _this = this;
|
|
33
|
-
|
|
34
21
|
var hasAnalyticsContext = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : false;
|
|
35
22
|
var viewShouldUpdate = arguments.length > 8 ? arguments[8] : undefined;
|
|
36
23
|
var hasIntlContext = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : false;
|
|
@@ -57,6 +44,7 @@ var ReactNodeView = /*#__PURE__*/function () {
|
|
|
57
44
|
this.eventDispatcher = eventDispatcher;
|
|
58
45
|
this.hasIntlContext = hasIntlContext;
|
|
59
46
|
}
|
|
47
|
+
|
|
60
48
|
/**
|
|
61
49
|
* This method exists to move initialization logic out of the constructor,
|
|
62
50
|
* so object can be initialized properly before calling render first time.
|
|
@@ -66,40 +54,33 @@ var ReactNodeView = /*#__PURE__*/function () {
|
|
|
66
54
|
* constructor, which leads to some methods being undefined during the
|
|
67
55
|
* first render.
|
|
68
56
|
*/
|
|
69
|
-
|
|
70
|
-
|
|
71
57
|
(0, _createClass2.default)(ReactNodeView, [{
|
|
72
58
|
key: "init",
|
|
73
59
|
value: function init() {
|
|
74
60
|
var _this2 = this;
|
|
75
|
-
|
|
76
61
|
this.domRef = this.createDomRef();
|
|
77
62
|
this.setDomAttrs(this.node, this.domRef);
|
|
78
|
-
|
|
79
63
|
var _ref = this.getContentDOM() || {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
64
|
+
dom: undefined,
|
|
65
|
+
contentDOM: undefined
|
|
66
|
+
},
|
|
67
|
+
contentDOMWrapper = _ref.dom,
|
|
68
|
+
contentDOM = _ref.contentDOM;
|
|
86
69
|
if (this.domRef && contentDOMWrapper) {
|
|
87
70
|
this.domRef.appendChild(contentDOMWrapper);
|
|
88
71
|
this.contentDOM = contentDOM ? contentDOM : contentDOMWrapper;
|
|
89
72
|
this.contentDOMWrapper = contentDOMWrapper || contentDOM;
|
|
90
|
-
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// @see ED-3790
|
|
91
76
|
// something gets messed up during mutation processing inside of a
|
|
92
77
|
// nodeView if DOM structure has nested plain "div"s, it doesn't see the
|
|
93
78
|
// difference between them and it kills the nodeView
|
|
94
|
-
|
|
95
|
-
|
|
96
79
|
this.domRef.classList.add("".concat(this.node.type.name, "View-content-wrap"));
|
|
97
|
-
|
|
98
80
|
var _getPerformanceOption = (0, _utils.getPerformanceOptions)(this.view),
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
81
|
+
samplingRate = _getPerformanceOption.samplingRate,
|
|
82
|
+
slowThreshold = _getPerformanceOption.slowThreshold,
|
|
83
|
+
trackingEnabled = _getPerformanceOption.trackingEnabled;
|
|
103
84
|
trackingEnabled && (0, _utils.startMeasureReactNodeViewRendered)({
|
|
104
85
|
nodeTypeName: this.node.type.name
|
|
105
86
|
});
|
|
@@ -119,21 +100,17 @@ var ReactNodeView = /*#__PURE__*/function () {
|
|
|
119
100
|
key: "renderReactComponent",
|
|
120
101
|
value: function renderReactComponent(component) {
|
|
121
102
|
var _this3 = this;
|
|
122
|
-
|
|
123
103
|
if (!this.domRef || !component) {
|
|
124
104
|
return;
|
|
125
105
|
}
|
|
126
|
-
|
|
127
106
|
var componentWithErrorBoundary = function componentWithErrorBoundary() {
|
|
128
107
|
var _this3$node$type$name, _this3$node, _this3$node$type;
|
|
129
|
-
|
|
130
108
|
return /*#__PURE__*/_react.default.createElement(_ErrorBoundary.ErrorBoundary, {
|
|
131
109
|
component: _analytics.ACTION_SUBJECT.REACT_NODE_VIEW,
|
|
132
110
|
componentId: (_this3$node$type$name = _this3 === null || _this3 === void 0 ? void 0 : (_this3$node = _this3.node) === null || _this3$node === void 0 ? void 0 : (_this3$node$type = _this3$node.type) === null || _this3$node$type === void 0 ? void 0 : _this3$node$type.name) !== null && _this3$node$type$name !== void 0 ? _this3$node$type$name : _analytics.ACTION_SUBJECT_ID.UNKNOWN_NODE,
|
|
133
111
|
dispatchAnalyticsEvent: _this3.dispatchAnalyticsEvent
|
|
134
112
|
}, component());
|
|
135
113
|
};
|
|
136
|
-
|
|
137
114
|
this.portalProviderAPI.render(componentWithErrorBoundary, this.domRef, this.hasAnalyticsContext, this.hasIntlContext);
|
|
138
115
|
}
|
|
139
116
|
}, {
|
|
@@ -142,7 +119,6 @@ var ReactNodeView = /*#__PURE__*/function () {
|
|
|
142
119
|
if (!this.node.isInline) {
|
|
143
120
|
return document.createElement('div');
|
|
144
121
|
}
|
|
145
|
-
|
|
146
122
|
var htmlElement = document.createElement('span');
|
|
147
123
|
return htmlElement;
|
|
148
124
|
}
|
|
@@ -154,8 +130,9 @@ var ReactNodeView = /*#__PURE__*/function () {
|
|
|
154
130
|
}, {
|
|
155
131
|
key: "_handleRef",
|
|
156
132
|
value: function _handleRef(node) {
|
|
157
|
-
var contentDOM = this.contentDOMWrapper || this.contentDOM;
|
|
133
|
+
var contentDOM = this.contentDOMWrapper || this.contentDOM;
|
|
158
134
|
|
|
135
|
+
// move the contentDOM node inside the inner reference after rendering
|
|
159
136
|
if (node && contentDOM && !node.contains(contentDOM)) {
|
|
160
137
|
node.appendChild(contentDOM);
|
|
161
138
|
}
|
|
@@ -174,28 +151,24 @@ var ReactNodeView = /*#__PURE__*/function () {
|
|
|
174
151
|
key: "update",
|
|
175
152
|
value: function update(node, _decorations, _innerDecorations) {
|
|
176
153
|
var _this4 = this;
|
|
177
|
-
|
|
178
154
|
var validUpdate = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : function () {
|
|
179
155
|
return true;
|
|
180
156
|
};
|
|
181
157
|
// @see https://github.com/ProseMirror/prosemirror/issues/648
|
|
182
158
|
var isValidUpdate = this.node.type === node.type && validUpdate(this.node, node);
|
|
183
|
-
|
|
184
159
|
if (!isValidUpdate) {
|
|
185
160
|
return false;
|
|
186
161
|
}
|
|
187
|
-
|
|
188
162
|
if (this.domRef && !this.node.sameMarkup(node)) {
|
|
189
163
|
this.setDomAttrs(node, this.domRef);
|
|
190
|
-
}
|
|
191
|
-
// We dont want to destroy the view, so we return true.
|
|
192
|
-
|
|
164
|
+
}
|
|
193
165
|
|
|
166
|
+
// View should not process a re-render if this is false.
|
|
167
|
+
// We dont want to destroy the view, so we return true.
|
|
194
168
|
if (!this.viewShouldUpdate(node)) {
|
|
195
169
|
this.node = node;
|
|
196
170
|
return true;
|
|
197
171
|
}
|
|
198
|
-
|
|
199
172
|
this.node = node;
|
|
200
173
|
this.renderReactComponent(function () {
|
|
201
174
|
return _this4.render(_this4.reactComponentProps, _this4.handleRef);
|
|
@@ -208,14 +181,13 @@ var ReactNodeView = /*#__PURE__*/function () {
|
|
|
208
181
|
if (this._viewShouldUpdate) {
|
|
209
182
|
return this._viewShouldUpdate(nextNode);
|
|
210
183
|
}
|
|
211
|
-
|
|
212
184
|
return true;
|
|
213
185
|
}
|
|
186
|
+
|
|
214
187
|
/**
|
|
215
188
|
* Copies the attributes from a ProseMirror Node to a DOM node.
|
|
216
189
|
* @param node The Prosemirror Node from which to source the attributes
|
|
217
190
|
*/
|
|
218
|
-
|
|
219
191
|
}, {
|
|
220
192
|
key: "setDomAttrs",
|
|
221
193
|
value: function setDomAttrs(node, element) {
|
|
@@ -234,7 +206,6 @@ var ReactNodeView = /*#__PURE__*/function () {
|
|
|
234
206
|
if (!this.domRef) {
|
|
235
207
|
return;
|
|
236
208
|
}
|
|
237
|
-
|
|
238
209
|
this.portalProviderAPI.remove(this.domRef);
|
|
239
210
|
this.domRef = undefined;
|
|
240
211
|
this.contentDOM = undefined;
|
|
@@ -250,5 +221,4 @@ var ReactNodeView = /*#__PURE__*/function () {
|
|
|
250
221
|
}]);
|
|
251
222
|
return ReactNodeView;
|
|
252
223
|
}();
|
|
253
|
-
|
|
254
224
|
exports.default = ReactNodeView;
|
|
@@ -1,42 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.SafePlugin = void 0;
|
|
9
|
-
|
|
10
8
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
11
|
-
|
|
12
9
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
13
|
-
|
|
14
10
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
15
|
-
|
|
16
11
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
17
|
-
|
|
18
12
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
19
|
-
|
|
20
13
|
var _prosemirrorState = require("prosemirror-state");
|
|
21
|
-
|
|
22
14
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
23
|
-
|
|
24
15
|
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; } }
|
|
25
|
-
|
|
26
16
|
var SafePlugin = /*#__PURE__*/function (_Plugin) {
|
|
27
17
|
(0, _inherits2.default)(SafePlugin, _Plugin);
|
|
28
|
-
|
|
29
18
|
var _super = _createSuper(SafePlugin);
|
|
30
|
-
|
|
31
19
|
// This variable isn't (and shouldn't) be used anywhere. Its purpose is
|
|
32
20
|
// to distinguish Plugin from SafePlugin, thus ensuring that an 'unsafe'
|
|
33
21
|
// Plugin cannot be assigned as an item in EditorPlugin → pmPlugins.
|
|
22
|
+
|
|
34
23
|
function SafePlugin(spec) {
|
|
35
24
|
(0, _classCallCheck2.default)(this, SafePlugin);
|
|
36
25
|
return _super.call(this, spec);
|
|
37
26
|
}
|
|
38
|
-
|
|
39
27
|
return (0, _createClass2.default)(SafePlugin);
|
|
40
28
|
}(_prosemirrorState.Plugin);
|
|
41
|
-
|
|
42
29
|
exports.SafePlugin = SafePlugin;
|
|
@@ -1,52 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.Side = exports.JSON_ID = exports.GapCursorSelection = exports.GapBookmark = void 0;
|
|
9
|
-
|
|
10
8
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
|
-
|
|
12
9
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
13
|
-
|
|
14
10
|
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
15
|
-
|
|
16
11
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
17
|
-
|
|
18
12
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
19
|
-
|
|
20
13
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
21
|
-
|
|
22
14
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
23
|
-
|
|
24
15
|
var _prosemirrorModel = require("prosemirror-model");
|
|
25
|
-
|
|
26
16
|
var _prosemirrorState = require("prosemirror-state");
|
|
27
|
-
|
|
28
17
|
var _isValidTargetNode = require("./utils/is-valid-target-node");
|
|
29
|
-
|
|
30
18
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
31
|
-
|
|
32
19
|
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; } }
|
|
33
|
-
|
|
34
20
|
var Side;
|
|
35
21
|
exports.Side = Side;
|
|
36
|
-
|
|
37
22
|
(function (Side) {
|
|
38
23
|
Side["LEFT"] = "left";
|
|
39
24
|
Side["RIGHT"] = "right";
|
|
40
25
|
})(Side || (exports.Side = Side = {}));
|
|
41
|
-
|
|
42
26
|
var JSON_ID = 'gapcursor';
|
|
43
27
|
exports.JSON_ID = JSON_ID;
|
|
44
|
-
|
|
45
28
|
var GapCursorSelection = /*#__PURE__*/function (_Selection) {
|
|
46
29
|
(0, _inherits2.default)(GapCursorSelection, _Selection);
|
|
47
|
-
|
|
48
30
|
var _super = _createSuper(GapCursorSelection);
|
|
49
|
-
|
|
50
31
|
/**
|
|
51
32
|
* Construct a GapCursorSelection
|
|
52
33
|
* @param {ResolvedPos} $pos resolved position
|
|
@@ -54,7 +35,6 @@ var GapCursorSelection = /*#__PURE__*/function (_Selection) {
|
|
|
54
35
|
*/
|
|
55
36
|
function GapCursorSelection($pos) {
|
|
56
37
|
var _this;
|
|
57
|
-
|
|
58
38
|
var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Side.LEFT;
|
|
59
39
|
(0, _classCallCheck2.default)(this, GapCursorSelection);
|
|
60
40
|
_this = _super.call(this, $pos, $pos);
|
|
@@ -62,7 +42,6 @@ var GapCursorSelection = /*#__PURE__*/function (_Selection) {
|
|
|
62
42
|
_this.side = side;
|
|
63
43
|
return _this;
|
|
64
44
|
}
|
|
65
|
-
|
|
66
45
|
(0, _createClass2.default)(GapCursorSelection, [{
|
|
67
46
|
key: "map",
|
|
68
47
|
value: function map(doc, mapping) {
|
|
@@ -97,14 +76,12 @@ var GapCursorSelection = /*#__PURE__*/function (_Selection) {
|
|
|
97
76
|
key: "valid",
|
|
98
77
|
value: function valid($pos) {
|
|
99
78
|
var parent = $pos.parent,
|
|
100
|
-
|
|
101
|
-
|
|
79
|
+
nodeBefore = $pos.nodeBefore,
|
|
80
|
+
nodeAfter = $pos.nodeAfter;
|
|
102
81
|
var targetNode = (0, _isValidTargetNode.isValidTargetNode)(nodeBefore) ? nodeBefore : (0, _isValidTargetNode.isValidTargetNode)(nodeAfter) ? nodeAfter : null;
|
|
103
|
-
|
|
104
82
|
if (!targetNode || parent.isTextblock) {
|
|
105
83
|
return false;
|
|
106
84
|
}
|
|
107
|
-
|
|
108
85
|
var deflt = parent.contentMatchAt($pos.index()).defaultType;
|
|
109
86
|
return deflt && deflt.isTextblock;
|
|
110
87
|
}
|
|
@@ -113,50 +90,42 @@ var GapCursorSelection = /*#__PURE__*/function (_Selection) {
|
|
|
113
90
|
value: function findFrom($pos, dir) {
|
|
114
91
|
var mustMove = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
115
92
|
var side = dir === 1 ? Side.RIGHT : Side.LEFT;
|
|
116
|
-
|
|
117
93
|
if (!mustMove && GapCursorSelection.valid($pos)) {
|
|
118
94
|
return new GapCursorSelection($pos, side);
|
|
119
95
|
}
|
|
96
|
+
var pos = $pos.pos;
|
|
120
97
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
var next = null; // Scan up from this position
|
|
98
|
+
// TODO: Fix any, potential issue. ED-5048
|
|
99
|
+
var next = null;
|
|
124
100
|
|
|
101
|
+
// Scan up from this position
|
|
125
102
|
for (var d = $pos.depth;; d--) {
|
|
126
103
|
var parent = $pos.node(d);
|
|
127
|
-
|
|
128
104
|
if (side === Side.RIGHT ? $pos.indexAfter(d) < parent.childCount : $pos.index(d) > 0) {
|
|
129
105
|
next = parent.maybeChild(side === Side.RIGHT ? $pos.indexAfter(d) : $pos.index(d) - 1);
|
|
130
106
|
break;
|
|
131
107
|
} else if (d === 0) {
|
|
132
108
|
return null;
|
|
133
109
|
}
|
|
134
|
-
|
|
135
110
|
pos += dir;
|
|
136
111
|
var $cur = $pos.doc.resolve(pos);
|
|
137
|
-
|
|
138
112
|
if (GapCursorSelection.valid($cur)) {
|
|
139
113
|
return new GapCursorSelection($cur, side);
|
|
140
114
|
}
|
|
141
|
-
}
|
|
142
|
-
|
|
115
|
+
}
|
|
143
116
|
|
|
117
|
+
// And then down into the next node
|
|
144
118
|
for (;;) {
|
|
145
119
|
next = side === Side.RIGHT ? next.firstChild : next.lastChild;
|
|
146
|
-
|
|
147
120
|
if (next === null) {
|
|
148
121
|
break;
|
|
149
122
|
}
|
|
150
|
-
|
|
151
123
|
pos += dir;
|
|
152
|
-
|
|
153
124
|
var _$cur = $pos.doc.resolve(pos);
|
|
154
|
-
|
|
155
125
|
if (GapCursorSelection.valid(_$cur)) {
|
|
156
126
|
return new GapCursorSelection(_$cur, side);
|
|
157
127
|
}
|
|
158
128
|
}
|
|
159
|
-
|
|
160
129
|
return null;
|
|
161
130
|
}
|
|
162
131
|
}, {
|
|
@@ -167,17 +136,13 @@ var GapCursorSelection = /*#__PURE__*/function (_Selection) {
|
|
|
167
136
|
}]);
|
|
168
137
|
return GapCursorSelection;
|
|
169
138
|
}(_prosemirrorState.Selection);
|
|
170
|
-
|
|
171
139
|
exports.GapCursorSelection = GapCursorSelection;
|
|
172
|
-
|
|
173
140
|
_prosemirrorState.Selection.jsonID(JSON_ID, GapCursorSelection);
|
|
174
|
-
|
|
175
141
|
var GapBookmark = /*#__PURE__*/function () {
|
|
176
142
|
function GapBookmark(pos) {
|
|
177
143
|
(0, _classCallCheck2.default)(this, GapBookmark);
|
|
178
144
|
this.pos = pos;
|
|
179
145
|
}
|
|
180
|
-
|
|
181
146
|
(0, _createClass2.default)(GapBookmark, [{
|
|
182
147
|
key: "map",
|
|
183
148
|
value: function map(mapping) {
|
|
@@ -192,5 +157,4 @@ var GapBookmark = /*#__PURE__*/function () {
|
|
|
192
157
|
}]);
|
|
193
158
|
return GapBookmark;
|
|
194
159
|
}();
|
|
195
|
-
|
|
196
160
|
exports.GapBookmark = GapBookmark;
|
|
@@ -6,9 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.isIgnored = void 0;
|
|
7
7
|
// we don't show gap cursor for those nodes
|
|
8
8
|
var IGNORED_NODES = ['paragraph', 'bulletList', 'orderedList', 'listItem', 'taskItem', 'decisionItem', 'heading', 'blockquote', 'layoutColumn', 'caption', 'media'];
|
|
9
|
-
|
|
10
9
|
var isIgnored = function isIgnored(node) {
|
|
11
10
|
return !!node && IGNORED_NODES.indexOf(node.type.name) !== -1;
|
|
12
11
|
};
|
|
13
|
-
|
|
14
12
|
exports.isIgnored = isIgnored;
|
|
@@ -4,11 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.isValidTargetNode = void 0;
|
|
7
|
-
|
|
8
7
|
var _isIgnored = require("./is-ignored");
|
|
9
|
-
|
|
10
8
|
var isValidTargetNode = function isValidTargetNode(node) {
|
|
11
9
|
return !!node && !(0, _isIgnored.isIgnored)(node);
|
|
12
10
|
};
|
|
13
|
-
|
|
14
11
|
exports.isValidTargetNode = isValidTargetNode;
|
|
@@ -57,11 +57,7 @@ Object.defineProperty(exports, "isValidTargetNode", {
|
|
|
57
57
|
return _utils.isValidTargetNode;
|
|
58
58
|
}
|
|
59
59
|
});
|
|
60
|
-
|
|
61
60
|
var _types = require("./types");
|
|
62
|
-
|
|
63
61
|
var _selection = require("./gap-cursor/selection");
|
|
64
|
-
|
|
65
62
|
var _utils = require("./gap-cursor/utils");
|
|
66
|
-
|
|
67
63
|
var _utils2 = require("./utils");
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.RelativeSelectionPos = void 0;
|
|
7
7
|
var RelativeSelectionPos;
|
|
8
8
|
exports.RelativeSelectionPos = RelativeSelectionPos;
|
|
9
|
-
|
|
10
9
|
(function (RelativeSelectionPos) {
|
|
11
10
|
RelativeSelectionPos["Before"] = "Before";
|
|
12
11
|
RelativeSelectionPos["Start"] = "Start";
|
|
@@ -4,47 +4,35 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.isSelectionAtStartOfNode = exports.isSelectionAtEndOfNode = void 0;
|
|
7
|
-
|
|
8
7
|
var isSelectionAtStartOfNode = function isSelectionAtStartOfNode($pos, parentNode) {
|
|
9
8
|
if (!parentNode) {
|
|
10
9
|
return false;
|
|
11
10
|
}
|
|
12
|
-
|
|
13
11
|
for (var i = $pos.depth + 1; i > 0; i--) {
|
|
14
12
|
var node = $pos.node(i);
|
|
15
|
-
|
|
16
13
|
if (node && node.eq(parentNode.node)) {
|
|
17
14
|
break;
|
|
18
15
|
}
|
|
19
|
-
|
|
20
16
|
if (i > 1 && $pos.before(i) !== $pos.before(i - 1) + 1) {
|
|
21
17
|
return false;
|
|
22
18
|
}
|
|
23
19
|
}
|
|
24
|
-
|
|
25
20
|
return true;
|
|
26
21
|
};
|
|
27
|
-
|
|
28
22
|
exports.isSelectionAtStartOfNode = isSelectionAtStartOfNode;
|
|
29
|
-
|
|
30
23
|
var isSelectionAtEndOfNode = function isSelectionAtEndOfNode($pos, parentNode) {
|
|
31
24
|
if (!parentNode) {
|
|
32
25
|
return false;
|
|
33
26
|
}
|
|
34
|
-
|
|
35
27
|
for (var i = $pos.depth + 1; i > 0; i--) {
|
|
36
28
|
var node = $pos.node(i);
|
|
37
|
-
|
|
38
29
|
if (node && node.eq(parentNode.node)) {
|
|
39
30
|
break;
|
|
40
31
|
}
|
|
41
|
-
|
|
42
32
|
if (i > 1 && $pos.after(i) !== $pos.after(i - 1) - 1) {
|
|
43
33
|
return false;
|
|
44
34
|
}
|
|
45
35
|
}
|
|
46
|
-
|
|
47
36
|
return true;
|
|
48
37
|
};
|
|
49
|
-
|
|
50
38
|
exports.isSelectionAtEndOfNode = isSelectionAtEndOfNode;
|
package/dist/cjs/styles/index.js
CHANGED
|
@@ -273,49 +273,26 @@ Object.defineProperty(exports, "whitespaceSharedStyles", {
|
|
|
273
273
|
return _whitespace.whitespaceSharedStyles;
|
|
274
274
|
}
|
|
275
275
|
});
|
|
276
|
-
|
|
277
276
|
var _textColor = require("./shared/text-color");
|
|
278
|
-
|
|
279
277
|
var _table = require("./shared/table");
|
|
280
|
-
|
|
281
278
|
var _annotation = require("./shared/annotation");
|
|
282
|
-
|
|
283
279
|
var _columnLayout = require("./shared/column-layout");
|
|
284
|
-
|
|
285
280
|
var _mediaSingle = require("./shared/media-single");
|
|
286
|
-
|
|
287
281
|
var _blockquote = require("./shared/blockquote");
|
|
288
|
-
|
|
289
282
|
var _headings = require("./shared/headings");
|
|
290
|
-
|
|
291
283
|
var _rule = require("./shared/rule");
|
|
292
|
-
|
|
293
284
|
var _whitespace = require("./shared/whitespace");
|
|
294
|
-
|
|
295
285
|
var _paragraph = require("./shared/paragraph");
|
|
296
|
-
|
|
297
286
|
var _link = require("./shared/link");
|
|
298
|
-
|
|
299
287
|
var _lists = require("./shared/lists");
|
|
300
|
-
|
|
301
288
|
var _indentation = require("./shared/indentation");
|
|
302
|
-
|
|
303
289
|
var _blockMarks = require("./shared/block-marks");
|
|
304
|
-
|
|
305
290
|
var _codeMark = require("./shared/code-mark");
|
|
306
|
-
|
|
307
291
|
var _shadow = require("./shared/shadow");
|
|
308
|
-
|
|
309
292
|
var _date = require("./shared/date");
|
|
310
|
-
|
|
311
293
|
var _taskDecision = require("./shared/task-decision");
|
|
312
|
-
|
|
313
294
|
var _status = require("./shared/status");
|
|
314
|
-
|
|
315
295
|
var _smartCard = require("./shared/smart-card");
|
|
316
|
-
|
|
317
296
|
var _codeBlock = require("./shared/code-block");
|
|
318
|
-
|
|
319
297
|
var _layout = require("./shared/layout");
|
|
320
|
-
|
|
321
298
|
var _extension = require("./shared/extension");
|
|
@@ -1,22 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.annotationSharedStyles = exports.annotationPrefix = exports.AnnotationSharedClassNames = exports.AnnotationSharedCSSByState = void 0;
|
|
9
|
-
|
|
10
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
|
-
|
|
12
9
|
var _react = require("@emotion/react");
|
|
13
|
-
|
|
14
10
|
var _colors = require("@atlaskit/theme/colors");
|
|
15
|
-
|
|
16
11
|
var _components = require("@atlaskit/theme/components");
|
|
17
|
-
|
|
18
12
|
var _templateObject, _templateObject2, _templateObject3;
|
|
19
|
-
|
|
20
13
|
var annotationPrefix = 'ak-editor-annotation';
|
|
21
14
|
exports.annotationPrefix = annotationPrefix;
|
|
22
15
|
var AnnotationSharedClassNames = {
|
|
@@ -31,7 +24,6 @@ var Y75a = 'rgba(255, 240, 179, 0.5)';
|
|
|
31
24
|
var Y200a = 'rgba(255, 196, 0, 0.82)';
|
|
32
25
|
var DY75a = 'rgba(111, 92, 37, 0.5)';
|
|
33
26
|
var DY200 = '#82641c';
|
|
34
|
-
|
|
35
27
|
var AnnotationSharedCSSByState = function AnnotationSharedCSSByState(props) {
|
|
36
28
|
return {
|
|
37
29
|
focus: (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n // Background is not coming through in confluence, suspecting to be caused by some specific combination of\n // emotion and token look up\n\n background: ", ";\n border-bottom: 2px solid\n ", ";\n // TODO: https://product-fabric.atlassian.net/browse/DSP-4147\n box-shadow: ", ";\n cursor: pointer;\n "])), (0, _components.themed)({
|
|
@@ -50,11 +42,8 @@ var AnnotationSharedCSSByState = function AnnotationSharedCSSByState(props) {
|
|
|
50
42
|
})(props))
|
|
51
43
|
};
|
|
52
44
|
};
|
|
53
|
-
|
|
54
45
|
exports.AnnotationSharedCSSByState = AnnotationSharedCSSByState;
|
|
55
|
-
|
|
56
46
|
var annotationSharedStyles = function annotationSharedStyles(props) {
|
|
57
47
|
return (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror {\n .", " {\n ", ";\n }\n\n .", " {\n ", ";\n cursor: initial;\n }\n\n .", " {\n ", ";\n }\n }\n"])), AnnotationSharedClassNames.focus, AnnotationSharedCSSByState(props).focus, AnnotationSharedClassNames.draft, AnnotationSharedCSSByState(props).focus, AnnotationSharedClassNames.blur, AnnotationSharedCSSByState(props).blur);
|
|
58
48
|
};
|
|
59
|
-
|
|
60
49
|
exports.annotationSharedStyles = annotationSharedStyles;
|
|
@@ -1,17 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.blockMarksSharedStyles = void 0;
|
|
9
|
-
|
|
10
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
|
-
|
|
12
9
|
var _react = require("@emotion/react");
|
|
13
|
-
|
|
14
10
|
var _templateObject;
|
|
15
|
-
|
|
16
11
|
var blockMarksSharedStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n /**\n * We need to remove margin-top from first item\n * inside doc, tableCell, tableHeader, blockquote, etc.\n */\n *:not(.fabric-editor-block-mark) >,\n /* For nested block marks apart from those with indentation mark */\n *:not(.fabric-editor-block-mark) >\n div.fabric-editor-block-mark:first-of-type\n /* Do not remove the margin top for nodes inside indentation marks */\n :not(.fabric-editor-indentation-mark)\n /* Do not remove the margin top for nodes inside alignment marks */\n :not(.fabric-editor-alignment),\n // If first element inside a block node has alignment mark, then remove the margin-top\n .fabric-editor-alignment:first-of-type:first-child,\n // If first document element has indentation mark remove margin-top\n .ProseMirror .fabric-editor-indentation-mark:first-of-type:first-child {\n p,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n .heading-wrapper {\n :first-child:not(style),\n style:first-child + * {\n margin-top: 0;\n }\n }\n }\n"])));
|
|
17
12
|
exports.blockMarksSharedStyles = blockMarksSharedStyles;
|
|
@@ -1,21 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.blockquoteSharedStyles = void 0;
|
|
9
|
-
|
|
10
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
|
-
|
|
12
9
|
var _react = require("@emotion/react");
|
|
13
|
-
|
|
14
10
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
15
|
-
|
|
16
11
|
var _constants = require("@atlaskit/theme/constants");
|
|
17
|
-
|
|
18
12
|
var _templateObject;
|
|
19
|
-
|
|
20
13
|
var blockquoteSharedStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n & blockquote {\n box-sizing: border-box;\n padding-left: ", "px;\n border-left: 2px solid\n ", ";\n margin: ", " 0 0 0;\n margin-right: 0;\n\n [dir='rtl'] & {\n padding-left: 0;\n padding-right: ", "px;\n }\n\n &:first-child {\n margin-top: 0;\n }\n\n &::before {\n content: '';\n }\n\n &::after {\n content: none;\n }\n\n & p {\n display: block;\n }\n\n & table,\n & table:last-child {\n display: inline-table;\n }\n }\n"])), (0, _constants.gridSize)() * 2, "var(--ds-border, ".concat(_editorSharedStyles.akEditorBlockquoteBorderColor, ")"), _editorSharedStyles.blockNodesVerticalMargin, (0, _constants.gridSize)() * 2);
|
|
21
14
|
exports.blockquoteSharedStyles = blockquoteSharedStyles;
|