@atlaskit/react-ufo 4.2.1 → 4.2.3
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 +15 -0
- package/dist/cjs/create-payload/common/utils/index.js +133 -18
- package/dist/cjs/create-payload/index.js +2 -9
- package/dist/cjs/vc/vc-observer-new/metric-calculator/fy25_03/index.js +1 -1
- package/dist/cjs/vc/vc-observer-new/viewport-observer/index.js +1 -1
- package/dist/es2019/create-payload/common/utils/index.js +113 -19
- package/dist/es2019/create-payload/index.js +2 -8
- package/dist/es2019/vc/vc-observer-new/metric-calculator/fy25_03/index.js +1 -1
- package/dist/es2019/vc/vc-observer-new/viewport-observer/index.js +1 -1
- package/dist/esm/create-payload/common/utils/index.js +131 -18
- package/dist/esm/create-payload/index.js +3 -10
- package/dist/esm/vc/vc-observer-new/metric-calculator/fy25_03/index.js +1 -1
- package/dist/esm/vc/vc-observer-new/viewport-observer/index.js +1 -1
- package/dist/types/config/index.d.ts +4 -0
- package/dist/types/create-payload/common/utils/index.d.ts +12 -1
- package/dist/types/create-payload/index.d.ts +1664 -1664
- package/dist/types/create-payload/utils/get-browser-metadata.d.ts +5 -5
- package/dist/types/interaction-id-context/index.d.ts +0 -1
- package/dist/types/placeholder/loosely-lazy/wait-context.d.ts +0 -1
- package/dist/types/typing-performance-tracing/index.d.ts +0 -1
- package/dist/types-ts4.5/config/index.d.ts +4 -0
- package/dist/types-ts4.5/create-payload/common/utils/index.d.ts +12 -1
- package/dist/types-ts4.5/create-payload/index.d.ts +1664 -1664
- package/dist/types-ts4.5/create-payload/utils/get-browser-metadata.d.ts +5 -5
- package/dist/types-ts4.5/interaction-id-context/index.d.ts +0 -1
- package/dist/types-ts4.5/placeholder/loosely-lazy/wait-context.d.ts +0 -1
- package/dist/types-ts4.5/typing-performance-tracing/index.d.ts +0 -1
- package/package.json +4 -4
|
@@ -2,16 +2,16 @@ export default function getBrowserMetadata(): {
|
|
|
2
2
|
browser?: {
|
|
3
3
|
name: string;
|
|
4
4
|
version: string;
|
|
5
|
-
}
|
|
5
|
+
};
|
|
6
6
|
device?: {
|
|
7
|
-
cpus?: number
|
|
8
|
-
memory?: number
|
|
9
|
-
}
|
|
7
|
+
cpus?: number;
|
|
8
|
+
memory?: number;
|
|
9
|
+
};
|
|
10
10
|
network?: {
|
|
11
11
|
effectiveType: string;
|
|
12
12
|
rtt: number;
|
|
13
13
|
downlink: number;
|
|
14
|
-
}
|
|
14
|
+
};
|
|
15
15
|
time: {
|
|
16
16
|
localHour: number;
|
|
17
17
|
localDayOfWeek: number;
|
|
@@ -24,6 +24,9 @@ type SelectorConfig = {
|
|
|
24
24
|
className: boolean;
|
|
25
25
|
dataVC?: boolean;
|
|
26
26
|
};
|
|
27
|
+
type SegmentThreshold = {
|
|
28
|
+
readonly [key: string]: number;
|
|
29
|
+
};
|
|
27
30
|
type Rates = {
|
|
28
31
|
readonly [key: string]: number;
|
|
29
32
|
};
|
|
@@ -68,6 +71,7 @@ export type Config = {
|
|
|
68
71
|
};
|
|
69
72
|
readonly assetsConfig?: AssetsConfig;
|
|
70
73
|
readonly enableBetterPageVisibilityApi?: boolean;
|
|
74
|
+
readonly segmentsThreshold?: SegmentThreshold;
|
|
71
75
|
readonly vc?: {
|
|
72
76
|
readonly enabled?: boolean;
|
|
73
77
|
readonly heatmapSize?: number;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import type { InteractionType, SegmentInfo } from '../../../common';
|
|
1
2
|
import type { LabelStack, SegmentLabel } from '../../../interaction-context';
|
|
2
3
|
import { type UFOSegmentType } from '../../../segment/segment';
|
|
3
|
-
import {
|
|
4
|
+
import { getReactUFOPayloadVersion } from '../../utils/get-react-ufo-payload-version';
|
|
4
5
|
export type SegmentItem = {
|
|
5
6
|
n: string;
|
|
6
7
|
c?: Record<string, SegmentItem>;
|
|
@@ -13,9 +14,19 @@ export declare function sanitizeUfoName(name: string): string;
|
|
|
13
14
|
export declare function isSegmentLabel(obj: any): obj is SegmentLabel;
|
|
14
15
|
export declare function buildSegmentTree(labelStacks: LabelStack[]): SegmentTree;
|
|
15
16
|
export declare function stringifyLabelStackFully(labelStack: LabelStack): string;
|
|
17
|
+
export declare function stringifyLabelStackWithoutId(labelStack: LabelStack): string;
|
|
16
18
|
export declare function labelStackStartWith(labelStack: LabelStack, startWith: LabelStack): boolean;
|
|
17
19
|
export declare function optimizeLabelStack(labelStack: LabelStack, reactUFOVersion: ReturnType<typeof getReactUFOPayloadVersion>): string | {
|
|
18
20
|
t?: UFOSegmentType | undefined;
|
|
19
21
|
s?: string | undefined;
|
|
20
22
|
n: string;
|
|
21
23
|
}[];
|
|
24
|
+
export declare function getOldSegmentsLabelStack(segments: SegmentInfo[], interactionType: InteractionType): {
|
|
25
|
+
labelStack: any[];
|
|
26
|
+
}[] | {
|
|
27
|
+
labelStack: string | {
|
|
28
|
+
t?: UFOSegmentType | undefined;
|
|
29
|
+
s?: string | undefined;
|
|
30
|
+
n: string;
|
|
31
|
+
}[];
|
|
32
|
+
}[];
|