@atlaskit/editor-core 166.0.4 → 167.0.0
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/.eslintrc.js +46 -1
- package/CHANGELOG.md +87 -0
- package/dist/cjs/actions/index.js +26 -2
- package/dist/cjs/create-editor/ReactEditorView.js +2 -0
- package/dist/cjs/create-editor/create-plugins-list.js +1 -2
- package/dist/cjs/editor.js +5 -2
- package/dist/cjs/keymaps/index.js +5 -1
- package/dist/cjs/labs/next/ContentComponents.js +8 -4
- package/dist/cjs/labs/next/full-page.js +14 -8
- package/dist/cjs/nodeviews/getInlineNodeViewProducer.js +7 -3
- package/dist/cjs/nodeviews/getInlineNodeViewProducer.styles.js +3 -1
- package/dist/cjs/plugins/alignment/ui/ToolbarAlignment/styles.js +3 -1
- package/dist/cjs/plugins/analytics/types/enums.js +3 -0
- package/dist/cjs/plugins/base/index.js +8 -17
- package/dist/cjs/plugins/base/pm-plugins/better-type-history.js +3 -12
- package/dist/cjs/plugins/base/pm-plugins/inline-cursor-target.js +71 -16
- package/dist/cjs/plugins/block-type/commands/block-type.js +32 -22
- package/dist/cjs/plugins/block-type/ui/ToolbarBlockType/styled.js +4 -2
- package/dist/cjs/plugins/breakout/ui/LayoutButton.js +4 -11
- package/dist/cjs/plugins/card/styles.js +1 -1
- package/dist/cjs/plugins/card/ui/LinkToolbarIconDropdown.js +2 -2
- package/dist/cjs/plugins/code-block/actions.js +36 -2
- package/dist/cjs/plugins/code-block/nodeviews/code-block.js +70 -1
- package/dist/cjs/plugins/code-block/pm-plugins/actions.js +2 -1
- package/dist/cjs/plugins/code-block/pm-plugins/main.js +46 -8
- package/dist/cjs/plugins/code-block/styles.js +28 -24
- package/dist/cjs/plugins/collab-edit/styles.js +4 -2
- package/dist/cjs/plugins/collab-edit/ui/styles.js +4 -2
- package/dist/cjs/plugins/collab-edit/utils.js +1 -0
- package/dist/cjs/plugins/date/ui/DatePicker/index.js +3 -1
- package/dist/cjs/plugins/expand/ui/styles.js +16 -14
- package/dist/cjs/plugins/extension/commands.js +3 -2
- package/dist/cjs/plugins/extension/context-panel.js +21 -7
- package/dist/cjs/plugins/extension/ui/Extension/Extension/styles.js +6 -4
- package/dist/cjs/plugins/extension/ui/Extension/InlineExtension/styles.js +3 -1
- package/dist/cjs/plugins/extension/ui/Extension/styles.js +7 -5
- package/dist/cjs/plugins/extension/ui/SaveIndicator/SaveIndicator.js +4 -2
- package/dist/cjs/plugins/fake-text-cursor/styles.js +3 -1
- package/dist/cjs/plugins/feature-flags-context/feature-flags-from-props.js +3 -2
- package/dist/cjs/plugins/find-replace/styles.js +2 -6
- package/dist/cjs/plugins/find-replace/ui/styles.js +4 -2
- package/dist/cjs/plugins/floating-toolbar/ui/DropdownMenu.js +3 -1
- package/dist/cjs/plugins/floating-toolbar/ui/EditorEmojiAddIcon.js +3 -1
- package/dist/cjs/plugins/floating-toolbar/ui/Separator.js +3 -1
- package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +6 -4
- package/dist/cjs/plugins/floating-toolbar/ui/styles.js +12 -10
- package/dist/cjs/plugins/grid/styles.js +3 -1
- package/dist/cjs/plugins/help-dialog/ui/styles.js +9 -7
- package/dist/cjs/plugins/hyperlink/pm-plugins/input-rule.js +23 -1
- package/dist/cjs/plugins/hyperlink/pm-plugins/keymap.js +10 -1
- package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +5 -3
- package/dist/cjs/plugins/hyperlink/utils.js +53 -2
- package/dist/cjs/plugins/jira-issue/nodeviews/jira-issue.js +4 -2
- package/dist/cjs/plugins/layout/styles.js +1 -1
- package/dist/cjs/plugins/media/commands/helpers.js +10 -9
- package/dist/cjs/plugins/media/nodeviews/mediaInline.js +23 -4
- package/dist/cjs/plugins/media/nodeviews/mediaNodeView/media.js +6 -0
- package/dist/cjs/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +5 -3
- package/dist/cjs/plugins/media/pm-plugins/main.js +1 -0
- package/dist/cjs/plugins/media/styles.js +1 -1
- package/dist/cjs/plugins/media/ui/CaptionPlaceholder/index.js +3 -1
- package/dist/cjs/plugins/media/ui/Media/DropPlaceholder.js +4 -2
- package/dist/cjs/plugins/media/ui/MediaLinkingToolbar.js +3 -1
- package/dist/cjs/plugins/mentions/styles.js +3 -1
- package/dist/cjs/plugins/mentions/ui/InviteItem/index.js +3 -1
- package/dist/cjs/plugins/mentions/ui/InviteItem/styles.js +4 -2
- package/dist/cjs/plugins/panel/index.js +1 -0
- package/dist/cjs/plugins/panel/nodeviews/panel.js +4 -1
- package/dist/cjs/plugins/panel/pm-plugins/keymaps.js +21 -3
- package/dist/cjs/plugins/paste/handlers.js +23 -0
- package/dist/cjs/plugins/paste/linkify-md-plugin.js +7 -0
- package/dist/cjs/plugins/paste/pm-plugins/analytics.js +9 -1
- package/dist/cjs/plugins/paste/pm-plugins/main.js +27 -1
- package/dist/cjs/plugins/placeholder/index.js +15 -3
- package/dist/cjs/plugins/placeholder/styles.js +3 -1
- package/dist/cjs/plugins/placeholder-text/styles.js +3 -1
- package/dist/cjs/plugins/selection/gap-cursor/styles.js +1 -1
- package/dist/cjs/plugins/selection/pm-plugins/gap-cursor-main.js +2 -2
- package/dist/cjs/plugins/status/ui/statusPicker.js +3 -3
- package/dist/cjs/plugins/table/index.js +14 -4
- package/dist/cjs/plugins/table/nodeviews/TableComponent.js +6 -6
- package/dist/cjs/plugins/table/nodeviews/table.js +9 -4
- package/dist/cjs/plugins/table/pm-plugins/main.js +1 -4
- package/dist/cjs/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.js +118 -0
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/event-handlers.js +2 -4
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/plugin.js +2 -5
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/misc.js +4 -8
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +2 -3
- package/dist/cjs/plugins/table/pm-plugins/table-resizing/utils/scale-table.js +0 -3
- package/dist/cjs/plugins/table/transforms/column-width.js +1 -2
- package/dist/cjs/plugins/table/transforms/fix-tables.js +1 -3
- package/dist/cjs/plugins/table/ui/FloatingContextualButton/styles.js +4 -1
- package/dist/cjs/plugins/table/ui/FloatingContextualMenu/styles.js +3 -1
- package/dist/cjs/plugins/table/ui/common-styles.js +4 -2
- package/dist/cjs/plugins/table/ui/consts.js +14 -11
- package/dist/cjs/plugins/table/ui/ui-styles.js +17 -10
- package/dist/cjs/plugins/table/utils/decoration.js +3 -4
- package/dist/cjs/plugins/table/utils/paste.js +9 -9
- package/dist/cjs/plugins/type-ahead/index.js +4 -3
- package/dist/cjs/plugins/type-ahead/pm-plugins/decorations.js +3 -1
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadList.js +4 -4
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadListItem.js +11 -9
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadPopup.js +73 -3
- package/dist/cjs/plugins/unsupported-content/styles.js +1 -1
- package/dist/cjs/ui/Addon/Dropdown/styles.js +3 -1
- package/dist/cjs/ui/Addon/DropdownItem/styles.js +3 -1
- package/dist/cjs/ui/Appearance/Chromeless.js +2 -1
- package/dist/cjs/ui/Appearance/Comment/Comment.js +10 -3
- package/dist/cjs/ui/Appearance/Comment/Toolbar.js +4 -2
- package/dist/cjs/ui/Appearance/FullPage/FullPage.js +5 -2
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +2 -1
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +12 -11
- package/dist/cjs/ui/Appearance/FullPage/MainToolbar.js +6 -3
- package/dist/cjs/ui/ChromeCollapsed/styles.js +1 -1
- package/dist/cjs/ui/ConfigPanel/ConfigPanel.js +21 -14
- package/dist/cjs/ui/ConfigPanel/ConfigPanelFieldsLoader.js +2 -0
- package/dist/cjs/ui/ConfigPanel/Fields/CheckboxGroup.js +3 -1
- package/dist/cjs/ui/ConfigPanel/Fields/Expand.js +3 -1
- package/dist/cjs/ui/ConfigPanel/Fields/Fieldset.js +3 -1
- package/dist/cjs/ui/ConfigPanel/Fields/common/RequiredIndicator.js +3 -1
- package/dist/cjs/ui/ConfigPanel/Header.js +4 -2
- package/dist/cjs/ui/ConfigPanel/NestedForms/RemovableField.js +4 -8
- package/dist/cjs/ui/ContentStyles/index.js +4 -2
- package/dist/cjs/ui/ContextPanel/index.js +3 -1
- package/dist/cjs/ui/DropdownMenu/index.js +5 -0
- package/dist/cjs/ui/ElementBrowser/InsertMenu.js +6 -4
- package/dist/cjs/ui/ElementBrowser/ModalElementBrowser.js +4 -2
- package/dist/cjs/ui/ElementBrowser/components/CategoryList.js +4 -2
- package/dist/cjs/ui/ElementBrowser/components/ElementList/ElementList.js +12 -5
- package/dist/cjs/ui/ElementBrowser/components/ElementList/EmptyState.js +3 -1
- package/dist/cjs/ui/ElementBrowser/components/ElementSearch.js +3 -1
- package/dist/cjs/ui/ElementBrowser/constants.js +3 -1
- package/dist/cjs/ui/FloatingToolbar/styles.js +2 -2
- package/dist/cjs/ui/LinkSearch/LinkSearchListItem.js +5 -3
- package/dist/cjs/ui/PanelTextInput/styles.js +3 -1
- package/dist/cjs/ui/PluginSlot/index.js +7 -4
- package/dist/cjs/ui/Toolbar/ToolbarInner.js +2 -1
- package/dist/cjs/ui/Toolbar/ToolbarWithSizeDetector.js +5 -2
- package/dist/cjs/ui/ToolbarFeedback/styles.js +5 -3
- package/dist/cjs/ui/WithFlash/index.js +4 -2
- package/dist/cjs/ui/styles.js +6 -4
- package/dist/cjs/utils/document.js +62 -6
- package/dist/cjs/utils/filter/privacy-filter.js +2 -2
- package/dist/cjs/utils/step.js +17 -1
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/actions/index.js +25 -1
- package/dist/es2019/create-editor/ReactEditorView.js +2 -0
- package/dist/es2019/create-editor/create-plugins-list.js +1 -2
- package/dist/es2019/editor.js +5 -2
- package/dist/es2019/keymaps/index.js +5 -1
- package/dist/es2019/labs/next/ContentComponents.js +7 -2
- package/dist/es2019/labs/next/full-page.js +11 -8
- package/dist/es2019/nodeviews/getInlineNodeViewProducer.js +4 -3
- package/dist/es2019/nodeviews/getInlineNodeViewProducer.styles.js +16 -4
- package/dist/es2019/plugins/alignment/ui/ToolbarAlignment/styles.js +2 -1
- package/dist/es2019/plugins/analytics/types/enums.js +3 -0
- package/dist/es2019/plugins/base/index.js +6 -15
- package/dist/es2019/plugins/base/pm-plugins/better-type-history.js +1 -11
- package/dist/es2019/plugins/base/pm-plugins/inline-cursor-target.js +72 -17
- package/dist/es2019/plugins/block-type/commands/block-type.js +25 -16
- package/dist/es2019/plugins/block-type/ui/ToolbarBlockType/styled.js +3 -2
- package/dist/es2019/plugins/breakout/ui/LayoutButton.js +6 -10
- package/dist/es2019/plugins/card/styles.js +1 -1
- package/dist/es2019/plugins/card/ui/LinkToolbarIconDropdown.js +2 -2
- package/dist/es2019/plugins/code-block/actions.js +32 -0
- package/dist/es2019/plugins/code-block/nodeviews/code-block.js +61 -1
- package/dist/es2019/plugins/code-block/pm-plugins/actions.js +2 -1
- package/dist/es2019/plugins/code-block/pm-plugins/main.js +37 -3
- package/dist/es2019/plugins/code-block/styles.js +30 -27
- package/dist/es2019/plugins/collab-edit/styles.js +3 -2
- package/dist/es2019/plugins/collab-edit/ui/styles.js +4 -3
- package/dist/es2019/plugins/collab-edit/utils.js +1 -0
- package/dist/es2019/plugins/date/ui/DatePicker/index.js +3 -2
- package/dist/es2019/plugins/expand/ui/styles.js +15 -14
- package/dist/es2019/plugins/extension/commands.js +3 -2
- package/dist/es2019/plugins/extension/context-panel.js +11 -3
- package/dist/es2019/plugins/extension/ui/Extension/Extension/styles.js +5 -4
- package/dist/es2019/plugins/extension/ui/Extension/InlineExtension/styles.js +2 -1
- package/dist/es2019/plugins/extension/ui/Extension/styles.js +7 -6
- package/dist/es2019/plugins/extension/ui/SaveIndicator/SaveIndicator.js +4 -4
- package/dist/es2019/plugins/fake-text-cursor/styles.js +3 -2
- package/dist/es2019/plugins/feature-flags-context/feature-flags-from-props.js +3 -2
- package/dist/es2019/plugins/find-replace/styles.js +4 -4
- package/dist/es2019/plugins/find-replace/ui/styles.js +3 -2
- package/dist/es2019/plugins/floating-toolbar/ui/DropdownMenu.js +2 -1
- package/dist/es2019/plugins/floating-toolbar/ui/EditorEmojiAddIcon.js +2 -1
- package/dist/es2019/plugins/floating-toolbar/ui/Separator.js +2 -1
- package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +4 -4
- package/dist/es2019/plugins/floating-toolbar/ui/styles.js +11 -10
- package/dist/es2019/plugins/grid/styles.js +4 -2
- package/dist/es2019/plugins/help-dialog/ui/styles.js +10 -9
- package/dist/es2019/plugins/hyperlink/pm-plugins/input-rule.js +24 -2
- package/dist/es2019/plugins/hyperlink/pm-plugins/keymap.js +9 -1
- package/dist/es2019/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +5 -4
- package/dist/es2019/plugins/hyperlink/utils.js +43 -2
- package/dist/es2019/plugins/jira-issue/nodeviews/jira-issue.js +6 -5
- package/dist/es2019/plugins/layout/styles.js +10 -7
- package/dist/es2019/plugins/media/commands/helpers.js +6 -8
- package/dist/es2019/plugins/media/nodeviews/mediaInline.js +21 -5
- package/dist/es2019/plugins/media/nodeviews/mediaNodeView/media.js +7 -0
- package/dist/es2019/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +5 -4
- package/dist/es2019/plugins/media/pm-plugins/main.js +2 -0
- package/dist/es2019/plugins/media/styles.js +3 -3
- package/dist/es2019/plugins/media/ui/CaptionPlaceholder/index.js +2 -1
- package/dist/es2019/plugins/media/ui/Media/DropPlaceholder.js +4 -3
- package/dist/es2019/plugins/media/ui/MediaLinkingToolbar.js +2 -1
- package/dist/es2019/plugins/mentions/styles.js +5 -4
- package/dist/es2019/plugins/mentions/ui/InviteItem/index.js +2 -1
- package/dist/es2019/plugins/mentions/ui/InviteItem/styles.js +3 -2
- package/dist/es2019/plugins/panel/index.js +1 -0
- package/dist/es2019/plugins/panel/nodeviews/panel.js +4 -1
- package/dist/es2019/plugins/panel/pm-plugins/keymaps.js +22 -4
- package/dist/es2019/plugins/paste/handlers.js +23 -0
- package/dist/es2019/plugins/paste/linkify-md-plugin.js +7 -1
- package/dist/es2019/plugins/paste/pm-plugins/analytics.js +4 -1
- package/dist/es2019/plugins/paste/pm-plugins/main.js +27 -2
- package/dist/es2019/plugins/placeholder/index.js +12 -1
- package/dist/es2019/plugins/placeholder/styles.js +3 -1
- package/dist/es2019/plugins/placeholder-text/styles.js +5 -4
- package/dist/es2019/plugins/selection/gap-cursor/styles.js +9 -9
- package/dist/es2019/plugins/selection/pm-plugins/gap-cursor-main.js +2 -2
- package/dist/es2019/plugins/status/ui/statusPicker.js +3 -3
- package/dist/es2019/plugins/table/index.js +13 -4
- package/dist/es2019/plugins/table/nodeviews/TableComponent.js +6 -6
- package/dist/es2019/plugins/table/nodeviews/table.js +6 -2
- package/dist/es2019/plugins/table/pm-plugins/main.js +1 -4
- package/dist/es2019/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.js +106 -0
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/event-handlers.js +2 -4
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/plugin.js +2 -4
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/misc.js +3 -7
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +2 -3
- package/dist/es2019/plugins/table/pm-plugins/table-resizing/utils/scale-table.js +0 -3
- package/dist/es2019/plugins/table/transforms/column-width.js +1 -2
- package/dist/es2019/plugins/table/transforms/fix-tables.js +1 -3
- package/dist/es2019/plugins/table/ui/FloatingContextualButton/styles.js +4 -2
- package/dist/es2019/plugins/table/ui/FloatingContextualMenu/styles.js +4 -3
- package/dist/es2019/plugins/table/ui/common-styles.js +29 -27
- package/dist/es2019/plugins/table/ui/consts.js +15 -12
- package/dist/es2019/plugins/table/ui/ui-styles.js +28 -23
- package/dist/es2019/plugins/table/utils/decoration.js +1 -4
- package/dist/es2019/plugins/table/utils/paste.js +9 -9
- package/dist/es2019/plugins/type-ahead/index.js +4 -3
- package/dist/es2019/plugins/type-ahead/pm-plugins/decorations.js +2 -1
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadList.js +4 -4
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadListItem.js +10 -9
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadPopup.js +64 -6
- package/dist/es2019/plugins/unsupported-content/styles.js +1 -1
- package/dist/es2019/ui/Addon/Dropdown/styles.js +3 -2
- package/dist/es2019/ui/Addon/DropdownItem/styles.js +3 -2
- package/dist/es2019/ui/Appearance/Chromeless.js +2 -1
- package/dist/es2019/ui/Appearance/Comment/Comment.js +9 -4
- package/dist/es2019/ui/Appearance/Comment/Toolbar.js +4 -2
- package/dist/es2019/ui/Appearance/FullPage/FullPage.js +6 -2
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +2 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +12 -11
- package/dist/es2019/ui/Appearance/FullPage/MainToolbar.js +7 -3
- package/dist/es2019/ui/ChromeCollapsed/styles.js +4 -3
- package/dist/es2019/ui/ConfigPanel/ConfigPanel.js +10 -2
- package/dist/es2019/ui/ConfigPanel/ConfigPanelFieldsLoader.js +2 -0
- package/dist/es2019/ui/ConfigPanel/ErrorMessage/ErrorImage.js +3 -0
- package/dist/es2019/ui/ConfigPanel/Fields/CheckboxGroup.js +2 -1
- package/dist/es2019/ui/ConfigPanel/Fields/Expand.js +2 -1
- package/dist/es2019/ui/ConfigPanel/Fields/Fieldset.js +2 -1
- package/dist/es2019/ui/ConfigPanel/Fields/common/RequiredIndicator.js +2 -1
- package/dist/es2019/ui/ConfigPanel/Header.js +3 -2
- package/dist/es2019/ui/ConfigPanel/NestedForms/RemovableField.js +4 -3
- package/dist/es2019/ui/ContentStyles/index.js +3 -2
- package/dist/es2019/ui/ContextPanel/index.js +2 -1
- package/dist/es2019/ui/DropdownMenu/index.js +5 -0
- package/dist/es2019/ui/ElementBrowser/InsertMenu.js +6 -3
- package/dist/es2019/ui/ElementBrowser/ModalElementBrowser.js +3 -2
- package/dist/es2019/ui/ElementBrowser/components/CategoryList.js +3 -2
- package/dist/es2019/ui/ElementBrowser/components/ElementList/ElementList.js +12 -5
- package/dist/es2019/ui/ElementBrowser/components/ElementList/EmptyState.js +2 -1
- package/dist/es2019/ui/ElementBrowser/components/ElementList/NotFoundIllustration.js +3 -0
- package/dist/es2019/ui/ElementBrowser/components/ElementSearch.js +2 -1
- package/dist/es2019/ui/ElementBrowser/constants.js +3 -1
- package/dist/es2019/ui/FloatingToolbar/styles.js +4 -4
- package/dist/es2019/ui/LinkSearch/LinkSearchListItem.js +4 -3
- package/dist/es2019/ui/PanelTextInput/styles.js +5 -5
- package/dist/es2019/ui/PluginSlot/index.js +7 -4
- package/dist/es2019/ui/Toolbar/ToolbarInner.js +2 -1
- package/dist/es2019/ui/Toolbar/ToolbarWithSizeDetector.js +4 -2
- package/dist/es2019/ui/ToolbarFeedback/styles.js +5 -4
- package/dist/es2019/ui/WithFlash/index.js +4 -3
- package/dist/es2019/ui/styles.js +10 -9
- package/dist/es2019/utils/document.js +58 -5
- package/dist/es2019/utils/filter/privacy-filter.js +1 -1
- package/dist/es2019/utils/step.js +12 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/actions/index.js +26 -1
- package/dist/esm/create-editor/ReactEditorView.js +2 -0
- package/dist/esm/create-editor/create-plugins-list.js +1 -2
- package/dist/esm/editor.js +5 -2
- package/dist/esm/keymaps/index.js +5 -1
- package/dist/esm/labs/next/ContentComponents.js +8 -4
- package/dist/esm/labs/next/full-page.js +11 -8
- package/dist/esm/nodeviews/getInlineNodeViewProducer.js +4 -3
- package/dist/esm/nodeviews/getInlineNodeViewProducer.styles.js +3 -2
- package/dist/esm/plugins/alignment/ui/ToolbarAlignment/styles.js +2 -1
- package/dist/esm/plugins/analytics/types/enums.js +3 -0
- package/dist/esm/plugins/base/index.js +8 -17
- package/dist/esm/plugins/base/pm-plugins/better-type-history.js +1 -11
- package/dist/esm/plugins/base/pm-plugins/inline-cursor-target.js +72 -17
- package/dist/esm/plugins/block-type/commands/block-type.js +31 -22
- package/dist/esm/plugins/block-type/ui/ToolbarBlockType/styled.js +3 -2
- package/dist/esm/plugins/breakout/ui/LayoutButton.js +3 -5
- package/dist/esm/plugins/card/styles.js +1 -1
- package/dist/esm/plugins/card/ui/LinkToolbarIconDropdown.js +2 -2
- package/dist/esm/plugins/code-block/actions.js +28 -0
- package/dist/esm/plugins/code-block/nodeviews/code-block.js +67 -1
- package/dist/esm/plugins/code-block/pm-plugins/actions.js +2 -1
- package/dist/esm/plugins/code-block/pm-plugins/main.js +39 -3
- package/dist/esm/plugins/code-block/styles.js +27 -23
- package/dist/esm/plugins/collab-edit/styles.js +3 -2
- package/dist/esm/plugins/collab-edit/ui/styles.js +3 -2
- package/dist/esm/plugins/collab-edit/utils.js +2 -0
- package/dist/esm/plugins/date/ui/DatePicker/index.js +2 -1
- package/dist/esm/plugins/expand/ui/styles.js +15 -14
- package/dist/esm/plugins/extension/commands.js +3 -2
- package/dist/esm/plugins/extension/context-panel.js +21 -7
- package/dist/esm/plugins/extension/ui/Extension/Extension/styles.js +5 -4
- package/dist/esm/plugins/extension/ui/Extension/InlineExtension/styles.js +2 -1
- package/dist/esm/plugins/extension/ui/Extension/styles.js +6 -5
- package/dist/esm/plugins/extension/ui/SaveIndicator/SaveIndicator.js +3 -2
- package/dist/esm/plugins/fake-text-cursor/styles.js +2 -1
- package/dist/esm/plugins/feature-flags-context/feature-flags-from-props.js +3 -2
- package/dist/esm/plugins/find-replace/styles.js +3 -3
- package/dist/esm/plugins/find-replace/ui/styles.js +3 -2
- package/dist/esm/plugins/floating-toolbar/ui/DropdownMenu.js +2 -1
- package/dist/esm/plugins/floating-toolbar/ui/EditorEmojiAddIcon.js +2 -1
- package/dist/esm/plugins/floating-toolbar/ui/Separator.js +2 -1
- package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +5 -4
- package/dist/esm/plugins/floating-toolbar/ui/styles.js +11 -10
- package/dist/esm/plugins/grid/styles.js +2 -1
- package/dist/esm/plugins/help-dialog/ui/styles.js +8 -7
- package/dist/esm/plugins/hyperlink/pm-plugins/input-rule.js +24 -2
- package/dist/esm/plugins/hyperlink/pm-plugins/keymap.js +9 -1
- package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +4 -3
- package/dist/esm/plugins/hyperlink/utils.js +44 -2
- package/dist/esm/plugins/jira-issue/nodeviews/jira-issue.js +3 -2
- package/dist/esm/plugins/layout/styles.js +1 -1
- package/dist/esm/plugins/media/commands/helpers.js +6 -8
- package/dist/esm/plugins/media/nodeviews/mediaInline.js +22 -4
- package/dist/esm/plugins/media/nodeviews/mediaNodeView/media.js +7 -0
- package/dist/esm/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +4 -3
- package/dist/esm/plugins/media/pm-plugins/main.js +2 -0
- package/dist/esm/plugins/media/styles.js +1 -1
- package/dist/esm/plugins/media/ui/CaptionPlaceholder/index.js +2 -1
- package/dist/esm/plugins/media/ui/Media/DropPlaceholder.js +3 -2
- package/dist/esm/plugins/media/ui/MediaLinkingToolbar.js +2 -1
- package/dist/esm/plugins/mentions/styles.js +2 -1
- package/dist/esm/plugins/mentions/ui/InviteItem/index.js +2 -1
- package/dist/esm/plugins/mentions/ui/InviteItem/styles.js +3 -2
- package/dist/esm/plugins/panel/index.js +1 -0
- package/dist/esm/plugins/panel/nodeviews/panel.js +4 -1
- package/dist/esm/plugins/panel/pm-plugins/keymaps.js +22 -4
- package/dist/esm/plugins/paste/handlers.js +21 -0
- package/dist/esm/plugins/paste/linkify-md-plugin.js +7 -1
- package/dist/esm/plugins/paste/pm-plugins/analytics.js +6 -1
- package/dist/esm/plugins/paste/pm-plugins/main.js +27 -2
- package/dist/esm/plugins/placeholder/index.js +12 -1
- package/dist/esm/plugins/placeholder/styles.js +2 -1
- package/dist/esm/plugins/placeholder-text/styles.js +2 -1
- package/dist/esm/plugins/selection/gap-cursor/styles.js +1 -1
- package/dist/esm/plugins/selection/pm-plugins/gap-cursor-main.js +2 -2
- package/dist/esm/plugins/status/ui/statusPicker.js +2 -2
- package/dist/esm/plugins/table/index.js +13 -4
- package/dist/esm/plugins/table/nodeviews/TableComponent.js +6 -6
- package/dist/esm/plugins/table/nodeviews/table.js +6 -2
- package/dist/esm/plugins/table/pm-plugins/main.js +1 -4
- package/dist/esm/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.js +102 -0
- package/dist/esm/plugins/table/pm-plugins/table-resizing/event-handlers.js +2 -4
- package/dist/esm/plugins/table/pm-plugins/table-resizing/plugin.js +2 -5
- package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/misc.js +4 -8
- package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/resize-state.js +2 -3
- package/dist/esm/plugins/table/pm-plugins/table-resizing/utils/scale-table.js +0 -3
- package/dist/esm/plugins/table/transforms/column-width.js +1 -2
- package/dist/esm/plugins/table/transforms/fix-tables.js +1 -3
- package/dist/esm/plugins/table/ui/FloatingContextualButton/styles.js +3 -1
- package/dist/esm/plugins/table/ui/FloatingContextualMenu/styles.js +2 -1
- package/dist/esm/plugins/table/ui/common-styles.js +4 -2
- package/dist/esm/plugins/table/ui/consts.js +15 -12
- package/dist/esm/plugins/table/ui/ui-styles.js +15 -10
- package/dist/esm/plugins/table/utils/decoration.js +3 -4
- package/dist/esm/plugins/table/utils/paste.js +9 -9
- package/dist/esm/plugins/type-ahead/index.js +4 -3
- package/dist/esm/plugins/type-ahead/pm-plugins/decorations.js +2 -1
- package/dist/esm/plugins/type-ahead/ui/TypeAheadList.js +4 -4
- package/dist/esm/plugins/type-ahead/ui/TypeAheadListItem.js +10 -9
- package/dist/esm/plugins/type-ahead/ui/TypeAheadPopup.js +71 -5
- package/dist/esm/plugins/unsupported-content/styles.js +1 -1
- package/dist/esm/ui/Addon/Dropdown/styles.js +2 -1
- package/dist/esm/ui/Addon/DropdownItem/styles.js +2 -1
- package/dist/esm/ui/Appearance/Chromeless.js +2 -1
- package/dist/esm/ui/Appearance/Comment/Comment.js +10 -3
- package/dist/esm/ui/Appearance/Comment/Toolbar.js +3 -2
- package/dist/esm/ui/Appearance/FullPage/FullPage.js +6 -2
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +2 -1
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +12 -11
- package/dist/esm/ui/Appearance/FullPage/MainToolbar.js +5 -3
- package/dist/esm/ui/ChromeCollapsed/styles.js +1 -1
- package/dist/esm/ui/ConfigPanel/ConfigPanel.js +21 -14
- package/dist/esm/ui/ConfigPanel/ConfigPanelFieldsLoader.js +2 -0
- package/dist/esm/ui/ConfigPanel/ErrorMessage/ErrorImage.js +3 -0
- package/dist/esm/ui/ConfigPanel/Fields/CheckboxGroup.js +2 -1
- package/dist/esm/ui/ConfigPanel/Fields/Expand.js +2 -1
- package/dist/esm/ui/ConfigPanel/Fields/Fieldset.js +2 -1
- package/dist/esm/ui/ConfigPanel/Fields/common/RequiredIndicator.js +2 -1
- package/dist/esm/ui/ConfigPanel/Header.js +3 -2
- package/dist/esm/ui/ConfigPanel/NestedForms/RemovableField.js +3 -2
- package/dist/esm/ui/ContentStyles/index.js +3 -2
- package/dist/esm/ui/ContextPanel/index.js +2 -1
- package/dist/esm/ui/DropdownMenu/index.js +5 -0
- package/dist/esm/ui/ElementBrowser/InsertMenu.js +5 -4
- package/dist/esm/ui/ElementBrowser/ModalElementBrowser.js +3 -2
- package/dist/esm/ui/ElementBrowser/components/CategoryList.js +3 -2
- package/dist/esm/ui/ElementBrowser/components/ElementList/ElementList.js +11 -5
- package/dist/esm/ui/ElementBrowser/components/ElementList/EmptyState.js +2 -1
- package/dist/esm/ui/ElementBrowser/components/ElementList/NotFoundIllustration.js +3 -0
- package/dist/esm/ui/ElementBrowser/components/ElementSearch.js +2 -1
- package/dist/esm/ui/ElementBrowser/constants.js +3 -1
- package/dist/esm/ui/FloatingToolbar/styles.js +3 -3
- package/dist/esm/ui/LinkSearch/LinkSearchListItem.js +4 -3
- package/dist/esm/ui/PanelTextInput/styles.js +4 -3
- package/dist/esm/ui/PluginSlot/index.js +7 -4
- package/dist/esm/ui/Toolbar/ToolbarInner.js +2 -1
- package/dist/esm/ui/Toolbar/ToolbarWithSizeDetector.js +4 -2
- package/dist/esm/ui/ToolbarFeedback/styles.js +4 -3
- package/dist/esm/ui/WithFlash/index.js +3 -2
- package/dist/esm/ui/styles.js +5 -4
- package/dist/esm/utils/document.js +59 -5
- package/dist/esm/utils/filter/privacy-filter.js +1 -1
- package/dist/esm/utils/step.js +12 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/actions/index.d.ts +6 -0
- package/dist/types/labs/next/ContentComponents.d.ts +7 -1
- package/dist/types/nodeviews/getInlineNodeViewProducer.d.ts +1 -0
- package/dist/types/plugins/analytics/types/enums.d.ts +3 -0
- package/dist/types/plugins/analytics/types/general-events.d.ts +7 -1
- package/dist/types/plugins/base/pm-plugins/inline-cursor-target.d.ts +1 -1
- package/dist/types/plugins/code-block/actions.d.ts +2 -0
- package/dist/types/plugins/code-block/nodeviews/code-block.d.ts +2 -0
- package/dist/types/plugins/code-block/pm-plugins/actions.d.ts +1 -0
- package/dist/types/plugins/code-block/pm-plugins/main-state.d.ts +1 -0
- package/dist/types/plugins/extension/commands.d.ts +1 -1
- package/dist/types/plugins/extension/types.d.ts +1 -0
- package/dist/types/plugins/extension/ui/Extension/Extension/index.d.ts +6 -0
- package/dist/types/plugins/find-replace/styles.d.ts +0 -2
- package/dist/types/plugins/hyperlink/utils.d.ts +8 -0
- package/dist/types/plugins/media/commands/helpers.d.ts +2 -0
- package/dist/types/plugins/media/nodeviews/mediaNodeView/media.d.ts +1 -0
- package/dist/types/plugins/media/pm-plugins/main.d.ts +2 -1
- package/dist/types/plugins/media/pm-plugins/types.d.ts +2 -1
- package/dist/types/plugins/paste/handlers.d.ts +1 -0
- package/dist/types/plugins/paste/pm-plugins/analytics.d.ts +1 -0
- package/dist/types/plugins/table/commands/misc.d.ts +0 -1
- package/dist/types/plugins/table/index.d.ts +0 -1
- package/dist/types/plugins/table/nodeviews/TableComponent.d.ts +1 -0
- package/dist/types/plugins/table/nodeviews/types.d.ts +0 -1
- package/dist/types/plugins/table/pm-plugins/main.d.ts +1 -1
- package/dist/types/plugins/table/pm-plugins/safari-delete-composition-text-issue-workaround.d.ts +15 -0
- package/dist/types/plugins/table/pm-plugins/table-resizing/event-handlers.d.ts +1 -1
- package/dist/types/plugins/table/pm-plugins/table-resizing/plugin.d.ts +1 -1
- package/dist/types/plugins/table/pm-plugins/table-resizing/utils/misc.d.ts +1 -2
- package/dist/types/plugins/table/pm-plugins/table-resizing/utils/resize-state.d.ts +1 -1
- package/dist/types/plugins/table/pm-plugins/table-resizing/utils/scale-table.d.ts +0 -1
- package/dist/types/plugins/table/transforms/fix-tables.d.ts +0 -1
- package/dist/types/plugins/table/types.d.ts +0 -1
- package/dist/types/plugins/table/ui/consts.d.ts +9 -9
- package/dist/types/plugins/type-ahead/ui/TypeAheadList.d.ts +2 -0
- package/dist/types/plugins/type-ahead/ui/TypeAheadListItem.d.ts +4 -4
- package/dist/types/types/editor-appearance-component.d.ts +0 -1
- package/dist/types/types/editor-props.d.ts +4 -0
- package/dist/types/types/feature-flags.d.ts +8 -0
- package/dist/types/types/ui-components.d.ts +1 -0
- package/dist/types/ui/Appearance/FullPage/FullPage.d.ts +1 -0
- package/dist/types/ui/Appearance/FullPage/FullPageContentArea.d.ts +1 -0
- package/dist/types/ui/ConfigPanel/ConfigPanel.d.ts +3 -2
- package/dist/types/ui/ConfigPanel/ConfigPanelFieldsLoader.d.ts +3 -2
- package/dist/types/ui/PluginSlot/index.d.ts +1 -0
- package/dist/types/ui/Toolbar/toolbar-types.d.ts +1 -0
- package/dist/types/utils/document.d.ts +1 -0
- package/dist/types/utils/step.d.ts +1 -0
- package/docs/0-intro.tsx +12 -4
- package/package.json +20 -20
|
@@ -11,6 +11,7 @@ import Button from '@atlaskit/button/custom-theme-button';
|
|
|
11
11
|
import CrossIcon from '@atlaskit/icon/glyph/cross';
|
|
12
12
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
13
13
|
import { N200 } from '@atlaskit/theme/colors';
|
|
14
|
+
import { token } from '@atlaskit/tokens';
|
|
14
15
|
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
15
16
|
import { messages } from './messages';
|
|
16
17
|
var iconWidth = 40;
|
|
@@ -18,10 +19,10 @@ var buttonWidth = 40;
|
|
|
18
19
|
var margin = 16;
|
|
19
20
|
var gapSizeForEllipsis = iconWidth + buttonWidth + margin * 2;
|
|
20
21
|
var item = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n margin-bottom: 24px;\n"])));
|
|
21
|
-
var itemIcon = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: ", "px;\n height: ", "px;\n overflow: hidden;\n border: 1px solid
|
|
22
|
+
var itemIcon = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: ", "px;\n height: ", "px;\n overflow: hidden;\n border: 1px solid ", "; /* N60 at 50% */\n border-radius: ", "px;\n box-sizing: border-box;\n\n display: flex;\n justify-content: center;\n align-items: center;\n\n div {\n width: ", "px;\n height: ", "px;\n }\n"])), iconWidth, iconWidth, token('color.border', 'rgba(223, 225, 229, 0.5)'), borderRadius(), iconWidth, iconWidth);
|
|
22
23
|
var itemBody = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n justify-content: space-between;\n line-height: 1.4;\n margin: 0 16px;\n flex-grow: 3;\n max-width: calc(100% - ", "px);\n"])), gapSizeForEllipsis);
|
|
23
24
|
var centeredItemTitle = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n"])));
|
|
24
|
-
var itemText = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n max-width: 100%;\n white-space: initial;\n .item-summary {\n font-size: ", ";\n color: ", ";\n margin-top: 4px;\n\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n"])), relativeFontSizeToBase16(11.67), N200);
|
|
25
|
+
var itemText = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n max-width: 100%;\n white-space: initial;\n .item-summary {\n font-size: ", ";\n color: ", ";\n margin-top: 4px;\n\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n"])), relativeFontSizeToBase16(11.67), token('color.text.subtlest', N200));
|
|
25
26
|
var descriptionStyle = css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n margin-bottom: 24px;\n"])));
|
|
26
27
|
var closeButtonWrapper = css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n width: ", "px;\n text-align: right;\n"])), buttonWidth);
|
|
27
28
|
|
|
@@ -9,11 +9,12 @@ import { injectIntl } from 'react-intl-next';
|
|
|
9
9
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
10
10
|
import CrossCircleIcon from '@atlaskit/icon/glyph/cross-circle';
|
|
11
11
|
import Tooltip from '@atlaskit/tooltip';
|
|
12
|
-
import
|
|
12
|
+
import { N80, R300 } from '@atlaskit/theme/colors';
|
|
13
|
+
import { token } from '@atlaskit/tokens';
|
|
13
14
|
import { messages } from '../messages';
|
|
14
15
|
var removableFieldWrapper = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n margin-bottom: 0;\n"])));
|
|
15
16
|
var wrapperWithMarginBottom = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin-bottom: ", "px;\n"])), gridSize() * 2);
|
|
16
|
-
var removeButtonWrapper = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: absolute;\n right: 0;\n top: 0;\n cursor: pointer;\n\n color: ", ";\n\n &:hover {\n color: ", ";\n }\n"])),
|
|
17
|
+
var removeButtonWrapper = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: absolute;\n right: 0;\n top: 0;\n cursor: pointer;\n\n color: ", ";\n\n &:hover {\n color: ", ";\n }\n"])), token('color.icon.subtle', N80), token('color.icon.danger', R300));
|
|
17
18
|
|
|
18
19
|
var RemovableField = function RemovableField(_ref) {
|
|
19
20
|
var _children$props$field;
|
|
@@ -7,6 +7,7 @@ import React, { useMemo } from 'react';
|
|
|
7
7
|
import { jsx, css, useTheme } from '@emotion/react';
|
|
8
8
|
import { whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, blockMarksSharedStyles, shadowSharedStyle, dateSharedStyle, tasksAndDecisionsStyles, annotationSharedStyles, smartCardSharedStyles, textColorStyles } from '@atlaskit/editor-common/styles';
|
|
9
9
|
import { editorFontSize } from '@atlaskit/editor-shared-styles';
|
|
10
|
+
import { token } from '@atlaskit/tokens';
|
|
10
11
|
import { unsupportedStyles } from '../../plugins/unsupported-content/styles';
|
|
11
12
|
import { telepointerStyle } from '../../plugins/collab-edit/styles';
|
|
12
13
|
import { gapCursorStyles } from '../../plugins/selection/gap-cursor/styles';
|
|
@@ -41,9 +42,9 @@ import { InlineNodeViewSharedStyles } from '../../nodeviews/getInlineNodeViewPro
|
|
|
41
42
|
var contentStyles = function contentStyles(props) {
|
|
42
43
|
var _props$featureFlags;
|
|
43
44
|
|
|
44
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror {\n outline: none;\n font-size: ", "px;\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n }\n\n .ProseMirror[contenteditable='false'] .taskItemView-content-wrap {\n pointer-events: none;\n opacity: 0.7;\n }\n\n .ProseMirror-hideselection *::selection {\n background: transparent;\n }\n\n .ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n }\n\n .ProseMirror-selectednode {\n outline: none;\n }\n\n .ProseMirror-selectednode:empty {\n outline: 2px solid
|
|
45
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror {\n outline: none;\n font-size: ", "px;\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n ", ";\n }\n\n .ProseMirror[contenteditable='false'] .taskItemView-content-wrap {\n pointer-events: none;\n opacity: 0.7;\n }\n\n .ProseMirror-hideselection *::selection {\n background: transparent;\n }\n\n .ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n }\n\n .ProseMirror-selectednode {\n outline: none;\n }\n\n .ProseMirror-selectednode:empty {\n outline: 2px solid ", ";\n }\n\n ", "\n ", "\n ", "\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\n .panelView-content-wrap {\n box-sizing: border-box;\n }\n\n .mediaGroupView-content-wrap ul {\n padding: 0;\n }\n\n /** Needed to override any cleared floats, e.g. image wrapping */\n\n div.fabric-editor-block-mark[class^='fabric-editor-align'] {\n clear: none !important;\n }\n\n .fabric-editor-align-end {\n text-align: right;\n }\n\n .fabric-editor-align-start {\n text-align: left;\n }\n\n .fabric-editor-align-center {\n text-align: center;\n }\n\n .pm-table-header-content-wrap,\n .pm-table-cell-content-wrap div.fabric-editor-block-mark {\n p:first-of-type {\n margin-top: 0;\n }\n }\n\n .hyperlink-floating-toolbar,\n .", " {\n padding: 0;\n }\n\n /* Link icon in the Atlaskit package\n is bigger than the others\n */\n .hyperlink-open-link {\n svg {\n max-width: 18px;\n }\n &[href] {\n padding: 0 4px;\n }\n }\n"])), editorFontSize({
|
|
45
46
|
theme: props.theme
|
|
46
|
-
}), whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, shadowSharedStyle, InlineNodeViewSharedStyles, placeholderTextStyles, placeholderStyles, (_props$featureFlags = props.featureFlags) !== null && _props$featureFlags !== void 0 && _props$featureFlags.codeBlockSyntaxHighlighting ? highlightingCodeBlockStyles(props) : codeBlockStyles(props), blocktypeStyles(props), textFormattingStyles(props), textColorStyles, listsStyles, ruleStyles(props), mediaStyles, layoutStyles, telepointerStyle, gapCursorStyles, tableStyles(props), panelStyles(props), fakeCursorStyles, mentionsStyles, emojiStyles, tasksAndDecisionsStyles, gridStyles, linkStyles, blockMarksSharedStyles, dateSharedStyle, extensionStyles, expandStyles(props), findReplaceStyles, taskDecisionStyles, statusStyles, annotationSharedStyles(props), smartCardStyles, smartCardSharedStyles, dateStyles, embedCardStyles, unsupportedStyles, ClassNames.FLOATING_TOOLBAR_COMPONENT);
|
|
47
|
+
}), whitespaceSharedStyles, paragraphSharedStyles, listsSharedStyles, indentationSharedStyles, shadowSharedStyle, InlineNodeViewSharedStyles, token('color.border.focused', '#8cf'), placeholderTextStyles, placeholderStyles, (_props$featureFlags = props.featureFlags) !== null && _props$featureFlags !== void 0 && _props$featureFlags.codeBlockSyntaxHighlighting ? highlightingCodeBlockStyles(props) : codeBlockStyles(props), blocktypeStyles(props), textFormattingStyles(props), textColorStyles, listsStyles, ruleStyles(props), mediaStyles, layoutStyles, telepointerStyle, gapCursorStyles, tableStyles(props), panelStyles(props), fakeCursorStyles, mentionsStyles, emojiStyles, tasksAndDecisionsStyles, gridStyles, linkStyles, blockMarksSharedStyles, dateSharedStyle, extensionStyles, expandStyles(props), findReplaceStyles, taskDecisionStyles, statusStyles, annotationSharedStyles(props), smartCardStyles, smartCardSharedStyles, dateStyles, embedCardStyles, unsupportedStyles, ClassNames.FLOATING_TOOLBAR_COMPONENT);
|
|
47
48
|
};
|
|
48
49
|
|
|
49
50
|
export var createEditorContentStyle = function createEditorContentStyle(styles) {
|
|
@@ -30,6 +30,7 @@ import { pluginKey as contextPanelPluginKey } from '../../plugins/context-panel'
|
|
|
30
30
|
import { pluginKey as widthPluginKey } from '../../plugins/width';
|
|
31
31
|
import WithEditorActions from '../WithEditorActions';
|
|
32
32
|
import { getChildBreakoutModes } from '../../utils/document';
|
|
33
|
+
import { token } from '@atlaskit/tokens';
|
|
33
34
|
var ANIM_SPEED_MS = 500;
|
|
34
35
|
var EDITOR_WIDTH = akEditorDefaultLayoutWidth + akEditorBreakoutPadding;
|
|
35
36
|
var WIDE_EDITOR_WIDTH = akEditorWideLayoutWidth + akEditorBreakoutPadding;
|
|
@@ -47,7 +48,7 @@ export var shouldPanelBePositionedOverEditor = function shouldPanelBePositionedO
|
|
|
47
48
|
return editorNotFullWidth && (hasSpaceForPanel || hasSpaceForWideBreakoutsAndPanel);
|
|
48
49
|
};
|
|
49
50
|
var panelHidden = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: 0;\n"])));
|
|
50
|
-
export var panel = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n width: ", "px;\n height: 100%;\n transition: width ", "ms ", ";\n overflow: hidden;\n box-shadow: inset 2px 0 0 0 ", ";\n"])), akEditorContextPanelWidth, ANIM_SPEED_MS, akEditorSwoopCubicBezier, N30);
|
|
51
|
+
export var panel = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n width: ", "px;\n height: 100%;\n transition: width ", "ms ", ";\n overflow: hidden;\n box-shadow: inset 2px 0 0 0 ", ";\n"])), akEditorContextPanelWidth, ANIM_SPEED_MS, akEditorSwoopCubicBezier, token('color.border', N30));
|
|
51
52
|
export var content = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n transition: width 600ms ", ";\n box-sizing: border-box;\n padding: 16px 16px 0px;\n width: ", "px;\n height: 100%;\n overflow-y: auto;\n"])), akEditorSwoopCubicBezier, akEditorContextPanelWidth);
|
|
52
53
|
export var SwappableContentArea = /*#__PURE__*/function (_React$PureComponent) {
|
|
53
54
|
_inherits(SwappableContentArea, _React$PureComponent);
|
|
@@ -29,8 +29,13 @@ var DropListWithOutsideListeners = withOuterListeners(DropList);
|
|
|
29
29
|
/**
|
|
30
30
|
* Hack for item to imitate old dropdown-menu selected styles
|
|
31
31
|
*/
|
|
32
|
+
// TODO: https://product-fabric.atlassian.net/browse/DSP-4500
|
|
33
|
+
|
|
34
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
32
35
|
|
|
33
36
|
var itemWrapper = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n && > span,\n && > span:hover {\n background: #6c798f;\n color: #fff;\n }\n"])));
|
|
37
|
+
/* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
|
|
38
|
+
|
|
34
39
|
var itemContentWrapper = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n margin-left: 8px;\n"])));
|
|
35
40
|
/**
|
|
36
41
|
* Wrapper around @atlaskit/droplist which uses Popup and Portal to render
|
|
@@ -25,6 +25,7 @@ import { getFeaturedQuickInsertItems, searchQuickInsertItems } from '../../plugi
|
|
|
25
25
|
import { insertItem } from '../../plugins/quick-insert/commands';
|
|
26
26
|
import ElementBrowser from './components/ElementBrowserLoader';
|
|
27
27
|
import { ELEMENT_ITEM_HEIGHT } from './constants';
|
|
28
|
+
import { token } from '@atlaskit/tokens';
|
|
28
29
|
|
|
29
30
|
var InsertMenu = function InsertMenu(_ref) {
|
|
30
31
|
var editorView = _ref.editorView,
|
|
@@ -166,12 +167,12 @@ var getInsertMenuHeight = function getInsertMenuHeight(_ref5) {
|
|
|
166
167
|
};
|
|
167
168
|
|
|
168
169
|
var insertMenuWrapper = function insertMenuWrapper(theme, itemCount) {
|
|
169
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n width: 320px;\n height: ", "px;\n background-color: ", ";\n border-radius: ", "px;\n box-shadow:
|
|
170
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n width: 320px;\n height: ", "px;\n background-color: ", ";\n border-radius: ", "px;\n box-shadow: ", ";\n"])), getInsertMenuHeight({
|
|
170
171
|
itemCount: itemCount
|
|
171
172
|
}), themed({
|
|
172
|
-
light: N0,
|
|
173
|
-
dark: DN50
|
|
174
|
-
})(theme), borderRadius(), N30A, N30A, N60A);
|
|
173
|
+
light: token('elevation.surface.overlay', N0),
|
|
174
|
+
dark: token('elevation.surface.overlay', DN50)
|
|
175
|
+
})(theme), borderRadius(), token('elevation.shadow.overlay', "0 0 0 1px ".concat(N30A, ",\n 0 2px 1px ").concat(N30A, ",\n 0 0 20px -6px ").concat(N60A)));
|
|
175
176
|
};
|
|
176
177
|
|
|
177
178
|
var itemBefore = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: 40px;\n height: 40px;\n box-sizing: border-box;\n display: flex;\n justify-content: center;\n align-items: center;\n margin-right: ", "px;\n"])), gridSize() / 2);
|
|
@@ -17,11 +17,12 @@ import ElementBrowser from './components/ElementBrowserLoader';
|
|
|
17
17
|
import { getCategories } from './categories';
|
|
18
18
|
import { MODAL_WRAPPER_PADDING } from './constants';
|
|
19
19
|
import { messages } from './messages';
|
|
20
|
+
import { token } from '@atlaskit/tokens';
|
|
20
21
|
var actions = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: inline-flex;\n margin: 0 -4px;\n"])));
|
|
21
22
|
var actionItem = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n flex: 1 0 auto;\n margin: 0 4px;\n"])));
|
|
22
23
|
var wrapper = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n flex: 1 1 auto;\n box-sizing: border-box;\n padding: ", "px ", "px 0 10px;\n overflow: hidden;\n background-color: ", ";\n border-radius: ", "px;\n"])), MODAL_WRAPPER_PADDING, MODAL_WRAPPER_PADDING, themed({
|
|
23
|
-
light: N0,
|
|
24
|
-
dark: DN50
|
|
24
|
+
light: token('elevation.surface.overlay', N0),
|
|
25
|
+
dark: token('elevation.surface.overlay', DN50)
|
|
25
26
|
})(), borderRadius());
|
|
26
27
|
var modalFooter = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n padding: ", "px;\n\n position: relative;\n align-items: center;\n justify-content: space-between;\n"])), MODAL_WRAPPER_PADDING);
|
|
27
28
|
|
|
@@ -22,6 +22,7 @@ import { withAnalyticsContext } from '@atlaskit/analytics-next';
|
|
|
22
22
|
import { DEVICE_BREAKPOINT_NUMBERS, GRID_SIZE } from '../constants';
|
|
23
23
|
import useFocus from '../hooks/use-focus';
|
|
24
24
|
import { fireAnalyticsEvent, EVENT_TYPE, ACTION_SUBJECT, ACTION_SUBJECT_ID, ACTION } from '../../../plugins/analytics';
|
|
25
|
+
import { token } from '@atlaskit/tokens';
|
|
25
26
|
|
|
26
27
|
function CategoryList(_ref) {
|
|
27
28
|
var _ref$categories = _ref.categories,
|
|
@@ -90,9 +91,9 @@ function CategoryListItem(_ref2) {
|
|
|
90
91
|
marginLeft: '2px',
|
|
91
92
|
height: '100%',
|
|
92
93
|
width: '100%',
|
|
93
|
-
color: category.name !== selectedCategory ? N800 : B400
|
|
94
|
+
color: category.name !== selectedCategory ? token('color.text', N800) : token('color.text.selected', B400)
|
|
94
95
|
}, category.name === selectedCategory && {
|
|
95
|
-
background: B50
|
|
96
|
+
background: token('color.background.selected', B50)
|
|
96
97
|
})
|
|
97
98
|
}, rest);
|
|
98
99
|
}, [category.name, selectedCategory]);
|
|
@@ -22,6 +22,7 @@ import Item from '@atlaskit/item';
|
|
|
22
22
|
import { B100, N20, N200 } from '@atlaskit/theme/colors';
|
|
23
23
|
import Tooltip from '@atlaskit/tooltip';
|
|
24
24
|
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
25
|
+
import { token } from '@atlaskit/tokens';
|
|
25
26
|
import { withAnalyticsContext } from '@atlaskit/analytics-next';
|
|
26
27
|
import { ACTION, ACTION_SUBJECT, EVENT_TYPE, fireAnalyticsEvent } from '../../../../plugins/analytics';
|
|
27
28
|
import IconFallback from '../../../../plugins/quick-insert/assets/fallback';
|
|
@@ -145,11 +146,16 @@ var getStyles = memoizeOne(function (mode) {
|
|
|
145
146
|
}
|
|
146
147
|
},
|
|
147
148
|
borderRadius: GRID_SIZE / 2,
|
|
149
|
+
// TODO: apply a different background for when a selected item is hovered.
|
|
150
|
+
// Not possible due to current implementation of @atlaskit/item component.
|
|
148
151
|
selected: {
|
|
149
|
-
background: N20
|
|
152
|
+
background: token('color.background.selected', N20)
|
|
150
153
|
},
|
|
151
154
|
hover: {
|
|
152
|
-
background: 'rgb(244, 245, 247)'
|
|
155
|
+
background: token('color.background.neutral.subtle.hovered', 'rgb(244, 245, 247)')
|
|
156
|
+
},
|
|
157
|
+
active: {
|
|
158
|
+
background: token('color.background.neutral.subtle.pressed', 'rgb(244, 245, 247)')
|
|
153
159
|
},
|
|
154
160
|
beforeItemSpacing: {
|
|
155
161
|
default: GRID_SIZE * 1.5
|
|
@@ -279,8 +285,8 @@ var ItemContent = /*#__PURE__*/memo(function (_ref6) {
|
|
|
279
285
|
}, description)));
|
|
280
286
|
});
|
|
281
287
|
var scrollbarStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ::-webkit-scrollbar {\n width: ", "px;\n }\n ::-webkit-scrollbar-track-piece {\n background: ", ";\n }\n ::-webkit-scrollbar-thumb {\n background: ", ";\n }\n\n /** Firefox **/\n scrollbar-color: ", " ", ";\n\n -ms-overflow-style: -ms-autohiding-scrollbar;\n"])), SCROLLBAR_WIDTH, SCROLLBAR_TRACK_COLOR, SCROLLBAR_THUMB_COLOR, SCROLLBAR_THUMB_COLOR, SCROLLBAR_TRACK_COLOR);
|
|
282
|
-
var elementItemsWrapper = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n flex: 1;\n flex-flow: row wrap;\n align-items: flex-start;\n justify-content: flex-start;\n overflow: hidden;\n padding: ", "px; // For Focus outline\n\n .ReactVirtualized__Collection {\n ", ";\n border-radius: 3px; // Standard border-radius across other components like Search or Item.\n outline: none;\n\n :focus {\n box-shadow: 0 0 0 ", "px
|
|
283
|
-
var elementItemWrapper = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n /**\n * Since we are using \"Item\" component's content itself for description,\n * the height of description overflows the parent container padding/margin.\n * manually setting it to take 100% of parent.\n */\n span {\n span:nth-
|
|
288
|
+
var elementItemsWrapper = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n flex: 1;\n flex-flow: row wrap;\n align-items: flex-start;\n justify-content: flex-start;\n overflow: hidden;\n padding: ", "px; // For Focus outline\n\n .ReactVirtualized__Collection {\n ", ";\n border-radius: 3px; // Standard border-radius across other components like Search or Item.\n outline: none;\n\n :focus {\n box-shadow: 0 0 0 ", "px\n ", ";\n }\n }\n .ReactVirtualized__Collection__innerScrollContainer {\n div[class='element-item-wrapper']:last-child {\n padding-bottom: 4px;\n }\n }\n\n // temporary solution before we migrated off dst/item\n & span[class^='ItemParts__Before'] {\n margin-right: 12px;\n }\n"])), ELEMENT_LIST_PADDING, scrollbarStyle, ELEMENT_LIST_PADDING, token('color.border.focused', B100));
|
|
289
|
+
var elementItemWrapper = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n /**\n * Since we are using \"Item\" component's content itself for description,\n * the height of description overflows the parent container padding/margin.\n * manually setting it to take 100% of parent.\n */\n span {\n span:nth-of-type(2) {\n max-height: 100%;\n }\n }\n"])));
|
|
284
290
|
var itemBody = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n justify-content: space-between;\n line-height: 1.4;\n width: 100%;\n\n margin-top: -2px; // Fixes the Item Icon and text's alignment issue\n"])));
|
|
285
291
|
/*
|
|
286
292
|
* -webkit-line-clamp is also supported by firefox 🎉
|
|
@@ -288,7 +294,7 @@ var itemBody = css(_templateObject4 || (_templateObject4 = _taggedTemplateLitera
|
|
|
288
294
|
*/
|
|
289
295
|
|
|
290
296
|
var multilineStyle = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n"])));
|
|
291
|
-
var itemDescription = css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n ", ";\n\n overflow: hidden;\n font-size: ", ";\n color: ", ";\n margin-top: 2px;\n"])), multilineStyle, relativeFontSizeToBase16(11.67), N200);
|
|
297
|
+
var itemDescription = css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n ", ";\n\n overflow: hidden;\n font-size: ", ";\n color: ", ";\n margin-top: 2px;\n"])), multilineStyle, relativeFontSizeToBase16(11.67), token('color.text.subtle', N200));
|
|
292
298
|
var itemText = css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n width: inherit;\n white-space: initial;\n"])));
|
|
293
299
|
var itemTitleWrapper = css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between; // Title and keyboardshortcut are rendered in the same block\n"])));
|
|
294
300
|
var itemTitle = css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n width: 100%;\n overflow: hidden;\n\n white-space: nowrap;\n text-overflow: ellipsis;\n"])));
|
|
@@ -7,6 +7,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
7
7
|
import { FormattedMessage } from 'react-intl-next';
|
|
8
8
|
import Button from '@atlaskit/button';
|
|
9
9
|
import NotFoundIllustration from './NotFoundIllustration';
|
|
10
|
+
import { token } from '@atlaskit/tokens';
|
|
10
11
|
export default function EmptyState(_ref) {
|
|
11
12
|
var onExternalLinkClick = _ref.onExternalLinkClick;
|
|
12
13
|
return jsx("div", {
|
|
@@ -36,7 +37,7 @@ export default function EmptyState(_ref) {
|
|
|
36
37
|
description: "Empty state sub-heading external link"
|
|
37
38
|
})))));
|
|
38
39
|
}
|
|
39
|
-
var emptyStateHeading = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n font-size: 1.42857em;\n line-height: 1.2;\n color:
|
|
40
|
+
var emptyStateHeading = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n font-size: 1.42857em;\n line-height: 1.2;\n color: ", ";\n font-weight: 500;\n letter-spacing: -0.008em;\n margin-top: 28px;\n"])), token('color.text', 'rgb(23, 43, 77)'));
|
|
40
41
|
var emptyStateSubHeading = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin-top: 16px;\n max-width: 400px;\n text-align: center;\n"])));
|
|
41
42
|
var emptyStateWrapper = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n"])));
|
|
42
43
|
var externalLinkWrapper = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n margin-top: 14px;\n"])));
|
|
@@ -2,6 +2,9 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
2
2
|
|
|
3
3
|
var _templateObject;
|
|
4
4
|
|
|
5
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
6
|
+
// TODO: https://product-fabric.atlassian.net/browse/DSP-4249
|
|
7
|
+
|
|
5
8
|
/** @jsx jsx */
|
|
6
9
|
import { css, jsx } from '@emotion/react';
|
|
7
10
|
var imageContainer = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 120px;\n height: 111px;\n margin-top: 48px;\n"])));
|
|
@@ -15,6 +15,7 @@ import { GRID_SIZE, SEARCH_ITEM_HEIGHT_WIDTH } from '../constants';
|
|
|
15
15
|
import useFocus from '../hooks/use-focus';
|
|
16
16
|
import { Modes } from '../types';
|
|
17
17
|
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
18
|
+
import { token } from '@atlaskit/tokens';
|
|
18
19
|
|
|
19
20
|
function ElementSearch(_ref) {
|
|
20
21
|
var onSearch = _ref.onSearch,
|
|
@@ -75,7 +76,7 @@ var placeHolderMessage = {
|
|
|
75
76
|
var styledShortcut = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n padding: ", "px ", "px;\n width: ", "px;\n"])), shortcutStyle, GRID_SIZE / 2, GRID_SIZE, GRID_SIZE * 6);
|
|
76
77
|
var wrapper = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n & > [data-ds--text-field--container] {\n height: ", "px;\n border-radius: ", "px;\n flex: 1 1 100%;\n overflow: visible;\n & > [data-ds--text-field--input] {\n margin-bottom: 3px;\n font-size: ", ";\n padding: ", "px 6px ", "px 0;\n }\n }\n"])), GRID_SIZE * 6, GRID_SIZE, relativeFontSizeToBase16(14), GRID_SIZE, GRID_SIZE);
|
|
77
78
|
var wrapperInline = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n & > [data-ds--text-field--container] {\n height: ", "px;\n flex: none;\n overflow: revert;\n }\n"])), GRID_SIZE * 5);
|
|
78
|
-
var elementBeforeInput = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n margin: 1px 6px 0 8px;\n color: ", ";\n\n // Custom SearchIcon style\n span,\n svg {\n height: 20px;\n width: 20px;\n }\n"])), N200);
|
|
79
|
+
var elementBeforeInput = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n margin: 1px 6px 0 8px;\n color: ", ";\n\n // Custom SearchIcon style\n span,\n svg {\n height: 20px;\n width: 20px;\n }\n"])), token('color.icon', N200));
|
|
79
80
|
var elementAfterInput = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n margin: 0 8px;\n height: ", ";\n text-align: center;\n"])), SEARCH_ITEM_HEIGHT_WIDTH);
|
|
80
81
|
var MemoizedElementSearchWithAnalytics = /*#__PURE__*/memo(withAnalyticsContext({
|
|
81
82
|
component: 'Searchbar'
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
|
|
1
2
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
2
3
|
export var GRID_SIZE = gridSize();
|
|
3
4
|
export var DEVICE_BREAKPOINT_NUMBERS = {
|
|
@@ -16,7 +17,8 @@ export var SIDEBAR_HEADING_PADDING_LEFT = '12px';
|
|
|
16
17
|
export var INLINE_SIDEBAR_HEIGHT = '54px';
|
|
17
18
|
export var SEARCH_ITEM_MARGIN = '12px';
|
|
18
19
|
export var SEARCH_ITEM_HEIGHT_WIDTH = '20px';
|
|
19
|
-
export var SCROLLBAR_WIDTH = GRID_SIZE;
|
|
20
|
+
export var SCROLLBAR_WIDTH = GRID_SIZE; // TODO: https://product-fabric.atlassian.net/jira/servicedesk/projects/DTR/queues/issue/DTR-365
|
|
21
|
+
|
|
20
22
|
export var SCROLLBAR_THUMB_COLOR = '#eeeeee';
|
|
21
23
|
export var SCROLLBAR_TRACK_COLOR = 'rgba(255, 255, 255, 0)';
|
|
22
24
|
export var ELEMENT_LIST_PADDING = 2;
|
|
@@ -4,8 +4,8 @@ var _templateObject, _templateObject2;
|
|
|
4
4
|
|
|
5
5
|
import { css } from '@emotion/react';
|
|
6
6
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
7
|
-
import { N0 } from '@atlaskit/theme/colors';
|
|
8
|
-
import {
|
|
7
|
+
import { N0, N50A, N60A } from '@atlaskit/theme/colors';
|
|
8
|
+
import { token } from '@atlaskit/tokens';
|
|
9
9
|
export var container = function container(height) {
|
|
10
|
-
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border-radius: ", "px;\n ", "
|
|
10
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border-radius: ", "px;\n box-shadow: ", ";\n display: flex;\n align-items: center;\n box-sizing: border-box;\n padding: 4px 8px;\n background-color: ", ";\n ", ";\n"])), borderRadius(), token('elevation.shadow.overlay', "0 12px 24px -6px ".concat(N50A, ", 0 0 1px ").concat(N60A)), token('color.background.input', N0), height ? css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n height: ", "px;\n "])), height) : '');
|
|
11
11
|
};
|
|
@@ -19,16 +19,17 @@ import { css, jsx } from '@emotion/react'; // AFP-2532 TODO: Fix automatic suppr
|
|
|
19
19
|
// eslint-disable-next-line @atlassian/tangerine/import/entry-points
|
|
20
20
|
|
|
21
21
|
import { fontSizeSmall } from '@atlaskit/theme';
|
|
22
|
+
import { token } from '@atlaskit/tokens';
|
|
22
23
|
import { N20, N300, N800 } from '@atlaskit/theme/colors';
|
|
23
24
|
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
24
25
|
import { getCorrectAltByIconUrl } from './listItemAlts';
|
|
25
26
|
import { transformTimeStamp } from './transformTimeStamp';
|
|
26
27
|
import { injectIntl } from 'react-intl-next';
|
|
27
28
|
export var container = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background-color: transparent;\n padding: 8px 12px;\n cursor: pointer;\n display: flex;\n margin-top: 0;\n"])));
|
|
28
|
-
export var containerSelected = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background-color: ", ";\n"])), N20);
|
|
29
|
+
export var containerSelected = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background-color: ", ";\n"])), token('color.background.neutral.subtle.hovered', N20));
|
|
29
30
|
var nameWrapper = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n overflow: hidden;\n"])));
|
|
30
|
-
export var nameStyle = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n color: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n line-height: 20px;\n"])), N800);
|
|
31
|
-
export var containerName = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n color: ", ";\n line-height: 14px;\n font-size: ", ";\n"])), N300, relativeFontSizeToBase16(fontSizeSmall()));
|
|
31
|
+
export var nameStyle = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n color: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n line-height: 20px;\n"])), token('color.text', N800));
|
|
32
|
+
export var containerName = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n color: ", ";\n line-height: 14px;\n font-size: ", ";\n"])), token('color.text.subtlest', N300), relativeFontSizeToBase16(fontSizeSmall()));
|
|
32
33
|
var iconStyle = css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n min-width: 16px;\n margin-top: 3px;\n margin-right: 12px;\n\n img {\n max-width: 16px;\n }\n"])));
|
|
33
34
|
|
|
34
35
|
var LinkSearchListItem = /*#__PURE__*/function (_React$PureComponent) {
|
|
@@ -3,10 +3,11 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
3
3
|
var _templateObject, _templateObject2;
|
|
4
4
|
|
|
5
5
|
import { css } from '@emotion/react';
|
|
6
|
-
import { N400,
|
|
7
|
-
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
6
|
+
import { N400, N100 } from '@atlaskit/theme/colors';
|
|
7
|
+
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
8
|
+
import { token } from '@atlaskit/tokens'; // Normal .className gets overridden by input[type=text] hence this hack to produce input.className
|
|
8
9
|
|
|
9
|
-
export var panelTextInput = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n input& {\n background: transparent;\n border: 0;\n border-radius: 0;\n box-sizing: content-box;\n color: ", ";\n flex-grow: 1;\n font-size: ", ";\n line-height: 20px;\n padding: 0;\n min-width: 145px;\n\n /* Hides IE10+ built-in [x] clear input button */\n &::-ms-clear {\n display: none;\n }\n\n &:focus {\n outline: none;\n }\n\n &::placeholder {\n color: ", ";\n
|
|
10
|
+
export var panelTextInput = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n input& {\n background: transparent;\n border: 0;\n border-radius: 0;\n box-sizing: content-box;\n color: ", ";\n flex-grow: 1;\n font-size: ", ";\n line-height: 20px;\n padding: 0;\n min-width: 145px;\n\n /* Hides IE10+ built-in [x] clear input button */\n &::-ms-clear {\n display: none;\n }\n\n &:focus {\n outline: none;\n }\n\n &::placeholder {\n color: ", ";\n }\n }\n"])), token('color.text.subtle', N400), relativeFontSizeToBase16(13), token('color.text.subtlest', N100));
|
|
10
11
|
export var panelTextInputWithCustomWidth = function panelTextInputWithCustomWidth(width) {
|
|
11
12
|
return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n input& {\n width: ", "px;\n }\n"])), width);
|
|
12
13
|
};
|
|
@@ -79,8 +79,9 @@ var PluginSlot = /*#__PURE__*/function (_React$Component) {
|
|
|
79
79
|
popupsBoundariesElement = _this$props.popupsBoundariesElement,
|
|
80
80
|
popupsScrollableElement = _this$props.popupsScrollableElement,
|
|
81
81
|
containerElement = _this$props.containerElement,
|
|
82
|
-
disabled = _this$props.disabled
|
|
83
|
-
|
|
82
|
+
disabled = _this$props.disabled,
|
|
83
|
+
wrapperElement = _this$props.wrapperElement;
|
|
84
|
+
return !(nextProps.editorView === editorView && nextProps.editorActions === editorActions && nextProps.items === items && nextProps.providerFactory === providerFactory && nextProps.eventDispatcher === eventDispatcher && nextProps.popupsMountPoint === popupsMountPoint && nextProps.popupsBoundariesElement === popupsBoundariesElement && nextProps.popupsScrollableElement === popupsScrollableElement && nextProps.containerElement === containerElement && nextProps.disabled === disabled && nextProps.wrapperElement === wrapperElement);
|
|
84
85
|
}
|
|
85
86
|
}, {
|
|
86
87
|
key: "componentDidMount",
|
|
@@ -115,7 +116,8 @@ var PluginSlot = /*#__PURE__*/function (_React$Component) {
|
|
|
115
116
|
popupsScrollableElement = _this$props2.popupsScrollableElement,
|
|
116
117
|
containerElement = _this$props2.containerElement,
|
|
117
118
|
disabled = _this$props2.disabled,
|
|
118
|
-
dispatchAnalyticsEvent = _this$props2.dispatchAnalyticsEvent
|
|
119
|
+
dispatchAnalyticsEvent = _this$props2.dispatchAnalyticsEvent,
|
|
120
|
+
wrapperElement = _this$props2.wrapperElement;
|
|
119
121
|
|
|
120
122
|
if (!items || !editorView) {
|
|
121
123
|
return null;
|
|
@@ -141,7 +143,8 @@ var PluginSlot = /*#__PURE__*/function (_React$Component) {
|
|
|
141
143
|
popupsBoundariesElement: popupsBoundariesElement,
|
|
142
144
|
popupsScrollableElement: popupsScrollableElement,
|
|
143
145
|
containerElement: containerElement,
|
|
144
|
-
disabled: disabled
|
|
146
|
+
disabled: disabled,
|
|
147
|
+
wrapperElement: wrapperElement
|
|
145
148
|
});
|
|
146
149
|
return element && /*#__PURE__*/React.cloneElement(element, props);
|
|
147
150
|
})));
|
|
@@ -75,7 +75,8 @@ export var ToolbarInner = /*#__PURE__*/function (_React$Component) {
|
|
|
75
75
|
isToolbarReducedSpacing: isToolbarReducedSpacing,
|
|
76
76
|
containerElement: containerElement,
|
|
77
77
|
isLastItem: key === items.length - 1,
|
|
78
|
-
dispatchAnalyticsEvent: dispatchAnalyticsEvent
|
|
78
|
+
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
79
|
+
wrapperElement: null
|
|
79
80
|
});
|
|
80
81
|
return element && /*#__PURE__*/React.cloneElement(element, props);
|
|
81
82
|
}));
|
|
@@ -13,6 +13,7 @@ import { useElementWidth } from './hooks';
|
|
|
13
13
|
import { widthToToolbarSize, toolbarSizeToWidth } from './toolbar-size';
|
|
14
14
|
import { Toolbar } from './Toolbar';
|
|
15
15
|
import { ToolbarSize } from './types';
|
|
16
|
+
import { isFullPage } from '../../utils/is-full-page';
|
|
16
17
|
var toolbar = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 100%;\n position: relative;\n @media (max-width: ", "px) {\n grid-column: 1 / 2;\n grid-row: 2;\n width: calc(100% - 30px);\n margin: 0 15px;\n }\n"])), akEditorMobileMaxWidth);
|
|
17
18
|
export var ToolbarWithSizeDetector = function ToolbarWithSizeDetector(props) {
|
|
18
19
|
var ref = /*#__PURE__*/React.createRef();
|
|
@@ -27,10 +28,11 @@ export var ToolbarWithSizeDetector = function ToolbarWithSizeDetector(props) {
|
|
|
27
28
|
});
|
|
28
29
|
var toolbarSize = typeof width === 'undefined' && typeof elementWidth === 'undefined' ? undefined : widthToToolbarSize(width || elementWidth, props.appearance);
|
|
29
30
|
var toolbarStyle = useMemo(function () {
|
|
30
|
-
var
|
|
31
|
+
var toolbarWidth = isFullPage(props.appearance) && props.twoLineEditorToolbar ? ToolbarSize.S : ToolbarSize.M;
|
|
32
|
+
var toolbarMinWidth = toolbarSizeToWidth(toolbarWidth, props.appearance);
|
|
31
33
|
var minWidth = "min-width: ".concat(props.hasMinWidth ? toolbarMinWidth : '254', "px");
|
|
32
34
|
return [toolbar, minWidth];
|
|
33
|
-
}, [props.appearance, props.hasMinWidth]);
|
|
35
|
+
}, [props.appearance, props.hasMinWidth, props.twoLineEditorToolbar]);
|
|
34
36
|
return jsx("div", {
|
|
35
37
|
css: toolbarStyle
|
|
36
38
|
}, jsx(WidthObserver, {
|
|
@@ -5,10 +5,11 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
|
|
|
5
5
|
import { css } from '@emotion/react';
|
|
6
6
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
7
7
|
import { N60A, N400, P400 } from '@atlaskit/theme/colors';
|
|
8
|
+
import { token } from '@atlaskit/tokens';
|
|
8
9
|
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
9
10
|
export var buttonContent = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n height: 24px;\n line-height: 24px;\n min-width: 70px;\n"])));
|
|
10
11
|
export var wrapper = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n margin-right: 0;\n"])));
|
|
11
|
-
export var confirmationPopup = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n background:
|
|
12
|
-
export var confirmationText = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n font-size: ", ";\n word-spacing: 4px;\n line-height: 22px;\n color: ", ";\n margin-top: 30px;\n padding: 20px;\n & > div {\n width: 240px;\n }\n & > div:first-of-type {\n margin-bottom: 12px;\n }\n & > div:nth-of-type(2) {\n margin-bottom: 20px;\n }\n"])), relativeFontSizeToBase16(14), N400);
|
|
13
|
-
export var confirmationHeader = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n background-color: ", ";\n height: 100px;\n width: 100%;\n display: inline-block;\n"])), P400);
|
|
12
|
+
export var confirmationPopup = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n background: ", ";\n border-radius: ", "px;\n box-shadow: ", ";\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n overflow: auto;\n max-height: none;\n height: 410px;\n width: 280px;\n"])), token('elevation.surface.overlay', '#fff'), borderRadius(), token('elevation.shadow.overlay', "0 4px 8px -2px ".concat(N60A, ", 0 0 1px ").concat(N60A)));
|
|
13
|
+
export var confirmationText = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n font-size: ", ";\n word-spacing: 4px;\n line-height: 22px;\n color: ", ";\n margin-top: 30px;\n padding: 20px;\n & > div {\n width: 240px;\n }\n & > div:first-of-type {\n margin-bottom: 12px;\n }\n & > div:nth-of-type(2) {\n margin-bottom: 20px;\n }\n"])), relativeFontSizeToBase16(14), token('color.text.subtle', N400));
|
|
14
|
+
export var confirmationHeader = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n background-color: ", ";\n height: 100px;\n width: 100%;\n display: inline-block;\n"])), token('color.background.discovery.bold', P400));
|
|
14
15
|
export var confirmationImg = css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n width: 100px;\n display: block;\n margin: 25px auto 0 auto;\n"])));
|
|
@@ -17,8 +17,9 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
17
17
|
import React from 'react';
|
|
18
18
|
import { css, jsx, keyframes } from '@emotion/react';
|
|
19
19
|
import { R100 } from '@atlaskit/theme/colors';
|
|
20
|
-
|
|
21
|
-
var
|
|
20
|
+
import { token } from '@atlaskit/tokens';
|
|
21
|
+
var pulseBackground = keyframes(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n 50% {\n background-color: ", ";\n }\n"])), token('color.blanket.danger', R100));
|
|
22
|
+
var pulseBackgroundReverse = keyframes(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n 0% {\n background-color: ", ";\n }\n 50% {\n background-color: auto;\n }\n 100% {\n background-color: ", ";\n }\n"])), token('color.blanket.danger', R100), token('color.blanket.danger', R100));
|
|
22
23
|
var flashWrapper = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n &.-flash > div {\n animation: 0.25s ease-in-out ", ";\n }\n\n & > div {\n animation: 'none';\n }\n"])), pulseBackgroundReverse);
|
|
23
24
|
var flashWrapperAnimated = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n ", "\n\n & > div {\n animation: 0.25s ease-in-out ", ";\n }\n"])), flashWrapper, pulseBackground);
|
|
24
25
|
|
package/dist/esm/ui/styles.js
CHANGED
|
@@ -5,10 +5,11 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
|
|
|
5
5
|
import { css } from '@emotion/react';
|
|
6
6
|
import { gridSize, borderRadius } from '@atlaskit/theme/constants';
|
|
7
7
|
import { N30, N100 } from '@atlaskit/theme/colors';
|
|
8
|
+
import { token } from '@atlaskit/tokens';
|
|
8
9
|
import { akEditorMobileMaxWidth, relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
9
10
|
var akGridSize = gridSize() + 'px';
|
|
10
11
|
export var buttonGroupStyle = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: inline-flex;\n align-items: center;\n\n & > div {\n display: flex;\n }\n"])));
|
|
11
|
-
export var separatorStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background: ", ";\n width: 1px;\n height: 24px;\n display: inline-block;\n margin: 0 8px;\n"])), N30);
|
|
12
|
+
export var separatorStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background: ", ";\n width: 1px;\n height: 24px;\n display: inline-block;\n margin: 0 8px;\n"])), token('color.border', N30));
|
|
12
13
|
export var wrapperStyle = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n\n > div,\n > span {\n display: flex;\n }\n\n > div > div {\n display: flex;\n }\n\n margin-left: 0;\n min-width: auto;\n"])));
|
|
13
14
|
export var wrapperSmallStyle = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n margin-left: 4px;\n min-width: 40px;\n"])));
|
|
14
15
|
export var expandIconWrapperStyle = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n margin-left: -8px;\n"])));
|
|
@@ -16,10 +17,10 @@ export var triggerWrapperStyles = css(_templateObject6 || (_templateObject6 = _t
|
|
|
16
17
|
export var buttonContentStyle = css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n display: flex;\n min-width: 80px;\n align-items: center;\n overflow: hidden;\n justify-content: center;\n flex-direction: column;\n padding: 6px;\n"])));
|
|
17
18
|
export var buttonContentReducedSpacingStyle = css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n padding: 8px;\n"]))); // Taken from the style of inline dialog components
|
|
18
19
|
|
|
19
|
-
export var dropShadow = css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n box-shadow: 0 0 1px rgba(9, 30, 66, 0.31),\n 0 4px 8px -2px rgba(9, 30, 66, 0.25)
|
|
20
|
+
export var dropShadow = css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n box-shadow: ", ";\n"])), token('elevation.shadow.overlay', "0 0 1px rgba(9, 30, 66, 0.31),\n 0 4px 8px -2px rgba(9, 30, 66, 0.25)")); // TODO: https://product-fabric.atlassian.net/browse/DSP-4494
|
|
20
21
|
|
|
21
|
-
export var scrollbarStyles = "\n -ms-overflow-style: -ms-autohiding-scrollbar;\n\n &::-webkit-scrollbar {\n height: ".concat(akGridSize, ";\n width: ").concat(akGridSize, ";\n }\n\n &::-webkit-scrollbar-corner {\n display: none;\n }\n\n &::-webkit-scrollbar-thumb {\n background-color: rgba(0, 0, 0, 0);\n }\n\n &:hover::-webkit-scrollbar-thumb {\n background-color: rgba(0, 0, 0, 0.2);\n border-radius: ").concat(akGridSize, ";\n }\n\n &::-webkit-scrollbar-thumb:hover {\n background-color: rgba(0, 0, 0, 0.4);\n }\n");
|
|
22
|
-
export var shortcutStyle = css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n background-color:
|
|
22
|
+
export var scrollbarStyles = "\n -ms-overflow-style: -ms-autohiding-scrollbar;\n\n &::-webkit-scrollbar {\n height: ".concat(akGridSize, ";\n width: ").concat(akGridSize, ";\n }\n\n &::-webkit-scrollbar-corner {\n display: none;\n }\n\n &::-webkit-scrollbar-thumb {\n background-color: ").concat(token('color.background.neutral.subtle', 'rgba(0, 0, 0, 0)'), ";\n }\n\n &:hover::-webkit-scrollbar-thumb {\n background-color: ").concat(token('color.background.neutral.bold', 'rgba(0, 0, 0, 0.2)'), ";\n border-radius: ").concat(akGridSize, ";\n }\n\n &::-webkit-scrollbar-thumb:hover {\n background-color: ").concat(token('color.background.neutral.bold.hovered', 'rgba(0, 0, 0, 0.4)'), ";\n }\n");
|
|
23
|
+
export var shortcutStyle = css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n background-color: ", "; /* N60 at 50% */\n color: ", ";\n border-radius: ", "px;\n padding: 4px;\n line-height: 12px;\n font-size: ", ";\n align-self: flex-end;\n @media (max-width: ", "px) {\n display: none;\n }\n"])), token('color.background.neutral', 'rgba(223, 225, 229, 0.5)'), token('color.text.subtle', N100), borderRadius(), relativeFontSizeToBase16(11.67), akEditorMobileMaxWidth);
|
|
23
24
|
export var clickSelectWrapperStyle = css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n user-select: all;\n"])));
|
|
24
25
|
export var cellColourPreviewStyles = function cellColourPreviewStyles(selectedColor) {
|
|
25
26
|
return css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n &::before {\n background: ", ";\n }\n"])), selectedColor);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
2
|
import { Node } from 'prosemirror-model';
|
|
3
|
-
import { transformMediaLinkMarks, transformTextLinkCodeMarks } from '@atlaskit/adf-utils';
|
|
3
|
+
import { transformMediaLinkMarks, transformTextLinkCodeMarks, transformDedupeMarks, transformNodesMissingContent, transformIndentationMarks } from '@atlaskit/adf-utils/transforms';
|
|
4
4
|
import { sanitizeNodeForPrivacy } from '../utils/filter/privacy-filter';
|
|
5
5
|
import { validateADFEntity, findAndTrackUnsupportedContentNodes } from '@atlaskit/editor-common/utils';
|
|
6
6
|
import { getBreakoutMode } from './node-width';
|
|
@@ -78,6 +78,9 @@ export function isEmptyDocument(node) {
|
|
|
78
78
|
export function hasDocAsParent($anchor) {
|
|
79
79
|
return $anchor.depth === 1;
|
|
80
80
|
}
|
|
81
|
+
export function isProseMirrorSchemaCheckError(error) {
|
|
82
|
+
return error instanceof RangeError && (!!error.message.match(/^Invalid collection of marks for node/) || !!error.message.match(/^Invalid content for node/));
|
|
83
|
+
}
|
|
81
84
|
export function isInEmptyLine(state) {
|
|
82
85
|
var selection = state.selection;
|
|
83
86
|
var _ref = selection,
|
|
@@ -188,9 +191,10 @@ export function processRawValue(schema, value, providerFactory, sanitizePrivateC
|
|
|
188
191
|
// and preserving code marks during content changes.
|
|
189
192
|
|
|
190
193
|
|
|
191
|
-
var
|
|
192
|
-
|
|
193
|
-
|
|
194
|
+
var _transformTextLinkCod = transformTextLinkCodeMarks(transformedAdf);
|
|
195
|
+
|
|
196
|
+
transformedAdf = _transformTextLinkCod.transformedAdf;
|
|
197
|
+
isTransformed = _transformTextLinkCod.isTransformed;
|
|
194
198
|
|
|
195
199
|
if (isTransformed && dispatchAnalyticsEvent) {
|
|
196
200
|
dispatchAnalyticsEvent({
|
|
@@ -200,6 +204,51 @@ export function processRawValue(schema, value, providerFactory, sanitizePrivateC
|
|
|
200
204
|
});
|
|
201
205
|
}
|
|
202
206
|
|
|
207
|
+
var discardedMarks = [];
|
|
208
|
+
|
|
209
|
+
var _transformDedupeMarks = transformDedupeMarks(transformedAdf);
|
|
210
|
+
|
|
211
|
+
transformedAdf = _transformDedupeMarks.transformedAdf;
|
|
212
|
+
isTransformed = _transformDedupeMarks.isTransformed;
|
|
213
|
+
discardedMarks = _transformDedupeMarks.discardedMarks;
|
|
214
|
+
|
|
215
|
+
if (isTransformed && dispatchAnalyticsEvent) {
|
|
216
|
+
dispatchAnalyticsEvent({
|
|
217
|
+
action: ACTION.DEDUPE_MARKS_TRANSFORMED,
|
|
218
|
+
actionSubject: ACTION_SUBJECT.EDITOR,
|
|
219
|
+
eventType: EVENT_TYPE.OPERATIONAL,
|
|
220
|
+
attributes: {
|
|
221
|
+
discardedMarks: discardedMarks
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
var _transformNodesMissin = transformNodesMissingContent(transformedAdf);
|
|
227
|
+
|
|
228
|
+
transformedAdf = _transformNodesMissin.transformedAdf;
|
|
229
|
+
isTransformed = _transformNodesMissin.isTransformed;
|
|
230
|
+
|
|
231
|
+
if (isTransformed && dispatchAnalyticsEvent) {
|
|
232
|
+
dispatchAnalyticsEvent({
|
|
233
|
+
action: ACTION.NODES_MISSING_CONTENT_TRANSFORMED,
|
|
234
|
+
actionSubject: ACTION_SUBJECT.EDITOR,
|
|
235
|
+
eventType: EVENT_TYPE.OPERATIONAL
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
var _transformIndentation = transformIndentationMarks(transformedAdf);
|
|
240
|
+
|
|
241
|
+
transformedAdf = _transformIndentation.transformedAdf;
|
|
242
|
+
isTransformed = _transformIndentation.isTransformed;
|
|
243
|
+
|
|
244
|
+
if (isTransformed && dispatchAnalyticsEvent) {
|
|
245
|
+
dispatchAnalyticsEvent({
|
|
246
|
+
action: ACTION.INDENTATION_MARKS_TRANSFORMED,
|
|
247
|
+
actionSubject: ACTION_SUBJECT.EDITOR,
|
|
248
|
+
eventType: EVENT_TYPE.OPERATIONAL
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
|
|
203
252
|
var entity = validateADFEntity(schema, transformedAdf || node, dispatchAnalyticsEvent);
|
|
204
253
|
var newEntity = maySanitizePrivateContent(entity, providerFactory, sanitizePrivateContent);
|
|
205
254
|
var parsedDoc = Node.fromJSON(schema, newEntity); // throws an error if the document is invalid
|
|
@@ -218,7 +267,7 @@ export function processRawValue(schema, value, providerFactory, sanitizePrivateC
|
|
|
218
267
|
});
|
|
219
268
|
}
|
|
220
269
|
|
|
221
|
-
|
|
270
|
+
throw err;
|
|
222
271
|
}
|
|
223
272
|
|
|
224
273
|
if (dispatchAnalyticsEvent) {
|
|
@@ -240,6 +289,11 @@ export function processRawValue(schema, value, providerFactory, sanitizePrivateC
|
|
|
240
289
|
|
|
241
290
|
|
|
242
291
|
console.error("Error processing document:\n".concat(e.message, "\n\n"), JSON.stringify(node));
|
|
292
|
+
|
|
293
|
+
if (isProseMirrorSchemaCheckError(e)) {
|
|
294
|
+
throw e;
|
|
295
|
+
}
|
|
296
|
+
|
|
243
297
|
return;
|
|
244
298
|
}
|
|
245
299
|
}
|
|
@@ -4,7 +4,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
4
4
|
|
|
5
5
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
6
|
|
|
7
|
-
import { traverse } from '@atlaskit/adf-utils';
|
|
7
|
+
import { traverse } from '@atlaskit/adf-utils/traverse';
|
|
8
8
|
import { isResolvingMentionProvider } from '@atlaskit/mention/resource';
|
|
9
9
|
|
|
10
10
|
/**
|