@atlaskit/editor-plugin-paste 30.0.5 → 31.0.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 +8 -0
- package/dist/cjs/pm-plugins/main.js +1 -2
- package/dist/cjs/pm-plugins/util/get-markdown-slice.js +1 -2
- package/dist/es2019/pm-plugins/main.js +1 -2
- package/dist/es2019/pm-plugins/util/get-markdown-slice.js +1 -2
- package/dist/esm/pm-plugins/main.js +1 -2
- package/dist/esm/pm-plugins/util/get-markdown-slice.js +1 -2
- package/dist/types/pastePluginType.d.ts +1 -2
- package/dist/types/pm-plugins/util/get-markdown-slice.d.ts +1 -2
- package/package.json +13 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-paste
|
|
2
2
|
|
|
3
|
+
## 31.0.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`c135881c26871`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c135881c26871) -
|
|
8
|
+
Clean up experiment `platform_editor_paste_as_md_use_gfm`
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
3
11
|
## 30.0.5
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -36,7 +36,6 @@ var _utils2 = require("@atlaskit/editor-prosemirror/utils");
|
|
|
36
36
|
var _handlePaste = require("@atlaskit/editor-tables/utils/handle-paste");
|
|
37
37
|
var _api = require("@atlaskit/insm/api");
|
|
38
38
|
var _clientIdCache = require("@atlaskit/media-common/clientIdCache");
|
|
39
|
-
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
40
39
|
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
41
40
|
var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
|
|
42
41
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
@@ -101,7 +100,7 @@ function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFlags, pl
|
|
|
101
100
|
var editorAnalyticsAPI = pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a === void 0 ? void 0 : _pluginInjectionApi$a.actions;
|
|
102
101
|
var atlassianMarkDownParser = new _editorMarkdownTransformer.MarkdownTransformer(schema, _md.md);
|
|
103
102
|
function getMarkdownSlice(text, openStart, openEnd) {
|
|
104
|
-
if (markdownToPmConverter
|
|
103
|
+
if (markdownToPmConverter) {
|
|
105
104
|
return (0, _getMarkdownSlice.getMarkdownSliceViaGfm)(text, schema, openStart, openEnd, markdownToPmConverter);
|
|
106
105
|
}
|
|
107
106
|
var escapedTextInput = (0, _util.escapeBackslashAndLinksExceptCodeBlock)(text);
|
|
@@ -10,8 +10,7 @@ var _index = require("./index");
|
|
|
10
10
|
/**
|
|
11
11
|
* Convert plain-text markdown to a ProseMirror Slice using the GFM converter.
|
|
12
12
|
*
|
|
13
|
-
* Only called when `
|
|
14
|
-
* `markdownToPmConverter` is provided. Returns `undefined` if the converter
|
|
13
|
+
* Only called when a `markdownToPmConverter` is provided. Returns `undefined` if the converter
|
|
15
14
|
* throws or produces an empty document — the caller will propagate `undefined`
|
|
16
15
|
* without falling back to the legacy MarkdownTransformer.
|
|
17
16
|
*/
|
|
@@ -26,7 +26,6 @@ import { contains, hasParentNodeOfType } from '@atlaskit/editor-prosemirror/util
|
|
|
26
26
|
import { handlePaste as handlePasteTable } from '@atlaskit/editor-tables/utils/handle-paste';
|
|
27
27
|
import { insm } from '@atlaskit/insm/api';
|
|
28
28
|
import { extractClientIdsFromHtml } from '@atlaskit/media-common/clientIdCache';
|
|
29
|
-
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
30
29
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
31
30
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
32
31
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
@@ -90,7 +89,7 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
|
|
|
90
89
|
const editorAnalyticsAPI = pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a === void 0 ? void 0 : _pluginInjectionApi$a.actions;
|
|
91
90
|
const atlassianMarkDownParser = new MarkdownTransformer(schema, md);
|
|
92
91
|
function getMarkdownSlice(text, openStart, openEnd) {
|
|
93
|
-
if (markdownToPmConverter
|
|
92
|
+
if (markdownToPmConverter) {
|
|
94
93
|
return getMarkdownSliceViaGfm(text, schema, openStart, openEnd, markdownToPmConverter);
|
|
95
94
|
}
|
|
96
95
|
const escapedTextInput = escapeBackslashAndLinksExceptCodeBlock(text);
|
|
@@ -5,8 +5,7 @@ import { escapeBackslashAndLinksExceptCodeBlock } from './index';
|
|
|
5
5
|
/**
|
|
6
6
|
* Convert plain-text markdown to a ProseMirror Slice using the GFM converter.
|
|
7
7
|
*
|
|
8
|
-
* Only called when `
|
|
9
|
-
* `markdownToPmConverter` is provided. Returns `undefined` if the converter
|
|
8
|
+
* Only called when a `markdownToPmConverter` is provided. Returns `undefined` if the converter
|
|
10
9
|
* throws or produces an empty document — the caller will propagate `undefined`
|
|
11
10
|
* without falling back to the legacy MarkdownTransformer.
|
|
12
11
|
*/
|
|
@@ -31,7 +31,6 @@ import { contains, hasParentNodeOfType } from '@atlaskit/editor-prosemirror/util
|
|
|
31
31
|
import { handlePaste as handlePasteTable } from '@atlaskit/editor-tables/utils/handle-paste';
|
|
32
32
|
import { insm } from '@atlaskit/insm/api';
|
|
33
33
|
import { extractClientIdsFromHtml } from '@atlaskit/media-common/clientIdCache';
|
|
34
|
-
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
35
34
|
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
36
35
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
|
|
37
36
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
@@ -93,7 +92,7 @@ export function createPlugin(schema, dispatchAnalyticsEvent, dispatch, featureFl
|
|
|
93
92
|
var editorAnalyticsAPI = pluginInjectionApi === null || pluginInjectionApi === void 0 || (_pluginInjectionApi$a = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a === void 0 ? void 0 : _pluginInjectionApi$a.actions;
|
|
94
93
|
var atlassianMarkDownParser = new MarkdownTransformer(schema, md);
|
|
95
94
|
function getMarkdownSlice(text, openStart, openEnd) {
|
|
96
|
-
if (markdownToPmConverter
|
|
95
|
+
if (markdownToPmConverter) {
|
|
97
96
|
return getMarkdownSliceViaGfm(text, schema, openStart, openEnd, markdownToPmConverter);
|
|
98
97
|
}
|
|
99
98
|
var escapedTextInput = escapeBackslashAndLinksExceptCodeBlock(text);
|
|
@@ -5,8 +5,7 @@ import { escapeBackslashAndLinksExceptCodeBlock } from './index';
|
|
|
5
5
|
/**
|
|
6
6
|
* Convert plain-text markdown to a ProseMirror Slice using the GFM converter.
|
|
7
7
|
*
|
|
8
|
-
* Only called when `
|
|
9
|
-
* `markdownToPmConverter` is provided. Returns `undefined` if the converter
|
|
8
|
+
* Only called when a `markdownToPmConverter` is provided. Returns `undefined` if the converter
|
|
10
9
|
* throws or produces an empty document — the caller will propagate `undefined`
|
|
11
10
|
* without falling back to the legacy MarkdownTransformer.
|
|
12
11
|
*/
|
|
@@ -72,8 +72,7 @@ export type PastePluginOptions = {
|
|
|
72
72
|
isFullPage?: boolean;
|
|
73
73
|
/**
|
|
74
74
|
* Optional markdown → ProseMirror fragment converter used for plain-text
|
|
75
|
-
* Cmd+V paste
|
|
76
|
-
* When omitted or the experiment is off, the legacy MarkdownTransformer is used.
|
|
75
|
+
* Cmd+V paste. When omitted, the legacy MarkdownTransformer is used.
|
|
77
76
|
*/
|
|
78
77
|
markdownToPmConverter?: MarkdownToPmConverter;
|
|
79
78
|
pasteWarningOptions?: PasteWarningOptions;
|
|
@@ -3,8 +3,7 @@ import { Slice } from '@atlaskit/editor-prosemirror/model';
|
|
|
3
3
|
/**
|
|
4
4
|
* Convert plain-text markdown to a ProseMirror Slice using the GFM converter.
|
|
5
5
|
*
|
|
6
|
-
* Only called when `
|
|
7
|
-
* `markdownToPmConverter` is provided. Returns `undefined` if the converter
|
|
6
|
+
* Only called when a `markdownToPmConverter` is provided. Returns `undefined` if the converter
|
|
8
7
|
* throws or produces an empty document — the caller will propagate `undefined`
|
|
9
8
|
* without falling back to the legacy MarkdownTransformer.
|
|
10
9
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-paste",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "31.0.0",
|
|
4
4
|
"description": "Paste plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -23,23 +23,23 @@
|
|
|
23
23
|
"@atlaskit/adf-utils": "^20.9.0",
|
|
24
24
|
"@atlaskit/code": "^20.0.0",
|
|
25
25
|
"@atlaskit/editor-markdown-transformer": "^6.3.0",
|
|
26
|
-
"@atlaskit/editor-plugin-analytics": "^
|
|
27
|
-
"@atlaskit/editor-plugin-annotation": "^
|
|
28
|
-
"@atlaskit/editor-plugin-better-type-history": "^
|
|
29
|
-
"@atlaskit/editor-plugin-card": "^
|
|
30
|
-
"@atlaskit/editor-plugin-expand": "^
|
|
31
|
-
"@atlaskit/editor-plugin-extension": "^
|
|
32
|
-
"@atlaskit/editor-plugin-feature-flags": "^
|
|
33
|
-
"@atlaskit/editor-plugin-list": "^
|
|
34
|
-
"@atlaskit/editor-plugin-media": "^
|
|
35
|
-
"@atlaskit/editor-plugin-mentions": "^
|
|
26
|
+
"@atlaskit/editor-plugin-analytics": "^30.0.0",
|
|
27
|
+
"@atlaskit/editor-plugin-annotation": "^30.0.0",
|
|
28
|
+
"@atlaskit/editor-plugin-better-type-history": "^30.0.0",
|
|
29
|
+
"@atlaskit/editor-plugin-card": "^36.0.0",
|
|
30
|
+
"@atlaskit/editor-plugin-expand": "^31.0.0",
|
|
31
|
+
"@atlaskit/editor-plugin-extension": "^33.0.0",
|
|
32
|
+
"@atlaskit/editor-plugin-feature-flags": "^29.0.0",
|
|
33
|
+
"@atlaskit/editor-plugin-list": "^32.0.0",
|
|
34
|
+
"@atlaskit/editor-plugin-media": "^32.0.0",
|
|
35
|
+
"@atlaskit/editor-plugin-mentions": "^32.0.0",
|
|
36
36
|
"@atlaskit/editor-prosemirror": "^9.0.0",
|
|
37
37
|
"@atlaskit/editor-tables": "^3.2.0",
|
|
38
38
|
"@atlaskit/flag": "^19.0.0",
|
|
39
39
|
"@atlaskit/icon": "^38.0.0",
|
|
40
40
|
"@atlaskit/insm": "^3.0.0",
|
|
41
41
|
"@atlaskit/linking-common": "^13.0.0",
|
|
42
|
-
"@atlaskit/media-client": "^39.
|
|
42
|
+
"@atlaskit/media-client": "^39.3.0",
|
|
43
43
|
"@atlaskit/media-common": "^14.7.0",
|
|
44
44
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
45
45
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"uuid": "^11.1.1"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
|
-
"@atlaskit/editor-common": "^
|
|
54
|
+
"@atlaskit/editor-common": "^134.0.0",
|
|
55
55
|
"react": "^18.2.0 || ^19.2.0",
|
|
56
56
|
"react-dom": "^18.2.0 || ^19.2.0",
|
|
57
57
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|