@atlaskit/react-ufo 4.5.12 → 4.6.1

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.
Files changed (53) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/cjs/config/index.js +19 -6
  3. package/dist/cjs/create-payload/index.js +3 -1
  4. package/dist/cjs/create-post-interaction-log-payload/get-late-mutations.js +15 -3
  5. package/dist/cjs/create-post-interaction-log-payload/index.js +2 -1
  6. package/dist/cjs/interaction-metrics/index.js +2 -1
  7. package/dist/cjs/segment/segment.js +19 -2
  8. package/dist/cjs/trace-hover/index.js +12 -0
  9. package/dist/cjs/trace-interaction/internal/trace-ufo-interaction.js +23 -6
  10. package/dist/cjs/vc/vc-observer-new/index.js +74 -11
  11. package/dist/cjs/vc/vc-observer-new/metric-calculator/abstract-base-vc-calculator.js +91 -36
  12. package/dist/es2019/config/index.js +13 -0
  13. package/dist/es2019/create-payload/index.js +3 -0
  14. package/dist/es2019/create-post-interaction-log-payload/get-late-mutations.js +12 -3
  15. package/dist/es2019/create-post-interaction-log-payload/index.js +2 -1
  16. package/dist/es2019/interaction-metrics/index.js +2 -1
  17. package/dist/es2019/segment/segment.js +21 -4
  18. package/dist/es2019/trace-hover/index.js +5 -0
  19. package/dist/es2019/trace-interaction/internal/trace-ufo-interaction.js +24 -7
  20. package/dist/es2019/vc/vc-observer-new/index.js +67 -10
  21. package/dist/es2019/vc/vc-observer-new/metric-calculator/abstract-base-vc-calculator.js +56 -8
  22. package/dist/esm/config/index.js +18 -6
  23. package/dist/esm/create-payload/index.js +3 -1
  24. package/dist/esm/create-post-interaction-log-payload/get-late-mutations.js +15 -3
  25. package/dist/esm/create-post-interaction-log-payload/index.js +2 -1
  26. package/dist/esm/interaction-metrics/index.js +2 -1
  27. package/dist/esm/segment/segment.js +21 -4
  28. package/dist/esm/trace-hover/index.js +5 -0
  29. package/dist/esm/trace-interaction/internal/trace-ufo-interaction.js +24 -7
  30. package/dist/esm/vc/vc-observer-new/index.js +74 -11
  31. package/dist/esm/vc/vc-observer-new/metric-calculator/abstract-base-vc-calculator.js +91 -36
  32. package/dist/types/common/common/types.d.ts +5 -0
  33. package/dist/types/common/react-ufo-payload-schema.d.ts +4 -1
  34. package/dist/types/common/vc/types.d.ts +7 -0
  35. package/dist/types/config/index.d.ts +2 -0
  36. package/dist/types/create-payload/index.d.ts +512 -0
  37. package/dist/types/create-post-interaction-log-payload/get-late-mutations.d.ts +2 -2
  38. package/dist/types/trace-hover/index.d.ts +2 -0
  39. package/dist/types/vc/vc-observer/getVCRevisionDebugDetails.d.ts +1 -1
  40. package/dist/types/vc/vc-observer-new/metric-calculator/abstract-base-vc-calculator.d.ts +1 -0
  41. package/dist/types/vc/vc-observer-new/types.d.ts +5 -0
  42. package/dist/types-ts4.5/common/common/types.d.ts +5 -0
  43. package/dist/types-ts4.5/common/react-ufo-payload-schema.d.ts +4 -1
  44. package/dist/types-ts4.5/common/vc/types.d.ts +7 -0
  45. package/dist/types-ts4.5/config/index.d.ts +2 -0
  46. package/dist/types-ts4.5/create-payload/index.d.ts +512 -0
  47. package/dist/types-ts4.5/create-post-interaction-log-payload/get-late-mutations.d.ts +2 -2
  48. package/dist/types-ts4.5/trace-hover/index.d.ts +2 -0
  49. package/dist/types-ts4.5/vc/vc-observer/getVCRevisionDebugDetails.d.ts +1 -1
  50. package/dist/types-ts4.5/vc/vc-observer-new/metric-calculator/abstract-base-vc-calculator.d.ts +1 -0
  51. package/dist/types-ts4.5/vc/vc-observer-new/types.d.ts +5 -0
  52. package/package.json +13 -1
  53. package/trace-hover/package.json +15 -0
@@ -1,5 +1,5 @@
1
1
  import type { LastInteractionFinishInfo } from '../common';
2
2
  import type { LateMutation } from '../common/react-ufo-payload-schema';
3
- import type { RevisionPayloadVCDetails } from '../common/vc/types';
4
- declare function getLateMutations(vcDetails: RevisionPayloadVCDetails, lastInteractionFinish: LastInteractionFinishInfo, postInteractionFinishVCRatios?: Record<string, number>): LateMutation[];
3
+ import type { RevisionPayloadVCDetails, VCLabelStacks } from '../common/vc/types';
4
+ declare function getLateMutations(vcDetails: RevisionPayloadVCDetails, labelStacks: VCLabelStacks | undefined, lastInteractionFinish: LastInteractionFinishInfo, postInteractionFinishVCRatios?: Record<string, number>): LateMutation[];
5
5
  export default getLateMutations;
@@ -0,0 +1,2 @@
1
+ declare function traceUFOHover(name: string, timestamp?: number): void;
2
+ export default traceUFOHover;
@@ -17,7 +17,7 @@ export type VCLogEntry = {
17
17
  export interface VCRevisionDebugDetails {
18
18
  revision: string;
19
19
  isClean: boolean;
20
- abortReason?: VCAbortReason | null;
20
+ abortReason?: string | null;
21
21
  abortTimestamp?: number;
22
22
  vcLogs: VCLogEntry[];
23
23
  interactionId?: string;
@@ -23,6 +23,7 @@ export default abstract class AbstractVCCalculatorBase implements VCCalculator {
23
23
  * Calculate ratios for each element based on their viewport coverage.
24
24
  */
25
25
  private calculateRatios;
26
+ private getLabelStacks;
26
27
  private calculateWithDebugInfo;
27
28
  calculate({ startTime, stopTime, orderedEntries, interactionId, isPostInteraction, include3p, }: VCCalculatorParam): Promise<RevisionPayloadEntry | undefined>;
28
29
  }
@@ -9,6 +9,11 @@ export type ViewportEntryData = {
9
9
  readonly attributeName?: string | null | undefined;
10
10
  readonly oldValue?: string | null | undefined;
11
11
  readonly newValue?: string | null | undefined;
12
+ readonly labelStacks?: VCObserverLabelStacks;
13
+ };
14
+ export type VCObserverLabelStacks = {
15
+ segment: string;
16
+ labelStack: string;
12
17
  };
13
18
  export type WindowEventEntryData = {
14
19
  readonly type: VCObserverEntryType;
@@ -90,6 +90,10 @@ export type ResponsivenessMetric = {
90
90
  visuallyComplete?: number;
91
91
  totalBlockingTime?: number;
92
92
  };
93
+ export type MinorInteraction = {
94
+ name: string;
95
+ startTime: DOMHighResTimeStamp;
96
+ };
93
97
  export interface InteractionMetrics {
94
98
  id: string;
95
99
  start: number;
@@ -170,6 +174,7 @@ export interface InteractionMetrics {
170
174
  unknownElementHierarchy?: string;
171
175
  hold3pActive?: Map<string, HoldActive>;
172
176
  hold3pInfo?: HoldInfo[];
177
+ minorInteractions?: MinorInteraction[];
173
178
  }
174
179
  export type LoadProfilerEventInfo = {
175
180
  identifier: string;
@@ -1,7 +1,7 @@
1
1
  import { type createPayloads } from '../create-payload';
2
2
  import { type LabelStack } from '../interaction-context';
3
3
  import { type VCObserver } from '../vc/vc-observer';
4
- import type { AbortReasonType, ApdexType, HoldActive, InteractionError, InteractionType, SegmentInfo } from './common/types';
4
+ import type { AbortReasonType, ApdexType, HoldActive, InteractionError, InteractionType, MinorInteraction, SegmentInfo } from './common/types';
5
5
  import type { RevisionPayload } from './vc/types';
6
6
  type ExtractPromise<T> = T extends Promise<infer U> ? U : never;
7
7
  export type PageVisibility = 'hidden' | 'mixed' | 'visible';
@@ -160,6 +160,7 @@ export type ReactUFOPayload = {
160
160
  holdActive: HoldActive[];
161
161
  unknownElementName?: string;
162
162
  unknownElementHierarchy?: string;
163
+ minorInteractions?: MinorInteraction[];
163
164
  };
164
165
  'ufo:vc:rev': RevisionPayload;
165
166
  'ufo:vc:ratios': Record<string, number>;
@@ -202,6 +203,8 @@ export type LateMutation = {
202
203
  time: number;
203
204
  element: string;
204
205
  viewportHeatmapPercentage: number;
206
+ segment?: string;
207
+ labelStack?: string;
205
208
  };
206
209
  export type PostInteractionLogPayload = {
207
210
  actionSubject: 'experience';
@@ -14,6 +14,12 @@ export type VCAbortReasonType = {
14
14
  export type VCRatioType = {
15
15
  [elementName: string]: number;
16
16
  };
17
+ export type VCLabelStacks = {
18
+ [elementName: string]: {
19
+ segment: string;
20
+ labelStack: string;
21
+ };
22
+ };
17
23
  export type VCRawDataType = {
18
24
  abortReasonInfo: string | null;
19
25
  abortReason: VCAbortReasonType;
@@ -114,6 +120,7 @@ export type RevisionPayloadEntry = {
114
120
  clean: boolean;
115
121
  vcDetails?: RevisionPayloadVCDetails;
116
122
  ratios?: VCRatioType;
123
+ labelStacks?: VCLabelStacks;
117
124
  abortReason?: VCAbortReason | null;
118
125
  abortTimestamp?: number;
119
126
  displayContentsOccurrence?: number;
@@ -59,6 +59,7 @@ export type ReactHydrationStats = {
59
59
  export type Config = {
60
60
  readonly enabled?: boolean;
61
61
  readonly interactionTimeout?: Record<string, number>;
62
+ readonly minorInteractions?: string[];
62
63
  readonly doNotAbortActivePressInteraction?: string[];
63
64
  readonly doNotAbortActivePressInteractionOnTransition?: string[];
64
65
  readonly awaitBM3TTI?: string[];
@@ -169,6 +170,7 @@ type ValidTypingMethod = (typeof validTypingMethods)[number];
169
170
  export declare function getTypingPerformanceTracingMethod(): ValidTypingMethod;
170
171
  export declare function getAwaitBM3TTIList(): string[];
171
172
  export declare function getUfoNameOverrides(): UFONameOverride | undefined;
173
+ export declare function getMinorInteractions(): string[] | undefined;
172
174
  export declare function getDoNotAbortActivePressInteraction(): string[] | undefined;
173
175
  export declare function getDoNotAbortActivePressInteractionOnTransition(): string[] | undefined;
174
176
  export declare const CLEANUP_TIMEOUT: number;