@atlaskit/react-ufo 2.15.0 → 2.16.0
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 +8 -0
- package/dist/cjs/assets/index.js +96 -0
- package/dist/cjs/assets/utils.js +32 -0
- package/dist/cjs/common/assets/types.js +5 -0
- package/dist/cjs/create-payload/index.js +32 -5
- package/dist/cjs/vc/vc-observer/heatmap/heatmap.js +9 -20
- package/dist/cjs/vc/vc-observer/index.js +32 -28
- package/dist/cjs/vc/vc-observer/revisions/ViewportUpdateClassifier.js +8 -0
- package/dist/cjs/vc/vc-observer/revisions/fy24_01.js +34 -2
- package/dist/es2019/assets/index.js +82 -0
- package/dist/es2019/assets/utils.js +26 -0
- package/dist/es2019/common/assets/types.js +1 -0
- package/dist/es2019/create-payload/index.js +33 -3
- package/dist/es2019/vc/vc-observer/heatmap/heatmap.js +10 -18
- package/dist/es2019/vc/vc-observer/index.js +3 -0
- package/dist/es2019/vc/vc-observer/revisions/ViewportUpdateClassifier.js +6 -0
- package/dist/es2019/vc/vc-observer/revisions/fy24_01.js +29 -0
- package/dist/esm/assets/index.js +89 -0
- package/dist/esm/assets/utils.js +26 -0
- package/dist/esm/common/assets/types.js +1 -0
- package/dist/esm/create-payload/index.js +32 -5
- package/dist/esm/vc/vc-observer/heatmap/heatmap.js +9 -20
- package/dist/esm/vc/vc-observer/index.js +32 -28
- package/dist/esm/vc/vc-observer/revisions/ViewportUpdateClassifier.js +8 -0
- package/dist/esm/vc/vc-observer/revisions/fy24_01.js +34 -2
- package/dist/types/assets/index.d.ts +25 -0
- package/dist/types/assets/utils.d.ts +6 -0
- package/dist/types/common/assets/types.d.ts +18 -0
- package/dist/types/common/index.d.ts +1 -0
- package/dist/types/config/index.d.ts +2 -1
- package/dist/types/create-payload/index.d.ts +11616 -0
- package/dist/types/resource-timing/index.d.ts +1 -1
- package/dist/types/vc/vc-observer/heatmap/heatmap.d.ts +5 -8
- package/dist/types/vc/vc-observer/revisions/ViewportUpdateClassifier.d.ts +5 -0
- package/dist/types/vc/vc-observer/revisions/fy24_01.d.ts +2 -0
- package/dist/types/vc/vc-observer/revisions/types.d.ts +18 -0
- package/dist/types-ts4.5/assets/index.d.ts +25 -0
- package/dist/types-ts4.5/assets/utils.d.ts +6 -0
- package/dist/types-ts4.5/common/assets/types.d.ts +18 -0
- package/dist/types-ts4.5/common/index.d.ts +1 -0
- package/dist/types-ts4.5/config/index.d.ts +2 -1
- package/dist/types-ts4.5/create-payload/index.d.ts +11616 -0
- package/dist/types-ts4.5/resource-timing/index.d.ts +1 -1
- package/dist/types-ts4.5/vc/vc-observer/heatmap/heatmap.d.ts +5 -8
- package/dist/types-ts4.5/vc/vc-observer/revisions/ViewportUpdateClassifier.d.ts +5 -0
- package/dist/types-ts4.5/vc/vc-observer/revisions/fy24_01.d.ts +2 -0
- package/dist/types-ts4.5/vc/vc-observer/revisions/types.d.ts +18 -0
- package/package.json +4 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { ResourceTimings } from './common/types';
|
|
1
|
+
export type { ResourceTiming, ResourceTimings } from './common/types';
|
|
2
2
|
export { configure } from './common/utils/config';
|
|
3
3
|
export { getResourceTimings } from './main';
|
|
4
4
|
export { startResourceTimingBuffer } from './utils';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ComponentsLogType, MultiHeatmapPayload, VCEntryType, VCIgnoreReason, VCRatioType } from '../../../common/vc/types';
|
|
2
2
|
import type { ObservedMutationType } from '../observers/types';
|
|
3
|
-
import type { RevisionEntry } from '../revisions/types';
|
|
3
|
+
import type { RevisionEntry, VCCalculationMethodType } from '../revisions/types';
|
|
4
4
|
type Viewport = {
|
|
5
5
|
w: number;
|
|
6
6
|
h: number;
|
|
@@ -18,6 +18,7 @@ type HeatmapAttrs = {
|
|
|
18
18
|
type Heatmap = Uint32Array;
|
|
19
19
|
type ProcessDataArgs = {
|
|
20
20
|
VCParts: number[];
|
|
21
|
+
VCCalculationMethods: VCCalculationMethodType[];
|
|
21
22
|
clean: boolean;
|
|
22
23
|
ssr?: number;
|
|
23
24
|
};
|
|
@@ -50,13 +51,9 @@ export declare class MultiRevisionHeatmap {
|
|
|
50
51
|
heatmaps: Uint32Array[];
|
|
51
52
|
};
|
|
52
53
|
getPayloadShapedData(args: ProcessDataArgs): MultiHeatmapPayload;
|
|
53
|
-
processData({ VCParts, ssr }: ProcessDataArgs): {
|
|
54
|
-
VC:
|
|
55
|
-
|
|
56
|
-
};
|
|
57
|
-
VCBox: {
|
|
58
|
-
[key: string]: Set<string> | null;
|
|
59
|
-
};
|
|
54
|
+
processData({ VCParts, VCCalculationMethods, ssr }: ProcessDataArgs): {
|
|
55
|
+
VC: import("../revisions/types").VCType;
|
|
56
|
+
VCBox: import("../revisions/types").VCBoxType;
|
|
60
57
|
VCEntries: {
|
|
61
58
|
abs: number[][];
|
|
62
59
|
rel: VCEntryType[];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { VCCalculationMethodArgs } from './types';
|
|
1
2
|
export type FilterArgs = {
|
|
2
3
|
type: string;
|
|
3
4
|
tags?: string[];
|
|
@@ -17,6 +18,10 @@ export declare class ViewportUpdateClassifier {
|
|
|
17
18
|
types: string[];
|
|
18
19
|
filters: Filter[];
|
|
19
20
|
removedFilters: string[];
|
|
21
|
+
VCCalculationMethod(_: VCCalculationMethodArgs): {
|
|
22
|
+
VC: {};
|
|
23
|
+
VCBox: {};
|
|
24
|
+
};
|
|
20
25
|
protected __combinedTypes: string[];
|
|
21
26
|
protected __combinedFilters: Filter[];
|
|
22
27
|
mergeConfig(): void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { VCCalculationMethodArgs, VCCalculationMethodReturn } from './types';
|
|
1
2
|
import { type FilterArgs, ViewportUpdateClassifier } from './ViewportUpdateClassifier';
|
|
2
3
|
export declare class FY24_01Classifier extends ViewportUpdateClassifier {
|
|
3
4
|
revision: string;
|
|
@@ -6,6 +7,7 @@ export declare class FY24_01Classifier extends ViewportUpdateClassifier {
|
|
|
6
7
|
name: string;
|
|
7
8
|
filter: ({ type, ignoreReason }: FilterArgs) => boolean;
|
|
8
9
|
}[];
|
|
10
|
+
VCCalculationMethod({ VCParts, entries, totalPainted, componentsLog, }: VCCalculationMethodArgs): VCCalculationMethodReturn;
|
|
9
11
|
constructor();
|
|
10
12
|
}
|
|
11
13
|
export declare const revFY24_01Classifier: FY24_01Classifier;
|
|
@@ -1,5 +1,23 @@
|
|
|
1
|
+
import type { ComponentsLogType } from '../../../common/vc/types';
|
|
1
2
|
import { ViewportUpdateClassifier } from './ViewportUpdateClassifier';
|
|
2
3
|
export type RevisionEntry = {
|
|
3
4
|
name: string;
|
|
4
5
|
classifier: ViewportUpdateClassifier;
|
|
5
6
|
};
|
|
7
|
+
export type VCType = {
|
|
8
|
+
[key: string]: number | null;
|
|
9
|
+
};
|
|
10
|
+
export type VCBoxType = {
|
|
11
|
+
[key: string]: null | Set<string>;
|
|
12
|
+
};
|
|
13
|
+
export type VCCalculationMethodArgs = {
|
|
14
|
+
VCParts: number[];
|
|
15
|
+
entries: number[][];
|
|
16
|
+
totalPainted: number;
|
|
17
|
+
componentsLog: ComponentsLogType;
|
|
18
|
+
};
|
|
19
|
+
export type VCCalculationMethodReturn = {
|
|
20
|
+
VC: VCType;
|
|
21
|
+
VCBox: VCBoxType;
|
|
22
|
+
};
|
|
23
|
+
export type VCCalculationMethodType = (args: VCCalculationMethodArgs) => VCCalculationMethodReturn;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { AssetsClassification, AssetsData, AssetsReporter } from '../common';
|
|
2
|
+
import type { ResourceTiming, ResourceTimings } from '../resource-timing';
|
|
3
|
+
export declare class CHRSummary {
|
|
4
|
+
bundles: {
|
|
5
|
+
mem: number;
|
|
6
|
+
disk: number;
|
|
7
|
+
net: number;
|
|
8
|
+
};
|
|
9
|
+
bundlesCount: number;
|
|
10
|
+
size: {
|
|
11
|
+
mem: number;
|
|
12
|
+
disk: number;
|
|
13
|
+
net: number;
|
|
14
|
+
};
|
|
15
|
+
sizeTotal: number;
|
|
16
|
+
add(asset: ResourceTiming): void;
|
|
17
|
+
static makePayload(summary: CHRSummary): AssetsReporter;
|
|
18
|
+
}
|
|
19
|
+
export declare class CHRReporter {
|
|
20
|
+
all: CHRSummary;
|
|
21
|
+
allAtlassian: CHRSummary;
|
|
22
|
+
preloaded: CHRSummary;
|
|
23
|
+
constructor();
|
|
24
|
+
get(resourceTimings: ResourceTimings, assetsClassification: AssetsClassification): AssetsData | null;
|
|
25
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const cacheableTypes: string[];
|
|
2
|
+
export declare const MEMORY_KEY = "mem";
|
|
3
|
+
export declare const DISK_KEY = "disk";
|
|
4
|
+
export declare const NETWORK_KEY = "net";
|
|
5
|
+
export declare const calculateTransferType: (type: string, duration: number, size: number | undefined) => "disk" | "mem" | "net" | null;
|
|
6
|
+
export declare const round: (n: number) => number;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ResourceTiming } from '../../resource-timing';
|
|
2
|
+
export type AssetResourceEntry = {
|
|
3
|
+
label: string;
|
|
4
|
+
entry: ResourceTiming;
|
|
5
|
+
};
|
|
6
|
+
export type AssetsClassification = {
|
|
7
|
+
all: boolean;
|
|
8
|
+
allAtlassian: (entry: AssetResourceEntry) => boolean;
|
|
9
|
+
preloaded: (entry: AssetResourceEntry) => boolean;
|
|
10
|
+
};
|
|
11
|
+
export type AssetsReporter = {
|
|
12
|
+
size: number | null;
|
|
13
|
+
chr: number | null;
|
|
14
|
+
count: number;
|
|
15
|
+
};
|
|
16
|
+
export interface AssetsData {
|
|
17
|
+
[key: string]: AssetsReporter;
|
|
18
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export type { AssetResourceEntry, AssetsClassification, AssetsData, AssetsReporter, } from './assets/types';
|
|
1
2
|
export type { LifecycleMarkType, MarkType, SpanType, InteractionType, AbortReasonType, CustomTiming, HoldInfo, LoadProfilerEventInfo, ReactProfilerTiming, Span, Mark, InteractionError, RequestInfo, ApdexType, SegmentInfo, CustomData, HoldActive, Redirect, InteractionMetrics, EnhancedUFOInteractionContextType, BM3Event, PostInteractionLogOutput, LastInteractionFinishInfo, } from './common/types';
|
|
2
3
|
/**
|
|
3
4
|
* @deprecated Prefer import from @atlaskit/react-ufo/interaction-context
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { InteractionMetrics, InteractionType } from '../common';
|
|
1
|
+
import type { AssetsClassification, InteractionMetrics, InteractionType } from '../common';
|
|
2
2
|
export interface AdditionalData {
|
|
3
3
|
[key: string]: null | string | number | boolean | undefined | AdditionalData | Record<string, AdditionalData> | Array<AdditionalData>;
|
|
4
4
|
}
|
|
@@ -57,6 +57,7 @@ export type Config = {
|
|
|
57
57
|
readonly getSSRTimings?: () => SSRTiming[];
|
|
58
58
|
readonly getSSRDoneTime?: () => number | undefined;
|
|
59
59
|
};
|
|
60
|
+
readonly assetsClassification?: AssetsClassification;
|
|
60
61
|
readonly enableBetterPageVisibilityApi?: boolean;
|
|
61
62
|
readonly vc?: {
|
|
62
63
|
readonly enabled?: boolean;
|