@atlaskit/editor-core 188.5.0 → 188.6.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.
Files changed (150) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/cjs/labs/next/presets/default.js +2 -2
  3. package/dist/cjs/labs/next/presets/universal.js +1 -6
  4. package/dist/cjs/plugins/expand/index.js +0 -2
  5. package/dist/cjs/plugins/expand/nodeviews/index.js +37 -13
  6. package/dist/cjs/plugins/index.js +0 -7
  7. package/dist/cjs/plugins/insert-block/ui/ToolbarInsertBlock/index.js +30 -29
  8. package/dist/cjs/plugins/status/actions.js +14 -11
  9. package/dist/cjs/plugins/status/index.js +17 -8
  10. package/dist/cjs/plugins/status/keymap.js +1 -1
  11. package/dist/cjs/plugins/status/ui/statusPicker.js +2 -2
  12. package/dist/cjs/ui/Addon/click-area-helper.js +9 -11
  13. package/dist/cjs/ui/ContentStyles/index.js +13 -13
  14. package/dist/cjs/utils/selection.js +12 -14
  15. package/dist/cjs/version-wrapper.js +1 -1
  16. package/dist/es2019/labs/next/presets/default.js +1 -1
  17. package/dist/es2019/labs/next/presets/universal.js +1 -6
  18. package/dist/es2019/plugins/expand/index.js +0 -2
  19. package/dist/es2019/plugins/expand/nodeviews/index.js +37 -13
  20. package/dist/es2019/plugins/index.js +0 -1
  21. package/dist/es2019/plugins/insert-block/ui/ToolbarInsertBlock/index.js +3 -3
  22. package/dist/es2019/plugins/status/actions.js +3 -2
  23. package/dist/es2019/plugins/status/index.js +91 -80
  24. package/dist/es2019/plugins/status/keymap.js +1 -1
  25. package/dist/es2019/plugins/status/ui/statusPicker.js +1 -1
  26. package/dist/es2019/ui/Addon/click-area-helper.js +4 -6
  27. package/dist/es2019/ui/ContentStyles/index.js +1 -1
  28. package/dist/es2019/utils/selection.js +2 -17
  29. package/dist/es2019/version-wrapper.js +1 -1
  30. package/dist/esm/labs/next/presets/default.js +1 -1
  31. package/dist/esm/labs/next/presets/universal.js +1 -6
  32. package/dist/esm/plugins/expand/index.js +0 -2
  33. package/dist/esm/plugins/expand/nodeviews/index.js +37 -13
  34. package/dist/esm/plugins/index.js +0 -1
  35. package/dist/esm/plugins/insert-block/ui/ToolbarInsertBlock/index.js +30 -29
  36. package/dist/esm/plugins/status/actions.js +14 -11
  37. package/dist/esm/plugins/status/index.js +17 -8
  38. package/dist/esm/plugins/status/keymap.js +1 -1
  39. package/dist/esm/plugins/status/ui/statusPicker.js +1 -1
  40. package/dist/esm/ui/Addon/click-area-helper.js +4 -6
  41. package/dist/esm/ui/ContentStyles/index.js +1 -1
  42. package/dist/esm/utils/selection.js +2 -13
  43. package/dist/esm/version-wrapper.js +1 -1
  44. package/dist/types/labs/next/presets/default.d.ts +22 -8
  45. package/dist/types/plugins/expand/index.d.ts +1 -1
  46. package/dist/types/plugins/expand/nodeviews/index.d.ts +3 -2
  47. package/dist/types/plugins/index.d.ts +0 -1
  48. package/dist/types/plugins/insert-block/types.d.ts +3 -1
  49. package/dist/types/plugins/status/actions.d.ts +4 -2
  50. package/dist/types/plugins/status/index.d.ts +12 -3
  51. package/dist/types/plugins/status/nodeviews/status.d.ts +1 -1
  52. package/dist/types/plugins/status/plugin.d.ts +1 -1
  53. package/dist/types/utils/selection.d.ts +1 -4
  54. package/package.json +4 -3
  55. package/dist/cjs/plugins/selection/actions.js +0 -11
  56. package/dist/cjs/plugins/selection/commands.js +0 -257
  57. package/dist/cjs/plugins/selection/gap-cursor/actions.js +0 -272
  58. package/dist/cjs/plugins/selection/gap-cursor/direction.js +0 -23
  59. package/dist/cjs/plugins/selection/gap-cursor/selection.js +0 -30
  60. package/dist/cjs/plugins/selection/gap-cursor/styles.js +0 -17
  61. package/dist/cjs/plugins/selection/gap-cursor/utils/is-ignored.js +0 -12
  62. package/dist/cjs/plugins/selection/gap-cursor/utils/is-valid-target-node.js +0 -12
  63. package/dist/cjs/plugins/selection/gap-cursor/utils/place-gap-cursor.js +0 -103
  64. package/dist/cjs/plugins/selection/gap-cursor/utils.js +0 -137
  65. package/dist/cjs/plugins/selection/gap-cursor-selection.js +0 -37
  66. package/dist/cjs/plugins/selection/index.js +0 -65
  67. package/dist/cjs/plugins/selection/plugin-factory.js +0 -49
  68. package/dist/cjs/plugins/selection/pm-plugins/events/create-selection-between.js +0 -92
  69. package/dist/cjs/plugins/selection/pm-plugins/events/keydown.js +0 -115
  70. package/dist/cjs/plugins/selection/pm-plugins/gap-cursor-keymap.js +0 -46
  71. package/dist/cjs/plugins/selection/pm-plugins/gap-cursor-main.js +0 -160
  72. package/dist/cjs/plugins/selection/pm-plugins/gap-cursor-plugin-key.js +0 -8
  73. package/dist/cjs/plugins/selection/pm-plugins/keymap.js +0 -16
  74. package/dist/cjs/plugins/selection/pm-plugins/selection-main.js +0 -104
  75. package/dist/cjs/plugins/selection/reducer.js +0 -26
  76. package/dist/cjs/plugins/selection/types.js +0 -20
  77. package/dist/cjs/plugins/selection/utils.js +0 -280
  78. package/dist/cjs/selection-api/api.js +0 -27
  79. package/dist/es2019/plugins/selection/actions.js +0 -5
  80. package/dist/es2019/plugins/selection/commands.js +0 -250
  81. package/dist/es2019/plugins/selection/gap-cursor/actions.js +0 -270
  82. package/dist/es2019/plugins/selection/gap-cursor/direction.js +0 -15
  83. package/dist/es2019/plugins/selection/gap-cursor/selection.js +0 -1
  84. package/dist/es2019/plugins/selection/gap-cursor/styles.js +0 -145
  85. package/dist/es2019/plugins/selection/gap-cursor/utils/is-ignored.js +0 -1
  86. package/dist/es2019/plugins/selection/gap-cursor/utils/is-valid-target-node.js +0 -1
  87. package/dist/es2019/plugins/selection/gap-cursor/utils/place-gap-cursor.js +0 -94
  88. package/dist/es2019/plugins/selection/gap-cursor/utils.js +0 -124
  89. package/dist/es2019/plugins/selection/gap-cursor-selection.js +0 -2
  90. package/dist/es2019/plugins/selection/index.js +0 -51
  91. package/dist/es2019/plugins/selection/plugin-factory.js +0 -43
  92. package/dist/es2019/plugins/selection/pm-plugins/events/create-selection-between.js +0 -89
  93. package/dist/es2019/plugins/selection/pm-plugins/events/keydown.js +0 -112
  94. package/dist/es2019/plugins/selection/pm-plugins/gap-cursor-keymap.js +0 -40
  95. package/dist/es2019/plugins/selection/pm-plugins/gap-cursor-main.js +0 -158
  96. package/dist/es2019/plugins/selection/pm-plugins/gap-cursor-plugin-key.js +0 -2
  97. package/dist/es2019/plugins/selection/pm-plugins/keymap.js +0 -10
  98. package/dist/es2019/plugins/selection/pm-plugins/selection-main.js +0 -97
  99. package/dist/es2019/plugins/selection/reducer.js +0 -18
  100. package/dist/es2019/plugins/selection/types.js +0 -9
  101. package/dist/es2019/plugins/selection/utils.js +0 -233
  102. package/dist/es2019/selection-api/api.js +0 -20
  103. package/dist/esm/plugins/selection/actions.js +0 -5
  104. package/dist/esm/plugins/selection/commands.js +0 -251
  105. package/dist/esm/plugins/selection/gap-cursor/actions.js +0 -266
  106. package/dist/esm/plugins/selection/gap-cursor/direction.js +0 -15
  107. package/dist/esm/plugins/selection/gap-cursor/selection.js +0 -1
  108. package/dist/esm/plugins/selection/gap-cursor/styles.js +0 -10
  109. package/dist/esm/plugins/selection/gap-cursor/utils/is-ignored.js +0 -1
  110. package/dist/esm/plugins/selection/gap-cursor/utils/is-valid-target-node.js +0 -1
  111. package/dist/esm/plugins/selection/gap-cursor/utils/place-gap-cursor.js +0 -97
  112. package/dist/esm/plugins/selection/gap-cursor/utils.js +0 -128
  113. package/dist/esm/plugins/selection/gap-cursor-selection.js +0 -2
  114. package/dist/esm/plugins/selection/index.js +0 -58
  115. package/dist/esm/plugins/selection/plugin-factory.js +0 -43
  116. package/dist/esm/plugins/selection/pm-plugins/events/create-selection-between.js +0 -86
  117. package/dist/esm/plugins/selection/pm-plugins/events/keydown.js +0 -110
  118. package/dist/esm/plugins/selection/pm-plugins/gap-cursor-keymap.js +0 -40
  119. package/dist/esm/plugins/selection/pm-plugins/gap-cursor-main.js +0 -154
  120. package/dist/esm/plugins/selection/pm-plugins/gap-cursor-plugin-key.js +0 -2
  121. package/dist/esm/plugins/selection/pm-plugins/keymap.js +0 -10
  122. package/dist/esm/plugins/selection/pm-plugins/selection-main.js +0 -98
  123. package/dist/esm/plugins/selection/reducer.js +0 -19
  124. package/dist/esm/plugins/selection/types.js +0 -9
  125. package/dist/esm/plugins/selection/utils.js +0 -241
  126. package/dist/esm/selection-api/api.js +0 -21
  127. package/dist/types/plugins/selection/actions.d.ts +0 -17
  128. package/dist/types/plugins/selection/commands.d.ts +0 -10
  129. package/dist/types/plugins/selection/gap-cursor/actions.d.ts +0 -25
  130. package/dist/types/plugins/selection/gap-cursor/direction.d.ts +0 -10
  131. package/dist/types/plugins/selection/gap-cursor/selection.d.ts +0 -1
  132. package/dist/types/plugins/selection/gap-cursor/styles.d.ts +0 -2
  133. package/dist/types/plugins/selection/gap-cursor/utils/is-ignored.d.ts +0 -1
  134. package/dist/types/plugins/selection/gap-cursor/utils/is-valid-target-node.d.ts +0 -1
  135. package/dist/types/plugins/selection/gap-cursor/utils/place-gap-cursor.d.ts +0 -2
  136. package/dist/types/plugins/selection/gap-cursor/utils.d.ts +0 -8
  137. package/dist/types/plugins/selection/gap-cursor-selection.d.ts +0 -2
  138. package/dist/types/plugins/selection/index.d.ts +0 -13
  139. package/dist/types/plugins/selection/plugin-factory.d.ts +0 -2
  140. package/dist/types/plugins/selection/pm-plugins/events/create-selection-between.d.ts +0 -4
  141. package/dist/types/plugins/selection/pm-plugins/events/keydown.d.ts +0 -2
  142. package/dist/types/plugins/selection/pm-plugins/gap-cursor-keymap.d.ts +0 -2
  143. package/dist/types/plugins/selection/pm-plugins/gap-cursor-main.d.ts +0 -6
  144. package/dist/types/plugins/selection/pm-plugins/gap-cursor-plugin-key.d.ts +0 -2
  145. package/dist/types/plugins/selection/pm-plugins/keymap.d.ts +0 -3
  146. package/dist/types/plugins/selection/pm-plugins/selection-main.d.ts +0 -7
  147. package/dist/types/plugins/selection/reducer.d.ts +0 -3
  148. package/dist/types/plugins/selection/types.d.ts +0 -12
  149. package/dist/types/plugins/selection/utils.d.ts +0 -58
  150. package/dist/types/selection-api/api.d.ts +0 -11
@@ -1,257 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.setSelectionRelativeToNode = exports.setSelectionInsideAtNodeEnd = exports.selectNearNode = exports.arrowRight = exports.arrowLeft = void 0;
7
- var _state = require("@atlaskit/editor-prosemirror/state");
8
- var _gapCursorSelection = require("./gap-cursor-selection");
9
- var _selection = require("@atlaskit/editor-common/selection");
10
- var _utils = require("@atlaskit/editor-common/utils");
11
- var _actions = require("./actions");
12
- var _pluginFactory = require("./plugin-factory");
13
- var _utils2 = require("./utils");
14
- var _types = require("./types");
15
- var selectNearNode = exports.selectNearNode = function selectNearNode(selectionRelativeToNode, selection) {
16
- return function (_ref) {
17
- var tr = _ref.tr;
18
- tr.setMeta(_types.selectionPluginKey, {
19
- type: _actions.SelectionActionTypes.SET_RELATIVE_SELECTION,
20
- selectionRelativeToNode: selectionRelativeToNode
21
- });
22
- if (selection) {
23
- return tr.setSelection(selection);
24
- }
25
- return tr;
26
- };
27
- };
28
- var setSelectionRelativeToNode = exports.setSelectionRelativeToNode = function setSelectionRelativeToNode(selectionRelativeToNode, selection) {
29
- return (0, _pluginFactory.createCommand)({
30
- type: _actions.SelectionActionTypes.SET_RELATIVE_SELECTION,
31
- selectionRelativeToNode: selectionRelativeToNode
32
- }, function (tr) {
33
- return selectNearNode(selectionRelativeToNode, selection)({
34
- tr: tr
35
- }) || tr;
36
- });
37
- };
38
- var arrowRight = exports.arrowRight = function arrowRight(state, dispatch) {
39
- var selection = state.selection;
40
- if (selection instanceof _gapCursorSelection.GapCursorSelection) {
41
- return arrowRightFromGapCursor(selection)(state, dispatch);
42
- } else if (selection instanceof _state.NodeSelection) {
43
- return arrowRightFromNode(selection)(state, dispatch);
44
- } else if (selection instanceof _state.TextSelection) {
45
- return arrowRightFromText(selection)(state, dispatch);
46
- }
47
- return false;
48
- };
49
- var arrowLeft = exports.arrowLeft = function arrowLeft(state, dispatch) {
50
- var selection = state.selection;
51
- if (selection instanceof _gapCursorSelection.GapCursorSelection) {
52
- return arrowLeftFromGapCursor(selection)(state, dispatch);
53
- } else if (selection instanceof _state.NodeSelection) {
54
- return arrowLeftFromNode(selection)(state, dispatch);
55
- } else if (selection instanceof _state.TextSelection) {
56
- return arrowLeftFromText(selection)(state, dispatch);
57
- }
58
- return false;
59
- };
60
- var arrowRightFromGapCursor = function arrowRightFromGapCursor(selection) {
61
- return function (state, dispatch) {
62
- var $from = selection.$from,
63
- $to = selection.$to,
64
- side = selection.side;
65
- if (side === _gapCursorSelection.Side.LEFT) {
66
- var selectableNode = (0, _utils2.findSelectableContainerAfter)($to, state.doc);
67
- if (selectableNode) {
68
- return setSelectionRelativeToNode(_types.RelativeSelectionPos.Start, _state.NodeSelection.create(state.doc, selectableNode.pos))(state, dispatch);
69
- }
70
- } else if (side === _gapCursorSelection.Side.RIGHT && (0, _utils2.isSelectionAtEndOfParentNode)($from, selection)) {
71
- var _selectableNode = (0, _utils2.findSelectableContainerParent)(selection);
72
- if (_selectableNode) {
73
- return setSelectionRelativeToNode(_types.RelativeSelectionPos.End, _state.NodeSelection.create(state.doc, _selectableNode.pos))(state, dispatch);
74
- }
75
- }
76
- return false;
77
- };
78
- };
79
- var arrowLeftFromGapCursor = function arrowLeftFromGapCursor(selection) {
80
- return function (state, dispatch) {
81
- var $from = selection.$from,
82
- side = selection.side;
83
- var _getPluginState = (0, _pluginFactory.getPluginState)(state),
84
- selectionRelativeToNode = _getPluginState.selectionRelativeToNode;
85
- if (side === _gapCursorSelection.Side.RIGHT) {
86
- var selectableNode = (0, _utils2.findSelectableContainerBefore)($from, state.doc);
87
- if (selectableNode) {
88
- return setSelectionRelativeToNode(_types.RelativeSelectionPos.End, _state.NodeSelection.create(state.doc, selectableNode.pos))(state, dispatch);
89
- }
90
- } else if (side === _gapCursorSelection.Side.LEFT && (0, _utils2.isSelectionAtStartOfParentNode)($from, selection)) {
91
- if (selectionRelativeToNode === _types.RelativeSelectionPos.Before) {
92
- var $parent = state.doc.resolve(selection.$from.before(selection.$from.depth));
93
- if ($parent) {
94
- var _selectableNode2 = (0, _utils2.findSelectableContainerBefore)($parent, state.doc);
95
- if (_selectableNode2 && (0, _selection.isIgnored)(_selectableNode2.node)) {
96
- // selection is inside node without gap cursor preceeded by another node without gap cursor - set node selection for previous node
97
- return setSelectionRelativeToNode(_types.RelativeSelectionPos.End, _state.NodeSelection.create(state.doc, _selectableNode2.pos))(state, dispatch);
98
- }
99
- }
100
- // we don't return this as we want to reset the relative pos, but not block other plugins
101
- // from responding to arrow left key
102
- setSelectionRelativeToNode()(state, dispatch);
103
- } else {
104
- var _selectableNode3 = (0, _utils2.findSelectableContainerParent)(selection);
105
- if (_selectableNode3) {
106
- return setSelectionRelativeToNode(_types.RelativeSelectionPos.Start, _state.NodeSelection.create(state.doc, _selectableNode3.pos))(state, dispatch);
107
- }
108
- }
109
- }
110
- return false;
111
- };
112
- };
113
- var arrowRightFromNode = function arrowRightFromNode(selection) {
114
- return function (state, dispatch) {
115
- var node = selection.node,
116
- from = selection.from,
117
- $to = selection.$to;
118
- var _getPluginState2 = (0, _pluginFactory.getPluginState)(state),
119
- selectionRelativeToNode = _getPluginState2.selectionRelativeToNode;
120
- if (node.isAtom) {
121
- if ((0, _utils2.isSelectionAtEndOfParentNode)($to, selection)) {
122
- // selection is for inline node that is the last child of its parent node - set text selection after it
123
- return findAndSetTextSelection(_types.RelativeSelectionPos.End, state.doc.resolve(from + 1), _types.SelectionDirection.After)(state, dispatch);
124
- }
125
- return false;
126
- } else if (selectionRelativeToNode === _types.RelativeSelectionPos.Start) {
127
- // selection is for container node - set selection inside it at the start
128
- return setSelectionInsideAtNodeStart(_types.RelativeSelectionPos.Inside, node, from)(state, dispatch);
129
- } else if ((0, _selection.isIgnored)(node) && (!selectionRelativeToNode || selectionRelativeToNode === _types.RelativeSelectionPos.End)) {
130
- var selectableNode = (0, _utils2.findSelectableContainerAfter)($to, state.doc);
131
- if (selectableNode && (0, _selection.isIgnored)(selectableNode.node)) {
132
- // selection is for node without gap cursor followed by another node without gap cursor - set node selection for next node
133
- return setSelectionRelativeToNode(_types.RelativeSelectionPos.Start, _state.NodeSelection.create(state.doc, selectableNode.pos))(state, dispatch);
134
- }
135
- }
136
- return false;
137
- };
138
- };
139
- var arrowLeftFromNode = function arrowLeftFromNode(selection) {
140
- return function (state, dispatch) {
141
- var node = selection.node,
142
- from = selection.from,
143
- to = selection.to,
144
- $from = selection.$from;
145
- var _getPluginState3 = (0, _pluginFactory.getPluginState)(state),
146
- selectionRelativeToNode = _getPluginState3.selectionRelativeToNode;
147
- if (node.isAtom) {
148
- if ((0, _utils2.isSelectionAtStartOfParentNode)($from, selection)) {
149
- // selection is for inline node that is the first child of its parent node - set text selection before it
150
- return findAndSetTextSelection(_types.RelativeSelectionPos.Start, state.doc.resolve(from), _types.SelectionDirection.Before)(state, dispatch);
151
- }
152
- return false;
153
- } else if (selectionRelativeToNode === _types.RelativeSelectionPos.End) {
154
- // selection is for container node - set selection inside it at the end
155
- return setSelectionInsideAtNodeEnd(_types.RelativeSelectionPos.Inside, node, from, to)(state, dispatch);
156
- } else if (!selectionRelativeToNode || selectionRelativeToNode === _types.RelativeSelectionPos.Inside) {
157
- // selection is for container node - set selection inside it at the start
158
- // (this is a special case when the user selects by clicking node)
159
- return setSelectionInsideAtNodeStart(_types.RelativeSelectionPos.Before, node, from)(state, dispatch);
160
- } else if ((0, _selection.isIgnored)(node) && selectionRelativeToNode === _types.RelativeSelectionPos.Start) {
161
- // selection is for node without gap cursor preceeded by another node without gap cursor - set node selection for previous node
162
- var selectableNode = (0, _utils2.findSelectableContainerBefore)($from, state.doc);
163
- if (selectableNode && (0, _selection.isIgnored)(selectableNode.node)) {
164
- return setSelectionRelativeToNode(_types.RelativeSelectionPos.End, _state.NodeSelection.create(state.doc, selectableNode.pos))(state, dispatch);
165
- }
166
- }
167
- return false;
168
- };
169
- };
170
- var arrowRightFromText = function arrowRightFromText(selection) {
171
- return function (state, dispatch) {
172
- if ((0, _utils2.isSelectionAtEndOfParentNode)(selection.$to, selection)) {
173
- var selectableNode = (0, _utils2.findSelectableContainerParent)(selection);
174
- if (selectableNode) {
175
- return setSelectionRelativeToNode(_types.RelativeSelectionPos.End, _state.NodeSelection.create(state.doc, selectableNode.pos))(state, dispatch);
176
- }
177
- }
178
- return false;
179
- };
180
- };
181
- var arrowLeftFromText = function arrowLeftFromText(selection) {
182
- return function (state, dispatch) {
183
- var _getPluginState4 = (0, _pluginFactory.getPluginState)(state),
184
- selectionRelativeToNode = _getPluginState4.selectionRelativeToNode;
185
- if (selectionRelativeToNode === _types.RelativeSelectionPos.Before) {
186
- var selectableNode = (0, _utils2.findSelectableContainerBefore)(selection.$from, state.doc);
187
- if (selectableNode && (0, _selection.isIgnored)(selectableNode.node)) {
188
- // selection is inside node without gap cursor preceeded by another node without gap cursor - set node selection for previous node
189
- return setSelectionRelativeToNode(_types.RelativeSelectionPos.End, _state.NodeSelection.create(state.doc, selectableNode.pos))(state, dispatch);
190
- }
191
- // we don't return this as we want to reset the relative pos, but not block other plugins
192
- // from responding to arrow left key
193
- setSelectionRelativeToNode(undefined)(state, dispatch);
194
- } else if ((0, _utils2.isSelectionAtStartOfParentNode)(selection.$from, selection)) {
195
- var _selectableNode4 = (0, _utils2.findSelectableContainerParent)(selection);
196
- if (_selectableNode4) {
197
- return setSelectionRelativeToNode(_types.RelativeSelectionPos.Start, _state.NodeSelection.create(state.doc, _selectableNode4.pos))(state, dispatch);
198
- }
199
- }
200
- return false;
201
- };
202
- };
203
- var findAndSetTextSelection = function findAndSetTextSelection(selectionRelativeToNode, $pos, dir) {
204
- return function (state, dispatch) {
205
- var sel = _state.Selection.findFrom($pos, dir, true);
206
- if (sel) {
207
- return setSelectionRelativeToNode(selectionRelativeToNode, sel)(state, dispatch);
208
- }
209
- return false;
210
- };
211
- };
212
- var setSelectionInsideAtNodeStart = function setSelectionInsideAtNodeStart(selectionRelativeToNode, node, pos) {
213
- return function (state, dispatch) {
214
- if ((0, _utils.isNodeEmpty)(node)) {
215
- return findAndSetTextSelection(selectionRelativeToNode, state.doc.resolve(pos), _types.SelectionDirection.After)(state, dispatch);
216
- }
217
- var selectableNode = (0, _utils2.findFirstChildNodeToSelect)(node);
218
- if (selectableNode) {
219
- var childNode = selectableNode.node,
220
- childPos = selectableNode.pos;
221
- var selectionPos = pos + childPos + 1;
222
- if (childNode.isText || childNode.isAtom) {
223
- return findAndSetTextSelection(selectionRelativeToNode, state.doc.resolve(selectionPos), _types.SelectionDirection.Before)(state, dispatch);
224
- } else if ((0, _utils.isEmptyParagraph)(childNode)) {
225
- return findAndSetTextSelection(selectionRelativeToNode, state.doc.resolve(selectionPos + 1), _types.SelectionDirection.Before)(state, dispatch);
226
- } else if (!(0, _selection.isIgnored)(node)) {
227
- return setSelectionRelativeToNode(selectionRelativeToNode, new _gapCursorSelection.GapCursorSelection(state.doc.resolve(selectionPos), _gapCursorSelection.Side.LEFT))(state, dispatch);
228
- } else if ((0, _utils2.isSelectableContainerNode)(node)) {
229
- return setSelectionRelativeToNode(selectionRelativeToNode, _state.NodeSelection.create(state.doc, selectionPos))(state, dispatch);
230
- }
231
- }
232
- return false;
233
- };
234
- };
235
- var setSelectionInsideAtNodeEnd = exports.setSelectionInsideAtNodeEnd = function setSelectionInsideAtNodeEnd(selectionRelativeToNode, node, from, to) {
236
- return function (state, dispatch) {
237
- if ((0, _utils.isNodeEmpty)(node)) {
238
- return findAndSetTextSelection(selectionRelativeToNode, state.doc.resolve(to), _types.SelectionDirection.Before)(state, dispatch);
239
- }
240
- var selectableNode = (0, _utils2.findLastChildNodeToSelect)(node);
241
- if (selectableNode) {
242
- var childNode = selectableNode.node,
243
- childPos = selectableNode.pos;
244
- var selectionPos = from + childPos + childNode.nodeSize;
245
- if (childNode.isText || childNode.isAtom) {
246
- return findAndSetTextSelection(selectionRelativeToNode, state.doc.resolve(selectionPos + 1), _types.SelectionDirection.After)(state, dispatch);
247
- } else if ((0, _utils.isEmptyParagraph)(childNode)) {
248
- return findAndSetTextSelection(selectionRelativeToNode, state.doc.resolve(selectionPos), _types.SelectionDirection.After)(state, dispatch);
249
- } else if (!(0, _selection.isIgnored)(node)) {
250
- return setSelectionRelativeToNode(selectionRelativeToNode, new _gapCursorSelection.GapCursorSelection(state.doc.resolve(selectionPos + 1), _gapCursorSelection.Side.RIGHT))(state, dispatch);
251
- } else if ((0, _utils2.isSelectableContainerNode)(node)) {
252
- return setSelectionRelativeToNode(selectionRelativeToNode, _state.NodeSelection.create(state.doc, selectionPos))(state, dispatch);
253
- }
254
- }
255
- return false;
256
- };
257
- };
@@ -1,272 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.shouldSkipGapCursor = exports.setSelectionTopLevelBlocks = exports.setGapCursorAtPos = exports.setCursorForTopLevelBlocks = exports.hasGapCursorPlugin = exports.deleteNode = exports.arrow = void 0;
7
- var _state = require("@atlaskit/editor-prosemirror/state");
8
- var _utils = require("@atlaskit/editor-prosemirror/utils");
9
- var _direction = require("./direction");
10
- var _selection = require("./selection");
11
- var _utils2 = require("./utils");
12
- var _isValidTargetNode = require("./utils/is-valid-target-node");
13
- var _selection2 = require("@atlaskit/editor-common/selection");
14
- var _gapCursorPluginKey = require("../pm-plugins/gap-cursor-plugin-key");
15
- var _utils3 = require("@atlaskit/editor-common/utils");
16
- var shouldSkipGapCursor = exports.shouldSkipGapCursor = function shouldSkipGapCursor(direction, state, $pos) {
17
- var _$pos$nodeBefore;
18
- var doc = state.doc,
19
- schema = state.schema;
20
- switch (direction) {
21
- case _direction.Direction.UP:
22
- if ((0, _selection2.atTheBeginningOfDoc)(state)) {
23
- return false;
24
- }
25
- return (0, _utils3.isPositionNearTableRow)($pos, schema, 'before') || (0, _utils2.isTextBlockNearPos)(doc, schema, $pos, -1) || (0, _utils3.isNodeBeforeMediaNode)($pos, state);
26
- case _direction.Direction.DOWN:
27
- return (0, _selection2.atTheEndOfDoc)(state) || (0, _utils2.isTextBlockNearPos)(doc, schema, $pos, 1) || (0, _utils3.isPositionNearTableRow)($pos, schema, 'after') || ((_$pos$nodeBefore = $pos.nodeBefore) === null || _$pos$nodeBefore === void 0 ? void 0 : _$pos$nodeBefore.type.name) === 'text' && !$pos.nodeAfter // end of a paragraph
28
- ;
29
-
30
- default:
31
- return false;
32
- }
33
- };
34
-
35
- // These cases should be handled using the handleMediaGapCursor function
36
- function shouldHandleMediaGapCursor(dir, state) {
37
- var _selection$$from$node;
38
- var selection = state.selection;
39
- var upArrowFromGapCursorIntoMedia = selection instanceof _selection.GapCursorSelection && dir === _direction.Direction.UP && selection.$from.nodeBefore && (0, _utils3.isMediaNode)(selection.$from.nodeBefore);
40
- var downArrowFromGapCursorIntoMediaGroup = selection instanceof _selection.GapCursorSelection && dir === _direction.Direction.DOWN && ((_selection$$from$node = selection.$from.nodeAfter) === null || _selection$$from$node === void 0 ? void 0 : _selection$$from$node.type.name) === 'mediaGroup';
41
- return upArrowFromGapCursorIntoMedia || downArrowFromGapCursorIntoMediaGroup;
42
- }
43
-
44
- // Handle media gap cursor for up/down arrow into media nodes
45
- // Should check this case by using shouldHandleMediaGapCursor first
46
- function handleMediaGapCursor(dir, state) {
47
- var selection = state.selection,
48
- tr = state.tr;
49
- var $pos = (0, _direction.isBackward)(dir) ? selection.$from : selection.$to;
50
- if (dir === _direction.Direction.UP && selection.$from.nodeBefore && (0, _utils3.isMediaNode)(selection.$from.nodeBefore)) {
51
- var _tr$doc$nodeAt;
52
- var nodeBeforePos = (0, _utils.findPositionOfNodeBefore)(tr.selection);
53
- if (nodeBeforePos && selection.side === 'right' && ((_tr$doc$nodeAt = tr.doc.nodeAt(nodeBeforePos)) === null || _tr$doc$nodeAt === void 0 ? void 0 : _tr$doc$nodeAt.type.name) === 'mediaSingle') {
54
- tr.setSelection(new _state.NodeSelection(tr.doc.resolve(nodeBeforePos))).scrollIntoView();
55
- } else if (nodeBeforePos || nodeBeforePos === 0) {
56
- tr.setSelection(new _selection.GapCursorSelection(tr.doc.resolve(nodeBeforePos), _selection.Side.LEFT)).scrollIntoView();
57
- }
58
- }
59
- if (dir === _direction.Direction.DOWN && selection.$from.nodeAfter) {
60
- var nodeAfterPos = selection.side === 'right' ? $pos.pos : $pos.pos + selection.$from.nodeAfter.nodeSize;
61
- if (nodeAfterPos) {
62
- tr.setSelection(new _selection.GapCursorSelection(tr.doc.resolve(nodeAfterPos), _selection.Side.LEFT)).scrollIntoView();
63
- }
64
- }
65
- return tr;
66
- }
67
- var arrow = exports.arrow = function arrow(dir, endOfTextblock) {
68
- return function (state, dispatch, view) {
69
- var doc = state.doc,
70
- selection = state.selection,
71
- tr = state.tr;
72
- var $pos = (0, _direction.isBackward)(dir) ? selection.$from : selection.$to;
73
- var mustMove = selection.empty;
74
-
75
- // start from text selection
76
- if (selection instanceof _state.TextSelection) {
77
- // if cursor is in the middle of a text node, do nothing
78
- if (!endOfTextblock || !endOfTextblock(dir.toString())) {
79
- return false;
80
- }
81
-
82
- // UP/DOWN jumps to the nearest texblock skipping gapcursor whenever possible
83
- if (shouldSkipGapCursor(dir, state, $pos)) {
84
- return false;
85
- }
86
-
87
- // otherwise resolve previous/next position
88
- $pos = doc.resolve((0, _direction.isBackward)(dir) ? $pos.before() : $pos.after());
89
- mustMove = false;
90
- }
91
- if (selection instanceof _state.NodeSelection) {
92
- if (selection.node.isInline) {
93
- return false;
94
- }
95
- if (dir === _direction.Direction.UP && !(0, _selection2.atTheBeginningOfDoc)(state) && !(0, _utils3.isNodeBeforeMediaNode)($pos, state) || dir === _direction.Direction.DOWN) {
96
- // We dont add gap cursor on node selections going up and down
97
- // Except we do if we're going up for a block node which is the
98
- // first node in the document OR the node before is a media node
99
- return false;
100
- }
101
- }
102
-
103
- // Handle media gap cursor for up/down arrow into media nodes
104
- if (shouldHandleMediaGapCursor(dir, state)) {
105
- var updatedTr = handleMediaGapCursor(dir, state);
106
- if (dispatch) {
107
- dispatch(updatedTr);
108
- }
109
- return true;
110
- }
111
-
112
- // when jumping between block nodes at the same depth, we need to reverse cursor without changing ProseMirror position
113
- if (selection instanceof _selection.GapCursorSelection &&
114
- // next node allow gap cursor position
115
- (0, _isValidTargetNode.isValidTargetNode)((0, _direction.isBackward)(dir) ? $pos.nodeBefore : $pos.nodeAfter) && (
116
- // gap cursor changes block node
117
- (0, _direction.isBackward)(dir) && selection.side === _selection.Side.LEFT || (0, _direction.isForward)(dir) && selection.side === _selection.Side.RIGHT)) {
118
- // reverse cursor position
119
- if (dispatch) {
120
- dispatch(tr.setSelection(new _selection.GapCursorSelection($pos, selection.side === _selection.Side.RIGHT ? _selection.Side.LEFT : _selection.Side.RIGHT)).scrollIntoView());
121
- }
122
- return true;
123
- }
124
- if (view) {
125
- var domAtPos = view.domAtPos.bind(view);
126
- var target = (0, _utils.findDomRefAtPos)($pos.pos, domAtPos);
127
- if (target && target.textContent === _utils3.ZERO_WIDTH_SPACE) {
128
- return false;
129
- }
130
- }
131
- var nextSelection = _selection.GapCursorSelection.findFrom($pos, (0, _direction.isBackward)(dir) ? -1 : 1, mustMove);
132
- if (!nextSelection) {
133
- return false;
134
- }
135
- if (!(0, _isValidTargetNode.isValidTargetNode)((0, _direction.isForward)(dir) ? nextSelection.$from.nodeBefore : nextSelection.$from.nodeAfter)) {
136
- // reverse cursor position
137
- if (dispatch) {
138
- dispatch(tr.setSelection(new _selection.GapCursorSelection(nextSelection.$from, (0, _direction.isForward)(dir) ? _selection.Side.LEFT : _selection.Side.RIGHT)).scrollIntoView());
139
- }
140
- return true;
141
- }
142
- if (dispatch) {
143
- dispatch(tr.setSelection(nextSelection).scrollIntoView());
144
- }
145
- return true;
146
- };
147
- };
148
- var deleteNode = exports.deleteNode = function deleteNode(dir) {
149
- return function (state, dispatch) {
150
- if (state.selection instanceof _selection.GapCursorSelection) {
151
- var _state$selection = state.selection,
152
- $from = _state$selection.$from,
153
- $anchor = _state$selection.$anchor;
154
- var tr = state.tr;
155
- if ((0, _direction.isBackward)(dir)) {
156
- if (state.selection.side === 'left') {
157
- tr.setSelection(new _selection.GapCursorSelection($anchor, _selection.Side.RIGHT));
158
- if (dispatch) {
159
- dispatch(tr);
160
- }
161
- return true;
162
- }
163
- tr = (0, _utils.removeNodeBefore)(state.tr);
164
- } else if ($from.nodeAfter) {
165
- tr = tr.delete($from.pos, $from.pos + $from.nodeAfter.nodeSize);
166
- }
167
- if (dispatch) {
168
- dispatch(tr.setSelection(_state.Selection.near(tr.doc.resolve(tr.mapping.map(state.selection.$from.pos)))).scrollIntoView());
169
- }
170
- return true;
171
- }
172
- return false;
173
- };
174
- };
175
- var setGapCursorAtPos = exports.setGapCursorAtPos = function setGapCursorAtPos(position) {
176
- var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _selection.Side.LEFT;
177
- return function (state, dispatch) {
178
- // @see ED-6231
179
- if (position > state.doc.content.size) {
180
- return false;
181
- }
182
- var $pos = state.doc.resolve(position);
183
- if (_selection.GapCursorSelection.valid($pos)) {
184
- if (dispatch) {
185
- dispatch(state.tr.setSelection(new _selection.GapCursorSelection($pos, side)));
186
- }
187
- return true;
188
- }
189
- return false;
190
- };
191
- };
192
-
193
- // This function captures clicks outside of the ProseMirror contentEditable area
194
- // see also description of "handleClick" in gap-cursor pm-plugin
195
- var captureCursorCoords = function captureCursorCoords(event, editorRef, posAtCoords, tr) {
196
- var rect = editorRef.getBoundingClientRect();
197
-
198
- // capture clicks before the first block element
199
- if (event.clientY < rect.top) {
200
- return {
201
- position: 0,
202
- side: _selection.Side.LEFT
203
- };
204
- }
205
- if (rect.left > 0) {
206
- // calculate start position of a node that is vertically at the same level
207
- var _coords = posAtCoords({
208
- left: rect.left,
209
- top: event.clientY
210
- });
211
- if (_coords && _coords.inside > -1) {
212
- var $from = tr.doc.resolve(_coords.inside);
213
- var start = $from.before(1);
214
- var side = event.clientX < rect.left ? _selection.Side.LEFT : _selection.Side.RIGHT;
215
- var position;
216
- if (side === _selection.Side.LEFT) {
217
- position = start;
218
- } else {
219
- var node = tr.doc.nodeAt(start);
220
- if (node) {
221
- position = start + node.nodeSize;
222
- }
223
- }
224
- return {
225
- position: position,
226
- side: side
227
- };
228
- }
229
- }
230
- return null;
231
- };
232
- var setSelectionTopLevelBlocks = exports.setSelectionTopLevelBlocks = function setSelectionTopLevelBlocks(tr, event, editorRef, posAtCoords, editorFocused) {
233
- var cursorCoords = captureCursorCoords(event, editorRef, posAtCoords, tr);
234
- if (!cursorCoords) {
235
- return;
236
- }
237
- var $pos = cursorCoords.position !== undefined ? tr.doc.resolve(cursorCoords.position) : null;
238
- if ($pos === null) {
239
- return;
240
- }
241
- var isGapCursorAllowed = cursorCoords.side === _selection.Side.LEFT ? (0, _isValidTargetNode.isValidTargetNode)($pos.nodeAfter) : (0, _isValidTargetNode.isValidTargetNode)($pos.nodeBefore);
242
- if (isGapCursorAllowed && _selection.GapCursorSelection.valid($pos)) {
243
- // this forces PM to re-render the decoration node if we change the side of the gap cursor, it doesn't do it by default
244
- if (tr.selection instanceof _selection.GapCursorSelection) {
245
- tr.setSelection(_state.Selection.near($pos));
246
- } else {
247
- tr.setSelection(new _selection.GapCursorSelection($pos, cursorCoords.side));
248
- }
249
- }
250
- // try to set text selection if the editor isnt focused
251
- // if the editor is focused, we are most likely dragging a selection outside.
252
- else if (editorFocused === false) {
253
- var selectionTemp = _state.Selection.findFrom($pos, cursorCoords.side === _selection.Side.LEFT ? 1 : -1, true);
254
- if (selectionTemp) {
255
- tr.setSelection(selectionTemp);
256
- }
257
- }
258
- };
259
- var setCursorForTopLevelBlocks = exports.setCursorForTopLevelBlocks = function setCursorForTopLevelBlocks(event, editorRef, posAtCoords, editorFocused) {
260
- return function (state, dispatch) {
261
- var tr = state.tr;
262
- setSelectionTopLevelBlocks(tr, event, editorRef, posAtCoords, editorFocused);
263
- if (tr.selectionSet && dispatch) {
264
- dispatch(tr);
265
- return true;
266
- }
267
- return false;
268
- };
269
- };
270
- var hasGapCursorPlugin = exports.hasGapCursorPlugin = function hasGapCursorPlugin(state) {
271
- return Boolean(_gapCursorPluginKey.gapCursorPluginKey.get(state));
272
- };
@@ -1,23 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.Direction = void 0;
7
- exports.isBackward = isBackward;
8
- exports.isForward = isForward;
9
- var Direction = exports.Direction = /*#__PURE__*/function (Direction) {
10
- Direction["UP"] = "up";
11
- Direction["RIGHT"] = "right";
12
- Direction["DOWN"] = "down";
13
- Direction["LEFT"] = "left";
14
- Direction["BACKWARD"] = "backward";
15
- Direction["FORWARD"] = "forward";
16
- return Direction;
17
- }({});
18
- function isBackward(dir) {
19
- return [Direction.UP, Direction.LEFT, Direction.BACKWARD].indexOf(dir) !== -1;
20
- }
21
- function isForward(dir) {
22
- return [Direction.RIGHT, Direction.DOWN, Direction.FORWARD].indexOf(dir) !== -1;
23
- }
@@ -1,30 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "GapBookmark", {
7
- enumerable: true,
8
- get: function get() {
9
- return _selection.GapBookmark;
10
- }
11
- });
12
- Object.defineProperty(exports, "GapCursorSelection", {
13
- enumerable: true,
14
- get: function get() {
15
- return _selection.GapCursorSelection;
16
- }
17
- });
18
- Object.defineProperty(exports, "JSON_ID", {
19
- enumerable: true,
20
- get: function get() {
21
- return _selection.JSON_ID;
22
- }
23
- });
24
- Object.defineProperty(exports, "Side", {
25
- enumerable: true,
26
- get: function get() {
27
- return _selection.Side;
28
- }
29
- });
30
- var _selection = require("@atlaskit/editor-common/selection");
@@ -1,17 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.hideCaretModifier = exports.gapCursorStyles = void 0;
8
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
9
- var _react = require("@emotion/react");
10
- var _templateObject, _templateObject2;
11
- var gapCursorBlink = (0, _react.keyframes)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n from, to {\n opacity: 0;\n }\n 50% {\n opacity: 1;\n }\n"])));
12
- var hideCaretModifier = exports.hideCaretModifier = 'ProseMirror-hide-gapcursor';
13
- var gapCursor = '.ProseMirror-gapcursor';
14
- var prosemirrorwidget = '.ProseMirror-widget';
15
- var wrapLeft = '[layout="wrap-left"]';
16
- var wrapRight = '[layout="wrap-right"]';
17
- var gapCursorStyles = exports.gapCursorStyles = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n /* =============== GAP CURSOR ================== */\n .ProseMirror {\n &.", " {\n caret-color: transparent;\n }\n\n ", " {\n display: none;\n pointer-events: none;\n position: relative;\n\n & span {\n caret-color: transparent;\n position: absolute;\n height: 100%;\n width: 100%;\n display: block;\n }\n\n & span::after {\n animation: 1s ", " step-end infinite;\n border-left: 1px solid;\n content: '';\n display: block;\n position: absolute;\n top: 0;\n height: 100%;\n }\n &.-left span::after {\n left: -3px;\n }\n &.-right span::after {\n right: -3px;\n }\n & span[layout='full-width'],\n & span[layout='wide'],\n & span[layout='fixed-width'] {\n margin-left: 50%;\n transform: translateX(-50%);\n }\n &", " {\n float: right;\n }\n\n /* fix vertical alignment of gap cursor */\n &:first-of-type + ul,\n &:first-of-type + span + ul,\n &:first-of-type + ol,\n &:first-of-type + span + ol,\n &:first-of-type + pre,\n &:first-of-type + span + pre,\n &:first-of-type + blockquote,\n &:first-of-type + span + blockquote {\n margin-top: 0;\n }\n }\n &.ProseMirror-focused ", " {\n display: block;\n border-color: transparent;\n }\n }\n\n /* This hack below is for two images aligned side by side */\n ", "", " + span + ", ",\n ", "", " + span + ", ",\n ", " + ", " + ", ",\n ", " + ", " + span + ", ",\n ", " + ", " + ", ",\n ", " + ", " + span + ", ",\n ", " + ", " + ", ",\n ", " + ", " + span ", ",\n ", " + ", " + ", ",\n ", " + ", " + span + ", ",\n ", " + ", " {\n clear: none;\n }\n\n ", " + ", " + ", " > div,\n ", " + ", " + span + ", " > div,\n ", " + ", " + ", " > div,\n ", " + ", " + span + ", " > div,\n ", " + ", " + ", " > div,\n ", " + ", " + span + ", " > div,\n ", " + ", " + ", " > div,\n ", " + ", " + span + ", " > div {\n margin-right: 0;\n margin-left: 0;\n margin-bottom: 0;\n }\n\n ", " + ", ",\n ", " + ", " {\n float: left;\n }\n\n ", " + ", " + span + ", "::after,\n ", " + ", " + span + ", "::after,\n ", " + ", " + ", "::after,\n ", " + ", " + span + ", "::after,\n ", " + ", " + ", "::after,\n ", " + ", " + span + ", "::after {\n visibility: hidden;\n display: block;\n font-size: 0;\n content: ' ';\n clear: both;\n height: 0;\n }\n\n ", " + ", " + ", " + *,\n ", " + ", " + ", " + span + *,\n ", " + ", " + ", " + *,\n ", " + ", " + ", " + span + *,\n ", " + ", " + span + ", " + *,\n ", " + ", " + span + ", " + *,\n ", " + ", " + span + ", " + *,\n ", " + ", " + span + ", " + *,\n ", " + ", " + ", " + * > *,\n ", " + ", " + ", " + span + * > *,\n ", " + ", " + ", " + * > *,\n ", " + ", " + ", " + span + * > *,\n ", " + ", " + span + ", " + * > *,\n ", " + ", " + span + ", " + * > *,\n ", " + ", " + span + ", " + * > *,\n ", " + ", " + span + ", " + * > *,\n ", " + ", " + *,\n ", " + ", " + span + * {\n margin-top: 0;\n }\n"])), hideCaretModifier, gapCursor, gapCursorBlink, wrapRight, gapCursor, gapCursor, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapLeft, gapCursor, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapRight, wrapLeft, gapCursor, wrapRight, gapCursor, gapCursor, wrapLeft, wrapRight, gapCursor, wrapRight, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, gapCursor, wrapLeft, wrapRight, gapCursor, wrapRight, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, wrapRight, gapCursor, wrapLeft, wrapLeft, gapCursor, wrapRight, wrapRight, gapCursor, wrapLeft, gapCursor, wrapLeft, wrapRight, gapCursor, wrapRight, wrapLeft, prosemirrorwidget, gapCursor, prosemirrorwidget, gapCursor);
@@ -1,12 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "isIgnored", {
7
- enumerable: true,
8
- get: function get() {
9
- return _selection.isIgnored;
10
- }
11
- });
12
- var _selection = require("@atlaskit/editor-common/selection");
@@ -1,12 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "isValidTargetNode", {
7
- enumerable: true,
8
- get: function get() {
9
- return _selection.isValidTargetNode;
10
- }
11
- });
12
- var _selection = require("@atlaskit/editor-common/selection");