@atlaskit/editor-common 96.7.0 → 96.7.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 +8 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/transforms/index.js +6 -0
- package/dist/cjs/transforms/layout.js +14 -0
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/transforms/index.js +1 -1
- package/dist/es2019/transforms/layout.js +13 -0
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/transforms/index.js +1 -1
- package/dist/esm/transforms/layout.js +13 -0
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/transforms/index.d.ts +1 -1
- package/dist/types/transforms/layout.d.ts +1 -0
- package/dist/types-ts4.5/transforms/index.d.ts +1 -1
- package/dist/types-ts4.5/transforms/layout.d.ts +1 -0
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 96.7.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#179965](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/179965)
|
|
8
|
+
[`e3fc2cb96b727`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/e3fc2cb96b727) -
|
|
9
|
+
ED-26051 add analytics for inserting layout
|
|
10
|
+
|
|
3
11
|
## 96.7.0
|
|
4
12
|
|
|
5
13
|
### 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 && {}.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 = "96.7.
|
|
20
|
+
var packageVersion = "96.7.1";
|
|
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
|
|
@@ -27,6 +27,12 @@ Object.defineProperty(exports, "removeLayoutFromLastChild", {
|
|
|
27
27
|
return _layout.removeLayoutFromLastChild;
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
|
+
Object.defineProperty(exports, "transformSingleColumnLayout", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function get() {
|
|
33
|
+
return _layout.transformSingleColumnLayout;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
30
36
|
Object.defineProperty(exports, "transformSingleLineCodeBlockToCodeMark", {
|
|
31
37
|
enumerable: true,
|
|
32
38
|
get: function get() {
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.removeLayoutFromFirstChild = removeLayoutFromFirstChild;
|
|
7
7
|
exports.removeLayoutFromLastChild = removeLayoutFromLastChild;
|
|
8
|
+
exports.transformSingleColumnLayout = void 0;
|
|
8
9
|
exports.transformSliceToRemoveOpenLayoutNodes = transformSliceToRemoveOpenLayoutNodes;
|
|
9
10
|
exports.unwrapContentFromLayout = unwrapContentFromLayout;
|
|
10
11
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
@@ -28,6 +29,19 @@ function removeLayoutFromFirstChild(node, i) {
|
|
|
28
29
|
function removeLayoutFromLastChild(node, i, fragment) {
|
|
29
30
|
return i === fragment.childCount - 1 ? unwrapContentFromLayout(node) : node;
|
|
30
31
|
}
|
|
32
|
+
var transformSingleColumnLayout = exports.transformSingleColumnLayout = function transformSingleColumnLayout(slice, schema) {
|
|
33
|
+
if (slice.content.childCount === 1 && slice.openStart === 0 && slice.openEnd === 0) {
|
|
34
|
+
var _slice$content$firstC, _slice$content$firstC2, _slice$content$firstC3;
|
|
35
|
+
if (((_slice$content$firstC = slice.content.firstChild) === null || _slice$content$firstC === void 0 ? void 0 : _slice$content$firstC.type) === schema.nodes.layoutColumn) {
|
|
36
|
+
var newSlice = new _model.Slice(slice.content.firstChild.content, 0, 0);
|
|
37
|
+
return newSlice;
|
|
38
|
+
} else if (((_slice$content$firstC2 = slice.content.firstChild) === null || _slice$content$firstC2 === void 0 ? void 0 : _slice$content$firstC2.type) === schema.nodes.layoutSection && slice.content.firstChild.childCount === 1 && ((_slice$content$firstC3 = slice.content.firstChild.firstChild) === null || _slice$content$firstC3 === void 0 ? void 0 : _slice$content$firstC3.type) === schema.nodes.layoutColumn) {
|
|
39
|
+
var _newSlice = new _model.Slice(slice.content.firstChild.firstChild.content, 0, 0);
|
|
40
|
+
return _newSlice;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return slice;
|
|
44
|
+
};
|
|
31
45
|
|
|
32
46
|
/**
|
|
33
47
|
* When we have a slice that cuts across a layoutSection/layoutColumn
|
|
@@ -23,7 +23,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
23
23
|
* @jsx jsx
|
|
24
24
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
25
25
|
var packageName = "@atlaskit/editor-common";
|
|
26
|
-
var packageVersion = "96.7.
|
|
26
|
+
var packageVersion = "96.7.1";
|
|
27
27
|
var halfFocusRing = 1;
|
|
28
28
|
var dropOffset = '0, 8';
|
|
29
29
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -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 = "96.7.
|
|
4
|
+
const packageVersion = "96.7.1";
|
|
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
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Disable no-re-export rule for entry point files
|
|
2
2
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
3
3
|
|
|
4
|
-
export { unwrapContentFromLayout, removeLayoutFromFirstChild, removeLayoutFromLastChild, transformSliceToRemoveOpenLayoutNodes } from './layout';
|
|
4
|
+
export { unwrapContentFromLayout, removeLayoutFromFirstChild, removeLayoutFromLastChild, transformSliceToRemoveOpenLayoutNodes, transformSingleColumnLayout } from './layout';
|
|
5
5
|
export { findExpand, transformSliceToRemoveOpenExpand, transformSliceToRemoveOpenNestedExpand, transformSliceNestedExpandToExpand, transformSliceExpandToNestedExpand } from './expand';
|
|
6
6
|
export { transformSliceToRemoveOpenBodiedExtension, transformSliceToRemoveOpenMultiBodiedExtension } from './extension';
|
|
7
7
|
export { transformSliceToJoinAdjacentCodeBlocks, transformSingleLineCodeBlockToCodeMark, findCodeBlock } from './code-block';
|
|
@@ -15,6 +15,19 @@ export function removeLayoutFromFirstChild(node, i) {
|
|
|
15
15
|
export function removeLayoutFromLastChild(node, i, fragment) {
|
|
16
16
|
return i === fragment.childCount - 1 ? unwrapContentFromLayout(node) : node;
|
|
17
17
|
}
|
|
18
|
+
export const transformSingleColumnLayout = (slice, schema) => {
|
|
19
|
+
if (slice.content.childCount === 1 && slice.openStart === 0 && slice.openEnd === 0) {
|
|
20
|
+
var _slice$content$firstC, _slice$content$firstC2, _slice$content$firstC3;
|
|
21
|
+
if (((_slice$content$firstC = slice.content.firstChild) === null || _slice$content$firstC === void 0 ? void 0 : _slice$content$firstC.type) === schema.nodes.layoutColumn) {
|
|
22
|
+
const newSlice = new Slice(slice.content.firstChild.content, 0, 0);
|
|
23
|
+
return newSlice;
|
|
24
|
+
} else if (((_slice$content$firstC2 = slice.content.firstChild) === null || _slice$content$firstC2 === void 0 ? void 0 : _slice$content$firstC2.type) === schema.nodes.layoutSection && slice.content.firstChild.childCount === 1 && ((_slice$content$firstC3 = slice.content.firstChild.firstChild) === null || _slice$content$firstC3 === void 0 ? void 0 : _slice$content$firstC3.type) === schema.nodes.layoutColumn) {
|
|
25
|
+
const newSlice = new Slice(slice.content.firstChild.firstChild.content, 0, 0);
|
|
26
|
+
return newSlice;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return slice;
|
|
30
|
+
};
|
|
18
31
|
|
|
19
32
|
/**
|
|
20
33
|
* When we have a slice that cuts across a layoutSection/layoutColumn
|
|
@@ -13,7 +13,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
13
13
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
14
14
|
import Layer from '../Layer';
|
|
15
15
|
const packageName = "@atlaskit/editor-common";
|
|
16
|
-
const packageVersion = "96.7.
|
|
16
|
+
const packageVersion = "96.7.1";
|
|
17
17
|
const halfFocusRing = 1;
|
|
18
18
|
const dropOffset = '0, 8';
|
|
19
19
|
class DropList extends Component {
|
|
@@ -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 = "96.7.
|
|
10
|
+
var packageVersion = "96.7.1";
|
|
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
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Disable no-re-export rule for entry point files
|
|
2
2
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
3
3
|
|
|
4
|
-
export { unwrapContentFromLayout, removeLayoutFromFirstChild, removeLayoutFromLastChild, transformSliceToRemoveOpenLayoutNodes } from './layout';
|
|
4
|
+
export { unwrapContentFromLayout, removeLayoutFromFirstChild, removeLayoutFromLastChild, transformSliceToRemoveOpenLayoutNodes, transformSingleColumnLayout } from './layout';
|
|
5
5
|
export { findExpand, transformSliceToRemoveOpenExpand, transformSliceToRemoveOpenNestedExpand, transformSliceNestedExpandToExpand, transformSliceExpandToNestedExpand } from './expand';
|
|
6
6
|
export { transformSliceToRemoveOpenBodiedExtension, transformSliceToRemoveOpenMultiBodiedExtension } from './extension';
|
|
7
7
|
export { transformSliceToJoinAdjacentCodeBlocks, transformSingleLineCodeBlockToCodeMark, findCodeBlock } from './code-block';
|
|
@@ -19,6 +19,19 @@ export function removeLayoutFromFirstChild(node, i) {
|
|
|
19
19
|
export function removeLayoutFromLastChild(node, i, fragment) {
|
|
20
20
|
return i === fragment.childCount - 1 ? unwrapContentFromLayout(node) : node;
|
|
21
21
|
}
|
|
22
|
+
export var transformSingleColumnLayout = function transformSingleColumnLayout(slice, schema) {
|
|
23
|
+
if (slice.content.childCount === 1 && slice.openStart === 0 && slice.openEnd === 0) {
|
|
24
|
+
var _slice$content$firstC, _slice$content$firstC2, _slice$content$firstC3;
|
|
25
|
+
if (((_slice$content$firstC = slice.content.firstChild) === null || _slice$content$firstC === void 0 ? void 0 : _slice$content$firstC.type) === schema.nodes.layoutColumn) {
|
|
26
|
+
var newSlice = new Slice(slice.content.firstChild.content, 0, 0);
|
|
27
|
+
return newSlice;
|
|
28
|
+
} else if (((_slice$content$firstC2 = slice.content.firstChild) === null || _slice$content$firstC2 === void 0 ? void 0 : _slice$content$firstC2.type) === schema.nodes.layoutSection && slice.content.firstChild.childCount === 1 && ((_slice$content$firstC3 = slice.content.firstChild.firstChild) === null || _slice$content$firstC3 === void 0 ? void 0 : _slice$content$firstC3.type) === schema.nodes.layoutColumn) {
|
|
29
|
+
var _newSlice = new Slice(slice.content.firstChild.firstChild.content, 0, 0);
|
|
30
|
+
return _newSlice;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return slice;
|
|
34
|
+
};
|
|
22
35
|
|
|
23
36
|
/**
|
|
24
37
|
* When we have a slice that cuts across a layoutSection/layoutColumn
|
|
@@ -20,7 +20,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
20
20
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
21
21
|
import Layer from '../Layer';
|
|
22
22
|
var packageName = "@atlaskit/editor-common";
|
|
23
|
-
var packageVersion = "96.7.
|
|
23
|
+
var packageVersion = "96.7.1";
|
|
24
24
|
var halfFocusRing = 1;
|
|
25
25
|
var dropOffset = '0, 8';
|
|
26
26
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { unwrapContentFromLayout, removeLayoutFromFirstChild, removeLayoutFromLastChild, transformSliceToRemoveOpenLayoutNodes, } from './layout';
|
|
1
|
+
export { unwrapContentFromLayout, removeLayoutFromFirstChild, removeLayoutFromLastChild, transformSliceToRemoveOpenLayoutNodes, transformSingleColumnLayout, } from './layout';
|
|
2
2
|
export { findExpand, transformSliceToRemoveOpenExpand, transformSliceToRemoveOpenNestedExpand, transformSliceNestedExpandToExpand, transformSliceExpandToNestedExpand, } from './expand';
|
|
3
3
|
export { transformSliceToRemoveOpenBodiedExtension, transformSliceToRemoveOpenMultiBodiedExtension, } from './extension';
|
|
4
4
|
export { transformSliceToJoinAdjacentCodeBlocks, transformSingleLineCodeBlockToCodeMark, findCodeBlock, } from './code-block';
|
|
@@ -2,6 +2,7 @@ import { Fragment, type Node, type Schema, Slice } from '@atlaskit/editor-prosem
|
|
|
2
2
|
export declare function unwrapContentFromLayout(maybeLayoutSection: Node): Node | Node[];
|
|
3
3
|
export declare function removeLayoutFromFirstChild(node: Node, i: number): Node | Node[];
|
|
4
4
|
export declare function removeLayoutFromLastChild(node: Node, i: number, fragment: Fragment): Node | Node[];
|
|
5
|
+
export declare const transformSingleColumnLayout: (slice: Slice, schema: Schema) => Slice;
|
|
5
6
|
/**
|
|
6
7
|
* When we have a slice that cuts across a layoutSection/layoutColumn
|
|
7
8
|
* we can end up with unexpected behaviour on paste/drop where a user
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { unwrapContentFromLayout, removeLayoutFromFirstChild, removeLayoutFromLastChild, transformSliceToRemoveOpenLayoutNodes, } from './layout';
|
|
1
|
+
export { unwrapContentFromLayout, removeLayoutFromFirstChild, removeLayoutFromLastChild, transformSliceToRemoveOpenLayoutNodes, transformSingleColumnLayout, } from './layout';
|
|
2
2
|
export { findExpand, transformSliceToRemoveOpenExpand, transformSliceToRemoveOpenNestedExpand, transformSliceNestedExpandToExpand, transformSliceExpandToNestedExpand, } from './expand';
|
|
3
3
|
export { transformSliceToRemoveOpenBodiedExtension, transformSliceToRemoveOpenMultiBodiedExtension, } from './extension';
|
|
4
4
|
export { transformSliceToJoinAdjacentCodeBlocks, transformSingleLineCodeBlockToCodeMark, findCodeBlock, } from './code-block';
|
|
@@ -2,6 +2,7 @@ import { Fragment, type Node, type Schema, Slice } from '@atlaskit/editor-prosem
|
|
|
2
2
|
export declare function unwrapContentFromLayout(maybeLayoutSection: Node): Node | Node[];
|
|
3
3
|
export declare function removeLayoutFromFirstChild(node: Node, i: number): Node | Node[];
|
|
4
4
|
export declare function removeLayoutFromLastChild(node: Node, i: number, fragment: Fragment): Node | Node[];
|
|
5
|
+
export declare const transformSingleColumnLayout: (slice: Slice, schema: Schema) => Slice;
|
|
5
6
|
/**
|
|
6
7
|
* When we have a slice that cuts across a layoutSection/layoutColumn
|
|
7
8
|
* we can end up with unexpected behaviour on paste/drop where a user
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "96.7.
|
|
3
|
+
"version": "96.7.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/"
|
|
@@ -147,14 +147,14 @@
|
|
|
147
147
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
148
148
|
"@atlaskit/popper": "^6.3.0",
|
|
149
149
|
"@atlaskit/primitives": "^13.3.0",
|
|
150
|
-
"@atlaskit/profilecard": "^21.
|
|
150
|
+
"@atlaskit/profilecard": "^21.1.0",
|
|
151
151
|
"@atlaskit/section-message": "^6.8.0",
|
|
152
|
-
"@atlaskit/smart-card": "^32.
|
|
152
|
+
"@atlaskit/smart-card": "^32.8.0",
|
|
153
153
|
"@atlaskit/smart-user-picker": "^6.11.0",
|
|
154
154
|
"@atlaskit/spinner": "^16.3.0",
|
|
155
155
|
"@atlaskit/task-decision": "^17.11.0",
|
|
156
156
|
"@atlaskit/textfield": "^6.7.0",
|
|
157
|
-
"@atlaskit/tmp-editor-statsig": "^2.
|
|
157
|
+
"@atlaskit/tmp-editor-statsig": "^2.29.0",
|
|
158
158
|
"@atlaskit/tokens": "^2.5.0",
|
|
159
159
|
"@atlaskit/tooltip": "^19.0.0",
|
|
160
160
|
"@atlaskit/width-detector": "^4.3.0",
|