@atlaskit/editor-common 110.43.0 → 110.44.1

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 CHANGED
@@ -1,5 +1,25 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 110.44.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`8da61d284b811`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8da61d284b811) -
8
+ EDITOR-3911 Expand selection to block range
9
+ - Updated dependencies
10
+
11
+ ## 110.44.0
12
+
13
+ ### Minor Changes
14
+
15
+ - [`810632761780a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/810632761780a) -
16
+ EDITOR-3937 Cleanup usage of confluence_content_mode_replace_dense_with_compact from the frontend
17
+ as this is now only needed in the Confluence backend
18
+
19
+ ### Patch Changes
20
+
21
+ - Updated dependencies
22
+
3
23
  ## 110.43.0
4
24
 
5
25
  ### Minor Changes
@@ -19,7 +19,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
19
19
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
20
20
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
21
21
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
22
- var packageVersion = "110.42.0";
22
+ var packageVersion = "0.0.0-development";
23
23
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
24
24
  // Remove URL as it has UGC
25
25
  // Ignored via go/ees007
@@ -76,6 +76,12 @@ Object.defineProperty(exports, "expandSelectionBounds", {
76
76
  return _utils2.expandSelectionBounds;
77
77
  }
78
78
  });
79
+ Object.defineProperty(exports, "expandSelectionToBlockRange", {
80
+ enumerable: true,
81
+ get: function get() {
82
+ return _utils2.expandSelectionToBlockRange;
83
+ }
84
+ });
79
85
  Object.defineProperty(exports, "expandToBlockRange", {
80
86
  enumerable: true,
81
87
  get: function get() {
@@ -9,7 +9,7 @@ exports.atTheEndOfBlock = atTheEndOfBlock;
9
9
  exports.atTheEndOfDoc = atTheEndOfDoc;
10
10
  exports.deleteSelectedRange = void 0;
11
11
  exports.endPositionOfParent = endPositionOfParent;
12
- exports.isSelectionAtStartOfNode = exports.isSelectionAtEndOfNode = exports.expandToBlockRange = exports.expandSelectionBounds = void 0;
12
+ exports.isSelectionAtStartOfNode = exports.isSelectionAtEndOfNode = exports.expandToBlockRange = exports.expandSelectionToBlockRange = exports.expandSelectionBounds = void 0;
13
13
  exports.startPositionOfParent = startPositionOfParent;
14
14
  var _state = require("@atlaskit/editor-prosemirror/state");
15
15
  var _utils = require("@atlaskit/editor-tables/utils");
@@ -153,17 +153,29 @@ var deleteSelectedRange = exports.deleteSelectedRange = function deleteSelectedR
153
153
  tr.deleteRange(from, to);
154
154
  return tr;
155
155
  };
156
+ var getDefaultPredicate = function getDefaultPredicate(_ref) {
157
+ var nodes = _ref.nodes;
158
+ var requiresFurtherExpansion = new Set([nodes.bulletList, nodes.orderedList, nodes.taskList, nodes.listItem, nodes.taskItem, nodes.tableHeader, nodes.tableRow, nodes.tableCell, nodes.table, nodes.mediaGroup, nodes.mediaSingle]);
159
+ return function (node) {
160
+ return !requiresFurtherExpansion.has(node.type);
161
+ };
162
+ };
156
163
 
157
164
  /**
158
165
  * This expands the given $from and $to resolved positions to the block boundaries
159
166
  * spanning all nodes in the range up to the nearest common ancestor.
160
167
  *
168
+ * By default, it will further expand the range when encountering specific node types
169
+ * that require full block selection (like lists and tables). A custom predicate
170
+ * can be provided to modify this behavior.
171
+ *
161
172
  * @param $from The resolved start position
162
173
  * @param $to The resolved end position
163
174
  * @param predicate A predicate to determine if parent node is acceptable (see prosemirror-model/blockRange)
164
175
  * @returns An object containing the expanded $from and $to resolved positions
165
176
  */
166
- var expandToBlockRange = exports.expandToBlockRange = function expandToBlockRange($from, $to, predicate) {
177
+ var expandToBlockRange = exports.expandToBlockRange = function expandToBlockRange($from, $to) {
178
+ var predicate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : getDefaultPredicate($from.doc.type.schema);
167
179
  var range = $from.blockRange($to, predicate);
168
180
  if (!range) {
169
181
  return {
@@ -173,6 +185,25 @@ var expandToBlockRange = exports.expandToBlockRange = function expandToBlockRang
173
185
  }
174
186
  return {
175
187
  $from: $from.doc.resolve(range.start),
176
- $to: $to.doc.resolve(range.end)
188
+ $to: $to.doc.resolve(range.end),
189
+ range: range
177
190
  };
191
+ };
192
+
193
+ /**
194
+ * Expands a given selection to a block range, considering specific node types that require expansion.
195
+ *
196
+ * E.g. if the selection starts/ends at list items or table cells, the selection will be expanded
197
+ * to encompass the entire list or table.
198
+ *
199
+ * Used mostly for block menu / drag handle related selections, where we want to ensure the selection
200
+ * being acted upon covers the entire block range selected by the user.
201
+ *
202
+ * @param selection The selection to expand
203
+ * @returns The expanded selection
204
+ */
205
+ var expandSelectionToBlockRange = exports.expandSelectionToBlockRange = function expandSelectionToBlockRange(_ref2) {
206
+ var $from = _ref2.$from,
207
+ $to = _ref2.$to;
208
+ return expandToBlockRange($from, $to);
178
209
  };
@@ -24,7 +24,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
24
24
  * @jsx jsx
25
25
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
26
26
  var packageName = "@atlaskit/editor-common";
27
- var packageVersion = "110.42.0";
27
+ var packageVersion = "0.0.0-development";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -4,7 +4,7 @@ import { isFedRamp } from './environment';
4
4
  import { normaliseSentryBreadcrumbs, SERIALIZABLE_ATTRIBUTES } from './normalise-sentry-breadcrumbs';
5
5
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
6
6
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
7
- const packageVersion = "110.42.0";
7
+ const packageVersion = "0.0.0-development";
8
8
  const sanitiseSentryEvents = (data, _hint) => {
9
9
  // Remove URL as it has UGC
10
10
  // Ignored via go/ees007
@@ -12,7 +12,7 @@ export { isIgnored } from './gap-cursor/utils/is-ignored';
12
12
  export { isValidTargetNode } from './gap-cursor/utils/is-valid-target-node';
13
13
  export { setGapCursorSelection } from './gap-cursor/utils/setGapCursorSelection';
14
14
  export { hideCaretModifier, gapCursorStyles } from './gap-cursor/styles';
15
- export { atTheBeginningOfBlock, atTheBeginningOfDoc, atTheEndOfBlock, atTheEndOfDoc, deleteSelectedRange, endPositionOfParent, expandSelectionBounds, isSelectionAtEndOfNode, isSelectionAtStartOfNode, startPositionOfParent, expandToBlockRange } from './utils';
15
+ export { atTheBeginningOfBlock, atTheBeginningOfDoc, atTheEndOfBlock, atTheEndOfDoc, deleteSelectedRange, endPositionOfParent, expandSelectionBounds, expandSelectionToBlockRange, expandToBlockRange, isSelectionAtEndOfNode, isSelectionAtStartOfNode, startPositionOfParent } from './utils';
16
16
  export function getNodeSelectionAnalyticsPayload(selection) {
17
17
  if (selection instanceof NodeSelection) {
18
18
  return {
@@ -152,17 +152,29 @@ export const deleteSelectedRange = (tr, selectionToUse) => {
152
152
  tr.deleteRange(from, to);
153
153
  return tr;
154
154
  };
155
+ const getDefaultPredicate = ({
156
+ nodes
157
+ }) => {
158
+ const requiresFurtherExpansion = new Set([nodes.bulletList, nodes.orderedList, nodes.taskList, nodes.listItem, nodes.taskItem, nodes.tableHeader, nodes.tableRow, nodes.tableCell, nodes.table, nodes.mediaGroup, nodes.mediaSingle]);
159
+ return node => {
160
+ return !requiresFurtherExpansion.has(node.type);
161
+ };
162
+ };
155
163
 
156
164
  /**
157
165
  * This expands the given $from and $to resolved positions to the block boundaries
158
166
  * spanning all nodes in the range up to the nearest common ancestor.
159
167
  *
168
+ * By default, it will further expand the range when encountering specific node types
169
+ * that require full block selection (like lists and tables). A custom predicate
170
+ * can be provided to modify this behavior.
171
+ *
160
172
  * @param $from The resolved start position
161
173
  * @param $to The resolved end position
162
174
  * @param predicate A predicate to determine if parent node is acceptable (see prosemirror-model/blockRange)
163
175
  * @returns An object containing the expanded $from and $to resolved positions
164
176
  */
165
- export const expandToBlockRange = ($from, $to, predicate) => {
177
+ export const expandToBlockRange = ($from, $to, predicate = getDefaultPredicate($from.doc.type.schema)) => {
166
178
  const range = $from.blockRange($to, predicate);
167
179
  if (!range) {
168
180
  return {
@@ -172,6 +184,26 @@ export const expandToBlockRange = ($from, $to, predicate) => {
172
184
  }
173
185
  return {
174
186
  $from: $from.doc.resolve(range.start),
175
- $to: $to.doc.resolve(range.end)
187
+ $to: $to.doc.resolve(range.end),
188
+ range
176
189
  };
190
+ };
191
+
192
+ /**
193
+ * Expands a given selection to a block range, considering specific node types that require expansion.
194
+ *
195
+ * E.g. if the selection starts/ends at list items or table cells, the selection will be expanded
196
+ * to encompass the entire list or table.
197
+ *
198
+ * Used mostly for block menu / drag handle related selections, where we want to ensure the selection
199
+ * being acted upon covers the entire block range selected by the user.
200
+ *
201
+ * @param selection The selection to expand
202
+ * @returns The expanded selection
203
+ */
204
+ export const expandSelectionToBlockRange = ({
205
+ $from,
206
+ $to
207
+ }) => {
208
+ return expandToBlockRange($from, $to);
177
209
  };
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import { fg } from '@atlaskit/platform-feature-flags';
15
15
  import Layer from '../Layer';
16
16
  const packageName = "@atlaskit/editor-common";
17
- const packageVersion = "110.42.0";
17
+ const packageVersion = "0.0.0-development";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -10,7 +10,7 @@ import { isFedRamp } from './environment';
10
10
  import { normaliseSentryBreadcrumbs, SERIALIZABLE_ATTRIBUTES } from './normalise-sentry-breadcrumbs';
11
11
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
12
12
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
13
- var packageVersion = "110.42.0";
13
+ var packageVersion = "0.0.0-development";
14
14
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
15
15
  // Remove URL as it has UGC
16
16
  // Ignored via go/ees007
@@ -12,7 +12,7 @@ export { isIgnored } from './gap-cursor/utils/is-ignored';
12
12
  export { isValidTargetNode } from './gap-cursor/utils/is-valid-target-node';
13
13
  export { setGapCursorSelection } from './gap-cursor/utils/setGapCursorSelection';
14
14
  export { hideCaretModifier, gapCursorStyles } from './gap-cursor/styles';
15
- export { atTheBeginningOfBlock, atTheBeginningOfDoc, atTheEndOfBlock, atTheEndOfDoc, deleteSelectedRange, endPositionOfParent, expandSelectionBounds, isSelectionAtEndOfNode, isSelectionAtStartOfNode, startPositionOfParent, expandToBlockRange } from './utils';
15
+ export { atTheBeginningOfBlock, atTheBeginningOfDoc, atTheEndOfBlock, atTheEndOfDoc, deleteSelectedRange, endPositionOfParent, expandSelectionBounds, expandSelectionToBlockRange, expandToBlockRange, isSelectionAtEndOfNode, isSelectionAtStartOfNode, startPositionOfParent } from './utils';
16
16
  export function getNodeSelectionAnalyticsPayload(selection) {
17
17
  if (selection instanceof NodeSelection) {
18
18
  return {
@@ -140,17 +140,29 @@ export var deleteSelectedRange = function deleteSelectedRange(tr, selectionToUse
140
140
  tr.deleteRange(from, to);
141
141
  return tr;
142
142
  };
143
+ var getDefaultPredicate = function getDefaultPredicate(_ref) {
144
+ var nodes = _ref.nodes;
145
+ var requiresFurtherExpansion = new Set([nodes.bulletList, nodes.orderedList, nodes.taskList, nodes.listItem, nodes.taskItem, nodes.tableHeader, nodes.tableRow, nodes.tableCell, nodes.table, nodes.mediaGroup, nodes.mediaSingle]);
146
+ return function (node) {
147
+ return !requiresFurtherExpansion.has(node.type);
148
+ };
149
+ };
143
150
 
144
151
  /**
145
152
  * This expands the given $from and $to resolved positions to the block boundaries
146
153
  * spanning all nodes in the range up to the nearest common ancestor.
147
154
  *
155
+ * By default, it will further expand the range when encountering specific node types
156
+ * that require full block selection (like lists and tables). A custom predicate
157
+ * can be provided to modify this behavior.
158
+ *
148
159
  * @param $from The resolved start position
149
160
  * @param $to The resolved end position
150
161
  * @param predicate A predicate to determine if parent node is acceptable (see prosemirror-model/blockRange)
151
162
  * @returns An object containing the expanded $from and $to resolved positions
152
163
  */
153
- export var expandToBlockRange = function expandToBlockRange($from, $to, predicate) {
164
+ export var expandToBlockRange = function expandToBlockRange($from, $to) {
165
+ var predicate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : getDefaultPredicate($from.doc.type.schema);
154
166
  var range = $from.blockRange($to, predicate);
155
167
  if (!range) {
156
168
  return {
@@ -160,6 +172,25 @@ export var expandToBlockRange = function expandToBlockRange($from, $to, predicat
160
172
  }
161
173
  return {
162
174
  $from: $from.doc.resolve(range.start),
163
- $to: $to.doc.resolve(range.end)
175
+ $to: $to.doc.resolve(range.end),
176
+ range: range
164
177
  };
178
+ };
179
+
180
+ /**
181
+ * Expands a given selection to a block range, considering specific node types that require expansion.
182
+ *
183
+ * E.g. if the selection starts/ends at list items or table cells, the selection will be expanded
184
+ * to encompass the entire list or table.
185
+ *
186
+ * Used mostly for block menu / drag handle related selections, where we want to ensure the selection
187
+ * being acted upon covers the entire block range selected by the user.
188
+ *
189
+ * @param selection The selection to expand
190
+ * @returns The expanded selection
191
+ */
192
+ export var expandSelectionToBlockRange = function expandSelectionToBlockRange(_ref2) {
193
+ var $from = _ref2.$from,
194
+ $to = _ref2.$to;
195
+ return expandToBlockRange($from, $to);
165
196
  };
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
21
21
  import { fg } from '@atlaskit/platform-feature-flags';
22
22
  import Layer from '../Layer';
23
23
  var packageName = "@atlaskit/editor-common";
24
- var packageVersion = "110.42.0";
24
+ var packageVersion = "0.0.0-development";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
@@ -11,7 +11,7 @@ export { isIgnored } from './gap-cursor/utils/is-ignored';
11
11
  export { isValidTargetNode } from './gap-cursor/utils/is-valid-target-node';
12
12
  export { setGapCursorSelection } from './gap-cursor/utils/setGapCursorSelection';
13
13
  export { hideCaretModifier, gapCursorStyles } from './gap-cursor/styles';
14
- export { atTheBeginningOfBlock, atTheBeginningOfDoc, atTheEndOfBlock, atTheEndOfDoc, deleteSelectedRange, endPositionOfParent, expandSelectionBounds, isSelectionAtEndOfNode, isSelectionAtStartOfNode, startPositionOfParent, expandToBlockRange, } from './utils';
14
+ export { atTheBeginningOfBlock, atTheBeginningOfDoc, atTheEndOfBlock, atTheEndOfDoc, deleteSelectedRange, endPositionOfParent, expandSelectionBounds, expandSelectionToBlockRange, expandToBlockRange, isSelectionAtEndOfNode, isSelectionAtStartOfNode, startPositionOfParent, } from './utils';
15
15
  export declare function getNodeSelectionAnalyticsPayload(selection: Selection): AnalyticsEventPayload | undefined;
16
16
  export declare function getAllSelectionAnalyticsPayload(selection: Selection): AnalyticsEventPayload | undefined;
17
17
  export declare function getCellSelectionAnalyticsPayload(state: EditorState): AnalyticsEventPayload | undefined;
@@ -30,6 +30,10 @@ export declare const deleteSelectedRange: (tr: Transaction, selectionToUse?: Sel
30
30
  * This expands the given $from and $to resolved positions to the block boundaries
31
31
  * spanning all nodes in the range up to the nearest common ancestor.
32
32
  *
33
+ * By default, it will further expand the range when encountering specific node types
34
+ * that require full block selection (like lists and tables). A custom predicate
35
+ * can be provided to modify this behavior.
36
+ *
33
37
  * @param $from The resolved start position
34
38
  * @param $to The resolved end position
35
39
  * @param predicate A predicate to determine if parent node is acceptable (see prosemirror-model/blockRange)
@@ -38,4 +42,30 @@ export declare const deleteSelectedRange: (tr: Transaction, selectionToUse?: Sel
38
42
  export declare const expandToBlockRange: ($from: ResolvedPos, $to: ResolvedPos, predicate?: (node: PMNode) => boolean) => {
39
43
  $from: ResolvedPos;
40
44
  $to: ResolvedPos;
45
+ range?: undefined;
46
+ } | {
47
+ $from: ResolvedPos;
48
+ $to: ResolvedPos;
49
+ range: import("prosemirror-model").NodeRange;
50
+ };
51
+ /**
52
+ * Expands a given selection to a block range, considering specific node types that require expansion.
53
+ *
54
+ * E.g. if the selection starts/ends at list items or table cells, the selection will be expanded
55
+ * to encompass the entire list or table.
56
+ *
57
+ * Used mostly for block menu / drag handle related selections, where we want to ensure the selection
58
+ * being acted upon covers the entire block range selected by the user.
59
+ *
60
+ * @param selection The selection to expand
61
+ * @returns The expanded selection
62
+ */
63
+ export declare const expandSelectionToBlockRange: ({ $from, $to }: Selection) => {
64
+ $from: ResolvedPos;
65
+ $to: ResolvedPos;
66
+ range?: undefined;
67
+ } | {
68
+ $from: ResolvedPos;
69
+ $to: ResolvedPos;
70
+ range: import("prosemirror-model").NodeRange;
41
71
  };
@@ -1,2 +1,2 @@
1
1
  export type EditorAppearance = 'comment' | 'full-page' | 'full-width' | 'max' | 'chromeless';
2
- export type EditorContentMode = 'standard' | 'dense' | 'compact';
2
+ export type EditorContentMode = 'standard' | 'compact';
@@ -11,7 +11,7 @@ export { isIgnored } from './gap-cursor/utils/is-ignored';
11
11
  export { isValidTargetNode } from './gap-cursor/utils/is-valid-target-node';
12
12
  export { setGapCursorSelection } from './gap-cursor/utils/setGapCursorSelection';
13
13
  export { hideCaretModifier, gapCursorStyles } from './gap-cursor/styles';
14
- export { atTheBeginningOfBlock, atTheBeginningOfDoc, atTheEndOfBlock, atTheEndOfDoc, deleteSelectedRange, endPositionOfParent, expandSelectionBounds, isSelectionAtEndOfNode, isSelectionAtStartOfNode, startPositionOfParent, expandToBlockRange, } from './utils';
14
+ export { atTheBeginningOfBlock, atTheBeginningOfDoc, atTheEndOfBlock, atTheEndOfDoc, deleteSelectedRange, endPositionOfParent, expandSelectionBounds, expandSelectionToBlockRange, expandToBlockRange, isSelectionAtEndOfNode, isSelectionAtStartOfNode, startPositionOfParent, } from './utils';
15
15
  export declare function getNodeSelectionAnalyticsPayload(selection: Selection): AnalyticsEventPayload | undefined;
16
16
  export declare function getAllSelectionAnalyticsPayload(selection: Selection): AnalyticsEventPayload | undefined;
17
17
  export declare function getCellSelectionAnalyticsPayload(state: EditorState): AnalyticsEventPayload | undefined;
@@ -30,6 +30,10 @@ export declare const deleteSelectedRange: (tr: Transaction, selectionToUse?: Sel
30
30
  * This expands the given $from and $to resolved positions to the block boundaries
31
31
  * spanning all nodes in the range up to the nearest common ancestor.
32
32
  *
33
+ * By default, it will further expand the range when encountering specific node types
34
+ * that require full block selection (like lists and tables). A custom predicate
35
+ * can be provided to modify this behavior.
36
+ *
33
37
  * @param $from The resolved start position
34
38
  * @param $to The resolved end position
35
39
  * @param predicate A predicate to determine if parent node is acceptable (see prosemirror-model/blockRange)
@@ -38,4 +42,30 @@ export declare const deleteSelectedRange: (tr: Transaction, selectionToUse?: Sel
38
42
  export declare const expandToBlockRange: ($from: ResolvedPos, $to: ResolvedPos, predicate?: (node: PMNode) => boolean) => {
39
43
  $from: ResolvedPos;
40
44
  $to: ResolvedPos;
45
+ range?: undefined;
46
+ } | {
47
+ $from: ResolvedPos;
48
+ $to: ResolvedPos;
49
+ range: import("prosemirror-model").NodeRange;
50
+ };
51
+ /**
52
+ * Expands a given selection to a block range, considering specific node types that require expansion.
53
+ *
54
+ * E.g. if the selection starts/ends at list items or table cells, the selection will be expanded
55
+ * to encompass the entire list or table.
56
+ *
57
+ * Used mostly for block menu / drag handle related selections, where we want to ensure the selection
58
+ * being acted upon covers the entire block range selected by the user.
59
+ *
60
+ * @param selection The selection to expand
61
+ * @returns The expanded selection
62
+ */
63
+ export declare const expandSelectionToBlockRange: ({ $from, $to }: Selection) => {
64
+ $from: ResolvedPos;
65
+ $to: ResolvedPos;
66
+ range?: undefined;
67
+ } | {
68
+ $from: ResolvedPos;
69
+ $to: ResolvedPos;
70
+ range: import("prosemirror-model").NodeRange;
41
71
  };
@@ -1,2 +1,2 @@
1
1
  export type EditorAppearance = 'comment' | 'full-page' | 'full-width' | 'max' | 'chromeless';
2
- export type EditorContentMode = 'standard' | 'dense' | 'compact';
2
+ export type EditorContentMode = 'standard' | 'compact';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "110.43.0",
3
+ "version": "110.44.1",
4
4
  "description": "A package that contains common classes and components for editor and renderer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -74,15 +74,15 @@
74
74
  "@atlaskit/prosemirror-history": "^0.2.0",
75
75
  "@atlaskit/react-ufo": "^4.16.0",
76
76
  "@atlaskit/section-message": "^8.10.0",
77
- "@atlaskit/smart-card": "^43.15.0",
77
+ "@atlaskit/smart-card": "^43.16.0",
78
78
  "@atlaskit/smart-user-picker": "^8.5.0",
79
79
  "@atlaskit/spinner": "^19.0.0",
80
80
  "@atlaskit/status": "^3.0.0",
81
81
  "@atlaskit/task-decision": "^19.2.0",
82
82
  "@atlaskit/textfield": "^8.2.0",
83
83
  "@atlaskit/theme": "^21.0.0",
84
- "@atlaskit/tmp-editor-statsig": "^15.10.0",
85
- "@atlaskit/tokens": "^8.4.0",
84
+ "@atlaskit/tmp-editor-statsig": "^15.11.0",
85
+ "@atlaskit/tokens": "^8.5.0",
86
86
  "@atlaskit/tooltip": "^20.11.0",
87
87
  "@atlaskit/width-detector": "^5.0.0",
88
88
  "@babel/runtime": "^7.0.0",