@atlaskit/editor-core 187.8.3 → 187.8.10
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 +15 -0
- package/dist/cjs/create-editor/ReactEditorViewInternal.js +4 -5
- package/dist/cjs/index.js +0 -6
- package/dist/cjs/plugins/annotation/commands/transform.js +2 -2
- package/dist/cjs/plugins/base/pm-plugins/newline-preserve-marks.js +1 -1
- package/dist/cjs/plugins/block-type/commands/block-type.js +2 -2
- package/dist/cjs/plugins/block-type/pm-plugins/keymap.js +4 -4
- package/dist/cjs/plugins/block-type/ui/ToolbarBlockType/index.js +2 -2
- package/dist/cjs/plugins/code-block/pm-plugins/ide-ux.js +5 -5
- package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +2 -2
- package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu-legacy.js +2 -2
- package/dist/cjs/plugins/layout/pm-plugins/main.js +1 -1
- package/dist/cjs/plugins/list/actions/conversions.js +5 -5
- package/dist/cjs/plugins/list/actions/indent-list-items-selected.js +11 -11
- package/dist/cjs/plugins/list/actions/join-list-items-forward.js +6 -6
- package/dist/cjs/plugins/list/actions/join-list-items-scenarios/join-list-item-with-paragraph.js +6 -7
- package/dist/cjs/plugins/list/actions/join-list-items-scenarios/join-list-item-with-parent-nested-list.js +3 -4
- package/dist/cjs/plugins/list/actions/join-list-items-scenarios/join-nested-list-with-parent-list-item.js +3 -4
- package/dist/cjs/plugins/list/actions/join-list-items-scenarios/join-paragraph-with-list.js +2 -2
- package/dist/cjs/plugins/list/actions/join-list-items-scenarios/join-sibling-list-items.js +2 -2
- package/dist/cjs/plugins/list/actions/merge-lists.js +3 -3
- package/dist/cjs/plugins/list/actions/outdent-list-items-selected.js +11 -11
- package/dist/cjs/plugins/list/actions/wrap-and-join-lists.js +2 -2
- package/dist/cjs/plugins/list/commands/indent-list.js +6 -7
- package/dist/cjs/plugins/list/commands/index.js +8 -10
- package/dist/cjs/plugins/list/commands/join-list-item-forward.js +5 -5
- package/dist/cjs/plugins/list/commands/listBackspace.js +13 -14
- package/dist/cjs/plugins/list/commands/outdent-list.js +4 -3
- package/dist/cjs/plugins/list/pm-plugins/main.js +5 -6
- package/dist/cjs/plugins/list/utils/analytics.js +1 -35
- package/dist/cjs/plugins/list/utils/indentation.js +2 -20
- package/dist/cjs/plugins/list/utils/node.js +2 -106
- package/dist/cjs/plugins/list/utils/selection.js +3 -54
- package/dist/cjs/plugins/tasks-and-decisions/commands.js +2 -2
- package/dist/cjs/plugins/tasks-and-decisions/pm-plugins/keymaps.js +17 -18
- package/dist/cjs/plugins/text-color/commands/toggle-color.js +2 -2
- package/dist/cjs/plugins/text-formatting/commands/text-formatting.js +9 -9
- package/dist/cjs/plugins/text-formatting/commands/transform-to-code.js +2 -2
- package/dist/cjs/plugins/text-formatting/pm-plugins/clear-formatting.js +2 -5
- package/dist/cjs/plugins/text-formatting/pm-plugins/input-rule.js +2 -2
- package/dist/cjs/plugins/text-formatting/pm-plugins/main.js +2 -1
- package/dist/cjs/plugins/text-formatting/ui/Toolbar/dropdown-menu.js +2 -2
- package/dist/cjs/plugins/text-formatting/ui/Toolbar/hooks/formatting-icons.js +2 -3
- package/dist/cjs/plugins/toolbar-lists-indentation/pm-plugins/indentation-buttons.js +2 -1
- package/dist/cjs/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.js +2 -2
- package/dist/cjs/ui/Appearance/Comment/Comment.js +5 -6
- package/dist/cjs/ui/Appearance/Comment/Toolbar.js +2 -2
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +2 -2
- package/dist/cjs/ui/Appearance/FullPage/FullPageToolbar.js +5 -5
- package/dist/cjs/ui/Dropdown/index.js +1 -2
- package/dist/cjs/ui/styles.js +3 -5
- package/dist/cjs/utils/commands.js +3 -222
- package/dist/cjs/utils/document.js +1 -26
- package/dist/cjs/utils/index.js +0 -19
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/create-editor/ReactEditorViewInternal.js +3 -6
- package/dist/es2019/index.js +1 -1
- package/dist/es2019/plugins/annotation/commands/transform.js +1 -1
- package/dist/es2019/plugins/base/pm-plugins/newline-preserve-marks.js +1 -1
- package/dist/es2019/plugins/block-type/commands/block-type.js +1 -1
- package/dist/es2019/plugins/block-type/pm-plugins/keymap.js +1 -1
- package/dist/es2019/plugins/block-type/ui/ToolbarBlockType/index.js +1 -1
- package/dist/es2019/plugins/code-block/pm-plugins/ide-ux.js +1 -1
- package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +3 -5
- package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu-legacy.js +1 -1
- package/dist/es2019/plugins/layout/pm-plugins/main.js +1 -1
- package/dist/es2019/plugins/list/actions/conversions.js +2 -2
- package/dist/es2019/plugins/list/actions/indent-list-items-selected.js +2 -2
- package/dist/es2019/plugins/list/actions/join-list-items-forward.js +1 -1
- package/dist/es2019/plugins/list/actions/join-list-items-scenarios/join-list-item-with-paragraph.js +1 -2
- package/dist/es2019/plugins/list/actions/join-list-items-scenarios/join-list-item-with-parent-nested-list.js +2 -2
- package/dist/es2019/plugins/list/actions/join-list-items-scenarios/join-nested-list-with-parent-list-item.js +2 -2
- package/dist/es2019/plugins/list/actions/join-list-items-scenarios/join-paragraph-with-list.js +1 -1
- package/dist/es2019/plugins/list/actions/join-list-items-scenarios/join-sibling-list-items.js +1 -1
- package/dist/es2019/plugins/list/actions/merge-lists.js +1 -1
- package/dist/es2019/plugins/list/actions/outdent-list-items-selected.js +3 -3
- package/dist/es2019/plugins/list/actions/wrap-and-join-lists.js +1 -1
- package/dist/es2019/plugins/list/commands/indent-list.js +3 -4
- package/dist/es2019/plugins/list/commands/index.js +4 -5
- package/dist/es2019/plugins/list/commands/join-list-item-forward.js +1 -1
- package/dist/es2019/plugins/list/commands/listBackspace.js +1 -2
- package/dist/es2019/plugins/list/commands/outdent-list.js +3 -2
- package/dist/es2019/plugins/list/pm-plugins/main.js +1 -1
- package/dist/es2019/plugins/list/utils/analytics.js +0 -36
- package/dist/es2019/plugins/list/utils/indentation.js +0 -18
- package/dist/es2019/plugins/list/utils/node.js +3 -89
- package/dist/es2019/plugins/list/utils/selection.js +1 -52
- package/dist/es2019/plugins/tasks-and-decisions/commands.js +1 -1
- package/dist/es2019/plugins/tasks-and-decisions/pm-plugins/keymaps.js +1 -2
- package/dist/es2019/plugins/text-color/commands/toggle-color.js +1 -1
- package/dist/es2019/plugins/text-formatting/commands/text-formatting.js +1 -1
- package/dist/es2019/plugins/text-formatting/commands/transform-to-code.js +1 -1
- package/dist/es2019/plugins/text-formatting/pm-plugins/clear-formatting.js +2 -2
- package/dist/es2019/plugins/text-formatting/pm-plugins/input-rule.js +1 -1
- package/dist/es2019/plugins/text-formatting/pm-plugins/main.js +2 -1
- package/dist/es2019/plugins/text-formatting/ui/Toolbar/dropdown-menu.js +1 -1
- package/dist/es2019/plugins/text-formatting/ui/Toolbar/hooks/formatting-icons.js +1 -2
- package/dist/es2019/plugins/toolbar-lists-indentation/pm-plugins/indentation-buttons.js +2 -1
- package/dist/es2019/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.js +1 -1
- package/dist/es2019/ui/Appearance/Comment/Comment.js +6 -5
- package/dist/es2019/ui/Appearance/Comment/Toolbar.js +3 -2
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +2 -3
- package/dist/es2019/ui/Appearance/FullPage/FullPageToolbar.js +2 -2
- package/dist/es2019/ui/Dropdown/index.js +1 -2
- package/dist/es2019/ui/ElementBrowser/InsertMenu.js +1 -0
- package/dist/es2019/ui/styles.js +0 -5
- package/dist/es2019/utils/commands.js +2 -214
- package/dist/es2019/utils/document.js +1 -26
- package/dist/es2019/utils/index.js +1 -13
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/create-editor/ReactEditorViewInternal.js +3 -6
- package/dist/esm/index.js +1 -1
- package/dist/esm/plugins/annotation/commands/transform.js +1 -1
- package/dist/esm/plugins/base/pm-plugins/newline-preserve-marks.js +1 -1
- package/dist/esm/plugins/block-type/commands/block-type.js +1 -1
- package/dist/esm/plugins/block-type/pm-plugins/keymap.js +1 -1
- package/dist/esm/plugins/block-type/ui/ToolbarBlockType/index.js +1 -1
- package/dist/esm/plugins/code-block/pm-plugins/ide-ux.js +1 -1
- package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +3 -5
- package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu-legacy.js +1 -1
- package/dist/esm/plugins/layout/pm-plugins/main.js +1 -1
- package/dist/esm/plugins/list/actions/conversions.js +2 -2
- package/dist/esm/plugins/list/actions/indent-list-items-selected.js +2 -2
- package/dist/esm/plugins/list/actions/join-list-items-forward.js +1 -1
- package/dist/esm/plugins/list/actions/join-list-items-scenarios/join-list-item-with-paragraph.js +1 -2
- package/dist/esm/plugins/list/actions/join-list-items-scenarios/join-list-item-with-parent-nested-list.js +2 -2
- package/dist/esm/plugins/list/actions/join-list-items-scenarios/join-nested-list-with-parent-list-item.js +2 -2
- package/dist/esm/plugins/list/actions/join-list-items-scenarios/join-paragraph-with-list.js +1 -1
- package/dist/esm/plugins/list/actions/join-list-items-scenarios/join-sibling-list-items.js +1 -1
- package/dist/esm/plugins/list/actions/merge-lists.js +1 -1
- package/dist/esm/plugins/list/actions/outdent-list-items-selected.js +3 -3
- package/dist/esm/plugins/list/actions/wrap-and-join-lists.js +1 -1
- package/dist/esm/plugins/list/commands/indent-list.js +3 -4
- package/dist/esm/plugins/list/commands/index.js +4 -5
- package/dist/esm/plugins/list/commands/join-list-item-forward.js +1 -1
- package/dist/esm/plugins/list/commands/listBackspace.js +1 -2
- package/dist/esm/plugins/list/commands/outdent-list.js +3 -2
- package/dist/esm/plugins/list/pm-plugins/main.js +1 -1
- package/dist/esm/plugins/list/utils/analytics.js +0 -32
- package/dist/esm/plugins/list/utils/indentation.js +0 -17
- package/dist/esm/plugins/list/utils/node.js +3 -81
- package/dist/esm/plugins/list/utils/selection.js +3 -51
- package/dist/esm/plugins/tasks-and-decisions/commands.js +1 -1
- package/dist/esm/plugins/tasks-and-decisions/pm-plugins/keymaps.js +1 -2
- package/dist/esm/plugins/text-color/commands/toggle-color.js +1 -1
- package/dist/esm/plugins/text-formatting/commands/text-formatting.js +1 -1
- package/dist/esm/plugins/text-formatting/commands/transform-to-code.js +1 -1
- package/dist/esm/plugins/text-formatting/pm-plugins/clear-formatting.js +2 -2
- package/dist/esm/plugins/text-formatting/pm-plugins/input-rule.js +1 -1
- package/dist/esm/plugins/text-formatting/pm-plugins/main.js +2 -1
- package/dist/esm/plugins/text-formatting/ui/Toolbar/dropdown-menu.js +1 -1
- package/dist/esm/plugins/text-formatting/ui/Toolbar/hooks/formatting-icons.js +1 -2
- package/dist/esm/plugins/toolbar-lists-indentation/pm-plugins/indentation-buttons.js +2 -1
- package/dist/esm/plugins/toolbar-lists-indentation/ui/ToolbarDropdown.js +1 -1
- package/dist/esm/ui/Appearance/Comment/Comment.js +4 -5
- package/dist/esm/ui/Appearance/Comment/Toolbar.js +3 -2
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +2 -3
- package/dist/esm/ui/Appearance/FullPage/FullPageToolbar.js +2 -2
- package/dist/esm/ui/Dropdown/index.js +1 -2
- package/dist/esm/ui/ElementBrowser/InsertMenu.js +1 -0
- package/dist/esm/ui/styles.js +2 -3
- package/dist/esm/utils/commands.js +2 -211
- package/dist/esm/utils/document.js +1 -26
- package/dist/esm/utils/index.js +1 -13
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/create-editor/ReactEditorViewInternal.d.ts +0 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/plugins/block-type/commands/block-type.d.ts +1 -2
- package/dist/types/plugins/code-block/ide-ux/quote-handling.d.ts +1 -1
- package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu-legacy.d.ts +1 -1
- package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/create-items.d.ts +1 -1
- package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/item.d.ts +1 -1
- package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/sort-items.d.ts +1 -1
- package/dist/types/plugins/insert-block/ui/ToolbarInsertBlock/types.d.ts +1 -1
- package/dist/types/plugins/list/actions/join-list-items-forward.d.ts +1 -1
- package/dist/types/plugins/list/commands/indent-list.d.ts +2 -1
- package/dist/types/plugins/list/commands/index.d.ts +2 -1
- package/dist/types/plugins/list/commands/join-list-item-forward.d.ts +1 -1
- package/dist/types/plugins/list/commands/listBackspace.d.ts +1 -1
- package/dist/types/plugins/list/commands/outdent-list.d.ts +2 -1
- package/dist/types/plugins/list/utils/analytics.d.ts +2 -4
- package/dist/types/plugins/list/utils/indentation.d.ts +0 -5
- package/dist/types/plugins/list/utils/node.d.ts +2 -17
- package/dist/types/plugins/list/utils/selection.d.ts +1 -12
- package/dist/types/plugins/text-color/commands/toggle-color.d.ts +1 -1
- package/dist/types/plugins/text-formatting/pm-plugins/clear-formatting.d.ts +2 -2
- package/dist/types/plugins/text-formatting/pm-plugins/smart-input-rule.d.ts +1 -1
- package/dist/types/types/editor-appearance-component.d.ts +4 -4
- package/dist/types/types/editor-instance.d.ts +1 -1
- package/dist/types/types/editor-props.d.ts +5 -8
- package/dist/types/ui/Appearance/Comment/Comment.d.ts +2 -2
- package/dist/types/ui/Appearance/Comment/Toolbar.d.ts +1 -2
- package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +1 -1
- package/dist/types/ui/ColorPickerButton/index.d.ts +1 -1
- package/dist/types/ui/ContentStyles/index.d.ts +2 -2
- package/dist/types/ui/ElementBrowser/InsertMenu.d.ts +1 -1
- package/dist/types/ui/ElementBrowser/components/StatelessElementBrowser.d.ts +1 -1
- package/dist/types/ui/ElementBrowser/types.d.ts +1 -1
- package/dist/types/ui/styles.d.ts +0 -1
- package/dist/types/utils/commands.d.ts +3 -42
- package/dist/types/utils/document.d.ts +0 -4
- package/dist/types/utils/index.d.ts +1 -5
- package/dist/types-ts4.5/create-editor/ReactEditorViewInternal.d.ts +0 -1
- package/dist/types-ts4.5/index.d.ts +1 -1
- package/dist/types-ts4.5/plugins/block-type/commands/block-type.d.ts +1 -2
- package/dist/types-ts4.5/plugins/code-block/ide-ux/quote-handling.d.ts +1 -1
- package/dist/types-ts4.5/plugins/insert-block/ui/ToolbarInsertBlock/block-insert-menu-legacy.d.ts +1 -1
- package/dist/types-ts4.5/plugins/insert-block/ui/ToolbarInsertBlock/create-items.d.ts +1 -1
- package/dist/types-ts4.5/plugins/insert-block/ui/ToolbarInsertBlock/item.d.ts +1 -1
- package/dist/types-ts4.5/plugins/insert-block/ui/ToolbarInsertBlock/sort-items.d.ts +1 -1
- package/dist/types-ts4.5/plugins/insert-block/ui/ToolbarInsertBlock/types.d.ts +1 -1
- package/dist/types-ts4.5/plugins/list/actions/join-list-items-forward.d.ts +1 -1
- package/dist/types-ts4.5/plugins/list/commands/indent-list.d.ts +2 -1
- package/dist/types-ts4.5/plugins/list/commands/index.d.ts +2 -1
- package/dist/types-ts4.5/plugins/list/commands/join-list-item-forward.d.ts +1 -1
- package/dist/types-ts4.5/plugins/list/commands/listBackspace.d.ts +1 -1
- package/dist/types-ts4.5/plugins/list/commands/outdent-list.d.ts +2 -1
- package/dist/types-ts4.5/plugins/list/utils/analytics.d.ts +2 -4
- package/dist/types-ts4.5/plugins/list/utils/indentation.d.ts +0 -5
- package/dist/types-ts4.5/plugins/list/utils/node.d.ts +2 -17
- package/dist/types-ts4.5/plugins/list/utils/selection.d.ts +1 -12
- package/dist/types-ts4.5/plugins/text-color/commands/toggle-color.d.ts +1 -1
- package/dist/types-ts4.5/plugins/text-formatting/pm-plugins/clear-formatting.d.ts +2 -2
- package/dist/types-ts4.5/plugins/text-formatting/pm-plugins/smart-input-rule.d.ts +1 -1
- package/dist/types-ts4.5/types/editor-appearance-component.d.ts +4 -4
- package/dist/types-ts4.5/types/editor-instance.d.ts +1 -1
- package/dist/types-ts4.5/types/editor-props.d.ts +5 -8
- package/dist/types-ts4.5/ui/Appearance/Comment/Comment.d.ts +2 -2
- package/dist/types-ts4.5/ui/Appearance/Comment/Toolbar.d.ts +1 -2
- package/dist/types-ts4.5/ui/Appearance/FullPage/StyledComponents.d.ts +1 -1
- package/dist/types-ts4.5/ui/ColorPickerButton/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/ContentStyles/index.d.ts +2 -2
- package/dist/types-ts4.5/ui/ElementBrowser/InsertMenu.d.ts +1 -1
- package/dist/types-ts4.5/ui/ElementBrowser/components/StatelessElementBrowser.d.ts +1 -1
- package/dist/types-ts4.5/ui/ElementBrowser/types.d.ts +1 -1
- package/dist/types-ts4.5/ui/styles.d.ts +0 -1
- package/dist/types-ts4.5/utils/commands.d.ts +3 -48
- package/dist/types-ts4.5/utils/document.d.ts +0 -4
- package/dist/types-ts4.5/utils/index.d.ts +1 -5
- package/package.json +3 -3
- package/report.api.md +2 -13
- package/tmp/api-report-tmp.d.ts +2 -10
- package/dist/cjs/plugins/list/utils/replace-content.js +0 -24
- package/dist/cjs/ui/Appearance/FullPage/messages.js +0 -25
- package/dist/cjs/ui/DropdownMenu/index.js +0 -31
- package/dist/cjs/ui/DropdownMenu/types.js +0 -5
- package/dist/cjs/ui/ToolbarArrowKeyNavigationProvider/index.js +0 -218
- package/dist/cjs/utils/prosemirror/autojoin.js +0 -68
- package/dist/es2019/plugins/list/utils/replace-content.js +0 -18
- package/dist/es2019/ui/Appearance/FullPage/messages.js +0 -18
- package/dist/es2019/ui/DropdownMenu/index.js +0 -18
- package/dist/es2019/ui/DropdownMenu/types.js +0 -1
- package/dist/es2019/ui/ToolbarArrowKeyNavigationProvider/index.js +0 -205
- package/dist/es2019/utils/prosemirror/autojoin.js +0 -57
- package/dist/esm/plugins/list/utils/replace-content.js +0 -17
- package/dist/esm/ui/Appearance/FullPage/messages.js +0 -18
- package/dist/esm/ui/DropdownMenu/index.js +0 -20
- package/dist/esm/ui/DropdownMenu/types.js +0 -1
- package/dist/esm/ui/ToolbarArrowKeyNavigationProvider/index.js +0 -205
- package/dist/esm/utils/prosemirror/autojoin.js +0 -63
- package/dist/types/plugins/list/utils/replace-content.d.ts +0 -8
- package/dist/types/ui/Appearance/FullPage/messages.d.ts +0 -18
- package/dist/types/ui/DropdownMenu/index.d.ts +0 -3
- package/dist/types/ui/DropdownMenu/types.d.ts +0 -1
- package/dist/types/ui/ToolbarArrowKeyNavigationProvider/index.d.ts +0 -31
- package/dist/types/utils/prosemirror/autojoin.d.ts +0 -13
- package/dist/types-ts4.5/plugins/list/utils/replace-content.d.ts +0 -8
- package/dist/types-ts4.5/ui/Appearance/FullPage/messages.d.ts +0 -18
- package/dist/types-ts4.5/ui/DropdownMenu/index.d.ts +0 -3
- package/dist/types-ts4.5/ui/DropdownMenu/types.d.ts +0 -1
- package/dist/types-ts4.5/ui/ToolbarArrowKeyNavigationProvider/index.d.ts +0 -31
- package/dist/types-ts4.5/utils/prosemirror/autojoin.d.ts +0 -13
package/dist/cjs/ui/styles.js
CHANGED
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.expandIconWrapperStyle = exports.clickSelectWrapperStyle = exports.
|
|
7
|
+
exports.expandIconWrapperStyle = exports.clickSelectWrapperStyle = exports.buttonContentStyle = exports.buttonContentReducedSpacingStyle = void 0;
|
|
8
8
|
Object.defineProperty(exports, "scrollbarStyles", {
|
|
9
9
|
enumerable: true,
|
|
10
10
|
get: function get() {
|
|
@@ -22,7 +22,7 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
|
|
|
22
22
|
var _react = require("@emotion/react");
|
|
23
23
|
var _shortcut = require("@atlaskit/editor-shared-styles/shortcut");
|
|
24
24
|
var _scrollbar = require("@atlaskit/editor-shared-styles/scrollbar");
|
|
25
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5
|
|
25
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
26
26
|
var wrapperSmallStyle = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n margin-left: ", ";\n min-width: 40px;\n"])), "var(--ds-space-050, 4px)");
|
|
27
27
|
exports.wrapperSmallStyle = wrapperSmallStyle;
|
|
28
28
|
var expandIconWrapperStyle = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n margin-left: -8px;\n"])));
|
|
@@ -32,6 +32,4 @@ exports.buttonContentStyle = buttonContentStyle;
|
|
|
32
32
|
var buttonContentReducedSpacingStyle = (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n padding: ", ";\n"])), "var(--ds-space-100, 8px)");
|
|
33
33
|
exports.buttonContentReducedSpacingStyle = buttonContentReducedSpacingStyle;
|
|
34
34
|
var clickSelectWrapperStyle = (0, _react.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n user-select: all;\n"])));
|
|
35
|
-
exports.clickSelectWrapperStyle = clickSelectWrapperStyle;
|
|
36
|
-
var centeredToolbarContainer = (0, _react.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n width: 100%;\n align-items: center;\n"])));
|
|
37
|
-
exports.centeredToolbarContainer = centeredToolbarContainer;
|
|
35
|
+
exports.clickSelectWrapperStyle = clickSelectWrapperStyle;
|
|
@@ -1,32 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
|
-
exports.deleteEmptyParagraphAndMoveBlockUp = exports.applyMarkOnRange = void 0;
|
|
8
6
|
exports.findCutBefore = findCutBefore;
|
|
9
|
-
exports.withScrollIntoView = exports.
|
|
10
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
7
|
+
exports.withScrollIntoView = exports.selectNode = exports.isNthParentOfType = exports.isFirstChildOfParent = void 0;
|
|
11
8
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
12
|
-
var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
|
|
13
|
-
var _transformToCode = require("../plugins/text-formatting/commands/transform-to-code");
|
|
14
9
|
var _selection = require("@atlaskit/editor-common/selection");
|
|
15
|
-
var _utils = require("@atlaskit/editor-common/utils");
|
|
16
|
-
var isEmptySelectionAtStart = function isEmptySelectionAtStart(state) {
|
|
17
|
-
var _state$selection = state.selection,
|
|
18
|
-
empty = _state$selection.empty,
|
|
19
|
-
$from = _state$selection.$from;
|
|
20
|
-
return empty && ($from.parentOffset === 0 || state.selection instanceof _selection.GapCursorSelection);
|
|
21
|
-
};
|
|
22
|
-
exports.isEmptySelectionAtStart = isEmptySelectionAtStart;
|
|
23
|
-
var isEmptySelectionAtEnd = function isEmptySelectionAtEnd(state) {
|
|
24
|
-
var _state$selection2 = state.selection,
|
|
25
|
-
empty = _state$selection2.empty,
|
|
26
|
-
$from = _state$selection2.$from;
|
|
27
|
-
return empty && ($from.end() === $from.pos || state.selection instanceof _selection.GapCursorSelection);
|
|
28
|
-
};
|
|
29
|
-
exports.isEmptySelectionAtEnd = isEmptySelectionAtEnd;
|
|
30
10
|
var isFirstChildOfParent = function isFirstChildOfParent(state) {
|
|
31
11
|
var $from = state.selection.$from;
|
|
32
12
|
return $from.depth > 1 ? state.selection instanceof _selection.GapCursorSelection && $from.parentOffset === 0 || $from.index($from.depth - 1) === 0 : true;
|
|
@@ -73,117 +53,6 @@ function findCutBefore($pos) {
|
|
|
73
53
|
}
|
|
74
54
|
return null;
|
|
75
55
|
}
|
|
76
|
-
var applyMarkOnRange = function applyMarkOnRange(from, to, removeMark, mark, tr) {
|
|
77
|
-
var schema = tr.doc.type.schema;
|
|
78
|
-
var code = schema.marks.code;
|
|
79
|
-
if (mark.type === code) {
|
|
80
|
-
(0, _transformToCode.transformSmartCharsMentionsAndEmojis)(from, to, tr);
|
|
81
|
-
}
|
|
82
|
-
tr.doc.nodesBetween(tr.mapping.map(from), tr.mapping.map(to), function (node, pos) {
|
|
83
|
-
if (!node.isText) {
|
|
84
|
-
return true;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
// This is an issue when the user selects some text.
|
|
88
|
-
// We need to check if the current node position is less than the range selection from.
|
|
89
|
-
// If it’s true, that means we should apply the mark using the range selection,
|
|
90
|
-
// not the current node position.
|
|
91
|
-
var nodeBetweenFrom = Math.max(pos, tr.mapping.map(from));
|
|
92
|
-
var nodeBetweenTo = Math.min(pos + node.nodeSize, tr.mapping.map(to));
|
|
93
|
-
if (removeMark) {
|
|
94
|
-
tr.removeMark(nodeBetweenFrom, nodeBetweenTo, mark);
|
|
95
|
-
} else {
|
|
96
|
-
tr.addMark(nodeBetweenFrom, nodeBetweenTo, mark);
|
|
97
|
-
}
|
|
98
|
-
return true;
|
|
99
|
-
});
|
|
100
|
-
return tr;
|
|
101
|
-
};
|
|
102
|
-
exports.applyMarkOnRange = applyMarkOnRange;
|
|
103
|
-
var entireSelectionContainsMark = function entireSelectionContainsMark(mark, doc, fromPos, toPos) {
|
|
104
|
-
var onlyContainsMark = true;
|
|
105
|
-
doc.nodesBetween(fromPos, toPos, function (node) {
|
|
106
|
-
// Skip recursion once we've found text which doesn't include the mark
|
|
107
|
-
if (!onlyContainsMark) {
|
|
108
|
-
return false;
|
|
109
|
-
}
|
|
110
|
-
if (node.isText) {
|
|
111
|
-
onlyContainsMark && (onlyContainsMark = mark.isInSet(node.marks));
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
return onlyContainsMark;
|
|
115
|
-
};
|
|
116
|
-
var toggleMarkInRange = function toggleMarkInRange(mark) {
|
|
117
|
-
return function (state, dispatch) {
|
|
118
|
-
var tr = state.tr;
|
|
119
|
-
if (state.selection instanceof _cellSelection.CellSelection) {
|
|
120
|
-
var removeMark = true;
|
|
121
|
-
var cells = [];
|
|
122
|
-
state.selection.forEachCell(function (cell, cellPos) {
|
|
123
|
-
cells.push({
|
|
124
|
-
node: cell,
|
|
125
|
-
pos: cellPos
|
|
126
|
-
});
|
|
127
|
-
var from = cellPos;
|
|
128
|
-
var to = cellPos + cell.nodeSize;
|
|
129
|
-
removeMark && (removeMark = entireSelectionContainsMark(mark, state.doc, from, to));
|
|
130
|
-
});
|
|
131
|
-
for (var i = cells.length - 1; i >= 0; i--) {
|
|
132
|
-
var cell = cells[i];
|
|
133
|
-
var from = cell.pos;
|
|
134
|
-
var to = from + cell.node.nodeSize;
|
|
135
|
-
applyMarkOnRange(from, to, removeMark, mark, tr);
|
|
136
|
-
}
|
|
137
|
-
} else {
|
|
138
|
-
var _state$selection3 = state.selection,
|
|
139
|
-
$from = _state$selection3.$from,
|
|
140
|
-
$to = _state$selection3.$to;
|
|
141
|
-
// We decide to remove the mark only if the entire selection contains the mark
|
|
142
|
-
// Examples with *bold* text
|
|
143
|
-
// Scenario 1: Selection contains both bold and non-bold text -> bold entire selection
|
|
144
|
-
// Scenario 2: Selection contains only bold text -> un-bold entire selection
|
|
145
|
-
// Scenario 3: Selection contains no bold text -> bold entire selection
|
|
146
|
-
var _removeMark = entireSelectionContainsMark(mark, state.doc, $from.pos, $to.pos);
|
|
147
|
-
applyMarkOnRange($from.pos, $to.pos, _removeMark, mark, tr);
|
|
148
|
-
}
|
|
149
|
-
if (tr.docChanged) {
|
|
150
|
-
if (dispatch) {
|
|
151
|
-
dispatch(tr);
|
|
152
|
-
}
|
|
153
|
-
return true;
|
|
154
|
-
}
|
|
155
|
-
return false;
|
|
156
|
-
};
|
|
157
|
-
};
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
* A wrapper over the default toggleMark, except when we have a selection
|
|
161
|
-
* we only toggle marks on text nodes rather than inline nodes.
|
|
162
|
-
* @param markType
|
|
163
|
-
* @param attrs
|
|
164
|
-
*/
|
|
165
|
-
var toggleMark = function toggleMark(markType, attrs) {
|
|
166
|
-
return function (state, dispatch) {
|
|
167
|
-
var mark = markType.create(attrs);
|
|
168
|
-
|
|
169
|
-
// For cursor selections we can use the default behaviour.
|
|
170
|
-
if (state.selection instanceof _state.TextSelection && state.selection.$cursor) {
|
|
171
|
-
var tr = state.tr;
|
|
172
|
-
if (mark.isInSet(state.storedMarks || state.selection.$cursor.marks())) {
|
|
173
|
-
tr.removeStoredMark(mark);
|
|
174
|
-
} else {
|
|
175
|
-
tr.addStoredMark(mark);
|
|
176
|
-
}
|
|
177
|
-
if (dispatch) {
|
|
178
|
-
dispatch(tr);
|
|
179
|
-
return true;
|
|
180
|
-
}
|
|
181
|
-
return false;
|
|
182
|
-
}
|
|
183
|
-
return toggleMarkInRange(mark)(state, dispatch);
|
|
184
|
-
};
|
|
185
|
-
};
|
|
186
|
-
exports.toggleMark = toggleMark;
|
|
187
56
|
var withScrollIntoView = function withScrollIntoView(command) {
|
|
188
57
|
return function (state, dispatch, view) {
|
|
189
58
|
return command(state, function (tr) {
|
|
@@ -194,46 +63,6 @@ var withScrollIntoView = function withScrollIntoView(command) {
|
|
|
194
63
|
}, view);
|
|
195
64
|
};
|
|
196
65
|
};
|
|
197
|
-
exports.withScrollIntoView = withScrollIntoView;
|
|
198
|
-
/**
|
|
199
|
-
* Walk forwards from a position until we encounter the (inside) start of
|
|
200
|
-
* the next node, or reach the end of the document.
|
|
201
|
-
*
|
|
202
|
-
* @param $startPos Position to start walking from.
|
|
203
|
-
*/
|
|
204
|
-
var walkNextNode = function walkNextNode($startPos) {
|
|
205
|
-
var $pos = $startPos;
|
|
206
|
-
|
|
207
|
-
// invariant 1: don't walk past the end of the document
|
|
208
|
-
// invariant 2: we are at the beginning or
|
|
209
|
-
// we haven't walked to the start of *any* node
|
|
210
|
-
// parentOffset includes textOffset.
|
|
211
|
-
while ($pos.pos < $pos.doc.nodeSize - 2 && ($pos.pos === $startPos.pos || $pos.parentOffset > 0)) {
|
|
212
|
-
$pos = $pos.doc.resolve($pos.pos + 1);
|
|
213
|
-
}
|
|
214
|
-
return {
|
|
215
|
-
$pos: $pos,
|
|
216
|
-
foundNode: $pos.pos < $pos.doc.nodeSize - 2
|
|
217
|
-
};
|
|
218
|
-
};
|
|
219
|
-
|
|
220
|
-
/**
|
|
221
|
-
* Walk backwards from a position until we encounter the (inside) end of
|
|
222
|
-
* the previous node, or reach the start of the document.
|
|
223
|
-
*
|
|
224
|
-
* @param $startPos Position to start walking from.
|
|
225
|
-
*/
|
|
226
|
-
exports.walkNextNode = walkNextNode;
|
|
227
|
-
var walkPrevNode = function walkPrevNode($startPos) {
|
|
228
|
-
var $pos = $startPos;
|
|
229
|
-
while ($pos.pos > 0 && ($pos.pos === $startPos.pos || $pos.parentOffset < $pos.parent.nodeSize - 2)) {
|
|
230
|
-
$pos = $pos.doc.resolve($pos.pos - 1);
|
|
231
|
-
}
|
|
232
|
-
return {
|
|
233
|
-
$pos: $pos,
|
|
234
|
-
foundNode: $pos.pos > 0
|
|
235
|
-
};
|
|
236
|
-
};
|
|
237
66
|
|
|
238
67
|
/**
|
|
239
68
|
* Insert content, delete a range and create a new selection
|
|
@@ -244,23 +73,7 @@ var walkPrevNode = function walkPrevNode($startPos) {
|
|
|
244
73
|
* @param insertions content to insert at the specified position
|
|
245
74
|
* @param deletions the ranges to delete
|
|
246
75
|
*/
|
|
247
|
-
exports.
|
|
248
|
-
var insertContentDeleteRange = function insertContentDeleteRange(tr, getSelectionResolvedPos, insertions, deletions) {
|
|
249
|
-
insertions.forEach(function (contentInsert) {
|
|
250
|
-
var _contentInsert = (0, _slicedToArray2.default)(contentInsert, 2),
|
|
251
|
-
content = _contentInsert[0],
|
|
252
|
-
pos = _contentInsert[1];
|
|
253
|
-
tr.insert(tr.mapping.map(pos), content);
|
|
254
|
-
});
|
|
255
|
-
deletions.forEach(function (deleteRange) {
|
|
256
|
-
var _deleteRange = (0, _slicedToArray2.default)(deleteRange, 2),
|
|
257
|
-
firstPos = _deleteRange[0],
|
|
258
|
-
lastPos = _deleteRange[1];
|
|
259
|
-
tr.delete(tr.mapping.map(firstPos), tr.mapping.map(lastPos));
|
|
260
|
-
});
|
|
261
|
-
tr.setSelection(new _state.TextSelection(getSelectionResolvedPos(tr)));
|
|
262
|
-
};
|
|
263
|
-
exports.insertContentDeleteRange = insertContentDeleteRange;
|
|
76
|
+
exports.withScrollIntoView = withScrollIntoView;
|
|
264
77
|
var selectNode = function selectNode(pos) {
|
|
265
78
|
return function (state, dispatch) {
|
|
266
79
|
if (dispatch) {
|
|
@@ -269,36 +82,4 @@ var selectNode = function selectNode(pos) {
|
|
|
269
82
|
return true;
|
|
270
83
|
};
|
|
271
84
|
};
|
|
272
|
-
|
|
273
|
-
/**
|
|
274
|
-
* If the selection is empty, is inside a paragraph node and `canNextNodeMoveUp` is true then delete current paragraph
|
|
275
|
-
* and move the node below it up. The selection will be retained, to be placed in the moved node.
|
|
276
|
-
*
|
|
277
|
-
* @param canNextNodeMoveUp check if node directly after the selection is able to be brought up to selection
|
|
278
|
-
* @returns PM Command
|
|
279
|
-
*/
|
|
280
|
-
exports.selectNode = selectNode;
|
|
281
|
-
var deleteEmptyParagraphAndMoveBlockUp = function deleteEmptyParagraphAndMoveBlockUp(canNextNodeMoveUp) {
|
|
282
|
-
return function (state, dispatch, view) {
|
|
283
|
-
var _state$selection4 = state.selection,
|
|
284
|
-
_state$selection4$$fr = _state$selection4.$from,
|
|
285
|
-
pos = _state$selection4$$fr.pos,
|
|
286
|
-
parent = _state$selection4$$fr.parent,
|
|
287
|
-
$head = _state$selection4.$head,
|
|
288
|
-
empty = _state$selection4.empty,
|
|
289
|
-
tr = state.tr,
|
|
290
|
-
doc = state.doc;
|
|
291
|
-
var _walkNextNode = walkNextNode($head),
|
|
292
|
-
$pos = _walkNextNode.$pos;
|
|
293
|
-
var nextPMNode = doc.nodeAt($pos.pos - 1);
|
|
294
|
-
if (empty && nextPMNode && canNextNodeMoveUp(nextPMNode) && (0, _utils.isEmptyParagraph)(parent) && view !== null && view !== void 0 && view.endOfTextblock('right')) {
|
|
295
|
-
tr.deleteRange(pos - 1, pos + 1);
|
|
296
|
-
if (dispatch) {
|
|
297
|
-
dispatch(tr);
|
|
298
|
-
}
|
|
299
|
-
return true;
|
|
300
|
-
}
|
|
301
|
-
return false;
|
|
302
|
-
};
|
|
303
|
-
};
|
|
304
|
-
exports.deleteEmptyParagraphAndMoveBlockUp = deleteEmptyParagraphAndMoveBlockUp;
|
|
85
|
+
exports.selectNode = selectNode;
|
|
@@ -9,7 +9,6 @@ exports.getChangedNodes = getChangedNodes;
|
|
|
9
9
|
exports.getChangedNodesIn = getChangedNodesIn;
|
|
10
10
|
exports.getChildBreakoutModes = getChildBreakoutModes;
|
|
11
11
|
exports.getNodesCount = getNodesCount;
|
|
12
|
-
exports.hasVisibleContent = hasVisibleContent;
|
|
13
12
|
exports.isInEmptyLine = isInEmptyLine;
|
|
14
13
|
exports.isNodeEmpty = isNodeEmpty;
|
|
15
14
|
exports.isSelectionEndOfParagraph = void 0;
|
|
@@ -17,32 +16,8 @@ exports.nodesBetweenChanged = nodesBetweenChanged;
|
|
|
17
16
|
exports.processRawFragmentValue = processRawFragmentValue;
|
|
18
17
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
19
18
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
20
|
-
var _utils = require("@atlaskit/editor-common/utils");
|
|
21
19
|
var _nodeWidth = require("./node-width");
|
|
22
|
-
|
|
23
|
-
* Returns false if node contains only empty inline nodes and hardBreaks.
|
|
24
|
-
*/
|
|
25
|
-
function hasVisibleContent(node) {
|
|
26
|
-
var isInlineNodeHasVisibleContent = function isInlineNodeHasVisibleContent(inlineNode) {
|
|
27
|
-
return inlineNode.isText ? !!inlineNode.textContent.trim() : inlineNode.type.name !== 'hardBreak';
|
|
28
|
-
};
|
|
29
|
-
if (node.isInline) {
|
|
30
|
-
return isInlineNodeHasVisibleContent(node);
|
|
31
|
-
} else if (node.isBlock && (node.isLeaf || node.isAtom)) {
|
|
32
|
-
return true;
|
|
33
|
-
} else if (!node.childCount) {
|
|
34
|
-
return false;
|
|
35
|
-
}
|
|
36
|
-
for (var _index = 0; _index < node.childCount; _index++) {
|
|
37
|
-
var child = node.child(_index);
|
|
38
|
-
var invisibleNodeTypes = ['paragraph', 'text', 'hardBreak'];
|
|
39
|
-
if (!invisibleNodeTypes.includes(child.type.name) || hasVisibleContent(child)) {
|
|
40
|
-
return true;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
return false;
|
|
44
|
-
}
|
|
45
|
-
|
|
20
|
+
var _utils = require("@atlaskit/editor-common/utils");
|
|
46
21
|
/**
|
|
47
22
|
* Checks if a node has any content. Ignores node that only contain empty block nodes.
|
|
48
23
|
*/
|
package/dist/cjs/utils/index.js
CHANGED
|
@@ -16,7 +16,6 @@ exports.canMoveUp = canMoveUp;
|
|
|
16
16
|
exports.checkNodeDown = checkNodeDown;
|
|
17
17
|
exports.compose = compose;
|
|
18
18
|
exports.dedupe = dedupe;
|
|
19
|
-
exports.filterChildrenBetween = filterChildrenBetween;
|
|
20
19
|
Object.defineProperty(exports, "findFarthestParentNode", {
|
|
21
20
|
enumerable: true,
|
|
22
21
|
get: function get() {
|
|
@@ -31,12 +30,6 @@ Object.defineProperty(exports, "getNodesCount", {
|
|
|
31
30
|
}
|
|
32
31
|
});
|
|
33
32
|
exports.hasOpenEnd = void 0;
|
|
34
|
-
Object.defineProperty(exports, "hasVisibleContent", {
|
|
35
|
-
enumerable: true,
|
|
36
|
-
get: function get() {
|
|
37
|
-
return _document.hasVisibleContent;
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
33
|
Object.defineProperty(exports, "insideTable", {
|
|
41
34
|
enumerable: true,
|
|
42
35
|
get: function get() {
|
|
@@ -436,18 +429,6 @@ var isInsideBlockQuote = function isInsideBlockQuote(state) {
|
|
|
436
429
|
return (0, _utils.hasParentNodeOfType)(blockquote)(state.selection);
|
|
437
430
|
};
|
|
438
431
|
exports.isInsideBlockQuote = isInsideBlockQuote;
|
|
439
|
-
function filterChildrenBetween(doc, from, to, predicate) {
|
|
440
|
-
var results = [];
|
|
441
|
-
doc.nodesBetween(from, to, function (node, pos, parent) {
|
|
442
|
-
if (predicate(node, pos, parent)) {
|
|
443
|
-
results.push({
|
|
444
|
-
node: node,
|
|
445
|
-
pos: pos
|
|
446
|
-
});
|
|
447
|
-
}
|
|
448
|
-
});
|
|
449
|
-
return results;
|
|
450
|
-
}
|
|
451
432
|
function dedupe() {
|
|
452
433
|
var list = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
453
434
|
var iteratee = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (p) {
|
|
@@ -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 = "187.8.
|
|
9
|
+
var version = "187.8.10";
|
|
10
10
|
exports.version = version;
|
|
11
11
|
var nextMajorVersion = function nextMajorVersion() {
|
|
12
12
|
return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
|
package/dist/cjs/version.json
CHANGED
|
@@ -4,10 +4,9 @@ import PropTypes from 'prop-types';
|
|
|
4
4
|
import { EditorState, Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
5
5
|
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
6
|
import { editorMessages } from './messages';
|
|
7
|
-
import { browser, getAnalyticsEventSeverity, getResponseEndTime, measureRender, startMeasure, stopMeasure, shouldForceTracking } from '@atlaskit/editor-common/utils';
|
|
7
|
+
import { browser, getAnalyticsEventSeverity, getResponseEndTime, measureRender, startMeasure, stopMeasure, shouldForceTracking, processRawValue, analyticsEventKey } from '@atlaskit/editor-common/utils';
|
|
8
8
|
import { ExperienceStore, EditorExperience, RELIABILITY_INTERVAL } from '@atlaskit/editor-common/ufo';
|
|
9
9
|
import { createDispatch, EventDispatcher } from '../event-dispatcher';
|
|
10
|
-
import { processRawValue } from '@atlaskit/editor-common/utils';
|
|
11
10
|
import { freezeUnsafeTransactionProperties } from '../utils/performance/safer-transactions';
|
|
12
11
|
import { RenderTracking } from '../utils/performance/components/RenderTracking';
|
|
13
12
|
import { findChangedNodesFromTransaction, validateNodes, validNode } from '../utils/nodes';
|
|
@@ -19,17 +18,16 @@ import { getDocStructure } from '../utils/document-logger';
|
|
|
19
18
|
import { isFullPage } from '../utils/is-full-page';
|
|
20
19
|
import measurements from '../utils/performance/measure-enum';
|
|
21
20
|
import { getNodesCount } from '../utils/document';
|
|
22
|
-
import { analyticsEventKey } from '@atlaskit/editor-common/utils';
|
|
23
21
|
import { createSchema } from './create-schema';
|
|
24
22
|
import { PluginPerformanceObserver } from '../utils/performance/plugin-performance-observer';
|
|
25
23
|
import { getParticipantsCount } from '../plugins/collab-edit/get-participants-count';
|
|
24
|
+
import { EVENT_NAME_DISPATCH_TRANSACTION, EVENT_NAME_STATE_APPLY, EVENT_NAME_UPDATE_STATE, EVENT_NAME_VIEW_STATE_UPDATED, EVENT_NAME_ON_CHANGE, TransactionTracker } from '../utils/performance/track-transactions';
|
|
26
25
|
import { countNodes } from '../utils/count-nodes';
|
|
27
|
-
import { TransactionTracker } from '../utils/performance/track-transactions';
|
|
28
|
-
import { EVENT_NAME_DISPATCH_TRANSACTION, EVENT_NAME_STATE_APPLY, EVENT_NAME_UPDATE_STATE, EVENT_NAME_VIEW_STATE_UPDATED, EVENT_NAME_ON_CHANGE } from '../utils/performance/track-transactions';
|
|
29
26
|
import { PROSEMIRROR_RENDERED_NORMAL_SEVERITY_THRESHOLD, PROSEMIRROR_RENDERED_DEGRADED_SEVERITY_THRESHOLD, DEFAULT_SAMPLING_RATE_VALID_TRANSACTIONS } from './consts';
|
|
30
27
|
import { getContextIdentifier } from '../plugins/base/pm-plugins/context-identifier';
|
|
31
28
|
import ReactEditorViewContext from './ReactEditorViewContext';
|
|
32
29
|
import { EditorPluginInjectionAPI } from '@atlaskit/editor-common/preset';
|
|
30
|
+
import { EDIT_AREA_ID } from '@atlaskit/editor-common/ui';
|
|
33
31
|
function handleEditorFocus(view) {
|
|
34
32
|
if (view.hasFocus()) {
|
|
35
33
|
return;
|
|
@@ -67,7 +65,6 @@ function handleEditorFocus(view) {
|
|
|
67
65
|
view.focus();
|
|
68
66
|
}, 0);
|
|
69
67
|
}
|
|
70
|
-
export const EDIT_AREA_ID = 'ak-editor-textarea';
|
|
71
68
|
export class ReactEditorView extends React.Component {
|
|
72
69
|
get transactionTracking() {
|
|
73
70
|
var _this$props$editorPro, _this$props$editorPro2;
|
package/dist/es2019/index.js
CHANGED
|
@@ -42,7 +42,7 @@ export { INPUT_METHOD, ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } f
|
|
|
42
42
|
export { setKeyboardHeight, setMobilePaddingTop, setIsExpanded } from './plugins/mobile-dimensions/commands';
|
|
43
43
|
|
|
44
44
|
// Used in editor-test-helpers and mobile bridge
|
|
45
|
-
export { setTextSelection, dedupe, getNodesCount, measurements
|
|
45
|
+
export { setTextSelection, dedupe, getNodesCount, measurements } from './utils';
|
|
46
46
|
export { getListCommands } from './utils/list-commands';
|
|
47
47
|
export { ReactEditorView, BaseReactEditorView } from './create-editor';
|
|
48
48
|
export { getDefaultPresetOptionsFromEditorProps } from './create-editor';
|
|
@@ -3,7 +3,7 @@ import { AnnotationTypes } from '@atlaskit/adf-schema';
|
|
|
3
3
|
import { ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, ACTION, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
4
|
import { addAnalytics } from '../../analytics/utils';
|
|
5
5
|
import { getSelectionPositions, getPluginState, getDraftCommandAnalyticsPayload } from '../utils';
|
|
6
|
-
import { applyMarkOnRange } from '
|
|
6
|
+
import { applyMarkOnRange } from '@atlaskit/editor-common/mark';
|
|
7
7
|
const addAnnotationMark = id => (transaction, state) => {
|
|
8
8
|
const inlineCommentState = getPluginState(state);
|
|
9
9
|
const {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
2
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
3
3
|
import { keydownHandler } from '@atlaskit/editor-prosemirror/keymap';
|
|
4
|
-
import {
|
|
4
|
+
import { filterCommand as filter } from '@atlaskit/editor-common/utils';
|
|
5
5
|
import { isSelectionEndOfParagraph } from '../../../utils';
|
|
6
6
|
export const newlinePreserveMarksKey = new PluginKey('newlinePreserveMarksPlugin');
|
|
7
7
|
const isSelectionAligned = state => !!state.selection.$to.parent.marks.find(m => m.type === state.schema.marks.alignment);
|
|
@@ -6,7 +6,7 @@ import { shouldSplitSelectedNodeOnNodeInsertion } from '@atlaskit/editor-common/
|
|
|
6
6
|
import { withAnalytics as withAnalyticsDeprecated } from '../../analytics';
|
|
7
7
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
8
8
|
import { withAnalytics } from '@atlaskit/editor-common/editor-analytics';
|
|
9
|
-
import { filterChildrenBetween } from '
|
|
9
|
+
import { filterChildrenBetween } from '@atlaskit/editor-common/mark';
|
|
10
10
|
import { PanelType } from '@atlaskit/adf-schema';
|
|
11
11
|
import { CellSelection } from '@atlaskit/editor-tables';
|
|
12
12
|
import { transformToCodeBlockAction } from './transform-to-code-block';
|
|
@@ -5,7 +5,7 @@ import * as commands from '../../../commands';
|
|
|
5
5
|
import * as blockTypes from '../types';
|
|
6
6
|
import { keymap } from '../../../utils/keymap';
|
|
7
7
|
import { cleanUpAtTheStartOfDocument, deleteAndMoveCursor, deleteBlockContent, insertBlockTypesWithAnalytics } from '../commands';
|
|
8
|
-
import { deleteEmptyParagraphAndMoveBlockUp } from '
|
|
8
|
+
import { deleteEmptyParagraphAndMoveBlockUp } from '@atlaskit/editor-common/utils';
|
|
9
9
|
import { INPUT_METHOD } from '../../analytics';
|
|
10
10
|
import { isNodeAWrappingBlockNode } from '../utils';
|
|
11
11
|
const backspace = chainCommands(cleanUpAtTheStartOfDocument, deleteBlockContent(isNodeAWrappingBlockNode), deleteAndMoveCursor);
|
|
@@ -4,7 +4,7 @@ import React from 'react';
|
|
|
4
4
|
import { jsx } from '@emotion/react';
|
|
5
5
|
import { injectIntl } from 'react-intl-next';
|
|
6
6
|
import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
|
|
7
|
-
import DropdownMenu from '
|
|
7
|
+
import { DropdownMenuWithKeyboardNavigation as DropdownMenu } from '@atlaskit/editor-common/ui-menu';
|
|
8
8
|
import { separatorStyles, wrapperStyle } from '@atlaskit/editor-common/styles';
|
|
9
9
|
import { blockTypeMenuItemStyle, keyboardShortcut, keyboardShortcutSelect } from './styled';
|
|
10
10
|
import { tooltip, findKeymapByDescription } from '../../../../keymaps';
|
|
@@ -3,7 +3,7 @@ import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
|
3
3
|
import { keydownHandler } from '@atlaskit/editor-prosemirror/keymap';
|
|
4
4
|
import { setTextSelection } from '@atlaskit/editor-prosemirror/utils';
|
|
5
5
|
import { getCursor } from '../../../utils';
|
|
6
|
-
import {
|
|
6
|
+
import { filterCommand as filter } from '@atlaskit/editor-common/utils';
|
|
7
7
|
import { isCursorBeforeClosingCharacter, isClosingCharacter } from '../ide-ux/paired-character-handling';
|
|
8
8
|
import { getAutoClosingBracketInfo, shouldAutoCloseBracket } from '../ide-ux/bracket-handling';
|
|
9
9
|
import { getAutoClosingQuoteInfo, shouldAutoCloseQuote } from '../ide-ux/quote-handling';
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
/** @jsx jsx */
|
|
4
|
-
import React from 'react';
|
|
4
|
+
import React, { Component } from 'react';
|
|
5
5
|
import { css, jsx } from '@emotion/react';
|
|
6
|
-
import { Component } from 'react';
|
|
7
6
|
import ButtonGroup from '@atlaskit/button/button-group';
|
|
8
7
|
import { hexToEditorBackgroundPaletteColor } from '@atlaskit/editor-palette';
|
|
9
8
|
import { themed } from '@atlaskit/theme/components';
|
|
@@ -11,7 +10,7 @@ import { borderRadius } from '@atlaskit/theme/constants';
|
|
|
11
10
|
import { DN70 } from '@atlaskit/theme/colors';
|
|
12
11
|
import { compareArrays, shallowEqual } from '../utils';
|
|
13
12
|
import { showConfirmDialog } from '../pm-plugins/toolbar-data/commands';
|
|
14
|
-
import { FloatingToolbarButton as Button } from '@atlaskit/editor-common/ui';
|
|
13
|
+
import { FloatingToolbarButton as Button, Announcer } from '@atlaskit/editor-common/ui';
|
|
15
14
|
import Dropdown from './Dropdown';
|
|
16
15
|
import Select from './Select';
|
|
17
16
|
import Separator from './Separator';
|
|
@@ -20,12 +19,11 @@ import { ExtensionsPlaceholder } from './ExtensionsPlaceholder';
|
|
|
20
19
|
import ColorPickerButton from '../../../ui/ColorPickerButton';
|
|
21
20
|
import { backgroundPaletteTooltipMessages } from '../../../ui/ColorPalette';
|
|
22
21
|
import { EmojiPickerButton } from './EmojiPickerButton';
|
|
23
|
-
import { Announcer } from '@atlaskit/editor-common/ui';
|
|
24
22
|
import { injectIntl } from 'react-intl-next';
|
|
25
23
|
import messages from './messages';
|
|
26
24
|
import { clearHoverSelection } from '@atlaskit/editor-plugin-table/commands';
|
|
27
25
|
import ScrollButtons from './ScrollButtons';
|
|
28
|
-
import { ToolbarArrowKeyNavigationProvider } from '
|
|
26
|
+
import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
|
|
29
27
|
import { checkShouldForceFocusAndApply, forceFocusSelector } from '../pm-plugins/force-focus';
|
|
30
28
|
const ToolbarItems = /*#__PURE__*/React.memo(({
|
|
31
29
|
items,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { akEditorMenuZIndex } from '@atlaskit/editor-shared-styles';
|
|
3
|
-
import DropdownMenu from '
|
|
3
|
+
import { DropdownMenuWithKeyboardNavigation as DropdownMenu } from '@atlaskit/editor-common/ui-menu';
|
|
4
4
|
import { DropDownButton } from './dropdown-button';
|
|
5
5
|
export const BlockInsertMenuLegacy = props => {
|
|
6
6
|
const {
|
|
@@ -3,7 +3,7 @@ import { TextSelection, Selection } from '@atlaskit/editor-prosemirror/state';
|
|
|
3
3
|
import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
4
4
|
import { keydownHandler } from '@atlaskit/editor-prosemirror/keymap';
|
|
5
5
|
import { findParentNodeOfType, findSelectedNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
6
|
-
import {
|
|
6
|
+
import { filterCommand as filter } from '@atlaskit/editor-common/utils';
|
|
7
7
|
import { createSelectionClickHandler } from '../../selection/utils';
|
|
8
8
|
import { fixColumnSizes, fixColumnStructure, getSelectedLayout } from '../actions';
|
|
9
9
|
import { pluginKey } from './plugin-key';
|
|
@@ -2,8 +2,8 @@ import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
|
2
2
|
import { NodeRange } from '@atlaskit/editor-prosemirror/model';
|
|
3
3
|
import { findWrapping } from '@atlaskit/editor-prosemirror/transform';
|
|
4
4
|
import { findParentNodeClosestToPos } from '@atlaskit/editor-prosemirror/utils';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { isEmptyParagraph, isListNode } from '@atlaskit/editor-common/utils';
|
|
6
|
+
import { joinSiblingLists } from '@atlaskit/editor-common/lists';
|
|
7
7
|
import { findFirstParentListNode } from '../utils/find';
|
|
8
8
|
import { GapCursorSelection } from '@atlaskit/editor-common/selection';
|
|
9
9
|
export function convertListType({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Selection, TextSelection, NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
2
2
|
import { Fragment, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
-
import {
|
|
3
|
+
import { normalizeListItemsSelection } from '@atlaskit/editor-common/lists';
|
|
4
4
|
import { findFirstParentListItemNode } from '../utils/find';
|
|
5
|
-
import {
|
|
5
|
+
import { isListItemNode, isListNode } from '@atlaskit/editor-common/utils';
|
|
6
6
|
import { GapCursorSelection } from '@atlaskit/editor-common/selection';
|
|
7
7
|
export const indentListItemsSelected = tr => {
|
|
8
8
|
const originalSelection = tr.selection;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LIST_TEXT_SCENARIOS } from '../../analytics';
|
|
2
|
-
import { isParagraphNode, isListNode, isListItemNode } from '
|
|
2
|
+
import { isParagraphNode, isListNode, isListItemNode } from '@atlaskit/editor-common/utils';
|
|
3
3
|
import { isPosInsideList, isPosInsideParagraph } from '../utils/selection';
|
|
4
4
|
import { joinParagrapWithList, joinSiblingListItems, joinNestedListWithParentListItem, joinListItemWithParentNestedList, joinListItemWithParagraph } from './join-list-items-scenarios';
|
|
5
5
|
export const calcJoinListScenario = (walkNode, $head) => {
|
package/dist/es2019/plugins/list/actions/join-list-items-scenarios/join-list-item-with-paragraph.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { insertContentDeleteRange } from '
|
|
1
|
+
import { insertContentDeleteRange, isListNode } from '@atlaskit/editor-common/utils';
|
|
2
2
|
import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
-
import { isListNode } from '../../utils/node';
|
|
4
3
|
// Case for when a users selection is at the end of a paragraph, the paragraph
|
|
5
4
|
// is followed by a list, and they delete forward
|
|
6
5
|
export const joinListItemWithParagraph = ({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { insertContentDeleteRange } from '
|
|
2
|
-
import { isListNode } from '
|
|
1
|
+
import { insertContentDeleteRange } from '@atlaskit/editor-common/utils';
|
|
2
|
+
import { isListNode } from '@atlaskit/editor-common/utils';
|
|
3
3
|
//Case for two adjacent list items with the first being of greater indentation
|
|
4
4
|
export const joinListItemWithParentNestedList = ({
|
|
5
5
|
tr,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { insertContentDeleteRange } from '
|
|
2
|
-
import { isListNode } from '
|
|
1
|
+
import { insertContentDeleteRange } from '@atlaskit/editor-common/utils';
|
|
2
|
+
import { isListNode } from '@atlaskit/editor-common/utils';
|
|
3
3
|
//Case for two adjacent list items with the first being of lower indentation
|
|
4
4
|
export const joinNestedListWithParentListItem = ({
|
|
5
5
|
tr,
|
package/dist/es2019/plugins/list/actions/join-list-items-scenarios/join-paragraph-with-list.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { insertContentDeleteRange } from '
|
|
1
|
+
import { insertContentDeleteRange } from '@atlaskit/editor-common/utils';
|
|
2
2
|
//Case for two adjacent nodes with the first being a list item and the last being a paragraph
|
|
3
3
|
export const joinParagrapWithList = ({
|
|
4
4
|
tr,
|