@atlaskit/react-ufo 3.11.1 → 3.12.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.
Files changed (44) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cjs/create-payload/index.js +6 -2
  3. package/dist/cjs/interaction-metrics-init/index.js +4 -0
  4. package/dist/cjs/machine-utilisation/index.js +77 -0
  5. package/dist/cjs/machine-utilisation/types.js +1 -0
  6. package/dist/cjs/vc/vc-observer/index.js +6 -5
  7. package/dist/cjs/vc/vc-observer/observers/index.js +2 -2
  8. package/dist/es2019/create-payload/index.js +5 -0
  9. package/dist/es2019/interaction-metrics-init/index.js +4 -0
  10. package/dist/es2019/machine-utilisation/index.js +62 -0
  11. package/dist/es2019/machine-utilisation/types.js +0 -0
  12. package/dist/es2019/vc/vc-observer/index.js +8 -3
  13. package/dist/es2019/vc/vc-observer/observers/index.js +2 -2
  14. package/dist/esm/create-payload/index.js +6 -2
  15. package/dist/esm/interaction-metrics-init/index.js +4 -0
  16. package/dist/esm/machine-utilisation/index.js +66 -0
  17. package/dist/esm/machine-utilisation/types.js +0 -0
  18. package/dist/esm/vc/vc-observer/index.js +6 -5
  19. package/dist/esm/vc/vc-observer/observers/index.js +2 -2
  20. package/dist/types/common/react-ufo-payload-schema.d.ts +1 -1
  21. package/dist/types/create-payload/index.d.ts +449 -1
  22. package/dist/types/create-post-interaction-log-payload/get-late-mutations.d.ts +3 -3
  23. package/dist/types/create-post-interaction-log-payload/index.d.ts +1 -1
  24. package/dist/types/machine-utilisation/index.d.ts +22 -0
  25. package/dist/types/machine-utilisation/types.d.ts +19 -0
  26. package/dist/types/vc/no-op-vc-observer.d.ts +1 -1
  27. package/dist/types/vc/vc-observer/getVCRevisionsData.d.ts +2 -2
  28. package/dist/types/vc/vc-observer-new/index.d.ts +1 -1
  29. package/dist/types/vc/vc-observer-new/metric-calculator/abstract-base-vc-calculator.d.ts +1 -1
  30. package/dist/types/vc/vc-observer-new/metric-calculator/percentile-calc/heatmap/heatmap.d.ts +1 -1
  31. package/dist/types/vc/vc-observer-new/metric-calculator/types.d.ts +1 -1
  32. package/dist/types-ts4.5/common/react-ufo-payload-schema.d.ts +1 -1
  33. package/dist/types-ts4.5/create-payload/index.d.ts +449 -1
  34. package/dist/types-ts4.5/create-post-interaction-log-payload/get-late-mutations.d.ts +3 -3
  35. package/dist/types-ts4.5/create-post-interaction-log-payload/index.d.ts +1 -1
  36. package/dist/types-ts4.5/machine-utilisation/index.d.ts +22 -0
  37. package/dist/types-ts4.5/machine-utilisation/types.d.ts +19 -0
  38. package/dist/types-ts4.5/vc/no-op-vc-observer.d.ts +1 -1
  39. package/dist/types-ts4.5/vc/vc-observer/getVCRevisionsData.d.ts +2 -2
  40. package/dist/types-ts4.5/vc/vc-observer-new/index.d.ts +1 -1
  41. package/dist/types-ts4.5/vc/vc-observer-new/metric-calculator/abstract-base-vc-calculator.d.ts +1 -1
  42. package/dist/types-ts4.5/vc/vc-observer-new/metric-calculator/percentile-calc/heatmap/heatmap.d.ts +1 -1
  43. package/dist/types-ts4.5/vc/vc-observer-new/metric-calculator/types.d.ts +1 -1
  44. package/package.json +4 -1
@@ -0,0 +1,22 @@
1
+ import type { PressureObserver as PressureObserverInterface } from './types';
2
+ declare global {
3
+ var PressureObserver: PressureObserverInterface;
4
+ }
5
+ export declare function resetPressureRecordBuffer(): void;
6
+ export declare function removeOldBufferRecords(filter: DOMHighResTimeStamp): void;
7
+ export declare function createPressureStateReport(start: DOMHighResTimeStamp, end: DOMHighResTimeStamp): {
8
+ count: {
9
+ nominal: number;
10
+ fair: number;
11
+ serious: number;
12
+ critical: number;
13
+ };
14
+ percentage: {
15
+ nominal: number;
16
+ fair: number;
17
+ serious: number;
18
+ critical: number;
19
+ };
20
+ } | null;
21
+ export declare function initialisePressureObserver(): void;
22
+ export declare function disconnectPressureObserver(): void;
@@ -0,0 +1,19 @@
1
+ export type PressureRecord = {
2
+ source: 'cpu' | 'thermals';
3
+ state: 'nominal' | 'fair' | 'serious' | 'critical';
4
+ time: DOMHighResTimeStamp;
5
+ toJSON: () => Omit<PressureRecord, 'toJSON'>;
6
+ };
7
+ export type PressureObserverCallback = (changes: PressureRecord[], observer: PressureObserverInstance) => void;
8
+ export interface PressureObserverInstance {
9
+ readonly knownSources: PressureRecord['source'];
10
+ disconnect: () => void;
11
+ takeRecords: () => PressureRecord[];
12
+ unobserve: (source: PressureRecord['source']) => void;
13
+ observe: (source: PressureRecord['source'], options?: {
14
+ sampleInterval?: number;
15
+ }) => Promise<void>;
16
+ }
17
+ export interface PressureObserver {
18
+ new (callback: PressureObserverCallback): PressureObserverInstance;
19
+ }
@@ -1,4 +1,4 @@
1
- import { VCResult } from '../common/vc/types';
1
+ import type { VCResult } from '../common/vc/types';
2
2
  import type { GetVCResultType, VCObserverInterface } from './types';
3
3
  export declare class VCObserverNOOP implements VCObserverInterface {
4
4
  start(startArg: {
@@ -1,5 +1,5 @@
1
- import { InteractionMetrics } from '../../common/common/types';
2
- import { RevisionPayload } from '../../common/vc/types';
1
+ import type { InteractionMetrics } from '../../common/common/types';
2
+ import type { RevisionPayload } from '../../common/vc/types';
3
3
  import type { MultiRevisionHeatmap } from './heatmap/heatmap';
4
4
  type CalculatedVC = {
5
5
  VC: {
@@ -1,4 +1,4 @@
1
- import { RevisionPayloadEntry } from '../../common/vc/types';
1
+ import { type RevisionPayloadEntry } from '../../common/vc/types';
2
2
  import { type SelectorConfig } from './get-element-name';
3
3
  import type { VCObserverGetVCResultParam } from './types';
4
4
  export type VCObserverNewConfig = {
@@ -1,4 +1,4 @@
1
- import { RevisionPayloadEntry, VCAbortReason } from '../../../common/vc/types';
1
+ import type { RevisionPayloadEntry, VCAbortReason } from '../../../common/vc/types';
2
2
  import type { VCObserverEntry } from '../types';
3
3
  import type { VCCalculator, VCCalculatorParam } from './types';
4
4
  export default abstract class AbstractVCCalculatorBase implements VCCalculator {
@@ -1,5 +1,5 @@
1
1
  import type { VCObserverEntry } from '../../../types';
2
- import { HeatmapCheckpointMetrics, HeatmapEntry, HeatmapOptions } from './types';
2
+ import type { HeatmapCheckpointMetrics, HeatmapEntry, HeatmapOptions } from './types';
3
3
  export default class Heatmap {
4
4
  private viewport;
5
5
  /**
@@ -1,4 +1,4 @@
1
- import { RevisionPayloadEntry } from '../../../common/vc/types';
1
+ import type { RevisionPayloadEntry } from '../../../common/vc/types';
2
2
  import type { VCObserverEntry } from '../types';
3
3
  export type VCCalculatorParam = {
4
4
  startTime: DOMHighResTimeStamp;
@@ -1,5 +1,5 @@
1
1
  import { createPayloads } from '../create-payload';
2
- import { LabelStack } from '../interaction-context';
2
+ import { type LabelStack } from '../interaction-context';
3
3
  import { VCObserver } from '../vc/vc-observer';
4
4
  import type { AbortReasonType, ApdexType, InteractionError, InteractionType, SegmentInfo } from './common/types';
5
5
  import type { RevisionPayload } from './vc/types';