@atlaskit/editor-plugin-list 10.0.10 → 10.0.12
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/listPlugin.js +2 -2
- package/dist/cjs/pm-plugins/actions/wrap-and-join-lists.js +1 -0
- package/dist/es2019/listPlugin.js +2 -2
- package/dist/es2019/pm-plugins/actions/wrap-and-join-lists.js +1 -0
- package/dist/esm/listPlugin.js +2 -2
- package/dist/esm/pm-plugins/actions/wrap-and-join-lists.js +1 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-list
|
|
2
2
|
|
|
3
|
+
## 10.0.12
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 10.0.11
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`9ed32aea2c1d3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9ed32aea2c1d3) -
|
|
14
|
+
Replace feature experiment util with cross platform alternative for platform_editor_block_menu
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 10.0.10
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/cjs/listPlugin.js
CHANGED
|
@@ -13,7 +13,7 @@ var _messages = require("@atlaskit/editor-common/messages");
|
|
|
13
13
|
var _quickInsert = require("@atlaskit/editor-common/quick-insert");
|
|
14
14
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
15
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
16
|
-
var
|
|
16
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
17
17
|
var _commands = require("./pm-plugins/commands");
|
|
18
18
|
var _indentList = require("./pm-plugins/commands/indent-list");
|
|
19
19
|
var _outdentList2 = require("./pm-plugins/commands/outdent-list");
|
|
@@ -40,7 +40,7 @@ var listPlugin = exports.listPlugin = function listPlugin(_ref) {
|
|
|
40
40
|
var api = _ref.api;
|
|
41
41
|
var featureFlags = (api === null || api === void 0 || (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
|
|
42
42
|
var editorAnalyticsAPI = api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions;
|
|
43
|
-
if ((0,
|
|
43
|
+
if ((0, _experiments.editorExperiment)('platform_editor_block_menu', true)) {
|
|
44
44
|
var _api$blockMenu;
|
|
45
45
|
api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 || _api$blockMenu.actions.registerBlockMenuComponents((0, _ui.getListComponents)(api));
|
|
46
46
|
}
|
|
@@ -93,6 +93,7 @@ function doWrapInList(tr, range, wrappers, joinBefore, listType) {
|
|
|
93
93
|
var parent = range.parent;
|
|
94
94
|
for (var _i2 = range.startIndex, e = range.endIndex, first = true; _i2 < e; _i2++, first = false) {
|
|
95
95
|
if (!first && (0, _transform.canSplit)(tr.doc, splitPos, splitDepth)) {
|
|
96
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-expensive-split-replace -- Ignored via go/ees017 (to be fixed)
|
|
96
97
|
tr.split(splitPos, splitDepth);
|
|
97
98
|
splitPos += 2 * splitDepth;
|
|
98
99
|
}
|
|
@@ -6,7 +6,7 @@ import { listMessages as messages } from '@atlaskit/editor-common/messages';
|
|
|
6
6
|
import { IconList, IconListNumber } from '@atlaskit/editor-common/quick-insert';
|
|
7
7
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
8
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
9
|
-
import {
|
|
9
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
10
10
|
import { toggleBulletList as toggleBulletListCommand, toggleOrderedList as toggleOrderedListCommand } from './pm-plugins/commands';
|
|
11
11
|
import { indentList } from './pm-plugins/commands/indent-list';
|
|
12
12
|
import { outdentList } from './pm-plugins/commands/outdent-list';
|
|
@@ -34,7 +34,7 @@ export const listPlugin = ({
|
|
|
34
34
|
var _api$featureFlags, _api$analytics;
|
|
35
35
|
const featureFlags = (api === null || api === void 0 ? void 0 : (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
|
|
36
36
|
const editorAnalyticsAPI = api === null || api === void 0 ? void 0 : (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions;
|
|
37
|
-
if (
|
|
37
|
+
if (editorExperiment('platform_editor_block_menu', true)) {
|
|
38
38
|
var _api$blockMenu;
|
|
39
39
|
api === null || api === void 0 ? void 0 : (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 ? void 0 : _api$blockMenu.actions.registerBlockMenuComponents(getListComponents(api));
|
|
40
40
|
}
|
|
@@ -86,6 +86,7 @@ function doWrapInList(tr, range, wrappers, joinBefore, listType) {
|
|
|
86
86
|
const parent = range.parent;
|
|
87
87
|
for (let i = range.startIndex, e = range.endIndex, first = true; i < e; i++, first = false) {
|
|
88
88
|
if (!first && canSplit(tr.doc, splitPos, splitDepth)) {
|
|
89
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-expensive-split-replace -- Ignored via go/ees017 (to be fixed)
|
|
89
90
|
tr.split(splitPos, splitDepth);
|
|
90
91
|
splitPos += 2 * splitDepth;
|
|
91
92
|
}
|
package/dist/esm/listPlugin.js
CHANGED
|
@@ -6,7 +6,7 @@ import { listMessages as messages } from '@atlaskit/editor-common/messages';
|
|
|
6
6
|
import { IconList, IconListNumber } from '@atlaskit/editor-common/quick-insert';
|
|
7
7
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
8
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
9
|
-
import {
|
|
9
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
10
10
|
import { toggleBulletList as toggleBulletListCommand, toggleOrderedList as toggleOrderedListCommand } from './pm-plugins/commands';
|
|
11
11
|
import { indentList } from './pm-plugins/commands/indent-list';
|
|
12
12
|
import { outdentList as _outdentList } from './pm-plugins/commands/outdent-list';
|
|
@@ -33,7 +33,7 @@ export var listPlugin = function listPlugin(_ref) {
|
|
|
33
33
|
var api = _ref.api;
|
|
34
34
|
var featureFlags = (api === null || api === void 0 || (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
|
|
35
35
|
var editorAnalyticsAPI = api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions;
|
|
36
|
-
if (
|
|
36
|
+
if (editorExperiment('platform_editor_block_menu', true)) {
|
|
37
37
|
var _api$blockMenu;
|
|
38
38
|
api === null || api === void 0 || (_api$blockMenu = api.blockMenu) === null || _api$blockMenu === void 0 || _api$blockMenu.actions.registerBlockMenuComponents(getListComponents(api));
|
|
39
39
|
}
|
|
@@ -87,6 +87,7 @@ function doWrapInList(tr, range, wrappers, joinBefore, listType) {
|
|
|
87
87
|
var parent = range.parent;
|
|
88
88
|
for (var _i2 = range.startIndex, e = range.endIndex, first = true; _i2 < e; _i2++, first = false) {
|
|
89
89
|
if (!first && canSplit(tr.doc, splitPos, splitDepth)) {
|
|
90
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-expensive-split-replace -- Ignored via go/ees017 (to be fixed)
|
|
90
91
|
tr.split(splitPos, splitDepth);
|
|
91
92
|
splitPos += 2 * splitDepth;
|
|
92
93
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-list",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.12",
|
|
4
4
|
"description": "List plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
39
39
|
"@atlaskit/prosemirror-history": "^0.2.0",
|
|
40
40
|
"@atlaskit/prosemirror-input-rules": "^3.6.0",
|
|
41
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
41
|
+
"@atlaskit/tmp-editor-statsig": "^44.0.0",
|
|
42
42
|
"@babel/runtime": "^7.0.0"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|