@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
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,94 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 178.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [`04e3aacbcc0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/04e3aacbcc0) - ED-16069 Unskip type over mediagroup integ test
|
|
8
|
+
|
|
9
|
+
### Minor Changes
|
|
10
|
+
|
|
11
|
+
- [`055a333dad9`](https://bitbucket.org/atlassian/atlassian-frontend/commits/055a333dad9) - [ux] Remove `moreTextColors` feature flag and deprecate `allowMoreTextColors` field of `allowTextColor` editor prop and `colorPaletteExtended` mark.
|
|
12
|
+
|
|
13
|
+
Showing more colors in the color selection palette is now a default behaviour.
|
|
14
|
+
|
|
15
|
+
## **DEPRECATION WARNING:**
|
|
16
|
+
|
|
17
|
+
There are 2 deprecations in this change:
|
|
18
|
+
|
|
19
|
+
### 1. `allowMoreTextColors` field of `allowTextColor` editor prop.
|
|
20
|
+
|
|
21
|
+
`allowMoreTextColors` field of `allowTextColor` editor prop. **is now deprecated and will be removed in the next stable release of `@atlaskit/editor-core` package**. Please take steps to remove that field from your code. E.g.:
|
|
22
|
+
|
|
23
|
+
```tsx
|
|
24
|
+
<Editor
|
|
25
|
+
...
|
|
26
|
+
allowTextColor ={
|
|
27
|
+
allowMoreTextColors: true // <-- Deprecated
|
|
28
|
+
defaultColour: {color: 'red', label: 'red'}
|
|
29
|
+
}
|
|
30
|
+
/>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Remove all instances of `allowMoreTextColors` field from `allowTextColor` `Editor` prop. I.e.:
|
|
34
|
+
|
|
35
|
+
```tsx
|
|
36
|
+
<Editor
|
|
37
|
+
...
|
|
38
|
+
allowTextColor ={
|
|
39
|
+
defaultColour: {color: 'red', label: 'red'}
|
|
40
|
+
}
|
|
41
|
+
/>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
If the resulting `allowTextColor` prop is an empty object, set `allowTextColor` property value to `true`. E.g.:
|
|
45
|
+
|
|
46
|
+
```tsx
|
|
47
|
+
<Editor
|
|
48
|
+
appearance="full-page"
|
|
49
|
+
...
|
|
50
|
+
allowTextColor ={
|
|
51
|
+
allowMoreTextColors: true // <-- Invalid
|
|
52
|
+
}
|
|
53
|
+
/>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
should become
|
|
57
|
+
|
|
58
|
+
```tsx
|
|
59
|
+
<Editor
|
|
60
|
+
appearance="full-page"
|
|
61
|
+
...
|
|
62
|
+
allowTextColor={true}
|
|
63
|
+
/>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### 2. `colorPaletteExtended` mark of the ADF schema
|
|
67
|
+
|
|
68
|
+
`colorPaletteExtended` mark of the ADF schema **is now deprecated and will be removed in the next stable release**. The extended palette is now rolled into the main one. use `colorPalette` instead.
|
|
69
|
+
|
|
70
|
+
### Patch Changes
|
|
71
|
+
|
|
72
|
+
- [`a7eb7a6bb47`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a7eb7a6bb47) - ED-16068 unskipped tests
|
|
73
|
+
- [`f7cdc36d75b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f7cdc36d75b) - ED016195 update EDITOR_CRASHED_ADDITIONAL_INFORMATION event name
|
|
74
|
+
- [`20117f2de5a`](https://bitbucket.org/atlassian/atlassian-frontend/commits/20117f2de5a) - [ux] ED-16204 Fix table cell options floating toolbar context menu closes after clicking on disabled options
|
|
75
|
+
- [`3f3720a4964`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3f3720a4964) - EDM-5368 make type="button" to the buttons in HyperLinkToolbar. This has caused an issue in Jira Portal where clicking the button would submit the creation form.
|
|
76
|
+
- [`efa8b7ee68e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/efa8b7ee68e) - ED-15808 Changes to replace usage of enzyme with React test library
|
|
77
|
+
- [`df20a33d886`](https://bitbucket.org/atlassian/atlassian-frontend/commits/df20a33d886) - ED-16445: Set allowUndoRedoButtons prop codemod in editor-core to run against the correct editor version (v175)
|
|
78
|
+
- [`e1637ca6a5c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e1637ca6a5c) - ED-16004 unskipped test
|
|
79
|
+
- [`31c37c54ee2`](https://bitbucket.org/atlassian/atlassian-frontend/commits/31c37c54ee2) - ED-15548 To add keyboard shortcut Alt + F9 to reach main toolbar and on 'Esc' user comes back to editor
|
|
80
|
+
- [`70d0799eee0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/70d0799eee0) - ED-14002 Added `safer-dispatched-transactions` featureFlag to preventtransactions from being mutated after dispatch at runtime.
|
|
81
|
+
- [`c6c0cab10e0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c6c0cab10e0) - [ux] ED-16205 - Fix missing yellow highlight on merged table cells when hover sort column options on table floating toolbar
|
|
82
|
+
- [`b9141027f87`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b9141027f87) - [ux] ED-13873 fixes a bug where after deleting a list in a panel or table the cursor would move to the cell to the right. Uses setSelection to position the cursor as expected after delete.
|
|
83
|
+
- [`e9a8cb724c1`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e9a8cb724c1) - [ux] ED-16207 - Update color picker button size and background to allow hover effect to standout
|
|
84
|
+
- Updated dependencies
|
|
85
|
+
|
|
86
|
+
## 177.0.1
|
|
87
|
+
|
|
88
|
+
### Patch Changes
|
|
89
|
+
|
|
90
|
+
- [`6455cf006b3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6455cf006b3) - Builds for this package now pass through a tokens babel plugin, removing runtime invocations of the tokens() function and improving performance.
|
|
91
|
+
|
|
3
92
|
## 177.0.0
|
|
4
93
|
|
|
5
94
|
### Major Changes
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
jest.autoMockOff();
|
|
2
|
+
|
|
3
|
+
import { createTransformer } from '../utils';
|
|
4
|
+
import { removeAllowMoreColorsProp } from '../migrates/next-remove-allow-more-text-colors-prop';
|
|
5
|
+
|
|
6
|
+
// This stays as require() since changing to import will trigger a linter error
|
|
7
|
+
const defineInlineTest = require('jscodeshift/dist/testUtils').defineInlineTest;
|
|
8
|
+
|
|
9
|
+
const transformer = createTransformer('@atlaskit/editor-core', [
|
|
10
|
+
removeAllowMoreColorsProp,
|
|
11
|
+
]);
|
|
12
|
+
|
|
13
|
+
describe('remove `allowMoreTextColors` field from `allowTextColor` Editor prop.', () => {
|
|
14
|
+
defineInlineTest(
|
|
15
|
+
{ default: transformer, parser: 'tsx' },
|
|
16
|
+
{},
|
|
17
|
+
`
|
|
18
|
+
import React from 'react';
|
|
19
|
+
import { Editor } from '@atlaskit/editor-core';
|
|
20
|
+
|
|
21
|
+
export default () => <Editor
|
|
22
|
+
allowTextColor = {
|
|
23
|
+
{
|
|
24
|
+
allowMoreTextColors: true,
|
|
25
|
+
defaultColour: {color: 'red', label: 'red'}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
allowStatus={true}
|
|
29
|
+
/>
|
|
30
|
+
`, // -----
|
|
31
|
+
`
|
|
32
|
+
import React from 'react';
|
|
33
|
+
import { Editor } from '@atlaskit/editor-core';
|
|
34
|
+
|
|
35
|
+
export default () => <Editor
|
|
36
|
+
allowTextColor = {
|
|
37
|
+
{
|
|
38
|
+
defaultColour: {color: 'red', label: 'red'}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
allowStatus={true}
|
|
42
|
+
/>
|
|
43
|
+
`, // -----
|
|
44
|
+
'remove allowMoreTextColors field if it exists',
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
defineInlineTest(
|
|
48
|
+
{ default: transformer, parser: 'tsx' },
|
|
49
|
+
{},
|
|
50
|
+
`
|
|
51
|
+
import React from 'react';
|
|
52
|
+
import { Editor } from '@atlaskit/editor-core';
|
|
53
|
+
|
|
54
|
+
export default () => <Editor
|
|
55
|
+
appearance="full-page"
|
|
56
|
+
allowTextColor = {
|
|
57
|
+
{
|
|
58
|
+
allowMoreTextColors: true,
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
/>
|
|
62
|
+
`, // -----
|
|
63
|
+
`
|
|
64
|
+
import React from 'react';
|
|
65
|
+
import { Editor } from '@atlaskit/editor-core';
|
|
66
|
+
|
|
67
|
+
export default () => <Editor
|
|
68
|
+
appearance="full-page"
|
|
69
|
+
allowTextColor={true}
|
|
70
|
+
/>
|
|
71
|
+
`, // -----
|
|
72
|
+
'set allowTextColor prop value to `true` if allowMoreTextColors is its only field',
|
|
73
|
+
);
|
|
74
|
+
|
|
75
|
+
defineInlineTest(
|
|
76
|
+
{ default: transformer, parser: 'tsx' },
|
|
77
|
+
{},
|
|
78
|
+
`
|
|
79
|
+
import React from 'react';
|
|
80
|
+
import { Editor as MyEditor } from '@atlaskit/editor-core';
|
|
81
|
+
|
|
82
|
+
export default () => <Editor
|
|
83
|
+
appearance="full-page"
|
|
84
|
+
allowTextColor = {
|
|
85
|
+
{
|
|
86
|
+
allowMoreTextColors: true,
|
|
87
|
+
defaultColour: {color: 'red', label: 'red'}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
/>
|
|
91
|
+
`, // -----
|
|
92
|
+
`
|
|
93
|
+
import React from 'react';
|
|
94
|
+
import { Editor as MyEditor } from '@atlaskit/editor-core';
|
|
95
|
+
|
|
96
|
+
export default () => <Editor
|
|
97
|
+
appearance="full-page"
|
|
98
|
+
allowTextColor = {
|
|
99
|
+
{
|
|
100
|
+
defaultColour: {color: 'red', label: 'red'}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
/>
|
|
104
|
+
`, // -----
|
|
105
|
+
'remove allowMoreTextColors prop prop when Editor is renamed',
|
|
106
|
+
);
|
|
107
|
+
|
|
108
|
+
defineInlineTest(
|
|
109
|
+
{ default: transformer, parser: 'tsx' },
|
|
110
|
+
{},
|
|
111
|
+
`
|
|
112
|
+
import React from 'react';
|
|
113
|
+
|
|
114
|
+
const Editor = (props) => {
|
|
115
|
+
<div>{props.children}</div>
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
export default () => <Editor
|
|
119
|
+
appearance="full-page"
|
|
120
|
+
allowTextColor = {
|
|
121
|
+
{
|
|
122
|
+
allowMoreTextColors: true,
|
|
123
|
+
defaultColour: {color: 'red', label: 'red'}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
/>
|
|
127
|
+
`, // -----
|
|
128
|
+
`
|
|
129
|
+
import React from 'react';
|
|
130
|
+
|
|
131
|
+
const Editor = (props) => {
|
|
132
|
+
<div>{props.children}</div>
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
export default () => <Editor
|
|
136
|
+
appearance="full-page"
|
|
137
|
+
allowTextColor = {
|
|
138
|
+
{
|
|
139
|
+
allowMoreTextColors: true,
|
|
140
|
+
defaultColour: {color: 'red', label: 'red'}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
/>
|
|
144
|
+
`, // -----
|
|
145
|
+
'only remove allowMoreTextColors prop for Editor from @atlaskit/editor-core',
|
|
146
|
+
);
|
|
147
|
+
});
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import core from 'jscodeshift';
|
|
2
|
+
import { Collection } from 'jscodeshift/src/Collection';
|
|
3
|
+
import { findImportFromPackage } from '../utils';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Generate a codemod to remove `allowMoreTextColors` field
|
|
7
|
+
* from `allowTextColor` Editor prop.
|
|
8
|
+
* Ref: ED-15849
|
|
9
|
+
*/
|
|
10
|
+
const createRemoveAllowMoreTextColorsPropTransform = (
|
|
11
|
+
pkg: string,
|
|
12
|
+
component: string,
|
|
13
|
+
) => {
|
|
14
|
+
return (j: core.JSCodeshift, source: Collection<any>) => {
|
|
15
|
+
// Find regular or renamed imports
|
|
16
|
+
// of <Editor/> component from '@atlaskit/editor-core' package
|
|
17
|
+
const importedNames: string[] = findImportFromPackage(
|
|
18
|
+
j,
|
|
19
|
+
source,
|
|
20
|
+
'@atlaskit/editor-core',
|
|
21
|
+
'Editor',
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
// Make the change on all instances of named imports found
|
|
25
|
+
importedNames.forEach((importedComponentName) => {
|
|
26
|
+
// Find `allowTextColor` prop
|
|
27
|
+
const allowTextColorCollection = source.find(j.JSXAttribute, {
|
|
28
|
+
name: {
|
|
29
|
+
type: 'JSXIdentifier',
|
|
30
|
+
name: 'allowTextColor',
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
allowTextColorCollection
|
|
34
|
+
.find(j.ObjectProperty, { key: { name: 'allowMoreTextColors' } })
|
|
35
|
+
.forEach((x) => j(x).remove());
|
|
36
|
+
|
|
37
|
+
// If the remaining `allowTextColor` prop is an empty object, set `allowTextColor` to `true`.
|
|
38
|
+
allowTextColorCollection.forEach((allowTextColorPath) => {
|
|
39
|
+
j(allowTextColorPath).find(j.ObjectExpression, (objectExpression) => {
|
|
40
|
+
if (objectExpression.properties.length === 0) {
|
|
41
|
+
j(allowTextColorPath).replaceWith(
|
|
42
|
+
j.jsxAttribute(
|
|
43
|
+
j.jsxIdentifier('allowTextColor'),
|
|
44
|
+
j.jsxExpressionContainer(j.booleanLiteral(true)),
|
|
45
|
+
),
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export const removeAllowMoreColorsProp =
|
|
55
|
+
createRemoveAllowMoreTextColorsPropTransform(
|
|
56
|
+
'@atlaskit/editor-core',
|
|
57
|
+
'Editor',
|
|
58
|
+
);
|
|
@@ -119,8 +119,10 @@ var ErrorBoundaryWithEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
119
119
|
actionSubject: _analytics.ACTION_SUBJECT.EDITOR,
|
|
120
120
|
eventType: _analytics.EVENT_TYPE.OPERATIONAL,
|
|
121
121
|
attributes: {
|
|
122
|
-
errorStack: errorStack,
|
|
123
122
|
errorId: sharedId
|
|
123
|
+
},
|
|
124
|
+
nonPrivacySafeAttributes: {
|
|
125
|
+
errorStack: errorStack
|
|
124
126
|
}
|
|
125
127
|
});
|
|
126
128
|
|
|
@@ -391,9 +391,10 @@ var ReactEditorView = /*#__PURE__*/function (_React$Component) {
|
|
|
391
391
|
|
|
392
392
|
var nodes = (0, _nodes.findChangedNodesFromTransaction)(unsafeTransaction);
|
|
393
393
|
var changedNodesValid = (0, _nodes.validateNodes)(nodes);
|
|
394
|
-
var transaction = _this.featureFlags.saferDispatchedTransactions ? new Proxy(unsafeTransaction, (0, _saferTransactions.freezeUnsafeTransactionProperties)({
|
|
394
|
+
var transaction = _this.featureFlags.saferDispatchedTransactions || _this.featureFlags.saferDispatchedTransactionsAnalyticsOnly ? new Proxy(unsafeTransaction, (0, _saferTransactions.freezeUnsafeTransactionProperties)({
|
|
395
395
|
dispatchAnalyticsEvent: _this.dispatchAnalyticsEvent,
|
|
396
|
-
pluginKey: 'unknown-reacteditorview'
|
|
396
|
+
pluginKey: 'unknown-reacteditorview',
|
|
397
|
+
analyticsOnly: _this.featureFlags.saferDispatchedTransactionsAnalyticsOnly
|
|
397
398
|
})) : unsafeTransaction;
|
|
398
399
|
|
|
399
400
|
if (changedNodesValid) {
|
|
@@ -127,7 +127,8 @@ function createPMPlugins(config) {
|
|
|
127
127
|
_performanceTracking$2 = performanceTracking.transactionTracking,
|
|
128
128
|
transactionTracking = _performanceTracking$2 === void 0 ? TRACKING_DEFAULT : _performanceTracking$2;
|
|
129
129
|
var saferDispatchedTransactions = featureFlags.saferDispatchedTransactions;
|
|
130
|
-
var
|
|
130
|
+
var saferDispatchedTransactionsAnalyticsOnly = featureFlags.saferDispatchedTransactionsAnalyticsOnly;
|
|
131
|
+
var useInstrumentedPlugin = uiTracking.enabled || transactionTracking.enabled || saferDispatchedTransactions || saferDispatchedTransactionsAnalyticsOnly;
|
|
131
132
|
|
|
132
133
|
if (process.env.NODE_ENV === 'development' && transactionTracking.enabled && !transactionTracker) {
|
|
133
134
|
// eslint-disable-next-line no-console
|
|
@@ -139,6 +140,7 @@ function createPMPlugins(config) {
|
|
|
139
140
|
uiTracking: uiTracking,
|
|
140
141
|
transactionTracking: transactionTracking,
|
|
141
142
|
saferDispatchedTransactions: saferDispatchedTransactions,
|
|
143
|
+
saferDispatchedTransactionsAnalyticsOnly: saferDispatchedTransactionsAnalyticsOnly,
|
|
142
144
|
dispatchAnalyticsEvent: dispatchAnalyticsEvent
|
|
143
145
|
}, transactionTracker);
|
|
144
146
|
} : function (plugin) {
|
package/dist/cjs/editor.js
CHANGED
|
@@ -439,6 +439,8 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
439
439
|
}, {
|
|
440
440
|
key: "deprecationWarnings",
|
|
441
441
|
value: function deprecationWarnings(props) {
|
|
442
|
+
var _props$allowTextColor;
|
|
443
|
+
|
|
442
444
|
if (process.env.NODE_ENV === 'production') {
|
|
443
445
|
return;
|
|
444
446
|
}
|
|
@@ -471,6 +473,11 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
471
473
|
// eslint-disable-next-line no-console
|
|
472
474
|
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@".concat(nextVersion, "]"));
|
|
473
475
|
}
|
|
476
|
+
|
|
477
|
+
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) {
|
|
478
|
+
// eslint-disable-next-line no-console
|
|
479
|
+
console.warn("\"allowMoreTextColors\" field of \"allowTextColor\" property is deprecated. It will be removedin editor-core@".concat(nextVersion, ". The color palette now shows more colors by default."));
|
|
480
|
+
}
|
|
474
481
|
}
|
|
475
482
|
}, {
|
|
476
483
|
key: "onEditorDestroyed",
|
|
@@ -21,8 +21,6 @@ var _react2 = require("@emotion/react");
|
|
|
21
21
|
|
|
22
22
|
var _colors = require("@atlaskit/theme/colors");
|
|
23
23
|
|
|
24
|
-
var _tokens = require("@atlaskit/tokens");
|
|
25
|
-
|
|
26
24
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
27
25
|
|
|
28
26
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
@@ -65,8 +63,8 @@ var editorContentArea = function editorContentArea(theme) {
|
|
|
65
63
|
return (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n line-height: 24px;\n height: 100%;\n width: 100%;\n max-width: ", "px;\n padding-top: 50px;\n margin: 0 auto;\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n padding-bottom: 55px;\n\n & .ProseMirror {\n flex-grow: 1;\n box-sizing: border-box;\n }\n\n && .ProseMirror {\n & > * {\n clear: both;\n }\n > p,\n > ul,\n > ol,\n > h1,\n > h2,\n > h3,\n > h4,\n > h5,\n > h6 {\n clear: none;\n }\n }\n ", ";\n"])), theme.layoutMaxWidth + GUTTER_PADDING * 2, _commonStyles.tableFullPageEditorStyles);
|
|
66
64
|
};
|
|
67
65
|
|
|
68
|
-
var mainToolbar = (0, _react2.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n align-items: center;\n box-shadow: 'none';\n\n transition: box-shadow 200ms;\n z-index: ", ";\n display: flex;\n height: 80px;\n flex-shrink: 0;\n background-color: ", ";\n\n & object {\n height: 0 !important;\n }\n"])), _editorSharedStyles.akEditorMenuZIndex, (
|
|
69
|
-
var mainToolbarWithKeyline = (0, _react2.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n box-shadow: 0 ", "px 0 0 ", "\n"])), mainToolbar, _editorSharedStyles.akEditorToolbarKeylineHeight, (
|
|
66
|
+
var mainToolbar = (0, _react2.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n align-items: center;\n box-shadow: 'none';\n\n transition: box-shadow 200ms;\n z-index: ", ";\n display: flex;\n height: 80px;\n flex-shrink: 0;\n background-color: ", ";\n\n & object {\n height: 0 !important;\n }\n"])), _editorSharedStyles.akEditorMenuZIndex, "var(--ds-surface, white)");
|
|
67
|
+
var mainToolbarWithKeyline = (0, _react2.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n box-shadow: 0 ", "px 0 0 ", "\n"])), mainToolbar, _editorSharedStyles.akEditorToolbarKeylineHeight, "var(--ds-border, ".concat(_colors.N30, ")"));
|
|
70
68
|
var mainToolbarCustomComponentsSlot = (0, _react2.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: flex-end;\n flex-grow: 1;\n"])));
|
|
71
69
|
var sidebarArea = (0, _react2.css)(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n height: 100%;\n box-sizing: border-box;\n"])));
|
|
72
70
|
|
|
@@ -13,13 +13,11 @@ var _react = require("@emotion/react");
|
|
|
13
13
|
|
|
14
14
|
var _colors = require("@atlaskit/theme/colors");
|
|
15
15
|
|
|
16
|
-
var _tokens = require("@atlaskit/tokens");
|
|
17
|
-
|
|
18
16
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
19
17
|
|
|
20
18
|
var triggerWrapper = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n"])));
|
|
21
19
|
exports.triggerWrapper = triggerWrapper;
|
|
22
|
-
var separator = (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"])), (
|
|
20
|
+
var separator = (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, ")"));
|
|
23
21
|
exports.separator = separator;
|
|
24
22
|
var wrapper = (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n div {\n display: flex;\n }\n"])));
|
|
25
23
|
exports.wrapper = wrapper;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.deleteAndMoveCursor = void 0;
|
|
7
|
+
|
|
8
|
+
var _prosemirrorState = require("prosemirror-state");
|
|
9
|
+
|
|
10
|
+
// We should override default behaviour when selection spans node depths or
|
|
11
|
+
// ends at a node junction
|
|
12
|
+
var shouldMoveCursorAfterDelete = function shouldMoveCursorAfterDelete(state) {
|
|
13
|
+
var _state$selection = state.selection,
|
|
14
|
+
$from = _state$selection.$from,
|
|
15
|
+
$to = _state$selection.$to;
|
|
16
|
+
var nodeRange = $from.blockRange($to);
|
|
17
|
+
|
|
18
|
+
if (!nodeRange) {
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
var hasSameAncestor = $from.depth === $to.depth && $from.depth - 1 === nodeRange.depth;
|
|
23
|
+
var toPositionHasNodeAfter = !!$to.nodeAfter;
|
|
24
|
+
|
|
25
|
+
if (hasSameAncestor || toPositionHasNodeAfter) {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return true;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Fixes cursor position after delete for list/task in panel and table
|
|
33
|
+
*
|
|
34
|
+
* ED-13873 fixes a bug where after deleting a list the cursor would move
|
|
35
|
+
* to the cell to the right. Uses setSelection to position the cursor as expected after deleting.
|
|
36
|
+
*
|
|
37
|
+
* @param state EditorState<any>
|
|
38
|
+
* @param dispatch CommandDispatch
|
|
39
|
+
* @returns boolean
|
|
40
|
+
*/
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
var deleteAndMoveCursor = function deleteAndMoveCursor(state, dispatch) {
|
|
44
|
+
if (state.selection.empty || !(state.selection instanceof _prosemirrorState.TextSelection)) {
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
if (!shouldMoveCursorAfterDelete(state)) {
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
var tr = state.tr;
|
|
53
|
+
tr.deleteSelection(); // Make sure the next position is not out of boundaries
|
|
54
|
+
|
|
55
|
+
var 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).
|
|
56
|
+
// See. selectionToInsertionEnd. We will override behavior with negative bias (search for suitable cursor position backwards).
|
|
57
|
+
|
|
58
|
+
tr.setSelection(_prosemirrorState.Selection.near(tr.doc.resolve(previousPosition), -1));
|
|
59
|
+
|
|
60
|
+
if (dispatch) {
|
|
61
|
+
dispatch(tr.scrollIntoView());
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
return true;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
exports.deleteAndMoveCursor = deleteAndMoveCursor;
|
|
@@ -9,6 +9,12 @@ Object.defineProperty(exports, "cleanUpAtTheStartOfDocument", {
|
|
|
9
9
|
return _blockType.cleanUpAtTheStartOfDocument;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
+
Object.defineProperty(exports, "deleteAndMoveCursor", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _deleteAndMoveCursor.deleteAndMoveCursor;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
12
18
|
Object.defineProperty(exports, "insertBlock", {
|
|
13
19
|
enumerable: true,
|
|
14
20
|
get: function get() {
|
|
@@ -80,4 +86,6 @@ var _blockType = require("./block-type");
|
|
|
80
86
|
|
|
81
87
|
var _insertBlock = require("./insert-block");
|
|
82
88
|
|
|
83
|
-
var _transformToCodeBlock = require("./transform-to-code-block");
|
|
89
|
+
var _transformToCodeBlock = require("./transform-to-code-block");
|
|
90
|
+
|
|
91
|
+
var _deleteAndMoveCursor = require("./delete-and-move-cursor");
|
|
@@ -9,6 +9,8 @@ exports.default = keymapPlugin;
|
|
|
9
9
|
|
|
10
10
|
var _prosemirrorHistory = require("prosemirror-history");
|
|
11
11
|
|
|
12
|
+
var _prosemirrorCommands = require("prosemirror-commands");
|
|
13
|
+
|
|
12
14
|
var keymaps = _interopRequireWildcard(require("../../../keymaps"));
|
|
13
15
|
|
|
14
16
|
var commands = _interopRequireWildcard(require("../../../commands"));
|
|
@@ -29,6 +31,9 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
29
31
|
|
|
30
32
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
31
33
|
|
|
34
|
+
var backspace = (0, _prosemirrorCommands.chainCommands)(_commands2.cleanUpAtTheStartOfDocument, _commands2.deleteAndMoveCursor);
|
|
35
|
+
var del = (0, _prosemirrorCommands.chainCommands)((0, _commands3.deleteEmptyParagraphAndMoveBlockUp)(_utils.isNodeAWrappingBlockNode), _commands2.deleteAndMoveCursor);
|
|
36
|
+
|
|
32
37
|
function keymapPlugin(schema, featureFlags) {
|
|
33
38
|
var list = {};
|
|
34
39
|
keymaps.bindKeymapWithCommand(keymaps.insertNewLine.common, commands.insertNewLineWithAnalytics, list);
|
|
@@ -36,9 +41,9 @@ function keymapPlugin(schema, featureFlags) {
|
|
|
36
41
|
keymaps.bindKeymapWithCommand(keymaps.moveDown.common, commands.createNewParagraphBelow, list);
|
|
37
42
|
keymaps.bindKeymapWithCommand(keymaps.findKeyMapForBrowser(keymaps.redo), _prosemirrorHistory.redo, list);
|
|
38
43
|
keymaps.bindKeymapWithCommand(keymaps.undo.common, _prosemirrorHistory.undo, list);
|
|
39
|
-
keymaps.bindKeymapWithCommand(keymaps.backspace.common,
|
|
40
|
-
keymaps.bindKeymapWithCommand(keymaps.deleteKey.common,
|
|
41
|
-
keymaps.bindKeymapWithCommand(keymaps.forwardDelete.mac,
|
|
44
|
+
keymaps.bindKeymapWithCommand(keymaps.backspace.common, backspace, list);
|
|
45
|
+
keymaps.bindKeymapWithCommand(keymaps.deleteKey.common, del, list);
|
|
46
|
+
keymaps.bindKeymapWithCommand(keymaps.forwardDelete.mac, del, list);
|
|
42
47
|
|
|
43
48
|
if (schema.nodes[blockTypes.BLOCK_QUOTE.nodeName]) {
|
|
44
49
|
keymaps.bindKeymapWithCommand(keymaps.findShortcutByKeymap(keymaps.toggleBlockQuote), (0, _commands2.insertBlockTypesWithAnalytics)(blockTypes.BLOCK_QUOTE.name, _analytics.INPUT_METHOD.KEYBOARD), list);
|
|
@@ -17,13 +17,11 @@ var _styles = require("@atlaskit/editor-common/styles");
|
|
|
17
17
|
|
|
18
18
|
var _styles2 = require("../../../../ui/styles");
|
|
19
19
|
|
|
20
|
-
var _tokens = require("@atlaskit/tokens");
|
|
21
|
-
|
|
22
20
|
var _templateObject, _templateObject2, _templateObject3;
|
|
23
21
|
|
|
24
22
|
var blockTypeMenuItemStyle = function blockTypeMenuItemStyle(tagName, selected) {
|
|
25
23
|
// TEMP FIX: See https://product-fabric.atlassian.net/browse/ED-13878
|
|
26
|
-
var selectedStyle = selected ? "".concat(tagName, " { color: "
|
|
24
|
+
var selectedStyle = selected ? "".concat(tagName, " { color: ", "var(--ds-text, white)", " !important; }") : '';
|
|
27
25
|
return function (themeProps) {
|
|
28
26
|
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n ", ";\n > {\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n margin-top: 0;\n }\n }\n ", ";\n "])), (0, _styles.headingsSharedStyles)(themeProps), selectedStyle);
|
|
29
27
|
};
|
|
@@ -32,5 +30,5 @@ var blockTypeMenuItemStyle = function blockTypeMenuItemStyle(tagName, selected)
|
|
|
32
30
|
exports.blockTypeMenuItemStyle = blockTypeMenuItemStyle;
|
|
33
31
|
var keyboardShortcut = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n margin-left: 16px;\n"])), _styles2.shortcutStyle);
|
|
34
32
|
exports.keyboardShortcut = keyboardShortcut;
|
|
35
|
-
var keyboardShortcutSelect = (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n"])), (
|
|
33
|
+
var keyboardShortcutSelect = (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n"])), "var(--ds-icon, ".concat(_colors.N400, ")"));
|
|
36
34
|
exports.keyboardShortcutSelect = keyboardShortcutSelect;
|
|
@@ -59,8 +59,6 @@ var _prosemirrorState = require("prosemirror-state");
|
|
|
59
59
|
|
|
60
60
|
var _isSupportedNode = require("../utils/is-supported-node");
|
|
61
61
|
|
|
62
|
-
var _tokens = require("@atlaskit/tokens");
|
|
63
|
-
|
|
64
62
|
var _constants2 = require("@atlaskit/theme/constants");
|
|
65
63
|
|
|
66
64
|
var _templateObject;
|
|
@@ -69,7 +67,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
69
67
|
|
|
70
68
|
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; } }
|
|
71
69
|
|
|
72
|
-
var toolbarButtonWrapper = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n && button {\n background: ", ";\n color: ", ";\n :hover {\n background: ", ";\n color: ", " !important;\n }\n }\n"])), (
|
|
70
|
+
var toolbarButtonWrapper = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n && button {\n background: ", ";\n color: ", ";\n :hover {\n background: ", ";\n color: ", " !important;\n }\n }\n"])), "var(--ds-background-neutral, ".concat(_colors.N20A, ")"), "var(--ds-icon, ".concat(_colors.N300, ")"), "var(--ds-background-neutral-hovered, ".concat(_colors.B300, ")"), "var(--ds-icon, white)");
|
|
73
71
|
var BREAKOUT_MODE = {
|
|
74
72
|
FULL_WIDTH: 'full-width',
|
|
75
73
|
CENTER: 'center',
|
|
@@ -17,11 +17,9 @@ var _colors = require("@atlaskit/theme/colors");
|
|
|
17
17
|
|
|
18
18
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
19
19
|
|
|
20
|
-
var _tokens = require("@atlaskit/tokens");
|
|
21
|
-
|
|
22
20
|
var _templateObject;
|
|
23
21
|
|
|
24
22
|
var FLOATING_TOOLBAR_LINKPICKER_CLASSNAME = 'card-floating-toolbar--link-picker';
|
|
25
23
|
exports.FLOATING_TOOLBAR_LINKPICKER_CLASSNAME = FLOATING_TOOLBAR_LINKPICKER_CLASSNAME;
|
|
26
|
-
var smartCardStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n max-width: calc(100% - 20px);\n vertical-align: top;\n word-break: break-all;\n\n .card {\n padding-left: 2px;\n padding-right: 2px;\n padding-top: 0.5em;\n padding-bottom: 0.5em;\n margin-bottom: -0.5em;\n\n .", " > a:focus {\n ", "\n }\n }\n\n &.", "\n .", "\n > a {\n ", "\n }\n .", " > a {\n /* EDM-1717: box-shadow Safari fix start */\n z-index: 1;\n position: relative;\n /* EDM-1717: box-shadow Safari fix end */\n }\n\n &.danger {\n .", " > a {\n box-shadow: 0 0 0 1px\n ", ";\n /* EDM-1717: box-shadow Safari fix start */\n z-index: 2;\n /* EDM-1717: box-shadow Safari fix end */\n }\n }\n }\n\n .", " {\n .", " > div {\n cursor: pointer;\n &:hover {\n background-color: ", ";\n }\n }\n\n &.", "\n .", "\n > div {\n ", "\n }\n\n &.danger {\n .", " > div {\n box-shadow: 0 0 0 1px\n ", " !important;\n }\n }\n }\n\n .", " {\n .", " > div {\n cursor: pointer;\n &::after {\n transition: box-shadow 0s;\n }\n }\n &.", "\n .", "\n > div {\n ", "\n }\n\n &.", "\n .", "\n > div::after {\n ", "\n }\n\n &.danger {\n .media-card-frame::after {\n box-shadow: 0 0 0 1px\n ", " !important;\n background: ", " !important;\n }\n .richMedia-resize-handle-right::after,\n .richMedia-resize-handle-left::after {\n background: ", ";\n }\n }\n }\n\n .", " {\n padding: 0;\n }\n"])), _styles.SmartCardSharedCssClassName.INLINE_CARD_CONTAINER, _styles.SmartCardSharedCssClassName.LOADER_WRAPPER, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), _editorSharedStyles.akEditorSelectedNodeClassName, _styles.SmartCardSharedCssClassName.LOADER_WRAPPER, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), _styles.SmartCardSharedCssClassName.LOADER_WRAPPER, _styles.SmartCardSharedCssClassName.LOADER_WRAPPER, (
|
|
24
|
+
var smartCardStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n max-width: calc(100% - 20px);\n vertical-align: top;\n word-break: break-all;\n\n .card {\n padding-left: 2px;\n padding-right: 2px;\n padding-top: 0.5em;\n padding-bottom: 0.5em;\n margin-bottom: -0.5em;\n\n .", " > a:focus {\n ", "\n }\n }\n\n &.", "\n .", "\n > a {\n ", "\n }\n .", " > a {\n /* EDM-1717: box-shadow Safari fix start */\n z-index: 1;\n position: relative;\n /* EDM-1717: box-shadow Safari fix end */\n }\n\n &.danger {\n .", " > a {\n box-shadow: 0 0 0 1px\n ", ";\n /* EDM-1717: box-shadow Safari fix start */\n z-index: 2;\n /* EDM-1717: box-shadow Safari fix end */\n }\n }\n }\n\n .", " {\n .", " > div {\n cursor: pointer;\n &:hover {\n background-color: ", ";\n }\n }\n\n &.", "\n .", "\n > div {\n ", "\n }\n\n &.danger {\n .", " > div {\n box-shadow: 0 0 0 1px\n ", " !important;\n }\n }\n }\n\n .", " {\n .", " > div {\n cursor: pointer;\n &::after {\n transition: box-shadow 0s;\n }\n }\n &.", "\n .", "\n > div {\n ", "\n }\n\n &.", "\n .", "\n > div::after {\n ", "\n }\n\n &.danger {\n .media-card-frame::after {\n box-shadow: 0 0 0 1px\n ", " !important;\n background: ", " !important;\n }\n .richMedia-resize-handle-right::after,\n .richMedia-resize-handle-left::after {\n background: ", ";\n }\n }\n }\n\n .", " {\n padding: 0;\n }\n"])), _styles.SmartCardSharedCssClassName.INLINE_CARD_CONTAINER, _styles.SmartCardSharedCssClassName.LOADER_WRAPPER, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), _editorSharedStyles.akEditorSelectedNodeClassName, _styles.SmartCardSharedCssClassName.LOADER_WRAPPER, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), _styles.SmartCardSharedCssClassName.LOADER_WRAPPER, _styles.SmartCardSharedCssClassName.LOADER_WRAPPER, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), _styles.SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER, _styles.SmartCardSharedCssClassName.LOADER_WRAPPER, "var(--ds-background-neutral-subtle-hovered, ".concat(_colors.N20, ")"), _editorSharedStyles.akEditorSelectedNodeClassName, _styles.SmartCardSharedCssClassName.LOADER_WRAPPER, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), _styles.SmartCardSharedCssClassName.LOADER_WRAPPER, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), _styles.SmartCardSharedCssClassName.EMBED_CARD_CONTAINER, _styles.SmartCardSharedCssClassName.LOADER_WRAPPER, _editorSharedStyles.akEditorSelectedNodeClassName, _styles.SmartCardSharedCssClassName.LOADER_WRAPPER, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), _editorSharedStyles.akEditorSelectedNodeClassName, _styles.SmartCardSharedCssClassName.LOADER_WRAPPER, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), "var(--ds-background-danger, ".concat(_editorSharedStyles.akEditorDeleteBackground, ")"), "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), FLOATING_TOOLBAR_LINKPICKER_CLASSNAME);
|
|
27
25
|
exports.smartCardStyles = smartCardStyles;
|
|
@@ -15,8 +15,6 @@ 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 _classNames = require("./ui/class-names");
|
|
21
19
|
|
|
22
20
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
@@ -24,11 +22,11 @@ var _styles = require("@atlaskit/editor-common/styles");
|
|
|
24
22
|
var _templateObject, _templateObject2;
|
|
25
23
|
|
|
26
24
|
var GutterDangerOverlay = function GutterDangerOverlay() {
|
|
27
|
-
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n &::after {\n height: 100%;\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n width: 24px;\n background-color: ", ";\n }\n"])), (
|
|
25
|
+
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n &::after {\n height: 100%;\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n width: 24px;\n background-color: ", ";\n }\n"])), "var(--ds-blanket-danger, none)");
|
|
28
26
|
};
|
|
29
27
|
|
|
30
28
|
var codeBlockStyles = function codeBlockStyles(props) {
|
|
31
|
-
return (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror {\n ", "\n }\n\n .ProseMirror li {\n /* if same list item has multiple code blocks we need top margin for all but first */\n > .code-block {\n margin: ", " 0 0 0;\n }\n > .code-block:first-child,\n > .ProseMirror-gapcursor:first-child + .code-block {\n margin-top: 0;\n }\n\n > div:last-of-type.code-block {\n margin-bottom: ", ";\n }\n }\n\n .ProseMirror .code-block.", ":not(.danger) {\n ", "\n }\n\n /* Danger when top level node */\n .ProseMirror .danger.code-block {\n box-shadow: 0 0 0 ", "px\n ", ";\n\n .", " {\n background-color: ", ";\n color: ", ";\n ", ";\n }\n\n .", " {\n background-color: ", ";\n }\n }\n\n /* Danger when nested node */\n .ProseMirror .danger .code-block {\n .", " {\n background-color: ", ";\n color: ", ";\n ", ";\n }\n\n .", " {\n background-color: ", ";\n }\n }\n"])), (0, _styles.codeBlockSharedStyles)(props), _editorSharedStyles.blockNodesVerticalMargin, _editorSharedStyles.blockNodesVerticalMargin, _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow, _editorSharedStyles.SelectionStyle.Blanket]), _editorSharedStyles.akEditorSelectedBorderSize, (
|
|
29
|
+
return (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror {\n ", "\n }\n\n .ProseMirror li {\n /* if same list item has multiple code blocks we need top margin for all but first */\n > .code-block {\n margin: ", " 0 0 0;\n }\n > .code-block:first-child,\n > .ProseMirror-gapcursor:first-child + .code-block {\n margin-top: 0;\n }\n\n > div:last-of-type.code-block {\n margin-bottom: ", ";\n }\n }\n\n .ProseMirror .code-block.", ":not(.danger) {\n ", "\n }\n\n /* Danger when top level node */\n .ProseMirror .danger.code-block {\n box-shadow: 0 0 0 ", "px\n ", ";\n\n .", " {\n background-color: ", ";\n color: ", ";\n ", ";\n }\n\n .", " {\n background-color: ", ";\n }\n }\n\n /* Danger when nested node */\n .ProseMirror .danger .code-block {\n .", " {\n background-color: ", ";\n color: ", ";\n ", ";\n }\n\n .", " {\n background-color: ", ";\n }\n }\n"])), (0, _styles.codeBlockSharedStyles)(props), _editorSharedStyles.blockNodesVerticalMargin, _editorSharedStyles.blockNodesVerticalMargin, _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow, _editorSharedStyles.SelectionStyle.Blanket]), _editorSharedStyles.akEditorSelectedBorderSize, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), _classNames.codeBlockClassNames.gutter, "var(--ds-background-danger, ".concat(_colors.R75, ")"), "var(--ds-text-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), GutterDangerOverlay(), _classNames.codeBlockClassNames.content, "var(--ds-blanket-danger, ".concat(_editorSharedStyles.akEditorDeleteBackground, ")"), _classNames.codeBlockClassNames.gutter, "var(--ds-background-danger, rgba(255, 143, 115, 0.5))", "var(--ds-text-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), GutterDangerOverlay(), _classNames.codeBlockClassNames.content, "var(--ds-blanket-danger, rgba(255, 189, 173, 0.5))");
|
|
32
30
|
};
|
|
33
31
|
|
|
34
32
|
exports.codeBlockStyles = codeBlockStyles;
|