@atlaskit/editor-plugin-list 1.4.6 → 2.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 +38 -0
- package/dist/cjs/index.js +1 -8
- package/dist/cjs/pm-plugins/main.js +1 -1
- package/dist/es2019/index.js +1 -2
- package/dist/es2019/pm-plugins/main.js +1 -1
- package/dist/esm/index.js +1 -2
- package/dist/esm/pm-plugins/main.js +1 -1
- package/dist/types/index.d.ts +0 -1
- package/dist/types-ts4.5/index.d.ts +0 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,43 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-list
|
|
2
2
|
|
|
3
|
+
## 2.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#61903](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/61903) [`fb2eb9474b05`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/fb2eb9474b05) - WHAT?
|
|
8
|
+
Removing `toggleList` from public exports.
|
|
9
|
+
|
|
10
|
+
WHY?
|
|
11
|
+
It is an antipattern to export utilities from a plugin package.
|
|
12
|
+
|
|
13
|
+
The preferred approach is using the editor API.
|
|
14
|
+
|
|
15
|
+
HOW DO I WORKAROUND IT?
|
|
16
|
+
This can be accessed via the commands of the list plugin using the editor API.
|
|
17
|
+
|
|
18
|
+
Example to toggle bullet list:
|
|
19
|
+
|
|
20
|
+
```ts
|
|
21
|
+
editorAPI?.core.actions.execute(
|
|
22
|
+
editorAPI?.list.commands.toggleBulletList(INPUT_METHOD.TOOLBAR),
|
|
23
|
+
);
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Example to toggle ordered list:
|
|
27
|
+
|
|
28
|
+
```ts
|
|
29
|
+
editorAPI?.core.actions.execute(
|
|
30
|
+
editorAPI?.list.commands.toggleOrderedList(INPUT_METHOD.TOOLBAR),
|
|
31
|
+
);
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## 1.4.7
|
|
35
|
+
|
|
36
|
+
### Patch Changes
|
|
37
|
+
|
|
38
|
+
- [#60973](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/60973) [`0d9d4d239318`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/0d9d4d239318) - [ux] [ED-21530] Fix bug in list styling where unordered and ordered lists have different left padding when restart numbered lists feature flag is enabled
|
|
39
|
+
- Updated dependencies
|
|
40
|
+
|
|
3
41
|
## 1.4.6
|
|
4
42
|
|
|
5
43
|
### Patch Changes
|
package/dist/cjs/index.js
CHANGED
|
@@ -9,11 +9,4 @@ Object.defineProperty(exports, "listPlugin", {
|
|
|
9
9
|
return _plugin.listPlugin;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function get() {
|
|
15
|
-
return _commands.toggleList;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
var _plugin = require("./plugin");
|
|
19
|
-
var _commands = require("./commands");
|
|
12
|
+
var _plugin = require("./plugin");
|
|
@@ -63,7 +63,7 @@ var getDecorations = exports.getDecorations = function getDecorations(doc, state
|
|
|
63
63
|
itemsCount: node === null || node === void 0 ? void 0 : node.childCount,
|
|
64
64
|
order: node === null || node === void 0 || (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.order
|
|
65
65
|
});
|
|
66
|
-
if (digitsSize) {
|
|
66
|
+
if (digitsSize && digitsSize > 2) {
|
|
67
67
|
decorations.push(_view.Decoration.node(from, to, {
|
|
68
68
|
style: (0, _styles.getOrderedListInlineStyles)(digitsSize, 'string')
|
|
69
69
|
}));
|
package/dist/es2019/index.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export { listPlugin } from './plugin';
|
|
2
|
-
export { toggleList } from './commands';
|
|
1
|
+
export { listPlugin } from './plugin';
|
|
@@ -53,7 +53,7 @@ export const getDecorations = (doc, state, featureFlags) => {
|
|
|
53
53
|
itemsCount: node === null || node === void 0 ? void 0 : node.childCount,
|
|
54
54
|
order: node === null || node === void 0 ? void 0 : (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.order
|
|
55
55
|
});
|
|
56
|
-
if (digitsSize) {
|
|
56
|
+
if (digitsSize && digitsSize > 2) {
|
|
57
57
|
decorations.push(Decoration.node(from, to, {
|
|
58
58
|
style: getOrderedListInlineStyles(digitsSize, 'string')
|
|
59
59
|
}));
|
package/dist/esm/index.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export { listPlugin } from './plugin';
|
|
2
|
-
export { toggleList } from './commands';
|
|
1
|
+
export { listPlugin } from './plugin';
|
|
@@ -56,7 +56,7 @@ export var getDecorations = function getDecorations(doc, state, featureFlags) {
|
|
|
56
56
|
itemsCount: node === null || node === void 0 ? void 0 : node.childCount,
|
|
57
57
|
order: node === null || node === void 0 || (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.order
|
|
58
58
|
});
|
|
59
|
-
if (digitsSize) {
|
|
59
|
+
if (digitsSize && digitsSize > 2) {
|
|
60
60
|
decorations.push(Decoration.node(from, to, {
|
|
61
61
|
style: getOrderedListInlineStyles(digitsSize, 'string')
|
|
62
62
|
}));
|
package/dist/types/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-list",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "List plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@atlaskit/adf-schema": "^35.1.1",
|
|
35
|
-
"@atlaskit/editor-common": "^76.
|
|
35
|
+
"@atlaskit/editor-common": "^76.27.0",
|
|
36
36
|
"@atlaskit/editor-plugin-analytics": "^0.4.0",
|
|
37
37
|
"@atlaskit/editor-plugin-feature-flags": "^1.0.0",
|
|
38
38
|
"@atlaskit/editor-prosemirror": "1.1.0",
|