@atlaskit/react-ufo 4.2.6 → 4.3.1
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/additional-payload/package.json +1 -1
- package/bundle-eval-timing/package.json +1 -1
- package/coinflip/package.json +1 -1
- package/common/package.json +1 -1
- package/config/package.json +1 -1
- package/create-experimental-interaction-metrics-payload/package.json +1 -1
- package/create-payload/package.json +1 -1
- package/create-post-interaction-log-payload/package.json +1 -1
- package/custom-cohort-data/package.json +1 -1
- package/custom-data/package.json +1 -1
- package/custom-mark/package.json +1 -1
- package/custom-spans/package.json +1 -1
- package/custom-timings/package.json +1 -1
- package/dist/cjs/config/index.js +39 -24
- package/dist/cjs/create-payload/index.js +13 -5
- package/dist/cjs/interaction-metrics/index.js +1 -0
- package/dist/cjs/resource-timing/main.js +1 -2
- package/dist/cjs/vc/vc-observer-new/metric-calculator/abstract-base-vc-calculator.js +26 -22
- package/dist/es2019/config/index.js +14 -0
- package/dist/es2019/create-payload/index.js +11 -1
- package/dist/es2019/interaction-metrics/index.js +2 -1
- package/dist/es2019/resource-timing/main.js +1 -2
- package/dist/es2019/vc/vc-observer-new/metric-calculator/abstract-base-vc-calculator.js +4 -0
- package/dist/esm/config/index.js +38 -24
- package/dist/esm/create-payload/index.js +13 -5
- package/dist/esm/interaction-metrics/index.js +2 -1
- package/dist/esm/resource-timing/main.js +1 -2
- package/dist/esm/vc/vc-observer-new/metric-calculator/abstract-base-vc-calculator.js +26 -22
- package/dist/types/common/common/types.d.ts +2 -0
- package/dist/types/config/index.d.ts +24 -0
- package/dist/types/create-payload/index.d.ts +25346 -146
- package/dist/types-ts4.5/common/common/types.d.ts +2 -0
- package/dist/types-ts4.5/config/index.d.ts +24 -0
- package/dist/types-ts4.5/create-payload/index.d.ts +25346 -146
- package/experience-trace-id-context/package.json +1 -1
- package/feature-flags-accessed/package.json +1 -1
- package/generate-id/package.json +1 -1
- package/global-error-handler/package.json +1 -1
- package/hidden-timing/package.json +1 -1
- package/initial-page-load-extra-timing/package.json +1 -1
- package/interaction-context/package.json +1 -1
- package/interaction-id-context/package.json +1 -1
- package/interaction-ignore/package.json +1 -1
- package/interaction-metrics/package.json +1 -1
- package/interaction-metrics-init/package.json +1 -1
- package/label/package.json +1 -1
- package/load-hold/package.json +1 -1
- package/package.json +4 -4
- package/placeholder/package.json +1 -1
- package/resource-timing/package.json +1 -1
- package/round-number/package.json +1 -1
- package/route-name/package.json +1 -1
- package/route-name-context/package.json +1 -1
- package/segment/package.json +1 -1
- package/set-interaction-error/package.json +1 -1
- package/short-id/package.json +1 -1
- package/ssr/package.json +1 -1
- package/ssr-scripts/package.json +1 -1
- package/suspense/package.json +1 -1
- package/trace-interaction/package.json +1 -1
- package/trace-pageload/package.json +1 -1
- package/trace-press/package.json +1 -1
- package/trace-redirect/package.json +1 -1
- package/trace-transition/package.json +1 -1
- package/typing-performance-tracing/package.json +1 -1
- package/use-press-tracing/package.json +1 -1
- package/vc/package.json +1 -1
- package/vc-media/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ReactHydrationStats } from '../../config';
|
|
1
2
|
import type { TraceIdContext } from '../../experience-trace-id-context';
|
|
2
3
|
import type { LabelStack, UFOInteractionContextType } from '../../interaction-context';
|
|
3
4
|
import type { VCObserverInterface } from '../../vc/types';
|
|
@@ -162,6 +163,7 @@ export interface InteractionMetrics {
|
|
|
162
163
|
vcObserver?: VCObserverInterface;
|
|
163
164
|
experimentalVCObserver?: VCObserverInterface;
|
|
164
165
|
vc?: VCRawDataType | null;
|
|
166
|
+
hydration?: ReactHydrationStats;
|
|
165
167
|
experimentalTTAI?: number;
|
|
166
168
|
experimentalVC90?: number;
|
|
167
169
|
unknownElementName?: string;
|
|
@@ -32,6 +32,24 @@ type Rates = {
|
|
|
32
32
|
};
|
|
33
33
|
export type TTVCRevision = 'fy25.01' | 'fy25.02' | 'fy25.03';
|
|
34
34
|
export declare const DEFAULT_TTVC_REVISION = "fy25.03";
|
|
35
|
+
export type ReactHydrationStats = {
|
|
36
|
+
/**
|
|
37
|
+
* Indicates if hydration of SSR content failed, so React switching to client-side rendering and re-rendered from scratch.
|
|
38
|
+
*/
|
|
39
|
+
successful: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* The total number of hydration errors reported from {@code hydrateRoot#onRecoverableError}.
|
|
42
|
+
*/
|
|
43
|
+
warningCount?: number;
|
|
44
|
+
/**
|
|
45
|
+
* The depth in the React component tree of the shallowest warning.
|
|
46
|
+
*/
|
|
47
|
+
minWarningComponentDepth?: number;
|
|
48
|
+
/**
|
|
49
|
+
* The depth in the React component tree of the deepest warning.
|
|
50
|
+
*/
|
|
51
|
+
maxWarningComponentDepth?: number;
|
|
52
|
+
};
|
|
35
53
|
export type Config = {
|
|
36
54
|
readonly enabled?: boolean;
|
|
37
55
|
readonly interactionTimeout?: Record<string, number>;
|
|
@@ -115,12 +133,18 @@ export type Config = {
|
|
|
115
133
|
readonly shouldCalculateLighthouseMetricsFromTTAI?: boolean;
|
|
116
134
|
readonly timeWindowForLateMutationsInMilliseconds?: number;
|
|
117
135
|
readonly manuallyTrackReactProfilerMounts?: boolean;
|
|
136
|
+
/**
|
|
137
|
+
* Callback for consumers to provide React hydration stats after React has finished.
|
|
138
|
+
* Return {@code null} if hydration was not attempted or if we do not want to report any stats.
|
|
139
|
+
*/
|
|
140
|
+
readonly getReactHydrationStats?: (() => ReactHydrationStats | undefined) | undefined;
|
|
118
141
|
};
|
|
119
142
|
export declare function setUFOConfig(newConfig: Config): void;
|
|
120
143
|
export declare function getConfig(): Config | undefined;
|
|
121
144
|
export declare function getEnabledVCRevisions(experienceKey?: string): readonly TTVCRevision[];
|
|
122
145
|
export declare function isVCRevisionEnabled(revision: TTVCRevision, experienceKey?: string): boolean;
|
|
123
146
|
export declare function getMostRecentVCRevision(experienceKey?: string): TTVCRevision;
|
|
147
|
+
export declare function getReactHydrationStats(): ReactHydrationStats | undefined;
|
|
124
148
|
export declare function getInteractionRate(name: string, interactionKind: InteractionKind): number;
|
|
125
149
|
export declare function getExperimentalInteractionRate(name: string, interactionType: InteractionType): number;
|
|
126
150
|
export declare function getPostInteractionRate(name: string, interactionType: InteractionType): number;
|