@atlaskit/editor-common 99.10.0 → 99.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/selection/index.js +6 -0
- package/dist/cjs/selection/utils.js +36 -2
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/selection/index.js +1 -1
- package/dist/es2019/selection/utils.js +35 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/selection/index.js +1 -1
- package/dist/esm/selection/utils.js +35 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/analytics/types/general-events.d.ts +2 -0
- package/dist/types/selection/index.d.ts +1 -1
- package/dist/types/selection/utils.d.ts +4 -0
- package/dist/types-ts4.5/analytics/types/general-events.d.ts +2 -0
- package/dist/types-ts4.5/selection/index.d.ts +1 -1
- package/dist/types-ts4.5/selection/utils.d.ts +4 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 99.11.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#111465](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/111465)
|
|
8
|
+
[`c0cbae02ded12`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c0cbae02ded12) -
|
|
9
|
+
Add utility for expanding selection boundaries
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#112757](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/112757)
|
|
14
|
+
[`16ea3fd7c7417`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/16ea3fd7c7417) -
|
|
15
|
+
Added account and browser locale attributes to the editor started event
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
18
|
+
## 99.10.1
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- Updated dependencies
|
|
23
|
+
|
|
3
24
|
## 99.10.0
|
|
4
25
|
|
|
5
26
|
### Minor Changes
|
|
@@ -17,7 +17,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
|
17
17
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
18
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
19
19
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
20
|
-
var packageVersion = "99.
|
|
20
|
+
var packageVersion = "99.11.0";
|
|
21
21
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
22
22
|
// Remove URL as it has UGC
|
|
23
23
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -64,6 +64,12 @@ Object.defineProperty(exports, "endPositionOfParent", {
|
|
|
64
64
|
return _utils2.endPositionOfParent;
|
|
65
65
|
}
|
|
66
66
|
});
|
|
67
|
+
Object.defineProperty(exports, "expandSelectionBounds", {
|
|
68
|
+
enumerable: true,
|
|
69
|
+
get: function get() {
|
|
70
|
+
return _utils2.expandSelectionBounds;
|
|
71
|
+
}
|
|
72
|
+
});
|
|
67
73
|
Object.defineProperty(exports, "gapCursorStyles", {
|
|
68
74
|
enumerable: true,
|
|
69
75
|
get: function get() {
|
|
@@ -8,7 +8,7 @@ exports.atTheBeginningOfDoc = atTheBeginningOfDoc;
|
|
|
8
8
|
exports.atTheEndOfBlock = atTheEndOfBlock;
|
|
9
9
|
exports.atTheEndOfDoc = atTheEndOfDoc;
|
|
10
10
|
exports.endPositionOfParent = endPositionOfParent;
|
|
11
|
-
exports.isSelectionAtStartOfNode = exports.isSelectionAtEndOfNode = void 0;
|
|
11
|
+
exports.isSelectionAtStartOfNode = exports.isSelectionAtEndOfNode = exports.expandSelectionBounds = void 0;
|
|
12
12
|
exports.startPositionOfParent = startPositionOfParent;
|
|
13
13
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
14
14
|
var _selection = require("./gap-cursor/selection");
|
|
@@ -78,4 +78,38 @@ function startPositionOfParent(resolvedPos) {
|
|
|
78
78
|
}
|
|
79
79
|
function endPositionOfParent(resolvedPos) {
|
|
80
80
|
return resolvedPos.end(resolvedPos.depth) + 1;
|
|
81
|
-
}
|
|
81
|
+
}
|
|
82
|
+
var expandSelectionBounds = exports.expandSelectionBounds = function expandSelectionBounds($anchor, $head) {
|
|
83
|
+
var $from = $anchor.min($head);
|
|
84
|
+
var $to = $anchor.max($head);
|
|
85
|
+
var fromDepth = $from.depth;
|
|
86
|
+
var toDepth = $to.depth;
|
|
87
|
+
var selectionStart = fromDepth ? $from.before() : $from.pos;
|
|
88
|
+
var selectionEnd = toDepth ? $to.after() : $to.pos;
|
|
89
|
+
var selectionHasGrandparent = toDepth > 1 && fromDepth > 1;
|
|
90
|
+
var selectionIsAcrossDiffParents = selectionHasGrandparent && !$to.parent.isTextblock && !$to.sameParent($from);
|
|
91
|
+
var selectionIsAcrossTextBlocksWithDiffParents = selectionHasGrandparent && $to.parent.isTextblock && $to.before(toDepth - 1) !== $from.before(fromDepth - 1);
|
|
92
|
+
if (toDepth > fromDepth) {
|
|
93
|
+
// expand end of selection to after the last node
|
|
94
|
+
selectionEnd = fromDepth ? $to.after(fromDepth) : $to.after(1);
|
|
95
|
+
} else if (toDepth < fromDepth) {
|
|
96
|
+
// expand start of selection to before the current node
|
|
97
|
+
selectionStart = toDepth ? $from.before(toDepth) : $from.before(1);
|
|
98
|
+
} else if (selectionIsAcrossDiffParents || selectionIsAcrossTextBlocksWithDiffParents) {
|
|
99
|
+
// when selection from/to share same depth with different parents, hoist up the selection to the parent of the highest depth in the selection
|
|
100
|
+
selectionStart = $from.before(fromDepth - 1);
|
|
101
|
+
selectionEnd = $to.after(toDepth - 1);
|
|
102
|
+
} else if (!$from.node().inlineContent) {
|
|
103
|
+
// when selection might be a Node selection, return what was passed in
|
|
104
|
+
return {
|
|
105
|
+
$anchor: $anchor,
|
|
106
|
+
$head: $head
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
var $expandedFrom = $anchor.doc.resolve(selectionStart);
|
|
110
|
+
var $expandedTo = $anchor.doc.resolve(selectionEnd);
|
|
111
|
+
return {
|
|
112
|
+
$anchor: $anchor === $from ? $expandedFrom : $expandedTo,
|
|
113
|
+
$head: $head === $to ? $expandedTo : $expandedFrom
|
|
114
|
+
};
|
|
115
|
+
};
|
|
@@ -23,7 +23,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
23
23
|
* @jsx jsx
|
|
24
24
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
25
25
|
var packageName = "@atlaskit/editor-common";
|
|
26
|
-
var packageVersion = "99.
|
|
26
|
+
var packageVersion = "99.11.0";
|
|
27
27
|
var halfFocusRing = 1;
|
|
28
28
|
var dropOffset = '0, 8';
|
|
29
29
|
// Ignored via go/ees005
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isFedRamp } from './environment';
|
|
2
2
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
3
3
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
4
|
-
const packageVersion = "99.
|
|
4
|
+
const packageVersion = "99.11.0";
|
|
5
5
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
6
6
|
// Remove URL as it has UGC
|
|
7
7
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -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, endPositionOfParent, isSelectionAtEndOfNode, isSelectionAtStartOfNode, startPositionOfParent } from './utils';
|
|
15
|
+
export { atTheBeginningOfBlock, atTheBeginningOfDoc, atTheEndOfBlock, atTheEndOfDoc, endPositionOfParent, expandSelectionBounds, isSelectionAtEndOfNode, isSelectionAtStartOfNode, startPositionOfParent } from './utils';
|
|
16
16
|
export function getNodeSelectionAnalyticsPayload(selection) {
|
|
17
17
|
if (selection instanceof NodeSelection) {
|
|
18
18
|
return {
|
|
@@ -78,4 +78,38 @@ export function startPositionOfParent(resolvedPos) {
|
|
|
78
78
|
}
|
|
79
79
|
export function endPositionOfParent(resolvedPos) {
|
|
80
80
|
return resolvedPos.end(resolvedPos.depth) + 1;
|
|
81
|
-
}
|
|
81
|
+
}
|
|
82
|
+
export const expandSelectionBounds = ($anchor, $head) => {
|
|
83
|
+
const $from = $anchor.min($head);
|
|
84
|
+
const $to = $anchor.max($head);
|
|
85
|
+
const fromDepth = $from.depth;
|
|
86
|
+
const toDepth = $to.depth;
|
|
87
|
+
let selectionStart = fromDepth ? $from.before() : $from.pos;
|
|
88
|
+
let selectionEnd = toDepth ? $to.after() : $to.pos;
|
|
89
|
+
const selectionHasGrandparent = toDepth > 1 && fromDepth > 1;
|
|
90
|
+
const selectionIsAcrossDiffParents = selectionHasGrandparent && !$to.parent.isTextblock && !$to.sameParent($from);
|
|
91
|
+
const selectionIsAcrossTextBlocksWithDiffParents = selectionHasGrandparent && $to.parent.isTextblock && $to.before(toDepth - 1) !== $from.before(fromDepth - 1);
|
|
92
|
+
if (toDepth > fromDepth) {
|
|
93
|
+
// expand end of selection to after the last node
|
|
94
|
+
selectionEnd = fromDepth ? $to.after(fromDepth) : $to.after(1);
|
|
95
|
+
} else if (toDepth < fromDepth) {
|
|
96
|
+
// expand start of selection to before the current node
|
|
97
|
+
selectionStart = toDepth ? $from.before(toDepth) : $from.before(1);
|
|
98
|
+
} else if (selectionIsAcrossDiffParents || selectionIsAcrossTextBlocksWithDiffParents) {
|
|
99
|
+
// when selection from/to share same depth with different parents, hoist up the selection to the parent of the highest depth in the selection
|
|
100
|
+
selectionStart = $from.before(fromDepth - 1);
|
|
101
|
+
selectionEnd = $to.after(toDepth - 1);
|
|
102
|
+
} else if (!$from.node().inlineContent) {
|
|
103
|
+
// when selection might be a Node selection, return what was passed in
|
|
104
|
+
return {
|
|
105
|
+
$anchor,
|
|
106
|
+
$head
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
const $expandedFrom = $anchor.doc.resolve(selectionStart);
|
|
110
|
+
const $expandedTo = $anchor.doc.resolve(selectionEnd);
|
|
111
|
+
return {
|
|
112
|
+
$anchor: $anchor === $from ? $expandedFrom : $expandedTo,
|
|
113
|
+
$head: $head === $to ? $expandedTo : $expandedFrom
|
|
114
|
+
};
|
|
115
|
+
};
|
|
@@ -13,7 +13,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
13
13
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
14
14
|
import Layer from '../Layer';
|
|
15
15
|
const packageName = "@atlaskit/editor-common";
|
|
16
|
-
const packageVersion = "99.
|
|
16
|
+
const packageVersion = "99.11.0";
|
|
17
17
|
const halfFocusRing = 1;
|
|
18
18
|
const dropOffset = '0, 8';
|
|
19
19
|
// Ignored via go/ees005
|
|
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
7
7
|
import { isFedRamp } from './environment';
|
|
8
8
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
9
9
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
10
|
-
var packageVersion = "99.
|
|
10
|
+
var packageVersion = "99.11.0";
|
|
11
11
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
12
12
|
// Remove URL as it has UGC
|
|
13
13
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -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, endPositionOfParent, isSelectionAtEndOfNode, isSelectionAtStartOfNode, startPositionOfParent } from './utils';
|
|
15
|
+
export { atTheBeginningOfBlock, atTheBeginningOfDoc, atTheEndOfBlock, atTheEndOfDoc, endPositionOfParent, expandSelectionBounds, isSelectionAtEndOfNode, isSelectionAtStartOfNode, startPositionOfParent } from './utils';
|
|
16
16
|
export function getNodeSelectionAnalyticsPayload(selection) {
|
|
17
17
|
if (selection instanceof NodeSelection) {
|
|
18
18
|
return {
|
|
@@ -66,4 +66,38 @@ export function startPositionOfParent(resolvedPos) {
|
|
|
66
66
|
}
|
|
67
67
|
export function endPositionOfParent(resolvedPos) {
|
|
68
68
|
return resolvedPos.end(resolvedPos.depth) + 1;
|
|
69
|
-
}
|
|
69
|
+
}
|
|
70
|
+
export var expandSelectionBounds = function expandSelectionBounds($anchor, $head) {
|
|
71
|
+
var $from = $anchor.min($head);
|
|
72
|
+
var $to = $anchor.max($head);
|
|
73
|
+
var fromDepth = $from.depth;
|
|
74
|
+
var toDepth = $to.depth;
|
|
75
|
+
var selectionStart = fromDepth ? $from.before() : $from.pos;
|
|
76
|
+
var selectionEnd = toDepth ? $to.after() : $to.pos;
|
|
77
|
+
var selectionHasGrandparent = toDepth > 1 && fromDepth > 1;
|
|
78
|
+
var selectionIsAcrossDiffParents = selectionHasGrandparent && !$to.parent.isTextblock && !$to.sameParent($from);
|
|
79
|
+
var selectionIsAcrossTextBlocksWithDiffParents = selectionHasGrandparent && $to.parent.isTextblock && $to.before(toDepth - 1) !== $from.before(fromDepth - 1);
|
|
80
|
+
if (toDepth > fromDepth) {
|
|
81
|
+
// expand end of selection to after the last node
|
|
82
|
+
selectionEnd = fromDepth ? $to.after(fromDepth) : $to.after(1);
|
|
83
|
+
} else if (toDepth < fromDepth) {
|
|
84
|
+
// expand start of selection to before the current node
|
|
85
|
+
selectionStart = toDepth ? $from.before(toDepth) : $from.before(1);
|
|
86
|
+
} else if (selectionIsAcrossDiffParents || selectionIsAcrossTextBlocksWithDiffParents) {
|
|
87
|
+
// when selection from/to share same depth with different parents, hoist up the selection to the parent of the highest depth in the selection
|
|
88
|
+
selectionStart = $from.before(fromDepth - 1);
|
|
89
|
+
selectionEnd = $to.after(toDepth - 1);
|
|
90
|
+
} else if (!$from.node().inlineContent) {
|
|
91
|
+
// when selection might be a Node selection, return what was passed in
|
|
92
|
+
return {
|
|
93
|
+
$anchor: $anchor,
|
|
94
|
+
$head: $head
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
var $expandedFrom = $anchor.doc.resolve(selectionStart);
|
|
98
|
+
var $expandedTo = $anchor.doc.resolve(selectionEnd);
|
|
99
|
+
return {
|
|
100
|
+
$anchor: $anchor === $from ? $expandedFrom : $expandedTo,
|
|
101
|
+
$head: $head === $to ? $expandedTo : $expandedFrom
|
|
102
|
+
};
|
|
103
|
+
};
|
|
@@ -20,7 +20,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
20
20
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
21
21
|
import Layer from '../Layer';
|
|
22
22
|
var packageName = "@atlaskit/editor-common";
|
|
23
|
-
var packageVersion = "99.
|
|
23
|
+
var packageVersion = "99.11.0";
|
|
24
24
|
var halfFocusRing = 1;
|
|
25
25
|
var dropOffset = '0, 8';
|
|
26
26
|
// Ignored via go/ees005
|
|
@@ -34,6 +34,8 @@ type FeedbackAEP = UIAEP<ACTION.OPENED, ACTION_SUBJECT.FEEDBACK_DIALOG, undefine
|
|
|
34
34
|
type EditorStartAEP = UIAEP<ACTION.STARTED, ACTION_SUBJECT.EDITOR, undefined, {
|
|
35
35
|
platform: PLATFORMS.NATIVE | PLATFORMS.HYBRID | PLATFORMS.WEB;
|
|
36
36
|
featureFlags: FeatureFlagKey[];
|
|
37
|
+
accountLocale?: string;
|
|
38
|
+
browserLocale?: string;
|
|
37
39
|
}, undefined>;
|
|
38
40
|
type EditorPerfAEP = OperationalAEPWithObjectId<ACTION.EDITOR_MOUNTED | ACTION.PROSEMIRROR_RENDERED | ACTION.ON_EDITOR_READY_CALLBACK | ACTION.ON_CHANGE_CALLBACK, ACTION_SUBJECT.EDITOR, undefined, {
|
|
39
41
|
duration: number;
|
|
@@ -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, endPositionOfParent, isSelectionAtEndOfNode, isSelectionAtStartOfNode, startPositionOfParent, } from './utils';
|
|
14
|
+
export { atTheBeginningOfBlock, atTheBeginningOfDoc, atTheEndOfBlock, atTheEndOfDoc, endPositionOfParent, expandSelectionBounds, 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;
|
|
@@ -9,3 +9,7 @@ export declare function atTheEndOfBlock(state: EditorState): boolean;
|
|
|
9
9
|
export declare function atTheBeginningOfBlock(state: EditorState): boolean;
|
|
10
10
|
export declare function startPositionOfParent(resolvedPos: ResolvedPos): number;
|
|
11
11
|
export declare function endPositionOfParent(resolvedPos: ResolvedPos): number;
|
|
12
|
+
export declare const expandSelectionBounds: ($anchor: ResolvedPos, $head: ResolvedPos) => {
|
|
13
|
+
$anchor: ResolvedPos;
|
|
14
|
+
$head: ResolvedPos;
|
|
15
|
+
};
|
|
@@ -34,6 +34,8 @@ type FeedbackAEP = UIAEP<ACTION.OPENED, ACTION_SUBJECT.FEEDBACK_DIALOG, undefine
|
|
|
34
34
|
type EditorStartAEP = UIAEP<ACTION.STARTED, ACTION_SUBJECT.EDITOR, undefined, {
|
|
35
35
|
platform: PLATFORMS.NATIVE | PLATFORMS.HYBRID | PLATFORMS.WEB;
|
|
36
36
|
featureFlags: FeatureFlagKey[];
|
|
37
|
+
accountLocale?: string;
|
|
38
|
+
browserLocale?: string;
|
|
37
39
|
}, undefined>;
|
|
38
40
|
type EditorPerfAEP = OperationalAEPWithObjectId<ACTION.EDITOR_MOUNTED | ACTION.PROSEMIRROR_RENDERED | ACTION.ON_EDITOR_READY_CALLBACK | ACTION.ON_CHANGE_CALLBACK, ACTION_SUBJECT.EDITOR, undefined, {
|
|
39
41
|
duration: number;
|
|
@@ -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, endPositionOfParent, isSelectionAtEndOfNode, isSelectionAtStartOfNode, startPositionOfParent, } from './utils';
|
|
14
|
+
export { atTheBeginningOfBlock, atTheBeginningOfDoc, atTheEndOfBlock, atTheEndOfDoc, endPositionOfParent, expandSelectionBounds, 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;
|
|
@@ -9,3 +9,7 @@ export declare function atTheEndOfBlock(state: EditorState): boolean;
|
|
|
9
9
|
export declare function atTheBeginningOfBlock(state: EditorState): boolean;
|
|
10
10
|
export declare function startPositionOfParent(resolvedPos: ResolvedPos): number;
|
|
11
11
|
export declare function endPositionOfParent(resolvedPos: ResolvedPos): number;
|
|
12
|
+
export declare const expandSelectionBounds: ($anchor: ResolvedPos, $head: ResolvedPos) => {
|
|
13
|
+
$anchor: ResolvedPos;
|
|
14
|
+
$head: ResolvedPos;
|
|
15
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "99.
|
|
3
|
+
"version": "99.11.0",
|
|
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/"
|
|
@@ -141,7 +141,7 @@
|
|
|
141
141
|
"@atlaskit/media-file-preview": "^0.10.0",
|
|
142
142
|
"@atlaskit/media-picker": "^67.1.0",
|
|
143
143
|
"@atlaskit/media-ui": "^27.4.0",
|
|
144
|
-
"@atlaskit/media-viewer": "50.1.
|
|
144
|
+
"@atlaskit/media-viewer": "50.1.5",
|
|
145
145
|
"@atlaskit/mention": "^23.11.0",
|
|
146
146
|
"@atlaskit/menu": "^2.14.0",
|
|
147
147
|
"@atlaskit/onboarding": "^12.3.0",
|
|
@@ -155,7 +155,7 @@
|
|
|
155
155
|
"@atlaskit/spinner": "^17.1.0",
|
|
156
156
|
"@atlaskit/task-decision": "^17.12.0",
|
|
157
157
|
"@atlaskit/textfield": "^6.8.0",
|
|
158
|
-
"@atlaskit/tmp-editor-statsig": "^2.
|
|
158
|
+
"@atlaskit/tmp-editor-statsig": "^2.44.0",
|
|
159
159
|
"@atlaskit/tokens": "^3.3.0",
|
|
160
160
|
"@atlaskit/tooltip": "^19.1.0",
|
|
161
161
|
"@atlaskit/width-detector": "^4.4.0",
|