@atlaskit/editor-common 116.46.0 → 116.48.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 (92) hide show
  1. package/CHANGELOG.md +74 -0
  2. package/afm-cc/tsconfig.json +3 -0
  3. package/afm-products/tsconfig.json +3 -0
  4. package/dist/cjs/element-browser/components/ViewMore.js +1 -1
  5. package/dist/cjs/extensibility/Extension/Lozenge/ExtensionFloatingLabel.js +1 -1
  6. package/dist/cjs/extensions/UnknownMacroPlaceholder.js +1 -1
  7. package/dist/cjs/icons/shared/PanelErrorIcon.js +1 -1
  8. package/dist/cjs/icons/shared/PanelInfoIcon.js +1 -1
  9. package/dist/cjs/icons/shared/PanelNoteIcon.js +1 -1
  10. package/dist/cjs/icons/shared/PanelSuccessIcon.js +1 -1
  11. package/dist/cjs/icons/shared/PanelWarningIcon.js +1 -1
  12. package/dist/cjs/messages/syncBlock.js +30 -0
  13. package/dist/cjs/monitoring/error.js +1 -1
  14. package/dist/cjs/styles/shared/sync-block.js +7 -1
  15. package/dist/cjs/table/NewSortingIcon.js +1 -1
  16. package/dist/cjs/ui/DropList/index.js +1 -1
  17. package/dist/cjs/ui/Layer/index.js +138 -18
  18. package/dist/cjs/ui/Shortcut/index.js +1 -1
  19. package/dist/cjs/ui/Toolbar/ButtonGroup.js +1 -1
  20. package/dist/cjs/ui/Toolbar/DropdownTriggerWrapper.js +1 -1
  21. package/dist/cjs/ui/Toolbar/DropdownWrapper.js +1 -1
  22. package/dist/cjs/ui/Toolbar/ExpandIcon.js +1 -1
  23. package/dist/cjs/ui/Toolbar/Separator.js +1 -1
  24. package/dist/cjs/ui-color/ColorPalette/Palettes/lightBackgroundPaletteTooltipMessages.js +5 -45
  25. package/dist/cjs/ui-color/ColorPalette/Palettes/paletteMessages.js +0 -60
  26. package/dist/cjs/ui-color/ColorPalette/Palettes/panelBackgroundPaletteNew.js +106 -0
  27. package/dist/cjs/ui-color/index.js +7 -7
  28. package/dist/cjs/vanilla-tooltip/index.js +9 -1
  29. package/dist/es2019/element-browser/components/ViewMore.js +1 -1
  30. package/dist/es2019/extensibility/Extension/Lozenge/ExtensionFloatingLabel.js +1 -1
  31. package/dist/es2019/extensions/UnknownMacroPlaceholder.js +1 -1
  32. package/dist/es2019/icons/shared/PanelErrorIcon.js +1 -1
  33. package/dist/es2019/icons/shared/PanelInfoIcon.js +1 -1
  34. package/dist/es2019/icons/shared/PanelNoteIcon.js +1 -1
  35. package/dist/es2019/icons/shared/PanelSuccessIcon.js +1 -1
  36. package/dist/es2019/icons/shared/PanelWarningIcon.js +1 -1
  37. package/dist/es2019/messages/syncBlock.js +30 -0
  38. package/dist/es2019/monitoring/error.js +1 -1
  39. package/dist/es2019/styles/shared/sync-block.js +7 -1
  40. package/dist/es2019/table/NewSortingIcon.js +1 -1
  41. package/dist/es2019/ui/DropList/index.js +1 -1
  42. package/dist/es2019/ui/Layer/index.js +120 -13
  43. package/dist/es2019/ui/Shortcut/index.js +1 -1
  44. package/dist/es2019/ui/Toolbar/ButtonGroup.js +1 -1
  45. package/dist/es2019/ui/Toolbar/DropdownTriggerWrapper.js +1 -1
  46. package/dist/es2019/ui/Toolbar/DropdownWrapper.js +1 -1
  47. package/dist/es2019/ui/Toolbar/ExpandIcon.js +1 -1
  48. package/dist/es2019/ui/Toolbar/Separator.js +1 -1
  49. package/dist/es2019/ui-color/ColorPalette/Palettes/lightBackgroundPaletteTooltipMessages.js +5 -45
  50. package/dist/es2019/ui-color/ColorPalette/Palettes/paletteMessages.js +0 -60
  51. package/dist/es2019/ui-color/ColorPalette/Palettes/panelBackgroundPaletteNew.js +95 -0
  52. package/dist/es2019/ui-color/index.js +1 -1
  53. package/dist/es2019/vanilla-tooltip/index.js +10 -2
  54. package/dist/esm/element-browser/components/ViewMore.js +1 -1
  55. package/dist/esm/extensibility/Extension/Lozenge/ExtensionFloatingLabel.js +1 -1
  56. package/dist/esm/extensions/UnknownMacroPlaceholder.js +1 -1
  57. package/dist/esm/icons/shared/PanelErrorIcon.js +1 -1
  58. package/dist/esm/icons/shared/PanelInfoIcon.js +1 -1
  59. package/dist/esm/icons/shared/PanelNoteIcon.js +1 -1
  60. package/dist/esm/icons/shared/PanelSuccessIcon.js +1 -1
  61. package/dist/esm/icons/shared/PanelWarningIcon.js +1 -1
  62. package/dist/esm/messages/syncBlock.js +30 -0
  63. package/dist/esm/monitoring/error.js +1 -1
  64. package/dist/esm/styles/shared/sync-block.js +7 -1
  65. package/dist/esm/table/NewSortingIcon.js +1 -1
  66. package/dist/esm/ui/DropList/index.js +1 -1
  67. package/dist/esm/ui/Layer/index.js +138 -19
  68. package/dist/esm/ui/Shortcut/index.js +1 -1
  69. package/dist/esm/ui/Toolbar/ButtonGroup.js +1 -1
  70. package/dist/esm/ui/Toolbar/DropdownTriggerWrapper.js +1 -1
  71. package/dist/esm/ui/Toolbar/DropdownWrapper.js +1 -1
  72. package/dist/esm/ui/Toolbar/ExpandIcon.js +1 -1
  73. package/dist/esm/ui/Toolbar/Separator.js +1 -1
  74. package/dist/esm/ui-color/ColorPalette/Palettes/lightBackgroundPaletteTooltipMessages.js +5 -45
  75. package/dist/esm/ui-color/ColorPalette/Palettes/paletteMessages.js +0 -60
  76. package/dist/esm/ui-color/ColorPalette/Palettes/panelBackgroundPaletteNew.js +99 -0
  77. package/dist/esm/ui-color/index.js +1 -1
  78. package/dist/esm/vanilla-tooltip/index.js +10 -2
  79. package/dist/types/messages/syncBlock.d.ts +30 -0
  80. package/dist/types/styles/shared/sync-block.d.ts +6 -5
  81. package/dist/types/ui/Layer/index.d.ts +3 -26
  82. package/dist/types/ui/Layer/internal/helpers.d.ts +1 -1
  83. package/dist/types/ui-color/ColorPalette/Palettes/lightBackgroundPaletteTooltipMessages.d.ts +1 -41
  84. package/dist/types/ui-color/ColorPalette/Palettes/paletteMessages.d.ts +0 -60
  85. package/dist/types/ui-color/ColorPalette/Palettes/panelBackgroundPaletteNew.d.ts +2 -0
  86. package/dist/types/ui-color/index.d.ts +1 -1
  87. package/package.json +12 -4
  88. package/ui-color/ColorPalette/panelBackgroundPaletteNew/package.json +10 -0
  89. package/dist/cjs/ui-color/ColorPalette/Palettes/cellBackgroundColorPaletteNew.js +0 -28
  90. package/dist/es2019/ui-color/ColorPalette/Palettes/cellBackgroundColorPaletteNew.js +0 -21
  91. package/dist/esm/ui-color/ColorPalette/Palettes/cellBackgroundColorPaletteNew.js +0 -21
  92. package/dist/types/ui-color/ColorPalette/Palettes/cellBackgroundColorPaletteNew.d.ts +0 -8
@@ -0,0 +1,106 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.panelBackgroundPaletteNew = void 0;
8
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
10
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
11
+ // new palette for platform_editor_lovability_text_bg_color experiment
12
+ var panelBackgroundPaletteNew = exports.panelBackgroundPaletteNew = [{
13
+ label: 'White',
14
+ value: '#FFFFFF'
15
+ }, {
16
+ label: 'Subtle blue',
17
+ value: '#DEEBFF'
18
+ }, {
19
+ label: 'Subtle teal',
20
+ value: '#E6FCFF'
21
+ }, {
22
+ label: 'Subtle green',
23
+ value: '#E3FCEF'
24
+ }, {
25
+ label: 'Subtle lime',
26
+ value: '#EFFFD6'
27
+ }, {
28
+ label: 'Subtle yellow',
29
+ value: '#FFFAE6'
30
+ }, {
31
+ label: 'Subtle orange',
32
+ value: '#FFF5DB'
33
+ }, {
34
+ label: 'Subtle red',
35
+ value: '#FFEBE6'
36
+ }, {
37
+ label: 'Subtle magenta',
38
+ value: '#FFECF8'
39
+ }, {
40
+ label: 'Subtle purple',
41
+ value: '#EAE6FF'
42
+ }, {
43
+ label: 'Gray',
44
+ value: '#F4F5F7'
45
+ }, {
46
+ label: 'Blue',
47
+ value: '#B3D4FF'
48
+ }, {
49
+ label: 'Teal',
50
+ value: '#B3F5FF'
51
+ }, {
52
+ label: 'Green',
53
+ value: '#ABF5D1'
54
+ }, {
55
+ label: 'Lime',
56
+ value: '#D3F1A7'
57
+ }, {
58
+ label: 'Yellow',
59
+ value: '#FFF0B3'
60
+ }, {
61
+ label: 'Orange',
62
+ value: '#FCE4A6'
63
+ }, {
64
+ label: 'Red',
65
+ value: '#FFBDAD'
66
+ }, {
67
+ label: 'Magenta',
68
+ value: '#FDD0EC'
69
+ }, {
70
+ label: 'Purple',
71
+ value: '#C0B6F2'
72
+ }, {
73
+ label: 'Bold gray',
74
+ value: '#B7B9BE'
75
+ }, {
76
+ label: 'Bold blue',
77
+ value: '#ADCBFB'
78
+ }, {
79
+ label: 'Bold teal',
80
+ value: '#B1E4F7'
81
+ }, {
82
+ label: 'Bold green',
83
+ value: '#97EDC9'
84
+ }, {
85
+ label: 'Bold lime',
86
+ value: '#BDE97C'
87
+ }, {
88
+ label: 'Bold yellow',
89
+ value: '#EFDD4E'
90
+ }, {
91
+ label: 'Bold orange',
92
+ value: '#FBD779'
93
+ }, {
94
+ label: 'Bold red',
95
+ value: '#FFB8B2'
96
+ }, {
97
+ label: 'Bold magenta',
98
+ value: '#FCB6E1'
99
+ }, {
100
+ label: 'Bold purple',
101
+ value: '#E3BDFA'
102
+ }].map(function (color) {
103
+ return _objectSpread(_objectSpread({}, color), {}, {
104
+ border: "var(--ds-border, #0B120E24)"
105
+ });
106
+ });
@@ -64,12 +64,6 @@ Object.defineProperty(exports, "cellBackgroundColorPalette", {
64
64
  return _cellBackgroundColorPalette.default;
65
65
  }
66
66
  });
67
- Object.defineProperty(exports, "cellBackgroundColorPaletteNew", {
68
- enumerable: true,
69
- get: function get() {
70
- return _cellBackgroundColorPaletteNew.default;
71
- }
72
- });
73
67
  Object.defineProperty(exports, "chartsColorPaletteTooltipMessages", {
74
68
  enumerable: true,
75
69
  get: function get() {
@@ -142,6 +136,12 @@ Object.defineProperty(exports, "panelBackgroundPalette", {
142
136
  return _panelBackgroundPalette.panelBackgroundPalette;
143
137
  }
144
138
  });
139
+ Object.defineProperty(exports, "panelBackgroundPaletteNew", {
140
+ enumerable: true,
141
+ get: function get() {
142
+ return _panelBackgroundPaletteNew.panelBackgroundPaletteNew;
143
+ }
144
+ });
145
145
  Object.defineProperty(exports, "textColorPalette", {
146
146
  enumerable: true,
147
147
  get: function get() {
@@ -175,9 +175,9 @@ var _utils = require("./ColorPalette/utils");
175
175
  var _getHighlightColorInNonActiveTheme = require("./ColorPalette/getHighlightColorInNonActiveTheme");
176
176
  var _getTextColorInNonActiveTheme = require("./ColorPalette/getTextColorInNonActiveTheme");
177
177
  var _cellBackgroundColorPalette = _interopRequireDefault(require("./ColorPalette/Palettes/cellBackgroundColorPalette"));
178
- var _cellBackgroundColorPaletteNew = _interopRequireDefault(require("./ColorPalette/Palettes/cellBackgroundColorPaletteNew"));
179
178
  var _paletteMessages = _interopRequireDefault(require("./ColorPalette/Palettes/paletteMessages"));
180
179
  var _panelBackgroundPalette = require("./ColorPalette/Palettes/panelBackgroundPalette");
180
+ var _panelBackgroundPaletteNew = require("./ColorPalette/Palettes/panelBackgroundPaletteNew");
181
181
  var _textColorPalette = require("./ColorPalette/Palettes/textColorPalette");
182
182
  var _textColorPaletteNew = require("./ColorPalette/Palettes/textColorPaletteNew");
183
183
  var _highlightColorPalette = require("./ColorPalette/Palettes/highlightColorPalette");
@@ -10,6 +10,8 @@ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/creat
10
10
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
11
  var _core = require("@popperjs/core");
12
12
  var _bindEventListener = require("bind-event-listener");
13
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
14
+ var _unsafeImperative = require("@atlaskit/popper/unsafe-imperative");
13
15
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
14
16
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
15
17
  var startingOffset = {
@@ -24,6 +26,12 @@ var endingOffset = {
24
26
  offset: [0, 8]
25
27
  }
26
28
  };
29
+ function getCreatePopper() {
30
+ if ((0, _platformFeatureFlags.fg)('platform-dst-popper-consolidation')) {
31
+ return _unsafeImperative.createPopper;
32
+ }
33
+ return _core.createPopper;
34
+ }
27
35
 
28
36
  /**
29
37
  * A tooltip component similar to "@atlaskit/tooltip" but built for vanilla scenarios
@@ -109,7 +117,7 @@ var VanillaTooltip = exports.VanillaTooltip = /*#__PURE__*/function () {
109
117
  return (0, _createClass2.default)(VanillaTooltip, [{
110
118
  key: "createPopperInstance",
111
119
  value: function createPopperInstance() {
112
- this.popperInstance = (0, _core.createPopper)(this.button, this.tooltip, {
120
+ this.popperInstance = getCreatePopper()(this.button, this.tooltip, {
113
121
  placement: 'top',
114
122
  modifiers: [startingOffset]
115
123
  });
@@ -1,4 +1,4 @@
1
- /* ViewMore.tsx generated by @compiled/babel-plugin v0.40.0 */
1
+ /* ViewMore.tsx generated by @compiled/babel-plugin v2.0.0 */
2
2
  import "./ViewMore.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* ExtensionFloatingLabel.tsx generated by @compiled/babel-plugin v0.40.0 */
1
+ /* ExtensionFloatingLabel.tsx generated by @compiled/babel-plugin v2.0.0 */
2
2
  import "./ExtensionFloatingLabel.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* UnknownMacroPlaceholder.tsx generated by @compiled/babel-plugin v0.40.0 */
1
+ /* UnknownMacroPlaceholder.tsx generated by @compiled/babel-plugin v2.0.0 */
2
2
  import "./UnknownMacroPlaceholder.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* PanelErrorIcon.tsx generated by @compiled/babel-plugin v0.40.0 */
1
+ /* PanelErrorIcon.tsx generated by @compiled/babel-plugin v2.0.0 */
2
2
  import "./PanelErrorIcon.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* PanelInfoIcon.tsx generated by @compiled/babel-plugin v0.40.0 */
1
+ /* PanelInfoIcon.tsx generated by @compiled/babel-plugin v2.0.0 */
2
2
  import "./PanelInfoIcon.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* PanelNoteIcon.tsx generated by @compiled/babel-plugin v0.40.0 */
1
+ /* PanelNoteIcon.tsx generated by @compiled/babel-plugin v2.0.0 */
2
2
  import "./PanelNoteIcon.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* PanelSuccessIcon.tsx generated by @compiled/babel-plugin v0.40.0 */
1
+ /* PanelSuccessIcon.tsx generated by @compiled/babel-plugin v2.0.0 */
2
2
  import "./PanelSuccessIcon.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* PanelWarningIcon.tsx generated by @compiled/babel-plugin v0.40.0 */
1
+ /* PanelWarningIcon.tsx generated by @compiled/babel-plugin v2.0.0 */
2
2
  import "./PanelWarningIcon.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -40,6 +40,11 @@ export const syncBlockMessages = defineMessages({
40
40
  defaultMessage: 'Synced block',
41
41
  description: 'Label which appears above the synced block when it is selected'
42
42
  },
43
+ sourceSyncedBlockLabel: {
44
+ id: 'fabric.editor.sourceSyncedBlock.label.text',
45
+ defaultMessage: 'Source synced block',
46
+ description: 'Label which identifies the editable source synced block when it is selected'
47
+ },
43
48
  unsyncedBlockLabel: {
44
49
  id: 'fabric.editor.unsyncedBlock.label.text',
45
50
  defaultMessage: 'Unsynced block',
@@ -200,6 +205,26 @@ export const syncBlockMessages = defineMessages({
200
205
  defaultMessage: 'You appear to be offline. Please connect to the internet to create synced content.',
201
206
  description: 'Description in flag which appears when a sync block cannot be created in offline mode'
202
207
  },
208
+ feedbackFlagTitle: {
209
+ id: 'editor-common.messages.syncBlock.feedbackFlagTitle',
210
+ defaultMessage: 'Help us improve Synced blocks',
211
+ description: 'Title of the flag inviting users to give feedback about synced blocks'
212
+ },
213
+ feedbackFlagDescription: {
214
+ id: 'editor-common.messages.syncBlock.feedbackFlagDescription',
215
+ defaultMessage: 'We’d love your feedback. This quick survey should take less than a minute.',
216
+ description: 'Description of the flag inviting users to give feedback about synced blocks'
217
+ },
218
+ feedbackFlagGiveFeedback: {
219
+ id: 'editor-common.messages.syncBlock.feedbackFlagGiveFeedback',
220
+ defaultMessage: 'Give feedback',
221
+ description: 'Action that opens the synced blocks feedback collector'
222
+ },
223
+ feedbackFlagNoThanks: {
224
+ id: 'editor-common.messages.syncBlock.feedbackFlagNoThanks',
225
+ defaultMessage: 'No thanks',
226
+ description: 'Action that dismisses the synced blocks feedback invitation'
227
+ },
203
228
  loadingSyncedContent: {
204
229
  id: 'fabric.editor.syncedBlockLoadingSyncedContent',
205
230
  defaultMessage: 'Loading synced content',
@@ -315,6 +340,11 @@ export const syncBlockMessages = defineMessages({
315
340
  defaultMessage: 'Copy and paste synced blocks to reuse in other locations.',
316
341
  description: 'Message shown in the synced location dropdown menu when no shared locations are found'
317
342
  },
343
+ syncedLocationDropdownActivationNoResults: {
344
+ id: 'editor-common.messages.syncBlock.syncedLocationDropdownActivationNoResults',
345
+ defaultMessage: 'To reuse content, copy and paste this block to sync to other locations',
346
+ description: 'Instruction shown in the activation synced locations dropdown when a synced block has no references. It explains how to create the first reference.'
347
+ },
318
348
  syncedLocationDropdownLearnMoreLink: {
319
349
  id: 'fabric.editor.syncedLocationDropdownLearnMoreLink',
320
350
  defaultMessage: 'Learn more about synced blocks',
@@ -14,7 +14,7 @@ const NETWORK_FAILURE_REGEX = /^network failure/i;
14
14
  const RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
15
15
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
16
16
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
17
- const packageVersion = "116.45.0";
17
+ const packageVersion = "116.47.0";
18
18
  const sanitiseSentryEvents = (data, _hint) => {
19
19
  // Remove URL as it has UGC
20
20
  // Ignored via go/ees007
@@ -14,7 +14,13 @@ export const BodiedSyncBlockSharedCssClassName = {
14
14
  prefix: bodiedPrefix,
15
15
  renderer: `${bodiedPrefix}__renderer`,
16
16
  content: `${bodiedPrefix}__content`,
17
- selectionInside: `${bodiedPrefix}__selection_inside`
17
+ selectionInside: `${bodiedPrefix}__selection_inside`,
18
+ // Applied by the node view when the block holds nothing but a single empty paragraph.
19
+ // Emptiness is derived from the ProseMirror document rather than the rendered DOM, because
20
+ // decorations (for example the selection marker's cursor widget) and ProseMirror's own
21
+ // separator/trailing-break hack nodes are injected as children of that paragraph and make
22
+ // DOM-shape heuristics unreliable. See EDITOR-8327.
23
+ empty: `${bodiedPrefix}__empty`
18
24
  };
19
25
 
20
26
  // Constant labelClassName value here has been inlined in css from EditorContentContainer, if you need to make
@@ -1,4 +1,4 @@
1
- /* NewSortingIcon.tsx generated by @compiled/babel-plugin v0.40.0 */
1
+ /* NewSortingIcon.tsx generated by @compiled/babel-plugin v2.0.0 */
2
2
  import "./NewSortingIcon.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -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 = "116.45.0";
17
+ const packageVersion = "116.47.0";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -1,8 +1,10 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- import React, { Component } from 'react';
2
+ import React, { Component, useLayoutEffect, useMemo, useRef, useState } from 'react';
3
3
  import Popper from 'popper.js';
4
4
  // eslint-disable-line import/extensions
5
5
  import rafSchedule from 'raf-schd';
6
+ import { fg } from '@atlaskit/platform-feature-flags';
7
+ import { Popper as WrappedPopper } from '@atlaskit/popper/popper';
6
8
  import { positionPropToPopperPosition } from './internal/helpers';
7
9
  const defaultState = {
8
10
  hasExtractedStyles: false,
@@ -19,10 +21,22 @@ const defaultState = {
19
21
  originalHeight: null,
20
22
  maxHeight: null
21
23
  };
24
+ function defaultOnPositioned() {}
25
+ const defaultProps = {
26
+ boundariesElement: 'viewport',
27
+ children: null,
28
+ content: null,
29
+ offset: '0, 0',
30
+ position: 'right middle',
31
+ zIndex: 400,
32
+ lockScroll: false,
33
+ isAlwaysFixed: false,
34
+ onPositioned: defaultOnPositioned
35
+ };
22
36
 
23
37
  // Ignored via go/ees005
24
38
  // eslint-disable-next-line @repo/internal/react/no-class-components
25
- export default class Layer extends Component {
39
+ class LegacyLayer extends Component {
26
40
  constructor(props) {
27
41
  super(props);
28
42
  _defineProperty(this, "targetRef", /*#__PURE__*/React.createRef());
@@ -172,14 +186,107 @@ export default class Layer extends Component {
172
186
  }
173
187
  }
174
188
  // working with extract-react-types
175
- _defineProperty(Layer, "defaultProps", {
176
- boundariesElement: 'viewport',
177
- children: null,
178
- content: null,
179
- offset: '0, 0',
180
- position: 'right middle',
181
- zIndex: 400,
182
- lockScroll: false,
183
- isAlwaysFixed: false,
184
- onPositioned: () => {}
185
- });
189
+ _defineProperty(LegacyLayer, "defaultProps", defaultProps);
190
+ function parseOffset({
191
+ offset
192
+ }) {
193
+ const [rawSkidding, rawDistance] = offset.split(',');
194
+ const skidding = Number.parseFloat(rawSkidding);
195
+ const distance = Number.parseFloat(rawDistance);
196
+ return [Number.isFinite(skidding) ? skidding : 0, Number.isFinite(distance) ? distance : 0];
197
+ }
198
+ const popperInteropModifiers = [{
199
+ name: 'flip',
200
+ enabled: false
201
+ }, {
202
+ name: 'preventOverflow',
203
+ enabled: false
204
+ }, {
205
+ name: 'hide',
206
+ enabled: false
207
+ }];
208
+ function usePopperInteropModifiers({
209
+ onPositioned
210
+ }) {
211
+ const onPositionedRef = useRef(onPositioned);
212
+ const hasPositionedRef = useRef(false);
213
+ useLayoutEffect(() => {
214
+ onPositionedRef.current = onPositioned;
215
+ }, [onPositioned]);
216
+ return useMemo(() => [...popperInteropModifiers, {
217
+ name: 'editorLayerFirstPositioned',
218
+ enabled: true,
219
+ // React Popper commits calculated styles in `write`; the legacy callback ran afterwards.
220
+ phase: 'afterWrite',
221
+ fn() {
222
+ if (hasPositionedRef.current) {
223
+ return;
224
+ }
225
+ hasPositionedRef.current = true;
226
+ onPositionedRef.current();
227
+ }
228
+ }], []);
229
+ }
230
+ function PopperInterop({
231
+ children,
232
+ content,
233
+ offset,
234
+ onPositioned,
235
+ position,
236
+ strategy
237
+ }) {
238
+ const targetRef = useRef(null);
239
+ const [referenceElement, setReferenceElement] = useState(null);
240
+ const modifiers = usePopperInteropModifiers({
241
+ onPositioned
242
+ });
243
+ // Popper v2 compares the offset prop by reference, so memoise to avoid re-running positioning every render.
244
+ const parsedOffset = useMemo(() => parseOffset({
245
+ offset
246
+ }), [offset]);
247
+ useLayoutEffect(() => {
248
+ var _targetRef$current;
249
+ const actualTarget = (_targetRef$current = targetRef.current) === null || _targetRef$current === void 0 ? void 0 : _targetRef$current.children[0];
250
+ setReferenceElement(actualTarget instanceof HTMLElement ? actualTarget : null);
251
+ }, [children]);
252
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
253
+ ref: targetRef
254
+ }, children), content && referenceElement ? /*#__PURE__*/React.createElement(WrappedPopper, {
255
+ modifiers: modifiers,
256
+ offset: parsedOffset,
257
+ placement: positionPropToPopperPosition(position),
258
+ referenceElement: referenceElement,
259
+ strategy: strategy
260
+ }, ({
261
+ ref,
262
+ style
263
+ }) => /*#__PURE__*/React.createElement("div", {
264
+ ref: ref,
265
+ style: style
266
+ }, content)) : /*#__PURE__*/React.createElement("div", null));
267
+ }
268
+
269
+ /** Selects the reversible Popper v1 or ADS wrapper implementation. */
270
+ export default function Layer({
271
+ children = defaultProps.children,
272
+ content = defaultProps.content,
273
+ offset = defaultProps.offset,
274
+ onPositioned = defaultProps.onPositioned,
275
+ position = defaultProps.position
276
+ }) {
277
+ if (fg('platform-dst-popper-consolidation')) {
278
+ return /*#__PURE__*/React.createElement(PopperInterop, {
279
+ content: content,
280
+ offset: offset,
281
+ onPositioned: onPositioned,
282
+ position: position,
283
+ strategy: "absolute"
284
+ }, children);
285
+ }
286
+ return /*#__PURE__*/React.createElement(LegacyLayer, {
287
+ content: content,
288
+ offset: offset,
289
+ onPositioned: onPositioned,
290
+ position: position
291
+ }, children);
292
+ }
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.40.0 */
1
+ /* index.tsx generated by @compiled/babel-plugin v2.0.0 */
2
2
  import "./index.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
@@ -1,4 +1,4 @@
1
- /* ButtonGroup.tsx generated by @compiled/babel-plugin v0.40.0 */
1
+ /* ButtonGroup.tsx generated by @compiled/babel-plugin v2.0.0 */
2
2
  import "./ButtonGroup.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
@@ -1,4 +1,4 @@
1
- /* DropdownTriggerWrapper.tsx generated by @compiled/babel-plugin v0.40.0 */
1
+ /* DropdownTriggerWrapper.tsx generated by @compiled/babel-plugin v2.0.0 */
2
2
  import "./DropdownTriggerWrapper.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
@@ -1,4 +1,4 @@
1
- /* DropdownWrapper.tsx generated by @compiled/babel-plugin v0.40.0 */
1
+ /* DropdownWrapper.tsx generated by @compiled/babel-plugin v2.0.0 */
2
2
  import "./DropdownWrapper.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
@@ -1,4 +1,4 @@
1
- /* ExpandIcon.tsx generated by @compiled/babel-plugin v0.40.0 */
1
+ /* ExpandIcon.tsx generated by @compiled/babel-plugin v2.0.0 */
2
2
  import "./ExpandIcon.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,4 +1,4 @@
1
- /* Separator.tsx generated by @compiled/babel-plugin v0.40.0 */
1
+ /* Separator.tsx generated by @compiled/babel-plugin v2.0.0 */
2
2
  import "./Separator.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -60,6 +60,11 @@ export const lightBackgroundPaletteTooltipMessages = defineMessages({
60
60
  defaultMessage: 'Bold yellow',
61
61
  description: 'The text is shown as a tooltip label for a color swatch in the editor background color picker when the user hovers over the bold yellow color option.'
62
62
  },
63
+ '#EFDD4E': {
64
+ id: 'fabric.theme.bold-yellow-new',
65
+ defaultMessage: 'Bold yellow',
66
+ description: 'The text is shown as a tooltip label for a color swatch in the editor background color picker when the user hovers over the bold yellow color option.'
67
+ },
63
68
  '#FFEBE6': {
64
69
  id: 'fabric.theme.subtle-red',
65
70
  defaultMessage: 'Subtle red',
@@ -104,50 +109,5 @@ export const lightBackgroundPaletteTooltipMessages = defineMessages({
104
109
  id: 'fabric.theme.bold-gray',
105
110
  defaultMessage: 'Bold gray',
106
111
  description: 'The text is shown as a tooltip label for a color swatch in the editor background color picker when the user hovers over the bold gray color option.'
107
- },
108
- '#EFFFD6': {
109
- id: 'fabric.theme.subtle-lime',
110
- defaultMessage: 'Subtle lime',
111
- description: 'The text is shown as a tooltip label for a color swatch in the editor background color picker when the user hovers over the subtle lime color option.'
112
- },
113
- '#D3F1A7': {
114
- id: 'fabric.theme.lime',
115
- defaultMessage: 'Lime',
116
- description: 'The text is shown as a tooltip label for a color swatch in the editor background color picker when the user hovers over the lime color option.'
117
- },
118
- '#BDE97C': {
119
- id: 'fabric.theme.bold-lime',
120
- defaultMessage: 'Bold lime',
121
- description: 'The text is shown as a tooltip label for a color swatch in the editor background color picker when the user hovers over the bold lime color option.'
122
- },
123
- '#FFF5DB': {
124
- id: 'fabric.theme.subtle-orange',
125
- defaultMessage: 'Subtle orange',
126
- description: 'The text is shown as a tooltip label for a color swatch in the editor background color picker when the user hovers over the subtle orange color option.'
127
- },
128
- '#FCE4A6': {
129
- id: 'fabric.theme.orange',
130
- defaultMessage: 'Orange',
131
- description: 'The text is shown as a tooltip label for a color swatch in the editor background color picker when the user hovers over the orange color option.'
132
- },
133
- '#FBD779': {
134
- id: 'fabric.theme.bold-orange',
135
- defaultMessage: 'Bold orange',
136
- description: 'The text is shown as a tooltip label for a color swatch in the editor background color picker when the user hovers over the bold orange color option.'
137
- },
138
- '#FFECF8': {
139
- id: 'fabric.theme.subtle-magenta',
140
- defaultMessage: 'Subtle magenta',
141
- description: 'The text is shown as a tooltip label for a color swatch in the editor background color picker when the user hovers over the subtle magenta color option.'
142
- },
143
- '#FDD0EC': {
144
- id: 'fabric.theme.magenta',
145
- defaultMessage: 'Magenta',
146
- description: 'The text is shown as a tooltip label for a color swatch in the editor background color picker when the user hovers over the magenta color option.'
147
- },
148
- '#FCB6E1': {
149
- id: 'fabric.theme.bold-magenta',
150
- defaultMessage: 'Bold magenta',
151
- description: 'The text is shown as a tooltip label for a color swatch in the editor background color picker when the user hovers over the bold magenta color option.'
152
112
  }
153
113
  });
@@ -150,66 +150,6 @@ const _default_1 = defineMessages({
150
150
  defaultMessage: 'Bold gray',
151
151
  description: 'Tooltip label for the bold gray color swatch displayed in the editor toolbar color palette when users select text or highlight colors.'
152
152
  },
153
- 'subtle-lime': {
154
- id: 'fabric.theme.subtle-lime',
155
- defaultMessage: 'Subtle lime',
156
- description: 'Tooltip label for the subtle lime color swatch displayed in the editor toolbar color palette when users select text or highlight colors.'
157
- },
158
- 'bold-lime': {
159
- id: 'fabric.theme.bold-lime',
160
- defaultMessage: 'Bold lime',
161
- description: 'Tooltip label for the bold lime color swatch displayed in the editor toolbar color palette when users select text or highlight colors.'
162
- },
163
- 'subtle-orange': {
164
- id: 'fabric.theme.subtle-orange',
165
- defaultMessage: 'Subtle orange',
166
- description: 'Tooltip label for the subtle orange color swatch displayed in the editor toolbar color palette when users select text or highlight colors.'
167
- },
168
- 'bold-orange': {
169
- id: 'fabric.theme.bold-orange',
170
- defaultMessage: 'Bold orange',
171
- description: 'Tooltip label for the bold orange color swatch displayed in the editor toolbar color palette when users select text or highlight colors.'
172
- },
173
- 'subtle-magenta': {
174
- id: 'fabric.theme.subtle-magenta',
175
- defaultMessage: 'Subtle magenta',
176
- description: 'Tooltip label for the subtle magenta color swatch displayed in the editor toolbar color palette when users select text or highlight colors.'
177
- },
178
- 'bold-magenta': {
179
- id: 'fabric.theme.bold-magenta',
180
- defaultMessage: 'Bold magenta',
181
- description: 'Tooltip label for the bold magenta color swatch displayed in the editor toolbar color palette when users select text or highlight colors.'
182
- },
183
- 'bold-blue': {
184
- id: 'fabric.theme.bold-blue',
185
- defaultMessage: 'Bold blue',
186
- description: 'Tooltip label for the bold blue color swatch displayed in the editor toolbar color palette when users select text or highlight colors.'
187
- },
188
- 'bold-teal': {
189
- id: 'fabric.theme.bold-teal',
190
- defaultMessage: 'Bold teal',
191
- description: 'Tooltip label for the bold teal color swatch displayed in the editor toolbar color palette when users select text or highlight colors.'
192
- },
193
- 'bold-green': {
194
- id: 'fabric.theme.bold-green',
195
- defaultMessage: 'Bold green',
196
- description: 'Tooltip label for the bold green color swatch displayed in the editor toolbar color palette when users select text or highlight colors.'
197
- },
198
- 'bold-yellow': {
199
- id: 'fabric.theme.bold-yellow',
200
- defaultMessage: 'Bold yellow',
201
- description: 'Tooltip label for the bold yellow color swatch displayed in the editor toolbar color palette when users select text or highlight colors.'
202
- },
203
- 'bold-red': {
204
- id: 'fabric.theme.bold-red',
205
- defaultMessage: 'Bold red',
206
- description: 'Tooltip label for the bold red color swatch displayed in the editor toolbar color palette when users select text or highlight colors.'
207
- },
208
- 'bold-purple': {
209
- id: 'fabric.theme.bold-purple',
210
- defaultMessage: 'Bold purple',
211
- description: 'Tooltip label for the bold purple color swatch displayed in the editor toolbar color palette when users select text or highlight colors.'
212
- },
213
153
  // Colors only used in highlight palette
214
154
  'no-color': {
215
155
  id: 'fabric.theme.no-color',