@atlaskit/editor-common 107.27.0 → 107.28.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/context-panel/package.json +17 -0
- package/dist/cjs/commands/index.js +7 -2
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/toolbar/EditorToolbarUIProvider.js +4 -2
- package/dist/cjs/toolbar/context.js +6 -3
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/utils/calculate-toolbar-position.js +19 -1
- package/dist/es2019/commands/index.js +7 -2
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/toolbar/EditorToolbarUIProvider.js +4 -2
- package/dist/es2019/toolbar/context.js +6 -3
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/utils/calculate-toolbar-position.js +19 -1
- package/dist/esm/commands/index.js +7 -2
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/toolbar/EditorToolbarUIProvider.js +4 -2
- package/dist/esm/toolbar/context.js +6 -3
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/utils/calculate-toolbar-position.js +19 -1
- package/dist/types/toolbar/EditorToolbarUIProvider.d.ts +6 -3
- package/dist/types/toolbar/context.d.ts +4 -2
- package/dist/types/toolbar/index.d.ts +1 -1
- package/dist/types-ts4.5/toolbar/EditorToolbarUIProvider.d.ts +6 -3
- package/dist/types-ts4.5/toolbar/context.d.ts +4 -2
- package/dist/types-ts4.5/toolbar/index.d.ts +1 -1
- package/package.json +6 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 107.28.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`562520e7d0e73`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/562520e7d0e73) -
|
|
8
|
+
[ux] [EDITOR-1329] fix shifting selection toolbar on rovo menu button click
|
|
9
|
+
|
|
10
|
+
## 107.28.0
|
|
11
|
+
|
|
12
|
+
### Minor Changes
|
|
13
|
+
|
|
14
|
+
- [`d2a535bed291e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d2a535bed291e) -
|
|
15
|
+
[EDITOR-1153] Let the `editor-plugin-indentation` handle `paragraphs` when they are selected in a
|
|
16
|
+
range with `blockTaskItem`, but don't indent the `paragraphs` inside `blockTaskItem`s
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- [`286abb4d35eba`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/286abb4d35eba) -
|
|
21
|
+
[ux] [ED-28960] Finish full page primary toolbar migration
|
|
22
|
+
|
|
23
|
+
- Align with design update (separator, gap, height, icon size)
|
|
24
|
+
- Add keyboard shortcut to focus toolbar and arrow key navigation
|
|
25
|
+
- Address accessibility
|
|
26
|
+
|
|
27
|
+
- Updated dependencies
|
|
28
|
+
|
|
3
29
|
## 107.27.0
|
|
4
30
|
|
|
5
31
|
### Minor 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
|
+
}
|
|
@@ -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
|
-
|
|
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
|
-
|
|
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.
|
|
19
|
+
var packageVersion = "107.28.1";
|
|
20
20
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
21
21
|
// Remove URL as it has UGC
|
|
22
22
|
// Ignored via go/ees007
|
|
@@ -11,7 +11,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.
|
|
27
|
+
var packageVersion = "107.28.1";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var fadeIn = (0, _react2.keyframes)({
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.calculateToolbarPositionTrackHead = exports.calculateToolbarPositionOnCellSelection = exports.calculateToolbarPositionAboveSelection = void 0;
|
|
7
7
|
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
8
8
|
var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
|
|
9
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
9
10
|
var MAXIMUM_BROWSER_SCROLLBAR_WIDTH = 20;
|
|
10
11
|
|
|
11
12
|
/*
|
|
@@ -109,7 +110,24 @@ var calculateToolbarPositionTrackHead = exports.calculateToolbarPositionTrackHea
|
|
|
109
110
|
var scrollWrapper = editorView.dom.closest('.fabric-editor-popup-scroll-parent') || document.body;
|
|
110
111
|
var wrapperBounds = scrollWrapper.getBoundingClientRect();
|
|
111
112
|
var selection = window && window.getSelection();
|
|
112
|
-
var
|
|
113
|
+
var moreRovoOptionsButton = document.querySelector('button[aria-label="More Rovo options"], [aria-label="More Rovo options"]');
|
|
114
|
+
var isMoreRovoOptionsButtonVisible = !!moreRovoOptionsButton && moreRovoOptionsButton instanceof HTMLElement && !!moreRovoOptionsButton.offsetParent;
|
|
115
|
+
var range = null;
|
|
116
|
+
if ((0, _experiments.editorExperiment)('platform_editor_ai_aifc', true) && isMoreRovoOptionsButtonVisible) {
|
|
117
|
+
if (selection && selection.getRangeAt && selection.rangeCount > 0) {
|
|
118
|
+
var maybeRange = selection.getRangeAt(0);
|
|
119
|
+
if (maybeRange instanceof Range) {
|
|
120
|
+
range = maybeRange;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
} else {
|
|
124
|
+
if (selection && !selection.isCollapsed && selection.getRangeAt && selection.rangeCount > 0) {
|
|
125
|
+
var _maybeRange = selection.getRangeAt(0);
|
|
126
|
+
if (_maybeRange instanceof Range) {
|
|
127
|
+
range = _maybeRange;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
113
131
|
if (!range) {
|
|
114
132
|
return nextPos;
|
|
115
133
|
}
|
|
@@ -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
|
-
|
|
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
|
-
|
|
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.
|
|
4
|
+
const packageVersion = "107.28.1";
|
|
5
5
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
6
6
|
// Remove URL as it has UGC
|
|
7
7
|
// Ignored via go/ees007
|
|
@@ -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.
|
|
17
|
+
const packageVersion = "107.28.1";
|
|
18
18
|
const halfFocusRing = 1;
|
|
19
19
|
const dropOffset = '0, 8';
|
|
20
20
|
const fadeIn = keyframes({
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
2
2
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
3
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
3
4
|
const MAXIMUM_BROWSER_SCROLLBAR_WIDTH = 20;
|
|
4
5
|
|
|
5
6
|
/*
|
|
@@ -102,7 +103,24 @@ export const calculateToolbarPositionTrackHead = toolbarTitle => (editorView, ne
|
|
|
102
103
|
const scrollWrapper = editorView.dom.closest('.fabric-editor-popup-scroll-parent') || document.body;
|
|
103
104
|
const wrapperBounds = scrollWrapper.getBoundingClientRect();
|
|
104
105
|
const selection = window && window.getSelection();
|
|
105
|
-
const
|
|
106
|
+
const moreRovoOptionsButton = document.querySelector('button[aria-label="More Rovo options"], [aria-label="More Rovo options"]');
|
|
107
|
+
const isMoreRovoOptionsButtonVisible = !!moreRovoOptionsButton && moreRovoOptionsButton instanceof HTMLElement && !!moreRovoOptionsButton.offsetParent;
|
|
108
|
+
let range = null;
|
|
109
|
+
if (editorExperiment('platform_editor_ai_aifc', true) && isMoreRovoOptionsButtonVisible) {
|
|
110
|
+
if (selection && selection.getRangeAt && selection.rangeCount > 0) {
|
|
111
|
+
const maybeRange = selection.getRangeAt(0);
|
|
112
|
+
if (maybeRange instanceof Range) {
|
|
113
|
+
range = maybeRange;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
} else {
|
|
117
|
+
if (selection && !selection.isCollapsed && selection.getRangeAt && selection.rangeCount > 0) {
|
|
118
|
+
const maybeRange = selection.getRangeAt(0);
|
|
119
|
+
if (maybeRange instanceof Range) {
|
|
120
|
+
range = maybeRange;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
106
124
|
if (!range) {
|
|
107
125
|
return nextPos;
|
|
108
126
|
}
|
|
@@ -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
|
-
|
|
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
|
-
|
|
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.
|
|
10
|
+
var packageVersion = "107.28.1";
|
|
11
11
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
12
12
|
// Remove URL as it has UGC
|
|
13
13
|
// Ignored via go/ees007
|
|
@@ -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.
|
|
24
|
+
var packageVersion = "107.28.1";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var fadeIn = keyframes({
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
2
2
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
3
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
3
4
|
var MAXIMUM_BROWSER_SCROLLBAR_WIDTH = 20;
|
|
4
5
|
|
|
5
6
|
/*
|
|
@@ -103,7 +104,24 @@ export var calculateToolbarPositionTrackHead = function calculateToolbarPosition
|
|
|
103
104
|
var scrollWrapper = editorView.dom.closest('.fabric-editor-popup-scroll-parent') || document.body;
|
|
104
105
|
var wrapperBounds = scrollWrapper.getBoundingClientRect();
|
|
105
106
|
var selection = window && window.getSelection();
|
|
106
|
-
var
|
|
107
|
+
var moreRovoOptionsButton = document.querySelector('button[aria-label="More Rovo options"], [aria-label="More Rovo options"]');
|
|
108
|
+
var isMoreRovoOptionsButtonVisible = !!moreRovoOptionsButton && moreRovoOptionsButton instanceof HTMLElement && !!moreRovoOptionsButton.offsetParent;
|
|
109
|
+
var range = null;
|
|
110
|
+
if (editorExperiment('platform_editor_ai_aifc', true) && isMoreRovoOptionsButtonVisible) {
|
|
111
|
+
if (selection && selection.getRangeAt && selection.rangeCount > 0) {
|
|
112
|
+
var maybeRange = selection.getRangeAt(0);
|
|
113
|
+
if (maybeRange instanceof Range) {
|
|
114
|
+
range = maybeRange;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
} else {
|
|
118
|
+
if (selection && !selection.isCollapsed && selection.getRangeAt && selection.rangeCount > 0) {
|
|
119
|
+
var _maybeRange = selection.getRangeAt(0);
|
|
120
|
+
if (_maybeRange instanceof Range) {
|
|
121
|
+
range = _maybeRange;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
107
125
|
if (!range) {
|
|
108
126
|
return nextPos;
|
|
109
127
|
}
|
|
@@ -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
|
-
|
|
4
|
+
type Props = Pick<ToolbarUIContextType, 'popupsMountPoint'> & {
|
|
5
|
+
api: ExtractInjectionAPI<NextEditorPlugin<any, any>> | undefined;
|
|
4
6
|
children: React.ReactNode;
|
|
5
7
|
isDisabled?: boolean;
|
|
6
|
-
|
|
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
|
|
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';
|
|
@@ -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
|
-
|
|
4
|
+
type Props = Pick<ToolbarUIContextType, 'popupsMountPoint'> & {
|
|
5
|
+
api: ExtractInjectionAPI<NextEditorPlugin<any, any>> | undefined;
|
|
4
6
|
children: React.ReactNode;
|
|
5
7
|
isDisabled?: boolean;
|
|
6
|
-
|
|
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
|
|
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';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "107.
|
|
3
|
+
"version": "107.28.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/"
|
|
@@ -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.
|
|
172
|
-
"@atlaskit/smart-user-picker": "^8.
|
|
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.
|
|
179
|
+
"@atlaskit/tmp-editor-statsig": "^11.5.0",
|
|
179
180
|
"@atlaskit/tokens": "^6.0.0",
|
|
180
181
|
"@atlaskit/tooltip": "^20.4.0",
|
|
181
182
|
"@atlaskit/width-detector": "^5.0.0",
|