@atlaskit/react-ufo 2.14.3 → 2.15.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 +12 -0
- package/dist/cjs/create-payload/index.js +10 -0
- package/dist/cjs/experience-trace-id-context/index.js +5 -1
- package/dist/cjs/segment/segment.js +7 -1
- package/dist/cjs/vc/vc-observer/heatmap/heatmap.js +275 -0
- package/dist/cjs/vc/vc-observer/index.js +115 -26
- package/dist/cjs/vc/vc-observer/revisions/ViewportUpdateClassifier.js +52 -0
- package/dist/cjs/vc/vc-observer/revisions/fy24_01.js +39 -0
- package/dist/cjs/vc/vc-observer/revisions/fy25_01.js +39 -0
- package/dist/cjs/vc/vc-observer/revisions/revisions.js +23 -0
- package/dist/cjs/vc/vc-observer/revisions/types.js +5 -0
- package/dist/es2019/create-payload/index.js +10 -0
- package/dist/es2019/experience-trace-id-context/index.js +4 -0
- package/dist/es2019/segment/segment.js +11 -3
- package/dist/es2019/vc/vc-observer/heatmap/heatmap.js +238 -0
- package/dist/es2019/vc/vc-observer/index.js +94 -3
- package/dist/es2019/vc/vc-observer/revisions/ViewportUpdateClassifier.js +35 -0
- package/dist/es2019/vc/vc-observer/revisions/fy24_01.js +21 -0
- package/dist/es2019/vc/vc-observer/revisions/fy25_01.js +21 -0
- package/dist/es2019/vc/vc-observer/revisions/revisions.js +19 -0
- package/dist/es2019/vc/vc-observer/revisions/types.js +1 -0
- package/dist/esm/create-payload/index.js +10 -0
- package/dist/esm/experience-trace-id-context/index.js +4 -0
- package/dist/esm/segment/segment.js +7 -1
- package/dist/esm/vc/vc-observer/heatmap/heatmap.js +268 -0
- package/dist/esm/vc/vc-observer/index.js +115 -26
- package/dist/esm/vc/vc-observer/revisions/ViewportUpdateClassifier.js +45 -0
- package/dist/esm/vc/vc-observer/revisions/fy24_01.js +32 -0
- package/dist/esm/vc/vc-observer/revisions/fy25_01.js +32 -0
- package/dist/esm/vc/vc-observer/revisions/revisions.js +17 -0
- package/dist/esm/vc/vc-observer/revisions/types.js +1 -0
- package/dist/types/common/vc/types.d.ts +27 -8
- package/dist/types/experience-trace-id-context/index.d.ts +1 -0
- package/dist/types/vc/vc-observer/heatmap/heatmap.d.ts +75 -0
- package/dist/types/vc/vc-observer/index.d.ts +5 -1
- package/dist/types/vc/vc-observer/revisions/ViewportUpdateClassifier.d.ts +25 -0
- package/dist/types/vc/vc-observer/revisions/fy24_01.d.ts +11 -0
- package/dist/types/vc/vc-observer/revisions/fy25_01.d.ts +13 -0
- package/dist/types/vc/vc-observer/revisions/revisions.d.ts +2 -0
- package/dist/types/vc/vc-observer/revisions/types.d.ts +5 -0
- package/dist/types-ts4.5/common/vc/types.d.ts +27 -8
- package/dist/types-ts4.5/experience-trace-id-context/index.d.ts +1 -0
- package/dist/types-ts4.5/vc/vc-observer/heatmap/heatmap.d.ts +75 -0
- package/dist/types-ts4.5/vc/vc-observer/index.d.ts +15 -1
- package/dist/types-ts4.5/vc/vc-observer/revisions/ViewportUpdateClassifier.d.ts +25 -0
- package/dist/types-ts4.5/vc/vc-observer/revisions/fy24_01.d.ts +11 -0
- package/dist/types-ts4.5/vc/vc-observer/revisions/fy25_01.d.ts +13 -0
- package/dist/types-ts4.5/vc/vc-observer/revisions/revisions.d.ts +2 -0
- package/dist/types-ts4.5/vc/vc-observer/revisions/types.d.ts +5 -0
- package/package.json +8 -2
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import _createClass from "@babel/runtime/helpers/createClass";
|
|
2
|
+
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
4
|
+
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
7
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
8
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
9
|
+
import { FY24_01Classifier } from './fy24_01';
|
|
10
|
+
export var FY25_01Classifier = /*#__PURE__*/function (_FY24_01Classifier) {
|
|
11
|
+
function FY25_01Classifier() {
|
|
12
|
+
var _this;
|
|
13
|
+
_classCallCheck(this, FY25_01Classifier);
|
|
14
|
+
_this = _callSuper(this, FY25_01Classifier);
|
|
15
|
+
_defineProperty(_this, "revision", 'fy25.01');
|
|
16
|
+
_defineProperty(_this, "types", ['attr']);
|
|
17
|
+
_defineProperty(_this, "filters", [{
|
|
18
|
+
name: 'not-visible',
|
|
19
|
+
filter: function filter(_ref) {
|
|
20
|
+
var type = _ref.type,
|
|
21
|
+
ignoreReason = _ref.ignoreReason;
|
|
22
|
+
return !(ignoreReason !== null && ignoreReason !== void 0 && ignoreReason.includes('not-visible'));
|
|
23
|
+
}
|
|
24
|
+
}]);
|
|
25
|
+
_defineProperty(_this, "removedFilters", []);
|
|
26
|
+
_this.mergeConfig();
|
|
27
|
+
return _this;
|
|
28
|
+
}
|
|
29
|
+
_inherits(FY25_01Classifier, _FY24_01Classifier);
|
|
30
|
+
return _createClass(FY25_01Classifier);
|
|
31
|
+
}(FY24_01Classifier);
|
|
32
|
+
export var revFY25_01Classifier = new FY25_01Classifier();
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { revFY24_01Classifier } from './fy24_01';
|
|
2
|
+
import { revFY25_01Classifier } from './fy25_01';
|
|
3
|
+
var Revisions = [{
|
|
4
|
+
name: 'fy24.01',
|
|
5
|
+
classifier: revFY24_01Classifier
|
|
6
|
+
}, {
|
|
7
|
+
name: 'fy25.01',
|
|
8
|
+
classifier: revFY25_01Classifier
|
|
9
|
+
}];
|
|
10
|
+
var revisionResultCache = null;
|
|
11
|
+
export var getRevisions = function getRevisions() {
|
|
12
|
+
if (revisionResultCache !== null) {
|
|
13
|
+
return revisionResultCache;
|
|
14
|
+
}
|
|
15
|
+
revisionResultCache = [].concat(Revisions);
|
|
16
|
+
return revisionResultCache;
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { UnbindFn } from 'bind-event-listener';
|
|
2
|
+
import { MultiRevisionHeatmap } from '../../vc/vc-observer/heatmap/heatmap';
|
|
2
3
|
export declare const AbortEvent: {
|
|
3
4
|
readonly wheel: "wheel";
|
|
4
5
|
readonly keydown: "keydown";
|
|
@@ -29,6 +30,7 @@ export type VCRawDataType = {
|
|
|
29
30
|
oldDomUpdatesEnabled: boolean;
|
|
30
31
|
devToolsEnabled: boolean;
|
|
31
32
|
ratios: VCRatioType;
|
|
33
|
+
multiHeatmap: MultiRevisionHeatmap | null;
|
|
32
34
|
};
|
|
33
35
|
export type VCEntryType = {
|
|
34
36
|
time: number;
|
|
@@ -49,7 +51,7 @@ export type VCResult = {
|
|
|
49
51
|
h: number;
|
|
50
52
|
} | {
|
|
51
53
|
[key: string]: boolean | number | string[] | null | VCEntryType[];
|
|
52
|
-
};
|
|
54
|
+
} | MultiHeatmapPayload;
|
|
53
55
|
};
|
|
54
56
|
export type MetricsDevToolsTypes = {
|
|
55
57
|
'75': number | null;
|
|
@@ -68,15 +70,19 @@ export type ExperimentalVCDevToolsOptions = {
|
|
|
68
70
|
export type ComponentsLogType = {
|
|
69
71
|
[timestamp: number]: ComponentsLogEntry[];
|
|
70
72
|
};
|
|
73
|
+
interface VCDebugInfo {
|
|
74
|
+
entries: VCEntryType[];
|
|
75
|
+
log: ComponentsLogType;
|
|
76
|
+
metrics: MetricsDevToolsTypes;
|
|
77
|
+
heatmap: number[][];
|
|
78
|
+
ratios: VCRatioType;
|
|
79
|
+
start: number;
|
|
80
|
+
stop: number;
|
|
81
|
+
}
|
|
71
82
|
declare global {
|
|
72
83
|
interface Window {
|
|
73
|
-
__vc?:
|
|
74
|
-
|
|
75
|
-
log: ComponentsLogType;
|
|
76
|
-
metrics: MetricsDevToolsTypes;
|
|
77
|
-
heatmap: number[][];
|
|
78
|
-
ratios: VCRatioType;
|
|
79
|
-
};
|
|
84
|
+
__vc?: VCDebugInfo;
|
|
85
|
+
__vcNext?: VCDebugInfo;
|
|
80
86
|
__vcNotAvailableReason?: string;
|
|
81
87
|
__SSR_PLACEHOLDERS_DIMENSIONS__?: {
|
|
82
88
|
[key: string]: DOMRectReadOnly;
|
|
@@ -89,3 +95,16 @@ declare global {
|
|
|
89
95
|
};
|
|
90
96
|
}
|
|
91
97
|
}
|
|
98
|
+
type MultiHeatmapRevisionPayload = {
|
|
99
|
+
'metric:vc90': number | null;
|
|
100
|
+
revision: string;
|
|
101
|
+
clean: boolean;
|
|
102
|
+
vcDetails?: {
|
|
103
|
+
[key: string]: {
|
|
104
|
+
t: number;
|
|
105
|
+
e: string[];
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
export type MultiHeatmapPayload = MultiHeatmapRevisionPayload[];
|
|
110
|
+
export {};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { ComponentsLogType, MultiHeatmapPayload, VCEntryType, VCIgnoreReason, VCRatioType } from '../../../common/vc/types';
|
|
2
|
+
import type { ObservedMutationType } from '../observers/types';
|
|
3
|
+
import type { RevisionEntry } from '../revisions/types';
|
|
4
|
+
type Viewport = {
|
|
5
|
+
w: number;
|
|
6
|
+
h: number;
|
|
7
|
+
};
|
|
8
|
+
type ArraySize = {
|
|
9
|
+
w: number;
|
|
10
|
+
h: number;
|
|
11
|
+
};
|
|
12
|
+
type HeatmapAttrs = {
|
|
13
|
+
viewport: Viewport;
|
|
14
|
+
revisions: RevisionEntry[];
|
|
15
|
+
arraySize?: ArraySize;
|
|
16
|
+
devToolsEnabled?: boolean;
|
|
17
|
+
};
|
|
18
|
+
type Heatmap = Uint32Array;
|
|
19
|
+
type ProcessDataArgs = {
|
|
20
|
+
VCParts: number[];
|
|
21
|
+
clean: boolean;
|
|
22
|
+
ssr?: number;
|
|
23
|
+
};
|
|
24
|
+
type PerRevision<T> = T[];
|
|
25
|
+
export type ApplyChangesError = {
|
|
26
|
+
error: string;
|
|
27
|
+
time: number;
|
|
28
|
+
};
|
|
29
|
+
export type HandleUpdateArgs = {
|
|
30
|
+
time: number;
|
|
31
|
+
type: ObservedMutationType;
|
|
32
|
+
classification: boolean[];
|
|
33
|
+
intersectionRect: DOMRectReadOnly;
|
|
34
|
+
element: HTMLElement;
|
|
35
|
+
targetName: string;
|
|
36
|
+
ignoreReason?: VCIgnoreReason;
|
|
37
|
+
onError: (error: ApplyChangesError) => void;
|
|
38
|
+
};
|
|
39
|
+
export declare class MultiRevisionHeatmap {
|
|
40
|
+
viewport: Viewport;
|
|
41
|
+
arraySize: ArraySize;
|
|
42
|
+
revisions: RevisionEntry[];
|
|
43
|
+
heatmaps: Heatmap[];
|
|
44
|
+
devToolsEnabled: boolean;
|
|
45
|
+
vcRatios: PerRevision<VCRatioType>;
|
|
46
|
+
componentsLogs: PerRevision<ComponentsLogType>;
|
|
47
|
+
constructor({ viewport, revisions, arraySize, devToolsEnabled }: HeatmapAttrs);
|
|
48
|
+
handleUpdate({ time, type, classification, intersectionRect, element, targetName, ignoreReason, onError, }: HandleUpdateArgs): void;
|
|
49
|
+
getData(): {
|
|
50
|
+
heatmaps: Uint32Array[];
|
|
51
|
+
};
|
|
52
|
+
getPayloadShapedData(args: ProcessDataArgs): MultiHeatmapPayload;
|
|
53
|
+
processData({ VCParts, ssr }: ProcessDataArgs): {
|
|
54
|
+
VC: {
|
|
55
|
+
[key: string]: number | null;
|
|
56
|
+
};
|
|
57
|
+
VCBox: {
|
|
58
|
+
[key: string]: Set<string> | null;
|
|
59
|
+
};
|
|
60
|
+
VCEntries: {
|
|
61
|
+
abs: number[][];
|
|
62
|
+
rel: VCEntryType[];
|
|
63
|
+
};
|
|
64
|
+
totalPainted: number;
|
|
65
|
+
}[];
|
|
66
|
+
private mapPixelsToHeatmap;
|
|
67
|
+
private getElementRatio;
|
|
68
|
+
private applyChangesToHeatMap;
|
|
69
|
+
private getIndex;
|
|
70
|
+
private getCleanHeatmap;
|
|
71
|
+
static makeVCReturnObj<T>(VCParts: number[]): {
|
|
72
|
+
[key: string]: T | null;
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type UnbindFn } from 'bind-event-listener';
|
|
2
2
|
import type { ComponentsLogType, VCAbortReason, VCAbortReasonType, VCEntryType, VCIgnoreReason, VCRatioType, VCRawDataType, VCResult } from '../../common/vc/types';
|
|
3
|
+
import { MultiRevisionHeatmap } from './heatmap/heatmap';
|
|
3
4
|
import { Observers, type SelectorConfig } from './observers';
|
|
4
5
|
type GetVCResultType = {
|
|
5
6
|
start: number;
|
|
@@ -20,7 +21,7 @@ export declare class VCObserver {
|
|
|
20
21
|
abortReason: VCAbortReasonType;
|
|
21
22
|
outOfBoundaryInfo: string;
|
|
22
23
|
/** config * */
|
|
23
|
-
static VCParts:
|
|
24
|
+
static VCParts: readonly ["25", "50", "75", "80", "85", "90", "95", "98", "99"];
|
|
24
25
|
viewport: {
|
|
25
26
|
w: number;
|
|
26
27
|
h: number;
|
|
@@ -28,6 +29,7 @@ export declare class VCObserver {
|
|
|
28
29
|
arraySize: number;
|
|
29
30
|
heatmap: number[][];
|
|
30
31
|
heatmapNext: number[][];
|
|
32
|
+
multiHeatmap: MultiRevisionHeatmap | null;
|
|
31
33
|
componentsLog: ComponentsLogType;
|
|
32
34
|
vcRatios: VCRatioType;
|
|
33
35
|
active: boolean;
|
|
@@ -80,6 +82,8 @@ export declare class VCObserver {
|
|
|
80
82
|
setReactRootRenderStart(startTime?: number): void;
|
|
81
83
|
setReactRootRenderStop(stopTime?: number): void;
|
|
82
84
|
private handleUpdate;
|
|
85
|
+
private legacyHandleUpdate;
|
|
86
|
+
private onViewportChangeDetected;
|
|
83
87
|
abortObservation(abortReason?: VCAbortReason): void;
|
|
84
88
|
private setAbortReason;
|
|
85
89
|
private resetState;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export type FilterArgs = {
|
|
2
|
+
type: string;
|
|
3
|
+
tags?: string[];
|
|
4
|
+
ignoreReason?: string;
|
|
5
|
+
};
|
|
6
|
+
type Filter = {
|
|
7
|
+
name: string;
|
|
8
|
+
filter: (args: FilterArgs) => boolean;
|
|
9
|
+
};
|
|
10
|
+
type ClassifyUpdateArgs = {
|
|
11
|
+
element: HTMLElement;
|
|
12
|
+
type: string;
|
|
13
|
+
tags?: string[];
|
|
14
|
+
ignoreReason?: string;
|
|
15
|
+
};
|
|
16
|
+
export declare class ViewportUpdateClassifier {
|
|
17
|
+
types: string[];
|
|
18
|
+
filters: Filter[];
|
|
19
|
+
removedFilters: string[];
|
|
20
|
+
protected __combinedTypes: string[];
|
|
21
|
+
protected __combinedFilters: Filter[];
|
|
22
|
+
mergeConfig(): void;
|
|
23
|
+
classifyUpdate({ element, type, tags, ignoreReason }: ClassifyUpdateArgs): boolean;
|
|
24
|
+
}
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type FilterArgs, ViewportUpdateClassifier } from './ViewportUpdateClassifier';
|
|
2
|
+
export declare class FY24_01Classifier extends ViewportUpdateClassifier {
|
|
3
|
+
revision: string;
|
|
4
|
+
types: string[];
|
|
5
|
+
filters: {
|
|
6
|
+
name: string;
|
|
7
|
+
filter: ({ type, ignoreReason }: FilterArgs) => boolean;
|
|
8
|
+
}[];
|
|
9
|
+
constructor();
|
|
10
|
+
}
|
|
11
|
+
export declare const revFY24_01Classifier: FY24_01Classifier;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FY24_01Classifier } from './fy24_01';
|
|
2
|
+
import { type FilterArgs } from './ViewportUpdateClassifier';
|
|
3
|
+
export declare class FY25_01Classifier extends FY24_01Classifier {
|
|
4
|
+
revision: string;
|
|
5
|
+
types: string[];
|
|
6
|
+
filters: {
|
|
7
|
+
name: string;
|
|
8
|
+
filter: ({ type, ignoreReason }: FilterArgs) => boolean;
|
|
9
|
+
}[];
|
|
10
|
+
removedFilters: never[];
|
|
11
|
+
constructor();
|
|
12
|
+
}
|
|
13
|
+
export declare const revFY25_01Classifier: FY25_01Classifier;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { UnbindFn } from 'bind-event-listener';
|
|
2
|
+
import { MultiRevisionHeatmap } from '../../vc/vc-observer/heatmap/heatmap';
|
|
2
3
|
export declare const AbortEvent: {
|
|
3
4
|
readonly wheel: "wheel";
|
|
4
5
|
readonly keydown: "keydown";
|
|
@@ -29,6 +30,7 @@ export type VCRawDataType = {
|
|
|
29
30
|
oldDomUpdatesEnabled: boolean;
|
|
30
31
|
devToolsEnabled: boolean;
|
|
31
32
|
ratios: VCRatioType;
|
|
33
|
+
multiHeatmap: MultiRevisionHeatmap | null;
|
|
32
34
|
};
|
|
33
35
|
export type VCEntryType = {
|
|
34
36
|
time: number;
|
|
@@ -49,7 +51,7 @@ export type VCResult = {
|
|
|
49
51
|
h: number;
|
|
50
52
|
} | {
|
|
51
53
|
[key: string]: boolean | number | string[] | null | VCEntryType[];
|
|
52
|
-
};
|
|
54
|
+
} | MultiHeatmapPayload;
|
|
53
55
|
};
|
|
54
56
|
export type MetricsDevToolsTypes = {
|
|
55
57
|
'75': number | null;
|
|
@@ -68,15 +70,19 @@ export type ExperimentalVCDevToolsOptions = {
|
|
|
68
70
|
export type ComponentsLogType = {
|
|
69
71
|
[timestamp: number]: ComponentsLogEntry[];
|
|
70
72
|
};
|
|
73
|
+
interface VCDebugInfo {
|
|
74
|
+
entries: VCEntryType[];
|
|
75
|
+
log: ComponentsLogType;
|
|
76
|
+
metrics: MetricsDevToolsTypes;
|
|
77
|
+
heatmap: number[][];
|
|
78
|
+
ratios: VCRatioType;
|
|
79
|
+
start: number;
|
|
80
|
+
stop: number;
|
|
81
|
+
}
|
|
71
82
|
declare global {
|
|
72
83
|
interface Window {
|
|
73
|
-
__vc?:
|
|
74
|
-
|
|
75
|
-
log: ComponentsLogType;
|
|
76
|
-
metrics: MetricsDevToolsTypes;
|
|
77
|
-
heatmap: number[][];
|
|
78
|
-
ratios: VCRatioType;
|
|
79
|
-
};
|
|
84
|
+
__vc?: VCDebugInfo;
|
|
85
|
+
__vcNext?: VCDebugInfo;
|
|
80
86
|
__vcNotAvailableReason?: string;
|
|
81
87
|
__SSR_PLACEHOLDERS_DIMENSIONS__?: {
|
|
82
88
|
[key: string]: DOMRectReadOnly;
|
|
@@ -89,3 +95,16 @@ declare global {
|
|
|
89
95
|
};
|
|
90
96
|
}
|
|
91
97
|
}
|
|
98
|
+
type MultiHeatmapRevisionPayload = {
|
|
99
|
+
'metric:vc90': number | null;
|
|
100
|
+
revision: string;
|
|
101
|
+
clean: boolean;
|
|
102
|
+
vcDetails?: {
|
|
103
|
+
[key: string]: {
|
|
104
|
+
t: number;
|
|
105
|
+
e: string[];
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
export type MultiHeatmapPayload = MultiHeatmapRevisionPayload[];
|
|
110
|
+
export {};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { ComponentsLogType, MultiHeatmapPayload, VCEntryType, VCIgnoreReason, VCRatioType } from '../../../common/vc/types';
|
|
2
|
+
import type { ObservedMutationType } from '../observers/types';
|
|
3
|
+
import type { RevisionEntry } from '../revisions/types';
|
|
4
|
+
type Viewport = {
|
|
5
|
+
w: number;
|
|
6
|
+
h: number;
|
|
7
|
+
};
|
|
8
|
+
type ArraySize = {
|
|
9
|
+
w: number;
|
|
10
|
+
h: number;
|
|
11
|
+
};
|
|
12
|
+
type HeatmapAttrs = {
|
|
13
|
+
viewport: Viewport;
|
|
14
|
+
revisions: RevisionEntry[];
|
|
15
|
+
arraySize?: ArraySize;
|
|
16
|
+
devToolsEnabled?: boolean;
|
|
17
|
+
};
|
|
18
|
+
type Heatmap = Uint32Array;
|
|
19
|
+
type ProcessDataArgs = {
|
|
20
|
+
VCParts: number[];
|
|
21
|
+
clean: boolean;
|
|
22
|
+
ssr?: number;
|
|
23
|
+
};
|
|
24
|
+
type PerRevision<T> = T[];
|
|
25
|
+
export type ApplyChangesError = {
|
|
26
|
+
error: string;
|
|
27
|
+
time: number;
|
|
28
|
+
};
|
|
29
|
+
export type HandleUpdateArgs = {
|
|
30
|
+
time: number;
|
|
31
|
+
type: ObservedMutationType;
|
|
32
|
+
classification: boolean[];
|
|
33
|
+
intersectionRect: DOMRectReadOnly;
|
|
34
|
+
element: HTMLElement;
|
|
35
|
+
targetName: string;
|
|
36
|
+
ignoreReason?: VCIgnoreReason;
|
|
37
|
+
onError: (error: ApplyChangesError) => void;
|
|
38
|
+
};
|
|
39
|
+
export declare class MultiRevisionHeatmap {
|
|
40
|
+
viewport: Viewport;
|
|
41
|
+
arraySize: ArraySize;
|
|
42
|
+
revisions: RevisionEntry[];
|
|
43
|
+
heatmaps: Heatmap[];
|
|
44
|
+
devToolsEnabled: boolean;
|
|
45
|
+
vcRatios: PerRevision<VCRatioType>;
|
|
46
|
+
componentsLogs: PerRevision<ComponentsLogType>;
|
|
47
|
+
constructor({ viewport, revisions, arraySize, devToolsEnabled }: HeatmapAttrs);
|
|
48
|
+
handleUpdate({ time, type, classification, intersectionRect, element, targetName, ignoreReason, onError, }: HandleUpdateArgs): void;
|
|
49
|
+
getData(): {
|
|
50
|
+
heatmaps: Uint32Array[];
|
|
51
|
+
};
|
|
52
|
+
getPayloadShapedData(args: ProcessDataArgs): MultiHeatmapPayload;
|
|
53
|
+
processData({ VCParts, ssr }: ProcessDataArgs): {
|
|
54
|
+
VC: {
|
|
55
|
+
[key: string]: number | null;
|
|
56
|
+
};
|
|
57
|
+
VCBox: {
|
|
58
|
+
[key: string]: Set<string> | null;
|
|
59
|
+
};
|
|
60
|
+
VCEntries: {
|
|
61
|
+
abs: number[][];
|
|
62
|
+
rel: VCEntryType[];
|
|
63
|
+
};
|
|
64
|
+
totalPainted: number;
|
|
65
|
+
}[];
|
|
66
|
+
private mapPixelsToHeatmap;
|
|
67
|
+
private getElementRatio;
|
|
68
|
+
private applyChangesToHeatMap;
|
|
69
|
+
private getIndex;
|
|
70
|
+
private getCleanHeatmap;
|
|
71
|
+
static makeVCReturnObj<T>(VCParts: number[]): {
|
|
72
|
+
[key: string]: T | null;
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type UnbindFn } from 'bind-event-listener';
|
|
2
2
|
import type { ComponentsLogType, VCAbortReason, VCAbortReasonType, VCEntryType, VCIgnoreReason, VCRatioType, VCRawDataType, VCResult } from '../../common/vc/types';
|
|
3
|
+
import { MultiRevisionHeatmap } from './heatmap/heatmap';
|
|
3
4
|
import { Observers, type SelectorConfig } from './observers';
|
|
4
5
|
type GetVCResultType = {
|
|
5
6
|
start: number;
|
|
@@ -20,7 +21,17 @@ export declare class VCObserver {
|
|
|
20
21
|
abortReason: VCAbortReasonType;
|
|
21
22
|
outOfBoundaryInfo: string;
|
|
22
23
|
/** config * */
|
|
23
|
-
static VCParts:
|
|
24
|
+
static VCParts: readonly [
|
|
25
|
+
"25",
|
|
26
|
+
"50",
|
|
27
|
+
"75",
|
|
28
|
+
"80",
|
|
29
|
+
"85",
|
|
30
|
+
"90",
|
|
31
|
+
"95",
|
|
32
|
+
"98",
|
|
33
|
+
"99"
|
|
34
|
+
];
|
|
24
35
|
viewport: {
|
|
25
36
|
w: number;
|
|
26
37
|
h: number;
|
|
@@ -28,6 +39,7 @@ export declare class VCObserver {
|
|
|
28
39
|
arraySize: number;
|
|
29
40
|
heatmap: number[][];
|
|
30
41
|
heatmapNext: number[][];
|
|
42
|
+
multiHeatmap: MultiRevisionHeatmap | null;
|
|
31
43
|
componentsLog: ComponentsLogType;
|
|
32
44
|
vcRatios: VCRatioType;
|
|
33
45
|
active: boolean;
|
|
@@ -80,6 +92,8 @@ export declare class VCObserver {
|
|
|
80
92
|
setReactRootRenderStart(startTime?: number): void;
|
|
81
93
|
setReactRootRenderStop(stopTime?: number): void;
|
|
82
94
|
private handleUpdate;
|
|
95
|
+
private legacyHandleUpdate;
|
|
96
|
+
private onViewportChangeDetected;
|
|
83
97
|
abortObservation(abortReason?: VCAbortReason): void;
|
|
84
98
|
private setAbortReason;
|
|
85
99
|
private resetState;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export type FilterArgs = {
|
|
2
|
+
type: string;
|
|
3
|
+
tags?: string[];
|
|
4
|
+
ignoreReason?: string;
|
|
5
|
+
};
|
|
6
|
+
type Filter = {
|
|
7
|
+
name: string;
|
|
8
|
+
filter: (args: FilterArgs) => boolean;
|
|
9
|
+
};
|
|
10
|
+
type ClassifyUpdateArgs = {
|
|
11
|
+
element: HTMLElement;
|
|
12
|
+
type: string;
|
|
13
|
+
tags?: string[];
|
|
14
|
+
ignoreReason?: string;
|
|
15
|
+
};
|
|
16
|
+
export declare class ViewportUpdateClassifier {
|
|
17
|
+
types: string[];
|
|
18
|
+
filters: Filter[];
|
|
19
|
+
removedFilters: string[];
|
|
20
|
+
protected __combinedTypes: string[];
|
|
21
|
+
protected __combinedFilters: Filter[];
|
|
22
|
+
mergeConfig(): void;
|
|
23
|
+
classifyUpdate({ element, type, tags, ignoreReason }: ClassifyUpdateArgs): boolean;
|
|
24
|
+
}
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type FilterArgs, ViewportUpdateClassifier } from './ViewportUpdateClassifier';
|
|
2
|
+
export declare class FY24_01Classifier extends ViewportUpdateClassifier {
|
|
3
|
+
revision: string;
|
|
4
|
+
types: string[];
|
|
5
|
+
filters: {
|
|
6
|
+
name: string;
|
|
7
|
+
filter: ({ type, ignoreReason }: FilterArgs) => boolean;
|
|
8
|
+
}[];
|
|
9
|
+
constructor();
|
|
10
|
+
}
|
|
11
|
+
export declare const revFY24_01Classifier: FY24_01Classifier;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FY24_01Classifier } from './fy24_01';
|
|
2
|
+
import { type FilterArgs } from './ViewportUpdateClassifier';
|
|
3
|
+
export declare class FY25_01Classifier extends FY24_01Classifier {
|
|
4
|
+
revision: string;
|
|
5
|
+
types: string[];
|
|
6
|
+
filters: {
|
|
7
|
+
name: string;
|
|
8
|
+
filter: ({ type, ignoreReason }: FilterArgs) => boolean;
|
|
9
|
+
}[];
|
|
10
|
+
removedFilters: never[];
|
|
11
|
+
constructor();
|
|
12
|
+
}
|
|
13
|
+
export declare const revFY25_01Classifier: FY25_01Classifier;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/react-ufo",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.15.0",
|
|
4
4
|
"description": "Parts of React UFO that are publicly available",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {
|
|
77
77
|
"@atlaskit/interaction-context": "^2.6.0",
|
|
78
|
-
"@atlaskit/platform-feature-flags": "^1.
|
|
78
|
+
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
79
79
|
"@babel/runtime": "^7.0.0",
|
|
80
80
|
"bind-event-listener": "^3.0.0",
|
|
81
81
|
"bowser-ultralight": "^1.0.6",
|
|
@@ -151,8 +151,14 @@
|
|
|
151
151
|
"ufo-remove-vc-component-observations-after-ttai": {
|
|
152
152
|
"type": "boolean"
|
|
153
153
|
},
|
|
154
|
+
"ufo_vc_multiheatmap": {
|
|
155
|
+
"type": "boolean"
|
|
156
|
+
},
|
|
154
157
|
"ufo-calc-speed-index": {
|
|
155
158
|
"type": "boolean"
|
|
159
|
+
},
|
|
160
|
+
"platform-ufo-add-segment-use-effect": {
|
|
161
|
+
"type": "boolean"
|
|
156
162
|
}
|
|
157
163
|
}
|
|
158
164
|
}
|