@atlaskit/react-ufo 4.14.2 → 4.14.3

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,12 @@
1
1
  # @atlaskit/ufo-interaction-ignore
2
2
 
3
+ ## 4.14.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`666790c2fd8dd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/666790c2fd8dd) -
8
+ Remove SSR placeholder exclusions for VC next
9
+
3
10
  ## 4.14.2
4
11
 
5
12
  ### Patch Changes
@@ -67,7 +67,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
67
67
  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) { (0, _defineProperty2.default)(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; }
68
68
  function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
69
69
  function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
70
- function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
70
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
71
71
  var PreviousInteractionLog = {
72
72
  name: undefined,
73
73
  isAborted: undefined
@@ -383,6 +383,7 @@ function removeHoldCriterion(id) {
383
383
  }
384
384
  function addHold(interactionId, labelStack, name, experimental) {
385
385
  var interaction = _constants.interactions.get(interactionId);
386
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
386
387
  var id = (0, _uuid.v4)();
387
388
  if (!interaction && (0, _platformFeatureFlags.fg)('platform_ufo_enable_late_holds_post_interaction')) {
388
389
  // add hold timestamp to post interaction log if interaction is complete
@@ -22,7 +22,7 @@ var _shortId = _interopRequireDefault(require("../short-id"));
22
22
  var _scheduleOnPaint = _interopRequireDefault(require("./schedule-on-paint"));
23
23
  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); }
24
24
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
25
- 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) { (0, _defineProperty2.default)(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; }
25
+ 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) { (0, _defineProperty2.default)(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; } // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
26
26
  var tryCompleteHandle;
27
27
 
28
28
  /** A portion of the page we apply measurement to */
@@ -177,6 +177,7 @@ function UFOSegment(_ref) {
177
177
  var rate = (0, _config.getInteractionRate)(name, 'press');
178
178
  if ((0, _coinflip.default)(rate)) {
179
179
  var startTimestamp = timestamp !== null && timestamp !== void 0 ? timestamp : performance.now();
180
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
180
181
  var newId = (0, _uuid.v4)();
181
182
  interactionId.current = newId;
182
183
  // covered experiences with tracing instrumentation:
@@ -12,6 +12,8 @@ var _experienceTraceIdContext = require("../../experience-trace-id-context");
12
12
  var _interactionIdContext = require("../../interaction-id-context");
13
13
  var _interactionMetrics = require("../../interaction-metrics");
14
14
  var _routeNameContext = _interopRequireDefault(require("../../route-name-context"));
15
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
16
+
15
17
  function traceUFOInteraction(name, interactionType, startTime) {
16
18
  var _getMinorInteractions;
17
19
  var rate = (0, _config.getInteractionRate)(name, interactionType);
@@ -30,6 +32,7 @@ function traceUFOInteraction(name, interactionType, startTime) {
30
32
  }
31
33
  if ((0, _coinflip.default)(rate)) {
32
34
  var startTimestamp = startTime !== null && startTime !== void 0 ? startTime : performance.now();
35
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
33
36
  var newId = (0, _uuid.v4)();
34
37
  _interactionIdContext.DefaultInteractionID.current = newId;
35
38
 
@@ -13,6 +13,8 @@ var _experienceTraceIdContext = require("../experience-trace-id-context");
13
13
  var _interactionIdContext = require("../interaction-id-context");
14
14
  var _interactionMetrics = require("../interaction-metrics");
15
15
  var _routeNameContext = _interopRequireDefault(require("../route-name-context"));
16
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
17
+
16
18
  var AWAITING_PAGELOAD_NAME = 'awaiting_pageload_name';
17
19
  function traceUFOPageLoad(ufoName) {
18
20
  var routeName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ufoName;
@@ -24,6 +26,7 @@ function traceUFOPageLoad(ufoName) {
24
26
  var rate = ufoName ? (0, _config.getInteractionRate)(ufoName, 'page_load') : 1;
25
27
  var enabledBySamplingRate = (0, _coinflip.default)(rate);
26
28
  if (enabledBySamplingRate && !activeInteraction) {
29
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
27
30
  var newId = (0, _uuid.v4)();
28
31
  _interactionIdContext.DefaultInteractionID.current = newId;
29
32
  (0, _interactionMetrics.addNewInteraction)(newId, ufoName || '', 'page_load', 0, rate, null, routeName, (0, _experienceTraceIdContext.getActiveTrace)());
@@ -17,6 +17,8 @@ var _interactionMetrics = require("../interaction-metrics");
17
17
  var _routeNameContext = _interopRequireDefault(require("../route-name-context"));
18
18
  var _setInteractionActiveTrace = require("./utils/set-interaction-active-trace");
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
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
21
+
20
22
  function traceUFOTransition(ufoName) {
21
23
  var routeName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ufoName;
22
24
  var pressInteractionsList = (0, _config.getDoNotAbortActivePressInteractionOnTransition)();
@@ -31,6 +33,7 @@ function traceUFOTransition(ufoName) {
31
33
  _routeNameContext.default.current = ufoName;
32
34
  var rate = (0, _config.getInteractionRate)(ufoName, 'transition');
33
35
  if ((0, _coinflip.default)(rate)) {
36
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
34
37
  var newId = (0, _uuid.v4)();
35
38
  (0, _setInteractionActiveTrace.setInteractionActiveTrace)(newId);
36
39
  _interactionIdContext.DefaultInteractionID.current = newId;
@@ -11,6 +11,8 @@ var _uuid = require("uuid");
11
11
  var _coinflip = _interopRequireDefault(require("../coinflip"));
12
12
  var _config = require("../config");
13
13
  var _interactionMetrics = require("../interaction-metrics");
14
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
15
+
14
16
  var getTypingMetadata = function getTypingMetadata(times, computeStartTime, typingPerformanceTracingMethod) {
15
17
  var min = 0;
16
18
  var max = 0;
@@ -49,6 +51,7 @@ function typingPerformanceTracingTimeout(element, name, rate) {
49
51
  var isInteractionInitialised = false;
50
52
  var id;
51
53
  var start = function start() {
54
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
52
55
  id = (0, _uuid.v4)();
53
56
  (0, _interactionMetrics.addNewInteraction)(id, name, 'typing', performance.now(), rate, null, null);
54
57
  isInteractionInitialised = true;
@@ -102,6 +105,7 @@ function typingPerformanceTracingTimeoutNoAlloc(element, name, rate) {
102
105
  count = 0;
103
106
  };
104
107
  var start = function start() {
108
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
105
109
  id = (0, _uuid.v4)();
106
110
  (0, _interactionMetrics.addNewInteraction)(id, name, 'typing', performance.now(), rate, null, null);
107
111
  isInteractionInitialised = true;
@@ -171,6 +175,7 @@ function typingPerformanceTracingMutationObserver(element, name, rate) {
171
175
  eventTime = -1;
172
176
  };
173
177
  var start = function start() {
178
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
174
179
  id = (0, _uuid.v4)();
175
180
  (0, _interactionMetrics.addNewInteraction)(id, name, 'typing', performance.now(), rate, null, null);
176
181
  isInteractionInitialised = true;
@@ -11,6 +11,7 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
11
11
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
12
12
  var _get2 = _interopRequireDefault(require("@babel/runtime/helpers/get"));
13
13
  var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
14
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
14
15
  var _fy25_ = _interopRequireDefault(require("../fy25_03"));
15
16
  function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
16
17
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
@@ -18,10 +19,15 @@ function _superPropGet(t, o, e, r) { var p = (0, _get2.default)((0, _getPrototyp
18
19
  // NOTE: `next` to be renamed `fy26.04` once stable
19
20
  var REVISION_NO = 'next';
20
21
  var getConsideredEntryTypes = function getConsideredEntryTypes() {
22
+ var consideredEntryTypes = ['mutation:display-contents-children-element'];
23
+ if ((0, _platformFeatureFlags.fg)('platform_ufo_remove_ssr_placeholder_in_ttvc_v4')) {
24
+ consideredEntryTypes.push('mutation:ssr-placeholder');
25
+ }
21
26
  return ['mutation:display-contents-children-element'];
22
27
  };
23
28
  var getExcludedEntryTypes = function getExcludedEntryTypes() {
24
- return ['layout-shift:same-rect'];
29
+ var excludedEntryTypes = ['layout-shift:same-rect'];
30
+ return excludedEntryTypes;
25
31
  };
26
32
 
27
33
  // NOTE: `VCNext` to be renamed `FY26_04` once stable
@@ -1,3 +1,4 @@
1
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
1
2
  import { v4 as createUUID } from 'uuid';
2
3
  import { fg } from '@atlaskit/platform-feature-flags';
3
4
  import coinflip from '../coinflip';
@@ -297,6 +298,7 @@ function removeHoldCriterion(id) {
297
298
  }
298
299
  export function addHold(interactionId, labelStack, name, experimental) {
299
300
  const interaction = interactions.get(interactionId);
301
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
300
302
  const id = createUUID();
301
303
  if (!interaction && fg('platform_ufo_enable_late_holds_post_interaction')) {
302
304
  // add hold timestamp to post interaction log if interaction is complete
@@ -1,5 +1,6 @@
1
1
  import React, { Profiler, useCallback, useContext, useEffect, useMemo, useRef } from 'react';
2
2
  import { unstable_NormalPriority as NormalPriority, unstable_scheduleCallback as scheduleCallback } from 'scheduler';
3
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
3
4
  import { v4 as createUUID } from 'uuid';
4
5
  import coinflip from '../coinflip';
5
6
  import { getConfig, getDoNotAbortActivePressInteraction, getInteractionRate, getMinorInteractions } from '../config';
@@ -156,6 +157,7 @@ export default function UFOSegment({
156
157
  const rate = getInteractionRate(name, 'press');
157
158
  if (coinflip(rate)) {
158
159
  const startTimestamp = timestamp !== null && timestamp !== void 0 ? timestamp : performance.now();
160
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
159
161
  const newId = createUUID();
160
162
  interactionId.current = newId;
161
163
  // covered experiences with tracing instrumentation:
@@ -1,3 +1,4 @@
1
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
1
2
  import { v4 as createUUID } from 'uuid';
2
3
  import coinflip from '../../coinflip';
3
4
  import { getDoNotAbortActivePressInteraction, getInteractionRate, getMinorInteractions } from '../../config';
@@ -23,6 +24,7 @@ function traceUFOInteraction(name, interactionType, startTime) {
23
24
  }
24
25
  if (coinflip(rate)) {
25
26
  const startTimestamp = startTime !== null && startTime !== void 0 ? startTime : performance.now();
27
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
26
28
  const newId = createUUID();
27
29
  DefaultInteractionID.current = newId;
28
30
 
@@ -1,3 +1,4 @@
1
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
1
2
  import { v4 as createUUID } from 'uuid';
2
3
  import coinflip from '../coinflip';
3
4
  import { getInteractionRate } from '../config';
@@ -15,6 +16,7 @@ function traceUFOPageLoad(ufoName, routeName = ufoName) {
15
16
  const rate = ufoName ? getInteractionRate(ufoName, 'page_load') : 1;
16
17
  const enabledBySamplingRate = coinflip(rate);
17
18
  if (enabledBySamplingRate && !activeInteraction) {
19
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
18
20
  const newId = createUUID();
19
21
  DefaultInteractionID.current = newId;
20
22
  addNewInteraction(newId, ufoName || '', 'page_load', 0, rate, null, routeName, getActiveTrace());
@@ -1,4 +1,6 @@
1
1
  import { useContext, useEffect } from 'react';
2
+
3
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
2
4
  import { v4 as createUUID } from 'uuid';
3
5
  import coinflip from '../coinflip';
4
6
  import { getDoNotAbortActivePressInteractionOnTransition, getInteractionRate } from '../config';
@@ -20,6 +22,7 @@ function traceUFOTransition(ufoName, routeName = ufoName) {
20
22
  UFORouteName.current = ufoName;
21
23
  const rate = getInteractionRate(ufoName, 'transition');
22
24
  if (coinflip(rate)) {
25
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
23
26
  const newId = createUUID();
24
27
  setInteractionActiveTrace(newId);
25
28
  DefaultInteractionID.current = newId;
@@ -1,5 +1,6 @@
1
1
  import { useEffect, useRef } from 'react';
2
2
  import { unstable_IdlePriority as idlePriority, unstable_scheduleCallback as scheduleCallback } from 'scheduler';
3
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
3
4
  import { v4 as createUUID } from 'uuid';
4
5
  import coinflip from '../coinflip';
5
6
  import { getInteractionRate, getTypingPerformanceTracingMethod } from '../config';
@@ -42,6 +43,7 @@ function typingPerformanceTracingTimeout(element, name, rate) {
42
43
  let isInteractionInitialised = false;
43
44
  let id;
44
45
  const start = () => {
46
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
45
47
  id = createUUID();
46
48
  addNewInteraction(id, name, 'typing', performance.now(), rate, null, null);
47
49
  isInteractionInitialised = true;
@@ -95,6 +97,7 @@ function typingPerformanceTracingTimeoutNoAlloc(element, name, rate) {
95
97
  count = 0;
96
98
  };
97
99
  const start = () => {
100
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
98
101
  id = createUUID();
99
102
  addNewInteraction(id, name, 'typing', performance.now(), rate, null, null);
100
103
  isInteractionInitialised = true;
@@ -164,6 +167,7 @@ function typingPerformanceTracingMutationObserver(element, name, rate) {
164
167
  eventTime = -1;
165
168
  };
166
169
  const start = () => {
170
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
167
171
  id = createUUID();
168
172
  addNewInteraction(id, name, 'typing', performance.now(), rate, null, null);
169
173
  isInteractionInitialised = true;
@@ -1,12 +1,18 @@
1
+ import { fg } from '@atlaskit/platform-feature-flags';
1
2
  import VCCalculator_FY25_03 from '../fy25_03';
2
3
 
3
4
  // NOTE: `next` to be renamed `fy26.04` once stable
4
5
  const REVISION_NO = 'next';
5
6
  const getConsideredEntryTypes = () => {
7
+ const consideredEntryTypes = ['mutation:display-contents-children-element'];
8
+ if (fg('platform_ufo_remove_ssr_placeholder_in_ttvc_v4')) {
9
+ consideredEntryTypes.push('mutation:ssr-placeholder');
10
+ }
6
11
  return ['mutation:display-contents-children-element'];
7
12
  };
8
13
  const getExcludedEntryTypes = () => {
9
- return ['layout-shift:same-rect'];
14
+ const excludedEntryTypes = ['layout-shift:same-rect'];
15
+ return excludedEntryTypes;
10
16
  };
11
17
 
12
18
  // NOTE: `VCNext` to be renamed `FY26_04` once stable
@@ -8,6 +8,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
8
8
  function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
9
9
  function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
10
10
  function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
11
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
11
12
  import { v4 as createUUID } from 'uuid';
12
13
  import { fg } from '@atlaskit/platform-feature-flags';
13
14
  import coinflip from '../coinflip';
@@ -337,6 +338,7 @@ function removeHoldCriterion(id) {
337
338
  }
338
339
  export function addHold(interactionId, labelStack, name, experimental) {
339
340
  var interaction = interactions.get(interactionId);
341
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
340
342
  var id = createUUID();
341
343
  if (!interaction && fg('platform_ufo_enable_late_holds_post_interaction')) {
342
344
  // add hold timestamp to post interaction log if interaction is complete
@@ -4,6 +4,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
4
4
  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; }
5
5
  import React, { Profiler, useCallback, useContext, useEffect, useMemo, useRef } from 'react';
6
6
  import { unstable_NormalPriority as NormalPriority, unstable_scheduleCallback as scheduleCallback } from 'scheduler';
7
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
7
8
  import { v4 as createUUID } from 'uuid';
8
9
  import coinflip from '../coinflip';
9
10
  import { getConfig, getDoNotAbortActivePressInteraction, getInteractionRate, getMinorInteractions } from '../config';
@@ -168,6 +169,7 @@ export default function UFOSegment(_ref) {
168
169
  var rate = getInteractionRate(name, 'press');
169
170
  if (coinflip(rate)) {
170
171
  var startTimestamp = timestamp !== null && timestamp !== void 0 ? timestamp : performance.now();
172
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
171
173
  var newId = createUUID();
172
174
  interactionId.current = newId;
173
175
  // covered experiences with tracing instrumentation:
@@ -1,3 +1,4 @@
1
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
1
2
  import { v4 as createUUID } from 'uuid';
2
3
  import coinflip from '../../coinflip';
3
4
  import { getDoNotAbortActivePressInteraction, getInteractionRate, getMinorInteractions } from '../../config';
@@ -23,6 +24,7 @@ function traceUFOInteraction(name, interactionType, startTime) {
23
24
  }
24
25
  if (coinflip(rate)) {
25
26
  var startTimestamp = startTime !== null && startTime !== void 0 ? startTime : performance.now();
27
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
26
28
  var newId = createUUID();
27
29
  DefaultInteractionID.current = newId;
28
30
 
@@ -1,3 +1,4 @@
1
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
1
2
  import { v4 as createUUID } from 'uuid';
2
3
  import coinflip from '../coinflip';
3
4
  import { getInteractionRate } from '../config';
@@ -16,6 +17,7 @@ function traceUFOPageLoad(ufoName) {
16
17
  var rate = ufoName ? getInteractionRate(ufoName, 'page_load') : 1;
17
18
  var enabledBySamplingRate = coinflip(rate);
18
19
  if (enabledBySamplingRate && !activeInteraction) {
20
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
19
21
  var newId = createUUID();
20
22
  DefaultInteractionID.current = newId;
21
23
  addNewInteraction(newId, ufoName || '', 'page_load', 0, rate, null, routeName, getActiveTrace());
@@ -1,4 +1,6 @@
1
1
  import { useContext, useEffect } from 'react';
2
+
3
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
2
4
  import { v4 as createUUID } from 'uuid';
3
5
  import coinflip from '../coinflip';
4
6
  import { getDoNotAbortActivePressInteractionOnTransition, getInteractionRate } from '../config';
@@ -21,6 +23,7 @@ function traceUFOTransition(ufoName) {
21
23
  UFORouteName.current = ufoName;
22
24
  var rate = getInteractionRate(ufoName, 'transition');
23
25
  if (coinflip(rate)) {
26
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
24
27
  var newId = createUUID();
25
28
  setInteractionActiveTrace(newId);
26
29
  DefaultInteractionID.current = newId;
@@ -1,5 +1,6 @@
1
1
  import { useEffect, useRef } from 'react';
2
2
  import { unstable_IdlePriority as idlePriority, unstable_scheduleCallback as scheduleCallback } from 'scheduler';
3
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
3
4
  import { v4 as createUUID } from 'uuid';
4
5
  import coinflip from '../coinflip';
5
6
  import { getInteractionRate, getTypingPerformanceTracingMethod } from '../config';
@@ -42,6 +43,7 @@ function typingPerformanceTracingTimeout(element, name, rate) {
42
43
  var isInteractionInitialised = false;
43
44
  var id;
44
45
  var start = function start() {
46
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
45
47
  id = createUUID();
46
48
  addNewInteraction(id, name, 'typing', performance.now(), rate, null, null);
47
49
  isInteractionInitialised = true;
@@ -95,6 +97,7 @@ function typingPerformanceTracingTimeoutNoAlloc(element, name, rate) {
95
97
  count = 0;
96
98
  };
97
99
  var start = function start() {
100
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
98
101
  id = createUUID();
99
102
  addNewInteraction(id, name, 'typing', performance.now(), rate, null, null);
100
103
  isInteractionInitialised = true;
@@ -164,6 +167,7 @@ function typingPerformanceTracingMutationObserver(element, name, rate) {
164
167
  eventTime = -1;
165
168
  };
166
169
  var start = function start() {
170
+ // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
167
171
  id = createUUID();
168
172
  addNewInteraction(id, name, 'typing', performance.now(), rate, null, null);
169
173
  isInteractionInitialised = true;
@@ -7,15 +7,21 @@ import _inherits from "@babel/runtime/helpers/inherits";
7
7
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
8
8
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
9
9
  function _superPropGet(t, o, e, r) { var p = _get(_getPrototypeOf(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
10
+ import { fg } from '@atlaskit/platform-feature-flags';
10
11
  import VCCalculator_FY25_03 from '../fy25_03';
11
12
 
12
13
  // NOTE: `next` to be renamed `fy26.04` once stable
13
14
  var REVISION_NO = 'next';
14
15
  var getConsideredEntryTypes = function getConsideredEntryTypes() {
16
+ var consideredEntryTypes = ['mutation:display-contents-children-element'];
17
+ if (fg('platform_ufo_remove_ssr_placeholder_in_ttvc_v4')) {
18
+ consideredEntryTypes.push('mutation:ssr-placeholder');
19
+ }
15
20
  return ['mutation:display-contents-children-element'];
16
21
  };
17
22
  var getExcludedEntryTypes = function getExcludedEntryTypes() {
18
- return ['layout-shift:same-rect'];
23
+ var excludedEntryTypes = ['layout-shift:same-rect'];
24
+ return excludedEntryTypes;
19
25
  };
20
26
 
21
27
  // NOTE: `VCNext` to be renamed `FY26_04` once stable
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/react-ufo",
3
- "version": "4.14.2",
3
+ "version": "4.14.3",
4
4
  "description": "Parts of React UFO that are publicly available",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -107,6 +107,9 @@
107
107
  "platform_ufo_critical_metrics_payload": {
108
108
  "type": "boolean"
109
109
  },
110
+ "platform_ufo_remove_ssr_placeholder_in_ttvc_v4": {
111
+ "type": "boolean"
112
+ },
110
113
  "platform_ufo_enable_interactivity_jsm": {
111
114
  "type": "boolean"
112
115
  },