@atlaskit/react-ufo 4.15.1 → 4.15.2
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 +7 -0
- package/dist/cjs/create-payload/index.js +18 -791
- package/dist/cjs/create-payload/utils/get-visibility-state-from-performance.js +1 -0
- package/dist/cjs/interaction-id-context/index.js +2 -1
- package/dist/cjs/vc/vc-observer-new/metric-calculator/fy25_03/index.js +1 -1
- package/dist/es2019/create-payload/index.js +20 -712
- package/dist/es2019/create-payload/utils/get-visibility-state-from-performance.js +1 -0
- package/dist/es2019/interaction-id-context/index.js +2 -1
- package/dist/es2019/vc/vc-observer-new/metric-calculator/fy25_03/index.js +1 -1
- package/dist/esm/create-payload/index.js +18 -783
- package/dist/esm/create-payload/utils/get-visibility-state-from-performance.js +1 -0
- package/dist/esm/interaction-id-context/index.js +2 -1
- package/dist/esm/vc/vc-observer-new/metric-calculator/fy25_03/index.js +1 -1
- package/dist/types/assets/utils.d.ts +1 -1
- package/dist/types/create-experimental-interaction-metrics-payload/index.d.ts +2 -1
- package/dist/types/create-interaction-extra-metrics-payload/index.d.ts +17 -14
- package/dist/types/create-payload/index.d.ts +8598 -8594
- package/dist/types/create-payload/utils/get-more-accurate-page-visibility-up-to-ttai.d.ts +2 -1
- package/dist/types/create-payload/utils/get-page-visibility-up-to-ttai.d.ts +2 -1
- package/dist/types/create-payload/utils/get-react-ufo-payload-version.d.ts +1 -1
- package/dist/types/create-payload/utils/optimize-apdex.d.ts +2 -1
- package/dist/types/create-payload/utils/optimize-marks.d.ts +4 -3
- package/dist/types/create-post-interaction-log-payload/index.d.ts +5 -4
- package/dist/types/experience-trace-id-context/index.d.ts +2 -1
- package/dist/types/ignore-holds/index.d.ts +1 -1
- package/dist/types/interaction-id-context/index.d.ts +3 -2
- package/dist/types/label/UFOLabel.d.ts +1 -1
- package/dist/types/load-hold/UFOLoadHold.d.ts +1 -1
- package/dist/types/placeholder/loosely-lazy/wait-context.d.ts +2 -1
- package/dist/types/report-error/index.d.ts +1 -1
- package/dist/types/trace-interaction/internal/map-to-interaction-type.d.ts +1 -1
- package/dist/types/typing-performance-tracing/index.d.ts +2 -1
- package/dist/types/vc/vc-observer/media-wrapper/MediaWrapper.d.ts +1 -1
- package/dist/types/vc/vc-observer/observers/ssr-placeholders/index.d.ts +3 -3
- package/dist/types/vc/vc-observer-new/viewport-observer/performance-observer/index.d.ts +1 -1
- package/dist/types-ts4.5/assets/utils.d.ts +1 -1
- package/dist/types-ts4.5/create-experimental-interaction-metrics-payload/index.d.ts +2 -1
- package/dist/types-ts4.5/create-interaction-extra-metrics-payload/index.d.ts +17 -14
- package/dist/types-ts4.5/create-payload/index.d.ts +8598 -8594
- package/dist/types-ts4.5/create-payload/utils/get-more-accurate-page-visibility-up-to-ttai.d.ts +2 -1
- package/dist/types-ts4.5/create-payload/utils/get-page-visibility-up-to-ttai.d.ts +2 -1
- package/dist/types-ts4.5/create-payload/utils/get-react-ufo-payload-version.d.ts +1 -1
- package/dist/types-ts4.5/create-payload/utils/optimize-apdex.d.ts +2 -1
- package/dist/types-ts4.5/create-payload/utils/optimize-marks.d.ts +4 -3
- package/dist/types-ts4.5/create-post-interaction-log-payload/index.d.ts +5 -4
- package/dist/types-ts4.5/experience-trace-id-context/index.d.ts +2 -1
- package/dist/types-ts4.5/ignore-holds/index.d.ts +1 -1
- package/dist/types-ts4.5/interaction-id-context/index.d.ts +3 -2
- package/dist/types-ts4.5/label/UFOLabel.d.ts +1 -1
- package/dist/types-ts4.5/load-hold/UFOLoadHold.d.ts +1 -1
- package/dist/types-ts4.5/placeholder/loosely-lazy/wait-context.d.ts +2 -1
- package/dist/types-ts4.5/report-error/index.d.ts +1 -1
- package/dist/types-ts4.5/trace-interaction/internal/map-to-interaction-type.d.ts +1 -1
- package/dist/types-ts4.5/typing-performance-tracing/index.d.ts +2 -1
- package/dist/types-ts4.5/vc/vc-observer/media-wrapper/MediaWrapper.d.ts +1 -1
- package/dist/types-ts4.5/vc/vc-observer/observers/ssr-placeholders/index.d.ts +3 -3
- package/dist/types-ts4.5/vc/vc-observer-new/viewport-observer/performance-observer/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import type { InteractionMetrics } from '../../common';
|
|
2
|
-
|
|
2
|
+
import type { PageVisibility } from '../../common/react-ufo-payload-schema';
|
|
3
|
+
export declare function getMoreAccuratePageVisibilityUpToTTAI(interaction: InteractionMetrics): PageVisibility;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { InteractionMetrics } from '../../common';
|
|
2
|
-
|
|
2
|
+
import type { PageVisibility } from '../../common/react-ufo-payload-schema';
|
|
3
|
+
declare function getPageVisibilityUpToTTAI(interaction: InteractionMetrics): PageVisibility;
|
|
3
4
|
export default getPageVisibilityUpToTTAI;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { InteractionType } from '../../interaction-metrics';
|
|
2
2
|
export declare const LATEST_REACT_UFO_PAYLOAD_VERSION = "2.0.0";
|
|
3
|
-
export declare function getReactUFOPayloadVersion(interactionType: InteractionType, isPostInteractionLog?: boolean):
|
|
3
|
+
export declare function getReactUFOPayloadVersion(interactionType: InteractionType, isPostInteractionLog?: boolean): '1.0.1' | '2.0.0';
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { ApdexType } from '../../common';
|
|
2
|
+
import type { UFOSegmentType } from '../../segment/segment';
|
|
2
3
|
import type { getReactUFOPayloadVersion } from './get-react-ufo-payload-version';
|
|
3
4
|
export declare function optimizeApdex(apdex: ApdexType[], reactUFOVersion: ReturnType<typeof getReactUFOPayloadVersion>): {
|
|
4
5
|
labelStack?: string | {
|
|
5
|
-
t?:
|
|
6
|
+
t?: UFOSegmentType | undefined;
|
|
6
7
|
s?: string | undefined;
|
|
7
8
|
n: string;
|
|
8
9
|
}[] | undefined;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import type { InteractionMetrics } from '../../common';
|
|
1
|
+
import type { InteractionMetrics, MarkType } from '../../common';
|
|
2
|
+
import type { UFOSegmentType } from '../../segment/segment';
|
|
2
3
|
import type { getReactUFOPayloadVersion } from './get-react-ufo-payload-version';
|
|
3
4
|
export declare function optimizeMarks(marks: InteractionMetrics['marks'], reactUFOVersion: ReturnType<typeof getReactUFOPayloadVersion>): {
|
|
4
5
|
labelStack: string | {
|
|
5
|
-
t?:
|
|
6
|
+
t?: UFOSegmentType | undefined;
|
|
6
7
|
s?: string | undefined;
|
|
7
8
|
n: string;
|
|
8
9
|
}[] | null;
|
|
9
10
|
time: number;
|
|
10
|
-
type:
|
|
11
|
+
type: MarkType;
|
|
11
12
|
name: string;
|
|
12
13
|
}[];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type PostInteractionLogOutput } from '../common';
|
|
2
2
|
import type { LateMutation } from '../common/react-ufo-payload-schema';
|
|
3
|
+
import { type AbortReasonType, type InteractionError, type InteractionType } from '../interaction-metrics';
|
|
3
4
|
declare function createPostInteractionLogPayload({ lastInteractionFinish, reactProfilerTimings, lastInteractionFinishVCResult, postInteractionFinishVCResult, postInteractionHoldInfo, }: PostInteractionLogOutput): {
|
|
4
5
|
actionSubject: string;
|
|
5
6
|
action: string;
|
|
@@ -31,14 +32,14 @@ declare function createPostInteractionLogPayload({ lastInteractionFinish, reactP
|
|
|
31
32
|
ttai: number;
|
|
32
33
|
vc90: number | null;
|
|
33
34
|
vcClean: boolean;
|
|
34
|
-
type:
|
|
35
|
-
abortReason?: import("../common").AbortReasonType | undefined;
|
|
35
|
+
type: InteractionType;
|
|
36
36
|
routeName: string | null;
|
|
37
|
+
abortReason?: AbortReasonType | undefined;
|
|
37
38
|
abortedByInteractionName?: string | undefined;
|
|
38
|
-
errors:
|
|
39
|
+
errors: InteractionError[];
|
|
39
40
|
id: string;
|
|
40
|
-
experimentalTTAI?: number | undefined;
|
|
41
41
|
experimentalVC90?: number | undefined;
|
|
42
|
+
experimentalTTAI?: number | undefined;
|
|
42
43
|
};
|
|
43
44
|
revisedEndTime: number;
|
|
44
45
|
revisedTtai: number;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import type { TraceIdContext } from './types';
|
|
1
2
|
export type { TraceIdContext } from './types';
|
|
2
3
|
export declare function generateSpanId(): string;
|
|
3
4
|
export declare function setInteractionActiveTrace(interactionId: string, experienceType: string): void;
|
|
4
5
|
export declare function setActiveTrace(traceId: string, spanId: string, type: string): void;
|
|
5
|
-
export declare function getActiveTrace():
|
|
6
|
+
export declare function getActiveTrace(): TraceIdContext | undefined;
|
|
6
7
|
export declare function clearActiveTrace(): void;
|
|
7
8
|
export declare function getActiveTraceHttpRequestHeaders(_url?: string): {
|
|
8
9
|
'X-B3-TraceId': string;
|
|
@@ -24,7 +24,7 @@ export type UFOIgnoreHoldsProps = {
|
|
|
24
24
|
* Has an `ignore` prop, to allow you to use it conditionally
|
|
25
25
|
* Has a `reason` prop, to specify why the hold is being ignored
|
|
26
26
|
*/
|
|
27
|
-
declare function UFOIgnoreHolds({ children, ignore }: UFOIgnoreHoldsProps): React.JSX.Element;
|
|
27
|
+
declare function UFOIgnoreHolds({ children, ignore, }: UFOIgnoreHoldsProps): React.JSX.Element;
|
|
28
28
|
declare namespace UFOIgnoreHolds {
|
|
29
29
|
var displayName: string;
|
|
30
30
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type Context } from 'react';
|
|
1
2
|
export type InteractionIDContextType = {
|
|
2
3
|
current: string | null;
|
|
3
4
|
};
|
|
@@ -7,7 +8,7 @@ declare global {
|
|
|
7
8
|
}
|
|
8
9
|
export declare const DefaultInteractionID: InteractionIDContextType;
|
|
9
10
|
export declare const subscribeToInteractionIdChanges: (listener: InteractionIDListener) => (() => void);
|
|
10
|
-
declare const
|
|
11
|
-
export default
|
|
11
|
+
declare const _default_1: Context<InteractionIDContextType>;
|
|
12
|
+
export default _default_1;
|
|
12
13
|
export declare const getInteractionId: () => InteractionIDContextType;
|
|
13
14
|
export declare const useInteractionId: () => InteractionIDContextType;
|
|
@@ -49,5 +49,5 @@ type Props = {
|
|
|
49
49
|
children?: ReactNode;
|
|
50
50
|
experimental?: boolean;
|
|
51
51
|
};
|
|
52
|
-
export default function UFOLoadHold({ children, name, hold, experimental }: Props): React.JSX.Element | null;
|
|
52
|
+
export default function UFOLoadHold({ children, name, hold, experimental, }: Props): React.JSX.Element | null;
|
|
53
53
|
export {};
|
|
@@ -14,4 +14,4 @@ import { type InteractionError } from '../interaction-metrics';
|
|
|
14
14
|
* ```
|
|
15
15
|
* @returns `reportError` function
|
|
16
16
|
*/
|
|
17
|
-
export declare function useUFOReportError(): (error: Omit<InteractionError,
|
|
17
|
+
export declare function useUFOReportError(): (error: Omit<InteractionError, 'labelStack' | 'errorType'>) => void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare function mapToInteractionType(eventType: string):
|
|
1
|
+
declare function mapToInteractionType(eventType: string): 'press' | 'hover' | undefined;
|
|
2
2
|
export default mapToInteractionType;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { type RefObject } from 'react';
|
|
2
|
+
export default function useUFOTypingPerformanceTracing<T extends HTMLElement>(name: string): RefObject<T>;
|
|
@@ -4,7 +4,7 @@ type Props = {
|
|
|
4
4
|
};
|
|
5
5
|
export declare const MEDIA_WRAPPER_TAG = "data-media-vc-wrapper";
|
|
6
6
|
export declare const VcMediaWrapperProps: {
|
|
7
|
-
|
|
7
|
+
'data-media-vc-wrapper': boolean;
|
|
8
8
|
};
|
|
9
9
|
export default function MediaWrapper({ children }: Props): React.JSX.Element;
|
|
10
10
|
export {};
|
|
@@ -29,10 +29,10 @@ export declare class SSRPlaceholderHandlers {
|
|
|
29
29
|
isPlaceholderReplacement(element: HTMLElement): boolean;
|
|
30
30
|
isPlaceholderIgnored(element: HTMLElement): boolean;
|
|
31
31
|
findNearestPlaceholderContainerIfIgnored(element: HTMLElement): HTMLElement;
|
|
32
|
-
checkIfExistedAndSizeMatching(el: HTMLElement): Promise<
|
|
32
|
+
checkIfExistedAndSizeMatching(el: HTMLElement): Promise<boolean>;
|
|
33
33
|
checkIfExistedAndSizeMatchingV3(el: HTMLElement): boolean;
|
|
34
34
|
getSize(el: HTMLElement): Promise<Rect>;
|
|
35
|
-
validateReactComponentMatchToPlaceholder(el: HTMLElement): Promise<
|
|
35
|
+
validateReactComponentMatchToPlaceholder(el: HTMLElement): Promise<boolean>;
|
|
36
36
|
hasSameSizePosition(rect: Rect | undefined, boundingClientRect: DOMRectReadOnly): boolean;
|
|
37
37
|
/**
|
|
38
38
|
* Gets the effective bounding rectangle for an element, handling display: contents elements
|
|
@@ -40,6 +40,6 @@ export declare class SSRPlaceholderHandlers {
|
|
|
40
40
|
*/
|
|
41
41
|
private getEffectiveBoundingRect;
|
|
42
42
|
isDummyRect(rect: Rect | undefined): boolean;
|
|
43
|
-
intersectionObserverCallback: ({ target, boundingClientRect }: IntersectionObserverEntry) => void;
|
|
43
|
+
intersectionObserverCallback: ({ target, boundingClientRect, }: IntersectionObserverEntry) => void;
|
|
44
44
|
}
|
|
45
45
|
export {};
|
|
@@ -10,5 +10,5 @@ export type CreatePerformanceObserverArgs = {
|
|
|
10
10
|
changedRects: ChangedRect;
|
|
11
11
|
}) => void;
|
|
12
12
|
};
|
|
13
|
-
declare function createPerformanceObserver({ onLayoutShift }: CreatePerformanceObserverArgs): PerformanceObserver | null;
|
|
13
|
+
declare function createPerformanceObserver({ onLayoutShift, }: CreatePerformanceObserverArgs): PerformanceObserver | null;
|
|
14
14
|
export default createPerformanceObserver;
|
|
@@ -3,7 +3,7 @@ export declare const cacheableTypes: string[];
|
|
|
3
3
|
export declare const MEMORY_KEY = "mem";
|
|
4
4
|
export declare const DISK_KEY = "disk";
|
|
5
5
|
export declare const NETWORK_KEY = "net";
|
|
6
|
-
export declare function calculateTransferType(name: string, type: string, duration: number, size: number | undefined):
|
|
6
|
+
export declare function calculateTransferType(name: string, type: string, duration: number, size: number | undefined): 'mem' | 'disk' | 'net' | null;
|
|
7
7
|
export declare function getTypeOfRequest({ name, initiatorType: type }: ResourceEntry): string;
|
|
8
8
|
export declare function checkIfTimingsAvailable(entry: ResourceEntry): boolean;
|
|
9
9
|
export declare function round(n: number): number;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { InteractionMetrics } from '../common';
|
|
2
|
+
import type { VCResult } from '../common/vc/types';
|
|
2
3
|
import type { VCObserverOptions } from '../vc/types';
|
|
3
4
|
import { VCObserver } from '../vc/vc-observer';
|
|
4
5
|
type InteractionMetricsHandler = (interactionId: string, interaction: InteractionMetrics) => void | Promise<void>;
|
|
@@ -13,5 +14,5 @@ export declare class ExperimentalVCMetrics {
|
|
|
13
14
|
}): void;
|
|
14
15
|
}
|
|
15
16
|
export declare const experimentalVC: ExperimentalVCMetrics;
|
|
16
|
-
export declare function getExperimentalVCMetrics(interaction: InteractionMetrics): Promise<
|
|
17
|
+
export declare function getExperimentalVCMetrics(interaction: InteractionMetrics): Promise<VCResult | null>;
|
|
17
18
|
export {};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import type { InteractionMetrics } from '../common';
|
|
1
|
+
import type { AbortReasonType, CustomData, HoldActive, InteractionMetrics, MarkType } from '../common';
|
|
2
|
+
import type { PageVisibility } from '../common/react-ufo-payload-schema';
|
|
2
3
|
import type { VCResult } from '../common/vc/types';
|
|
4
|
+
import type { OptimizedLabelStack } from '../create-payload/common/types';
|
|
3
5
|
import type { LabelStack } from '../interaction-context';
|
|
6
|
+
import type { UFOSegmentType } from '../segment/segment';
|
|
4
7
|
declare function createInteractionExtraLogPayload(interactionId: string, interaction: InteractionMetrics, lastInteractionFinish: InteractionMetrics | null, lastInteractionFinishVCResult?: VCResult): Promise<{
|
|
5
8
|
actionSubject: string;
|
|
6
9
|
action: string;
|
|
@@ -23,7 +26,7 @@ declare function createInteractionExtraLogPayload(interactionId: string, interac
|
|
|
23
26
|
interactionMetrics: {
|
|
24
27
|
errors: {
|
|
25
28
|
labelStack: string | {
|
|
26
|
-
t?:
|
|
29
|
+
t?: UFOSegmentType | undefined;
|
|
27
30
|
s?: string | undefined;
|
|
28
31
|
n: string;
|
|
29
32
|
}[] | null;
|
|
@@ -35,38 +38,38 @@ declare function createInteractionExtraLogPayload(interactionId: string, interac
|
|
|
35
38
|
errorHash?: string;
|
|
36
39
|
errorStatusCode?: number;
|
|
37
40
|
}[];
|
|
38
|
-
holdActive:
|
|
41
|
+
holdActive: HoldActive[];
|
|
39
42
|
holdInfo: any[];
|
|
40
43
|
spans: {
|
|
41
|
-
labelStack:
|
|
44
|
+
labelStack: OptimizedLabelStack;
|
|
42
45
|
startTime: number;
|
|
43
46
|
endTime: number;
|
|
44
47
|
type: string;
|
|
45
48
|
}[];
|
|
46
49
|
requestInfo: {
|
|
47
|
-
labelStack:
|
|
50
|
+
labelStack: OptimizedLabelStack;
|
|
48
51
|
startTime: number;
|
|
49
52
|
endTime: number;
|
|
50
53
|
}[];
|
|
51
54
|
customTimings: {
|
|
52
|
-
labelStack:
|
|
55
|
+
labelStack: OptimizedLabelStack;
|
|
53
56
|
startTime: number;
|
|
54
57
|
endTime: number;
|
|
55
58
|
}[];
|
|
56
59
|
segments: {};
|
|
57
60
|
marks: {
|
|
58
61
|
labelStack: string | {
|
|
59
|
-
t?:
|
|
62
|
+
t?: UFOSegmentType | undefined;
|
|
60
63
|
s?: string | undefined;
|
|
61
64
|
n: string;
|
|
62
65
|
}[] | null;
|
|
63
66
|
time: number;
|
|
64
|
-
type:
|
|
67
|
+
type: MarkType;
|
|
65
68
|
name: string;
|
|
66
69
|
}[];
|
|
67
70
|
apdex: {
|
|
68
71
|
labelStack?: string | {
|
|
69
|
-
t?:
|
|
72
|
+
t?: UFOSegmentType | undefined;
|
|
70
73
|
s?: string | undefined;
|
|
71
74
|
n: string;
|
|
72
75
|
}[] | undefined;
|
|
@@ -77,18 +80,18 @@ declare function createInteractionExtraLogPayload(interactionId: string, interac
|
|
|
77
80
|
reactProfilerTimings: any[];
|
|
78
81
|
customData: {
|
|
79
82
|
labelStack: LabelStack;
|
|
80
|
-
data:
|
|
83
|
+
data: CustomData;
|
|
81
84
|
}[];
|
|
82
85
|
'metric:vc90'?: number | null;
|
|
83
86
|
namePrefix: string;
|
|
84
87
|
segmentPrefix: string;
|
|
85
88
|
interactionId: string;
|
|
86
|
-
pageVisibilityAtTTAI:
|
|
87
|
-
experimental__pageVisibilityAtTTAI:
|
|
89
|
+
pageVisibilityAtTTAI: PageVisibility;
|
|
90
|
+
experimental__pageVisibilityAtTTAI: PageVisibility | null;
|
|
88
91
|
rate: number;
|
|
89
92
|
routeName: string | null;
|
|
90
|
-
type:
|
|
91
|
-
abortReason:
|
|
93
|
+
type: 'page_load' | 'transition';
|
|
94
|
+
abortReason: AbortReasonType | undefined;
|
|
92
95
|
previousInteractionName: string | undefined;
|
|
93
96
|
isPreviousInteractionAborted: boolean;
|
|
94
97
|
abortedByInteractionName: string | undefined;
|