@atlaskit/editor-common 105.10.0 → 105.11.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 (45) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/dist/cjs/annotation/index.js +6 -0
  3. package/dist/cjs/doc-utils/editor-use-only.js +3 -14
  4. package/dist/cjs/extensions/extension-handlers.js +2 -2
  5. package/dist/cjs/keymaps/index.js +4 -3
  6. package/dist/cjs/messages/breakout.js +5 -0
  7. package/dist/cjs/messages/toolbar.js +5 -0
  8. package/dist/cjs/monitoring/error.js +1 -1
  9. package/dist/cjs/resizer/Resizer.js +6 -1
  10. package/dist/cjs/styles/shared/table.js +1 -1
  11. package/dist/cjs/ui/DropList/index.js +1 -1
  12. package/dist/cjs/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +30 -4
  13. package/dist/es2019/annotation/index.js +6 -0
  14. package/dist/es2019/doc-utils/editor-use-only.js +3 -14
  15. package/dist/es2019/extensions/extension-handlers.js +2 -2
  16. package/dist/es2019/keymaps/index.js +1 -0
  17. package/dist/es2019/messages/breakout.js +5 -0
  18. package/dist/es2019/messages/toolbar.js +5 -0
  19. package/dist/es2019/monitoring/error.js +1 -1
  20. package/dist/es2019/resizer/Resizer.js +7 -1
  21. package/dist/es2019/styles/shared/table.js +5 -0
  22. package/dist/es2019/ui/DropList/index.js +1 -1
  23. package/dist/es2019/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +29 -5
  24. package/dist/esm/annotation/index.js +6 -0
  25. package/dist/esm/doc-utils/editor-use-only.js +3 -14
  26. package/dist/esm/extensions/extension-handlers.js +2 -2
  27. package/dist/esm/keymaps/index.js +1 -0
  28. package/dist/esm/messages/breakout.js +5 -0
  29. package/dist/esm/messages/toolbar.js +5 -0
  30. package/dist/esm/monitoring/error.js +1 -1
  31. package/dist/esm/resizer/Resizer.js +6 -1
  32. package/dist/esm/styles/shared/table.js +1 -1
  33. package/dist/esm/ui/DropList/index.js +1 -1
  34. package/dist/esm/ui-menu/ToolbarArrowKeyNavigationProvider/index.js +31 -5
  35. package/dist/types/analytics/types/offline-editing-event.d.ts +1 -0
  36. package/dist/types/annotation/index.d.ts +9 -1
  37. package/dist/types/keymaps/index.d.ts +1 -0
  38. package/dist/types/messages/breakout.d.ts +5 -0
  39. package/dist/types/messages/toolbar.d.ts +5 -0
  40. package/dist/types-ts4.5/analytics/types/offline-editing-event.d.ts +1 -0
  41. package/dist/types-ts4.5/annotation/index.d.ts +9 -1
  42. package/dist/types-ts4.5/keymaps/index.d.ts +1 -0
  43. package/dist/types-ts4.5/messages/breakout.d.ts +5 -0
  44. package/dist/types-ts4.5/messages/toolbar.d.ts +5 -0
  45. package/package.json +9 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,45 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 105.11.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#157348](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/157348)
8
+ [`2745ba38d05fd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2745ba38d05fd) -
9
+ Implemented the new manager set selection and hover APIs. This will allow anyone with access to
10
+ the annotations manager the ability to control when/what annotation is selected/hovered.
11
+ - Updated dependencies
12
+
13
+ ## 105.11.0
14
+
15
+ ### Minor Changes
16
+
17
+ - [#160500](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/160500)
18
+ [`c359a92c058b0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c359a92c058b0) -
19
+ [ux] EDITOR-713 Add borders to panel when they are nested in table
20
+
21
+ ### Patch Changes
22
+
23
+ - [#160017](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/160017)
24
+ [`c0ea9c5a5156b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c0ea9c5a5156b) -
25
+ ED-27999 - Offline Editing, update type for analytics payload.
26
+ - [#159336](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/159336)
27
+ [`0f0a3a5e7e218`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0f0a3a5e7e218) -
28
+ [EDITOR-793] Added changes to reflect experiment quickstart command
29
+ - [#161016](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/161016)
30
+ [`5edd5fccf1a76`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5edd5fccf1a76) -
31
+ ENGHEALTH-28085: Added aria label for resize handle
32
+ - Updated dependencies
33
+
34
+ ## 105.10.1
35
+
36
+ ### Patch Changes
37
+
38
+ - [#159090](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/159090)
39
+ [`9cbae97c20f84`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9cbae97c20f84) -
40
+ Reduces rerenders of text formatting options and the toolbar when it is docked to top.
41
+ - Updated dependencies
42
+
3
43
  ## 105.10.0
4
44
 
5
45
  ### Minor Changes
@@ -44,6 +44,12 @@ var AnnotationUpdateEmitter = exports.AnnotationUpdateEmitter = /*#__PURE__*/fun
44
44
  /*
45
45
  * This is the public interface for the AnnotationManager. It provides methods for interacting with the manager.
46
46
  */
47
+ /**
48
+ * This is a factory method which creates a new instance of the AnnotationManager.
49
+ *
50
+ * @example
51
+ * const annotationManager: AnnotationManager = createAnnotationManager();
52
+ */
47
53
  function createAnnotationManager() {
48
54
  return new _manager.SharedAnnotationManager();
49
55
  }
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.createEditorUseOnlyNotice = createEditorUseOnlyNotice;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var _link = _interopRequireDefault(require("@atlaskit/link"));
10
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
11
10
  var _sectionMessage = _interopRequireDefault(require("@atlaskit/section-message"));
12
11
  /* eslint-disable @atlaskit/design-system/use-primitives-text */
13
12
 
@@ -17,26 +16,16 @@ function AlternativePackagesMessage(_ref) {
17
16
  return null;
18
17
  }
19
18
  if (alternatePackages.length === 1) {
20
- return /*#__PURE__*/_react.default.createElement("p", null, "Consider using", ' ', (0, _platformFeatureFlags.fg)('dst-a11y__replace-anchor-with-link__editor') ? /*#__PURE__*/_react.default.createElement(_link.default, {
19
+ return /*#__PURE__*/_react.default.createElement("p", null, "Consider using ", /*#__PURE__*/_react.default.createElement(_link.default, {
21
20
  href: alternatePackages[0].link
22
- }, alternatePackages[0].name) :
23
- /*#__PURE__*/
24
- // eslint-disable-next-line @atlaskit/design-system/no-html-anchor
25
- _react.default.createElement("a", {
26
- href: alternatePackages[0].link
27
- }, alternatePackages[0].name), "instead.");
21
+ }, alternatePackages[0].name), ' ', "instead.");
28
22
  }
29
23
  return /*#__PURE__*/_react.default.createElement("p", null, "Consider using one of these packages instead:", /*#__PURE__*/_react.default.createElement("ul", null, alternatePackages.map(function (p) {
30
24
  return (
31
25
  /*#__PURE__*/
32
26
  // Ignored via go/ees005
33
27
  // eslint-disable-next-line react/jsx-key
34
- _react.default.createElement("li", null, (0, _platformFeatureFlags.fg)('dst-a11y__replace-anchor-with-link__editor') ? /*#__PURE__*/_react.default.createElement(_link.default, {
35
- href: p.link
36
- }, p.name) :
37
- /*#__PURE__*/
38
- // eslint-disable-next-line @atlaskit/design-system/no-html-anchor
39
- _react.default.createElement("a", {
28
+ _react.default.createElement("li", null, /*#__PURE__*/_react.default.createElement(_link.default, {
40
29
  href: p.link
41
30
  }, p.name))
42
31
  );
@@ -126,9 +126,9 @@ function getNodeRenderer(extensionProvider, extensionType, extensionKey) {
126
126
  var preloaded = maybePromise === null || maybePromise === void 0 || (_renderSync = (_ref = maybePromise).renderSync) === null || _renderSync === void 0 ? void 0 : _renderSync.call(_ref);
127
127
  // Only product implemented preloading will return sync result
128
128
  // However the out-of-box won't handle this. Confluence uses a custom implementation
129
- return preloaded
129
+ return preloaded ?
130
130
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
131
- ? (0, _manifestHelpers.resolveImportSync)(preloaded) : (0, _manifestHelpers.resolveImport)(maybePromise.render());
131
+ (0, _manifestHelpers.resolveImportSync)(preloaded) : (0, _manifestHelpers.resolveImport)(maybePromise.render());
132
132
  }
133
133
  } else {
134
134
  return getExtensionModuleNode(extensionProvider, extensionType, extensionKey).then(function (node) {
@@ -78,7 +78,7 @@ Object.defineProperty(exports, "UP", {
78
78
  return _consts.UP;
79
79
  }
80
80
  });
81
- exports.backspace = exports.applyYellowHighlight = exports.altPaste = exports.alignRight = exports.alignLeft = exports.alignCenter = exports.addRowBeforeVO = exports.addRowBefore = exports.addRowAfterVO = exports.addRowAfter = exports.addLink = exports.addInlineComment = exports.addColumnBeforeVO = exports.addColumnBefore = exports.addColumnAfterVO = exports.addColumnAfter = exports.addAltText = exports.activateVideoControls = void 0;
81
+ exports.backspace = exports.askAIQuickInsert = exports.applyYellowHighlight = exports.altPaste = exports.alignRight = exports.alignLeft = exports.alignCenter = exports.addRowBeforeVO = exports.addRowBefore = exports.addRowAfterVO = exports.addRowAfter = exports.addLink = exports.addInlineComment = exports.addColumnBeforeVO = exports.addColumnBefore = exports.addColumnAfterVO = exports.addColumnAfter = exports.addAltText = exports.activateVideoControls = void 0;
82
82
  exports.bindKeymapArrayWithCommand = bindKeymapArrayWithCommand;
83
83
  exports.bindKeymapWithCommand = bindKeymapWithCommand;
84
84
  exports.bindKeymapWithEditorCommand = bindKeymapWithEditorCommand;
@@ -102,8 +102,8 @@ Object.defineProperty(exports, "keymap", {
102
102
  exports.makeKeyMapArrayWithCommon = makeKeyMapArrayWithCommon;
103
103
  exports.makeKeyMapWithCommon = makeKeyMapWithCommon;
104
104
  exports.makeKeymap = makeKeymap;
105
- exports.splitCodeBlock = exports.space = exports.showElementDragHandle = exports.shiftTab = exports.shiftEnter = exports.shiftBackspace = exports.shiftArrowUp = exports.setNormalText = exports.selectTable = exports.selectRow = exports.selectColumn = exports.redoAlt = exports.redo = exports.previousCell = exports.pastePlainText = exports.paste = exports.outdentList = exports.outdent = exports.openHelp = exports.nextCell = exports.navToFloatingToolbar = exports.navToEditorToolbar = exports.moveUp = exports.moveRowUp = exports.moveRowDown = exports.moveRight = exports.moveLeft = exports.moveDown = exports.moveColumnRight = exports.moveColumnLeft = void 0;
106
- exports.toggleUnderline = exports.toggleTaskItemCheckbox = exports.toggleTable = exports.toggleSuperscript = exports.toggleSubscript = exports.toggleStrikethrough = exports.toggleOrderedList = exports.toggleItalic = exports.toggleHighlightPalette = exports.toggleHeading6 = exports.toggleHeading5 = exports.toggleHeading4 = exports.toggleHeading3 = exports.toggleHeading2 = exports.toggleHeading1 = exports.toggleCode = exports.toggleBulletList = exports.toggleBold = exports.toggleBlockQuote = exports.tab = exports.submit = exports.startColumnResizing = exports.splitListItem = void 0;
105
+ exports.space = exports.showElementDragHandle = exports.shiftTab = exports.shiftEnter = exports.shiftBackspace = exports.shiftArrowUp = exports.setNormalText = exports.selectTable = exports.selectRow = exports.selectColumn = exports.redoAlt = exports.redo = exports.previousCell = exports.pastePlainText = exports.paste = exports.outdentList = exports.outdent = exports.openHelp = exports.nextCell = exports.navToFloatingToolbar = exports.navToEditorToolbar = exports.moveUp = exports.moveRowUp = exports.moveRowDown = exports.moveRight = exports.moveLeft = exports.moveDown = exports.moveColumnRight = exports.moveColumnLeft = void 0;
106
+ exports.toggleUnderline = exports.toggleTaskItemCheckbox = exports.toggleTable = exports.toggleSuperscript = exports.toggleSubscript = exports.toggleStrikethrough = exports.toggleOrderedList = exports.toggleItalic = exports.toggleHighlightPalette = exports.toggleHeading6 = exports.toggleHeading5 = exports.toggleHeading4 = exports.toggleHeading3 = exports.toggleHeading2 = exports.toggleHeading1 = exports.toggleCode = exports.toggleBulletList = exports.toggleBold = exports.toggleBlockQuote = exports.tab = exports.submit = exports.startColumnResizing = exports.splitListItem = exports.splitCodeBlock = void 0;
107
107
  exports.tooltip = tooltip;
108
108
  exports.undo = void 0;
109
109
  var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
@@ -126,6 +126,7 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
126
126
  var addAltText = exports.addAltText = makeKeyMapWithCommon('Add Alt Text', 'Mod-Alt-y');
127
127
  var navToEditorToolbar = exports.navToEditorToolbar = makeKeyMapWithCommon('Navigate to editor toolbar', 'Alt-F9');
128
128
  var navToFloatingToolbar = exports.navToFloatingToolbar = makeKeyMapWithCommon('Navigate to floating toolbar', 'Alt-F10');
129
+ var askAIQuickInsert = exports.askAIQuickInsert = makeKeyMapWithCommon('Ask AI', "Mod-'");
129
130
  var toggleBold = exports.toggleBold = makeKeyMapWithCommon('Bold', 'Mod-b');
130
131
  var toggleItalic = exports.toggleItalic = makeKeyMapWithCommon('Italic', 'Mod-i');
131
132
  var toggleUnderline = exports.toggleUnderline = makeKeyMapWithCommon('Underline', 'Mod-u');
@@ -15,5 +15,10 @@ var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
15
15
  id: 'fabric.editor.breakoutWideWidthLabel',
16
16
  defaultMessage: 'Wide',
17
17
  description: 'Resize current element to wide mode'
18
+ },
19
+ resizeHandle: {
20
+ id: 'fabric.editor.resizeHandle',
21
+ defaultMessage: 'Resize handle',
22
+ description: 'Resize handle'
18
23
  }
19
24
  });
@@ -110,5 +110,10 @@ var toolbarMessages = exports.toolbarMessages = (0, _reactIntlNext.defineMessage
110
110
  id: 'fabric.editor.navigate.toolbar.floating',
111
111
  defaultMessage: 'Navigate to floating toolbar',
112
112
  description: 'Navigate to a floating toolbar for relevant nodes (e.g. tables or panels).'
113
+ },
114
+ askAI: {
115
+ id: 'fabric.editor.navigate.toolbar.askAI',
116
+ defaultMessage: 'Ask AI',
117
+ description: 'Open the AI panel to ask a question or generate content.'
113
118
  }
114
119
  });
@@ -17,7 +17,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
17
17
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
18
18
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
19
19
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
20
- var packageVersion = "105.10.0";
20
+ var packageVersion = "105.11.1";
21
21
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
22
22
  // Remove URL as it has UGC
23
23
  // Ignored via go/ees007
@@ -13,9 +13,11 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
13
13
  var _react = _interopRequireWildcard(require("react"));
14
14
  var _classnames3 = _interopRequireDefault(require("classnames"));
15
15
  var _reResizable = require("re-resizable");
16
+ var _reactIntlNext = require("react-intl-next");
16
17
  var _primitives = require("@atlaskit/primitives");
17
18
  var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
18
19
  var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
20
+ var _breakout = require("../messages/breakout");
19
21
  var _resizer = require("../styles/shared/resizer");
20
22
  var _excluded = ["width", "children", "handleClassName", "className", "handleResize", "handleResizeStart", "handleResizeStop", "handleSize", "handleAlignmentMethod", "handlePositioning", "appearance", "handleStyles", "resizeRatio", "snap", "snapGap", "isHandleVisible", "handleHighlight", "handleTooltipContent", "needExtendedResizeZone", "childrenDOMRef", "labelComponent"];
21
23
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
@@ -141,12 +143,15 @@ var ResizerNext = function ResizerNext(props, ref) {
141
143
  'display-handle': isHandleVisible
142
144
  }, _resizer.resizerDangerClassName, appearance === 'danger'));
143
145
  var resizerZoneClassName = (0, _classnames3.default)(_resizer.resizerHoverZoneClassName, (0, _defineProperty2.default)({}, _resizer.resizerExtendedZone, needExtendedResizeZone));
146
+ var _useIntl = (0, _reactIntlNext.useIntl)(),
147
+ formatMessage = _useIntl.formatMessage;
144
148
  var handleComponent = (0, _react.useMemo)(function () {
145
149
  return SUPPORTED_HANDLES.reduce(function (result, position) {
146
150
  var thumb = /*#__PURE__*/_react.default.createElement("button", {
147
151
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
148
152
  className: _resizer.resizerHandleThumbClassName,
149
153
  "data-testid": "resizer-handle-".concat(position, "-thumb"),
154
+ "aria-label": formatMessage(_breakout.messages.resizeHandle),
150
155
  contentEditable: false,
151
156
  ref: resizeHandleThumbRef,
152
157
  type: "button",
@@ -186,7 +191,7 @@ var ResizerNext = function ResizerNext(props, ref) {
186
191
  style: inheritedCSS
187
192
  }, thumbWithTrack)));
188
193
  }, {});
189
- }, [handleHighlight, handleTooltipContent]);
194
+ }, [handleHighlight, handleTooltipContent, formatMessage]);
190
195
 
191
196
  // snapGap is usually a constant, if snap.x?.length is 0 and snapGap has a value resizer cannot be resized
192
197
  var snapGapActual = (0, _react.useMemo)(function () {
@@ -59,7 +59,7 @@ var firstNodeWithNotMarginTop = function firstNodeWithNotMarginTop() {
59
59
 
60
60
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Appears safe to auto-fix, but leaving it up to the team to remediate as the readability only gets worse with autofixing
61
61
  var tableSharedStyle = exports.tableSharedStyle = function tableSharedStyle() {
62
- return (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n\t", "\n\t.", " {\n\t\tposition: relative;\n\t\tmargin: 0 auto ", ";\n\t\tbox-sizing: border-box;\n\n\t\t/**\n * Fix block top alignment inside table cells.\n */\n\t\t.decisionItemView-content-wrap:first-of-type > div {\n\t\t\tmargin-top: 0;\n\t\t}\n\t}\n\t.", "[data-number-column='true'] {\n\t\tpadding-left: ", "px;\n\t\tclear: both;\n\t}\n\n\t.", " {\n\t\twill-change: width, margin-left;\n\t}\n\n\t.", " table {\n\t\twill-change: width;\n\t}\n\n\t.", " > table {\n\t\tmargin: ", " 0 0 0;\n\t}\n\n\t.", " > table,\n\t.", " > table {\n\t\tmargin: ", " ", " 0 0;\n\t}\n\n\t/* avoid applying styles to nested tables (possible via extensions) */\n\t.", " > table,\n\t.", " > table,\n\t.", " > table {\n\t\tborder-collapse: collapse;\n\t\tborder: ", "px solid\n\t\t\t", ";\n\t\ttable-layout: fixed;\n\t\tfont-size: 1em;\n\t\twidth: 100%;\n\n\t\t&[data-autosize='true'] {\n\t\t\ttable-layout: auto;\n\t\t}\n\n\t\t& {\n\t\t\t* {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t}\n\t\t\thr {\n\t\t\t\tbox-sizing: content-box;\n\t\t\t}\n\n\t\t\ttbody {\n\t\t\t\tborder-bottom: none;\n\t\t\t}\n\t\t\tth td {\n\t\t\t\tbackground-color: ", ";\n\t\t\t}\n\n\t\t\t", " {\n\t\t\t\tmin-width: ", "px;\n\t\t\t\tfont-weight: ", ";\n\t\t\t\tvertical-align: top;\n\t\t\t\tborder: 1px solid ", ";\n\t\t\t\tborder-right-width: 0;\n\t\t\t\tborder-bottom-width: 0;\n\n\t\t\t\tpadding: ", ";\n\t\t\t\t/* https://stackoverflow.com/questions/7517127/borders-not-shown-in-firefox-with-border-collapse-on-table-position-relative-o */\n\t\t\t\t", "\n\n\t\t\t\t", "\n\n\t\t\t\tth p:not(:first-of-type),\n\t\t\t\ttd p:not(:first-of-type) {\n\t\t\t\t\tmargin-top: ", ";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/* Ensures nested tables are compatible with parent table background color - uses specificity to ensure tables nested by extensions are not affected */\n\t\t\t> tbody > tr > td {\n\t\t\t\tbackground-color: ", ";\n\t\t\t}\n\n\t\t\tth {\n\t\t\t\tbackground-color: ", ";\n\t\t\t\ttext-align: left;\n\n\t\t\t\t/* only apply this styling to codeblocks in default background headercells */\n\t\t\t\t/* TODO this needs to be overhauled as it relies on unsafe selectors */\n\t\t\t\t&:not([style]):not(.danger) {\n\t\t\t\t\t.", ":not(.danger) {\n\t\t\t\t\t\tbackground-color: ", ";\n\n\t\t\t\t\t\t:not(.", ") {\n\t\t\t\t\t\t\tbox-shadow: 0px 0px 0px 1px ", ";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.", " {\n\t\t\t\t\t\t\tbackground-image: ", ";\n\n\t\t\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.", " {\n\t\t\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/* this is only relevant to the element taken care of by renderer */\n\t\t\t\t\t\t> [data-ds--code--code-block] {\n\t\t\t\t\t\t\tbackground-image: ", "!important;\n\n\t\t\t\t\t\t\tbackground-color: ", "!important;\n\n\t\t\t\t\t\t\t/* selector lives inside @atlaskit/code */\n\t\t\t\t\t\t\t--ds--code--line-number-bg-color: ", ";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n"])), (0, _tableCell.tableCellBackgroundStyleOverride)(), TableSharedCssClassName.TABLE_CONTAINER, "var(--ds-space-200, 16px)", TableSharedCssClassName.TABLE_CONTAINER, _editorSharedStyles.akEditorTableNumberColumnWidth - 1, TableSharedCssClassName.TABLE_RESIZER_CONTAINER, TableSharedCssClassName.TABLE_RESIZER_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, "var(--ds-space-300, 24px)", TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, "var(--ds-space-300, 24px)", "var(--ds-space-100, 8px)", TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, tableCellBorderWidth, "var(--ds-background-accent-gray-subtler, ".concat(_editorSharedStyles.akEditorTableBorder, ")"), "var(--ds-background-neutral-subtle, white)", (0, _platformFeatureFlags.fg)('platform_editor_renderer_table_header_styles') ? "> tbody > tr > th, > tbody > tr > td" : 'th, td', tableCellMinWidth, "var(--ds-font-weight-regular, 400)", "var(--ds-background-accent-gray-subtler, ".concat(_editorSharedStyles.akEditorTableBorder, ")"), "var(--ds-space-100, 8px)", _browser.browser.gecko || _browser.browser.ie || _browser.browser.mac && _browser.browser.chrome ? 'background-clip: padding-box;' : '', firstNodeWithNotMarginTop(), "var(--ds-space-150, 12px)", "var(--ds-surface, #FFFFFF)", "var(--ds-background-accent-gray-subtlest, ".concat(_editorSharedStyles.akEditorTableToolbar, ")"), _codeBlock.CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, "var(--ds-surface-raised, rgb(235, 237, 240))", _editorSharedStyles.akEditorSelectedNodeClassName, "var(--ds-border, transparent)", _codeBlock.CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER, (0, _editorSharedStyles.overflowShadow)({
62
+ return (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n\t", "\n\t.", " {\n\t\tposition: relative;\n\t\tmargin: 0 auto ", ";\n\t\tbox-sizing: border-box;\n\n\t\t/**\n * Fix block top alignment inside table cells.\n */\n\t\t.decisionItemView-content-wrap:first-of-type > div {\n\t\t\tmargin-top: 0;\n\t\t}\n\t}\n\t.", "[data-number-column='true'] {\n\t\tpadding-left: ", "px;\n\t\tclear: both;\n\t}\n\n\t.", " {\n\t\twill-change: width, margin-left;\n\t}\n\n\t.", " table {\n\t\twill-change: width;\n\t}\n\n\t.", " > table {\n\t\tmargin: ", " 0 0 0;\n\t}\n\n\t.", " > table,\n\t.", " > table {\n\t\tmargin: ", " ", " 0 0;\n\t}\n\n\t/* support panel nested in table */\n\t", "\n\n\t/* avoid applying styles to nested tables (possible via extensions) */\n\t.", " > table,\n\t.", " > table,\n\t.", " > table {\n\t\tborder-collapse: collapse;\n\t\tborder: ", "px solid\n\t\t\t", ";\n\t\ttable-layout: fixed;\n\t\tfont-size: 1em;\n\t\twidth: 100%;\n\n\t\t&[data-autosize='true'] {\n\t\t\ttable-layout: auto;\n\t\t}\n\n\t\t& {\n\t\t\t* {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t}\n\t\t\thr {\n\t\t\t\tbox-sizing: content-box;\n\t\t\t}\n\n\t\t\ttbody {\n\t\t\t\tborder-bottom: none;\n\t\t\t}\n\t\t\tth td {\n\t\t\t\tbackground-color: ", ";\n\t\t\t}\n\n\t\t\t", " {\n\t\t\t\tmin-width: ", "px;\n\t\t\t\tfont-weight: ", ";\n\t\t\t\tvertical-align: top;\n\t\t\t\tborder: 1px solid ", ";\n\t\t\t\tborder-right-width: 0;\n\t\t\t\tborder-bottom-width: 0;\n\n\t\t\t\tpadding: ", ";\n\t\t\t\t/* https://stackoverflow.com/questions/7517127/borders-not-shown-in-firefox-with-border-collapse-on-table-position-relative-o */\n\t\t\t\t", "\n\n\t\t\t\t", "\n\n\t\t\t\tth p:not(:first-of-type),\n\t\t\t\ttd p:not(:first-of-type) {\n\t\t\t\t\tmargin-top: ", ";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/* Ensures nested tables are compatible with parent table background color - uses specificity to ensure tables nested by extensions are not affected */\n\t\t\t> tbody > tr > td {\n\t\t\t\tbackground-color: ", ";\n\t\t\t}\n\n\t\t\tth {\n\t\t\t\tbackground-color: ", ";\n\t\t\t\ttext-align: left;\n\n\t\t\t\t/* only apply this styling to codeblocks in default background headercells */\n\t\t\t\t/* TODO this needs to be overhauled as it relies on unsafe selectors */\n\t\t\t\t&:not([style]):not(.danger) {\n\t\t\t\t\t.", ":not(.danger) {\n\t\t\t\t\t\tbackground-color: ", ";\n\n\t\t\t\t\t\t:not(.", ") {\n\t\t\t\t\t\t\tbox-shadow: 0px 0px 0px 1px ", ";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.", " {\n\t\t\t\t\t\t\tbackground-image: ", ";\n\n\t\t\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.", " {\n\t\t\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/* this is only relevant to the element taken care of by renderer */\n\t\t\t\t\t\t> [data-ds--code--code-block] {\n\t\t\t\t\t\t\tbackground-image: ", "!important;\n\n\t\t\t\t\t\t\tbackground-color: ", "!important;\n\n\t\t\t\t\t\t\t/* selector lives inside @atlaskit/code */\n\t\t\t\t\t\t\t--ds--code--line-number-bg-color: ", ";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n"])), (0, _tableCell.tableCellBackgroundStyleOverride)(), TableSharedCssClassName.TABLE_CONTAINER, "var(--ds-space-200, 16px)", TableSharedCssClassName.TABLE_CONTAINER, _editorSharedStyles.akEditorTableNumberColumnWidth - 1, TableSharedCssClassName.TABLE_RESIZER_CONTAINER, TableSharedCssClassName.TABLE_RESIZER_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, "var(--ds-space-300, 24px)", TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, "var(--ds-space-300, 24px)", "var(--ds-space-100, 8px)", (0, _platformFeatureFlags.fg)('platform_editor_bordered_panel_nested_in_table') ? ".".concat(TableSharedCssClassName.TABLE_NODE_WRAPPER, " .ak-editor-panel {\n\t\t\tborder: ", "var(--ds-border-width, 1px)", " solid ", "var(--ds-border, #d9dbea)", ";\n\t\t}") : '', TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, tableCellBorderWidth, "var(--ds-background-accent-gray-subtler, ".concat(_editorSharedStyles.akEditorTableBorder, ")"), "var(--ds-background-neutral-subtle, white)", (0, _platformFeatureFlags.fg)('platform_editor_renderer_table_header_styles') ? "> tbody > tr > th, > tbody > tr > td" : 'th, td', tableCellMinWidth, "var(--ds-font-weight-regular, 400)", "var(--ds-background-accent-gray-subtler, ".concat(_editorSharedStyles.akEditorTableBorder, ")"), "var(--ds-space-100, 8px)", _browser.browser.gecko || _browser.browser.ie || _browser.browser.mac && _browser.browser.chrome ? 'background-clip: padding-box;' : '', firstNodeWithNotMarginTop(), "var(--ds-space-150, 12px)", "var(--ds-surface, #FFFFFF)", "var(--ds-background-accent-gray-subtlest, ".concat(_editorSharedStyles.akEditorTableToolbar, ")"), _codeBlock.CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, "var(--ds-surface-raised, rgb(235, 237, 240))", _editorSharedStyles.akEditorSelectedNodeClassName, "var(--ds-border, transparent)", _codeBlock.CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER, (0, _editorSharedStyles.overflowShadow)({
63
63
  leftCoverWidth: "var(--ds-space-300, 24px)"
64
64
  }), "var(--ds-background-neutral, rgb(235, 237, 240))", _codeBlock.CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, "var(--ds-background-neutral, rgb(226, 229, 233))", (0, _editorSharedStyles.overflowShadow)({
65
65
  leftCoverWidth: "var(--ds-space-300, 24px)"
@@ -23,7 +23,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
23
23
  * @jsx jsx
24
24
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
25
25
  var packageName = "@atlaskit/editor-common";
26
- var packageVersion = "105.10.0";
26
+ var packageVersion = "105.11.1";
27
27
  var halfFocusRing = 1;
28
28
  var dropOffset = '0, 8';
29
29
  // Ignored via go/ees005
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.ToolbarArrowKeyNavigationProvider = exports.KeyDownHandlerContext = void 0;
8
8
  var _react = _interopRequireWildcard(require("react"));
9
9
  var _react2 = require("@emotion/react");
10
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
10
11
  var _elementBrowser = require("../../element-browser");
11
12
  var _messages = require("../../messages");
12
13
  var _mediaInsert = require("../../messages/media-insert");
@@ -91,6 +92,23 @@ var ToolbarArrowKeyNavigationProvider = exports.ToolbarArrowKeyNavigationProvide
91
92
  var filteredFocusableElements = getFilteredFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
92
93
  (_filteredFocusableEle3 = filteredFocusableElements[selectedItemIndex.current]) === null || _filteredFocusableEle3 === void 0 || _filteredFocusableEle3.focus();
93
94
  };
95
+ var handleArrowRightMemoized = (0, _react.useCallback)(function () {
96
+ var _filteredFocusableEle4;
97
+ var filteredFocusableElements = getFilteredFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
98
+ incrementIndex(filteredFocusableElements);
99
+ (_filteredFocusableEle4 = filteredFocusableElements[selectedItemIndex.current]) === null || _filteredFocusableEle4 === void 0 || _filteredFocusableEle4.focus();
100
+ }, [incrementIndex]);
101
+ var handleArrowLeftMemoized = (0, _react.useCallback)(function () {
102
+ var _filteredFocusableEle5;
103
+ var filteredFocusableElements = getFilteredFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
104
+ decrementIndex(filteredFocusableElements);
105
+ (_filteredFocusableEle5 = filteredFocusableElements[selectedItemIndex.current]) === null || _filteredFocusableEle5 === void 0 || _filteredFocusableEle5.focus();
106
+ }, [decrementIndex]);
107
+ var handleTabMemoized = (0, _react.useCallback)(function () {
108
+ var _filteredFocusableEle6;
109
+ var filteredFocusableElements = getFilteredFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
110
+ (_filteredFocusableEle6 = filteredFocusableElements[selectedItemIndex.current]) === null || _filteredFocusableEle6 === void 0 || _filteredFocusableEle6.focus();
111
+ }, []);
94
112
  var handleTabLocal = function handleTabLocal() {
95
113
  var filteredFocusableElements = getFilteredFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
96
114
  filteredFocusableElements.forEach(function (element) {
@@ -109,11 +127,19 @@ var ToolbarArrowKeyNavigationProvider = exports.ToolbarArrowKeyNavigationProvide
109
127
  }
110
128
  element.focus();
111
129
  };
112
- var submenuKeydownHandleContext = {
130
+ var submenuKeydownHandleContextRaw = {
113
131
  handleArrowLeft: handleArrowLeft,
114
132
  handleArrowRight: handleArrowRight,
115
133
  handleTab: handleTab
116
134
  };
135
+ var submenuKeydownHandleContextMemoized = (0, _react.useMemo)(function () {
136
+ return {
137
+ handleArrowLeft: handleArrowLeftMemoized,
138
+ handleArrowRight: handleArrowRightMemoized,
139
+ handleTab: handleTabMemoized
140
+ };
141
+ }, [handleArrowLeftMemoized, handleArrowRightMemoized, handleTabMemoized]);
142
+ var submenuKeydownHandleContext = (0, _platformFeatureFlags.fg)('platform_editor_toolbar_rerender_optimization') ? submenuKeydownHandleContextMemoized : submenuKeydownHandleContextRaw;
117
143
  (0, _react.useLayoutEffect)(function () {
118
144
  if (!wrapperRef.current || disableArrowKeyNavigation) {
119
145
  return;
@@ -188,10 +214,10 @@ var ToolbarArrowKeyNavigationProvider = exports.ToolbarArrowKeyNavigationProvide
188
214
  // Ignored via go/ees005
189
215
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
190
216
  if (isShortcutToFocusToolbar(event)) {
191
- var _filteredFocusableEle4, _filteredFocusableEle5;
217
+ var _filteredFocusableEle7, _filteredFocusableEle8;
192
218
  var filteredFocusableElements = getFilteredFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
193
- (_filteredFocusableEle4 = filteredFocusableElements[0]) === null || _filteredFocusableEle4 === void 0 || _filteredFocusableEle4.focus();
194
- (_filteredFocusableEle5 = filteredFocusableElements[0]) === null || _filteredFocusableEle5 === void 0 || _filteredFocusableEle5.scrollIntoView({
219
+ (_filteredFocusableEle7 = filteredFocusableElements[0]) === null || _filteredFocusableEle7 === void 0 || _filteredFocusableEle7.focus();
220
+ (_filteredFocusableEle8 = filteredFocusableElements[0]) === null || _filteredFocusableEle8 === void 0 || _filteredFocusableEle8.scrollIntoView({
195
221
  behavior: 'smooth',
196
222
  block: 'center',
197
223
  inline: 'nearest'
@@ -25,6 +25,12 @@ export class AnnotationUpdateEmitter extends EventEmitter {
25
25
  * This is the public interface for the AnnotationManager. It provides methods for interacting with the manager.
26
26
  */
27
27
 
28
+ /**
29
+ * This is a factory method which creates a new instance of the AnnotationManager.
30
+ *
31
+ * @example
32
+ * const annotationManager: AnnotationManager = createAnnotationManager();
33
+ */
28
34
  export function createAnnotationManager() {
29
35
  return new SharedAnnotationManager();
30
36
  }
@@ -1,7 +1,6 @@
1
1
  /* eslint-disable @atlaskit/design-system/use-primitives-text */
2
2
  import React from 'react';
3
3
  import Link from '@atlaskit/link';
4
- import { fg } from '@atlaskit/platform-feature-flags';
5
4
  import SectionMessage from '@atlaskit/section-message';
6
5
  function AlternativePackagesMessage({
7
6
  alternatePackages
@@ -10,25 +9,15 @@ function AlternativePackagesMessage({
10
9
  return null;
11
10
  }
12
11
  if (alternatePackages.length === 1) {
13
- return /*#__PURE__*/React.createElement("p", null, "Consider using", ' ', fg('dst-a11y__replace-anchor-with-link__editor') ? /*#__PURE__*/React.createElement(Link, {
12
+ return /*#__PURE__*/React.createElement("p", null, "Consider using ", /*#__PURE__*/React.createElement(Link, {
14
13
  href: alternatePackages[0].link
15
- }, alternatePackages[0].name) :
16
- /*#__PURE__*/
17
- // eslint-disable-next-line @atlaskit/design-system/no-html-anchor
18
- React.createElement("a", {
19
- href: alternatePackages[0].link
20
- }, alternatePackages[0].name), "instead.");
14
+ }, alternatePackages[0].name), ' ', "instead.");
21
15
  }
22
16
  return /*#__PURE__*/React.createElement("p", null, "Consider using one of these packages instead:", /*#__PURE__*/React.createElement("ul", null, alternatePackages.map(p =>
23
17
  /*#__PURE__*/
24
18
  // Ignored via go/ees005
25
19
  // eslint-disable-next-line react/jsx-key
26
- React.createElement("li", null, fg('dst-a11y__replace-anchor-with-link__editor') ? /*#__PURE__*/React.createElement(Link, {
27
- href: p.link
28
- }, p.name) :
29
- /*#__PURE__*/
30
- // eslint-disable-next-line @atlaskit/design-system/no-html-anchor
31
- React.createElement("a", {
20
+ React.createElement("li", null, /*#__PURE__*/React.createElement(Link, {
32
21
  href: p.link
33
22
  }, p.name)))));
34
23
  }
@@ -68,9 +68,9 @@ export function getNodeRenderer(extensionProvider, extensionType, extensionKey)
68
68
  const preloaded = maybePromise === null || maybePromise === void 0 ? void 0 : (_renderSync = (_ref = maybePromise).renderSync) === null || _renderSync === void 0 ? void 0 : _renderSync.call(_ref);
69
69
  // Only product implemented preloading will return sync result
70
70
  // However the out-of-box won't handle this. Confluence uses a custom implementation
71
- return preloaded
71
+ return preloaded ?
72
72
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
73
- ? resolveImportSync(preloaded) : resolveImport(maybePromise.render());
73
+ resolveImportSync(preloaded) : resolveImport(maybePromise.render());
74
74
  }
75
75
  } else {
76
76
  return getExtensionModuleNode(extensionProvider, extensionType, extensionKey).then(node => resolveImport(node.render()));
@@ -12,6 +12,7 @@ import { browser } from '../utils';
12
12
  export const addAltText = makeKeyMapWithCommon('Add Alt Text', 'Mod-Alt-y');
13
13
  export const navToEditorToolbar = makeKeyMapWithCommon('Navigate to editor toolbar', 'Alt-F9');
14
14
  export const navToFloatingToolbar = makeKeyMapWithCommon('Navigate to floating toolbar', 'Alt-F10');
15
+ export const askAIQuickInsert = makeKeyMapWithCommon('Ask AI', "Mod-'");
15
16
  export const toggleBold = makeKeyMapWithCommon('Bold', 'Mod-b');
16
17
  export const toggleItalic = makeKeyMapWithCommon('Italic', 'Mod-i');
17
18
  export const toggleUnderline = makeKeyMapWithCommon('Underline', 'Mod-u');
@@ -9,5 +9,10 @@ export const messages = defineMessages({
9
9
  id: 'fabric.editor.breakoutWideWidthLabel',
10
10
  defaultMessage: 'Wide',
11
11
  description: 'Resize current element to wide mode'
12
+ },
13
+ resizeHandle: {
14
+ id: 'fabric.editor.resizeHandle',
15
+ defaultMessage: 'Resize handle',
16
+ description: 'Resize handle'
12
17
  }
13
18
  });
@@ -104,5 +104,10 @@ export const toolbarMessages = defineMessages({
104
104
  id: 'fabric.editor.navigate.toolbar.floating',
105
105
  defaultMessage: 'Navigate to floating toolbar',
106
106
  description: 'Navigate to a floating toolbar for relevant nodes (e.g. tables or panels).'
107
+ },
108
+ askAI: {
109
+ id: 'fabric.editor.navigate.toolbar.askAI',
110
+ defaultMessage: 'Ask AI',
111
+ description: 'Open the AI panel to ask a question or generate content.'
107
112
  }
108
113
  });
@@ -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 = "105.10.0";
4
+ const packageVersion = "105.11.1";
5
5
  const sanitiseSentryEvents = (data, _hint) => {
6
6
  // Remove URL as it has UGC
7
7
  // Ignored via go/ees007
@@ -2,9 +2,11 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import React, { forwardRef, useCallback, useImperativeHandle, useMemo, useRef, useState } from 'react';
3
3
  import classnames from 'classnames';
4
4
  import { Resizable } from 're-resizable';
5
+ import { useIntl } from 'react-intl-next';
5
6
  import { Box, xcss } from '@atlaskit/primitives';
6
7
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
7
8
  import Tooltip from '@atlaskit/tooltip';
9
+ import { messages } from '../messages/breakout';
8
10
  import { handleWrapperClass, resizerDangerClassName, resizerExtendedZone, resizerHandleClassName, resizerHandleThumbClassName, resizerHandleTrackClassName, resizerHandleZIndex, resizerHoverZoneClassName, resizerItemClassName } from '../styles/shared/resizer';
9
11
  const resizerLabelStyles = xcss({
10
12
  position: 'absolute',
@@ -125,12 +127,16 @@ const ResizerNext = (props, ref) => {
125
127
  const resizerZoneClassName = classnames(resizerHoverZoneClassName, {
126
128
  [resizerExtendedZone]: needExtendedResizeZone
127
129
  });
130
+ const {
131
+ formatMessage
132
+ } = useIntl();
128
133
  const handleComponent = useMemo(() => {
129
134
  return SUPPORTED_HANDLES.reduce((result, position) => {
130
135
  const thumb = /*#__PURE__*/React.createElement("button", {
131
136
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
132
137
  className: resizerHandleThumbClassName,
133
138
  "data-testid": `resizer-handle-${position}-thumb`,
139
+ "aria-label": formatMessage(messages.resizeHandle),
134
140
  contentEditable: false,
135
141
  ref: resizeHandleThumbRef,
136
142
  type: "button",
@@ -179,7 +185,7 @@ const ResizerNext = (props, ref) => {
179
185
  }, thumbWithTrack)
180
186
  };
181
187
  }, {});
182
- }, [handleHighlight, handleTooltipContent]);
188
+ }, [handleHighlight, handleTooltipContent, formatMessage]);
183
189
 
184
190
  // snapGap is usually a constant, if snap.x?.length is 0 and snapGap has a value resizer cannot be resized
185
191
  const snapGapActual = useMemo(() => {
@@ -105,6 +105,11 @@ const tableSharedStyle = () => css`
105
105
  margin: ${"var(--ds-space-300, 24px)"} ${"var(--ds-space-100, 8px)"} 0 0;
106
106
  }
107
107
 
108
+ /* support panel nested in table */
109
+ ${fg('platform_editor_bordered_panel_nested_in_table') ? `.${TableSharedCssClassName.TABLE_NODE_WRAPPER} .ak-editor-panel {
110
+ border: ${"var(--ds-border-width, 1px)"} solid ${"var(--ds-border, #d9dbea)"};
111
+ }` : ''}
112
+
108
113
  /* avoid applying styles to nested tables (possible via extensions) */
109
114
  .${TableSharedCssClassName.TABLE_CONTAINER} > table,
110
115
  .${TableSharedCssClassName.TABLE_NODE_WRAPPER} > table,
@@ -13,7 +13,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
13
13
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import Layer from '../Layer';
15
15
  const packageName = "@atlaskit/editor-common";
16
- const packageVersion = "105.10.0";
16
+ const packageVersion = "105.11.1";
17
17
  const halfFocusRing = 1;
18
18
  const dropOffset = '0, 8';
19
19
  // Ignored via go/ees005
@@ -3,10 +3,11 @@
3
3
  * @jsx jsx
4
4
  */
5
5
 
6
- import React, { useCallback, useLayoutEffect, useRef } from 'react';
6
+ import React, { useCallback, useLayoutEffect, useMemo, useRef } from 'react';
7
7
 
8
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
9
  import { css, jsx } from '@emotion/react';
10
+ import { fg } from '@atlaskit/platform-feature-flags';
10
11
  import { ELEMENT_BROWSER_ID } from '../../element-browser';
11
12
  import { fullPageMessages } from '../../messages';
12
13
  import { mediaInsertMessages } from '../../messages/media-insert';
@@ -83,6 +84,23 @@ export const ToolbarArrowKeyNavigationProvider = ({
83
84
  const filteredFocusableElements = getFilteredFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
84
85
  (_filteredFocusableEle3 = filteredFocusableElements[selectedItemIndex.current]) === null || _filteredFocusableEle3 === void 0 ? void 0 : _filteredFocusableEle3.focus();
85
86
  };
87
+ const handleArrowRightMemoized = useCallback(() => {
88
+ var _filteredFocusableEle4;
89
+ const filteredFocusableElements = getFilteredFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
90
+ incrementIndex(filteredFocusableElements);
91
+ (_filteredFocusableEle4 = filteredFocusableElements[selectedItemIndex.current]) === null || _filteredFocusableEle4 === void 0 ? void 0 : _filteredFocusableEle4.focus();
92
+ }, [incrementIndex]);
93
+ const handleArrowLeftMemoized = useCallback(() => {
94
+ var _filteredFocusableEle5;
95
+ const filteredFocusableElements = getFilteredFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
96
+ decrementIndex(filteredFocusableElements);
97
+ (_filteredFocusableEle5 = filteredFocusableElements[selectedItemIndex.current]) === null || _filteredFocusableEle5 === void 0 ? void 0 : _filteredFocusableEle5.focus();
98
+ }, [decrementIndex]);
99
+ const handleTabMemoized = useCallback(() => {
100
+ var _filteredFocusableEle6;
101
+ const filteredFocusableElements = getFilteredFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
102
+ (_filteredFocusableEle6 = filteredFocusableElements[selectedItemIndex.current]) === null || _filteredFocusableEle6 === void 0 ? void 0 : _filteredFocusableEle6.focus();
103
+ }, []);
86
104
  const handleTabLocal = () => {
87
105
  const filteredFocusableElements = getFilteredFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
88
106
  filteredFocusableElements.forEach(element => {
@@ -100,11 +118,17 @@ export const ToolbarArrowKeyNavigationProvider = ({
100
118
  }
101
119
  element.focus();
102
120
  };
103
- const submenuKeydownHandleContext = {
121
+ const submenuKeydownHandleContextRaw = {
104
122
  handleArrowLeft,
105
123
  handleArrowRight,
106
124
  handleTab
107
125
  };
126
+ const submenuKeydownHandleContextMemoized = useMemo(() => ({
127
+ handleArrowLeft: handleArrowLeftMemoized,
128
+ handleArrowRight: handleArrowRightMemoized,
129
+ handleTab: handleTabMemoized
130
+ }), [handleArrowLeftMemoized, handleArrowRightMemoized, handleTabMemoized]);
131
+ const submenuKeydownHandleContext = fg('platform_editor_toolbar_rerender_optimization') ? submenuKeydownHandleContextMemoized : submenuKeydownHandleContextRaw;
108
132
  useLayoutEffect(() => {
109
133
  if (!wrapperRef.current || disableArrowKeyNavigation) {
110
134
  return;
@@ -181,10 +205,10 @@ export const ToolbarArrowKeyNavigationProvider = ({
181
205
  // Ignored via go/ees005
182
206
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
183
207
  if (isShortcutToFocusToolbar(event)) {
184
- var _filteredFocusableEle4, _filteredFocusableEle5;
208
+ var _filteredFocusableEle7, _filteredFocusableEle8;
185
209
  const filteredFocusableElements = getFilteredFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
186
- (_filteredFocusableEle4 = filteredFocusableElements[0]) === null || _filteredFocusableEle4 === void 0 ? void 0 : _filteredFocusableEle4.focus();
187
- (_filteredFocusableEle5 = filteredFocusableElements[0]) === null || _filteredFocusableEle5 === void 0 ? void 0 : _filteredFocusableEle5.scrollIntoView({
210
+ (_filteredFocusableEle7 = filteredFocusableElements[0]) === null || _filteredFocusableEle7 === void 0 ? void 0 : _filteredFocusableEle7.focus();
211
+ (_filteredFocusableEle8 = filteredFocusableElements[0]) === null || _filteredFocusableEle8 === void 0 ? void 0 : _filteredFocusableEle8.scrollIntoView({
188
212
  behavior: 'smooth',
189
213
  block: 'center',
190
214
  inline: 'nearest'
@@ -44,6 +44,12 @@ export var AnnotationUpdateEmitter = /*#__PURE__*/function (_EventEmitter) {
44
44
  * This is the public interface for the AnnotationManager. It provides methods for interacting with the manager.
45
45
  */
46
46
 
47
+ /**
48
+ * This is a factory method which creates a new instance of the AnnotationManager.
49
+ *
50
+ * @example
51
+ * const annotationManager: AnnotationManager = createAnnotationManager();
52
+ */
47
53
  export function createAnnotationManager() {
48
54
  return new SharedAnnotationManager();
49
55
  }
@@ -1,7 +1,6 @@
1
1
  /* eslint-disable @atlaskit/design-system/use-primitives-text */
2
2
  import React from 'react';
3
3
  import Link from '@atlaskit/link';
4
- import { fg } from '@atlaskit/platform-feature-flags';
5
4
  import SectionMessage from '@atlaskit/section-message';
6
5
  function AlternativePackagesMessage(_ref) {
7
6
  var alternatePackages = _ref.alternatePackages;
@@ -9,26 +8,16 @@ function AlternativePackagesMessage(_ref) {
9
8
  return null;
10
9
  }
11
10
  if (alternatePackages.length === 1) {
12
- return /*#__PURE__*/React.createElement("p", null, "Consider using", ' ', fg('dst-a11y__replace-anchor-with-link__editor') ? /*#__PURE__*/React.createElement(Link, {
11
+ return /*#__PURE__*/React.createElement("p", null, "Consider using ", /*#__PURE__*/React.createElement(Link, {
13
12
  href: alternatePackages[0].link
14
- }, alternatePackages[0].name) :
15
- /*#__PURE__*/
16
- // eslint-disable-next-line @atlaskit/design-system/no-html-anchor
17
- React.createElement("a", {
18
- href: alternatePackages[0].link
19
- }, alternatePackages[0].name), "instead.");
13
+ }, alternatePackages[0].name), ' ', "instead.");
20
14
  }
21
15
  return /*#__PURE__*/React.createElement("p", null, "Consider using one of these packages instead:", /*#__PURE__*/React.createElement("ul", null, alternatePackages.map(function (p) {
22
16
  return (
23
17
  /*#__PURE__*/
24
18
  // Ignored via go/ees005
25
19
  // eslint-disable-next-line react/jsx-key
26
- React.createElement("li", null, fg('dst-a11y__replace-anchor-with-link__editor') ? /*#__PURE__*/React.createElement(Link, {
27
- href: p.link
28
- }, p.name) :
29
- /*#__PURE__*/
30
- // eslint-disable-next-line @atlaskit/design-system/no-html-anchor
31
- React.createElement("a", {
20
+ React.createElement("li", null, /*#__PURE__*/React.createElement(Link, {
32
21
  href: p.link
33
22
  }, p.name))
34
23
  );
@@ -116,9 +116,9 @@ export function getNodeRenderer(extensionProvider, extensionType, extensionKey)
116
116
  var preloaded = maybePromise === null || maybePromise === void 0 || (_renderSync = (_ref = maybePromise).renderSync) === null || _renderSync === void 0 ? void 0 : _renderSync.call(_ref);
117
117
  // Only product implemented preloading will return sync result
118
118
  // However the out-of-box won't handle this. Confluence uses a custom implementation
119
- return preloaded
119
+ return preloaded ?
120
120
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
121
- ? resolveImportSync(preloaded) : resolveImport(maybePromise.render());
121
+ resolveImportSync(preloaded) : resolveImport(maybePromise.render());
122
122
  }
123
123
  } else {
124
124
  return getExtensionModuleNode(extensionProvider, extensionType, extensionKey).then(function (node) {
@@ -13,6 +13,7 @@ import { browser } from '../utils';
13
13
  export var addAltText = makeKeyMapWithCommon('Add Alt Text', 'Mod-Alt-y');
14
14
  export var navToEditorToolbar = makeKeyMapWithCommon('Navigate to editor toolbar', 'Alt-F9');
15
15
  export var navToFloatingToolbar = makeKeyMapWithCommon('Navigate to floating toolbar', 'Alt-F10');
16
+ export var askAIQuickInsert = makeKeyMapWithCommon('Ask AI', "Mod-'");
16
17
  export var toggleBold = makeKeyMapWithCommon('Bold', 'Mod-b');
17
18
  export var toggleItalic = makeKeyMapWithCommon('Italic', 'Mod-i');
18
19
  export var toggleUnderline = makeKeyMapWithCommon('Underline', 'Mod-u');
@@ -9,5 +9,10 @@ export var messages = defineMessages({
9
9
  id: 'fabric.editor.breakoutWideWidthLabel',
10
10
  defaultMessage: 'Wide',
11
11
  description: 'Resize current element to wide mode'
12
+ },
13
+ resizeHandle: {
14
+ id: 'fabric.editor.resizeHandle',
15
+ defaultMessage: 'Resize handle',
16
+ description: 'Resize handle'
12
17
  }
13
18
  });
@@ -104,5 +104,10 @@ export var toolbarMessages = defineMessages({
104
104
  id: 'fabric.editor.navigate.toolbar.floating',
105
105
  defaultMessage: 'Navigate to floating toolbar',
106
106
  description: 'Navigate to a floating toolbar for relevant nodes (e.g. tables or panels).'
107
+ },
108
+ askAI: {
109
+ id: 'fabric.editor.navigate.toolbar.askAI',
110
+ defaultMessage: 'Ask AI',
111
+ description: 'Open the AI panel to ask a question or generate content.'
107
112
  }
108
113
  });
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
7
7
  import { isFedRamp } from './environment';
8
8
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
9
9
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
10
- var packageVersion = "105.10.0";
10
+ var packageVersion = "105.11.1";
11
11
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
12
12
  // Remove URL as it has UGC
13
13
  // Ignored via go/ees007
@@ -8,9 +8,11 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
8
8
  import React, { forwardRef, useCallback, useImperativeHandle, useMemo, useRef, useState } from 'react';
9
9
  import classnames from 'classnames';
10
10
  import { Resizable } from 're-resizable';
11
+ import { useIntl } from 'react-intl-next';
11
12
  import { Box, xcss } from '@atlaskit/primitives';
12
13
  import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
13
14
  import Tooltip from '@atlaskit/tooltip';
15
+ import { messages } from '../messages/breakout';
14
16
  import { handleWrapperClass, resizerDangerClassName, resizerExtendedZone, resizerHandleClassName, resizerHandleThumbClassName, resizerHandleTrackClassName, resizerHandleZIndex, resizerHoverZoneClassName, resizerItemClassName } from '../styles/shared/resizer';
15
17
  var resizerLabelStyles = xcss({
16
18
  position: 'absolute',
@@ -131,12 +133,15 @@ var ResizerNext = function ResizerNext(props, ref) {
131
133
  'display-handle': isHandleVisible
132
134
  }, resizerDangerClassName, appearance === 'danger'));
133
135
  var resizerZoneClassName = classnames(resizerHoverZoneClassName, _defineProperty({}, resizerExtendedZone, needExtendedResizeZone));
136
+ var _useIntl = useIntl(),
137
+ formatMessage = _useIntl.formatMessage;
134
138
  var handleComponent = useMemo(function () {
135
139
  return SUPPORTED_HANDLES.reduce(function (result, position) {
136
140
  var thumb = /*#__PURE__*/React.createElement("button", {
137
141
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
138
142
  className: resizerHandleThumbClassName,
139
143
  "data-testid": "resizer-handle-".concat(position, "-thumb"),
144
+ "aria-label": formatMessage(messages.resizeHandle),
140
145
  contentEditable: false,
141
146
  ref: resizeHandleThumbRef,
142
147
  type: "button",
@@ -176,7 +181,7 @@ var ResizerNext = function ResizerNext(props, ref) {
176
181
  style: inheritedCSS
177
182
  }, thumbWithTrack)));
178
183
  }, {});
179
- }, [handleHighlight, handleTooltipContent]);
184
+ }, [handleHighlight, handleTooltipContent, formatMessage]);
180
185
 
181
186
  // snapGap is usually a constant, if snap.x?.length is 0 and snapGap has a value resizer cannot be resized
182
187
  var snapGapActual = useMemo(function () {
@@ -53,7 +53,7 @@ var firstNodeWithNotMarginTop = function firstNodeWithNotMarginTop() {
53
53
 
54
54
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Appears safe to auto-fix, but leaving it up to the team to remediate as the readability only gets worse with autofixing
55
55
  var tableSharedStyle = function tableSharedStyle() {
56
- return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n\t", "\n\t.", " {\n\t\tposition: relative;\n\t\tmargin: 0 auto ", ";\n\t\tbox-sizing: border-box;\n\n\t\t/**\n * Fix block top alignment inside table cells.\n */\n\t\t.decisionItemView-content-wrap:first-of-type > div {\n\t\t\tmargin-top: 0;\n\t\t}\n\t}\n\t.", "[data-number-column='true'] {\n\t\tpadding-left: ", "px;\n\t\tclear: both;\n\t}\n\n\t.", " {\n\t\twill-change: width, margin-left;\n\t}\n\n\t.", " table {\n\t\twill-change: width;\n\t}\n\n\t.", " > table {\n\t\tmargin: ", " 0 0 0;\n\t}\n\n\t.", " > table,\n\t.", " > table {\n\t\tmargin: ", " ", " 0 0;\n\t}\n\n\t/* avoid applying styles to nested tables (possible via extensions) */\n\t.", " > table,\n\t.", " > table,\n\t.", " > table {\n\t\tborder-collapse: collapse;\n\t\tborder: ", "px solid\n\t\t\t", ";\n\t\ttable-layout: fixed;\n\t\tfont-size: 1em;\n\t\twidth: 100%;\n\n\t\t&[data-autosize='true'] {\n\t\t\ttable-layout: auto;\n\t\t}\n\n\t\t& {\n\t\t\t* {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t}\n\t\t\thr {\n\t\t\t\tbox-sizing: content-box;\n\t\t\t}\n\n\t\t\ttbody {\n\t\t\t\tborder-bottom: none;\n\t\t\t}\n\t\t\tth td {\n\t\t\t\tbackground-color: ", ";\n\t\t\t}\n\n\t\t\t", " {\n\t\t\t\tmin-width: ", "px;\n\t\t\t\tfont-weight: ", ";\n\t\t\t\tvertical-align: top;\n\t\t\t\tborder: 1px solid ", ";\n\t\t\t\tborder-right-width: 0;\n\t\t\t\tborder-bottom-width: 0;\n\n\t\t\t\tpadding: ", ";\n\t\t\t\t/* https://stackoverflow.com/questions/7517127/borders-not-shown-in-firefox-with-border-collapse-on-table-position-relative-o */\n\t\t\t\t", "\n\n\t\t\t\t", "\n\n\t\t\t\tth p:not(:first-of-type),\n\t\t\t\ttd p:not(:first-of-type) {\n\t\t\t\t\tmargin-top: ", ";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/* Ensures nested tables are compatible with parent table background color - uses specificity to ensure tables nested by extensions are not affected */\n\t\t\t> tbody > tr > td {\n\t\t\t\tbackground-color: ", ";\n\t\t\t}\n\n\t\t\tth {\n\t\t\t\tbackground-color: ", ";\n\t\t\t\ttext-align: left;\n\n\t\t\t\t/* only apply this styling to codeblocks in default background headercells */\n\t\t\t\t/* TODO this needs to be overhauled as it relies on unsafe selectors */\n\t\t\t\t&:not([style]):not(.danger) {\n\t\t\t\t\t.", ":not(.danger) {\n\t\t\t\t\t\tbackground-color: ", ";\n\n\t\t\t\t\t\t:not(.", ") {\n\t\t\t\t\t\t\tbox-shadow: 0px 0px 0px 1px ", ";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.", " {\n\t\t\t\t\t\t\tbackground-image: ", ";\n\n\t\t\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.", " {\n\t\t\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/* this is only relevant to the element taken care of by renderer */\n\t\t\t\t\t\t> [data-ds--code--code-block] {\n\t\t\t\t\t\t\tbackground-image: ", "!important;\n\n\t\t\t\t\t\t\tbackground-color: ", "!important;\n\n\t\t\t\t\t\t\t/* selector lives inside @atlaskit/code */\n\t\t\t\t\t\t\t--ds--code--line-number-bg-color: ", ";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n"])), tableCellBackgroundStyleOverride(), TableSharedCssClassName.TABLE_CONTAINER, "var(--ds-space-200, 16px)", TableSharedCssClassName.TABLE_CONTAINER, akEditorTableNumberColumnWidth - 1, TableSharedCssClassName.TABLE_RESIZER_CONTAINER, TableSharedCssClassName.TABLE_RESIZER_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, "var(--ds-space-300, 24px)", TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, "var(--ds-space-300, 24px)", "var(--ds-space-100, 8px)", TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, tableCellBorderWidth, "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorder, ")"), "var(--ds-background-neutral-subtle, white)", fg('platform_editor_renderer_table_header_styles') ? "> tbody > tr > th, > tbody > tr > td" : 'th, td', tableCellMinWidth, "var(--ds-font-weight-regular, 400)", "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorder, ")"), "var(--ds-space-100, 8px)", browser.gecko || browser.ie || browser.mac && browser.chrome ? 'background-clip: padding-box;' : '', firstNodeWithNotMarginTop(), "var(--ds-space-150, 12px)", "var(--ds-surface, #FFFFFF)", "var(--ds-background-accent-gray-subtlest, ".concat(akEditorTableToolbar, ")"), CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, "var(--ds-surface-raised, rgb(235, 237, 240))", akEditorSelectedNodeClassName, "var(--ds-border, transparent)", CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER, overflowShadow({
56
+ return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n\t", "\n\t.", " {\n\t\tposition: relative;\n\t\tmargin: 0 auto ", ";\n\t\tbox-sizing: border-box;\n\n\t\t/**\n * Fix block top alignment inside table cells.\n */\n\t\t.decisionItemView-content-wrap:first-of-type > div {\n\t\t\tmargin-top: 0;\n\t\t}\n\t}\n\t.", "[data-number-column='true'] {\n\t\tpadding-left: ", "px;\n\t\tclear: both;\n\t}\n\n\t.", " {\n\t\twill-change: width, margin-left;\n\t}\n\n\t.", " table {\n\t\twill-change: width;\n\t}\n\n\t.", " > table {\n\t\tmargin: ", " 0 0 0;\n\t}\n\n\t.", " > table,\n\t.", " > table {\n\t\tmargin: ", " ", " 0 0;\n\t}\n\n\t/* support panel nested in table */\n\t", "\n\n\t/* avoid applying styles to nested tables (possible via extensions) */\n\t.", " > table,\n\t.", " > table,\n\t.", " > table {\n\t\tborder-collapse: collapse;\n\t\tborder: ", "px solid\n\t\t\t", ";\n\t\ttable-layout: fixed;\n\t\tfont-size: 1em;\n\t\twidth: 100%;\n\n\t\t&[data-autosize='true'] {\n\t\t\ttable-layout: auto;\n\t\t}\n\n\t\t& {\n\t\t\t* {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t}\n\t\t\thr {\n\t\t\t\tbox-sizing: content-box;\n\t\t\t}\n\n\t\t\ttbody {\n\t\t\t\tborder-bottom: none;\n\t\t\t}\n\t\t\tth td {\n\t\t\t\tbackground-color: ", ";\n\t\t\t}\n\n\t\t\t", " {\n\t\t\t\tmin-width: ", "px;\n\t\t\t\tfont-weight: ", ";\n\t\t\t\tvertical-align: top;\n\t\t\t\tborder: 1px solid ", ";\n\t\t\t\tborder-right-width: 0;\n\t\t\t\tborder-bottom-width: 0;\n\n\t\t\t\tpadding: ", ";\n\t\t\t\t/* https://stackoverflow.com/questions/7517127/borders-not-shown-in-firefox-with-border-collapse-on-table-position-relative-o */\n\t\t\t\t", "\n\n\t\t\t\t", "\n\n\t\t\t\tth p:not(:first-of-type),\n\t\t\t\ttd p:not(:first-of-type) {\n\t\t\t\t\tmargin-top: ", ";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/* Ensures nested tables are compatible with parent table background color - uses specificity to ensure tables nested by extensions are not affected */\n\t\t\t> tbody > tr > td {\n\t\t\t\tbackground-color: ", ";\n\t\t\t}\n\n\t\t\tth {\n\t\t\t\tbackground-color: ", ";\n\t\t\t\ttext-align: left;\n\n\t\t\t\t/* only apply this styling to codeblocks in default background headercells */\n\t\t\t\t/* TODO this needs to be overhauled as it relies on unsafe selectors */\n\t\t\t\t&:not([style]):not(.danger) {\n\t\t\t\t\t.", ":not(.danger) {\n\t\t\t\t\t\tbackground-color: ", ";\n\n\t\t\t\t\t\t:not(.", ") {\n\t\t\t\t\t\t\tbox-shadow: 0px 0px 0px 1px ", ";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.", " {\n\t\t\t\t\t\t\tbackground-image: ", ";\n\n\t\t\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.", " {\n\t\t\t\t\t\t\tbackground-color: ", ";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/* this is only relevant to the element taken care of by renderer */\n\t\t\t\t\t\t> [data-ds--code--code-block] {\n\t\t\t\t\t\t\tbackground-image: ", "!important;\n\n\t\t\t\t\t\t\tbackground-color: ", "!important;\n\n\t\t\t\t\t\t\t/* selector lives inside @atlaskit/code */\n\t\t\t\t\t\t\t--ds--code--line-number-bg-color: ", ";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n"])), tableCellBackgroundStyleOverride(), TableSharedCssClassName.TABLE_CONTAINER, "var(--ds-space-200, 16px)", TableSharedCssClassName.TABLE_CONTAINER, akEditorTableNumberColumnWidth - 1, TableSharedCssClassName.TABLE_RESIZER_CONTAINER, TableSharedCssClassName.TABLE_RESIZER_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, "var(--ds-space-300, 24px)", TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, "var(--ds-space-300, 24px)", "var(--ds-space-100, 8px)", fg('platform_editor_bordered_panel_nested_in_table') ? ".".concat(TableSharedCssClassName.TABLE_NODE_WRAPPER, " .ak-editor-panel {\n\t\t\tborder: ", "var(--ds-border-width, 1px)", " solid ", "var(--ds-border, #d9dbea)", ";\n\t\t}") : '', TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_NODE_WRAPPER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, tableCellBorderWidth, "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorder, ")"), "var(--ds-background-neutral-subtle, white)", fg('platform_editor_renderer_table_header_styles') ? "> tbody > tr > th, > tbody > tr > td" : 'th, td', tableCellMinWidth, "var(--ds-font-weight-regular, 400)", "var(--ds-background-accent-gray-subtler, ".concat(akEditorTableBorder, ")"), "var(--ds-space-100, 8px)", browser.gecko || browser.ie || browser.mac && browser.chrome ? 'background-clip: padding-box;' : '', firstNodeWithNotMarginTop(), "var(--ds-space-150, 12px)", "var(--ds-surface, #FFFFFF)", "var(--ds-background-accent-gray-subtlest, ".concat(akEditorTableToolbar, ")"), CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, "var(--ds-surface-raised, rgb(235, 237, 240))", akEditorSelectedNodeClassName, "var(--ds-border, transparent)", CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER, overflowShadow({
57
57
  leftCoverWidth: "var(--ds-space-300, 24px)"
58
58
  }), "var(--ds-background-neutral, rgb(235, 237, 240))", CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, "var(--ds-background-neutral, rgb(226, 229, 233))", overflowShadow({
59
59
  leftCoverWidth: "var(--ds-space-300, 24px)"
@@ -20,7 +20,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
20
20
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
21
21
  import Layer from '../Layer';
22
22
  var packageName = "@atlaskit/editor-common";
23
- var packageVersion = "105.10.0";
23
+ var packageVersion = "105.11.1";
24
24
  var halfFocusRing = 1;
25
25
  var dropOffset = '0, 8';
26
26
  // Ignored via go/ees005
@@ -3,10 +3,11 @@
3
3
  * @jsx jsx
4
4
  */
5
5
 
6
- import React, { useCallback, useLayoutEffect, useRef } from 'react';
6
+ import React, { useCallback, useLayoutEffect, useMemo, useRef } from 'react';
7
7
 
8
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
9
  import { css, jsx } from '@emotion/react';
10
+ import { fg } from '@atlaskit/platform-feature-flags';
10
11
  import { ELEMENT_BROWSER_ID } from '../../element-browser';
11
12
  import { fullPageMessages } from '../../messages';
12
13
  import { mediaInsertMessages } from '../../messages/media-insert';
@@ -82,6 +83,23 @@ export var ToolbarArrowKeyNavigationProvider = function ToolbarArrowKeyNavigatio
82
83
  var filteredFocusableElements = getFilteredFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
83
84
  (_filteredFocusableEle3 = filteredFocusableElements[selectedItemIndex.current]) === null || _filteredFocusableEle3 === void 0 || _filteredFocusableEle3.focus();
84
85
  };
86
+ var handleArrowRightMemoized = useCallback(function () {
87
+ var _filteredFocusableEle4;
88
+ var filteredFocusableElements = getFilteredFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
89
+ incrementIndex(filteredFocusableElements);
90
+ (_filteredFocusableEle4 = filteredFocusableElements[selectedItemIndex.current]) === null || _filteredFocusableEle4 === void 0 || _filteredFocusableEle4.focus();
91
+ }, [incrementIndex]);
92
+ var handleArrowLeftMemoized = useCallback(function () {
93
+ var _filteredFocusableEle5;
94
+ var filteredFocusableElements = getFilteredFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
95
+ decrementIndex(filteredFocusableElements);
96
+ (_filteredFocusableEle5 = filteredFocusableElements[selectedItemIndex.current]) === null || _filteredFocusableEle5 === void 0 || _filteredFocusableEle5.focus();
97
+ }, [decrementIndex]);
98
+ var handleTabMemoized = useCallback(function () {
99
+ var _filteredFocusableEle6;
100
+ var filteredFocusableElements = getFilteredFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
101
+ (_filteredFocusableEle6 = filteredFocusableElements[selectedItemIndex.current]) === null || _filteredFocusableEle6 === void 0 || _filteredFocusableEle6.focus();
102
+ }, []);
85
103
  var handleTabLocal = function handleTabLocal() {
86
104
  var filteredFocusableElements = getFilteredFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
87
105
  filteredFocusableElements.forEach(function (element) {
@@ -100,11 +118,19 @@ export var ToolbarArrowKeyNavigationProvider = function ToolbarArrowKeyNavigatio
100
118
  }
101
119
  element.focus();
102
120
  };
103
- var submenuKeydownHandleContext = {
121
+ var submenuKeydownHandleContextRaw = {
104
122
  handleArrowLeft: handleArrowLeft,
105
123
  handleArrowRight: handleArrowRight,
106
124
  handleTab: handleTab
107
125
  };
126
+ var submenuKeydownHandleContextMemoized = useMemo(function () {
127
+ return {
128
+ handleArrowLeft: handleArrowLeftMemoized,
129
+ handleArrowRight: handleArrowRightMemoized,
130
+ handleTab: handleTabMemoized
131
+ };
132
+ }, [handleArrowLeftMemoized, handleArrowRightMemoized, handleTabMemoized]);
133
+ var submenuKeydownHandleContext = fg('platform_editor_toolbar_rerender_optimization') ? submenuKeydownHandleContextMemoized : submenuKeydownHandleContextRaw;
108
134
  useLayoutEffect(function () {
109
135
  if (!wrapperRef.current || disableArrowKeyNavigation) {
110
136
  return;
@@ -179,10 +205,10 @@ export var ToolbarArrowKeyNavigationProvider = function ToolbarArrowKeyNavigatio
179
205
  // Ignored via go/ees005
180
206
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
181
207
  if (isShortcutToFocusToolbar(event)) {
182
- var _filteredFocusableEle4, _filteredFocusableEle5;
208
+ var _filteredFocusableEle7, _filteredFocusableEle8;
183
209
  var filteredFocusableElements = getFilteredFocusableElements(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current);
184
- (_filteredFocusableEle4 = filteredFocusableElements[0]) === null || _filteredFocusableEle4 === void 0 || _filteredFocusableEle4.focus();
185
- (_filteredFocusableEle5 = filteredFocusableElements[0]) === null || _filteredFocusableEle5 === void 0 || _filteredFocusableEle5.scrollIntoView({
210
+ (_filteredFocusableEle7 = filteredFocusableElements[0]) === null || _filteredFocusableEle7 === void 0 || _filteredFocusableEle7.focus();
211
+ (_filteredFocusableEle8 = filteredFocusableElements[0]) === null || _filteredFocusableEle8 === void 0 || _filteredFocusableEle8.scrollIntoView({
186
212
  behavior: 'smooth',
187
213
  block: 'center',
188
214
  inline: 'nearest'
@@ -6,6 +6,7 @@ type OfflineEditingAEP = TrackAEP<ACTION.OFFLINE_STORAGE_TOO_MANY_RETRIES_ERROR
6
6
  stepsCount?: number;
7
7
  status?: string;
8
8
  retryCount?: number;
9
+ disabled?: string | boolean;
9
10
  retrySource?: string;
10
11
  healthy?: boolean;
11
12
  }, undefined>;
@@ -91,7 +91,7 @@ export type ClearAnnotationResult = {
91
91
  };
92
92
  export type SelectAnnotationResult = {
93
93
  success: false;
94
- reason: ManagerFailureReasons | 'id-not-valid';
94
+ reason: ManagerFailureReasons | 'id-not-valid' | 'draft-in-progress';
95
95
  } | {
96
96
  success: true;
97
97
  isSelected: boolean;
@@ -154,6 +154,8 @@ export type AnnotationManager = AnnotationManagerMethods & {
154
154
  emit(event: {
155
155
  name: 'draftAnnotationStarted';
156
156
  data: AnnotationDraftStartedData;
157
+ } | {
158
+ name: 'draftAnnotationCleared';
157
159
  } | {
158
160
  name: 'annotationSelectionChanged';
159
161
  data: AnnotationSelectedChangeData;
@@ -171,5 +173,11 @@ export type AnnotationManager = AnnotationManagerMethods & {
171
173
  */
172
174
  unhook<H extends keyof AnnotationManagerMethods>(method: H, handler: AnnotationManagerMethods[H]): AnnotationManager;
173
175
  };
176
+ /**
177
+ * This is a factory method which creates a new instance of the AnnotationManager.
178
+ *
179
+ * @example
180
+ * const annotationManager: AnnotationManager = createAnnotationManager();
181
+ */
174
182
  export declare function createAnnotationManager(): AnnotationManager;
175
183
  export {};
@@ -9,6 +9,7 @@ import type { EditorCommand } from '../types/editor-command';
9
9
  export declare const addAltText: Keymap;
10
10
  export declare const navToEditorToolbar: Keymap;
11
11
  export declare const navToFloatingToolbar: Keymap;
12
+ export declare const askAIQuickInsert: Keymap;
12
13
  export declare const toggleBold: Keymap;
13
14
  export declare const toggleItalic: Keymap;
14
15
  export declare const toggleUnderline: Keymap;
@@ -9,4 +9,9 @@ export declare const messages: {
9
9
  defaultMessage: string;
10
10
  description: string;
11
11
  };
12
+ resizeHandle: {
13
+ id: string;
14
+ defaultMessage: string;
15
+ description: string;
16
+ };
12
17
  };
@@ -104,4 +104,9 @@ export declare const toolbarMessages: {
104
104
  defaultMessage: string;
105
105
  description: string;
106
106
  };
107
+ askAI: {
108
+ id: string;
109
+ defaultMessage: string;
110
+ description: string;
111
+ };
107
112
  };
@@ -6,6 +6,7 @@ type OfflineEditingAEP = TrackAEP<ACTION.OFFLINE_STORAGE_TOO_MANY_RETRIES_ERROR
6
6
  stepsCount?: number;
7
7
  status?: string;
8
8
  retryCount?: number;
9
+ disabled?: string | boolean;
9
10
  retrySource?: string;
10
11
  healthy?: boolean;
11
12
  }, undefined>;
@@ -91,7 +91,7 @@ export type ClearAnnotationResult = {
91
91
  };
92
92
  export type SelectAnnotationResult = {
93
93
  success: false;
94
- reason: ManagerFailureReasons | 'id-not-valid';
94
+ reason: ManagerFailureReasons | 'id-not-valid' | 'draft-in-progress';
95
95
  } | {
96
96
  success: true;
97
97
  isSelected: boolean;
@@ -154,6 +154,8 @@ export type AnnotationManager = AnnotationManagerMethods & {
154
154
  emit(event: {
155
155
  name: 'draftAnnotationStarted';
156
156
  data: AnnotationDraftStartedData;
157
+ } | {
158
+ name: 'draftAnnotationCleared';
157
159
  } | {
158
160
  name: 'annotationSelectionChanged';
159
161
  data: AnnotationSelectedChangeData;
@@ -171,5 +173,11 @@ export type AnnotationManager = AnnotationManagerMethods & {
171
173
  */
172
174
  unhook<H extends keyof AnnotationManagerMethods>(method: H, handler: AnnotationManagerMethods[H]): AnnotationManager;
173
175
  };
176
+ /**
177
+ * This is a factory method which creates a new instance of the AnnotationManager.
178
+ *
179
+ * @example
180
+ * const annotationManager: AnnotationManager = createAnnotationManager();
181
+ */
174
182
  export declare function createAnnotationManager(): AnnotationManager;
175
183
  export {};
@@ -9,6 +9,7 @@ import type { EditorCommand } from '../types/editor-command';
9
9
  export declare const addAltText: Keymap;
10
10
  export declare const navToEditorToolbar: Keymap;
11
11
  export declare const navToFloatingToolbar: Keymap;
12
+ export declare const askAIQuickInsert: Keymap;
12
13
  export declare const toggleBold: Keymap;
13
14
  export declare const toggleItalic: Keymap;
14
15
  export declare const toggleUnderline: Keymap;
@@ -9,4 +9,9 @@ export declare const messages: {
9
9
  defaultMessage: string;
10
10
  description: string;
11
11
  };
12
+ resizeHandle: {
13
+ id: string;
14
+ defaultMessage: string;
15
+ description: string;
16
+ };
12
17
  };
@@ -104,4 +104,9 @@ export declare const toolbarMessages: {
104
104
  defaultMessage: string;
105
105
  description: string;
106
106
  };
107
+ askAI: {
108
+ id: string;
109
+ defaultMessage: string;
110
+ description: string;
111
+ };
107
112
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "105.10.0",
3
+ "version": "105.11.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/"
@@ -169,9 +169,9 @@
169
169
  "@atlaskit/task-decision": "^19.2.0",
170
170
  "@atlaskit/textfield": "^8.0.0",
171
171
  "@atlaskit/theme": "^18.0.0",
172
- "@atlaskit/tmp-editor-statsig": "^5.0.0",
172
+ "@atlaskit/tmp-editor-statsig": "^5.1.0",
173
173
  "@atlaskit/tokens": "^4.9.0",
174
- "@atlaskit/tooltip": "^20.0.0",
174
+ "@atlaskit/tooltip": "^20.1.0",
175
175
  "@atlaskit/width-detector": "^5.0.0",
176
176
  "@babel/runtime": "^7.0.0",
177
177
  "@compiled/react": "^0.18.3",
@@ -373,6 +373,9 @@
373
373
  "platform_editor_add_border_for_nested_panel": {
374
374
  "type": "boolean"
375
375
  },
376
+ "platform_editor_bordered_panel_nested_in_table": {
377
+ "type": "boolean"
378
+ },
376
379
  "platform_editor_fix_code_block_bg_color_in_macro": {
377
380
  "type": "boolean"
378
381
  },
@@ -390,6 +393,9 @@
390
393
  },
391
394
  "dst-a11y__replace-anchor-with-link__editor": {
392
395
  "type": "boolean"
396
+ },
397
+ "platform_editor_toolbar_rerender_optimization": {
398
+ "type": "boolean"
393
399
  }
394
400
  }
395
401
  }