@atlaskit/editor-plugin-list 0.1.0 → 0.2.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 +6 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/types.d.ts +30 -1
- package/dist/types-ts4.5/index.d.ts +1 -1
- package/dist/types-ts4.5/types.d.ts +30 -1
- package/package.json +2 -2
- package/report.api.md +56 -0
- package/tmp/api-report-tmp.d.ts +50 -0
package/CHANGELOG.md
CHANGED
package/dist/types/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export type { ListPlugin, ListPluginOptions } from './types';
|
|
1
|
+
export type { ListPlugin, ListPluginOptions, FindRootParentListNode, ListState, } from './types';
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,12 +1,41 @@
|
|
|
1
|
+
import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
1
2
|
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { Command, FeatureFlags } from '@atlaskit/editor-common/types';
|
|
3
4
|
import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
4
5
|
import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
|
|
6
|
+
import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
|
|
7
|
+
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
8
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
9
|
+
import type { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
10
|
+
type InputMethod = INPUT_METHOD.KEYBOARD | INPUT_METHOD.TOOLBAR;
|
|
5
11
|
export type ListPluginOptions = Pick<FeatureFlags, 'restartNumberedLists'>;
|
|
12
|
+
export type IndentList = (inputMethod: InputMethod) => Command;
|
|
13
|
+
export type OutdentList = (inputMethod: InputMethod, featureFlags: FeatureFlags) => Command;
|
|
14
|
+
export type ToggleOrderedList = (view: EditorView, inputMethod: InputMethod) => boolean;
|
|
15
|
+
export type ToggleBulletList = (view: EditorView, inputMethod: InputMethod) => boolean;
|
|
16
|
+
export type IsInsideListItem = (state: EditorState) => boolean;
|
|
17
|
+
export type FindRootParentListNode = ($pos: ResolvedPos) => ResolvedPos | null;
|
|
18
|
+
export interface ListState {
|
|
19
|
+
bulletListActive: boolean;
|
|
20
|
+
bulletListDisabled: boolean;
|
|
21
|
+
orderedListActive: boolean;
|
|
22
|
+
orderedListDisabled: boolean;
|
|
23
|
+
decorationSet: DecorationSet;
|
|
24
|
+
}
|
|
6
25
|
export type ListPlugin = NextEditorPlugin<'list', {
|
|
7
26
|
pluginConfiguration: ListPluginOptions | undefined;
|
|
8
27
|
dependencies: [
|
|
9
28
|
typeof featureFlagsPlugin,
|
|
10
29
|
OptionalPlugin<typeof analyticsPlugin>
|
|
11
30
|
];
|
|
31
|
+
actions: {
|
|
32
|
+
indentList: IndentList;
|
|
33
|
+
outdentList: OutdentList;
|
|
34
|
+
toggleOrderedList: ToggleOrderedList;
|
|
35
|
+
toggleBulletList: ToggleBulletList;
|
|
36
|
+
isInsideListItem: IsInsideListItem;
|
|
37
|
+
findRootParentListNode: FindRootParentListNode;
|
|
38
|
+
};
|
|
39
|
+
sharedState: ListState | undefined;
|
|
12
40
|
}>;
|
|
41
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type { ListPlugin, ListPluginOptions } from './types';
|
|
1
|
+
export type { ListPlugin, ListPluginOptions, FindRootParentListNode, ListState, } from './types';
|
|
@@ -1,12 +1,41 @@
|
|
|
1
|
+
import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
1
2
|
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { Command, FeatureFlags } from '@atlaskit/editor-common/types';
|
|
3
4
|
import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
4
5
|
import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
|
|
6
|
+
import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
|
|
7
|
+
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
8
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
9
|
+
import type { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
10
|
+
type InputMethod = INPUT_METHOD.KEYBOARD | INPUT_METHOD.TOOLBAR;
|
|
5
11
|
export type ListPluginOptions = Pick<FeatureFlags, 'restartNumberedLists'>;
|
|
12
|
+
export type IndentList = (inputMethod: InputMethod) => Command;
|
|
13
|
+
export type OutdentList = (inputMethod: InputMethod, featureFlags: FeatureFlags) => Command;
|
|
14
|
+
export type ToggleOrderedList = (view: EditorView, inputMethod: InputMethod) => boolean;
|
|
15
|
+
export type ToggleBulletList = (view: EditorView, inputMethod: InputMethod) => boolean;
|
|
16
|
+
export type IsInsideListItem = (state: EditorState) => boolean;
|
|
17
|
+
export type FindRootParentListNode = ($pos: ResolvedPos) => ResolvedPos | null;
|
|
18
|
+
export interface ListState {
|
|
19
|
+
bulletListActive: boolean;
|
|
20
|
+
bulletListDisabled: boolean;
|
|
21
|
+
orderedListActive: boolean;
|
|
22
|
+
orderedListDisabled: boolean;
|
|
23
|
+
decorationSet: DecorationSet;
|
|
24
|
+
}
|
|
6
25
|
export type ListPlugin = NextEditorPlugin<'list', {
|
|
7
26
|
pluginConfiguration: ListPluginOptions | undefined;
|
|
8
27
|
dependencies: [
|
|
9
28
|
typeof featureFlagsPlugin,
|
|
10
29
|
OptionalPlugin<typeof analyticsPlugin>
|
|
11
30
|
];
|
|
31
|
+
actions: {
|
|
32
|
+
indentList: IndentList;
|
|
33
|
+
outdentList: OutdentList;
|
|
34
|
+
toggleOrderedList: ToggleOrderedList;
|
|
35
|
+
toggleBulletList: ToggleBulletList;
|
|
36
|
+
isInsideListItem: IsInsideListItem;
|
|
37
|
+
findRootParentListNode: FindRootParentListNode;
|
|
38
|
+
};
|
|
39
|
+
sharedState: ListState | undefined;
|
|
12
40
|
}>;
|
|
41
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-list",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "List plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
".": "./src/index.ts"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@atlaskit/editor-common": "^74.
|
|
34
|
+
"@atlaskit/editor-common": "^74.49.0",
|
|
35
35
|
"@atlaskit/editor-plugin-analytics": "^0.1.0",
|
|
36
36
|
"@atlaskit/editor-plugin-feature-flags": "^0.1.0",
|
|
37
37
|
"@babel/runtime": "^7.0.0"
|
package/report.api.md
CHANGED
|
@@ -16,10 +16,28 @@
|
|
|
16
16
|
|
|
17
17
|
```ts
|
|
18
18
|
import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
19
|
+
import type { Command } from '@atlaskit/editor-common/types';
|
|
20
|
+
import type { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
21
|
+
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
22
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
19
23
|
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
20
24
|
import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
|
|
25
|
+
import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
21
26
|
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
22
27
|
import type { OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
28
|
+
import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
|
|
29
|
+
|
|
30
|
+
// @public (undocumented)
|
|
31
|
+
export type FindRootParentListNode = ($pos: ResolvedPos) => ResolvedPos | null;
|
|
32
|
+
|
|
33
|
+
// @public (undocumented)
|
|
34
|
+
type IndentList = (inputMethod: InputMethod) => Command;
|
|
35
|
+
|
|
36
|
+
// @public (undocumented)
|
|
37
|
+
type InputMethod = INPUT_METHOD.KEYBOARD | INPUT_METHOD.TOOLBAR;
|
|
38
|
+
|
|
39
|
+
// @public (undocumented)
|
|
40
|
+
type IsInsideListItem = (state: EditorState) => boolean;
|
|
23
41
|
|
|
24
42
|
// @public (undocumented)
|
|
25
43
|
export type ListPlugin = NextEditorPlugin<
|
|
@@ -30,12 +48,50 @@ export type ListPlugin = NextEditorPlugin<
|
|
|
30
48
|
typeof featureFlagsPlugin,
|
|
31
49
|
OptionalPlugin<typeof analyticsPlugin>,
|
|
32
50
|
];
|
|
51
|
+
actions: {
|
|
52
|
+
indentList: IndentList;
|
|
53
|
+
outdentList: OutdentList;
|
|
54
|
+
toggleOrderedList: ToggleOrderedList;
|
|
55
|
+
toggleBulletList: ToggleBulletList;
|
|
56
|
+
isInsideListItem: IsInsideListItem;
|
|
57
|
+
findRootParentListNode: FindRootParentListNode;
|
|
58
|
+
};
|
|
59
|
+
sharedState: ListState | undefined;
|
|
33
60
|
}
|
|
34
61
|
>;
|
|
35
62
|
|
|
36
63
|
// @public (undocumented)
|
|
37
64
|
export type ListPluginOptions = Pick<FeatureFlags, 'restartNumberedLists'>;
|
|
38
65
|
|
|
66
|
+
// @public (undocumented)
|
|
67
|
+
export interface ListState {
|
|
68
|
+
// (undocumented)
|
|
69
|
+
bulletListActive: boolean;
|
|
70
|
+
// (undocumented)
|
|
71
|
+
bulletListDisabled: boolean;
|
|
72
|
+
// (undocumented)
|
|
73
|
+
decorationSet: DecorationSet;
|
|
74
|
+
// (undocumented)
|
|
75
|
+
orderedListActive: boolean;
|
|
76
|
+
// (undocumented)
|
|
77
|
+
orderedListDisabled: boolean;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// @public (undocumented)
|
|
81
|
+
type OutdentList = (
|
|
82
|
+
inputMethod: InputMethod,
|
|
83
|
+
featureFlags: FeatureFlags,
|
|
84
|
+
) => Command;
|
|
85
|
+
|
|
86
|
+
// @public (undocumented)
|
|
87
|
+
type ToggleBulletList = (view: EditorView, inputMethod: InputMethod) => boolean;
|
|
88
|
+
|
|
89
|
+
// @public (undocumented)
|
|
90
|
+
type ToggleOrderedList = (
|
|
91
|
+
view: EditorView,
|
|
92
|
+
inputMethod: InputMethod,
|
|
93
|
+
) => boolean;
|
|
94
|
+
|
|
39
95
|
// (No @packageDocumentation comment for this package)
|
|
40
96
|
```
|
|
41
97
|
|
package/tmp/api-report-tmp.d.ts
CHANGED
|
@@ -5,10 +5,28 @@
|
|
|
5
5
|
```ts
|
|
6
6
|
|
|
7
7
|
import type { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
8
|
+
import type { Command } from '@atlaskit/editor-common/types';
|
|
9
|
+
import type { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
10
|
+
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
11
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
8
12
|
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
9
13
|
import type featureFlagsPlugin from '@atlaskit/editor-plugin-feature-flags';
|
|
14
|
+
import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
10
15
|
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
11
16
|
import type { OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
17
|
+
import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
|
|
18
|
+
|
|
19
|
+
// @public (undocumented)
|
|
20
|
+
export type FindRootParentListNode = ($pos: ResolvedPos) => ResolvedPos | null;
|
|
21
|
+
|
|
22
|
+
// @public (undocumented)
|
|
23
|
+
type IndentList = (inputMethod: InputMethod) => Command;
|
|
24
|
+
|
|
25
|
+
// @public (undocumented)
|
|
26
|
+
type InputMethod = INPUT_METHOD.KEYBOARD | INPUT_METHOD.TOOLBAR;
|
|
27
|
+
|
|
28
|
+
// @public (undocumented)
|
|
29
|
+
type IsInsideListItem = (state: EditorState) => boolean;
|
|
12
30
|
|
|
13
31
|
// @public (undocumented)
|
|
14
32
|
export type ListPlugin = NextEditorPlugin<'list', {
|
|
@@ -17,11 +35,43 @@ export type ListPlugin = NextEditorPlugin<'list', {
|
|
|
17
35
|
typeof featureFlagsPlugin,
|
|
18
36
|
OptionalPlugin<typeof analyticsPlugin>
|
|
19
37
|
];
|
|
38
|
+
actions: {
|
|
39
|
+
indentList: IndentList;
|
|
40
|
+
outdentList: OutdentList;
|
|
41
|
+
toggleOrderedList: ToggleOrderedList;
|
|
42
|
+
toggleBulletList: ToggleBulletList;
|
|
43
|
+
isInsideListItem: IsInsideListItem;
|
|
44
|
+
findRootParentListNode: FindRootParentListNode;
|
|
45
|
+
};
|
|
46
|
+
sharedState: ListState | undefined;
|
|
20
47
|
}>;
|
|
21
48
|
|
|
22
49
|
// @public (undocumented)
|
|
23
50
|
export type ListPluginOptions = Pick<FeatureFlags, 'restartNumberedLists'>;
|
|
24
51
|
|
|
52
|
+
// @public (undocumented)
|
|
53
|
+
export interface ListState {
|
|
54
|
+
// (undocumented)
|
|
55
|
+
bulletListActive: boolean;
|
|
56
|
+
// (undocumented)
|
|
57
|
+
bulletListDisabled: boolean;
|
|
58
|
+
// (undocumented)
|
|
59
|
+
decorationSet: DecorationSet;
|
|
60
|
+
// (undocumented)
|
|
61
|
+
orderedListActive: boolean;
|
|
62
|
+
// (undocumented)
|
|
63
|
+
orderedListDisabled: boolean;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// @public (undocumented)
|
|
67
|
+
type OutdentList = (inputMethod: InputMethod, featureFlags: FeatureFlags) => Command;
|
|
68
|
+
|
|
69
|
+
// @public (undocumented)
|
|
70
|
+
type ToggleBulletList = (view: EditorView, inputMethod: InputMethod) => boolean;
|
|
71
|
+
|
|
72
|
+
// @public (undocumented)
|
|
73
|
+
type ToggleOrderedList = (view: EditorView, inputMethod: InputMethod) => boolean;
|
|
74
|
+
|
|
25
75
|
// (No @packageDocumentation comment for this package)
|
|
26
76
|
|
|
27
77
|
```
|