@atlaskit/react-ufo 3.14.10 → 3.14.12

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 (23) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cjs/machine-utilisation/index.js +4 -1
  3. package/dist/cjs/vc/vc-observer-new/index.js +1 -2
  4. package/dist/cjs/vc/vc-observer-new/metric-calculator/fy25_03/index.js +1 -1
  5. package/dist/es2019/machine-utilisation/index.js +4 -1
  6. package/dist/es2019/vc/vc-observer-new/index.js +1 -2
  7. package/dist/es2019/vc/vc-observer-new/metric-calculator/fy25_03/index.js +1 -1
  8. package/dist/esm/machine-utilisation/index.js +4 -1
  9. package/dist/esm/vc/vc-observer-new/index.js +1 -2
  10. package/dist/esm/vc/vc-observer-new/metric-calculator/fy25_03/index.js +1 -1
  11. package/dist/types/common/react-ufo-payload-schema.d.ts +2 -2
  12. package/dist/types/create-payload/common/utils/index.d.ts +2 -2
  13. package/dist/types/create-payload/critical-metrics-payload/index.d.ts +1 -1
  14. package/dist/types/create-payload/critical-metrics-payload/segment-metrics/create-segment-metrics.d.ts +2 -2
  15. package/dist/types/create-payload/critical-metrics-payload/types.d.ts +1 -1
  16. package/dist/types/interaction-context/index.d.ts +1 -1
  17. package/dist/types-ts4.5/common/react-ufo-payload-schema.d.ts +2 -2
  18. package/dist/types-ts4.5/create-payload/common/utils/index.d.ts +2 -2
  19. package/dist/types-ts4.5/create-payload/critical-metrics-payload/index.d.ts +1 -1
  20. package/dist/types-ts4.5/create-payload/critical-metrics-payload/segment-metrics/create-segment-metrics.d.ts +2 -2
  21. package/dist/types-ts4.5/create-payload/critical-metrics-payload/types.d.ts +1 -1
  22. package/dist/types-ts4.5/interaction-context/index.d.ts +1 -1
  23. package/package.json +1 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @atlaskit/ufo-interaction-ignore
2
2
 
3
+ ## 3.14.12
4
+
5
+ ### Patch Changes
6
+
7
+ - [#183928](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/183928)
8
+ [`d9580eee2eedc`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d9580eee2eedc) -
9
+ Suppress Sentry NotAllowedError on observe PressureObserver
10
+
11
+ ## 3.14.11
12
+
13
+ ### Patch Changes
14
+
15
+ - [#183338](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/183338)
16
+ [`890b79158a11b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/890b79158a11b) -
17
+ FG cleanup - platform_ufo_vc_observer_new_ssr_abort_listener
18
+
3
19
  ## 3.14.10
4
20
 
5
21
  ### Patch Changes
@@ -117,7 +117,10 @@ function initialisePressureObserver() {
117
117
  });
118
118
  pressureObserver.observe('cpu', {
119
119
  sampleInterval: 100
120
- }).catch();
120
+ }).catch(function () {
121
+ // Silently handle permission policy restrictions or other observe failures
122
+ // This prevents unhandled promise rejections from being reported to Sentry
123
+ });
121
124
  }
122
125
  } catch (err) {
123
126
  /* do nothing, this is a best efforts metric */
@@ -12,7 +12,6 @@ var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
12
12
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
13
13
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
14
14
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
15
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
16
15
  var _ssrPlaceholders = require("../vc-observer/observers/ssr-placeholders");
17
16
  var _entriesTimeline = _interopRequireDefault(require("./entries-timeline"));
18
17
  var _getElementName2 = _interopRequireDefault(require("./get-element-name"));
@@ -133,7 +132,7 @@ var VCObserverNew = exports.default = /*#__PURE__*/function () {
133
132
  renderStop: -1
134
133
  };
135
134
  (_this$viewportObserve = this.viewportObserver) === null || _this$viewportObserve === void 0 || _this$viewportObserve.start();
136
- if ((_window = window) !== null && _window !== void 0 && _window.__SSR_ABORT_LISTENERS__ && (0, _platformFeatureFlags.fg)('platform_ufo_vc_observer_new_ssr_abort_listener')) {
135
+ if ((_window = window) !== null && _window !== void 0 && _window.__SSR_ABORT_LISTENERS__) {
137
136
  var abortListeners = window.__SSR_ABORT_LISTENERS__;
138
137
  var aborts = abortListeners.aborts;
139
138
  if (aborts && (0, _typeof2.default)(aborts) === 'object') {
@@ -34,7 +34,7 @@ var getConsideredEntryTypes = function getConsideredEntryTypes() {
34
34
  // TODO: AFO-3523
35
35
  // Those are the attributes we have found when testing the 'fy25.03' manually.
36
36
  // We still need to replace this hardcoded list with a proper automation
37
- var KNOWN_ATTRIBUTES_THAT_DOES_NOT_CAUSE_LAYOUT_SHIFTS = exports.KNOWN_ATTRIBUTES_THAT_DOES_NOT_CAUSE_LAYOUT_SHIFTS = ['data-drop-target-for-element', 'draggable'];
37
+ var KNOWN_ATTRIBUTES_THAT_DOES_NOT_CAUSE_LAYOUT_SHIFTS = exports.KNOWN_ATTRIBUTES_THAT_DOES_NOT_CAUSE_LAYOUT_SHIFTS = ['data-drop-target-for-element', 'data-drop-target-for-external', 'draggable'];
38
38
 
39
39
  // Common aria attributes that don't cause visual layout shifts
40
40
  var NON_VISUAL_ARIA_ATTRIBUTES = exports.NON_VISUAL_ARIA_ATTRIBUTES = ['aria-label', 'aria-labelledby', 'aria-describedby', 'aria-hidden', 'aria-expanded', 'aria-controls', 'aria-selected', 'aria-checked', 'aria-disabled', 'aria-required', 'aria-current', 'aria-haspopup', 'aria-pressed', 'aria-atomic', 'aria-live'];
@@ -96,7 +96,10 @@ export function initialisePressureObserver() {
96
96
  });
97
97
  pressureObserver.observe('cpu', {
98
98
  sampleInterval: 100
99
- }).catch();
99
+ }).catch(() => {
100
+ // Silently handle permission policy restrictions or other observe failures
101
+ // This prevents unhandled promise rejections from being reported to Sentry
102
+ });
100
103
  }
101
104
  } catch (err) {
102
105
  /* do nothing, this is a best efforts metric */
@@ -1,5 +1,4 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- import { fg } from '@atlaskit/platform-feature-flags';
3
2
  import { SSRPlaceholderHandlers } from '../vc-observer/observers/ssr-placeholders';
4
3
  import EntriesTimeline from './entries-timeline';
5
4
  import getElementName from './get-element-name';
@@ -112,7 +111,7 @@ export default class VCObserverNew {
112
111
  renderStop: -1
113
112
  };
114
113
  (_this$viewportObserve = this.viewportObserver) === null || _this$viewportObserve === void 0 ? void 0 : _this$viewportObserve.start();
115
- if ((_window = window) !== null && _window !== void 0 && _window.__SSR_ABORT_LISTENERS__ && fg('platform_ufo_vc_observer_new_ssr_abort_listener')) {
114
+ if ((_window = window) !== null && _window !== void 0 && _window.__SSR_ABORT_LISTENERS__) {
116
115
  const abortListeners = window.__SSR_ABORT_LISTENERS__;
117
116
  const aborts = abortListeners.aborts;
118
117
  if (aborts && typeof aborts === 'object') {
@@ -20,7 +20,7 @@ const getConsideredEntryTypes = () => {
20
20
  // TODO: AFO-3523
21
21
  // Those are the attributes we have found when testing the 'fy25.03' manually.
22
22
  // We still need to replace this hardcoded list with a proper automation
23
- export const KNOWN_ATTRIBUTES_THAT_DOES_NOT_CAUSE_LAYOUT_SHIFTS = ['data-drop-target-for-element', 'draggable'];
23
+ export const KNOWN_ATTRIBUTES_THAT_DOES_NOT_CAUSE_LAYOUT_SHIFTS = ['data-drop-target-for-element', 'data-drop-target-for-external', 'draggable'];
24
24
 
25
25
  // Common aria attributes that don't cause visual layout shifts
26
26
  export const NON_VISUAL_ARIA_ATTRIBUTES = ['aria-label', 'aria-labelledby', 'aria-describedby', 'aria-hidden', 'aria-expanded', 'aria-controls', 'aria-selected', 'aria-checked', 'aria-disabled', 'aria-required', 'aria-current', 'aria-haspopup', 'aria-pressed', 'aria-atomic', 'aria-live'];
@@ -101,7 +101,10 @@ export function initialisePressureObserver() {
101
101
  });
102
102
  pressureObserver.observe('cpu', {
103
103
  sampleInterval: 100
104
- }).catch();
104
+ }).catch(function () {
105
+ // Silently handle permission policy restrictions or other observe failures
106
+ // This prevents unhandled promise rejections from being reported to Sentry
107
+ });
105
108
  }
106
109
  } catch (err) {
107
110
  /* do nothing, this is a best efforts metric */
@@ -5,7 +5,6 @@ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
5
5
  import _createClass from "@babel/runtime/helpers/createClass";
6
6
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
7
7
  import _regeneratorRuntime from "@babel/runtime/regenerator";
8
- import { fg } from '@atlaskit/platform-feature-flags';
9
8
  import { SSRPlaceholderHandlers } from '../vc-observer/observers/ssr-placeholders';
10
9
  import EntriesTimeline from './entries-timeline';
11
10
  import _getElementName from './get-element-name';
@@ -126,7 +125,7 @@ var VCObserverNew = /*#__PURE__*/function () {
126
125
  renderStop: -1
127
126
  };
128
127
  (_this$viewportObserve = this.viewportObserver) === null || _this$viewportObserve === void 0 || _this$viewportObserve.start();
129
- if ((_window = window) !== null && _window !== void 0 && _window.__SSR_ABORT_LISTENERS__ && fg('platform_ufo_vc_observer_new_ssr_abort_listener')) {
128
+ if ((_window = window) !== null && _window !== void 0 && _window.__SSR_ABORT_LISTENERS__) {
130
129
  var abortListeners = window.__SSR_ABORT_LISTENERS__;
131
130
  var aborts = abortListeners.aborts;
132
131
  if (aborts && _typeof(aborts) === 'object') {
@@ -27,7 +27,7 @@ var getConsideredEntryTypes = function getConsideredEntryTypes() {
27
27
  // TODO: AFO-3523
28
28
  // Those are the attributes we have found when testing the 'fy25.03' manually.
29
29
  // We still need to replace this hardcoded list with a proper automation
30
- export var KNOWN_ATTRIBUTES_THAT_DOES_NOT_CAUSE_LAYOUT_SHIFTS = ['data-drop-target-for-element', 'draggable'];
30
+ export var KNOWN_ATTRIBUTES_THAT_DOES_NOT_CAUSE_LAYOUT_SHIFTS = ['data-drop-target-for-element', 'data-drop-target-for-external', 'draggable'];
31
31
 
32
32
  // Common aria attributes that don't cause visual layout shifts
33
33
  export var NON_VISUAL_ARIA_ATTRIBUTES = ['aria-label', 'aria-labelledby', 'aria-describedby', 'aria-hidden', 'aria-expanded', 'aria-controls', 'aria-selected', 'aria-checked', 'aria-disabled', 'aria-required', 'aria-current', 'aria-haspopup', 'aria-pressed', 'aria-atomic', 'aria-live'];
@@ -1,6 +1,6 @@
1
- import { createPayloads } from '../create-payload';
1
+ import { type createPayloads } from '../create-payload';
2
2
  import { type LabelStack } from '../interaction-context';
3
- import { VCObserver } from '../vc/vc-observer';
3
+ import { type VCObserver } from '../vc/vc-observer';
4
4
  import type { AbortReasonType, ApdexType, HoldActive, InteractionError, InteractionType, SegmentInfo } from './common/types';
5
5
  import type { RevisionPayload } from './vc/types';
6
6
  type ExtractPromise<T> = T extends Promise<infer U> ? U : never;
@@ -1,6 +1,6 @@
1
1
  import type { LabelStack, SegmentLabel } from '../../../interaction-context';
2
- import { UFOSegmentType } from '../../../segment/segment';
3
- import { getReactUFOPayloadVersion } from '../../utils/get-react-ufo-payload-version';
2
+ import { type UFOSegmentType } from '../../../segment/segment';
3
+ import { type getReactUFOPayloadVersion } from '../../utils/get-react-ufo-payload-version';
4
4
  export type SegmentItem = {
5
5
  n: string;
6
6
  c?: Record<string, SegmentItem>;
@@ -1,6 +1,6 @@
1
1
  import type { InteractionMetrics } from '../../common';
2
2
  import type { VCResult } from '../../common/vc/types';
3
- import { CriticalMetricsPayload } from './types';
3
+ import { type CriticalMetricsPayload } from './types';
4
4
  export declare function createCriticalMetricsPayloads(interactionId: string, interaction: InteractionMetrics, vcMetrics?: VCResult & {
5
5
  'metric:vc90'?: number | null;
6
6
  }): Promise<CriticalMetricsPayload[]>;
@@ -1,3 +1,3 @@
1
- import { InteractionMetrics } from '../../../common';
2
- import { CriticalMetricsPayload } from '../types';
1
+ import { type InteractionMetrics } from '../../../common';
2
+ import { type CriticalMetricsPayload } from '../types';
3
3
  export declare function createSegmentMetricsPayloads(interactionId: string, interaction: InteractionMetrics): Promise<CriticalMetricsPayload[]>;
@@ -1,5 +1,5 @@
1
1
  import type { InteractionType } from '../../common';
2
- import { NavigationMetrics } from '../utils/get-navigation-metrics';
2
+ import { type NavigationMetrics } from '../utils/get-navigation-metrics';
3
3
  export interface CriticalMetricsPayloadProperties {
4
4
  'event:hostname': string;
5
5
  'event:product': string;
@@ -1,6 +1,6 @@
1
1
  import { type Context } from 'react';
2
2
  import { type InteractionContextType } from '@atlaskit/interaction-context';
3
- import { UFOSegmentType } from '../segment/segment';
3
+ import { type UFOSegmentType } from '../segment/segment';
4
4
  export type CustomData = {
5
5
  [key: string]: null | string | number | boolean | undefined | CustomData;
6
6
  };
@@ -1,6 +1,6 @@
1
- import { createPayloads } from '../create-payload';
1
+ import { type createPayloads } from '../create-payload';
2
2
  import { type LabelStack } from '../interaction-context';
3
- import { VCObserver } from '../vc/vc-observer';
3
+ import { type VCObserver } from '../vc/vc-observer';
4
4
  import type { AbortReasonType, ApdexType, HoldActive, InteractionError, InteractionType, SegmentInfo } from './common/types';
5
5
  import type { RevisionPayload } from './vc/types';
6
6
  type ExtractPromise<T> = T extends Promise<infer U> ? U : never;
@@ -1,6 +1,6 @@
1
1
  import type { LabelStack, SegmentLabel } from '../../../interaction-context';
2
- import { UFOSegmentType } from '../../../segment/segment';
3
- import { getReactUFOPayloadVersion } from '../../utils/get-react-ufo-payload-version';
2
+ import { type UFOSegmentType } from '../../../segment/segment';
3
+ import { type getReactUFOPayloadVersion } from '../../utils/get-react-ufo-payload-version';
4
4
  export type SegmentItem = {
5
5
  n: string;
6
6
  c?: Record<string, SegmentItem>;
@@ -1,6 +1,6 @@
1
1
  import type { InteractionMetrics } from '../../common';
2
2
  import type { VCResult } from '../../common/vc/types';
3
- import { CriticalMetricsPayload } from './types';
3
+ import { type CriticalMetricsPayload } from './types';
4
4
  export declare function createCriticalMetricsPayloads(interactionId: string, interaction: InteractionMetrics, vcMetrics?: VCResult & {
5
5
  'metric:vc90'?: number | null;
6
6
  }): Promise<CriticalMetricsPayload[]>;
@@ -1,3 +1,3 @@
1
- import { InteractionMetrics } from '../../../common';
2
- import { CriticalMetricsPayload } from '../types';
1
+ import { type InteractionMetrics } from '../../../common';
2
+ import { type CriticalMetricsPayload } from '../types';
3
3
  export declare function createSegmentMetricsPayloads(interactionId: string, interaction: InteractionMetrics): Promise<CriticalMetricsPayload[]>;
@@ -1,5 +1,5 @@
1
1
  import type { InteractionType } from '../../common';
2
- import { NavigationMetrics } from '../utils/get-navigation-metrics';
2
+ import { type NavigationMetrics } from '../utils/get-navigation-metrics';
3
3
  export interface CriticalMetricsPayloadProperties {
4
4
  'event:hostname': string;
5
5
  'event:product': string;
@@ -1,6 +1,6 @@
1
1
  import { type Context } from 'react';
2
2
  import { type InteractionContextType } from '@atlaskit/interaction-context';
3
- import { UFOSegmentType } from '../segment/segment';
3
+ import { type UFOSegmentType } from '../segment/segment';
4
4
  export type CustomData = {
5
5
  [key: string]: null | string | number | boolean | undefined | CustomData;
6
6
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/react-ufo",
3
- "version": "3.14.10",
3
+ "version": "3.14.12",
4
4
  "description": "Parts of React UFO that are publicly available",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -160,9 +160,6 @@
160
160
  "platform_ufo_enable_events_observer": {
161
161
  "type": "boolean"
162
162
  },
163
- "platform_ufo_vc_observer_new_ssr_abort_listener": {
164
- "type": "boolean"
165
- },
166
163
  "platform_ufo_rev_ratios": {
167
164
  "type": "boolean"
168
165
  },