@atlaskit/editor-plugin-list 13.0.15 → 14.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 +32 -0
- package/list-plugin/package.json +1 -8
- package/list-plugin-type/package.json +1 -8
- package/package.json +14 -22
- package/types/package.json +1 -8
- package/dist/types-ts4.5/entry-points/list-plugin-type.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/list-plugin.d.ts +0 -1
- package/dist/types-ts4.5/entry-points/types.d.ts +0 -1
- package/dist/types-ts4.5/index.d.ts +0 -3
- package/dist/types-ts4.5/listPlugin.d.ts +0 -6
- package/dist/types-ts4.5/listPluginType.d.ts +0 -29
- package/dist/types-ts4.5/pm-plugins/actions/conversions.d.ts +0 -6
- package/dist/types-ts4.5/pm-plugins/actions/indent-list-items-selected.d.ts +0 -2
- package/dist/types-ts4.5/pm-plugins/actions/indent-list.d.ts +0 -2
- package/dist/types-ts4.5/pm-plugins/actions/join-list-items-forward.d.ts +0 -16
- package/dist/types-ts4.5/pm-plugins/actions/join-list-items-scenarios/join-list-item-with-paragraph.d.ts +0 -9
- package/dist/types-ts4.5/pm-plugins/actions/join-list-items-scenarios/join-list-item-with-parent-nested-list.d.ts +0 -9
- package/dist/types-ts4.5/pm-plugins/actions/join-list-items-scenarios/join-nested-list-with-parent-list-item.d.ts +0 -9
- package/dist/types-ts4.5/pm-plugins/actions/join-list-items-scenarios/join-paragraph-with-list.d.ts +0 -9
- package/dist/types-ts4.5/pm-plugins/actions/join-list-items-scenarios/join-sibling-list-items.d.ts +0 -9
- package/dist/types-ts4.5/pm-plugins/actions/merge-lists.d.ts +0 -7
- package/dist/types-ts4.5/pm-plugins/actions/move-selected-list-items.d.ts +0 -5
- package/dist/types-ts4.5/pm-plugins/actions/outdent-list-items-selected.d.ts +0 -2
- package/dist/types-ts4.5/pm-plugins/actions/wrap-and-join-lists.d.ts +0 -17
- package/dist/types-ts4.5/pm-plugins/commands/indent-list.d.ts +0 -6
- package/dist/types-ts4.5/pm-plugins/commands/index.d.ts +0 -12
- package/dist/types-ts4.5/pm-plugins/commands/isFirstChildOfParent.d.ts +0 -2
- package/dist/types-ts4.5/pm-plugins/commands/join-list-item-forward.d.ts +0 -3
- package/dist/types-ts4.5/pm-plugins/commands/listBackspace.d.ts +0 -12
- package/dist/types-ts4.5/pm-plugins/commands/outdent-list.d.ts +0 -6
- package/dist/types-ts4.5/pm-plugins/input-rules/create-list-input-rule.d.ts +0 -10
- package/dist/types-ts4.5/pm-plugins/input-rules/index.d.ts +0 -4
- package/dist/types-ts4.5/pm-plugins/input-rules/wrapping-join-rule.d.ts +0 -12
- package/dist/types-ts4.5/pm-plugins/keymap.d.ts +0 -5
- package/dist/types-ts4.5/pm-plugins/main.d.ts +0 -12
- package/dist/types-ts4.5/pm-plugins/transforms.d.ts +0 -22
- package/dist/types-ts4.5/pm-plugins/utils/analytics.d.ts +0 -5
- package/dist/types-ts4.5/pm-plugins/utils/find.d.ts +0 -10
- package/dist/types-ts4.5/pm-plugins/utils/indentation.d.ts +0 -2
- package/dist/types-ts4.5/pm-plugins/utils/list-indentation.d.ts +0 -23
- package/dist/types-ts4.5/pm-plugins/utils/mark.d.ts +0 -8
- package/dist/types-ts4.5/pm-plugins/utils/node.d.ts +0 -2
- package/dist/types-ts4.5/pm-plugins/utils/selection.d.ts +0 -14
- package/dist/types-ts4.5/types/index.d.ts +0 -20
- package/dist/types-ts4.5/ui/BulletedListBlockMenuItem.d.ts +0 -8
- package/dist/types-ts4.5/ui/NumberedListBlockMenuItem.d.ts +0 -8
- package/dist/types-ts4.5/ui/index.d.ts +0 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-list
|
|
2
2
|
|
|
3
|
+
## 14.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [`f2dc9097319f0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f2dc9097319f0) - ###
|
|
8
|
+
Dropped support for _legacy_ Typescript 4 types. **Typescript 5 is now the new minimum**.
|
|
9
|
+
|
|
10
|
+
Removes the `typesVersions` property and `dist/types-ts4.5` directory from the dist.
|
|
11
|
+
|
|
12
|
+
Types are now exclusively via the `"types": "dist/types/index.d.ts"` property.
|
|
13
|
+
|
|
14
|
+
```diff
|
|
15
|
+
- "typesVersions": {
|
|
16
|
+
- ">=4.5 <4.9": {
|
|
17
|
+
- "*": [
|
|
18
|
+
- "dist/types-ts4.5/*",
|
|
19
|
+
- "dist/types-ts4.5/index.d.ts"
|
|
20
|
+
- ]
|
|
21
|
+
- }
|
|
22
|
+
- },
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- Updated dependencies
|
|
28
|
+
|
|
29
|
+
## 13.0.16
|
|
30
|
+
|
|
31
|
+
### Patch Changes
|
|
32
|
+
|
|
33
|
+
- Updated dependencies
|
|
34
|
+
|
|
3
35
|
## 13.0.15
|
|
4
36
|
|
|
5
37
|
### Patch Changes
|
package/list-plugin/package.json
CHANGED
|
@@ -4,12 +4,5 @@
|
|
|
4
4
|
"module": "../dist/esm/entry-points/list-plugin.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/entry-points/list-plugin.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/entry-points/list-plugin.d.ts"
|
|
8
|
-
"typesVersions": {
|
|
9
|
-
">=4.5 <5.9": {
|
|
10
|
-
"*": [
|
|
11
|
-
"../dist/types-ts4.5/entry-points/list-plugin.d.ts"
|
|
12
|
-
]
|
|
13
|
-
}
|
|
14
|
-
}
|
|
7
|
+
"types": "../dist/types/entry-points/list-plugin.d.ts"
|
|
15
8
|
}
|
|
@@ -4,12 +4,5 @@
|
|
|
4
4
|
"module": "../dist/esm/entry-points/list-plugin-type.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/entry-points/list-plugin-type.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/entry-points/list-plugin-type.d.ts"
|
|
8
|
-
"typesVersions": {
|
|
9
|
-
">=4.5 <5.9": {
|
|
10
|
-
"*": [
|
|
11
|
-
"../dist/types-ts4.5/entry-points/list-plugin-type.d.ts"
|
|
12
|
-
]
|
|
13
|
-
}
|
|
14
|
-
}
|
|
7
|
+
"types": "../dist/types/entry-points/list-plugin-type.d.ts"
|
|
15
8
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-list",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "14.0.0",
|
|
4
4
|
"description": "List plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -16,33 +16,25 @@
|
|
|
16
16
|
"module": "dist/esm/index.js",
|
|
17
17
|
"module:es2019": "dist/es2019/index.js",
|
|
18
18
|
"types": "dist/types/index.d.ts",
|
|
19
|
-
"typesVersions": {
|
|
20
|
-
">=4.5 <4.9": {
|
|
21
|
-
"*": [
|
|
22
|
-
"dist/types-ts4.5/*",
|
|
23
|
-
"dist/types-ts4.5/index.d.ts"
|
|
24
|
-
]
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
19
|
"sideEffects": false,
|
|
28
20
|
"atlaskit:src": "src/index.ts",
|
|
29
21
|
"dependencies": {
|
|
30
|
-
"@atlaskit/adf-schema": "^
|
|
31
|
-
"@atlaskit/editor-plugin-analytics": "^
|
|
32
|
-
"@atlaskit/editor-plugin-block-menu": "^
|
|
33
|
-
"@atlaskit/editor-plugin-feature-flags": "^
|
|
34
|
-
"@atlaskit/editor-plugin-toolbar": "^
|
|
35
|
-
"@atlaskit/editor-prosemirror": "^
|
|
36
|
-
"@atlaskit/editor-toolbar": "^
|
|
37
|
-
"@atlaskit/icon": "^
|
|
38
|
-
"@atlaskit/platform-feature-flags": "^
|
|
39
|
-
"@atlaskit/prosemirror-history": "^0.
|
|
40
|
-
"@atlaskit/prosemirror-input-rules": "^
|
|
41
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
22
|
+
"@atlaskit/adf-schema": "^55.0.0",
|
|
23
|
+
"@atlaskit/editor-plugin-analytics": "^12.0.0",
|
|
24
|
+
"@atlaskit/editor-plugin-block-menu": "^11.0.0",
|
|
25
|
+
"@atlaskit/editor-plugin-feature-flags": "^11.0.0",
|
|
26
|
+
"@atlaskit/editor-plugin-toolbar": "^9.0.0",
|
|
27
|
+
"@atlaskit/editor-prosemirror": "^8.0.0",
|
|
28
|
+
"@atlaskit/editor-toolbar": "^2.0.0",
|
|
29
|
+
"@atlaskit/icon": "^36.0.0",
|
|
30
|
+
"@atlaskit/platform-feature-flags": "^2.0.0",
|
|
31
|
+
"@atlaskit/prosemirror-history": "^1.0.0",
|
|
32
|
+
"@atlaskit/prosemirror-input-rules": "^4.0.0",
|
|
33
|
+
"@atlaskit/tmp-editor-statsig": "^104.0.0",
|
|
42
34
|
"@babel/runtime": "^7.0.0"
|
|
43
35
|
},
|
|
44
36
|
"peerDependencies": {
|
|
45
|
-
"@atlaskit/editor-common": "^
|
|
37
|
+
"@atlaskit/editor-common": "^116.0.0",
|
|
46
38
|
"react": "^18.2.0",
|
|
47
39
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
48
40
|
},
|
package/types/package.json
CHANGED
|
@@ -4,12 +4,5 @@
|
|
|
4
4
|
"module": "../dist/esm/entry-points/types.js",
|
|
5
5
|
"module:es2019": "../dist/es2019/entry-points/types.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"types": "../dist/types/entry-points/types.d.ts"
|
|
8
|
-
"typesVersions": {
|
|
9
|
-
">=4.5 <5.9": {
|
|
10
|
-
"*": [
|
|
11
|
-
"../dist/types-ts4.5/entry-points/types.d.ts"
|
|
12
|
-
]
|
|
13
|
-
}
|
|
14
|
-
}
|
|
7
|
+
"types": "../dist/types/entry-points/types.d.ts"
|
|
15
8
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { ListPlugin, ListPluginDependencies, ListPluginActions, ListPluginCommands, ListPluginSharedState, } from '../listPluginType';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { listPlugin } from '../listPlugin';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { FindRootParentListNode, IndentList, InputMethod, IsInsideListItem, ListState, OutdentList, ToggleBulletList, ToggleOrderedList, } from '../types/index';
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export type { FindRootParentListNode, IndentList, InputMethod, IsInsideListItem, ListState, OutdentList, ToggleBulletList, ToggleOrderedList, } from './types';
|
|
2
|
-
export { listPlugin } from './listPlugin';
|
|
3
|
-
export type { ListPlugin, ListPluginDependencies, ListPluginActions, ListPluginCommands, ListPluginSharedState, } from './listPluginType';
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
3
|
-
import type { BlockMenuPlugin } from '@atlaskit/editor-plugin-block-menu';
|
|
4
|
-
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
5
|
-
import type { ToolbarPlugin } from '@atlaskit/editor-plugin-toolbar';
|
|
6
|
-
import type { FindRootParentListNode, IndentList, IsInsideListItem, ListState, OutdentList, ToggleBulletList, ToggleOrderedList } from './types';
|
|
7
|
-
export type ListPluginDependencies = [
|
|
8
|
-
OptionalPlugin<FeatureFlagsPlugin>,
|
|
9
|
-
OptionalPlugin<AnalyticsPlugin>,
|
|
10
|
-
OptionalPlugin<BlockMenuPlugin>,
|
|
11
|
-
OptionalPlugin<ToolbarPlugin>
|
|
12
|
-
];
|
|
13
|
-
export type ListPluginActions = {
|
|
14
|
-
findRootParentListNode: FindRootParentListNode;
|
|
15
|
-
isInsideListItem: IsInsideListItem;
|
|
16
|
-
};
|
|
17
|
-
export type ListPluginCommands = {
|
|
18
|
-
indentList: IndentList;
|
|
19
|
-
outdentList: OutdentList;
|
|
20
|
-
toggleBulletList: ToggleBulletList;
|
|
21
|
-
toggleOrderedList: ToggleOrderedList;
|
|
22
|
-
};
|
|
23
|
-
export type ListPluginSharedState = ListState | undefined;
|
|
24
|
-
export type ListPlugin = NextEditorPlugin<'list', {
|
|
25
|
-
actions: ListPluginActions;
|
|
26
|
-
commands: ListPluginCommands;
|
|
27
|
-
dependencies: ListPluginDependencies;
|
|
28
|
-
sharedState: ListPluginSharedState;
|
|
29
|
-
}>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
export declare function convertListType({ tr, nextListNodeType, }: {
|
|
4
|
-
nextListNodeType: NodeType;
|
|
5
|
-
tr: Transaction;
|
|
6
|
-
}): void;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { LIST_TEXT_SCENARIOS } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import type { WalkNode } from '@atlaskit/editor-common/utils';
|
|
3
|
-
import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
|
|
4
|
-
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
5
|
-
type ScenariosAllowed = LIST_TEXT_SCENARIOS.JOIN_PARAGRAPH_WITH_LIST | LIST_TEXT_SCENARIOS.JOIN_SIBLINGS | LIST_TEXT_SCENARIOS.JOIN_DESCENDANT_TO_PARENT | LIST_TEXT_SCENARIOS.JOIN_PARENT_SIBLING_TO_PARENT_CHILD | LIST_TEXT_SCENARIOS.JOIN_LIST_ITEM_WITH_PARAGRAPH;
|
|
6
|
-
type DeleteAction = (props: {
|
|
7
|
-
$head: ResolvedPos;
|
|
8
|
-
$next: ResolvedPos;
|
|
9
|
-
tr: Transaction;
|
|
10
|
-
}) => boolean;
|
|
11
|
-
type ScenarioAction = false | [
|
|
12
|
-
ScenariosAllowed,
|
|
13
|
-
DeleteAction
|
|
14
|
-
];
|
|
15
|
-
export declare const calcJoinListScenario: (walkNode: WalkNode, $head: ResolvedPos) => ScenarioAction;
|
|
16
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
type DeleteAction = (props: {
|
|
4
|
-
$head: ResolvedPos;
|
|
5
|
-
$next: ResolvedPos;
|
|
6
|
-
tr: Transaction;
|
|
7
|
-
}) => boolean;
|
|
8
|
-
export declare const joinListItemWithParagraph: DeleteAction;
|
|
9
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
type DeleteAction = (props: {
|
|
4
|
-
$head: ResolvedPos;
|
|
5
|
-
$next: ResolvedPos;
|
|
6
|
-
tr: Transaction;
|
|
7
|
-
}) => boolean;
|
|
8
|
-
export declare const joinListItemWithParentNestedList: DeleteAction;
|
|
9
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
type DeleteAction = (props: {
|
|
4
|
-
$head: ResolvedPos;
|
|
5
|
-
$next: ResolvedPos;
|
|
6
|
-
tr: Transaction;
|
|
7
|
-
}) => boolean;
|
|
8
|
-
export declare const joinNestedListWithParentListItem: DeleteAction;
|
|
9
|
-
export {};
|
package/dist/types-ts4.5/pm-plugins/actions/join-list-items-scenarios/join-paragraph-with-list.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
type DeleteAction = (props: {
|
|
4
|
-
$head: ResolvedPos;
|
|
5
|
-
$next: ResolvedPos;
|
|
6
|
-
tr: Transaction;
|
|
7
|
-
}) => boolean;
|
|
8
|
-
export declare const joinParagrapWithList: DeleteAction;
|
|
9
|
-
export {};
|
package/dist/types-ts4.5/pm-plugins/actions/join-list-items-scenarios/join-sibling-list-items.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
type DeleteAction = (props: {
|
|
4
|
-
$head: ResolvedPos;
|
|
5
|
-
$next: ResolvedPos;
|
|
6
|
-
tr: Transaction;
|
|
7
|
-
}) => boolean;
|
|
8
|
-
export declare const joinSiblingListItems: DeleteAction;
|
|
9
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
type MergeNextListAtPositionProps = {
|
|
3
|
-
listPosition: number;
|
|
4
|
-
tr: Transaction;
|
|
5
|
-
};
|
|
6
|
-
export declare function mergeNextListAtPosition({ tr, listPosition }: MergeNextListAtPositionProps): void;
|
|
7
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
/**
|
|
4
|
-
* Wraps the selection in a list with the given type. If this results in
|
|
5
|
-
* two adjacent lists of the same type, those will be joined together.
|
|
6
|
-
*/
|
|
7
|
-
export declare function wrapInListAndJoin(nodeType: NodeType, tr: Transaction): void;
|
|
8
|
-
type Attrs = {
|
|
9
|
-
[key: string]: any;
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* Wraps the selection in a list with the given type and attributes.
|
|
13
|
-
*
|
|
14
|
-
* Adapted from https://github.com/ProseMirror/prosemirror-schema-list/blob/master/src/schema-list.js#L64-L89
|
|
15
|
-
*/
|
|
16
|
-
export declare function wrapInList(listType: NodeType, attrs?: Attrs): (tr: Transaction) => boolean;
|
|
17
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
3
|
-
import type { EditorCommand } from '@atlaskit/editor-common/types';
|
|
4
|
-
type InputMethod = INPUT_METHOD.KEYBOARD | INPUT_METHOD.TOOLBAR | INPUT_METHOD.FLOATING_TB;
|
|
5
|
-
export declare const indentList: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (inputMethod?: InputMethod) => EditorCommand;
|
|
6
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
3
|
-
import type { Command, EditorCommand } from '@atlaskit/editor-common/types';
|
|
4
|
-
import type { NodeType, ResolvedPos } from '@atlaskit/editor-prosemirror/model';
|
|
5
|
-
export type InputMethod = INPUT_METHOD.KEYBOARD | INPUT_METHOD.TOOLBAR | INPUT_METHOD.FLOATING_TB;
|
|
6
|
-
export declare const enterKeyCommand: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => () => Command;
|
|
7
|
-
export declare const backspaceKeyCommand: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => () => Command;
|
|
8
|
-
export declare const deleteKeyCommand: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => Command;
|
|
9
|
-
export declare const rootListDepth: (pos: ResolvedPos, nodes: Record<string, NodeType>) => number | undefined;
|
|
10
|
-
export declare const toggleList: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (inputMethod: InputMethod, listType: "bulletList" | "orderedList") => EditorCommand;
|
|
11
|
-
export declare const toggleBulletList: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (inputMethod?: InputMethod) => EditorCommand;
|
|
12
|
-
export declare const toggleOrderedList: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (inputMethod?: InputMethod) => EditorCommand;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import { LIST_TEXT_SCENARIOS } from '@atlaskit/editor-common/analytics';
|
|
3
|
-
import type { CommandDispatch } from '@atlaskit/editor-common/types';
|
|
4
|
-
import type { WalkNode } from '@atlaskit/editor-common/utils';
|
|
5
|
-
import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
|
|
6
|
-
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
7
|
-
export type ScenariosAllowed = LIST_TEXT_SCENARIOS.JOIN_SIBLINGS | LIST_TEXT_SCENARIOS.JOIN_DESCENDANT_TO_PARENT | LIST_TEXT_SCENARIOS.JOIN_TO_SIBLING_DESCENDANT;
|
|
8
|
-
export declare const calcJoinListScenario: (walkNode: WalkNode, $head: ResolvedPos, tr: Transaction) => [
|
|
9
|
-
ScenariosAllowed,
|
|
10
|
-
ResolvedPos | null
|
|
11
|
-
] | false;
|
|
12
|
-
export declare const listBackspace: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (state: EditorState, dispatch?: CommandDispatch) => boolean;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
3
|
-
import type { EditorCommand } from '@atlaskit/editor-common/types';
|
|
4
|
-
type InputMethod = INPUT_METHOD.KEYBOARD | INPUT_METHOD.TOOLBAR | INPUT_METHOD.FLOATING_TB;
|
|
5
|
-
export declare const outdentList: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (inputMethod?: InputMethod) => EditorCommand;
|
|
6
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import type { InputRuleWrapper } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
4
|
-
type Props = {
|
|
5
|
-
editorAnalyticsApi: EditorAnalyticsAPI | undefined;
|
|
6
|
-
expression: RegExp;
|
|
7
|
-
listType: NodeType;
|
|
8
|
-
};
|
|
9
|
-
export declare function createRuleForListType({ listType, expression, editorAnalyticsApi, }: Props): InputRuleWrapper;
|
|
10
|
-
export {};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
|
-
import type { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
4
|
-
export default function inputRulePlugin(schema: Schema, editorAnalyticsApi: EditorAnalyticsAPI | undefined): SafePlugin | undefined;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { JOIN_SCENARIOS_WHEN_TYPING_TO_INSERT_LIST } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import type { InputRuleWrapper } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { NodeType, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
4
|
-
type Attrs = Record<string, any>;
|
|
5
|
-
type WrappingRuleProps = {
|
|
6
|
-
getAttrs?: Attrs | ((matchResult: RegExpExecArray) => Attrs);
|
|
7
|
-
joinPredicate?: (matchResult: RegExpExecArray, node: PMNode, joinScenario: JOIN_SCENARIOS_WHEN_TYPING_TO_INSERT_LIST) => boolean;
|
|
8
|
-
match: RegExp;
|
|
9
|
-
nodeType: NodeType;
|
|
10
|
-
};
|
|
11
|
-
export declare const createWrappingJoinRule: ({ match, nodeType, getAttrs, joinPredicate, }: WrappingRuleProps) => InputRuleWrapper;
|
|
12
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
|
-
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
4
|
-
export declare function keymapPlugin(featureFlags: FeatureFlags, editorAnalyticsAPI: EditorAnalyticsAPI | undefined): SafePlugin | undefined;
|
|
5
|
-
export default keymapPlugin;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { Dispatch } from '@atlaskit/editor-common/event-dispatcher';
|
|
2
|
-
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
|
-
import type { ExtractInjectionAPI, FeatureFlags } from '@atlaskit/editor-common/types';
|
|
4
|
-
import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
5
|
-
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
6
|
-
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
7
|
-
import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
8
|
-
import type { ListPlugin } from '../listPluginType';
|
|
9
|
-
import type { ListState } from '../types';
|
|
10
|
-
export declare const pluginKey: PluginKey<ListState>;
|
|
11
|
-
export declare const getDecorations: (doc: Node, _state: EditorState, _featureFlags: FeatureFlags) => DecorationSet;
|
|
12
|
-
export declare const createPlugin: (eventDispatch: Dispatch, featureFlags: FeatureFlags, api?: ExtractInjectionAPI<ListPlugin>) => SafePlugin;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { Node, Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type { Selection, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
export declare function liftFollowingList(from: number, to: number, rootListDepth: number, tr: Transaction): Transaction;
|
|
4
|
-
export declare function liftNodeSelectionList(selection: Selection, tr: Transaction): Transaction;
|
|
5
|
-
export declare function liftTextSelectionList(selection: Selection, tr: Transaction): Transaction;
|
|
6
|
-
interface ApplyListNormalisationFixesOptions {
|
|
7
|
-
doc: Node;
|
|
8
|
-
schema: Schema;
|
|
9
|
-
tr: Transaction;
|
|
10
|
-
transactions: readonly Transaction[];
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Applies list normalisation fixes to the given transaction for all affected list subtrees.
|
|
14
|
-
* Processes nodes in reverse document order so that position offsets from insertions/joins
|
|
15
|
-
* do not affect earlier positions.
|
|
16
|
-
*
|
|
17
|
-
* When platform_editor_flexible_list_indentation is off: inserts an empty paragraph before any listItem whose
|
|
18
|
-
* first child is a list node, and merges adjacent same-type list nodes within a listItem.
|
|
19
|
-
* When platform_editor_flexible_list_indentation is on: only merges adjacent same-type list nodes.
|
|
20
|
-
*/
|
|
21
|
-
export declare function applyListNormalisationFixes({ tr, transactions, doc, schema, }: ApplyListNormalisationFixesOptions): Transaction;
|
|
22
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { RestartListsAttributesForListOutdented } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
export declare const RESTART_LISTS_ANALYTICS_KEY = "restartListsAnalytics";
|
|
4
|
-
export declare const getRestartListsAttributes: (tr: Transaction) => RestartListsAttributesForListOutdented;
|
|
5
|
-
export declare const storeRestartListsAttributes: (tr: Transaction, attributes: RestartListsAttributesForListOutdented) => void;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { Node as PMNode, ResolvedPos } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
export declare function findFirstParentListNode($pos: ResolvedPos): {
|
|
3
|
-
node: PMNode;
|
|
4
|
-
pos: number;
|
|
5
|
-
} | null;
|
|
6
|
-
export declare function findFirstParentListItemNode($pos: ResolvedPos): {
|
|
7
|
-
node: PMNode;
|
|
8
|
-
pos: number;
|
|
9
|
-
} | null;
|
|
10
|
-
export declare const findRootParentListNode: ($pos: ResolvedPos) => ResolvedPos | null;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { type BuildResult, type FlattenedItem, type FlattenListOptions, type FlattenListResult } from '@atlaskit/editor-common/lists';
|
|
2
|
-
import type { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
-
/**
|
|
4
|
-
* Flatten a root list into a flat array of content-bearing items
|
|
5
|
-
* and simultaneously determine which elements intersect the user's selection.
|
|
6
|
-
*
|
|
7
|
-
* Delegates to the shared `flattenListLike` with list-specific callbacks.
|
|
8
|
-
* Selection intersection is checked against each item's content-only
|
|
9
|
-
* span (excluding nested lists).
|
|
10
|
-
*/
|
|
11
|
-
export declare function flattenList(options: FlattenListOptions): FlattenListResult | null;
|
|
12
|
-
/**
|
|
13
|
-
* Build a replacement Fragment from a flat array of `FlattenedItem` objects.
|
|
14
|
-
*
|
|
15
|
-
* Elements with depth >= 0 are grouped into consecutive list segments
|
|
16
|
-
* and rebuilt via `rebuildPMList`. Elements with depth < 0 (extracted
|
|
17
|
-
* past the root) are converted to their content children (paragraphs).
|
|
18
|
-
* The result interleaves list nodes and extracted content in document order.
|
|
19
|
-
*
|
|
20
|
-
* Delegates to the shared `buildReplacementFragment` with list-specific
|
|
21
|
-
* rebuild and extraction functions.
|
|
22
|
-
*/
|
|
23
|
-
export declare function buildReplacementFragment(elements: FlattenedItem[], schema: Schema): BuildResult;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Mark, Node, NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
type NodesSanitized = Array<{
|
|
4
|
-
marksRemoved: Mark[];
|
|
5
|
-
node: Node;
|
|
6
|
-
}>;
|
|
7
|
-
export declare const sanitiseMarksInSelection: (tr: Transaction, newParentType?: NodeType) => NodesSanitized;
|
|
8
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { NodeRange, NodeType, Node as PMNode, ResolvedPos } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type { Selection, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
export declare const isPosInsideParagraph: ($pos: ResolvedPos) => boolean;
|
|
4
|
-
export declare const isPosInsideList: ($pos: ResolvedPos) => boolean;
|
|
5
|
-
export declare const isWrappingPossible: (nodeType: NodeType, selection: Selection) => boolean;
|
|
6
|
-
export declare const isInsideListItem: (tr: Transaction) => boolean;
|
|
7
|
-
export declare const isInsideTableCell: (tr: Transaction) => boolean;
|
|
8
|
-
export declare const canJoinToPreviousListItem: (tr: Transaction) => boolean;
|
|
9
|
-
export declare const selectionContainsList: (tr: Transaction) => PMNode | null;
|
|
10
|
-
type CreateNodeRange = (props: {
|
|
11
|
-
selection: Selection;
|
|
12
|
-
}) => NodeRange | null;
|
|
13
|
-
export declare const createListNodeRange: CreateNodeRange;
|
|
14
|
-
export {};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import type { EditorCommand } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
|
|
4
|
-
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
5
|
-
import type { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
6
|
-
export type InputMethod = INPUT_METHOD.KEYBOARD | INPUT_METHOD.TOOLBAR | INPUT_METHOD.FLOATING_TB;
|
|
7
|
-
export declare const MAX_NESTED_LIST_INDENTATION = 6;
|
|
8
|
-
export type IndentList = (inputMethod: InputMethod) => EditorCommand;
|
|
9
|
-
export type OutdentList = (inputMethod: InputMethod) => EditorCommand;
|
|
10
|
-
export type ToggleOrderedList = (inputMethod: InputMethod) => EditorCommand;
|
|
11
|
-
export type ToggleBulletList = (inputMethod: InputMethod) => EditorCommand;
|
|
12
|
-
export type IsInsideListItem = (tr: Transaction) => boolean;
|
|
13
|
-
export type FindRootParentListNode = ($pos: ResolvedPos) => ResolvedPos | null;
|
|
14
|
-
export interface ListState {
|
|
15
|
-
bulletListActive: boolean;
|
|
16
|
-
bulletListDisabled: boolean;
|
|
17
|
-
decorationSet: DecorationSet;
|
|
18
|
-
orderedListActive: boolean;
|
|
19
|
-
orderedListDisabled: boolean;
|
|
20
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { ListPlugin } from '../listPluginType';
|
|
4
|
-
type BulletedListBlockMenuItemProps = {
|
|
5
|
-
api: ExtractInjectionAPI<ListPlugin> | undefined;
|
|
6
|
-
};
|
|
7
|
-
export declare const createBulletedListBlockMenuItem: ({ api }: BulletedListBlockMenuItemProps) => () => React.JSX.Element;
|
|
8
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
|
-
import type { ListPlugin } from '../listPluginType';
|
|
4
|
-
type NumberedListBlockMenuItemProps = {
|
|
5
|
-
api: ExtractInjectionAPI<ListPlugin> | undefined;
|
|
6
|
-
};
|
|
7
|
-
export declare const createNumberedListBlockMenuItem: ({ api }: NumberedListBlockMenuItemProps) => () => React.JSX.Element;
|
|
8
|
-
export {};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
2
|
-
import type { RegisterBlockMenuComponent } from '@atlaskit/editor-plugin-block-menu';
|
|
3
|
-
import type { ListPlugin } from '../listPluginType';
|
|
4
|
-
export declare const getListComponents: (api: ExtractInjectionAPI<ListPlugin> | undefined) => RegisterBlockMenuComponent[];
|