@atlaskit/editor-common 107.26.2 → 107.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/context-panel/package.json +17 -0
  3. package/dist/cjs/ai-messages/ai.js +5 -0
  4. package/dist/cjs/commands/index.js +7 -2
  5. package/dist/cjs/monitoring/error.js +1 -1
  6. package/dist/cjs/node-anchor/node-anchor-provider.js +5 -0
  7. package/dist/cjs/preset/core-plugin/index.js +9 -0
  8. package/dist/cjs/toolbar/EditorToolbarUIProvider.js +4 -2
  9. package/dist/cjs/toolbar/context.js +6 -3
  10. package/dist/cjs/ui/DropList/index.js +1 -1
  11. package/dist/es2019/ai-messages/ai.js +5 -0
  12. package/dist/es2019/commands/index.js +7 -2
  13. package/dist/es2019/monitoring/error.js +1 -1
  14. package/dist/es2019/node-anchor/node-anchor-provider.js +3 -0
  15. package/dist/es2019/preset/core-plugin/index.js +9 -0
  16. package/dist/es2019/toolbar/EditorToolbarUIProvider.js +4 -2
  17. package/dist/es2019/toolbar/context.js +6 -3
  18. package/dist/es2019/ui/DropList/index.js +1 -1
  19. package/dist/esm/ai-messages/ai.js +5 -0
  20. package/dist/esm/commands/index.js +7 -2
  21. package/dist/esm/monitoring/error.js +1 -1
  22. package/dist/esm/node-anchor/node-anchor-provider.js +5 -0
  23. package/dist/esm/preset/core-plugin/index.js +9 -0
  24. package/dist/esm/toolbar/EditorToolbarUIProvider.js +4 -2
  25. package/dist/esm/toolbar/context.js +6 -3
  26. package/dist/esm/ui/DropList/index.js +1 -1
  27. package/dist/types/ai-messages/ai.d.ts +5 -0
  28. package/dist/types/node-anchor/node-anchor-provider.d.ts +1 -0
  29. package/dist/types/toolbar/EditorToolbarUIProvider.d.ts +6 -3
  30. package/dist/types/toolbar/context.d.ts +4 -2
  31. package/dist/types/toolbar/index.d.ts +1 -1
  32. package/dist/types/types/next-editor-plugin.d.ts +8 -1
  33. package/dist/types-ts4.5/ai-messages/ai.d.ts +5 -0
  34. package/dist/types-ts4.5/node-anchor/node-anchor-provider.d.ts +1 -0
  35. package/dist/types-ts4.5/toolbar/EditorToolbarUIProvider.d.ts +6 -3
  36. package/dist/types-ts4.5/toolbar/context.d.ts +4 -2
  37. package/dist/types-ts4.5/toolbar/index.d.ts +1 -1
  38. package/dist/types-ts4.5/types/next-editor-plugin.d.ts +8 -1
  39. package/package.json +6 -5
package/CHANGELOG.md CHANGED
@@ -1,5 +1,33 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 107.28.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`d2a535bed291e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d2a535bed291e) -
8
+ [EDITOR-1153] Let the `editor-plugin-indentation` handle `paragraphs` when they are selected in a
9
+ range with `blockTaskItem`, but don't indent the `paragraphs` inside `blockTaskItem`s
10
+
11
+ ### Patch Changes
12
+
13
+ - [`286abb4d35eba`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/286abb4d35eba) -
14
+ [ux] [ED-28960] Finish full page primary toolbar migration
15
+
16
+ - Align with design update (separator, gap, height, icon size)
17
+ - Add keyboard shortcut to focus toolbar and arrow key navigation
18
+ - Address accessibility
19
+
20
+ - Updated dependencies
21
+
22
+ ## 107.27.0
23
+
24
+ ### Minor Changes
25
+
26
+ - [`1dc35286ebb8a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1dc35286ebb8a) -
27
+ [ux] [EDITOR-1064] Added rovo menu on current selection toolbar
28
+ - [`e05e3e8cd0659`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e05e3e8cd0659) -
29
+ ED-28776 implement native anchor api
30
+
3
31
  ## 107.26.2
4
32
 
5
33
  ### Patch Changes
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "@atlaskit/editor-common/context-panel",
3
+ "main": "../dist/cjs/ui/ContextPanel/context.js",
4
+ "module": "../dist/esm/ui/ContextPanel/context.js",
5
+ "module:es2019": "../dist/es2019/ui/ContextPanel/context.js",
6
+ "sideEffects": [
7
+ "**/*.compiled.css"
8
+ ],
9
+ "types": "../dist/types/ui/ContextPanel/context.d.ts",
10
+ "typesVersions": {
11
+ ">=4.5 <5.9": {
12
+ "*": [
13
+ "../dist/types-ts4.5/ui/ContextPanel/context.d.ts"
14
+ ]
15
+ }
16
+ }
17
+ }
@@ -63,6 +63,11 @@ var aiMessages = exports.aiMessages = (0, _reactIntlNext.defineMessages)({
63
63
  defaultMessage: "Ask AI {key}+'",
64
64
  description: 'Tooltip text for an option to use Atlassian Intellgience with quick command'
65
65
  },
66
+ askRovoToolbarIconTooltipQuickCommand: {
67
+ id: 'fabric.editor.ai.toolbar.askRovo.tooltip.quickCommand',
68
+ defaultMessage: "Ask Rovo {key}+'",
69
+ description: 'Tooltip text for an option to use Rovo AI with quick command'
70
+ },
66
71
  tryAIToolbarIconTitle: {
67
72
  id: 'fabric.editor.ai.toolbar.tryAI.title',
68
73
  defaultMessage: 'Try AI',
@@ -106,10 +106,12 @@ var createToggleBlockMarkOnRange = exports.createToggleBlockMarkOnRange = functi
106
106
  return function (from, to, tr, state) {
107
107
  var markApplied = false;
108
108
  state.doc.nodesBetween(from, to, function (node, pos, parent) {
109
+ var _state$schema, _state$schema2, _state$schema3;
109
110
  if (!node.type.isBlock) {
110
111
  return false;
111
112
  }
112
- if ((!allowedBlocks || (Array.isArray(allowedBlocks) ? allowedBlocks.indexOf(node.type) > -1 : allowedBlocks(state.schema, node, parent))) && parent !== null && parent !== void 0 && parent.type.allowsMarkType(markType)) {
113
+ var parentAllowsMark = state !== null && state !== void 0 && (_state$schema = state.schema) !== null && _state$schema !== void 0 && (_state$schema = _state$schema.nodes) !== null && _state$schema !== void 0 && _state$schema.blockTaskItem && (parent === null || parent === void 0 ? void 0 : parent.type) === (state === null || state === void 0 || (_state$schema2 = state.schema) === null || _state$schema2 === void 0 || (_state$schema2 = _state$schema2.nodes) === null || _state$schema2 === void 0 ? void 0 : _state$schema2.blockTaskItem) && markType === (state === null || state === void 0 || (_state$schema3 = state.schema) === null || _state$schema3 === void 0 || (_state$schema3 = _state$schema3.marks) === null || _state$schema3 === void 0 ? void 0 : _state$schema3.indentation) ? false : parent === null || parent === void 0 ? void 0 : parent.type.allowsMarkType(markType);
114
+ if ((!allowedBlocks || (Array.isArray(allowedBlocks) ? allowedBlocks.indexOf(node.type) > -1 : allowedBlocks(state.schema, node, parent))) && parentAllowsMark) {
113
115
  var oldMarks = node.marks.filter(function (mark) {
114
116
  return mark.type === markType;
115
117
  });
@@ -131,10 +133,13 @@ var createToggleBlockMarkOnRangeNext = exports.createToggleBlockMarkOnRangeNext
131
133
  return function (from, to, tr) {
132
134
  var markApplied = false;
133
135
  tr.doc.nodesBetween(from, to, function (node, pos, parent) {
136
+ var _schema$nodes, _schema$nodes2, _schema$marks;
134
137
  if (!node.type.isBlock) {
135
138
  return false;
136
139
  }
137
- if ((!allowedBlocks || (Array.isArray(allowedBlocks) ? allowedBlocks.indexOf(node.type) > -1 : allowedBlocks(tr.doc.type.schema, node, parent))) && parent !== null && parent !== void 0 && parent.type.allowsMarkType(markType)) {
140
+ var schema = tr.doc.type.schema;
141
+ var parentAllowsMark = schema !== null && schema !== void 0 && (_schema$nodes = schema.nodes) !== null && _schema$nodes !== void 0 && _schema$nodes.blockTaskItem && (parent === null || parent === void 0 ? void 0 : parent.type) === (schema === null || schema === void 0 || (_schema$nodes2 = schema.nodes) === null || _schema$nodes2 === void 0 ? void 0 : _schema$nodes2.blockTaskItem) && markType === (schema === null || schema === void 0 || (_schema$marks = schema.marks) === null || _schema$marks === void 0 ? void 0 : _schema$marks.indentation) ? false : parent === null || parent === void 0 ? void 0 : parent.type.allowsMarkType(markType);
142
+ if ((!allowedBlocks || (Array.isArray(allowedBlocks) ? allowedBlocks.indexOf(node.type) > -1 : allowedBlocks(tr.doc.type.schema, node, parent))) && parentAllowsMark) {
138
143
  var oldMarks = node.marks.filter(function (mark) {
139
144
  return mark.type === markType;
140
145
  });
@@ -16,7 +16,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
16
16
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
17
17
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
18
18
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
19
- var packageVersion = "107.26.1";
19
+ var packageVersion = "107.27.0";
20
20
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
21
21
  // Remove URL as it has UGC
22
22
  // Ignored via go/ees007
@@ -35,6 +35,11 @@ var NodeAnchorProvider = exports.NodeAnchorProvider = /*#__PURE__*/function () {
35
35
  this.cache.set(node, anchorName);
36
36
  return anchorName;
37
37
  }
38
+ }, {
39
+ key: "getIdForNode",
40
+ value: function getIdForNode(node) {
41
+ return this.cache.get(node) || undefined;
42
+ }
38
43
  }]);
39
44
  }();
40
45
  var nodeIdProviderMap = new WeakMap();
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.corePlugin = void 0;
7
7
  var _model = require("@atlaskit/editor-prosemirror/model");
8
8
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
9
+ var _nodeAnchorProvider = require("../../node-anchor/node-anchor-provider");
9
10
  var _processRawValue = require("../../utils/processRawValue");
10
11
  var _editorCommands = require("../editor-commands");
11
12
  var _requestDocument = require("./requestDocument");
@@ -125,6 +126,14 @@ var corePlugin = exports.corePlugin = function corePlugin(_ref) {
125
126
  return undefined;
126
127
  }
127
128
  return cb(view === null || view === void 0 ? void 0 : view.state.schema);
129
+ },
130
+ getAnchorIdForNode: function getAnchorIdForNode(node) {
131
+ var _config$getEditorView3;
132
+ var view = (_config$getEditorView3 = config === null || config === void 0 ? void 0 : config.getEditorView()) !== null && _config$getEditorView3 !== void 0 ? _config$getEditorView3 : null;
133
+ if (!view) {
134
+ return undefined;
135
+ }
136
+ return (0, _nodeAnchorProvider.getNodeIdProvider)(view).getIdForNode(node);
128
137
  }
129
138
  }
130
139
  };
@@ -11,7 +11,8 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
11
11
  var EditorToolbarUIProvider = exports.EditorToolbarUIProvider = function EditorToolbarUIProvider(_ref) {
12
12
  var children = _ref.children,
13
13
  api = _ref.api,
14
- isDisabled = _ref.isDisabled;
14
+ isDisabled = _ref.isDisabled,
15
+ popupsMountPoint = _ref.popupsMountPoint;
15
16
  var onDropdownOpenChanged = (0, _react.useCallback)(function (_ref2) {
16
17
  var isOpen = _ref2.isOpen;
17
18
  if (!isOpen) {
@@ -25,6 +26,7 @@ var EditorToolbarUIProvider = exports.EditorToolbarUIProvider = function EditorT
25
26
  return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarUIProvider, {
26
27
  onDropdownOpenChanged: onDropdownOpenChanged,
27
28
  preventDefaultOnMouseDown: true,
28
- isDisabled: isDisabled
29
+ isDisabled: isDisabled,
30
+ popupsMountPoint: popupsMountPoint
29
31
  }, children);
30
32
  };
@@ -8,7 +8,8 @@ exports.useEditorToolbar = exports.EditorToolbarProvider = void 0;
8
8
  var _react = _interopRequireWildcard(require("react"));
9
9
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
10
10
  var EditorToolbarContext = /*#__PURE__*/(0, _react.createContext)({
11
- editorView: null
11
+ editorView: null,
12
+ editorAppearance: undefined
12
13
  });
13
14
 
14
15
  /**
@@ -23,10 +24,12 @@ var useEditorToolbar = exports.useEditorToolbar = function useEditorToolbar() {
23
24
  };
24
25
  var EditorToolbarProvider = exports.EditorToolbarProvider = function EditorToolbarProvider(_ref) {
25
26
  var children = _ref.children,
26
- editorView = _ref.editorView;
27
+ editorView = _ref.editorView,
28
+ editorAppearance = _ref.editorAppearance;
27
29
  return /*#__PURE__*/_react.default.createElement(EditorToolbarContext.Provider, {
28
30
  value: {
29
- editorView: editorView
31
+ editorView: editorView,
32
+ editorAppearance: editorAppearance
30
33
  }
31
34
  }, children);
32
35
  };
@@ -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 = "107.26.1";
27
+ var packageVersion = "107.27.0";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -57,6 +57,11 @@ export const aiMessages = defineMessages({
57
57
  defaultMessage: "Ask AI {key}+'",
58
58
  description: 'Tooltip text for an option to use Atlassian Intellgience with quick command'
59
59
  },
60
+ askRovoToolbarIconTooltipQuickCommand: {
61
+ id: 'fabric.editor.ai.toolbar.askRovo.tooltip.quickCommand',
62
+ defaultMessage: "Ask Rovo {key}+'",
63
+ description: 'Tooltip text for an option to use Rovo AI with quick command'
64
+ },
60
65
  tryAIToolbarIconTitle: {
61
66
  id: 'fabric.editor.ai.toolbar.tryAI.title',
62
67
  defaultMessage: 'Try AI',
@@ -94,10 +94,12 @@ export const changeImageAlignmentNext = align => tr => {
94
94
  export const createToggleBlockMarkOnRange = (markType, getAttrs, allowedBlocks) => (from, to, tr, state) => {
95
95
  let markApplied = false;
96
96
  state.doc.nodesBetween(from, to, (node, pos, parent) => {
97
+ var _state$schema, _state$schema$nodes, _state$schema2, _state$schema2$nodes, _state$schema3, _state$schema3$marks;
97
98
  if (!node.type.isBlock) {
98
99
  return false;
99
100
  }
100
- if ((!allowedBlocks || (Array.isArray(allowedBlocks) ? allowedBlocks.indexOf(node.type) > -1 : allowedBlocks(state.schema, node, parent))) && parent !== null && parent !== void 0 && parent.type.allowsMarkType(markType)) {
101
+ const parentAllowsMark = state !== null && state !== void 0 && (_state$schema = state.schema) !== null && _state$schema !== void 0 && (_state$schema$nodes = _state$schema.nodes) !== null && _state$schema$nodes !== void 0 && _state$schema$nodes.blockTaskItem && (parent === null || parent === void 0 ? void 0 : parent.type) === (state === null || state === void 0 ? void 0 : (_state$schema2 = state.schema) === null || _state$schema2 === void 0 ? void 0 : (_state$schema2$nodes = _state$schema2.nodes) === null || _state$schema2$nodes === void 0 ? void 0 : _state$schema2$nodes.blockTaskItem) && markType === (state === null || state === void 0 ? void 0 : (_state$schema3 = state.schema) === null || _state$schema3 === void 0 ? void 0 : (_state$schema3$marks = _state$schema3.marks) === null || _state$schema3$marks === void 0 ? void 0 : _state$schema3$marks.indentation) ? false : parent === null || parent === void 0 ? void 0 : parent.type.allowsMarkType(markType);
102
+ if ((!allowedBlocks || (Array.isArray(allowedBlocks) ? allowedBlocks.indexOf(node.type) > -1 : allowedBlocks(state.schema, node, parent))) && parentAllowsMark) {
101
103
  const oldMarks = node.marks.filter(mark => mark.type === markType);
102
104
  const prevAttrs = oldMarks.length ? oldMarks[0].attrs : undefined;
103
105
  const newAttrs = getAttrs(prevAttrs, node);
@@ -113,10 +115,13 @@ export const createToggleBlockMarkOnRange = (markType, getAttrs, allowedBlocks)
113
115
  export const createToggleBlockMarkOnRangeNext = (markType, getAttrs, allowedBlocks) => (from, to, tr) => {
114
116
  let markApplied = false;
115
117
  tr.doc.nodesBetween(from, to, (node, pos, parent) => {
118
+ var _schema$nodes, _schema$nodes2, _schema$marks;
116
119
  if (!node.type.isBlock) {
117
120
  return false;
118
121
  }
119
- if ((!allowedBlocks || (Array.isArray(allowedBlocks) ? allowedBlocks.indexOf(node.type) > -1 : allowedBlocks(tr.doc.type.schema, node, parent))) && parent !== null && parent !== void 0 && parent.type.allowsMarkType(markType)) {
122
+ const schema = tr.doc.type.schema;
123
+ const parentAllowsMark = schema !== null && schema !== void 0 && (_schema$nodes = schema.nodes) !== null && _schema$nodes !== void 0 && _schema$nodes.blockTaskItem && (parent === null || parent === void 0 ? void 0 : parent.type) === (schema === null || schema === void 0 ? void 0 : (_schema$nodes2 = schema.nodes) === null || _schema$nodes2 === void 0 ? void 0 : _schema$nodes2.blockTaskItem) && markType === (schema === null || schema === void 0 ? void 0 : (_schema$marks = schema.marks) === null || _schema$marks === void 0 ? void 0 : _schema$marks.indentation) ? false : parent === null || parent === void 0 ? void 0 : parent.type.allowsMarkType(markType);
124
+ if ((!allowedBlocks || (Array.isArray(allowedBlocks) ? allowedBlocks.indexOf(node.type) > -1 : allowedBlocks(tr.doc.type.schema, node, parent))) && parentAllowsMark) {
120
125
  const oldMarks = node.marks.filter(mark => mark.type === markType);
121
126
  const prevAttrs = oldMarks.length ? oldMarks[0].attrs : undefined;
122
127
  const newAttrs = getAttrs(prevAttrs, node);
@@ -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 = "107.26.1";
4
+ const packageVersion = "107.27.0";
5
5
  const sanitiseSentryEvents = (data, _hint) => {
6
6
  // Remove URL as it has UGC
7
7
  // Ignored via go/ees007
@@ -22,6 +22,9 @@ export class NodeAnchorProvider {
22
22
  this.cache.set(node, anchorName);
23
23
  return anchorName;
24
24
  }
25
+ getIdForNode(node) {
26
+ return this.cache.get(node) || undefined;
27
+ }
25
28
  }
26
29
  const nodeIdProviderMap = new WeakMap();
27
30
 
@@ -1,5 +1,6 @@
1
1
  import { Node } from '@atlaskit/editor-prosemirror/model';
2
2
  import { fg } from '@atlaskit/platform-feature-flags';
3
+ import { getNodeIdProvider } from '../../node-anchor/node-anchor-provider';
3
4
  import { processRawFragmentValue, processRawValue, processRawValueWithoutValidation } from '../../utils/processRawValue';
4
5
  import { editorCommandToPMCommand } from '../editor-commands';
5
6
  import { createThrottleSchedule, returnDocumentRequest } from './requestDocument';
@@ -127,6 +128,14 @@ export const corePlugin = ({
127
128
  return undefined;
128
129
  }
129
130
  return cb(view === null || view === void 0 ? void 0 : view.state.schema);
131
+ },
132
+ getAnchorIdForNode(node) {
133
+ var _config$getEditorView3;
134
+ const view = (_config$getEditorView3 = config === null || config === void 0 ? void 0 : config.getEditorView()) !== null && _config$getEditorView3 !== void 0 ? _config$getEditorView3 : null;
135
+ if (!view) {
136
+ return undefined;
137
+ }
138
+ return getNodeIdProvider(view).getIdForNode(node);
130
139
  }
131
140
  }
132
141
  };
@@ -3,7 +3,8 @@ import { ToolbarUIProvider } from '@atlaskit/editor-toolbar';
3
3
  export const EditorToolbarUIProvider = ({
4
4
  children,
5
5
  api,
6
- isDisabled
6
+ isDisabled,
7
+ popupsMountPoint
7
8
  }) => {
8
9
  const onDropdownOpenChanged = useCallback(({
9
10
  isOpen
@@ -19,6 +20,7 @@ export const EditorToolbarUIProvider = ({
19
20
  return /*#__PURE__*/React.createElement(ToolbarUIProvider, {
20
21
  onDropdownOpenChanged: onDropdownOpenChanged,
21
22
  preventDefaultOnMouseDown: true,
22
- isDisabled: isDisabled
23
+ isDisabled: isDisabled,
24
+ popupsMountPoint: popupsMountPoint
23
25
  }, children);
24
26
  };
@@ -1,6 +1,7 @@
1
1
  import React, { createContext, useContext } from 'react';
2
2
  const EditorToolbarContext = /*#__PURE__*/createContext({
3
- editorView: null
3
+ editorView: null,
4
+ editorAppearance: undefined
4
5
  });
5
6
 
6
7
  /**
@@ -15,11 +16,13 @@ export const useEditorToolbar = () => {
15
16
  };
16
17
  export const EditorToolbarProvider = ({
17
18
  children,
18
- editorView
19
+ editorView,
20
+ editorAppearance
19
21
  }) => {
20
22
  return /*#__PURE__*/React.createElement(EditorToolbarContext.Provider, {
21
23
  value: {
22
- editorView
24
+ editorView,
25
+ editorAppearance
23
26
  }
24
27
  }, children);
25
28
  };
@@ -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 = "107.26.1";
17
+ const packageVersion = "107.27.0";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -57,6 +57,11 @@ export var aiMessages = defineMessages({
57
57
  defaultMessage: "Ask AI {key}+'",
58
58
  description: 'Tooltip text for an option to use Atlassian Intellgience with quick command'
59
59
  },
60
+ askRovoToolbarIconTooltipQuickCommand: {
61
+ id: 'fabric.editor.ai.toolbar.askRovo.tooltip.quickCommand',
62
+ defaultMessage: "Ask Rovo {key}+'",
63
+ description: 'Tooltip text for an option to use Rovo AI with quick command'
64
+ },
60
65
  tryAIToolbarIconTitle: {
61
66
  id: 'fabric.editor.ai.toolbar.tryAI.title',
62
67
  defaultMessage: 'Try AI',
@@ -86,10 +86,12 @@ export var createToggleBlockMarkOnRange = function createToggleBlockMarkOnRange(
86
86
  return function (from, to, tr, state) {
87
87
  var markApplied = false;
88
88
  state.doc.nodesBetween(from, to, function (node, pos, parent) {
89
+ var _state$schema, _state$schema2, _state$schema3;
89
90
  if (!node.type.isBlock) {
90
91
  return false;
91
92
  }
92
- if ((!allowedBlocks || (Array.isArray(allowedBlocks) ? allowedBlocks.indexOf(node.type) > -1 : allowedBlocks(state.schema, node, parent))) && parent !== null && parent !== void 0 && parent.type.allowsMarkType(markType)) {
93
+ var parentAllowsMark = state !== null && state !== void 0 && (_state$schema = state.schema) !== null && _state$schema !== void 0 && (_state$schema = _state$schema.nodes) !== null && _state$schema !== void 0 && _state$schema.blockTaskItem && (parent === null || parent === void 0 ? void 0 : parent.type) === (state === null || state === void 0 || (_state$schema2 = state.schema) === null || _state$schema2 === void 0 || (_state$schema2 = _state$schema2.nodes) === null || _state$schema2 === void 0 ? void 0 : _state$schema2.blockTaskItem) && markType === (state === null || state === void 0 || (_state$schema3 = state.schema) === null || _state$schema3 === void 0 || (_state$schema3 = _state$schema3.marks) === null || _state$schema3 === void 0 ? void 0 : _state$schema3.indentation) ? false : parent === null || parent === void 0 ? void 0 : parent.type.allowsMarkType(markType);
94
+ if ((!allowedBlocks || (Array.isArray(allowedBlocks) ? allowedBlocks.indexOf(node.type) > -1 : allowedBlocks(state.schema, node, parent))) && parentAllowsMark) {
93
95
  var oldMarks = node.marks.filter(function (mark) {
94
96
  return mark.type === markType;
95
97
  });
@@ -111,10 +113,13 @@ export var createToggleBlockMarkOnRangeNext = function createToggleBlockMarkOnRa
111
113
  return function (from, to, tr) {
112
114
  var markApplied = false;
113
115
  tr.doc.nodesBetween(from, to, function (node, pos, parent) {
116
+ var _schema$nodes, _schema$nodes2, _schema$marks;
114
117
  if (!node.type.isBlock) {
115
118
  return false;
116
119
  }
117
- if ((!allowedBlocks || (Array.isArray(allowedBlocks) ? allowedBlocks.indexOf(node.type) > -1 : allowedBlocks(tr.doc.type.schema, node, parent))) && parent !== null && parent !== void 0 && parent.type.allowsMarkType(markType)) {
120
+ var schema = tr.doc.type.schema;
121
+ var parentAllowsMark = schema !== null && schema !== void 0 && (_schema$nodes = schema.nodes) !== null && _schema$nodes !== void 0 && _schema$nodes.blockTaskItem && (parent === null || parent === void 0 ? void 0 : parent.type) === (schema === null || schema === void 0 || (_schema$nodes2 = schema.nodes) === null || _schema$nodes2 === void 0 ? void 0 : _schema$nodes2.blockTaskItem) && markType === (schema === null || schema === void 0 || (_schema$marks = schema.marks) === null || _schema$marks === void 0 ? void 0 : _schema$marks.indentation) ? false : parent === null || parent === void 0 ? void 0 : parent.type.allowsMarkType(markType);
122
+ if ((!allowedBlocks || (Array.isArray(allowedBlocks) ? allowedBlocks.indexOf(node.type) > -1 : allowedBlocks(tr.doc.type.schema, node, parent))) && parentAllowsMark) {
118
123
  var oldMarks = node.marks.filter(function (mark) {
119
124
  return mark.type === markType;
120
125
  });
@@ -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 = "107.26.1";
10
+ var packageVersion = "107.27.0";
11
11
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
12
12
  // Remove URL as it has UGC
13
13
  // Ignored via go/ees007
@@ -28,6 +28,11 @@ export var NodeAnchorProvider = /*#__PURE__*/function () {
28
28
  this.cache.set(node, anchorName);
29
29
  return anchorName;
30
30
  }
31
+ }, {
32
+ key: "getIdForNode",
33
+ value: function getIdForNode(node) {
34
+ return this.cache.get(node) || undefined;
35
+ }
31
36
  }]);
32
37
  }();
33
38
  var nodeIdProviderMap = new WeakMap();
@@ -1,5 +1,6 @@
1
1
  import { Node } from '@atlaskit/editor-prosemirror/model';
2
2
  import { fg } from '@atlaskit/platform-feature-flags';
3
+ import { getNodeIdProvider } from '../../node-anchor/node-anchor-provider';
3
4
  import { processRawFragmentValue, processRawValue, processRawValueWithoutValidation } from '../../utils/processRawValue';
4
5
  import { editorCommandToPMCommand } from '../editor-commands';
5
6
  import { createThrottleSchedule, returnDocumentRequest } from './requestDocument';
@@ -120,6 +121,14 @@ export var corePlugin = function corePlugin(_ref) {
120
121
  return undefined;
121
122
  }
122
123
  return cb(view === null || view === void 0 ? void 0 : view.state.schema);
124
+ },
125
+ getAnchorIdForNode: function getAnchorIdForNode(node) {
126
+ var _config$getEditorView3;
127
+ var view = (_config$getEditorView3 = config === null || config === void 0 ? void 0 : config.getEditorView()) !== null && _config$getEditorView3 !== void 0 ? _config$getEditorView3 : null;
128
+ if (!view) {
129
+ return undefined;
130
+ }
131
+ return getNodeIdProvider(view).getIdForNode(node);
123
132
  }
124
133
  }
125
134
  };
@@ -3,7 +3,8 @@ import { ToolbarUIProvider } from '@atlaskit/editor-toolbar';
3
3
  export var EditorToolbarUIProvider = function EditorToolbarUIProvider(_ref) {
4
4
  var children = _ref.children,
5
5
  api = _ref.api,
6
- isDisabled = _ref.isDisabled;
6
+ isDisabled = _ref.isDisabled,
7
+ popupsMountPoint = _ref.popupsMountPoint;
7
8
  var onDropdownOpenChanged = useCallback(function (_ref2) {
8
9
  var isOpen = _ref2.isOpen;
9
10
  if (!isOpen) {
@@ -17,6 +18,7 @@ export var EditorToolbarUIProvider = function EditorToolbarUIProvider(_ref) {
17
18
  return /*#__PURE__*/React.createElement(ToolbarUIProvider, {
18
19
  onDropdownOpenChanged: onDropdownOpenChanged,
19
20
  preventDefaultOnMouseDown: true,
20
- isDisabled: isDisabled
21
+ isDisabled: isDisabled,
22
+ popupsMountPoint: popupsMountPoint
21
23
  }, children);
22
24
  };
@@ -1,6 +1,7 @@
1
1
  import React, { createContext, useContext } from 'react';
2
2
  var EditorToolbarContext = /*#__PURE__*/createContext({
3
- editorView: null
3
+ editorView: null,
4
+ editorAppearance: undefined
4
5
  });
5
6
 
6
7
  /**
@@ -15,10 +16,12 @@ export var useEditorToolbar = function useEditorToolbar() {
15
16
  };
16
17
  export var EditorToolbarProvider = function EditorToolbarProvider(_ref) {
17
18
  var children = _ref.children,
18
- editorView = _ref.editorView;
19
+ editorView = _ref.editorView,
20
+ editorAppearance = _ref.editorAppearance;
19
21
  return /*#__PURE__*/React.createElement(EditorToolbarContext.Provider, {
20
22
  value: {
21
- editorView: editorView
23
+ editorView: editorView,
24
+ editorAppearance: editorAppearance
22
25
  }
23
26
  }, children);
24
27
  };
@@ -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 = "107.26.1";
24
+ var packageVersion = "107.27.0";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
@@ -54,6 +54,11 @@ export declare const aiMessages: {
54
54
  defaultMessage: string;
55
55
  description: string;
56
56
  };
57
+ askRovoToolbarIconTooltipQuickCommand: {
58
+ id: string;
59
+ defaultMessage: string;
60
+ description: string;
61
+ };
57
62
  tryAIToolbarIconTitle: {
58
63
  id: string;
59
64
  defaultMessage: string;
@@ -5,5 +5,6 @@ export declare class NodeAnchorProvider {
5
5
  private count;
6
6
  private existingPos;
7
7
  getOrGenerateId(node: PMNode, pos: number): string | null;
8
+ getIdForNode(node: PMNode): string | undefined;
8
9
  }
9
10
  export declare const getNodeIdProvider: (editorView: EditorView) => NodeAnchorProvider;
@@ -1,7 +1,10 @@
1
1
  import React from 'react';
2
+ import type { ToolbarUIContextType } from '@atlaskit/editor-toolbar';
2
3
  import type { ExtractInjectionAPI, NextEditorPlugin } from '../types';
3
- export declare const EditorToolbarUIProvider: ({ children, api, isDisabled, }: {
4
+ type Props = Pick<ToolbarUIContextType, 'popupsMountPoint'> & {
5
+ api: ExtractInjectionAPI<NextEditorPlugin<any, any>> | undefined;
4
6
  children: React.ReactNode;
5
7
  isDisabled?: boolean;
6
- api: ExtractInjectionAPI<NextEditorPlugin<any, any>> | undefined;
7
- }) => React.JSX.Element;
8
+ };
9
+ export declare const EditorToolbarUIProvider: ({ children, api, isDisabled, popupsMountPoint }: Props) => React.JSX.Element;
10
+ export {};
@@ -1,7 +1,9 @@
1
1
  import React from 'react';
2
2
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
3
- type EditorToolbarContextType = {
3
+ import type { EditorAppearance } from '../types';
4
+ export type EditorToolbarContextType = {
4
5
  editorView: EditorView | null;
6
+ editorAppearance?: EditorAppearance;
5
7
  };
6
8
  /**
7
9
  * Access editor specific config and state within a toolbar component
@@ -10,5 +12,5 @@ export declare const useEditorToolbar: () => EditorToolbarContextType;
10
12
  type EditorToolbarProviderProps = {
11
13
  children: React.ReactNode;
12
14
  } & EditorToolbarContextType;
13
- export declare const EditorToolbarProvider: ({ children, editorView }: EditorToolbarProviderProps) => React.JSX.Element;
15
+ export declare const EditorToolbarProvider: ({ children, editorView, editorAppearance, }: EditorToolbarProviderProps) => React.JSX.Element;
14
16
  export {};
@@ -1,5 +1,5 @@
1
1
  export { TOOLBAR_RANK, AI_SECTION_RANK, ROVO_GROUP_RANK, IMPROVE_WRITING_GROUP_RANK, ROVO_MENU_RANK, ROVO_PROMPT_MENU_SECTION_RANK, CHANGE_TONE_MENU_RANK, CHANGE_TONE_MENU_SECTION_RANK, TRANSLATE_MENU_RANK, COLLAB_SECTION_RANK, COMMENT_GROUP_RANK, TEXT_SECTION_RANK, TEXT_STYLES_GROUP_RANK, TEXT_STYLES_MENU_RANK, TEXT_STYLES_MENU_SECTION_RANK, TEXT_FORMAT_GROUP_RANK, TEXT_FORMAT_MENU_RANK, TEXT_FORMATTING_MENU_SECTION_RANK, CLEAR_FORMARTTING_MENU_SECTION_RANK, TEXT_COLOR_HIGHLIGHT_MENU_SECTION_RANK, TEXT_COLOR_HIGHLIGHT_GROUP_RANK, TEXT_COLOR_HIGHLIGHT_MENU_RANK, OVERFLOW_SECTION_RANK, OVERFLOW_GROUP_RANK, OVERFLOW_MENU_RANK, PIN_MENU_SECTION_RANK, INSERT_BLOCK_SECTION_RANK, TASK_LIST_GROUP_RANK, MEDIA_GROUP_RANK, MENTION_GROUP_RANK, EMOJI_GROUP_RANK, LAYOUT_GROUP_RANK, TABLE_GROUP_RANK, LINKING_SECTION_RANK, LINKING_GROUP_RANK, ALIGNMENT_GROUP_RANK, ALIGNMENT_MENU_RANK, ALIGNMENT_MENU_SECTION_RANK, LISTS_INDENTATION_GROUP_RANK, LISTS_INDENTATION_MENU_RANK, LISTS_INDENTATION_MENU_SECTION_RANK, TRACK_CHANGES_SECTION_RANK, TRACK_CHANGES_GROUP_RANK, } from './rank';
2
2
  export { TOOLBARS, AI_SECTION, ROVO_GROUP, IMPROVE_WRITING_GROUP, IMPROVE_WRITING_BUTTON, ROVO_HERO_BUTTON, ROVO_MENU, ROVO_PROMPT_MENU_SECTION, MAKE_SHORTER_MENU_ITEM, MAKE_LONGER_MENU_ITEM, CHANGE_TONE_NESTED_MENU, SPELLING_AND_GRAMMAR_MENU_ITEM, CHANGE_TONE_MENU_SECTION, MORE_PROFESSIONAL_MENU_ITEM, MORE_CASUAL_MENU_ITEM, MORE_EMPATHETIC_MENU_ITEM, TRANSLATE_NESTED_MENU, TRANSLATE_MENU_SECTION, TEXT_SECTION, TEXT_FORMATTING_GROUP, TEXT_FORMATTING_HERO_BUTTON, TEXT_FORMATTING_MENU, TEXT_FORMATTING_MENU_SECTION, TEXT_STYLES_GROUP, TEXT_STYLES_MENU, TEXT_STYLES_MENU_SECTION, NORMAL_TEXT_MENU_ITEM, HEADING_1_MENU_ITEM, HEADING_2_MENU_ITEM, HEADING_3_MENU_ITEM, HEADING_4_MENU_ITEM, HEADING_5_MENU_ITEM, HEADING_6_MENU_ITEM, BLOCK_QUOTE_MENU_ITEM, BOLD_MENU_ITEM, ITALIC_MENU_ITEM, UNDERLINE_MENU_ITEM, STRIKE_MENU_ITEM, CODE_MENU_ITEM, SUBSCRIPT_MENU_ITEM, SUPERSCRIPT_MENU_ITEM, CLEAR_FORMARTTING_MENU_SECTION, CLEAR_FORMATTING_MENU_ITEM, LISTS_INDENTATION_GROUP, LISTS_INDENTATION_HERO_BUTTON, LISTS_INDENTATION_MENU, LISTS_INDENTATION_MENU_SECTION, BULLETED_LIST_MENU_ITEM, NUMBERED_LIST_MENU_ITEM, TASK_LIST_MENU_ITEM, INDENT_MENU_ITEM, OUTDENT_MENU_ITEM, INSERT_BLOCK_SECTION, TASK_LIST_BUTTON, TASK_LIST_GROUP, MEDIA_BUTTON, MEDIA_GROUP, MENTION_BUTTON, MENTION_GROUP, EMOJI_BUTTON, EMOJI_GROUP, LAYOUT_BUTTON, LAYOUT_GROUP, TABLE_BUTTON, TABLE_GROUP, TABLE_SIZE_PICKER, LINKING_SECTION, LINKING_GROUP, LINKING_BUTTON, COLLAB_SECTION, COMMENT_GROUP, COMMENT_HERO_BUTTON, APPS_SECTION, OVERFLOW_SECTION, TEXT_COLOR_HIGHLIGHT_GROUP, TEXT_COLOR_HIGHLIGHT_MENU, TEXT_COLOR_HIGHLIGHT_MENU_SECTION, TEXT_COLOR_MENU_ITEM, HIGHLIGHT_MENU_ITEM, OVERFLOW_GROUP, OVERFLOW_MENU, PIN_MENU_SECTION, PIN_MENU_ITEM, ALIGNMENT_GROUP, ALIGNMENT_MENU, ALIGNMENT_MENU_SECTION, ALIGN_LEFT_MENU_ITEM, ALIGN_CENTER_MENU_ITEM, ALIGN_RIGHT_MENU_ITEM, TRACK_CHANGES_GROUP, TRACK_CHANGES_SECTION, UNDO_BUTTON, REDO_BUTTON, TRACK_CHANGES_BUTTON, } from './keys';
3
- export { useEditorToolbar, EditorToolbarProvider } from './context';
3
+ export { useEditorToolbar, EditorToolbarProvider, type EditorToolbarContextType } from './context';
4
4
  export { EditorToolbarUIProvider } from './EditorToolbarUIProvider';
5
5
  export { getInputMethodFromParentKeys } from './utils';
@@ -5,7 +5,7 @@
5
5
  * are put together - but for now `Builder` & `Preset` aim to beinterchangeable.
6
6
  */
7
7
  import type { JSONDocNode } from '@atlaskit/editor-json-transformer';
8
- import type { Fragment, Node, Schema } from '@atlaskit/editor-prosemirror/model';
8
+ import type { Fragment, Node, Schema, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
9
9
  import type { EditorState } from '@atlaskit/editor-prosemirror/state';
10
10
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
11
11
  import type { FireAnalyticsCallback } from '../analytics';
@@ -98,6 +98,13 @@ export type CorePlugin = NextEditorPlugin<'core', {
98
98
  * @returns Transformer which can be used to request a document
99
99
  */
100
100
  createTransformer<Format>(cb: (schema: Schema) => Transformer<Format>): Transformer<Format> | undefined;
101
+ /**
102
+ * Get the anchor ID for a ProseMirror node.
103
+ *
104
+ * @param node - The ProseMirror node to get the anchor ID for.
105
+ * @returns The anchor ID if found, otherwise undefined.
106
+ */
107
+ getAnchorIdForNode: (node: PMNode) => string | undefined;
101
108
  };
102
109
  }>;
103
110
  export type TransformerResult<GenericTransformer = Transformer<JSONDocNode>> = GenericTransformer extends Transformer<infer Content> ? Content : JSONDocNode;
@@ -54,6 +54,11 @@ export declare const aiMessages: {
54
54
  defaultMessage: string;
55
55
  description: string;
56
56
  };
57
+ askRovoToolbarIconTooltipQuickCommand: {
58
+ id: string;
59
+ defaultMessage: string;
60
+ description: string;
61
+ };
57
62
  tryAIToolbarIconTitle: {
58
63
  id: string;
59
64
  defaultMessage: string;
@@ -5,5 +5,6 @@ export declare class NodeAnchorProvider {
5
5
  private count;
6
6
  private existingPos;
7
7
  getOrGenerateId(node: PMNode, pos: number): string | null;
8
+ getIdForNode(node: PMNode): string | undefined;
8
9
  }
9
10
  export declare const getNodeIdProvider: (editorView: EditorView) => NodeAnchorProvider;
@@ -1,7 +1,10 @@
1
1
  import React from 'react';
2
+ import type { ToolbarUIContextType } from '@atlaskit/editor-toolbar';
2
3
  import type { ExtractInjectionAPI, NextEditorPlugin } from '../types';
3
- export declare const EditorToolbarUIProvider: ({ children, api, isDisabled, }: {
4
+ type Props = Pick<ToolbarUIContextType, 'popupsMountPoint'> & {
5
+ api: ExtractInjectionAPI<NextEditorPlugin<any, any>> | undefined;
4
6
  children: React.ReactNode;
5
7
  isDisabled?: boolean;
6
- api: ExtractInjectionAPI<NextEditorPlugin<any, any>> | undefined;
7
- }) => React.JSX.Element;
8
+ };
9
+ export declare const EditorToolbarUIProvider: ({ children, api, isDisabled, popupsMountPoint }: Props) => React.JSX.Element;
10
+ export {};
@@ -1,7 +1,9 @@
1
1
  import React from 'react';
2
2
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
3
- type EditorToolbarContextType = {
3
+ import type { EditorAppearance } from '../types';
4
+ export type EditorToolbarContextType = {
4
5
  editorView: EditorView | null;
6
+ editorAppearance?: EditorAppearance;
5
7
  };
6
8
  /**
7
9
  * Access editor specific config and state within a toolbar component
@@ -10,5 +12,5 @@ export declare const useEditorToolbar: () => EditorToolbarContextType;
10
12
  type EditorToolbarProviderProps = {
11
13
  children: React.ReactNode;
12
14
  } & EditorToolbarContextType;
13
- export declare const EditorToolbarProvider: ({ children, editorView }: EditorToolbarProviderProps) => React.JSX.Element;
15
+ export declare const EditorToolbarProvider: ({ children, editorView, editorAppearance, }: EditorToolbarProviderProps) => React.JSX.Element;
14
16
  export {};
@@ -1,5 +1,5 @@
1
1
  export { TOOLBAR_RANK, AI_SECTION_RANK, ROVO_GROUP_RANK, IMPROVE_WRITING_GROUP_RANK, ROVO_MENU_RANK, ROVO_PROMPT_MENU_SECTION_RANK, CHANGE_TONE_MENU_RANK, CHANGE_TONE_MENU_SECTION_RANK, TRANSLATE_MENU_RANK, COLLAB_SECTION_RANK, COMMENT_GROUP_RANK, TEXT_SECTION_RANK, TEXT_STYLES_GROUP_RANK, TEXT_STYLES_MENU_RANK, TEXT_STYLES_MENU_SECTION_RANK, TEXT_FORMAT_GROUP_RANK, TEXT_FORMAT_MENU_RANK, TEXT_FORMATTING_MENU_SECTION_RANK, CLEAR_FORMARTTING_MENU_SECTION_RANK, TEXT_COLOR_HIGHLIGHT_MENU_SECTION_RANK, TEXT_COLOR_HIGHLIGHT_GROUP_RANK, TEXT_COLOR_HIGHLIGHT_MENU_RANK, OVERFLOW_SECTION_RANK, OVERFLOW_GROUP_RANK, OVERFLOW_MENU_RANK, PIN_MENU_SECTION_RANK, INSERT_BLOCK_SECTION_RANK, TASK_LIST_GROUP_RANK, MEDIA_GROUP_RANK, MENTION_GROUP_RANK, EMOJI_GROUP_RANK, LAYOUT_GROUP_RANK, TABLE_GROUP_RANK, LINKING_SECTION_RANK, LINKING_GROUP_RANK, ALIGNMENT_GROUP_RANK, ALIGNMENT_MENU_RANK, ALIGNMENT_MENU_SECTION_RANK, LISTS_INDENTATION_GROUP_RANK, LISTS_INDENTATION_MENU_RANK, LISTS_INDENTATION_MENU_SECTION_RANK, TRACK_CHANGES_SECTION_RANK, TRACK_CHANGES_GROUP_RANK, } from './rank';
2
2
  export { TOOLBARS, AI_SECTION, ROVO_GROUP, IMPROVE_WRITING_GROUP, IMPROVE_WRITING_BUTTON, ROVO_HERO_BUTTON, ROVO_MENU, ROVO_PROMPT_MENU_SECTION, MAKE_SHORTER_MENU_ITEM, MAKE_LONGER_MENU_ITEM, CHANGE_TONE_NESTED_MENU, SPELLING_AND_GRAMMAR_MENU_ITEM, CHANGE_TONE_MENU_SECTION, MORE_PROFESSIONAL_MENU_ITEM, MORE_CASUAL_MENU_ITEM, MORE_EMPATHETIC_MENU_ITEM, TRANSLATE_NESTED_MENU, TRANSLATE_MENU_SECTION, TEXT_SECTION, TEXT_FORMATTING_GROUP, TEXT_FORMATTING_HERO_BUTTON, TEXT_FORMATTING_MENU, TEXT_FORMATTING_MENU_SECTION, TEXT_STYLES_GROUP, TEXT_STYLES_MENU, TEXT_STYLES_MENU_SECTION, NORMAL_TEXT_MENU_ITEM, HEADING_1_MENU_ITEM, HEADING_2_MENU_ITEM, HEADING_3_MENU_ITEM, HEADING_4_MENU_ITEM, HEADING_5_MENU_ITEM, HEADING_6_MENU_ITEM, BLOCK_QUOTE_MENU_ITEM, BOLD_MENU_ITEM, ITALIC_MENU_ITEM, UNDERLINE_MENU_ITEM, STRIKE_MENU_ITEM, CODE_MENU_ITEM, SUBSCRIPT_MENU_ITEM, SUPERSCRIPT_MENU_ITEM, CLEAR_FORMARTTING_MENU_SECTION, CLEAR_FORMATTING_MENU_ITEM, LISTS_INDENTATION_GROUP, LISTS_INDENTATION_HERO_BUTTON, LISTS_INDENTATION_MENU, LISTS_INDENTATION_MENU_SECTION, BULLETED_LIST_MENU_ITEM, NUMBERED_LIST_MENU_ITEM, TASK_LIST_MENU_ITEM, INDENT_MENU_ITEM, OUTDENT_MENU_ITEM, INSERT_BLOCK_SECTION, TASK_LIST_BUTTON, TASK_LIST_GROUP, MEDIA_BUTTON, MEDIA_GROUP, MENTION_BUTTON, MENTION_GROUP, EMOJI_BUTTON, EMOJI_GROUP, LAYOUT_BUTTON, LAYOUT_GROUP, TABLE_BUTTON, TABLE_GROUP, TABLE_SIZE_PICKER, LINKING_SECTION, LINKING_GROUP, LINKING_BUTTON, COLLAB_SECTION, COMMENT_GROUP, COMMENT_HERO_BUTTON, APPS_SECTION, OVERFLOW_SECTION, TEXT_COLOR_HIGHLIGHT_GROUP, TEXT_COLOR_HIGHLIGHT_MENU, TEXT_COLOR_HIGHLIGHT_MENU_SECTION, TEXT_COLOR_MENU_ITEM, HIGHLIGHT_MENU_ITEM, OVERFLOW_GROUP, OVERFLOW_MENU, PIN_MENU_SECTION, PIN_MENU_ITEM, ALIGNMENT_GROUP, ALIGNMENT_MENU, ALIGNMENT_MENU_SECTION, ALIGN_LEFT_MENU_ITEM, ALIGN_CENTER_MENU_ITEM, ALIGN_RIGHT_MENU_ITEM, TRACK_CHANGES_GROUP, TRACK_CHANGES_SECTION, UNDO_BUTTON, REDO_BUTTON, TRACK_CHANGES_BUTTON, } from './keys';
3
- export { useEditorToolbar, EditorToolbarProvider } from './context';
3
+ export { useEditorToolbar, EditorToolbarProvider, type EditorToolbarContextType } from './context';
4
4
  export { EditorToolbarUIProvider } from './EditorToolbarUIProvider';
5
5
  export { getInputMethodFromParentKeys } from './utils';
@@ -5,7 +5,7 @@
5
5
  * are put together - but for now `Builder` & `Preset` aim to beinterchangeable.
6
6
  */
7
7
  import type { JSONDocNode } from '@atlaskit/editor-json-transformer';
8
- import type { Fragment, Node, Schema } from '@atlaskit/editor-prosemirror/model';
8
+ import type { Fragment, Node, Schema, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
9
9
  import type { EditorState } from '@atlaskit/editor-prosemirror/state';
10
10
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
11
11
  import type { FireAnalyticsCallback } from '../analytics';
@@ -98,6 +98,13 @@ export type CorePlugin = NextEditorPlugin<'core', {
98
98
  * @returns Transformer which can be used to request a document
99
99
  */
100
100
  createTransformer<Format>(cb: (schema: Schema) => Transformer<Format>): Transformer<Format> | undefined;
101
+ /**
102
+ * Get the anchor ID for a ProseMirror node.
103
+ *
104
+ * @param node - The ProseMirror node to get the anchor ID for.
105
+ * @returns The anchor ID if found, otherwise undefined.
106
+ */
107
+ getAnchorIdForNode: (node: PMNode) => string | undefined;
101
108
  };
102
109
  }>;
103
110
  export type TransformerResult<GenericTransformer = Transformer<JSONDocNode>> = GenericTransformer extends Transformer<infer Content> ? Content : JSONDocNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "107.26.2",
3
+ "version": "107.28.0",
4
4
  "description": "A package that contains common classes and components for editor and renderer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -121,7 +121,8 @@
121
121
  "./ugc-tokens": "./src/ugc-tokens/index.ts",
122
122
  "./get-dom-ref-from-selection": "./src/utils/get-dom-ref-from-selection.ts",
123
123
  "./ncs-step-metrics": "./src/ncs-step-metrics/index.ts",
124
- "./toolbar-flag-check": "./src/toolbar-flag-check.ts"
124
+ "./toolbar-flag-check": "./src/toolbar-flag-check.ts",
125
+ "./context-panel": "./src/ui/ContextPanel/context.tsx"
125
126
  },
126
127
  "dependencies": {
127
128
  "@atlaskit/activity-provider": "^2.5.0",
@@ -168,14 +169,14 @@
168
169
  "@atlaskit/profilecard": "^24.5.0",
169
170
  "@atlaskit/react-ufo": "^4.4.0",
170
171
  "@atlaskit/section-message": "^8.5.0",
171
- "@atlaskit/smart-card": "^40.11.0",
172
- "@atlaskit/smart-user-picker": "^8.1.0",
172
+ "@atlaskit/smart-card": "^40.12.0",
173
+ "@atlaskit/smart-user-picker": "^8.2.0",
173
174
  "@atlaskit/spinner": "^19.0.0",
174
175
  "@atlaskit/status": "^3.0.0",
175
176
  "@atlaskit/task-decision": "^19.2.0",
176
177
  "@atlaskit/textfield": "^8.0.0",
177
178
  "@atlaskit/theme": "^19.0.0",
178
- "@atlaskit/tmp-editor-statsig": "^11.3.0",
179
+ "@atlaskit/tmp-editor-statsig": "^11.4.0",
179
180
  "@atlaskit/tokens": "^6.0.0",
180
181
  "@atlaskit/tooltip": "^20.4.0",
181
182
  "@atlaskit/width-detector": "^5.0.0",