@atlaskit/react-ufo 5.1.3 → 5.1.4
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/AGENTS.md +426 -0
- package/CHANGELOG.md +9 -0
- package/dist/cjs/interaction-metrics/index.js +11 -3
- package/dist/cjs/set-terminal-error/index.js +11 -3
- package/dist/cjs/vc/vc-observer-new/metric-calculator/abstract-base-vc-calculator.js +39 -27
- package/dist/cjs/vc/vc-observer-new/metric-calculator/percentile-calc/canvas-heatmap/index.js +22 -7
- package/dist/es2019/interaction-metrics/index.js +10 -2
- package/dist/es2019/set-terminal-error/index.js +12 -4
- package/dist/es2019/vc/vc-observer-new/metric-calculator/abstract-base-vc-calculator.js +17 -4
- package/dist/es2019/vc/vc-observer-new/metric-calculator/percentile-calc/canvas-heatmap/index.js +22 -7
- package/dist/esm/interaction-metrics/index.js +10 -2
- package/dist/esm/set-terminal-error/index.js +12 -4
- package/dist/esm/vc/vc-observer-new/metric-calculator/abstract-base-vc-calculator.js +39 -27
- package/dist/esm/vc/vc-observer-new/metric-calculator/percentile-calc/canvas-heatmap/index.js +22 -7
- package/dist/types/common/vc/types.d.ts +2 -0
- package/dist/types/create-terminal-error-payload/index.d.ts +4 -0
- package/dist/types/interaction-metrics/index.d.ts +8 -0
- package/dist/types/set-terminal-error/index.d.ts +4 -0
- package/dist/types/vc/vc-observer-new/metric-calculator/percentile-calc/canvas-heatmap/index.d.ts +3 -3
- package/dist/types/vc/vc-observer-new/metric-calculator/percentile-calc/types.d.ts +12 -0
- package/dist/types-ts4.5/common/vc/types.d.ts +2 -0
- package/dist/types-ts4.5/create-terminal-error-payload/index.d.ts +4 -0
- package/dist/types-ts4.5/interaction-metrics/index.d.ts +8 -0
- package/dist/types-ts4.5/set-terminal-error/index.d.ts +4 -0
- package/dist/types-ts4.5/vc/vc-observer-new/metric-calculator/percentile-calc/canvas-heatmap/index.d.ts +3 -3
- package/dist/types-ts4.5/vc/vc-observer-new/metric-calculator/percentile-calc/types.d.ts +12 -0
- package/package.json +4 -1
|
@@ -5,6 +5,14 @@ import type { LabelStack } from '../interaction-context';
|
|
|
5
5
|
import InteractionExtraMetrics from './interaction-extra-metrics';
|
|
6
6
|
import PostInteractionLog from './post-interaction-log';
|
|
7
7
|
export type { InteractionMetrics, LifecycleMarkType, Span, Mark, MarkType, InteractionType, AbortReasonType, ReactProfilerTiming, RequestInfo, ApdexType, CustomData, CustomTiming, InteractionError, };
|
|
8
|
+
export type PreviousInteractionLogType = {
|
|
9
|
+
id: string | undefined;
|
|
10
|
+
name: string | undefined;
|
|
11
|
+
type: string | undefined;
|
|
12
|
+
isAborted: boolean | undefined;
|
|
13
|
+
timestamp: number | undefined;
|
|
14
|
+
};
|
|
15
|
+
export declare const PreviousInteractionLog: PreviousInteractionLogType;
|
|
8
16
|
export declare const postInteractionLog: PostInteractionLog;
|
|
9
17
|
export declare const interactionExtraMetrics: InteractionExtraMetrics;
|
|
10
18
|
export declare const segmentUnmountCache: Map<string, number>;
|
|
@@ -18,6 +18,10 @@ export interface TerminalErrorContext {
|
|
|
18
18
|
activeInteractionName: string | null;
|
|
19
19
|
activeInteractionId: string | null;
|
|
20
20
|
activeInteractionType: string | null;
|
|
21
|
+
previousInteractionId: string | null;
|
|
22
|
+
previousInteractionName: string | null;
|
|
23
|
+
previousInteractionType: string | null;
|
|
24
|
+
timeSincePreviousInteraction: number | null;
|
|
21
25
|
}
|
|
22
26
|
export declare function sinkTerminalErrorHandler(fn: (errorData: TerminalErrorData, context: TerminalErrorContext) => void | Promise<void>): void;
|
|
23
27
|
export declare function setTerminalError(error: Error, additionalAttributes?: TerminalErrorAdditionalAttributes, labelStack?: LabelStack): void;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { RevisionPayloadVCDetails } from '../../../../../common/vc/types';
|
|
2
2
|
import type { ViewportEntryData } from '../../../types';
|
|
3
|
-
import type { CalcTTVCPercentilesArg, CalcTTVCPercentilesArgWithDebugInfo,
|
|
3
|
+
import type { CalcTTVCPercentilesArg, CalcTTVCPercentilesArgWithDebugInfo, PercentileCalcResultWithSpeedIndex } from '../types';
|
|
4
4
|
declare function calculateTTVCPercentiles({ viewport, orderedEntries, percentiles, startTime, }: CalcTTVCPercentilesArg): Promise<RevisionPayloadVCDetails>;
|
|
5
|
-
declare function calculateTTVCPercentilesWithDebugInfo({ viewport, orderedEntries, startTime, }: CalcTTVCPercentilesArgWithDebugInfo): Promise<
|
|
5
|
+
declare function calculateTTVCPercentilesWithDebugInfo({ viewport, orderedEntries, startTime, calculateSpeedIndex, }: CalcTTVCPercentilesArgWithDebugInfo): Promise<PercentileCalcResultWithSpeedIndex>;
|
|
6
6
|
export default calculateTTVCPercentiles;
|
|
7
7
|
export declare function calculatePercentiles(timePixelCounts: Map<DOMHighResTimeStamp, number>, elementMap: ReadonlyMap<DOMHighResTimeStamp, Set<string>>, unorderedPercentiles: number[], totalPixels: number, startTime: DOMHighResTimeStamp): RevisionPayloadVCDetails;
|
|
8
|
-
export declare function calculatePercentilesWithDebugInfo(timePixelCounts: Map<DOMHighResTimeStamp, number>, elementMap: ReadonlyMap<DOMHighResTimeStamp, ViewportEntryData[]>, totalPixels: number, startTime: DOMHighResTimeStamp):
|
|
8
|
+
export declare function calculatePercentilesWithDebugInfo(timePixelCounts: Map<DOMHighResTimeStamp, number>, elementMap: ReadonlyMap<DOMHighResTimeStamp, ViewportEntryData[]>, totalPixels: number, startTime: DOMHighResTimeStamp, calculateSpeedIndex?: boolean): PercentileCalcResultWithSpeedIndex;
|
|
9
9
|
export { calculateTTVCPercentilesWithDebugInfo };
|
|
@@ -17,6 +17,11 @@ export type CalcTTVCPercentilesArgWithDebugInfo = {
|
|
|
17
17
|
orderedEntries: ReadonlyArray<VCObserverEntry>;
|
|
18
18
|
startTime: DOMHighResTimeStamp;
|
|
19
19
|
stopTime: DOMHighResTimeStamp;
|
|
20
|
+
/**
|
|
21
|
+
* Whether to calculate speed index metric.
|
|
22
|
+
* Controlled by platform_ufo_ttvc_v4_speed_index feature flag.
|
|
23
|
+
*/
|
|
24
|
+
calculateSpeedIndex?: boolean;
|
|
20
25
|
};
|
|
21
26
|
export interface PercentileCalcResultItem {
|
|
22
27
|
time: number;
|
|
@@ -27,3 +32,10 @@ export interface PercentileCalcResultItem {
|
|
|
27
32
|
* Ordered by time
|
|
28
33
|
*/
|
|
29
34
|
export type PercentileCalcResult = PercentileCalcResultItem[];
|
|
35
|
+
/**
|
|
36
|
+
* Result of percentile calculation with debug info, including speed index
|
|
37
|
+
*/
|
|
38
|
+
export type PercentileCalcResultWithSpeedIndex = {
|
|
39
|
+
entries: PercentileCalcResult;
|
|
40
|
+
speedIndex: number;
|
|
41
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/react-ufo",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.4",
|
|
4
4
|
"description": "Parts of React UFO that are publicly available",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -202,6 +202,9 @@
|
|
|
202
202
|
},
|
|
203
203
|
"platform_ufo_enable_terminal_errors": {
|
|
204
204
|
"type": "boolean"
|
|
205
|
+
},
|
|
206
|
+
"platform_ufo_ttvc_v4_speed_index": {
|
|
207
|
+
"type": "boolean"
|
|
205
208
|
}
|
|
206
209
|
}
|
|
207
210
|
}
|