@atlaskit/editor-common 74.56.7 → 74.56.9
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 +12 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/styles/shared/resizer.js +1 -1
- package/dist/cjs/ufo/experience-store.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/utils/performance/measure-render.js +2 -2
- package/dist/cjs/utils/performance/measure-tti.js +7 -6
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/styles/shared/resizer.js +8 -1
- package/dist/es2019/ufo/experience-store.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/utils/performance/measure-render.js +2 -2
- package/dist/es2019/utils/performance/measure-tti.js +8 -7
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/styles/shared/resizer.js +1 -1
- package/dist/esm/ufo/experience-store.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/utils/performance/measure-render.js +2 -2
- package/dist/esm/utils/performance/measure-tti.js +7 -6
- package/dist/types/ufo/experience-store.d.ts +1 -1
- package/dist/types/utils/performance/measure-tti.d.ts +1 -1
- package/dist/types-ts4.5/ufo/experience-store.d.ts +1 -1
- package/dist/types-ts4.5/utils/performance/measure-tti.d.ts +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 74.56.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`a9552aaea4e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a9552aaea4e) - NO-ISSUE Fixed minor issue with TTI measurement that made it cancel before 60s
|
|
8
|
+
|
|
9
|
+
## 74.56.8
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`0dd8a45fd35`](https://bitbucket.org/atlassian/atlassian-frontend/commits/0dd8a45fd35) - Add test for mouse hover zone in resizer and adjust the handle track height
|
|
14
|
+
|
|
3
15
|
## 74.56.7
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -16,7 +16,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
16
16
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
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 = "74.56.
|
|
19
|
+
var packageVersion = "74.56.9";
|
|
20
20
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
21
21
|
// Remove URL as it has UGC
|
|
22
22
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -32,5 +32,5 @@ exports.resizerDangerClassName = resizerDangerClassName;
|
|
|
32
32
|
var akEditorSelectedNodeClassName = 'ak-editor-selected-node';
|
|
33
33
|
var resizerHandleZIndex = 99;
|
|
34
34
|
exports.resizerHandleZIndex = resizerHandleZIndex;
|
|
35
|
-
var resizerStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n will-change: width;\n\n &:hover,\n &.display-handle {\n & .", " {\n visibility: visible;\n opacity: 1;\n }\n }\n\n &.is-resizing {\n & .", " {\n background: ", ";\n }\n }\n\n &.", " {\n & .", " {\n transition: none;\n background: ", ";\n }\n }\n }\n\n .", " {\n display: flex;\n visibility: hidden;\n opacity: 0;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 7px;\n transition: visibility 0.2s, opacity 0.2s;\n\n /*\n NOTE: The below style is targeted at the div element added by the tooltip. We don't have any means of injecting styles\n into the tooltip\n */\n & div[role='presentation'] {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n margin-top: -16px;\n }\n\n /*\n Handle Positions\n */\n &.left {\n align-items: flex-start;\n }\n &.right {\n align-items: flex-end;\n }\n\n /*\n Handle Sizing\n */\n &.small {\n & .", " {\n height: 43px;\n }\n }\n &.medium {\n & .", " {\n height: 64px;\n }\n }\n &.large {\n & .", " {\n height: 96px;\n }\n }\n\n /*\n Handle Alignment\n */\n &.sticky {\n & .", " {\n position: sticky;\n top: ", ";\n bottom: ", ";\n }\n }\n\n &:hover {\n & .", " {\n background: ", ";\n }\n\n & .", " {\n visibility: visible;\n opacity: 0.5;\n }\n }\n }\n\n .", " {\n content: ' ';\n display: flex;\n width: 3px;\n margin: 0 ", ";\n height: 64px;\n transition: background-color 0.2s;\n border-radius: 6px;\n\n min-height: 24px;\n background: ", ";\n }\n\n .", " {\n visibility: hidden;\n position: absolute;\n width: 7px;\n height: calc(100% -
|
|
35
|
+
var resizerStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .", " {\n will-change: width;\n\n &:hover,\n &.display-handle {\n & .", " {\n visibility: visible;\n opacity: 1;\n }\n }\n\n &.is-resizing {\n & .", " {\n background: ", ";\n }\n }\n\n &.", " {\n & .", " {\n transition: none;\n background: ", ";\n }\n }\n }\n\n .", " {\n display: flex;\n visibility: hidden;\n opacity: 0;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 7px;\n transition: visibility 0.2s, opacity 0.2s;\n\n /*\n NOTE: The below style is targeted at the div element added by the tooltip. We don't have any means of injecting styles\n into the tooltip\n */\n & div[role='presentation'] {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n margin-top: -16px;\n white-space: normal;\n }\n\n /*\n Handle Positions\n */\n &.left {\n align-items: flex-start;\n }\n &.right {\n align-items: flex-end;\n }\n\n /*\n Handle Sizing\n */\n &.small {\n & .", " {\n height: 43px;\n }\n }\n &.medium {\n & .", " {\n height: 64px;\n }\n }\n &.large {\n & .", " {\n height: 96px;\n }\n }\n\n /*\n Handle Alignment\n */\n &.sticky {\n & .", " {\n position: sticky;\n top: ", ";\n bottom: ", ";\n }\n }\n\n &:hover {\n & .", " {\n background: ", ";\n }\n\n & .", " {\n visibility: visible;\n opacity: 0.5;\n }\n }\n }\n\n .", " {\n content: ' ';\n display: flex;\n width: 3px;\n margin: 0 ", ";\n height: 64px;\n transition: background-color 0.2s;\n border-radius: 6px;\n\n min-height: 24px;\n background: ", ";\n }\n\n .", " {\n visibility: hidden;\n position: absolute;\n width: 7px;\n height: calc(100% - 40px);\n border-radius: 4px;\n opacity: 0;\n transition: background-color 0.2s, visibility 0.2s, opacity 0.2s;\n\n &.none {\n background: none;\n }\n\n &.shadow {\n background: ", ";\n }\n\n &.full-height {\n background: ", ";\n height: 100%;\n min-height: 36px;\n }\n }\n\n .", " {\n & .", " {\n background: ", ";\n }\n }\n\n .", " {\n padding: 0 ", ";\n position: relative;\n display: inline-block;\n width: 100%;\n left: -12px;\n }\n\n // This below style is here to make sure the image width is correct when nested in a table\n table .", " {\n padding: unset;\n left: unset;\n }\n"])), resizerItemClassName, resizerHandleClassName, resizerHandleThumbClassName, "var(--ds-border-focused, ".concat(_colors.B200, ")"), resizerDangerClassName, resizerHandleThumbClassName, "var(--ds-icon-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), resizerHandleClassName, resizerHandleThumbClassName, resizerHandleThumbClassName, resizerHandleThumbClassName, resizerHandleThumbClassName, "var(--ds-space-150, 12px)", "var(--ds-space-150, 12px)", resizerHandleThumbClassName, "var(--ds-border-focused, ".concat(_colors.B200, ")"), resizerHandleTrackClassName, resizerHandleThumbClassName, "var(--ds-space-025, 2px)", "var(--ds-border, ".concat(_colors.N60, ")"), resizerHandleTrackClassName, "var(--ds-background-selected, ".concat(_colors.B50, ")"), "var(--ds-background-selected, ".concat(_colors.B50, ")"), akEditorSelectedNodeClassName, resizerHandleThumbClassName, "var(--ds-border-focused, ".concat(_colors.B200, ")"), resizerHoverZoneClassName, "var(--ds-space-150, 12px)", resizerHoverZoneClassName);
|
|
36
36
|
exports.resizerStyles = resizerStyles;
|
|
@@ -21,7 +21,7 @@ var EditorExperience = /*#__PURE__*/function (EditorExperience) {
|
|
|
21
21
|
EditorExperience["loadEditor"] = "load";
|
|
22
22
|
EditorExperience["typing"] = "type";
|
|
23
23
|
EditorExperience["interaction"] = "interact";
|
|
24
|
-
EditorExperience["editSession"] = "
|
|
24
|
+
EditorExperience["editSession"] = "edit-session";
|
|
25
25
|
return EditorExperience;
|
|
26
26
|
}({});
|
|
27
27
|
exports.EditorExperience = EditorExperience;
|
|
@@ -24,7 +24,7 @@ var _templateObject, _templateObject2, _templateObject3;
|
|
|
24
24
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
25
25
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /** @jsx jsx */
|
|
26
26
|
var packageName = "@atlaskit/editor-common";
|
|
27
|
-
var packageVersion = "74.56.
|
|
27
|
+
var packageVersion = "74.56.9";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -25,8 +25,8 @@ function getDistortedDurationMonitor() {
|
|
|
25
25
|
// which have been fired in the background are not useful -- and lead to other events
|
|
26
26
|
// being hard to draw conclusions from.
|
|
27
27
|
//
|
|
28
|
-
// To mitigate this -- we detect this state -- and fire a
|
|
29
|
-
// measurement has
|
|
28
|
+
// To mitigate this -- we detect this state -- and fire a separate callback when the
|
|
29
|
+
// measurement has occurred when the render was in the background
|
|
30
30
|
var distortedDuration = document.visibilityState !== 'visible';
|
|
31
31
|
function handleVisibilityChange() {
|
|
32
32
|
if (document.visibilityState !== 'visible') {
|
|
@@ -44,17 +44,18 @@ function measureTTI(onMeasureComplete) {
|
|
|
44
44
|
var now = performance.now();
|
|
45
45
|
var lastEnd = lastLongTask.startTime + lastLongTask.duration;
|
|
46
46
|
var prevEnd = prevLongTask ? prevLongTask.startTime + prevLongTask.duration : lastEnd;
|
|
47
|
+
var elapsedTimeMs = now - start;
|
|
48
|
+
var canceled = elapsedTimeMs > cancelAfterMs;
|
|
47
49
|
if (!prevLongTask) {
|
|
48
50
|
observer.disconnect();
|
|
49
51
|
return onMeasureComplete(prevEnd, 0, false);
|
|
50
52
|
} else if (lastLongTask.startTime - prevEnd >= idleThreshold) {
|
|
51
53
|
observer.disconnect();
|
|
52
|
-
return onMeasureComplete(prevEnd, prevEnd - start,
|
|
53
|
-
} else if (now - lastEnd >= idleThreshold ||
|
|
54
|
+
return onMeasureComplete(prevEnd, prevEnd - start, canceled);
|
|
55
|
+
} else if (now - lastEnd >= idleThreshold || canceled) {
|
|
54
56
|
observer.disconnect();
|
|
55
|
-
return onMeasureComplete(lastEnd, lastEnd - start,
|
|
57
|
+
return onMeasureComplete(lastEnd, lastEnd - start, canceled);
|
|
56
58
|
}
|
|
57
|
-
cancelAfterMs = Math.max(0, cancelAfterMs - (now - start));
|
|
58
59
|
return setTimeout(checkIdle, idleThreshold);
|
|
59
60
|
};
|
|
60
61
|
setTimeout(checkIdle, idleThreshold);
|
|
@@ -69,8 +70,8 @@ var TTI_FROM_INVOCATION_SEVERITY_THRESHOLD_DEFAULTS = {
|
|
|
69
70
|
DEGRADED: 8000
|
|
70
71
|
};
|
|
71
72
|
exports.TTI_FROM_INVOCATION_SEVERITY_THRESHOLD_DEFAULTS = TTI_FROM_INVOCATION_SEVERITY_THRESHOLD_DEFAULTS;
|
|
72
|
-
function getTTISeverity(tti, ttiFromInvocation,
|
|
73
|
-
var ttiNormalThreshold =
|
|
73
|
+
function getTTISeverity(tti, ttiFromInvocation, ttiSeverityNormalThreshold, ttiSeverityDegradedThreshold, ttiFromInvocationSeverityNormalThreshold, ttiFromInvocationSeverityDegradedThreshold) {
|
|
74
|
+
var ttiNormalThreshold = ttiSeverityNormalThreshold || TTI_SEVERITY_THRESHOLD_DEFAULTS.NORMAL;
|
|
74
75
|
var ttiDegradedThreshold = ttiSeverityDegradedThreshold || TTI_SEVERITY_THRESHOLD_DEFAULTS.DEGRADED;
|
|
75
76
|
var ttiSeverity;
|
|
76
77
|
if (tti >= ttiNormalThreshold && tti < ttiDegradedThreshold) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
2
2
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
3
|
-
const packageVersion = "74.56.
|
|
3
|
+
const packageVersion = "74.56.9";
|
|
4
4
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
5
5
|
// Remove URL as it has UGC
|
|
6
6
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -64,6 +64,7 @@ export const resizerStyles = css`
|
|
|
64
64
|
justify-content: center;
|
|
65
65
|
align-items: center;
|
|
66
66
|
margin-top: -16px;
|
|
67
|
+
white-space: normal;
|
|
67
68
|
}
|
|
68
69
|
|
|
69
70
|
/*
|
|
@@ -135,7 +136,7 @@ export const resizerStyles = css`
|
|
|
135
136
|
visibility: hidden;
|
|
136
137
|
position: absolute;
|
|
137
138
|
width: 7px;
|
|
138
|
-
height: calc(100% -
|
|
139
|
+
height: calc(100% - 40px);
|
|
139
140
|
border-radius: 4px;
|
|
140
141
|
opacity: 0;
|
|
141
142
|
transition: background-color 0.2s, visibility 0.2s, opacity 0.2s;
|
|
@@ -168,4 +169,10 @@ export const resizerStyles = css`
|
|
|
168
169
|
width: 100%;
|
|
169
170
|
left: -12px;
|
|
170
171
|
}
|
|
172
|
+
|
|
173
|
+
// This below style is here to make sure the image width is correct when nested in a table
|
|
174
|
+
table .${resizerHoverZoneClassName} {
|
|
175
|
+
padding: unset;
|
|
176
|
+
left: unset;
|
|
177
|
+
}
|
|
171
178
|
`;
|
|
@@ -11,7 +11,7 @@ export let EditorExperience = /*#__PURE__*/function (EditorExperience) {
|
|
|
11
11
|
EditorExperience["loadEditor"] = "load";
|
|
12
12
|
EditorExperience["typing"] = "type";
|
|
13
13
|
EditorExperience["interaction"] = "interact";
|
|
14
|
-
EditorExperience["editSession"] = "
|
|
14
|
+
EditorExperience["editSession"] = "edit-session";
|
|
15
15
|
return EditorExperience;
|
|
16
16
|
}({});
|
|
17
17
|
export const RELIABILITY_INTERVAL = 30000;
|
|
@@ -8,7 +8,7 @@ import { themed } from '@atlaskit/theme/components';
|
|
|
8
8
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
9
9
|
import Layer from '../Layer';
|
|
10
10
|
const packageName = "@atlaskit/editor-common";
|
|
11
|
-
const packageVersion = "74.56.
|
|
11
|
+
const packageVersion = "74.56.9";
|
|
12
12
|
const halfFocusRing = 1;
|
|
13
13
|
const dropOffset = '0, 8';
|
|
14
14
|
class DropList extends Component {
|
|
@@ -19,8 +19,8 @@ export function getDistortedDurationMonitor() {
|
|
|
19
19
|
// which have been fired in the background are not useful -- and lead to other events
|
|
20
20
|
// being hard to draw conclusions from.
|
|
21
21
|
//
|
|
22
|
-
// To mitigate this -- we detect this state -- and fire a
|
|
23
|
-
// measurement has
|
|
22
|
+
// To mitigate this -- we detect this state -- and fire a separate callback when the
|
|
23
|
+
// measurement has occurred when the render was in the background
|
|
24
24
|
let distortedDuration = document.visibilityState !== 'visible';
|
|
25
25
|
function handleVisibilityChange() {
|
|
26
26
|
if (document.visibilityState !== 'visible') {
|
|
@@ -12,7 +12,7 @@ PerfObserver) {
|
|
|
12
12
|
startTime: start,
|
|
13
13
|
duration: 0
|
|
14
14
|
};
|
|
15
|
-
|
|
15
|
+
const cancelAfterMs = cancelAfter * 1000;
|
|
16
16
|
const observer = new (PerfObserver || PerformanceObserver)(list => {
|
|
17
17
|
const entries = list.getEntries();
|
|
18
18
|
if (entries.length) {
|
|
@@ -33,17 +33,18 @@ PerfObserver) {
|
|
|
33
33
|
const now = performance.now();
|
|
34
34
|
const lastEnd = lastLongTask.startTime + lastLongTask.duration;
|
|
35
35
|
const prevEnd = prevLongTask ? prevLongTask.startTime + prevLongTask.duration : lastEnd;
|
|
36
|
+
const elapsedTimeMs = now - start;
|
|
37
|
+
const canceled = elapsedTimeMs > cancelAfterMs;
|
|
36
38
|
if (!prevLongTask) {
|
|
37
39
|
observer.disconnect();
|
|
38
40
|
return onMeasureComplete(prevEnd, 0, false);
|
|
39
41
|
} else if (lastLongTask.startTime - prevEnd >= idleThreshold) {
|
|
40
42
|
observer.disconnect();
|
|
41
|
-
return onMeasureComplete(prevEnd, prevEnd - start,
|
|
42
|
-
} else if (now - lastEnd >= idleThreshold ||
|
|
43
|
+
return onMeasureComplete(prevEnd, prevEnd - start, canceled);
|
|
44
|
+
} else if (now - lastEnd >= idleThreshold || canceled) {
|
|
43
45
|
observer.disconnect();
|
|
44
|
-
return onMeasureComplete(lastEnd, lastEnd - start,
|
|
46
|
+
return onMeasureComplete(lastEnd, lastEnd - start, canceled);
|
|
45
47
|
}
|
|
46
|
-
cancelAfterMs = Math.max(0, cancelAfterMs - (now - start));
|
|
47
48
|
return setTimeout(checkIdle, idleThreshold);
|
|
48
49
|
};
|
|
49
50
|
setTimeout(checkIdle, idleThreshold);
|
|
@@ -56,8 +57,8 @@ export const TTI_FROM_INVOCATION_SEVERITY_THRESHOLD_DEFAULTS = {
|
|
|
56
57
|
NORMAL: 5000,
|
|
57
58
|
DEGRADED: 8000
|
|
58
59
|
};
|
|
59
|
-
export function getTTISeverity(tti, ttiFromInvocation,
|
|
60
|
-
const ttiNormalThreshold =
|
|
60
|
+
export function getTTISeverity(tti, ttiFromInvocation, ttiSeverityNormalThreshold, ttiSeverityDegradedThreshold, ttiFromInvocationSeverityNormalThreshold, ttiFromInvocationSeverityDegradedThreshold) {
|
|
61
|
+
const ttiNormalThreshold = ttiSeverityNormalThreshold || TTI_SEVERITY_THRESHOLD_DEFAULTS.NORMAL;
|
|
61
62
|
const ttiDegradedThreshold = ttiSeverityDegradedThreshold || TTI_SEVERITY_THRESHOLD_DEFAULTS.DEGRADED;
|
|
62
63
|
let ttiSeverity;
|
|
63
64
|
if (tti >= ttiNormalThreshold && tti < ttiDegradedThreshold) {
|
|
@@ -6,7 +6,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
6
6
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7
7
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
8
8
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
9
|
-
var packageVersion = "74.56.
|
|
9
|
+
var packageVersion = "74.56.9";
|
|
10
10
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
11
11
|
// Remove URL as it has UGC
|
|
12
12
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -18,4 +18,4 @@ export var resizerDangerClassName = "".concat(resizerHandleClassName, "-danger")
|
|
|
18
18
|
// akEditorSelectedNodeClassName from '@atlaskit/editor-shared-styles';
|
|
19
19
|
var akEditorSelectedNodeClassName = 'ak-editor-selected-node';
|
|
20
20
|
export var resizerHandleZIndex = 99;
|
|
21
|
-
export var resizerStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", " {\n will-change: width;\n\n &:hover,\n &.display-handle {\n & .", " {\n visibility: visible;\n opacity: 1;\n }\n }\n\n &.is-resizing {\n & .", " {\n background: ", ";\n }\n }\n\n &.", " {\n & .", " {\n transition: none;\n background: ", ";\n }\n }\n }\n\n .", " {\n display: flex;\n visibility: hidden;\n opacity: 0;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 7px;\n transition: visibility 0.2s, opacity 0.2s;\n\n /*\n NOTE: The below style is targeted at the div element added by the tooltip. We don't have any means of injecting styles\n into the tooltip\n */\n & div[role='presentation'] {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n margin-top: -16px;\n }\n\n /*\n Handle Positions\n */\n &.left {\n align-items: flex-start;\n }\n &.right {\n align-items: flex-end;\n }\n\n /*\n Handle Sizing\n */\n &.small {\n & .", " {\n height: 43px;\n }\n }\n &.medium {\n & .", " {\n height: 64px;\n }\n }\n &.large {\n & .", " {\n height: 96px;\n }\n }\n\n /*\n Handle Alignment\n */\n &.sticky {\n & .", " {\n position: sticky;\n top: ", ";\n bottom: ", ";\n }\n }\n\n &:hover {\n & .", " {\n background: ", ";\n }\n\n & .", " {\n visibility: visible;\n opacity: 0.5;\n }\n }\n }\n\n .", " {\n content: ' ';\n display: flex;\n width: 3px;\n margin: 0 ", ";\n height: 64px;\n transition: background-color 0.2s;\n border-radius: 6px;\n\n min-height: 24px;\n background: ", ";\n }\n\n .", " {\n visibility: hidden;\n position: absolute;\n width: 7px;\n height: calc(100% -
|
|
21
|
+
export var resizerStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", " {\n will-change: width;\n\n &:hover,\n &.display-handle {\n & .", " {\n visibility: visible;\n opacity: 1;\n }\n }\n\n &.is-resizing {\n & .", " {\n background: ", ";\n }\n }\n\n &.", " {\n & .", " {\n transition: none;\n background: ", ";\n }\n }\n }\n\n .", " {\n display: flex;\n visibility: hidden;\n opacity: 0;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 7px;\n transition: visibility 0.2s, opacity 0.2s;\n\n /*\n NOTE: The below style is targeted at the div element added by the tooltip. We don't have any means of injecting styles\n into the tooltip\n */\n & div[role='presentation'] {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n margin-top: -16px;\n white-space: normal;\n }\n\n /*\n Handle Positions\n */\n &.left {\n align-items: flex-start;\n }\n &.right {\n align-items: flex-end;\n }\n\n /*\n Handle Sizing\n */\n &.small {\n & .", " {\n height: 43px;\n }\n }\n &.medium {\n & .", " {\n height: 64px;\n }\n }\n &.large {\n & .", " {\n height: 96px;\n }\n }\n\n /*\n Handle Alignment\n */\n &.sticky {\n & .", " {\n position: sticky;\n top: ", ";\n bottom: ", ";\n }\n }\n\n &:hover {\n & .", " {\n background: ", ";\n }\n\n & .", " {\n visibility: visible;\n opacity: 0.5;\n }\n }\n }\n\n .", " {\n content: ' ';\n display: flex;\n width: 3px;\n margin: 0 ", ";\n height: 64px;\n transition: background-color 0.2s;\n border-radius: 6px;\n\n min-height: 24px;\n background: ", ";\n }\n\n .", " {\n visibility: hidden;\n position: absolute;\n width: 7px;\n height: calc(100% - 40px);\n border-radius: 4px;\n opacity: 0;\n transition: background-color 0.2s, visibility 0.2s, opacity 0.2s;\n\n &.none {\n background: none;\n }\n\n &.shadow {\n background: ", ";\n }\n\n &.full-height {\n background: ", ";\n height: 100%;\n min-height: 36px;\n }\n }\n\n .", " {\n & .", " {\n background: ", ";\n }\n }\n\n .", " {\n padding: 0 ", ";\n position: relative;\n display: inline-block;\n width: 100%;\n left: -12px;\n }\n\n // This below style is here to make sure the image width is correct when nested in a table\n table .", " {\n padding: unset;\n left: unset;\n }\n"])), resizerItemClassName, resizerHandleClassName, resizerHandleThumbClassName, "var(--ds-border-focused, ".concat(B200, ")"), resizerDangerClassName, resizerHandleThumbClassName, "var(--ds-icon-danger, ".concat(akEditorDeleteIconColor, ")"), resizerHandleClassName, resizerHandleThumbClassName, resizerHandleThumbClassName, resizerHandleThumbClassName, resizerHandleThumbClassName, "var(--ds-space-150, 12px)", "var(--ds-space-150, 12px)", resizerHandleThumbClassName, "var(--ds-border-focused, ".concat(B200, ")"), resizerHandleTrackClassName, resizerHandleThumbClassName, "var(--ds-space-025, 2px)", "var(--ds-border, ".concat(N60, ")"), resizerHandleTrackClassName, "var(--ds-background-selected, ".concat(B50, ")"), "var(--ds-background-selected, ".concat(B50, ")"), akEditorSelectedNodeClassName, resizerHandleThumbClassName, "var(--ds-border-focused, ".concat(B200, ")"), resizerHoverZoneClassName, "var(--ds-space-150, 12px)", resizerHoverZoneClassName);
|
|
@@ -13,7 +13,7 @@ export var EditorExperience = /*#__PURE__*/function (EditorExperience) {
|
|
|
13
13
|
EditorExperience["loadEditor"] = "load";
|
|
14
14
|
EditorExperience["typing"] = "type";
|
|
15
15
|
EditorExperience["interaction"] = "interact";
|
|
16
|
-
EditorExperience["editSession"] = "
|
|
16
|
+
EditorExperience["editSession"] = "edit-session";
|
|
17
17
|
return EditorExperience;
|
|
18
18
|
}({});
|
|
19
19
|
export var RELIABILITY_INTERVAL = 30000;
|
|
@@ -18,7 +18,7 @@ import { themed } from '@atlaskit/theme/components';
|
|
|
18
18
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
19
19
|
import Layer from '../Layer';
|
|
20
20
|
var packageName = "@atlaskit/editor-common";
|
|
21
|
-
var packageVersion = "74.56.
|
|
21
|
+
var packageVersion = "74.56.9";
|
|
22
22
|
var halfFocusRing = 1;
|
|
23
23
|
var dropOffset = '0, 8';
|
|
24
24
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -19,8 +19,8 @@ export function getDistortedDurationMonitor() {
|
|
|
19
19
|
// which have been fired in the background are not useful -- and lead to other events
|
|
20
20
|
// being hard to draw conclusions from.
|
|
21
21
|
//
|
|
22
|
-
// To mitigate this -- we detect this state -- and fire a
|
|
23
|
-
// measurement has
|
|
22
|
+
// To mitigate this -- we detect this state -- and fire a separate callback when the
|
|
23
|
+
// measurement has occurred when the render was in the background
|
|
24
24
|
var distortedDuration = document.visibilityState !== 'visible';
|
|
25
25
|
function handleVisibilityChange() {
|
|
26
26
|
if (document.visibilityState !== 'visible') {
|
|
@@ -36,17 +36,18 @@ export function measureTTI(onMeasureComplete) {
|
|
|
36
36
|
var now = performance.now();
|
|
37
37
|
var lastEnd = lastLongTask.startTime + lastLongTask.duration;
|
|
38
38
|
var prevEnd = prevLongTask ? prevLongTask.startTime + prevLongTask.duration : lastEnd;
|
|
39
|
+
var elapsedTimeMs = now - start;
|
|
40
|
+
var canceled = elapsedTimeMs > cancelAfterMs;
|
|
39
41
|
if (!prevLongTask) {
|
|
40
42
|
observer.disconnect();
|
|
41
43
|
return onMeasureComplete(prevEnd, 0, false);
|
|
42
44
|
} else if (lastLongTask.startTime - prevEnd >= idleThreshold) {
|
|
43
45
|
observer.disconnect();
|
|
44
|
-
return onMeasureComplete(prevEnd, prevEnd - start,
|
|
45
|
-
} else if (now - lastEnd >= idleThreshold ||
|
|
46
|
+
return onMeasureComplete(prevEnd, prevEnd - start, canceled);
|
|
47
|
+
} else if (now - lastEnd >= idleThreshold || canceled) {
|
|
46
48
|
observer.disconnect();
|
|
47
|
-
return onMeasureComplete(lastEnd, lastEnd - start,
|
|
49
|
+
return onMeasureComplete(lastEnd, lastEnd - start, canceled);
|
|
48
50
|
}
|
|
49
|
-
cancelAfterMs = Math.max(0, cancelAfterMs - (now - start));
|
|
50
51
|
return setTimeout(checkIdle, idleThreshold);
|
|
51
52
|
};
|
|
52
53
|
setTimeout(checkIdle, idleThreshold);
|
|
@@ -59,8 +60,8 @@ export var TTI_FROM_INVOCATION_SEVERITY_THRESHOLD_DEFAULTS = {
|
|
|
59
60
|
NORMAL: 5000,
|
|
60
61
|
DEGRADED: 8000
|
|
61
62
|
};
|
|
62
|
-
export function getTTISeverity(tti, ttiFromInvocation,
|
|
63
|
-
var ttiNormalThreshold =
|
|
63
|
+
export function getTTISeverity(tti, ttiFromInvocation, ttiSeverityNormalThreshold, ttiSeverityDegradedThreshold, ttiFromInvocationSeverityNormalThreshold, ttiFromInvocationSeverityDegradedThreshold) {
|
|
64
|
+
var ttiNormalThreshold = ttiSeverityNormalThreshold || TTI_SEVERITY_THRESHOLD_DEFAULTS.NORMAL;
|
|
64
65
|
var ttiDegradedThreshold = ttiSeverityDegradedThreshold || TTI_SEVERITY_THRESHOLD_DEFAULTS.DEGRADED;
|
|
65
66
|
var ttiSeverity;
|
|
66
67
|
if (tti >= ttiNormalThreshold && tti < ttiDegradedThreshold) {
|
|
@@ -6,7 +6,7 @@ export declare enum EditorExperience {
|
|
|
6
6
|
loadEditor = "load",
|
|
7
7
|
typing = "type",
|
|
8
8
|
interaction = "interact",
|
|
9
|
-
editSession = "
|
|
9
|
+
editSession = "edit-session"
|
|
10
10
|
}
|
|
11
11
|
export declare const RELIABILITY_INTERVAL = 30000;
|
|
12
12
|
type TypeOfEditorExperience = typeof EditorExperience;
|
|
@@ -8,7 +8,7 @@ export declare const TTI_FROM_INVOCATION_SEVERITY_THRESHOLD_DEFAULTS: {
|
|
|
8
8
|
NORMAL: number;
|
|
9
9
|
DEGRADED: number;
|
|
10
10
|
};
|
|
11
|
-
export declare function getTTISeverity(tti: number, ttiFromInvocation: number,
|
|
11
|
+
export declare function getTTISeverity(tti: number, ttiFromInvocation: number, ttiSeverityNormalThreshold?: number, ttiSeverityDegradedThreshold?: number, ttiFromInvocationSeverityNormalThreshold?: number, ttiFromInvocationSeverityDegradedThreshold?: number): {
|
|
12
12
|
ttiSeverity: SEVERITY;
|
|
13
13
|
ttiFromInvocationSeverity: SEVERITY;
|
|
14
14
|
};
|
|
@@ -6,7 +6,7 @@ export declare enum EditorExperience {
|
|
|
6
6
|
loadEditor = "load",
|
|
7
7
|
typing = "type",
|
|
8
8
|
interaction = "interact",
|
|
9
|
-
editSession = "
|
|
9
|
+
editSession = "edit-session"
|
|
10
10
|
}
|
|
11
11
|
export declare const RELIABILITY_INTERVAL = 30000;
|
|
12
12
|
type TypeOfEditorExperience = typeof EditorExperience;
|
|
@@ -8,7 +8,7 @@ export declare const TTI_FROM_INVOCATION_SEVERITY_THRESHOLD_DEFAULTS: {
|
|
|
8
8
|
NORMAL: number;
|
|
9
9
|
DEGRADED: number;
|
|
10
10
|
};
|
|
11
|
-
export declare function getTTISeverity(tti: number, ttiFromInvocation: number,
|
|
11
|
+
export declare function getTTISeverity(tti: number, ttiFromInvocation: number, ttiSeverityNormalThreshold?: number, ttiSeverityDegradedThreshold?: number, ttiFromInvocationSeverityNormalThreshold?: number, ttiFromInvocationSeverityDegradedThreshold?: number): {
|
|
12
12
|
ttiSeverity: SEVERITY;
|
|
13
13
|
ttiFromInvocationSeverity: SEVERITY;
|
|
14
14
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "74.56.
|
|
3
|
+
"version": "74.56.9",
|
|
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/"
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
"@atlaskit/spinner": "^15.5.0",
|
|
113
113
|
"@atlaskit/task-decision": "^17.7.0",
|
|
114
114
|
"@atlaskit/theme": "^12.6.0",
|
|
115
|
-
"@atlaskit/tokens": "^1.
|
|
115
|
+
"@atlaskit/tokens": "^1.21.0",
|
|
116
116
|
"@atlaskit/tooltip": "^17.8.0",
|
|
117
117
|
"@atlaskit/ufo": "^0.2.0",
|
|
118
118
|
"@atlaskit/width-detector": "^4.1.0",
|