@atlaskit/editor-common 96.0.1 → 96.0.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 +8 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/nesting/utilities.js +11 -11
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/nesting/utilities.js +11 -11
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/nesting/utilities.js +11 -11
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/nesting/utilities.d.ts +2 -2
- package/dist/types-ts4.5/nesting/utilities.d.ts +2 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 96.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#172333](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/172333)
|
|
8
|
+
[`e5c206f3f7783`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/e5c206f3f7783) -
|
|
9
|
+
[ux] ED-25533 Set default size of nested tables to 2x2
|
|
10
|
+
|
|
3
11
|
## 96.0.1
|
|
4
12
|
|
|
5
13
|
### Patch 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.0.
|
|
20
|
+
var packageVersion = "96.0.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
|
|
@@ -5,19 +5,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.getPositionAfterTopParentNodeOfType = exports.getParentOfTypeCount = void 0;
|
|
7
7
|
/*
|
|
8
|
-
* Returns the level of nesting of a given `nodeType` in the current
|
|
8
|
+
* Returns the level of nesting of a given `nodeType` in the current position.
|
|
9
9
|
* eg. table > table is nested 1 level, table > table > table is nested 2 levels.
|
|
10
10
|
*
|
|
11
11
|
* ```typescript
|
|
12
|
-
* const nestingLevel = getParentOfTypeCount(schema.nodes.table)(
|
|
12
|
+
* const nestingLevel = getParentOfTypeCount(schema.nodes.table)(position);
|
|
13
13
|
* ```
|
|
14
14
|
*/
|
|
15
15
|
var getParentOfTypeCount = exports.getParentOfTypeCount = function getParentOfTypeCount(nodeType) {
|
|
16
|
-
return function ($
|
|
16
|
+
return function ($pos) {
|
|
17
17
|
var count = 0;
|
|
18
18
|
// Loop through parent nodes from bottom to top
|
|
19
|
-
for (var depth = $
|
|
20
|
-
var node = $
|
|
19
|
+
for (var depth = $pos.depth; depth > 0; depth--) {
|
|
20
|
+
var node = $pos.node(depth);
|
|
21
21
|
// Count the table nodes
|
|
22
22
|
if (node.type === nodeType) {
|
|
23
23
|
count++;
|
|
@@ -28,20 +28,20 @@ var getParentOfTypeCount = exports.getParentOfTypeCount = function getParentOfTy
|
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
/*
|
|
31
|
-
* Returns the (absolute) position directly after the top parent node of a given `nodeType` in the current
|
|
31
|
+
* Returns the (absolute) position directly after the top parent node of a given `nodeType` in the current position.
|
|
32
32
|
*
|
|
33
33
|
* ```typescript
|
|
34
|
-
* const nestingLevel = getEndTopParentNodeOfType(schema.nodes.table)(
|
|
34
|
+
* const nestingLevel = getEndTopParentNodeOfType(schema.nodes.table)(position);
|
|
35
35
|
* ```
|
|
36
36
|
*/
|
|
37
37
|
var getPositionAfterTopParentNodeOfType = exports.getPositionAfterTopParentNodeOfType = function getPositionAfterTopParentNodeOfType(nodeType) {
|
|
38
|
-
return function ($
|
|
38
|
+
return function ($pos) {
|
|
39
39
|
// Loop through parent nodes from top to bottom
|
|
40
|
-
for (var depth = 1; depth <= $
|
|
41
|
-
var node = $
|
|
40
|
+
for (var depth = 1; depth <= $pos.depth; depth++) {
|
|
41
|
+
var node = $pos.node(depth);
|
|
42
42
|
// Count the table nodes
|
|
43
43
|
if (node.type === nodeType) {
|
|
44
|
-
return $
|
|
44
|
+
return $pos.after(depth);
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
};
|
|
@@ -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 = "96.0.
|
|
27
|
+
var packageVersion = "96.0.2";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
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.0.
|
|
4
|
+
const packageVersion = "96.0.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
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Returns the level of nesting of a given `nodeType` in the current
|
|
2
|
+
* Returns the level of nesting of a given `nodeType` in the current position.
|
|
3
3
|
* eg. table > table is nested 1 level, table > table > table is nested 2 levels.
|
|
4
4
|
*
|
|
5
5
|
* ```typescript
|
|
6
|
-
* const nestingLevel = getParentOfTypeCount(schema.nodes.table)(
|
|
6
|
+
* const nestingLevel = getParentOfTypeCount(schema.nodes.table)(position);
|
|
7
7
|
* ```
|
|
8
8
|
*/
|
|
9
|
-
export const getParentOfTypeCount = nodeType => $
|
|
9
|
+
export const getParentOfTypeCount = nodeType => $pos => {
|
|
10
10
|
let count = 0;
|
|
11
11
|
// Loop through parent nodes from bottom to top
|
|
12
|
-
for (let depth = $
|
|
13
|
-
const node = $
|
|
12
|
+
for (let depth = $pos.depth; depth > 0; depth--) {
|
|
13
|
+
const node = $pos.node(depth);
|
|
14
14
|
// Count the table nodes
|
|
15
15
|
if (node.type === nodeType) {
|
|
16
16
|
count++;
|
|
@@ -20,19 +20,19 @@ export const getParentOfTypeCount = nodeType => $from => {
|
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
/*
|
|
23
|
-
* Returns the (absolute) position directly after the top parent node of a given `nodeType` in the current
|
|
23
|
+
* Returns the (absolute) position directly after the top parent node of a given `nodeType` in the current position.
|
|
24
24
|
*
|
|
25
25
|
* ```typescript
|
|
26
|
-
* const nestingLevel = getEndTopParentNodeOfType(schema.nodes.table)(
|
|
26
|
+
* const nestingLevel = getEndTopParentNodeOfType(schema.nodes.table)(position);
|
|
27
27
|
* ```
|
|
28
28
|
*/
|
|
29
|
-
export const getPositionAfterTopParentNodeOfType = nodeType => $
|
|
29
|
+
export const getPositionAfterTopParentNodeOfType = nodeType => $pos => {
|
|
30
30
|
// Loop through parent nodes from top to bottom
|
|
31
|
-
for (let depth = 1; depth <= $
|
|
32
|
-
const node = $
|
|
31
|
+
for (let depth = 1; depth <= $pos.depth; depth++) {
|
|
32
|
+
const node = $pos.node(depth);
|
|
33
33
|
// Count the table nodes
|
|
34
34
|
if (node.type === nodeType) {
|
|
35
|
-
return $
|
|
35
|
+
return $pos.after(depth);
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
};
|
|
@@ -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.0.
|
|
16
|
+
const packageVersion = "96.0.2";
|
|
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.0.
|
|
10
|
+
var packageVersion = "96.0.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
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Returns the level of nesting of a given `nodeType` in the current
|
|
2
|
+
* Returns the level of nesting of a given `nodeType` in the current position.
|
|
3
3
|
* eg. table > table is nested 1 level, table > table > table is nested 2 levels.
|
|
4
4
|
*
|
|
5
5
|
* ```typescript
|
|
6
|
-
* const nestingLevel = getParentOfTypeCount(schema.nodes.table)(
|
|
6
|
+
* const nestingLevel = getParentOfTypeCount(schema.nodes.table)(position);
|
|
7
7
|
* ```
|
|
8
8
|
*/
|
|
9
9
|
export var getParentOfTypeCount = function getParentOfTypeCount(nodeType) {
|
|
10
|
-
return function ($
|
|
10
|
+
return function ($pos) {
|
|
11
11
|
var count = 0;
|
|
12
12
|
// Loop through parent nodes from bottom to top
|
|
13
|
-
for (var depth = $
|
|
14
|
-
var node = $
|
|
13
|
+
for (var depth = $pos.depth; depth > 0; depth--) {
|
|
14
|
+
var node = $pos.node(depth);
|
|
15
15
|
// Count the table nodes
|
|
16
16
|
if (node.type === nodeType) {
|
|
17
17
|
count++;
|
|
@@ -22,20 +22,20 @@ export var getParentOfTypeCount = function getParentOfTypeCount(nodeType) {
|
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
/*
|
|
25
|
-
* Returns the (absolute) position directly after the top parent node of a given `nodeType` in the current
|
|
25
|
+
* Returns the (absolute) position directly after the top parent node of a given `nodeType` in the current position.
|
|
26
26
|
*
|
|
27
27
|
* ```typescript
|
|
28
|
-
* const nestingLevel = getEndTopParentNodeOfType(schema.nodes.table)(
|
|
28
|
+
* const nestingLevel = getEndTopParentNodeOfType(schema.nodes.table)(position);
|
|
29
29
|
* ```
|
|
30
30
|
*/
|
|
31
31
|
export var getPositionAfterTopParentNodeOfType = function getPositionAfterTopParentNodeOfType(nodeType) {
|
|
32
|
-
return function ($
|
|
32
|
+
return function ($pos) {
|
|
33
33
|
// Loop through parent nodes from top to bottom
|
|
34
|
-
for (var depth = 1; depth <= $
|
|
35
|
-
var node = $
|
|
34
|
+
for (var depth = 1; depth <= $pos.depth; depth++) {
|
|
35
|
+
var node = $pos.node(depth);
|
|
36
36
|
// Count the table nodes
|
|
37
37
|
if (node.type === nodeType) {
|
|
38
|
-
return $
|
|
38
|
+
return $pos.after(depth);
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
};
|
|
@@ -21,7 +21,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
|
|
|
21
21
|
import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
22
22
|
import Layer from '../Layer';
|
|
23
23
|
var packageName = "@atlaskit/editor-common";
|
|
24
|
-
var packageVersion = "96.0.
|
|
24
|
+
var packageVersion = "96.0.2";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var DropList = /*#__PURE__*/function (_Component) {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { NodeType, ResolvedPos } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
export declare const getParentOfTypeCount: (nodeType: NodeType) => ($
|
|
3
|
-
export declare const getPositionAfterTopParentNodeOfType: (nodeType: NodeType) => ($
|
|
2
|
+
export declare const getParentOfTypeCount: (nodeType: NodeType) => ($pos: ResolvedPos) => number;
|
|
3
|
+
export declare const getPositionAfterTopParentNodeOfType: (nodeType: NodeType) => ($pos: ResolvedPos) => number | undefined;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { NodeType, ResolvedPos } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
export declare const getParentOfTypeCount: (nodeType: NodeType) => ($
|
|
3
|
-
export declare const getPositionAfterTopParentNodeOfType: (nodeType: NodeType) => ($
|
|
2
|
+
export declare const getParentOfTypeCount: (nodeType: NodeType) => ($pos: ResolvedPos) => number;
|
|
3
|
+
export declare const getPositionAfterTopParentNodeOfType: (nodeType: NodeType) => ($pos: ResolvedPos) => number | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "96.0.
|
|
3
|
+
"version": "96.0.2",
|
|
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/"
|
|
@@ -191,7 +191,7 @@
|
|
|
191
191
|
"devDependencies": {
|
|
192
192
|
"@af/visual-regression": "*",
|
|
193
193
|
"@atlaskit/media-core": "^34.3.0",
|
|
194
|
-
"@atlaskit/media-test-helpers": "^34.
|
|
194
|
+
"@atlaskit/media-test-helpers": "^34.7.0",
|
|
195
195
|
"@atlaskit/util-data-test": "^17.13.0",
|
|
196
196
|
"@atlaskit/visual-regression": "*",
|
|
197
197
|
"@testing-library/dom": "^10.1.0",
|