@atlaskit/editor-common 110.34.1 → 110.34.2
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 +8 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/preset/core-plugin/index.js +1 -1
- package/dist/cjs/preset/core-plugin/requestDocument.js +2 -2
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/utils/calculate-toolbar-position.js +1 -1
- package/dist/cjs/utils/document.js +6 -9
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/preset/core-plugin/index.js +1 -1
- package/dist/es2019/preset/core-plugin/requestDocument.js +2 -2
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/utils/calculate-toolbar-position.js +1 -1
- package/dist/es2019/utils/document.js +6 -9
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/preset/core-plugin/index.js +1 -1
- package/dist/esm/preset/core-plugin/requestDocument.js +2 -2
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/utils/calculate-toolbar-position.js +1 -1
- package/dist/esm/utils/document.js +6 -9
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 110.34.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`0d237a5696b06`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0d237a5696b06) -
|
|
8
|
+
Uncoupled several block of changes from the aifc FG and moved them behind their own FG so they can
|
|
9
|
+
be rolled out quicker
|
|
10
|
+
|
|
3
11
|
## 110.34.1
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -16,7 +16,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
16
16
|
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); }
|
|
17
17
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
18
18
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
19
|
-
var packageVersion = "110.34.
|
|
19
|
+
var packageVersion = "110.34.1";
|
|
20
20
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
21
21
|
// Remove URL as it has UGC
|
|
22
22
|
// Ignored via go/ees007
|
|
@@ -107,7 +107,7 @@ var corePlugin = exports.corePlugin = function corePlugin(_ref) {
|
|
|
107
107
|
if ((_options$scrollIntoVi2 = options === null || options === void 0 ? void 0 : options.scrollIntoView) !== null && _options$scrollIntoVi2 !== void 0 ? _options$scrollIntoVi2 : true) {
|
|
108
108
|
editorView.dispatch(tr.scrollIntoView());
|
|
109
109
|
} else {
|
|
110
|
-
if ((0, _platformFeatureFlags.fg)('
|
|
110
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_ai_generic_prep_for_aifc')) {
|
|
111
111
|
editorView.dispatch(tr.setMeta('scrollIntoView', false));
|
|
112
112
|
}
|
|
113
113
|
}
|
|
@@ -33,7 +33,7 @@ function createThrottleSchedule(callback) {
|
|
|
33
33
|
}
|
|
34
34
|
lastArgs = args;
|
|
35
35
|
if (frameId) {
|
|
36
|
-
if ((0, _platformFeatureFlags.fg)('
|
|
36
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_ai_generic_prep_for_aifc')) {
|
|
37
37
|
if (lastArgsBefore) {
|
|
38
38
|
var _lastArgsBefore = (0, _slicedToArray2.default)(lastArgsBefore, 5),
|
|
39
39
|
_v = _lastArgsBefore[0],
|
|
@@ -54,7 +54,7 @@ function createThrottleSchedule(callback) {
|
|
|
54
54
|
frameId = delayFunction(function () {
|
|
55
55
|
frameId = undefined;
|
|
56
56
|
if (lastArgs) {
|
|
57
|
-
if ((0, _platformFeatureFlags.fg)('
|
|
57
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_ai_generic_prep_for_aifc')) {
|
|
58
58
|
delayedCallbacks.forEach(function (savedArgs) {
|
|
59
59
|
callback.apply(void 0, (0, _toConsumableArray2.default)(savedArgs));
|
|
60
60
|
});
|
|
@@ -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.34.
|
|
27
|
+
var packageVersion = "110.34.1";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var fadeIn = (0, _react2.keyframes)({
|
|
@@ -113,7 +113,7 @@ var calculateToolbarPositionTrackHead = exports.calculateToolbarPositionTrackHea
|
|
|
113
113
|
var moreRovoOptionsButton = document.querySelector('button[aria-label="More Rovo options"], [aria-label="More Rovo options"]');
|
|
114
114
|
var isMoreRovoOptionsButtonVisible = !!moreRovoOptionsButton && moreRovoOptionsButton instanceof HTMLElement && !!moreRovoOptionsButton.offsetParent;
|
|
115
115
|
var range = null;
|
|
116
|
-
if (isMoreRovoOptionsButtonVisible && (0, _platformFeatureFlags.fg)('
|
|
116
|
+
if (isMoreRovoOptionsButtonVisible && (0, _platformFeatureFlags.fg)('platform_editor_ai_generic_prep_for_aifc')) {
|
|
117
117
|
if (selection && selection.getRangeAt && selection.rangeCount > 0) {
|
|
118
118
|
var maybeRange = selection.getRangeAt(0);
|
|
119
119
|
if (maybeRange instanceof Range) {
|
|
@@ -24,16 +24,13 @@ var getStepRange = exports.getStepRange = function getStepRange(transaction) {
|
|
|
24
24
|
stepMap.forEach(function (oldStart, oldEnd) {
|
|
25
25
|
var newStart = transaction.mapping.slice(index).map(oldStart, -1);
|
|
26
26
|
var newEnd = transaction.mapping.slice(index).map(oldEnd);
|
|
27
|
-
|
|
28
|
-
to = newEnd > to || to === -1 ? newEnd : to;
|
|
29
|
-
|
|
30
|
-
// See ticket https://hello.jira.atlassian.cloud/browse/EDITOR-1223 and
|
|
31
|
-
// PR https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/208332/overview
|
|
32
|
-
// to see why use clamp here
|
|
33
|
-
if ((0, _platformFeatureFlags.fg)('aifc_create_enabled')) {
|
|
27
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_ai_generic_prep_for_aifc')) {
|
|
34
28
|
var docSize = transaction.doc.content.size;
|
|
35
|
-
from = (0, _clamp.default)(from, 0, docSize);
|
|
36
|
-
to = (0, _clamp.default)(to, 0, docSize);
|
|
29
|
+
from = (0, _clamp.default)(newStart < from || from === -1 ? newStart : from, 0, docSize);
|
|
30
|
+
to = (0, _clamp.default)(newEnd > to || to === -1 ? newEnd : to, 0, docSize);
|
|
31
|
+
} else {
|
|
32
|
+
from = newStart < from || from === -1 ? newStart : from;
|
|
33
|
+
to = newEnd > to || to === -1 ? newEnd : to;
|
|
37
34
|
}
|
|
38
35
|
});
|
|
39
36
|
});
|
|
@@ -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 = "110.34.
|
|
4
|
+
const packageVersion = "110.34.1";
|
|
5
5
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
6
6
|
// Remove URL as it has UGC
|
|
7
7
|
// Ignored via go/ees007
|
|
@@ -109,7 +109,7 @@ export const corePlugin = ({
|
|
|
109
109
|
if ((_options$scrollIntoVi2 = options === null || options === void 0 ? void 0 : options.scrollIntoView) !== null && _options$scrollIntoVi2 !== void 0 ? _options$scrollIntoVi2 : true) {
|
|
110
110
|
editorView.dispatch(tr.scrollIntoView());
|
|
111
111
|
} else {
|
|
112
|
-
if (fg('
|
|
112
|
+
if (fg('platform_editor_ai_generic_prep_for_aifc')) {
|
|
113
113
|
editorView.dispatch(tr.setMeta('scrollIntoView', false));
|
|
114
114
|
}
|
|
115
115
|
}
|
|
@@ -19,7 +19,7 @@ export function createThrottleSchedule(callback) {
|
|
|
19
19
|
const lastArgsBefore = lastArgs;
|
|
20
20
|
lastArgs = args;
|
|
21
21
|
if (frameId) {
|
|
22
|
-
if (fg('
|
|
22
|
+
if (fg('platform_editor_ai_generic_prep_for_aifc')) {
|
|
23
23
|
if (lastArgsBefore) {
|
|
24
24
|
const [_v, _c, _t, _f, alwaysFire] = lastArgsBefore;
|
|
25
25
|
if (alwaysFire) {
|
|
@@ -35,7 +35,7 @@ export function createThrottleSchedule(callback) {
|
|
|
35
35
|
frameId = delayFunction(() => {
|
|
36
36
|
frameId = undefined;
|
|
37
37
|
if (lastArgs) {
|
|
38
|
-
if (fg('
|
|
38
|
+
if (fg('platform_editor_ai_generic_prep_for_aifc')) {
|
|
39
39
|
delayedCallbacks.forEach(savedArgs => {
|
|
40
40
|
callback(...savedArgs);
|
|
41
41
|
});
|
|
@@ -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.34.
|
|
17
|
+
const packageVersion = "110.34.1";
|
|
18
18
|
const halfFocusRing = 1;
|
|
19
19
|
const dropOffset = '0, 8';
|
|
20
20
|
const fadeIn = keyframes({
|
|
@@ -106,7 +106,7 @@ export const calculateToolbarPositionTrackHead = toolbarTitle => (editorView, ne
|
|
|
106
106
|
const moreRovoOptionsButton = document.querySelector('button[aria-label="More Rovo options"], [aria-label="More Rovo options"]');
|
|
107
107
|
const isMoreRovoOptionsButtonVisible = !!moreRovoOptionsButton && moreRovoOptionsButton instanceof HTMLElement && !!moreRovoOptionsButton.offsetParent;
|
|
108
108
|
let range = null;
|
|
109
|
-
if (isMoreRovoOptionsButtonVisible && fg('
|
|
109
|
+
if (isMoreRovoOptionsButtonVisible && fg('platform_editor_ai_generic_prep_for_aifc')) {
|
|
110
110
|
if (selection && selection.getRangeAt && selection.rangeCount > 0) {
|
|
111
111
|
const maybeRange = selection.getRangeAt(0);
|
|
112
112
|
if (maybeRange instanceof Range) {
|
|
@@ -9,16 +9,13 @@ export const getStepRange = transaction => {
|
|
|
9
9
|
stepMap.forEach((oldStart, oldEnd) => {
|
|
10
10
|
const newStart = transaction.mapping.slice(index).map(oldStart, -1);
|
|
11
11
|
const newEnd = transaction.mapping.slice(index).map(oldEnd);
|
|
12
|
-
|
|
13
|
-
to = newEnd > to || to === -1 ? newEnd : to;
|
|
14
|
-
|
|
15
|
-
// See ticket https://hello.jira.atlassian.cloud/browse/EDITOR-1223 and
|
|
16
|
-
// PR https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/208332/overview
|
|
17
|
-
// to see why use clamp here
|
|
18
|
-
if (fg('aifc_create_enabled')) {
|
|
12
|
+
if (fg('platform_editor_ai_generic_prep_for_aifc')) {
|
|
19
13
|
const docSize = transaction.doc.content.size;
|
|
20
|
-
from = clamp(from, 0, docSize);
|
|
21
|
-
to = clamp(to, 0, docSize);
|
|
14
|
+
from = clamp(newStart < from || from === -1 ? newStart : from, 0, docSize);
|
|
15
|
+
to = clamp(newEnd > to || to === -1 ? newEnd : to, 0, docSize);
|
|
16
|
+
} else {
|
|
17
|
+
from = newStart < from || from === -1 ? newStart : from;
|
|
18
|
+
to = newEnd > to || to === -1 ? newEnd : to;
|
|
22
19
|
}
|
|
23
20
|
});
|
|
24
21
|
});
|
|
@@ -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 = "110.34.
|
|
10
|
+
var packageVersion = "110.34.1";
|
|
11
11
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
12
12
|
// Remove URL as it has UGC
|
|
13
13
|
// Ignored via go/ees007
|
|
@@ -102,7 +102,7 @@ export var corePlugin = function corePlugin(_ref) {
|
|
|
102
102
|
if ((_options$scrollIntoVi2 = options === null || options === void 0 ? void 0 : options.scrollIntoView) !== null && _options$scrollIntoVi2 !== void 0 ? _options$scrollIntoVi2 : true) {
|
|
103
103
|
editorView.dispatch(tr.scrollIntoView());
|
|
104
104
|
} else {
|
|
105
|
-
if (fg('
|
|
105
|
+
if (fg('platform_editor_ai_generic_prep_for_aifc')) {
|
|
106
106
|
editorView.dispatch(tr.setMeta('scrollIntoView', false));
|
|
107
107
|
}
|
|
108
108
|
}
|
|
@@ -24,7 +24,7 @@ export function createThrottleSchedule(callback) {
|
|
|
24
24
|
}
|
|
25
25
|
lastArgs = args;
|
|
26
26
|
if (frameId) {
|
|
27
|
-
if (fg('
|
|
27
|
+
if (fg('platform_editor_ai_generic_prep_for_aifc')) {
|
|
28
28
|
if (lastArgsBefore) {
|
|
29
29
|
var _lastArgsBefore = _slicedToArray(lastArgsBefore, 5),
|
|
30
30
|
_v = _lastArgsBefore[0],
|
|
@@ -45,7 +45,7 @@ export function createThrottleSchedule(callback) {
|
|
|
45
45
|
frameId = delayFunction(function () {
|
|
46
46
|
frameId = undefined;
|
|
47
47
|
if (lastArgs) {
|
|
48
|
-
if (fg('
|
|
48
|
+
if (fg('platform_editor_ai_generic_prep_for_aifc')) {
|
|
49
49
|
delayedCallbacks.forEach(function (savedArgs) {
|
|
50
50
|
callback.apply(void 0, _toConsumableArray(savedArgs));
|
|
51
51
|
});
|
|
@@ -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.34.
|
|
24
|
+
var packageVersion = "110.34.1";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var fadeIn = keyframes({
|
|
@@ -107,7 +107,7 @@ export var calculateToolbarPositionTrackHead = function calculateToolbarPosition
|
|
|
107
107
|
var moreRovoOptionsButton = document.querySelector('button[aria-label="More Rovo options"], [aria-label="More Rovo options"]');
|
|
108
108
|
var isMoreRovoOptionsButtonVisible = !!moreRovoOptionsButton && moreRovoOptionsButton instanceof HTMLElement && !!moreRovoOptionsButton.offsetParent;
|
|
109
109
|
var range = null;
|
|
110
|
-
if (isMoreRovoOptionsButtonVisible && fg('
|
|
110
|
+
if (isMoreRovoOptionsButtonVisible && fg('platform_editor_ai_generic_prep_for_aifc')) {
|
|
111
111
|
if (selection && selection.getRangeAt && selection.rangeCount > 0) {
|
|
112
112
|
var maybeRange = selection.getRangeAt(0);
|
|
113
113
|
if (maybeRange instanceof Range) {
|
|
@@ -9,16 +9,13 @@ export var getStepRange = function getStepRange(transaction) {
|
|
|
9
9
|
stepMap.forEach(function (oldStart, oldEnd) {
|
|
10
10
|
var newStart = transaction.mapping.slice(index).map(oldStart, -1);
|
|
11
11
|
var newEnd = transaction.mapping.slice(index).map(oldEnd);
|
|
12
|
-
|
|
13
|
-
to = newEnd > to || to === -1 ? newEnd : to;
|
|
14
|
-
|
|
15
|
-
// See ticket https://hello.jira.atlassian.cloud/browse/EDITOR-1223 and
|
|
16
|
-
// PR https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/208332/overview
|
|
17
|
-
// to see why use clamp here
|
|
18
|
-
if (fg('aifc_create_enabled')) {
|
|
12
|
+
if (fg('platform_editor_ai_generic_prep_for_aifc')) {
|
|
19
13
|
var docSize = transaction.doc.content.size;
|
|
20
|
-
from = clamp(from, 0, docSize);
|
|
21
|
-
to = clamp(to, 0, docSize);
|
|
14
|
+
from = clamp(newStart < from || from === -1 ? newStart : from, 0, docSize);
|
|
15
|
+
to = clamp(newEnd > to || to === -1 ? newEnd : to, 0, docSize);
|
|
16
|
+
} else {
|
|
17
|
+
from = newStart < from || from === -1 ? newStart : from;
|
|
18
|
+
to = newEnd > to || to === -1 ? newEnd : to;
|
|
22
19
|
}
|
|
23
20
|
});
|
|
24
21
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "110.34.
|
|
3
|
+
"version": "110.34.2",
|
|
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/"
|
|
@@ -180,7 +180,7 @@
|
|
|
180
180
|
"platform_editor_blocktaskitem_patch_3": {
|
|
181
181
|
"type": "boolean"
|
|
182
182
|
},
|
|
183
|
-
"
|
|
183
|
+
"platform_editor_ai_generic_prep_for_aifc": {
|
|
184
184
|
"type": "boolean"
|
|
185
185
|
},
|
|
186
186
|
"platform-visual-refresh-icons": {
|