@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
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
2
2
|
import VCCalculator_FY25_03 from '../fy25_03';
|
|
3
3
|
import { KNOWN_ATTRIBUTES_THAT_DOES_NOT_CAUSE_LAYOUT_SHIFTS, NON_VISUAL_ARIA_ATTRIBUTES, THIRD_PARTY_BROWSER_EXTENSION_ATTRIBUTES } from '../utils/constants';
|
|
4
|
-
|
|
5
|
-
// NOTE: `next` to be renamed `fy26.04` once stable
|
|
6
|
-
const REVISION_NO = 'next';
|
|
7
4
|
const getConsideredEntryTypes = () => {
|
|
8
5
|
const consideredEntryTypes = ['mutation:display-contents-children-element'];
|
|
9
6
|
if (fg('platform_ufo_remove_ssr_placeholder_in_ttvc_v4')) {
|
|
@@ -21,11 +18,9 @@ const getExcludedEntryTypes = () => {
|
|
|
21
18
|
}
|
|
22
19
|
return excludedEntryTypes;
|
|
23
20
|
};
|
|
24
|
-
|
|
25
|
-
// NOTE: `VCNext` to be renamed `FY26_04` once stable
|
|
26
|
-
export default class VCNextCalculator extends VCCalculator_FY25_03 {
|
|
21
|
+
export default class VCCalculator_FY26_04 extends VCCalculator_FY25_03 {
|
|
27
22
|
constructor() {
|
|
28
|
-
super(
|
|
23
|
+
super('fy26.04');
|
|
29
24
|
}
|
|
30
25
|
isEntryIncluded(entry, include3p) {
|
|
31
26
|
const isEntryIncludedInV3 = super.isEntryIncluded(entry, include3p);
|
|
@@ -3,6 +3,9 @@ import getViewportHeight from '../metric-calculator/utils/get-viewport-height';
|
|
|
3
3
|
import getViewportWidth from '../metric-calculator/utils/get-viewport-width';
|
|
4
4
|
const ABORTING_WINDOW_EVENT = ['wheel', 'scroll', 'keydown', 'resize'];
|
|
5
5
|
const MAX_OBSERVATIONS = 100;
|
|
6
|
+
function isWindowEventEntryData(data) {
|
|
7
|
+
return data.type === 'window:event' && 'eventType' in data;
|
|
8
|
+
}
|
|
6
9
|
export default class RawDataHandler {
|
|
7
10
|
constructor() {
|
|
8
11
|
_defineProperty(this, "revisionNo", 'raw-handler');
|
|
@@ -60,6 +63,9 @@ export default class RawDataHandler {
|
|
|
60
63
|
const viewportEntries = entries.filter(entry => {
|
|
61
64
|
return entry.time >= startTime && entry.time <= stopTime && entry.data && entry.data.visible;
|
|
62
65
|
});
|
|
66
|
+
const windowEventEntries = entries.filter(entry => {
|
|
67
|
+
return entry.time >= startTime && entry.time <= stopTime && entry.data && isWindowEventEntryData(entry.data);
|
|
68
|
+
});
|
|
63
69
|
const targetNameToIdMap = new Map();
|
|
64
70
|
const elementMapEntriesMap = {};
|
|
65
71
|
let nextElementId = 1;
|
|
@@ -69,6 +75,9 @@ export default class RawDataHandler {
|
|
|
69
75
|
const attributeMap = new Map();
|
|
70
76
|
const attributeEntriesMap = {};
|
|
71
77
|
let nextAttributeId = 1;
|
|
78
|
+
const eventTypeMap = new Map();
|
|
79
|
+
const eventTypeMapEntriesMap = {};
|
|
80
|
+
let nextEventTypeId = 1;
|
|
72
81
|
let rawObservations = viewportEntries.map(entry => {
|
|
73
82
|
const viewportEntry = entry.data;
|
|
74
83
|
const targetName = viewportEntry.elementName || '';
|
|
@@ -110,6 +119,23 @@ export default class RawDataHandler {
|
|
|
110
119
|
};
|
|
111
120
|
return observation;
|
|
112
121
|
});
|
|
122
|
+
let rawEventObservations = windowEventEntries.map(entry => {
|
|
123
|
+
const windowEventEntry = entry.data;
|
|
124
|
+
const eventType = windowEventEntry.eventType;
|
|
125
|
+
let evtId = eventTypeMap.get(eventType) || 0;
|
|
126
|
+
if (evtId === 0) {
|
|
127
|
+
evtId = nextEventTypeId;
|
|
128
|
+
nextEventTypeId += 1;
|
|
129
|
+
eventTypeMap.set(eventType, evtId);
|
|
130
|
+
eventTypeMapEntriesMap[evtId] = eventType;
|
|
131
|
+
}
|
|
132
|
+
const eventObservation = {
|
|
133
|
+
t: Math.round(entry.time - startTime),
|
|
134
|
+
evt: evtId
|
|
135
|
+
};
|
|
136
|
+
return eventObservation;
|
|
137
|
+
});
|
|
138
|
+
|
|
113
139
|
// If the number of observations is greater than the maximum allowed, we need to trim the observations to the maximum allowed.
|
|
114
140
|
// We do this by keeping the first observation and the last MAX_OBSERVATIONS observations.
|
|
115
141
|
// We then collect the referenced IDs from the remaining observations and remove the unreferenced entries from the maps
|
|
@@ -151,6 +177,30 @@ export default class RawDataHandler {
|
|
|
151
177
|
}
|
|
152
178
|
}
|
|
153
179
|
}
|
|
180
|
+
|
|
181
|
+
// If the number of event observations is greater than the maximum allowed, we need to trim the event observations to the maximum allowed.
|
|
182
|
+
// We do this by keeping the first observation and the last MAX_OBSERVATIONS observations.
|
|
183
|
+
// We then collect the referenced IDs from the remaining observations and remove the unreferenced entries from the maps
|
|
184
|
+
if (rawEventObservations.length > MAX_OBSERVATIONS) {
|
|
185
|
+
const firstEventObservation = rawEventObservations[0];
|
|
186
|
+
const lastEventObservations = rawEventObservations.slice(-MAX_OBSERVATIONS);
|
|
187
|
+
rawEventObservations = [firstEventObservation, ...lastEventObservations];
|
|
188
|
+
|
|
189
|
+
// Collect referenced IDs from remaining observations
|
|
190
|
+
const referencedEvts = new Set();
|
|
191
|
+
for (const observation of rawEventObservations) {
|
|
192
|
+
if (observation.evt > 0) {
|
|
193
|
+
referencedEvts.add(observation.evt);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
// Remove unreferenced entries from maps
|
|
198
|
+
for (const evt of Object.keys(eventTypeMapEntriesMap).map(Number)) {
|
|
199
|
+
if (!referencedEvts.has(evt)) {
|
|
200
|
+
delete eventTypeMapEntriesMap[evt];
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
154
204
|
const result = {
|
|
155
205
|
revision: this.revisionNo,
|
|
156
206
|
clean: isVCClean,
|
|
@@ -159,7 +209,9 @@ export default class RawDataHandler {
|
|
|
159
209
|
obs: (_rawObservations = rawObservations) !== null && _rawObservations !== void 0 ? _rawObservations : undefined,
|
|
160
210
|
eid: elementMapEntriesMap !== null && elementMapEntriesMap !== void 0 ? elementMapEntriesMap : undefined,
|
|
161
211
|
chg: typeMapEntriesMap !== null && typeMapEntriesMap !== void 0 ? typeMapEntriesMap : undefined,
|
|
162
|
-
att: attributeEntriesMap !== null && attributeEntriesMap !== void 0 ? attributeEntriesMap : undefined
|
|
212
|
+
att: attributeEntriesMap !== null && attributeEntriesMap !== void 0 ? attributeEntriesMap : undefined,
|
|
213
|
+
evts: rawEventObservations.length > 0 ? rawEventObservations : undefined,
|
|
214
|
+
evt: Object.keys(eventTypeMapEntriesMap).length > 0 ? eventTypeMapEntriesMap : undefined
|
|
163
215
|
},
|
|
164
216
|
abortReason: dirtyReason,
|
|
165
217
|
abortTimestamp: getVCCleanStatusResult.abortTimestamp,
|
package/dist/esm/assets/index.js
CHANGED
package/dist/esm/config/index.js
CHANGED
|
@@ -141,7 +141,7 @@ export function getInteractionRate(name, interactionKind) {
|
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
return 0;
|
|
144
|
-
} catch (
|
|
144
|
+
} catch (_unused2) {
|
|
145
145
|
// Fallback
|
|
146
146
|
return 0;
|
|
147
147
|
}
|
|
@@ -163,7 +163,7 @@ export function getExperimentalInteractionRate(name, interactionType) {
|
|
|
163
163
|
return experimentalInteractionMetrics.kind[interactionType];
|
|
164
164
|
}
|
|
165
165
|
return 0;
|
|
166
|
-
} catch (
|
|
166
|
+
} catch (_unused3) {
|
|
167
167
|
return 0;
|
|
168
168
|
}
|
|
169
169
|
}
|
|
@@ -190,7 +190,7 @@ export function getCapabilityRate(capability) {
|
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
192
|
return 0;
|
|
193
|
-
} catch (
|
|
193
|
+
} catch (_unused4) {
|
|
194
194
|
return 0;
|
|
195
195
|
}
|
|
196
196
|
}
|
|
@@ -213,7 +213,7 @@ function getConfigRate(name, interactionType, configName) {
|
|
|
213
213
|
return gotConfig.kind[interactionType];
|
|
214
214
|
}
|
|
215
215
|
return 0;
|
|
216
|
-
} catch (
|
|
216
|
+
} catch (_unused5) {
|
|
217
217
|
return 0;
|
|
218
218
|
}
|
|
219
219
|
}
|
|
@@ -236,7 +236,7 @@ export function getTypingPerformanceTracingMethod() {
|
|
|
236
236
|
} else {
|
|
237
237
|
return defaultMethod;
|
|
238
238
|
}
|
|
239
|
-
} catch (
|
|
239
|
+
} catch (_unused6) {
|
|
240
240
|
return defaultMethod;
|
|
241
241
|
}
|
|
242
242
|
}
|
|
@@ -254,7 +254,7 @@ export function getAwaitBM3TTIList() {
|
|
|
254
254
|
} else {
|
|
255
255
|
return [];
|
|
256
256
|
}
|
|
257
|
-
} catch (
|
|
257
|
+
} catch (_unused7) {
|
|
258
258
|
return [];
|
|
259
259
|
}
|
|
260
260
|
}
|
|
@@ -274,7 +274,7 @@ export function getUfoNameOverrides() {
|
|
|
274
274
|
return ufoNameOverrides;
|
|
275
275
|
}
|
|
276
276
|
return undefined;
|
|
277
|
-
} catch (
|
|
277
|
+
} catch (_unused8) {
|
|
278
278
|
return undefined;
|
|
279
279
|
}
|
|
280
280
|
}
|
|
@@ -286,7 +286,7 @@ export function getMinorInteractions() {
|
|
|
286
286
|
var _config8 = config,
|
|
287
287
|
minorInteractions = _config8.minorInteractions;
|
|
288
288
|
return minorInteractions;
|
|
289
|
-
} catch (
|
|
289
|
+
} catch (_unused9) {
|
|
290
290
|
return undefined;
|
|
291
291
|
}
|
|
292
292
|
}
|
|
@@ -300,7 +300,7 @@ export function getDoNotAbortActivePressInteraction() {
|
|
|
300
300
|
var _config9 = config,
|
|
301
301
|
doNotAbortActivePressInteraction = _config9.doNotAbortActivePressInteraction;
|
|
302
302
|
return doNotAbortActivePressInteraction;
|
|
303
|
-
} catch (
|
|
303
|
+
} catch (_unused0) {
|
|
304
304
|
return undefined;
|
|
305
305
|
}
|
|
306
306
|
}
|
|
@@ -314,7 +314,7 @@ export function getDoNotAbortActivePressInteractionOnTransition() {
|
|
|
314
314
|
var _config0 = config,
|
|
315
315
|
doNotAbortActivePressInteractionOnTransition = _config0.doNotAbortActivePressInteractionOnTransition;
|
|
316
316
|
return doNotAbortActivePressInteractionOnTransition;
|
|
317
|
-
} catch (
|
|
317
|
+
} catch (_unused1) {
|
|
318
318
|
return undefined;
|
|
319
319
|
}
|
|
320
320
|
}
|
|
@@ -328,7 +328,7 @@ export function getFinishInteractionOnTransition() {
|
|
|
328
328
|
var _config1 = config,
|
|
329
329
|
finishInteractionOnTransition = _config1.finishInteractionOnTransition;
|
|
330
330
|
return finishInteractionOnTransition;
|
|
331
|
-
} catch (
|
|
331
|
+
} catch (_unused10) {
|
|
332
332
|
return undefined;
|
|
333
333
|
}
|
|
334
334
|
}
|
|
@@ -348,7 +348,7 @@ export function getInteractionTimeout(ufoName) {
|
|
|
348
348
|
} else {
|
|
349
349
|
return CLEANUP_TIMEOUT;
|
|
350
350
|
}
|
|
351
|
-
} catch (
|
|
351
|
+
} catch (_unused11) {
|
|
352
352
|
return CLEANUP_TIMEOUT;
|
|
353
353
|
}
|
|
354
354
|
}
|
|
@@ -5,7 +5,7 @@ function startsAsObject(value) {
|
|
|
5
5
|
if (value.charAt(0) === '{') {
|
|
6
6
|
return true;
|
|
7
7
|
}
|
|
8
|
-
} catch (
|
|
8
|
+
} catch (_unused) {
|
|
9
9
|
return false;
|
|
10
10
|
}
|
|
11
11
|
return false;
|
|
@@ -17,7 +17,7 @@ function isString(input) {
|
|
|
17
17
|
var result;
|
|
18
18
|
try {
|
|
19
19
|
result = typeof input === 'string' || input instanceof String;
|
|
20
|
-
} catch (
|
|
20
|
+
} catch (_unused2) {
|
|
21
21
|
// swallow any errors
|
|
22
22
|
result = false;
|
|
23
23
|
}
|
|
@@ -206,7 +206,7 @@ export function addCustomTiming(interactionId, labelStack, data) {
|
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
208
|
});
|
|
209
|
-
} catch (
|
|
209
|
+
} catch (_unused) {
|
|
210
210
|
// do nothing
|
|
211
211
|
}
|
|
212
212
|
}
|
|
@@ -288,7 +288,7 @@ export function addSpan(interactionId, type, name, labelStack, start) {
|
|
|
288
288
|
}
|
|
289
289
|
}
|
|
290
290
|
});
|
|
291
|
-
} catch (
|
|
291
|
+
} catch (_unused2) {
|
|
292
292
|
// do nothing
|
|
293
293
|
}
|
|
294
294
|
}
|
|
@@ -320,7 +320,7 @@ export function addSpanToAll(type, name, labelStack, start) {
|
|
|
320
320
|
}
|
|
321
321
|
}
|
|
322
322
|
});
|
|
323
|
-
} catch (
|
|
323
|
+
} catch (_unused3) {
|
|
324
324
|
// do nothing
|
|
325
325
|
}
|
|
326
326
|
}
|
|
@@ -414,7 +414,7 @@ export function addHold(interactionId, labelStack, name, experimental) {
|
|
|
414
414
|
}
|
|
415
415
|
}
|
|
416
416
|
});
|
|
417
|
-
} catch (
|
|
417
|
+
} catch (_unused4) {
|
|
418
418
|
// do nothing
|
|
419
419
|
}
|
|
420
420
|
}
|
|
@@ -607,7 +607,7 @@ export function addProfilerTimings(interactionId, labelStack, type, actualDurati
|
|
|
607
607
|
}
|
|
608
608
|
}
|
|
609
609
|
});
|
|
610
|
-
} catch (
|
|
610
|
+
} catch (_unused5) {
|
|
611
611
|
// do nothing
|
|
612
612
|
}
|
|
613
613
|
}
|
|
@@ -662,7 +662,7 @@ function finishInteraction(id, data) {
|
|
|
662
662
|
}
|
|
663
663
|
}
|
|
664
664
|
});
|
|
665
|
-
} catch (
|
|
665
|
+
} catch (_unused6) {
|
|
666
666
|
// do nothing
|
|
667
667
|
}
|
|
668
668
|
if (data.featureFlags) {
|
|
@@ -756,7 +756,7 @@ function finishInteraction(id, data) {
|
|
|
756
756
|
} finally {
|
|
757
757
|
_iterator3.f();
|
|
758
758
|
}
|
|
759
|
-
} catch (
|
|
759
|
+
} catch (_unused7) {
|
|
760
760
|
// do nothing
|
|
761
761
|
}
|
|
762
762
|
}
|
|
@@ -765,7 +765,7 @@ function finishInteraction(id, data) {
|
|
|
765
765
|
window.dispatchEvent(new CustomEvent('UFO_FINISH_INTERACTION', {
|
|
766
766
|
detail: data
|
|
767
767
|
}));
|
|
768
|
-
} catch (
|
|
768
|
+
} catch (_unused8) {
|
|
769
769
|
// do nothing
|
|
770
770
|
}
|
|
771
771
|
}
|
|
@@ -1167,7 +1167,7 @@ export function addApdexToAll(apdex) {
|
|
|
1167
1167
|
}
|
|
1168
1168
|
}
|
|
1169
1169
|
});
|
|
1170
|
-
} catch (
|
|
1170
|
+
} catch (_unused9) {
|
|
1171
1171
|
// do nothing
|
|
1172
1172
|
}
|
|
1173
1173
|
if (interaction.type === 'page_load' || interaction.type === 'transition') {
|
|
@@ -1201,7 +1201,7 @@ export function addApdex(interactionId, apdexInfo) {
|
|
|
1201
1201
|
}
|
|
1202
1202
|
}
|
|
1203
1203
|
});
|
|
1204
|
-
} catch (
|
|
1204
|
+
} catch (_unused0) {
|
|
1205
1205
|
// do nothing
|
|
1206
1206
|
}
|
|
1207
1207
|
if (interaction.type === 'page_load' || interaction.type === 'transition') {
|
|
@@ -1279,7 +1279,7 @@ export function addRedirect(interactionId, fromUfoName, nextUfoName, nextRouteNa
|
|
|
1279
1279
|
}
|
|
1280
1280
|
}
|
|
1281
1281
|
});
|
|
1282
|
-
} catch (
|
|
1282
|
+
} catch (_unused1) {
|
|
1283
1283
|
// do nothing
|
|
1284
1284
|
}
|
|
1285
1285
|
}
|
|
@@ -106,7 +106,7 @@ export function initialisePressureObserver() {
|
|
|
106
106
|
// This prevents unhandled promise rejections from being reported to Sentry
|
|
107
107
|
});
|
|
108
108
|
}
|
|
109
|
-
} catch (
|
|
109
|
+
} catch (_unused3) {
|
|
110
110
|
/* do nothing, this is a best efforts metric */
|
|
111
111
|
}
|
|
112
112
|
}
|
|
@@ -129,7 +129,7 @@ export function initialiseMemoryObserver() {
|
|
|
129
129
|
}
|
|
130
130
|
}, 100);
|
|
131
131
|
}
|
|
132
|
-
} catch (
|
|
132
|
+
} catch (_unused4) {
|
|
133
133
|
/* do nothing, this is a best efforts metric */
|
|
134
134
|
}
|
|
135
135
|
}
|
package/dist/esm/vc/index.js
CHANGED
|
@@ -7,6 +7,7 @@ var _process;
|
|
|
7
7
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
8
8
|
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; }
|
|
9
9
|
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; }
|
|
10
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
11
|
import { isVCRevisionEnabled } from '../config';
|
|
11
12
|
import { VCObserverNOOP } from './no-op-vc-observer';
|
|
12
13
|
import { VCObserver } from './vc-observer';
|
|
@@ -25,7 +26,8 @@ export var VCObserverWrapper = /*#__PURE__*/function () {
|
|
|
25
26
|
this.ssrPlaceholderHandler = new SSRPlaceholderHandlers({
|
|
26
27
|
enablePageLayoutPlaceholder: (_opts$ssrEnablePageLa = opts.ssrEnablePageLayoutPlaceholder) !== null && _opts$ssrEnablePageLa !== void 0 ? _opts$ssrEnablePageLa : false
|
|
27
28
|
});
|
|
28
|
-
|
|
29
|
+
var ttvcV4RevisionName = fg('platform_ufo_vcnext_to_fy26_04_revision_update') ? 'fy26.04' : 'next';
|
|
30
|
+
if (isVCRevisionEnabled('fy25.03') || isVCRevisionEnabled(ttvcV4RevisionName)) {
|
|
29
31
|
var _opts$ssrEnablePageLa2;
|
|
30
32
|
this.newVCObserver = new VCObserverNew({
|
|
31
33
|
selectorConfig: opts.selectorConfig,
|
|
@@ -3,7 +3,7 @@ export function getViewportWidth() {
|
|
|
3
3
|
var documentWidth;
|
|
4
4
|
try {
|
|
5
5
|
documentWidth = document.documentElement.clientWidth || 0;
|
|
6
|
-
} catch (
|
|
6
|
+
} catch (_unused) {
|
|
7
7
|
documentWidth = 0;
|
|
8
8
|
}
|
|
9
9
|
return Math.max(documentWidth, window.innerWidth || 0);
|
|
@@ -13,7 +13,7 @@ export function getViewportHeight() {
|
|
|
13
13
|
var documentHeight;
|
|
14
14
|
try {
|
|
15
15
|
documentHeight = document.documentElement.clientHeight || 0;
|
|
16
|
-
} catch (
|
|
16
|
+
} catch (_unused2) {
|
|
17
17
|
documentHeight = 0;
|
|
18
18
|
}
|
|
19
19
|
return Math.max(documentHeight, window.innerHeight || 0);
|
|
@@ -251,7 +251,7 @@ export var Observers = /*#__PURE__*/function () {
|
|
|
251
251
|
idString = [tagName, attrs || classList].join('');
|
|
252
252
|
}
|
|
253
253
|
return idString;
|
|
254
|
-
} catch (
|
|
254
|
+
} catch (_unused) {
|
|
255
255
|
return 'error';
|
|
256
256
|
}
|
|
257
257
|
}
|
|
@@ -288,7 +288,7 @@ export var Observers = /*#__PURE__*/function () {
|
|
|
288
288
|
var elementName;
|
|
289
289
|
try {
|
|
290
290
|
elementName = _this3.getElementName(target);
|
|
291
|
-
} catch (
|
|
291
|
+
} catch (_unused2) {
|
|
292
292
|
elementName = 'error';
|
|
293
293
|
}
|
|
294
294
|
callback(data.mutation.timestamp || performance.now(), ir, elementName, target, data.type, data.ignoreReason, data.attributeName, data.oldValue, data.newValue);
|
|
@@ -101,7 +101,7 @@ export var SSRPlaceholderHandlers = /*#__PURE__*/function () {
|
|
|
101
101
|
try {
|
|
102
102
|
// Collect initial placeholders using SSR dimensions
|
|
103
103
|
this.collectPlaceholdersInternal();
|
|
104
|
-
} catch (
|
|
104
|
+
} catch (_unused) {} finally {
|
|
105
105
|
delete window.__SSR_PLACEHOLDERS_DIMENSIONS__;
|
|
106
106
|
}
|
|
107
107
|
}
|
|
@@ -168,7 +168,7 @@ export var SSRPlaceholderHandlers = /*#__PURE__*/function () {
|
|
|
168
168
|
try {
|
|
169
169
|
// Collect placeholders using SSR dimensions or fallback to live dimensions
|
|
170
170
|
this.collectPlaceholdersInternal();
|
|
171
|
-
} catch (
|
|
171
|
+
} catch (_unused2) {
|
|
172
172
|
// Silently fail if there are any issues
|
|
173
173
|
} finally {
|
|
174
174
|
delete window.__SSR_PLACEHOLDERS_DIMENSIONS__;
|