@atlaskit/editor-common 116.16.0 → 116.17.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,36 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 116.17.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`e27cc2a34b7c7`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e27cc2a34b7c7) -
8
+ Update the editor plus menu virtualized list accessible label under the
9
+ `platform_editor_plus_menu_aria_label` experiment.
10
+ - [`cc7e55c918e23`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/cc7e55c918e23) -
11
+ [ux] Adds info icon next to visually disabled table column sort buttons with a tooltip explaining
12
+ that sort won't work when merged cells present.
13
+ - Updated dependencies
14
+
15
+ ## 116.17.0
16
+
17
+ ### Minor Changes
18
+
19
+ - [`426eef1e61679`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/426eef1e61679) -
20
+ Add failure `reason`, HTTP `statusCode` and `benign` attributes to synced block fetch/subscribe
21
+ operational error analytics, so fetch failures can be broken down by cause (benign source-gone /
22
+ permission-denied vs genuine system failures) instead of regex-matching free text. Gated behind
23
+ `platform_editor_blocks_patch_3`; gate-off behaviour is unchanged.
24
+
25
+ ### Patch Changes
26
+
27
+ - [`eb16de0d842fa`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/eb16de0d842fa) -
28
+ Reconcile editor plugin APIs during gated preset reconfiguration so Markdown mode layout and
29
+ styling update correctly when converting between Markdown and live doc views.
30
+ - [`e20d01fe3d044`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e20d01fe3d044) -
31
+ Clean up platform_editor_add_code_block_localid now that code block local IDs are fully enabled.
32
+ - Updated dependencies
33
+
3
34
  ## 116.16.0
4
35
 
5
36
  ### Minor Changes
@@ -22,8 +22,8 @@ var codeBlockWrappedStates = exports.codeBlockWrappedStates = new WeakMap();
22
22
  var getDefaultCodeBlockAttrs = exports.getDefaultCodeBlockAttrs = function getDefaultCodeBlockAttrs(attrs) {
23
23
  var _attrs$localId;
24
24
  var localId = (_attrs$localId = attrs === null || attrs === void 0 ? void 0 : attrs.localId) !== null && _attrs$localId !== void 0 ? _attrs$localId :
25
- // eslint-disable-next-line @atlaskit/platform/no-preconditioning -- Auto-detection uses the q4 experiment, a kill switch, and the existing localId gate.
26
- (0, _expValEquals.expValEquals)('platform_editor_code_block_q4_lovability', 'isEnabled', true) && (0, _platformFeatureFlags.fg)('platform_editor_code_block_language_detection_flow') && (0, _platformFeatureFlags.fg)('platform_editor_add_code_block_localid') ? _adfSchema.uuid.generate() : undefined;
25
+ // eslint-disable-next-line @atlaskit/platform/no-preconditioning
26
+ (0, _expValEquals.expValEquals)('platform_editor_code_block_q4_lovability', 'isEnabled', true) && (0, _platformFeatureFlags.fg)('platform_editor_code_block_language_detection_flow') ? _adfSchema.uuid.generate() : undefined;
27
27
  var attrsWithLocalId = localId ? _objectSpread(_objectSpread({}, attrs), {}, {
28
28
  localId: localId
29
29
  }) : attrs;
@@ -11,6 +11,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
11
11
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
12
12
  var _react = _interopRequireWildcard(require("react"));
13
13
  var _react2 = require("@emotion/react");
14
+ var _reactIntl = require("react-intl");
14
15
  var _reactVirtualized = require("react-virtualized");
15
16
  var _AutoSizer = require("react-virtualized/dist/commonjs/AutoSizer");
16
17
  var _CellMeasurer = require("react-virtualized/dist/commonjs/CellMeasurer");
@@ -28,6 +29,7 @@ var _quickInsert = require("../../../quick-insert");
28
29
  var _constants = require("../../constants");
29
30
  var _useContainerWidth2 = _interopRequireDefault(require("../../hooks/use-container-width"));
30
31
  var _useFocus = _interopRequireDefault(require("../../hooks/use-focus"));
32
+ var _messages = _interopRequireDefault(require("../../messages"));
31
33
  var _types = require("../../types");
32
34
  var _EmptyState = _interopRequireDefault(require("./EmptyState"));
33
35
  var _getColumnCount = require("./getColumnCount");
@@ -191,6 +193,9 @@ var ElementListSingleColumn = function ElementListSingleColumn(props) {
191
193
  setFocusedCategoryIndex = props.setFocusedCategoryIndex,
192
194
  selectedCategoryIndex = props.selectedCategoryIndex,
193
195
  selectedItemIndex = props.selectedItemIndex;
196
+ var _useIntl = (0, _reactIntl.useIntl)(),
197
+ formatMessage = _useIntl.formatMessage;
198
+ var elementListAriaLabel = (0, _expValEquals.expValEquals)('platform_editor_plus_menu_aria_label', 'isEnabled', true) ? formatMessage(_messages.default.elementListAriaLabel) : undefined;
194
199
  var rowRenderer = (0, _react.useMemo)(function () {
195
200
  return function (_ref4) {
196
201
  var index = _ref4.index,
@@ -255,7 +260,8 @@ var ElementListSingleColumn = function ElementListSingleColumn(props) {
255
260
  height: height,
256
261
  overscanRowCount: 3,
257
262
  containerRole: "presentation",
258
- role: "listbox"
263
+ role: "listbox",
264
+ "aria-label": elementListAriaLabel
259
265
  // Ignored via go/ees005
260
266
  // eslint-disable-next-line react/jsx-props-no-spreading
261
267
  }, selectedItemIndex !== undefined && {
@@ -276,6 +282,9 @@ var ElementListMultipleColumns = function ElementListMultipleColumns(props) {
276
282
  setFocusedCategoryIndex = props.setFocusedCategoryIndex,
277
283
  selectedCategoryIndex = props.selectedCategoryIndex,
278
284
  selectedItemIndex = props.selectedItemIndex;
285
+ var _useIntl2 = (0, _reactIntl.useIntl)(),
286
+ formatMessage = _useIntl2.formatMessage;
287
+ var elementListAriaLabel = (0, _expValEquals.expValEquals)('platform_editor_plus_menu_aria_label', 'isEnabled', true) ? formatMessage(_messages.default.elementListAriaLabel) : undefined;
279
288
  var columnWidth = (containerWidth - _constants.ELEMENT_ITEM_PADDING * 2) / columnCount;
280
289
  var rowCount = Math.ceil(items.length / columnCount);
281
290
  var cellRenderer = (0, _react.useMemo)(function () {
@@ -343,6 +352,7 @@ var ElementListMultipleColumns = function ElementListMultipleColumns(props) {
343
352
  containerRole: "row",
344
353
  cellRenderer: cellRenderer,
345
354
  height: height,
355
+ "aria-label": elementListAriaLabel,
346
356
  width: containerWidth - _constants.ELEMENT_LIST_PADDING * 2 // containerWidth - padding on Left/Right (for focus outline)
347
357
  /**
348
358
  * Refresh Grid on WidthObserver value change.
@@ -16,6 +16,11 @@ var message = (0, _reactIntl.defineMessages)({
16
16
  defaultMessage: 'Search',
17
17
  description: 'The text is shown as placeholder text inside the search input field in the element browser. It prompts the user to type a query to filter available elements.'
18
18
  },
19
+ elementListAriaLabel: {
20
+ id: 'fabric.editor.elementbrowser.elementlist.ariaLabel',
21
+ defaultMessage: 'Select element',
22
+ description: 'The text is used as an aria-label for the element browser listbox. It provides an accessible name for screen readers to identify the list of elements that can be selected and inserted.'
23
+ },
19
24
  searchAriaLabel: {
20
25
  id: 'fabric.editor.elementbrowser.searchbar.ariaLabel',
21
26
  defaultMessage: 'Search',
@@ -316,6 +316,11 @@ var messages = exports.messages = (0, _reactIntl.defineMessages)({
316
316
  defaultMessage: "\u26A0\uFE0F You can't sort a table with merged cells",
317
317
  description: "Split your cells to enable this feature"
318
318
  },
319
+ canNotSortTableNoIcon: {
320
+ id: 'fabric.editor.canNotSortTableNoIcon',
321
+ defaultMessage: "You can't sort a table with merged cells",
322
+ description: "Split your cells to enable this feature"
323
+ },
319
324
  distributeColumns: {
320
325
  id: 'fabric.editor.distributeColumns',
321
326
  defaultMessage: "Distribute columns",
@@ -28,7 +28,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
28
28
  var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
29
29
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
30
30
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
31
- var packageVersion = "116.15.0";
31
+ var packageVersion = "116.17.0";
32
32
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
33
33
  // Remove URL as it has UGC
34
34
  // Ignored via go/ees007
@@ -309,6 +309,12 @@ var EditorPluginInjectionAPI = exports.EditorPluginInjectionAPI = /*#__PURE__*/f
309
309
  fireAnalyticsEvent = _ref6.fireAnalyticsEvent,
310
310
  appearance = _ref6.appearance;
311
311
  (0, _classCallCheck2.default)(this, EditorPluginInjectionAPI);
312
+ // Internal helper for preset reconfiguration. Some consumers memoize plugin
313
+ // APIs by the top-level proxy identity, so callers must invalidate that proxy
314
+ // when the registered plugin set changes.
315
+ (0, _defineProperty2.default)(this, "invalidateAPI", function () {
316
+ editorAPICache.delete(_this2);
317
+ });
312
318
  (0, _defineProperty2.default)(this, "onEditorViewUpdated", function (_ref7) {
313
319
  var newEditorState = _ref7.newEditorState,
314
320
  oldEditorState = _ref7.oldEditorState;
@@ -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 = "116.15.0";
27
+ var packageVersion = "116.17.0";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -12,8 +12,8 @@ export const codeBlockWrappedStates = new WeakMap();
12
12
  export const getDefaultCodeBlockAttrs = attrs => {
13
13
  var _attrs$localId;
14
14
  const localId = (_attrs$localId = attrs === null || attrs === void 0 ? void 0 : attrs.localId) !== null && _attrs$localId !== void 0 ? _attrs$localId :
15
- // eslint-disable-next-line @atlaskit/platform/no-preconditioning -- Auto-detection uses the q4 experiment, a kill switch, and the existing localId gate.
16
- expValEquals('platform_editor_code_block_q4_lovability', 'isEnabled', true) && fg('platform_editor_code_block_language_detection_flow') && fg('platform_editor_add_code_block_localid') ? uuid.generate() : undefined;
15
+ // eslint-disable-next-line @atlaskit/platform/no-preconditioning
16
+ expValEquals('platform_editor_code_block_q4_lovability', 'isEnabled', true) && fg('platform_editor_code_block_language_detection_flow') ? uuid.generate() : undefined;
17
17
  const attrsWithLocalId = localId ? {
18
18
  ...attrs,
19
19
  localId
@@ -8,6 +8,7 @@ import React, { Fragment, memo, useCallback, useEffect, useMemo, useState } from
8
8
 
9
9
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- Ignored via go/DSP-18766; jsx required at runtime for @jsxRuntime classic
10
10
  import { css, jsx } from '@emotion/react';
11
+ import { useIntl } from 'react-intl';
11
12
  import { Grid, List } from 'react-virtualized';
12
13
  import { AutoSizer } from 'react-virtualized/dist/commonjs/AutoSizer';
13
14
  import { CellMeasurer, CellMeasurerCache } from 'react-virtualized/dist/commonjs/CellMeasurer';
@@ -25,6 +26,7 @@ import { IconFallback } from '../../../quick-insert';
25
26
  import { ELEMENT_ITEM_HEIGHT, ELEMENT_ITEM_PADDING, ELEMENT_LIST_PADDING, SCROLLBAR_WIDTH } from '../../constants';
26
27
  import useContainerWidth from '../../hooks/use-container-width';
27
28
  import useFocus from '../../hooks/use-focus';
29
+ import commonMessages from '../../messages';
28
30
  import { Modes } from '../../types';
29
31
  import EmptyState from './EmptyState';
30
32
  import { getColumnCount } from './getColumnCount';
@@ -179,6 +181,10 @@ const ElementListSingleColumn = props => {
179
181
  selectedCategoryIndex,
180
182
  selectedItemIndex
181
183
  } = props;
184
+ const {
185
+ formatMessage
186
+ } = useIntl();
187
+ const elementListAriaLabel = expValEquals('platform_editor_plus_menu_aria_label', 'isEnabled', true) ? formatMessage(commonMessages.elementListAriaLabel) : undefined;
182
188
  const rowRenderer = useMemo(() => ({
183
189
  index,
184
190
  key,
@@ -242,7 +248,8 @@ const ElementListSingleColumn = props => {
242
248
  height: height,
243
249
  overscanRowCount: 3,
244
250
  containerRole: "presentation",
245
- role: "listbox"
251
+ role: "listbox",
252
+ "aria-label": elementListAriaLabel
246
253
  // Ignored via go/ees005
247
254
  // eslint-disable-next-line react/jsx-props-no-spreading
248
255
  }, selectedItemIndex !== undefined && {
@@ -265,6 +272,10 @@ const ElementListMultipleColumns = props => {
265
272
  selectedCategoryIndex,
266
273
  selectedItemIndex
267
274
  } = props;
275
+ const {
276
+ formatMessage
277
+ } = useIntl();
278
+ const elementListAriaLabel = expValEquals('platform_editor_plus_menu_aria_label', 'isEnabled', true) ? formatMessage(commonMessages.elementListAriaLabel) : undefined;
268
279
  const columnWidth = (containerWidth - ELEMENT_ITEM_PADDING * 2) / columnCount;
269
280
  const rowCount = Math.ceil(items.length / columnCount);
270
281
  const cellRenderer = useMemo(() => ({
@@ -331,6 +342,7 @@ const ElementListMultipleColumns = props => {
331
342
  containerRole: "row",
332
343
  cellRenderer: cellRenderer,
333
344
  height: height,
345
+ "aria-label": elementListAriaLabel,
334
346
  width: containerWidth - ELEMENT_LIST_PADDING * 2 // containerWidth - padding on Left/Right (for focus outline)
335
347
  /**
336
348
  * Refresh Grid on WidthObserver value change.
@@ -10,6 +10,11 @@ const message = defineMessages({
10
10
  defaultMessage: 'Search',
11
11
  description: 'The text is shown as placeholder text inside the search input field in the element browser. It prompts the user to type a query to filter available elements.'
12
12
  },
13
+ elementListAriaLabel: {
14
+ id: 'fabric.editor.elementbrowser.elementlist.ariaLabel',
15
+ defaultMessage: 'Select element',
16
+ description: 'The text is used as an aria-label for the element browser listbox. It provides an accessible name for screen readers to identify the list of elements that can be selected and inserted.'
17
+ },
13
18
  searchAriaLabel: {
14
19
  id: 'fabric.editor.elementbrowser.searchbar.ariaLabel',
15
20
  defaultMessage: 'Search',
@@ -310,6 +310,11 @@ export const messages = defineMessages({
310
310
  defaultMessage: `⚠️ You can't sort a table with merged cells`,
311
311
  description: `Split your cells to enable this feature`
312
312
  },
313
+ canNotSortTableNoIcon: {
314
+ id: 'fabric.editor.canNotSortTableNoIcon',
315
+ defaultMessage: `You can't sort a table with merged cells`,
316
+ description: `Split your cells to enable this feature`
317
+ },
313
318
  distributeColumns: {
314
319
  id: 'fabric.editor.distributeColumns',
315
320
  defaultMessage: `Distribute columns`,
@@ -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.15.0";
17
+ const packageVersion = "116.17.0";
18
18
  const sanitiseSentryEvents = (data, _hint) => {
19
19
  // Remove URL as it has UGC
20
20
  // Ignored via go/ees007
@@ -224,6 +224,12 @@ export class EditorPluginInjectionAPI {
224
224
  fireAnalyticsEvent,
225
225
  appearance
226
226
  }) {
227
+ // Internal helper for preset reconfiguration. Some consumers memoize plugin
228
+ // APIs by the top-level proxy identity, so callers must invalidate that proxy
229
+ // when the registered plugin set changes.
230
+ _defineProperty(this, "invalidateAPI", () => {
231
+ editorAPICache.delete(this);
232
+ });
227
233
  _defineProperty(this, "onEditorViewUpdated", ({
228
234
  newEditorState,
229
235
  oldEditorState
@@ -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.15.0";
17
+ const packageVersion = "116.17.0";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -16,8 +16,8 @@ export var codeBlockWrappedStates = new WeakMap();
16
16
  export var getDefaultCodeBlockAttrs = function getDefaultCodeBlockAttrs(attrs) {
17
17
  var _attrs$localId;
18
18
  var localId = (_attrs$localId = attrs === null || attrs === void 0 ? void 0 : attrs.localId) !== null && _attrs$localId !== void 0 ? _attrs$localId :
19
- // eslint-disable-next-line @atlaskit/platform/no-preconditioning -- Auto-detection uses the q4 experiment, a kill switch, and the existing localId gate.
20
- expValEquals('platform_editor_code_block_q4_lovability', 'isEnabled', true) && fg('platform_editor_code_block_language_detection_flow') && fg('platform_editor_add_code_block_localid') ? uuid.generate() : undefined;
19
+ // eslint-disable-next-line @atlaskit/platform/no-preconditioning
20
+ expValEquals('platform_editor_code_block_q4_lovability', 'isEnabled', true) && fg('platform_editor_code_block_language_detection_flow') ? uuid.generate() : undefined;
21
21
  var attrsWithLocalId = localId ? _objectSpread(_objectSpread({}, attrs), {}, {
22
22
  localId: localId
23
23
  }) : attrs;
@@ -9,6 +9,7 @@ import React, { Fragment, memo, useCallback, useEffect, useMemo, useState } from
9
9
 
10
10
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- Ignored via go/DSP-18766; jsx required at runtime for @jsxRuntime classic
11
11
  import { css, jsx } from '@emotion/react';
12
+ import { useIntl } from 'react-intl';
12
13
  import { Grid, List } from 'react-virtualized';
13
14
  import { AutoSizer } from 'react-virtualized/dist/commonjs/AutoSizer';
14
15
  import { CellMeasurer, CellMeasurerCache } from 'react-virtualized/dist/commonjs/CellMeasurer';
@@ -26,6 +27,7 @@ import { IconFallback } from '../../../quick-insert';
26
27
  import { ELEMENT_ITEM_HEIGHT, ELEMENT_ITEM_PADDING, ELEMENT_LIST_PADDING, SCROLLBAR_WIDTH } from '../../constants';
27
28
  import useContainerWidth from '../../hooks/use-container-width';
28
29
  import useFocus from '../../hooks/use-focus';
30
+ import commonMessages from '../../messages';
29
31
  import { Modes } from '../../types';
30
32
  import EmptyState from './EmptyState';
31
33
  import { getColumnCount } from './getColumnCount';
@@ -180,6 +182,9 @@ var ElementListSingleColumn = function ElementListSingleColumn(props) {
180
182
  setFocusedCategoryIndex = props.setFocusedCategoryIndex,
181
183
  selectedCategoryIndex = props.selectedCategoryIndex,
182
184
  selectedItemIndex = props.selectedItemIndex;
185
+ var _useIntl = useIntl(),
186
+ formatMessage = _useIntl.formatMessage;
187
+ var elementListAriaLabel = expValEquals('platform_editor_plus_menu_aria_label', 'isEnabled', true) ? formatMessage(commonMessages.elementListAriaLabel) : undefined;
183
188
  var rowRenderer = useMemo(function () {
184
189
  return function (_ref4) {
185
190
  var index = _ref4.index,
@@ -244,7 +249,8 @@ var ElementListSingleColumn = function ElementListSingleColumn(props) {
244
249
  height: height,
245
250
  overscanRowCount: 3,
246
251
  containerRole: "presentation",
247
- role: "listbox"
252
+ role: "listbox",
253
+ "aria-label": elementListAriaLabel
248
254
  // Ignored via go/ees005
249
255
  // eslint-disable-next-line react/jsx-props-no-spreading
250
256
  }, selectedItemIndex !== undefined && {
@@ -265,6 +271,9 @@ var ElementListMultipleColumns = function ElementListMultipleColumns(props) {
265
271
  setFocusedCategoryIndex = props.setFocusedCategoryIndex,
266
272
  selectedCategoryIndex = props.selectedCategoryIndex,
267
273
  selectedItemIndex = props.selectedItemIndex;
274
+ var _useIntl2 = useIntl(),
275
+ formatMessage = _useIntl2.formatMessage;
276
+ var elementListAriaLabel = expValEquals('platform_editor_plus_menu_aria_label', 'isEnabled', true) ? formatMessage(commonMessages.elementListAriaLabel) : undefined;
268
277
  var columnWidth = (containerWidth - ELEMENT_ITEM_PADDING * 2) / columnCount;
269
278
  var rowCount = Math.ceil(items.length / columnCount);
270
279
  var cellRenderer = useMemo(function () {
@@ -332,6 +341,7 @@ var ElementListMultipleColumns = function ElementListMultipleColumns(props) {
332
341
  containerRole: "row",
333
342
  cellRenderer: cellRenderer,
334
343
  height: height,
344
+ "aria-label": elementListAriaLabel,
335
345
  width: containerWidth - ELEMENT_LIST_PADDING * 2 // containerWidth - padding on Left/Right (for focus outline)
336
346
  /**
337
347
  * Refresh Grid on WidthObserver value change.
@@ -10,6 +10,11 @@ var message = defineMessages({
10
10
  defaultMessage: 'Search',
11
11
  description: 'The text is shown as placeholder text inside the search input field in the element browser. It prompts the user to type a query to filter available elements.'
12
12
  },
13
+ elementListAriaLabel: {
14
+ id: 'fabric.editor.elementbrowser.elementlist.ariaLabel',
15
+ defaultMessage: 'Select element',
16
+ description: 'The text is used as an aria-label for the element browser listbox. It provides an accessible name for screen readers to identify the list of elements that can be selected and inserted.'
17
+ },
13
18
  searchAriaLabel: {
14
19
  id: 'fabric.editor.elementbrowser.searchbar.ariaLabel',
15
20
  defaultMessage: 'Search',
@@ -310,6 +310,11 @@ export var messages = defineMessages({
310
310
  defaultMessage: "\u26A0\uFE0F You can't sort a table with merged cells",
311
311
  description: "Split your cells to enable this feature"
312
312
  },
313
+ canNotSortTableNoIcon: {
314
+ id: 'fabric.editor.canNotSortTableNoIcon',
315
+ defaultMessage: "You can't sort a table with merged cells",
316
+ description: "Split your cells to enable this feature"
317
+ },
313
318
  distributeColumns: {
314
319
  id: 'fabric.editor.distributeColumns',
315
320
  defaultMessage: "Distribute columns",
@@ -20,7 +20,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
20
20
  var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
21
21
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
22
22
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
23
- var packageVersion = "116.15.0";
23
+ var packageVersion = "116.17.0";
24
24
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
25
25
  // Remove URL as it has UGC
26
26
  // Ignored via go/ees007
@@ -295,6 +295,12 @@ export var EditorPluginInjectionAPI = /*#__PURE__*/function () {
295
295
  fireAnalyticsEvent = _ref6.fireAnalyticsEvent,
296
296
  appearance = _ref6.appearance;
297
297
  _classCallCheck(this, EditorPluginInjectionAPI);
298
+ // Internal helper for preset reconfiguration. Some consumers memoize plugin
299
+ // APIs by the top-level proxy identity, so callers must invalidate that proxy
300
+ // when the registered plugin set changes.
301
+ _defineProperty(this, "invalidateAPI", function () {
302
+ editorAPICache.delete(_this2);
303
+ });
298
304
  _defineProperty(this, "onEditorViewUpdated", function (_ref7) {
299
305
  var newEditorState = _ref7.newEditorState,
300
306
  oldEditorState = _ref7.oldEditorState;
@@ -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 = "116.15.0";
24
+ var packageVersion = "116.17.0";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
@@ -3,6 +3,17 @@ import type { ExperienceEventPayload } from './experience-events';
3
3
  import type { InsertSourceSyncedBlockPayload } from './insert-events';
4
4
  import type { PasteSource } from './paste-events';
5
5
  import type { OperationalAEP, TrackAEP } from './utils';
6
+ /**
7
+ * Categorical failure reason emitted on synced-block operational error events.
8
+ *
9
+ * The write path (EDITOR-7796) emits the {@link SyncBlockError} enum values plus
10
+ * `'unknown'`. The fetch/subscribe read path (EDITOR-7862) additionally emits
11
+ * read-path-specific buckets (benign source-state transitions, permission outcomes,
12
+ * WebSocket lifecycle, and client-side readiness). Kept as a string union here so the
13
+ * analytics event schema is the single source of truth and the provider package can map
14
+ * to it without `editor-common` depending on the provider.
15
+ */
16
+ export type SyncedBlockErrorReasonAttribute = 'errored' | 'not_found' | 'forbidden' | 'invalid_request' | 'rate_limited' | 'conflict' | 'server_error' | 'invalid_content' | 'offline' | 'unpublished' | 'aborted' | 'entity_not_found' | 'unknown' | 'source_deleted' | 'source_unpublished' | 'source_unsynced' | 'source_not_found' | 'permission_denied' | 'unauthenticated' | 'websocket_drop' | 'websocket_exhausted' | 'network' | 'data_provider_not_ready';
6
17
  type SyncedBlockErrorAttributes = {
7
18
  error: string;
8
19
  resourceId?: string;
@@ -11,6 +22,20 @@ type SyncedBlockErrorAttributes = {
11
22
  * Always optional because batch / subscription init paths fire without a `resourceId`.
12
23
  */
13
24
  sourceProduct?: string;
25
+ /**
26
+ * Categorical failure cause for dashboard grouping. Only emitted when the
27
+ * `platform_editor_blocks_patch_3` gate is enabled (EDITOR-7796 / EDITOR-7862).
28
+ */
29
+ reason?: SyncedBlockErrorReasonAttribute;
30
+ /** Backend HTTP status code when the failure came from a `BlockError`. */
31
+ statusCode?: number;
32
+ /**
33
+ * Whether the failure reason is a benign/working-as-designed outcome (e.g. the source
34
+ * was intentionally deleted/unpublished, or permission denied) rather than a genuine
35
+ * system failure. Lets the dashboard compute a true error rate without free-text regex.
36
+ * Only emitted on fetch/subscribe error events when the gate is enabled (EDITOR-7862).
37
+ */
38
+ benign?: boolean;
14
39
  };
15
40
  type SyncedBlockSuccessAttributes = {
16
41
  blockInstanceId?: string;
@@ -1,7 +1,7 @@
1
- type MessageKeys = 'assistiveTextDefault' | 'assistiveTextResult' | 'elementAfterInputMessage' | 'placeHolderMessage' | 'searchAriaLabel' | 'searchAriaLabelNew';
1
+ type MessageKeys = 'assistiveTextDefault' | 'assistiveTextResult' | 'elementAfterInputMessage' | 'elementListAriaLabel' | 'placeHolderMessage' | 'searchAriaLabel' | 'searchAriaLabelNew';
2
2
  declare const message: Record<MessageKeys, {
3
- id: string;
4
3
  defaultMessage: string;
5
4
  description?: string;
5
+ id: string;
6
6
  }>;
7
7
  export default message;
@@ -44,6 +44,11 @@ export declare const messages: {
44
44
  description: string;
45
45
  id: string;
46
46
  };
47
+ canNotSortTableNoIcon: {
48
+ defaultMessage: string;
49
+ description: string;
50
+ id: string;
51
+ };
47
52
  cellAlignment: {
48
53
  defaultMessage: string;
49
54
  description: string;
@@ -58,6 +58,7 @@ export declare class EditorPluginInjectionAPI implements PluginInjectionAPIDefin
58
58
  }>;
59
59
  private createAPI;
60
60
  api(): GenericAPIWithCore;
61
+ invalidateAPI: () => void;
61
62
  onEditorViewUpdated: ({ newEditorState, oldEditorState }: EditorStateDiff) => void;
62
63
  onEditorPluginInitialized: (plugin: NextEditorPluginInitializedType) => void;
63
64
  retainPlugins: (keptPluginNames: ReadonlySet<string>) => string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "116.16.0",
3
+ "version": "116.17.1",
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/"
@@ -37,7 +37,7 @@
37
37
  "@atlaskit/analytics-next": "^12.1.0",
38
38
  "@atlaskit/atlassian-context": "^1.0.0",
39
39
  "@atlaskit/browser-apis": "^1.1.0",
40
- "@atlaskit/button": "^24.2.0",
40
+ "@atlaskit/button": "^24.3.0",
41
41
  "@atlaskit/codemod-utils": "^5.0.0",
42
42
  "@atlaskit/css": "^1.0.0",
43
43
  "@atlaskit/custom-steps": "^1.0.0",
@@ -68,7 +68,7 @@
68
68
  "@atlaskit/onboarding": "^15.1.0",
69
69
  "@atlaskit/platform-feature-flags": "^2.0.0",
70
70
  "@atlaskit/platform-feature-flags-react": "^1.1.0",
71
- "@atlaskit/primitives": "^20.1.0",
71
+ "@atlaskit/primitives": "^20.2.0",
72
72
  "@atlaskit/profilecard": "^26.4.0",
73
73
  "@atlaskit/prosemirror-history": "^1.0.0",
74
74
  "@atlaskit/react-compiler-gating": "^0.2.0",
@@ -80,8 +80,8 @@
80
80
  "@atlaskit/task-decision": "^21.4.0",
81
81
  "@atlaskit/teams-app-config": "^2.1.0",
82
82
  "@atlaskit/textfield": "^9.1.0",
83
- "@atlaskit/tmp-editor-statsig": "^114.3.0",
84
- "@atlaskit/tokens": "^15.1.0",
83
+ "@atlaskit/tmp-editor-statsig": "^114.5.0",
84
+ "@atlaskit/tokens": "^15.2.0",
85
85
  "@atlaskit/tooltip": "^23.1.0",
86
86
  "@atlaskit/width-detector": "^6.1.0",
87
87
  "@babel/runtime": "^7.0.0",
@@ -260,9 +260,6 @@
260
260
  "platform_editor_ai_selection_local_ids": {
261
261
  "type": "boolean"
262
262
  },
263
- "platform_editor_add_code_block_localid": {
264
- "type": "boolean"
265
- },
266
263
  "platform_editor_code_block_language_detection_flow": {
267
264
  "type": "boolean"
268
265
  }