@atlaskit/react-ufo 4.7.5 → 4.8.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 (33) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/cjs/create-interaction-extra-metrics-payload/index.js +1 -1
  3. package/dist/cjs/vc/index.js +1 -1
  4. package/dist/cjs/vc/vc-observer-new/index.js +25 -2
  5. package/dist/cjs/vc/vc-observer-new/metric-calculator/abstract-base-vc-calculator.js +10 -7
  6. package/dist/cjs/vc/vc-observer-new/metric-calculator/fy25_03/index.js +2 -2
  7. package/dist/cjs/vc/vc-observer-new/metric-calculator/vcnext/index.js +41 -0
  8. package/dist/cjs/vc/vc-observer-new/viewport-observer/index.js +46 -26
  9. package/dist/es2019/create-interaction-extra-metrics-payload/index.js +1 -1
  10. package/dist/es2019/vc/index.js +1 -1
  11. package/dist/es2019/vc/vc-observer-new/index.js +17 -0
  12. package/dist/es2019/vc/vc-observer-new/metric-calculator/abstract-base-vc-calculator.js +12 -8
  13. package/dist/es2019/vc/vc-observer-new/metric-calculator/fy25_03/index.js +2 -2
  14. package/dist/es2019/vc/vc-observer-new/metric-calculator/vcnext/index.js +21 -0
  15. package/dist/es2019/vc/vc-observer-new/viewport-observer/index.js +29 -14
  16. package/dist/esm/create-interaction-extra-metrics-payload/index.js +1 -1
  17. package/dist/esm/vc/index.js +1 -1
  18. package/dist/esm/vc/vc-observer-new/index.js +25 -2
  19. package/dist/esm/vc/vc-observer-new/metric-calculator/abstract-base-vc-calculator.js +10 -7
  20. package/dist/esm/vc/vc-observer-new/metric-calculator/fy25_03/index.js +2 -2
  21. package/dist/esm/vc/vc-observer-new/metric-calculator/vcnext/index.js +36 -0
  22. package/dist/esm/vc/vc-observer-new/viewport-observer/index.js +46 -26
  23. package/dist/types/config/index.d.ts +1 -1
  24. package/dist/types/create-interaction-extra-metrics-payload/index.d.ts +1 -1
  25. package/dist/types/vc/vc-observer-new/metric-calculator/fy25_03/index.d.ts +1 -1
  26. package/dist/types/vc/vc-observer-new/metric-calculator/vcnext/index.d.ts +6 -0
  27. package/dist/types/vc/vc-observer-new/types.d.ts +1 -1
  28. package/dist/types-ts4.5/config/index.d.ts +1 -1
  29. package/dist/types-ts4.5/create-interaction-extra-metrics-payload/index.d.ts +1 -1
  30. package/dist/types-ts4.5/vc/vc-observer-new/metric-calculator/fy25_03/index.d.ts +1 -1
  31. package/dist/types-ts4.5/vc/vc-observer-new/metric-calculator/vcnext/index.d.ts +6 -0
  32. package/dist/types-ts4.5/vc/vc-observer-new/types.d.ts +1 -1
  33. package/package.json +7 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @atlaskit/ufo-interaction-ignore
2
2
 
3
+ ## 4.8.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`fed39716487e7`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/fed39716487e7) -
8
+ calculate VCNext (TTVC v4) metric behind FG
9
+
10
+ ## 4.7.6
11
+
12
+ ### Patch Changes
13
+
14
+ - [`71df791f80bf5`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/71df791f80bf5) -
15
+ Remove TTVC debug data for post-interaction-log events
16
+
3
17
  ## 4.7.5
4
18
 
5
19
  ### Patch Changes
@@ -79,7 +79,7 @@ function _createInteractionExtraLogPayload() {
79
79
  var revision = _ref.revision;
80
80
  return revision === _config.DEFAULT_TTVC_REVISION;
81
81
  });
82
- if (!(!(effectiveVCRevisionPayload !== null && effectiveVCRevisionPayload !== void 0 && effectiveVCRevisionPayload.clean) || (effectiveVCRevisionPayload === null || effectiveVCRevisionPayload === void 0 ? void 0 : effectiveVCRevisionPayload['metric:vc90']) === undefined)) {
82
+ if (!(!(effectiveVCRevisionPayload !== null && effectiveVCRevisionPayload !== void 0 && effectiveVCRevisionPayload.clean) || (effectiveVCRevisionPayload === null || effectiveVCRevisionPayload === void 0 ? void 0 : effectiveVCRevisionPayload['metric:vc90']) === undefined || typeof (effectiveVCRevisionPayload === null || effectiveVCRevisionPayload === void 0 ? void 0 : effectiveVCRevisionPayload['metric:vc90']) !== 'number' || extraTTAI === undefined || typeof extraTTAI !== 'number' || interaction.errors.length > 0)) {
83
83
  _context.next = 23;
84
84
  break;
85
85
  }
@@ -35,7 +35,7 @@ var VCObserverWrapper = exports.VCObserverWrapper = /*#__PURE__*/function () {
35
35
  this.ssrPlaceholderHandler = new _ssrPlaceholders.SSRPlaceholderHandlers({
36
36
  enablePageLayoutPlaceholder: (_opts$ssrEnablePageLa = opts.ssrEnablePageLayoutPlaceholder) !== null && _opts$ssrEnablePageLa !== void 0 ? _opts$ssrEnablePageLa : false
37
37
  });
38
- if ((0, _config.isVCRevisionEnabled)('fy25.03')) {
38
+ if ((0, _config.isVCRevisionEnabled)('fy25.03') || (0, _config.isVCRevisionEnabled)('next')) {
39
39
  var _opts$ssrEnablePageLa2;
40
40
  this.newVCObserver = new _vcObserverNew.default({
41
41
  selectorConfig: opts.selectorConfig,
@@ -19,6 +19,7 @@ var _getElementName2 = _interopRequireDefault(require("./get-element-name"));
19
19
  var _fy25_ = _interopRequireDefault(require("./metric-calculator/fy25_03"));
20
20
  var _getViewportHeight = _interopRequireDefault(require("./metric-calculator/utils/get-viewport-height"));
21
21
  var _getViewportWidth = _interopRequireDefault(require("./metric-calculator/utils/get-viewport-width"));
22
+ var _vcnext = _interopRequireDefault(require("./metric-calculator/vcnext"));
22
23
  var _viewportObserver = _interopRequireDefault(require("./viewport-observer"));
23
24
  var _windowEventObserver = _interopRequireDefault(require("./window-event-observer"));
24
25
  var SSRState = {
@@ -237,7 +238,7 @@ var VCObserverNew = exports.default = /*#__PURE__*/function () {
237
238
  key: "getVCResult",
238
239
  value: function () {
239
240
  var _getVCResult = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(param) {
240
- var start, stop, interactionId, include3p, results, calculator_fy25_03, orderedEntries, fy25_03;
241
+ var start, stop, interactionId, include3p, results, calculator_fy25_03, orderedEntries, fy25_03, calculator_next, vcNext;
241
242
  return _regenerator.default.wrap(function _callee$(_context) {
242
243
  while (1) switch (_context.prev = _context.next) {
243
244
  case 0:
@@ -266,8 +267,30 @@ var VCObserverNew = exports.default = /*#__PURE__*/function () {
266
267
  if (fy25_03) {
267
268
  results.push(fy25_03);
268
269
  }
270
+
271
+ // TODO on cleanup: put behind `enabledVCRevisions` config
272
+ if (!(0, _platformFeatureFlags.fg)('platform_ufo_vcnext_v4_enabled')) {
273
+ _context.next = 16;
274
+ break;
275
+ }
276
+ calculator_next = new _vcnext.default();
277
+ _context.next = 14;
278
+ return calculator_next.calculate({
279
+ orderedEntries: orderedEntries,
280
+ startTime: start,
281
+ stopTime: stop,
282
+ interactionId: interactionId,
283
+ isPostInteraction: this.isPostInteraction,
284
+ include3p: include3p
285
+ });
286
+ case 14:
287
+ vcNext = _context.sent;
288
+ if (vcNext) {
289
+ results.push(vcNext);
290
+ }
291
+ case 16:
269
292
  return _context.abrupt("return", results);
270
- case 11:
293
+ case 17:
271
294
  case "end":
272
295
  return _context.stop();
273
296
  }
@@ -112,8 +112,8 @@ var AbstractVCCalculatorBase = exports.default = /*#__PURE__*/function () {
112
112
  key: "calculateWithDebugInfo",
113
113
  value: function () {
114
114
  var _calculateWithDebugInfo = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(filteredEntries, startTime, stopTime, isPostInteraction, isVCClean, interactionId, dirtyReason, allEntries, include3p) {
115
- var _window, _window2, _window3, _window5;
116
- var percentiles, viewportEntries, vcLogs, vcDetails, percentileIndex, entryDataBuffer, _iterator4, _step4, _entry3, time, viewportPercentage, entries, elementNames, previousResult, i, percentile, enhancedVcLogs, shouldCalculate3p, shouldCalculateDebugDetails, sortedVcLogs, maxViewportPercentageAtTime, maxSoFar, _iterator5, _step5, log, getBiggestPreviousViewportPercentage, ignoredEntriesByTime, _iterator6, _step6, _entry4, _ignoredEntriesByTime, _viewportData$rect, _viewportData$previou, viewportData, timestamp, additionalVcLogs, _iterator7, _step7, _step7$value, _timestamp, ignoredEntries, _viewportPercentage, v3RevisionDebugDetails, _activeInteractionId$, activeInteractionId, activeInteraction, pageVisibilityUpToTTAI, isBackgrounded, _window4, _window4$__ufo_devtoo, _window6, _window6$__on_ufo_vc_;
115
+ var _window, _window2, _window6, _window8;
116
+ var percentiles, viewportEntries, vcLogs, vcDetails, percentileIndex, entryDataBuffer, _iterator4, _step4, _entry3, time, viewportPercentage, entries, elementNames, previousResult, i, percentile, enhancedVcLogs, shouldCalculate3p, shouldCalculateDebugDetails, _window3, _window4, _window5, sortedVcLogs, maxViewportPercentageAtTime, maxSoFar, _iterator5, _step5, log, getBiggestPreviousViewportPercentage, ignoredEntriesByTime, _iterator6, _step6, _entry4, _ignoredEntriesByTime, _viewportData$rect, _viewportData$previou, viewportData, timestamp, additionalVcLogs, _iterator7, _step7, _step7$value, _timestamp, ignoredEntries, _viewportPercentage, v3RevisionDebugDetails, _activeInteractionId$, activeInteractionId, activeInteraction, pageVisibilityUpToTTAI, isBackgrounded, _window7, _window7$__ufo_devtoo, _window9, _window9$__on_ufo_vc_;
117
117
  return _regenerator.default.wrap(function _callee$(_context) {
118
118
  while (1) switch (_context.prev = _context.next) {
119
119
  case 0:
@@ -217,6 +217,9 @@ var AbstractVCCalculatorBase = exports.default = /*#__PURE__*/function () {
217
217
  }) : []; // If 3p metric enabled - calculate the debug details
218
218
  shouldCalculate3p = include3p && (0, _platformFeatureFlags.fg)('platform_ufo_enable_ttai_with_3p'); // Only calculate enhanced debug details if devtool callbacks exist
219
219
  shouldCalculateDebugDetails = (!isPostInteraction || shouldCalculate3p) && (typeof ((_window = window) === null || _window === void 0 ? void 0 : _window.__ufo_devtool_onVCRevisionReady__) === 'function' || typeof ((_window2 = window) === null || _window2 === void 0 ? void 0 : _window2.__on_ufo_vc_debug_data_ready) === 'function');
220
+ if ((0, _platformFeatureFlags.fg)('platform_ufo_fix_post_interaction_check_vc_debug')) {
221
+ shouldCalculateDebugDetails = !isPostInteraction && (typeof ((_window3 = window) === null || _window3 === void 0 ? void 0 : _window3.__ufo_devtool_onVCRevisionReady__) === 'function' || typeof ((_window4 = window) === null || _window4 === void 0 ? void 0 : _window4.__on_ufo_vc_debug_data_ready) === 'function' || typeof ((_window5 = window) === null || _window5 === void 0 ? void 0 : _window5.__ufo_devtool_vc_3p_debug_data) === 'function');
222
+ }
220
223
  if (shouldCalculateDebugDetails && allEntries && vcLogs) {
221
224
  // Pre-sort vcLogs by time for efficient lookups
222
225
  sortedVcLogs = (0, _toConsumableArray2.default)(vcLogs).sort(function (a, b) {
@@ -335,18 +338,18 @@ var AbstractVCCalculatorBase = exports.default = /*#__PURE__*/function () {
335
338
  }
336
339
 
337
340
  // Handle devtool callback
338
- if (v3RevisionDebugDetails && typeof ((_window3 = window) === null || _window3 === void 0 ? void 0 : _window3.__ufo_devtool_onVCRevisionReady__) === 'function' && !include3p) {
341
+ if (v3RevisionDebugDetails && typeof ((_window6 = window) === null || _window6 === void 0 ? void 0 : _window6.__ufo_devtool_onVCRevisionReady__) === 'function' && !include3p) {
339
342
  try {
340
- (_window4 = window) === null || _window4 === void 0 || (_window4$__ufo_devtoo = _window4.__ufo_devtool_onVCRevisionReady__) === null || _window4$__ufo_devtoo === void 0 || _window4$__ufo_devtoo.call(_window4, v3RevisionDebugDetails);
343
+ (_window7 = window) === null || _window7 === void 0 || (_window7$__ufo_devtoo = _window7.__ufo_devtool_onVCRevisionReady__) === null || _window7$__ufo_devtoo === void 0 || _window7$__ufo_devtoo.call(_window7, v3RevisionDebugDetails);
341
344
  } catch (e) {
342
345
  // if any error communicating with devtool, we don't want to break the app
343
346
  // eslint-disable-next-line no-console
344
347
  console.error('Error in onVCRevisionReady', e);
345
348
  }
346
349
  }
347
- if (v3RevisionDebugDetails && typeof ((_window5 = window) === null || _window5 === void 0 ? void 0 : _window5.__on_ufo_vc_debug_data_ready) === 'function' && !include3p) {
350
+ if (v3RevisionDebugDetails && typeof ((_window8 = window) === null || _window8 === void 0 ? void 0 : _window8.__on_ufo_vc_debug_data_ready) === 'function' && !include3p) {
348
351
  try {
349
- (_window6 = window) === null || _window6 === void 0 || (_window6$__on_ufo_vc_ = _window6.__on_ufo_vc_debug_data_ready) === null || _window6$__on_ufo_vc_ === void 0 || _window6$__on_ufo_vc_.call(_window6, v3RevisionDebugDetails);
352
+ (_window9 = window) === null || _window9 === void 0 || (_window9$__on_ufo_vc_ = _window9.__on_ufo_vc_debug_data_ready) === null || _window9$__on_ufo_vc_ === void 0 || _window9$__on_ufo_vc_.call(_window9, v3RevisionDebugDetails);
350
353
  } catch (e) {
351
354
  // eslint-disable-next-line no-console
352
355
  console.error('Error in onVCRevisionReady', e);
@@ -362,7 +365,7 @@ var AbstractVCCalculatorBase = exports.default = /*#__PURE__*/function () {
362
365
  }
363
366
  }
364
367
  return _context.abrupt("return", vcDetails);
365
- case 40:
368
+ case 41:
366
369
  case "end":
367
370
  return _context.stop();
368
371
  }
@@ -44,9 +44,9 @@ var THIRD_PARTY_BROWSER_EXTENSION_ATTRIBUTES = exports.THIRD_PARTY_BROWSER_EXTEN
44
44
  // grammarly extensions
45
45
  'data-new-gr-c-s-loaded', 'data-gr-aaa-notch-connection-id', 'data-gr-aaa-loaded'];
46
46
  var VCCalculator_FY25_03 = exports.default = /*#__PURE__*/function (_AbstractVCCalculator) {
47
- function VCCalculator_FY25_03() {
47
+ function VCCalculator_FY25_03(revisionNo) {
48
48
  (0, _classCallCheck2.default)(this, VCCalculator_FY25_03);
49
- return _callSuper(this, VCCalculator_FY25_03, [REVISION_NO]);
49
+ return _callSuper(this, VCCalculator_FY25_03, [revisionNo !== null && revisionNo !== void 0 ? revisionNo : REVISION_NO]);
50
50
  }
51
51
  (0, _inherits2.default)(VCCalculator_FY25_03, _AbstractVCCalculator);
52
52
  return (0, _createClass2.default)(VCCalculator_FY25_03, [{
@@ -0,0 +1,41 @@
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 _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
9
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
10
+ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
11
+ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
12
+ var _get2 = _interopRequireDefault(require("@babel/runtime/helpers/get"));
13
+ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
14
+ var _fy25_ = _interopRequireDefault(require("../fy25_03"));
15
+ 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
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
17
+ function _superPropGet(t, o, e, r) { var p = (0, _get2.default)((0, _getPrototypeOf2.default)(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
18
+ // NOTE: `next` to be renamed `fy26.04` once stable
19
+ var REVISION_NO = 'next';
20
+ var getConsideredEntryTypes = function getConsideredEntryTypes() {
21
+ return ['mutation:display-contents-children-element'];
22
+ };
23
+
24
+ // NOTE: `VCNext` to be renamed `FY26_04` once stable
25
+ var VCNextCalculator = exports.default = /*#__PURE__*/function (_VCCalculator_FY25_) {
26
+ function VCNextCalculator() {
27
+ (0, _classCallCheck2.default)(this, VCNextCalculator);
28
+ return _callSuper(this, VCNextCalculator, [REVISION_NO]);
29
+ }
30
+ (0, _inherits2.default)(VCNextCalculator, _VCCalculator_FY25_);
31
+ return (0, _createClass2.default)(VCNextCalculator, [{
32
+ key: "isEntryIncluded",
33
+ value: function isEntryIncluded(entry, include3p) {
34
+ var isEntryIncludedInV3 = _superPropGet(VCNextCalculator, "isEntryIncluded", this, 3)([entry, include3p]);
35
+ if (isEntryIncludedInV3) {
36
+ return true;
37
+ }
38
+ return getConsideredEntryTypes().includes(entry.data.type);
39
+ }
40
+ }]);
41
+ }(_fy25_.default);
@@ -126,7 +126,7 @@ var ViewportObserver = exports.default = /*#__PURE__*/function () {
126
126
  _iterator = _createForOfIteratorHelper(addedNodes);
127
127
  _context2.prev = 4;
128
128
  _loop = /*#__PURE__*/_regenerator.default.mark(function _loop() {
129
- var addedNodeRef, addedNode, ssrState, SSRStateEnum, _this$intersectionObs, _this$intersectionObs2, ssrPlaceholderHandler, _this$intersectionObs3, result, _this$intersectionObs4, sameDeletedNode, isInIgnoreLsMarker, _this$intersectionObs5, _this$intersectionObs6, _checkWithinComponent, isWithinThirdPartySegment, _this$intersectionObs7, validTargets, _iterator2, _step2, _this$intersectionObs8, validTarget, _this$intersectionObs9;
129
+ var addedNodeRef, addedNode, ssrState, SSRStateEnum, _this$intersectionObs, _this$intersectionObs2, ssrPlaceholderHandler, _this$intersectionObs3, result, _this$intersectionObs4, sameDeletedNode, isInIgnoreLsMarker, _this$intersectionObs5, _this$intersectionObs6, _checkWithinComponent, isWithinThirdPartySegment, _this$intersectionObs7, _window, _iterator2, _step2, child, _this$intersectionObs8, _this$intersectionObs9, validTargets, _iterator3, _step3, _this$intersectionObs0, validTarget, _this$intersectionObs1;
130
130
  return _regenerator.default.wrap(function _loop$(_context) {
131
131
  while (1) switch (_context.prev = _context.next) {
132
132
  case 0:
@@ -238,25 +238,45 @@ var ViewportObserver = exports.default = /*#__PURE__*/function () {
238
238
  (_this$intersectionObs7 = _this.intersectionObserver) === null || _this$intersectionObs7 === void 0 || _this$intersectionObs7.watchAndTag(addedNode, 'mutation:third-party-element');
239
239
  return _context.abrupt("return", 0);
240
240
  case 45:
241
- if ((0, _platformFeatureFlags.fg)('platform_ufo_display_content_resolution_ttvc_v3')) {
242
- // Check if the target has display:content css property, return array of valid targets
243
- validTargets = (0, _checkDisplayContent.default)(addedNode);
244
- _iterator2 = _createForOfIteratorHelper(validTargets);
245
- try {
246
- for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
247
- validTarget = _step2.value;
248
- (_this$intersectionObs8 = _this.intersectionObserver) === null || _this$intersectionObs8 === void 0 || _this$intersectionObs8.watchAndTag(validTarget, createElementMutationsWatcher(removedNodeRects));
241
+ if ((0, _platformFeatureFlags.fg)('platform_ufo_vcnext_v4_enabled')) {
242
+ if (((_window = window) === null || _window === void 0 || (_window = _window.getComputedStyle(addedNode)) === null || _window === void 0 ? void 0 : _window.display) === 'contents') {
243
+ _iterator2 = _createForOfIteratorHelper(addedNode.children);
244
+ try {
245
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
246
+ child = _step2.value;
247
+ if (child instanceof HTMLElement) {
248
+ (_this$intersectionObs8 = _this.intersectionObserver) === null || _this$intersectionObs8 === void 0 || _this$intersectionObs8.watchAndTag(child, 'mutation:display-contents-children-element');
249
+ }
250
+ }
251
+ } catch (err) {
252
+ _iterator2.e(err);
253
+ } finally {
254
+ _iterator2.f();
249
255
  }
250
- } catch (err) {
251
- _iterator2.e(err);
252
- } finally {
253
- _iterator2.f();
256
+ } else {
257
+ (_this$intersectionObs9 = _this.intersectionObserver) === null || _this$intersectionObs9 === void 0 || _this$intersectionObs9.watchAndTag(addedNode, createElementMutationsWatcher(removedNodeRects));
254
258
  }
255
259
  } else {
256
- if ((0, _platformFeatureFlags.fg)('platform_ufo_display_content_track_occurrence')) {
257
- (0, _trackDisplayContentOccurrence.default)(addedNode);
260
+ if ((0, _platformFeatureFlags.fg)('platform_ufo_display_content_resolution_ttvc_v3')) {
261
+ // Check if the target has display:content css property, return array of valid targets
262
+ validTargets = (0, _checkDisplayContent.default)(addedNode);
263
+ _iterator3 = _createForOfIteratorHelper(validTargets);
264
+ try {
265
+ for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
266
+ validTarget = _step3.value;
267
+ (_this$intersectionObs0 = _this.intersectionObserver) === null || _this$intersectionObs0 === void 0 || _this$intersectionObs0.watchAndTag(validTarget, createElementMutationsWatcher(removedNodeRects));
268
+ }
269
+ } catch (err) {
270
+ _iterator3.e(err);
271
+ } finally {
272
+ _iterator3.f();
273
+ }
274
+ } else {
275
+ if ((0, _platformFeatureFlags.fg)('platform_ufo_display_content_track_occurrence')) {
276
+ (0, _trackDisplayContentOccurrence.default)(addedNode);
277
+ }
278
+ (_this$intersectionObs1 = _this.intersectionObserver) === null || _this$intersectionObs1 === void 0 || _this$intersectionObs1.watchAndTag(addedNode, createElementMutationsWatcher(removedNodeRects));
258
279
  }
259
- (_this$intersectionObs9 = _this.intersectionObserver) === null || _this$intersectionObs9 === void 0 || _this$intersectionObs9.watchAndTag(addedNode, createElementMutationsWatcher(removedNodeRects));
260
280
  }
261
281
  case 46:
262
282
  case "end":
@@ -303,12 +323,12 @@ var ViewportObserver = exports.default = /*#__PURE__*/function () {
303
323
  };
304
324
  }());
305
325
  (0, _defineProperty2.default)(this, "handleAttributeMutation", function (_ref6) {
306
- var _this$intersectionObs0;
326
+ var _this$intersectionObs10;
307
327
  var target = _ref6.target,
308
328
  attributeName = _ref6.attributeName,
309
329
  oldValue = _ref6.oldValue,
310
330
  newValue = _ref6.newValue;
311
- (_this$intersectionObs0 = _this.intersectionObserver) === null || _this$intersectionObs0 === void 0 || _this$intersectionObs0.watchAndTag(target, function (_ref7) {
331
+ (_this$intersectionObs10 = _this.intersectionObserver) === null || _this$intersectionObs10 === void 0 || _this$intersectionObs10.watchAndTag(target, function (_ref7) {
312
332
  var target = _ref7.target,
313
333
  rect = _ref7.rect;
314
334
  if ((0, _vcUtils.isContainedWithinMediaWrapper)(target)) {
@@ -386,11 +406,11 @@ var ViewportObserver = exports.default = /*#__PURE__*/function () {
386
406
  (0, _defineProperty2.default)(this, "handleLayoutShift", function (_ref8) {
387
407
  var time = _ref8.time,
388
408
  changedRects = _ref8.changedRects;
389
- var _iterator3 = _createForOfIteratorHelper(changedRects),
390
- _step3;
409
+ var _iterator4 = _createForOfIteratorHelper(changedRects),
410
+ _step4;
391
411
  try {
392
- for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
393
- var changedRect = _step3.value;
412
+ for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
413
+ var changedRect = _step4.value;
394
414
  var target = changedRect.node;
395
415
  if (target) {
396
416
  _this.onChange({
@@ -404,9 +424,9 @@ var ViewportObserver = exports.default = /*#__PURE__*/function () {
404
424
  }
405
425
  }
406
426
  } catch (err) {
407
- _iterator3.e(err);
427
+ _iterator4.e(err);
408
428
  } finally {
409
- _iterator3.f();
429
+ _iterator4.f();
410
430
  }
411
431
  });
412
432
  this.mapVisibleNodeRects = new WeakMap();
@@ -463,12 +483,12 @@ var ViewportObserver = exports.default = /*#__PURE__*/function () {
463
483
  }, {
464
484
  key: "stop",
465
485
  value: function stop() {
466
- var _this$mutationObserve2, _this$intersectionObs1, _this$performanceObse2;
486
+ var _this$mutationObserve2, _this$intersectionObs11, _this$performanceObse2;
467
487
  if (!this.isStarted) {
468
488
  return;
469
489
  }
470
490
  (_this$mutationObserve2 = this.mutationObserver) === null || _this$mutationObserve2 === void 0 || _this$mutationObserve2.disconnect();
471
- (_this$intersectionObs1 = this.intersectionObserver) === null || _this$intersectionObs1 === void 0 || _this$intersectionObs1.disconnect();
491
+ (_this$intersectionObs11 = this.intersectionObserver) === null || _this$intersectionObs11 === void 0 || _this$intersectionObs11.disconnect();
472
492
  (_this$performanceObse2 = this.performanceObserver) === null || _this$performanceObse2 === void 0 || _this$performanceObse2.disconnect();
473
493
  this.isStarted = false;
474
494
  // Clean up caches when stopping
@@ -57,7 +57,7 @@ async function createInteractionExtraLogPayload(interactionId, interaction) {
57
57
  const effectiveVCRevisionPayload = vcRevisionPayload === null || vcRevisionPayload === void 0 ? void 0 : vcRevisionPayload.find(({
58
58
  revision
59
59
  }) => revision === DEFAULT_TTVC_REVISION);
60
- if (!(effectiveVCRevisionPayload !== null && effectiveVCRevisionPayload !== void 0 && effectiveVCRevisionPayload.clean) || (effectiveVCRevisionPayload === null || effectiveVCRevisionPayload === void 0 ? void 0 : effectiveVCRevisionPayload['metric:vc90']) === undefined) {
60
+ if (!(effectiveVCRevisionPayload !== null && effectiveVCRevisionPayload !== void 0 && effectiveVCRevisionPayload.clean) || (effectiveVCRevisionPayload === null || effectiveVCRevisionPayload === void 0 ? void 0 : effectiveVCRevisionPayload['metric:vc90']) === undefined || typeof (effectiveVCRevisionPayload === null || effectiveVCRevisionPayload === void 0 ? void 0 : effectiveVCRevisionPayload['metric:vc90']) !== 'number' || extraTTAI === undefined || typeof extraTTAI !== 'number' || interaction.errors.length > 0) {
61
61
  return null;
62
62
  }
63
63
 
@@ -15,7 +15,7 @@ export class VCObserverWrapper {
15
15
  this.ssrPlaceholderHandler = new SSRPlaceholderHandlers({
16
16
  enablePageLayoutPlaceholder: (_opts$ssrEnablePageLa = opts.ssrEnablePageLayoutPlaceholder) !== null && _opts$ssrEnablePageLa !== void 0 ? _opts$ssrEnablePageLa : false
17
17
  });
18
- if (isVCRevisionEnabled('fy25.03')) {
18
+ if (isVCRevisionEnabled('fy25.03') || isVCRevisionEnabled('next')) {
19
19
  var _opts$ssrEnablePageLa2;
20
20
  this.newVCObserver = new VCObserverNew({
21
21
  selectorConfig: opts.selectorConfig,
@@ -6,6 +6,7 @@ import getElementName from './get-element-name';
6
6
  import VCCalculator_FY25_03 from './metric-calculator/fy25_03';
7
7
  import getViewportHeight from './metric-calculator/utils/get-viewport-height';
8
8
  import getViewportWidth from './metric-calculator/utils/get-viewport-width';
9
+ import VCNextCalculator from './metric-calculator/vcnext';
9
10
  import ViewportObserver from './viewport-observer';
10
11
  import WindowEventObserver from './window-event-observer';
11
12
  const SSRState = {
@@ -218,6 +219,22 @@ export default class VCObserverNew {
218
219
  if (fy25_03) {
219
220
  results.push(fy25_03);
220
221
  }
222
+
223
+ // TODO on cleanup: put behind `enabledVCRevisions` config
224
+ if (fg('platform_ufo_vcnext_v4_enabled')) {
225
+ const calculator_next = new VCNextCalculator();
226
+ const vcNext = await calculator_next.calculate({
227
+ orderedEntries,
228
+ startTime: start,
229
+ stopTime: stop,
230
+ interactionId,
231
+ isPostInteraction: this.isPostInteraction,
232
+ include3p
233
+ });
234
+ if (vcNext) {
235
+ results.push(vcNext);
236
+ }
237
+ }
221
238
  return results;
222
239
  }
223
240
  addStartEntry(startTime) {
@@ -56,7 +56,7 @@ export default class AbstractVCCalculatorBase {
56
56
  return labelStacks;
57
57
  }
58
58
  async calculateWithDebugInfo(filteredEntries, startTime, stopTime, isPostInteraction, isVCClean, interactionId, dirtyReason, allEntries, include3p) {
59
- var _window, _window2, _window3, _window5;
59
+ var _window, _window2, _window6, _window8;
60
60
  const percentiles = [25, 50, 75, 80, 85, 90, 95, 98, 99, 100];
61
61
  const viewportEntries = this.filterViewportEntries(filteredEntries);
62
62
  const vcLogs = await calculateTTVCPercentilesWithDebugInfo({
@@ -135,7 +135,11 @@ export default class AbstractVCCalculatorBase {
135
135
  // If 3p metric enabled - calculate the debug details
136
136
  const shouldCalculate3p = include3p && fg('platform_ufo_enable_ttai_with_3p');
137
137
  // Only calculate enhanced debug details if devtool callbacks exist
138
- const shouldCalculateDebugDetails = (!isPostInteraction || shouldCalculate3p) && (typeof ((_window = window) === null || _window === void 0 ? void 0 : _window.__ufo_devtool_onVCRevisionReady__) === 'function' || typeof ((_window2 = window) === null || _window2 === void 0 ? void 0 : _window2.__on_ufo_vc_debug_data_ready) === 'function');
138
+ let shouldCalculateDebugDetails = (!isPostInteraction || shouldCalculate3p) && (typeof ((_window = window) === null || _window === void 0 ? void 0 : _window.__ufo_devtool_onVCRevisionReady__) === 'function' || typeof ((_window2 = window) === null || _window2 === void 0 ? void 0 : _window2.__on_ufo_vc_debug_data_ready) === 'function');
139
+ if (fg('platform_ufo_fix_post_interaction_check_vc_debug')) {
140
+ var _window3, _window4, _window5;
141
+ shouldCalculateDebugDetails = !isPostInteraction && (typeof ((_window3 = window) === null || _window3 === void 0 ? void 0 : _window3.__ufo_devtool_onVCRevisionReady__) === 'function' || typeof ((_window4 = window) === null || _window4 === void 0 ? void 0 : _window4.__on_ufo_vc_debug_data_ready) === 'function' || typeof ((_window5 = window) === null || _window5 === void 0 ? void 0 : _window5.__ufo_devtool_vc_3p_debug_data) === 'function');
142
+ }
139
143
  if (shouldCalculateDebugDetails && allEntries && vcLogs) {
140
144
  // Pre-sort vcLogs by time for efficient lookups
141
145
  const sortedVcLogs = [...vcLogs].sort((a, b) => a.time - b.time);
@@ -233,20 +237,20 @@ export default class AbstractVCCalculatorBase {
233
237
  }
234
238
 
235
239
  // Handle devtool callback
236
- if (v3RevisionDebugDetails && typeof ((_window3 = window) === null || _window3 === void 0 ? void 0 : _window3.__ufo_devtool_onVCRevisionReady__) === 'function' && !include3p) {
240
+ if (v3RevisionDebugDetails && typeof ((_window6 = window) === null || _window6 === void 0 ? void 0 : _window6.__ufo_devtool_onVCRevisionReady__) === 'function' && !include3p) {
237
241
  try {
238
- var _window4, _window4$__ufo_devtoo;
239
- (_window4 = window) === null || _window4 === void 0 ? void 0 : (_window4$__ufo_devtoo = _window4.__ufo_devtool_onVCRevisionReady__) === null || _window4$__ufo_devtoo === void 0 ? void 0 : _window4$__ufo_devtoo.call(_window4, v3RevisionDebugDetails);
242
+ var _window7, _window7$__ufo_devtoo;
243
+ (_window7 = window) === null || _window7 === void 0 ? void 0 : (_window7$__ufo_devtoo = _window7.__ufo_devtool_onVCRevisionReady__) === null || _window7$__ufo_devtoo === void 0 ? void 0 : _window7$__ufo_devtoo.call(_window7, v3RevisionDebugDetails);
240
244
  } catch (e) {
241
245
  // if any error communicating with devtool, we don't want to break the app
242
246
  // eslint-disable-next-line no-console
243
247
  console.error('Error in onVCRevisionReady', e);
244
248
  }
245
249
  }
246
- if (v3RevisionDebugDetails && typeof ((_window5 = window) === null || _window5 === void 0 ? void 0 : _window5.__on_ufo_vc_debug_data_ready) === 'function' && !include3p) {
250
+ if (v3RevisionDebugDetails && typeof ((_window8 = window) === null || _window8 === void 0 ? void 0 : _window8.__on_ufo_vc_debug_data_ready) === 'function' && !include3p) {
247
251
  try {
248
- var _window6, _window6$__on_ufo_vc_;
249
- (_window6 = window) === null || _window6 === void 0 ? void 0 : (_window6$__on_ufo_vc_ = _window6.__on_ufo_vc_debug_data_ready) === null || _window6$__on_ufo_vc_ === void 0 ? void 0 : _window6$__on_ufo_vc_.call(_window6, v3RevisionDebugDetails);
252
+ var _window9, _window9$__on_ufo_vc_;
253
+ (_window9 = window) === null || _window9 === void 0 ? void 0 : (_window9$__on_ufo_vc_ = _window9.__on_ufo_vc_debug_data_ready) === null || _window9$__on_ufo_vc_ === void 0 ? void 0 : _window9$__on_ufo_vc_.call(_window9, v3RevisionDebugDetails);
250
254
  } catch (e) {
251
255
  // eslint-disable-next-line no-console
252
256
  console.error('Error in onVCRevisionReady', e);
@@ -30,8 +30,8 @@ export const THIRD_PARTY_BROWSER_EXTENSION_ATTRIBUTES = ['bis_skin_checked', 'cz
30
30
  // grammarly extensions
31
31
  'data-new-gr-c-s-loaded', 'data-gr-aaa-notch-connection-id', 'data-gr-aaa-loaded'];
32
32
  export default class VCCalculator_FY25_03 extends AbstractVCCalculatorBase {
33
- constructor() {
34
- super(REVISION_NO);
33
+ constructor(revisionNo) {
34
+ super(revisionNo !== null && revisionNo !== void 0 ? revisionNo : REVISION_NO);
35
35
  }
36
36
  isEntryIncluded(entry, include3p) {
37
37
  if (!getConsideredEntryTypes(include3p).includes(entry.data.type)) {
@@ -0,0 +1,21 @@
1
+ import VCCalculator_FY25_03 from '../fy25_03';
2
+
3
+ // NOTE: `next` to be renamed `fy26.04` once stable
4
+ const REVISION_NO = 'next';
5
+ const getConsideredEntryTypes = () => {
6
+ return ['mutation:display-contents-children-element'];
7
+ };
8
+
9
+ // NOTE: `VCNext` to be renamed `FY26_04` once stable
10
+ export default class VCNextCalculator extends VCCalculator_FY25_03 {
11
+ constructor() {
12
+ super(REVISION_NO);
13
+ }
14
+ isEntryIncluded(entry, include3p) {
15
+ const isEntryIncludedInV3 = super.isEntryIncluded(entry, include3p);
16
+ if (isEntryIncludedInV3) {
17
+ return true;
18
+ }
19
+ return getConsideredEntryTypes().includes(entry.data.type);
20
+ }
21
+ }
@@ -187,19 +187,34 @@ export default class ViewportObserver {
187
187
  (_this$intersectionObs7 = this.intersectionObserver) === null || _this$intersectionObs7 === void 0 ? void 0 : _this$intersectionObs7.watchAndTag(addedNode, 'mutation:third-party-element');
188
188
  continue;
189
189
  }
190
- if (fg('platform_ufo_display_content_resolution_ttvc_v3')) {
191
- // Check if the target has display:content css property, return array of valid targets
192
- const validTargets = checkCssProperty(addedNode);
193
- for (const validTarget of validTargets) {
194
- var _this$intersectionObs8;
195
- (_this$intersectionObs8 = this.intersectionObserver) === null || _this$intersectionObs8 === void 0 ? void 0 : _this$intersectionObs8.watchAndTag(validTarget, createElementMutationsWatcher(removedNodeRects));
190
+ if (fg('platform_ufo_vcnext_v4_enabled')) {
191
+ var _window, _window$getComputedSt;
192
+ if (((_window = window) === null || _window === void 0 ? void 0 : (_window$getComputedSt = _window.getComputedStyle(addedNode)) === null || _window$getComputedSt === void 0 ? void 0 : _window$getComputedSt.display) === 'contents') {
193
+ for (const child of addedNode.children) {
194
+ if (child instanceof HTMLElement) {
195
+ var _this$intersectionObs8;
196
+ (_this$intersectionObs8 = this.intersectionObserver) === null || _this$intersectionObs8 === void 0 ? void 0 : _this$intersectionObs8.watchAndTag(child, 'mutation:display-contents-children-element');
197
+ }
198
+ }
199
+ } else {
200
+ var _this$intersectionObs9;
201
+ (_this$intersectionObs9 = this.intersectionObserver) === null || _this$intersectionObs9 === void 0 ? void 0 : _this$intersectionObs9.watchAndTag(addedNode, createElementMutationsWatcher(removedNodeRects));
196
202
  }
197
203
  } else {
198
- var _this$intersectionObs9;
199
- if (fg('platform_ufo_display_content_track_occurrence')) {
200
- trackDisplayContentsOccurrence(addedNode);
204
+ if (fg('platform_ufo_display_content_resolution_ttvc_v3')) {
205
+ // Check if the target has display:content css property, return array of valid targets
206
+ const validTargets = checkCssProperty(addedNode);
207
+ for (const validTarget of validTargets) {
208
+ var _this$intersectionObs0;
209
+ (_this$intersectionObs0 = this.intersectionObserver) === null || _this$intersectionObs0 === void 0 ? void 0 : _this$intersectionObs0.watchAndTag(validTarget, createElementMutationsWatcher(removedNodeRects));
210
+ }
211
+ } else {
212
+ var _this$intersectionObs1;
213
+ if (fg('platform_ufo_display_content_track_occurrence')) {
214
+ trackDisplayContentsOccurrence(addedNode);
215
+ }
216
+ (_this$intersectionObs1 = this.intersectionObserver) === null || _this$intersectionObs1 === void 0 ? void 0 : _this$intersectionObs1.watchAndTag(addedNode, createElementMutationsWatcher(removedNodeRects));
201
217
  }
202
- (_this$intersectionObs9 = this.intersectionObserver) === null || _this$intersectionObs9 === void 0 ? void 0 : _this$intersectionObs9.watchAndTag(addedNode, createElementMutationsWatcher(removedNodeRects));
203
218
  }
204
219
  }
205
220
  });
@@ -209,8 +224,8 @@ export default class ViewportObserver {
209
224
  oldValue,
210
225
  newValue
211
226
  }) => {
212
- var _this$intersectionObs0;
213
- (_this$intersectionObs0 = this.intersectionObserver) === null || _this$intersectionObs0 === void 0 ? void 0 : _this$intersectionObs0.watchAndTag(target, ({
227
+ var _this$intersectionObs10;
228
+ (_this$intersectionObs10 = this.intersectionObserver) === null || _this$intersectionObs10 === void 0 ? void 0 : _this$intersectionObs10.watchAndTag(target, ({
214
229
  target,
215
230
  rect
216
231
  }) => {
@@ -352,12 +367,12 @@ export default class ViewportObserver {
352
367
  this.isStarted = true;
353
368
  }
354
369
  stop() {
355
- var _this$mutationObserve2, _this$intersectionObs1, _this$performanceObse2;
370
+ var _this$mutationObserve2, _this$intersectionObs11, _this$performanceObse2;
356
371
  if (!this.isStarted) {
357
372
  return;
358
373
  }
359
374
  (_this$mutationObserve2 = this.mutationObserver) === null || _this$mutationObserve2 === void 0 ? void 0 : _this$mutationObserve2.disconnect();
360
- (_this$intersectionObs1 = this.intersectionObserver) === null || _this$intersectionObs1 === void 0 ? void 0 : _this$intersectionObs1.disconnect();
375
+ (_this$intersectionObs11 = this.intersectionObserver) === null || _this$intersectionObs11 === void 0 ? void 0 : _this$intersectionObs11.disconnect();
361
376
  (_this$performanceObse2 = this.performanceObserver) === null || _this$performanceObse2 === void 0 ? void 0 : _this$performanceObse2.disconnect();
362
377
  this.isStarted = false;
363
378
  // Clean up caches when stopping
@@ -72,7 +72,7 @@ function _createInteractionExtraLogPayload() {
72
72
  var revision = _ref.revision;
73
73
  return revision === DEFAULT_TTVC_REVISION;
74
74
  });
75
- if (!(!(effectiveVCRevisionPayload !== null && effectiveVCRevisionPayload !== void 0 && effectiveVCRevisionPayload.clean) || (effectiveVCRevisionPayload === null || effectiveVCRevisionPayload === void 0 ? void 0 : effectiveVCRevisionPayload['metric:vc90']) === undefined)) {
75
+ if (!(!(effectiveVCRevisionPayload !== null && effectiveVCRevisionPayload !== void 0 && effectiveVCRevisionPayload.clean) || (effectiveVCRevisionPayload === null || effectiveVCRevisionPayload === void 0 ? void 0 : effectiveVCRevisionPayload['metric:vc90']) === undefined || typeof (effectiveVCRevisionPayload === null || effectiveVCRevisionPayload === void 0 ? void 0 : effectiveVCRevisionPayload['metric:vc90']) !== 'number' || extraTTAI === undefined || typeof extraTTAI !== 'number' || interaction.errors.length > 0)) {
76
76
  _context.next = 23;
77
77
  break;
78
78
  }
@@ -25,7 +25,7 @@ export var VCObserverWrapper = /*#__PURE__*/function () {
25
25
  this.ssrPlaceholderHandler = new SSRPlaceholderHandlers({
26
26
  enablePageLayoutPlaceholder: (_opts$ssrEnablePageLa = opts.ssrEnablePageLayoutPlaceholder) !== null && _opts$ssrEnablePageLa !== void 0 ? _opts$ssrEnablePageLa : false
27
27
  });
28
- if (isVCRevisionEnabled('fy25.03')) {
28
+ if (isVCRevisionEnabled('fy25.03') || isVCRevisionEnabled('next')) {
29
29
  var _opts$ssrEnablePageLa2;
30
30
  this.newVCObserver = new VCObserverNew({
31
31
  selectorConfig: opts.selectorConfig,
@@ -12,6 +12,7 @@ import _getElementName from './get-element-name';
12
12
  import VCCalculator_FY25_03 from './metric-calculator/fy25_03';
13
13
  import getViewportHeight from './metric-calculator/utils/get-viewport-height';
14
14
  import getViewportWidth from './metric-calculator/utils/get-viewport-width';
15
+ import VCNextCalculator from './metric-calculator/vcnext';
15
16
  import ViewportObserver from './viewport-observer';
16
17
  import WindowEventObserver from './window-event-observer';
17
18
  var SSRState = {
@@ -230,7 +231,7 @@ var VCObserverNew = /*#__PURE__*/function () {
230
231
  key: "getVCResult",
231
232
  value: function () {
232
233
  var _getVCResult = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(param) {
233
- var start, stop, interactionId, include3p, results, calculator_fy25_03, orderedEntries, fy25_03;
234
+ var start, stop, interactionId, include3p, results, calculator_fy25_03, orderedEntries, fy25_03, calculator_next, vcNext;
234
235
  return _regeneratorRuntime.wrap(function _callee$(_context) {
235
236
  while (1) switch (_context.prev = _context.next) {
236
237
  case 0:
@@ -259,8 +260,30 @@ var VCObserverNew = /*#__PURE__*/function () {
259
260
  if (fy25_03) {
260
261
  results.push(fy25_03);
261
262
  }
263
+
264
+ // TODO on cleanup: put behind `enabledVCRevisions` config
265
+ if (!fg('platform_ufo_vcnext_v4_enabled')) {
266
+ _context.next = 16;
267
+ break;
268
+ }
269
+ calculator_next = new VCNextCalculator();
270
+ _context.next = 14;
271
+ return calculator_next.calculate({
272
+ orderedEntries: orderedEntries,
273
+ startTime: start,
274
+ stopTime: stop,
275
+ interactionId: interactionId,
276
+ isPostInteraction: this.isPostInteraction,
277
+ include3p: include3p
278
+ });
279
+ case 14:
280
+ vcNext = _context.sent;
281
+ if (vcNext) {
282
+ results.push(vcNext);
283
+ }
284
+ case 16:
262
285
  return _context.abrupt("return", results);
263
- case 11:
286
+ case 17:
264
287
  case "end":
265
288
  return _context.stop();
266
289
  }
@@ -106,8 +106,8 @@ var AbstractVCCalculatorBase = /*#__PURE__*/function () {
106
106
  key: "calculateWithDebugInfo",
107
107
  value: function () {
108
108
  var _calculateWithDebugInfo = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(filteredEntries, startTime, stopTime, isPostInteraction, isVCClean, interactionId, dirtyReason, allEntries, include3p) {
109
- var _window, _window2, _window3, _window5;
110
- var percentiles, viewportEntries, vcLogs, vcDetails, percentileIndex, entryDataBuffer, _iterator4, _step4, _entry3, time, viewportPercentage, entries, elementNames, previousResult, i, percentile, enhancedVcLogs, shouldCalculate3p, shouldCalculateDebugDetails, sortedVcLogs, maxViewportPercentageAtTime, maxSoFar, _iterator5, _step5, log, getBiggestPreviousViewportPercentage, ignoredEntriesByTime, _iterator6, _step6, _entry4, _ignoredEntriesByTime, _viewportData$rect, _viewportData$previou, viewportData, timestamp, additionalVcLogs, _iterator7, _step7, _step7$value, _timestamp, ignoredEntries, _viewportPercentage, v3RevisionDebugDetails, _activeInteractionId$, activeInteractionId, activeInteraction, pageVisibilityUpToTTAI, isBackgrounded, _window4, _window4$__ufo_devtoo, _window6, _window6$__on_ufo_vc_;
109
+ var _window, _window2, _window6, _window8;
110
+ var percentiles, viewportEntries, vcLogs, vcDetails, percentileIndex, entryDataBuffer, _iterator4, _step4, _entry3, time, viewportPercentage, entries, elementNames, previousResult, i, percentile, enhancedVcLogs, shouldCalculate3p, shouldCalculateDebugDetails, _window3, _window4, _window5, sortedVcLogs, maxViewportPercentageAtTime, maxSoFar, _iterator5, _step5, log, getBiggestPreviousViewportPercentage, ignoredEntriesByTime, _iterator6, _step6, _entry4, _ignoredEntriesByTime, _viewportData$rect, _viewportData$previou, viewportData, timestamp, additionalVcLogs, _iterator7, _step7, _step7$value, _timestamp, ignoredEntries, _viewportPercentage, v3RevisionDebugDetails, _activeInteractionId$, activeInteractionId, activeInteraction, pageVisibilityUpToTTAI, isBackgrounded, _window7, _window7$__ufo_devtoo, _window9, _window9$__on_ufo_vc_;
111
111
  return _regeneratorRuntime.wrap(function _callee$(_context) {
112
112
  while (1) switch (_context.prev = _context.next) {
113
113
  case 0:
@@ -211,6 +211,9 @@ var AbstractVCCalculatorBase = /*#__PURE__*/function () {
211
211
  }) : []; // If 3p metric enabled - calculate the debug details
212
212
  shouldCalculate3p = include3p && fg('platform_ufo_enable_ttai_with_3p'); // Only calculate enhanced debug details if devtool callbacks exist
213
213
  shouldCalculateDebugDetails = (!isPostInteraction || shouldCalculate3p) && (typeof ((_window = window) === null || _window === void 0 ? void 0 : _window.__ufo_devtool_onVCRevisionReady__) === 'function' || typeof ((_window2 = window) === null || _window2 === void 0 ? void 0 : _window2.__on_ufo_vc_debug_data_ready) === 'function');
214
+ if (fg('platform_ufo_fix_post_interaction_check_vc_debug')) {
215
+ shouldCalculateDebugDetails = !isPostInteraction && (typeof ((_window3 = window) === null || _window3 === void 0 ? void 0 : _window3.__ufo_devtool_onVCRevisionReady__) === 'function' || typeof ((_window4 = window) === null || _window4 === void 0 ? void 0 : _window4.__on_ufo_vc_debug_data_ready) === 'function' || typeof ((_window5 = window) === null || _window5 === void 0 ? void 0 : _window5.__ufo_devtool_vc_3p_debug_data) === 'function');
216
+ }
214
217
  if (shouldCalculateDebugDetails && allEntries && vcLogs) {
215
218
  // Pre-sort vcLogs by time for efficient lookups
216
219
  sortedVcLogs = _toConsumableArray(vcLogs).sort(function (a, b) {
@@ -329,18 +332,18 @@ var AbstractVCCalculatorBase = /*#__PURE__*/function () {
329
332
  }
330
333
 
331
334
  // Handle devtool callback
332
- if (v3RevisionDebugDetails && typeof ((_window3 = window) === null || _window3 === void 0 ? void 0 : _window3.__ufo_devtool_onVCRevisionReady__) === 'function' && !include3p) {
335
+ if (v3RevisionDebugDetails && typeof ((_window6 = window) === null || _window6 === void 0 ? void 0 : _window6.__ufo_devtool_onVCRevisionReady__) === 'function' && !include3p) {
333
336
  try {
334
- (_window4 = window) === null || _window4 === void 0 || (_window4$__ufo_devtoo = _window4.__ufo_devtool_onVCRevisionReady__) === null || _window4$__ufo_devtoo === void 0 || _window4$__ufo_devtoo.call(_window4, v3RevisionDebugDetails);
337
+ (_window7 = window) === null || _window7 === void 0 || (_window7$__ufo_devtoo = _window7.__ufo_devtool_onVCRevisionReady__) === null || _window7$__ufo_devtoo === void 0 || _window7$__ufo_devtoo.call(_window7, v3RevisionDebugDetails);
335
338
  } catch (e) {
336
339
  // if any error communicating with devtool, we don't want to break the app
337
340
  // eslint-disable-next-line no-console
338
341
  console.error('Error in onVCRevisionReady', e);
339
342
  }
340
343
  }
341
- if (v3RevisionDebugDetails && typeof ((_window5 = window) === null || _window5 === void 0 ? void 0 : _window5.__on_ufo_vc_debug_data_ready) === 'function' && !include3p) {
344
+ if (v3RevisionDebugDetails && typeof ((_window8 = window) === null || _window8 === void 0 ? void 0 : _window8.__on_ufo_vc_debug_data_ready) === 'function' && !include3p) {
342
345
  try {
343
- (_window6 = window) === null || _window6 === void 0 || (_window6$__on_ufo_vc_ = _window6.__on_ufo_vc_debug_data_ready) === null || _window6$__on_ufo_vc_ === void 0 || _window6$__on_ufo_vc_.call(_window6, v3RevisionDebugDetails);
346
+ (_window9 = window) === null || _window9 === void 0 || (_window9$__on_ufo_vc_ = _window9.__on_ufo_vc_debug_data_ready) === null || _window9$__on_ufo_vc_ === void 0 || _window9$__on_ufo_vc_.call(_window9, v3RevisionDebugDetails);
344
347
  } catch (e) {
345
348
  // eslint-disable-next-line no-console
346
349
  console.error('Error in onVCRevisionReady', e);
@@ -356,7 +359,7 @@ var AbstractVCCalculatorBase = /*#__PURE__*/function () {
356
359
  }
357
360
  }
358
361
  return _context.abrupt("return", vcDetails);
359
- case 40:
362
+ case 41:
360
363
  case "end":
361
364
  return _context.stop();
362
365
  }
@@ -37,9 +37,9 @@ export var THIRD_PARTY_BROWSER_EXTENSION_ATTRIBUTES = ['bis_skin_checked', 'cz-s
37
37
  // grammarly extensions
38
38
  'data-new-gr-c-s-loaded', 'data-gr-aaa-notch-connection-id', 'data-gr-aaa-loaded'];
39
39
  var VCCalculator_FY25_03 = /*#__PURE__*/function (_AbstractVCCalculator) {
40
- function VCCalculator_FY25_03() {
40
+ function VCCalculator_FY25_03(revisionNo) {
41
41
  _classCallCheck(this, VCCalculator_FY25_03);
42
- return _callSuper(this, VCCalculator_FY25_03, [REVISION_NO]);
42
+ return _callSuper(this, VCCalculator_FY25_03, [revisionNo !== null && revisionNo !== void 0 ? revisionNo : REVISION_NO]);
43
43
  }
44
44
  _inherits(VCCalculator_FY25_03, _AbstractVCCalculator);
45
45
  return _createClass(VCCalculator_FY25_03, [{
@@ -0,0 +1,36 @@
1
+ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
2
+ import _createClass from "@babel/runtime/helpers/createClass";
3
+ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
4
+ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
5
+ import _get from "@babel/runtime/helpers/get";
6
+ import _inherits from "@babel/runtime/helpers/inherits";
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
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
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 VCCalculator_FY25_03 from '../fy25_03';
11
+
12
+ // NOTE: `next` to be renamed `fy26.04` once stable
13
+ var REVISION_NO = 'next';
14
+ var getConsideredEntryTypes = function getConsideredEntryTypes() {
15
+ return ['mutation:display-contents-children-element'];
16
+ };
17
+
18
+ // NOTE: `VCNext` to be renamed `FY26_04` once stable
19
+ var VCNextCalculator = /*#__PURE__*/function (_VCCalculator_FY25_) {
20
+ function VCNextCalculator() {
21
+ _classCallCheck(this, VCNextCalculator);
22
+ return _callSuper(this, VCNextCalculator, [REVISION_NO]);
23
+ }
24
+ _inherits(VCNextCalculator, _VCCalculator_FY25_);
25
+ return _createClass(VCNextCalculator, [{
26
+ key: "isEntryIncluded",
27
+ value: function isEntryIncluded(entry, include3p) {
28
+ var isEntryIncludedInV3 = _superPropGet(VCNextCalculator, "isEntryIncluded", this, 3)([entry, include3p]);
29
+ if (isEntryIncludedInV3) {
30
+ return true;
31
+ }
32
+ return getConsideredEntryTypes().includes(entry.data.type);
33
+ }
34
+ }]);
35
+ }(VCCalculator_FY25_03);
36
+ export { VCNextCalculator as default };
@@ -117,7 +117,7 @@ var ViewportObserver = /*#__PURE__*/function () {
117
117
  _iterator = _createForOfIteratorHelper(addedNodes);
118
118
  _context2.prev = 4;
119
119
  _loop = /*#__PURE__*/_regeneratorRuntime.mark(function _loop() {
120
- var addedNodeRef, addedNode, ssrState, SSRStateEnum, _this$intersectionObs, _this$intersectionObs2, ssrPlaceholderHandler, _this$intersectionObs3, result, _this$intersectionObs4, sameDeletedNode, isInIgnoreLsMarker, _this$intersectionObs5, _this$intersectionObs6, _checkWithinComponent, isWithinThirdPartySegment, _this$intersectionObs7, validTargets, _iterator2, _step2, _this$intersectionObs8, validTarget, _this$intersectionObs9;
120
+ var addedNodeRef, addedNode, ssrState, SSRStateEnum, _this$intersectionObs, _this$intersectionObs2, ssrPlaceholderHandler, _this$intersectionObs3, result, _this$intersectionObs4, sameDeletedNode, isInIgnoreLsMarker, _this$intersectionObs5, _this$intersectionObs6, _checkWithinComponent, isWithinThirdPartySegment, _this$intersectionObs7, _window, _iterator2, _step2, child, _this$intersectionObs8, _this$intersectionObs9, validTargets, _iterator3, _step3, _this$intersectionObs0, validTarget, _this$intersectionObs1;
121
121
  return _regeneratorRuntime.wrap(function _loop$(_context) {
122
122
  while (1) switch (_context.prev = _context.next) {
123
123
  case 0:
@@ -229,25 +229,45 @@ var ViewportObserver = /*#__PURE__*/function () {
229
229
  (_this$intersectionObs7 = _this.intersectionObserver) === null || _this$intersectionObs7 === void 0 || _this$intersectionObs7.watchAndTag(addedNode, 'mutation:third-party-element');
230
230
  return _context.abrupt("return", 0);
231
231
  case 45:
232
- if (fg('platform_ufo_display_content_resolution_ttvc_v3')) {
233
- // Check if the target has display:content css property, return array of valid targets
234
- validTargets = checkCssProperty(addedNode);
235
- _iterator2 = _createForOfIteratorHelper(validTargets);
236
- try {
237
- for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
238
- validTarget = _step2.value;
239
- (_this$intersectionObs8 = _this.intersectionObserver) === null || _this$intersectionObs8 === void 0 || _this$intersectionObs8.watchAndTag(validTarget, createElementMutationsWatcher(removedNodeRects));
232
+ if (fg('platform_ufo_vcnext_v4_enabled')) {
233
+ if (((_window = window) === null || _window === void 0 || (_window = _window.getComputedStyle(addedNode)) === null || _window === void 0 ? void 0 : _window.display) === 'contents') {
234
+ _iterator2 = _createForOfIteratorHelper(addedNode.children);
235
+ try {
236
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
237
+ child = _step2.value;
238
+ if (child instanceof HTMLElement) {
239
+ (_this$intersectionObs8 = _this.intersectionObserver) === null || _this$intersectionObs8 === void 0 || _this$intersectionObs8.watchAndTag(child, 'mutation:display-contents-children-element');
240
+ }
241
+ }
242
+ } catch (err) {
243
+ _iterator2.e(err);
244
+ } finally {
245
+ _iterator2.f();
240
246
  }
241
- } catch (err) {
242
- _iterator2.e(err);
243
- } finally {
244
- _iterator2.f();
247
+ } else {
248
+ (_this$intersectionObs9 = _this.intersectionObserver) === null || _this$intersectionObs9 === void 0 || _this$intersectionObs9.watchAndTag(addedNode, createElementMutationsWatcher(removedNodeRects));
245
249
  }
246
250
  } else {
247
- if (fg('platform_ufo_display_content_track_occurrence')) {
248
- trackDisplayContentsOccurrence(addedNode);
251
+ if (fg('platform_ufo_display_content_resolution_ttvc_v3')) {
252
+ // Check if the target has display:content css property, return array of valid targets
253
+ validTargets = checkCssProperty(addedNode);
254
+ _iterator3 = _createForOfIteratorHelper(validTargets);
255
+ try {
256
+ for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
257
+ validTarget = _step3.value;
258
+ (_this$intersectionObs0 = _this.intersectionObserver) === null || _this$intersectionObs0 === void 0 || _this$intersectionObs0.watchAndTag(validTarget, createElementMutationsWatcher(removedNodeRects));
259
+ }
260
+ } catch (err) {
261
+ _iterator3.e(err);
262
+ } finally {
263
+ _iterator3.f();
264
+ }
265
+ } else {
266
+ if (fg('platform_ufo_display_content_track_occurrence')) {
267
+ trackDisplayContentsOccurrence(addedNode);
268
+ }
269
+ (_this$intersectionObs1 = _this.intersectionObserver) === null || _this$intersectionObs1 === void 0 || _this$intersectionObs1.watchAndTag(addedNode, createElementMutationsWatcher(removedNodeRects));
249
270
  }
250
- (_this$intersectionObs9 = _this.intersectionObserver) === null || _this$intersectionObs9 === void 0 || _this$intersectionObs9.watchAndTag(addedNode, createElementMutationsWatcher(removedNodeRects));
251
271
  }
252
272
  case 46:
253
273
  case "end":
@@ -294,12 +314,12 @@ var ViewportObserver = /*#__PURE__*/function () {
294
314
  };
295
315
  }());
296
316
  _defineProperty(this, "handleAttributeMutation", function (_ref6) {
297
- var _this$intersectionObs0;
317
+ var _this$intersectionObs10;
298
318
  var target = _ref6.target,
299
319
  attributeName = _ref6.attributeName,
300
320
  oldValue = _ref6.oldValue,
301
321
  newValue = _ref6.newValue;
302
- (_this$intersectionObs0 = _this.intersectionObserver) === null || _this$intersectionObs0 === void 0 || _this$intersectionObs0.watchAndTag(target, function (_ref7) {
322
+ (_this$intersectionObs10 = _this.intersectionObserver) === null || _this$intersectionObs10 === void 0 || _this$intersectionObs10.watchAndTag(target, function (_ref7) {
303
323
  var target = _ref7.target,
304
324
  rect = _ref7.rect;
305
325
  if (isContainedWithinMediaWrapper(target)) {
@@ -377,11 +397,11 @@ var ViewportObserver = /*#__PURE__*/function () {
377
397
  _defineProperty(this, "handleLayoutShift", function (_ref8) {
378
398
  var time = _ref8.time,
379
399
  changedRects = _ref8.changedRects;
380
- var _iterator3 = _createForOfIteratorHelper(changedRects),
381
- _step3;
400
+ var _iterator4 = _createForOfIteratorHelper(changedRects),
401
+ _step4;
382
402
  try {
383
- for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
384
- var changedRect = _step3.value;
403
+ for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
404
+ var changedRect = _step4.value;
385
405
  var target = changedRect.node;
386
406
  if (target) {
387
407
  _this.onChange({
@@ -395,9 +415,9 @@ var ViewportObserver = /*#__PURE__*/function () {
395
415
  }
396
416
  }
397
417
  } catch (err) {
398
- _iterator3.e(err);
418
+ _iterator4.e(err);
399
419
  } finally {
400
- _iterator3.f();
420
+ _iterator4.f();
401
421
  }
402
422
  });
403
423
  this.mapVisibleNodeRects = new WeakMap();
@@ -454,12 +474,12 @@ var ViewportObserver = /*#__PURE__*/function () {
454
474
  }, {
455
475
  key: "stop",
456
476
  value: function stop() {
457
- var _this$mutationObserve2, _this$intersectionObs1, _this$performanceObse2;
477
+ var _this$mutationObserve2, _this$intersectionObs11, _this$performanceObse2;
458
478
  if (!this.isStarted) {
459
479
  return;
460
480
  }
461
481
  (_this$mutationObserve2 = this.mutationObserver) === null || _this$mutationObserve2 === void 0 || _this$mutationObserve2.disconnect();
462
- (_this$intersectionObs1 = this.intersectionObserver) === null || _this$intersectionObs1 === void 0 || _this$intersectionObs1.disconnect();
482
+ (_this$intersectionObs11 = this.intersectionObserver) === null || _this$intersectionObs11 === void 0 || _this$intersectionObs11.disconnect();
463
483
  (_this$performanceObse2 = this.performanceObserver) === null || _this$performanceObse2 === void 0 || _this$performanceObse2.disconnect();
464
484
  this.isStarted = false;
465
485
  // Clean up caches when stopping
@@ -35,7 +35,7 @@ type SegmentThreshold = {
35
35
  type Rates = {
36
36
  readonly [key: string]: number;
37
37
  };
38
- export type TTVCRevision = 'fy25.01' | 'fy25.02' | 'fy25.03';
38
+ export type TTVCRevision = 'fy25.01' | 'fy25.02' | 'fy25.03' | 'next';
39
39
  export declare const DEFAULT_TTVC_REVISION = "fy25.03";
40
40
  export declare const UNKNOWN_INTERACTION_RATE = 1000;
41
41
  export type ReactHydrationStats = {
@@ -91,7 +91,7 @@ declare function createInteractionExtraLogPayload(interactionId: string, interac
91
91
  abortedByInteractionName: string | undefined;
92
92
  end: number;
93
93
  start: number;
94
- 'metric:ttai:3p': number | undefined;
94
+ 'metric:ttai:3p': number;
95
95
  };
96
96
  'vc:effective:revision': string;
97
97
  };
@@ -4,7 +4,7 @@ export declare const KNOWN_ATTRIBUTES_THAT_DOES_NOT_CAUSE_LAYOUT_SHIFTS: string[
4
4
  export declare const NON_VISUAL_ARIA_ATTRIBUTES: string[];
5
5
  export declare const THIRD_PARTY_BROWSER_EXTENSION_ATTRIBUTES: string[];
6
6
  export default class VCCalculator_FY25_03 extends AbstractVCCalculatorBase {
7
- constructor();
7
+ constructor(revisionNo?: string);
8
8
  protected isEntryIncluded(entry: VCObserverEntry, include3p?: boolean): boolean;
9
9
  protected getVCCleanStatus(filteredEntries: readonly VCObserverEntry[]): {
10
10
  isVCClean: boolean;
@@ -0,0 +1,6 @@
1
+ import type { VCObserverEntry } from '../../types';
2
+ import VCCalculator_FY25_03 from '../fy25_03';
3
+ export default class VCNextCalculator extends VCCalculator_FY25_03 {
4
+ constructor();
5
+ protected isEntryIncluded(entry: VCObserverEntry, include3p?: boolean): boolean;
6
+ }
@@ -1,5 +1,5 @@
1
1
  import type { ObservedWindowEvent } from './window-event-observer';
2
- export type VCObserverEntryType = 'mutation:child-element' | 'mutation:remount' | 'mutation:element' | 'mutation:element-replacement' | 'mutation:attribute:no-layout-shift' | 'mutation:attribute:non-visual-style' | 'mutation:attribute' | 'mutation:media' | 'mutation:rll-placeholder' | 'mutation:third-party-element' | 'mutation:ssr-placeholder' | 'layout-shift' | 'window:event' | 'ssr-hydration' | 'unknown';
2
+ export type VCObserverEntryType = 'mutation:child-element' | 'mutation:remount' | 'mutation:element' | 'mutation:element-replacement' | 'mutation:display-contents-children-element' | 'mutation:attribute:no-layout-shift' | 'mutation:attribute:non-visual-style' | 'mutation:attribute' | 'mutation:media' | 'mutation:rll-placeholder' | 'mutation:third-party-element' | 'mutation:ssr-placeholder' | 'layout-shift' | 'window:event' | 'ssr-hydration' | 'unknown';
3
3
  export type ViewportEntryData = {
4
4
  readonly type: VCObserverEntryType;
5
5
  readonly elementName: string;
@@ -35,7 +35,7 @@ type SegmentThreshold = {
35
35
  type Rates = {
36
36
  readonly [key: string]: number;
37
37
  };
38
- export type TTVCRevision = 'fy25.01' | 'fy25.02' | 'fy25.03';
38
+ export type TTVCRevision = 'fy25.01' | 'fy25.02' | 'fy25.03' | 'next';
39
39
  export declare const DEFAULT_TTVC_REVISION = "fy25.03";
40
40
  export declare const UNKNOWN_INTERACTION_RATE = 1000;
41
41
  export type ReactHydrationStats = {
@@ -91,7 +91,7 @@ declare function createInteractionExtraLogPayload(interactionId: string, interac
91
91
  abortedByInteractionName: string | undefined;
92
92
  end: number;
93
93
  start: number;
94
- 'metric:ttai:3p': number | undefined;
94
+ 'metric:ttai:3p': number;
95
95
  };
96
96
  'vc:effective:revision': string;
97
97
  };
@@ -4,7 +4,7 @@ export declare const KNOWN_ATTRIBUTES_THAT_DOES_NOT_CAUSE_LAYOUT_SHIFTS: string[
4
4
  export declare const NON_VISUAL_ARIA_ATTRIBUTES: string[];
5
5
  export declare const THIRD_PARTY_BROWSER_EXTENSION_ATTRIBUTES: string[];
6
6
  export default class VCCalculator_FY25_03 extends AbstractVCCalculatorBase {
7
- constructor();
7
+ constructor(revisionNo?: string);
8
8
  protected isEntryIncluded(entry: VCObserverEntry, include3p?: boolean): boolean;
9
9
  protected getVCCleanStatus(filteredEntries: readonly VCObserverEntry[]): {
10
10
  isVCClean: boolean;
@@ -0,0 +1,6 @@
1
+ import type { VCObserverEntry } from '../../types';
2
+ import VCCalculator_FY25_03 from '../fy25_03';
3
+ export default class VCNextCalculator extends VCCalculator_FY25_03 {
4
+ constructor();
5
+ protected isEntryIncluded(entry: VCObserverEntry, include3p?: boolean): boolean;
6
+ }
@@ -1,5 +1,5 @@
1
1
  import type { ObservedWindowEvent } from './window-event-observer';
2
- export type VCObserverEntryType = 'mutation:child-element' | 'mutation:remount' | 'mutation:element' | 'mutation:element-replacement' | 'mutation:attribute:no-layout-shift' | 'mutation:attribute:non-visual-style' | 'mutation:attribute' | 'mutation:media' | 'mutation:rll-placeholder' | 'mutation:third-party-element' | 'mutation:ssr-placeholder' | 'layout-shift' | 'window:event' | 'ssr-hydration' | 'unknown';
2
+ export type VCObserverEntryType = 'mutation:child-element' | 'mutation:remount' | 'mutation:element' | 'mutation:element-replacement' | 'mutation:display-contents-children-element' | 'mutation:attribute:no-layout-shift' | 'mutation:attribute:non-visual-style' | 'mutation:attribute' | 'mutation:media' | 'mutation:rll-placeholder' | 'mutation:third-party-element' | 'mutation:ssr-placeholder' | 'layout-shift' | 'window:event' | 'ssr-hydration' | 'unknown';
3
3
  export type ViewportEntryData = {
4
4
  readonly type: VCObserverEntryType;
5
5
  readonly elementName: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/react-ufo",
3
- "version": "4.7.5",
3
+ "version": "4.8.0",
4
4
  "description": "Parts of React UFO that are publicly available",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -84,6 +84,9 @@
84
84
  "platform_ufo_canvas_heatmap_full_precision": {
85
85
  "type": "boolean"
86
86
  },
87
+ "platform_ufo_vcnext_v4_enabled": {
88
+ "type": "boolean"
89
+ },
87
90
  "platform_ufo_enable_minor_interactions": {
88
91
  "type": "boolean"
89
92
  },
@@ -108,6 +111,9 @@
108
111
  "platform_ufo_enable_timeout_config": {
109
112
  "type": "boolean"
110
113
  },
114
+ "platform_ufo_fix_post_interaction_check_vc_debug": {
115
+ "type": "boolean"
116
+ },
111
117
  "platform_ufo_critical_metrics_payload": {
112
118
  "type": "boolean"
113
119
  },