@atlaskit/editor-common 109.8.1 → 109.10.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 (39) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/cjs/analytics/types/ai-streaming.js +5 -0
  3. package/dist/cjs/analytics/types/enums.js +2 -0
  4. package/dist/cjs/icons/index.js +12 -0
  5. package/dist/cjs/icons/shared/SteppedRainbowIconDecoration.js +3 -3
  6. package/dist/cjs/monitoring/error.js +1 -1
  7. package/dist/cjs/ui/DropList/index.js +1 -1
  8. package/dist/cjs/utils/browser.js +121 -3
  9. package/dist/es2019/analytics/types/ai-streaming.js +1 -0
  10. package/dist/es2019/analytics/types/enums.js +2 -0
  11. package/dist/es2019/icons/index.js +1 -1
  12. package/dist/es2019/icons/shared/SteppedRainbowIconDecoration.js +2 -2
  13. package/dist/es2019/monitoring/error.js +1 -1
  14. package/dist/es2019/ui/DropList/index.js +1 -1
  15. package/dist/es2019/utils/browser.js +119 -2
  16. package/dist/esm/analytics/types/ai-streaming.js +1 -0
  17. package/dist/esm/analytics/types/enums.js +2 -0
  18. package/dist/esm/icons/index.js +1 -1
  19. package/dist/esm/icons/shared/SteppedRainbowIconDecoration.js +2 -2
  20. package/dist/esm/monitoring/error.js +1 -1
  21. package/dist/esm/ui/DropList/index.js +1 -1
  22. package/dist/esm/utils/browser.js +119 -2
  23. package/dist/types/analytics/types/ai-streaming.d.ts +8 -0
  24. package/dist/types/analytics/types/enums.d.ts +2 -0
  25. package/dist/types/analytics/types/events.d.ts +2 -1
  26. package/dist/types/icons/index.d.ts +1 -1
  27. package/dist/types/icons/shared/SteppedRainbowIconDecoration.d.ts +2 -0
  28. package/dist/types/types/editor-appearance.d.ts +1 -0
  29. package/dist/types/types/index.d.ts +1 -1
  30. package/dist/types/utils/browser.d.ts +9 -0
  31. package/dist/types-ts4.5/analytics/types/ai-streaming.d.ts +8 -0
  32. package/dist/types-ts4.5/analytics/types/enums.d.ts +2 -0
  33. package/dist/types-ts4.5/analytics/types/events.d.ts +2 -1
  34. package/dist/types-ts4.5/icons/index.d.ts +1 -1
  35. package/dist/types-ts4.5/icons/shared/SteppedRainbowIconDecoration.d.ts +2 -0
  36. package/dist/types-ts4.5/types/editor-appearance.d.ts +1 -0
  37. package/dist/types-ts4.5/types/index.d.ts +1 -1
  38. package/dist/types-ts4.5/utils/browser.d.ts +9 -0
  39. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 109.10.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`40428300fa158`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/40428300fa158) -
8
+ Add analytics for streaming
9
+ - [`cb7778d7ca5bb`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/cb7778d7ca5bb) -
10
+ introduce getBrowserInfo api from browser util, used in getUAPrefix
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies
15
+
16
+ ## 109.9.0
17
+
18
+ ### Minor Changes
19
+
20
+ - [`3463fb9dbb744`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3463fb9dbb744) -
21
+ [ux] Add experiment for new compact mode
22
+
23
+ ### Patch Changes
24
+
25
+ - Updated dependencies
26
+
3
27
  ## 109.8.1
4
28
 
5
29
  ### Patch Changes
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -188,6 +188,7 @@ var ACTION = exports.ACTION = /*#__PURE__*/function (ACTION) {
188
188
  ACTION["BLOCKS_DRAG_INIT"] = "blocksDragInit";
189
189
  ACTION["SINGLE_COL_LAYOUT_DETECTED"] = "singleColumLayoutDetected";
190
190
  ACTION["VIEW_MORE"] = "viewMore";
191
+ ACTION["LOCAL_ID_NOT_FOUND"] = "localIdNotFound";
191
192
  /**
192
193
  * used in Editor AI inline suggestion for a track event when a suggestion is inserted
193
194
  * previously tracked events being used by Editor AI proactive suggestion
@@ -258,6 +259,7 @@ var ACTION_SUBJECT = exports.ACTION_SUBJECT = /*#__PURE__*/function (ACTION_SUBJ
258
259
  ACTION_SUBJECT["AI_INTERACTION"] = "aiInteraction";
259
260
  ACTION_SUBJECT["AI_RESULT"] = "aiResult";
260
261
  ACTION_SUBJECT["AI_FEEDBACK"] = "aiFeedback";
262
+ ACTION_SUBJECT["AI_STREAMING"] = "aiStreaming";
261
263
  ACTION_SUBJECT["COLLAB"] = "collab";
262
264
  ACTION_SUBJECT["TOOLBAR_BUTTON"] = "toolbarButton";
263
265
  ACTION_SUBJECT["BUTTON"] = "button";
@@ -53,6 +53,18 @@ Object.defineProperty(exports, "SteppedRainbowIconDecoration", {
53
53
  return _SteppedRainbowIconDecoration.SteppedRainbowIconDecoration;
54
54
  }
55
55
  });
56
+ Object.defineProperty(exports, "disabledRainbow", {
57
+ enumerable: true,
58
+ get: function get() {
59
+ return _SteppedRainbowIconDecoration.disabledRainbow;
60
+ }
61
+ });
62
+ Object.defineProperty(exports, "rainbow", {
63
+ enumerable: true,
64
+ get: function get() {
65
+ return _SteppedRainbowIconDecoration.rainbow;
66
+ }
67
+ });
56
68
  var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
57
69
  var _reactLoadable = _interopRequireDefault(require("react-loadable"));
58
70
  var _PanelInfoIcon = require("./shared/PanelInfoIcon");
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.SteppedRainbowIconDecoration = void 0;
6
+ exports.rainbow = exports.disabledRainbow = exports.SteppedRainbowIconDecoration = void 0;
7
7
  var _react = require("@emotion/react");
8
8
  /**
9
9
  * @jsxRuntime classic
@@ -24,8 +24,8 @@ var createSteppedRainbow = function createSteppedRainbow(colors) {
24
24
  return "\n ".concat(color, " ").concat((pos - 1) * inc, "%,\n ").concat(color, " ").concat(pos * inc, "%,\n ");
25
25
  }).join('\n'), "\n )");
26
26
  };
27
- var rainbow = createSteppedRainbow(["var(--ds-background-accent-purple-bolder, #6E5DC6)", "var(--ds-background-accent-teal-subtle, #6CC3E0)", "var(--ds-background-accent-orange-subtle, #FEA362)", "var(--ds-background-accent-red-bolder, #C9372C)"]);
28
- var disabledRainbow = createSteppedRainbow(["var(--ds-background-accent-gray-subtle, #8590A2)", "var(--ds-background-accent-gray-subtle-hovered, #B3B9C4)", "var(--ds-background-accent-gray-subtle-pressed, #DCDFE4)", "var(--ds-background-accent-gray-subtle-hovered, #B3B9C4)"]);
27
+ var rainbow = exports.rainbow = createSteppedRainbow(["var(--ds-background-accent-purple-bolder, #6E5DC6)", "var(--ds-background-accent-teal-subtle, #6CC3E0)", "var(--ds-background-accent-orange-subtle, #FEA362)", "var(--ds-background-accent-red-bolder, #C9372C)"]);
28
+ var disabledRainbow = exports.disabledRainbow = createSteppedRainbow(["var(--ds-background-accent-gray-subtle, #8590A2)", "var(--ds-background-accent-gray-subtle-hovered, #B3B9C4)", "var(--ds-background-accent-gray-subtle-pressed, #DCDFE4)", "var(--ds-background-accent-gray-subtle-hovered, #B3B9C4)"]);
29
29
  var barStyles = (0, _react.css)({
30
30
  position: 'absolute',
31
31
  left: 0,
@@ -16,7 +16,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
16
16
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
17
17
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
18
18
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
19
- var packageVersion = "109.8.0";
19
+ var packageVersion = "109.9.0";
20
20
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
21
21
  // Remove URL as it has UGC
22
22
  // Ignored via go/ees007
@@ -24,7 +24,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
24
24
  * @jsx jsx
25
25
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
26
26
  var packageName = "@atlaskit/editor-common";
27
- var packageVersion = "109.8.0";
27
+ var packageVersion = "109.9.0";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -1,10 +1,18 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
- exports.browser = void 0;
7
- // Ignored via go/ees005
7
+ exports.getBrowserInfo = exports.browser = void 0;
8
+ var _memoizeOne = _interopRequireDefault(require("memoize-one"));
9
+ // eslint-disable-next-line @repo/internal/deprecations/deprecation-ticket-required
10
+ /**
11
+ * @deprecated
12
+ * This file is deprecated and will be removed in the next major release.
13
+ * Please use `getBrowserInfo` function to get the browser info on demand.
14
+ * Static `browser` info is no longer supported.
15
+ */
8
16
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
9
17
  var result = exports.browser = {
10
18
  mac: false,
@@ -83,4 +91,114 @@ if (typeof navigator !== 'undefined') {
83
91
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
84
92
  'intersectionRatio' in window.IntersectionObserverEntry.prototype;
85
93
  result.supportsResizeObserver = typeof window !== 'undefined' && 'ResizeObserver' in window && 'ResizeObserverEntry' in window;
86
- }
94
+ }
95
+
96
+ // eslint-disable-next-line @repo/internal/deprecations/deprecation-ticket-required
97
+
98
+ var getFirstMatch = function getFirstMatch(regexp, ua) {
99
+ var match = ua.match(regexp);
100
+ return match && match.length > 0 && match[1] || '';
101
+ };
102
+ var getSecondMatch = function getSecondMatch(regexp, ua) {
103
+ var match = ua.match(regexp);
104
+ return match && match.length > 0 && match[2] || '';
105
+ };
106
+
107
+ // New API to get the browser info on demand
108
+ var getBrowserInfo = exports.getBrowserInfo = (0, _memoizeOne.default)(function () {
109
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
110
+ var result = {
111
+ mac: false,
112
+ windows: false,
113
+ ie: false,
114
+ ie_version: 0,
115
+ gecko: false,
116
+ gecko_version: 0,
117
+ chrome: false,
118
+ chrome_version: 0,
119
+ android: false,
120
+ ios: false,
121
+ webkit: false,
122
+ safari: false,
123
+ safari_version: 0,
124
+ supportsIntersectionObserver: false,
125
+ supportsResizeObserver: false
126
+ };
127
+ var userAgent = process.env.REACT_SSR ?
128
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
129
+ window.__SSR_USER_AGENT__ : navigator.userAgent;
130
+ if (userAgent) {
131
+ // inspired from https://github.com/bowser-js/bowser/blob/master/src/parser-browsers.js
132
+ // Ignored via go/ees005
133
+ // eslint-disable-next-line require-unicode-regexp
134
+ var _ieEdge = /\sedg\//i.test(userAgent);
135
+ // eslint-disable-next-line require-unicode-regexp
136
+ var ieEdge2 = /edg([ea]|ios)/i.test(userAgent);
137
+ // eslint-disable-next-line require-unicode-regexp
138
+ var internetExplorer = /msie|trident/i.test(userAgent);
139
+
140
+ // Ignored via go/ees005
141
+ // eslint-disable-next-line require-unicode-regexp
142
+ result.mac = /macintosh/i.test(userAgent);
143
+
144
+ // Previously relied on navigator.userAgentData?.platform and userAgent, now used only userAgent
145
+ result.windows =
146
+ // Ignored via go/ees005
147
+ // eslint-disable-next-line require-unicode-regexp
148
+ /Windows|Win\d+/i.test(userAgent);
149
+
150
+ // used userAgent rather than relying on documentMode
151
+ var _ie = _ieEdge || ieEdge2 || internetExplorer;
152
+ result.ie = _ie;
153
+ // inspired from https://github.com/bowser-js/bowser/blob/master/src/parser-browsers.js
154
+ result.ie_version = _ieEdge ?
155
+ // eslint-disable-next-line require-unicode-regexp
156
+ parseInt(getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i, userAgent), 10) :
157
+ // eslint-disable-next-line require-unicode-regexp
158
+ ieEdge2 ?
159
+ // eslint-disable-next-line require-unicode-regexp
160
+ parseInt(getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i, userAgent), 10) :
161
+ // eslint-disable-next-line require-unicode-regexp
162
+ parseInt(getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i, userAgent), 10);
163
+
164
+ // Ignored via go/ees005
165
+ // eslint-disable-next-line require-unicode-regexp
166
+ result.gecko = !_ie && /gecko\/\d/i.test(userAgent);
167
+ // Ignored via go/ees005
168
+ // eslint-disable-next-line require-unicode-regexp
169
+ result.gecko_version = parseInt((userAgent.match(/Firefox\/(\d+)/) || [])[1], 10);
170
+
171
+ // Ignored via go/ees005
172
+ // eslint-disable-next-line require-unicode-regexp
173
+ result.chrome = !_ie && /Chrome\//.test(userAgent);
174
+ // Ignored via go/ees005
175
+ // eslint-disable-next-line require-unicode-regexp
176
+ result.chrome_version = parseInt((userAgent.match(/Chrome\/(\d+)/) || [])[1], 10);
177
+ // Ignored via go/ees005
178
+ // eslint-disable-next-line require-unicode-regexp
179
+ result.android = /Android \d/.test(userAgent);
180
+ result.ios =
181
+ // Ignored via go/ees005
182
+ // eslint-disable-next-line require-unicode-regexp
183
+ !_ie && /AppleWebKit/.test(userAgent) && /Mobile\/\w+/.test(userAgent);
184
+
185
+ // Previously relied on navigator.vendor, now used userAgent
186
+ // Ignored via go/ees005
187
+ // eslint-disable-next-line require-unicode-regexp
188
+ result.safari = /safari|applewebkit/i.test(userAgent);
189
+ result.safari_version = parseInt(
190
+ // Ignored via go/ees005
191
+ // eslint-disable-next-line require-unicode-regexp
192
+ (userAgent.match(/Version\/([0-9\._]+).*Safari/) || [])[1], 10);
193
+
194
+ // Previously we relied on documentElement.style.WebkitAppearance, now changed to userAgent
195
+ // eslint-disable-next-line require-unicode-regexp
196
+ result.webkit = /(apple)?webkit/i.test(userAgent);
197
+ result.supportsIntersectionObserver = typeof window !== 'undefined' && 'IntersectionObserver' in window && 'IntersectionObserverEntry' in window &&
198
+ // Ignored via go/ees005
199
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
200
+ 'intersectionRatio' in window.IntersectionObserverEntry.prototype;
201
+ result.supportsResizeObserver = typeof window !== 'undefined' && 'ResizeObserver' in window && 'ResizeObserverEntry' in window;
202
+ }
203
+ return result;
204
+ });
@@ -0,0 +1 @@
1
+ export {};
@@ -182,6 +182,7 @@ export let ACTION = /*#__PURE__*/function (ACTION) {
182
182
  ACTION["BLOCKS_DRAG_INIT"] = "blocksDragInit";
183
183
  ACTION["SINGLE_COL_LAYOUT_DETECTED"] = "singleColumLayoutDetected";
184
184
  ACTION["VIEW_MORE"] = "viewMore";
185
+ ACTION["LOCAL_ID_NOT_FOUND"] = "localIdNotFound";
185
186
  /**
186
187
  * used in Editor AI inline suggestion for a track event when a suggestion is inserted
187
188
  * previously tracked events being used by Editor AI proactive suggestion
@@ -252,6 +253,7 @@ export let ACTION_SUBJECT = /*#__PURE__*/function (ACTION_SUBJECT) {
252
253
  ACTION_SUBJECT["AI_INTERACTION"] = "aiInteraction";
253
254
  ACTION_SUBJECT["AI_RESULT"] = "aiResult";
254
255
  ACTION_SUBJECT["AI_FEEDBACK"] = "aiFeedback";
256
+ ACTION_SUBJECT["AI_STREAMING"] = "aiStreaming";
255
257
  ACTION_SUBJECT["COLLAB"] = "collab";
256
258
  ACTION_SUBJECT["TOOLBAR_BUTTON"] = "toolbarButton";
257
259
  ACTION_SUBJECT["BUTTON"] = "button";
@@ -8,7 +8,7 @@ export { PanelErrorIcon } from './shared/PanelErrorIcon';
8
8
  export { PanelSuccessIcon } from './shared/PanelSuccessIcon';
9
9
  export { PanelNoteIcon } from './shared/PanelNoteIcon';
10
10
  export { BorderIcon } from './shared/BorderIcon';
11
- export { SteppedRainbowIconDecoration } from './shared/SteppedRainbowIconDecoration';
11
+ export { SteppedRainbowIconDecoration, rainbow, disabledRainbow } from './shared/SteppedRainbowIconDecoration';
12
12
  export { DynamicStrokeIconDecoration } from './shared/DynamicStrokeIconDecoration';
13
13
  export const IconTable = Loadable({
14
14
  loader: () => import( /* webpackChunkName: "@atlaskit-internal_editor-icon-table" */'../icons/shared/table').then(module => module.default),
@@ -24,8 +24,8 @@ const createSteppedRainbow = colors => {
24
24
  }).join('\n')}
25
25
  )`;
26
26
  };
27
- const rainbow = createSteppedRainbow(["var(--ds-background-accent-purple-bolder, #6E5DC6)", "var(--ds-background-accent-teal-subtle, #6CC3E0)", "var(--ds-background-accent-orange-subtle, #FEA362)", "var(--ds-background-accent-red-bolder, #C9372C)"]);
28
- const disabledRainbow = createSteppedRainbow(["var(--ds-background-accent-gray-subtle, #8590A2)", "var(--ds-background-accent-gray-subtle-hovered, #B3B9C4)", "var(--ds-background-accent-gray-subtle-pressed, #DCDFE4)", "var(--ds-background-accent-gray-subtle-hovered, #B3B9C4)"]);
27
+ export const rainbow = createSteppedRainbow(["var(--ds-background-accent-purple-bolder, #6E5DC6)", "var(--ds-background-accent-teal-subtle, #6CC3E0)", "var(--ds-background-accent-orange-subtle, #FEA362)", "var(--ds-background-accent-red-bolder, #C9372C)"]);
28
+ export const disabledRainbow = createSteppedRainbow(["var(--ds-background-accent-gray-subtle, #8590A2)", "var(--ds-background-accent-gray-subtle-hovered, #B3B9C4)", "var(--ds-background-accent-gray-subtle-pressed, #DCDFE4)", "var(--ds-background-accent-gray-subtle-hovered, #B3B9C4)"]);
29
29
  const barStyles = css({
30
30
  position: 'absolute',
31
31
  left: 0,
@@ -1,7 +1,7 @@
1
1
  import { isFedRamp } from './environment';
2
2
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
3
3
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
4
- const packageVersion = "109.8.0";
4
+ const packageVersion = "109.9.0";
5
5
  const sanitiseSentryEvents = (data, _hint) => {
6
6
  // Remove URL as it has UGC
7
7
  // Ignored via go/ees007
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import { fg } from '@atlaskit/platform-feature-flags';
15
15
  import Layer from '../Layer';
16
16
  const packageName = "@atlaskit/editor-common";
17
- const packageVersion = "109.8.0";
17
+ const packageVersion = "109.9.0";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -1,4 +1,12 @@
1
- // Ignored via go/ees005
1
+ import memorizeOne from 'memoize-one';
2
+
3
+ // eslint-disable-next-line @repo/internal/deprecations/deprecation-ticket-required
4
+ /**
5
+ * @deprecated
6
+ * This file is deprecated and will be removed in the next major release.
7
+ * Please use `getBrowserInfo` function to get the browser info on demand.
8
+ * Static `browser` info is no longer supported.
9
+ */
2
10
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
3
11
  const result = {
4
12
  mac: false,
@@ -78,4 +86,113 @@ if (typeof navigator !== 'undefined') {
78
86
  'intersectionRatio' in window.IntersectionObserverEntry.prototype;
79
87
  result.supportsResizeObserver = typeof window !== 'undefined' && 'ResizeObserver' in window && 'ResizeObserverEntry' in window;
80
88
  }
81
- export { result as browser };
89
+
90
+ // eslint-disable-next-line @repo/internal/deprecations/deprecation-ticket-required
91
+ export { result as browser };
92
+ const getFirstMatch = (regexp, ua) => {
93
+ const match = ua.match(regexp);
94
+ return match && match.length > 0 && match[1] || '';
95
+ };
96
+ const getSecondMatch = (regexp, ua) => {
97
+ const match = ua.match(regexp);
98
+ return match && match.length > 0 && match[2] || '';
99
+ };
100
+
101
+ // New API to get the browser info on demand
102
+ export const getBrowserInfo = memorizeOne(() => {
103
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
104
+ const result = {
105
+ mac: false,
106
+ windows: false,
107
+ ie: false,
108
+ ie_version: 0,
109
+ gecko: false,
110
+ gecko_version: 0,
111
+ chrome: false,
112
+ chrome_version: 0,
113
+ android: false,
114
+ ios: false,
115
+ webkit: false,
116
+ safari: false,
117
+ safari_version: 0,
118
+ supportsIntersectionObserver: false,
119
+ supportsResizeObserver: false
120
+ };
121
+ const userAgent = process.env.REACT_SSR ?
122
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
123
+ window.__SSR_USER_AGENT__ : navigator.userAgent;
124
+ if (userAgent) {
125
+ // inspired from https://github.com/bowser-js/bowser/blob/master/src/parser-browsers.js
126
+ // Ignored via go/ees005
127
+ // eslint-disable-next-line require-unicode-regexp
128
+ const ieEdge = /\sedg\//i.test(userAgent);
129
+ // eslint-disable-next-line require-unicode-regexp
130
+ const ieEdge2 = /edg([ea]|ios)/i.test(userAgent);
131
+ // eslint-disable-next-line require-unicode-regexp
132
+ const internetExplorer = /msie|trident/i.test(userAgent);
133
+
134
+ // Ignored via go/ees005
135
+ // eslint-disable-next-line require-unicode-regexp
136
+ result.mac = /macintosh/i.test(userAgent);
137
+
138
+ // Previously relied on navigator.userAgentData?.platform and userAgent, now used only userAgent
139
+ result.windows =
140
+ // Ignored via go/ees005
141
+ // eslint-disable-next-line require-unicode-regexp
142
+ /Windows|Win\d+/i.test(userAgent);
143
+
144
+ // used userAgent rather than relying on documentMode
145
+ const ie = ieEdge || ieEdge2 || internetExplorer;
146
+ result.ie = ie;
147
+ // inspired from https://github.com/bowser-js/bowser/blob/master/src/parser-browsers.js
148
+ result.ie_version = ieEdge ?
149
+ // eslint-disable-next-line require-unicode-regexp
150
+ parseInt(getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i, userAgent), 10) :
151
+ // eslint-disable-next-line require-unicode-regexp
152
+ ieEdge2 ?
153
+ // eslint-disable-next-line require-unicode-regexp
154
+ parseInt(getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i, userAgent), 10) :
155
+ // eslint-disable-next-line require-unicode-regexp
156
+ parseInt(getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i, userAgent), 10);
157
+
158
+ // Ignored via go/ees005
159
+ // eslint-disable-next-line require-unicode-regexp
160
+ result.gecko = !ie && /gecko\/\d/i.test(userAgent);
161
+ // Ignored via go/ees005
162
+ // eslint-disable-next-line require-unicode-regexp
163
+ result.gecko_version = parseInt((userAgent.match(/Firefox\/(\d+)/) || [])[1], 10);
164
+
165
+ // Ignored via go/ees005
166
+ // eslint-disable-next-line require-unicode-regexp
167
+ result.chrome = !ie && /Chrome\//.test(userAgent);
168
+ // Ignored via go/ees005
169
+ // eslint-disable-next-line require-unicode-regexp
170
+ result.chrome_version = parseInt((userAgent.match(/Chrome\/(\d+)/) || [])[1], 10);
171
+ // Ignored via go/ees005
172
+ // eslint-disable-next-line require-unicode-regexp
173
+ result.android = /Android \d/.test(userAgent);
174
+ result.ios =
175
+ // Ignored via go/ees005
176
+ // eslint-disable-next-line require-unicode-regexp
177
+ !ie && /AppleWebKit/.test(userAgent) && /Mobile\/\w+/.test(userAgent);
178
+
179
+ // Previously relied on navigator.vendor, now used userAgent
180
+ // Ignored via go/ees005
181
+ // eslint-disable-next-line require-unicode-regexp
182
+ result.safari = /safari|applewebkit/i.test(userAgent);
183
+ result.safari_version = parseInt(
184
+ // Ignored via go/ees005
185
+ // eslint-disable-next-line require-unicode-regexp
186
+ (userAgent.match(/Version\/([0-9\._]+).*Safari/) || [])[1], 10);
187
+
188
+ // Previously we relied on documentElement.style.WebkitAppearance, now changed to userAgent
189
+ // eslint-disable-next-line require-unicode-regexp
190
+ result.webkit = /(apple)?webkit/i.test(userAgent);
191
+ result.supportsIntersectionObserver = typeof window !== 'undefined' && 'IntersectionObserver' in window && 'IntersectionObserverEntry' in window &&
192
+ // Ignored via go/ees005
193
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
194
+ 'intersectionRatio' in window.IntersectionObserverEntry.prototype;
195
+ result.supportsResizeObserver = typeof window !== 'undefined' && 'ResizeObserver' in window && 'ResizeObserverEntry' in window;
196
+ }
197
+ return result;
198
+ });
@@ -0,0 +1 @@
1
+ export {};
@@ -182,6 +182,7 @@ export var ACTION = /*#__PURE__*/function (ACTION) {
182
182
  ACTION["BLOCKS_DRAG_INIT"] = "blocksDragInit";
183
183
  ACTION["SINGLE_COL_LAYOUT_DETECTED"] = "singleColumLayoutDetected";
184
184
  ACTION["VIEW_MORE"] = "viewMore";
185
+ ACTION["LOCAL_ID_NOT_FOUND"] = "localIdNotFound";
185
186
  /**
186
187
  * used in Editor AI inline suggestion for a track event when a suggestion is inserted
187
188
  * previously tracked events being used by Editor AI proactive suggestion
@@ -252,6 +253,7 @@ export var ACTION_SUBJECT = /*#__PURE__*/function (ACTION_SUBJECT) {
252
253
  ACTION_SUBJECT["AI_INTERACTION"] = "aiInteraction";
253
254
  ACTION_SUBJECT["AI_RESULT"] = "aiResult";
254
255
  ACTION_SUBJECT["AI_FEEDBACK"] = "aiFeedback";
256
+ ACTION_SUBJECT["AI_STREAMING"] = "aiStreaming";
255
257
  ACTION_SUBJECT["COLLAB"] = "collab";
256
258
  ACTION_SUBJECT["TOOLBAR_BUTTON"] = "toolbarButton";
257
259
  ACTION_SUBJECT["BUTTON"] = "button";
@@ -8,7 +8,7 @@ export { PanelErrorIcon } from './shared/PanelErrorIcon';
8
8
  export { PanelSuccessIcon } from './shared/PanelSuccessIcon';
9
9
  export { PanelNoteIcon } from './shared/PanelNoteIcon';
10
10
  export { BorderIcon } from './shared/BorderIcon';
11
- export { SteppedRainbowIconDecoration } from './shared/SteppedRainbowIconDecoration';
11
+ export { SteppedRainbowIconDecoration, rainbow, disabledRainbow } from './shared/SteppedRainbowIconDecoration';
12
12
  export { DynamicStrokeIconDecoration } from './shared/DynamicStrokeIconDecoration';
13
13
  export var IconTable = Loadable({
14
14
  loader: function loader() {
@@ -17,8 +17,8 @@ var createSteppedRainbow = function createSteppedRainbow(colors) {
17
17
  return "\n ".concat(color, " ").concat((pos - 1) * inc, "%,\n ").concat(color, " ").concat(pos * inc, "%,\n ");
18
18
  }).join('\n'), "\n )");
19
19
  };
20
- var rainbow = createSteppedRainbow(["var(--ds-background-accent-purple-bolder, #6E5DC6)", "var(--ds-background-accent-teal-subtle, #6CC3E0)", "var(--ds-background-accent-orange-subtle, #FEA362)", "var(--ds-background-accent-red-bolder, #C9372C)"]);
21
- var disabledRainbow = createSteppedRainbow(["var(--ds-background-accent-gray-subtle, #8590A2)", "var(--ds-background-accent-gray-subtle-hovered, #B3B9C4)", "var(--ds-background-accent-gray-subtle-pressed, #DCDFE4)", "var(--ds-background-accent-gray-subtle-hovered, #B3B9C4)"]);
20
+ export var rainbow = createSteppedRainbow(["var(--ds-background-accent-purple-bolder, #6E5DC6)", "var(--ds-background-accent-teal-subtle, #6CC3E0)", "var(--ds-background-accent-orange-subtle, #FEA362)", "var(--ds-background-accent-red-bolder, #C9372C)"]);
21
+ export var disabledRainbow = createSteppedRainbow(["var(--ds-background-accent-gray-subtle, #8590A2)", "var(--ds-background-accent-gray-subtle-hovered, #B3B9C4)", "var(--ds-background-accent-gray-subtle-pressed, #DCDFE4)", "var(--ds-background-accent-gray-subtle-hovered, #B3B9C4)"]);
22
22
  var barStyles = css({
23
23
  position: 'absolute',
24
24
  left: 0,
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
7
7
  import { isFedRamp } from './environment';
8
8
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
9
9
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
10
- var packageVersion = "109.8.0";
10
+ var packageVersion = "109.9.0";
11
11
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
12
12
  // Remove URL as it has UGC
13
13
  // Ignored via go/ees007
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
21
21
  import { fg } from '@atlaskit/platform-feature-flags';
22
22
  import Layer from '../Layer';
23
23
  var packageName = "@atlaskit/editor-common";
24
- var packageVersion = "109.8.0";
24
+ var packageVersion = "109.9.0";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
@@ -1,4 +1,12 @@
1
- // Ignored via go/ees005
1
+ import memorizeOne from 'memoize-one';
2
+
3
+ // eslint-disable-next-line @repo/internal/deprecations/deprecation-ticket-required
4
+ /**
5
+ * @deprecated
6
+ * This file is deprecated and will be removed in the next major release.
7
+ * Please use `getBrowserInfo` function to get the browser info on demand.
8
+ * Static `browser` info is no longer supported.
9
+ */
2
10
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
3
11
  var result = {
4
12
  mac: false,
@@ -78,4 +86,113 @@ if (typeof navigator !== 'undefined') {
78
86
  'intersectionRatio' in window.IntersectionObserverEntry.prototype;
79
87
  result.supportsResizeObserver = typeof window !== 'undefined' && 'ResizeObserver' in window && 'ResizeObserverEntry' in window;
80
88
  }
81
- export { result as browser };
89
+
90
+ // eslint-disable-next-line @repo/internal/deprecations/deprecation-ticket-required
91
+ export { result as browser };
92
+ var getFirstMatch = function getFirstMatch(regexp, ua) {
93
+ var match = ua.match(regexp);
94
+ return match && match.length > 0 && match[1] || '';
95
+ };
96
+ var getSecondMatch = function getSecondMatch(regexp, ua) {
97
+ var match = ua.match(regexp);
98
+ return match && match.length > 0 && match[2] || '';
99
+ };
100
+
101
+ // New API to get the browser info on demand
102
+ export var getBrowserInfo = memorizeOne(function () {
103
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
104
+ var result = {
105
+ mac: false,
106
+ windows: false,
107
+ ie: false,
108
+ ie_version: 0,
109
+ gecko: false,
110
+ gecko_version: 0,
111
+ chrome: false,
112
+ chrome_version: 0,
113
+ android: false,
114
+ ios: false,
115
+ webkit: false,
116
+ safari: false,
117
+ safari_version: 0,
118
+ supportsIntersectionObserver: false,
119
+ supportsResizeObserver: false
120
+ };
121
+ var userAgent = process.env.REACT_SSR ?
122
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
123
+ window.__SSR_USER_AGENT__ : navigator.userAgent;
124
+ if (userAgent) {
125
+ // inspired from https://github.com/bowser-js/bowser/blob/master/src/parser-browsers.js
126
+ // Ignored via go/ees005
127
+ // eslint-disable-next-line require-unicode-regexp
128
+ var _ieEdge = /\sedg\//i.test(userAgent);
129
+ // eslint-disable-next-line require-unicode-regexp
130
+ var ieEdge2 = /edg([ea]|ios)/i.test(userAgent);
131
+ // eslint-disable-next-line require-unicode-regexp
132
+ var internetExplorer = /msie|trident/i.test(userAgent);
133
+
134
+ // Ignored via go/ees005
135
+ // eslint-disable-next-line require-unicode-regexp
136
+ result.mac = /macintosh/i.test(userAgent);
137
+
138
+ // Previously relied on navigator.userAgentData?.platform and userAgent, now used only userAgent
139
+ result.windows =
140
+ // Ignored via go/ees005
141
+ // eslint-disable-next-line require-unicode-regexp
142
+ /Windows|Win\d+/i.test(userAgent);
143
+
144
+ // used userAgent rather than relying on documentMode
145
+ var _ie = _ieEdge || ieEdge2 || internetExplorer;
146
+ result.ie = _ie;
147
+ // inspired from https://github.com/bowser-js/bowser/blob/master/src/parser-browsers.js
148
+ result.ie_version = _ieEdge ?
149
+ // eslint-disable-next-line require-unicode-regexp
150
+ parseInt(getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i, userAgent), 10) :
151
+ // eslint-disable-next-line require-unicode-regexp
152
+ ieEdge2 ?
153
+ // eslint-disable-next-line require-unicode-regexp
154
+ parseInt(getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i, userAgent), 10) :
155
+ // eslint-disable-next-line require-unicode-regexp
156
+ parseInt(getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i, userAgent), 10);
157
+
158
+ // Ignored via go/ees005
159
+ // eslint-disable-next-line require-unicode-regexp
160
+ result.gecko = !_ie && /gecko\/\d/i.test(userAgent);
161
+ // Ignored via go/ees005
162
+ // eslint-disable-next-line require-unicode-regexp
163
+ result.gecko_version = parseInt((userAgent.match(/Firefox\/(\d+)/) || [])[1], 10);
164
+
165
+ // Ignored via go/ees005
166
+ // eslint-disable-next-line require-unicode-regexp
167
+ result.chrome = !_ie && /Chrome\//.test(userAgent);
168
+ // Ignored via go/ees005
169
+ // eslint-disable-next-line require-unicode-regexp
170
+ result.chrome_version = parseInt((userAgent.match(/Chrome\/(\d+)/) || [])[1], 10);
171
+ // Ignored via go/ees005
172
+ // eslint-disable-next-line require-unicode-regexp
173
+ result.android = /Android \d/.test(userAgent);
174
+ result.ios =
175
+ // Ignored via go/ees005
176
+ // eslint-disable-next-line require-unicode-regexp
177
+ !_ie && /AppleWebKit/.test(userAgent) && /Mobile\/\w+/.test(userAgent);
178
+
179
+ // Previously relied on navigator.vendor, now used userAgent
180
+ // Ignored via go/ees005
181
+ // eslint-disable-next-line require-unicode-regexp
182
+ result.safari = /safari|applewebkit/i.test(userAgent);
183
+ result.safari_version = parseInt(
184
+ // Ignored via go/ees005
185
+ // eslint-disable-next-line require-unicode-regexp
186
+ (userAgent.match(/Version\/([0-9\._]+).*Safari/) || [])[1], 10);
187
+
188
+ // Previously we relied on documentElement.style.WebkitAppearance, now changed to userAgent
189
+ // eslint-disable-next-line require-unicode-regexp
190
+ result.webkit = /(apple)?webkit/i.test(userAgent);
191
+ result.supportsIntersectionObserver = typeof window !== 'undefined' && 'IntersectionObserver' in window && 'IntersectionObserverEntry' in window &&
192
+ // Ignored via go/ees005
193
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
194
+ 'intersectionRatio' in window.IntersectionObserverEntry.prototype;
195
+ result.supportsResizeObserver = typeof window !== 'undefined' && 'ResizeObserver' in window && 'ResizeObserverEntry' in window;
196
+ }
197
+ return result;
198
+ });
@@ -0,0 +1,8 @@
1
+ import { type ACTION, type ACTION_SUBJECT, type ACTION_SUBJECT_ID } from './enums';
2
+ import type { OperationalAEP } from './utils';
3
+ type AILocalIdNotFoundErrorAEP = OperationalAEP<ACTION.LOCAL_ID_NOT_FOUND, ACTION_SUBJECT.AI_STREAMING, ACTION_SUBJECT_ID.EXPERIENCE_APPLICATION, {
4
+ docSize: number | undefined;
5
+ localId: string;
6
+ }>;
7
+ export type AIStreamingEventPayload = AILocalIdNotFoundErrorAEP;
8
+ export {};
@@ -181,6 +181,7 @@ export declare enum ACTION {
181
181
  BLOCKS_DRAG_INIT = "blocksDragInit",
182
182
  SINGLE_COL_LAYOUT_DETECTED = "singleColumLayoutDetected",
183
183
  VIEW_MORE = "viewMore",
184
+ LOCAL_ID_NOT_FOUND = "localIdNotFound",
184
185
  /**
185
186
  * used in Editor AI inline suggestion for a track event when a suggestion is inserted
186
187
  * previously tracked events being used by Editor AI proactive suggestion
@@ -245,6 +246,7 @@ export declare enum ACTION_SUBJECT {
245
246
  AI_INTERACTION = "aiInteraction",
246
247
  AI_RESULT = "aiResult",
247
248
  AI_FEEDBACK = "aiFeedback",
249
+ AI_STREAMING = "aiStreaming",
248
250
  COLLAB = "collab",
249
251
  TOOLBAR_BUTTON = "toolbarButton",
250
252
  BUTTON = "button",
@@ -9,6 +9,7 @@ import type { AIDefinitionsEventPayload } from './ai-definitions-events';
9
9
  import type { AIEventPayload } from './ai-events';
10
10
  import type { AIInlineSuggestionPayload } from './ai-inline-suggestion-events';
11
11
  import type { AIProactiveEventPayload } from './ai-proactive-events';
12
+ import type { AIStreamingEventPayload } from './ai-streaming';
12
13
  import type { AIUnifiedEventPayload } from './ai-unified-events';
13
14
  import type { AlignmentEventPayload } from './alignment-events';
14
15
  import type { AvatarEventPayload } from './avatar';
@@ -62,7 +63,7 @@ export type SimplifiedNode = {
62
63
  pos: number;
63
64
  type: string;
64
65
  };
65
- export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | TextColorEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | OpenSettingsToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload | ReferentialityEventPayload | LoomEventPayload | MBEEventPayload | HighlightEventPayload | DatasourceClickedPayload | ElementEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | MentionEventPayload | EngagementPlatformEventPayload | NestedTableActionsEventPayload | AICommandPaletteEventPayload | AIDefinitionsEventPayload | AIEventPayload | AIProactiveEventPayload | AIUnifiedEventPayload | BreakoutEventPayload | ActiveSessionEventPayload | AIInlineSuggestionPayload | SelectionExtensionEventPayload | TelepointerClickPayload | SelectionToolbarEventPayload | AlignmentEventPayload | UndoRedoAEP | OfflineEditingEventPayload | NcsSessionStepEventAEP | FloatingToolbarOverflowEventPayload | InitialEditorWidthPayload;
66
+ export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | TextColorEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | OpenSettingsToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload | ReferentialityEventPayload | LoomEventPayload | MBEEventPayload | HighlightEventPayload | DatasourceClickedPayload | ElementEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | MentionEventPayload | EngagementPlatformEventPayload | NestedTableActionsEventPayload | AICommandPaletteEventPayload | AIDefinitionsEventPayload | AIEventPayload | AIStreamingEventPayload | AIProactiveEventPayload | AIUnifiedEventPayload | BreakoutEventPayload | ActiveSessionEventPayload | AIInlineSuggestionPayload | SelectionExtensionEventPayload | TelepointerClickPayload | SelectionToolbarEventPayload | AlignmentEventPayload | UndoRedoAEP | OfflineEditingEventPayload | NcsSessionStepEventAEP | FloatingToolbarOverflowEventPayload | InitialEditorWidthPayload;
66
67
  type CustomPanelEventPayload = TrackAEP<ACTION.CHANGED_BACKGROUND_COLOR | ACTION.CHANGED_ICON | ACTION.REMOVE_ICON, ACTION_SUBJECT.PANEL, ACTION_SUBJECT_ID.PANEL, {
67
68
  newColor: string;
68
69
  previousColor: string;
@@ -7,6 +7,6 @@ export { PanelErrorIcon } from './shared/PanelErrorIcon';
7
7
  export { PanelSuccessIcon } from './shared/PanelSuccessIcon';
8
8
  export { PanelNoteIcon } from './shared/PanelNoteIcon';
9
9
  export { BorderIcon } from './shared/BorderIcon';
10
- export { SteppedRainbowIconDecoration } from './shared/SteppedRainbowIconDecoration';
10
+ export { SteppedRainbowIconDecoration, rainbow, disabledRainbow, } from './shared/SteppedRainbowIconDecoration';
11
11
  export { DynamicStrokeIconDecoration } from './shared/DynamicStrokeIconDecoration';
12
12
  export declare const IconTable: React.ComponentType<React.PropsWithChildren<IconProps>> & Loadable.LoadableComponent;
@@ -3,6 +3,8 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  import { jsx } from '@emotion/react';
6
+ export declare const rainbow: string;
7
+ export declare const disabledRainbow: string;
6
8
  type SteppedRainbowIconDecorationProps = {
7
9
  disabled?: boolean;
8
10
  icon: React.ReactNode;
@@ -1 +1,2 @@
1
1
  export type EditorAppearance = 'comment' | 'full-page' | 'full-width' | 'chromeless';
2
+ export type EditorContentMode = 'standard' | 'dense';
@@ -16,7 +16,7 @@ export type { EmptyStateHandler, EmptyStateHandlerParams } from './empty-state-h
16
16
  export type { RenderOptionsPropsT, DropdownOptionT, DropdownOptions, ExtensionDropdownOptions, SelectOption, ButtonAppearance, Icon, RenderOptionsProps, AlignType, ConfirmDialogChildInfo, ConfirmDialogOptions, ConfirmationDialogProps, FloatingToolbarButton, FloatingToolbarCopyButton, FloatingToolbarInput, FloatingToolbarCustom, FloatingToolbarListPicker, FloatingToolbarColorPicker, FloatingToolbarEmojiPicker, FloatingToolbarDatePicker, FloatingToolbarSelect, FloatingToolbarSeparator, FloatingToolbarDropdown, FloatingToolbarFallbackItem, FloatingToolbarItem, FloatingToolbarConfig, FloatingToolbarHandler, FloatingToolbarButtonSpotlightConfig, typeOption, FloatingToolbarOverflowDropdown, FloatingToolbarOverflowDropdownOptions, OverflowDropdownHeading, OverflowDropdownOption, } from './floating-toolbar';
17
17
  export type { MarkOptions, NodeOptions } from './copy-button';
18
18
  export type { ContextPanelHandler } from './context-panel';
19
- export type { EditorAppearance } from './editor-appearance';
19
+ export type { EditorAppearance, EditorContentMode } from './editor-appearance';
20
20
  export type { ToolbarUiComponentFactoryParams, ToolbarUIComponentFactory } from './toolbar';
21
21
  export { ToolbarSize, ToolbarWidths, ToolbarWidthsNext, ToolbarWidthsFullPage, ToolbarWidthsFullPageNext, } from './toolbar';
22
22
  export type { UiComponentFactoryParams, UIComponentFactory, ReactHookFactory, } from './ui-components';
@@ -1,4 +1,13 @@
1
+ /**
2
+ * @deprecated
3
+ * This file is deprecated and will be removed in the next major release.
4
+ * Please use `getBrowserInfo` function to get the browser info on demand.
5
+ * Static `browser` info is no longer supported.
6
+ */
1
7
  declare const result: {
2
8
  [key: string]: any;
3
9
  };
4
10
  export { result as browser };
11
+ export declare const getBrowserInfo: import("memoize-one").MemoizedFn<() => {
12
+ [key: string]: any;
13
+ }>;
@@ -0,0 +1,8 @@
1
+ import { type ACTION, type ACTION_SUBJECT, type ACTION_SUBJECT_ID } from './enums';
2
+ import type { OperationalAEP } from './utils';
3
+ type AILocalIdNotFoundErrorAEP = OperationalAEP<ACTION.LOCAL_ID_NOT_FOUND, ACTION_SUBJECT.AI_STREAMING, ACTION_SUBJECT_ID.EXPERIENCE_APPLICATION, {
4
+ docSize: number | undefined;
5
+ localId: string;
6
+ }>;
7
+ export type AIStreamingEventPayload = AILocalIdNotFoundErrorAEP;
8
+ export {};
@@ -181,6 +181,7 @@ export declare enum ACTION {
181
181
  BLOCKS_DRAG_INIT = "blocksDragInit",
182
182
  SINGLE_COL_LAYOUT_DETECTED = "singleColumLayoutDetected",
183
183
  VIEW_MORE = "viewMore",
184
+ LOCAL_ID_NOT_FOUND = "localIdNotFound",
184
185
  /**
185
186
  * used in Editor AI inline suggestion for a track event when a suggestion is inserted
186
187
  * previously tracked events being used by Editor AI proactive suggestion
@@ -245,6 +246,7 @@ export declare enum ACTION_SUBJECT {
245
246
  AI_INTERACTION = "aiInteraction",
246
247
  AI_RESULT = "aiResult",
247
248
  AI_FEEDBACK = "aiFeedback",
249
+ AI_STREAMING = "aiStreaming",
248
250
  COLLAB = "collab",
249
251
  TOOLBAR_BUTTON = "toolbarButton",
250
252
  BUTTON = "button",
@@ -9,6 +9,7 @@ import type { AIDefinitionsEventPayload } from './ai-definitions-events';
9
9
  import type { AIEventPayload } from './ai-events';
10
10
  import type { AIInlineSuggestionPayload } from './ai-inline-suggestion-events';
11
11
  import type { AIProactiveEventPayload } from './ai-proactive-events';
12
+ import type { AIStreamingEventPayload } from './ai-streaming';
12
13
  import type { AIUnifiedEventPayload } from './ai-unified-events';
13
14
  import type { AlignmentEventPayload } from './alignment-events';
14
15
  import type { AvatarEventPayload } from './avatar';
@@ -62,7 +63,7 @@ export type SimplifiedNode = {
62
63
  pos: number;
63
64
  type: string;
64
65
  };
65
- export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | TextColorEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | OpenSettingsToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload | ReferentialityEventPayload | LoomEventPayload | MBEEventPayload | HighlightEventPayload | DatasourceClickedPayload | ElementEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | MentionEventPayload | EngagementPlatformEventPayload | NestedTableActionsEventPayload | AICommandPaletteEventPayload | AIDefinitionsEventPayload | AIEventPayload | AIProactiveEventPayload | AIUnifiedEventPayload | BreakoutEventPayload | ActiveSessionEventPayload | AIInlineSuggestionPayload | SelectionExtensionEventPayload | TelepointerClickPayload | SelectionToolbarEventPayload | AlignmentEventPayload | UndoRedoAEP | OfflineEditingEventPayload | NcsSessionStepEventAEP | FloatingToolbarOverflowEventPayload | InitialEditorWidthPayload;
66
+ export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | TextColorEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | OpenSettingsToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload | ReferentialityEventPayload | LoomEventPayload | MBEEventPayload | HighlightEventPayload | DatasourceClickedPayload | ElementEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | MentionEventPayload | EngagementPlatformEventPayload | NestedTableActionsEventPayload | AICommandPaletteEventPayload | AIDefinitionsEventPayload | AIEventPayload | AIStreamingEventPayload | AIProactiveEventPayload | AIUnifiedEventPayload | BreakoutEventPayload | ActiveSessionEventPayload | AIInlineSuggestionPayload | SelectionExtensionEventPayload | TelepointerClickPayload | SelectionToolbarEventPayload | AlignmentEventPayload | UndoRedoAEP | OfflineEditingEventPayload | NcsSessionStepEventAEP | FloatingToolbarOverflowEventPayload | InitialEditorWidthPayload;
66
67
  type CustomPanelEventPayload = TrackAEP<ACTION.CHANGED_BACKGROUND_COLOR | ACTION.CHANGED_ICON | ACTION.REMOVE_ICON, ACTION_SUBJECT.PANEL, ACTION_SUBJECT_ID.PANEL, {
67
68
  newColor: string;
68
69
  previousColor: string;
@@ -7,6 +7,6 @@ export { PanelErrorIcon } from './shared/PanelErrorIcon';
7
7
  export { PanelSuccessIcon } from './shared/PanelSuccessIcon';
8
8
  export { PanelNoteIcon } from './shared/PanelNoteIcon';
9
9
  export { BorderIcon } from './shared/BorderIcon';
10
- export { SteppedRainbowIconDecoration } from './shared/SteppedRainbowIconDecoration';
10
+ export { SteppedRainbowIconDecoration, rainbow, disabledRainbow, } from './shared/SteppedRainbowIconDecoration';
11
11
  export { DynamicStrokeIconDecoration } from './shared/DynamicStrokeIconDecoration';
12
12
  export declare const IconTable: React.ComponentType<React.PropsWithChildren<IconProps>> & Loadable.LoadableComponent;
@@ -3,6 +3,8 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  import { jsx } from '@emotion/react';
6
+ export declare const rainbow: string;
7
+ export declare const disabledRainbow: string;
6
8
  type SteppedRainbowIconDecorationProps = {
7
9
  disabled?: boolean;
8
10
  icon: React.ReactNode;
@@ -1 +1,2 @@
1
1
  export type EditorAppearance = 'comment' | 'full-page' | 'full-width' | 'chromeless';
2
+ export type EditorContentMode = 'standard' | 'dense';
@@ -16,7 +16,7 @@ export type { EmptyStateHandler, EmptyStateHandlerParams } from './empty-state-h
16
16
  export type { RenderOptionsPropsT, DropdownOptionT, DropdownOptions, ExtensionDropdownOptions, SelectOption, ButtonAppearance, Icon, RenderOptionsProps, AlignType, ConfirmDialogChildInfo, ConfirmDialogOptions, ConfirmationDialogProps, FloatingToolbarButton, FloatingToolbarCopyButton, FloatingToolbarInput, FloatingToolbarCustom, FloatingToolbarListPicker, FloatingToolbarColorPicker, FloatingToolbarEmojiPicker, FloatingToolbarDatePicker, FloatingToolbarSelect, FloatingToolbarSeparator, FloatingToolbarDropdown, FloatingToolbarFallbackItem, FloatingToolbarItem, FloatingToolbarConfig, FloatingToolbarHandler, FloatingToolbarButtonSpotlightConfig, typeOption, FloatingToolbarOverflowDropdown, FloatingToolbarOverflowDropdownOptions, OverflowDropdownHeading, OverflowDropdownOption, } from './floating-toolbar';
17
17
  export type { MarkOptions, NodeOptions } from './copy-button';
18
18
  export type { ContextPanelHandler } from './context-panel';
19
- export type { EditorAppearance } from './editor-appearance';
19
+ export type { EditorAppearance, EditorContentMode } from './editor-appearance';
20
20
  export type { ToolbarUiComponentFactoryParams, ToolbarUIComponentFactory } from './toolbar';
21
21
  export { ToolbarSize, ToolbarWidths, ToolbarWidthsNext, ToolbarWidthsFullPage, ToolbarWidthsFullPageNext, } from './toolbar';
22
22
  export type { UiComponentFactoryParams, UIComponentFactory, ReactHookFactory, } from './ui-components';
@@ -1,4 +1,13 @@
1
+ /**
2
+ * @deprecated
3
+ * This file is deprecated and will be removed in the next major release.
4
+ * Please use `getBrowserInfo` function to get the browser info on demand.
5
+ * Static `browser` info is no longer supported.
6
+ */
1
7
  declare const result: {
2
8
  [key: string]: any;
3
9
  };
4
10
  export { result as browser };
11
+ export declare const getBrowserInfo: import("memoize-one").MemoizedFn<() => {
12
+ [key: string]: any;
13
+ }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "109.8.1",
3
+ "version": "109.10.0",
4
4
  "description": "A package that contains common classes and components for editor and renderer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -74,14 +74,14 @@
74
74
  "@atlaskit/profilecard": "^24.13.0",
75
75
  "@atlaskit/react-ufo": "^4.7.0",
76
76
  "@atlaskit/section-message": "^8.7.0",
77
- "@atlaskit/smart-card": "^41.0.0",
77
+ "@atlaskit/smart-card": "^42.0.0",
78
78
  "@atlaskit/smart-user-picker": "^8.2.0",
79
79
  "@atlaskit/spinner": "^19.0.0",
80
80
  "@atlaskit/status": "^3.0.0",
81
81
  "@atlaskit/task-decision": "^19.2.0",
82
82
  "@atlaskit/textfield": "^8.0.0",
83
83
  "@atlaskit/theme": "^21.0.0",
84
- "@atlaskit/tmp-editor-statsig": "^12.24.0",
84
+ "@atlaskit/tmp-editor-statsig": "^12.25.0",
85
85
  "@atlaskit/tokens": "^6.3.0",
86
86
  "@atlaskit/tooltip": "^20.4.0",
87
87
  "@atlaskit/width-detector": "^5.0.0",