@atlaskit/react-ufo 4.15.14 → 4.15.16
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 +14 -0
- package/dist/cjs/assets/index.js +1 -1
- package/dist/cjs/config/index.js +12 -12
- package/dist/cjs/create-payload/utils/add-performance-measures.js +1 -1
- package/dist/cjs/create-payload/utils/get-navigation-metrics.js +1 -1
- package/dist/cjs/create-payload/utils/get-visibility-state-from-performance.js +1 -1
- package/dist/cjs/feature-flags-accessed/common/utils/index.js +2 -2
- package/dist/cjs/interaction-metrics/index.js +11 -11
- package/dist/cjs/machine-utilisation/index.js +2 -2
- package/dist/cjs/resource-timing/common/utils/config.js +1 -1
- package/dist/cjs/vc/index.js +3 -1
- package/dist/cjs/vc/vc-observer/getViewport.js +2 -2
- package/dist/cjs/vc/vc-observer/observers/index.js +2 -2
- package/dist/cjs/vc/vc-observer/observers/ssr-placeholders/index.js +2 -2
- package/dist/cjs/vc/vc-observer-new/get-element-name.js +1 -1
- package/dist/cjs/vc/vc-observer-new/get-unique-element-name.js +1 -1
- package/dist/cjs/vc/vc-observer-new/index.js +97 -19
- package/dist/cjs/vc/vc-observer-new/metric-calculator/{vcnext → fy26_04}/index.js +7 -11
- package/dist/cjs/vc/vc-observer-new/metric-calculator/utils/get-viewport-height.js +1 -1
- package/dist/cjs/vc/vc-observer-new/metric-calculator/utils/get-viewport-width.js +1 -1
- package/dist/cjs/vc/vc-observer-new/raw-data-handler/index.js +70 -3
- package/dist/cjs/vc/vc-observer-new/viewport-observer/utils/is-element-visible.js +1 -1
- package/dist/es2019/assets/index.js +1 -1
- package/dist/es2019/config/index.js +11 -11
- package/dist/es2019/create-payload/utils/add-performance-measures.js +1 -1
- package/dist/es2019/create-payload/utils/get-battery-info.js +1 -1
- package/dist/es2019/create-payload/utils/get-navigation-metrics.js +1 -1
- package/dist/es2019/create-payload/utils/get-visibility-state-from-performance.js +1 -1
- package/dist/es2019/feature-flags-accessed/common/utils/index.js +2 -2
- package/dist/es2019/interaction-metrics/index.js +11 -11
- package/dist/es2019/machine-utilisation/index.js +1 -1
- package/dist/es2019/resource-timing/common/utils/config.js +1 -1
- package/dist/es2019/vc/index.js +3 -1
- package/dist/es2019/vc/vc-observer/getViewport.js +2 -2
- package/dist/es2019/vc/vc-observer/observers/index.js +2 -2
- package/dist/es2019/vc/vc-observer/observers/ssr-placeholders/index.js +2 -2
- package/dist/es2019/vc/vc-observer-new/get-element-name.js +1 -1
- package/dist/es2019/vc/vc-observer-new/get-unique-element-name.js +1 -1
- package/dist/es2019/vc/vc-observer-new/index.js +85 -38
- package/dist/es2019/vc/vc-observer-new/metric-calculator/{vcnext → fy26_04}/index.js +2 -7
- package/dist/es2019/vc/vc-observer-new/metric-calculator/utils/get-viewport-height.js +1 -1
- package/dist/es2019/vc/vc-observer-new/metric-calculator/utils/get-viewport-width.js +1 -1
- package/dist/es2019/vc/vc-observer-new/raw-data-handler/index.js +53 -1
- package/dist/es2019/vc/vc-observer-new/viewport-observer/utils/is-element-visible.js +1 -1
- package/dist/esm/assets/index.js +1 -1
- package/dist/esm/config/index.js +12 -12
- package/dist/esm/create-payload/utils/add-performance-measures.js +1 -1
- package/dist/esm/create-payload/utils/get-navigation-metrics.js +1 -1
- package/dist/esm/create-payload/utils/get-visibility-state-from-performance.js +1 -1
- package/dist/esm/feature-flags-accessed/common/utils/index.js +2 -2
- package/dist/esm/interaction-metrics/index.js +11 -11
- package/dist/esm/machine-utilisation/index.js +2 -2
- package/dist/esm/resource-timing/common/utils/config.js +1 -1
- package/dist/esm/vc/index.js +3 -1
- package/dist/esm/vc/vc-observer/getViewport.js +2 -2
- package/dist/esm/vc/vc-observer/observers/index.js +2 -2
- package/dist/esm/vc/vc-observer/observers/ssr-placeholders/index.js +2 -2
- package/dist/esm/vc/vc-observer-new/get-element-name.js +1 -1
- package/dist/esm/vc/vc-observer-new/get-unique-element-name.js +1 -1
- package/dist/esm/vc/vc-observer-new/index.js +95 -17
- package/dist/esm/vc/vc-observer-new/metric-calculator/{vcnext → fy26_04}/index.js +8 -13
- package/dist/esm/vc/vc-observer-new/metric-calculator/utils/get-viewport-height.js +1 -1
- package/dist/esm/vc/vc-observer-new/metric-calculator/utils/get-viewport-width.js +1 -1
- package/dist/esm/vc/vc-observer-new/raw-data-handler/index.js +70 -3
- package/dist/esm/vc/vc-observer-new/viewport-observer/utils/is-element-visible.js +1 -1
- package/dist/types/common/vc/types.d.ts +6 -0
- package/dist/types/config/index.d.ts +5 -1
- package/dist/{types-ts4.5/vc/vc-observer-new/metric-calculator/vcnext → types/vc/vc-observer-new/metric-calculator/fy26_04}/index.d.ts +1 -1
- package/dist/types-ts4.5/common/vc/types.d.ts +6 -0
- package/dist/types-ts4.5/config/index.d.ts +5 -1
- package/dist/{types/vc/vc-observer-new/metric-calculator/vcnext → types-ts4.5/vc/vc-observer-new/metric-calculator/fy26_04}/index.d.ts +1 -1
- package/package.json +4 -1
|
@@ -6,14 +6,15 @@ import _createClass from "@babel/runtime/helpers/createClass";
|
|
|
6
6
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
7
7
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
8
8
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
|
+
import { isVCRevisionEnabled } from '../../config';
|
|
9
10
|
import { getActiveInteraction } from '../../interaction-metrics';
|
|
10
11
|
import { SSRPlaceholderHandlers } from '../vc-observer/observers/ssr-placeholders';
|
|
11
12
|
import EntriesTimeline from './entries-timeline';
|
|
12
13
|
import _getElementName from './get-element-name';
|
|
13
14
|
import VCCalculator_FY25_03 from './metric-calculator/fy25_03';
|
|
15
|
+
import VCCalculator_FY26_04 from './metric-calculator/fy26_04';
|
|
14
16
|
import getViewportHeight from './metric-calculator/utils/get-viewport-height';
|
|
15
17
|
import getViewportWidth from './metric-calculator/utils/get-viewport-width';
|
|
16
|
-
import VCNextCalculator from './metric-calculator/vcnext';
|
|
17
18
|
import RawDataHandler from './raw-data-handler';
|
|
18
19
|
import ViewportObserver from './viewport-observer';
|
|
19
20
|
import WindowEventObserver from './window-event-observer';
|
|
@@ -241,7 +242,7 @@ var VCObserverNew = /*#__PURE__*/function () {
|
|
|
241
242
|
key: "getVCResult",
|
|
242
243
|
value: function () {
|
|
243
244
|
var _getVCResult = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(param) {
|
|
244
|
-
var start, stop, interactionId, interactionType, interactionAbortReason, isPageVisible, include3p, includeSSRRatio, excludeSmartAnswersInSearch, includeRawData, results, feVCCalculationStartTime, calculator_fy25_03, orderedEntries, fy25_03,
|
|
245
|
+
var start, stop, interactionId, interactionType, interactionAbortReason, isPageVisible, include3p, includeSSRRatio, excludeSmartAnswersInSearch, includeRawData, results, feVCCalculationStartTime, calculator_fy25_03, orderedEntries, fy25_03, calculator_fy26_04, fy26_04, vcNext, _fy25_, calculator_next, _vcNext, feVCCalculationEndTime, rawVCCalculationStartTime, rawHandler, raw;
|
|
245
246
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
246
247
|
while (1) switch (_context.prev = _context.next) {
|
|
247
248
|
case 0:
|
|
@@ -257,7 +258,15 @@ var VCObserverNew = /*#__PURE__*/function () {
|
|
|
257
258
|
start: start,
|
|
258
259
|
stop: stop
|
|
259
260
|
});
|
|
260
|
-
|
|
261
|
+
if (!fg('platform_ufo_vcnext_to_fy26_04_revision_update')) {
|
|
262
|
+
_context.next = 30;
|
|
263
|
+
break;
|
|
264
|
+
}
|
|
265
|
+
if (!isVCRevisionEnabled('fy25.03')) {
|
|
266
|
+
_context.next = 14;
|
|
267
|
+
break;
|
|
268
|
+
}
|
|
269
|
+
_context.next = 11;
|
|
261
270
|
return calculator_fy25_03.calculate({
|
|
262
271
|
orderedEntries: orderedEntries,
|
|
263
272
|
startTime: start,
|
|
@@ -271,8 +280,14 @@ var VCObserverNew = /*#__PURE__*/function () {
|
|
|
271
280
|
isPageVisible: isPageVisible,
|
|
272
281
|
interactionAbortReason: interactionAbortReason
|
|
273
282
|
});
|
|
274
|
-
case
|
|
275
|
-
|
|
283
|
+
case 11:
|
|
284
|
+
_context.t0 = _context.sent;
|
|
285
|
+
_context.next = 15;
|
|
286
|
+
break;
|
|
287
|
+
case 14:
|
|
288
|
+
_context.t0 = null;
|
|
289
|
+
case 15:
|
|
290
|
+
fy25_03 = _context.t0;
|
|
276
291
|
if (fy25_03) {
|
|
277
292
|
results.push(fy25_03);
|
|
278
293
|
}
|
|
@@ -282,10 +297,71 @@ var VCObserverNew = /*#__PURE__*/function () {
|
|
|
282
297
|
if (param.ssr && !param.includeSSRInV3 && fg('platform_ufo_auto_add_ssr_entry_in_ttvc_v4')) {
|
|
283
298
|
this.addSSR(param.ssr);
|
|
284
299
|
}
|
|
300
|
+
calculator_fy26_04 = new VCCalculator_FY26_04();
|
|
301
|
+
if (!(isVCRevisionEnabled('fy26.04') || isVCRevisionEnabled('next'))) {
|
|
302
|
+
_context.next = 25;
|
|
303
|
+
break;
|
|
304
|
+
}
|
|
305
|
+
_context.next = 22;
|
|
306
|
+
return calculator_fy26_04.calculate({
|
|
307
|
+
orderedEntries: orderedEntries,
|
|
308
|
+
startTime: start,
|
|
309
|
+
stopTime: stop,
|
|
310
|
+
interactionId: interactionId,
|
|
311
|
+
interactionType: interactionType,
|
|
312
|
+
isPostInteraction: this.isPostInteraction,
|
|
313
|
+
include3p: include3p,
|
|
314
|
+
includeSSRRatio: includeSSRRatio,
|
|
315
|
+
isPageVisible: isPageVisible,
|
|
316
|
+
interactionAbortReason: interactionAbortReason
|
|
317
|
+
});
|
|
318
|
+
case 22:
|
|
319
|
+
_context.t1 = _context.sent;
|
|
320
|
+
_context.next = 26;
|
|
321
|
+
break;
|
|
322
|
+
case 25:
|
|
323
|
+
_context.t1 = null;
|
|
324
|
+
case 26:
|
|
325
|
+
fy26_04 = _context.t1;
|
|
326
|
+
if (fy26_04) {
|
|
327
|
+
vcNext = {
|
|
328
|
+
revision: 'next',
|
|
329
|
+
'metric:vc90': fy26_04['metric:vc90'],
|
|
330
|
+
clean: fy26_04['clean']
|
|
331
|
+
};
|
|
332
|
+
results.push(fy26_04);
|
|
333
|
+
results.push(vcNext);
|
|
334
|
+
}
|
|
335
|
+
_context.next = 40;
|
|
336
|
+
break;
|
|
337
|
+
case 30:
|
|
338
|
+
_context.next = 32;
|
|
339
|
+
return calculator_fy25_03.calculate({
|
|
340
|
+
orderedEntries: orderedEntries,
|
|
341
|
+
startTime: start,
|
|
342
|
+
stopTime: stop,
|
|
343
|
+
interactionId: interactionId,
|
|
344
|
+
interactionType: interactionType,
|
|
345
|
+
isPostInteraction: this.isPostInteraction,
|
|
346
|
+
include3p: include3p,
|
|
347
|
+
excludeSmartAnswersInSearch: excludeSmartAnswersInSearch,
|
|
348
|
+
includeSSRRatio: includeSSRRatio,
|
|
349
|
+
isPageVisible: isPageVisible,
|
|
350
|
+
interactionAbortReason: interactionAbortReason
|
|
351
|
+
});
|
|
352
|
+
case 32:
|
|
353
|
+
_fy25_ = _context.sent;
|
|
354
|
+
if (_fy25_) {
|
|
355
|
+
results.push(_fy25_);
|
|
356
|
+
}
|
|
285
357
|
|
|
286
|
-
//
|
|
287
|
-
|
|
288
|
-
|
|
358
|
+
// From TTVC v4 onwards, ensuring that SSR entry is always auto-added, whenever it is configured.
|
|
359
|
+
// From the next major version release (where TTVC v4 becomes the default TTVC version), the config for `includeSSRInV3` will be deprecated
|
|
360
|
+
if (param.ssr && !param.includeSSRInV3 && fg('platform_ufo_auto_add_ssr_entry_in_ttvc_v4')) {
|
|
361
|
+
this.addSSR(param.ssr);
|
|
362
|
+
}
|
|
363
|
+
calculator_next = new VCCalculator_FY26_04();
|
|
364
|
+
_context.next = 38;
|
|
289
365
|
return calculator_next.calculate({
|
|
290
366
|
orderedEntries: orderedEntries,
|
|
291
367
|
startTime: start,
|
|
@@ -298,35 +374,37 @@ var VCObserverNew = /*#__PURE__*/function () {
|
|
|
298
374
|
isPageVisible: isPageVisible,
|
|
299
375
|
interactionAbortReason: interactionAbortReason
|
|
300
376
|
});
|
|
301
|
-
case
|
|
302
|
-
|
|
303
|
-
if (
|
|
304
|
-
|
|
377
|
+
case 38:
|
|
378
|
+
_vcNext = _context.sent;
|
|
379
|
+
if (_vcNext) {
|
|
380
|
+
_vcNext.revision = 'next';
|
|
381
|
+
results.push(_vcNext);
|
|
305
382
|
}
|
|
383
|
+
case 40:
|
|
306
384
|
feVCCalculationEndTime = performance.now();
|
|
307
385
|
if (!(includeRawData && fg('platform_ufo_enable_vc_raw_data'))) {
|
|
308
|
-
_context.next =
|
|
386
|
+
_context.next = 48;
|
|
309
387
|
break;
|
|
310
388
|
}
|
|
311
389
|
rawVCCalculationStartTime = performance.now();
|
|
312
390
|
rawHandler = new RawDataHandler();
|
|
313
|
-
_context.next =
|
|
391
|
+
_context.next = 46;
|
|
314
392
|
return rawHandler.getRawData({
|
|
315
393
|
entries: orderedEntries,
|
|
316
394
|
startTime: start,
|
|
317
395
|
stopTime: stop,
|
|
318
396
|
isPageVisible: isPageVisible
|
|
319
397
|
});
|
|
320
|
-
case
|
|
398
|
+
case 46:
|
|
321
399
|
raw = _context.sent;
|
|
322
400
|
if (raw) {
|
|
323
401
|
raw.rawVCTime = Number((performance.now() - rawVCCalculationStartTime).toFixed(2));
|
|
324
402
|
raw.feVCTime = Number((feVCCalculationEndTime - feVCCalculationStartTime).toFixed(2));
|
|
325
403
|
results.push(raw);
|
|
326
404
|
}
|
|
327
|
-
case
|
|
405
|
+
case 48:
|
|
328
406
|
return _context.abrupt("return", results);
|
|
329
|
-
case
|
|
407
|
+
case 49:
|
|
330
408
|
case "end":
|
|
331
409
|
return _context.stop();
|
|
332
410
|
}
|
|
@@ -10,9 +10,6 @@ function _superPropGet(t, o, e, r) { var p = _get(_getPrototypeOf(1 & r ? t.prot
|
|
|
10
10
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
11
|
import VCCalculator_FY25_03 from '../fy25_03';
|
|
12
12
|
import { KNOWN_ATTRIBUTES_THAT_DOES_NOT_CAUSE_LAYOUT_SHIFTS, NON_VISUAL_ARIA_ATTRIBUTES, THIRD_PARTY_BROWSER_EXTENSION_ATTRIBUTES } from '../utils/constants';
|
|
13
|
-
|
|
14
|
-
// NOTE: `next` to be renamed `fy26.04` once stable
|
|
15
|
-
var REVISION_NO = 'next';
|
|
16
13
|
var getConsideredEntryTypes = function getConsideredEntryTypes() {
|
|
17
14
|
var consideredEntryTypes = ['mutation:display-contents-children-element'];
|
|
18
15
|
if (fg('platform_ufo_remove_ssr_placeholder_in_ttvc_v4')) {
|
|
@@ -30,18 +27,16 @@ var getExcludedEntryTypes = function getExcludedEntryTypes() {
|
|
|
30
27
|
}
|
|
31
28
|
return excludedEntryTypes;
|
|
32
29
|
};
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
_classCallCheck(this, VCNextCalculator);
|
|
38
|
-
return _callSuper(this, VCNextCalculator, [REVISION_NO]);
|
|
30
|
+
var VCCalculator_FY26_04 = /*#__PURE__*/function (_VCCalculator_FY25_) {
|
|
31
|
+
function VCCalculator_FY26_04() {
|
|
32
|
+
_classCallCheck(this, VCCalculator_FY26_04);
|
|
33
|
+
return _callSuper(this, VCCalculator_FY26_04, ['fy26.04']);
|
|
39
34
|
}
|
|
40
|
-
_inherits(
|
|
41
|
-
return _createClass(
|
|
35
|
+
_inherits(VCCalculator_FY26_04, _VCCalculator_FY25_);
|
|
36
|
+
return _createClass(VCCalculator_FY26_04, [{
|
|
42
37
|
key: "isEntryIncluded",
|
|
43
38
|
value: function isEntryIncluded(entry, include3p) {
|
|
44
|
-
var isEntryIncludedInV3 = _superPropGet(
|
|
39
|
+
var isEntryIncludedInV3 = _superPropGet(VCCalculator_FY26_04, "isEntryIncluded", this, 3)([entry, include3p]);
|
|
45
40
|
if (isEntryIncludedInV3 && !getExcludedEntryTypes().includes(entry.data.type)) {
|
|
46
41
|
return true;
|
|
47
42
|
}
|
|
@@ -57,4 +52,4 @@ var VCNextCalculator = /*#__PURE__*/function (_VCCalculator_FY25_) {
|
|
|
57
52
|
}
|
|
58
53
|
}]);
|
|
59
54
|
}(VCCalculator_FY25_03);
|
|
60
|
-
export {
|
|
55
|
+
export { VCCalculator_FY26_04 as default };
|
|
@@ -13,6 +13,9 @@ import getViewportHeight from '../metric-calculator/utils/get-viewport-height';
|
|
|
13
13
|
import getViewportWidth from '../metric-calculator/utils/get-viewport-width';
|
|
14
14
|
var ABORTING_WINDOW_EVENT = ['wheel', 'scroll', 'keydown', 'resize'];
|
|
15
15
|
var MAX_OBSERVATIONS = 100;
|
|
16
|
+
function isWindowEventEntryData(data) {
|
|
17
|
+
return data.type === 'window:event' && 'eventType' in data;
|
|
18
|
+
}
|
|
16
19
|
var RawDataHandler = /*#__PURE__*/function () {
|
|
17
20
|
function RawDataHandler() {
|
|
18
21
|
_classCallCheck(this, RawDataHandler);
|
|
@@ -49,7 +52,7 @@ var RawDataHandler = /*#__PURE__*/function () {
|
|
|
49
52
|
key: "getRawData",
|
|
50
53
|
value: function () {
|
|
51
54
|
var _getRawData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref) {
|
|
52
|
-
var entries, startTime, stopTime, isPageVisible, isVCClean, dirtyReason, getVCCleanStatusResult, viewportEntries, targetNameToIdMap, elementMapEntriesMap, nextElementId, typeMap, typeMapEntriesMap, nextTypeId, attributeMap, attributeEntriesMap, nextAttributeId, rawObservations, firstObservation, lastObservations, referencedEids, referencedChgs, referencedAtts, _iterator, _step, observation, _iterator2, _step2, eid, _iterator3, _step3, chg, _iterator4, _step4, att, result;
|
|
55
|
+
var entries, startTime, stopTime, isPageVisible, isVCClean, dirtyReason, getVCCleanStatusResult, viewportEntries, windowEventEntries, targetNameToIdMap, elementMapEntriesMap, nextElementId, typeMap, typeMapEntriesMap, nextTypeId, attributeMap, attributeEntriesMap, nextAttributeId, eventTypeMap, eventTypeMapEntriesMap, nextEventTypeId, rawObservations, rawEventObservations, firstObservation, lastObservations, referencedEids, referencedChgs, referencedAtts, _iterator, _step, observation, _iterator2, _step2, eid, _iterator3, _step3, chg, _iterator4, _step4, att, firstEventObservation, lastEventObservations, referencedEvts, _iterator5, _step5, _observation, _iterator6, _step6, evt, result;
|
|
53
56
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
54
57
|
while (1) switch (_context.prev = _context.next) {
|
|
55
58
|
case 0:
|
|
@@ -76,6 +79,9 @@ var RawDataHandler = /*#__PURE__*/function () {
|
|
|
76
79
|
viewportEntries = entries.filter(function (entry) {
|
|
77
80
|
return entry.time >= startTime && entry.time <= stopTime && entry.data && entry.data.visible;
|
|
78
81
|
});
|
|
82
|
+
windowEventEntries = entries.filter(function (entry) {
|
|
83
|
+
return entry.time >= startTime && entry.time <= stopTime && entry.data && isWindowEventEntryData(entry.data);
|
|
84
|
+
});
|
|
79
85
|
targetNameToIdMap = new Map();
|
|
80
86
|
elementMapEntriesMap = {};
|
|
81
87
|
nextElementId = 1;
|
|
@@ -85,6 +91,9 @@ var RawDataHandler = /*#__PURE__*/function () {
|
|
|
85
91
|
attributeMap = new Map();
|
|
86
92
|
attributeEntriesMap = {};
|
|
87
93
|
nextAttributeId = 1;
|
|
94
|
+
eventTypeMap = new Map();
|
|
95
|
+
eventTypeMapEntriesMap = {};
|
|
96
|
+
nextEventTypeId = 1;
|
|
88
97
|
rawObservations = viewportEntries.map(function (entry) {
|
|
89
98
|
var viewportEntry = entry.data;
|
|
90
99
|
var targetName = viewportEntry.elementName || '';
|
|
@@ -124,6 +133,22 @@ var RawDataHandler = /*#__PURE__*/function () {
|
|
|
124
133
|
att: att
|
|
125
134
|
} : {});
|
|
126
135
|
return observation;
|
|
136
|
+
});
|
|
137
|
+
rawEventObservations = windowEventEntries.map(function (entry) {
|
|
138
|
+
var windowEventEntry = entry.data;
|
|
139
|
+
var eventType = windowEventEntry.eventType;
|
|
140
|
+
var evtId = eventTypeMap.get(eventType) || 0;
|
|
141
|
+
if (evtId === 0) {
|
|
142
|
+
evtId = nextEventTypeId;
|
|
143
|
+
nextEventTypeId += 1;
|
|
144
|
+
eventTypeMap.set(eventType, evtId);
|
|
145
|
+
eventTypeMapEntriesMap[evtId] = eventType;
|
|
146
|
+
}
|
|
147
|
+
var eventObservation = {
|
|
148
|
+
t: Math.round(entry.time - startTime),
|
|
149
|
+
evt: evtId
|
|
150
|
+
};
|
|
151
|
+
return eventObservation;
|
|
127
152
|
}); // If the number of observations is greater than the maximum allowed, we need to trim the observations to the maximum allowed.
|
|
128
153
|
// We do this by keeping the first observation and the last MAX_OBSERVATIONS observations.
|
|
129
154
|
// We then collect the referenced IDs from the remaining observations and remove the unreferenced entries from the maps
|
|
@@ -197,6 +222,46 @@ var RawDataHandler = /*#__PURE__*/function () {
|
|
|
197
222
|
_iterator4.f();
|
|
198
223
|
}
|
|
199
224
|
}
|
|
225
|
+
|
|
226
|
+
// If the number of event observations is greater than the maximum allowed, we need to trim the event observations to the maximum allowed.
|
|
227
|
+
// We do this by keeping the first observation and the last MAX_OBSERVATIONS observations.
|
|
228
|
+
// We then collect the referenced IDs from the remaining observations and remove the unreferenced entries from the maps
|
|
229
|
+
if (rawEventObservations.length > MAX_OBSERVATIONS) {
|
|
230
|
+
firstEventObservation = rawEventObservations[0];
|
|
231
|
+
lastEventObservations = rawEventObservations.slice(-MAX_OBSERVATIONS);
|
|
232
|
+
rawEventObservations = [firstEventObservation].concat(_toConsumableArray(lastEventObservations));
|
|
233
|
+
|
|
234
|
+
// Collect referenced IDs from remaining observations
|
|
235
|
+
referencedEvts = new Set();
|
|
236
|
+
_iterator5 = _createForOfIteratorHelper(rawEventObservations);
|
|
237
|
+
try {
|
|
238
|
+
for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
|
|
239
|
+
_observation = _step5.value;
|
|
240
|
+
if (_observation.evt > 0) {
|
|
241
|
+
referencedEvts.add(_observation.evt);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
// Remove unreferenced entries from maps
|
|
246
|
+
} catch (err) {
|
|
247
|
+
_iterator5.e(err);
|
|
248
|
+
} finally {
|
|
249
|
+
_iterator5.f();
|
|
250
|
+
}
|
|
251
|
+
_iterator6 = _createForOfIteratorHelper(Object.keys(eventTypeMapEntriesMap).map(Number));
|
|
252
|
+
try {
|
|
253
|
+
for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
|
|
254
|
+
evt = _step6.value;
|
|
255
|
+
if (!referencedEvts.has(evt)) {
|
|
256
|
+
delete eventTypeMapEntriesMap[evt];
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
} catch (err) {
|
|
260
|
+
_iterator6.e(err);
|
|
261
|
+
} finally {
|
|
262
|
+
_iterator6.f();
|
|
263
|
+
}
|
|
264
|
+
}
|
|
200
265
|
result = {
|
|
201
266
|
revision: this.revisionNo,
|
|
202
267
|
clean: isVCClean,
|
|
@@ -205,7 +270,9 @@ var RawDataHandler = /*#__PURE__*/function () {
|
|
|
205
270
|
obs: rawObservations !== null && rawObservations !== void 0 ? rawObservations : undefined,
|
|
206
271
|
eid: elementMapEntriesMap !== null && elementMapEntriesMap !== void 0 ? elementMapEntriesMap : undefined,
|
|
207
272
|
chg: typeMapEntriesMap !== null && typeMapEntriesMap !== void 0 ? typeMapEntriesMap : undefined,
|
|
208
|
-
att: attributeEntriesMap !== null && attributeEntriesMap !== void 0 ? attributeEntriesMap : undefined
|
|
273
|
+
att: attributeEntriesMap !== null && attributeEntriesMap !== void 0 ? attributeEntriesMap : undefined,
|
|
274
|
+
evts: rawEventObservations.length > 0 ? rawEventObservations : undefined,
|
|
275
|
+
evt: Object.keys(eventTypeMapEntriesMap).length > 0 ? eventTypeMapEntriesMap : undefined
|
|
209
276
|
},
|
|
210
277
|
abortReason: dirtyReason,
|
|
211
278
|
abortTimestamp: getVCCleanStatusResult.abortTimestamp,
|
|
@@ -215,7 +282,7 @@ var RawDataHandler = /*#__PURE__*/function () {
|
|
|
215
282
|
}
|
|
216
283
|
};
|
|
217
284
|
return _context.abrupt("return", result);
|
|
218
|
-
case
|
|
285
|
+
case 26:
|
|
219
286
|
case "end":
|
|
220
287
|
return _context.stop();
|
|
221
288
|
}
|
|
@@ -125,6 +125,10 @@ export type RawObservation = {
|
|
|
125
125
|
eid: number;
|
|
126
126
|
att?: number;
|
|
127
127
|
};
|
|
128
|
+
export type RawEventObservation = {
|
|
129
|
+
t: number;
|
|
130
|
+
evt: number;
|
|
131
|
+
};
|
|
128
132
|
export type RevisionPayloadEntry = {
|
|
129
133
|
'metric:vc90': number | null;
|
|
130
134
|
revision: string;
|
|
@@ -140,6 +144,8 @@ export type RevisionPayloadEntry = {
|
|
|
140
144
|
eid?: Record<number, string>;
|
|
141
145
|
chg?: Record<number, string>;
|
|
142
146
|
att?: Record<number, string>;
|
|
147
|
+
evts?: Array<RawEventObservation>;
|
|
148
|
+
evt?: Record<number, string>;
|
|
143
149
|
};
|
|
144
150
|
viewport?: {
|
|
145
151
|
w: number;
|
|
@@ -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' | 'next';
|
|
38
|
+
export type TTVCRevision = 'fy25.01' | 'fy25.02' | 'fy25.03' | 'fy26.04' | '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 = {
|
|
@@ -55,6 +55,10 @@ export type ReactHydrationStats = {
|
|
|
55
55
|
* The depth in the React component tree of the deepest warning.
|
|
56
56
|
*/
|
|
57
57
|
maxWarningComponentDepth?: number;
|
|
58
|
+
/**
|
|
59
|
+
* The ratio of DOM nodes preserved during hydration (between 0 and 1).
|
|
60
|
+
*/
|
|
61
|
+
preservationRatio?: number;
|
|
58
62
|
};
|
|
59
63
|
export type Config = {
|
|
60
64
|
readonly enabled?: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { VCObserverEntry } from '../../types';
|
|
2
2
|
import VCCalculator_FY25_03 from '../fy25_03';
|
|
3
|
-
export default class
|
|
3
|
+
export default class VCCalculator_FY26_04 extends VCCalculator_FY25_03 {
|
|
4
4
|
constructor();
|
|
5
5
|
protected isEntryIncluded(entry: VCObserverEntry, include3p?: boolean): boolean;
|
|
6
6
|
}
|
|
@@ -130,6 +130,10 @@ export type RawObservation = {
|
|
|
130
130
|
eid: number;
|
|
131
131
|
att?: number;
|
|
132
132
|
};
|
|
133
|
+
export type RawEventObservation = {
|
|
134
|
+
t: number;
|
|
135
|
+
evt: number;
|
|
136
|
+
};
|
|
133
137
|
export type RevisionPayloadEntry = {
|
|
134
138
|
'metric:vc90': number | null;
|
|
135
139
|
revision: string;
|
|
@@ -145,6 +149,8 @@ export type RevisionPayloadEntry = {
|
|
|
145
149
|
eid?: Record<number, string>;
|
|
146
150
|
chg?: Record<number, string>;
|
|
147
151
|
att?: Record<number, string>;
|
|
152
|
+
evts?: Array<RawEventObservation>;
|
|
153
|
+
evt?: Record<number, string>;
|
|
148
154
|
};
|
|
149
155
|
viewport?: {
|
|
150
156
|
w: number;
|
|
@@ -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' | 'next';
|
|
38
|
+
export type TTVCRevision = 'fy25.01' | 'fy25.02' | 'fy25.03' | 'fy26.04' | '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 = {
|
|
@@ -55,6 +55,10 @@ export type ReactHydrationStats = {
|
|
|
55
55
|
* The depth in the React component tree of the deepest warning.
|
|
56
56
|
*/
|
|
57
57
|
maxWarningComponentDepth?: number;
|
|
58
|
+
/**
|
|
59
|
+
* The ratio of DOM nodes preserved during hydration (between 0 and 1).
|
|
60
|
+
*/
|
|
61
|
+
preservationRatio?: number;
|
|
58
62
|
};
|
|
59
63
|
export type Config = {
|
|
60
64
|
readonly enabled?: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { VCObserverEntry } from '../../types';
|
|
2
2
|
import VCCalculator_FY25_03 from '../fy25_03';
|
|
3
|
-
export default class
|
|
3
|
+
export default class VCCalculator_FY26_04 extends VCCalculator_FY25_03 {
|
|
4
4
|
constructor();
|
|
5
5
|
protected isEntryIncluded(entry: VCObserverEntry, include3p?: boolean): boolean;
|
|
6
6
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/react-ufo",
|
|
3
|
-
"version": "4.15.
|
|
3
|
+
"version": "4.15.16",
|
|
4
4
|
"description": "Parts of React UFO that are publicly available",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -128,6 +128,9 @@
|
|
|
128
128
|
"platform_ufo_segment_critical_metrics": {
|
|
129
129
|
"type": "boolean"
|
|
130
130
|
},
|
|
131
|
+
"platform_ufo_vcnext_to_fy26_04_revision_update": {
|
|
132
|
+
"type": "boolean"
|
|
133
|
+
},
|
|
131
134
|
"platform_ufo_v4_fix_nested_ssr_placeholder": {
|
|
132
135
|
"type": "boolean"
|
|
133
136
|
},
|