@atlaskit/editor-common 98.2.6 → 99.1.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 +22 -0
- package/dist/cjs/mark/commands.js +11 -80
- package/dist/cjs/mark/index.js +0 -6
- package/dist/cjs/messages/mentions.js +5 -0
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/styles/shared/embedCard.js +1 -22
- package/dist/cjs/styles/shared/plugins.js +4 -4
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/mark/commands.js +0 -78
- package/dist/es2019/mark/index.js +1 -1
- package/dist/es2019/messages/mentions.js +5 -0
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/styles/shared/embedCard.js +1 -22
- package/dist/es2019/styles/shared/plugins.js +4 -4
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/mark/commands.js +11 -79
- package/dist/esm/mark/index.js +1 -1
- package/dist/esm/messages/mentions.js +5 -0
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/styles/shared/embedCard.js +1 -22
- package/dist/esm/styles/shared/plugins.js +4 -4
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/mark/commands.d.ts +0 -5
- package/dist/types/mark/index.d.ts +1 -1
- package/dist/types/messages/mentions.d.ts +5 -0
- package/dist/types-ts4.5/mark/commands.d.ts +0 -5
- package/dist/types-ts4.5/mark/index.d.ts +1 -1
- package/dist/types-ts4.5/messages/mentions.d.ts +5 -0
- package/package.json +7 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 99.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#101334](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/101334)
|
|
8
|
+
[`70742828916ee`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/70742828916ee) -
|
|
9
|
+
Clean up FG platform_editor_element_dnd_nested_fix_patch_3
|
|
10
|
+
|
|
11
|
+
## 99.0.0
|
|
12
|
+
|
|
13
|
+
### Major Changes
|
|
14
|
+
|
|
15
|
+
- [#97984](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/97984)
|
|
16
|
+
[`8ffeab9aaf1ab`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8ffeab9aaf1ab) -
|
|
17
|
+
[ux] [ED-23573] Added new actions (resolveMarks and registerMarks) to basePlugin. Callbacks added
|
|
18
|
+
to mentions, card, emoji and base plugins to handle conversion to inline code. Deprecated code
|
|
19
|
+
removed from editor-common.
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- Updated dependencies
|
|
24
|
+
|
|
3
25
|
## 98.2.6
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
|
@@ -7,7 +7,6 @@ exports.entireSelectionContainsMark = exports.applyMarkOnRange = void 0;
|
|
|
7
7
|
exports.filterChildrenBetween = filterChildrenBetween;
|
|
8
8
|
exports.toggleMark = exports.removeMark = void 0;
|
|
9
9
|
exports.transformNonTextNodesToText = transformNonTextNodesToText;
|
|
10
|
-
exports.transformSmartCharsMentionsAndEmojis = void 0;
|
|
11
10
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
12
11
|
var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
|
|
13
12
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
@@ -27,44 +26,6 @@ var SMART_TO_ASCII = {
|
|
|
27
26
|
// Ignored via go/ees005
|
|
28
27
|
// eslint-disable-next-line require-unicode-regexp
|
|
29
28
|
var FIND_SMART_CHAR = new RegExp("[".concat(Object.keys(SMART_TO_ASCII).join(''), "]"), 'g');
|
|
30
|
-
var isNodeTextBlock = function isNodeTextBlock(schema) {
|
|
31
|
-
var _schema$nodes = schema.nodes,
|
|
32
|
-
mention = _schema$nodes.mention,
|
|
33
|
-
text = _schema$nodes.text,
|
|
34
|
-
emoji = _schema$nodes.emoji;
|
|
35
|
-
|
|
36
|
-
// Ignored via go/ees005
|
|
37
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
38
|
-
return function (node, _, parent) {
|
|
39
|
-
if (node.type === mention || node.type === emoji || node.type === text) {
|
|
40
|
-
return parent === null || parent === void 0 ? void 0 : parent.isTextblock;
|
|
41
|
-
}
|
|
42
|
-
return;
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
var replaceSmartCharsToAscii = function replaceSmartCharsToAscii(position, textContent, tr) {
|
|
46
|
-
var schema = tr.doc.type.schema;
|
|
47
|
-
var match;
|
|
48
|
-
|
|
49
|
-
// Ignored via go/ees005
|
|
50
|
-
// eslint-disable-next-line no-cond-assign
|
|
51
|
-
while (match = FIND_SMART_CHAR.exec(textContent)) {
|
|
52
|
-
var _match = match,
|
|
53
|
-
smartChar = _match[0],
|
|
54
|
-
offset = _match.index;
|
|
55
|
-
var replacePos = tr.mapping.map(position + offset);
|
|
56
|
-
var replacementText = schema.text(SMART_TO_ASCII[smartChar]);
|
|
57
|
-
tr.replaceWith(replacePos, replacePos + smartChar.length, replacementText);
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
var replaceMentionOrEmojiForTextContent = function replaceMentionOrEmojiForTextContent(position, nodeSize, textContent, tr
|
|
61
|
-
// Ignored via go/ees005
|
|
62
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
63
|
-
) {
|
|
64
|
-
var currentPos = tr.mapping.map(position);
|
|
65
|
-
var schema = tr.doc.type.schema;
|
|
66
|
-
tr.replaceWith(currentPos, currentPos + nodeSize, schema.text(textContent));
|
|
67
|
-
};
|
|
68
29
|
|
|
69
30
|
// Ignored via go/ees005
|
|
70
31
|
// eslint-disable-next-line @typescript-eslint/max-params
|
|
@@ -83,11 +44,11 @@ function filterChildrenBetween(doc, from, to, predicate) {
|
|
|
83
44
|
function transformNonTextNodesToText(from, to, tr) {
|
|
84
45
|
var doc = tr.doc;
|
|
85
46
|
var schema = doc.type.schema;
|
|
86
|
-
var _schema$
|
|
87
|
-
mentionNodeType = _schema$
|
|
88
|
-
textNodeType = _schema$
|
|
89
|
-
emojiNodeType = _schema$
|
|
90
|
-
inlineCardNodeType = _schema$
|
|
47
|
+
var _schema$nodes = schema.nodes,
|
|
48
|
+
mentionNodeType = _schema$nodes.mention,
|
|
49
|
+
textNodeType = _schema$nodes.text,
|
|
50
|
+
emojiNodeType = _schema$nodes.emoji,
|
|
51
|
+
inlineCardNodeType = _schema$nodes.inlineCard;
|
|
91
52
|
var nodesToChange = [];
|
|
92
53
|
doc.nodesBetween(from, to, function (node, pos, parent) {
|
|
93
54
|
if ([mentionNodeType, textNodeType, emojiNodeType, inlineCardNodeType].includes(node.type)) {
|
|
@@ -122,36 +83,6 @@ function transformNonTextNodesToText(from, to, tr) {
|
|
|
122
83
|
}
|
|
123
84
|
});
|
|
124
85
|
}
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* @private
|
|
128
|
-
* @deprecated Use {@link transformNonTextNodesToText} instead.
|
|
129
|
-
*/
|
|
130
|
-
var transformSmartCharsMentionsAndEmojis = exports.transformSmartCharsMentionsAndEmojis = function transformSmartCharsMentionsAndEmojis(from, to, tr) {
|
|
131
|
-
var schema = tr.doc.type.schema;
|
|
132
|
-
var _schema$nodes3 = schema.nodes,
|
|
133
|
-
mention = _schema$nodes3.mention,
|
|
134
|
-
text = _schema$nodes3.text,
|
|
135
|
-
emoji = _schema$nodes3.emoji;
|
|
136
|
-
// Traverse through all the nodes within the range and replace them with their plaintext counterpart
|
|
137
|
-
var children = filterChildrenBetween(tr.doc, from, to, isNodeTextBlock(schema));
|
|
138
|
-
children.forEach(function (_ref2) {
|
|
139
|
-
var node = _ref2.node,
|
|
140
|
-
pos = _ref2.pos;
|
|
141
|
-
if (node.type === mention || node.type === emoji) {
|
|
142
|
-
// Convert gracefully when no text found, ProseMirror will blow up if you try to create a node with an empty string or undefined
|
|
143
|
-
var replacementText = node.attrs.text;
|
|
144
|
-
if (typeof replacementText === 'undefined' || replacementText === '') {
|
|
145
|
-
replacementText = "".concat(node.type.name, " text missing");
|
|
146
|
-
}
|
|
147
|
-
replaceMentionOrEmojiForTextContent(pos, node.nodeSize, replacementText, tr);
|
|
148
|
-
} else if (node.type === text && node.text) {
|
|
149
|
-
var replacePosition = pos > from ? pos : from;
|
|
150
|
-
var textToReplace = pos > from ? node.text : node.text.substr(from - pos);
|
|
151
|
-
replaceSmartCharsToAscii(replacePosition, textToReplace, tr);
|
|
152
|
-
}
|
|
153
|
-
});
|
|
154
|
-
};
|
|
155
86
|
var applyMarkOnRange = exports.applyMarkOnRange = function applyMarkOnRange(from, to, removeMark, mark, tr
|
|
156
87
|
// Ignored via go/ees005
|
|
157
88
|
// eslint-disable-next-line @typescript-eslint/max-params
|
|
@@ -207,8 +138,8 @@ var entireSelectionContainsMark = exports.entireSelectionContainsMark = function
|
|
|
207
138
|
return onlyContainsMark;
|
|
208
139
|
};
|
|
209
140
|
var toggleMarkInRange = function toggleMarkInRange(mark) {
|
|
210
|
-
return function (
|
|
211
|
-
var tr =
|
|
141
|
+
return function (_ref2) {
|
|
142
|
+
var tr = _ref2.tr;
|
|
212
143
|
if (tr.selection instanceof _cellSelection.CellSelection) {
|
|
213
144
|
var _removeMark = true;
|
|
214
145
|
var cells = [];
|
|
@@ -253,8 +184,8 @@ var toggleMarkInRange = function toggleMarkInRange(mark) {
|
|
|
253
184
|
* @param attrs
|
|
254
185
|
*/
|
|
255
186
|
var toggleMark = exports.toggleMark = function toggleMark(markType, attrs) {
|
|
256
|
-
return function (
|
|
257
|
-
var tr =
|
|
187
|
+
return function (_ref3) {
|
|
188
|
+
var tr = _ref3.tr;
|
|
258
189
|
var mark = markType.create(attrs);
|
|
259
190
|
|
|
260
191
|
// For cursor selections we can use the default behaviour.
|
|
@@ -276,8 +207,8 @@ var toggleMark = exports.toggleMark = function toggleMark(markType, attrs) {
|
|
|
276
207
|
* A wrapper around ProseMirror removeMark and removeStoredMark, which handles mark removal in text, CellSelections and cursor stored marks.
|
|
277
208
|
*/
|
|
278
209
|
var removeMark = exports.removeMark = function removeMark(mark) {
|
|
279
|
-
return function (
|
|
280
|
-
var tr =
|
|
210
|
+
return function (_ref4) {
|
|
211
|
+
var tr = _ref4.tr;
|
|
281
212
|
var selection = tr.selection;
|
|
282
213
|
if (selection instanceof _cellSelection.CellSelection) {
|
|
283
214
|
selection.forEachCell(function (cell, cellPos) {
|
package/dist/cjs/mark/index.js
CHANGED
|
@@ -57,11 +57,5 @@ Object.defineProperty(exports, "transformNonTextNodesToText", {
|
|
|
57
57
|
return _commands.transformNonTextNodesToText;
|
|
58
58
|
}
|
|
59
59
|
});
|
|
60
|
-
Object.defineProperty(exports, "transformSmartCharsMentionsAndEmojis", {
|
|
61
|
-
enumerable: true,
|
|
62
|
-
get: function get() {
|
|
63
|
-
return _commands.transformSmartCharsMentionsAndEmojis;
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
60
|
var _commands = require("./commands");
|
|
67
61
|
var _textFormatting = require("./text-formatting");
|
|
@@ -25,5 +25,10 @@ var mentionMessages = exports.mentionMessages = (0, _reactIntlNext.defineMessage
|
|
|
25
25
|
id: 'fabric.editor.mentionNode.label',
|
|
26
26
|
defaultMessage: 'Tagged user',
|
|
27
27
|
description: 'Label to indicate mention node to Screen reader users, that preceeds with user name ex: "Tagged user @XXX'
|
|
28
|
+
},
|
|
29
|
+
unknownLabel: {
|
|
30
|
+
id: 'fabric.editor.unknown.label',
|
|
31
|
+
defaultMessage: 'Unknown',
|
|
32
|
+
description: 'Label to indicate unknown mention node'
|
|
28
33
|
}
|
|
29
34
|
});
|
|
@@ -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 = "
|
|
20
|
+
var packageVersion = "99.1.0";
|
|
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
|
|
@@ -6,12 +6,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.embedSpacingStyles = exports.embedCardStyles = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
9
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
10
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
11
10
|
|
|
12
11
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
13
12
|
var embedCardStyles = exports.embedCardStyles = function embedCardStyles() {
|
|
14
|
-
return (0,
|
|
13
|
+
return (0, _react.css)({
|
|
15
14
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
16
15
|
'.ProseMirror': {
|
|
17
16
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
@@ -34,26 +33,6 @@ var embedCardStyles = exports.embedCardStyles = function embedCardStyles() {
|
|
|
34
33
|
clear: 'both'
|
|
35
34
|
}
|
|
36
35
|
}
|
|
37
|
-
}) : (0, _react.css)({
|
|
38
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
39
|
-
'.ProseMirror': {
|
|
40
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
41
|
-
".embedCardView-content-wrap[layout^='wrap-']": {
|
|
42
|
-
maxWidth: '100%'
|
|
43
|
-
},
|
|
44
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
45
|
-
".embedCardView-content-wrap[layout='wrap-left']": {
|
|
46
|
-
float: 'left'
|
|
47
|
-
},
|
|
48
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
49
|
-
".embedCardView-content-wrap[layout='wrap-right']": {
|
|
50
|
-
float: 'right'
|
|
51
|
-
},
|
|
52
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
53
|
-
".embedCardView-content-wrap[layout='wrap-right'] + .embedCardView-content-wrap[layout='wrap-left']": {
|
|
54
|
-
clear: 'both'
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
36
|
});
|
|
58
37
|
};
|
|
59
38
|
|
|
@@ -15,8 +15,8 @@ var buttonGroupStyleBeforeVisualRefresh = exports.buttonGroupStyleBeforeVisualRe
|
|
|
15
15
|
'& > div': {
|
|
16
16
|
display: 'flex'
|
|
17
17
|
},
|
|
18
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
19
|
-
button: {
|
|
18
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
19
|
+
'button:not(#local-media-upload-button)': {
|
|
20
20
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
21
21
|
'&:not([disabled])::after': {
|
|
22
22
|
border: 'none' // remove blue border when an item has been selected
|
|
@@ -32,8 +32,8 @@ var buttonGroupStyle = exports.buttonGroupStyle = (0, _react.css)({
|
|
|
32
32
|
'& > div': {
|
|
33
33
|
display: 'flex'
|
|
34
34
|
},
|
|
35
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
36
|
-
button: {
|
|
35
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
36
|
+
'button:not(#local-media-upload-button)': {
|
|
37
37
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
38
38
|
'&:not([disabled])::after': {
|
|
39
39
|
border: 'none' // remove blue border when an item has been selected
|
|
@@ -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 = "
|
|
26
|
+
var packageVersion = "99.1.0";
|
|
27
27
|
var halfFocusRing = 1;
|
|
28
28
|
var dropOffset = '0, 8';
|
|
29
29
|
// Ignored via go/ees005
|
|
@@ -17,50 +17,6 @@ const SMART_TO_ASCII = {
|
|
|
17
17
|
// Ignored via go/ees005
|
|
18
18
|
// eslint-disable-next-line require-unicode-regexp
|
|
19
19
|
const FIND_SMART_CHAR = new RegExp(`[${Object.keys(SMART_TO_ASCII).join('')}]`, 'g');
|
|
20
|
-
const isNodeTextBlock = schema => {
|
|
21
|
-
const {
|
|
22
|
-
mention,
|
|
23
|
-
text,
|
|
24
|
-
emoji
|
|
25
|
-
} = schema.nodes;
|
|
26
|
-
|
|
27
|
-
// Ignored via go/ees005
|
|
28
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
29
|
-
return (node, _, parent) => {
|
|
30
|
-
if (node.type === mention || node.type === emoji || node.type === text) {
|
|
31
|
-
return parent === null || parent === void 0 ? void 0 : parent.isTextblock;
|
|
32
|
-
}
|
|
33
|
-
return;
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
const replaceSmartCharsToAscii = (position, textContent, tr) => {
|
|
37
|
-
const {
|
|
38
|
-
schema
|
|
39
|
-
} = tr.doc.type;
|
|
40
|
-
let match;
|
|
41
|
-
|
|
42
|
-
// Ignored via go/ees005
|
|
43
|
-
// eslint-disable-next-line no-cond-assign
|
|
44
|
-
while (match = FIND_SMART_CHAR.exec(textContent)) {
|
|
45
|
-
const {
|
|
46
|
-
0: smartChar,
|
|
47
|
-
index: offset
|
|
48
|
-
} = match;
|
|
49
|
-
const replacePos = tr.mapping.map(position + offset);
|
|
50
|
-
const replacementText = schema.text(SMART_TO_ASCII[smartChar]);
|
|
51
|
-
tr.replaceWith(replacePos, replacePos + smartChar.length, replacementText);
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
const replaceMentionOrEmojiForTextContent = (position, nodeSize, textContent, tr
|
|
55
|
-
// Ignored via go/ees005
|
|
56
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
57
|
-
) => {
|
|
58
|
-
const currentPos = tr.mapping.map(position);
|
|
59
|
-
const {
|
|
60
|
-
schema
|
|
61
|
-
} = tr.doc.type;
|
|
62
|
-
tr.replaceWith(currentPos, currentPos + nodeSize, schema.text(textContent));
|
|
63
|
-
};
|
|
64
20
|
|
|
65
21
|
// Ignored via go/ees005
|
|
66
22
|
// eslint-disable-next-line @typescript-eslint/max-params
|
|
@@ -124,40 +80,6 @@ export function transformNonTextNodesToText(from, to, tr) {
|
|
|
124
80
|
}
|
|
125
81
|
});
|
|
126
82
|
}
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* @private
|
|
130
|
-
* @deprecated Use {@link transformNonTextNodesToText} instead.
|
|
131
|
-
*/
|
|
132
|
-
export const transformSmartCharsMentionsAndEmojis = (from, to, tr) => {
|
|
133
|
-
const {
|
|
134
|
-
schema
|
|
135
|
-
} = tr.doc.type;
|
|
136
|
-
const {
|
|
137
|
-
mention,
|
|
138
|
-
text,
|
|
139
|
-
emoji
|
|
140
|
-
} = schema.nodes;
|
|
141
|
-
// Traverse through all the nodes within the range and replace them with their plaintext counterpart
|
|
142
|
-
const children = filterChildrenBetween(tr.doc, from, to, isNodeTextBlock(schema));
|
|
143
|
-
children.forEach(({
|
|
144
|
-
node,
|
|
145
|
-
pos
|
|
146
|
-
}) => {
|
|
147
|
-
if (node.type === mention || node.type === emoji) {
|
|
148
|
-
// Convert gracefully when no text found, ProseMirror will blow up if you try to create a node with an empty string or undefined
|
|
149
|
-
let replacementText = node.attrs.text;
|
|
150
|
-
if (typeof replacementText === 'undefined' || replacementText === '') {
|
|
151
|
-
replacementText = `${node.type.name} text missing`;
|
|
152
|
-
}
|
|
153
|
-
replaceMentionOrEmojiForTextContent(pos, node.nodeSize, replacementText, tr);
|
|
154
|
-
} else if (node.type === text && node.text) {
|
|
155
|
-
const replacePosition = pos > from ? pos : from;
|
|
156
|
-
const textToReplace = pos > from ? node.text : node.text.substr(from - pos);
|
|
157
|
-
replaceSmartCharsToAscii(replacePosition, textToReplace, tr);
|
|
158
|
-
}
|
|
159
|
-
});
|
|
160
|
-
};
|
|
161
83
|
export const applyMarkOnRange = (from, to, removeMark, mark, tr
|
|
162
84
|
// Ignored via go/ees005
|
|
163
85
|
// eslint-disable-next-line @typescript-eslint/max-params
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Disable no-re-export rule for entry point files
|
|
2
2
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
3
3
|
|
|
4
|
-
export {
|
|
4
|
+
export { transformNonTextNodesToText, applyMarkOnRange, filterChildrenBetween, toggleMark, removeMark, entireSelectionContainsMark } from './commands';
|
|
5
5
|
export { anyMarkActive, isMarkAllowedInRange, isMarkExcluded } from './text-formatting';
|
|
@@ -19,5 +19,10 @@ export const mentionMessages = defineMessages({
|
|
|
19
19
|
id: 'fabric.editor.mentionNode.label',
|
|
20
20
|
defaultMessage: 'Tagged user',
|
|
21
21
|
description: 'Label to indicate mention node to Screen reader users, that preceeds with user name ex: "Tagged user @XXX'
|
|
22
|
+
},
|
|
23
|
+
unknownLabel: {
|
|
24
|
+
id: 'fabric.editor.unknown.label',
|
|
25
|
+
defaultMessage: 'Unknown',
|
|
26
|
+
description: 'Label to indicate unknown mention node'
|
|
22
27
|
}
|
|
23
28
|
});
|
|
@@ -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 = "
|
|
4
|
+
const packageVersion = "99.1.0";
|
|
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,9 +1,8 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
3
|
import { akEditorWrappedNodeZIndex } from '@atlaskit/editor-shared-styles';
|
|
4
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
4
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
6
|
-
export const embedCardStyles = () =>
|
|
5
|
+
export const embedCardStyles = () => css({
|
|
7
6
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
8
7
|
'.ProseMirror': {
|
|
9
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
@@ -26,26 +25,6 @@ export const embedCardStyles = () => fg('platform_editor_element_dnd_nested_fix_
|
|
|
26
25
|
clear: 'both'
|
|
27
26
|
}
|
|
28
27
|
}
|
|
29
|
-
}) : css({
|
|
30
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
31
|
-
'.ProseMirror': {
|
|
32
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
33
|
-
".embedCardView-content-wrap[layout^='wrap-']": {
|
|
34
|
-
maxWidth: '100%'
|
|
35
|
-
},
|
|
36
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
37
|
-
".embedCardView-content-wrap[layout='wrap-left']": {
|
|
38
|
-
float: 'left'
|
|
39
|
-
},
|
|
40
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
41
|
-
".embedCardView-content-wrap[layout='wrap-right']": {
|
|
42
|
-
float: 'right'
|
|
43
|
-
},
|
|
44
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
45
|
-
".embedCardView-content-wrap[layout='wrap-right'] + .embedCardView-content-wrap[layout='wrap-left']": {
|
|
46
|
-
clear: 'both'
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
28
|
});
|
|
50
29
|
|
|
51
30
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
@@ -8,8 +8,8 @@ export const buttonGroupStyleBeforeVisualRefresh = css({
|
|
|
8
8
|
'& > div': {
|
|
9
9
|
display: 'flex'
|
|
10
10
|
},
|
|
11
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
12
|
-
button: {
|
|
11
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
12
|
+
'button:not(#local-media-upload-button)': {
|
|
13
13
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
14
14
|
'&:not([disabled])::after': {
|
|
15
15
|
border: 'none' // remove blue border when an item has been selected
|
|
@@ -25,8 +25,8 @@ export const buttonGroupStyle = css({
|
|
|
25
25
|
'& > div': {
|
|
26
26
|
display: 'flex'
|
|
27
27
|
},
|
|
28
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
29
|
-
button: {
|
|
28
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
29
|
+
'button:not(#local-media-upload-button)': {
|
|
30
30
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
31
31
|
'&:not([disabled])::after': {
|
|
32
32
|
border: 'none' // remove blue border when an item has been selected
|
|
@@ -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 = "
|
|
16
|
+
const packageVersion = "99.1.0";
|
|
17
17
|
const halfFocusRing = 1;
|
|
18
18
|
const dropOffset = '0, 8';
|
|
19
19
|
// Ignored via go/ees005
|
|
@@ -17,44 +17,6 @@ var SMART_TO_ASCII = {
|
|
|
17
17
|
// Ignored via go/ees005
|
|
18
18
|
// eslint-disable-next-line require-unicode-regexp
|
|
19
19
|
var FIND_SMART_CHAR = new RegExp("[".concat(Object.keys(SMART_TO_ASCII).join(''), "]"), 'g');
|
|
20
|
-
var isNodeTextBlock = function isNodeTextBlock(schema) {
|
|
21
|
-
var _schema$nodes = schema.nodes,
|
|
22
|
-
mention = _schema$nodes.mention,
|
|
23
|
-
text = _schema$nodes.text,
|
|
24
|
-
emoji = _schema$nodes.emoji;
|
|
25
|
-
|
|
26
|
-
// Ignored via go/ees005
|
|
27
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
28
|
-
return function (node, _, parent) {
|
|
29
|
-
if (node.type === mention || node.type === emoji || node.type === text) {
|
|
30
|
-
return parent === null || parent === void 0 ? void 0 : parent.isTextblock;
|
|
31
|
-
}
|
|
32
|
-
return;
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
var replaceSmartCharsToAscii = function replaceSmartCharsToAscii(position, textContent, tr) {
|
|
36
|
-
var schema = tr.doc.type.schema;
|
|
37
|
-
var match;
|
|
38
|
-
|
|
39
|
-
// Ignored via go/ees005
|
|
40
|
-
// eslint-disable-next-line no-cond-assign
|
|
41
|
-
while (match = FIND_SMART_CHAR.exec(textContent)) {
|
|
42
|
-
var _match = match,
|
|
43
|
-
smartChar = _match[0],
|
|
44
|
-
offset = _match.index;
|
|
45
|
-
var replacePos = tr.mapping.map(position + offset);
|
|
46
|
-
var replacementText = schema.text(SMART_TO_ASCII[smartChar]);
|
|
47
|
-
tr.replaceWith(replacePos, replacePos + smartChar.length, replacementText);
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
var replaceMentionOrEmojiForTextContent = function replaceMentionOrEmojiForTextContent(position, nodeSize, textContent, tr
|
|
51
|
-
// Ignored via go/ees005
|
|
52
|
-
// eslint-disable-next-line @typescript-eslint/max-params
|
|
53
|
-
) {
|
|
54
|
-
var currentPos = tr.mapping.map(position);
|
|
55
|
-
var schema = tr.doc.type.schema;
|
|
56
|
-
tr.replaceWith(currentPos, currentPos + nodeSize, schema.text(textContent));
|
|
57
|
-
};
|
|
58
20
|
|
|
59
21
|
// Ignored via go/ees005
|
|
60
22
|
// eslint-disable-next-line @typescript-eslint/max-params
|
|
@@ -73,11 +35,11 @@ export function filterChildrenBetween(doc, from, to, predicate) {
|
|
|
73
35
|
export function transformNonTextNodesToText(from, to, tr) {
|
|
74
36
|
var doc = tr.doc;
|
|
75
37
|
var schema = doc.type.schema;
|
|
76
|
-
var _schema$
|
|
77
|
-
mentionNodeType = _schema$
|
|
78
|
-
textNodeType = _schema$
|
|
79
|
-
emojiNodeType = _schema$
|
|
80
|
-
inlineCardNodeType = _schema$
|
|
38
|
+
var _schema$nodes = schema.nodes,
|
|
39
|
+
mentionNodeType = _schema$nodes.mention,
|
|
40
|
+
textNodeType = _schema$nodes.text,
|
|
41
|
+
emojiNodeType = _schema$nodes.emoji,
|
|
42
|
+
inlineCardNodeType = _schema$nodes.inlineCard;
|
|
81
43
|
var nodesToChange = [];
|
|
82
44
|
doc.nodesBetween(from, to, function (node, pos, parent) {
|
|
83
45
|
if ([mentionNodeType, textNodeType, emojiNodeType, inlineCardNodeType].includes(node.type)) {
|
|
@@ -112,36 +74,6 @@ export function transformNonTextNodesToText(from, to, tr) {
|
|
|
112
74
|
}
|
|
113
75
|
});
|
|
114
76
|
}
|
|
115
|
-
|
|
116
|
-
/**
|
|
117
|
-
* @private
|
|
118
|
-
* @deprecated Use {@link transformNonTextNodesToText} instead.
|
|
119
|
-
*/
|
|
120
|
-
export var transformSmartCharsMentionsAndEmojis = function transformSmartCharsMentionsAndEmojis(from, to, tr) {
|
|
121
|
-
var schema = tr.doc.type.schema;
|
|
122
|
-
var _schema$nodes3 = schema.nodes,
|
|
123
|
-
mention = _schema$nodes3.mention,
|
|
124
|
-
text = _schema$nodes3.text,
|
|
125
|
-
emoji = _schema$nodes3.emoji;
|
|
126
|
-
// Traverse through all the nodes within the range and replace them with their plaintext counterpart
|
|
127
|
-
var children = filterChildrenBetween(tr.doc, from, to, isNodeTextBlock(schema));
|
|
128
|
-
children.forEach(function (_ref2) {
|
|
129
|
-
var node = _ref2.node,
|
|
130
|
-
pos = _ref2.pos;
|
|
131
|
-
if (node.type === mention || node.type === emoji) {
|
|
132
|
-
// Convert gracefully when no text found, ProseMirror will blow up if you try to create a node with an empty string or undefined
|
|
133
|
-
var replacementText = node.attrs.text;
|
|
134
|
-
if (typeof replacementText === 'undefined' || replacementText === '') {
|
|
135
|
-
replacementText = "".concat(node.type.name, " text missing");
|
|
136
|
-
}
|
|
137
|
-
replaceMentionOrEmojiForTextContent(pos, node.nodeSize, replacementText, tr);
|
|
138
|
-
} else if (node.type === text && node.text) {
|
|
139
|
-
var replacePosition = pos > from ? pos : from;
|
|
140
|
-
var textToReplace = pos > from ? node.text : node.text.substr(from - pos);
|
|
141
|
-
replaceSmartCharsToAscii(replacePosition, textToReplace, tr);
|
|
142
|
-
}
|
|
143
|
-
});
|
|
144
|
-
};
|
|
145
77
|
export var applyMarkOnRange = function applyMarkOnRange(from, to, removeMark, mark, tr
|
|
146
78
|
// Ignored via go/ees005
|
|
147
79
|
// eslint-disable-next-line @typescript-eslint/max-params
|
|
@@ -197,8 +129,8 @@ export var entireSelectionContainsMark = function entireSelectionContainsMark(ma
|
|
|
197
129
|
return onlyContainsMark;
|
|
198
130
|
};
|
|
199
131
|
var toggleMarkInRange = function toggleMarkInRange(mark) {
|
|
200
|
-
return function (
|
|
201
|
-
var tr =
|
|
132
|
+
return function (_ref2) {
|
|
133
|
+
var tr = _ref2.tr;
|
|
202
134
|
if (tr.selection instanceof CellSelection) {
|
|
203
135
|
var _removeMark = true;
|
|
204
136
|
var cells = [];
|
|
@@ -243,8 +175,8 @@ var toggleMarkInRange = function toggleMarkInRange(mark) {
|
|
|
243
175
|
* @param attrs
|
|
244
176
|
*/
|
|
245
177
|
export var toggleMark = function toggleMark(markType, attrs) {
|
|
246
|
-
return function (
|
|
247
|
-
var tr =
|
|
178
|
+
return function (_ref3) {
|
|
179
|
+
var tr = _ref3.tr;
|
|
248
180
|
var mark = markType.create(attrs);
|
|
249
181
|
|
|
250
182
|
// For cursor selections we can use the default behaviour.
|
|
@@ -266,8 +198,8 @@ export var toggleMark = function toggleMark(markType, attrs) {
|
|
|
266
198
|
* A wrapper around ProseMirror removeMark and removeStoredMark, which handles mark removal in text, CellSelections and cursor stored marks.
|
|
267
199
|
*/
|
|
268
200
|
export var removeMark = function removeMark(mark) {
|
|
269
|
-
return function (
|
|
270
|
-
var tr =
|
|
201
|
+
return function (_ref4) {
|
|
202
|
+
var tr = _ref4.tr;
|
|
271
203
|
var selection = tr.selection;
|
|
272
204
|
if (selection instanceof CellSelection) {
|
|
273
205
|
selection.forEachCell(function (cell, cellPos) {
|
package/dist/esm/mark/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Disable no-re-export rule for entry point files
|
|
2
2
|
/* eslint-disable @atlaskit/editor/no-re-export */
|
|
3
3
|
|
|
4
|
-
export {
|
|
4
|
+
export { transformNonTextNodesToText, applyMarkOnRange, filterChildrenBetween, toggleMark, removeMark, entireSelectionContainsMark } from './commands';
|
|
5
5
|
export { anyMarkActive, isMarkAllowedInRange, isMarkExcluded } from './text-formatting';
|
|
@@ -19,5 +19,10 @@ export var mentionMessages = defineMessages({
|
|
|
19
19
|
id: 'fabric.editor.mentionNode.label',
|
|
20
20
|
defaultMessage: 'Tagged user',
|
|
21
21
|
description: 'Label to indicate mention node to Screen reader users, that preceeds with user name ex: "Tagged user @XXX'
|
|
22
|
+
},
|
|
23
|
+
unknownLabel: {
|
|
24
|
+
id: 'fabric.editor.unknown.label',
|
|
25
|
+
defaultMessage: 'Unknown',
|
|
26
|
+
description: 'Label to indicate unknown mention node'
|
|
22
27
|
}
|
|
23
28
|
});
|
|
@@ -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 = "
|
|
10
|
+
var packageVersion = "99.1.0";
|
|
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,10 +1,9 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
3
|
import { akEditorWrappedNodeZIndex } from '@atlaskit/editor-shared-styles';
|
|
4
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
4
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
6
5
|
export var embedCardStyles = function embedCardStyles() {
|
|
7
|
-
return
|
|
6
|
+
return css({
|
|
8
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
9
8
|
'.ProseMirror': {
|
|
10
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
@@ -27,26 +26,6 @@ export var embedCardStyles = function embedCardStyles() {
|
|
|
27
26
|
clear: 'both'
|
|
28
27
|
}
|
|
29
28
|
}
|
|
30
|
-
}) : css({
|
|
31
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
32
|
-
'.ProseMirror': {
|
|
33
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
34
|
-
".embedCardView-content-wrap[layout^='wrap-']": {
|
|
35
|
-
maxWidth: '100%'
|
|
36
|
-
},
|
|
37
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
38
|
-
".embedCardView-content-wrap[layout='wrap-left']": {
|
|
39
|
-
float: 'left'
|
|
40
|
-
},
|
|
41
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
42
|
-
".embedCardView-content-wrap[layout='wrap-right']": {
|
|
43
|
-
float: 'right'
|
|
44
|
-
},
|
|
45
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
46
|
-
".embedCardView-content-wrap[layout='wrap-right'] + .embedCardView-content-wrap[layout='wrap-left']": {
|
|
47
|
-
clear: 'both'
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
29
|
});
|
|
51
30
|
};
|
|
52
31
|
|
|
@@ -8,8 +8,8 @@ export var buttonGroupStyleBeforeVisualRefresh = css({
|
|
|
8
8
|
'& > div': {
|
|
9
9
|
display: 'flex'
|
|
10
10
|
},
|
|
11
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
12
|
-
button: {
|
|
11
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
12
|
+
'button:not(#local-media-upload-button)': {
|
|
13
13
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
14
14
|
'&:not([disabled])::after': {
|
|
15
15
|
border: 'none' // remove blue border when an item has been selected
|
|
@@ -25,8 +25,8 @@ export var buttonGroupStyle = css({
|
|
|
25
25
|
'& > div': {
|
|
26
26
|
display: 'flex'
|
|
27
27
|
},
|
|
28
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
29
|
-
button: {
|
|
28
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
29
|
+
'button:not(#local-media-upload-button)': {
|
|
30
30
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
31
31
|
'&:not([disabled])::after': {
|
|
32
32
|
border: 'none' // remove blue border when an item has been selected
|
|
@@ -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 = "
|
|
23
|
+
var packageVersion = "99.1.0";
|
|
24
24
|
var halfFocusRing = 1;
|
|
25
25
|
var dropOffset = '0, 8';
|
|
26
26
|
// Ignored via go/ees005
|
|
@@ -6,11 +6,6 @@ export declare function filterChildrenBetween(doc: PMNode, from: number, to: num
|
|
|
6
6
|
pos: number;
|
|
7
7
|
}[];
|
|
8
8
|
export declare function transformNonTextNodesToText(from: number, to: number, tr: Transaction): void;
|
|
9
|
-
/**
|
|
10
|
-
* @private
|
|
11
|
-
* @deprecated Use {@link transformNonTextNodesToText} instead.
|
|
12
|
-
*/
|
|
13
|
-
export declare const transformSmartCharsMentionsAndEmojis: (from: number, to: number, tr: Transaction) => void;
|
|
14
9
|
export declare const applyMarkOnRange: (from: number, to: number, removeMark: boolean, mark: Mark, tr: Transaction) => Transaction;
|
|
15
10
|
export declare const entireSelectionContainsMark: (mark: Mark | MarkType, doc: PMNode, fromPos: number, toPos: number) => boolean;
|
|
16
11
|
/**
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { transformNonTextNodesToText, applyMarkOnRange, filterChildrenBetween, toggleMark, removeMark, entireSelectionContainsMark, } from './commands';
|
|
2
2
|
export { anyMarkActive, isMarkAllowedInRange, isMarkExcluded } from './text-formatting';
|
|
@@ -6,11 +6,6 @@ export declare function filterChildrenBetween(doc: PMNode, from: number, to: num
|
|
|
6
6
|
pos: number;
|
|
7
7
|
}[];
|
|
8
8
|
export declare function transformNonTextNodesToText(from: number, to: number, tr: Transaction): void;
|
|
9
|
-
/**
|
|
10
|
-
* @private
|
|
11
|
-
* @deprecated Use {@link transformNonTextNodesToText} instead.
|
|
12
|
-
*/
|
|
13
|
-
export declare const transformSmartCharsMentionsAndEmojis: (from: number, to: number, tr: Transaction) => void;
|
|
14
9
|
export declare const applyMarkOnRange: (from: number, to: number, removeMark: boolean, mark: Mark, tr: Transaction) => Transaction;
|
|
15
10
|
export declare const entireSelectionContainsMark: (mark: Mark | MarkType, doc: PMNode, fromPos: number, toPos: number) => boolean;
|
|
16
11
|
/**
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { transformNonTextNodesToText, applyMarkOnRange, filterChildrenBetween, toggleMark, removeMark, entireSelectionContainsMark, } from './commands';
|
|
2
2
|
export { anyMarkActive, isMarkAllowedInRange, isMarkExcluded } from './text-formatting';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "99.1.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/"
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
"dependencies": {
|
|
114
114
|
"@atlaskit/activity-provider": "^2.5.0",
|
|
115
115
|
"@atlaskit/adf-schema": "^46.1.0",
|
|
116
|
-
"@atlaskit/adf-utils": "^19.
|
|
116
|
+
"@atlaskit/adf-utils": "^19.16.0",
|
|
117
117
|
"@atlaskit/analytics-listeners": "^8.13.0",
|
|
118
118
|
"@atlaskit/analytics-namespaced-context": "^6.12.0",
|
|
119
119
|
"@atlaskit/analytics-next": "^10.2.0",
|
|
@@ -124,12 +124,12 @@
|
|
|
124
124
|
"@atlaskit/custom-steps": "^0.9.0",
|
|
125
125
|
"@atlaskit/dropdown-menu": "^12.24.0",
|
|
126
126
|
"@atlaskit/editor-json-transformer": "^8.21.0",
|
|
127
|
-
"@atlaskit/editor-palette": "1.6.
|
|
127
|
+
"@atlaskit/editor-palette": "1.6.4",
|
|
128
128
|
"@atlaskit/editor-prosemirror": "6.2.1",
|
|
129
129
|
"@atlaskit/editor-shared-styles": "^3.2.0",
|
|
130
130
|
"@atlaskit/editor-tables": "^2.8.0",
|
|
131
131
|
"@atlaskit/emoji": "^67.12.0",
|
|
132
|
-
"@atlaskit/icon": "^23.
|
|
132
|
+
"@atlaskit/icon": "^23.3.0",
|
|
133
133
|
"@atlaskit/icon-object": "^6.9.0",
|
|
134
134
|
"@atlaskit/link-datasource": "^3.15.0",
|
|
135
135
|
"@atlaskit/link-picker": "^1.47.0",
|
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
"@atlaskit/media-file-preview": "^0.9.0",
|
|
141
141
|
"@atlaskit/media-picker": "^67.0.0",
|
|
142
142
|
"@atlaskit/media-ui": "^27.3.0",
|
|
143
|
-
"@atlaskit/media-viewer": "49.6.
|
|
143
|
+
"@atlaskit/media-viewer": "49.6.1",
|
|
144
144
|
"@atlaskit/mention": "^23.7.0",
|
|
145
145
|
"@atlaskit/menu": "^2.13.0",
|
|
146
146
|
"@atlaskit/onboarding": "^12.2.0",
|
|
@@ -149,13 +149,13 @@
|
|
|
149
149
|
"@atlaskit/primitives": "^13.3.0",
|
|
150
150
|
"@atlaskit/profilecard": "^21.1.0",
|
|
151
151
|
"@atlaskit/section-message": "^6.8.0",
|
|
152
|
-
"@atlaskit/smart-card": "^34.
|
|
152
|
+
"@atlaskit/smart-card": "^34.1.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
157
|
"@atlaskit/tmp-editor-statsig": "^2.33.0",
|
|
158
|
-
"@atlaskit/tokens": "^
|
|
158
|
+
"@atlaskit/tokens": "^3.0.0",
|
|
159
159
|
"@atlaskit/tooltip": "^19.0.0",
|
|
160
160
|
"@atlaskit/width-detector": "^4.3.0",
|
|
161
161
|
"@babel/runtime": "^7.0.0",
|
|
@@ -278,9 +278,6 @@
|
|
|
278
278
|
"platform-visual-refresh-icons": {
|
|
279
279
|
"type": "boolean"
|
|
280
280
|
},
|
|
281
|
-
"platform_editor_element_dnd_nested_fix_patch_3": {
|
|
282
|
-
"type": "boolean"
|
|
283
|
-
},
|
|
284
281
|
"platform_editor_reduce_element_browser_padding": {
|
|
285
282
|
"type": "boolean"
|
|
286
283
|
},
|