@atlaskit/react-ufo 4.4.3 → 4.4.5
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 +20 -0
- package/dist/cjs/create-interaction-extra-metrics-payload/index.js +116 -0
- package/dist/cjs/create-payload/index.js +3 -2
- package/dist/cjs/create-payload/utils/get-vc-metrics.js +37 -21
- package/dist/cjs/interaction-metrics/index.js +313 -259
- package/dist/cjs/interaction-metrics/interaction-extra-metrics.js +89 -0
- package/dist/cjs/interaction-metrics-init/index.js +51 -7
- package/dist/cjs/segment/third-party-segment.js +3 -1
- package/dist/cjs/ssr/index.js +3 -2
- package/dist/cjs/vc/index.js +4 -3
- package/dist/cjs/vc/vc-observer/index.js +31 -51
- package/dist/cjs/vc/vc-observer-new/index.js +4 -3
- package/dist/cjs/vc/vc-observer-new/metric-calculator/abstract-base-vc-calculator.js +7 -5
- package/dist/cjs/vc/vc-observer-new/metric-calculator/fy25_03/index.js +15 -6
- package/dist/es2019/create-interaction-extra-metrics-payload/index.js +93 -0
- package/dist/es2019/create-payload/index.js +3 -3
- package/dist/es2019/create-payload/utils/get-vc-metrics.js +3 -2
- package/dist/es2019/interaction-metrics/index.js +317 -260
- package/dist/es2019/interaction-metrics/interaction-extra-metrics.js +63 -0
- package/dist/es2019/interaction-metrics-init/index.js +29 -2
- package/dist/es2019/segment/third-party-segment.js +3 -1
- package/dist/es2019/ssr/index.js +3 -2
- package/dist/es2019/vc/index.js +4 -2
- package/dist/es2019/vc/vc-observer/index.js +41 -61
- package/dist/es2019/vc/vc-observer-new/index.js +4 -2
- package/dist/es2019/vc/vc-observer-new/metric-calculator/abstract-base-vc-calculator.js +7 -3
- package/dist/es2019/vc/vc-observer-new/metric-calculator/fy25_03/index.js +12 -5
- package/dist/esm/create-interaction-extra-metrics-payload/index.js +109 -0
- package/dist/esm/create-payload/index.js +3 -3
- package/dist/esm/create-payload/utils/get-vc-metrics.js +37 -21
- package/dist/esm/interaction-metrics/index.js +312 -258
- package/dist/esm/interaction-metrics/interaction-extra-metrics.js +83 -0
- package/dist/esm/interaction-metrics-init/index.js +48 -6
- package/dist/esm/segment/third-party-segment.js +3 -1
- package/dist/esm/ssr/index.js +3 -2
- package/dist/esm/vc/index.js +4 -3
- package/dist/esm/vc/vc-observer/index.js +31 -51
- package/dist/esm/vc/vc-observer-new/index.js +4 -3
- package/dist/esm/vc/vc-observer-new/metric-calculator/abstract-base-vc-calculator.js +7 -5
- package/dist/esm/vc/vc-observer-new/metric-calculator/fy25_03/index.js +15 -6
- package/dist/types/common/common/types.d.ts +2 -0
- package/dist/types/common/vc/types.d.ts +1 -0
- package/dist/types/create-interaction-extra-metrics-payload/index.d.ts +45 -0
- package/dist/types/create-payload/index.d.ts +1 -0
- package/dist/types/create-payload/utils/get-vc-metrics.d.ts +1 -1
- package/dist/types/interaction-metrics/index.d.ts +2 -0
- package/dist/types/interaction-metrics/interaction-extra-metrics.d.ts +17 -0
- package/dist/types/vc/types.d.ts +1 -0
- package/dist/types/vc/vc-observer/getVCRevisionDebugDetails.d.ts +1 -0
- package/dist/types/vc/vc-observer-new/metric-calculator/abstract-base-vc-calculator.d.ts +3 -2
- package/dist/types/vc/vc-observer-new/metric-calculator/fy25_03/index.d.ts +2 -2
- package/dist/types/vc/vc-observer-new/metric-calculator/types.d.ts +1 -0
- package/dist/types/vc/vc-observer-new/types.d.ts +1 -0
- package/dist/types-ts4.5/common/common/types.d.ts +2 -0
- package/dist/types-ts4.5/common/vc/types.d.ts +1 -0
- package/dist/types-ts4.5/create-interaction-extra-metrics-payload/index.d.ts +45 -0
- package/dist/types-ts4.5/create-payload/index.d.ts +1 -0
- package/dist/types-ts4.5/create-payload/utils/get-vc-metrics.d.ts +1 -1
- package/dist/types-ts4.5/interaction-metrics/index.d.ts +2 -0
- package/dist/types-ts4.5/interaction-metrics/interaction-extra-metrics.d.ts +17 -0
- package/dist/types-ts4.5/vc/types.d.ts +1 -0
- package/dist/types-ts4.5/vc/vc-observer/getVCRevisionDebugDetails.d.ts +1 -0
- package/dist/types-ts4.5/vc/vc-observer-new/metric-calculator/abstract-base-vc-calculator.d.ts +3 -2
- package/dist/types-ts4.5/vc/vc-observer-new/metric-calculator/fy25_03/index.d.ts +2 -2
- package/dist/types-ts4.5/vc/vc-observer-new/metric-calculator/types.d.ts +1 -0
- package/dist/types-ts4.5/vc/vc-observer-new/types.d.ts +1 -0
- package/package.json +7 -10
|
@@ -11,10 +11,11 @@ declare global {
|
|
|
11
11
|
export default abstract class AbstractVCCalculatorBase implements VCCalculator {
|
|
12
12
|
private revisionNo;
|
|
13
13
|
constructor(revisionNo: string);
|
|
14
|
-
protected abstract isEntryIncluded(entry: VCObserverEntry): boolean;
|
|
14
|
+
protected abstract isEntryIncluded(entry: VCObserverEntry, include3p?: boolean): boolean;
|
|
15
15
|
protected abstract getVCCleanStatus(filteredEntries: ReadonlyArray<VCObserverEntry>): {
|
|
16
16
|
isVCClean: boolean;
|
|
17
17
|
dirtyReason?: VCAbortReason;
|
|
18
|
+
abortTimestamp?: number;
|
|
18
19
|
};
|
|
19
20
|
private filterViewportEntries;
|
|
20
21
|
/**
|
|
@@ -22,5 +23,5 @@ export default abstract class AbstractVCCalculatorBase implements VCCalculator {
|
|
|
22
23
|
*/
|
|
23
24
|
private calculateRatios;
|
|
24
25
|
private calculateWithDebugInfo;
|
|
25
|
-
calculate({ startTime, stopTime, orderedEntries, interactionId, isPostInteraction, }: VCCalculatorParam): Promise<RevisionPayloadEntry | undefined>;
|
|
26
|
+
calculate({ startTime, stopTime, orderedEntries, interactionId, isPostInteraction, include3p, }: VCCalculatorParam): Promise<RevisionPayloadEntry | undefined>;
|
|
26
27
|
}
|
|
@@ -4,12 +4,12 @@ export declare const KNOWN_ATTRIBUTES_THAT_DOES_NOT_CAUSE_LAYOUT_SHIFTS: string[
|
|
|
4
4
|
export declare const NON_VISUAL_ARIA_ATTRIBUTES: string[];
|
|
5
5
|
export default class VCCalculator_FY25_03 extends AbstractVCCalculatorBase {
|
|
6
6
|
constructor();
|
|
7
|
-
protected isEntryIncluded(entry: VCObserverEntry): boolean;
|
|
7
|
+
protected isEntryIncluded(entry: VCObserverEntry, include3p?: boolean): boolean;
|
|
8
8
|
protected getVCCleanStatus(filteredEntries: readonly VCObserverEntry[]): {
|
|
9
|
+
abortTimestamp?: number | undefined;
|
|
9
10
|
isVCClean: boolean;
|
|
10
11
|
dirtyReason: never;
|
|
11
12
|
} | {
|
|
12
13
|
isVCClean: boolean;
|
|
13
|
-
dirtyReason?: undefined;
|
|
14
14
|
};
|
|
15
15
|
}
|
|
@@ -6,6 +6,7 @@ export type VCCalculatorParam = {
|
|
|
6
6
|
orderedEntries: ReadonlyArray<VCObserverEntry>;
|
|
7
7
|
interactionId?: string;
|
|
8
8
|
isPostInteraction: boolean;
|
|
9
|
+
include3p?: boolean;
|
|
9
10
|
};
|
|
10
11
|
export interface VCCalculator {
|
|
11
12
|
calculate(param: VCCalculatorParam): Promise<RevisionPayloadEntry | undefined>;
|
|
@@ -168,6 +168,8 @@ export interface InteractionMetrics {
|
|
|
168
168
|
experimentalVC90?: number;
|
|
169
169
|
unknownElementName?: string;
|
|
170
170
|
unknownElementHierarchy?: string;
|
|
171
|
+
hold3pActive?: Map<string, HoldActive>;
|
|
172
|
+
hold3pInfo?: HoldInfo[];
|
|
171
173
|
}
|
|
172
174
|
export type LoadProfilerEventInfo = {
|
|
173
175
|
identifier: string;
|
|
@@ -115,6 +115,7 @@ export type RevisionPayloadEntry = {
|
|
|
115
115
|
vcDetails?: RevisionPayloadVCDetails;
|
|
116
116
|
ratios?: VCRatioType;
|
|
117
117
|
abortReason?: VCAbortReason | null;
|
|
118
|
+
abortTimestamp?: number;
|
|
118
119
|
childrenIgnoredCount?: number;
|
|
119
120
|
};
|
|
120
121
|
export type RevisionPayload = RevisionPayloadEntry[];
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { InteractionMetrics } from '../common';
|
|
2
|
+
declare function createInteractionExtraLogPayload(interactionId: string, interaction: InteractionMetrics): Promise<{
|
|
3
|
+
actionSubject: string;
|
|
4
|
+
action: string;
|
|
5
|
+
eventType: string;
|
|
6
|
+
source: string;
|
|
7
|
+
tags: string[];
|
|
8
|
+
attributes: {
|
|
9
|
+
properties: {
|
|
10
|
+
'event:hostname': string;
|
|
11
|
+
'event:product': string;
|
|
12
|
+
'event:schema': string;
|
|
13
|
+
'event:sizeInKb': number;
|
|
14
|
+
'event:source': {
|
|
15
|
+
name: string;
|
|
16
|
+
version: string;
|
|
17
|
+
};
|
|
18
|
+
'event:region': string;
|
|
19
|
+
'experience:key': string;
|
|
20
|
+
'experience:name': string;
|
|
21
|
+
interactionMetrics: {
|
|
22
|
+
namePrefix: string;
|
|
23
|
+
segmentPrefix: string;
|
|
24
|
+
interactionId: string;
|
|
25
|
+
pageVisibilityAtTTAI: import("../common/react-ufo-payload-schema").PageVisibility;
|
|
26
|
+
experimental__pageVisibilityAtTTAI: import("../common/react-ufo-payload-schema").PageVisibility | null;
|
|
27
|
+
rate: number;
|
|
28
|
+
routeName: string | null;
|
|
29
|
+
type: "page_load" | "transition";
|
|
30
|
+
abortReason: import("../common").AbortReasonType | undefined;
|
|
31
|
+
previousInteractionName: string | undefined;
|
|
32
|
+
isPreviousInteractionAborted: boolean;
|
|
33
|
+
abortedByInteractionName: string | undefined;
|
|
34
|
+
end: number;
|
|
35
|
+
start: number;
|
|
36
|
+
'metric:ttai:3p': number | undefined;
|
|
37
|
+
ttvc: {
|
|
38
|
+
revision: string;
|
|
39
|
+
vc90: number;
|
|
40
|
+
}[];
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
} | null>;
|
|
45
|
+
export default createInteractionExtraLogPayload;
|
|
@@ -3,6 +3,7 @@ import { type ResourceTiming } from '../common/react-ufo-payload-schema';
|
|
|
3
3
|
import * as ssr from '../ssr';
|
|
4
4
|
import type { OptimizedLabelStack } from './common/types';
|
|
5
5
|
import type { CriticalMetricsPayload } from './critical-metrics-payload/types';
|
|
6
|
+
export declare function getMoreAccuratePageVisibilityUpToTTAI(interaction: InteractionMetrics): import("../common/react-ufo-payload-schema").PageVisibility;
|
|
6
7
|
export declare function createPayloads(interactionId: string, interaction: InteractionMetrics): Promise<(CriticalMetricsPayload | {
|
|
7
8
|
actionSubject: string;
|
|
8
9
|
action: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type InteractionMetrics } from '../../common';
|
|
2
2
|
import type { VCResult } from '../../common/vc/types';
|
|
3
|
-
declare function getVCMetrics(interaction: InteractionMetrics): Promise<VCResult & {
|
|
3
|
+
declare function getVCMetrics(interaction: InteractionMetrics, include3p?: boolean): Promise<VCResult & {
|
|
4
4
|
'metric:vc90'?: number | null;
|
|
5
5
|
}>;
|
|
6
6
|
export default getVCMetrics;
|
|
@@ -2,9 +2,11 @@ import type { AbortReasonType, ApdexType, BM3Event, CustomData, CustomTiming, In
|
|
|
2
2
|
import { type TraceIdContext } from '../experience-trace-id-context';
|
|
3
3
|
import { type FeatureFlagValue } from '../feature-flags-accessed';
|
|
4
4
|
import type { LabelStack } from '../interaction-context';
|
|
5
|
+
import InteractionExtraMetrics from './interaction-extra-metrics';
|
|
5
6
|
import PostInteractionLog from './post-interaction-log';
|
|
6
7
|
export type { InteractionMetrics, LifecycleMarkType, Span, Mark, MarkType, InteractionType, AbortReasonType, ReactProfilerTiming, RequestInfo, ApdexType, CustomData, CustomTiming, InteractionError, };
|
|
7
8
|
export declare const postInteractionLog: PostInteractionLog;
|
|
9
|
+
export declare const interactionExtraMetrics: InteractionExtraMetrics;
|
|
8
10
|
export declare const segmentUnmountCache: Map<string, number>;
|
|
9
11
|
export declare function getActiveInteraction(): InteractionMetrics | undefined;
|
|
10
12
|
export declare const getPerformanceObserver: () => PerformanceObserver;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { VCObserverInterface, VCObserverOptions } from '../vc/types';
|
|
2
|
+
import { type InteractionMetrics } from './index';
|
|
3
|
+
export default class InteractionExtraMetrics {
|
|
4
|
+
finishedInteractionId: string | null;
|
|
5
|
+
vcObserver: VCObserverInterface | null;
|
|
6
|
+
private sinkHandlerFn;
|
|
7
|
+
initializeVCObserver(options: VCObserverOptions): void;
|
|
8
|
+
startVCObserver({ startTime }: {
|
|
9
|
+
startTime: number;
|
|
10
|
+
}, interactionId: string): void;
|
|
11
|
+
stopVCObserver(): void;
|
|
12
|
+
eligibleToMeasure(interactionId: string): boolean;
|
|
13
|
+
updateFinishedInteractionId(interactionId: string): void;
|
|
14
|
+
sinkHandler(fn: (interactionId: string, interaction: InteractionMetrics) => void | Promise<void>): void;
|
|
15
|
+
onInteractionComplete(id: string, data: InteractionMetrics): void;
|
|
16
|
+
reset(): void;
|
|
17
|
+
}
|
package/dist/types-ts4.5/vc/vc-observer-new/metric-calculator/abstract-base-vc-calculator.d.ts
CHANGED
|
@@ -11,10 +11,11 @@ declare global {
|
|
|
11
11
|
export default abstract class AbstractVCCalculatorBase implements VCCalculator {
|
|
12
12
|
private revisionNo;
|
|
13
13
|
constructor(revisionNo: string);
|
|
14
|
-
protected abstract isEntryIncluded(entry: VCObserverEntry): boolean;
|
|
14
|
+
protected abstract isEntryIncluded(entry: VCObserverEntry, include3p?: boolean): boolean;
|
|
15
15
|
protected abstract getVCCleanStatus(filteredEntries: ReadonlyArray<VCObserverEntry>): {
|
|
16
16
|
isVCClean: boolean;
|
|
17
17
|
dirtyReason?: VCAbortReason;
|
|
18
|
+
abortTimestamp?: number;
|
|
18
19
|
};
|
|
19
20
|
private filterViewportEntries;
|
|
20
21
|
/**
|
|
@@ -22,5 +23,5 @@ export default abstract class AbstractVCCalculatorBase implements VCCalculator {
|
|
|
22
23
|
*/
|
|
23
24
|
private calculateRatios;
|
|
24
25
|
private calculateWithDebugInfo;
|
|
25
|
-
calculate({ startTime, stopTime, orderedEntries, interactionId, isPostInteraction, }: VCCalculatorParam): Promise<RevisionPayloadEntry | undefined>;
|
|
26
|
+
calculate({ startTime, stopTime, orderedEntries, interactionId, isPostInteraction, include3p, }: VCCalculatorParam): Promise<RevisionPayloadEntry | undefined>;
|
|
26
27
|
}
|
|
@@ -4,12 +4,12 @@ export declare const KNOWN_ATTRIBUTES_THAT_DOES_NOT_CAUSE_LAYOUT_SHIFTS: string[
|
|
|
4
4
|
export declare const NON_VISUAL_ARIA_ATTRIBUTES: string[];
|
|
5
5
|
export default class VCCalculator_FY25_03 extends AbstractVCCalculatorBase {
|
|
6
6
|
constructor();
|
|
7
|
-
protected isEntryIncluded(entry: VCObserverEntry): boolean;
|
|
7
|
+
protected isEntryIncluded(entry: VCObserverEntry, include3p?: boolean): boolean;
|
|
8
8
|
protected getVCCleanStatus(filteredEntries: readonly VCObserverEntry[]): {
|
|
9
|
+
abortTimestamp?: number | undefined;
|
|
9
10
|
isVCClean: boolean;
|
|
10
11
|
dirtyReason: never;
|
|
11
12
|
} | {
|
|
12
13
|
isVCClean: boolean;
|
|
13
|
-
dirtyReason?: undefined;
|
|
14
14
|
};
|
|
15
15
|
}
|
|
@@ -6,6 +6,7 @@ export type VCCalculatorParam = {
|
|
|
6
6
|
orderedEntries: ReadonlyArray<VCObserverEntry>;
|
|
7
7
|
interactionId?: string;
|
|
8
8
|
isPostInteraction: boolean;
|
|
9
|
+
include3p?: boolean;
|
|
9
10
|
};
|
|
10
11
|
export interface VCCalculator {
|
|
11
12
|
calculate(param: VCCalculatorParam): Promise<RevisionPayloadEntry | undefined>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/react-ufo",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.5",
|
|
4
4
|
"description": "Parts of React UFO that are publicly available",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -145,6 +145,9 @@
|
|
|
145
145
|
"enable_ufo_devtools_api_for_extra_events": {
|
|
146
146
|
"type": "boolean"
|
|
147
147
|
},
|
|
148
|
+
"platform_ufo_abort_timestamp_by_revision": {
|
|
149
|
+
"type": "boolean"
|
|
150
|
+
},
|
|
148
151
|
"platform_ufo_no_vc_on_aborted": {
|
|
149
152
|
"type": "boolean"
|
|
150
153
|
},
|
|
@@ -154,9 +157,6 @@
|
|
|
154
157
|
"platform_ufo_assets_check_for_nan": {
|
|
155
158
|
"type": "boolean"
|
|
156
159
|
},
|
|
157
|
-
"platform_ufo_ssr_size_field": {
|
|
158
|
-
"type": "boolean"
|
|
159
|
-
},
|
|
160
160
|
"platform_ufo_enable_timeout_config": {
|
|
161
161
|
"type": "boolean"
|
|
162
162
|
},
|
|
@@ -181,12 +181,6 @@
|
|
|
181
181
|
"platform_ufo_segment_critical_metrics": {
|
|
182
182
|
"type": "boolean"
|
|
183
183
|
},
|
|
184
|
-
"ufo_chrome_devtools_uplift": {
|
|
185
|
-
"type": "boolean"
|
|
186
|
-
},
|
|
187
|
-
"platform_ufo_post_interaction_check_name": {
|
|
188
|
-
"type": "boolean"
|
|
189
|
-
},
|
|
190
184
|
"platform_ufo_report_non_htmlelement_selectors": {
|
|
191
185
|
"type": "boolean"
|
|
192
186
|
},
|
|
@@ -204,6 +198,9 @@
|
|
|
204
198
|
},
|
|
205
199
|
"platform_ufo_segment_unmount_count": {
|
|
206
200
|
"type": "boolean"
|
|
201
|
+
},
|
|
202
|
+
"platform_ufo_enable_ttai_with_3p": {
|
|
203
|
+
"type": "boolean"
|
|
207
204
|
}
|
|
208
205
|
}
|
|
209
206
|
}
|