@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
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import React, { Component } from 'react';
|
|
3
3
|
import Popper from 'popper.js'; // eslint-disable-line import/extensions
|
|
4
|
-
|
|
5
4
|
import rafSchedule from 'raf-schd';
|
|
6
5
|
import { positionPropToPopperPosition } from './internal/helpers';
|
|
7
6
|
const defaultState = {
|
|
@@ -22,13 +21,11 @@ const defaultState = {
|
|
|
22
21
|
};
|
|
23
22
|
export default class Layer extends Component {
|
|
24
23
|
// working with extract-react-types
|
|
24
|
+
|
|
25
25
|
constructor(props) {
|
|
26
26
|
super(props);
|
|
27
|
-
|
|
28
27
|
_defineProperty(this, "targetRef", /*#__PURE__*/React.createRef());
|
|
29
|
-
|
|
30
28
|
_defineProperty(this, "contentRef", /*#__PURE__*/React.createRef());
|
|
31
|
-
|
|
32
29
|
_defineProperty(this, "extractStyles", state => {
|
|
33
30
|
if (state) {
|
|
34
31
|
const popperHeight = state.offsets.popper.height;
|
|
@@ -47,78 +44,69 @@ export default class Layer extends Component {
|
|
|
47
44
|
});
|
|
48
45
|
}
|
|
49
46
|
});
|
|
50
|
-
|
|
51
47
|
this.state = defaultState;
|
|
52
48
|
this.extractStyles = rafSchedule(this.extractStyles.bind(this));
|
|
53
49
|
}
|
|
54
|
-
|
|
55
50
|
componentDidMount() {
|
|
56
51
|
this.applyPopper(this.props);
|
|
57
52
|
}
|
|
58
|
-
|
|
59
53
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
60
54
|
this.applyPopper(nextProps);
|
|
61
55
|
}
|
|
62
|
-
|
|
63
56
|
componentDidUpdate(prevProps, prevState) {
|
|
64
57
|
const {
|
|
65
58
|
onPositioned
|
|
66
59
|
} = this.props;
|
|
67
60
|
const {
|
|
68
61
|
hasExtractedStyles
|
|
69
|
-
} = this.state;
|
|
62
|
+
} = this.state;
|
|
70
63
|
|
|
64
|
+
// This flag is set the first time the position is calculated from Popper and applied to the content
|
|
71
65
|
if (!prevState.hasExtractedStyles && hasExtractedStyles && onPositioned) {
|
|
72
66
|
onPositioned();
|
|
73
67
|
}
|
|
74
68
|
}
|
|
75
|
-
|
|
76
69
|
componentWillUnmount() {
|
|
77
70
|
// this.extractStyles.cancel();
|
|
78
71
|
if (this.popper) {
|
|
79
72
|
this.popper.destroy();
|
|
80
73
|
}
|
|
81
74
|
}
|
|
75
|
+
|
|
82
76
|
/* Calculate the max height of the popper if it's height is greater than the viewport to prevent
|
|
83
77
|
* the bottom of the popper not being viewable.
|
|
84
78
|
* Only works if the popper uses viewport as the boundary and has a fixed position ancestor.
|
|
85
79
|
*/
|
|
86
|
-
|
|
87
|
-
|
|
88
80
|
calculateMaxHeight(originalHeight, currentHeight, positionTop, cssPosition) {
|
|
89
81
|
let DocumentElementClientHeight = 0;
|
|
90
|
-
|
|
91
82
|
if (document.documentElement) {
|
|
92
83
|
DocumentElementClientHeight = document.documentElement.clientHeight;
|
|
93
84
|
}
|
|
94
|
-
|
|
95
85
|
if (cssPosition !== 'fixed') {
|
|
96
86
|
return null;
|
|
97
87
|
}
|
|
98
|
-
|
|
99
88
|
const viewportHeight = Math.max(DocumentElementClientHeight, window.innerHeight || 0);
|
|
100
|
-
return viewportHeight < originalHeight && currentHeight + positionTop >= viewportHeight - 50 ?
|
|
89
|
+
return viewportHeight < originalHeight && currentHeight + positionTop >= viewportHeight - 50 ?
|
|
90
|
+
// allow some spacing either side of viewport height
|
|
101
91
|
viewportHeight - 12 : null;
|
|
102
92
|
}
|
|
103
|
-
|
|
104
93
|
applyPopper(props) {
|
|
105
94
|
if (!this.targetRef.current || !this.contentRef.current) {
|
|
106
95
|
return;
|
|
107
96
|
}
|
|
108
|
-
|
|
109
97
|
if (this.popper) {
|
|
110
98
|
this.popper.destroy();
|
|
111
|
-
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// "new Popper(...)" operation is very expensive when called on virtual DOM.
|
|
112
102
|
// This condition reduces the number of calls so we can run our tests faster
|
|
113
103
|
// (time was reduced from 100s to 13s).
|
|
114
|
-
|
|
115
|
-
|
|
116
104
|
if (!props.content) {
|
|
117
105
|
return;
|
|
118
|
-
}
|
|
119
|
-
// actual target to popper
|
|
120
|
-
|
|
106
|
+
}
|
|
121
107
|
|
|
108
|
+
// we wrap our target in a div so that we can safely get a reference to it, but we pass the
|
|
109
|
+
// actual target to popper
|
|
122
110
|
const isAlwaysFixed = false;
|
|
123
111
|
const actualTarget = this.targetRef.current.children[0];
|
|
124
112
|
const popperOpts = {
|
|
@@ -141,8 +129,8 @@ export default class Layer extends Component {
|
|
|
141
129
|
flipVariations: true,
|
|
142
130
|
boundariesElement: 'viewport',
|
|
143
131
|
padding: 0 // leave 0 pixels between popper and the boundariesElement
|
|
144
|
-
|
|
145
132
|
},
|
|
133
|
+
|
|
146
134
|
preventOverflow: {
|
|
147
135
|
enabled: false,
|
|
148
136
|
escapeWithReference: true
|
|
@@ -150,12 +138,10 @@ export default class Layer extends Component {
|
|
|
150
138
|
},
|
|
151
139
|
positionFixed: isAlwaysFixed
|
|
152
140
|
};
|
|
153
|
-
|
|
154
141
|
if (actualTarget) {
|
|
155
142
|
this.popper = new Popper(actualTarget, this.contentRef.current, popperOpts);
|
|
156
143
|
}
|
|
157
144
|
}
|
|
158
|
-
|
|
159
145
|
render() {
|
|
160
146
|
const {
|
|
161
147
|
transform,
|
|
@@ -179,9 +165,7 @@ export default class Layer extends Component {
|
|
|
179
165
|
}
|
|
180
166
|
}, this.props.content));
|
|
181
167
|
}
|
|
182
|
-
|
|
183
168
|
}
|
|
184
|
-
|
|
185
169
|
_defineProperty(Layer, "defaultProps", {
|
|
186
170
|
boundariesElement: 'viewport',
|
|
187
171
|
children: null,
|
|
@@ -52,11 +52,9 @@ export const POSITION_ATTRIBUTE_ENUM = {
|
|
|
52
52
|
values: ['top left', 'top center', 'top right', 'right top', 'right middle', 'right bottom', 'bottom left', 'bottom center', 'bottom right', 'left top', 'left middle', 'left bottom'],
|
|
53
53
|
default: 'right middle'
|
|
54
54
|
};
|
|
55
|
-
|
|
56
55
|
function positionToPopper(position) {
|
|
57
56
|
return position && positionMap[position] ? positionMap[position].position : null;
|
|
58
57
|
}
|
|
59
|
-
|
|
60
58
|
export function positionPropToPopperPosition(position) {
|
|
61
59
|
return positionToPopper(position) || positionMap[POSITION_ATTRIBUTE_ENUM.default].position;
|
|
62
60
|
}
|
|
@@ -27,19 +27,15 @@ export default function MediaSingle({
|
|
|
27
27
|
handleMediaSingleRef
|
|
28
28
|
}) {
|
|
29
29
|
const children = React.Children.toArray(propsChildren);
|
|
30
|
-
|
|
31
30
|
if (!pctWidth && shouldAddDefaultWrappedWidth(layout, width, lineLength)) {
|
|
32
31
|
pctWidth = 50;
|
|
33
|
-
}
|
|
32
|
+
}
|
|
33
|
+
// When width is not set we have an absolute height for a given embed.
|
|
34
34
|
// When both width and height are set we use them to determine ratio and use that to define
|
|
35
35
|
// embed height in relation to whatever width of an dom element is in runtime
|
|
36
|
-
|
|
37
|
-
|
|
38
36
|
const isHeightOnly = width === undefined;
|
|
39
|
-
|
|
40
37
|
if (pctWidth) {
|
|
41
38
|
const pxWidth = Math.ceil(calcPxFromPct(pctWidth / 100, lineLength || containerWidth || 0));
|
|
42
|
-
|
|
43
39
|
if (isHeightOnly) {
|
|
44
40
|
width = pxWidth - akEditorMediaResizeHandlerPaddingWide;
|
|
45
41
|
} else if (width !== undefined) {
|
|
@@ -48,33 +44,32 @@ export default function MediaSingle({
|
|
|
48
44
|
}
|
|
49
45
|
} else if (isHeightOnly) {
|
|
50
46
|
// No pctWidth can be found on already existing pages with existing embeds
|
|
47
|
+
|
|
51
48
|
// It's ok to use Embed specific width, because width can be not set only in embed card.
|
|
52
49
|
// This value will be used only in the case of non `wide` and non `full-width` cases inside MediaSingleDimensionHelper.
|
|
53
50
|
width = DEFAULT_EMBED_CARD_WIDTH - akEditorMediaResizeHandlerPaddingWide;
|
|
54
|
-
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Media wrapper controls the height of the box.
|
|
55
54
|
// We can define this height
|
|
56
55
|
// - via height directly
|
|
57
56
|
// - via paddingBottom (if we have both height and width) which is a css trick to represent a ratio
|
|
58
|
-
|
|
59
|
-
|
|
60
57
|
let mediaWrapperHeight;
|
|
61
58
|
let paddingBottom;
|
|
62
|
-
|
|
63
59
|
if (isHeightOnly) {
|
|
64
60
|
mediaWrapperHeight = height;
|
|
65
61
|
} else if (width !== undefined) {
|
|
66
62
|
const mediaWrapperRatio = height / width * 100;
|
|
67
63
|
paddingBottom = `${mediaWrapperRatio.toFixed(3)}%`;
|
|
68
|
-
|
|
69
64
|
if (nodeType === 'embedCard') {
|
|
70
65
|
// we want to set ratio of whole box (including header) buy knowing ratio of iframe itself
|
|
66
|
+
|
|
71
67
|
// For some reason importing `embedHeaderHeight` from '@atlaskit/smart-card' breaks
|
|
72
68
|
// packages/editor/editor-core/src/plugins/table/__tests__/unit/toolbar.ts 🤷️, but we have a test
|
|
73
69
|
// that uses imported value, so it's should be good.
|
|
74
70
|
paddingBottom = `calc(${paddingBottom} + 32px)`;
|
|
75
71
|
}
|
|
76
72
|
}
|
|
77
|
-
|
|
78
73
|
const [media, caption] = children;
|
|
79
74
|
return jsx("div", {
|
|
80
75
|
ref: handleMediaSingleRef,
|
|
@@ -3,27 +3,23 @@ import React from 'react';
|
|
|
3
3
|
import { css, jsx } from '@emotion/react';
|
|
4
4
|
import { akEditorFullPageMaxWidth, akEditorFullWidthLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
5
5
|
import { calcBreakoutWidth, calcWideWidth } from '../../utils/breakout';
|
|
6
|
-
|
|
7
6
|
function float(layout) {
|
|
8
7
|
switch (layout) {
|
|
9
8
|
case 'wrap-right':
|
|
10
9
|
return 'right';
|
|
11
|
-
|
|
12
10
|
case 'wrap-left':
|
|
13
11
|
return 'left';
|
|
14
|
-
|
|
15
12
|
default:
|
|
16
13
|
return 'none';
|
|
17
14
|
}
|
|
18
15
|
}
|
|
19
|
-
|
|
20
16
|
function getWidthIfFullWidthMode(width) {
|
|
21
17
|
return width > akEditorFullWidthLayoutWidth ? '100%' : `${width}px`;
|
|
22
18
|
}
|
|
23
|
-
|
|
24
19
|
function getWidthIfDefaultMode(width) {
|
|
25
20
|
return width > akEditorFullPageMaxWidth ? '100%' : `${width}px`;
|
|
26
21
|
}
|
|
22
|
+
|
|
27
23
|
/**
|
|
28
24
|
* Calculates the image width for non-resized images.
|
|
29
25
|
*
|
|
@@ -31,8 +27,6 @@ function getWidthIfDefaultMode(width) {
|
|
|
31
27
|
* then an image in wide or full-width can not be wider than the image's
|
|
32
28
|
* original width.
|
|
33
29
|
*/
|
|
34
|
-
|
|
35
|
-
|
|
36
30
|
export function calcLegacyWidth(layout, width, containerWidth = 0, fullWidthMode, isResized) {
|
|
37
31
|
switch (layout) {
|
|
38
32
|
case 'align-start':
|
|
@@ -40,76 +34,61 @@ export function calcLegacyWidth(layout, width, containerWidth = 0, fullWidthMode
|
|
|
40
34
|
case 'wrap-right':
|
|
41
35
|
case 'wrap-left':
|
|
42
36
|
return width > containerWidth / 2 ? 'calc(50% - 12px)' : `${width}px`;
|
|
43
|
-
|
|
44
37
|
case 'wide':
|
|
45
38
|
return calcWideWidth(containerWidth);
|
|
46
|
-
|
|
47
39
|
case 'full-width':
|
|
48
40
|
return calcBreakoutWidth(layout, containerWidth);
|
|
49
|
-
|
|
50
41
|
default:
|
|
51
42
|
return isResized ? `${width}px` : fullWidthMode ? getWidthIfFullWidthMode(width) : getWidthIfDefaultMode(width);
|
|
52
43
|
}
|
|
53
44
|
}
|
|
45
|
+
|
|
54
46
|
/**
|
|
55
47
|
* Calculates the image width for previously resized images.
|
|
56
48
|
*
|
|
57
49
|
* Wide and full-width images are always that size (960px and 100%); there is
|
|
58
50
|
* no distinction between max-width and width.
|
|
59
51
|
*/
|
|
60
|
-
|
|
61
52
|
export function calcResizedWidth(layout, width, containerWidth = 0) {
|
|
62
53
|
switch (layout) {
|
|
63
54
|
case 'wide':
|
|
64
55
|
return calcWideWidth(containerWidth);
|
|
65
|
-
|
|
66
56
|
case 'full-width':
|
|
67
57
|
return calcBreakoutWidth(layout, containerWidth);
|
|
68
|
-
|
|
69
58
|
default:
|
|
70
59
|
return `${width}px`;
|
|
71
60
|
}
|
|
72
61
|
}
|
|
73
|
-
|
|
74
62
|
function calcMaxWidth(layout, containerWidth) {
|
|
75
63
|
switch (layout) {
|
|
76
64
|
case 'wide':
|
|
77
65
|
return calcWideWidth(containerWidth);
|
|
78
|
-
|
|
79
66
|
case 'full-width':
|
|
80
67
|
return calcBreakoutWidth(layout, containerWidth);
|
|
81
|
-
|
|
82
68
|
default:
|
|
83
69
|
return '100%';
|
|
84
70
|
}
|
|
85
71
|
}
|
|
86
|
-
|
|
87
72
|
function calcMargin(layout) {
|
|
88
73
|
switch (layout) {
|
|
89
74
|
case 'wrap-right':
|
|
90
75
|
return '12px auto 12px 12px';
|
|
91
|
-
|
|
92
76
|
case 'wrap-left':
|
|
93
77
|
return '12px 12px 12px auto';
|
|
94
|
-
|
|
95
78
|
default:
|
|
96
79
|
return '24px auto';
|
|
97
80
|
}
|
|
98
81
|
}
|
|
99
|
-
|
|
100
82
|
function isImageAligned(layout) {
|
|
101
83
|
switch (layout) {
|
|
102
84
|
case 'align-end':
|
|
103
85
|
return 'margin-right: 0';
|
|
104
|
-
|
|
105
86
|
case 'align-start':
|
|
106
87
|
return 'margin-left: 0';
|
|
107
|
-
|
|
108
88
|
default:
|
|
109
89
|
return '';
|
|
110
90
|
}
|
|
111
91
|
}
|
|
112
|
-
|
|
113
92
|
/**
|
|
114
93
|
* Can't use `.attrs` to handle highly dynamic styles because we are still
|
|
115
94
|
* supporting `styled-components` v1.
|
|
@@ -139,7 +118,6 @@ export const MediaSingleDimensionHelper = ({
|
|
|
139
118
|
transition: width 100ms ease-in;
|
|
140
119
|
}
|
|
141
120
|
`;
|
|
142
|
-
|
|
143
121
|
const RenderFallbackContainer = ({
|
|
144
122
|
hasFallbackContainer,
|
|
145
123
|
paddingBottom,
|
|
@@ -157,7 +135,6 @@ const RenderFallbackContainer = ({
|
|
|
157
135
|
}
|
|
158
136
|
` : ''}
|
|
159
137
|
`;
|
|
160
|
-
|
|
161
138
|
export const mediaWrapperStyle = props => css`
|
|
162
139
|
position: relative;
|
|
163
140
|
|
|
@@ -5,7 +5,6 @@ import MentionWithProviders from './mention-with-providers';
|
|
|
5
5
|
export default class Mention extends PureComponent {
|
|
6
6
|
constructor(props) {
|
|
7
7
|
super(props);
|
|
8
|
-
|
|
9
8
|
_defineProperty(this, "renderWithProvider", providers => {
|
|
10
9
|
const {
|
|
11
10
|
accessLevel,
|
|
@@ -26,10 +25,8 @@ export default class Mention extends PureComponent {
|
|
|
26
25
|
profilecardProvider: profilecardProvider
|
|
27
26
|
});
|
|
28
27
|
});
|
|
29
|
-
|
|
30
28
|
this.providerFactory = props.providers || new ProviderFactory();
|
|
31
29
|
}
|
|
32
|
-
|
|
33
30
|
componentWillUnmount() {
|
|
34
31
|
if (!this.props.providers) {
|
|
35
32
|
// new ProviderFactory is created if no `providers` has been set
|
|
@@ -37,7 +34,6 @@ export default class Mention extends PureComponent {
|
|
|
37
34
|
this.providerFactory.destroy();
|
|
38
35
|
}
|
|
39
36
|
}
|
|
40
|
-
|
|
41
37
|
render() {
|
|
42
38
|
return /*#__PURE__*/React.createElement(WithProviders, {
|
|
43
39
|
providers: ['mentionProvider', 'profilecardProvider'],
|
|
@@ -45,5 +41,4 @@ export default class Mention extends PureComponent {
|
|
|
45
41
|
renderNode: this.renderWithProvider
|
|
46
42
|
});
|
|
47
43
|
}
|
|
48
|
-
|
|
49
44
|
}
|
|
@@ -4,28 +4,22 @@ import React, { PureComponent } from 'react';
|
|
|
4
4
|
import { ResourcedMention } from '@atlaskit/mention/element';
|
|
5
5
|
import ResourcedMentionWithProfilecard from './mention-with-profilecard';
|
|
6
6
|
const GENERIC_USER_IDS = ['HipChat', 'all', 'here'];
|
|
7
|
-
|
|
8
7
|
const noop = () => {};
|
|
9
|
-
|
|
10
8
|
export default class MentionWithProviders extends PureComponent {
|
|
11
9
|
constructor(...args) {
|
|
12
10
|
super(...args);
|
|
13
|
-
|
|
14
11
|
_defineProperty(this, "state", {
|
|
15
12
|
profilecardProvider: null
|
|
16
13
|
});
|
|
17
14
|
}
|
|
18
|
-
|
|
19
15
|
UNSAFE_componentWillMount() {
|
|
20
16
|
this.updateProfilecardProvider(this.props);
|
|
21
17
|
}
|
|
22
|
-
|
|
23
18
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
24
19
|
if (nextProps.profilecardProvider !== this.props.profilecardProvider) {
|
|
25
20
|
this.updateProfilecardProvider(nextProps);
|
|
26
21
|
}
|
|
27
22
|
}
|
|
28
|
-
|
|
29
23
|
updateProfilecardProvider(props) {
|
|
30
24
|
// We are not using async/await here to avoid having an intermediate Promise
|
|
31
25
|
// introduced by the transpiler.
|
|
@@ -47,7 +41,6 @@ export default class MentionWithProviders extends PureComponent {
|
|
|
47
41
|
});
|
|
48
42
|
}
|
|
49
43
|
}
|
|
50
|
-
|
|
51
44
|
render() {
|
|
52
45
|
const {
|
|
53
46
|
accessLevel,
|
|
@@ -72,5 +65,4 @@ export default class MentionWithProviders extends PureComponent {
|
|
|
72
65
|
profilecardProvider: profilecardProvider
|
|
73
66
|
}, actionHandlers));
|
|
74
67
|
}
|
|
75
|
-
|
|
76
68
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
+
|
|
2
3
|
import { css, jsx } from '@emotion/react';
|
|
3
4
|
import SuccessIcon from '@atlaskit/icon/glyph/editor/success';
|
|
4
5
|
import ErrorIcon from '@atlaskit/icon/glyph/error';
|
|
@@ -11,7 +12,6 @@ const errorColor = css`
|
|
|
11
12
|
const validColor = css`
|
|
12
13
|
color: ${`var(--ds-text-success, ${G400})`};
|
|
13
14
|
`;
|
|
14
|
-
|
|
15
15
|
const messageStyle = props => css`
|
|
16
16
|
${h200(props)} font-weight: normal;
|
|
17
17
|
color: ${`var(--ds-text-subtlest, ${N200})`};
|
|
@@ -19,7 +19,6 @@ const messageStyle = props => css`
|
|
|
19
19
|
display: flex;
|
|
20
20
|
justify-content: baseline;
|
|
21
21
|
`;
|
|
22
|
-
|
|
23
22
|
const iconWrapperStyle = css`
|
|
24
23
|
display: flex;
|
|
25
24
|
margin-right: 4px;
|
|
@@ -10,124 +10,96 @@ export default function overflowShadow(Component, options) {
|
|
|
10
10
|
return class OverflowShadow extends React.Component {
|
|
11
11
|
constructor(...args) {
|
|
12
12
|
super(...args);
|
|
13
|
-
|
|
14
13
|
_defineProperty(this, "overflowContainerWidth", 0);
|
|
15
|
-
|
|
16
14
|
_defineProperty(this, "state", {
|
|
17
15
|
showLeftShadow: false,
|
|
18
16
|
showRightShadow: false
|
|
19
17
|
});
|
|
20
|
-
|
|
21
18
|
_defineProperty(this, "handleScroll", event => {
|
|
22
19
|
if (!this.overflowContainer || event.target !== this.overflowContainer || options.useShadowObserver) {
|
|
23
20
|
return;
|
|
24
21
|
}
|
|
25
|
-
|
|
26
22
|
this.updateShadows();
|
|
27
23
|
});
|
|
28
|
-
|
|
29
24
|
_defineProperty(this, "updateShadows", () => {
|
|
30
25
|
if (options.useShadowObserver) {
|
|
31
26
|
return;
|
|
32
27
|
}
|
|
33
|
-
|
|
34
28
|
this.setState(prevState => {
|
|
35
29
|
if (!this.overflowContainer) {
|
|
36
30
|
return;
|
|
37
31
|
}
|
|
38
|
-
|
|
39
32
|
const diff = this.calcOverflowDiff();
|
|
40
33
|
const showRightShadow = diff > 0 && diff > this.overflowContainer.scrollLeft;
|
|
41
34
|
const showLeftShadow = this.showLeftShadow(this.overflowContainer);
|
|
42
|
-
|
|
43
35
|
if (showLeftShadow !== prevState.showLeftShadow || showRightShadow !== this.state.showRightShadow) {
|
|
44
36
|
return {
|
|
45
37
|
showLeftShadow,
|
|
46
38
|
showRightShadow
|
|
47
39
|
};
|
|
48
40
|
}
|
|
49
|
-
|
|
50
41
|
return null;
|
|
51
42
|
});
|
|
52
43
|
});
|
|
53
|
-
|
|
54
44
|
_defineProperty(this, "showLeftShadow", overflowContainer => {
|
|
55
45
|
return !!overflowContainer && overflowContainer.scrollLeft > 0;
|
|
56
46
|
});
|
|
57
|
-
|
|
58
47
|
_defineProperty(this, "calcOverflowDiff", () => {
|
|
59
48
|
if (!this.overflowContainer) {
|
|
60
49
|
return 0;
|
|
61
50
|
}
|
|
62
|
-
|
|
63
51
|
this.diff = this.calcScrollableWidth();
|
|
64
52
|
return this.diff - this.overflowContainer.offsetWidth;
|
|
65
53
|
});
|
|
66
|
-
|
|
67
54
|
_defineProperty(this, "calcScrollableWidth", () => {
|
|
68
55
|
if (!this.scrollable && this.overflowContainer) {
|
|
69
56
|
return this.overflowContainer.scrollWidth;
|
|
70
57
|
}
|
|
71
|
-
|
|
72
58
|
if (!this.scrollable) {
|
|
73
59
|
return 0;
|
|
74
60
|
}
|
|
75
|
-
|
|
76
61
|
let width = 0;
|
|
77
|
-
|
|
78
62
|
for (let i = 0; i < this.scrollable.length; i++) {
|
|
79
63
|
const scrollableElement = this.scrollable[i];
|
|
80
64
|
width += scrollableElement.scrollWidth;
|
|
81
65
|
}
|
|
82
|
-
|
|
83
66
|
return width;
|
|
84
67
|
});
|
|
85
|
-
|
|
86
68
|
_defineProperty(this, "handleContainer", container => {
|
|
87
69
|
if (!container || this.container) {
|
|
88
70
|
return;
|
|
89
71
|
}
|
|
90
|
-
|
|
91
72
|
this.container = container;
|
|
92
73
|
this.overflowContainer = container.querySelector(options.overflowSelector);
|
|
93
|
-
|
|
94
74
|
if (!this.overflowContainer) {
|
|
95
75
|
this.overflowContainer = container;
|
|
96
76
|
}
|
|
97
|
-
|
|
98
77
|
if (options.useShadowObserver) {
|
|
99
78
|
this.initShadowObserver();
|
|
100
79
|
return;
|
|
101
80
|
}
|
|
102
|
-
|
|
103
81
|
this.updateShadows();
|
|
104
82
|
this.overflowContainer.addEventListener('scroll', this.handleScroll);
|
|
105
83
|
});
|
|
106
84
|
}
|
|
107
|
-
|
|
108
85
|
componentWillUnmount() {
|
|
109
86
|
if (options.useShadowObserver) {
|
|
110
87
|
return this.shadowObserver && this.shadowObserver.dispose();
|
|
111
88
|
}
|
|
112
|
-
|
|
113
89
|
if (this.overflowContainer) {
|
|
114
90
|
this.overflowContainer.removeEventListener('scroll', this.handleScroll);
|
|
115
91
|
}
|
|
116
|
-
|
|
117
92
|
this.updateShadows();
|
|
118
93
|
}
|
|
119
|
-
|
|
120
94
|
componentDidUpdate() {
|
|
121
95
|
if (!options.useShadowObserver) {
|
|
122
96
|
this.updateShadows();
|
|
123
97
|
}
|
|
124
98
|
}
|
|
125
|
-
|
|
126
99
|
initShadowObserver() {
|
|
127
100
|
if (this.shadowObserver || !this.overflowContainer) {
|
|
128
101
|
return;
|
|
129
102
|
}
|
|
130
|
-
|
|
131
103
|
this.shadowObserver = new ShadowObserver({
|
|
132
104
|
scrollContainer: this.overflowContainer,
|
|
133
105
|
onUpdateShadows: shadowStates => {
|
|
@@ -136,20 +108,17 @@ export default function overflowShadow(Component, options) {
|
|
|
136
108
|
showLeftShadow,
|
|
137
109
|
showRightShadow
|
|
138
110
|
} = shadowStates;
|
|
139
|
-
|
|
140
111
|
if (showLeftShadow !== prevState.showLeftShadow || showRightShadow !== prevState.showRightShadow) {
|
|
141
112
|
return {
|
|
142
113
|
showLeftShadow,
|
|
143
114
|
showRightShadow
|
|
144
115
|
};
|
|
145
116
|
}
|
|
146
|
-
|
|
147
117
|
return null;
|
|
148
118
|
});
|
|
149
119
|
}
|
|
150
120
|
});
|
|
151
121
|
}
|
|
152
|
-
|
|
153
122
|
render() {
|
|
154
123
|
const {
|
|
155
124
|
showLeftShadow,
|
|
@@ -161,6 +130,5 @@ export default function overflowShadow(Component, options) {
|
|
|
161
130
|
shadowClassNames: classNames
|
|
162
131
|
}, this.props));
|
|
163
132
|
}
|
|
164
|
-
|
|
165
133
|
};
|
|
166
134
|
}
|
|
@@ -1,42 +1,34 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
export let ShadowKeys;
|
|
3
|
-
|
|
4
3
|
(function (ShadowKeys) {
|
|
5
4
|
ShadowKeys["SHOW_LEFT_SHADOW"] = "showLeftShadow";
|
|
6
5
|
ShadowKeys["SHOW_RIGHT_SHADOW"] = "showRightShadow";
|
|
7
6
|
})(ShadowKeys || (ShadowKeys = {}));
|
|
8
|
-
|
|
9
7
|
export const shadowObserverClassNames = {
|
|
10
8
|
SENTINEL_LEFT: 'sentinel-left',
|
|
11
9
|
SENTINEL_RIGHT: 'sentinel-right',
|
|
12
10
|
SHADOW_CONTAINER: 'with-shadow-observer'
|
|
13
11
|
};
|
|
14
|
-
|
|
15
12
|
const requestIdleCallback = fn => {
|
|
16
13
|
return window.requestIdleCallback ? window.requestIdleCallback(fn) : window.requestAnimationFrame(fn);
|
|
17
14
|
};
|
|
18
|
-
|
|
19
15
|
const cancelIdleCallback = id => {
|
|
20
16
|
return window.cancelIdleCallback ? window.cancelIdleCallback(id) : window.cancelAnimationFrame(id);
|
|
21
17
|
};
|
|
22
|
-
|
|
23
18
|
export class ShadowObserver {
|
|
24
19
|
constructor({
|
|
25
20
|
scrollContainer,
|
|
26
21
|
onUpdateShadows
|
|
27
22
|
}) {
|
|
28
23
|
_defineProperty(this, "sentinels", {});
|
|
29
|
-
|
|
30
24
|
_defineProperty(this, "shadowStates", {
|
|
31
25
|
[ShadowKeys.SHOW_LEFT_SHADOW]: false,
|
|
32
26
|
[ShadowKeys.SHOW_RIGHT_SHADOW]: false
|
|
33
27
|
});
|
|
34
|
-
|
|
35
28
|
_defineProperty(this, "init", () => {
|
|
36
29
|
if (!this.scrollContainer || this.intersectionObserver) {
|
|
37
30
|
return;
|
|
38
31
|
}
|
|
39
|
-
|
|
40
32
|
this.sentinels.right = document.createElement('div');
|
|
41
33
|
this.sentinels.right.classList.add(shadowObserverClassNames.SENTINEL_RIGHT);
|
|
42
34
|
this.scrollContainer.appendChild(this.sentinels.right);
|
|
@@ -51,26 +43,21 @@ export class ShadowObserver {
|
|
|
51
43
|
this.intersectionObserver.observe(this.sentinels.left);
|
|
52
44
|
this.intersectionObserver.observe(this.sentinels.right);
|
|
53
45
|
});
|
|
54
|
-
|
|
55
46
|
_defineProperty(this, "onIntersect", entry => {
|
|
56
47
|
this.requestCallbackId = requestIdleCallback(() => {
|
|
57
48
|
if (entry.target.classList.contains(shadowObserverClassNames.SENTINEL_LEFT)) {
|
|
58
49
|
this.shadowStates[ShadowKeys.SHOW_LEFT_SHADOW] = !entry.isIntersecting;
|
|
59
50
|
}
|
|
60
|
-
|
|
61
51
|
if (entry.target.classList.contains(shadowObserverClassNames.SENTINEL_RIGHT)) {
|
|
62
52
|
this.shadowStates[ShadowKeys.SHOW_RIGHT_SHADOW] = !entry.isIntersecting;
|
|
63
53
|
}
|
|
64
|
-
|
|
65
54
|
this.onUpdateShadows(this.shadowStates);
|
|
66
55
|
});
|
|
67
56
|
});
|
|
68
|
-
|
|
69
57
|
this.scrollContainer = scrollContainer;
|
|
70
58
|
this.onUpdateShadows = onUpdateShadows;
|
|
71
59
|
this.init();
|
|
72
60
|
}
|
|
73
|
-
|
|
74
61
|
dispose() {
|
|
75
62
|
if (this.intersectionObserver) {
|
|
76
63
|
this.intersectionObserver.disconnect();
|
|
@@ -78,5 +65,4 @@ export class ShadowObserver {
|
|
|
78
65
|
this.requestCallbackId && cancelIdleCallback(this.requestCallbackId);
|
|
79
66
|
}
|
|
80
67
|
}
|
|
81
|
-
|
|
82
68
|
}
|