@atlaskit/editor-core 190.1.20 → 190.1.23
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 +7 -0
- package/afm-cc/tsconfig.json +3 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/plugins/index.js +0 -7
- package/dist/cjs/plugins/paste/pm-plugins/main.js +14 -10
- package/dist/cjs/presets/default.js +2 -2
- package/dist/cjs/presets/universal.js +2 -1
- package/dist/cjs/utils/index.js +12 -18
- package/dist/cjs/utils/performance/measure-enum.js +1 -2
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/index.js +14 -1
- package/dist/es2019/plugins/index.js +0 -1
- package/dist/es2019/plugins/paste/pm-plugins/main.js +11 -5
- package/dist/es2019/presets/default.js +1 -1
- package/dist/es2019/presets/universal.js +2 -1
- package/dist/es2019/utils/index.js +0 -7
- package/dist/es2019/utils/performance/measure-enum.js +1 -2
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/index.js +14 -1
- package/dist/esm/plugins/index.js +0 -1
- package/dist/esm/plugins/paste/pm-plugins/main.js +9 -5
- package/dist/esm/presets/default.js +1 -1
- package/dist/esm/presets/universal.js +2 -1
- package/dist/esm/utils/index.js +0 -5
- package/dist/esm/utils/performance/measure-enum.js +1 -2
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/index.d.ts +15 -2
- package/dist/types/plugins/index.d.ts +0 -1
- package/dist/types/plugins/paste/pm-plugins/main.d.ts +2 -0
- package/dist/types/presets/default.d.ts +1 -1
- package/dist/types/types/editor-props.d.ts +1 -1
- package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +2 -2
- package/dist/types/ui/ContentStyles/index.d.ts +2 -2
- package/dist/types/utils/index.d.ts +0 -1
- package/dist/types/utils/performance/measure-enum.d.ts +0 -1
- package/dist/types-ts4.5/index.d.ts +15 -2
- package/dist/types-ts4.5/plugins/index.d.ts +0 -1
- package/dist/types-ts4.5/plugins/paste/pm-plugins/main.d.ts +2 -0
- package/dist/types-ts4.5/presets/default.d.ts +1 -1
- package/dist/types-ts4.5/types/editor-props.d.ts +1 -1
- package/dist/types-ts4.5/ui/Appearance/FullPage/StyledComponents.d.ts +2 -2
- package/dist/types-ts4.5/ui/ContentStyles/index.d.ts +2 -2
- package/dist/types-ts4.5/utils/index.d.ts +0 -1
- package/dist/types-ts4.5/utils/performance/measure-enum.d.ts +0 -1
- package/package.json +5 -3
- package/dist/cjs/plugins/annotation/commands/index.js +0 -150
- package/dist/cjs/plugins/annotation/commands/transform.js +0 -86
- package/dist/cjs/plugins/annotation/index.js +0 -130
- package/dist/cjs/plugins/annotation/nodeviews/index.js +0 -59
- package/dist/cjs/plugins/annotation/pm-plugins/inline-comment.js +0 -243
- package/dist/cjs/plugins/annotation/pm-plugins/keymap.js +0 -15
- package/dist/cjs/plugins/annotation/pm-plugins/plugin-factory.js +0 -107
- package/dist/cjs/plugins/annotation/pm-plugins/reducer.js +0 -84
- package/dist/cjs/plugins/annotation/pm-plugins/types.js +0 -17
- package/dist/cjs/plugins/annotation/toolbar.js +0 -59
- package/dist/cjs/plugins/annotation/types.js +0 -20
- package/dist/cjs/plugins/annotation/ui/AnnotationViewWrapper.js +0 -38
- package/dist/cjs/plugins/annotation/ui/InlineCommentView.js +0 -149
- package/dist/cjs/plugins/annotation/update-provider.js +0 -36
- package/dist/cjs/plugins/annotation/utils.js +0 -372
- package/dist/es2019/plugins/annotation/commands/index.js +0 -123
- package/dist/es2019/plugins/annotation/commands/transform.js +0 -64
- package/dist/es2019/plugins/annotation/index.js +0 -125
- package/dist/es2019/plugins/annotation/nodeviews/index.js +0 -31
- package/dist/es2019/plugins/annotation/pm-plugins/inline-comment.js +0 -178
- package/dist/es2019/plugins/annotation/pm-plugins/keymap.js +0 -9
- package/dist/es2019/plugins/annotation/pm-plugins/plugin-factory.js +0 -108
- package/dist/es2019/plugins/annotation/pm-plugins/reducer.js +0 -94
- package/dist/es2019/plugins/annotation/pm-plugins/types.js +0 -11
- package/dist/es2019/plugins/annotation/toolbar.js +0 -53
- package/dist/es2019/plugins/annotation/types.js +0 -14
- package/dist/es2019/plugins/annotation/ui/AnnotationViewWrapper.js +0 -14
- package/dist/es2019/plugins/annotation/ui/InlineCommentView.js +0 -147
- package/dist/es2019/plugins/annotation/update-provider.js +0 -9
- package/dist/es2019/plugins/annotation/utils.js +0 -334
- package/dist/esm/plugins/annotation/commands/index.js +0 -143
- package/dist/esm/plugins/annotation/commands/transform.js +0 -80
- package/dist/esm/plugins/annotation/index.js +0 -118
- package/dist/esm/plugins/annotation/nodeviews/index.js +0 -52
- package/dist/esm/plugins/annotation/pm-plugins/inline-comment.js +0 -236
- package/dist/esm/plugins/annotation/pm-plugins/keymap.js +0 -9
- package/dist/esm/plugins/annotation/pm-plugins/plugin-factory.js +0 -101
- package/dist/esm/plugins/annotation/pm-plugins/reducer.js +0 -77
- package/dist/esm/plugins/annotation/pm-plugins/types.js +0 -11
- package/dist/esm/plugins/annotation/toolbar.js +0 -52
- package/dist/esm/plugins/annotation/types.js +0 -14
- package/dist/esm/plugins/annotation/ui/AnnotationViewWrapper.js +0 -31
- package/dist/esm/plugins/annotation/ui/InlineCommentView.js +0 -144
- package/dist/esm/plugins/annotation/update-provider.js +0 -29
- package/dist/esm/plugins/annotation/utils.js +0 -345
- package/dist/types/plugins/annotation/commands/index.d.ts +0 -15
- package/dist/types/plugins/annotation/commands/transform.d.ts +0 -11
- package/dist/types/plugins/annotation/index.d.ts +0 -15
- package/dist/types/plugins/annotation/nodeviews/index.d.ts +0 -11
- package/dist/types/plugins/annotation/pm-plugins/inline-comment.d.ts +0 -3
- package/dist/types/plugins/annotation/pm-plugins/keymap.d.ts +0 -3
- package/dist/types/plugins/annotation/pm-plugins/plugin-factory.d.ts +0 -2
- package/dist/types/plugins/annotation/pm-plugins/reducer.d.ts +0 -3
- package/dist/types/plugins/annotation/pm-plugins/types.d.ts +0 -78
- package/dist/types/plugins/annotation/toolbar.d.ts +0 -5
- package/dist/types/plugins/annotation/types.d.ts +0 -86
- package/dist/types/plugins/annotation/ui/AnnotationViewWrapper.d.ts +0 -10
- package/dist/types/plugins/annotation/ui/InlineCommentView.d.ts +0 -13
- package/dist/types/plugins/annotation/update-provider.d.ts +0 -12
- package/dist/types/plugins/annotation/utils.d.ts +0 -45
- package/dist/types-ts4.5/plugins/annotation/commands/index.d.ts +0 -15
- package/dist/types-ts4.5/plugins/annotation/commands/transform.d.ts +0 -11
- package/dist/types-ts4.5/plugins/annotation/index.d.ts +0 -17
- package/dist/types-ts4.5/plugins/annotation/nodeviews/index.d.ts +0 -11
- package/dist/types-ts4.5/plugins/annotation/pm-plugins/inline-comment.d.ts +0 -3
- package/dist/types-ts4.5/plugins/annotation/pm-plugins/keymap.d.ts +0 -3
- package/dist/types-ts4.5/plugins/annotation/pm-plugins/plugin-factory.d.ts +0 -2
- package/dist/types-ts4.5/plugins/annotation/pm-plugins/reducer.d.ts +0 -3
- package/dist/types-ts4.5/plugins/annotation/pm-plugins/types.d.ts +0 -78
- package/dist/types-ts4.5/plugins/annotation/toolbar.d.ts +0 -5
- package/dist/types-ts4.5/plugins/annotation/types.d.ts +0 -86
- package/dist/types-ts4.5/plugins/annotation/ui/AnnotationViewWrapper.d.ts +0 -10
- package/dist/types-ts4.5/plugins/annotation/ui/InlineCommentView.d.ts +0 -13
- package/dist/types-ts4.5/plugins/annotation/update-provider.d.ts +0 -12
- package/dist/types-ts4.5/plugins/annotation/utils.d.ts +0 -45
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 190.1.23
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#63348](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/63348) [`2d6eebf2ed74`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/2d6eebf2ed74) - Extract annotation plugin from editor-core to @atlaskit/editor-plugin-annotation.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
3
10
|
## 190.1.20
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
package/afm-cc/tsconfig.json
CHANGED
package/dist/cjs/index.js
CHANGED
|
@@ -172,7 +172,7 @@ var _ContextPanel = _interopRequireDefault(require("./ui/ContextPanel"));
|
|
|
172
172
|
var _resource = require("@atlaskit/emoji/resource");
|
|
173
173
|
var _resource2 = require("@atlaskit/mention/resource");
|
|
174
174
|
var _teamResource = require("@atlaskit/mention/team-resource");
|
|
175
|
-
var _annotation = require("
|
|
175
|
+
var _annotation = require("@atlaskit/editor-common/annotation");
|
|
176
176
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
177
177
|
var _utils = require("./utils");
|
|
178
178
|
var _actions = _interopRequireDefault(require("./actions"));
|
|
@@ -4,12 +4,6 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
Object.defineProperty(exports, "annotationPlugin", {
|
|
8
|
-
enumerable: true,
|
|
9
|
-
get: function get() {
|
|
10
|
-
return _annotation.default;
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
7
|
Object.defineProperty(exports, "avatarGroupPlugin", {
|
|
14
8
|
enumerable: true,
|
|
15
9
|
get: function get() {
|
|
@@ -62,7 +56,6 @@ var _collabEdit = _interopRequireDefault(require("./collab-edit"));
|
|
|
62
56
|
var _extension = _interopRequireDefault(require("./extension"));
|
|
63
57
|
var _jiraIssue = _interopRequireDefault(require("./jira-issue"));
|
|
64
58
|
var _paste = _interopRequireDefault(require("./paste"));
|
|
65
|
-
var _annotation = _interopRequireDefault(require("./annotation"));
|
|
66
59
|
var _feedbackDialog = _interopRequireDefault(require("./feedback-dialog"));
|
|
67
60
|
var _findReplace = _interopRequireDefault(require("./find-replace"));
|
|
68
61
|
var _avatarGroup = _interopRequireDefault(require("./avatar-group"));
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.createPlugin = createPlugin;
|
|
8
|
+
exports.isInsideBlockQuote = void 0;
|
|
8
9
|
Object.defineProperty(exports, "stateKey", {
|
|
9
10
|
enumerable: true,
|
|
10
11
|
get: function get() {
|
|
@@ -28,16 +29,18 @@ var _util = require("../util");
|
|
|
28
29
|
var _transforms = require("@atlaskit/editor-common/transforms");
|
|
29
30
|
var _handlers = require("../handlers");
|
|
30
31
|
var _analytics2 = require("./analytics");
|
|
31
|
-
var
|
|
32
|
+
var _coreUtils = require("@atlaskit/editor-common/core-utils");
|
|
32
33
|
var _commands = require("../commands");
|
|
33
|
-
var _utils4 = require("../../annotation/utils");
|
|
34
34
|
var _clipboardTextSerializer = require("./clipboard-text-serializer");
|
|
35
35
|
var _tinyMCE = require("../util/tinyMCE");
|
|
36
36
|
var _pluginFactory = require("./plugin-factory");
|
|
37
|
-
var
|
|
37
|
+
var _utils3 = require("@atlaskit/editor-prosemirror/utils");
|
|
38
38
|
var _actions = require("../actions");
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
var isInsideBlockQuote = exports.isInsideBlockQuote = function isInsideBlockQuote(state) {
|
|
40
|
+
var blockquote = state.schema.nodes.blockquote;
|
|
41
|
+
return (0, _utils3.hasParentNodeOfType)(blockquote)(state.selection);
|
|
42
|
+
};
|
|
43
|
+
var PASTE = 'Editor Paste Plugin Paste Duration';
|
|
41
44
|
function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pluginInjectionApi, cardOptions, sanitizePrivateContent, providerFactory) {
|
|
42
45
|
var _pluginInjectionApi$a;
|
|
43
46
|
var editorAnalyticsAPI = pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a === void 0 ? void 0 : _pluginInjectionApi$a.actions;
|
|
@@ -180,7 +183,7 @@ function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pl
|
|
|
180
183
|
if (pasteTrackingEnabled) {
|
|
181
184
|
var content = (0, _analytics2.getContentNodeTypes)(slice.content);
|
|
182
185
|
var pasteId = (0, _uuid.default)();
|
|
183
|
-
var measureName = "".concat(
|
|
186
|
+
var measureName = "".concat(PASTE, "_").concat(pasteId);
|
|
184
187
|
(0, _utils.measureRender)(measureName, function (_ref) {
|
|
185
188
|
var duration = _ref.duration,
|
|
186
189
|
distortedDuration = _ref.distortedDuration;
|
|
@@ -207,7 +210,7 @@ function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pl
|
|
|
207
210
|
// Don't add closeHistory if we're pasting over layout columns, as we will appendTransaction
|
|
208
211
|
// to cleanup the layout's structure and we want to keep the paste and re-structuring as
|
|
209
212
|
// one event.
|
|
210
|
-
var isPastingOverLayoutColumns = (0,
|
|
213
|
+
var isPastingOverLayoutColumns = (0, _utils3.hasParentNodeOfType)(state.schema.nodes.layoutColumn)(state.selection);
|
|
211
214
|
|
|
212
215
|
// don't add closeHistory call if we're pasting a table, as some tables may involve additional
|
|
213
216
|
// appendedTransactions to repair them (if they're partial or incomplete) and we don't want
|
|
@@ -323,7 +326,7 @@ function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pl
|
|
|
323
326
|
}
|
|
324
327
|
return (0, _analytics2.handleMarkdownWithAnalytics)(view, event, markdownSlice, pluginInjectionApi)(state, dispatch);
|
|
325
328
|
}
|
|
326
|
-
if (isRichText &&
|
|
329
|
+
if (isRichText && isInsideBlockQuote(state)) {
|
|
327
330
|
//If pasting inside blockquote
|
|
328
331
|
//Skip the blockquote node and keep remaining nodes as they are
|
|
329
332
|
var blockquote = schema.nodes.blockquote;
|
|
@@ -370,7 +373,8 @@ function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pl
|
|
|
370
373
|
// remove annotation marks from the pasted data if they are not present in the document
|
|
371
374
|
// for the cases when they are pasted from external pages
|
|
372
375
|
if (slice.content.size && (0, _utils.containsAnyAnnotations)(slice, state)) {
|
|
373
|
-
|
|
376
|
+
var _pluginInjectionApi$a3;
|
|
377
|
+
pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a3 = pluginInjectionApi.annotation) === null || _pluginInjectionApi$a3 === void 0 || _pluginInjectionApi$a3.actions.stripNonExistingAnnotations(slice, state);
|
|
374
378
|
}
|
|
375
379
|
|
|
376
380
|
// ED-4732
|
|
@@ -397,7 +401,7 @@ function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pl
|
|
|
397
401
|
if ((0, _analytics2.handleExpandWithAnalytics)(editorAnalyticsAPI)(view, event, slice)(state, dispatch)) {
|
|
398
402
|
return true;
|
|
399
403
|
}
|
|
400
|
-
if (!(0,
|
|
404
|
+
if (!(0, _coreUtils.insideTable)(state)) {
|
|
401
405
|
slice = (0, _transforms.transformSliceNestedExpandToExpand)(slice, state.schema);
|
|
402
406
|
}
|
|
403
407
|
|
|
@@ -25,7 +25,7 @@ var _editorPluginFloatingToolbar = require("@atlaskit/editor-plugin-floating-too
|
|
|
25
25
|
var _editorPluginClipboard = require("@atlaskit/editor-plugin-clipboard");
|
|
26
26
|
var _editorPluginAnalytics = require("@atlaskit/editor-plugin-analytics");
|
|
27
27
|
var _editorPluginPlaceholder = require("@atlaskit/editor-plugin-placeholder");
|
|
28
|
-
var
|
|
28
|
+
var _editorPluginAnnotation = require("@atlaskit/editor-plugin-annotation");
|
|
29
29
|
var _editorPluginComposition = require("@atlaskit/editor-plugin-composition");
|
|
30
30
|
var _editorPluginQuickInsert = require("@atlaskit/editor-plugin-quick-insert");
|
|
31
31
|
var _editorPluginSelection = require("@atlaskit/editor-plugin-selection");
|
|
@@ -61,7 +61,7 @@ function createDefaultPreset(options) {
|
|
|
61
61
|
return builder.add(p);
|
|
62
62
|
}
|
|
63
63
|
return builder;
|
|
64
|
-
}).add([_editorPluginBlockType.blockTypePlugin, options.blockType]).add(_editorPluginClearMarksOnEmptyDoc.clearMarksOnEmptyDocPlugin).maybeAdd(
|
|
64
|
+
}).add([_editorPluginBlockType.blockTypePlugin, options.blockType]).add(_editorPluginClearMarksOnEmptyDoc.clearMarksOnEmptyDocPlugin).maybeAdd(_editorPluginAnnotation.annotationPlugin, function (p, builder) {
|
|
65
65
|
if (options.annotationProviders) {
|
|
66
66
|
return builder.add([p, options.annotationProviders]);
|
|
67
67
|
}
|
|
@@ -46,6 +46,7 @@ var _editorPluginToolbarListsIndentation = require("@atlaskit/editor-plugin-tool
|
|
|
46
46
|
var _editorPluginCustomAutoformat = require("@atlaskit/editor-plugin-custom-autoformat");
|
|
47
47
|
var _editorPluginAlignment = require("@atlaskit/editor-plugin-alignment");
|
|
48
48
|
var _editorPluginDataConsumer = require("@atlaskit/editor-plugin-data-consumer");
|
|
49
|
+
var _editorPluginAnnotation = require("@atlaskit/editor-plugin-annotation");
|
|
49
50
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
50
51
|
var _plugins = require("../plugins");
|
|
51
52
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
@@ -283,7 +284,7 @@ function createUniversalPreset(appearance, props, featureFlags, prevAppearance,
|
|
|
283
284
|
}]);
|
|
284
285
|
}
|
|
285
286
|
return builder;
|
|
286
|
-
}).maybeAdd(
|
|
287
|
+
}).maybeAdd(_editorPluginAnnotation.annotationPlugin, function (plugin, builder) {
|
|
287
288
|
// See default list for when adding annotations with a provider
|
|
288
289
|
if (!props.annotationProviders && props.allowConfluenceInlineComment) {
|
|
289
290
|
return builder.add([plugin, undefined]);
|
package/dist/cjs/utils/index.js
CHANGED
|
@@ -13,7 +13,7 @@ Object.defineProperty(exports, "SetAttrsStep", {
|
|
|
13
13
|
Object.defineProperty(exports, "checkNodeDown", {
|
|
14
14
|
enumerable: true,
|
|
15
15
|
get: function get() {
|
|
16
|
-
return
|
|
16
|
+
return _utils.checkNodeDown;
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "getNodesCount", {
|
|
@@ -32,32 +32,31 @@ Object.defineProperty(exports, "insideTable", {
|
|
|
32
32
|
Object.defineProperty(exports, "insideTableCell", {
|
|
33
33
|
enumerable: true,
|
|
34
34
|
get: function get() {
|
|
35
|
-
return
|
|
35
|
+
return _utils.insideTableCell;
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
38
|
Object.defineProperty(exports, "isElementInTableCell", {
|
|
39
39
|
enumerable: true,
|
|
40
40
|
get: function get() {
|
|
41
|
-
return
|
|
41
|
+
return _utils.isElementInTableCell;
|
|
42
42
|
}
|
|
43
43
|
});
|
|
44
44
|
Object.defineProperty(exports, "isEmptyNode", {
|
|
45
45
|
enumerable: true,
|
|
46
46
|
get: function get() {
|
|
47
|
-
return
|
|
47
|
+
return _utils.isEmptyNode;
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
50
|
Object.defineProperty(exports, "isInListItem", {
|
|
51
51
|
enumerable: true,
|
|
52
52
|
get: function get() {
|
|
53
|
-
return
|
|
53
|
+
return _utils.isInListItem;
|
|
54
54
|
}
|
|
55
55
|
});
|
|
56
|
-
exports.isInsideBlockQuote = void 0;
|
|
57
56
|
Object.defineProperty(exports, "isLastItemMediaGroup", {
|
|
58
57
|
enumerable: true,
|
|
59
58
|
get: function get() {
|
|
60
|
-
return
|
|
59
|
+
return _utils.isLastItemMediaGroup;
|
|
61
60
|
}
|
|
62
61
|
});
|
|
63
62
|
Object.defineProperty(exports, "isLinkMark", {
|
|
@@ -76,7 +75,7 @@ Object.defineProperty(exports, "isParagraph", {
|
|
|
76
75
|
Object.defineProperty(exports, "isSelectionInsideLastNodeInDocument", {
|
|
77
76
|
enumerable: true,
|
|
78
77
|
get: function get() {
|
|
79
|
-
return
|
|
78
|
+
return _utils.isSelectionInsideLastNodeInDocument;
|
|
80
79
|
}
|
|
81
80
|
});
|
|
82
81
|
exports.isTemporary = void 0;
|
|
@@ -89,7 +88,7 @@ Object.defineProperty(exports, "isText", {
|
|
|
89
88
|
Object.defineProperty(exports, "isTextSelection", {
|
|
90
89
|
enumerable: true,
|
|
91
90
|
get: function get() {
|
|
92
|
-
return
|
|
91
|
+
return _utils.isTextSelection;
|
|
93
92
|
}
|
|
94
93
|
});
|
|
95
94
|
Object.defineProperty(exports, "measurements", {
|
|
@@ -101,7 +100,7 @@ Object.defineProperty(exports, "measurements", {
|
|
|
101
100
|
Object.defineProperty(exports, "nodeToJSON", {
|
|
102
101
|
enumerable: true,
|
|
103
102
|
get: function get() {
|
|
104
|
-
return
|
|
103
|
+
return _utils.nodeToJSON;
|
|
105
104
|
}
|
|
106
105
|
});
|
|
107
106
|
Object.defineProperty(exports, "nodesBetweenChanged", {
|
|
@@ -113,7 +112,7 @@ Object.defineProperty(exports, "nodesBetweenChanged", {
|
|
|
113
112
|
Object.defineProperty(exports, "nonNullable", {
|
|
114
113
|
enumerable: true,
|
|
115
114
|
get: function get() {
|
|
116
|
-
return
|
|
115
|
+
return _utils.nonNullable;
|
|
117
116
|
}
|
|
118
117
|
});
|
|
119
118
|
Object.defineProperty(exports, "setNodeSelection", {
|
|
@@ -133,13 +132,12 @@ exports.sum = sum;
|
|
|
133
132
|
Object.defineProperty(exports, "toJSON", {
|
|
134
133
|
enumerable: true,
|
|
135
134
|
get: function get() {
|
|
136
|
-
return
|
|
135
|
+
return _utils.toJSON;
|
|
137
136
|
}
|
|
138
137
|
});
|
|
139
138
|
exports.whichTransitionEvent = whichTransitionEvent;
|
|
140
139
|
var _commands = require("@atlaskit/editor-prosemirror/commands");
|
|
141
|
-
var _utils = require("@atlaskit/editor-
|
|
142
|
-
var _utils2 = require("@atlaskit/editor-common/utils");
|
|
140
|
+
var _utils = require("@atlaskit/editor-common/utils");
|
|
143
141
|
var _coreUtils = require("@atlaskit/editor-common/core-utils");
|
|
144
142
|
var _document = require("./document");
|
|
145
143
|
var _nodes = require("./nodes");
|
|
@@ -234,10 +232,6 @@ var isTemporary = exports.isTemporary = function isTemporary(id) {
|
|
|
234
232
|
var hasOpenEnd = exports.hasOpenEnd = function hasOpenEnd(slice) {
|
|
235
233
|
return slice.openStart > 0 || slice.openEnd > 0;
|
|
236
234
|
};
|
|
237
|
-
var isInsideBlockQuote = exports.isInsideBlockQuote = function isInsideBlockQuote(state) {
|
|
238
|
-
var blockquote = state.schema.nodes.blockquote;
|
|
239
|
-
return (0, _utils.hasParentNodeOfType)(blockquote)(state.selection);
|
|
240
|
-
};
|
|
241
235
|
function sum(arr, f) {
|
|
242
236
|
return arr.reduce(function (val, x) {
|
|
243
237
|
return val + f(x);
|
|
@@ -8,6 +8,5 @@ var _default = exports.default = {
|
|
|
8
8
|
EDITOR_MOUNTED: 'Editor Component Mount Time',
|
|
9
9
|
PROSEMIRROR_RENDERED: 'ProseMirror Render Time',
|
|
10
10
|
PROSEMIRROR_CONTENT_RENDERED: 'ProseMirror Content Render Time',
|
|
11
|
-
ON_EDITOR_READY_CALLBACK: 'onEditorReady Callback Duration'
|
|
12
|
-
PASTE: 'Editor Paste Plugin Paste Duration'
|
|
11
|
+
ON_EDITOR_READY_CALLBACK: 'onEditorReady Callback Duration'
|
|
13
12
|
};
|
package/dist/es2019/index.js
CHANGED
|
@@ -11,7 +11,20 @@ export { default as ContextPanel } from './ui/ContextPanel';
|
|
|
11
11
|
export { EmojiResource } from '@atlaskit/emoji/resource';
|
|
12
12
|
export { MentionResource } from '@atlaskit/mention/resource';
|
|
13
13
|
export { TeamMentionResource } from '@atlaskit/mention/team-resource';
|
|
14
|
-
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated
|
|
16
|
+
* DO NOT USE THIS WILL BE REMOVED SOON AND IS UNSAFE.
|
|
17
|
+
* This is here while we work to extract the annotation plugin.
|
|
18
|
+
* Please use the export from `@atlaskit/editor-common/annotation`.
|
|
19
|
+
*/
|
|
20
|
+
export { AnnotationUpdateEmitter } from '@atlaskit/editor-common/annotation';
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated
|
|
24
|
+
* DO NOT USE THIS WILL BE REMOVED SOON AND IS UNSAFE.
|
|
25
|
+
* This is here while we work to extract the annotation plugin.
|
|
26
|
+
* Please use the export from `@atlaskit/editor-plugin-annotation`.
|
|
27
|
+
*/
|
|
15
28
|
|
|
16
29
|
// Used in mobile bridge
|
|
17
30
|
|
|
@@ -2,7 +2,6 @@ export { default as collabEditPlugin } from './collab-edit';
|
|
|
2
2
|
export { default as extensionPlugin } from './extension';
|
|
3
3
|
export { default as jiraIssuePlugin } from './jira-issue';
|
|
4
4
|
export { default as pastePlugin } from './paste';
|
|
5
|
-
export { default as annotationPlugin } from './annotation';
|
|
6
5
|
export { default as feedbackDialogPlugin } from './feedback-dialog';
|
|
7
6
|
export { default as findReplacePlugin } from './find-replace';
|
|
8
7
|
export { default as avatarGroupPlugin } from './avatar-group';
|
|
@@ -13,16 +13,21 @@ import { escapeLinks, htmlContainsSingleFile, isPastedFromWord, isPastedFromExce
|
|
|
13
13
|
import { transformSliceNestedExpandToExpand, transformSliceToJoinAdjacentCodeBlocks, transformSingleLineCodeBlockToCodeMark, transformSliceToDecisionList } from '@atlaskit/editor-common/transforms';
|
|
14
14
|
import { handleMacroAutoConvert, handleMention, handleParagraphBlockMarks } from '../handlers';
|
|
15
15
|
import { createPasteMeasurePayload, getContentNodeTypes, handlePasteAsPlainTextWithAnalytics, handlePasteIntoTaskAndDecisionWithAnalytics, handleCodeBlockWithAnalytics, handleMediaSingleWithAnalytics, handlePastePreservingMarksWithAnalytics, handleMarkdownWithAnalytics, handleRichTextWithAnalytics, handleExpandWithAnalytics, handleSelectedTableWithAnalytics, handlePasteLinkOnSelectedTextWithAnalytics, sendPasteAnalyticsEvent, handlePasteIntoCaptionWithAnalytics, handlePastePanelOrDecisionIntoListWithAnalytics, handlePasteNonNestableBlockNodesIntoListWithAnalytics } from './analytics';
|
|
16
|
-
import {
|
|
16
|
+
import { insideTable } from '@atlaskit/editor-common/core-utils';
|
|
17
17
|
import { upgradeTextToLists, splitParagraphs } from '../commands';
|
|
18
|
-
// TODO: ED-20519 It requires annotation extraction to use the plugin injection API
|
|
19
|
-
import { stripNonExistingAnnotations } from '../../annotation/utils';
|
|
20
18
|
import { clipboardTextSerializer } from './clipboard-text-serializer';
|
|
21
19
|
import { htmlHasIncompleteTable, tryRebuildCompleteTableHtml, isPastedFromTinyMCEConfluence } from '../util/tinyMCE';
|
|
22
20
|
import { pluginKey as stateKey, createPluginState } from './plugin-factory';
|
|
23
21
|
export { pluginKey as stateKey } from './plugin-factory';
|
|
24
22
|
import { hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
25
23
|
import { PastePluginActionTypes } from '../actions';
|
|
24
|
+
export const isInsideBlockQuote = state => {
|
|
25
|
+
const {
|
|
26
|
+
blockquote
|
|
27
|
+
} = state.schema.nodes;
|
|
28
|
+
return hasParentNodeOfType(blockquote)(state.selection);
|
|
29
|
+
};
|
|
30
|
+
const PASTE = 'Editor Paste Plugin Paste Duration';
|
|
26
31
|
export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pluginInjectionApi, cardOptions, sanitizePrivateContent, providerFactory) {
|
|
27
32
|
var _pluginInjectionApi$a;
|
|
28
33
|
const editorAnalyticsAPI = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a === void 0 ? void 0 : _pluginInjectionApi$a.actions;
|
|
@@ -144,7 +149,7 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
|
|
|
144
149
|
if (pasteTrackingEnabled) {
|
|
145
150
|
const content = getContentNodeTypes(slice.content);
|
|
146
151
|
const pasteId = uuid();
|
|
147
|
-
const measureName = `${
|
|
152
|
+
const measureName = `${PASTE}_${pasteId}`;
|
|
148
153
|
measureRender(measureName, ({
|
|
149
154
|
duration,
|
|
150
155
|
distortedDuration
|
|
@@ -339,7 +344,8 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
|
|
|
339
344
|
// remove annotation marks from the pasted data if they are not present in the document
|
|
340
345
|
// for the cases when they are pasted from external pages
|
|
341
346
|
if (slice.content.size && containsAnyAnnotations(slice, state)) {
|
|
342
|
-
|
|
347
|
+
var _pluginInjectionApi$a4;
|
|
348
|
+
pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a4 = pluginInjectionApi.annotation) === null || _pluginInjectionApi$a4 === void 0 ? void 0 : _pluginInjectionApi$a4.actions.stripNonExistingAnnotations(slice, state);
|
|
343
349
|
}
|
|
344
350
|
|
|
345
351
|
// ED-4732
|
|
@@ -19,7 +19,7 @@ import { floatingToolbarPlugin } from '@atlaskit/editor-plugin-floating-toolbar'
|
|
|
19
19
|
import { clipboardPlugin } from '@atlaskit/editor-plugin-clipboard';
|
|
20
20
|
import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
21
21
|
import { placeholderPlugin } from '@atlaskit/editor-plugin-placeholder';
|
|
22
|
-
import annotationPlugin from '
|
|
22
|
+
import { annotationPlugin } from '@atlaskit/editor-plugin-annotation';
|
|
23
23
|
import { compositionPlugin } from '@atlaskit/editor-plugin-composition';
|
|
24
24
|
import { quickInsertPlugin } from '@atlaskit/editor-plugin-quick-insert';
|
|
25
25
|
import { selectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
@@ -36,8 +36,9 @@ import { toolbarListsIndentationPlugin } from '@atlaskit/editor-plugin-toolbar-l
|
|
|
36
36
|
import { customAutoformatPlugin } from '@atlaskit/editor-plugin-custom-autoformat';
|
|
37
37
|
import { alignmentPlugin } from '@atlaskit/editor-plugin-alignment';
|
|
38
38
|
import { dataConsumerPlugin } from '@atlaskit/editor-plugin-data-consumer';
|
|
39
|
+
import { annotationPlugin } from '@atlaskit/editor-plugin-annotation';
|
|
39
40
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
40
|
-
import {
|
|
41
|
+
import { avatarGroupPlugin, beforePrimaryToolbarPlugin, collabEditPlugin, extensionPlugin, feedbackDialogPlugin, findReplacePlugin, jiraIssuePlugin } from '../plugins';
|
|
41
42
|
import { shouldForceTracking } from '@atlaskit/editor-common/utils';
|
|
42
43
|
import { isFullPage as fullPageCheck } from '../utils/is-full-page';
|
|
43
44
|
import { createDefaultPreset } from './default';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { toggleMark } from '@atlaskit/editor-prosemirror/commands';
|
|
2
|
-
import { hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
3
2
|
export { isEmptyNode, isSelectionInsideLastNodeInDocument, checkNodeDown, insideTableCell, isInListItem, toJSON, nodeToJSON } from '@atlaskit/editor-common/utils';
|
|
4
3
|
export { insideTable } from '@atlaskit/editor-common/core-utils';
|
|
5
4
|
export { nodesBetweenChanged, getNodesCount } from './document';
|
|
@@ -94,12 +93,6 @@ export const isTemporary = id => {
|
|
|
94
93
|
export const hasOpenEnd = slice => {
|
|
95
94
|
return slice.openStart > 0 || slice.openEnd > 0;
|
|
96
95
|
};
|
|
97
|
-
export const isInsideBlockQuote = state => {
|
|
98
|
-
const {
|
|
99
|
-
blockquote
|
|
100
|
-
} = state.schema.nodes;
|
|
101
|
-
return hasParentNodeOfType(blockquote)(state.selection);
|
|
102
|
-
};
|
|
103
96
|
export { isTextSelection, isElementInTableCell, isLastItemMediaGroup, nonNullable } from '@atlaskit/editor-common/utils';
|
|
104
97
|
export function sum(arr, f) {
|
|
105
98
|
return arr.reduce((val, x) => val + f(x), 0);
|
|
@@ -2,6 +2,5 @@ export default {
|
|
|
2
2
|
EDITOR_MOUNTED: 'Editor Component Mount Time',
|
|
3
3
|
PROSEMIRROR_RENDERED: 'ProseMirror Render Time',
|
|
4
4
|
PROSEMIRROR_CONTENT_RENDERED: 'ProseMirror Content Render Time',
|
|
5
|
-
ON_EDITOR_READY_CALLBACK: 'onEditorReady Callback Duration'
|
|
6
|
-
PASTE: 'Editor Paste Plugin Paste Duration'
|
|
5
|
+
ON_EDITOR_READY_CALLBACK: 'onEditorReady Callback Duration'
|
|
7
6
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "190.1.
|
|
2
|
+
export const version = "190.1.23";
|
package/dist/esm/index.js
CHANGED
|
@@ -11,7 +11,20 @@ export { default as ContextPanel } from './ui/ContextPanel';
|
|
|
11
11
|
export { EmojiResource } from '@atlaskit/emoji/resource';
|
|
12
12
|
export { MentionResource } from '@atlaskit/mention/resource';
|
|
13
13
|
export { TeamMentionResource } from '@atlaskit/mention/team-resource';
|
|
14
|
-
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated
|
|
16
|
+
* DO NOT USE THIS WILL BE REMOVED SOON AND IS UNSAFE.
|
|
17
|
+
* This is here while we work to extract the annotation plugin.
|
|
18
|
+
* Please use the export from `@atlaskit/editor-common/annotation`.
|
|
19
|
+
*/
|
|
20
|
+
export { AnnotationUpdateEmitter } from '@atlaskit/editor-common/annotation';
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated
|
|
24
|
+
* DO NOT USE THIS WILL BE REMOVED SOON AND IS UNSAFE.
|
|
25
|
+
* This is here while we work to extract the annotation plugin.
|
|
26
|
+
* Please use the export from `@atlaskit/editor-plugin-annotation`.
|
|
27
|
+
*/
|
|
15
28
|
|
|
16
29
|
// Used in mobile bridge
|
|
17
30
|
|
|
@@ -2,7 +2,6 @@ export { default as collabEditPlugin } from './collab-edit';
|
|
|
2
2
|
export { default as extensionPlugin } from './extension';
|
|
3
3
|
export { default as jiraIssuePlugin } from './jira-issue';
|
|
4
4
|
export { default as pastePlugin } from './paste';
|
|
5
|
-
export { default as annotationPlugin } from './annotation';
|
|
6
5
|
export { default as feedbackDialogPlugin } from './feedback-dialog';
|
|
7
6
|
export { default as findReplacePlugin } from './find-replace';
|
|
8
7
|
export { default as avatarGroupPlugin } from './avatar-group';
|
|
@@ -15,16 +15,19 @@ import { escapeLinks, htmlContainsSingleFile, isPastedFromWord, isPastedFromExce
|
|
|
15
15
|
import { transformSliceNestedExpandToExpand, transformSliceToJoinAdjacentCodeBlocks, transformSingleLineCodeBlockToCodeMark, transformSliceToDecisionList } from '@atlaskit/editor-common/transforms';
|
|
16
16
|
import { handleMacroAutoConvert, handleMention, handleParagraphBlockMarks } from '../handlers';
|
|
17
17
|
import { createPasteMeasurePayload, getContentNodeTypes, handlePasteAsPlainTextWithAnalytics, handlePasteIntoTaskAndDecisionWithAnalytics, handleCodeBlockWithAnalytics, handleMediaSingleWithAnalytics, handlePastePreservingMarksWithAnalytics, handleMarkdownWithAnalytics, handleRichTextWithAnalytics, handleExpandWithAnalytics, handleSelectedTableWithAnalytics, handlePasteLinkOnSelectedTextWithAnalytics, sendPasteAnalyticsEvent, handlePasteIntoCaptionWithAnalytics, handlePastePanelOrDecisionIntoListWithAnalytics, handlePasteNonNestableBlockNodesIntoListWithAnalytics } from './analytics';
|
|
18
|
-
import {
|
|
18
|
+
import { insideTable } from '@atlaskit/editor-common/core-utils';
|
|
19
19
|
import { upgradeTextToLists, splitParagraphs } from '../commands';
|
|
20
|
-
// TODO: ED-20519 It requires annotation extraction to use the plugin injection API
|
|
21
|
-
import { stripNonExistingAnnotations } from '../../annotation/utils';
|
|
22
20
|
import { clipboardTextSerializer } from './clipboard-text-serializer';
|
|
23
21
|
import { htmlHasIncompleteTable, tryRebuildCompleteTableHtml, isPastedFromTinyMCEConfluence } from '../util/tinyMCE';
|
|
24
22
|
import { pluginKey as stateKey, createPluginState } from './plugin-factory';
|
|
25
23
|
export { pluginKey as stateKey } from './plugin-factory';
|
|
26
24
|
import { hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
27
25
|
import { PastePluginActionTypes } from '../actions';
|
|
26
|
+
export var isInsideBlockQuote = function isInsideBlockQuote(state) {
|
|
27
|
+
var blockquote = state.schema.nodes.blockquote;
|
|
28
|
+
return hasParentNodeOfType(blockquote)(state.selection);
|
|
29
|
+
};
|
|
30
|
+
var PASTE = 'Editor Paste Plugin Paste Duration';
|
|
28
31
|
export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pluginInjectionApi, cardOptions, sanitizePrivateContent, providerFactory) {
|
|
29
32
|
var _pluginInjectionApi$a;
|
|
30
33
|
var editorAnalyticsAPI = pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a === void 0 ? void 0 : _pluginInjectionApi$a.actions;
|
|
@@ -167,7 +170,7 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
|
|
|
167
170
|
if (pasteTrackingEnabled) {
|
|
168
171
|
var content = getContentNodeTypes(slice.content);
|
|
169
172
|
var pasteId = uuid();
|
|
170
|
-
var measureName = "".concat(
|
|
173
|
+
var measureName = "".concat(PASTE, "_").concat(pasteId);
|
|
171
174
|
measureRender(measureName, function (_ref) {
|
|
172
175
|
var duration = _ref.duration,
|
|
173
176
|
distortedDuration = _ref.distortedDuration;
|
|
@@ -357,7 +360,8 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
|
|
|
357
360
|
// remove annotation marks from the pasted data if they are not present in the document
|
|
358
361
|
// for the cases when they are pasted from external pages
|
|
359
362
|
if (slice.content.size && containsAnyAnnotations(slice, state)) {
|
|
360
|
-
|
|
363
|
+
var _pluginInjectionApi$a3;
|
|
364
|
+
pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a3 = pluginInjectionApi.annotation) === null || _pluginInjectionApi$a3 === void 0 || _pluginInjectionApi$a3.actions.stripNonExistingAnnotations(slice, state);
|
|
361
365
|
}
|
|
362
366
|
|
|
363
367
|
// ED-4732
|
|
@@ -19,7 +19,7 @@ import { floatingToolbarPlugin } from '@atlaskit/editor-plugin-floating-toolbar'
|
|
|
19
19
|
import { clipboardPlugin } from '@atlaskit/editor-plugin-clipboard';
|
|
20
20
|
import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
21
21
|
import { placeholderPlugin } from '@atlaskit/editor-plugin-placeholder';
|
|
22
|
-
import annotationPlugin from '
|
|
22
|
+
import { annotationPlugin } from '@atlaskit/editor-plugin-annotation';
|
|
23
23
|
import { compositionPlugin } from '@atlaskit/editor-plugin-composition';
|
|
24
24
|
import { quickInsertPlugin } from '@atlaskit/editor-plugin-quick-insert';
|
|
25
25
|
import { selectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
@@ -40,8 +40,9 @@ import { toolbarListsIndentationPlugin } from '@atlaskit/editor-plugin-toolbar-l
|
|
|
40
40
|
import { customAutoformatPlugin } from '@atlaskit/editor-plugin-custom-autoformat';
|
|
41
41
|
import { alignmentPlugin } from '@atlaskit/editor-plugin-alignment';
|
|
42
42
|
import { dataConsumerPlugin } from '@atlaskit/editor-plugin-data-consumer';
|
|
43
|
+
import { annotationPlugin } from '@atlaskit/editor-plugin-annotation';
|
|
43
44
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
44
|
-
import {
|
|
45
|
+
import { avatarGroupPlugin, beforePrimaryToolbarPlugin, collabEditPlugin, extensionPlugin, feedbackDialogPlugin, findReplacePlugin, jiraIssuePlugin } from '../plugins';
|
|
45
46
|
import { shouldForceTracking } from '@atlaskit/editor-common/utils';
|
|
46
47
|
import { isFullPage as fullPageCheck } from '../utils/is-full-page';
|
|
47
48
|
import { createDefaultPreset } from './default';
|
package/dist/esm/utils/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { toggleMark } from '@atlaskit/editor-prosemirror/commands';
|
|
2
|
-
import { hasParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
3
2
|
export { isEmptyNode, isSelectionInsideLastNodeInDocument, checkNodeDown, insideTableCell, isInListItem, toJSON, nodeToJSON } from '@atlaskit/editor-common/utils';
|
|
4
3
|
export { insideTable } from '@atlaskit/editor-common/core-utils';
|
|
5
4
|
export { nodesBetweenChanged, getNodesCount } from './document';
|
|
@@ -94,10 +93,6 @@ export var isTemporary = function isTemporary(id) {
|
|
|
94
93
|
export var hasOpenEnd = function hasOpenEnd(slice) {
|
|
95
94
|
return slice.openStart > 0 || slice.openEnd > 0;
|
|
96
95
|
};
|
|
97
|
-
export var isInsideBlockQuote = function isInsideBlockQuote(state) {
|
|
98
|
-
var blockquote = state.schema.nodes.blockquote;
|
|
99
|
-
return hasParentNodeOfType(blockquote)(state.selection);
|
|
100
|
-
};
|
|
101
96
|
export { isTextSelection, isElementInTableCell, isLastItemMediaGroup, nonNullable } from '@atlaskit/editor-common/utils';
|
|
102
97
|
export function sum(arr, f) {
|
|
103
98
|
return arr.reduce(function (val, x) {
|
|
@@ -2,6 +2,5 @@ export default {
|
|
|
2
2
|
EDITOR_MOUNTED: 'Editor Component Mount Time',
|
|
3
3
|
PROSEMIRROR_RENDERED: 'ProseMirror Render Time',
|
|
4
4
|
PROSEMIRROR_CONTENT_RENDERED: 'ProseMirror Content Render Time',
|
|
5
|
-
ON_EDITOR_READY_CALLBACK: 'onEditorReady Callback Duration'
|
|
6
|
-
PASTE: 'Editor Paste Plugin Paste Duration'
|
|
5
|
+
ON_EDITOR_READY_CALLBACK: 'onEditorReady Callback Duration'
|
|
7
6
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "190.1.
|
|
2
|
+
export var version = "190.1.23";
|
package/dist/types/index.d.ts
CHANGED
|
@@ -11,8 +11,21 @@ export { EmojiResource } from '@atlaskit/emoji/resource';
|
|
|
11
11
|
export { MentionResource } from '@atlaskit/mention/resource';
|
|
12
12
|
export type { MentionProvider, PresenceProvider, } from '@atlaskit/mention/resource';
|
|
13
13
|
export { TeamMentionResource } from '@atlaskit/mention/team-resource';
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated
|
|
16
|
+
* DO NOT USE THIS WILL BE REMOVED SOON AND IS UNSAFE.
|
|
17
|
+
* This is here while we work to extract the annotation plugin.
|
|
18
|
+
* Please use the export from `@atlaskit/editor-common/annotation`.
|
|
19
|
+
*/
|
|
20
|
+
export { AnnotationUpdateEmitter } from '@atlaskit/editor-common/annotation';
|
|
21
|
+
export type { UpdateEvent } from '@atlaskit/editor-common/annotation';
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated
|
|
24
|
+
* DO NOT USE THIS WILL BE REMOVED SOON AND IS UNSAFE.
|
|
25
|
+
* This is here while we work to extract the annotation plugin.
|
|
26
|
+
* Please use the export from `@atlaskit/editor-plugin-annotation`.
|
|
27
|
+
*/
|
|
28
|
+
export type { AnnotationProviders, InlineCommentAnnotationProvider, InlineCommentCreateComponentProps, InlineCommentViewComponentProps, AnnotationInfo, AnnotationState, AnnotationTypeProvider, InlineCommentState, } from '@atlaskit/editor-plugin-annotation';
|
|
16
29
|
export type { TypeAheadItem } from '@atlaskit/editor-common/provider-factory';
|
|
17
30
|
export { INPUT_METHOD, ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, } from '@atlaskit/editor-common/analytics';
|
|
18
31
|
export type { AnalyticsEventPayload } from '@atlaskit/editor-common/analytics';
|
|
@@ -2,7 +2,6 @@ export { default as collabEditPlugin } from './collab-edit';
|
|
|
2
2
|
export { default as extensionPlugin } from './extension';
|
|
3
3
|
export { default as jiraIssuePlugin } from './jira-issue';
|
|
4
4
|
export { default as pastePlugin } from './paste';
|
|
5
|
-
export { default as annotationPlugin } from './annotation';
|
|
6
5
|
export { default as feedbackDialogPlugin } from './feedback-dialog';
|
|
7
6
|
export { default as findReplacePlugin } from './find-replace';
|
|
8
7
|
export { default as avatarGroupPlugin } from './avatar-group';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
|
+
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
3
4
|
import type { CardOptions } from '@atlaskit/editor-common/card';
|
|
4
5
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
5
6
|
import type { DispatchAnalyticsEvent } from '@atlaskit/editor-common/analytics';
|
|
@@ -7,4 +8,5 @@ export { pluginKey as stateKey } from './plugin-factory';
|
|
|
7
8
|
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
8
9
|
import type { FeatureFlags, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
9
10
|
import type { PastePlugin } from '../';
|
|
11
|
+
export declare const isInsideBlockQuote: (state: EditorState) => boolean;
|
|
10
12
|
export declare function createPlugin(schema: Schema, dispatchAnalyticsEvent: DispatchAnalyticsEvent, dispatch: Dispatch, featureFlags: FeatureFlags, pluginInjectionApi: ExtractInjectionAPI<PastePlugin> | undefined, cardOptions?: CardOptions, sanitizePrivateContent?: boolean, providerFactory?: ProviderFactory): SafePlugin<import("@atlaskit/editor-plugin-paste").PastePluginState>;
|
|
@@ -5,7 +5,7 @@ import type { EditorProps } from '../types/editor-props';
|
|
|
5
5
|
import type { EditorPresetProps } from './types';
|
|
6
6
|
import type { BlockTypePluginOptions } from '@atlaskit/editor-plugin-block-type';
|
|
7
7
|
import type { PlaceholderPluginOptions } from '@atlaskit/editor-plugin-placeholder';
|
|
8
|
-
import type { AnnotationProviders } from '
|
|
8
|
+
import type { AnnotationProviders } from '@atlaskit/editor-plugin-annotation';
|
|
9
9
|
import type { TextFormattingOptions, HyperlinkPluginOptions, QuickInsertPluginOptions } from '@atlaskit/editor-common/types';
|
|
10
10
|
import type { CodeBlockOptions } from '@atlaskit/editor-plugin-code-block';
|
|
11
11
|
import type { SelectionPluginOptions } from '@atlaskit/editor-common/selection';
|