@atlaskit/editor-common 109.9.0 → 109.10.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 (55) hide show
  1. package/CHANGELOG.md +21 -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/extensibility/Extension/InlineExtension/index.js +4 -2
  5. package/dist/cjs/guideline/utils.js +4 -2
  6. package/dist/cjs/icons/index.js +12 -0
  7. package/dist/cjs/icons/shared/SteppedRainbowIconDecoration.js +3 -3
  8. package/dist/cjs/media-single/utils.js +5 -3
  9. package/dist/cjs/monitoring/error.js +1 -1
  10. package/dist/cjs/resizer/BreakoutResizer.js +3 -2
  11. package/dist/cjs/resizer/useBreakoutGuidelines.js +3 -2
  12. package/dist/cjs/styles/shared/resizer.js +1 -1
  13. package/dist/cjs/ui/DropList/index.js +1 -1
  14. package/dist/cjs/utils/browser.js +121 -3
  15. package/dist/es2019/analytics/types/ai-streaming.js +1 -0
  16. package/dist/es2019/analytics/types/enums.js +2 -0
  17. package/dist/es2019/extensibility/Extension/InlineExtension/index.js +4 -2
  18. package/dist/es2019/guideline/utils.js +4 -2
  19. package/dist/es2019/icons/index.js +1 -1
  20. package/dist/es2019/icons/shared/SteppedRainbowIconDecoration.js +2 -2
  21. package/dist/es2019/media-single/utils.js +5 -3
  22. package/dist/es2019/monitoring/error.js +1 -1
  23. package/dist/es2019/resizer/BreakoutResizer.js +3 -2
  24. package/dist/es2019/resizer/useBreakoutGuidelines.js +3 -2
  25. package/dist/es2019/styles/shared/resizer.js +1 -1
  26. package/dist/es2019/ui/DropList/index.js +1 -1
  27. package/dist/es2019/utils/browser.js +119 -2
  28. package/dist/esm/analytics/types/ai-streaming.js +1 -0
  29. package/dist/esm/analytics/types/enums.js +2 -0
  30. package/dist/esm/extensibility/Extension/InlineExtension/index.js +4 -2
  31. package/dist/esm/guideline/utils.js +4 -2
  32. package/dist/esm/icons/index.js +1 -1
  33. package/dist/esm/icons/shared/SteppedRainbowIconDecoration.js +2 -2
  34. package/dist/esm/media-single/utils.js +5 -3
  35. package/dist/esm/monitoring/error.js +1 -1
  36. package/dist/esm/resizer/BreakoutResizer.js +3 -2
  37. package/dist/esm/resizer/useBreakoutGuidelines.js +3 -2
  38. package/dist/esm/styles/shared/resizer.js +1 -1
  39. package/dist/esm/ui/DropList/index.js +1 -1
  40. package/dist/esm/utils/browser.js +119 -2
  41. package/dist/types/analytics/types/ai-streaming.d.ts +8 -0
  42. package/dist/types/analytics/types/enums.d.ts +2 -0
  43. package/dist/types/analytics/types/events.d.ts +2 -1
  44. package/dist/types/icons/index.d.ts +1 -1
  45. package/dist/types/icons/shared/SteppedRainbowIconDecoration.d.ts +2 -0
  46. package/dist/types/media-single/utils.d.ts +1 -1
  47. package/dist/types/utils/browser.d.ts +9 -0
  48. package/dist/types-ts4.5/analytics/types/ai-streaming.d.ts +8 -0
  49. package/dist/types-ts4.5/analytics/types/enums.d.ts +2 -0
  50. package/dist/types-ts4.5/analytics/types/events.d.ts +2 -1
  51. package/dist/types-ts4.5/icons/index.d.ts +1 -1
  52. package/dist/types-ts4.5/icons/shared/SteppedRainbowIconDecoration.d.ts +2 -0
  53. package/dist/types-ts4.5/media-single/utils.d.ts +1 -1
  54. package/dist/types-ts4.5/utils/browser.d.ts +9 -0
  55. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 109.10.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`6b6eca9cee16d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6b6eca9cee16d) -
8
+ Switch to use editorExperiment to use productKey for responsive preview panel changes.
9
+ - Updated dependencies
10
+
11
+ ## 109.10.0
12
+
13
+ ### Minor Changes
14
+
15
+ - [`40428300fa158`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/40428300fa158) -
16
+ Add analytics for streaming
17
+ - [`cb7778d7ca5bb`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/cb7778d7ca5bb) -
18
+ introduce getBrowserInfo api from browser util, used in getUAPrefix
19
+
20
+ ### Patch Changes
21
+
22
+ - Updated dependencies
23
+
3
24
  ## 109.9.0
4
25
 
5
26
  ### Minor 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";
@@ -10,7 +10,7 @@ var _react = _interopRequireWildcard(require("react"));
10
10
  var _react2 = require("@emotion/react");
11
11
  var _classnames = _interopRequireDefault(require("classnames"));
12
12
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
13
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
13
+ var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
14
14
  var _hooks = require("../../../hooks");
15
15
  var _ui = require("../../../ui");
16
16
  var _Lozenge = _interopRequireDefault(require("../Lozenge"));
@@ -50,7 +50,9 @@ var InlineExtension = function InlineExtension(props) {
50
50
  'with-hover-border': showMacroInteractionDesignUpdates && isNodeHovered
51
51
  });
52
52
  var rendererContainerWidth = 0;
53
- if ((0, _expValEquals.expValEquals)('platform_editor_preview_panel_responsiveness', 'isEnabled', true)) {
53
+ if ((0, _experiments.editorExperiment)('platform_editor_preview_panel_responsiveness', true, {
54
+ exposure: true
55
+ })) {
54
56
  if (width) {
55
57
  var padding = width > _editorSharedStyles.akEditorFullPageNarrowBreakout ? (0, _editorSharedStyles.akEditorGutterPaddingDynamic)() : _editorSharedStyles.akEditorGutterPaddingReduced;
56
58
  rendererContainerWidth = width - padding * 2;
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.isVerticalPosition = exports.isRange = exports.isNumber = exports.getMediaSingleDimensions = exports.getGuidelineTypeFromKey = exports.getContainerWidthOrFullEditorWidth = void 0;
8
8
  var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
9
9
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
10
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
10
+ var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
11
11
  var _mediaSingle = require("../media-single");
12
12
  var isNumber = exports.isNumber = function isNumber(x) {
13
13
  return typeof x === 'number' && !isNaN(x) && isFinite(x);
@@ -61,7 +61,9 @@ var getGuidelineTypeFromKey = exports.getGuidelineTypeFromKey = function getGuid
61
61
  * width and editor gutter padding.
62
62
  */
63
63
  var getContainerWidthOrFullEditorWidth = exports.getContainerWidthOrFullEditorWidth = function getContainerWidthOrFullEditorWidth(containerWidth) {
64
- var padding = containerWidth <= _editorSharedStyles.akEditorFullPageNarrowBreakout && (0, _expValEquals.expValEquals)('platform_editor_preview_panel_responsiveness', 'isEnabled', true) ? _editorSharedStyles.akEditorGutterPaddingReduced : (0, _editorSharedStyles.akEditorGutterPaddingDynamic)();
64
+ var padding = containerWidth <= _editorSharedStyles.akEditorFullPageNarrowBreakout && (0, _experiments.editorExperiment)('platform_editor_preview_panel_responsiveness', true, {
65
+ exposure: true
66
+ }) ? _editorSharedStyles.akEditorGutterPaddingReduced : (0, _editorSharedStyles.akEditorGutterPaddingDynamic)();
65
67
  return Math.min(containerWidth - padding * 2, _editorSharedStyles.akEditorFullWidthLayoutWidth) / 2;
66
68
  };
67
69
 
@@ -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,
@@ -10,7 +10,7 @@ exports.getMediaSinglePixelWidth = getMediaSinglePixelWidth;
10
10
  exports.roundToNearest = exports.getParentWidthForNestedMediaSingleNodeForInsertion = exports.getParentWidthForNestedMediaSingleNode = void 0;
11
11
  var _state = require("@atlaskit/editor-prosemirror/state");
12
12
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
13
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
13
+ var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
14
14
  var _richMediaUtils = require("../utils/rich-media-utils");
15
15
  var _constants = require("./constants");
16
16
  /**
@@ -103,7 +103,9 @@ var calcLegacyWideWidth = function calcLegacyWideWidth(containerWidth, origWidth
103
103
  * @param containerWidth width of editor container
104
104
  */
105
105
  var calcMediaSingleMaxWidth = exports.calcMediaSingleMaxWidth = function calcMediaSingleMaxWidth(containerWidth, editorAppearance) {
106
- var fullPagePadding = editorAppearance === 'full-page' && containerWidth <= _editorSharedStyles.akEditorFullPageNarrowBreakout && (0, _expValEquals.expValEquals)('platform_editor_preview_panel_responsiveness', 'isEnabled', true) ? _editorSharedStyles.akEditorGutterPaddingReduced : (0, _editorSharedStyles.akEditorGutterPaddingDynamic)();
106
+ var fullPagePadding = editorAppearance === 'full-page' && containerWidth <= _editorSharedStyles.akEditorFullPageNarrowBreakout && (0, _experiments.editorExperiment)('platform_editor_preview_panel_responsiveness', true, {
107
+ exposure: true
108
+ }) ? _editorSharedStyles.akEditorGutterPaddingReduced : (0, _editorSharedStyles.akEditorGutterPaddingDynamic)();
107
109
  var fullWidthPadding = editorAppearance === 'full-page' ? fullPagePadding * 2 : _editorSharedStyles.akEditorGutterPadding * 2;
108
110
  return Math.min(containerWidth - fullWidthPadding, _editorSharedStyles.akEditorFullWidthLayoutWidth);
109
111
  };
@@ -135,7 +137,7 @@ function calculateOffsetLeft(insideInlineLike, insideLayout, pmViewDom, wrapper)
135
137
  * Returns the number rounded to the nearest interval.
136
138
  * @param {number} value The number to round
137
139
  * @param {number} interval The numeric interval to round to, default to 0.5
138
- * @return {number} the rounded number
140
+ * @returns {number} the rounded number
139
141
  */
140
142
  var roundToNearest = exports.roundToNearest = function roundToNearest(value) {
141
143
  var interval = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _constants.DEFAULT_ROUNDING_INTERVAL;
@@ -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 = "0.0.0-development";
19
+ var packageVersion = "109.10.0";
20
20
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
21
21
  // Remove URL as it has UGC
22
22
  // Ignored via go/ees007
@@ -11,7 +11,6 @@ var _react = _interopRequireWildcard(require("react"));
11
11
  var _bindEventListener = require("bind-event-listener");
12
12
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
13
13
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
14
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
15
14
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
16
15
  var _analytics = require("../analytics");
17
16
  var _styles = require("../styles");
@@ -173,7 +172,9 @@ var BreakoutResizer = exports.BreakoutResizer = function BreakoutResizer(_ref) {
173
172
  state = editorView.state;
174
173
  displayGapCursor(false);
175
174
  if (widthState !== undefined && widthState.lineLength !== undefined && widthState.width !== undefined) {
176
- var padding = widthState.width <= _editorSharedStyles.akEditorFullPageNarrowBreakout && (0, _expValEquals.expValEquals)('platform_editor_preview_panel_responsiveness', 'isEnabled', true) ? _editorSharedStyles.akEditorGutterPaddingReduced : (0, _editorSharedStyles.akEditorGutterPaddingDynamic)();
175
+ var padding = widthState.width <= _editorSharedStyles.akEditorFullPageNarrowBreakout && (0, _experiments.editorExperiment)('platform_editor_preview_panel_responsiveness', true, {
176
+ exposure: true
177
+ }) ? _editorSharedStyles.akEditorGutterPaddingReduced : (0, _editorSharedStyles.akEditorGutterPaddingDynamic)();
177
178
  newMaxWidth = Math.min(widthState.width - padding * 2 - _editorSharedStyles.akEditorGutterPadding, _editorSharedStyles.akEditorFullWidthLayoutWidth);
178
179
  newMinWidth = Math.min(widthState.lineLength, _editorSharedStyles.akEditorDefaultLayoutWidth, newMaxWidth);
179
180
  }
@@ -10,7 +10,6 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
10
10
  var _react = require("react");
11
11
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
12
12
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
13
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
14
13
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
15
14
  var SNAP_GAP = exports.SNAP_GAP = 8;
16
15
  var GUIDELINE_KEYS = {
@@ -43,7 +42,9 @@ function useBreakoutGuidelines(getEditorWidth, isResizing) {
43
42
  // when the page is full width, the calculation of wide is wrong.
44
43
  // Actuall the wide is the wide breakout point, which is
45
44
  var wide = (0, _experiments.editorExperiment)('single_column_layouts', true) && (0, _platformFeatureFlags.fg)('platform_editor_layout_guideline_full_width_fix') ? _editorSharedStyles.akEditorCalculatedWideLayoutWidth : wideCalWithRatio;
46
- var padding = width && width <= _editorSharedStyles.akEditorFullPageNarrowBreakout && (0, _expValEquals.expValEquals)('platform_editor_preview_panel_responsiveness', 'isEnabled', true) ? _editorSharedStyles.akEditorGutterPaddingReduced : (0, _editorSharedStyles.akEditorGutterPaddingDynamic)();
45
+ var padding = width && width <= _editorSharedStyles.akEditorFullPageNarrowBreakout && (0, _experiments.editorExperiment)('platform_editor_preview_panel_responsiveness', true, {
46
+ exposure: true
47
+ }) ? _editorSharedStyles.akEditorGutterPaddingReduced : (0, _editorSharedStyles.akEditorGutterPaddingDynamic)();
47
48
  var layoutCalculatedWidth = width ? width - (padding + dynamicFullWidthGuidelineOffset) * 2 : undefined;
48
49
  var fullWidth = width && layoutCalculatedWidth ? Math.min(layoutCalculatedWidth, _editorSharedStyles.akEditorFullWidthLayoutWidth) : undefined;
49
50
  return {
@@ -329,7 +329,7 @@ var pragmaticResizerStyles = exports.pragmaticResizerStyles = function pragmatic
329
329
  });
330
330
  };
331
331
  var pragmaticResizerStylesWithReducedEditorGutter = exports.pragmaticResizerStylesWithReducedEditorGutter = function pragmaticResizerStylesWithReducedEditorGutter() {
332
- if ((0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_preview_panel_responsiveness', 'isEnabled', true) && ((0, _expValEqualsNoExposure.expValEqualsNoExposure)('advanced_layouts', 'isEnabled', true) || (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_breakout_resizing', 'isEnabled', true))) {
332
+ if ((0, _experiments.editorExperiment)('platform_editor_preview_panel_responsiveness', true) && ((0, _expValEqualsNoExposure.expValEqualsNoExposure)('advanced_layouts', 'isEnabled', true) || (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_breakout_resizing', 'isEnabled', true))) {
333
333
  return (0, _react.css)((0, _defineProperty2.default)({}, "@container editor-area (max-width: ".concat(_editorSharedStyles.akEditorFullPageNarrowBreakout, "px)"), {
334
334
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
335
335
  '.fabric-editor-breakout-mark': {
@@ -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 = "0.0.0-development";
27
+ var packageVersion = "109.10.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 @@ import React, { Fragment } from 'react';
8
8
  import { jsx } from '@emotion/react';
9
9
  import classnames from 'classnames';
10
10
  import { akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout } from '@atlaskit/editor-shared-styles';
11
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
11
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
12
12
  import { useSharedPluginStateWithSelector } from '../../../hooks';
13
13
  import { createWidthContext, WidthContext } from '../../../ui';
14
14
  import ExtensionLozenge from '../Lozenge';
@@ -44,7 +44,9 @@ const InlineExtension = props => {
44
44
  'with-hover-border': showMacroInteractionDesignUpdates && isNodeHovered
45
45
  });
46
46
  let rendererContainerWidth = 0;
47
- if (expValEquals('platform_editor_preview_panel_responsiveness', 'isEnabled', true)) {
47
+ if (editorExperiment('platform_editor_preview_panel_responsiveness', true, {
48
+ exposure: true
49
+ })) {
48
50
  if (width) {
49
51
  const padding = width > akEditorFullPageNarrowBreakout ? akEditorGutterPaddingDynamic() : akEditorGutterPaddingReduced;
50
52
  rendererContainerWidth = width - padding * 2;
@@ -1,5 +1,5 @@
1
1
  import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout } from '@atlaskit/editor-shared-styles';
2
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
2
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
3
3
  import { getMediaSinglePixelWidth, roundToNearest } from '../media-single';
4
4
  export const isNumber = x => typeof x === 'number' && !isNaN(x) && isFinite(x);
5
5
  export const isRange = range => !!(typeof range === 'object' && range && 'start' in range && 'end' in range);
@@ -35,7 +35,9 @@ export const getGuidelineTypeFromKey = (keys, guidelines) => {
35
35
  * width and editor gutter padding.
36
36
  */
37
37
  export const getContainerWidthOrFullEditorWidth = containerWidth => {
38
- const padding = containerWidth <= akEditorFullPageNarrowBreakout && expValEquals('platform_editor_preview_panel_responsiveness', 'isEnabled', true) ? akEditorGutterPaddingReduced : akEditorGutterPaddingDynamic();
38
+ const padding = containerWidth <= akEditorFullPageNarrowBreakout && editorExperiment('platform_editor_preview_panel_responsiveness', true, {
39
+ exposure: true
40
+ }) ? akEditorGutterPaddingReduced : akEditorGutterPaddingDynamic();
39
41
  return Math.min(containerWidth - padding * 2, akEditorFullWidthLayoutWidth) / 2;
40
42
  };
41
43
 
@@ -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,6 +1,6 @@
1
1
  import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
2
2
  import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout, breakoutWideScaleRatio } from '@atlaskit/editor-shared-styles';
3
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
3
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
4
4
  import { floatingLayouts, isRichMediaInsideOfBlockNode } from '../utils/rich-media-utils';
5
5
  import { DEFAULT_IMAGE_WIDTH, DEFAULT_ROUNDING_INTERVAL, MEDIA_SINGLE_DEFAULT_MIN_PIXEL_WIDTH, MEDIA_SINGLE_VIDEO_MIN_PIXEL_WIDTH, wrappedLayouts } from './constants';
6
6
 
@@ -91,7 +91,9 @@ const calcLegacyWideWidth = (containerWidth, origWidth, contentWidth) => {
91
91
  * @param containerWidth width of editor container
92
92
  */
93
93
  export const calcMediaSingleMaxWidth = (containerWidth, editorAppearance) => {
94
- const fullPagePadding = editorAppearance === 'full-page' && containerWidth <= akEditorFullPageNarrowBreakout && expValEquals('platform_editor_preview_panel_responsiveness', 'isEnabled', true) ? akEditorGutterPaddingReduced : akEditorGutterPaddingDynamic();
94
+ const fullPagePadding = editorAppearance === 'full-page' && containerWidth <= akEditorFullPageNarrowBreakout && editorExperiment('platform_editor_preview_panel_responsiveness', true, {
95
+ exposure: true
96
+ }) ? akEditorGutterPaddingReduced : akEditorGutterPaddingDynamic();
95
97
  const fullWidthPadding = editorAppearance === 'full-page' ? fullPagePadding * 2 : akEditorGutterPadding * 2;
96
98
  return Math.min(containerWidth - fullWidthPadding, akEditorFullWidthLayoutWidth);
97
99
  };
@@ -120,7 +122,7 @@ export function calculateOffsetLeft(insideInlineLike, insideLayout, pmViewDom, w
120
122
  * Returns the number rounded to the nearest interval.
121
123
  * @param {number} value The number to round
122
124
  * @param {number} interval The numeric interval to round to, default to 0.5
123
- * @return {number} the rounded number
125
+ * @returns {number} the rounded number
124
126
  */
125
127
  export const roundToNearest = (value, interval = DEFAULT_ROUNDING_INTERVAL) => Math.round(value / interval) * interval;
126
128
 
@@ -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 = "0.0.0-development";
4
+ const packageVersion = "109.10.0";
5
5
  const sanitiseSentryEvents = (data, _hint) => {
6
6
  // Remove URL as it has UGC
7
7
  // Ignored via go/ees007
@@ -2,7 +2,6 @@ import React, { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useSta
2
2
  import { bind, bindAll } from 'bind-event-listener';
3
3
  import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout } from '@atlaskit/editor-shared-styles';
4
4
  import { fg } from '@atlaskit/platform-feature-flags';
5
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
6
5
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
7
6
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '../analytics';
8
7
  import { LAYOUT_COLUMN_PADDING, LAYOUT_SECTION_MARGIN } from '../styles';
@@ -165,7 +164,9 @@ const BreakoutResizer = ({
165
164
  } = editorView;
166
165
  displayGapCursor(false);
167
166
  if (widthState !== undefined && widthState.lineLength !== undefined && widthState.width !== undefined) {
168
- const padding = widthState.width <= akEditorFullPageNarrowBreakout && expValEquals('platform_editor_preview_panel_responsiveness', 'isEnabled', true) ? akEditorGutterPaddingReduced : akEditorGutterPaddingDynamic();
167
+ const padding = widthState.width <= akEditorFullPageNarrowBreakout && editorExperiment('platform_editor_preview_panel_responsiveness', true, {
168
+ exposure: true
169
+ }) ? akEditorGutterPaddingReduced : akEditorGutterPaddingDynamic();
169
170
  newMaxWidth = Math.min(widthState.width - padding * 2 - akEditorGutterPadding, akEditorFullWidthLayoutWidth);
170
171
  newMinWidth = Math.min(widthState.lineLength, akEditorDefaultLayoutWidth, newMaxWidth);
171
172
  }
@@ -1,7 +1,6 @@
1
1
  import { useCallback, useMemo, useState } from 'react';
2
2
  import { akEditorCalculatedWideLayoutWidth, akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorGutterPaddingDynamic, akEditorGutterPaddingReduced, akEditorFullPageNarrowBreakout, breakoutWideScaleRatio } from '@atlaskit/editor-shared-styles';
3
3
  import { fg } from '@atlaskit/platform-feature-flags';
4
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
5
4
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
6
5
  export const SNAP_GAP = 8;
7
6
  const GUIDELINE_KEYS = {
@@ -35,7 +34,9 @@ export function useBreakoutGuidelines(getEditorWidth, isResizing, dynamicFullWid
35
34
  // when the page is full width, the calculation of wide is wrong.
36
35
  // Actuall the wide is the wide breakout point, which is
37
36
  const wide = editorExperiment('single_column_layouts', true) && fg('platform_editor_layout_guideline_full_width_fix') ? akEditorCalculatedWideLayoutWidth : wideCalWithRatio;
38
- const padding = width && width <= akEditorFullPageNarrowBreakout && expValEquals('platform_editor_preview_panel_responsiveness', 'isEnabled', true) ? akEditorGutterPaddingReduced : akEditorGutterPaddingDynamic();
37
+ const padding = width && width <= akEditorFullPageNarrowBreakout && editorExperiment('platform_editor_preview_panel_responsiveness', true, {
38
+ exposure: true
39
+ }) ? akEditorGutterPaddingReduced : akEditorGutterPaddingDynamic();
39
40
  const layoutCalculatedWidth = width ? width - (padding + dynamicFullWidthGuidelineOffset) * 2 : undefined;
40
41
  const fullWidth = width && layoutCalculatedWidth ? Math.min(layoutCalculatedWidth, akEditorFullWidthLayoutWidth) : undefined;
41
42
  return {
@@ -515,7 +515,7 @@ export const pragmaticResizerStyles = () => {
515
515
  });
516
516
  };
517
517
  export const pragmaticResizerStylesWithReducedEditorGutter = () => {
518
- if (expValEqualsNoExposure('platform_editor_preview_panel_responsiveness', 'isEnabled', true) && (expValEqualsNoExposure('advanced_layouts', 'isEnabled', true) || expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true))) {
518
+ if (editorExperiment('platform_editor_preview_panel_responsiveness', true) && (expValEqualsNoExposure('advanced_layouts', 'isEnabled', true) || expValEqualsNoExposure('platform_editor_breakout_resizing', 'isEnabled', true))) {
519
519
  return css({
520
520
  /* container editor-area is defined in platform/packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts */
521
521
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-container-queries, @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values
@@ -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 = "0.0.0-development";
17
+ const packageVersion = "109.10.0";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({