@atlaskit/react-ufo 2.15.0 → 2.16.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 (48) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/cjs/assets/index.js +96 -0
  3. package/dist/cjs/assets/utils.js +32 -0
  4. package/dist/cjs/common/assets/types.js +5 -0
  5. package/dist/cjs/create-payload/index.js +32 -5
  6. package/dist/cjs/vc/vc-observer/heatmap/heatmap.js +9 -20
  7. package/dist/cjs/vc/vc-observer/index.js +32 -28
  8. package/dist/cjs/vc/vc-observer/revisions/ViewportUpdateClassifier.js +8 -0
  9. package/dist/cjs/vc/vc-observer/revisions/fy24_01.js +34 -2
  10. package/dist/es2019/assets/index.js +82 -0
  11. package/dist/es2019/assets/utils.js +26 -0
  12. package/dist/es2019/common/assets/types.js +1 -0
  13. package/dist/es2019/create-payload/index.js +33 -3
  14. package/dist/es2019/vc/vc-observer/heatmap/heatmap.js +10 -18
  15. package/dist/es2019/vc/vc-observer/index.js +3 -0
  16. package/dist/es2019/vc/vc-observer/revisions/ViewportUpdateClassifier.js +6 -0
  17. package/dist/es2019/vc/vc-observer/revisions/fy24_01.js +29 -0
  18. package/dist/esm/assets/index.js +89 -0
  19. package/dist/esm/assets/utils.js +26 -0
  20. package/dist/esm/common/assets/types.js +1 -0
  21. package/dist/esm/create-payload/index.js +32 -5
  22. package/dist/esm/vc/vc-observer/heatmap/heatmap.js +9 -20
  23. package/dist/esm/vc/vc-observer/index.js +32 -28
  24. package/dist/esm/vc/vc-observer/revisions/ViewportUpdateClassifier.js +8 -0
  25. package/dist/esm/vc/vc-observer/revisions/fy24_01.js +34 -2
  26. package/dist/types/assets/index.d.ts +25 -0
  27. package/dist/types/assets/utils.d.ts +6 -0
  28. package/dist/types/common/assets/types.d.ts +18 -0
  29. package/dist/types/common/index.d.ts +1 -0
  30. package/dist/types/config/index.d.ts +2 -1
  31. package/dist/types/create-payload/index.d.ts +11616 -0
  32. package/dist/types/resource-timing/index.d.ts +1 -1
  33. package/dist/types/vc/vc-observer/heatmap/heatmap.d.ts +5 -8
  34. package/dist/types/vc/vc-observer/revisions/ViewportUpdateClassifier.d.ts +5 -0
  35. package/dist/types/vc/vc-observer/revisions/fy24_01.d.ts +2 -0
  36. package/dist/types/vc/vc-observer/revisions/types.d.ts +18 -0
  37. package/dist/types-ts4.5/assets/index.d.ts +25 -0
  38. package/dist/types-ts4.5/assets/utils.d.ts +6 -0
  39. package/dist/types-ts4.5/common/assets/types.d.ts +18 -0
  40. package/dist/types-ts4.5/common/index.d.ts +1 -0
  41. package/dist/types-ts4.5/config/index.d.ts +2 -1
  42. package/dist/types-ts4.5/create-payload/index.d.ts +11616 -0
  43. package/dist/types-ts4.5/resource-timing/index.d.ts +1 -1
  44. package/dist/types-ts4.5/vc/vc-observer/heatmap/heatmap.d.ts +5 -8
  45. package/dist/types-ts4.5/vc/vc-observer/revisions/ViewportUpdateClassifier.d.ts +5 -0
  46. package/dist/types-ts4.5/vc/vc-observer/revisions/fy24_01.d.ts +2 -0
  47. package/dist/types-ts4.5/vc/vc-observer/revisions/types.d.ts +18 -0
  48. package/package.json +4 -1
@@ -1,4 +1,4 @@
1
- export type { ResourceTimings } from './common/types';
1
+ export type { ResourceTiming, ResourceTimings } from './common/types';
2
2
  export { configure } from './common/utils/config';
3
3
  export { getResourceTimings } from './main';
4
4
  export { startResourceTimingBuffer } from './utils';
@@ -1,6 +1,6 @@
1
1
  import type { ComponentsLogType, MultiHeatmapPayload, VCEntryType, VCIgnoreReason, VCRatioType } from '../../../common/vc/types';
2
2
  import type { ObservedMutationType } from '../observers/types';
3
- import type { RevisionEntry } from '../revisions/types';
3
+ import type { RevisionEntry, VCCalculationMethodType } from '../revisions/types';
4
4
  type Viewport = {
5
5
  w: number;
6
6
  h: number;
@@ -18,6 +18,7 @@ type HeatmapAttrs = {
18
18
  type Heatmap = Uint32Array;
19
19
  type ProcessDataArgs = {
20
20
  VCParts: number[];
21
+ VCCalculationMethods: VCCalculationMethodType[];
21
22
  clean: boolean;
22
23
  ssr?: number;
23
24
  };
@@ -50,13 +51,9 @@ export declare class MultiRevisionHeatmap {
50
51
  heatmaps: Uint32Array[];
51
52
  };
52
53
  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
- };
54
+ processData({ VCParts, VCCalculationMethods, ssr }: ProcessDataArgs): {
55
+ VC: import("../revisions/types").VCType;
56
+ VCBox: import("../revisions/types").VCBoxType;
60
57
  VCEntries: {
61
58
  abs: number[][];
62
59
  rel: VCEntryType[];
@@ -1,3 +1,4 @@
1
+ import type { VCCalculationMethodArgs } from './types';
1
2
  export type FilterArgs = {
2
3
  type: string;
3
4
  tags?: string[];
@@ -17,6 +18,10 @@ export declare class ViewportUpdateClassifier {
17
18
  types: string[];
18
19
  filters: Filter[];
19
20
  removedFilters: string[];
21
+ VCCalculationMethod(_: VCCalculationMethodArgs): {
22
+ VC: {};
23
+ VCBox: {};
24
+ };
20
25
  protected __combinedTypes: string[];
21
26
  protected __combinedFilters: Filter[];
22
27
  mergeConfig(): void;
@@ -1,3 +1,4 @@
1
+ import type { VCCalculationMethodArgs, VCCalculationMethodReturn } from './types';
1
2
  import { type FilterArgs, ViewportUpdateClassifier } from './ViewportUpdateClassifier';
2
3
  export declare class FY24_01Classifier extends ViewportUpdateClassifier {
3
4
  revision: string;
@@ -6,6 +7,7 @@ export declare class FY24_01Classifier extends ViewportUpdateClassifier {
6
7
  name: string;
7
8
  filter: ({ type, ignoreReason }: FilterArgs) => boolean;
8
9
  }[];
10
+ VCCalculationMethod({ VCParts, entries, totalPainted, componentsLog, }: VCCalculationMethodArgs): VCCalculationMethodReturn;
9
11
  constructor();
10
12
  }
11
13
  export declare const revFY24_01Classifier: FY24_01Classifier;
@@ -1,5 +1,23 @@
1
+ import type { ComponentsLogType } from '../../../common/vc/types';
1
2
  import { ViewportUpdateClassifier } from './ViewportUpdateClassifier';
2
3
  export type RevisionEntry = {
3
4
  name: string;
4
5
  classifier: ViewportUpdateClassifier;
5
6
  };
7
+ export type VCType = {
8
+ [key: string]: number | null;
9
+ };
10
+ export type VCBoxType = {
11
+ [key: string]: null | Set<string>;
12
+ };
13
+ export type VCCalculationMethodArgs = {
14
+ VCParts: number[];
15
+ entries: number[][];
16
+ totalPainted: number;
17
+ componentsLog: ComponentsLogType;
18
+ };
19
+ export type VCCalculationMethodReturn = {
20
+ VC: VCType;
21
+ VCBox: VCBoxType;
22
+ };
23
+ export type VCCalculationMethodType = (args: VCCalculationMethodArgs) => VCCalculationMethodReturn;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/react-ufo",
3
- "version": "2.15.0",
3
+ "version": "2.16.0",
4
4
  "description": "Parts of React UFO that are publicly available",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -159,6 +159,9 @@
159
159
  },
160
160
  "platform-ufo-add-segment-use-effect": {
161
161
  "type": "boolean"
162
+ },
163
+ "ufo_chr_config": {
164
+ "type": "boolean"
162
165
  }
163
166
  }
164
167
  }