@atlaskit/editor-plugin-list 5.0.1 → 5.0.3
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
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-list
|
|
2
2
|
|
|
3
|
+
## 5.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#187247](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/187247)
|
|
8
|
+
[`4baf71295fd8e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4baf71295fd8e) -
|
|
9
|
+
[ux] Dynamically calculate the character width of ordered lists when number of list items is 2 or
|
|
10
|
+
more
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
13
|
+
## 5.0.2
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [#187144](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/187144)
|
|
18
|
+
[`a16147d8fbdfe`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a16147d8fbdfe) -
|
|
19
|
+
Bump @atlaskit/adf-schema to v49.0.5
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
|
|
3
22
|
## 5.0.1
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
|
@@ -13,6 +13,7 @@ var _utils = require("@atlaskit/editor-common/utils");
|
|
|
13
13
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
14
14
|
var _utils2 = require("@atlaskit/editor-prosemirror/utils");
|
|
15
15
|
var _view = require("@atlaskit/editor-prosemirror/view");
|
|
16
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
17
|
var _selection2 = require("./utils/selection");
|
|
17
18
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
18
19
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -63,7 +64,7 @@ var getDecorations = exports.getDecorations = function getDecorations(doc, state
|
|
|
63
64
|
itemsCount: node === null || node === void 0 ? void 0 : node.childCount,
|
|
64
65
|
order: node === null || node === void 0 || (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.order
|
|
65
66
|
});
|
|
66
|
-
if (digitsSize && digitsSize > 2) {
|
|
67
|
+
if (digitsSize && digitsSize > ((0, _platformFeatureFlags.fg)('platform_editor_ol_padding_fix') ? 1 : 2)) {
|
|
67
68
|
decorations.push(_view.Decoration.node(from, to, {
|
|
68
69
|
style: (0, _styles.getOrderedListInlineStyles)(digitsSize, 'string')
|
|
69
70
|
}));
|
|
@@ -5,6 +5,7 @@ import { getItemCounterDigitsSize, isListNode, pluginFactory } from '@atlaskit/e
|
|
|
5
5
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
6
6
|
import { findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
7
7
|
import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
8
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
9
|
import { isWrappingPossible } from './utils/selection';
|
|
9
10
|
const listPluginKey = new PluginKey('listPlugin');
|
|
10
11
|
export const pluginKey = listPluginKey;
|
|
@@ -53,7 +54,7 @@ export const getDecorations = (doc, state, featureFlags) => {
|
|
|
53
54
|
itemsCount: node === null || node === void 0 ? void 0 : node.childCount,
|
|
54
55
|
order: node === null || node === void 0 ? void 0 : (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.order
|
|
55
56
|
});
|
|
56
|
-
if (digitsSize && digitsSize > 2) {
|
|
57
|
+
if (digitsSize && digitsSize > (fg('platform_editor_ol_padding_fix') ? 1 : 2)) {
|
|
57
58
|
decorations.push(Decoration.node(from, to, {
|
|
58
59
|
style: getOrderedListInlineStyles(digitsSize, 'string')
|
|
59
60
|
}));
|
|
@@ -8,6 +8,7 @@ import { getItemCounterDigitsSize, isListNode, pluginFactory } from '@atlaskit/e
|
|
|
8
8
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
9
9
|
import { findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
10
10
|
import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
11
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
12
|
import { isWrappingPossible } from './utils/selection';
|
|
12
13
|
var listPluginKey = new PluginKey('listPlugin');
|
|
13
14
|
export var pluginKey = listPluginKey;
|
|
@@ -56,7 +57,7 @@ export var getDecorations = function getDecorations(doc, state, featureFlags) {
|
|
|
56
57
|
itemsCount: node === null || node === void 0 ? void 0 : node.childCount,
|
|
57
58
|
order: node === null || node === void 0 || (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.order
|
|
58
59
|
});
|
|
59
|
-
if (digitsSize && digitsSize > 2) {
|
|
60
|
+
if (digitsSize && digitsSize > (fg('platform_editor_ol_padding_fix') ? 1 : 2)) {
|
|
60
61
|
decorations.push(Decoration.node(from, to, {
|
|
61
62
|
style: getOrderedListInlineStyles(digitsSize, 'string')
|
|
62
63
|
}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-list",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.3",
|
|
4
4
|
"description": "List plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -30,17 +30,17 @@
|
|
|
30
30
|
".": "./src/index.ts"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@atlaskit/adf-schema": "^
|
|
33
|
+
"@atlaskit/adf-schema": "^49.0.6",
|
|
34
34
|
"@atlaskit/editor-plugin-analytics": "^3.0.0",
|
|
35
35
|
"@atlaskit/editor-plugin-feature-flags": "^2.0.0",
|
|
36
36
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
37
37
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
38
38
|
"@atlaskit/prosemirror-input-rules": "^3.3.0",
|
|
39
|
-
"@atlaskit/tmp-editor-statsig": "^9.
|
|
39
|
+
"@atlaskit/tmp-editor-statsig": "^9.8.0",
|
|
40
40
|
"@babel/runtime": "^7.0.0"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"@atlaskit/editor-common": "^107.
|
|
43
|
+
"@atlaskit/editor-common": "^107.8.0",
|
|
44
44
|
"react": "^18.2.0",
|
|
45
45
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
46
46
|
},
|
|
@@ -85,6 +85,9 @@
|
|
|
85
85
|
"platform-feature-flags": {
|
|
86
86
|
"platform_editor_split_list_item_for_gap_cursor": {
|
|
87
87
|
"type": "boolean"
|
|
88
|
+
},
|
|
89
|
+
"platform_editor_ol_padding_fix": {
|
|
90
|
+
"type": "boolean"
|
|
88
91
|
}
|
|
89
92
|
},
|
|
90
93
|
"stricter": {
|