@atlaskit/editor-plugin-block-type 10.3.0 → 10.3.2
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 +14 -0
- package/dist/cjs/pm-plugins/main.js +5 -1
- package/dist/cjs/ui/HeadingBlockMenuItem.js +4 -1
- package/dist/es2019/pm-plugins/main.js +5 -1
- package/dist/es2019/ui/HeadingBlockMenuItem.js +4 -1
- package/dist/esm/pm-plugins/main.js +5 -1
- package/dist/esm/ui/HeadingBlockMenuItem.js +4 -1
- package/package.json +8 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-block-type
|
|
2
2
|
|
|
3
|
+
## 10.3.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 10.3.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`2702e8bc600ac`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2702e8bc600ac) -
|
|
14
|
+
Add the empty line to history so it can be part of undo stack correctly.
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 10.3.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
|
@@ -93,7 +93,11 @@ var createPlugin = exports.createPlugin = function createPlugin(editorAPI, dispa
|
|
|
93
93
|
var lastNode = pos.node(1);
|
|
94
94
|
var paragraph = newState.schema.nodes.paragraph;
|
|
95
95
|
if (lastNode && lastNode.isBlock && lastNode.type !== paragraph) {
|
|
96
|
-
|
|
96
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_fix_insert_paragraph_undo')) {
|
|
97
|
+
return newState.tr.insert(newState.doc.content.size, newState.schema.nodes.paragraph.create());
|
|
98
|
+
} else {
|
|
99
|
+
return newState.tr.insert(newState.doc.content.size, newState.schema.nodes.paragraph.create()).setMeta('addToHistory', false);
|
|
100
|
+
}
|
|
97
101
|
}
|
|
98
102
|
}
|
|
99
103
|
},
|
|
@@ -48,7 +48,10 @@ var HeadingBlockMenuItem = function HeadingBlockMenuItem(_ref) {
|
|
|
48
48
|
var command = api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.transformNode(tr.doc.type.schema.nodes.heading, {
|
|
49
49
|
inputMethod: inputMethod,
|
|
50
50
|
triggeredFrom: triggeredFrom,
|
|
51
|
-
targetTypeName: "heading".concat(level)
|
|
51
|
+
targetTypeName: "heading".concat(level),
|
|
52
|
+
targetAttrs: {
|
|
53
|
+
level: level
|
|
54
|
+
}
|
|
52
55
|
});
|
|
53
56
|
return command ? command({
|
|
54
57
|
tr: tr
|
|
@@ -84,7 +84,11 @@ export const createPlugin = (editorAPI, dispatch, lastNodeMustBeParagraph, inclu
|
|
|
84
84
|
paragraph
|
|
85
85
|
} = newState.schema.nodes;
|
|
86
86
|
if (lastNode && lastNode.isBlock && lastNode.type !== paragraph) {
|
|
87
|
-
|
|
87
|
+
if (fg('platform_editor_fix_insert_paragraph_undo')) {
|
|
88
|
+
return newState.tr.insert(newState.doc.content.size, newState.schema.nodes.paragraph.create());
|
|
89
|
+
} else {
|
|
90
|
+
return newState.tr.insert(newState.doc.content.size, newState.schema.nodes.paragraph.create()).setMeta('addToHistory', false);
|
|
91
|
+
}
|
|
88
92
|
}
|
|
89
93
|
}
|
|
90
94
|
},
|
|
@@ -44,7 +44,10 @@ const HeadingBlockMenuItem = ({
|
|
|
44
44
|
const command = api === null || api === void 0 ? void 0 : (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.transformNode(tr.doc.type.schema.nodes.heading, {
|
|
45
45
|
inputMethod,
|
|
46
46
|
triggeredFrom,
|
|
47
|
-
targetTypeName: `heading${level}
|
|
47
|
+
targetTypeName: `heading${level}`,
|
|
48
|
+
targetAttrs: {
|
|
49
|
+
level
|
|
50
|
+
}
|
|
48
51
|
});
|
|
49
52
|
return command ? command({
|
|
50
53
|
tr
|
|
@@ -86,7 +86,11 @@ export var createPlugin = function createPlugin(editorAPI, dispatch, lastNodeMus
|
|
|
86
86
|
var lastNode = pos.node(1);
|
|
87
87
|
var paragraph = newState.schema.nodes.paragraph;
|
|
88
88
|
if (lastNode && lastNode.isBlock && lastNode.type !== paragraph) {
|
|
89
|
-
|
|
89
|
+
if (fg('platform_editor_fix_insert_paragraph_undo')) {
|
|
90
|
+
return newState.tr.insert(newState.doc.content.size, newState.schema.nodes.paragraph.create());
|
|
91
|
+
} else {
|
|
92
|
+
return newState.tr.insert(newState.doc.content.size, newState.schema.nodes.paragraph.create()).setMeta('addToHistory', false);
|
|
93
|
+
}
|
|
90
94
|
}
|
|
91
95
|
}
|
|
92
96
|
},
|
|
@@ -41,7 +41,10 @@ var HeadingBlockMenuItem = function HeadingBlockMenuItem(_ref) {
|
|
|
41
41
|
var command = api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.commands.transformNode(tr.doc.type.schema.nodes.heading, {
|
|
42
42
|
inputMethod: inputMethod,
|
|
43
43
|
triggeredFrom: triggeredFrom,
|
|
44
|
-
targetTypeName: "heading".concat(level)
|
|
44
|
+
targetTypeName: "heading".concat(level),
|
|
45
|
+
targetAttrs: {
|
|
46
|
+
level: level
|
|
47
|
+
}
|
|
45
48
|
});
|
|
46
49
|
return command ? command({
|
|
47
50
|
tr: tr
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-type",
|
|
3
|
-
"version": "10.3.
|
|
3
|
+
"version": "10.3.2",
|
|
4
4
|
"description": "BlockType plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -43,21 +43,21 @@
|
|
|
43
43
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
44
44
|
"@atlaskit/editor-toolbar": "^0.18.0",
|
|
45
45
|
"@atlaskit/editor-toolbar-model": "^0.2.0",
|
|
46
|
-
"@atlaskit/icon": "^29.
|
|
47
|
-
"@atlaskit/icon-lab": "^5.
|
|
46
|
+
"@atlaskit/icon": "^29.3.0",
|
|
47
|
+
"@atlaskit/icon-lab": "^5.13.0",
|
|
48
48
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
49
49
|
"@atlaskit/platform-feature-flags-react": "^0.4.0",
|
|
50
50
|
"@atlaskit/primitives": "^16.4.0",
|
|
51
51
|
"@atlaskit/prosemirror-history": "^0.2.0",
|
|
52
52
|
"@atlaskit/prosemirror-input-rules": "^3.6.0",
|
|
53
53
|
"@atlaskit/theme": "^21.0.0",
|
|
54
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
54
|
+
"@atlaskit/tmp-editor-statsig": "^16.0.0",
|
|
55
55
|
"@atlaskit/tokens": "^8.6.0",
|
|
56
56
|
"@babel/runtime": "^7.0.0",
|
|
57
57
|
"@emotion/react": "^11.7.1"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
|
-
"@atlaskit/editor-common": "^110.
|
|
60
|
+
"@atlaskit/editor-common": "^110.46.0",
|
|
61
61
|
"react": "^18.2.0",
|
|
62
62
|
"react-dom": "^18.2.0",
|
|
63
63
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
@@ -116,6 +116,9 @@
|
|
|
116
116
|
"platform_editor_use_preferences_plugin": {
|
|
117
117
|
"type": "boolean"
|
|
118
118
|
},
|
|
119
|
+
"platform_editor_fix_insert_paragraph_undo": {
|
|
120
|
+
"type": "boolean"
|
|
121
|
+
},
|
|
119
122
|
"platform_editor_adf_with_localid": {
|
|
120
123
|
"type": "boolean"
|
|
121
124
|
},
|