@atlaskit/editor-plugin-list 3.1.10 → 3.1.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 +37 -0
- package/dist/cjs/pm-plugins/input-rules/index.js +2 -1
- package/dist/cjs/pm-plugins/input-rules/wrapping-join-rule.js +1 -2
- package/dist/es2019/pm-plugins/input-rules/index.js +2 -1
- package/dist/es2019/pm-plugins/input-rules/wrapping-join-rule.js +1 -2
- package/dist/esm/pm-plugins/input-rules/index.js +2 -1
- package/dist/esm/pm-plugins/input-rules/wrapping-join-rule.js +1 -2
- package/dist/types/pm-plugins/input-rules/create-list-input-rule.d.ts +1 -1
- package/dist/types/pm-plugins/input-rules/index.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/input-rules/create-list-input-rule.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/input-rules/index.d.ts +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,42 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-list
|
|
2
2
|
|
|
3
|
+
## 3.1.12
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#78224](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/78224) [`6b4c9dd4ad34`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/6b4c9dd4ad34) - ED-22219: adf-schema updated to 35.5.2
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
10
|
+
## 3.1.11
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [#75482](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/75482) [`18b5a6fb910a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/18b5a6fb910a) - # MAJOR CHANGE to `@atlaskit/prosemirror-input-rules` package.
|
|
15
|
+
|
|
16
|
+
## WHY?
|
|
17
|
+
|
|
18
|
+
Removing editor-common dependencies from prosemirror-input-rules package.
|
|
19
|
+
|
|
20
|
+
This makes it easier for editor updates because it simplifies our dependency graph.
|
|
21
|
+
|
|
22
|
+
## WHAT and HOW?
|
|
23
|
+
|
|
24
|
+
These are no longer available via `@atlaskit/prosemirror-input-rules` but are available from `@atlaskit/editor-common/types`:
|
|
25
|
+
|
|
26
|
+
- InputRuleWrapper
|
|
27
|
+
- InputRuleHandler
|
|
28
|
+
- OnHandlerApply
|
|
29
|
+
- createRule
|
|
30
|
+
|
|
31
|
+
These have changed from a `SafePlugin` to a `SafePluginSpec`. In order to update your code you need to instantiate a `SafePlugin` (ie. `new SafePlugin(createPlugin( ... ))`).
|
|
32
|
+
|
|
33
|
+
`SafePlugin` exists in `@atlaskit/editor-common/safe-plugin`.
|
|
34
|
+
|
|
35
|
+
- createPlugin
|
|
36
|
+
- createInputRulePlugin
|
|
37
|
+
|
|
38
|
+
- Updated dependencies
|
|
39
|
+
|
|
3
40
|
## 3.1.10
|
|
4
41
|
|
|
5
42
|
### Patch Changes
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = inputRulePlugin;
|
|
7
|
+
var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
|
|
7
8
|
var _prosemirrorInputRules = require("@atlaskit/prosemirror-input-rules");
|
|
8
9
|
var _createListInputRule = require("./create-list-input-rule");
|
|
9
10
|
function inputRulePlugin(schema, editorAnalyticsApi) {
|
|
@@ -30,7 +31,7 @@ function inputRulePlugin(schema, editorAnalyticsApi) {
|
|
|
30
31
|
}));
|
|
31
32
|
}
|
|
32
33
|
if (rules.length !== 0) {
|
|
33
|
-
return (0, _prosemirrorInputRules.createPlugin)('lists', rules);
|
|
34
|
+
return new _safePlugin.SafePlugin((0, _prosemirrorInputRules.createPlugin)('lists', rules));
|
|
34
35
|
}
|
|
35
36
|
return;
|
|
36
37
|
}
|
|
@@ -9,7 +9,6 @@ var _utils = require("@atlaskit/editor-common/utils");
|
|
|
9
9
|
var _transform = require("@atlaskit/editor-prosemirror/transform");
|
|
10
10
|
var _utils2 = require("@atlaskit/editor-prosemirror/utils");
|
|
11
11
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
|
-
var _prosemirrorInputRules = require("@atlaskit/prosemirror-input-rules");
|
|
13
12
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
14
13
|
|
|
15
14
|
var createWrappingJoinRule = exports.createWrappingJoinRule = function createWrappingJoinRule(_ref) {
|
|
@@ -59,5 +58,5 @@ var createWrappingJoinRule = exports.createWrappingJoinRule = function createWra
|
|
|
59
58
|
}
|
|
60
59
|
return tr;
|
|
61
60
|
};
|
|
62
|
-
return (0,
|
|
61
|
+
return (0, _utils.createRule)(match, handler);
|
|
63
62
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
1
2
|
import { createPlugin } from '@atlaskit/prosemirror-input-rules';
|
|
2
3
|
import { createRuleForListType } from './create-list-input-rule';
|
|
3
4
|
export default function inputRulePlugin(schema, editorAnalyticsApi) {
|
|
@@ -27,7 +28,7 @@ export default function inputRulePlugin(schema, editorAnalyticsApi) {
|
|
|
27
28
|
}));
|
|
28
29
|
}
|
|
29
30
|
if (rules.length !== 0) {
|
|
30
|
-
return createPlugin('lists', rules);
|
|
31
|
+
return new SafePlugin(createPlugin('lists', rules));
|
|
31
32
|
}
|
|
32
33
|
return;
|
|
33
34
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { JOIN_SCENARIOS_WHEN_TYPING_TO_INSERT_LIST } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import { isOrderedList, isOrderedListContinuous } from '@atlaskit/editor-common/utils';
|
|
2
|
+
import { createRule, isOrderedList, isOrderedListContinuous } from '@atlaskit/editor-common/utils';
|
|
3
3
|
import { canJoin, findWrapping } from '@atlaskit/editor-prosemirror/transform';
|
|
4
4
|
import { findParentNodeOfTypeClosestToPos } from '@atlaskit/editor-prosemirror/utils';
|
|
5
5
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
6
|
-
import { createRule } from '@atlaskit/prosemirror-input-rules';
|
|
7
6
|
|
|
8
7
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9
8
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
1
2
|
import { createPlugin } from '@atlaskit/prosemirror-input-rules';
|
|
2
3
|
import { createRuleForListType } from './create-list-input-rule';
|
|
3
4
|
export default function inputRulePlugin(schema, editorAnalyticsApi) {
|
|
@@ -24,7 +25,7 @@ export default function inputRulePlugin(schema, editorAnalyticsApi) {
|
|
|
24
25
|
}));
|
|
25
26
|
}
|
|
26
27
|
if (rules.length !== 0) {
|
|
27
|
-
return createPlugin('lists', rules);
|
|
28
|
+
return new SafePlugin(createPlugin('lists', rules));
|
|
28
29
|
}
|
|
29
30
|
return;
|
|
30
31
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { JOIN_SCENARIOS_WHEN_TYPING_TO_INSERT_LIST } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import { isOrderedList, isOrderedListContinuous } from '@atlaskit/editor-common/utils';
|
|
2
|
+
import { createRule, isOrderedList, isOrderedListContinuous } from '@atlaskit/editor-common/utils';
|
|
3
3
|
import { canJoin, findWrapping } from '@atlaskit/editor-prosemirror/transform';
|
|
4
4
|
import { findParentNodeOfTypeClosestToPos } from '@atlaskit/editor-prosemirror/utils';
|
|
5
5
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
6
|
-
import { createRule } from '@atlaskit/prosemirror-input-rules';
|
|
7
6
|
|
|
8
7
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9
8
|
|
|
@@ -5,5 +5,5 @@ type Props = {
|
|
|
5
5
|
expression: RegExp;
|
|
6
6
|
editorAnalyticsApi: EditorAnalyticsAPI | undefined;
|
|
7
7
|
};
|
|
8
|
-
export declare function createRuleForListType({ listType, expression, editorAnalyticsApi, }: Props): import("@atlaskit/
|
|
8
|
+
export declare function createRuleForListType({ listType, expression, editorAnalyticsApi, }: Props): import("@atlaskit/editor-common/types").InputRuleWrapper;
|
|
9
9
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import
|
|
2
|
+
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
3
|
import type { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
4
4
|
export default function inputRulePlugin(schema: Schema, editorAnalyticsApi: EditorAnalyticsAPI | undefined): SafePlugin | undefined;
|
|
@@ -5,5 +5,5 @@ type Props = {
|
|
|
5
5
|
expression: RegExp;
|
|
6
6
|
editorAnalyticsApi: EditorAnalyticsAPI | undefined;
|
|
7
7
|
};
|
|
8
|
-
export declare function createRuleForListType({ listType, expression, editorAnalyticsApi, }: Props): import("@atlaskit/
|
|
8
|
+
export declare function createRuleForListType({ listType, expression, editorAnalyticsApi, }: Props): import("@atlaskit/editor-common/types").InputRuleWrapper;
|
|
9
9
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import
|
|
2
|
+
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
3
|
import type { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
4
4
|
export default function inputRulePlugin(schema: Schema, editorAnalyticsApi: EditorAnalyticsAPI | undefined): SafePlugin | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-list",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.12",
|
|
4
4
|
"description": "List plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,13 +32,13 @@
|
|
|
32
32
|
".": "./src/index.ts"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@atlaskit/adf-schema": "^35.5.
|
|
36
|
-
"@atlaskit/editor-common": "^78.
|
|
35
|
+
"@atlaskit/adf-schema": "^35.5.2",
|
|
36
|
+
"@atlaskit/editor-common": "^78.10.0",
|
|
37
37
|
"@atlaskit/editor-plugin-analytics": "^1.0.0",
|
|
38
38
|
"@atlaskit/editor-plugin-feature-flags": "^1.0.0",
|
|
39
39
|
"@atlaskit/editor-prosemirror": "3.0.0",
|
|
40
40
|
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
41
|
-
"@atlaskit/prosemirror-input-rules": "^
|
|
41
|
+
"@atlaskit/prosemirror-input-rules": "^3.0.0",
|
|
42
42
|
"@babel/runtime": "^7.0.0"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|