@atlaskit/editor-plugin-list 2.0.0 → 3.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 +6 -0
- package/dist/cjs/actions/outdent-list-items-selected.js +40 -49
- package/dist/cjs/commands/index.js +4 -4
- package/dist/cjs/commands/outdent-list.js +7 -10
- package/dist/cjs/plugin.js +3 -3
- package/dist/cjs/pm-plugins/input-rules/create-list-input-rule.js +7 -11
- package/dist/cjs/pm-plugins/input-rules/index.js +2 -4
- package/dist/cjs/pm-plugins/input-rules/wrapping-join-rule.js +2 -3
- package/dist/cjs/pm-plugins/keymap.js +3 -3
- package/dist/cjs/pm-plugins/main.js +1 -7
- package/dist/es2019/actions/outdent-list-items-selected.js +43 -52
- package/dist/es2019/commands/index.js +4 -4
- package/dist/es2019/commands/outdent-list.js +9 -11
- package/dist/es2019/plugin.js +4 -4
- package/dist/es2019/pm-plugins/input-rules/create-list-input-rule.js +7 -11
- package/dist/es2019/pm-plugins/input-rules/index.js +2 -4
- package/dist/es2019/pm-plugins/input-rules/wrapping-join-rule.js +2 -3
- package/dist/es2019/pm-plugins/keymap.js +3 -3
- package/dist/es2019/pm-plugins/main.js +1 -7
- package/dist/esm/actions/outdent-list-items-selected.js +40 -49
- package/dist/esm/commands/index.js +4 -4
- package/dist/esm/commands/outdent-list.js +7 -10
- package/dist/esm/plugin.js +4 -4
- package/dist/esm/pm-plugins/input-rules/create-list-input-rule.js +7 -11
- package/dist/esm/pm-plugins/input-rules/index.js +2 -4
- package/dist/esm/pm-plugins/input-rules/wrapping-join-rule.js +2 -3
- package/dist/esm/pm-plugins/keymap.js +3 -3
- package/dist/esm/pm-plugins/main.js +1 -7
- package/dist/types/actions/outdent-list-items-selected.d.ts +1 -2
- package/dist/types/commands/index.d.ts +3 -3
- package/dist/types/commands/outdent-list.d.ts +2 -2
- package/dist/types/index.d.ts +1 -1
- package/dist/types/pm-plugins/input-rules/create-list-input-rule.d.ts +1 -3
- package/dist/types/pm-plugins/input-rules/index.d.ts +1 -2
- package/dist/types/pm-plugins/input-rules/wrapping-join-rule.d.ts +2 -3
- package/dist/types/types.d.ts +1 -3
- package/dist/types-ts4.5/actions/outdent-list-items-selected.d.ts +1 -2
- package/dist/types-ts4.5/commands/index.d.ts +3 -3
- package/dist/types-ts4.5/commands/outdent-list.d.ts +2 -2
- package/dist/types-ts4.5/index.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/input-rules/create-list-input-rule.d.ts +1 -3
- package/dist/types-ts4.5/pm-plugins/input-rules/index.d.ts +1 -2
- package/dist/types-ts4.5/pm-plugins/input-rules/wrapping-join-rule.d.ts +2 -3
- package/dist/types-ts4.5/types.d.ts +1 -3
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type { ListPlugin,
|
|
1
|
+
export type { ListPlugin, FindRootParentListNode, ListState, InputMethod, } from './types';
|
|
2
2
|
export { listPlugin } from './plugin';
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
3
2
|
import type { NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
4
3
|
type Props = {
|
|
5
4
|
listType: NodeType;
|
|
6
5
|
expression: RegExp;
|
|
7
|
-
featureFlags: FeatureFlags;
|
|
8
6
|
editorAnalyticsApi: EditorAnalyticsAPI | undefined;
|
|
9
7
|
};
|
|
10
|
-
export declare function createRuleForListType({ listType, expression,
|
|
8
|
+
export declare function createRuleForListType({ listType, expression, editorAnalyticsApi, }: Props): import("@atlaskit/prosemirror-input-rules").InputRuleWrapper;
|
|
11
9
|
export {};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
|
-
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
4
3
|
import type { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
5
|
-
export default function inputRulePlugin(schema: Schema,
|
|
4
|
+
export default function inputRulePlugin(schema: Schema, editorAnalyticsApi: EditorAnalyticsAPI | undefined): SafePlugin | undefined;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { JOIN_SCENARIOS_WHEN_TYPING_TO_INSERT_LIST } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import type {
|
|
2
|
+
import type { InputRuleWrapper } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { NodeType, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
4
4
|
type Attrs = Record<string, any>;
|
|
5
5
|
type WrappingRuleProps = {
|
|
6
|
-
featureFlags: FeatureFlags;
|
|
7
6
|
match: RegExp;
|
|
8
7
|
nodeType: NodeType;
|
|
9
8
|
getAttrs?: Attrs | ((matchResult: RegExpExecArray) => Attrs);
|
|
10
9
|
joinPredicate?: (matchResult: RegExpExecArray, node: PMNode, joinScenario: JOIN_SCENARIOS_WHEN_TYPING_TO_INSERT_LIST) => boolean;
|
|
11
10
|
};
|
|
12
|
-
export declare const createWrappingJoinRule: ({ match, nodeType, getAttrs, joinPredicate,
|
|
11
|
+
export declare const createWrappingJoinRule: ({ match, nodeType, getAttrs, joinPredicate, }: WrappingRuleProps) => InputRuleWrapper;
|
|
13
12
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import type { EditorCommand,
|
|
2
|
+
import type { EditorCommand, NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
4
4
|
import type { FeatureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
5
5
|
import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
|
|
@@ -7,7 +7,6 @@ import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
|
7
7
|
import type { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
8
8
|
export type InputMethod = INPUT_METHOD.KEYBOARD | INPUT_METHOD.TOOLBAR;
|
|
9
9
|
export declare const MAX_NESTED_LIST_INDENTATION = 6;
|
|
10
|
-
export type ListPluginOptions = Pick<FeatureFlags, 'restartNumberedLists'>;
|
|
11
10
|
export type IndentList = (inputMethod: InputMethod) => EditorCommand;
|
|
12
11
|
export type OutdentList = (inputMethod: InputMethod) => EditorCommand;
|
|
13
12
|
export type ToggleOrderedList = (inputMethod: InputMethod) => EditorCommand;
|
|
@@ -22,7 +21,6 @@ export interface ListState {
|
|
|
22
21
|
decorationSet: DecorationSet;
|
|
23
22
|
}
|
|
24
23
|
export type ListPlugin = NextEditorPlugin<'list', {
|
|
25
|
-
pluginConfiguration: ListPluginOptions | undefined;
|
|
26
24
|
dependencies: [
|
|
27
25
|
OptionalPlugin<FeatureFlagsPlugin>,
|
|
28
26
|
OptionalPlugin<AnalyticsPlugin>
|