@atlaskit/editor-plugin-paste-options-toolbar 13.4.0 → 13.5.1
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 +21 -0
- package/dist/cjs/pm-plugins/util/format-handlers.js +2 -3
- package/dist/cjs/ui/on-paste-actions-menu/PasteActionsMenuContent.js +1 -1
- package/dist/cjs/ui/on-paste-actions-menu/PasteMenuComponents.js +1 -1
- package/dist/cjs/ui/on-paste-actions-menu/PasteOptionsDropdownButton.js +1 -1
- package/dist/es2019/pm-plugins/util/format-handlers.js +2 -3
- package/dist/es2019/ui/on-paste-actions-menu/PasteActionsMenuContent.js +1 -1
- package/dist/es2019/ui/on-paste-actions-menu/PasteMenuComponents.js +1 -1
- package/dist/es2019/ui/on-paste-actions-menu/PasteOptionsDropdownButton.js +1 -1
- package/dist/esm/pm-plugins/util/format-handlers.js +2 -3
- package/dist/esm/ui/on-paste-actions-menu/PasteActionsMenuContent.js +1 -1
- package/dist/esm/ui/on-paste-actions-menu/PasteMenuComponents.js +1 -1
- package/dist/esm/ui/on-paste-actions-menu/PasteOptionsDropdownButton.js +1 -1
- package/dist/types/pm-plugins/util/format-handlers.d.ts +1 -1
- package/package.json +3 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-paste-options-toolbar
|
|
2
2
|
|
|
3
|
+
## 13.5.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 13.5.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`894f9e2ba765a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/894f9e2ba765a) -
|
|
14
|
+
Decouple paste-as-markdown GFM transformer rollout from `cc-markdown-mode` and gate it with the
|
|
15
|
+
new `platform_editor_paste_as_md_use_gfm` experiment for independent rollout control.
|
|
16
|
+
|
|
17
|
+
Consumers can gate the new transformer path with:
|
|
18
|
+
`expValEquals('platform_editor_paste_as_md_use_gfm', 'isEnabled', true)`.
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- Updated dependencies
|
|
23
|
+
|
|
3
24
|
## 13.4.0
|
|
4
25
|
|
|
5
26
|
### Minor Changes
|
|
@@ -12,7 +12,6 @@ var _editorMarkdownTransformer = require("@atlaskit/editor-markdown-transformer"
|
|
|
12
12
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
13
13
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
14
14
|
var _transform = require("@atlaskit/editor-prosemirror/transform");
|
|
15
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
15
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
17
16
|
var _index = require("./index");
|
|
18
17
|
// Ignored via go/ees005
|
|
@@ -153,7 +152,7 @@ function richTextSliceTransactionWithSelectionAdjust(_ref2) {
|
|
|
153
152
|
|
|
154
153
|
/**
|
|
155
154
|
* Parse markdown text into a slice for paste replacement, using markdown-plus
|
|
156
|
-
* only when
|
|
155
|
+
* only when the paste parser experiment is enabled.
|
|
157
156
|
*/
|
|
158
157
|
function getMarkdownSlice(text, schema, selection, markdownToPmConverter) {
|
|
159
158
|
var targetOpenStartNode = selection.$from.parent;
|
|
@@ -170,7 +169,7 @@ function getMarkdownSlice(text, schema, selection, markdownToPmConverter) {
|
|
|
170
169
|
}
|
|
171
170
|
}
|
|
172
171
|
textInput = textSplitByCodeBlock.join('```');
|
|
173
|
-
var doc = markdownToPmConverter && (0, _expValEquals.expValEquals)('
|
|
172
|
+
var doc = markdownToPmConverter && (0, _expValEquals.expValEquals)('platform_editor_paste_as_md_use_gfm', 'isEnabled', true) ? schema.nodes.doc.createAndFill({}, markdownToPmConverter({
|
|
174
173
|
markdown: textInput,
|
|
175
174
|
schema: schema
|
|
176
175
|
})) : new _editorMarkdownTransformer.MarkdownTransformer(schema, _paste.md).parse((0, _index.escapeLinks)(textInput));
|
|
@@ -5,7 +5,6 @@ import { MarkdownTransformer } from '@atlaskit/editor-markdown-transformer';
|
|
|
5
5
|
import { Fragment, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
6
6
|
import { Selection } from '@atlaskit/editor-prosemirror/state';
|
|
7
7
|
import { ReplaceStep } from '@atlaskit/editor-prosemirror/transform';
|
|
8
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
8
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
10
9
|
import { escapeLinks } from './index';
|
|
11
10
|
|
|
@@ -149,7 +148,7 @@ function richTextSliceTransactionWithSelectionAdjust({
|
|
|
149
148
|
|
|
150
149
|
/**
|
|
151
150
|
* Parse markdown text into a slice for paste replacement, using markdown-plus
|
|
152
|
-
* only when
|
|
151
|
+
* only when the paste parser experiment is enabled.
|
|
153
152
|
*/
|
|
154
153
|
export function getMarkdownSlice(text, schema, selection, markdownToPmConverter) {
|
|
155
154
|
const targetOpenStartNode = selection.$from.parent;
|
|
@@ -166,7 +165,7 @@ export function getMarkdownSlice(text, schema, selection, markdownToPmConverter)
|
|
|
166
165
|
}
|
|
167
166
|
}
|
|
168
167
|
textInput = textSplitByCodeBlock.join('```');
|
|
169
|
-
const doc = markdownToPmConverter && expValEquals('
|
|
168
|
+
const doc = markdownToPmConverter && expValEquals('platform_editor_paste_as_md_use_gfm', 'isEnabled', true) ? schema.nodes.doc.createAndFill({}, markdownToPmConverter({
|
|
170
169
|
markdown: textInput,
|
|
171
170
|
schema
|
|
172
171
|
})) : new MarkdownTransformer(schema, md).parse(escapeLinks(textInput));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* PasteActionsMenuContent.tsx generated by @compiled/babel-plugin
|
|
1
|
+
/* PasteActionsMenuContent.tsx generated by @compiled/babel-plugin v2.0.0 */
|
|
2
2
|
import "./PasteActionsMenuContent.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React, { useCallback, useContext, useEffect, useRef, useState } from 'react';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* PasteMenuComponents.tsx generated by @compiled/babel-plugin
|
|
1
|
+
/* PasteMenuComponents.tsx generated by @compiled/babel-plugin v2.0.0 */
|
|
2
2
|
import "./PasteMenuComponents.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React, { useCallback } from 'react';
|
|
@@ -5,7 +5,6 @@ import { MarkdownTransformer } from '@atlaskit/editor-markdown-transformer';
|
|
|
5
5
|
import { Fragment, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
6
6
|
import { Selection } from '@atlaskit/editor-prosemirror/state';
|
|
7
7
|
import { ReplaceStep } from '@atlaskit/editor-prosemirror/transform';
|
|
8
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
8
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
10
9
|
import { escapeLinks } from './index';
|
|
11
10
|
|
|
@@ -147,7 +146,7 @@ function richTextSliceTransactionWithSelectionAdjust(_ref2) {
|
|
|
147
146
|
|
|
148
147
|
/**
|
|
149
148
|
* Parse markdown text into a slice for paste replacement, using markdown-plus
|
|
150
|
-
* only when
|
|
149
|
+
* only when the paste parser experiment is enabled.
|
|
151
150
|
*/
|
|
152
151
|
export function getMarkdownSlice(text, schema, selection, markdownToPmConverter) {
|
|
153
152
|
var targetOpenStartNode = selection.$from.parent;
|
|
@@ -164,7 +163,7 @@ export function getMarkdownSlice(text, schema, selection, markdownToPmConverter)
|
|
|
164
163
|
}
|
|
165
164
|
}
|
|
166
165
|
textInput = textSplitByCodeBlock.join('```');
|
|
167
|
-
var doc = markdownToPmConverter && expValEquals('
|
|
166
|
+
var doc = markdownToPmConverter && expValEquals('platform_editor_paste_as_md_use_gfm', 'isEnabled', true) ? schema.nodes.doc.createAndFill({}, markdownToPmConverter({
|
|
168
167
|
markdown: textInput,
|
|
169
168
|
schema: schema
|
|
170
169
|
})) : new MarkdownTransformer(schema, md).parse(escapeLinks(textInput));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* PasteActionsMenuContent.tsx generated by @compiled/babel-plugin
|
|
1
|
+
/* PasteActionsMenuContent.tsx generated by @compiled/babel-plugin v2.0.0 */
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
4
|
import "./PasteActionsMenuContent.compiled.css";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* PasteMenuComponents.tsx generated by @compiled/babel-plugin
|
|
1
|
+
/* PasteMenuComponents.tsx generated by @compiled/babel-plugin v2.0.0 */
|
|
2
2
|
import "./PasteMenuComponents.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React, { useCallback } from 'react';
|
|
@@ -9,6 +9,6 @@ export declare const formatRichText: (tr: Transaction, pluginState: PasteOptions
|
|
|
9
9
|
export declare const formatPlainText: (tr: Transaction, pluginState: PasteOptionsPluginState) => Transaction;
|
|
10
10
|
/**
|
|
11
11
|
* Parse markdown text into a slice for paste replacement, using markdown-plus
|
|
12
|
-
* only when
|
|
12
|
+
* only when the paste parser experiment is enabled.
|
|
13
13
|
*/
|
|
14
14
|
export declare function getMarkdownSlice(text: string, schema: Schema, selection: Selection, markdownToPmConverter?: MarkdownToPmConverter): Slice | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-paste-options-toolbar",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.5.1",
|
|
4
4
|
"description": "Paste options toolbar for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -34,14 +34,14 @@
|
|
|
34
34
|
"@atlaskit/icon": "^37.2.0",
|
|
35
35
|
"@atlaskit/platform-feature-flags": "^2.1.0",
|
|
36
36
|
"@atlaskit/primitives": "^22.2.0",
|
|
37
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
37
|
+
"@atlaskit/tmp-editor-statsig": "^136.0.0",
|
|
38
38
|
"@atlaskit/tokens": "^16.3.0",
|
|
39
39
|
"@babel/runtime": "^7.0.0",
|
|
40
40
|
"@compiled/react": "^1.0.0",
|
|
41
41
|
"@emotion/react": "^11.7.1"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"@atlaskit/editor-common": "^116.
|
|
44
|
+
"@atlaskit/editor-common": "^116.48.0",
|
|
45
45
|
"react": "^18.2.0 || ^19.2.0",
|
|
46
46
|
"react-dom": "^18.2.0 || ^19.2.0",
|
|
47
47
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
@@ -65,9 +65,6 @@
|
|
|
65
65
|
},
|
|
66
66
|
"platform_editor_paste_actions_menu_v2_exposure": {
|
|
67
67
|
"type": "boolean"
|
|
68
|
-
},
|
|
69
|
-
"platform_editor_paste_as_md_use_gfm_transformer": {
|
|
70
|
-
"type": "boolean"
|
|
71
68
|
}
|
|
72
69
|
},
|
|
73
70
|
"techstack": {
|