@atlaskit/editor-common 74.56.8 → 74.56.10

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,17 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 74.56.10
4
+
5
+ ### Patch Changes
6
+
7
+ - [`dca155209d9`](https://bitbucket.org/atlassian/atlassian-frontend/commits/dca155209d9) - ED-15094 Feature flag clean up for copy button
8
+
9
+ ## 74.56.9
10
+
11
+ ### Patch Changes
12
+
13
+ - [`a9552aaea4e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a9552aaea4e) - NO-ISSUE Fixed minor issue with TTI measurement that made it cancel before 60s
14
+
3
15
  ## 74.56.8
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.8";
19
+ var packageVersion = "74.56.10";
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
@@ -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"] = "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.8";
27
+ var packageVersion = "74.56.10";
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 seperate callback when the
29
- // measurement has occured when the render was in the backgroun
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, cancelAfterMs <= 0);
53
- } else if (now - lastEnd >= idleThreshold || cancelAfterMs <= 0) {
54
+ return onMeasureComplete(prevEnd, prevEnd - start, canceled);
55
+ } else if (now - lastEnd >= idleThreshold || canceled) {
54
56
  observer.disconnect();
55
- return onMeasureComplete(lastEnd, lastEnd - start, cancelAfterMs <= 0);
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, ttiSeverityNormalTheshold, ttiSeverityDegradedThreshold, ttiFromInvocationSeverityNormalThreshold, ttiFromInvocationSeverityDegradedThreshold) {
73
- var ttiNormalThreshold = ttiSeverityNormalTheshold || TTI_SEVERITY_THRESHOLD_DEFAULTS.NORMAL;
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.8";
3
+ const packageVersion = "74.56.10";
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
@@ -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"] = "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.8";
11
+ const packageVersion = "74.56.10";
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 seperate callback when the
23
- // measurement has occured when the render was in the backgroun
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
- let cancelAfterMs = cancelAfter * 1000;
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, cancelAfterMs <= 0);
42
- } else if (now - lastEnd >= idleThreshold || cancelAfterMs <= 0) {
43
+ return onMeasureComplete(prevEnd, prevEnd - start, canceled);
44
+ } else if (now - lastEnd >= idleThreshold || canceled) {
43
45
  observer.disconnect();
44
- return onMeasureComplete(lastEnd, lastEnd - start, cancelAfterMs <= 0);
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, ttiSeverityNormalTheshold, ttiSeverityDegradedThreshold, ttiFromInvocationSeverityNormalThreshold, ttiFromInvocationSeverityDegradedThreshold) {
60
- const ttiNormalThreshold = ttiSeverityNormalTheshold || TTI_SEVERITY_THRESHOLD_DEFAULTS.NORMAL;
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.8";
9
+ var packageVersion = "74.56.10";
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
@@ -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"] = "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.8";
21
+ var packageVersion = "74.56.10";
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 seperate callback when the
23
- // measurement has occured when the render was in the backgroun
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, cancelAfterMs <= 0);
45
- } else if (now - lastEnd >= idleThreshold || cancelAfterMs <= 0) {
46
+ return onMeasureComplete(prevEnd, prevEnd - start, canceled);
47
+ } else if (now - lastEnd >= idleThreshold || canceled) {
46
48
  observer.disconnect();
47
- return onMeasureComplete(lastEnd, lastEnd - start, cancelAfterMs <= 0);
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, ttiSeverityNormalTheshold, ttiSeverityDegradedThreshold, ttiFromInvocationSeverityNormalThreshold, ttiFromInvocationSeverityDegradedThreshold) {
63
- var ttiNormalThreshold = ttiSeverityNormalTheshold || TTI_SEVERITY_THRESHOLD_DEFAULTS.NORMAL;
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) {
@@ -245,15 +245,6 @@ export type FeatureFlags = {
245
245
  * @default false
246
246
  */
247
247
  indentationButtonsInTheToolbar?: boolean;
248
- /**
249
- * @description
250
- * Show copy buttons in the Floating toolbar
251
- *
252
- * @see https://product-fabric.atlassian.net/wiki/spaces/E/pages/3237609689/Cubone+Mini+project+-+Copy+button+in+the+floating+toolbar
253
- * @see https://product-fabric.atlassian.net/browse/ED-15090
254
- * @default false
255
- */
256
- floatingToolbarCopyButton?: boolean;
257
248
  /**
258
249
  * @description
259
250
  * Use the linking platform link picker for link insertion and edit
@@ -6,7 +6,7 @@ export declare enum EditorExperience {
6
6
  loadEditor = "load",
7
7
  typing = "type",
8
8
  interaction = "interact",
9
- editSession = "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, ttiSeverityNormalTheshold?: number, ttiSeverityDegradedThreshold?: number, ttiFromInvocationSeverityNormalThreshold?: number, ttiFromInvocationSeverityDegradedThreshold?: 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
  };
@@ -245,15 +245,6 @@ export type FeatureFlags = {
245
245
  * @default false
246
246
  */
247
247
  indentationButtonsInTheToolbar?: boolean;
248
- /**
249
- * @description
250
- * Show copy buttons in the Floating toolbar
251
- *
252
- * @see https://product-fabric.atlassian.net/wiki/spaces/E/pages/3237609689/Cubone+Mini+project+-+Copy+button+in+the+floating+toolbar
253
- * @see https://product-fabric.atlassian.net/browse/ED-15090
254
- * @default false
255
- */
256
- floatingToolbarCopyButton?: boolean;
257
248
  /**
258
249
  * @description
259
250
  * Use the linking platform link picker for link insertion and edit
@@ -6,7 +6,7 @@ export declare enum EditorExperience {
6
6
  loadEditor = "load",
7
7
  typing = "type",
8
8
  interaction = "interact",
9
- editSession = "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, ttiSeverityNormalTheshold?: number, ttiSeverityDegradedThreshold?: number, ttiFromInvocationSeverityNormalThreshold?: number, ttiFromInvocationSeverityDegradedThreshold?: 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.8",
3
+ "version": "74.56.10",
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.20.0",
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",
@@ -146,7 +146,7 @@
146
146
  "devDependencies": {
147
147
  "@atlaskit/media-core": "^34.1.0",
148
148
  "@atlaskit/media-test-helpers": "^33.0.0",
149
- "@atlaskit/smart-card": "^26.21.0",
149
+ "@atlaskit/smart-card": "^26.22.0",
150
150
  "@atlaskit/util-data-test": "^17.8.0",
151
151
  "@atlaskit/visual-regression": "*",
152
152
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",