@atlaskit/react-ufo 3.14.15 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/cjs/config/index.js +14 -48
  3. package/dist/cjs/create-payload/index.js +14 -8
  4. package/dist/cjs/create-post-interaction-log-payload/get-late-mutations.js +1 -1
  5. package/dist/cjs/create-post-interaction-log-payload/index.js +2 -2
  6. package/dist/cjs/interaction-metrics/post-interaction-log.js +0 -1
  7. package/dist/cjs/placeholder/Placeholder.js +3 -3
  8. package/dist/cjs/suspense/Suspense.js +20 -0
  9. package/dist/cjs/suspense/index.js +9 -0
  10. package/dist/cjs/vc/vc-observer-new/metric-calculator/fy25_03/index.js +1 -1
  11. package/dist/es2019/config/index.js +5 -39
  12. package/dist/es2019/create-payload/index.js +15 -9
  13. package/dist/es2019/create-post-interaction-log-payload/get-late-mutations.js +1 -1
  14. package/dist/es2019/create-post-interaction-log-payload/index.js +3 -3
  15. package/dist/es2019/interaction-metrics/post-interaction-log.js +0 -1
  16. package/dist/es2019/placeholder/Placeholder.js +3 -3
  17. package/dist/es2019/suspense/Suspense.js +14 -0
  18. package/dist/es2019/suspense/index.js +2 -0
  19. package/dist/es2019/vc/vc-observer-new/metric-calculator/fy25_03/index.js +1 -1
  20. package/dist/esm/config/index.js +13 -45
  21. package/dist/esm/create-payload/index.js +14 -8
  22. package/dist/esm/create-post-interaction-log-payload/get-late-mutations.js +1 -1
  23. package/dist/esm/create-post-interaction-log-payload/index.js +3 -3
  24. package/dist/esm/interaction-metrics/post-interaction-log.js +0 -1
  25. package/dist/esm/placeholder/Placeholder.js +3 -3
  26. package/dist/esm/suspense/Suspense.js +13 -0
  27. package/dist/esm/suspense/index.js +2 -0
  28. package/dist/esm/vc/vc-observer-new/metric-calculator/fy25_03/index.js +1 -1
  29. package/dist/types/common/assets/types.d.ts +1 -1
  30. package/dist/types/config/index.d.ts +16 -17
  31. package/dist/types/create-post-interaction-log-payload/get-late-mutations.d.ts +1 -1
  32. package/dist/types/placeholder/Placeholder.d.ts +3 -3
  33. package/dist/types/suspense/Suspense.d.ts +7 -0
  34. package/dist/types/suspense/index.d.ts +2 -0
  35. package/dist/types-ts4.5/common/assets/types.d.ts +1 -1
  36. package/dist/types-ts4.5/config/index.d.ts +16 -17
  37. package/dist/types-ts4.5/create-post-interaction-log-payload/get-late-mutations.d.ts +1 -1
  38. package/dist/types-ts4.5/placeholder/Placeholder.d.ts +3 -3
  39. package/dist/types-ts4.5/suspense/Suspense.d.ts +7 -0
  40. package/dist/types-ts4.5/suspense/index.d.ts +2 -0
  41. package/package.json +5 -1
  42. package/suspense/package.json +15 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @atlaskit/ufo-interaction-ignore
2
2
 
3
+ ## 4.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [#185849](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/185849)
8
+ [`5570de66b8d30`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5570de66b8d30) -
9
+ change default TTVC version to v3, remove deprecated config fields, deprecate Placeholder
10
+ component
11
+
3
12
  ## 3.14.15
4
13
 
5
14
  ### Patch Changes
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.CLEANUP_TIMEOUT = void 0;
7
+ exports.DEFAULT_TTVC_REVISION = exports.CLEANUP_TIMEOUT = void 0;
8
8
  exports.getAwaitBM3TTIList = getAwaitBM3TTIList;
9
9
  exports.getCapabilityRate = getCapabilityRate;
10
10
  exports.getConfig = getConfig;
@@ -16,8 +16,6 @@ exports.getInteractionRate = getInteractionRate;
16
16
  exports.getInteractionTimeout = getInteractionTimeout;
17
17
  exports.getMostRecentVCRevision = getMostRecentVCRevision;
18
18
  exports.getPostInteractionRate = getPostInteractionRate;
19
- exports.getRemoveInteractionsUFOPrefixes = getRemoveInteractionsUFOPrefixes;
20
- exports.getRemovePageSegmentsUFOPrefixes = getRemovePageSegmentsUFOPrefixes;
21
19
  exports.getTypingPerformanceTracingMethod = getTypingPerformanceTracingMethod;
22
20
  exports.getUfoNameOverrides = getUfoNameOverrides;
23
21
  exports.isVCRevisionEnabled = isVCRevisionEnabled;
@@ -25,10 +23,11 @@ exports.setUFOConfig = setUFOConfig;
25
23
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
26
24
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
27
25
  var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
26
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
28
27
  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; }
29
28
  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; }
30
29
  var config;
31
- var DEFAULT_TTVC_REVISION = 'fy25.02';
30
+ var DEFAULT_TTVC_REVISION = exports.DEFAULT_TTVC_REVISION = 'fy25.03';
32
31
 
33
32
  // Defensively typed, since this is directly user-editable
34
33
  // and they could delete empty members
@@ -192,6 +191,9 @@ function getPostInteractionRate(name, interactionType) {
192
191
  }
193
192
  }
194
193
  function getCapabilityRate(capability) {
194
+ if ((0, _platformFeatureFlags.fg)('platform_ufo_remove_deprecated_config_fields')) {
195
+ return 1;
196
+ }
195
197
  try {
196
198
  if (!config) {
197
199
  return 0;
@@ -248,42 +250,6 @@ function getAwaitBM3TTIList() {
248
250
  }
249
251
  }
250
252
 
251
- // Flag to remove ufo segments prefixes
252
- function getRemovePageSegmentsUFOPrefixes() {
253
- try {
254
- if (!config) {
255
- return false;
256
- }
257
- var _config7 = config,
258
- removePageSegmentsUFOPrefixes = _config7.removePageSegmentsUFOPrefixes;
259
- if (removePageSegmentsUFOPrefixes != null) {
260
- return removePageSegmentsUFOPrefixes;
261
- } else {
262
- return false;
263
- }
264
- } catch (e) {
265
- return false;
266
- }
267
- }
268
-
269
- // Flag to remove ufo segments prefixes
270
- function getRemoveInteractionsUFOPrefixes() {
271
- try {
272
- if (!config) {
273
- return false;
274
- }
275
- var _config8 = config,
276
- removeInteractionsUFOPrefixes = _config8.removeInteractionsUFOPrefixes;
277
- if (removeInteractionsUFOPrefixes != null) {
278
- return removeInteractionsUFOPrefixes;
279
- } else {
280
- return false;
281
- }
282
- } catch (e) {
283
- return false;
284
- }
285
- }
286
-
287
253
  // Will ask UFO to override ufoName => experienceKey to the apdex key
288
254
  // This is to cover use cases where one rUFO route is split into multiple BM3 keys (1:N)
289
255
  // This workaround should only be used as last resource,
@@ -293,8 +259,8 @@ function getUfoNameOverrides() {
293
259
  if (!config) {
294
260
  return undefined;
295
261
  }
296
- var _config9 = config,
297
- ufoNameOverrides = _config9.ufoNameOverrides;
262
+ var _config7 = config,
263
+ ufoNameOverrides = _config7.ufoNameOverrides;
298
264
  if (ufoNameOverrides != null) {
299
265
  return ufoNameOverrides;
300
266
  }
@@ -310,8 +276,8 @@ function getDoNotAbortActivePressInteraction() {
310
276
  if (!config) {
311
277
  return undefined;
312
278
  }
313
- var _config0 = config,
314
- doNotAbortActivePressInteraction = _config0.doNotAbortActivePressInteraction;
279
+ var _config8 = config,
280
+ doNotAbortActivePressInteraction = _config8.doNotAbortActivePressInteraction;
315
281
  return doNotAbortActivePressInteraction;
316
282
  } catch (e) {
317
283
  return undefined;
@@ -324,8 +290,8 @@ function getDoNotAbortActivePressInteractionOnTransition() {
324
290
  if (!config) {
325
291
  return undefined;
326
292
  }
327
- var _config1 = config,
328
- doNotAbortActivePressInteractionOnTransition = _config1.doNotAbortActivePressInteractionOnTransition;
293
+ var _config9 = config,
294
+ doNotAbortActivePressInteractionOnTransition = _config9.doNotAbortActivePressInteractionOnTransition;
329
295
  return doNotAbortActivePressInteractionOnTransition;
330
296
  } catch (e) {
331
297
  return undefined;
@@ -337,8 +303,8 @@ function getInteractionTimeout(ufoName) {
337
303
  if (!config) {
338
304
  return CLEANUP_TIMEOUT;
339
305
  }
340
- var _config10 = config,
341
- interactionTimeout = _config10.interactionTimeout;
306
+ var _config0 = config,
307
+ interactionTimeout = _config0.interactionTimeout;
342
308
  if (interactionTimeout != null && interactionTimeout[ufoName] != null) {
343
309
  return interactionTimeout[ufoName];
344
310
  }
@@ -182,13 +182,19 @@ function getPPSMetrics(interaction) {
182
182
  start: start,
183
183
  stop: interaction.end
184
184
  }) : null;
185
- if (config !== null && config !== void 0 && config.shouldCalculateLighthouseMetricsFromTTAI && PPSMetricsAtTTAI !== null) {
186
- return PPSMetricsAtTTAI;
187
- }
188
- if (PPSMetricsAtTTI !== null) {
189
- return _objectSpread(_objectSpread({}, PPSMetricsAtTTI), {}, {
190
- 'metrics@ttai': PPSMetricsAtTTAI
191
- });
185
+ if ((0, _platformFeatureFlags.fg)('platform_ufo_remove_deprecated_config_fields')) {
186
+ if (PPSMetricsAtTTAI !== null) {
187
+ return PPSMetricsAtTTAI;
188
+ }
189
+ } else {
190
+ if (config !== null && config !== void 0 && config.shouldCalculateLighthouseMetricsFromTTAI && PPSMetricsAtTTAI !== null) {
191
+ return PPSMetricsAtTTAI;
192
+ }
193
+ if (PPSMetricsAtTTI !== null) {
194
+ return _objectSpread(_objectSpread({}, PPSMetricsAtTTI), {}, {
195
+ 'metrics@ttai': PPSMetricsAtTTAI
196
+ });
197
+ }
192
198
  }
193
199
  return {};
194
200
  }
@@ -591,7 +597,7 @@ function _createInteractionMetricsPayload() {
591
597
  end = interaction.end, start = interaction.start, ufoName = interaction.ufoName, knownSegments = interaction.knownSegments, rate = interaction.rate, type = interaction.type, abortReason = interaction.abortReason, routeName = interaction.routeName, featureFlags = interaction.featureFlags, previousInteractionName = interaction.previousInteractionName, isPreviousInteractionAborted = interaction.isPreviousInteractionAborted, abortedByInteractionName = interaction.abortedByInteractionName, responsiveness = interaction.responsiveness, unknownElementName = interaction.unknownElementName, unknownElementHierarchy = interaction.unknownElementHierarchy;
592
598
  pageVisibilityAtTTI = getPageVisibilityUpToTTI(interaction);
593
599
  pageVisibilityAtTTAI = (0, _getPageVisibilityUpToTtai.default)(interaction);
594
- segments = config.killswitchNestedSegments ? [] : knownSegments;
600
+ segments = !(0, _platformFeatureFlags.fg)('platform_ufo_remove_deprecated_config_fields') && config.killswitchNestedSegments ? [] : knownSegments;
595
601
  segmentTree = (0, _getReactUfoPayloadVersion.getReactUFOPayloadVersion)(interaction.type) === '2.0.0' ? (0, _utils.buildSegmentTree)(segments.map(function (segment) {
596
602
  return segment.labelStack;
597
603
  })) : {};
@@ -32,7 +32,7 @@ function getLateMutations(vcDetails, lastInteractionFinish, postInteractionFinis
32
32
  result.push({
33
33
  time: details.t,
34
34
  element: element,
35
- viewportHeatmapPercentage: postInteractionFinishVCRatios[element] || 0
35
+ viewportHeatmapPercentage: (postInteractionFinishVCRatios === null || postInteractionFinishVCRatios === void 0 ? void 0 : postInteractionFinishVCRatios[element]) || 0
36
36
  });
37
37
  }
38
38
  } catch (err) {
@@ -154,7 +154,7 @@ function createPostInteractionLogPayload(_ref2) {
154
154
  var lastInteractionFinishStart = Math.round(lastInteractionFinish.start);
155
155
  var lastInteractionFinishEnd = Math.round(lastInteractionFinish.end);
156
156
  var lastInteractionFinishTTAI = Math.round(lastInteractionFinish.end - lastInteractionFinish.start);
157
- var mostRecentVCRevision = (0, _platformFeatureFlags.fg)('platform_ufo_post_interaction_most_recent_vc_rev') ? (0, _config.getMostRecentVCRevision)(lastInteractionFinish.ufoName) : 'fy25.02';
157
+ var mostRecentVCRevision = (0, _platformFeatureFlags.fg)('platform_ufo_post_interaction_most_recent_vc_rev') ? (0, _config.getMostRecentVCRevision)(lastInteractionFinish.ufoName) : _config.DEFAULT_TTVC_REVISION;
158
158
  var lastInteractionFinishVC90 = null;
159
159
  var lastInteractionFinishVCClean = false;
160
160
  var lastInteractionFinishVCRev = lastInteractionFinishVCResult === null || lastInteractionFinishVCResult === void 0 ? void 0 : lastInteractionFinishVCResult['ufo:vc:rev'];
@@ -178,7 +178,7 @@ function createPostInteractionLogPayload(_ref2) {
178
178
  });
179
179
  if (postInteractionFinishRevision !== null && postInteractionFinishRevision !== void 0 && postInteractionFinishRevision.clean) {
180
180
  postInteractionFinishVCClean = true;
181
- postInteractionFinishVCRatios = postInteractionFinishVCResult === null || postInteractionFinishVCResult === void 0 ? void 0 : postInteractionFinishVCResult['ufo:vc:ratios'];
181
+ postInteractionFinishVCRatios = postInteractionFinishRevision.ratios;
182
182
  if (typeof lastInteractionFinishVC90 === 'number') {
183
183
  var _postInteractionFinis;
184
184
  revisedVC90 = (_postInteractionFinis = postInteractionFinishRevision['metric:vc90']) !== null && _postInteractionFinis !== void 0 ? _postInteractionFinis : null;
@@ -148,7 +148,6 @@ var PostInteractionLog = exports.default = /*#__PURE__*/function () {
148
148
  this.sinkHandlerFn({
149
149
  lastInteractionFinish: this.lastInteractionFinish,
150
150
  reactProfilerTimings: this.reactProfilerTimings,
151
- // NOTE: invoking `getVCResult` at latest possible point in time here (not earlier) to get the most accurate result (from performance.now())
152
151
  postInteractionFinishVCResult: postInteractionFinishVCResult,
153
152
  lastInteractionFinishVCResult: this.lastInteractionFinishVCResult
154
153
  });
@@ -11,10 +11,10 @@ var _loadHold = _interopRequireDefault(require("../load-hold"));
11
11
  var _looselyLazy = require("./loosely-lazy");
12
12
  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); }
13
13
  /**
14
- * Provides a placeholder for lazily loaded content, improving perceived performance.
14
+ * @private
15
+ * @deprecated Use `atlaskit/react-ufo/suspense` instead.
15
16
  *
16
- * Named placeholders are especially useful for analyzing page load breakdowns
17
- * in performance monitoring tools like Performance Portal.
17
+ * Provides a placeholder for lazily loaded content (via react-loosely-lazy), improving perceived performance.
18
18
  */
19
19
  function Placeholder(_ref) {
20
20
  var name = _ref.name,
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = void 0;
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _loadHold = _interopRequireDefault(require("../load-hold"));
10
+ var Suspense = function Suspense(_ref) {
11
+ var children = _ref.children,
12
+ fallback = _ref.fallback,
13
+ interactionName = _ref.interactionName;
14
+ return /*#__PURE__*/_react.default.createElement(_react.default.Suspense, {
15
+ fallback: /*#__PURE__*/_react.default.createElement(_loadHold.default, {
16
+ name: interactionName
17
+ }, fallback)
18
+ }, children);
19
+ };
20
+ var _default = exports.default = Suspense;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.default = void 0;
8
+ var _Suspense = _interopRequireDefault(require("./Suspense"));
9
+ var _default = exports.default = _Suspense.default;
@@ -56,7 +56,7 @@ var VCCalculator_FY25_03 = exports.default = /*#__PURE__*/function (_AbstractVCC
56
56
  if (!attributeName || KNOWN_ATTRIBUTES_THAT_DOES_NOT_CAUSE_LAYOUT_SHIFTS.includes(attributeName)) {
57
57
  return false;
58
58
  }
59
- if (attributeName.startsWith('data-test') && (0, _platformFeatureFlags.fg)('platform_ufo_ttvc_exclude_data_test_attribute') || attributeName === 'data-aui-version' || attributeName === 'data-testid' || attributeName === 'data-vc' || attributeName === 'data-ssr-placeholder' || attributeName === 'data-ssr-placeholder-replace' || attributeName === 'data-vc-nvs' || attributeName === 'data-media-vc-wrapper' || (attributeName === 'data-renderer-start-pos' || attributeName === 'data-table-local-id' || attributeName === 'spellcheck') && (0, _platformFeatureFlags.fg)('platform_ufo_ignore_extra_attributes') || attributeName === 'data-auto-scrollable' || attributeName === 'id' || attributeName === 'tabindex' || NON_VISUAL_ARIA_ATTRIBUTES.includes(attributeName)) {
59
+ if (attributeName.startsWith('data-test') && (0, _platformFeatureFlags.fg)('platform_ufo_ttvc_exclude_data_test_attribute') || attributeName === 'data-aui-version' || attributeName === 'data-testid' || attributeName === 'data-vc' || attributeName === 'data-ssr-placeholder' || attributeName === 'data-ssr-placeholder-replace' || attributeName === 'data-vc-nvs' || attributeName === 'data-media-vc-wrapper' || (attributeName === 'data-renderer-start-pos' || attributeName === 'data-table-local-id' || attributeName === 'spellcheck') && (0, _platformFeatureFlags.fg)('platform_ufo_ignore_extra_attributes') || attributeName === 'data-auto-scrollable' || attributeName === 'id' || attributeName === 'tabindex' || attributeName === 'data-is-ttvc-ready' || NON_VISUAL_ARIA_ATTRIBUTES.includes(attributeName)) {
60
60
  return false;
61
61
  }
62
62
  return true;
@@ -1,5 +1,6 @@
1
+ import { fg } from '@atlaskit/platform-feature-flags';
1
2
  let config;
2
- const DEFAULT_TTVC_REVISION = 'fy25.02';
3
+ export const DEFAULT_TTVC_REVISION = 'fy25.03';
3
4
 
4
5
  // Defensively typed, since this is directly user-editable
5
6
  // and they could delete empty members
@@ -172,6 +173,9 @@ export function getPostInteractionRate(name, interactionType) {
172
173
  }
173
174
  }
174
175
  export function getCapabilityRate(capability) {
176
+ if (fg('platform_ufo_remove_deprecated_config_fields')) {
177
+ return 1;
178
+ }
175
179
  try {
176
180
  if (!config) {
177
181
  return 0;
@@ -229,44 +233,6 @@ export function getAwaitBM3TTIList() {
229
233
  }
230
234
  }
231
235
 
232
- // Flag to remove ufo segments prefixes
233
- export function getRemovePageSegmentsUFOPrefixes() {
234
- try {
235
- if (!config) {
236
- return false;
237
- }
238
- const {
239
- removePageSegmentsUFOPrefixes
240
- } = config;
241
- if (removePageSegmentsUFOPrefixes != null) {
242
- return removePageSegmentsUFOPrefixes;
243
- } else {
244
- return false;
245
- }
246
- } catch (e) {
247
- return false;
248
- }
249
- }
250
-
251
- // Flag to remove ufo segments prefixes
252
- export function getRemoveInteractionsUFOPrefixes() {
253
- try {
254
- if (!config) {
255
- return false;
256
- }
257
- const {
258
- removeInteractionsUFOPrefixes
259
- } = config;
260
- if (removeInteractionsUFOPrefixes != null) {
261
- return removeInteractionsUFOPrefixes;
262
- } else {
263
- return false;
264
- }
265
- } catch (e) {
266
- return false;
267
- }
268
- }
269
-
270
236
  // Will ask UFO to override ufoName => experienceKey to the apdex key
271
237
  // This is to cover use cases where one rUFO route is split into multiple BM3 keys (1:N)
272
238
  // This workaround should only be used as last resource,
@@ -166,14 +166,20 @@ function getPPSMetrics(interaction) {
166
166
  start,
167
167
  stop: interaction.end
168
168
  }) : null;
169
- if (config !== null && config !== void 0 && config.shouldCalculateLighthouseMetricsFromTTAI && PPSMetricsAtTTAI !== null) {
170
- return PPSMetricsAtTTAI;
171
- }
172
- if (PPSMetricsAtTTI !== null) {
173
- return {
174
- ...PPSMetricsAtTTI,
175
- 'metrics@ttai': PPSMetricsAtTTAI
176
- };
169
+ if (fg('platform_ufo_remove_deprecated_config_fields')) {
170
+ if (PPSMetricsAtTTAI !== null) {
171
+ return PPSMetricsAtTTAI;
172
+ }
173
+ } else {
174
+ if (config !== null && config !== void 0 && config.shouldCalculateLighthouseMetricsFromTTAI && PPSMetricsAtTTAI !== null) {
175
+ return PPSMetricsAtTTAI;
176
+ }
177
+ if (PPSMetricsAtTTI !== null) {
178
+ return {
179
+ ...PPSMetricsAtTTI,
180
+ 'metrics@ttai': PPSMetricsAtTTAI
181
+ };
182
+ }
177
183
  }
178
184
  return {};
179
185
  }
@@ -595,7 +601,7 @@ async function createInteractionMetricsPayload(interaction, interactionId, exper
595
601
  } = interaction;
596
602
  const pageVisibilityAtTTI = getPageVisibilityUpToTTI(interaction);
597
603
  const pageVisibilityAtTTAI = getPageVisibilityUpToTTAI(interaction);
598
- const segments = config.killswitchNestedSegments ? [] : knownSegments;
604
+ const segments = !fg('platform_ufo_remove_deprecated_config_fields') && config.killswitchNestedSegments ? [] : knownSegments;
599
605
  const segmentTree = getReactUFOPayloadVersion(interaction.type) === '2.0.0' ? buildSegmentTree(segments.map(segment => segment.labelStack)) : {};
600
606
  const isDetailedPayload = pageVisibilityAtTTAI === 'visible';
601
607
  const isPageLoad = type === 'page_load';
@@ -19,7 +19,7 @@ function getLateMutations(vcDetails, lastInteractionFinish, postInteractionFinis
19
19
  result.push({
20
20
  time: details.t,
21
21
  element,
22
- viewportHeatmapPercentage: postInteractionFinishVCRatios[element] || 0
22
+ viewportHeatmapPercentage: (postInteractionFinishVCRatios === null || postInteractionFinishVCRatios === void 0 ? void 0 : postInteractionFinishVCRatios[element]) || 0
23
23
  });
24
24
  }
25
25
  }
@@ -1,6 +1,6 @@
1
1
  import { fg } from '@atlaskit/platform-feature-flags';
2
2
  import coinflip from '../coinflip';
3
- import { getConfig, getMostRecentVCRevision, getPostInteractionRate } from '../config';
3
+ import { DEFAULT_TTVC_REVISION, getConfig, getMostRecentVCRevision, getPostInteractionRate } from '../config';
4
4
  import { isSegmentLabel, sanitizeUfoName } from '../create-payload/common/utils';
5
5
  import { getReactUFOPayloadVersion } from '../create-payload/utils/get-react-ufo-payload-version';
6
6
  import { getPageVisibilityState } from '../hidden-timing';
@@ -139,7 +139,7 @@ function createPostInteractionLogPayload({
139
139
  const lastInteractionFinishStart = Math.round(lastInteractionFinish.start);
140
140
  const lastInteractionFinishEnd = Math.round(lastInteractionFinish.end);
141
141
  const lastInteractionFinishTTAI = Math.round(lastInteractionFinish.end - lastInteractionFinish.start);
142
- const mostRecentVCRevision = fg('platform_ufo_post_interaction_most_recent_vc_rev') ? getMostRecentVCRevision(lastInteractionFinish.ufoName) : 'fy25.02';
142
+ const mostRecentVCRevision = fg('platform_ufo_post_interaction_most_recent_vc_rev') ? getMostRecentVCRevision(lastInteractionFinish.ufoName) : DEFAULT_TTVC_REVISION;
143
143
  let lastInteractionFinishVC90 = null;
144
144
  let lastInteractionFinishVCClean = false;
145
145
  const lastInteractionFinishVCRev = lastInteractionFinishVCResult === null || lastInteractionFinishVCResult === void 0 ? void 0 : lastInteractionFinishVCResult['ufo:vc:rev'];
@@ -161,7 +161,7 @@ function createPostInteractionLogPayload({
161
161
  }) => revision === mostRecentVCRevision);
162
162
  if (postInteractionFinishRevision !== null && postInteractionFinishRevision !== void 0 && postInteractionFinishRevision.clean) {
163
163
  postInteractionFinishVCClean = true;
164
- postInteractionFinishVCRatios = postInteractionFinishVCResult === null || postInteractionFinishVCResult === void 0 ? void 0 : postInteractionFinishVCResult['ufo:vc:ratios'];
164
+ postInteractionFinishVCRatios = postInteractionFinishRevision.ratios;
165
165
  if (typeof lastInteractionFinishVC90 === 'number') {
166
166
  var _postInteractionFinis;
167
167
  revisedVC90 = (_postInteractionFinis = postInteractionFinishRevision['metric:vc90']) !== null && _postInteractionFinis !== void 0 ? _postInteractionFinis : null;
@@ -111,7 +111,6 @@ export default class PostInteractionLog {
111
111
  this.sinkHandlerFn({
112
112
  lastInteractionFinish: this.lastInteractionFinish,
113
113
  reactProfilerTimings: this.reactProfilerTimings,
114
- // NOTE: invoking `getVCResult` at latest possible point in time here (not earlier) to get the most accurate result (from performance.now())
115
114
  postInteractionFinishVCResult,
116
115
  lastInteractionFinishVCResult: this.lastInteractionFinishVCResult
117
116
  });
@@ -3,10 +3,10 @@ import UFOLoadHold from '../load-hold';
3
3
  import { LazySuspense, WaitContext } from './loosely-lazy';
4
4
 
5
5
  /**
6
- * Provides a placeholder for lazily loaded content, improving perceived performance.
6
+ * @private
7
+ * @deprecated Use `atlaskit/react-ufo/suspense` instead.
7
8
  *
8
- * Named placeholders are especially useful for analyzing page load breakdowns
9
- * in performance monitoring tools like Performance Portal.
9
+ * Provides a placeholder for lazily loaded content (via react-loosely-lazy), improving perceived performance.
10
10
  */
11
11
  export default function Placeholder({
12
12
  name,
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import UFOLoadHold from '../load-hold';
3
+ const Suspense = ({
4
+ children,
5
+ fallback,
6
+ interactionName
7
+ }) => {
8
+ return /*#__PURE__*/React.createElement(React.Suspense, {
9
+ fallback: /*#__PURE__*/React.createElement(UFOLoadHold, {
10
+ name: interactionName
11
+ }, fallback)
12
+ }, children);
13
+ };
14
+ export default Suspense;
@@ -0,0 +1,2 @@
1
+ import Suspense from './Suspense';
2
+ export default Suspense;
@@ -38,7 +38,7 @@ export default class VCCalculator_FY25_03 extends AbstractVCCalculatorBase {
38
38
  if (!attributeName || KNOWN_ATTRIBUTES_THAT_DOES_NOT_CAUSE_LAYOUT_SHIFTS.includes(attributeName)) {
39
39
  return false;
40
40
  }
41
- if (attributeName.startsWith('data-test') && fg('platform_ufo_ttvc_exclude_data_test_attribute') || attributeName === 'data-aui-version' || attributeName === 'data-testid' || attributeName === 'data-vc' || attributeName === 'data-ssr-placeholder' || attributeName === 'data-ssr-placeholder-replace' || attributeName === 'data-vc-nvs' || attributeName === 'data-media-vc-wrapper' || (attributeName === 'data-renderer-start-pos' || attributeName === 'data-table-local-id' || attributeName === 'spellcheck') && fg('platform_ufo_ignore_extra_attributes') || attributeName === 'data-auto-scrollable' || attributeName === 'id' || attributeName === 'tabindex' || NON_VISUAL_ARIA_ATTRIBUTES.includes(attributeName)) {
41
+ if (attributeName.startsWith('data-test') && fg('platform_ufo_ttvc_exclude_data_test_attribute') || attributeName === 'data-aui-version' || attributeName === 'data-testid' || attributeName === 'data-vc' || attributeName === 'data-ssr-placeholder' || attributeName === 'data-ssr-placeholder-replace' || attributeName === 'data-vc-nvs' || attributeName === 'data-media-vc-wrapper' || (attributeName === 'data-renderer-start-pos' || attributeName === 'data-table-local-id' || attributeName === 'spellcheck') && fg('platform_ufo_ignore_extra_attributes') || attributeName === 'data-auto-scrollable' || attributeName === 'id' || attributeName === 'tabindex' || attributeName === 'data-is-ttvc-ready' || NON_VISUAL_ARIA_ATTRIBUTES.includes(attributeName)) {
42
42
  return false;
43
43
  }
44
44
  return true;
@@ -3,8 +3,9 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import _typeof from "@babel/runtime/helpers/typeof";
4
4
  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; }
5
5
  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; }
6
+ import { fg } from '@atlaskit/platform-feature-flags';
6
7
  var config;
7
- var DEFAULT_TTVC_REVISION = 'fy25.02';
8
+ export var DEFAULT_TTVC_REVISION = 'fy25.03';
8
9
 
9
10
  // Defensively typed, since this is directly user-editable
10
11
  // and they could delete empty members
@@ -168,6 +169,9 @@ export function getPostInteractionRate(name, interactionType) {
168
169
  }
169
170
  }
170
171
  export function getCapabilityRate(capability) {
172
+ if (fg('platform_ufo_remove_deprecated_config_fields')) {
173
+ return 1;
174
+ }
171
175
  try {
172
176
  if (!config) {
173
177
  return 0;
@@ -224,42 +228,6 @@ export function getAwaitBM3TTIList() {
224
228
  }
225
229
  }
226
230
 
227
- // Flag to remove ufo segments prefixes
228
- export function getRemovePageSegmentsUFOPrefixes() {
229
- try {
230
- if (!config) {
231
- return false;
232
- }
233
- var _config7 = config,
234
- removePageSegmentsUFOPrefixes = _config7.removePageSegmentsUFOPrefixes;
235
- if (removePageSegmentsUFOPrefixes != null) {
236
- return removePageSegmentsUFOPrefixes;
237
- } else {
238
- return false;
239
- }
240
- } catch (e) {
241
- return false;
242
- }
243
- }
244
-
245
- // Flag to remove ufo segments prefixes
246
- export function getRemoveInteractionsUFOPrefixes() {
247
- try {
248
- if (!config) {
249
- return false;
250
- }
251
- var _config8 = config,
252
- removeInteractionsUFOPrefixes = _config8.removeInteractionsUFOPrefixes;
253
- if (removeInteractionsUFOPrefixes != null) {
254
- return removeInteractionsUFOPrefixes;
255
- } else {
256
- return false;
257
- }
258
- } catch (e) {
259
- return false;
260
- }
261
- }
262
-
263
231
  // Will ask UFO to override ufoName => experienceKey to the apdex key
264
232
  // This is to cover use cases where one rUFO route is split into multiple BM3 keys (1:N)
265
233
  // This workaround should only be used as last resource,
@@ -269,8 +237,8 @@ export function getUfoNameOverrides() {
269
237
  if (!config) {
270
238
  return undefined;
271
239
  }
272
- var _config9 = config,
273
- ufoNameOverrides = _config9.ufoNameOverrides;
240
+ var _config7 = config,
241
+ ufoNameOverrides = _config7.ufoNameOverrides;
274
242
  if (ufoNameOverrides != null) {
275
243
  return ufoNameOverrides;
276
244
  }
@@ -286,8 +254,8 @@ export function getDoNotAbortActivePressInteraction() {
286
254
  if (!config) {
287
255
  return undefined;
288
256
  }
289
- var _config0 = config,
290
- doNotAbortActivePressInteraction = _config0.doNotAbortActivePressInteraction;
257
+ var _config8 = config,
258
+ doNotAbortActivePressInteraction = _config8.doNotAbortActivePressInteraction;
291
259
  return doNotAbortActivePressInteraction;
292
260
  } catch (e) {
293
261
  return undefined;
@@ -300,8 +268,8 @@ export function getDoNotAbortActivePressInteractionOnTransition() {
300
268
  if (!config) {
301
269
  return undefined;
302
270
  }
303
- var _config1 = config,
304
- doNotAbortActivePressInteractionOnTransition = _config1.doNotAbortActivePressInteractionOnTransition;
271
+ var _config9 = config,
272
+ doNotAbortActivePressInteractionOnTransition = _config9.doNotAbortActivePressInteractionOnTransition;
305
273
  return doNotAbortActivePressInteractionOnTransition;
306
274
  } catch (e) {
307
275
  return undefined;
@@ -313,8 +281,8 @@ export function getInteractionTimeout(ufoName) {
313
281
  if (!config) {
314
282
  return CLEANUP_TIMEOUT;
315
283
  }
316
- var _config10 = config,
317
- interactionTimeout = _config10.interactionTimeout;
284
+ var _config0 = config,
285
+ interactionTimeout = _config0.interactionTimeout;
318
286
  if (interactionTimeout != null && interactionTimeout[ufoName] != null) {
319
287
  return interactionTimeout[ufoName];
320
288
  }
@@ -175,13 +175,19 @@ function getPPSMetrics(interaction) {
175
175
  start: start,
176
176
  stop: interaction.end
177
177
  }) : null;
178
- if (config !== null && config !== void 0 && config.shouldCalculateLighthouseMetricsFromTTAI && PPSMetricsAtTTAI !== null) {
179
- return PPSMetricsAtTTAI;
180
- }
181
- if (PPSMetricsAtTTI !== null) {
182
- return _objectSpread(_objectSpread({}, PPSMetricsAtTTI), {}, {
183
- 'metrics@ttai': PPSMetricsAtTTAI
184
- });
178
+ if (fg('platform_ufo_remove_deprecated_config_fields')) {
179
+ if (PPSMetricsAtTTAI !== null) {
180
+ return PPSMetricsAtTTAI;
181
+ }
182
+ } else {
183
+ if (config !== null && config !== void 0 && config.shouldCalculateLighthouseMetricsFromTTAI && PPSMetricsAtTTAI !== null) {
184
+ return PPSMetricsAtTTAI;
185
+ }
186
+ if (PPSMetricsAtTTI !== null) {
187
+ return _objectSpread(_objectSpread({}, PPSMetricsAtTTI), {}, {
188
+ 'metrics@ttai': PPSMetricsAtTTAI
189
+ });
190
+ }
185
191
  }
186
192
  return {};
187
193
  }
@@ -584,7 +590,7 @@ function _createInteractionMetricsPayload() {
584
590
  end = interaction.end, start = interaction.start, ufoName = interaction.ufoName, knownSegments = interaction.knownSegments, rate = interaction.rate, type = interaction.type, abortReason = interaction.abortReason, routeName = interaction.routeName, featureFlags = interaction.featureFlags, previousInteractionName = interaction.previousInteractionName, isPreviousInteractionAborted = interaction.isPreviousInteractionAborted, abortedByInteractionName = interaction.abortedByInteractionName, responsiveness = interaction.responsiveness, unknownElementName = interaction.unknownElementName, unknownElementHierarchy = interaction.unknownElementHierarchy;
585
591
  pageVisibilityAtTTI = getPageVisibilityUpToTTI(interaction);
586
592
  pageVisibilityAtTTAI = getPageVisibilityUpToTTAI(interaction);
587
- segments = config.killswitchNestedSegments ? [] : knownSegments;
593
+ segments = !fg('platform_ufo_remove_deprecated_config_fields') && config.killswitchNestedSegments ? [] : knownSegments;
588
594
  segmentTree = getReactUFOPayloadVersion(interaction.type) === '2.0.0' ? buildSegmentTree(segments.map(function (segment) {
589
595
  return segment.labelStack;
590
596
  })) : {};
@@ -26,7 +26,7 @@ function getLateMutations(vcDetails, lastInteractionFinish, postInteractionFinis
26
26
  result.push({
27
27
  time: details.t,
28
28
  element: element,
29
- viewportHeatmapPercentage: postInteractionFinishVCRatios[element] || 0
29
+ viewportHeatmapPercentage: (postInteractionFinishVCRatios === null || postInteractionFinishVCRatios === void 0 ? void 0 : postInteractionFinishVCRatios[element]) || 0
30
30
  });
31
31
  }
32
32
  } catch (err) {
@@ -4,7 +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 { fg } from '@atlaskit/platform-feature-flags';
6
6
  import coinflip from '../coinflip';
7
- import { getConfig, getMostRecentVCRevision, getPostInteractionRate } from '../config';
7
+ import { DEFAULT_TTVC_REVISION, getConfig, getMostRecentVCRevision, getPostInteractionRate } from '../config';
8
8
  import { isSegmentLabel, sanitizeUfoName } from '../create-payload/common/utils';
9
9
  import { getReactUFOPayloadVersion } from '../create-payload/utils/get-react-ufo-payload-version';
10
10
  import { getPageVisibilityState } from '../hidden-timing';
@@ -147,7 +147,7 @@ function createPostInteractionLogPayload(_ref2) {
147
147
  var lastInteractionFinishStart = Math.round(lastInteractionFinish.start);
148
148
  var lastInteractionFinishEnd = Math.round(lastInteractionFinish.end);
149
149
  var lastInteractionFinishTTAI = Math.round(lastInteractionFinish.end - lastInteractionFinish.start);
150
- var mostRecentVCRevision = fg('platform_ufo_post_interaction_most_recent_vc_rev') ? getMostRecentVCRevision(lastInteractionFinish.ufoName) : 'fy25.02';
150
+ var mostRecentVCRevision = fg('platform_ufo_post_interaction_most_recent_vc_rev') ? getMostRecentVCRevision(lastInteractionFinish.ufoName) : DEFAULT_TTVC_REVISION;
151
151
  var lastInteractionFinishVC90 = null;
152
152
  var lastInteractionFinishVCClean = false;
153
153
  var lastInteractionFinishVCRev = lastInteractionFinishVCResult === null || lastInteractionFinishVCResult === void 0 ? void 0 : lastInteractionFinishVCResult['ufo:vc:rev'];
@@ -171,7 +171,7 @@ function createPostInteractionLogPayload(_ref2) {
171
171
  });
172
172
  if (postInteractionFinishRevision !== null && postInteractionFinishRevision !== void 0 && postInteractionFinishRevision.clean) {
173
173
  postInteractionFinishVCClean = true;
174
- postInteractionFinishVCRatios = postInteractionFinishVCResult === null || postInteractionFinishVCResult === void 0 ? void 0 : postInteractionFinishVCResult['ufo:vc:ratios'];
174
+ postInteractionFinishVCRatios = postInteractionFinishRevision.ratios;
175
175
  if (typeof lastInteractionFinishVC90 === 'number') {
176
176
  var _postInteractionFinis;
177
177
  revisedVC90 = (_postInteractionFinis = postInteractionFinishRevision['metric:vc90']) !== null && _postInteractionFinis !== void 0 ? _postInteractionFinis : null;
@@ -141,7 +141,6 @@ var PostInteractionLog = /*#__PURE__*/function () {
141
141
  this.sinkHandlerFn({
142
142
  lastInteractionFinish: this.lastInteractionFinish,
143
143
  reactProfilerTimings: this.reactProfilerTimings,
144
- // NOTE: invoking `getVCResult` at latest possible point in time here (not earlier) to get the most accurate result (from performance.now())
145
144
  postInteractionFinishVCResult: postInteractionFinishVCResult,
146
145
  lastInteractionFinishVCResult: this.lastInteractionFinishVCResult
147
146
  });
@@ -3,10 +3,10 @@ import UFOLoadHold from '../load-hold';
3
3
  import { LazySuspense, WaitContext } from './loosely-lazy';
4
4
 
5
5
  /**
6
- * Provides a placeholder for lazily loaded content, improving perceived performance.
6
+ * @private
7
+ * @deprecated Use `atlaskit/react-ufo/suspense` instead.
7
8
  *
8
- * Named placeholders are especially useful for analyzing page load breakdowns
9
- * in performance monitoring tools like Performance Portal.
9
+ * Provides a placeholder for lazily loaded content (via react-loosely-lazy), improving perceived performance.
10
10
  */
11
11
  export default function Placeholder(_ref) {
12
12
  var name = _ref.name,
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import UFOLoadHold from '../load-hold';
3
+ var Suspense = function Suspense(_ref) {
4
+ var children = _ref.children,
5
+ fallback = _ref.fallback,
6
+ interactionName = _ref.interactionName;
7
+ return /*#__PURE__*/React.createElement(React.Suspense, {
8
+ fallback: /*#__PURE__*/React.createElement(UFOLoadHold, {
9
+ name: interactionName
10
+ }, fallback)
11
+ }, children);
12
+ };
13
+ export default Suspense;
@@ -0,0 +1,2 @@
1
+ import Suspense from './Suspense';
2
+ export default Suspense;
@@ -49,7 +49,7 @@ var VCCalculator_FY25_03 = /*#__PURE__*/function (_AbstractVCCalculator) {
49
49
  if (!attributeName || KNOWN_ATTRIBUTES_THAT_DOES_NOT_CAUSE_LAYOUT_SHIFTS.includes(attributeName)) {
50
50
  return false;
51
51
  }
52
- if (attributeName.startsWith('data-test') && fg('platform_ufo_ttvc_exclude_data_test_attribute') || attributeName === 'data-aui-version' || attributeName === 'data-testid' || attributeName === 'data-vc' || attributeName === 'data-ssr-placeholder' || attributeName === 'data-ssr-placeholder-replace' || attributeName === 'data-vc-nvs' || attributeName === 'data-media-vc-wrapper' || (attributeName === 'data-renderer-start-pos' || attributeName === 'data-table-local-id' || attributeName === 'spellcheck') && fg('platform_ufo_ignore_extra_attributes') || attributeName === 'data-auto-scrollable' || attributeName === 'id' || attributeName === 'tabindex' || NON_VISUAL_ARIA_ATTRIBUTES.includes(attributeName)) {
52
+ if (attributeName.startsWith('data-test') && fg('platform_ufo_ttvc_exclude_data_test_attribute') || attributeName === 'data-aui-version' || attributeName === 'data-testid' || attributeName === 'data-vc' || attributeName === 'data-ssr-placeholder' || attributeName === 'data-ssr-placeholder-replace' || attributeName === 'data-vc-nvs' || attributeName === 'data-media-vc-wrapper' || (attributeName === 'data-renderer-start-pos' || attributeName === 'data-table-local-id' || attributeName === 'spellcheck') && fg('platform_ufo_ignore_extra_attributes') || attributeName === 'data-auto-scrollable' || attributeName === 'id' || attributeName === 'tabindex' || attributeName === 'data-is-ttvc-ready' || NON_VISUAL_ARIA_ATTRIBUTES.includes(attributeName)) {
53
53
  return false;
54
54
  }
55
55
  return true;
@@ -7,7 +7,7 @@ export type AssetsConfigPreloadedArgs = {
7
7
  SSRDoneTime?: number;
8
8
  };
9
9
  export type AssetsConfig = {
10
- allowedTypes: string[];
10
+ allowedTypes?: string[];
11
11
  classification: {
12
12
  all: boolean;
13
13
  allAtlassian: (args: AssetsConfigAllAtlassianArgs) => boolean;
@@ -1,4 +1,4 @@
1
- import type { AssetsClassification, InteractionMetrics, InteractionType } from '../common';
1
+ import type { AssetsConfig, InteractionMetrics, InteractionType } from '../common';
2
2
  export interface AdditionalData {
3
3
  [key: string]: null | string | number | boolean | undefined | AdditionalData | Record<string, AdditionalData> | Array<AdditionalData>;
4
4
  }
@@ -27,7 +27,8 @@ type SelectorConfig = {
27
27
  type Rates = {
28
28
  readonly [key: string]: number;
29
29
  };
30
- type TTVCRevisions = 'fy25.01' | 'fy25.02' | 'fy25.03';
30
+ export type TTVCRevisions = 'fy25.01' | 'fy25.02' | 'fy25.03';
31
+ export declare const DEFAULT_TTVC_REVISION = "fy25.03";
31
32
  export type Config = {
32
33
  readonly enabled?: boolean;
33
34
  readonly interactionTimeout?: Record<string, number>;
@@ -43,15 +44,21 @@ export type Config = {
43
44
  readonly rate?: number;
44
45
  }[];
45
46
  readonly killswitch?: readonly string[];
47
+ /**
48
+ * @private
49
+ * @deprecated - remove on FG cleanup of platform_ufo_remove_deprecated_config_fields
50
+ */
46
51
  readonly killswitchNestedSegments?: boolean;
47
52
  readonly typingMethod?: string;
53
+ /**
54
+ * @private
55
+ * @deprecated - remove on FG cleanup of platform_ufo_remove_deprecated_config_fields
56
+ */
48
57
  readonly capability?: Record<Capability, number>;
49
58
  readonly kind?: Record<InteractionKind, number>;
50
59
  readonly allowedResources?: Array<ResourceType>;
51
60
  readonly allowedResourcesParams?: Array<string>;
52
61
  readonly autoGeneratedRate?: number;
53
- readonly removePageSegmentsUFOPrefixes?: boolean;
54
- readonly removeInteractionsUFOPrefixes?: boolean;
55
62
  readonly product: string;
56
63
  readonly region: string;
57
64
  readonly additionalPayloadData?: (interaction: InteractionMetrics) => AdditionalData;
@@ -59,12 +66,7 @@ export type Config = {
59
66
  readonly getSSRTimings?: () => SSRTiming[];
60
67
  readonly getSSRDoneTime?: () => number | undefined;
61
68
  };
62
- /**
63
- * @private
64
- * @deprecated remove me with next major release
65
- */
66
- readonly assetsClassification?: AssetsClassification;
67
- readonly assetsConfig?: AssetsClassification;
69
+ readonly assetsConfig?: AssetsConfig;
68
70
  readonly enableBetterPageVisibilityApi?: boolean;
69
71
  readonly vc?: {
70
72
  readonly enabled?: boolean;
@@ -106,14 +108,13 @@ export type Config = {
106
108
  };
107
109
  readonly enableSegmentHighlighting?: boolean;
108
110
  readonly enableAdditionalPerformanceMarks?: boolean;
109
- readonly shouldCalculateLighthouseMetricsFromTTAI?: boolean;
110
- readonly timeWindowForLateMutationsInMilliseconds?: number;
111
- readonly manuallyTrackReactProfilerMounts?: boolean;
112
111
  /**
113
112
  * @private
114
- * @deprecated setting this will do nothing now
113
+ * @deprecated - remove on FG cleanup of platform_ufo_remove_deprecated_config_fields
115
114
  */
116
- readonly enableCompleteUsingDoubleRAF?: boolean;
115
+ readonly shouldCalculateLighthouseMetricsFromTTAI?: boolean;
116
+ readonly timeWindowForLateMutationsInMilliseconds?: number;
117
+ readonly manuallyTrackReactProfilerMounts?: boolean;
117
118
  };
118
119
  export declare function setUFOConfig(newConfig: Config): void;
119
120
  export declare function getConfig(): Config | undefined;
@@ -128,8 +129,6 @@ declare const validTypingMethods: readonly ["timeout", "timeoutNoAlloc", "mutati
128
129
  type ValidTypingMethod = (typeof validTypingMethods)[number];
129
130
  export declare function getTypingPerformanceTracingMethod(): ValidTypingMethod;
130
131
  export declare function getAwaitBM3TTIList(): string[];
131
- export declare function getRemovePageSegmentsUFOPrefixes(): boolean;
132
- export declare function getRemoveInteractionsUFOPrefixes(): boolean;
133
132
  export declare function getUfoNameOverrides(): UFONameOverride | undefined;
134
133
  export declare function getDoNotAbortActivePressInteraction(): string[] | undefined;
135
134
  export declare function getDoNotAbortActivePressInteractionOnTransition(): string[] | undefined;
@@ -1,5 +1,5 @@
1
1
  import type { LastInteractionFinishInfo } from '../common';
2
2
  import type { LateMutation } from '../common/react-ufo-payload-schema';
3
3
  import type { RevisionPayloadVCDetails } from '../common/vc/types';
4
- declare function getLateMutations(vcDetails: RevisionPayloadVCDetails, lastInteractionFinish: LastInteractionFinishInfo, postInteractionFinishVCRatios: Record<string, number>): LateMutation[];
4
+ declare function getLateMutations(vcDetails: RevisionPayloadVCDetails, lastInteractionFinish: LastInteractionFinishInfo, postInteractionFinishVCRatios?: Record<string, number>): LateMutation[];
5
5
  export default getLateMutations;
@@ -1,10 +1,10 @@
1
1
  import React from 'react';
2
2
  import { type LazySuspenseProps } from './loosely-lazy';
3
3
  /**
4
- * Provides a placeholder for lazily loaded content, improving perceived performance.
4
+ * @private
5
+ * @deprecated Use `atlaskit/react-ufo/suspense` instead.
5
6
  *
6
- * Named placeholders are especially useful for analyzing page load breakdowns
7
- * in performance monitoring tools like Performance Portal.
7
+ * Provides a placeholder for lazily loaded content (via react-loosely-lazy), improving perceived performance.
8
8
  */
9
9
  export default function Placeholder({ name, children, fallback, }: {
10
10
  name: string;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ declare const Suspense: ({ children, fallback, interactionName, }: {
3
+ children: React.ReactNode;
4
+ fallback: React.ReactNode;
5
+ interactionName: string;
6
+ }) => React.JSX.Element;
7
+ export default Suspense;
@@ -0,0 +1,2 @@
1
+ import Suspense from './Suspense';
2
+ export default Suspense;
@@ -7,7 +7,7 @@ export type AssetsConfigPreloadedArgs = {
7
7
  SSRDoneTime?: number;
8
8
  };
9
9
  export type AssetsConfig = {
10
- allowedTypes: string[];
10
+ allowedTypes?: string[];
11
11
  classification: {
12
12
  all: boolean;
13
13
  allAtlassian: (args: AssetsConfigAllAtlassianArgs) => boolean;
@@ -1,4 +1,4 @@
1
- import type { AssetsClassification, InteractionMetrics, InteractionType } from '../common';
1
+ import type { AssetsConfig, InteractionMetrics, InteractionType } from '../common';
2
2
  export interface AdditionalData {
3
3
  [key: string]: null | string | number | boolean | undefined | AdditionalData | Record<string, AdditionalData> | Array<AdditionalData>;
4
4
  }
@@ -27,7 +27,8 @@ type SelectorConfig = {
27
27
  type Rates = {
28
28
  readonly [key: string]: number;
29
29
  };
30
- type TTVCRevisions = 'fy25.01' | 'fy25.02' | 'fy25.03';
30
+ export type TTVCRevisions = 'fy25.01' | 'fy25.02' | 'fy25.03';
31
+ export declare const DEFAULT_TTVC_REVISION = "fy25.03";
31
32
  export type Config = {
32
33
  readonly enabled?: boolean;
33
34
  readonly interactionTimeout?: Record<string, number>;
@@ -43,15 +44,21 @@ export type Config = {
43
44
  readonly rate?: number;
44
45
  }[];
45
46
  readonly killswitch?: readonly string[];
47
+ /**
48
+ * @private
49
+ * @deprecated - remove on FG cleanup of platform_ufo_remove_deprecated_config_fields
50
+ */
46
51
  readonly killswitchNestedSegments?: boolean;
47
52
  readonly typingMethod?: string;
53
+ /**
54
+ * @private
55
+ * @deprecated - remove on FG cleanup of platform_ufo_remove_deprecated_config_fields
56
+ */
48
57
  readonly capability?: Record<Capability, number>;
49
58
  readonly kind?: Record<InteractionKind, number>;
50
59
  readonly allowedResources?: Array<ResourceType>;
51
60
  readonly allowedResourcesParams?: Array<string>;
52
61
  readonly autoGeneratedRate?: number;
53
- readonly removePageSegmentsUFOPrefixes?: boolean;
54
- readonly removeInteractionsUFOPrefixes?: boolean;
55
62
  readonly product: string;
56
63
  readonly region: string;
57
64
  readonly additionalPayloadData?: (interaction: InteractionMetrics) => AdditionalData;
@@ -59,12 +66,7 @@ export type Config = {
59
66
  readonly getSSRTimings?: () => SSRTiming[];
60
67
  readonly getSSRDoneTime?: () => number | undefined;
61
68
  };
62
- /**
63
- * @private
64
- * @deprecated remove me with next major release
65
- */
66
- readonly assetsClassification?: AssetsClassification;
67
- readonly assetsConfig?: AssetsClassification;
69
+ readonly assetsConfig?: AssetsConfig;
68
70
  readonly enableBetterPageVisibilityApi?: boolean;
69
71
  readonly vc?: {
70
72
  readonly enabled?: boolean;
@@ -106,14 +108,13 @@ export type Config = {
106
108
  };
107
109
  readonly enableSegmentHighlighting?: boolean;
108
110
  readonly enableAdditionalPerformanceMarks?: boolean;
109
- readonly shouldCalculateLighthouseMetricsFromTTAI?: boolean;
110
- readonly timeWindowForLateMutationsInMilliseconds?: number;
111
- readonly manuallyTrackReactProfilerMounts?: boolean;
112
111
  /**
113
112
  * @private
114
- * @deprecated setting this will do nothing now
113
+ * @deprecated - remove on FG cleanup of platform_ufo_remove_deprecated_config_fields
115
114
  */
116
- readonly enableCompleteUsingDoubleRAF?: boolean;
115
+ readonly shouldCalculateLighthouseMetricsFromTTAI?: boolean;
116
+ readonly timeWindowForLateMutationsInMilliseconds?: number;
117
+ readonly manuallyTrackReactProfilerMounts?: boolean;
117
118
  };
118
119
  export declare function setUFOConfig(newConfig: Config): void;
119
120
  export declare function getConfig(): Config | undefined;
@@ -132,8 +133,6 @@ declare const validTypingMethods: readonly [
132
133
  type ValidTypingMethod = (typeof validTypingMethods)[number];
133
134
  export declare function getTypingPerformanceTracingMethod(): ValidTypingMethod;
134
135
  export declare function getAwaitBM3TTIList(): string[];
135
- export declare function getRemovePageSegmentsUFOPrefixes(): boolean;
136
- export declare function getRemoveInteractionsUFOPrefixes(): boolean;
137
136
  export declare function getUfoNameOverrides(): UFONameOverride | undefined;
138
137
  export declare function getDoNotAbortActivePressInteraction(): string[] | undefined;
139
138
  export declare function getDoNotAbortActivePressInteractionOnTransition(): string[] | undefined;
@@ -1,5 +1,5 @@
1
1
  import type { LastInteractionFinishInfo } from '../common';
2
2
  import type { LateMutation } from '../common/react-ufo-payload-schema';
3
3
  import type { RevisionPayloadVCDetails } from '../common/vc/types';
4
- declare function getLateMutations(vcDetails: RevisionPayloadVCDetails, lastInteractionFinish: LastInteractionFinishInfo, postInteractionFinishVCRatios: Record<string, number>): LateMutation[];
4
+ declare function getLateMutations(vcDetails: RevisionPayloadVCDetails, lastInteractionFinish: LastInteractionFinishInfo, postInteractionFinishVCRatios?: Record<string, number>): LateMutation[];
5
5
  export default getLateMutations;
@@ -1,10 +1,10 @@
1
1
  import React from 'react';
2
2
  import { type LazySuspenseProps } from './loosely-lazy';
3
3
  /**
4
- * Provides a placeholder for lazily loaded content, improving perceived performance.
4
+ * @private
5
+ * @deprecated Use `atlaskit/react-ufo/suspense` instead.
5
6
  *
6
- * Named placeholders are especially useful for analyzing page load breakdowns
7
- * in performance monitoring tools like Performance Portal.
7
+ * Provides a placeholder for lazily loaded content (via react-loosely-lazy), improving perceived performance.
8
8
  */
9
9
  export default function Placeholder({ name, children, fallback, }: {
10
10
  name: string;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ declare const Suspense: ({ children, fallback, interactionName, }: {
3
+ children: React.ReactNode;
4
+ fallback: React.ReactNode;
5
+ interactionName: string;
6
+ }) => React.JSX.Element;
7
+ export default Suspense;
@@ -0,0 +1,2 @@
1
+ import Suspense from './Suspense';
2
+ export default Suspense;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/react-ufo",
3
- "version": "3.14.15",
3
+ "version": "4.0.0",
4
4
  "description": "Parts of React UFO that are publicly available",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -61,6 +61,7 @@
61
61
  "./short-id": "./src/short-id/index.ts",
62
62
  "./ssr": "./src/ssr/index.ts",
63
63
  "./ssr-scripts": "./src/vc/vc-observer/observers/ssr-placeholders/ssr-scripts/index.ts",
64
+ "./suspense": "./src/suspense/index.ts",
64
65
  "./trace-interaction": "./src/trace-interaction/index.ts",
65
66
  "./trace-pageload": "./src/trace-pageload/index.ts",
66
67
  "./trace-press": "./src/trace-press/index.ts",
@@ -142,6 +143,9 @@
142
143
  "ufo_return_relative_request_start": {
143
144
  "type": "boolean"
144
145
  },
146
+ "platform_ufo_remove_deprecated_config_fields": {
147
+ "type": "boolean"
148
+ },
145
149
  "platform_ufo_ttvc_exclude_data_test_attribute": {
146
150
  "type": "boolean"
147
151
  },
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "@atlaskit/react-ufo/suspense",
3
+ "main": "../dist/cjs/suspense/index.js",
4
+ "module": "../dist/esm/suspense/index.js",
5
+ "module:es2019": "../dist/es2019/suspense/index.js",
6
+ "sideEffects": false,
7
+ "types": "../dist/types/suspense/index.d.ts",
8
+ "typesVersions": {
9
+ ">=4.5 <5.4": {
10
+ "*": [
11
+ "../dist/types-ts4.5/suspense/index.d.ts"
12
+ ]
13
+ }
14
+ }
15
+ }