@atlaskit/editor-core 177.0.0 → 178.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/CHANGELOG.md +89 -0
- package/codemods/__tests__/next-remove-allow-more-text-colors-prop.ts +147 -0
- package/codemods/migrates/next-remove-allow-more-text-colors-prop.ts +58 -0
- package/dist/cjs/create-editor/ErrorBoundary.js +3 -1
- package/dist/cjs/create-editor/ReactEditorView.js +3 -2
- package/dist/cjs/create-editor/create-editor.js +3 -1
- package/dist/cjs/editor.js +7 -0
- package/dist/cjs/labs/next/full-page.js +2 -4
- package/dist/cjs/plugins/alignment/ui/ToolbarAlignment/styles.js +1 -3
- package/dist/cjs/plugins/block-type/commands/delete-and-move-cursor.js +67 -0
- package/dist/cjs/plugins/block-type/commands/index.js +9 -1
- package/dist/cjs/plugins/block-type/pm-plugins/keymap.js +8 -3
- package/dist/cjs/plugins/block-type/ui/ToolbarBlockType/styled.js +2 -4
- package/dist/cjs/plugins/breakout/ui/LayoutButton.js +1 -3
- package/dist/cjs/plugins/card/styles.js +1 -3
- package/dist/cjs/plugins/code-block/styles.js +2 -4
- package/dist/cjs/plugins/collab-edit/styles.js +2 -4
- package/dist/cjs/plugins/collab-edit/ui/styles.js +2 -4
- package/dist/cjs/plugins/date/styles.js +1 -3
- package/dist/cjs/plugins/date/ui/DatePicker/index.js +1 -3
- package/dist/cjs/plugins/expand/ui/styles.js +14 -16
- package/dist/cjs/plugins/extension/ui/Extension/Extension/styles.js +4 -6
- package/dist/cjs/plugins/extension/ui/Extension/InlineExtension/styles.js +1 -3
- package/dist/cjs/plugins/extension/ui/Extension/styles.js +5 -7
- package/dist/cjs/plugins/extension/ui/SaveIndicator/SaveIndicator.js +2 -4
- package/dist/cjs/plugins/extension/ui/styles.js +1 -3
- package/dist/cjs/plugins/fake-text-cursor/styles.js +1 -3
- package/dist/cjs/plugins/feature-flags-context/feature-flags-from-props.js +12 -12
- package/dist/cjs/plugins/find-replace/ui/styles.js +2 -4
- package/dist/cjs/plugins/floating-toolbar/ui/DropdownMenu.js +40 -14
- package/dist/cjs/plugins/floating-toolbar/ui/EditorEmojiAddIcon.js +1 -3
- package/dist/cjs/plugins/floating-toolbar/ui/ScrollButtons.js +1 -3
- package/dist/cjs/plugins/floating-toolbar/ui/Separator.js +1 -3
- package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +11 -20
- package/dist/cjs/plugins/floating-toolbar/ui/styles.js +10 -12
- package/dist/cjs/plugins/grid/styles.js +1 -3
- package/dist/cjs/plugins/help-dialog/ui/styles.js +9 -11
- package/dist/cjs/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +5 -5
- package/dist/cjs/plugins/jira-issue/nodeviews/jira-issue.js +2 -4
- package/dist/cjs/plugins/layout/styles.js +1 -3
- package/dist/cjs/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +3 -5
- package/dist/cjs/plugins/media/styles.js +1 -3
- package/dist/cjs/plugins/media/ui/CaptionPlaceholder/index.js +1 -3
- package/dist/cjs/plugins/media/ui/Media/DropPlaceholder.js +2 -4
- package/dist/cjs/plugins/media/ui/MediaLinkingToolbar.js +1 -3
- package/dist/cjs/plugins/mentions/styles.js +1 -3
- package/dist/cjs/plugins/mentions/ui/InviteItem/index.js +1 -3
- package/dist/cjs/plugins/mentions/ui/InviteItem/styles.js +2 -4
- package/dist/cjs/plugins/panel/styles.js +1 -3
- package/dist/cjs/plugins/placeholder/styles.js +1 -3
- package/dist/cjs/plugins/placeholder-text/styles.js +1 -3
- package/dist/cjs/plugins/rule/styles.js +1 -3
- package/dist/cjs/plugins/status/ui/statusPicker.js +1 -3
- package/dist/cjs/plugins/tasks-and-decisions/styles.js +1 -3
- package/dist/cjs/plugins/text-color/commands/change-color.js +1 -2
- package/dist/cjs/plugins/text-color/pm-plugins/main.js +1 -1
- package/dist/cjs/plugins/text-color/ui/ToolbarTextColor/index.js +2 -10
- package/dist/cjs/plugins/type-ahead/pm-plugins/decorations.js +1 -3
- package/dist/cjs/plugins/type-ahead/ui/InputQuery.js +1 -3
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadListItem.js +7 -9
- package/dist/cjs/plugins/type-ahead/ui/TypeAheadPopup.js +1 -3
- package/dist/cjs/plugins/unsupported-content/styles.js +1 -3
- package/dist/cjs/ui/Addon/Dropdown/styles.js +1 -3
- package/dist/cjs/ui/Addon/DropdownItem/styles.js +1 -3
- package/dist/cjs/ui/Appearance/Comment/Comment.js +1 -3
- package/dist/cjs/ui/Appearance/Comment/Toolbar.js +2 -4
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +19 -1
- package/dist/cjs/ui/Appearance/FullPage/MainToolbar.js +2 -4
- package/dist/cjs/ui/ChromeCollapsed/styles.js +1 -3
- package/dist/cjs/ui/ColorPalette/Palettes/textColorPalette.js +0 -6
- package/dist/cjs/ui/ColorPickerButton/index.js +3 -8
- package/dist/cjs/ui/ConfigPanel/Fields/CheckboxGroup.js +1 -3
- package/dist/cjs/ui/ConfigPanel/Fields/Expand.js +1 -3
- package/dist/cjs/ui/ConfigPanel/Fields/Fieldset.js +1 -3
- package/dist/cjs/ui/ConfigPanel/Fields/common/RequiredIndicator.js +1 -3
- package/dist/cjs/ui/ConfigPanel/Header.js +2 -4
- package/dist/cjs/ui/ConfigPanel/NestedForms/RemovableField.js +1 -3
- package/dist/cjs/ui/ContentStyles/index.js +1 -3
- package/dist/cjs/ui/ContextPanel/index.js +1 -3
- package/dist/cjs/ui/ElementBrowser/InsertMenu.js +3 -5
- package/dist/cjs/ui/ElementBrowser/ModalElementBrowser.js +2 -4
- package/dist/cjs/ui/ElementBrowser/components/CategoryList.js +2 -4
- package/dist/cjs/ui/ElementBrowser/components/ElementList/ElementList.js +2 -4
- package/dist/cjs/ui/ElementBrowser/components/ElementList/EmptyState.js +1 -3
- package/dist/cjs/ui/ElementBrowser/components/ElementSearch.js +1 -3
- package/dist/cjs/ui/FloatingToolbar/styles.js +1 -3
- package/dist/cjs/ui/LinkSearch/LinkSearchListItem.js +3 -5
- package/dist/cjs/ui/PanelTextInput/styles.js +1 -3
- package/dist/cjs/ui/ToolbarArrowKeyNavigationProvider/index.js +27 -2
- package/dist/cjs/ui/ToolbarFeedback/styles.js +3 -5
- package/dist/cjs/ui/WithFlash/index.js +2 -4
- package/dist/cjs/ui/styles.js +2 -4
- package/dist/cjs/utils/performance/instrumented-plugin.js +6 -3
- package/dist/cjs/utils/performance/safer-transactions.js +8 -2
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/create-editor/ErrorBoundary.js +3 -1
- package/dist/es2019/create-editor/ReactEditorView.js +3 -2
- package/dist/es2019/create-editor/create-editor.js +3 -1
- package/dist/es2019/editor.js +7 -0
- package/dist/es2019/labs/next/full-page.js +2 -3
- package/dist/es2019/plugins/alignment/ui/ToolbarAlignment/styles.js +1 -2
- package/dist/es2019/plugins/block-type/commands/delete-and-move-cursor.js +63 -0
- package/dist/es2019/plugins/block-type/commands/index.js +2 -1
- package/dist/es2019/plugins/block-type/pm-plugins/keymap.js +7 -4
- package/dist/es2019/plugins/block-type/ui/ToolbarBlockType/styled.js +2 -3
- package/dist/es2019/plugins/breakout/ui/LayoutButton.js +4 -5
- package/dist/es2019/plugins/card/styles.js +6 -7
- package/dist/es2019/plugins/code-block/styles.js +8 -9
- package/dist/es2019/plugins/collab-edit/styles.js +2 -3
- package/dist/es2019/plugins/collab-edit/ui/styles.js +3 -4
- package/dist/es2019/plugins/date/styles.js +1 -2
- package/dist/es2019/plugins/date/ui/DatePicker/index.js +2 -3
- package/dist/es2019/plugins/expand/ui/styles.js +14 -15
- package/dist/es2019/plugins/extension/ui/Extension/Extension/styles.js +4 -5
- package/dist/es2019/plugins/extension/ui/Extension/InlineExtension/styles.js +1 -2
- package/dist/es2019/plugins/extension/ui/Extension/styles.js +6 -7
- package/dist/es2019/plugins/extension/ui/SaveIndicator/SaveIndicator.js +3 -4
- package/dist/es2019/plugins/extension/ui/styles.js +2 -3
- package/dist/es2019/plugins/fake-text-cursor/styles.js +2 -3
- package/dist/es2019/plugins/feature-flags-context/feature-flags-from-props.js +12 -12
- package/dist/es2019/plugins/find-replace/ui/styles.js +2 -3
- package/dist/es2019/plugins/floating-toolbar/ui/DropdownMenu.js +43 -13
- package/dist/es2019/plugins/floating-toolbar/ui/EditorEmojiAddIcon.js +1 -2
- package/dist/es2019/plugins/floating-toolbar/ui/ScrollButtons.js +1 -2
- package/dist/es2019/plugins/floating-toolbar/ui/Separator.js +1 -2
- package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +12 -21
- package/dist/es2019/plugins/floating-toolbar/ui/styles.js +10 -11
- package/dist/es2019/plugins/grid/styles.js +2 -3
- package/dist/es2019/plugins/help-dialog/ui/styles.js +11 -12
- package/dist/es2019/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +6 -5
- package/dist/es2019/plugins/jira-issue/nodeviews/jira-issue.js +5 -6
- package/dist/es2019/plugins/layout/styles.js +4 -5
- package/dist/es2019/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +4 -5
- package/dist/es2019/plugins/media/styles.js +10 -11
- package/dist/es2019/plugins/media/ui/CaptionPlaceholder/index.js +1 -2
- package/dist/es2019/plugins/media/ui/Media/DropPlaceholder.js +3 -4
- package/dist/es2019/plugins/media/ui/MediaLinkingToolbar.js +1 -2
- package/dist/es2019/plugins/mentions/styles.js +4 -5
- package/dist/es2019/plugins/mentions/ui/InviteItem/index.js +1 -2
- package/dist/es2019/plugins/mentions/ui/InviteItem/styles.js +2 -3
- package/dist/es2019/plugins/panel/styles.js +4 -5
- package/dist/es2019/plugins/placeholder/styles.js +1 -2
- package/dist/es2019/plugins/placeholder-text/styles.js +4 -5
- package/dist/es2019/plugins/rule/styles.js +1 -2
- package/dist/es2019/plugins/status/ui/statusPicker.js +2 -3
- package/dist/es2019/plugins/tasks-and-decisions/styles.js +2 -3
- package/dist/es2019/plugins/text-color/commands/change-color.js +1 -2
- package/dist/es2019/plugins/text-color/pm-plugins/main.js +2 -2
- package/dist/es2019/plugins/text-color/ui/ToolbarTextColor/index.js +2 -6
- package/dist/es2019/plugins/type-ahead/pm-plugins/decorations.js +1 -2
- package/dist/es2019/plugins/type-ahead/ui/InputQuery.js +1 -2
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadListItem.js +8 -9
- package/dist/es2019/plugins/type-ahead/ui/TypeAheadPopup.js +2 -3
- package/dist/es2019/plugins/unsupported-content/styles.js +2 -3
- package/dist/es2019/ui/Addon/Dropdown/styles.js +2 -3
- package/dist/es2019/ui/Addon/DropdownItem/styles.js +2 -3
- package/dist/es2019/ui/Appearance/Comment/Comment.js +2 -3
- package/dist/es2019/ui/Appearance/Comment/Toolbar.js +2 -3
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +19 -1
- package/dist/es2019/ui/Appearance/FullPage/MainToolbar.js +2 -3
- package/dist/es2019/ui/ChromeCollapsed/styles.js +5 -6
- package/dist/es2019/ui/ColorPalette/Palettes/textColorPalette.js +1 -1
- package/dist/es2019/ui/ColorPickerButton/index.js +20 -9
- package/dist/es2019/ui/ConfigPanel/Fields/CheckboxGroup.js +1 -2
- package/dist/es2019/ui/ConfigPanel/Fields/Expand.js +1 -2
- package/dist/es2019/ui/ConfigPanel/Fields/Fieldset.js +1 -2
- package/dist/es2019/ui/ConfigPanel/Fields/common/RequiredIndicator.js +1 -2
- package/dist/es2019/ui/ConfigPanel/Header.js +2 -3
- package/dist/es2019/ui/ConfigPanel/NestedForms/RemovableField.js +2 -3
- package/dist/es2019/ui/ContentStyles/index.js +1 -2
- package/dist/es2019/ui/ContextPanel/index.js +1 -2
- package/dist/es2019/ui/ElementBrowser/InsertMenu.js +4 -5
- package/dist/es2019/ui/ElementBrowser/ModalElementBrowser.js +2 -3
- package/dist/es2019/ui/ElementBrowser/components/CategoryList.js +2 -3
- package/dist/es2019/ui/ElementBrowser/components/ElementList/ElementList.js +2 -3
- package/dist/es2019/ui/ElementBrowser/components/ElementList/EmptyState.js +1 -2
- package/dist/es2019/ui/ElementBrowser/components/ElementSearch.js +1 -2
- package/dist/es2019/ui/FloatingToolbar/styles.js +2 -3
- package/dist/es2019/ui/LinkSearch/LinkSearchListItem.js +3 -4
- package/dist/es2019/ui/PanelTextInput/styles.js +3 -4
- package/dist/es2019/ui/ToolbarArrowKeyNavigationProvider/index.js +27 -2
- package/dist/es2019/ui/ToolbarFeedback/styles.js +4 -5
- package/dist/es2019/ui/WithFlash/index.js +3 -4
- package/dist/es2019/ui/styles.js +3 -4
- package/dist/es2019/utils/performance/instrumented-plugin.js +5 -3
- package/dist/es2019/utils/performance/safer-transactions.js +8 -2
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/create-editor/ErrorBoundary.js +3 -1
- package/dist/esm/create-editor/ReactEditorView.js +3 -2
- package/dist/esm/create-editor/create-editor.js +3 -1
- package/dist/esm/editor.js +7 -0
- package/dist/esm/labs/next/full-page.js +2 -3
- package/dist/esm/plugins/alignment/ui/ToolbarAlignment/styles.js +1 -2
- package/dist/esm/plugins/block-type/commands/delete-and-move-cursor.js +58 -0
- package/dist/esm/plugins/block-type/commands/index.js +2 -1
- package/dist/esm/plugins/block-type/pm-plugins/keymap.js +7 -4
- package/dist/esm/plugins/block-type/ui/ToolbarBlockType/styled.js +2 -3
- package/dist/esm/plugins/breakout/ui/LayoutButton.js +1 -2
- package/dist/esm/plugins/card/styles.js +1 -2
- package/dist/esm/plugins/code-block/styles.js +2 -3
- package/dist/esm/plugins/collab-edit/styles.js +2 -3
- package/dist/esm/plugins/collab-edit/ui/styles.js +2 -3
- package/dist/esm/plugins/date/styles.js +1 -2
- package/dist/esm/plugins/date/ui/DatePicker/index.js +1 -2
- package/dist/esm/plugins/expand/ui/styles.js +14 -15
- package/dist/esm/plugins/extension/ui/Extension/Extension/styles.js +4 -5
- package/dist/esm/plugins/extension/ui/Extension/InlineExtension/styles.js +1 -2
- package/dist/esm/plugins/extension/ui/Extension/styles.js +5 -6
- package/dist/esm/plugins/extension/ui/SaveIndicator/SaveIndicator.js +2 -3
- package/dist/esm/plugins/extension/ui/styles.js +1 -2
- package/dist/esm/plugins/fake-text-cursor/styles.js +1 -2
- package/dist/esm/plugins/feature-flags-context/feature-flags-from-props.js +12 -12
- package/dist/esm/plugins/find-replace/ui/styles.js +2 -3
- package/dist/esm/plugins/floating-toolbar/ui/DropdownMenu.js +41 -14
- package/dist/esm/plugins/floating-toolbar/ui/EditorEmojiAddIcon.js +1 -2
- package/dist/esm/plugins/floating-toolbar/ui/ScrollButtons.js +1 -2
- package/dist/esm/plugins/floating-toolbar/ui/Separator.js +1 -2
- package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +12 -21
- package/dist/esm/plugins/floating-toolbar/ui/styles.js +10 -11
- package/dist/esm/plugins/grid/styles.js +1 -2
- package/dist/esm/plugins/help-dialog/ui/styles.js +9 -10
- package/dist/esm/plugins/hyperlink/ui/HyperlinkAddToolbar/HyperlinkAddToolbar.js +5 -4
- package/dist/esm/plugins/jira-issue/nodeviews/jira-issue.js +2 -3
- package/dist/esm/plugins/layout/styles.js +1 -2
- package/dist/esm/plugins/media/pm-plugins/alt-text/ui/AltTextEdit.js +3 -4
- package/dist/esm/plugins/media/styles.js +1 -2
- package/dist/esm/plugins/media/ui/CaptionPlaceholder/index.js +1 -2
- package/dist/esm/plugins/media/ui/Media/DropPlaceholder.js +2 -3
- package/dist/esm/plugins/media/ui/MediaLinkingToolbar.js +1 -2
- package/dist/esm/plugins/mentions/styles.js +1 -2
- package/dist/esm/plugins/mentions/ui/InviteItem/index.js +1 -2
- package/dist/esm/plugins/mentions/ui/InviteItem/styles.js +2 -3
- package/dist/esm/plugins/panel/styles.js +1 -2
- package/dist/esm/plugins/placeholder/styles.js +1 -2
- package/dist/esm/plugins/placeholder-text/styles.js +1 -2
- package/dist/esm/plugins/rule/styles.js +1 -2
- package/dist/esm/plugins/status/ui/statusPicker.js +1 -2
- package/dist/esm/plugins/tasks-and-decisions/styles.js +1 -2
- package/dist/esm/plugins/text-color/commands/change-color.js +1 -2
- package/dist/esm/plugins/text-color/pm-plugins/main.js +2 -2
- package/dist/esm/plugins/text-color/ui/ToolbarTextColor/index.js +2 -9
- package/dist/esm/plugins/type-ahead/pm-plugins/decorations.js +1 -2
- package/dist/esm/plugins/type-ahead/ui/InputQuery.js +1 -2
- package/dist/esm/plugins/type-ahead/ui/TypeAheadListItem.js +7 -8
- package/dist/esm/plugins/type-ahead/ui/TypeAheadPopup.js +1 -2
- package/dist/esm/plugins/unsupported-content/styles.js +1 -2
- package/dist/esm/ui/Addon/Dropdown/styles.js +1 -2
- package/dist/esm/ui/Addon/DropdownItem/styles.js +1 -2
- package/dist/esm/ui/Appearance/Comment/Comment.js +1 -2
- package/dist/esm/ui/Appearance/Comment/Toolbar.js +2 -3
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +19 -1
- package/dist/esm/ui/Appearance/FullPage/MainToolbar.js +2 -3
- package/dist/esm/ui/ChromeCollapsed/styles.js +1 -2
- package/dist/esm/ui/ColorPalette/Palettes/textColorPalette.js +1 -1
- package/dist/esm/ui/ColorPickerButton/index.js +5 -10
- package/dist/esm/ui/ConfigPanel/Fields/CheckboxGroup.js +1 -2
- package/dist/esm/ui/ConfigPanel/Fields/Expand.js +1 -2
- package/dist/esm/ui/ConfigPanel/Fields/Fieldset.js +1 -2
- package/dist/esm/ui/ConfigPanel/Fields/common/RequiredIndicator.js +1 -2
- package/dist/esm/ui/ConfigPanel/Header.js +2 -3
- package/dist/esm/ui/ConfigPanel/NestedForms/RemovableField.js +1 -2
- package/dist/esm/ui/ContentStyles/index.js +1 -2
- package/dist/esm/ui/ContextPanel/index.js +1 -2
- package/dist/esm/ui/ElementBrowser/InsertMenu.js +3 -4
- package/dist/esm/ui/ElementBrowser/ModalElementBrowser.js +2 -3
- package/dist/esm/ui/ElementBrowser/components/CategoryList.js +2 -3
- package/dist/esm/ui/ElementBrowser/components/ElementList/ElementList.js +2 -3
- package/dist/esm/ui/ElementBrowser/components/ElementList/EmptyState.js +1 -2
- package/dist/esm/ui/ElementBrowser/components/ElementSearch.js +1 -2
- package/dist/esm/ui/FloatingToolbar/styles.js +1 -2
- package/dist/esm/ui/LinkSearch/LinkSearchListItem.js +3 -4
- package/dist/esm/ui/PanelTextInput/styles.js +2 -3
- package/dist/esm/ui/ToolbarArrowKeyNavigationProvider/index.js +27 -2
- package/dist/esm/ui/ToolbarFeedback/styles.js +3 -4
- package/dist/esm/ui/WithFlash/index.js +2 -3
- package/dist/esm/ui/styles.js +2 -3
- package/dist/esm/utils/performance/instrumented-plugin.js +6 -3
- package/dist/esm/utils/performance/safer-transactions.js +8 -2
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/plugins/block-type/commands/delete-and-move-cursor.d.ts +12 -0
- package/dist/types/plugins/block-type/commands/index.d.ts +1 -0
- package/dist/types/plugins/floating-toolbar/ui/DropdownMenu.d.ts +1 -0
- package/dist/types/plugins/text-color/pm-plugins/main.d.ts +1 -1
- package/dist/types/ui/ColorPalette/Palettes/textColorPalette.d.ts +1 -1
- package/dist/types/ui/ToolbarArrowKeyNavigationProvider/index.d.ts +2 -1
- package/dist/types/utils/performance/instrumented-plugin.d.ts +1 -0
- package/dist/types/utils/performance/safer-transactions.d.ts +2 -1
- package/package.json +10 -11
- package/report.api.md +18 -2
|
@@ -43,8 +43,6 @@ var _ElementBrowserLoader = _interopRequireDefault(require("./components/Element
|
|
|
43
43
|
|
|
44
44
|
var _constants = require("./constants");
|
|
45
45
|
|
|
46
|
-
var _tokens = require("@atlaskit/tokens");
|
|
47
|
-
|
|
48
46
|
var _excluded = ["children"];
|
|
49
47
|
|
|
50
48
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
@@ -184,9 +182,9 @@ var insertMenuWrapper = function insertMenuWrapper(theme, itemCount) {
|
|
|
184
182
|
return (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\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({
|
|
185
183
|
itemCount: itemCount
|
|
186
184
|
}), (0, _components.themed)({
|
|
187
|
-
light: (
|
|
188
|
-
dark: (
|
|
189
|
-
})(theme), (0, _theme.borderRadius)(), (
|
|
185
|
+
light: "var(--ds-surface-overlay, ".concat(_colors.N0, ")"),
|
|
186
|
+
dark: "var(--ds-surface-overlay, ".concat(_colors.DN50, ")")
|
|
187
|
+
})(theme), (0, _theme.borderRadius)(), "var(--ds-shadow-overlay, ".concat("0 0 0 1px ".concat(_colors.N30A, ",\n 0 2px 1px ").concat(_colors.N30A, ",\n 0 0 20px -6px ").concat(_colors.N60A), ")"));
|
|
190
188
|
};
|
|
191
189
|
|
|
192
190
|
var itemBefore = (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\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"])), (0, _theme.gridSize)() / 2);
|
|
@@ -39,8 +39,6 @@ var _constants2 = require("./constants");
|
|
|
39
39
|
|
|
40
40
|
var _messages = require("./messages");
|
|
41
41
|
|
|
42
|
-
var _tokens = require("@atlaskit/tokens");
|
|
43
|
-
|
|
44
42
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
45
43
|
|
|
46
44
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -50,8 +48,8 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
50
48
|
var actions = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: inline-flex;\n margin: 0 -4px;\n"])));
|
|
51
49
|
var actionItem = (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n flex: 1 0 auto;\n margin: 0 4px;\n"])));
|
|
52
50
|
var wrapper = (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\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"])), _constants2.MODAL_WRAPPER_PADDING, _constants2.MODAL_WRAPPER_PADDING, (0, _components.themed)({
|
|
53
|
-
light: (
|
|
54
|
-
dark: (
|
|
51
|
+
light: "var(--ds-surface-overlay, ".concat(_colors.N0, ")"),
|
|
52
|
+
dark: "var(--ds-surface-overlay, ".concat(_colors.DN50, ")")
|
|
55
53
|
})(), (0, _constants.borderRadius)());
|
|
56
54
|
var modalFooter = (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n padding: ", "px;\n\n position: relative;\n align-items: center;\n justify-content: space-between;\n"])), _constants2.MODAL_WRAPPER_PADDING);
|
|
57
55
|
|
|
@@ -35,8 +35,6 @@ var _useFocus = _interopRequireDefault(require("../hooks/use-focus"));
|
|
|
35
35
|
|
|
36
36
|
var _analytics = require("../../../plugins/analytics");
|
|
37
37
|
|
|
38
|
-
var _tokens = require("@atlaskit/tokens");
|
|
39
|
-
|
|
40
38
|
var _templateObject;
|
|
41
39
|
|
|
42
40
|
var _excluded = ["categories"],
|
|
@@ -117,9 +115,9 @@ function CategoryListItem(_ref2) {
|
|
|
117
115
|
marginLeft: '2px',
|
|
118
116
|
height: '100%',
|
|
119
117
|
width: '100%',
|
|
120
|
-
color: category.name !== selectedCategory ? (
|
|
118
|
+
color: category.name !== selectedCategory ? "var(--ds-text, ".concat(_colors.N800, ")") : "var(--ds-text-selected, ".concat(_colors.B400, ")")
|
|
121
119
|
}, category.name === selectedCategory && {
|
|
122
|
-
background: (
|
|
120
|
+
background: "var(--ds-background-selected, ".concat(_colors.B50, ")")
|
|
123
121
|
})
|
|
124
122
|
}, rest);
|
|
125
123
|
}, [category.name, selectedCategory]);
|
|
@@ -34,8 +34,6 @@ var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
|
34
34
|
|
|
35
35
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
36
36
|
|
|
37
|
-
var _tokens = require("@atlaskit/tokens");
|
|
38
|
-
|
|
39
37
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
40
38
|
|
|
41
39
|
var _analytics = require("../../../../plugins/analytics");
|
|
@@ -277,7 +275,7 @@ var ItemContent = /*#__PURE__*/(0, _react.memo)(function (_ref6) {
|
|
|
277
275
|
css: itemDescription
|
|
278
276
|
}, description)));
|
|
279
277
|
});
|
|
280
|
-
var elementItemsWrapper = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\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 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"])), _constants.ELEMENT_LIST_PADDING, _constants.ELEMENT_LIST_PADDING, (
|
|
278
|
+
var elementItemsWrapper = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\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 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"])), _constants.ELEMENT_LIST_PADDING, _constants.ELEMENT_LIST_PADDING, "var(--ds-border-focused, ".concat(_colors.B100, ")"));
|
|
281
279
|
var elementItemWrapper = (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n div {\n button {\n height: 75px;\n align-items: flex-start;\n padding: 12px 12px 11px;\n }\n }\n"])));
|
|
282
280
|
var itemBody = (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\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"])));
|
|
283
281
|
/*
|
|
@@ -286,7 +284,7 @@ var itemBody = (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _tag
|
|
|
286
284
|
*/
|
|
287
285
|
|
|
288
286
|
var multilineStyle = (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n"])));
|
|
289
|
-
var itemDescription = (0, _react2.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n ", ";\n\n overflow: hidden;\n font-size: ", ";\n color: ", ";\n margin-top: 2px;\n"])), multilineStyle, (0, _editorSharedStyles.relativeFontSizeToBase16)(11.67), (
|
|
287
|
+
var itemDescription = (0, _react2.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n ", ";\n\n overflow: hidden;\n font-size: ", ";\n color: ", ";\n margin-top: 2px;\n"])), multilineStyle, (0, _editorSharedStyles.relativeFontSizeToBase16)(11.67), "var(--ds-text-subtle, ".concat(_colors.N200, ")"));
|
|
290
288
|
var itemText = (0, _react2.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n width: inherit;\n white-space: initial;\n"])));
|
|
291
289
|
var itemTitleWrapper = (0, _react2.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: space-between; // Title and keyboardshortcut are rendered in the same block\n"])));
|
|
292
290
|
var itemTitle = (0, _react2.css)(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n overflow: hidden;\n\n white-space: nowrap;\n text-overflow: ellipsis;\n"])));
|
|
@@ -17,8 +17,6 @@ var _button = _interopRequireDefault(require("@atlaskit/button"));
|
|
|
17
17
|
|
|
18
18
|
var _NotFoundIllustration = _interopRequireDefault(require("./NotFoundIllustration"));
|
|
19
19
|
|
|
20
|
-
var _tokens = require("@atlaskit/tokens");
|
|
21
|
-
|
|
22
20
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
23
21
|
|
|
24
22
|
function EmptyState(_ref) {
|
|
@@ -51,7 +49,7 @@ function EmptyState(_ref) {
|
|
|
51
49
|
})))));
|
|
52
50
|
}
|
|
53
51
|
|
|
54
|
-
var emptyStateHeading = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\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"])), (
|
|
52
|
+
var emptyStateHeading = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\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"])), "var(--ds-text, rgb(23, 43, 77))");
|
|
55
53
|
var emptyStateSubHeading = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n margin-top: 16px;\n max-width: 400px;\n text-align: center;\n"])));
|
|
56
54
|
var emptyStateWrapper = (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n"])));
|
|
57
55
|
var externalLinkWrapper = (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n margin-top: 14px;\n"])));
|
|
@@ -35,8 +35,6 @@ var _types = require("../types");
|
|
|
35
35
|
|
|
36
36
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
37
37
|
|
|
38
|
-
var _tokens = require("@atlaskit/tokens");
|
|
39
|
-
|
|
40
38
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
41
39
|
|
|
42
40
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -102,7 +100,7 @@ var placeHolderMessage = {
|
|
|
102
100
|
var styledShortcut = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n ", "\n padding: ", "px ", "px;\n width: ", "px;\n"])), _styles.shortcutStyle, _constants.GRID_SIZE / 2, _constants.GRID_SIZE, _constants.GRID_SIZE * 6);
|
|
103
101
|
var wrapper = (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\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"])), _constants.GRID_SIZE * 6, _constants.GRID_SIZE, (0, _editorSharedStyles.relativeFontSizeToBase16)(14), _constants.GRID_SIZE, _constants.GRID_SIZE);
|
|
104
102
|
var wrapperInline = (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n & > [data-ds--text-field--container] {\n height: ", "px;\n flex: none;\n overflow: revert;\n }\n"])), _constants.GRID_SIZE * 5);
|
|
105
|
-
var elementBeforeInput = (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\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"])), (
|
|
103
|
+
var elementBeforeInput = (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\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"])), "var(--ds-icon, ".concat(_colors.N200, ")"));
|
|
106
104
|
var elementAfterInput = (0, _react2.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n margin: 0 8px;\n height: ", ";\n text-align: center;\n"])), _constants.SEARCH_ITEM_HEIGHT_WIDTH);
|
|
107
105
|
var MemoizedElementSearchWithAnalytics = /*#__PURE__*/(0, _react.memo)((0, _analyticsNext.withAnalyticsContext)({
|
|
108
106
|
component: 'Searchbar'
|
|
@@ -15,12 +15,10 @@ var _constants = require("@atlaskit/theme/constants");
|
|
|
15
15
|
|
|
16
16
|
var _colors = require("@atlaskit/theme/colors");
|
|
17
17
|
|
|
18
|
-
var _tokens = require("@atlaskit/tokens");
|
|
19
|
-
|
|
20
18
|
var _templateObject, _templateObject2;
|
|
21
19
|
|
|
22
20
|
var container = function container(height) {
|
|
23
|
-
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\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"])), (0, _constants.borderRadius)(), (
|
|
21
|
+
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\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"])), (0, _constants.borderRadius)(), "var(--ds-shadow-overlay, ".concat("0 12px 24px -6px ".concat(_colors.N50A, ", 0 0 1px ").concat(_colors.N60A), ")"), "var(--ds-background-input, ".concat(_colors.N0, ")"), height ? (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n height: ", "px;\n "])), height) : '');
|
|
24
22
|
};
|
|
25
23
|
|
|
26
24
|
exports.container = container;
|
|
@@ -31,8 +31,6 @@ var _react2 = require("@emotion/react");
|
|
|
31
31
|
|
|
32
32
|
var _theme = require("@atlaskit/theme");
|
|
33
33
|
|
|
34
|
-
var _tokens = require("@atlaskit/tokens");
|
|
35
|
-
|
|
36
34
|
var _colors = require("@atlaskit/theme/colors");
|
|
37
35
|
|
|
38
36
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
@@ -55,12 +53,12 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
|
|
|
55
53
|
|
|
56
54
|
var container = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background-color: transparent;\n padding: 8px 12px;\n cursor: pointer;\n display: flex;\n margin-top: 0;\n"])));
|
|
57
55
|
exports.container = container;
|
|
58
|
-
var containerSelected = (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n"])), (
|
|
56
|
+
var containerSelected = (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n"])), "var(--ds-background-neutral-subtle-hovered, ".concat(_colors.N20, ")"));
|
|
59
57
|
exports.containerSelected = containerSelected;
|
|
60
58
|
var nameWrapper = (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n overflow: hidden;\n"])));
|
|
61
|
-
var nameStyle = (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n line-height: 20px;\n"])), (
|
|
59
|
+
var nameStyle = (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n line-height: 20px;\n"])), "var(--ds-text, ".concat(_colors.N800, ")"));
|
|
62
60
|
exports.nameStyle = nameStyle;
|
|
63
|
-
var containerName = (0, _react2.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n line-height: 14px;\n font-size: ", ";\n"])), (
|
|
61
|
+
var containerName = (0, _react2.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n line-height: 14px;\n font-size: ", ";\n"])), "var(--ds-text-subtlest, ".concat(_colors.N300, ")"), (0, _editorSharedStyles.relativeFontSizeToBase16)((0, _theme.fontSizeSmall)()));
|
|
64
62
|
exports.containerName = containerName;
|
|
65
63
|
var iconStyle = (0, _react2.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n min-width: 16px;\n margin-top: 3px;\n margin-right: 12px;\n\n img {\n max-width: 16px;\n }\n"])));
|
|
66
64
|
|
|
@@ -15,12 +15,10 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
15
15
|
|
|
16
16
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
17
17
|
|
|
18
|
-
var _tokens = require("@atlaskit/tokens");
|
|
19
|
-
|
|
20
18
|
var _templateObject, _templateObject2;
|
|
21
19
|
|
|
22
20
|
// Normal .className gets overridden by input[type=text] hence this hack to produce input.className
|
|
23
|
-
var panelTextInput = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\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"])), (
|
|
21
|
+
var panelTextInput = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\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"])), "var(--ds-text-subtle, ".concat(_colors.N400, ")"), (0, _editorSharedStyles.relativeFontSizeToBase16)(13), "var(--ds-text-subtlest, ".concat(_colors.N100, ")"));
|
|
24
22
|
exports.panelTextInput = panelTextInput;
|
|
25
23
|
|
|
26
24
|
var panelTextInputWithCustomWidth = function panelTextInputWithCustomWidth(width) {
|
|
@@ -40,7 +40,8 @@ var ToolbarArrowKeyNavigationProvider = function ToolbarArrowKeyNavigationProvid
|
|
|
40
40
|
editorView = _ref.editorView,
|
|
41
41
|
childComponentSelector = _ref.childComponentSelector,
|
|
42
42
|
handleEscape = _ref.handleEscape,
|
|
43
|
-
disableArrowKeyNavigation = _ref.disableArrowKeyNavigation
|
|
43
|
+
disableArrowKeyNavigation = _ref.disableArrowKeyNavigation,
|
|
44
|
+
isShortcutToFocusToolbar = _ref.isShortcutToFocusToolbar;
|
|
44
45
|
var wrapperRef = (0, _react.useRef)(null);
|
|
45
46
|
var selectedItemIndex = (0, _react.useRef)(0);
|
|
46
47
|
var incrementIndex = (0, _react.useCallback)(function (list) {
|
|
@@ -156,11 +157,35 @@ var ToolbarArrowKeyNavigationProvider = function ToolbarArrowKeyNavigationProvid
|
|
|
156
157
|
}
|
|
157
158
|
};
|
|
158
159
|
|
|
160
|
+
var globalKeyDownHandler = function globalKeyDownHandler(event) {
|
|
161
|
+
//To focus the first element in the toolbar
|
|
162
|
+
if (isShortcutToFocusToolbar(event)) {
|
|
163
|
+
var _filteredFocusableEle4, _filteredFocusableEle5;
|
|
164
|
+
|
|
165
|
+
var filteredFocusableElements = getFilteredFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
|
|
166
|
+
(_filteredFocusableEle4 = filteredFocusableElements[0]) === null || _filteredFocusableEle4 === void 0 ? void 0 : _filteredFocusableEle4.focus();
|
|
167
|
+
(_filteredFocusableEle5 = filteredFocusableElements[0]) === null || _filteredFocusableEle5 === void 0 ? void 0 : _filteredFocusableEle5.scrollIntoView({
|
|
168
|
+
behavior: 'smooth',
|
|
169
|
+
block: 'center',
|
|
170
|
+
inline: 'nearest'
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
|
|
159
175
|
element === null || element === void 0 ? void 0 : element.addEventListener('keydown', handleKeyDown);
|
|
176
|
+
|
|
177
|
+
if (isShortcutToFocusToolbar) {
|
|
178
|
+
document.addEventListener('keydown', globalKeyDownHandler);
|
|
179
|
+
}
|
|
180
|
+
|
|
160
181
|
return function () {
|
|
161
182
|
element === null || element === void 0 ? void 0 : element.removeEventListener('keydown', handleKeyDown);
|
|
183
|
+
|
|
184
|
+
if (isShortcutToFocusToolbar) {
|
|
185
|
+
document.removeEventListener('keydown', globalKeyDownHandler);
|
|
186
|
+
}
|
|
162
187
|
};
|
|
163
|
-
}, [selectedItemIndex, wrapperRef, editorView, disableArrowKeyNavigation, handleEscape, childComponentSelector, incrementIndex, decrementIndex]);
|
|
188
|
+
}, [selectedItemIndex, wrapperRef, editorView, disableArrowKeyNavigation, handleEscape, childComponentSelector, incrementIndex, decrementIndex, isShortcutToFocusToolbar]);
|
|
164
189
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
165
190
|
className: "custom-key-handler-wrapper",
|
|
166
191
|
ref: wrapperRef
|
|
@@ -15,8 +15,6 @@ var _constants = require("@atlaskit/theme/constants");
|
|
|
15
15
|
|
|
16
16
|
var _colors = require("@atlaskit/theme/colors");
|
|
17
17
|
|
|
18
|
-
var _tokens = require("@atlaskit/tokens");
|
|
19
|
-
|
|
20
18
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
21
19
|
|
|
22
20
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
@@ -25,11 +23,11 @@ var buttonContent = (0, _react.css)(_templateObject || (_templateObject = (0, _t
|
|
|
25
23
|
exports.buttonContent = buttonContent;
|
|
26
24
|
var wrapper = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n margin-right: 0;\n"])));
|
|
27
25
|
exports.wrapper = wrapper;
|
|
28
|
-
var confirmationPopup = (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\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"])), (
|
|
26
|
+
var confirmationPopup = (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\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"])), "var(--ds-surface-overlay, #fff)", (0, _constants.borderRadius)(), "var(--ds-shadow-overlay, ".concat("0 4px 8px -2px ".concat(_colors.N60A, ", 0 0 1px ").concat(_colors.N60A), ")"));
|
|
29
27
|
exports.confirmationPopup = confirmationPopup;
|
|
30
|
-
var confirmationText = (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\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"])), (0, _editorSharedStyles.relativeFontSizeToBase16)(14), (
|
|
28
|
+
var confirmationText = (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\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"])), (0, _editorSharedStyles.relativeFontSizeToBase16)(14), "var(--ds-text-subtle, ".concat(_colors.N400, ")"));
|
|
31
29
|
exports.confirmationText = confirmationText;
|
|
32
|
-
var confirmationHeader = (0, _react.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n height: 100px;\n width: 100%;\n display: inline-block;\n"])), (
|
|
30
|
+
var confirmationHeader = (0, _react.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n height: 100px;\n width: 100%;\n display: inline-block;\n"])), "var(--ds-background-discovery-bold, ".concat(_colors.P400, ")"));
|
|
33
31
|
exports.confirmationHeader = confirmationHeader;
|
|
34
32
|
var confirmationImg = (0, _react.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n width: 100px;\n display: block;\n margin: 25px auto 0 auto;\n"])));
|
|
35
33
|
exports.confirmationImg = confirmationImg;
|
|
@@ -29,16 +29,14 @@ var _react2 = require("@emotion/react");
|
|
|
29
29
|
|
|
30
30
|
var _colors = require("@atlaskit/theme/colors");
|
|
31
31
|
|
|
32
|
-
var _tokens = require("@atlaskit/tokens");
|
|
33
|
-
|
|
34
32
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
35
33
|
|
|
36
34
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
37
35
|
|
|
38
36
|
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; } }
|
|
39
37
|
|
|
40
|
-
var pulseBackground = (0, _react2.keyframes)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n 50% {\n background-color: ", ";\n }\n"])), (
|
|
41
|
-
var pulseBackgroundReverse = (0, _react2.keyframes)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n 0% {\n background-color: ", ";\n }\n 50% {\n background-color: auto;\n }\n 100% {\n background-color: ", ";\n }\n"])), (
|
|
38
|
+
var pulseBackground = (0, _react2.keyframes)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n 50% {\n background-color: ", ";\n }\n"])), "var(--ds-blanket-danger, ".concat(_colors.R100, ")"));
|
|
39
|
+
var pulseBackgroundReverse = (0, _react2.keyframes)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n 0% {\n background-color: ", ";\n }\n 50% {\n background-color: auto;\n }\n 100% {\n background-color: ", ";\n }\n"])), "var(--ds-blanket-danger, ".concat(_colors.R100, ")"), "var(--ds-blanket-danger, ".concat(_colors.R100, ")"));
|
|
42
40
|
var flashWrapper = (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n &.-flash > div {\n animation: 0.25s ease-in-out ", ";\n }\n\n & > div {\n animation: 'none';\n }\n"])), pulseBackgroundReverse);
|
|
43
41
|
var flashWrapperAnimated = (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n\n & > div {\n animation: 0.25s ease-in-out ", ";\n }\n"])), flashWrapper, pulseBackground);
|
|
44
42
|
|
package/dist/cjs/ui/styles.js
CHANGED
|
@@ -27,8 +27,6 @@ var _react = require("@emotion/react");
|
|
|
27
27
|
|
|
28
28
|
var _colors = require("@atlaskit/theme/colors");
|
|
29
29
|
|
|
30
|
-
var _tokens = require("@atlaskit/tokens");
|
|
31
|
-
|
|
32
30
|
var _shortcut = require("@atlaskit/editor-shared-styles/shortcut");
|
|
33
31
|
|
|
34
32
|
var _scrollbar = require("@atlaskit/editor-shared-styles/scrollbar");
|
|
@@ -37,7 +35,7 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _temp
|
|
|
37
35
|
|
|
38
36
|
var buttonGroupStyle = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: inline-flex;\n align-items: center;\n\n & > div {\n display: flex;\n }\n"])));
|
|
39
37
|
exports.buttonGroupStyle = buttonGroupStyle;
|
|
40
|
-
var separatorStyles = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n background: ", ";\n width: 1px;\n height: 24px;\n display: inline-block;\n margin: 0 8px;\n"])), (
|
|
38
|
+
var separatorStyles = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n background: ", ";\n width: 1px;\n height: 24px;\n display: inline-block;\n margin: 0 8px;\n"])), "var(--ds-border, ".concat(_colors.N30, ")"));
|
|
41
39
|
exports.separatorStyles = separatorStyles;
|
|
42
40
|
var wrapperStyle = (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\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"])));
|
|
43
41
|
exports.wrapperStyle = wrapperStyle;
|
|
@@ -52,7 +50,7 @@ exports.buttonContentStyle = buttonContentStyle;
|
|
|
52
50
|
var buttonContentReducedSpacingStyle = (0, _react.css)(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n padding: 8px;\n"]))); // Taken from the style of inline dialog components
|
|
53
51
|
|
|
54
52
|
exports.buttonContentReducedSpacingStyle = buttonContentReducedSpacingStyle;
|
|
55
|
-
var dropShadow = (0, _react.css)(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n box-shadow: ", ";\n"])), (
|
|
53
|
+
var dropShadow = (0, _react.css)(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n box-shadow: ", ";\n"])), "var(--ds-shadow-overlay, ".concat("0 0 1px rgba(9, 30, 66, 0.31),\n 0 4px 8px -2px rgba(9, 30, 66, 0.25)", ")"));
|
|
56
54
|
exports.dropShadow = dropShadow;
|
|
57
55
|
var clickSelectWrapperStyle = (0, _react.css)(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n user-select: all;\n"])));
|
|
58
56
|
exports.clickSelectWrapperStyle = clickSelectWrapperStyle;
|
|
@@ -50,17 +50,20 @@ var InstrumentedPlugin = /*#__PURE__*/function (_SafePlugin) {
|
|
|
50
50
|
} : _options$uiTracking,
|
|
51
51
|
_options$saferDispatc = options.saferDispatchedTransactions,
|
|
52
52
|
saferDispatchedTransactions = _options$saferDispatc === void 0 ? false : _options$saferDispatc,
|
|
53
|
+
_options$saferDispatc2 = options.saferDispatchedTransactionsAnalyticsOnly,
|
|
54
|
+
saferDispatchedTransactionsAnalyticsOnly = _options$saferDispatc2 === void 0 ? false : _options$saferDispatc2,
|
|
53
55
|
dispatchAnalyticsEvent = options.dispatchAnalyticsEvent;
|
|
54
|
-
var shouldOverrideApply = transactionTracking.enabled && transactionTracker || saferDispatchedTransactions;
|
|
56
|
+
var shouldOverrideApply = transactionTracking.enabled && transactionTracker || saferDispatchedTransactions || saferDispatchedTransactionsAnalyticsOnly;
|
|
55
57
|
|
|
56
58
|
if (shouldOverrideApply && spec.state) {
|
|
57
59
|
var originalApply = spec.state.apply.bind(spec.state);
|
|
58
60
|
|
|
59
61
|
spec.state.apply = function (aTr, value, oldState, newState) {
|
|
60
62
|
var self = (0, _assertThisInitialized2.default)(_this);
|
|
61
|
-
var tr = saferDispatchedTransactions ? new Proxy(aTr, (0, _saferTransactions.freezeUnsafeTransactionProperties)({
|
|
63
|
+
var tr = saferDispatchedTransactions || saferDispatchedTransactionsAnalyticsOnly ? new Proxy(aTr, (0, _saferTransactions.freezeUnsafeTransactionProperties)({
|
|
62
64
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
63
|
-
pluginKey: self.key
|
|
65
|
+
pluginKey: self.key,
|
|
66
|
+
analyticsOnly: saferDispatchedTransactionsAnalyticsOnly
|
|
64
67
|
})) : aTr;
|
|
65
68
|
var shouldTrackTransactions = transactionTracker === null || transactionTracker === void 0 ? void 0 : transactionTracker.shouldTrackTransaction(transactionTracking);
|
|
66
69
|
|
|
@@ -21,7 +21,8 @@ var isReadOnlyProperty = function isReadOnlyProperty(prop) {
|
|
|
21
21
|
|
|
22
22
|
var freezeUnsafeTransactionProperties = function freezeUnsafeTransactionProperties(_ref) {
|
|
23
23
|
var dispatchAnalyticsEvent = _ref.dispatchAnalyticsEvent,
|
|
24
|
-
pluginKey = _ref.pluginKey
|
|
24
|
+
pluginKey = _ref.pluginKey,
|
|
25
|
+
analyticsOnly = _ref.analyticsOnly;
|
|
25
26
|
|
|
26
27
|
var isUnsafe = function isUnsafe() {
|
|
27
28
|
if (dispatchAnalyticsEvent) {
|
|
@@ -31,11 +32,16 @@ var freezeUnsafeTransactionProperties = function freezeUnsafeTransactionProperti
|
|
|
31
32
|
eventType: _analytics.EVENT_TYPE.OPERATIONAL,
|
|
32
33
|
attributes: {
|
|
33
34
|
pluginKey: pluginKey || 'unknown'
|
|
35
|
+
},
|
|
36
|
+
nonPrivacySafeAttributes: {
|
|
37
|
+
stack: new Error().stack
|
|
34
38
|
}
|
|
35
39
|
});
|
|
36
40
|
}
|
|
37
41
|
|
|
38
|
-
|
|
42
|
+
if (!analyticsOnly) {
|
|
43
|
+
throw new Error(UNSAFE_PROPERTY_SET_ERROR);
|
|
44
|
+
}
|
|
39
45
|
};
|
|
40
46
|
|
|
41
47
|
return {
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.version = exports.nextMajorVersion = exports.name = void 0;
|
|
7
7
|
var name = "@atlaskit/editor-core";
|
|
8
8
|
exports.name = name;
|
|
9
|
-
var version = "
|
|
9
|
+
var version = "178.0.0";
|
|
10
10
|
exports.version = version;
|
|
11
11
|
|
|
12
12
|
var nextMajorVersion = function nextMajorVersion() {
|
package/dist/cjs/version.json
CHANGED
|
@@ -68,8 +68,10 @@ export class ErrorBoundaryWithEditorView extends React.Component {
|
|
|
68
68
|
actionSubject: ACTION_SUBJECT.EDITOR,
|
|
69
69
|
eventType: EVENT_TYPE.OPERATIONAL,
|
|
70
70
|
attributes: {
|
|
71
|
-
errorStack,
|
|
72
71
|
errorId: sharedId
|
|
72
|
+
},
|
|
73
|
+
nonPrivacySafeAttributes: {
|
|
74
|
+
errorStack
|
|
73
75
|
}
|
|
74
76
|
});
|
|
75
77
|
|
|
@@ -331,9 +331,10 @@ export class ReactEditorView extends React.Component {
|
|
|
331
331
|
|
|
332
332
|
const nodes = findChangedNodesFromTransaction(unsafeTransaction);
|
|
333
333
|
const changedNodesValid = validateNodes(nodes);
|
|
334
|
-
const transaction = this.featureFlags.saferDispatchedTransactions ? new Proxy(unsafeTransaction, freezeUnsafeTransactionProperties({
|
|
334
|
+
const transaction = this.featureFlags.saferDispatchedTransactions || this.featureFlags.saferDispatchedTransactionsAnalyticsOnly ? new Proxy(unsafeTransaction, freezeUnsafeTransactionProperties({
|
|
335
335
|
dispatchAnalyticsEvent: this.dispatchAnalyticsEvent,
|
|
336
|
-
pluginKey: 'unknown-reacteditorview'
|
|
336
|
+
pluginKey: 'unknown-reacteditorview',
|
|
337
|
+
analyticsOnly: this.featureFlags.saferDispatchedTransactionsAnalyticsOnly
|
|
337
338
|
})) : unsafeTransaction;
|
|
338
339
|
|
|
339
340
|
if (changedNodesValid) {
|
|
@@ -96,7 +96,8 @@ export function createPMPlugins(config) {
|
|
|
96
96
|
transactionTracking = TRACKING_DEFAULT
|
|
97
97
|
} = performanceTracking;
|
|
98
98
|
const saferDispatchedTransactions = featureFlags.saferDispatchedTransactions;
|
|
99
|
-
const
|
|
99
|
+
const saferDispatchedTransactionsAnalyticsOnly = featureFlags.saferDispatchedTransactionsAnalyticsOnly;
|
|
100
|
+
const useInstrumentedPlugin = uiTracking.enabled || transactionTracking.enabled || saferDispatchedTransactions || saferDispatchedTransactionsAnalyticsOnly;
|
|
100
101
|
|
|
101
102
|
if (process.env.NODE_ENV === 'development' && transactionTracking.enabled && !transactionTracker) {
|
|
102
103
|
// eslint-disable-next-line no-console
|
|
@@ -107,6 +108,7 @@ export function createPMPlugins(config) {
|
|
|
107
108
|
uiTracking,
|
|
108
109
|
transactionTracking,
|
|
109
110
|
saferDispatchedTransactions,
|
|
111
|
+
saferDispatchedTransactionsAnalyticsOnly,
|
|
110
112
|
dispatchAnalyticsEvent
|
|
111
113
|
}, transactionTracker) : plugin => plugin;
|
|
112
114
|
return editorConfig.pmPlugins.sort(sortByOrder('plugins')).map(({
|
package/dist/es2019/editor.js
CHANGED
|
@@ -312,6 +312,8 @@ export default class Editor extends React.Component {
|
|
|
312
312
|
}
|
|
313
313
|
|
|
314
314
|
deprecationWarnings(props) {
|
|
315
|
+
var _props$allowTextColor;
|
|
316
|
+
|
|
315
317
|
if (process.env.NODE_ENV === 'production') {
|
|
316
318
|
return;
|
|
317
319
|
}
|
|
@@ -344,6 +346,11 @@ export default class Editor extends React.Component {
|
|
|
344
346
|
// eslint-disable-next-line no-console
|
|
345
347
|
console.warn(`Advanced table options are deprecated (except isHeaderRowRequired) to continue using advanced table features use - <Editor allowTables={{ advanced: true }} /> [Will be changed in editor-core@${nextVersion}]`);
|
|
346
348
|
}
|
|
349
|
+
|
|
350
|
+
if (props.hasOwnProperty('allowTextColor') && typeof props.allowTextColor !== 'boolean' && (props === null || props === void 0 ? void 0 : (_props$allowTextColor = props.allowTextColor) === null || _props$allowTextColor === void 0 ? void 0 : _props$allowTextColor.allowMoreTextColors) !== undefined) {
|
|
351
|
+
// eslint-disable-next-line no-console
|
|
352
|
+
console.warn(`"allowMoreTextColors" field of "allowTextColor" property is deprecated. It will be removedin editor-core@${nextVersion}. The color palette now shows more colors by default.`);
|
|
353
|
+
}
|
|
347
354
|
}
|
|
348
355
|
|
|
349
356
|
onEditorDestroyed(_instance) {
|
|
@@ -5,7 +5,6 @@ import rafSchedule from 'raf-schd';
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { css, jsx } from '@emotion/react';
|
|
7
7
|
import { N30 } from '@atlaskit/theme/colors';
|
|
8
|
-
import { token } from '@atlaskit/tokens';
|
|
9
8
|
import { withAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
10
9
|
import { BaseTheme } from '@atlaskit/editor-common/ui';
|
|
11
10
|
import { akEditorMenuZIndex, akEditorToolbarKeylineHeight } from '@atlaskit/editor-shared-styles';
|
|
@@ -93,7 +92,7 @@ const mainToolbar = css`
|
|
|
93
92
|
display: flex;
|
|
94
93
|
height: 80px;
|
|
95
94
|
flex-shrink: 0;
|
|
96
|
-
background-color: ${
|
|
95
|
+
background-color: ${"var(--ds-surface, white)"};
|
|
97
96
|
|
|
98
97
|
& object {
|
|
99
98
|
height: 0 !important;
|
|
@@ -101,7 +100,7 @@ const mainToolbar = css`
|
|
|
101
100
|
`;
|
|
102
101
|
const mainToolbarWithKeyline = css`
|
|
103
102
|
${mainToolbar}
|
|
104
|
-
box-shadow: 0 ${akEditorToolbarKeylineHeight}px 0 0 ${
|
|
103
|
+
box-shadow: 0 ${akEditorToolbarKeylineHeight}px 0 0 ${`var(--ds-border, ${N30})`}
|
|
105
104
|
`;
|
|
106
105
|
const mainToolbarCustomComponentsSlot = css`
|
|
107
106
|
display: flex;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
2
|
import { N30 } from '@atlaskit/theme/colors';
|
|
3
|
-
import { token } from '@atlaskit/tokens';
|
|
4
3
|
export const triggerWrapper = css`
|
|
5
4
|
display: flex;
|
|
6
5
|
`;
|
|
7
6
|
export const separator = css`
|
|
8
|
-
background: ${
|
|
7
|
+
background: ${`var(--ds-border, ${N30})`};
|
|
9
8
|
width: 1px;
|
|
10
9
|
height: 24px;
|
|
11
10
|
display: inline-block;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { Selection, TextSelection } from 'prosemirror-state';
|
|
2
|
+
|
|
3
|
+
// We should override default behaviour when selection spans node depths or
|
|
4
|
+
// ends at a node junction
|
|
5
|
+
const shouldMoveCursorAfterDelete = state => {
|
|
6
|
+
const {
|
|
7
|
+
selection: {
|
|
8
|
+
$from,
|
|
9
|
+
$to
|
|
10
|
+
}
|
|
11
|
+
} = state;
|
|
12
|
+
const nodeRange = $from.blockRange($to);
|
|
13
|
+
|
|
14
|
+
if (!nodeRange) {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const hasSameAncestor = $from.depth === $to.depth && $from.depth - 1 === nodeRange.depth;
|
|
19
|
+
const toPositionHasNodeAfter = !!$to.nodeAfter;
|
|
20
|
+
|
|
21
|
+
if (hasSameAncestor || toPositionHasNodeAfter) {
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return true;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Fixes cursor position after delete for list/task in panel and table
|
|
29
|
+
*
|
|
30
|
+
* ED-13873 fixes a bug where after deleting a list the cursor would move
|
|
31
|
+
* to the cell to the right. Uses setSelection to position the cursor as expected after deleting.
|
|
32
|
+
*
|
|
33
|
+
* @param state EditorState<any>
|
|
34
|
+
* @param dispatch CommandDispatch
|
|
35
|
+
* @returns boolean
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
export const deleteAndMoveCursor = (state, dispatch) => {
|
|
40
|
+
if (state.selection.empty || !(state.selection instanceof TextSelection)) {
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
if (!shouldMoveCursorAfterDelete(state)) {
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const {
|
|
49
|
+
tr
|
|
50
|
+
} = state;
|
|
51
|
+
tr.deleteSelection(); // Make sure the next position is not out of boundaries
|
|
52
|
+
|
|
53
|
+
const previousPosition = Math.min(Math.max(state.selection.$from.pos, 0), tr.doc.content.size); // Override default delete behaviour that moves the cursor to first suitable position after selection (postive bias).
|
|
54
|
+
// See. selectionToInsertionEnd. We will override behavior with negative bias (search for suitable cursor position backwards).
|
|
55
|
+
|
|
56
|
+
tr.setSelection(Selection.near(tr.doc.resolve(previousPosition), -1));
|
|
57
|
+
|
|
58
|
+
if (dispatch) {
|
|
59
|
+
dispatch(tr.scrollIntoView());
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return true;
|
|
63
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { cleanUpAtTheStartOfDocument, insertBlockType, insertBlockTypesWithAnalytics, setBlockType, setBlockTypeWithAnalytics, setHeading, setHeadingWithAnalytics, setNormalText, setNormalTextWithAnalytics } from './block-type';
|
|
2
2
|
export { insertBlock } from './insert-block';
|
|
3
|
-
export { isConvertableToCodeBlock, transformToCodeBlockAction } from './transform-to-code-block';
|
|
3
|
+
export { isConvertableToCodeBlock, transformToCodeBlockAction } from './transform-to-code-block';
|
|
4
|
+
export { deleteAndMoveCursor } from './delete-and-move-cursor';
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { redo, undo } from 'prosemirror-history';
|
|
2
|
+
import { chainCommands } from 'prosemirror-commands';
|
|
2
3
|
import * as keymaps from '../../../keymaps';
|
|
3
4
|
import * as commands from '../../../commands';
|
|
4
5
|
import * as blockTypes from '../types';
|
|
5
6
|
import { keymap } from '../../../utils/keymap';
|
|
6
|
-
import { cleanUpAtTheStartOfDocument, insertBlockTypesWithAnalytics } from '../commands';
|
|
7
|
+
import { cleanUpAtTheStartOfDocument, deleteAndMoveCursor, insertBlockTypesWithAnalytics } from '../commands';
|
|
7
8
|
import { deleteEmptyParagraphAndMoveBlockUp } from '../../../utils/commands';
|
|
8
9
|
import { INPUT_METHOD } from '../../analytics';
|
|
9
10
|
import { isNodeAWrappingBlockNode } from '../utils';
|
|
11
|
+
const backspace = chainCommands(cleanUpAtTheStartOfDocument, deleteAndMoveCursor);
|
|
12
|
+
const del = chainCommands(deleteEmptyParagraphAndMoveBlockUp(isNodeAWrappingBlockNode), deleteAndMoveCursor);
|
|
10
13
|
export default function keymapPlugin(schema, featureFlags) {
|
|
11
14
|
const list = {};
|
|
12
15
|
keymaps.bindKeymapWithCommand(keymaps.insertNewLine.common, commands.insertNewLineWithAnalytics, list);
|
|
@@ -14,9 +17,9 @@ export default function keymapPlugin(schema, featureFlags) {
|
|
|
14
17
|
keymaps.bindKeymapWithCommand(keymaps.moveDown.common, commands.createNewParagraphBelow, list);
|
|
15
18
|
keymaps.bindKeymapWithCommand(keymaps.findKeyMapForBrowser(keymaps.redo), redo, list);
|
|
16
19
|
keymaps.bindKeymapWithCommand(keymaps.undo.common, undo, list);
|
|
17
|
-
keymaps.bindKeymapWithCommand(keymaps.backspace.common,
|
|
18
|
-
keymaps.bindKeymapWithCommand(keymaps.deleteKey.common,
|
|
19
|
-
keymaps.bindKeymapWithCommand(keymaps.forwardDelete.mac,
|
|
20
|
+
keymaps.bindKeymapWithCommand(keymaps.backspace.common, backspace, list);
|
|
21
|
+
keymaps.bindKeymapWithCommand(keymaps.deleteKey.common, del, list);
|
|
22
|
+
keymaps.bindKeymapWithCommand(keymaps.forwardDelete.mac, del, list);
|
|
20
23
|
|
|
21
24
|
if (schema.nodes[blockTypes.BLOCK_QUOTE.nodeName]) {
|
|
22
25
|
keymaps.bindKeymapWithCommand(keymaps.findShortcutByKeymap(keymaps.toggleBlockQuote), insertBlockTypesWithAnalytics(blockTypes.BLOCK_QUOTE.name, INPUT_METHOD.KEYBOARD), list);
|