@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,8 +1,6 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
-
|
|
4
3
|
var _templateObject, _templateObject2;
|
|
5
|
-
|
|
6
4
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
7
5
|
import { css } from '@emotion/react';
|
|
8
6
|
import { PanelType } from '@atlaskit/adf-schema';
|
|
@@ -106,26 +104,29 @@ var tokenDarkPanelColors = {
|
|
|
106
104
|
success: "var(--ds-background-success, ".concat(darkPanelColors['success'], ")"),
|
|
107
105
|
warning: "var(--ds-background-warning, ".concat(darkPanelColors['warning'], ")"),
|
|
108
106
|
error: "var(--ds-background-danger, ".concat(darkPanelColors['error'], ")")
|
|
109
|
-
};
|
|
110
|
-
// To fix alignment issues with custom icons, vertical alignment is updated.
|
|
107
|
+
};
|
|
111
108
|
|
|
109
|
+
// New custom icons are a little smaller than predefined icons.
|
|
110
|
+
// To fix alignment issues with custom icons, vertical alignment is updated.
|
|
112
111
|
var panelEmojiSpriteVerticalAlignment = -(gridSize() * 3 - akEditorCustomIconSize) / 2;
|
|
113
|
-
var panelEmojiImageVerticalAlignment = panelEmojiSpriteVerticalAlignment - 1;
|
|
112
|
+
var panelEmojiImageVerticalAlignment = panelEmojiSpriteVerticalAlignment - 1;
|
|
114
113
|
|
|
115
|
-
|
|
114
|
+
// TODO: https://product-fabric.atlassian.net/browse/DSP-4066
|
|
115
|
+
var panelDarkModeColors = [[colors.B50, darkPanelColors.B1200S], [colors.B75, darkPanelColors.B900], [colors.B100, darkPanelColors.B800S], [colors.N0, darkPanelColors.LightGray], [colors.N20, darkPanelColors.Gray], [colors.N60, darkPanelColors.DarkGray], [colors.T50, darkPanelColors.T1200S], [colors.T75, darkPanelColors.T900], [colors.T100, darkPanelColors.T900S], [colors.G50, darkPanelColors.G1200S], [colors.G75, darkPanelColors.G900], [colors.G200, darkPanelColors.G900S], [colors.Y50, darkPanelColors.Y1200S], [colors.Y75, darkPanelColors.Y900], [colors.Y200, darkPanelColors.Y800S], [colors.R50, darkPanelColors.R1200S], [colors.R75, darkPanelColors.R900], [colors.R100, darkPanelColors.R800S], [colors.P50, darkPanelColors.P1200S], [colors.P75, darkPanelColors.P900], [colors.P100, darkPanelColors.P800S]];
|
|
116
116
|
|
|
117
|
+
// used for custom panels
|
|
117
118
|
export var getPanelDarkColor = function getPanelDarkColor(panelColor) {
|
|
118
119
|
var colorObject = panelDarkModeColors.find(function (color) {
|
|
119
120
|
return color[0] === panelColor || color[1] === panelColor;
|
|
120
121
|
});
|
|
121
122
|
return colorObject ? colorObject[1] : darkPanelColors.B1200S;
|
|
122
|
-
};
|
|
123
|
+
};
|
|
123
124
|
|
|
125
|
+
// used for custom panels
|
|
124
126
|
export var getPanelBackgroundDarkModeColors = panelDarkModeColors.map(function (_ref) {
|
|
125
127
|
var _ref2 = _slicedToArray(_ref, 2),
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
128
|
+
colorName = _ref2[0],
|
|
129
|
+
colorValue = _ref2[1];
|
|
129
130
|
return getPanelDarkModeCSS(colorName, colorValue);
|
|
130
131
|
}).join('\n');
|
|
131
132
|
export function getPanelDarkModeCSS(colorName, colorValue) {
|
|
@@ -160,7 +161,6 @@ export var PanelSharedSelectors = {
|
|
|
160
161
|
yellowWarningIcon: "[aria-label=\":warning:\"] span:nth-child(1)",
|
|
161
162
|
copyButton: "button[aria-label=\"Copy\"]"
|
|
162
163
|
};
|
|
163
|
-
|
|
164
164
|
var iconDynamicStyles = function iconDynamicStyles(panelType) {
|
|
165
165
|
return function (props) {
|
|
166
166
|
var light = lightIconColor[panelType];
|
|
@@ -171,9 +171,9 @@ var iconDynamicStyles = function iconDynamicStyles(panelType) {
|
|
|
171
171
|
})(props);
|
|
172
172
|
return "\n color: ".concat(color, ";\n ");
|
|
173
173
|
};
|
|
174
|
-
};
|
|
175
|
-
|
|
174
|
+
};
|
|
176
175
|
|
|
176
|
+
// Provides the color without tokens, used when converting to a custom panel
|
|
177
177
|
export var getPanelTypeBackgroundNoTokens = function getPanelTypeBackgroundNoTokens(panelType) {
|
|
178
178
|
var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
179
179
|
var light = lightPanelColors[panelType];
|
|
@@ -186,8 +186,8 @@ export var getPanelTypeBackgroundNoTokens = function getPanelTypeBackgroundNoTok
|
|
|
186
186
|
};
|
|
187
187
|
export var getPanelTypeBackground = function getPanelTypeBackground(panelType) {
|
|
188
188
|
var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
189
|
-
var light = hexToEditorBackgroundPaletteColor(lightPanelColors[panelType]);
|
|
190
|
-
|
|
189
|
+
var light = hexToEditorBackgroundPaletteColor(lightPanelColors[panelType]);
|
|
190
|
+
// hexToEditorBackgroundPaletteColor has a light mode as a fallback color - for legacy dark mode we define the tokens locally
|
|
191
191
|
var dark = tokenDarkPanelColors[panelType];
|
|
192
192
|
var background = themed({
|
|
193
193
|
light: light,
|
|
@@ -195,7 +195,6 @@ export var getPanelTypeBackground = function getPanelTypeBackground(panelType) {
|
|
|
195
195
|
})(props);
|
|
196
196
|
return background || 'none';
|
|
197
197
|
};
|
|
198
|
-
|
|
199
198
|
var mainDynamicStyles = function mainDynamicStyles(panelType) {
|
|
200
199
|
return function (props) {
|
|
201
200
|
var background = getPanelTypeBackground(panelType, props);
|
|
@@ -206,7 +205,6 @@ var mainDynamicStyles = function mainDynamicStyles(panelType) {
|
|
|
206
205
|
return "\n background-color: ".concat(background, ";\n color: ").concat(text, ";\n ");
|
|
207
206
|
};
|
|
208
207
|
};
|
|
209
|
-
|
|
210
208
|
export var panelSharedStylesWithoutPrefix = function panelSharedStylesWithoutPrefix(props) {
|
|
211
209
|
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border-radius: ", "px;\n margin: ", " 0 0;\n padding: ", "px;\n min-width: ", "px;\n display: flex;\n position: relative;\n align-items: baseline;\n word-break: break-word;\n\n ", "\n\n .", " {\n flex-shrink: 0;\n height: ", "px;\n width: ", "px;\n box-sizing: content-box;\n padding-right: ", "px;\n text-align: center;\n user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n ", "\n\n > span {\n vertical-align: middle;\n display: inline-flex;\n }\n\n .", " {\n vertical-align: ", "px;\n }\n\n .", " {\n vertical-align: ", "px;\n\n // Vertical align only works for inline-block elements in Firefox\n @-moz-document url-prefix() {\n img {\n display: inline-block;\n }\n }\n }\n }\n\n .ak-editor-panel__content {\n margin: 1px 0 1px;\n flex: 1 0 0;\n /*\n https://ishadeed.com/article/min-max-css/#setting-min-width-to-zero-with-flexbox\n The default value for min-width is auto, which is computed to zero. When an element is a flex item, the value of min-width doesn\u2019t compute to zero. The minimum size of a flex item is equal to the size of its contents.\n */\n min-width: 0;\n }\n\n &[data-panel-type='", "'] {\n ", "\n\n .", " {\n ", "\n }\n }\n\n &[data-panel-type='", "'] {\n ", "\n\n .", " {\n ", "\n }\n }\n\n &[data-panel-type='", "'] {\n ", "\n\n .", " {\n ", "\n }\n }\n\n &[data-panel-type='", "'] {\n ", "\n\n .", " {\n ", "\n }\n }\n\n &[data-panel-type='", "'] {\n ", "\n\n .", " {\n ", "\n }\n }\n\n &[data-panel-type='", "'] {\n ", ";\n }\n"])), borderRadius(), blockNodesVerticalMargin, gridSize(), akEditorTableCellMinWidth, mainDynamicStyles(PanelType.INFO)(props), PanelSharedCssClassName.icon, gridSize() * 3, gridSize() * 3, gridSize(), iconDynamicStyles(PanelType.INFO)(props), emojiSprite, panelEmojiSpriteVerticalAlignment, emojiImage, panelEmojiImageVerticalAlignment, PanelType.NOTE, mainDynamicStyles(PanelType.NOTE)(props), PanelSharedCssClassName.icon, iconDynamicStyles(PanelType.NOTE)(props), PanelType.TIP, mainDynamicStyles(PanelType.TIP)(props), PanelSharedCssClassName.icon, iconDynamicStyles(PanelType.TIP)(props), PanelType.WARNING, mainDynamicStyles(PanelType.WARNING)(props), PanelSharedCssClassName.icon, iconDynamicStyles(PanelType.WARNING)(props), PanelType.ERROR, mainDynamicStyles(PanelType.ERROR)(props), PanelSharedCssClassName.icon, iconDynamicStyles(PanelType.ERROR)(props), PanelType.SUCCESS, mainDynamicStyles(PanelType.SUCCESS)(props), PanelSharedCssClassName.icon, iconDynamicStyles(PanelType.SUCCESS)(props), PanelType.CUSTOM, themed({
|
|
212
210
|
dark: getPanelBackgroundDarkModeColors
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
|
|
3
2
|
var _templateObject;
|
|
4
|
-
|
|
5
3
|
import { css } from '@emotion/react';
|
|
6
|
-
import { akEditorLineHeight, blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
|
|
4
|
+
import { akEditorLineHeight, blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
|
|
7
5
|
|
|
6
|
+
// @see typography spreadsheet: https://docs.google.com/spreadsheets/d/1iYusRGCT4PoPfvxbJ8NrgjtfFgXLm5lpDWXzjua1W2E/edit#gid=93913128
|
|
8
7
|
export var paragraphSharedStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n & p {\n font-size: 1em;\n line-height: ", ";\n font-weight: normal;\n margin-top: ", ";\n margin-bottom: 0;\n letter-spacing: -0.005em;\n }\n"])), akEditorLineHeight, blockNodesVerticalMargin);
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
|
|
3
2
|
var _templateObject;
|
|
4
|
-
|
|
5
3
|
import { css } from '@emotion/react';
|
|
6
4
|
import { akEditorLineHeight } from '@atlaskit/editor-shared-styles';
|
|
7
5
|
import { DN50, N30A } from '@atlaskit/theme/colors';
|
|
@@ -9,8 +7,9 @@ import { themed } from '@atlaskit/theme/components';
|
|
|
9
7
|
var divider = themed({
|
|
10
8
|
light: "var(--ds-border, ".concat(N30A, ")"),
|
|
11
9
|
dark: "var(--ds-border, ".concat(DN50, ")")
|
|
12
|
-
});
|
|
10
|
+
});
|
|
13
11
|
|
|
12
|
+
// @see typography spreadsheet: https://docs.google.com/spreadsheets/d/1iYusRGCT4PoPfvxbJ8NrgjtfFgXLm5lpDWXzjua1W2E/edit#gid=93913128
|
|
14
13
|
export var ruleSharedStyles = function ruleSharedStyles(props) {
|
|
15
14
|
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n & hr {\n border: none;\n background-color: ", ";\n margin: ", "em 0;\n height: 2px;\n border-radius: 1px;\n }\n"])), divider(props), akEditorLineHeight);
|
|
16
15
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
|
|
3
2
|
var _templateObject;
|
|
4
|
-
|
|
5
3
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
4
|
+
|
|
6
5
|
import { css } from '@emotion/react';
|
|
7
6
|
import { akEditorShadowZIndex } from '@atlaskit/editor-shared-styles';
|
|
8
7
|
import { N40A } from '@atlaskit/theme/colors';
|
|
9
8
|
import { shadowClassNames } from '../../ui/OverflowShadow';
|
|
10
9
|
import { shadowObserverClassNames } from '../../ui/OverflowShadow/shadowObserver';
|
|
11
10
|
var shadowWidth = 8;
|
|
11
|
+
|
|
12
12
|
/**
|
|
13
13
|
* TODO: This is close to working and removes a tone of JS from OverflowShadow component
|
|
14
14
|
*
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
|
|
3
2
|
var _templateObject;
|
|
4
|
-
|
|
5
3
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
4
|
+
|
|
6
5
|
import { css } from '@emotion/react';
|
|
7
6
|
import { tableCellContentDomSelector, tableCellSelector, tableHeaderSelector, tablePrefixSelector } from '@atlaskit/adf-schema';
|
|
8
7
|
import { akEditorBreakoutPadding, akEditorFullWidthLayoutWidth, akEditorSelectedNodeClassName, akEditorTableBorder, akEditorTableBorderDark, akEditorTableNumberColumnWidth, akEditorTableToolbar, akEditorTableToolbarDark, akEditorWideLayoutWidth, getTableCellBackgroundDarkModeColors, overflowShadow } from '@atlaskit/editor-shared-styles';
|
|
@@ -34,7 +33,6 @@ export var TableSharedCssClassName = {
|
|
|
34
33
|
TABLE_ROW_CONTROLS_WRAPPER: "".concat(tablePrefixSelector, "-row-controls-wrapper"),
|
|
35
34
|
TABLE_COLUMN_CONTROLS_DECORATIONS: "".concat(tablePrefixSelector, "-column-controls-decoration")
|
|
36
35
|
};
|
|
37
|
-
|
|
38
36
|
var tableSharedStyle = function tableSharedStyle(props) {
|
|
39
37
|
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", " {\n position: relative;\n margin: 0 auto ", "px;\n box-sizing: border-box;\n\n /**\n * Fix block top alignment inside table cells.\n */\n .decisionItemView-content-wrap:first-of-type > div {\n margin-top: 0;\n }\n }\n .", "[data-number-column='true'] {\n padding-left: ", "px;\n clear: both;\n }\n .", " > table {\n margin: ", "px 0 0 0;\n }\n\n .", " > table,\n .", " > table {\n margin: ", "px ", "px 0 0;\n }\n\n /* avoid applying styles to nested tables (possible via extensions) */\n .", " > table,\n .", " > table,\n .", " > table {\n border-collapse: collapse;\n border: ", "px solid\n ", ";\n table-layout: fixed;\n font-size: 1em;\n width: 100%;\n\n &[data-autosize='true'] {\n table-layout: auto;\n }\n\n & {\n * {\n box-sizing: border-box;\n }\n hr {\n box-sizing: content-box;\n }\n\n tbody {\n border-bottom: none;\n }\n th td {\n background-color: ", ";\n }\n th,\n td {\n min-width: ", "px;\n font-weight: normal;\n vertical-align: top;\n border: 1px solid\n ", ";\n border-right-width: 0;\n border-bottom-width: 0;\n padding: ", "px;\n /* https://stackoverflow.com/questions/7517127/borders-not-shown-in-firefox-with-border-collapse-on-table-position-relative-o */\n ", "\n\n ", ";\n\n > :first-child:not(style),\n > style:first-child + * {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child + *,\n > style:first-child + .ProseMirror-gapcursor + * {\n margin-top: 0;\n }\n\n > .ProseMirror-gapcursor:first-child + span + *,\n > style:first-child + .ProseMirror-gapcursor + span + * {\n margin-top: 0;\n }\n\n th p:not(:first-of-type),\n td p:not(:first-of-type) {\n margin-top: 12px;\n }\n }\n th {\n background-color: ", ";\n text-align: left;\n\n /* only apply this styling to codeblocks in default background headercells */\n /* TODO this needs to be overhauled as it relies on unsafe selectors */\n &:not([style]):not(.danger) {\n .", ":not(.danger) {\n background-color: ", ";\n\n :not(.", ") {\n box-shadow: 0px 0px 0px 1px\n ", ";\n }\n\n .", " {\n background-image: ", ";\n\n background-color: ", ";\n }\n\n .", " {\n background-color: ", ";\n }\n\n /* this is only relevant to the element taken care of by renderer */\n > [data-ds--code--code-block] {\n background-image: ", "!important;\n\n background-color: ", "!important;\n\n // selector lives inside @atlaskit/code\n --ds--code--line-number-bg-color: ", ";\n }\n }\n }\n }\n }\n }\n"])), TableSharedCssClassName.TABLE_CONTAINER, tableMarginBottom, TableSharedCssClassName.TABLE_CONTAINER, akEditorTableNumberColumnWidth - 1, TableSharedCssClassName.TABLE_NODE_WRAPPER, tableMarginTop, TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, tableMarginTop, tableMarginSides, TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, tableCellBorderWidth, themed({
|
|
40
38
|
light: "var(--ds-border, ".concat(akEditorTableBorder, ")"),
|
|
@@ -76,21 +74,16 @@ var tableSharedStyle = function tableSharedStyle(props) {
|
|
|
76
74
|
dark: "var(--ds-background-neutral, ".concat(DN20, ")")
|
|
77
75
|
})(props));
|
|
78
76
|
};
|
|
79
|
-
|
|
80
77
|
export var calcTableWidth = function calcTableWidth(layout, containerWidth) {
|
|
81
78
|
var addControllerPadding = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
82
|
-
|
|
83
79
|
switch (layout) {
|
|
84
80
|
case 'full-width':
|
|
85
81
|
return containerWidth ? "".concat(Math.min(containerWidth - (addControllerPadding ? akEditorBreakoutPadding : 0), akEditorFullWidthLayoutWidth), "px") : "".concat(akEditorFullWidthLayoutWidth, "px");
|
|
86
|
-
|
|
87
82
|
case 'wide':
|
|
88
83
|
if (containerWidth) {
|
|
89
84
|
return "".concat(Math.min(containerWidth - (addControllerPadding ? akEditorBreakoutPadding : 0), akEditorWideLayoutWidth), "px");
|
|
90
85
|
}
|
|
91
|
-
|
|
92
86
|
return "".concat(akEditorWideLayoutWidth, "px");
|
|
93
|
-
|
|
94
87
|
default:
|
|
95
88
|
return 'inherit';
|
|
96
89
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
|
|
3
2
|
var _templateObject;
|
|
4
|
-
|
|
5
3
|
import { css } from '@emotion/react';
|
|
6
4
|
import { akEditorTableCellMinWidth } from '@atlaskit/editor-shared-styles';
|
|
7
5
|
export var TaskDecisionSharedCssClassName = {
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
|
|
3
2
|
var _templateObject;
|
|
4
|
-
|
|
5
3
|
import { css } from '@emotion/react';
|
|
6
4
|
export var textColorStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .fabric-text-color-mark {\n color: var(--custom-palette-color, inherit);\n }\n\n a .fabric-text-color-mark {\n color: unset;\n }\n"])));
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
|
|
3
2
|
var _templateObject;
|
|
4
|
-
|
|
5
3
|
import { css } from '@emotion/react';
|
|
6
4
|
var whitespaceSharedStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n word-wrap: break-word;\n white-space: pre-wrap;\n"])));
|
|
7
5
|
export { whitespaceSharedStyles };
|
|
@@ -3,25 +3,25 @@ import { findParentNodeOfType, findSelectedNodeOfType } from 'prosemirror-utils'
|
|
|
3
3
|
import { mapChildren } from '../utils/slice';
|
|
4
4
|
export var findExpand = function findExpand(state, selection) {
|
|
5
5
|
var _state$schema$nodes = state.schema.nodes,
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
expand = _state$schema$nodes.expand,
|
|
7
|
+
nestedExpand = _state$schema$nodes.nestedExpand;
|
|
8
8
|
return findSelectedNodeOfType([expand, nestedExpand])(selection || state.selection) || findParentNodeOfType([expand, nestedExpand])(selection || state.selection);
|
|
9
|
-
};
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
// If the top level is a single expand, and the expand is not
|
|
10
12
|
// a part of copied content, then return unwrap contents.
|
|
11
13
|
// This is needed for handling content copied from expand.
|
|
12
14
|
// https://product-fabric.atlassian.net/browse/ED-9146
|
|
13
|
-
|
|
14
15
|
export var transformSliceToRemoveOpenExpand = function transformSliceToRemoveOpenExpand(slice, schema) {
|
|
15
16
|
if (slice.openStart > 1 && slice.openEnd > 1 && slice.content.childCount === 1 && slice.content.firstChild && slice.content.firstChild.type === schema.nodes.expand) {
|
|
16
17
|
return new Slice(slice.content.firstChild.content, slice.openStart - 1, slice.openEnd - 1);
|
|
17
18
|
}
|
|
18
|
-
|
|
19
19
|
return slice;
|
|
20
20
|
};
|
|
21
21
|
export var transformSliceNestedExpandToExpand = function transformSliceNestedExpandToExpand(slice, schema) {
|
|
22
22
|
var _schema$nodes = schema.nodes,
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
expand = _schema$nodes.expand,
|
|
24
|
+
nestedExpand = _schema$nodes.nestedExpand;
|
|
25
25
|
var children = [];
|
|
26
26
|
mapChildren(slice.content, function (node) {
|
|
27
27
|
if (node.type === nestedExpand) {
|
|
@@ -1,24 +1,23 @@
|
|
|
1
1
|
import { Slice } from 'prosemirror-model';
|
|
2
2
|
import { mapFragment } from '../utils/slice';
|
|
3
|
+
|
|
3
4
|
/**
|
|
4
5
|
* Lift content out of "open" top-level bodiedExtensions.
|
|
5
6
|
* Will not work if bodiedExtensions are nested, or when bodiedExtensions are not in the top level
|
|
6
7
|
*/
|
|
7
|
-
|
|
8
8
|
export var transformSliceToRemoveOpenBodiedExtension = function transformSliceToRemoveOpenBodiedExtension(slice, schema) {
|
|
9
9
|
var bodiedExtension = schema.nodes.bodiedExtension;
|
|
10
10
|
var fragment = mapFragment(slice.content, function (node, parent, index) {
|
|
11
11
|
if (node.type === bodiedExtension && !parent) {
|
|
12
12
|
var currentNodeIsAtStartAndIsOpen = slice.openStart && index === 0;
|
|
13
13
|
var currentNodeIsAtEndAndIsOpen = slice.openEnd && index + 1 === slice.content.childCount;
|
|
14
|
-
|
|
15
14
|
if (currentNodeIsAtStartAndIsOpen || currentNodeIsAtEndAndIsOpen) {
|
|
16
15
|
return node.content;
|
|
17
16
|
}
|
|
18
17
|
}
|
|
19
|
-
|
|
20
18
|
return node;
|
|
21
|
-
});
|
|
19
|
+
});
|
|
22
20
|
|
|
21
|
+
// If the first/last child has changed - then we know we've removed a bodied extension & to decrement the open depth
|
|
23
22
|
return new Slice(fragment, fragment.firstChild && fragment.firstChild.type !== slice.content.firstChild.type ? slice.openStart - 1 : slice.openStart, fragment.lastChild && fragment.lastChild.type !== slice.content.lastChild.type ? slice.openEnd - 1 : slice.openEnd);
|
|
24
23
|
};
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { Fragment, Slice } from 'prosemirror-model';
|
|
2
2
|
import { flatmap, mapFragment } from '../utils/slice';
|
|
3
|
-
|
|
4
3
|
var isLayoutNode = function isLayoutNode(node) {
|
|
5
4
|
return node.type === node.type.schema.nodes.layoutSection || node.type === node.type.schema.nodes.layoutColumn;
|
|
6
5
|
};
|
|
7
|
-
|
|
8
6
|
export function unwrapContentFromLayout(maybeLayoutSection) {
|
|
9
7
|
var fragment = mapFragment(Fragment.from(maybeLayoutSection), function (node) {
|
|
10
8
|
return isLayoutNode(node) ? node.content : node;
|
|
@@ -21,6 +19,7 @@ export function removeLayoutFromFirstChild(node, i) {
|
|
|
21
19
|
export function removeLayoutFromLastChild(node, i, fragment) {
|
|
22
20
|
return i === fragment.childCount - 1 ? unwrapContentFromLayout(node) : node;
|
|
23
21
|
}
|
|
22
|
+
|
|
24
23
|
/**
|
|
25
24
|
* When we have a slice that cuts across a layoutSection/layoutColumn
|
|
26
25
|
* we can end up with unexpected behaviour on paste/drop where a user
|
|
@@ -31,28 +30,28 @@ export function removeLayoutFromLastChild(node, i, fragment) {
|
|
|
31
30
|
* We only care about slices with non-zero openStart / openEnd's here
|
|
32
31
|
* as we're totally fine for people to copy/paste a full layoutSection
|
|
33
32
|
*/
|
|
34
|
-
|
|
35
33
|
export function transformSliceToRemoveOpenLayoutNodes(slice, schema) {
|
|
36
34
|
// Case 1: A slice entirely within a single layoutSection
|
|
37
35
|
if (slice.openStart && slice.openEnd && slice.content.childCount === 1) {
|
|
38
36
|
var maybeLayoutSection = slice.content.firstChild;
|
|
39
|
-
|
|
40
37
|
if (maybeLayoutSection.type === schema.nodes.layoutSection) {
|
|
41
|
-
return new Slice(flatmap(slice.content, removeLayoutFromFirstChild),
|
|
38
|
+
return new Slice(flatmap(slice.content, removeLayoutFromFirstChild),
|
|
39
|
+
// '-2' here because we've removed the layoutSection/layoutColumn; reducing the open depth.
|
|
42
40
|
slice.openStart - 2, slice.openEnd - 2);
|
|
43
41
|
}
|
|
44
|
-
}
|
|
45
|
-
|
|
42
|
+
}
|
|
46
43
|
|
|
44
|
+
// Case 2: A slice starting inside a layoutSection and finishing outside
|
|
47
45
|
if (slice.openStart && slice.content.firstChild.type === schema.nodes.layoutSection) {
|
|
48
46
|
slice = new Slice(flatmap(slice.content, removeLayoutFromFirstChild), slice.openStart - 2, slice.openEnd);
|
|
49
|
-
}
|
|
50
|
-
|
|
47
|
+
}
|
|
51
48
|
|
|
49
|
+
// Case 3: A slice starting outside a layoutSection and finishing inside
|
|
52
50
|
if (slice.openEnd && slice.content.lastChild.type === schema.nodes.layoutSection) {
|
|
53
51
|
slice = new Slice(flatmap(slice.content, removeLayoutFromLastChild), slice.openStart, slice.openEnd - 2);
|
|
54
|
-
}
|
|
52
|
+
}
|
|
55
53
|
|
|
54
|
+
// Case 2 & 3 also handles a slice starting in one layoutSection & finishing in a different layoutSection
|
|
56
55
|
|
|
57
56
|
return slice;
|
|
58
57
|
}
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
export var TypeAheadAvailableNodes;
|
|
2
|
-
|
|
3
2
|
(function (TypeAheadAvailableNodes) {
|
|
4
3
|
TypeAheadAvailableNodes["EMOJI"] = "emojiTypeAhead";
|
|
5
4
|
TypeAheadAvailableNodes["MENTION"] = "mentionTypeAhead";
|
|
6
5
|
TypeAheadAvailableNodes["QUICK_INSERT"] = "quickInsertTypeAhead";
|
|
7
6
|
})(TypeAheadAvailableNodes || (TypeAheadAvailableNodes = {}));
|
|
8
|
-
|
|
9
7
|
export var SelectItemMode;
|
|
10
|
-
|
|
11
8
|
(function (SelectItemMode) {
|
|
12
9
|
SelectItemMode["SHIFT_ENTER"] = "shift-enter";
|
|
13
10
|
SelectItemMode["ENTER"] = "enter";
|
|
@@ -3,28 +3,23 @@ import _createClass from "@babel/runtime/helpers/createClass";
|
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
4
|
import EventEmitter from 'events';
|
|
5
5
|
export var AnnotationUpdateEvent;
|
|
6
|
-
|
|
7
6
|
(function (AnnotationUpdateEvent) {
|
|
8
7
|
AnnotationUpdateEvent["SET_ANNOTATION_FOCUS"] = "SET_ANNOTATION_FOCUS";
|
|
9
8
|
AnnotationUpdateEvent["SET_ANNOTATION_STATE"] = "SET_ANNOTATION_STATE";
|
|
10
9
|
AnnotationUpdateEvent["REMOVE_ANNOTATION_FOCUS"] = "REMOVE_ANNOTATION_FOCUS";
|
|
11
10
|
AnnotationUpdateEvent["ON_ANNOTATION_CLICK"] = "ON_ANNOTATION_CLICK";
|
|
12
11
|
})(AnnotationUpdateEvent || (AnnotationUpdateEvent = {}));
|
|
13
|
-
|
|
14
12
|
export var AnnotationUpdateEmitter = /*#__PURE__*/function () {
|
|
15
13
|
function AnnotationUpdateEmitter() {
|
|
16
14
|
_classCallCheck(this, AnnotationUpdateEmitter);
|
|
17
|
-
|
|
18
15
|
_defineProperty(this, "emitter", new EventEmitter());
|
|
19
16
|
}
|
|
20
|
-
|
|
21
17
|
_createClass(AnnotationUpdateEmitter, [{
|
|
22
18
|
key: "emit",
|
|
23
19
|
value: function emit(event, params) {
|
|
24
20
|
if (typeof params === 'undefined') {
|
|
25
21
|
return this.emitter.emit(event);
|
|
26
22
|
}
|
|
27
|
-
|
|
28
23
|
return this.emitter.emit(event, params);
|
|
29
24
|
}
|
|
30
25
|
}, {
|
|
@@ -43,6 +38,5 @@ export var AnnotationUpdateEmitter = /*#__PURE__*/function () {
|
|
|
43
38
|
return this.emitter.listeners(event);
|
|
44
39
|
}
|
|
45
40
|
}]);
|
|
46
|
-
|
|
47
41
|
return AnnotationUpdateEmitter;
|
|
48
42
|
}();
|
package/dist/esm/types/index.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
export var SortOrder;
|
|
2
|
-
|
|
3
2
|
(function (SortOrder) {
|
|
4
3
|
SortOrder["ASC"] = "asc";
|
|
5
4
|
SortOrder["DESC"] = "desc";
|
|
6
5
|
SortOrder["NO_ORDER"] = "no_order";
|
|
7
6
|
})(SortOrder || (SortOrder = {}));
|
|
8
|
-
|
|
9
7
|
export { AnnotationUpdateEmitter, AnnotationUpdateEvent } from './annotation';
|
|
10
8
|
export { ToolbarSize, ToolbarWidths, ToolbarWidthsFullPage } from './toolbar';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export var ToolbarSize;
|
|
2
|
-
|
|
3
2
|
(function (ToolbarSize) {
|
|
4
3
|
ToolbarSize[ToolbarSize["XXL"] = 6] = "XXL";
|
|
5
4
|
ToolbarSize[ToolbarSize["XL"] = 5] = "XL";
|
|
@@ -8,9 +7,7 @@ export var ToolbarSize;
|
|
|
8
7
|
ToolbarSize[ToolbarSize["S"] = 2] = "S";
|
|
9
8
|
ToolbarSize[ToolbarSize["XXXS"] = 1] = "XXXS";
|
|
10
9
|
})(ToolbarSize || (ToolbarSize = {}));
|
|
11
|
-
|
|
12
10
|
export var ToolbarWidths;
|
|
13
|
-
|
|
14
11
|
(function (ToolbarWidths) {
|
|
15
12
|
ToolbarWidths[ToolbarWidths["XXL"] = 610] = "XXL";
|
|
16
13
|
ToolbarWidths[ToolbarWidths["XL"] = 540] = "XL";
|
|
@@ -18,9 +15,7 @@ export var ToolbarWidths;
|
|
|
18
15
|
ToolbarWidths[ToolbarWidths["M"] = 450] = "M";
|
|
19
16
|
ToolbarWidths[ToolbarWidths["S"] = 370] = "S";
|
|
20
17
|
})(ToolbarWidths || (ToolbarWidths = {}));
|
|
21
|
-
|
|
22
18
|
export var ToolbarWidthsFullPage;
|
|
23
|
-
|
|
24
19
|
(function (ToolbarWidthsFullPage) {
|
|
25
20
|
ToolbarWidthsFullPage[ToolbarWidthsFullPage["XXL"] = 650] = "XXL";
|
|
26
21
|
ToolbarWidthsFullPage[ToolbarWidthsFullPage["XL"] = 580] = "XL";
|
|
@@ -10,28 +10,23 @@ export var experienceConfig = {
|
|
|
10
10
|
}
|
|
11
11
|
};
|
|
12
12
|
export var EditorExperience;
|
|
13
|
-
|
|
14
13
|
(function (EditorExperience) {
|
|
15
14
|
EditorExperience["loadEditor"] = "load";
|
|
16
15
|
EditorExperience["typing"] = "type";
|
|
17
16
|
EditorExperience["interaction"] = "interact";
|
|
18
17
|
EditorExperience["editSession"] = "editSession";
|
|
19
18
|
})(EditorExperience || (EditorExperience = {}));
|
|
20
|
-
|
|
21
19
|
export var RELIABILITY_INTERVAL = 30000;
|
|
22
20
|
export var ExperienceStore = /*#__PURE__*/function () {
|
|
23
21
|
function ExperienceStore() {
|
|
24
22
|
_classCallCheck(this, ExperienceStore);
|
|
25
|
-
|
|
26
23
|
this.experiences = new Map();
|
|
27
|
-
|
|
28
24
|
for (var _i = 0, _Object$values = Object.values(EditorExperience); _i < _Object$values.length; _i++) {
|
|
29
25
|
var experienceId = _Object$values[_i];
|
|
30
26
|
var experience = new UFOExperience(experienceId, experienceConfig);
|
|
31
27
|
this.experiences.set(experienceId, experience);
|
|
32
28
|
}
|
|
33
29
|
}
|
|
34
|
-
|
|
35
30
|
_createClass(ExperienceStore, [{
|
|
36
31
|
key: "get",
|
|
37
32
|
value: function get(experienceId) {
|
|
@@ -41,7 +36,6 @@ export var ExperienceStore = /*#__PURE__*/function () {
|
|
|
41
36
|
key: "getActive",
|
|
42
37
|
value: function getActive(experienceId) {
|
|
43
38
|
var experience = this.experiences.get(experienceId);
|
|
44
|
-
|
|
45
39
|
if (!(experience !== null && experience !== void 0 && experience.state.final)) {
|
|
46
40
|
return experience;
|
|
47
41
|
}
|
|
@@ -55,28 +49,24 @@ export var ExperienceStore = /*#__PURE__*/function () {
|
|
|
55
49
|
key: "start",
|
|
56
50
|
value: function start(experienceId, startTime) {
|
|
57
51
|
var _this$get;
|
|
58
|
-
|
|
59
52
|
(_this$get = this.get(experienceId)) === null || _this$get === void 0 ? void 0 : _this$get.start(startTime);
|
|
60
53
|
}
|
|
61
54
|
}, {
|
|
62
55
|
key: "addMetadata",
|
|
63
56
|
value: function addMetadata(experienceId, metadata) {
|
|
64
57
|
var _this$get2;
|
|
65
|
-
|
|
66
58
|
(_this$get2 = this.get(experienceId)) === null || _this$get2 === void 0 ? void 0 : _this$get2.addMetadata(metadata);
|
|
67
59
|
}
|
|
68
60
|
}, {
|
|
69
61
|
key: "mark",
|
|
70
62
|
value: function mark(experienceId, _mark, value) {
|
|
71
63
|
var _this$get3;
|
|
72
|
-
|
|
73
64
|
(_this$get3 = this.get(experienceId)) === null || _this$get3 === void 0 ? void 0 : _this$get3.mark(_mark, value);
|
|
74
65
|
}
|
|
75
66
|
}, {
|
|
76
67
|
key: "success",
|
|
77
68
|
value: function success(experienceId, metadata) {
|
|
78
69
|
var _this$getActive;
|
|
79
|
-
|
|
80
70
|
return (_this$getActive = this.getActive(experienceId)) === null || _this$getActive === void 0 ? void 0 : _this$getActive.success({
|
|
81
71
|
metadata: metadata
|
|
82
72
|
});
|
|
@@ -85,7 +75,6 @@ export var ExperienceStore = /*#__PURE__*/function () {
|
|
|
85
75
|
key: "fail",
|
|
86
76
|
value: function fail(experienceId, metadata) {
|
|
87
77
|
var _this$getActive2;
|
|
88
|
-
|
|
89
78
|
(_this$getActive2 = this.getActive(experienceId)) === null || _this$getActive2 === void 0 ? void 0 : _this$getActive2.failure({
|
|
90
79
|
metadata: metadata
|
|
91
80
|
});
|
|
@@ -94,13 +83,11 @@ export var ExperienceStore = /*#__PURE__*/function () {
|
|
|
94
83
|
key: "abort",
|
|
95
84
|
value: function abort(experienceId, metadata) {
|
|
96
85
|
var _this = this;
|
|
97
|
-
|
|
98
86
|
// We add this wait in here because when React catches an error it unmounts the component
|
|
99
87
|
// before the error boundary's componentDidCatch is called
|
|
100
88
|
// In this case we want to fail the experience, but without this wait, abort is called first
|
|
101
89
|
setTimeout(function () {
|
|
102
90
|
var _this$getActive3;
|
|
103
|
-
|
|
104
91
|
(_this$getActive3 = _this.getActive(experienceId)) === null || _this$getActive3 === void 0 ? void 0 : _this$getActive3.abort({
|
|
105
92
|
metadata: metadata
|
|
106
93
|
});
|
|
@@ -110,7 +97,6 @@ export var ExperienceStore = /*#__PURE__*/function () {
|
|
|
110
97
|
key: "abortAll",
|
|
111
98
|
value: function abortAll(metadata) {
|
|
112
99
|
var _this2 = this;
|
|
113
|
-
|
|
114
100
|
this.experiences.forEach(function (experience) {
|
|
115
101
|
_this2.abort(experience.id, metadata);
|
|
116
102
|
});
|
|
@@ -119,7 +105,6 @@ export var ExperienceStore = /*#__PURE__*/function () {
|
|
|
119
105
|
key: "failAll",
|
|
120
106
|
value: function failAll(metadata) {
|
|
121
107
|
var _this3 = this;
|
|
122
|
-
|
|
123
108
|
this.experiences.forEach(function (experience) {
|
|
124
109
|
_this3.fail(experience.id, metadata);
|
|
125
110
|
});
|
|
@@ -128,17 +113,13 @@ export var ExperienceStore = /*#__PURE__*/function () {
|
|
|
128
113
|
key: "getInstance",
|
|
129
114
|
value: function getInstance(view) {
|
|
130
115
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
131
|
-
|
|
132
116
|
if (!this.stores.get(view) || options !== null && options !== void 0 && options.forceNewInstance) {
|
|
133
117
|
var store = new ExperienceStore();
|
|
134
118
|
this.stores.set(view, store);
|
|
135
119
|
}
|
|
136
|
-
|
|
137
120
|
return this.stores.get(view);
|
|
138
121
|
}
|
|
139
122
|
}]);
|
|
140
|
-
|
|
141
123
|
return ExperienceStore;
|
|
142
124
|
}();
|
|
143
|
-
|
|
144
125
|
_defineProperty(ExperienceStore, "stores", new WeakMap());
|
|
@@ -9,21 +9,17 @@ export function mapBreakpointToLayoutMaxWidth(breakpoint) {
|
|
|
9
9
|
switch (breakpoint) {
|
|
10
10
|
case 'M':
|
|
11
11
|
return 760;
|
|
12
|
-
|
|
13
12
|
case 'L':
|
|
14
13
|
return 850;
|
|
15
|
-
|
|
16
14
|
default:
|
|
17
15
|
return 680;
|
|
18
16
|
}
|
|
19
17
|
}
|
|
20
18
|
export function BaseThemeWrapper(_ref) {
|
|
21
19
|
var baseFontSize = _ref.baseFontSize,
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
children = _ref.children;
|
|
24
21
|
var _useGlobalTheme = useGlobalTheme(),
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
mode = _useGlobalTheme.mode;
|
|
27
23
|
var memoizedTheme = useMemo(function () {
|
|
28
24
|
return _defineProperty({
|
|
29
25
|
baseFontSize: baseFontSize || fontSize(),
|
|
@@ -38,7 +34,7 @@ export function BaseThemeWrapper(_ref) {
|
|
|
38
34
|
}
|
|
39
35
|
export function BaseTheme(_ref3) {
|
|
40
36
|
var children = _ref3.children,
|
|
41
|
-
|
|
37
|
+
baseFontSize = _ref3.baseFontSize;
|
|
42
38
|
return /*#__PURE__*/React.createElement(WidthConsumer, null, function (_ref4) {
|
|
43
39
|
var breakpoint = _ref4.breakpoint;
|
|
44
40
|
return /*#__PURE__*/React.createElement(BaseThemeWrapper, {
|
|
@@ -5,13 +5,9 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
5
5
|
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
6
6
|
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
7
7
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
8
|
-
|
|
9
8
|
var _templateObject, _templateObject2;
|
|
10
|
-
|
|
11
9
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
12
|
-
|
|
13
10
|
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; } }
|
|
14
|
-
|
|
15
11
|
/** @jsx jsx */
|
|
16
12
|
import React from 'react';
|
|
17
13
|
import { css, jsx } from '@emotion/react';
|
|
@@ -22,24 +18,20 @@ var captionWrapperStyle = css(_templateObject || (_templateObject = _taggedTempl
|
|
|
22
18
|
var placeholderStyle = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: ", ";\n position: absolute;\n top: 0;\n width: 100%;\n"])), "var(--ds-text-subtlest, ".concat(N200, ")"));
|
|
23
19
|
export var CaptionComponent = /*#__PURE__*/function (_React$Component) {
|
|
24
20
|
_inherits(CaptionComponent, _React$Component);
|
|
25
|
-
|
|
26
21
|
var _super = _createSuper(CaptionComponent);
|
|
27
|
-
|
|
28
22
|
function CaptionComponent() {
|
|
29
23
|
_classCallCheck(this, CaptionComponent);
|
|
30
|
-
|
|
31
24
|
return _super.apply(this, arguments);
|
|
32
25
|
}
|
|
33
|
-
|
|
34
26
|
_createClass(CaptionComponent, [{
|
|
35
27
|
key: "render",
|
|
36
28
|
value: function render() {
|
|
37
29
|
var _this$props = this.props,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
30
|
+
selected = _this$props.selected,
|
|
31
|
+
hasContent = _this$props.hasContent,
|
|
32
|
+
children = _this$props.children,
|
|
33
|
+
dataAttributes = _this$props.dataAttributes,
|
|
34
|
+
formatMessage = _this$props.intl.formatMessage;
|
|
43
35
|
var showPlaceholder = !selected && !hasContent;
|
|
44
36
|
return jsx("div", _extends({
|
|
45
37
|
"data-media-caption": true,
|
|
@@ -51,7 +43,6 @@ export var CaptionComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
51
43
|
}, formatMessage(messages.placeholder)) : null, children);
|
|
52
44
|
}
|
|
53
45
|
}]);
|
|
54
|
-
|
|
55
46
|
return CaptionComponent;
|
|
56
47
|
}(React.Component);
|
|
57
48
|
export default injectIntl(CaptionComponent);
|