@atlaskit/react-ufo 3.13.5 → 3.13.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @atlaskit/ufo-interaction-ignore
2
2
 
3
+ ## 3.13.7
4
+
5
+ ### Patch Changes
6
+
7
+ - [#160483](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/160483)
8
+ [`b814d89d571f0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b814d89d571f0) -
9
+ Extending VC to report how much SSR contributes to VC
10
+
11
+ ## 3.13.6
12
+
13
+ ### Patch Changes
14
+
15
+ - [#160721](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/160721)
16
+ [`5116c586702ba`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5116c586702ba) -
17
+ FG cleanup - platform_ufo_post_interaction_use_vc_rev
18
+
3
19
  ## 3.13.5
4
20
 
5
21
  ### Patch Changes
@@ -22,7 +22,7 @@ function getVCMetrics(_x) {
22
22
  }
23
23
  function _getVCMetrics() {
24
24
  _getVCMetrics = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(interaction) {
25
- var _config$vc, _config$vc$ssrWhiteli, _interaction$apdex, _config$experimentalI, _result$ufoVcRev;
25
+ var _config$vc, _config$vc$ssrWhiteli, _interaction$apdex, _config$vc2, _config$experimentalI, _result$ufoVcRev;
26
26
  var config, interactionStatus, pageVisibilityUpToTTAI, shouldReportVCMetrics, isSSREnabled, ssr, tti, prefix, result, mostRecentVCRevision, mostRecentVCRevisionPayload;
27
27
  return _regenerator.default.wrap(function _callee$(_context) {
28
28
  while (1) switch (_context.prev = _context.next) {
@@ -66,7 +66,8 @@ function _getVCMetrics() {
66
66
  vc: interaction.vc,
67
67
  isEventAborted: interactionStatus.originalInteractionStatus !== 'SUCCEEDED',
68
68
  experienceKey: interaction.ufoName,
69
- interactionId: interaction.id
69
+ interactionId: interaction.id,
70
+ includeSSRRatio: (_config$vc2 = config.vc) === null || _config$vc2 === void 0 ? void 0 : _config$vc2.includeSSRRatio
70
71
  }, ssr));
71
72
  case 18:
72
73
  result = _context.sent;
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.default = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
9
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
10
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
11
10
  var _coinflip = _interopRequireDefault(require("../coinflip"));
12
11
  var _config = require("../config");
13
12
  var _utils = require("../create-payload/common/utils");
@@ -153,70 +152,35 @@ function createPostInteractionLogPayload(_ref2) {
153
152
  var lastInteractionFinishTTAI = Math.round(lastInteractionFinish.end - lastInteractionFinish.start);
154
153
  var lastInteractionFinishVC90 = null;
155
154
  var lastInteractionFinishVCClean = false;
156
- if ((0, _platformFeatureFlags.fg)('platform_ufo_post_interaction_use_vc_rev')) {
157
- var lastInteractionFinishVCRev = lastInteractionFinishVCResult === null || lastInteractionFinishVCResult === void 0 ? void 0 : lastInteractionFinishVCResult['ufo:vc:rev'];
158
- var lastInteractionFinishRevision = lastInteractionFinishVCRev === null || lastInteractionFinishVCRev === void 0 ? void 0 : lastInteractionFinishVCRev.find(function (_ref3) {
159
- var revision = _ref3.revision;
160
- return revision === 'fy25.02';
161
- });
162
- if (lastInteractionFinishRevision !== null && lastInteractionFinishRevision !== void 0 && lastInteractionFinishRevision.clean) {
163
- var _lastInteractionFinis;
164
- lastInteractionFinishVCClean = true;
165
- lastInteractionFinishVC90 = (_lastInteractionFinis = lastInteractionFinishRevision['metric:vc90']) !== null && _lastInteractionFinis !== void 0 ? _lastInteractionFinis : null;
166
- }
167
- } else {
168
- if (lastInteractionFinishVCResult !== null && lastInteractionFinishVCResult !== void 0 && lastInteractionFinishVCResult['ufo:vc:state']) {
169
- var _lastInteractionFinis2;
170
- lastInteractionFinishVCClean = true;
171
- var lastInteractionFinishVCMetrics = lastInteractionFinishVCResult === null || lastInteractionFinishVCResult === void 0 ? void 0 : lastInteractionFinishVCResult['metrics:vc'];
172
- lastInteractionFinishVC90 = (_lastInteractionFinis2 = lastInteractionFinishVCMetrics[90]) !== null && _lastInteractionFinis2 !== void 0 ? _lastInteractionFinis2 : null;
173
- }
155
+ var lastInteractionFinishVCRev = lastInteractionFinishVCResult === null || lastInteractionFinishVCResult === void 0 ? void 0 : lastInteractionFinishVCResult['ufo:vc:rev'];
156
+ var lastInteractionFinishRevision = lastInteractionFinishVCRev === null || lastInteractionFinishVCRev === void 0 ? void 0 : lastInteractionFinishVCRev.find(function (_ref3) {
157
+ var revision = _ref3.revision;
158
+ return revision === 'fy25.02';
159
+ });
160
+ if (lastInteractionFinishRevision !== null && lastInteractionFinishRevision !== void 0 && lastInteractionFinishRevision.clean) {
161
+ var _lastInteractionFinis;
162
+ lastInteractionFinishVCClean = true;
163
+ lastInteractionFinishVC90 = (_lastInteractionFinis = lastInteractionFinishRevision['metric:vc90']) !== null && _lastInteractionFinis !== void 0 ? _lastInteractionFinis : null;
174
164
  }
175
165
  var postInteractionFinishVCRatios = {};
176
166
  var postInteractionFinishVCClean = false;
177
167
  var revisedVC90 = null;
178
168
  var lateMutations = [];
179
- if ((0, _platformFeatureFlags.fg)('platform_ufo_post_interaction_use_vc_rev')) {
180
- var postInteractionFinishVCRev = postInteractionFinishVCResult === null || postInteractionFinishVCResult === void 0 ? void 0 : postInteractionFinishVCResult['ufo:vc:rev'];
181
- var postInteractionFinishRevision = postInteractionFinishVCRev === null || postInteractionFinishVCRev === void 0 ? void 0 : postInteractionFinishVCRev.find(function (_ref4) {
182
- var revision = _ref4.revision;
183
- return revision === 'fy25.02';
184
- });
185
- if (postInteractionFinishRevision !== null && postInteractionFinishRevision !== void 0 && postInteractionFinishRevision.clean) {
186
- postInteractionFinishVCClean = true;
187
- postInteractionFinishVCRatios = postInteractionFinishVCResult === null || postInteractionFinishVCResult === void 0 ? void 0 : postInteractionFinishVCResult['ufo:vc:ratios'];
188
- if (typeof lastInteractionFinishVC90 === 'number') {
189
- var _postInteractionFinis;
190
- revisedVC90 = (_postInteractionFinis = postInteractionFinishRevision['metric:vc90']) !== null && _postInteractionFinis !== void 0 ? _postInteractionFinis : null;
191
- }
192
- var vcDetails = postInteractionFinishRevision.vcDetails;
193
- if (vcDetails) {
194
- lateMutations = (0, _getLateMutations.default)(vcDetails, lastInteractionFinish, postInteractionFinishVCRatios);
195
- }
169
+ var postInteractionFinishVCRev = postInteractionFinishVCResult === null || postInteractionFinishVCResult === void 0 ? void 0 : postInteractionFinishVCResult['ufo:vc:rev'];
170
+ var postInteractionFinishRevision = postInteractionFinishVCRev === null || postInteractionFinishVCRev === void 0 ? void 0 : postInteractionFinishVCRev.find(function (_ref4) {
171
+ var revision = _ref4.revision;
172
+ return revision === 'fy25.02';
173
+ });
174
+ if (postInteractionFinishRevision !== null && postInteractionFinishRevision !== void 0 && postInteractionFinishRevision.clean) {
175
+ postInteractionFinishVCClean = true;
176
+ postInteractionFinishVCRatios = postInteractionFinishVCResult === null || postInteractionFinishVCResult === void 0 ? void 0 : postInteractionFinishVCResult['ufo:vc:ratios'];
177
+ if (typeof lastInteractionFinishVC90 === 'number') {
178
+ var _postInteractionFinis;
179
+ revisedVC90 = (_postInteractionFinis = postInteractionFinishRevision['metric:vc90']) !== null && _postInteractionFinis !== void 0 ? _postInteractionFinis : null;
196
180
  }
197
- } else {
198
- if (postInteractionFinishVCResult !== null && postInteractionFinishVCResult !== void 0 && postInteractionFinishVCResult['ufo:vc:state']) {
199
- postInteractionFinishVCClean = true;
200
- postInteractionFinishVCRatios = postInteractionFinishVCResult === null || postInteractionFinishVCResult === void 0 ? void 0 : postInteractionFinishVCResult['ufo:vc:ratios'];
201
- var postInteractionFinishVCUpdates = postInteractionFinishVCResult === null || postInteractionFinishVCResult === void 0 ? void 0 : postInteractionFinishVCResult['ufo:vc:updates'];
202
- var postInteractionFinishVCMetrics = postInteractionFinishVCResult === null || postInteractionFinishVCResult === void 0 ? void 0 : postInteractionFinishVCResult['metrics:vc'];
203
- if (typeof lastInteractionFinishVC90 === 'number') {
204
- var _postInteractionFinis2;
205
- revisedVC90 = (_postInteractionFinis2 = postInteractionFinishVCMetrics[90]) !== null && _postInteractionFinis2 !== void 0 ? _postInteractionFinis2 : null;
206
- }
207
- lateMutations = postInteractionFinishVCUpdates ? postInteractionFinishVCUpdates.filter(function (entry) {
208
- return entry.time > lastInteractionFinish.end;
209
- }).flatMap(function (_ref5) {
210
- var time = _ref5.time,
211
- elements = _ref5.elements;
212
- return Array.from(new Set(elements)).map(function (element) {
213
- return {
214
- time: time,
215
- element: element,
216
- viewportHeatmapPercentage: postInteractionFinishVCRatios[element]
217
- };
218
- });
219
- }) : [];
181
+ var vcDetails = postInteractionFinishRevision.vcDetails;
182
+ if (vcDetails) {
183
+ lateMutations = (0, _getLateMutations.default)(vcDetails, lastInteractionFinish, postInteractionFinishVCRatios);
220
184
  }
221
185
  }
222
186
  return {
@@ -103,11 +103,11 @@ var VCObserver = exports.VCObserver = /*#__PURE__*/function () {
103
103
  });
104
104
  (0, _defineProperty2.default)(this, "getVCResult", /*#__PURE__*/function () {
105
105
  var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(_ref3) {
106
- var start, stop, tti, prefix, ssr, vc, isEventAborted, experienceKey, interactionId, startTime, fullPrefix, rawData, abortReason, abortReasonInfo, heatmap, heatmapNext, outOfBoundaryInfo, totalTime, componentsLog, viewport, devToolsEnabled, ratios, isTTVCv1Disabled, vcAbortedResultWithRevisions, ttvcV1Result, VC, VCBox, VCEntries, totalPainted, _componentsLog, vcNext, outOfBoundary, stopTime, ttvcV1DevToolInfo, ttvcV2DevToolInfo, _ufo_devtool_onVCRev2, _ref10, _ufo_devtool_onVCRev, _ref9, isVCClean, revisionsData, speedIndex, isTTVCv3Enabled;
106
+ var start, stop, tti, prefix, ssr, vc, isEventAborted, experienceKey, interactionId, includeSSRRatio, startTime, fullPrefix, rawData, abortReason, abortReasonInfo, heatmap, heatmapNext, outOfBoundaryInfo, totalTime, componentsLog, viewport, devToolsEnabled, ratios, isTTVCv1Disabled, vcAbortedResultWithRevisions, ttvcV1Result, VC, VCBox, VCEntries, totalPainted, _componentsLog, vcNext, outOfBoundary, stopTime, ttvcV1DevToolInfo, ttvcV2DevToolInfo, _ufo_devtool_onVCRev2, _ref10, _ufo_devtool_onVCRev, _ref9, isVCClean, revisionsData, speedIndex, SSRRatio, SSRRatioNext, SSRRatioPayload, isTTVCv3Enabled;
107
107
  return _regenerator.default.wrap(function _callee$(_context) {
108
108
  while (1) switch (_context.prev = _context.next) {
109
109
  case 0:
110
- start = _ref3.start, stop = _ref3.stop, tti = _ref3.tti, prefix = _ref3.prefix, ssr = _ref3.ssr, vc = _ref3.vc, isEventAborted = _ref3.isEventAborted, experienceKey = _ref3.experienceKey, interactionId = _ref3.interactionId;
110
+ start = _ref3.start, stop = _ref3.stop, tti = _ref3.tti, prefix = _ref3.prefix, ssr = _ref3.ssr, vc = _ref3.vc, isEventAborted = _ref3.isEventAborted, experienceKey = _ref3.experienceKey, interactionId = _ref3.interactionId, includeSSRRatio = _ref3.includeSSRRatio;
111
111
  startTime = performance.now(); // add local measurement
112
112
  fullPrefix = prefix !== undefined && prefix !== '' ? "".concat(prefix, ":") : '';
113
113
  rawData = vc !== undefined ? vc : _this.getVCRawData();
@@ -172,7 +172,8 @@ var VCObserver = exports.VCObserver = /*#__PURE__*/function () {
172
172
  heatmap: heatmap,
173
173
  ssr: ssr,
174
174
  componentsLog: _objectSpread({}, componentsLog),
175
- viewport: viewport
175
+ viewport: viewport,
176
+ fixSSRAttribution: includeSSRRatio
176
177
  });
177
178
  VC = ttvcV1Result.VC, VCBox = ttvcV1Result.VCBox, VCEntries = ttvcV1Result.VCEntries, totalPainted = ttvcV1Result.totalPainted;
178
179
  _componentsLog = {};
@@ -189,7 +190,8 @@ var VCObserver = exports.VCObserver = /*#__PURE__*/function () {
189
190
  heatmap: heatmapNext,
190
191
  ssr: ssr,
191
192
  componentsLog: _componentsLog,
192
- viewport: viewport
193
+ viewport: viewport,
194
+ fixSSRAttribution: includeSSRRatio
193
195
  });
194
196
  try {
195
197
  if (!_this.isPostInteraction) {
@@ -333,17 +335,20 @@ var VCObserver = exports.VCObserver = /*#__PURE__*/function () {
333
335
  experienceKey: experienceKey
334
336
  });
335
337
  speedIndex = (0, _defineProperty2.default)((0, _defineProperty2.default)({}, "ufo:speedIndex", isTTVCv1Disabled ? vcNext.VCEntries.speedIndex : VCEntries.speedIndex), "ufo:next:speedIndex", vcNext.VCEntries.speedIndex);
338
+ SSRRatio = VCObserver.getSSRRatio(VCEntries.rel, ssr);
339
+ SSRRatioNext = VCObserver.getSSRRatio(vcNext.VCEntries.rel, ssr);
340
+ SSRRatioPayload = includeSSRRatio ? (0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(fullPrefix, "vc:ssrRatio"), isTTVCv1Disabled ? SSRRatioNext : SSRRatio), "".concat(fullPrefix, "vc:next:ssrRatio"), SSRRatioNext) : {};
336
341
  if (!isTTVCv1Disabled) {
337
- _context.next = 32;
342
+ _context.next = 35;
338
343
  break;
339
344
  }
340
- return _context.abrupt("return", _objectSpread(_objectSpread(_objectSpread((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(fullPrefix, "vc:size"), viewport), "".concat(fullPrefix, "vc:time"), Math.round(totalTime + (stopTime - startTime))), "".concat(fullPrefix, "vc:ratios"), ratios), outOfBoundary), {}, (0, _defineProperty2.default)({}, "".concat(fullPrefix, "vc:ignored"), _this.getIgnoredElements(componentsLog)), revisionsData), speedIndex));
341
- case 32:
345
+ return _context.abrupt("return", _objectSpread(_objectSpread(_objectSpread(_objectSpread((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(fullPrefix, "vc:size"), viewport), "".concat(fullPrefix, "vc:time"), Math.round(totalTime + (stopTime - startTime))), "".concat(fullPrefix, "vc:ratios"), ratios), outOfBoundary), {}, (0, _defineProperty2.default)({}, "".concat(fullPrefix, "vc:ignored"), _this.getIgnoredElements(componentsLog)), SSRRatioPayload), {}, (0, _defineProperty2.default)({}, "".concat(fullPrefix, "vc:ssrRatio"), SSRRatioNext), revisionsData), speedIndex));
346
+ case 35:
342
347
  isTTVCv3Enabled = (0, _config.isVCRevisionEnabled)('fy25.03', experienceKey);
343
- return _context.abrupt("return", _objectSpread(_objectSpread(_objectSpread((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({
348
+ return _context.abrupt("return", _objectSpread(_objectSpread(_objectSpread(_objectSpread((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({
344
349
  'metrics:vc': VC
345
- }, "".concat(fullPrefix, "vc:state"), true), "".concat(fullPrefix, "vc:clean"), isVCClean), "".concat(fullPrefix, "vc:dom"), VCBox), "".concat(fullPrefix, "vc:updates"), isTTVCv3Enabled ? undefined : VCEntries.rel.slice(0, 50)), "".concat(fullPrefix, "vc:size"), viewport), "".concat(fullPrefix, "vc:time"), Math.round(totalTime + (stopTime - startTime))), "".concat(fullPrefix, "vc:total"), totalPainted), "".concat(fullPrefix, "vc:ratios"), ratios), outOfBoundary), {}, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(fullPrefix, "vc:next"), vcNext.VC), "".concat(fullPrefix, "vc:next:updates"), isTTVCv3Enabled ? undefined : vcNext.VCEntries.rel.slice(0, 50)), "".concat(fullPrefix, "vc:next:dom"), vcNext.VCBox), "".concat(fullPrefix, "vc:ignored"), _this.getIgnoredElements(componentsLog)), revisionsData), speedIndex));
346
- case 34:
350
+ }, "".concat(fullPrefix, "vc:state"), true), "".concat(fullPrefix, "vc:clean"), isVCClean), "".concat(fullPrefix, "vc:dom"), VCBox), "".concat(fullPrefix, "vc:updates"), isTTVCv3Enabled ? undefined : VCEntries.rel.slice(0, 50)), "".concat(fullPrefix, "vc:size"), viewport), "".concat(fullPrefix, "vc:time"), Math.round(totalTime + (stopTime - startTime))), "".concat(fullPrefix, "vc:total"), totalPainted), "".concat(fullPrefix, "vc:ratios"), ratios), "".concat(fullPrefix, "vc:ssrRatio"), SSRRatio), outOfBoundary), {}, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(fullPrefix, "vc:next"), vcNext.VC), "".concat(fullPrefix, "vc:next:updates"), isTTVCv3Enabled ? undefined : vcNext.VCEntries.rel.slice(0, 50)), "".concat(fullPrefix, "vc:next:dom"), vcNext.VCBox), SSRRatioPayload), {}, (0, _defineProperty2.default)({}, "".concat(fullPrefix, "vc:ignored"), _this.getIgnoredElements(componentsLog)), revisionsData), speedIndex));
351
+ case 37:
347
352
  case "end":
348
353
  return _context.stop();
349
354
  }
@@ -436,10 +441,10 @@ var VCObserver = exports.VCObserver = /*#__PURE__*/function () {
436
441
  _this.detachAbortListeners();
437
442
  var unbinds = (0, _attachAbortListeners.attachAbortListeners)(window, _this.viewport, _this.abortReasonCallback);
438
443
  if ((_window = window) !== null && _window !== void 0 && _window.__SSR_ABORT_LISTENERS__) {
439
- Object.entries(window.__SSR_ABORT_LISTENERS__.aborts).forEach(function (_ref11) {
440
- var _ref12 = (0, _slicedToArray2.default)(_ref11, 2),
441
- key = _ref12[0],
442
- time = _ref12[1];
444
+ Object.entries(window.__SSR_ABORT_LISTENERS__.aborts).forEach(function (_ref12) {
445
+ var _ref13 = (0, _slicedToArray2.default)(_ref12, 2),
446
+ key = _ref13[0],
447
+ time = _ref13[1];
443
448
  if (time) {
444
449
  _this.abortReasonCallback(key, time);
445
450
  }
@@ -469,8 +474,8 @@ var VCObserver = exports.VCObserver = /*#__PURE__*/function () {
469
474
  }
470
475
  return (0, _createClass2.default)(VCObserver, [{
471
476
  key: "start",
472
- value: function start(_ref13) {
473
- var startTime = _ref13.startTime;
477
+ value: function start(_ref14) {
478
+ var startTime = _ref14.startTime;
474
479
  this.active = true;
475
480
  if (this.observers.isBrowserSupported()) {
476
481
  this.setViewportSize();
@@ -492,12 +497,12 @@ var VCObserver = exports.VCObserver = /*#__PURE__*/function () {
492
497
  }, {
493
498
  key: "getIgnoredElements",
494
499
  value: function getIgnoredElements(componentsLog) {
495
- return Object.values(componentsLog).flat().filter(function (_ref14) {
496
- var ignoreReason = _ref14.ignoreReason;
500
+ return Object.values(componentsLog).flat().filter(function (_ref15) {
501
+ var ignoreReason = _ref15.ignoreReason;
497
502
  return Boolean(ignoreReason);
498
- }).map(function (_ref15) {
499
- var targetName = _ref15.targetName,
500
- ignoreReason = _ref15.ignoreReason;
503
+ }).map(function (_ref16) {
504
+ var targetName = _ref16.targetName,
505
+ ignoreReason = _ref16.ignoreReason;
501
506
  return {
502
507
  targetName: targetName,
503
508
  ignoreReason: ignoreReason
@@ -614,16 +619,30 @@ var VCObserver = exports.VCObserver = /*#__PURE__*/function () {
614
619
  this._startMeasureTimestamp = -1;
615
620
  }
616
621
  }], [{
622
+ key: "getSSRRatio",
623
+ value: function getSSRRatio(entries, ssr) {
624
+ if (ssr === undefined || entries.length === 0) {
625
+ return undefined;
626
+ }
627
+ var maybeSSR = entries[0];
628
+ if (maybeSSR.elements[0] === 'SSR') {
629
+ return maybeSSR.vc;
630
+ }
631
+ return 0;
632
+ }
633
+ }, {
617
634
  key: "calculateVC",
618
- value: function calculateVC(_ref16) {
619
- var heatmap = _ref16.heatmap,
620
- _ref16$ssr = _ref16.ssr,
621
- ssr = _ref16$ssr === void 0 ? UNUSED_SECTOR : _ref16$ssr,
622
- componentsLog = _ref16.componentsLog,
623
- viewport = _ref16.viewport;
635
+ value: function calculateVC(_ref17) {
636
+ var heatmap = _ref17.heatmap,
637
+ _ref17$ssr = _ref17.ssr,
638
+ ssr = _ref17$ssr === void 0 ? UNUSED_SECTOR : _ref17$ssr,
639
+ componentsLog = _ref17.componentsLog,
640
+ viewport = _ref17.viewport,
641
+ fixSSRAttribution = _ref17.fixSSRAttribution;
624
642
  var lastUpdate = {};
625
643
  var totalPainted = 0;
626
- if (ssr !== UNUSED_SECTOR) {
644
+ var ssrTime = fixSSRAttribution ? Math.floor(ssr) : ssr;
645
+ if (ssrTime !== UNUSED_SECTOR) {
627
646
  var _window$document;
628
647
  var element = {
629
648
  __debug__element: new WeakRef((_window$document = window.document) === null || _window$document === void 0 ? void 0 : _window$document.body),
@@ -642,14 +661,14 @@ var VCObserver = exports.VCObserver = /*#__PURE__*/function () {
642
661
  },
643
662
  targetName: 'SSR'
644
663
  };
645
- if (!componentsLog[ssr]) {
646
- componentsLog[ssr] = [];
664
+ if (!componentsLog[ssrTime]) {
665
+ componentsLog[ssrTime] = [];
647
666
  }
648
- componentsLog[ssr].push(element);
667
+ componentsLog[ssrTime].push(element);
649
668
  }
650
669
  heatmap.forEach(function (line) {
651
670
  line.forEach(function (entry) {
652
- var rounded = Math.floor(entry === UNUSED_SECTOR && ssr !== UNUSED_SECTOR ? ssr : entry);
671
+ var rounded = Math.floor(entry === UNUSED_SECTOR && ssrTime !== UNUSED_SECTOR ? ssrTime : entry);
653
672
  totalPainted += rounded !== UNUSED_SECTOR ? 1 : 0;
654
673
  if (rounded !== UNUSED_SECTOR) {
655
674
  lastUpdate[rounded] = lastUpdate[rounded] ? lastUpdate[rounded] + 1 : 1;
@@ -686,11 +705,11 @@ var VCObserver = exports.VCObserver = /*#__PURE__*/function () {
686
705
  });
687
706
  return VCRatio;
688
707
  }, 0);
689
- var VCEntries = entries.reduce(function (acc, _ref17, i) {
708
+ var VCEntries = entries.reduce(function (acc, _ref18, i) {
690
709
  var _acc$abs, _componentsLog$timest, _acc$rel$vc, _acc$rel;
691
- var _ref18 = (0, _slicedToArray2.default)(_ref17, 2),
692
- timestamp = _ref18[0],
693
- entryPainted = _ref18[1];
710
+ var _ref19 = (0, _slicedToArray2.default)(_ref18, 2),
711
+ timestamp = _ref19[0],
712
+ entryPainted = _ref19[1];
694
713
  var currentlyPainted = entryPainted + (((_acc$abs = acc.abs[i - 1]) === null || _acc$abs === void 0 ? void 0 : _acc$abs[1]) || 0);
695
714
  var currentlyPaintedRatio = Math.round(currentlyPainted / totalPainted * 1000) / 10;
696
715
  var logEntry = (0, _toConsumableArray2.default)(new Set((_componentsLog$timest = componentsLog[timestamp]) === null || _componentsLog$timest === void 0 ? void 0 : _componentsLog$timest.filter(function (v) {
@@ -6,7 +6,7 @@ import getInteractionStatus from './get-interaction-status';
6
6
  import getPageVisibilityUpToTTAI from './get-page-visibility-up-to-ttai';
7
7
  import getSSRDoneTimeValue from './get-ssr-done-time-value';
8
8
  async function getVCMetrics(interaction) {
9
- var _config$vc, _config$vc$ssrWhiteli, _interaction$apdex, _interaction$apdex$, _config$experimentalI, _result$ufoVcRev;
9
+ var _config$vc, _config$vc$ssrWhiteli, _interaction$apdex, _interaction$apdex$, _config$vc2, _config$experimentalI, _result$ufoVcRev;
10
10
  const config = getConfig();
11
11
  if (!(config !== null && config !== void 0 && (_config$vc = config.vc) !== null && _config$vc !== void 0 && _config$vc.enabled)) {
12
12
  return {};
@@ -37,6 +37,7 @@ async function getVCMetrics(interaction) {
37
37
  isEventAborted: interactionStatus.originalInteractionStatus !== 'SUCCEEDED',
38
38
  experienceKey: interaction.ufoName,
39
39
  interactionId: interaction.id,
40
+ includeSSRRatio: (_config$vc2 = config.vc) === null || _config$vc2 === void 0 ? void 0 : _config$vc2.includeSSRRatio,
40
41
  ...ssr
41
42
  });
42
43
  if ((_config$experimentalI = config.experimentalInteractionMetrics) !== null && _config$experimentalI !== void 0 && _config$experimentalI.enabled) {
@@ -1,4 +1,3 @@
1
- import { fg } from '@atlaskit/platform-feature-flags';
2
1
  import coinflip from '../coinflip';
3
2
  import { getConfig, getPostInteractionRate } from '../config';
4
3
  import { isSegmentLabel, sanitizeUfoName } from '../create-payload/common/utils';
@@ -138,63 +137,33 @@ function createPostInteractionLogPayload({
138
137
  const lastInteractionFinishTTAI = Math.round(lastInteractionFinish.end - lastInteractionFinish.start);
139
138
  let lastInteractionFinishVC90 = null;
140
139
  let lastInteractionFinishVCClean = false;
141
- if (fg('platform_ufo_post_interaction_use_vc_rev')) {
142
- const lastInteractionFinishVCRev = lastInteractionFinishVCResult === null || lastInteractionFinishVCResult === void 0 ? void 0 : lastInteractionFinishVCResult['ufo:vc:rev'];
143
- const lastInteractionFinishRevision = lastInteractionFinishVCRev === null || lastInteractionFinishVCRev === void 0 ? void 0 : lastInteractionFinishVCRev.find(({
144
- revision
145
- }) => revision === 'fy25.02');
146
- if (lastInteractionFinishRevision !== null && lastInteractionFinishRevision !== void 0 && lastInteractionFinishRevision.clean) {
147
- var _lastInteractionFinis;
148
- lastInteractionFinishVCClean = true;
149
- lastInteractionFinishVC90 = (_lastInteractionFinis = lastInteractionFinishRevision['metric:vc90']) !== null && _lastInteractionFinis !== void 0 ? _lastInteractionFinis : null;
150
- }
151
- } else {
152
- if (lastInteractionFinishVCResult !== null && lastInteractionFinishVCResult !== void 0 && lastInteractionFinishVCResult['ufo:vc:state']) {
153
- var _lastInteractionFinis2;
154
- lastInteractionFinishVCClean = true;
155
- const lastInteractionFinishVCMetrics = lastInteractionFinishVCResult === null || lastInteractionFinishVCResult === void 0 ? void 0 : lastInteractionFinishVCResult['metrics:vc'];
156
- lastInteractionFinishVC90 = (_lastInteractionFinis2 = lastInteractionFinishVCMetrics[90]) !== null && _lastInteractionFinis2 !== void 0 ? _lastInteractionFinis2 : null;
157
- }
140
+ const lastInteractionFinishVCRev = lastInteractionFinishVCResult === null || lastInteractionFinishVCResult === void 0 ? void 0 : lastInteractionFinishVCResult['ufo:vc:rev'];
141
+ const lastInteractionFinishRevision = lastInteractionFinishVCRev === null || lastInteractionFinishVCRev === void 0 ? void 0 : lastInteractionFinishVCRev.find(({
142
+ revision
143
+ }) => revision === 'fy25.02');
144
+ if (lastInteractionFinishRevision !== null && lastInteractionFinishRevision !== void 0 && lastInteractionFinishRevision.clean) {
145
+ var _lastInteractionFinis;
146
+ lastInteractionFinishVCClean = true;
147
+ lastInteractionFinishVC90 = (_lastInteractionFinis = lastInteractionFinishRevision['metric:vc90']) !== null && _lastInteractionFinis !== void 0 ? _lastInteractionFinis : null;
158
148
  }
159
149
  let postInteractionFinishVCRatios = {};
160
150
  let postInteractionFinishVCClean = false;
161
151
  let revisedVC90 = null;
162
152
  let lateMutations = [];
163
- if (fg('platform_ufo_post_interaction_use_vc_rev')) {
164
- const postInteractionFinishVCRev = postInteractionFinishVCResult === null || postInteractionFinishVCResult === void 0 ? void 0 : postInteractionFinishVCResult['ufo:vc:rev'];
165
- const postInteractionFinishRevision = postInteractionFinishVCRev === null || postInteractionFinishVCRev === void 0 ? void 0 : postInteractionFinishVCRev.find(({
166
- revision
167
- }) => revision === 'fy25.02');
168
- if (postInteractionFinishRevision !== null && postInteractionFinishRevision !== void 0 && postInteractionFinishRevision.clean) {
169
- postInteractionFinishVCClean = true;
170
- postInteractionFinishVCRatios = postInteractionFinishVCResult === null || postInteractionFinishVCResult === void 0 ? void 0 : postInteractionFinishVCResult['ufo:vc:ratios'];
171
- if (typeof lastInteractionFinishVC90 === 'number') {
172
- var _postInteractionFinis;
173
- revisedVC90 = (_postInteractionFinis = postInteractionFinishRevision['metric:vc90']) !== null && _postInteractionFinis !== void 0 ? _postInteractionFinis : null;
174
- }
175
- const vcDetails = postInteractionFinishRevision.vcDetails;
176
- if (vcDetails) {
177
- lateMutations = getLateMutations(vcDetails, lastInteractionFinish, postInteractionFinishVCRatios);
178
- }
153
+ const postInteractionFinishVCRev = postInteractionFinishVCResult === null || postInteractionFinishVCResult === void 0 ? void 0 : postInteractionFinishVCResult['ufo:vc:rev'];
154
+ const postInteractionFinishRevision = postInteractionFinishVCRev === null || postInteractionFinishVCRev === void 0 ? void 0 : postInteractionFinishVCRev.find(({
155
+ revision
156
+ }) => revision === 'fy25.02');
157
+ if (postInteractionFinishRevision !== null && postInteractionFinishRevision !== void 0 && postInteractionFinishRevision.clean) {
158
+ postInteractionFinishVCClean = true;
159
+ postInteractionFinishVCRatios = postInteractionFinishVCResult === null || postInteractionFinishVCResult === void 0 ? void 0 : postInteractionFinishVCResult['ufo:vc:ratios'];
160
+ if (typeof lastInteractionFinishVC90 === 'number') {
161
+ var _postInteractionFinis;
162
+ revisedVC90 = (_postInteractionFinis = postInteractionFinishRevision['metric:vc90']) !== null && _postInteractionFinis !== void 0 ? _postInteractionFinis : null;
179
163
  }
180
- } else {
181
- if (postInteractionFinishVCResult !== null && postInteractionFinishVCResult !== void 0 && postInteractionFinishVCResult['ufo:vc:state']) {
182
- postInteractionFinishVCClean = true;
183
- postInteractionFinishVCRatios = postInteractionFinishVCResult === null || postInteractionFinishVCResult === void 0 ? void 0 : postInteractionFinishVCResult['ufo:vc:ratios'];
184
- const postInteractionFinishVCUpdates = postInteractionFinishVCResult === null || postInteractionFinishVCResult === void 0 ? void 0 : postInteractionFinishVCResult['ufo:vc:updates'];
185
- const postInteractionFinishVCMetrics = postInteractionFinishVCResult === null || postInteractionFinishVCResult === void 0 ? void 0 : postInteractionFinishVCResult['metrics:vc'];
186
- if (typeof lastInteractionFinishVC90 === 'number') {
187
- var _postInteractionFinis2;
188
- revisedVC90 = (_postInteractionFinis2 = postInteractionFinishVCMetrics[90]) !== null && _postInteractionFinis2 !== void 0 ? _postInteractionFinis2 : null;
189
- }
190
- lateMutations = postInteractionFinishVCUpdates ? postInteractionFinishVCUpdates.filter(entry => entry.time > lastInteractionFinish.end).flatMap(({
191
- time,
192
- elements
193
- }) => Array.from(new Set(elements)).map(element => ({
194
- time,
195
- element,
196
- viewportHeatmapPercentage: postInteractionFinishVCRatios[element]
197
- }))) : [];
164
+ const vcDetails = postInteractionFinishRevision.vcDetails;
165
+ if (vcDetails) {
166
+ lateMutations = getLateMutations(vcDetails, lastInteractionFinish, postInteractionFinishVCRatios);
198
167
  }
199
168
  }
200
169
  return {
@@ -94,7 +94,8 @@ export class VCObserver {
94
94
  vc,
95
95
  isEventAborted,
96
96
  experienceKey,
97
- interactionId
97
+ interactionId,
98
+ includeSSRRatio
98
99
  }) => {
99
100
  const startTime = performance.now();
100
101
  // add local measurement
@@ -175,7 +176,8 @@ export class VCObserver {
175
176
  componentsLog: {
176
177
  ...componentsLog
177
178
  },
178
- viewport
179
+ viewport,
180
+ fixSSRAttribution: includeSSRRatio
179
181
  });
180
182
  const {
181
183
  VC,
@@ -194,7 +196,8 @@ export class VCObserver {
194
196
  heatmap: heatmapNext,
195
197
  ssr,
196
198
  componentsLog: _componentsLog,
197
- viewport
199
+ viewport,
200
+ fixSSRAttribution: includeSSRRatio
198
201
  });
199
202
  try {
200
203
  if (!this.isPostInteraction) {
@@ -349,6 +352,12 @@ export class VCObserver {
349
352
  [`ufo:speedIndex`]: isTTVCv1Disabled ? vcNext.VCEntries.speedIndex : VCEntries.speedIndex,
350
353
  [`ufo:next:speedIndex`]: vcNext.VCEntries.speedIndex
351
354
  };
355
+ const SSRRatio = VCObserver.getSSRRatio(VCEntries.rel, ssr);
356
+ const SSRRatioNext = VCObserver.getSSRRatio(vcNext.VCEntries.rel, ssr);
357
+ const SSRRatioPayload = includeSSRRatio ? {
358
+ [`${fullPrefix}vc:ssrRatio`]: isTTVCv1Disabled ? SSRRatioNext : SSRRatio,
359
+ [`${fullPrefix}vc:next:ssrRatio`]: SSRRatioNext
360
+ } : {};
352
361
  if (isTTVCv1Disabled) {
353
362
  return {
354
363
  [`${fullPrefix}vc:size`]: viewport,
@@ -356,6 +365,8 @@ export class VCObserver {
356
365
  [`${fullPrefix}vc:ratios`]: ratios,
357
366
  ...outOfBoundary,
358
367
  [`${fullPrefix}vc:ignored`]: this.getIgnoredElements(componentsLog),
368
+ ...SSRRatioPayload,
369
+ [`${fullPrefix}vc:ssrRatio`]: SSRRatioNext,
359
370
  ...revisionsData,
360
371
  ...speedIndex
361
372
  };
@@ -372,11 +383,13 @@ export class VCObserver {
372
383
  [`${fullPrefix}vc:time`]: Math.round(totalTime + (stopTime - startTime)),
373
384
  [`${fullPrefix}vc:total`]: totalPainted,
374
385
  [`${fullPrefix}vc:ratios`]: ratios,
386
+ [`${fullPrefix}vc:ssrRatio`]: SSRRatio,
375
387
  ...outOfBoundary,
376
388
  [`${fullPrefix}vc:next`]: vcNext.VC,
377
389
  [`${fullPrefix}vc:next:updates`]: isTTVCv3Enabled ? undefined : vcNext.VCEntries.rel.slice(0, 50),
378
390
  // max 50
379
391
  [`${fullPrefix}vc:next:dom`]: vcNext.VCBox,
392
+ ...SSRRatioPayload,
380
393
  [`${fullPrefix}vc:ignored`]: this.getIgnoredElements(componentsLog),
381
394
  ...revisionsData,
382
395
  ...speedIndex
@@ -528,15 +541,27 @@ export class VCObserver {
528
541
  ignoreReason
529
542
  }));
530
543
  }
544
+ static getSSRRatio(entries, ssr) {
545
+ if (ssr === undefined || entries.length === 0) {
546
+ return undefined;
547
+ }
548
+ const maybeSSR = entries[0];
549
+ if (maybeSSR.elements[0] === 'SSR') {
550
+ return maybeSSR.vc;
551
+ }
552
+ return 0;
553
+ }
531
554
  static calculateVC({
532
555
  heatmap,
533
556
  ssr = UNUSED_SECTOR,
534
557
  componentsLog,
535
- viewport
558
+ viewport,
559
+ fixSSRAttribution
536
560
  }) {
537
561
  const lastUpdate = {};
538
562
  let totalPainted = 0;
539
- if (ssr !== UNUSED_SECTOR) {
563
+ const ssrTime = fixSSRAttribution ? Math.floor(ssr) : ssr;
564
+ if (ssrTime !== UNUSED_SECTOR) {
540
565
  var _window$document;
541
566
  const element = {
542
567
  __debug__element: new WeakRef((_window$document = window.document) === null || _window$document === void 0 ? void 0 : _window$document.body),
@@ -555,14 +580,14 @@ export class VCObserver {
555
580
  },
556
581
  targetName: 'SSR'
557
582
  };
558
- if (!componentsLog[ssr]) {
559
- componentsLog[ssr] = [];
583
+ if (!componentsLog[ssrTime]) {
584
+ componentsLog[ssrTime] = [];
560
585
  }
561
- componentsLog[ssr].push(element);
586
+ componentsLog[ssrTime].push(element);
562
587
  }
563
588
  heatmap.forEach(line => {
564
589
  line.forEach(entry => {
565
- const rounded = Math.floor(entry === UNUSED_SECTOR && ssr !== UNUSED_SECTOR ? ssr : entry);
590
+ const rounded = Math.floor(entry === UNUSED_SECTOR && ssrTime !== UNUSED_SECTOR ? ssrTime : entry);
566
591
  totalPainted += rounded !== UNUSED_SECTOR ? 1 : 0;
567
592
  if (rounded !== UNUSED_SECTOR) {
568
593
  lastUpdate[rounded] = lastUpdate[rounded] ? lastUpdate[rounded] + 1 : 1;
@@ -15,7 +15,7 @@ function getVCMetrics(_x) {
15
15
  }
16
16
  function _getVCMetrics() {
17
17
  _getVCMetrics = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(interaction) {
18
- var _config$vc, _config$vc$ssrWhiteli, _interaction$apdex, _config$experimentalI, _result$ufoVcRev;
18
+ var _config$vc, _config$vc$ssrWhiteli, _interaction$apdex, _config$vc2, _config$experimentalI, _result$ufoVcRev;
19
19
  var config, interactionStatus, pageVisibilityUpToTTAI, shouldReportVCMetrics, isSSREnabled, ssr, tti, prefix, result, mostRecentVCRevision, mostRecentVCRevisionPayload;
20
20
  return _regeneratorRuntime.wrap(function _callee$(_context) {
21
21
  while (1) switch (_context.prev = _context.next) {
@@ -59,7 +59,8 @@ function _getVCMetrics() {
59
59
  vc: interaction.vc,
60
60
  isEventAborted: interactionStatus.originalInteractionStatus !== 'SUCCEEDED',
61
61
  experienceKey: interaction.ufoName,
62
- interactionId: interaction.id
62
+ interactionId: interaction.id,
63
+ includeSSRRatio: (_config$vc2 = config.vc) === null || _config$vc2 === void 0 ? void 0 : _config$vc2.includeSSRRatio
63
64
  }, ssr));
64
65
  case 18:
65
66
  result = _context.sent;
@@ -2,7 +2,6 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
3
3
  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; }
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
- import { fg } from '@atlaskit/platform-feature-flags';
6
5
  import coinflip from '../coinflip';
7
6
  import { getConfig, getPostInteractionRate } from '../config';
8
7
  import { isSegmentLabel, sanitizeUfoName } from '../create-payload/common/utils';
@@ -146,70 +145,35 @@ function createPostInteractionLogPayload(_ref2) {
146
145
  var lastInteractionFinishTTAI = Math.round(lastInteractionFinish.end - lastInteractionFinish.start);
147
146
  var lastInteractionFinishVC90 = null;
148
147
  var lastInteractionFinishVCClean = false;
149
- if (fg('platform_ufo_post_interaction_use_vc_rev')) {
150
- var lastInteractionFinishVCRev = lastInteractionFinishVCResult === null || lastInteractionFinishVCResult === void 0 ? void 0 : lastInteractionFinishVCResult['ufo:vc:rev'];
151
- var lastInteractionFinishRevision = lastInteractionFinishVCRev === null || lastInteractionFinishVCRev === void 0 ? void 0 : lastInteractionFinishVCRev.find(function (_ref3) {
152
- var revision = _ref3.revision;
153
- return revision === 'fy25.02';
154
- });
155
- if (lastInteractionFinishRevision !== null && lastInteractionFinishRevision !== void 0 && lastInteractionFinishRevision.clean) {
156
- var _lastInteractionFinis;
157
- lastInteractionFinishVCClean = true;
158
- lastInteractionFinishVC90 = (_lastInteractionFinis = lastInteractionFinishRevision['metric:vc90']) !== null && _lastInteractionFinis !== void 0 ? _lastInteractionFinis : null;
159
- }
160
- } else {
161
- if (lastInteractionFinishVCResult !== null && lastInteractionFinishVCResult !== void 0 && lastInteractionFinishVCResult['ufo:vc:state']) {
162
- var _lastInteractionFinis2;
163
- lastInteractionFinishVCClean = true;
164
- var lastInteractionFinishVCMetrics = lastInteractionFinishVCResult === null || lastInteractionFinishVCResult === void 0 ? void 0 : lastInteractionFinishVCResult['metrics:vc'];
165
- lastInteractionFinishVC90 = (_lastInteractionFinis2 = lastInteractionFinishVCMetrics[90]) !== null && _lastInteractionFinis2 !== void 0 ? _lastInteractionFinis2 : null;
166
- }
148
+ var lastInteractionFinishVCRev = lastInteractionFinishVCResult === null || lastInteractionFinishVCResult === void 0 ? void 0 : lastInteractionFinishVCResult['ufo:vc:rev'];
149
+ var lastInteractionFinishRevision = lastInteractionFinishVCRev === null || lastInteractionFinishVCRev === void 0 ? void 0 : lastInteractionFinishVCRev.find(function (_ref3) {
150
+ var revision = _ref3.revision;
151
+ return revision === 'fy25.02';
152
+ });
153
+ if (lastInteractionFinishRevision !== null && lastInteractionFinishRevision !== void 0 && lastInteractionFinishRevision.clean) {
154
+ var _lastInteractionFinis;
155
+ lastInteractionFinishVCClean = true;
156
+ lastInteractionFinishVC90 = (_lastInteractionFinis = lastInteractionFinishRevision['metric:vc90']) !== null && _lastInteractionFinis !== void 0 ? _lastInteractionFinis : null;
167
157
  }
168
158
  var postInteractionFinishVCRatios = {};
169
159
  var postInteractionFinishVCClean = false;
170
160
  var revisedVC90 = null;
171
161
  var lateMutations = [];
172
- if (fg('platform_ufo_post_interaction_use_vc_rev')) {
173
- var postInteractionFinishVCRev = postInteractionFinishVCResult === null || postInteractionFinishVCResult === void 0 ? void 0 : postInteractionFinishVCResult['ufo:vc:rev'];
174
- var postInteractionFinishRevision = postInteractionFinishVCRev === null || postInteractionFinishVCRev === void 0 ? void 0 : postInteractionFinishVCRev.find(function (_ref4) {
175
- var revision = _ref4.revision;
176
- return revision === 'fy25.02';
177
- });
178
- if (postInteractionFinishRevision !== null && postInteractionFinishRevision !== void 0 && postInteractionFinishRevision.clean) {
179
- postInteractionFinishVCClean = true;
180
- postInteractionFinishVCRatios = postInteractionFinishVCResult === null || postInteractionFinishVCResult === void 0 ? void 0 : postInteractionFinishVCResult['ufo:vc:ratios'];
181
- if (typeof lastInteractionFinishVC90 === 'number') {
182
- var _postInteractionFinis;
183
- revisedVC90 = (_postInteractionFinis = postInteractionFinishRevision['metric:vc90']) !== null && _postInteractionFinis !== void 0 ? _postInteractionFinis : null;
184
- }
185
- var vcDetails = postInteractionFinishRevision.vcDetails;
186
- if (vcDetails) {
187
- lateMutations = getLateMutations(vcDetails, lastInteractionFinish, postInteractionFinishVCRatios);
188
- }
162
+ var postInteractionFinishVCRev = postInteractionFinishVCResult === null || postInteractionFinishVCResult === void 0 ? void 0 : postInteractionFinishVCResult['ufo:vc:rev'];
163
+ var postInteractionFinishRevision = postInteractionFinishVCRev === null || postInteractionFinishVCRev === void 0 ? void 0 : postInteractionFinishVCRev.find(function (_ref4) {
164
+ var revision = _ref4.revision;
165
+ return revision === 'fy25.02';
166
+ });
167
+ if (postInteractionFinishRevision !== null && postInteractionFinishRevision !== void 0 && postInteractionFinishRevision.clean) {
168
+ postInteractionFinishVCClean = true;
169
+ postInteractionFinishVCRatios = postInteractionFinishVCResult === null || postInteractionFinishVCResult === void 0 ? void 0 : postInteractionFinishVCResult['ufo:vc:ratios'];
170
+ if (typeof lastInteractionFinishVC90 === 'number') {
171
+ var _postInteractionFinis;
172
+ revisedVC90 = (_postInteractionFinis = postInteractionFinishRevision['metric:vc90']) !== null && _postInteractionFinis !== void 0 ? _postInteractionFinis : null;
189
173
  }
190
- } else {
191
- if (postInteractionFinishVCResult !== null && postInteractionFinishVCResult !== void 0 && postInteractionFinishVCResult['ufo:vc:state']) {
192
- postInteractionFinishVCClean = true;
193
- postInteractionFinishVCRatios = postInteractionFinishVCResult === null || postInteractionFinishVCResult === void 0 ? void 0 : postInteractionFinishVCResult['ufo:vc:ratios'];
194
- var postInteractionFinishVCUpdates = postInteractionFinishVCResult === null || postInteractionFinishVCResult === void 0 ? void 0 : postInteractionFinishVCResult['ufo:vc:updates'];
195
- var postInteractionFinishVCMetrics = postInteractionFinishVCResult === null || postInteractionFinishVCResult === void 0 ? void 0 : postInteractionFinishVCResult['metrics:vc'];
196
- if (typeof lastInteractionFinishVC90 === 'number') {
197
- var _postInteractionFinis2;
198
- revisedVC90 = (_postInteractionFinis2 = postInteractionFinishVCMetrics[90]) !== null && _postInteractionFinis2 !== void 0 ? _postInteractionFinis2 : null;
199
- }
200
- lateMutations = postInteractionFinishVCUpdates ? postInteractionFinishVCUpdates.filter(function (entry) {
201
- return entry.time > lastInteractionFinish.end;
202
- }).flatMap(function (_ref5) {
203
- var time = _ref5.time,
204
- elements = _ref5.elements;
205
- return Array.from(new Set(elements)).map(function (element) {
206
- return {
207
- time: time,
208
- element: element,
209
- viewportHeatmapPercentage: postInteractionFinishVCRatios[element]
210
- };
211
- });
212
- }) : [];
174
+ var vcDetails = postInteractionFinishRevision.vcDetails;
175
+ if (vcDetails) {
176
+ lateMutations = getLateMutations(vcDetails, lastInteractionFinish, postInteractionFinishVCRatios);
213
177
  }
214
178
  }
215
179
  return {
@@ -96,11 +96,11 @@ export var VCObserver = /*#__PURE__*/function () {
96
96
  });
97
97
  _defineProperty(this, "getVCResult", /*#__PURE__*/function () {
98
98
  var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref3) {
99
- var start, stop, tti, prefix, ssr, vc, isEventAborted, experienceKey, interactionId, startTime, fullPrefix, rawData, abortReason, abortReasonInfo, heatmap, heatmapNext, outOfBoundaryInfo, totalTime, componentsLog, viewport, devToolsEnabled, ratios, isTTVCv1Disabled, vcAbortedResultWithRevisions, ttvcV1Result, VC, VCBox, VCEntries, totalPainted, _componentsLog, vcNext, outOfBoundary, stopTime, ttvcV1DevToolInfo, ttvcV2DevToolInfo, _ufo_devtool_onVCRev2, _ref10, _ufo_devtool_onVCRev, _ref9, isVCClean, revisionsData, speedIndex, isTTVCv3Enabled;
99
+ var start, stop, tti, prefix, ssr, vc, isEventAborted, experienceKey, interactionId, includeSSRRatio, startTime, fullPrefix, rawData, abortReason, abortReasonInfo, heatmap, heatmapNext, outOfBoundaryInfo, totalTime, componentsLog, viewport, devToolsEnabled, ratios, isTTVCv1Disabled, vcAbortedResultWithRevisions, ttvcV1Result, VC, VCBox, VCEntries, totalPainted, _componentsLog, vcNext, outOfBoundary, stopTime, ttvcV1DevToolInfo, ttvcV2DevToolInfo, _ufo_devtool_onVCRev2, _ref10, _ufo_devtool_onVCRev, _ref9, isVCClean, revisionsData, speedIndex, SSRRatio, SSRRatioNext, SSRRatioPayload, isTTVCv3Enabled;
100
100
  return _regeneratorRuntime.wrap(function _callee$(_context) {
101
101
  while (1) switch (_context.prev = _context.next) {
102
102
  case 0:
103
- start = _ref3.start, stop = _ref3.stop, tti = _ref3.tti, prefix = _ref3.prefix, ssr = _ref3.ssr, vc = _ref3.vc, isEventAborted = _ref3.isEventAborted, experienceKey = _ref3.experienceKey, interactionId = _ref3.interactionId;
103
+ start = _ref3.start, stop = _ref3.stop, tti = _ref3.tti, prefix = _ref3.prefix, ssr = _ref3.ssr, vc = _ref3.vc, isEventAborted = _ref3.isEventAborted, experienceKey = _ref3.experienceKey, interactionId = _ref3.interactionId, includeSSRRatio = _ref3.includeSSRRatio;
104
104
  startTime = performance.now(); // add local measurement
105
105
  fullPrefix = prefix !== undefined && prefix !== '' ? "".concat(prefix, ":") : '';
106
106
  rawData = vc !== undefined ? vc : _this.getVCRawData();
@@ -165,7 +165,8 @@ export var VCObserver = /*#__PURE__*/function () {
165
165
  heatmap: heatmap,
166
166
  ssr: ssr,
167
167
  componentsLog: _objectSpread({}, componentsLog),
168
- viewport: viewport
168
+ viewport: viewport,
169
+ fixSSRAttribution: includeSSRRatio
169
170
  });
170
171
  VC = ttvcV1Result.VC, VCBox = ttvcV1Result.VCBox, VCEntries = ttvcV1Result.VCEntries, totalPainted = ttvcV1Result.totalPainted;
171
172
  _componentsLog = {};
@@ -182,7 +183,8 @@ export var VCObserver = /*#__PURE__*/function () {
182
183
  heatmap: heatmapNext,
183
184
  ssr: ssr,
184
185
  componentsLog: _componentsLog,
185
- viewport: viewport
186
+ viewport: viewport,
187
+ fixSSRAttribution: includeSSRRatio
186
188
  });
187
189
  try {
188
190
  if (!_this.isPostInteraction) {
@@ -326,17 +328,20 @@ export var VCObserver = /*#__PURE__*/function () {
326
328
  experienceKey: experienceKey
327
329
  });
328
330
  speedIndex = _defineProperty(_defineProperty({}, "ufo:speedIndex", isTTVCv1Disabled ? vcNext.VCEntries.speedIndex : VCEntries.speedIndex), "ufo:next:speedIndex", vcNext.VCEntries.speedIndex);
331
+ SSRRatio = VCObserver.getSSRRatio(VCEntries.rel, ssr);
332
+ SSRRatioNext = VCObserver.getSSRRatio(vcNext.VCEntries.rel, ssr);
333
+ SSRRatioPayload = includeSSRRatio ? _defineProperty(_defineProperty({}, "".concat(fullPrefix, "vc:ssrRatio"), isTTVCv1Disabled ? SSRRatioNext : SSRRatio), "".concat(fullPrefix, "vc:next:ssrRatio"), SSRRatioNext) : {};
329
334
  if (!isTTVCv1Disabled) {
330
- _context.next = 32;
335
+ _context.next = 35;
331
336
  break;
332
337
  }
333
- return _context.abrupt("return", _objectSpread(_objectSpread(_objectSpread(_defineProperty(_defineProperty(_defineProperty({}, "".concat(fullPrefix, "vc:size"), viewport), "".concat(fullPrefix, "vc:time"), Math.round(totalTime + (stopTime - startTime))), "".concat(fullPrefix, "vc:ratios"), ratios), outOfBoundary), {}, _defineProperty({}, "".concat(fullPrefix, "vc:ignored"), _this.getIgnoredElements(componentsLog)), revisionsData), speedIndex));
334
- case 32:
338
+ return _context.abrupt("return", _objectSpread(_objectSpread(_objectSpread(_objectSpread(_defineProperty(_defineProperty(_defineProperty({}, "".concat(fullPrefix, "vc:size"), viewport), "".concat(fullPrefix, "vc:time"), Math.round(totalTime + (stopTime - startTime))), "".concat(fullPrefix, "vc:ratios"), ratios), outOfBoundary), {}, _defineProperty({}, "".concat(fullPrefix, "vc:ignored"), _this.getIgnoredElements(componentsLog)), SSRRatioPayload), {}, _defineProperty({}, "".concat(fullPrefix, "vc:ssrRatio"), SSRRatioNext), revisionsData), speedIndex));
339
+ case 35:
335
340
  isTTVCv3Enabled = isVCRevisionEnabled('fy25.03', experienceKey);
336
- return _context.abrupt("return", _objectSpread(_objectSpread(_objectSpread(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
341
+ return _context.abrupt("return", _objectSpread(_objectSpread(_objectSpread(_objectSpread(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
337
342
  'metrics:vc': VC
338
- }, "".concat(fullPrefix, "vc:state"), true), "".concat(fullPrefix, "vc:clean"), isVCClean), "".concat(fullPrefix, "vc:dom"), VCBox), "".concat(fullPrefix, "vc:updates"), isTTVCv3Enabled ? undefined : VCEntries.rel.slice(0, 50)), "".concat(fullPrefix, "vc:size"), viewport), "".concat(fullPrefix, "vc:time"), Math.round(totalTime + (stopTime - startTime))), "".concat(fullPrefix, "vc:total"), totalPainted), "".concat(fullPrefix, "vc:ratios"), ratios), outOfBoundary), {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(fullPrefix, "vc:next"), vcNext.VC), "".concat(fullPrefix, "vc:next:updates"), isTTVCv3Enabled ? undefined : vcNext.VCEntries.rel.slice(0, 50)), "".concat(fullPrefix, "vc:next:dom"), vcNext.VCBox), "".concat(fullPrefix, "vc:ignored"), _this.getIgnoredElements(componentsLog)), revisionsData), speedIndex));
339
- case 34:
343
+ }, "".concat(fullPrefix, "vc:state"), true), "".concat(fullPrefix, "vc:clean"), isVCClean), "".concat(fullPrefix, "vc:dom"), VCBox), "".concat(fullPrefix, "vc:updates"), isTTVCv3Enabled ? undefined : VCEntries.rel.slice(0, 50)), "".concat(fullPrefix, "vc:size"), viewport), "".concat(fullPrefix, "vc:time"), Math.round(totalTime + (stopTime - startTime))), "".concat(fullPrefix, "vc:total"), totalPainted), "".concat(fullPrefix, "vc:ratios"), ratios), "".concat(fullPrefix, "vc:ssrRatio"), SSRRatio), outOfBoundary), {}, _defineProperty(_defineProperty(_defineProperty({}, "".concat(fullPrefix, "vc:next"), vcNext.VC), "".concat(fullPrefix, "vc:next:updates"), isTTVCv3Enabled ? undefined : vcNext.VCEntries.rel.slice(0, 50)), "".concat(fullPrefix, "vc:next:dom"), vcNext.VCBox), SSRRatioPayload), {}, _defineProperty({}, "".concat(fullPrefix, "vc:ignored"), _this.getIgnoredElements(componentsLog)), revisionsData), speedIndex));
344
+ case 37:
340
345
  case "end":
341
346
  return _context.stop();
342
347
  }
@@ -429,10 +434,10 @@ export var VCObserver = /*#__PURE__*/function () {
429
434
  _this.detachAbortListeners();
430
435
  var unbinds = attachAbortListeners(window, _this.viewport, _this.abortReasonCallback);
431
436
  if ((_window = window) !== null && _window !== void 0 && _window.__SSR_ABORT_LISTENERS__) {
432
- Object.entries(window.__SSR_ABORT_LISTENERS__.aborts).forEach(function (_ref11) {
433
- var _ref12 = _slicedToArray(_ref11, 2),
434
- key = _ref12[0],
435
- time = _ref12[1];
437
+ Object.entries(window.__SSR_ABORT_LISTENERS__.aborts).forEach(function (_ref12) {
438
+ var _ref13 = _slicedToArray(_ref12, 2),
439
+ key = _ref13[0],
440
+ time = _ref13[1];
436
441
  if (time) {
437
442
  _this.abortReasonCallback(key, time);
438
443
  }
@@ -462,8 +467,8 @@ export var VCObserver = /*#__PURE__*/function () {
462
467
  }
463
468
  return _createClass(VCObserver, [{
464
469
  key: "start",
465
- value: function start(_ref13) {
466
- var startTime = _ref13.startTime;
470
+ value: function start(_ref14) {
471
+ var startTime = _ref14.startTime;
467
472
  this.active = true;
468
473
  if (this.observers.isBrowserSupported()) {
469
474
  this.setViewportSize();
@@ -485,12 +490,12 @@ export var VCObserver = /*#__PURE__*/function () {
485
490
  }, {
486
491
  key: "getIgnoredElements",
487
492
  value: function getIgnoredElements(componentsLog) {
488
- return Object.values(componentsLog).flat().filter(function (_ref14) {
489
- var ignoreReason = _ref14.ignoreReason;
493
+ return Object.values(componentsLog).flat().filter(function (_ref15) {
494
+ var ignoreReason = _ref15.ignoreReason;
490
495
  return Boolean(ignoreReason);
491
- }).map(function (_ref15) {
492
- var targetName = _ref15.targetName,
493
- ignoreReason = _ref15.ignoreReason;
496
+ }).map(function (_ref16) {
497
+ var targetName = _ref16.targetName,
498
+ ignoreReason = _ref16.ignoreReason;
494
499
  return {
495
500
  targetName: targetName,
496
501
  ignoreReason: ignoreReason
@@ -607,16 +612,30 @@ export var VCObserver = /*#__PURE__*/function () {
607
612
  this._startMeasureTimestamp = -1;
608
613
  }
609
614
  }], [{
615
+ key: "getSSRRatio",
616
+ value: function getSSRRatio(entries, ssr) {
617
+ if (ssr === undefined || entries.length === 0) {
618
+ return undefined;
619
+ }
620
+ var maybeSSR = entries[0];
621
+ if (maybeSSR.elements[0] === 'SSR') {
622
+ return maybeSSR.vc;
623
+ }
624
+ return 0;
625
+ }
626
+ }, {
610
627
  key: "calculateVC",
611
- value: function calculateVC(_ref16) {
612
- var heatmap = _ref16.heatmap,
613
- _ref16$ssr = _ref16.ssr,
614
- ssr = _ref16$ssr === void 0 ? UNUSED_SECTOR : _ref16$ssr,
615
- componentsLog = _ref16.componentsLog,
616
- viewport = _ref16.viewport;
628
+ value: function calculateVC(_ref17) {
629
+ var heatmap = _ref17.heatmap,
630
+ _ref17$ssr = _ref17.ssr,
631
+ ssr = _ref17$ssr === void 0 ? UNUSED_SECTOR : _ref17$ssr,
632
+ componentsLog = _ref17.componentsLog,
633
+ viewport = _ref17.viewport,
634
+ fixSSRAttribution = _ref17.fixSSRAttribution;
617
635
  var lastUpdate = {};
618
636
  var totalPainted = 0;
619
- if (ssr !== UNUSED_SECTOR) {
637
+ var ssrTime = fixSSRAttribution ? Math.floor(ssr) : ssr;
638
+ if (ssrTime !== UNUSED_SECTOR) {
620
639
  var _window$document;
621
640
  var element = {
622
641
  __debug__element: new WeakRef((_window$document = window.document) === null || _window$document === void 0 ? void 0 : _window$document.body),
@@ -635,14 +654,14 @@ export var VCObserver = /*#__PURE__*/function () {
635
654
  },
636
655
  targetName: 'SSR'
637
656
  };
638
- if (!componentsLog[ssr]) {
639
- componentsLog[ssr] = [];
657
+ if (!componentsLog[ssrTime]) {
658
+ componentsLog[ssrTime] = [];
640
659
  }
641
- componentsLog[ssr].push(element);
660
+ componentsLog[ssrTime].push(element);
642
661
  }
643
662
  heatmap.forEach(function (line) {
644
663
  line.forEach(function (entry) {
645
- var rounded = Math.floor(entry === UNUSED_SECTOR && ssr !== UNUSED_SECTOR ? ssr : entry);
664
+ var rounded = Math.floor(entry === UNUSED_SECTOR && ssrTime !== UNUSED_SECTOR ? ssrTime : entry);
646
665
  totalPainted += rounded !== UNUSED_SECTOR ? 1 : 0;
647
666
  if (rounded !== UNUSED_SECTOR) {
648
667
  lastUpdate[rounded] = lastUpdate[rounded] ? lastUpdate[rounded] + 1 : 1;
@@ -679,11 +698,11 @@ export var VCObserver = /*#__PURE__*/function () {
679
698
  });
680
699
  return VCRatio;
681
700
  }, 0);
682
- var VCEntries = entries.reduce(function (acc, _ref17, i) {
701
+ var VCEntries = entries.reduce(function (acc, _ref18, i) {
683
702
  var _acc$abs, _componentsLog$timest, _acc$rel$vc, _acc$rel;
684
- var _ref18 = _slicedToArray(_ref17, 2),
685
- timestamp = _ref18[0],
686
- entryPainted = _ref18[1];
703
+ var _ref19 = _slicedToArray(_ref18, 2),
704
+ timestamp = _ref19[0],
705
+ entryPainted = _ref19[1];
687
706
  var currentlyPainted = entryPainted + (((_acc$abs = acc.abs[i - 1]) === null || _acc$abs === void 0 ? void 0 : _acc$abs[1]) || 0);
688
707
  var currentlyPaintedRatio = Math.round(currentlyPainted / totalPainted * 1000) / 10;
689
708
  var logEntry = _toConsumableArray(new Set((_componentsLog$timest = componentsLog[timestamp]) === null || _componentsLog$timest === void 0 ? void 0 : _componentsLog$timest.filter(function (v) {
@@ -75,6 +75,7 @@ export type Config = {
75
75
  readonly ssrWhitelist?: string[];
76
76
  readonly ssrEnablePageLayoutPlaceholder?: boolean;
77
77
  readonly stopVCAtInteractionFinish?: boolean;
78
+ readonly includeSSRRatio?: boolean;
78
79
  /**
79
80
  * The revisions of TTVC that will be calculated
80
81
  * - `all` is the TTVC revisions that are used on a product level
@@ -9,6 +9,7 @@ export type GetVCResultType = {
9
9
  vc?: VCRawDataType | null;
10
10
  experienceKey: string;
11
11
  interactionId?: string;
12
+ includeSSRRatio?: boolean;
12
13
  };
13
14
  export type SelectorConfig = {
14
15
  id: boolean;
@@ -39,8 +39,9 @@ export declare class VCObserver implements VCObserverInterface {
39
39
  targetName: string;
40
40
  ignoreReason: VCIgnoreReason | undefined;
41
41
  }[];
42
- getVCResult: ({ start, stop, tti, prefix, ssr, vc, isEventAborted, experienceKey, interactionId, }: GetVCResultType) => Promise<VCResult>;
43
- static calculateVC({ heatmap, ssr, componentsLog, viewport, }: {
42
+ static getSSRRatio(entries: VCEntryType[], ssr?: number): number | undefined;
43
+ getVCResult: ({ start, stop, tti, prefix, ssr, vc, isEventAborted, experienceKey, interactionId, includeSSRRatio, }: GetVCResultType) => Promise<VCResult>;
44
+ static calculateVC({ heatmap, ssr, componentsLog, viewport, fixSSRAttribution, }: {
44
45
  heatmap: number[][];
45
46
  ssr?: number;
46
47
  componentsLog: ComponentsLogType;
@@ -48,6 +49,7 @@ export declare class VCObserver implements VCObserverInterface {
48
49
  w: number;
49
50
  h: number;
50
51
  };
52
+ fixSSRAttribution?: boolean;
51
53
  }): {
52
54
  VC: {
53
55
  [key: string]: number | null;
@@ -75,6 +75,7 @@ export type Config = {
75
75
  readonly ssrWhitelist?: string[];
76
76
  readonly ssrEnablePageLayoutPlaceholder?: boolean;
77
77
  readonly stopVCAtInteractionFinish?: boolean;
78
+ readonly includeSSRRatio?: boolean;
78
79
  /**
79
80
  * The revisions of TTVC that will be calculated
80
81
  * - `all` is the TTVC revisions that are used on a product level
@@ -9,6 +9,7 @@ export type GetVCResultType = {
9
9
  vc?: VCRawDataType | null;
10
10
  experienceKey: string;
11
11
  interactionId?: string;
12
+ includeSSRRatio?: boolean;
12
13
  };
13
14
  export type SelectorConfig = {
14
15
  id: boolean;
@@ -49,8 +49,9 @@ export declare class VCObserver implements VCObserverInterface {
49
49
  targetName: string;
50
50
  ignoreReason: VCIgnoreReason | undefined;
51
51
  }[];
52
- getVCResult: ({ start, stop, tti, prefix, ssr, vc, isEventAborted, experienceKey, interactionId, }: GetVCResultType) => Promise<VCResult>;
53
- static calculateVC({ heatmap, ssr, componentsLog, viewport, }: {
52
+ static getSSRRatio(entries: VCEntryType[], ssr?: number): number | undefined;
53
+ getVCResult: ({ start, stop, tti, prefix, ssr, vc, isEventAborted, experienceKey, interactionId, includeSSRRatio, }: GetVCResultType) => Promise<VCResult>;
54
+ static calculateVC({ heatmap, ssr, componentsLog, viewport, fixSSRAttribution, }: {
54
55
  heatmap: number[][];
55
56
  ssr?: number;
56
57
  componentsLog: ComponentsLogType;
@@ -58,6 +59,7 @@ export declare class VCObserver implements VCObserverInterface {
58
59
  w: number;
59
60
  h: number;
60
61
  };
62
+ fixSSRAttribution?: boolean;
61
63
  }): {
62
64
  VC: {
63
65
  [key: string]: number | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/react-ufo",
3
- "version": "3.13.5",
3
+ "version": "3.13.7",
4
4
  "description": "Parts of React UFO that are publicly available",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -157,9 +157,6 @@
157
157
  "platform_ufo_enable_events_observer": {
158
158
  "type": "boolean"
159
159
  },
160
- "platform_ufo_post_interaction_use_vc_rev": {
161
- "type": "boolean"
162
- },
163
160
  "platform_ufo_ttvc_v3_devtool": {
164
161
  "type": "boolean"
165
162
  },