@atlaskit/react-ufo 4.7.6 → 4.9.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 +15 -0
- package/dist/cjs/create-extra-search-page-interaction-payload/index.js +50 -0
- package/dist/cjs/create-interaction-extra-metrics-payload/index.js +1 -1
- package/dist/cjs/create-payload/index.js +63 -0
- package/dist/cjs/create-payload/utils/get-vc-metrics.js +15 -12
- package/dist/cjs/interaction-metrics/index.js +15 -7
- package/dist/cjs/interaction-metrics-init/index.js +29 -2
- package/dist/cjs/vc/index.js +5 -4
- package/dist/cjs/vc/vc-observer-new/index.js +28 -4
- package/dist/cjs/vc/vc-observer-new/metric-calculator/abstract-base-vc-calculator.js +8 -8
- package/dist/cjs/vc/vc-observer-new/metric-calculator/fy25_03/index.js +7 -3
- package/dist/cjs/vc/vc-observer-new/metric-calculator/utils/is-entry-smart-answers-in-search.js +27 -0
- package/dist/cjs/vc/vc-observer-new/metric-calculator/vcnext/index.js +41 -0
- package/dist/cjs/vc/vc-observer-new/viewport-observer/index.js +46 -26
- package/dist/es2019/create-extra-search-page-interaction-payload/index.js +32 -0
- package/dist/es2019/create-interaction-extra-metrics-payload/index.js +1 -1
- package/dist/es2019/create-payload/index.js +49 -0
- package/dist/es2019/create-payload/utils/get-vc-metrics.js +3 -2
- package/dist/es2019/interaction-metrics/index.js +15 -7
- package/dist/es2019/interaction-metrics-init/index.js +29 -2
- package/dist/es2019/vc/index.js +5 -3
- package/dist/es2019/vc/vc-observer-new/index.js +21 -2
- package/dist/es2019/vc/vc-observer-new/metric-calculator/abstract-base-vc-calculator.js +6 -5
- package/dist/es2019/vc/vc-observer-new/metric-calculator/fy25_03/index.js +7 -3
- package/dist/es2019/vc/vc-observer-new/metric-calculator/utils/is-entry-smart-answers-in-search.js +22 -0
- package/dist/es2019/vc/vc-observer-new/metric-calculator/vcnext/index.js +21 -0
- package/dist/es2019/vc/vc-observer-new/viewport-observer/index.js +29 -14
- package/dist/esm/create-extra-search-page-interaction-payload/index.js +43 -0
- package/dist/esm/create-interaction-extra-metrics-payload/index.js +1 -1
- package/dist/esm/create-payload/index.js +62 -0
- package/dist/esm/create-payload/utils/get-vc-metrics.js +15 -12
- package/dist/esm/interaction-metrics/index.js +15 -7
- package/dist/esm/interaction-metrics-init/index.js +29 -2
- package/dist/esm/vc/index.js +5 -4
- package/dist/esm/vc/vc-observer-new/index.js +28 -4
- package/dist/esm/vc/vc-observer-new/metric-calculator/abstract-base-vc-calculator.js +8 -8
- package/dist/esm/vc/vc-observer-new/metric-calculator/fy25_03/index.js +7 -3
- package/dist/esm/vc/vc-observer-new/metric-calculator/utils/is-entry-smart-answers-in-search.js +21 -0
- package/dist/esm/vc/vc-observer-new/metric-calculator/vcnext/index.js +36 -0
- package/dist/esm/vc/vc-observer-new/viewport-observer/index.js +46 -26
- package/dist/types/config/index.d.ts +8 -1
- package/dist/types/create-extra-search-page-interaction-payload/index.d.ts +3 -0
- package/dist/types/create-interaction-extra-metrics-payload/index.d.ts +1 -1
- package/dist/types/create-payload/index.d.ts +25434 -0
- package/dist/types/create-payload/utils/get-vc-metrics.d.ts +1 -1
- package/dist/types/vc/types.d.ts +1 -0
- package/dist/types/vc/vc-observer-new/metric-calculator/abstract-base-vc-calculator.d.ts +2 -2
- package/dist/types/vc/vc-observer-new/metric-calculator/fy25_03/index.d.ts +2 -2
- package/dist/types/vc/vc-observer-new/metric-calculator/types.d.ts +1 -0
- package/dist/types/vc/vc-observer-new/metric-calculator/utils/is-entry-smart-answers-in-search.d.ts +2 -0
- package/dist/types/vc/vc-observer-new/metric-calculator/vcnext/index.d.ts +6 -0
- package/dist/types/vc/vc-observer-new/types.d.ts +2 -1
- package/dist/types-ts4.5/config/index.d.ts +8 -1
- package/dist/types-ts4.5/create-extra-search-page-interaction-payload/index.d.ts +3 -0
- package/dist/types-ts4.5/create-interaction-extra-metrics-payload/index.d.ts +1 -1
- package/dist/types-ts4.5/create-payload/index.d.ts +25434 -0
- package/dist/types-ts4.5/create-payload/utils/get-vc-metrics.d.ts +1 -1
- package/dist/types-ts4.5/vc/types.d.ts +1 -0
- package/dist/types-ts4.5/vc/vc-observer-new/metric-calculator/abstract-base-vc-calculator.d.ts +2 -2
- package/dist/types-ts4.5/vc/vc-observer-new/metric-calculator/fy25_03/index.d.ts +2 -2
- package/dist/types-ts4.5/vc/vc-observer-new/metric-calculator/types.d.ts +1 -0
- package/dist/types-ts4.5/vc/vc-observer-new/metric-calculator/utils/is-entry-smart-answers-in-search.d.ts +2 -0
- package/dist/types-ts4.5/vc/vc-observer-new/metric-calculator/vcnext/index.d.ts +6 -0
- package/dist/types-ts4.5/vc/vc-observer-new/types.d.ts +2 -1
- package/package.json +7 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type InteractionMetrics } from '../../common';
|
|
2
2
|
import type { VCResult } from '../../common/vc/types';
|
|
3
|
-
declare function getVCMetrics(interaction: InteractionMetrics, include3p?: boolean): Promise<VCResult & {
|
|
3
|
+
declare function getVCMetrics(interaction: InteractionMetrics, include3p?: boolean, excludeSmartAnswersInSearch?: boolean): Promise<VCResult & {
|
|
4
4
|
'metric:vc90'?: number | null;
|
|
5
5
|
}>;
|
|
6
6
|
export default getVCMetrics;
|
package/dist/types/vc/types.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ declare global {
|
|
|
12
12
|
export default abstract class AbstractVCCalculatorBase implements VCCalculator {
|
|
13
13
|
private revisionNo;
|
|
14
14
|
constructor(revisionNo: string);
|
|
15
|
-
protected abstract isEntryIncluded(entry: VCObserverEntry, include3p?: boolean): boolean;
|
|
15
|
+
protected abstract isEntryIncluded(entry: VCObserverEntry, include3p?: boolean, excludeSmartAnswersInSearch?: boolean): boolean;
|
|
16
16
|
protected abstract getVCCleanStatus(filteredEntries: ReadonlyArray<VCObserverEntry>): {
|
|
17
17
|
isVCClean: boolean;
|
|
18
18
|
dirtyReason?: VCAbortReason;
|
|
@@ -25,5 +25,5 @@ export default abstract class AbstractVCCalculatorBase implements VCCalculator {
|
|
|
25
25
|
private calculateRatios;
|
|
26
26
|
private getLabelStacks;
|
|
27
27
|
private calculateWithDebugInfo;
|
|
28
|
-
calculate({ startTime, stopTime, orderedEntries, interactionId, isPostInteraction, include3p, }: VCCalculatorParam): Promise<RevisionPayloadEntry | undefined>;
|
|
28
|
+
calculate({ startTime, stopTime, orderedEntries, interactionId, isPostInteraction, include3p, excludeSmartAnswersInSearch, }: VCCalculatorParam): Promise<RevisionPayloadEntry | undefined>;
|
|
29
29
|
}
|
|
@@ -4,8 +4,8 @@ export declare const KNOWN_ATTRIBUTES_THAT_DOES_NOT_CAUSE_LAYOUT_SHIFTS: string[
|
|
|
4
4
|
export declare const NON_VISUAL_ARIA_ATTRIBUTES: string[];
|
|
5
5
|
export declare const THIRD_PARTY_BROWSER_EXTENSION_ATTRIBUTES: string[];
|
|
6
6
|
export default class VCCalculator_FY25_03 extends AbstractVCCalculatorBase {
|
|
7
|
-
constructor();
|
|
8
|
-
protected isEntryIncluded(entry: VCObserverEntry, include3p?: boolean): boolean;
|
|
7
|
+
constructor(revisionNo?: string);
|
|
8
|
+
protected isEntryIncluded(entry: VCObserverEntry, include3p?: boolean, excludeSmartAnswersInSearch?: boolean): boolean;
|
|
9
9
|
protected getVCCleanStatus(filteredEntries: readonly VCObserverEntry[]): {
|
|
10
10
|
isVCClean: boolean;
|
|
11
11
|
dirtyReason: never;
|
|
@@ -7,6 +7,7 @@ export type VCCalculatorParam = {
|
|
|
7
7
|
interactionId?: string;
|
|
8
8
|
isPostInteraction: boolean;
|
|
9
9
|
include3p?: boolean;
|
|
10
|
+
excludeSmartAnswersInSearch?: boolean;
|
|
10
11
|
};
|
|
11
12
|
export interface VCCalculator {
|
|
12
13
|
calculate(param: VCCalculatorParam): Promise<RevisionPayloadEntry | undefined>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { VCObserverEntry } from '../../types';
|
|
2
|
+
import VCCalculator_FY25_03 from '../fy25_03';
|
|
3
|
+
export default class VCNextCalculator extends VCCalculator_FY25_03 {
|
|
4
|
+
constructor();
|
|
5
|
+
protected isEntryIncluded(entry: VCObserverEntry, include3p?: boolean): boolean;
|
|
6
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ObservedWindowEvent } from './window-event-observer';
|
|
2
|
-
export type VCObserverEntryType = 'mutation:child-element' | 'mutation:remount' | 'mutation:element' | 'mutation:element-replacement' | 'mutation:attribute:no-layout-shift' | 'mutation:attribute:non-visual-style' | 'mutation:attribute' | 'mutation:media' | 'mutation:rll-placeholder' | 'mutation:third-party-element' | 'mutation:ssr-placeholder' | 'layout-shift' | 'window:event' | 'ssr-hydration' | 'unknown';
|
|
2
|
+
export type VCObserverEntryType = 'mutation:child-element' | 'mutation:remount' | 'mutation:element' | 'mutation:element-replacement' | 'mutation:display-contents-children-element' | 'mutation:attribute:no-layout-shift' | 'mutation:attribute:non-visual-style' | 'mutation:attribute' | 'mutation:media' | 'mutation:rll-placeholder' | 'mutation:third-party-element' | 'mutation:ssr-placeholder' | 'layout-shift' | 'window:event' | 'ssr-hydration' | 'unknown';
|
|
3
3
|
export type ViewportEntryData = {
|
|
4
4
|
readonly type: VCObserverEntryType;
|
|
5
5
|
readonly elementName: string;
|
|
@@ -29,4 +29,5 @@ export type VCObserverGetVCResultParam = {
|
|
|
29
29
|
interactionId?: string;
|
|
30
30
|
ssr?: number;
|
|
31
31
|
include3p?: boolean;
|
|
32
|
+
excludeSmartAnswersInSearch?: boolean;
|
|
32
33
|
};
|
|
@@ -35,7 +35,7 @@ type SegmentThreshold = {
|
|
|
35
35
|
type Rates = {
|
|
36
36
|
readonly [key: string]: number;
|
|
37
37
|
};
|
|
38
|
-
export type TTVCRevision = 'fy25.01' | 'fy25.02' | 'fy25.03';
|
|
38
|
+
export type TTVCRevision = 'fy25.01' | 'fy25.02' | 'fy25.03' | 'next';
|
|
39
39
|
export declare const DEFAULT_TTVC_REVISION = "fy25.03";
|
|
40
40
|
export declare const UNKNOWN_INTERACTION_RATE = 1000;
|
|
41
41
|
export type ReactHydrationStats = {
|
|
@@ -150,6 +150,13 @@ export type Config = {
|
|
|
150
150
|
* Whether ttvc with 3p measurement is enabled and sent new event for experiences with sample rates
|
|
151
151
|
*/
|
|
152
152
|
readonly extraInteractionMetrics?: InteractionMetricsConfig;
|
|
153
|
+
/**
|
|
154
|
+
* Option to enable an additional metric to track search page load times with SAIN ignored
|
|
155
|
+
*/
|
|
156
|
+
readonly extraSearchPageInteraction?: {
|
|
157
|
+
readonly enabled: boolean;
|
|
158
|
+
readonly searchPageMetricName: string;
|
|
159
|
+
};
|
|
153
160
|
};
|
|
154
161
|
export declare function setUFOConfig(newConfig: Config): void;
|
|
155
162
|
export declare function getConfig(): Config | undefined;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { InteractionMetrics } from '../common';
|
|
2
|
+
export declare function sinkExtraSearchPageInteractionHandler(sinkFn: (interactionId: string, interaction: InteractionMetrics) => void | Promise<void>): void;
|
|
3
|
+
export declare function onSearchPageInteractionComplete(interactionId: string, data: InteractionMetrics): void;
|
|
@@ -91,7 +91,7 @@ declare function createInteractionExtraLogPayload(interactionId: string, interac
|
|
|
91
91
|
abortedByInteractionName: string | undefined;
|
|
92
92
|
end: number;
|
|
93
93
|
start: number;
|
|
94
|
-
'metric:ttai:3p': number
|
|
94
|
+
'metric:ttai:3p': number;
|
|
95
95
|
};
|
|
96
96
|
'vc:effective:revision': string;
|
|
97
97
|
};
|