@atlaskit/editor-common 112.12.1 → 112.13.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.
- package/CHANGELOG.md +11 -0
- package/dist/cjs/lists/block-mark.js +73 -0
- package/dist/cjs/lists/index.js +31 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/lists/block-mark.js +67 -0
- package/dist/es2019/lists/index.js +1 -0
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/lists/block-mark.js +67 -0
- package/dist/esm/lists/index.js +1 -0
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/lists/block-mark.d.ts +9 -0
- package/dist/types/lists/index.d.ts +1 -0
- package/dist/types-ts4.5/lists/block-mark.d.ts +9 -0
- package/dist/types-ts4.5/lists/index.d.ts +1 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 112.13.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`b749ce678d575`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b749ce678d575) -
|
|
8
|
+
Preserve small text formatting across list and task list edits
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
3
14
|
## 112.12.1
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.reconcileBlockMarkInRange = exports.reconcileBlockMarkForParagraphAtPos = exports.reconcileBlockMarkForContainerAtPos = exports.getFirstParagraphBlockMarkAttrs = exports.getBlockMarkAttrs = void 0;
|
|
7
|
+
var _commands = require("../commands");
|
|
8
|
+
var getDefaultBlockNodeTypes = function getDefaultBlockNodeTypes(tr) {
|
|
9
|
+
var paragraph = tr.doc.type.schema.nodes.paragraph;
|
|
10
|
+
return paragraph ? [paragraph] : [];
|
|
11
|
+
};
|
|
12
|
+
var getBlockMarkAttrs = exports.getBlockMarkAttrs = function getBlockMarkAttrs(node, markType) {
|
|
13
|
+
if (!node || !markType) {
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
var blockMark = node.marks.find(function (mark) {
|
|
17
|
+
return mark.type === markType;
|
|
18
|
+
});
|
|
19
|
+
return blockMark ? blockMark.attrs : false;
|
|
20
|
+
};
|
|
21
|
+
var getFirstParagraphBlockMarkAttrs = exports.getFirstParagraphBlockMarkAttrs = function getFirstParagraphBlockMarkAttrs(node, markType) {
|
|
22
|
+
if (!node || !markType) {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
var paragraph = node.type.schema.nodes.paragraph;
|
|
26
|
+
if (!paragraph) {
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
var _findFirstParagraphBlockMarkAttrs = function findFirstParagraphBlockMarkAttrs(currentNode) {
|
|
30
|
+
if (currentNode.type === paragraph) {
|
|
31
|
+
return getBlockMarkAttrs(currentNode, markType);
|
|
32
|
+
}
|
|
33
|
+
for (var index = 0; index < currentNode.childCount; index++) {
|
|
34
|
+
var childResult = _findFirstParagraphBlockMarkAttrs(currentNode.child(index));
|
|
35
|
+
if (childResult !== false) {
|
|
36
|
+
return childResult;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return false;
|
|
40
|
+
};
|
|
41
|
+
return _findFirstParagraphBlockMarkAttrs(node);
|
|
42
|
+
};
|
|
43
|
+
var reconcileBlockMarkInRange = exports.reconcileBlockMarkInRange = function reconcileBlockMarkInRange(tr, from, to, markType, markAttrs) {
|
|
44
|
+
var blockNodeTypes = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : getDefaultBlockNodeTypes(tr);
|
|
45
|
+
if (!markType || blockNodeTypes.length === 0) {
|
|
46
|
+
return false;
|
|
47
|
+
}
|
|
48
|
+
return (0, _commands.createToggleBlockMarkOnRangeNext)(markType, function () {
|
|
49
|
+
return markAttrs;
|
|
50
|
+
}, blockNodeTypes)(from, to, tr);
|
|
51
|
+
};
|
|
52
|
+
var reconcileBlockMarkForContainerAtPos = exports.reconcileBlockMarkForContainerAtPos = function reconcileBlockMarkForContainerAtPos(tr, containerPos, markType, markAttrs) {
|
|
53
|
+
var blockNodeTypes = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : getDefaultBlockNodeTypes(tr);
|
|
54
|
+
var containerNode = tr.doc.nodeAt(containerPos);
|
|
55
|
+
if (!containerNode) {
|
|
56
|
+
return false;
|
|
57
|
+
}
|
|
58
|
+
return reconcileBlockMarkInRange(tr, containerPos, containerPos + containerNode.nodeSize, markType, markAttrs, blockNodeTypes);
|
|
59
|
+
};
|
|
60
|
+
var reconcileBlockMarkForParagraphAtPos = exports.reconcileBlockMarkForParagraphAtPos = function reconcileBlockMarkForParagraphAtPos(tr, pos, markType, markAttrs) {
|
|
61
|
+
var paragraph = tr.doc.type.schema.nodes.paragraph;
|
|
62
|
+
if (!paragraph) {
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
var resolvedPos = tr.doc.resolve(Math.max(0, Math.min(pos, tr.doc.content.size)));
|
|
66
|
+
for (var depth = resolvedPos.depth; depth > 0; depth--) {
|
|
67
|
+
var node = resolvedPos.node(depth);
|
|
68
|
+
if (node.type === paragraph) {
|
|
69
|
+
return reconcileBlockMarkInRange(tr, resolvedPos.before(depth), resolvedPos.before(depth) + node.nodeSize, markType, markAttrs, [paragraph]);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return false;
|
|
73
|
+
};
|
package/dist/cjs/lists/index.js
CHANGED
|
@@ -33,12 +33,24 @@ Object.defineProperty(exports, "flattenList", {
|
|
|
33
33
|
return _flattenList.flattenList;
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
|
+
Object.defineProperty(exports, "getBlockMarkAttrs", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function get() {
|
|
39
|
+
return _blockMark.getBlockMarkAttrs;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
36
42
|
Object.defineProperty(exports, "getCommonListAnalyticsAttributes", {
|
|
37
43
|
enumerable: true,
|
|
38
44
|
get: function get() {
|
|
39
45
|
return _analytics.getCommonListAnalyticsAttributes;
|
|
40
46
|
}
|
|
41
47
|
});
|
|
48
|
+
Object.defineProperty(exports, "getFirstParagraphBlockMarkAttrs", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function get() {
|
|
51
|
+
return _blockMark.getFirstParagraphBlockMarkAttrs;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
42
54
|
Object.defineProperty(exports, "getListItemAttributes", {
|
|
43
55
|
enumerable: true,
|
|
44
56
|
get: function get() {
|
|
@@ -117,6 +129,24 @@ Object.defineProperty(exports, "processNestedTaskListsInSameLevel", {
|
|
|
117
129
|
return _node.processNestedTaskListsInSameLevel;
|
|
118
130
|
}
|
|
119
131
|
});
|
|
132
|
+
Object.defineProperty(exports, "reconcileBlockMarkForContainerAtPos", {
|
|
133
|
+
enumerable: true,
|
|
134
|
+
get: function get() {
|
|
135
|
+
return _blockMark.reconcileBlockMarkForContainerAtPos;
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
Object.defineProperty(exports, "reconcileBlockMarkForParagraphAtPos", {
|
|
139
|
+
enumerable: true,
|
|
140
|
+
get: function get() {
|
|
141
|
+
return _blockMark.reconcileBlockMarkForParagraphAtPos;
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
Object.defineProperty(exports, "reconcileBlockMarkInRange", {
|
|
145
|
+
enumerable: true,
|
|
146
|
+
get: function get() {
|
|
147
|
+
return _blockMark.reconcileBlockMarkInRange;
|
|
148
|
+
}
|
|
149
|
+
});
|
|
120
150
|
Object.defineProperty(exports, "restoreSelection", {
|
|
121
151
|
enumerable: true,
|
|
122
152
|
get: function get() {
|
|
@@ -132,5 +162,6 @@ var _restoreSelection = require("./restore-selection");
|
|
|
132
162
|
var _buildReplacementFragment = require("./build-replacement-fragment");
|
|
133
163
|
var _narrowReplacementRange = require("./narrow-replacement-range");
|
|
134
164
|
var _flattenList = require("./flatten-list");
|
|
165
|
+
var _blockMark = require("./block-mark");
|
|
135
166
|
var _utils = require("../utils");
|
|
136
167
|
var _messages = require("./messages");
|
|
@@ -19,7 +19,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
19
19
|
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); }
|
|
20
20
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
21
21
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
22
|
-
var packageVersion = "
|
|
22
|
+
var packageVersion = "112.13.0";
|
|
23
23
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
24
24
|
// Remove URL as it has UGC
|
|
25
25
|
// Ignored via go/ees007
|
|
@@ -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 = "
|
|
27
|
+
var packageVersion = "112.13.0";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var fadeIn = (0, _react2.keyframes)({
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { createToggleBlockMarkOnRangeNext } from '../commands';
|
|
2
|
+
const getDefaultBlockNodeTypes = tr => {
|
|
3
|
+
const {
|
|
4
|
+
paragraph
|
|
5
|
+
} = tr.doc.type.schema.nodes;
|
|
6
|
+
return paragraph ? [paragraph] : [];
|
|
7
|
+
};
|
|
8
|
+
export const getBlockMarkAttrs = (node, markType) => {
|
|
9
|
+
if (!node || !markType) {
|
|
10
|
+
return false;
|
|
11
|
+
}
|
|
12
|
+
const blockMark = node.marks.find(mark => mark.type === markType);
|
|
13
|
+
return blockMark ? blockMark.attrs : false;
|
|
14
|
+
};
|
|
15
|
+
export const getFirstParagraphBlockMarkAttrs = (node, markType) => {
|
|
16
|
+
if (!node || !markType) {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
const {
|
|
20
|
+
paragraph
|
|
21
|
+
} = node.type.schema.nodes;
|
|
22
|
+
if (!paragraph) {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
const findFirstParagraphBlockMarkAttrs = currentNode => {
|
|
26
|
+
if (currentNode.type === paragraph) {
|
|
27
|
+
return getBlockMarkAttrs(currentNode, markType);
|
|
28
|
+
}
|
|
29
|
+
for (let index = 0; index < currentNode.childCount; index++) {
|
|
30
|
+
const childResult = findFirstParagraphBlockMarkAttrs(currentNode.child(index));
|
|
31
|
+
if (childResult !== false) {
|
|
32
|
+
return childResult;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return false;
|
|
36
|
+
};
|
|
37
|
+
return findFirstParagraphBlockMarkAttrs(node);
|
|
38
|
+
};
|
|
39
|
+
export const reconcileBlockMarkInRange = (tr, from, to, markType, markAttrs, blockNodeTypes = getDefaultBlockNodeTypes(tr)) => {
|
|
40
|
+
if (!markType || blockNodeTypes.length === 0) {
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
return createToggleBlockMarkOnRangeNext(markType, () => markAttrs, blockNodeTypes)(from, to, tr);
|
|
44
|
+
};
|
|
45
|
+
export const reconcileBlockMarkForContainerAtPos = (tr, containerPos, markType, markAttrs, blockNodeTypes = getDefaultBlockNodeTypes(tr)) => {
|
|
46
|
+
const containerNode = tr.doc.nodeAt(containerPos);
|
|
47
|
+
if (!containerNode) {
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
return reconcileBlockMarkInRange(tr, containerPos, containerPos + containerNode.nodeSize, markType, markAttrs, blockNodeTypes);
|
|
51
|
+
};
|
|
52
|
+
export const reconcileBlockMarkForParagraphAtPos = (tr, pos, markType, markAttrs) => {
|
|
53
|
+
const {
|
|
54
|
+
paragraph
|
|
55
|
+
} = tr.doc.type.schema.nodes;
|
|
56
|
+
if (!paragraph) {
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
const resolvedPos = tr.doc.resolve(Math.max(0, Math.min(pos, tr.doc.content.size)));
|
|
60
|
+
for (let depth = resolvedPos.depth; depth > 0; depth--) {
|
|
61
|
+
const node = resolvedPos.node(depth);
|
|
62
|
+
if (node.type === paragraph) {
|
|
63
|
+
return reconcileBlockMarkInRange(tr, resolvedPos.before(depth), resolvedPos.before(depth) + node.nodeSize, markType, markAttrs, [paragraph]);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return false;
|
|
67
|
+
};
|
|
@@ -10,5 +10,6 @@ export { restoreSelection, computeSelectionOffsets } from './restore-selection';
|
|
|
10
10
|
export { buildReplacementFragment } from './build-replacement-fragment';
|
|
11
11
|
export { narrowReplacementRange } from './narrow-replacement-range';
|
|
12
12
|
export { flattenList } from './flatten-list';
|
|
13
|
+
export { getBlockMarkAttrs, getFirstParagraphBlockMarkAttrs, reconcileBlockMarkForContainerAtPos, reconcileBlockMarkForParagraphAtPos, reconcileBlockMarkInRange } from './block-mark';
|
|
13
14
|
export { isListNode, isListItemNode, isBulletList, isParagraphNode } from '../utils';
|
|
14
15
|
export { messages } from './messages';
|
|
@@ -4,7 +4,7 @@ import { isFedRamp } from './environment';
|
|
|
4
4
|
import { normaliseSentryBreadcrumbs, SERIALIZABLE_ATTRIBUTES } from './normalise-sentry-breadcrumbs';
|
|
5
5
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
6
6
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
7
|
-
const packageVersion = "
|
|
7
|
+
const packageVersion = "112.13.0";
|
|
8
8
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
9
9
|
// Remove URL as it has UGC
|
|
10
10
|
// Ignored via go/ees007
|
|
@@ -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 = "
|
|
17
|
+
const packageVersion = "112.13.0";
|
|
18
18
|
const halfFocusRing = 1;
|
|
19
19
|
const dropOffset = '0, 8';
|
|
20
20
|
const fadeIn = keyframes({
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { createToggleBlockMarkOnRangeNext } from '../commands';
|
|
2
|
+
var getDefaultBlockNodeTypes = function getDefaultBlockNodeTypes(tr) {
|
|
3
|
+
var paragraph = tr.doc.type.schema.nodes.paragraph;
|
|
4
|
+
return paragraph ? [paragraph] : [];
|
|
5
|
+
};
|
|
6
|
+
export var getBlockMarkAttrs = function getBlockMarkAttrs(node, markType) {
|
|
7
|
+
if (!node || !markType) {
|
|
8
|
+
return false;
|
|
9
|
+
}
|
|
10
|
+
var blockMark = node.marks.find(function (mark) {
|
|
11
|
+
return mark.type === markType;
|
|
12
|
+
});
|
|
13
|
+
return blockMark ? blockMark.attrs : false;
|
|
14
|
+
};
|
|
15
|
+
export var getFirstParagraphBlockMarkAttrs = function getFirstParagraphBlockMarkAttrs(node, markType) {
|
|
16
|
+
if (!node || !markType) {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
var paragraph = node.type.schema.nodes.paragraph;
|
|
20
|
+
if (!paragraph) {
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
var _findFirstParagraphBlockMarkAttrs = function findFirstParagraphBlockMarkAttrs(currentNode) {
|
|
24
|
+
if (currentNode.type === paragraph) {
|
|
25
|
+
return getBlockMarkAttrs(currentNode, markType);
|
|
26
|
+
}
|
|
27
|
+
for (var index = 0; index < currentNode.childCount; index++) {
|
|
28
|
+
var childResult = _findFirstParagraphBlockMarkAttrs(currentNode.child(index));
|
|
29
|
+
if (childResult !== false) {
|
|
30
|
+
return childResult;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return false;
|
|
34
|
+
};
|
|
35
|
+
return _findFirstParagraphBlockMarkAttrs(node);
|
|
36
|
+
};
|
|
37
|
+
export var reconcileBlockMarkInRange = function reconcileBlockMarkInRange(tr, from, to, markType, markAttrs) {
|
|
38
|
+
var blockNodeTypes = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : getDefaultBlockNodeTypes(tr);
|
|
39
|
+
if (!markType || blockNodeTypes.length === 0) {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
return createToggleBlockMarkOnRangeNext(markType, function () {
|
|
43
|
+
return markAttrs;
|
|
44
|
+
}, blockNodeTypes)(from, to, tr);
|
|
45
|
+
};
|
|
46
|
+
export var reconcileBlockMarkForContainerAtPos = function reconcileBlockMarkForContainerAtPos(tr, containerPos, markType, markAttrs) {
|
|
47
|
+
var blockNodeTypes = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : getDefaultBlockNodeTypes(tr);
|
|
48
|
+
var containerNode = tr.doc.nodeAt(containerPos);
|
|
49
|
+
if (!containerNode) {
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
return reconcileBlockMarkInRange(tr, containerPos, containerPos + containerNode.nodeSize, markType, markAttrs, blockNodeTypes);
|
|
53
|
+
};
|
|
54
|
+
export var reconcileBlockMarkForParagraphAtPos = function reconcileBlockMarkForParagraphAtPos(tr, pos, markType, markAttrs) {
|
|
55
|
+
var paragraph = tr.doc.type.schema.nodes.paragraph;
|
|
56
|
+
if (!paragraph) {
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
var resolvedPos = tr.doc.resolve(Math.max(0, Math.min(pos, tr.doc.content.size)));
|
|
60
|
+
for (var depth = resolvedPos.depth; depth > 0; depth--) {
|
|
61
|
+
var node = resolvedPos.node(depth);
|
|
62
|
+
if (node.type === paragraph) {
|
|
63
|
+
return reconcileBlockMarkInRange(tr, resolvedPos.before(depth), resolvedPos.before(depth) + node.nodeSize, markType, markAttrs, [paragraph]);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return false;
|
|
67
|
+
};
|
package/dist/esm/lists/index.js
CHANGED
|
@@ -10,5 +10,6 @@ export { restoreSelection, computeSelectionOffsets } from './restore-selection';
|
|
|
10
10
|
export { buildReplacementFragment } from './build-replacement-fragment';
|
|
11
11
|
export { narrowReplacementRange } from './narrow-replacement-range';
|
|
12
12
|
export { flattenList } from './flatten-list';
|
|
13
|
+
export { getBlockMarkAttrs, getFirstParagraphBlockMarkAttrs, reconcileBlockMarkForContainerAtPos, reconcileBlockMarkForParagraphAtPos, reconcileBlockMarkInRange } from './block-mark';
|
|
13
14
|
export { isListNode, isListItemNode, isBulletList, isParagraphNode } from '../utils';
|
|
14
15
|
export { messages } from './messages';
|
|
@@ -10,7 +10,7 @@ import { isFedRamp } from './environment';
|
|
|
10
10
|
import { normaliseSentryBreadcrumbs, SERIALIZABLE_ATTRIBUTES } from './normalise-sentry-breadcrumbs';
|
|
11
11
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
12
12
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
13
|
-
var packageVersion = "
|
|
13
|
+
var packageVersion = "112.13.0";
|
|
14
14
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
15
15
|
// Remove URL as it has UGC
|
|
16
16
|
// Ignored via go/ees007
|
|
@@ -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 = "
|
|
24
|
+
var packageVersion = "112.13.0";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var fadeIn = keyframes({
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { MarkType, Node as PMNode, NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
+
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
+
type BlockMarkAttrs = Record<string, unknown>;
|
|
4
|
+
export declare const getBlockMarkAttrs: <T extends BlockMarkAttrs = BlockMarkAttrs>(node: PMNode | null | undefined, markType?: MarkType) => T | false;
|
|
5
|
+
export declare const getFirstParagraphBlockMarkAttrs: <T extends BlockMarkAttrs = BlockMarkAttrs>(node: PMNode | null | undefined, markType?: MarkType) => T | false;
|
|
6
|
+
export declare const reconcileBlockMarkInRange: <T extends BlockMarkAttrs = BlockMarkAttrs>(tr: Transaction, from: number, to: number, markType: MarkType | undefined, markAttrs: T | false, blockNodeTypes?: NodeType[]) => boolean;
|
|
7
|
+
export declare const reconcileBlockMarkForContainerAtPos: <T extends BlockMarkAttrs = BlockMarkAttrs>(tr: Transaction, containerPos: number, markType: MarkType | undefined, markAttrs: T | false, blockNodeTypes?: NodeType[]) => boolean;
|
|
8
|
+
export declare const reconcileBlockMarkForParagraphAtPos: <T extends BlockMarkAttrs = BlockMarkAttrs>(tr: Transaction, pos: number, markType: MarkType | undefined, markAttrs: T | false) => boolean;
|
|
9
|
+
export {};
|
|
@@ -11,5 +11,6 @@ export type { NarrowedReplacement } from './narrow-replacement-range';
|
|
|
11
11
|
export type { FlattenedItem } from './flatten-list';
|
|
12
12
|
export { flattenList } from './flatten-list';
|
|
13
13
|
export type { FlattenListOptions, FlattenListResult } from './flatten-list';
|
|
14
|
+
export { getBlockMarkAttrs, getFirstParagraphBlockMarkAttrs, reconcileBlockMarkForContainerAtPos, reconcileBlockMarkForParagraphAtPos, reconcileBlockMarkInRange, } from './block-mark';
|
|
14
15
|
export { isListNode, isListItemNode, isBulletList, isParagraphNode } from '../utils';
|
|
15
16
|
export { messages } from './messages';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { MarkType, Node as PMNode, NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
+
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
+
type BlockMarkAttrs = Record<string, unknown>;
|
|
4
|
+
export declare const getBlockMarkAttrs: <T extends BlockMarkAttrs = BlockMarkAttrs>(node: PMNode | null | undefined, markType?: MarkType) => T | false;
|
|
5
|
+
export declare const getFirstParagraphBlockMarkAttrs: <T extends BlockMarkAttrs = BlockMarkAttrs>(node: PMNode | null | undefined, markType?: MarkType) => T | false;
|
|
6
|
+
export declare const reconcileBlockMarkInRange: <T extends BlockMarkAttrs = BlockMarkAttrs>(tr: Transaction, from: number, to: number, markType: MarkType | undefined, markAttrs: T | false, blockNodeTypes?: NodeType[]) => boolean;
|
|
7
|
+
export declare const reconcileBlockMarkForContainerAtPos: <T extends BlockMarkAttrs = BlockMarkAttrs>(tr: Transaction, containerPos: number, markType: MarkType | undefined, markAttrs: T | false, blockNodeTypes?: NodeType[]) => boolean;
|
|
8
|
+
export declare const reconcileBlockMarkForParagraphAtPos: <T extends BlockMarkAttrs = BlockMarkAttrs>(tr: Transaction, pos: number, markType: MarkType | undefined, markAttrs: T | false) => boolean;
|
|
9
|
+
export {};
|
|
@@ -11,5 +11,6 @@ export type { NarrowedReplacement } from './narrow-replacement-range';
|
|
|
11
11
|
export type { FlattenedItem } from './flatten-list';
|
|
12
12
|
export { flattenList } from './flatten-list';
|
|
13
13
|
export type { FlattenListOptions, FlattenListResult } from './flatten-list';
|
|
14
|
+
export { getBlockMarkAttrs, getFirstParagraphBlockMarkAttrs, reconcileBlockMarkForContainerAtPos, reconcileBlockMarkForParagraphAtPos, reconcileBlockMarkInRange, } from './block-mark';
|
|
14
15
|
export { isListNode, isListItemNode, isBulletList, isParagraphNode } from '../utils';
|
|
15
16
|
export { messages } from './messages';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "112.
|
|
3
|
+
"version": "112.13.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/"
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"@atlaskit/primitives": "^18.1.0",
|
|
74
74
|
"@atlaskit/profilecard": "^24.45.0",
|
|
75
75
|
"@atlaskit/prosemirror-history": "^0.2.0",
|
|
76
|
-
"@atlaskit/react-ufo": "^5.
|
|
76
|
+
"@atlaskit/react-ufo": "^5.7.0",
|
|
77
77
|
"@atlaskit/section-message": "^8.12.0",
|
|
78
78
|
"@atlaskit/smart-card": "^43.28.0",
|
|
79
79
|
"@atlaskit/smart-user-picker": "^9.2.0",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"@atlaskit/status": "^3.2.0",
|
|
82
82
|
"@atlaskit/task-decision": "^19.3.0",
|
|
83
83
|
"@atlaskit/textfield": "^8.2.0",
|
|
84
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
84
|
+
"@atlaskit/tmp-editor-statsig": "^49.0.0",
|
|
85
85
|
"@atlaskit/tokens": "^11.4.0",
|
|
86
86
|
"@atlaskit/tooltip": "^21.0.0",
|
|
87
87
|
"@atlaskit/width-detector": "^5.0.0",
|