@atlaskit/editor-common 88.13.0 → 88.13.2
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 +18 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/utils/create-wrap-selection-transaction.js +13 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/es2019/utils/create-wrap-selection-transaction.js +14 -2
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/utils/create-wrap-selection-transaction.js +13 -1
- package/dist/types/types/floating-toolbar.d.ts +1 -0
- package/dist/types/utils/create-wrap-selection-transaction.d.ts +1 -1
- package/dist/types-ts4.5/types/floating-toolbar.d.ts +1 -0
- package/dist/types-ts4.5/utils/create-wrap-selection-transaction.d.ts +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 88.13.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#137403](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/137403)
|
|
8
|
+
[`1ef67ef2128a5`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/1ef67ef2128a5) -
|
|
9
|
+
[ux] [ED-24820] When media group is selected and we insert a quote we want it to wrap. We had to
|
|
10
|
+
update the range for media group to be wrapped.
|
|
11
|
+
|
|
12
|
+
## 88.13.1
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#137865](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/137865)
|
|
17
|
+
[`d392fecac5384`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d392fecac5384) -
|
|
18
|
+
[EDF-1247] Added beta label to proactive ai experience, patched editor floating toolbar to support
|
|
19
|
+
a new footer component if parsed in
|
|
20
|
+
|
|
3
21
|
## 88.13.0
|
|
4
22
|
|
|
5
23
|
### Minor Changes
|
|
@@ -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 && Object.prototype.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 = "88.13.
|
|
20
|
+
var packageVersion = "88.13.2";
|
|
21
21
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
22
22
|
// Remove URL as it has UGC
|
|
23
23
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -25,7 +25,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
25
25
|
* @jsx jsx
|
|
26
26
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
27
27
|
var packageName = "@atlaskit/editor-common";
|
|
28
|
-
var packageVersion = "88.13.
|
|
28
|
+
var packageVersion = "88.13.2";
|
|
29
29
|
var halfFocusRing = 1;
|
|
30
30
|
var dropOffset = '0, 8';
|
|
31
31
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.createWrapSelectionTransaction = createWrapSelectionTransaction;
|
|
7
7
|
exports.getWrappingOptions = getWrappingOptions;
|
|
8
|
+
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
8
9
|
var _transform = require("@atlaskit/editor-prosemirror/transform");
|
|
9
10
|
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
10
11
|
var _editorCoreUtils = require("./editor-core-utils");
|
|
@@ -44,8 +45,19 @@ function createWrapSelectionTransaction(_ref) {
|
|
|
44
45
|
function getWrappingOptions(state, type, nodeAttributes) {
|
|
45
46
|
var _state$selection = state.selection,
|
|
46
47
|
$from = _state$selection.$from,
|
|
47
|
-
$to = _state$selection.$to
|
|
48
|
+
$to = _state$selection.$to,
|
|
49
|
+
from = _state$selection.from;
|
|
48
50
|
var range = $from.blockRange($to);
|
|
51
|
+
var isMediaSelection = state.selection instanceof _state.NodeSelection && state.selection.node.type === state.schema.nodes.media;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* To wrap a media group we need to start the range from one position
|
|
55
|
+
* before a media selection's from position.
|
|
56
|
+
*/
|
|
57
|
+
if (isMediaSelection) {
|
|
58
|
+
var prev = from - 1;
|
|
59
|
+
range = state.doc.resolve(from > 0 ? prev : from).blockRange($to);
|
|
60
|
+
}
|
|
49
61
|
var isAllowedChild = true;
|
|
50
62
|
/**
|
|
51
63
|
* Added a check to avoid wrapping codeblock
|
|
@@ -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 = "88.13.
|
|
4
|
+
const packageVersion = "88.13.2";
|
|
5
5
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
6
6
|
// Remove URL as it has UGC
|
|
7
7
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
14
14
|
import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
|
|
15
15
|
import Layer from '../Layer';
|
|
16
16
|
const packageName = "@atlaskit/editor-common";
|
|
17
|
-
const packageVersion = "88.13.
|
|
17
|
+
const packageVersion = "88.13.2";
|
|
18
18
|
const halfFocusRing = 1;
|
|
19
19
|
const dropOffset = '0, 8';
|
|
20
20
|
class DropList extends Component {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
1
2
|
import { findWrapping } from '@atlaskit/editor-prosemirror/transform';
|
|
2
3
|
import { safeInsert } from '@atlaskit/editor-prosemirror/utils';
|
|
3
4
|
import { removeBlockMarks } from './editor-core-utils';
|
|
@@ -43,9 +44,20 @@ export function createWrapSelectionTransaction({
|
|
|
43
44
|
export function getWrappingOptions(state, type, nodeAttributes) {
|
|
44
45
|
const {
|
|
45
46
|
$from,
|
|
46
|
-
$to
|
|
47
|
+
$to,
|
|
48
|
+
from
|
|
47
49
|
} = state.selection;
|
|
48
|
-
|
|
50
|
+
let range = $from.blockRange($to);
|
|
51
|
+
const isMediaSelection = state.selection instanceof NodeSelection && state.selection.node.type === state.schema.nodes.media;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* To wrap a media group we need to start the range from one position
|
|
55
|
+
* before a media selection's from position.
|
|
56
|
+
*/
|
|
57
|
+
if (isMediaSelection) {
|
|
58
|
+
const prev = from - 1;
|
|
59
|
+
range = state.doc.resolve(from > 0 ? prev : from).blockRange($to);
|
|
60
|
+
}
|
|
49
61
|
let isAllowedChild = true;
|
|
50
62
|
/**
|
|
51
63
|
* Added a check to avoid wrapping codeblock
|
|
@@ -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 = "88.13.
|
|
10
|
+
var packageVersion = "88.13.2";
|
|
11
11
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
12
12
|
// Remove URL as it has UGC
|
|
13
13
|
// TODO: Sanitise the URL instead of just removing it
|
|
@@ -22,7 +22,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
22
22
|
import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
|
|
23
23
|
import Layer from '../Layer';
|
|
24
24
|
var packageName = "@atlaskit/editor-common";
|
|
25
|
-
var packageVersion = "88.13.
|
|
25
|
+
var packageVersion = "88.13.2";
|
|
26
26
|
var halfFocusRing = 1;
|
|
27
27
|
var dropOffset = '0, 8';
|
|
28
28
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
1
2
|
import { findWrapping } from '@atlaskit/editor-prosemirror/transform';
|
|
2
3
|
import { safeInsert } from '@atlaskit/editor-prosemirror/utils';
|
|
3
4
|
import { removeBlockMarks } from './editor-core-utils';
|
|
@@ -38,8 +39,19 @@ export function createWrapSelectionTransaction(_ref) {
|
|
|
38
39
|
export function getWrappingOptions(state, type, nodeAttributes) {
|
|
39
40
|
var _state$selection = state.selection,
|
|
40
41
|
$from = _state$selection.$from,
|
|
41
|
-
$to = _state$selection.$to
|
|
42
|
+
$to = _state$selection.$to,
|
|
43
|
+
from = _state$selection.from;
|
|
42
44
|
var range = $from.blockRange($to);
|
|
45
|
+
var isMediaSelection = state.selection instanceof NodeSelection && state.selection.node.type === state.schema.nodes.media;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* To wrap a media group we need to start the range from one position
|
|
49
|
+
* before a media selection's from position.
|
|
50
|
+
*/
|
|
51
|
+
if (isMediaSelection) {
|
|
52
|
+
var prev = from - 1;
|
|
53
|
+
range = state.doc.resolve(from > 0 ? prev : from).blockRange($to);
|
|
54
|
+
}
|
|
43
55
|
var isAllowedChild = true;
|
|
44
56
|
/**
|
|
45
57
|
* Added a check to avoid wrapping codeblock
|
|
@@ -215,6 +215,7 @@ export type FloatingToolbarDropdown<T extends {}> = {
|
|
|
215
215
|
showSelected?: boolean;
|
|
216
216
|
alignDropdownWithToolbar?: boolean;
|
|
217
217
|
onToggle?: (state: EditorState, dispatch: CommandDispatch | undefined) => boolean;
|
|
218
|
+
footer?: React.ReactNode;
|
|
218
219
|
};
|
|
219
220
|
type FloatingToolbarExtensionsPlaceholder = {
|
|
220
221
|
type: 'extensions-placeholder';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type
|
|
2
|
+
import { type EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
3
3
|
/**
|
|
4
4
|
* This function creates a new transaction that wraps the current selection
|
|
5
5
|
* in the specified node type if it results in a valid transaction.
|
|
@@ -215,6 +215,7 @@ export type FloatingToolbarDropdown<T extends {}> = {
|
|
|
215
215
|
showSelected?: boolean;
|
|
216
216
|
alignDropdownWithToolbar?: boolean;
|
|
217
217
|
onToggle?: (state: EditorState, dispatch: CommandDispatch | undefined) => boolean;
|
|
218
|
+
footer?: React.ReactNode;
|
|
218
219
|
};
|
|
219
220
|
type FloatingToolbarExtensionsPlaceholder = {
|
|
220
221
|
type: 'extensions-placeholder';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type
|
|
2
|
+
import { type EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
3
3
|
/**
|
|
4
4
|
* This function creates a new transaction that wraps the current selection
|
|
5
5
|
* in the specified node type if it results in a valid transaction.
|
package/package.json
CHANGED