@atlaskit/editor-core 187.28.5 → 187.29.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 +10 -0
- package/dist/cjs/index.js +0 -7
- package/dist/cjs/labs/next/presets/universal.js +2 -1
- package/dist/cjs/plugins/analytics/index.js +0 -6
- package/dist/cjs/plugins/analytics/types/index.js +0 -6
- package/dist/cjs/plugins/index.js +0 -7
- package/dist/cjs/plugins/tasks-and-decisions/pm-plugins/commands.js +1 -1
- package/dist/cjs/utils/commands.js +1 -33
- package/dist/cjs/utils/index.js +0 -13
- package/dist/cjs/utils/mark.js +2 -46
- package/dist/cjs/utils/selection.js +0 -5
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/index.js +0 -1
- package/dist/es2019/labs/next/presets/universal.js +2 -1
- package/dist/es2019/plugins/analytics/index.js +1 -1
- package/dist/es2019/plugins/analytics/types/index.js +1 -1
- package/dist/es2019/plugins/index.js +0 -1
- package/dist/es2019/plugins/tasks-and-decisions/pm-plugins/commands.js +1 -1
- package/dist/es2019/utils/commands.js +1 -33
- package/dist/es2019/utils/index.js +1 -2
- package/dist/es2019/utils/mark.js +0 -41
- package/dist/es2019/utils/selection.js +0 -6
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/index.js +0 -1
- package/dist/esm/labs/next/presets/universal.js +2 -1
- package/dist/esm/plugins/analytics/index.js +1 -1
- package/dist/esm/plugins/analytics/types/index.js +1 -1
- package/dist/esm/plugins/index.js +0 -1
- package/dist/esm/plugins/tasks-and-decisions/pm-plugins/commands.js +1 -1
- package/dist/esm/utils/commands.js +1 -31
- package/dist/esm/utils/index.js +1 -2
- package/dist/esm/utils/mark.js +0 -42
- package/dist/esm/utils/selection.js +0 -4
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/index.d.ts +0 -3
- package/dist/types/plugins/analytics/index.d.ts +1 -1
- package/dist/types/plugins/analytics/types/index.d.ts +1 -1
- package/dist/types/plugins/index.d.ts +0 -1
- package/dist/types/plugins/paste/index.d.ts +1 -1
- package/dist/types/utils/commands.d.ts +1 -4
- package/dist/types/utils/index.d.ts +1 -2
- package/dist/types/utils/mark.d.ts +2 -12
- package/dist/types/utils/selection.d.ts +0 -2
- package/dist/types-ts4.5/index.d.ts +0 -3
- package/dist/types-ts4.5/plugins/analytics/index.d.ts +1 -1
- package/dist/types-ts4.5/plugins/analytics/types/index.d.ts +1 -1
- package/dist/types-ts4.5/plugins/index.d.ts +0 -1
- package/dist/types-ts4.5/plugins/paste/index.d.ts +1 -1
- package/dist/types-ts4.5/utils/commands.d.ts +1 -4
- package/dist/types-ts4.5/utils/index.d.ts +1 -2
- package/dist/types-ts4.5/utils/mark.d.ts +2 -12
- package/dist/types-ts4.5/utils/selection.d.ts +0 -2
- package/package.json +3 -3
- package/report.api.md +0 -9
- package/tmp/api-report-tmp.d.ts +0 -9
- package/dist/cjs/plugins/list/actions/conversions.js +0 -153
- package/dist/cjs/plugins/list/actions/indent-list-items-selected.js +0 -125
- package/dist/cjs/plugins/list/actions/indent-list.js +0 -49
- package/dist/cjs/plugins/list/actions/join-list-items-forward.js +0 -59
- package/dist/cjs/plugins/list/actions/join-list-items-scenarios/index.js +0 -40
- package/dist/cjs/plugins/list/actions/join-list-items-scenarios/join-list-item-with-paragraph.js +0 -88
- package/dist/cjs/plugins/list/actions/join-list-items-scenarios/join-list-item-with-parent-nested-list.js +0 -85
- package/dist/cjs/plugins/list/actions/join-list-items-scenarios/join-nested-list-with-parent-list-item.js +0 -79
- package/dist/cjs/plugins/list/actions/join-list-items-scenarios/join-paragraph-with-list.js +0 -45
- package/dist/cjs/plugins/list/actions/join-list-items-scenarios/join-sibling-list-items.js +0 -56
- package/dist/cjs/plugins/list/actions/merge-lists.js +0 -27
- package/dist/cjs/plugins/list/actions/outdent-list-items-selected.js +0 -291
- package/dist/cjs/plugins/list/actions/wrap-and-join-lists.js +0 -98
- package/dist/cjs/plugins/list/commands/indent-list.js +0 -71
- package/dist/cjs/plugins/list/commands/index.js +0 -348
- package/dist/cjs/plugins/list/commands/join-list-item-forward.js +0 -61
- package/dist/cjs/plugins/list/commands/listBackspace.js +0 -284
- package/dist/cjs/plugins/list/commands/outdent-list.js +0 -70
- package/dist/cjs/plugins/list/index.js +0 -133
- package/dist/cjs/plugins/list/messages.js +0 -37
- package/dist/cjs/plugins/list/pm-plugins/input-rules/create-list-input-rule.js +0 -61
- package/dist/cjs/plugins/list/pm-plugins/input-rules/index.js +0 -36
- package/dist/cjs/plugins/list/pm-plugins/input-rules/wrapping-join-rule.js +0 -58
- package/dist/cjs/plugins/list/pm-plugins/keymap.js +0 -27
- package/dist/cjs/plugins/list/pm-plugins/main.js +0 -168
- package/dist/cjs/plugins/list/transforms.js +0 -100
- package/dist/cjs/plugins/list/types.js +0 -8
- package/dist/cjs/plugins/list/utils/analytics.js +0 -22
- package/dist/cjs/plugins/list/utils/find.js +0 -68
- package/dist/cjs/plugins/list/utils/indentation.js +0 -22
- package/dist/cjs/plugins/list/utils/node.js +0 -16
- package/dist/cjs/plugins/list/utils/selection.js +0 -95
- package/dist/cjs/utils/input-rules.js +0 -30
- package/dist/es2019/plugins/list/actions/conversions.js +0 -160
- package/dist/es2019/plugins/list/actions/indent-list-items-selected.js +0 -124
- package/dist/es2019/plugins/list/actions/indent-list.js +0 -44
- package/dist/es2019/plugins/list/actions/join-list-items-forward.js +0 -54
- package/dist/es2019/plugins/list/actions/join-list-items-scenarios/index.js +0 -5
- package/dist/es2019/plugins/list/actions/join-list-items-scenarios/join-list-item-with-paragraph.js +0 -74
- package/dist/es2019/plugins/list/actions/join-list-items-scenarios/join-list-item-with-parent-nested-list.js +0 -78
- package/dist/es2019/plugins/list/actions/join-list-items-scenarios/join-nested-list-with-parent-list-item.js +0 -72
- package/dist/es2019/plugins/list/actions/join-list-items-scenarios/join-paragraph-with-list.js +0 -37
- package/dist/es2019/plugins/list/actions/join-list-items-scenarios/join-sibling-list-items.js +0 -48
- package/dist/es2019/plugins/list/actions/merge-lists.js +0 -24
- package/dist/es2019/plugins/list/actions/outdent-list-items-selected.js +0 -295
- package/dist/es2019/plugins/list/actions/wrap-and-join-lists.js +0 -91
- package/dist/es2019/plugins/list/commands/indent-list.js +0 -62
- package/dist/es2019/plugins/list/commands/index.js +0 -322
- package/dist/es2019/plugins/list/commands/join-list-item-forward.js +0 -53
- package/dist/es2019/plugins/list/commands/listBackspace.js +0 -276
- package/dist/es2019/plugins/list/commands/outdent-list.js +0 -60
- package/dist/es2019/plugins/list/index.js +0 -120
- package/dist/es2019/plugins/list/messages.js +0 -29
- package/dist/es2019/plugins/list/pm-plugins/input-rules/create-list-input-rule.js +0 -55
- package/dist/es2019/plugins/list/pm-plugins/input-rules/index.js +0 -33
- package/dist/es2019/plugins/list/pm-plugins/input-rules/wrapping-join-rule.js +0 -52
- package/dist/es2019/plugins/list/pm-plugins/keymap.js +0 -19
- package/dist/es2019/plugins/list/pm-plugins/main.js +0 -159
- package/dist/es2019/plugins/list/transforms.js +0 -102
- package/dist/es2019/plugins/list/types.js +0 -1
- package/dist/es2019/plugins/list/utils/analytics.js +0 -12
- package/dist/es2019/plugins/list/utils/find.js +0 -61
- package/dist/es2019/plugins/list/utils/indentation.js +0 -16
- package/dist/es2019/plugins/list/utils/node.js +0 -12
- package/dist/es2019/plugins/list/utils/selection.js +0 -96
- package/dist/es2019/utils/input-rules.js +0 -20
- package/dist/esm/plugins/list/actions/conversions.js +0 -147
- package/dist/esm/plugins/list/actions/indent-list-items-selected.js +0 -117
- package/dist/esm/plugins/list/actions/indent-list.js +0 -43
- package/dist/esm/plugins/list/actions/join-list-items-forward.js +0 -52
- package/dist/esm/plugins/list/actions/join-list-items-scenarios/index.js +0 -5
- package/dist/esm/plugins/list/actions/join-list-items-scenarios/join-list-item-with-paragraph.js +0 -81
- package/dist/esm/plugins/list/actions/join-list-items-scenarios/join-list-item-with-parent-nested-list.js +0 -79
- package/dist/esm/plugins/list/actions/join-list-items-scenarios/join-nested-list-with-parent-list-item.js +0 -73
- package/dist/esm/plugins/list/actions/join-list-items-scenarios/join-paragraph-with-list.js +0 -38
- package/dist/esm/plugins/list/actions/join-list-items-scenarios/join-sibling-list-items.js +0 -49
- package/dist/esm/plugins/list/actions/merge-lists.js +0 -21
- package/dist/esm/plugins/list/actions/outdent-list-items-selected.js +0 -283
- package/dist/esm/plugins/list/actions/wrap-and-join-lists.js +0 -92
- package/dist/esm/plugins/list/commands/indent-list.js +0 -63
- package/dist/esm/plugins/list/commands/index.js +0 -320
- package/dist/esm/plugins/list/commands/join-list-item-forward.js +0 -53
- package/dist/esm/plugins/list/commands/listBackspace.js +0 -275
- package/dist/esm/plugins/list/commands/outdent-list.js +0 -62
- package/dist/esm/plugins/list/index.js +0 -127
- package/dist/esm/plugins/list/messages.js +0 -29
- package/dist/esm/plugins/list/pm-plugins/input-rules/create-list-input-rule.js +0 -56
- package/dist/esm/plugins/list/pm-plugins/input-rules/index.js +0 -30
- package/dist/esm/plugins/list/pm-plugins/input-rules/wrapping-join-rule.js +0 -51
- package/dist/esm/plugins/list/pm-plugins/keymap.js +0 -19
- package/dist/esm/plugins/list/pm-plugins/main.js +0 -159
- package/dist/esm/plugins/list/transforms.js +0 -92
- package/dist/esm/plugins/list/types.js +0 -1
- package/dist/esm/plugins/list/utils/analytics.js +0 -12
- package/dist/esm/plugins/list/utils/find.js +0 -59
- package/dist/esm/plugins/list/utils/indentation.js +0 -16
- package/dist/esm/plugins/list/utils/node.js +0 -10
- package/dist/esm/plugins/list/utils/selection.js +0 -81
- package/dist/esm/utils/input-rules.js +0 -22
- package/dist/types/plugins/list/actions/conversions.d.ts +0 -6
- package/dist/types/plugins/list/actions/indent-list-items-selected.d.ts +0 -2
- package/dist/types/plugins/list/actions/indent-list.d.ts +0 -2
- package/dist/types/plugins/list/actions/join-list-items-forward.d.ts +0 -13
- package/dist/types/plugins/list/actions/join-list-items-scenarios/index.d.ts +0 -5
- package/dist/types/plugins/list/actions/join-list-items-scenarios/join-list-item-with-paragraph.d.ts +0 -9
- package/dist/types/plugins/list/actions/join-list-items-scenarios/join-list-item-with-parent-nested-list.d.ts +0 -9
- package/dist/types/plugins/list/actions/join-list-items-scenarios/join-nested-list-with-parent-list-item.d.ts +0 -9
- package/dist/types/plugins/list/actions/join-list-items-scenarios/join-paragraph-with-list.d.ts +0 -9
- package/dist/types/plugins/list/actions/join-list-items-scenarios/join-sibling-list-items.d.ts +0 -9
- package/dist/types/plugins/list/actions/merge-lists.d.ts +0 -7
- package/dist/types/plugins/list/actions/outdent-list-items-selected.d.ts +0 -3
- package/dist/types/plugins/list/actions/wrap-and-join-lists.d.ts +0 -15
- package/dist/types/plugins/list/commands/indent-list.d.ts +0 -6
- package/dist/types/plugins/list/commands/index.d.ts +0 -17
- package/dist/types/plugins/list/commands/join-list-item-forward.d.ts +0 -3
- package/dist/types/plugins/list/commands/listBackspace.d.ts +0 -10
- package/dist/types/plugins/list/commands/outdent-list.d.ts +0 -7
- package/dist/types/plugins/list/index.d.ts +0 -3
- package/dist/types/plugins/list/messages.d.ts +0 -27
- package/dist/types/plugins/list/pm-plugins/input-rules/create-list-input-rule.d.ts +0 -9
- package/dist/types/plugins/list/pm-plugins/input-rules/index.d.ts +0 -4
- package/dist/types/plugins/list/pm-plugins/input-rules/wrapping-join-rule.d.ts +0 -12
- package/dist/types/plugins/list/pm-plugins/keymap.d.ts +0 -5
- package/dist/types/plugins/list/pm-plugins/main.d.ts +0 -11
- package/dist/types/plugins/list/transforms.d.ts +0 -4
- package/dist/types/plugins/list/types.d.ts +0 -4
- package/dist/types/plugins/list/utils/analytics.d.ts +0 -5
- package/dist/types/plugins/list/utils/find.d.ts +0 -10
- package/dist/types/plugins/list/utils/indentation.d.ts +0 -2
- package/dist/types/plugins/list/utils/node.d.ts +0 -2
- package/dist/types/plugins/list/utils/selection.d.ts +0 -14
- package/dist/types/utils/input-rules.d.ts +0 -10
- package/dist/types-ts4.5/plugins/list/actions/conversions.d.ts +0 -6
- package/dist/types-ts4.5/plugins/list/actions/indent-list-items-selected.d.ts +0 -2
- package/dist/types-ts4.5/plugins/list/actions/indent-list.d.ts +0 -2
- package/dist/types-ts4.5/plugins/list/actions/join-list-items-forward.d.ts +0 -16
- package/dist/types-ts4.5/plugins/list/actions/join-list-items-scenarios/index.d.ts +0 -5
- package/dist/types-ts4.5/plugins/list/actions/join-list-items-scenarios/join-list-item-with-paragraph.d.ts +0 -9
- package/dist/types-ts4.5/plugins/list/actions/join-list-items-scenarios/join-list-item-with-parent-nested-list.d.ts +0 -9
- package/dist/types-ts4.5/plugins/list/actions/join-list-items-scenarios/join-nested-list-with-parent-list-item.d.ts +0 -9
- package/dist/types-ts4.5/plugins/list/actions/join-list-items-scenarios/join-paragraph-with-list.d.ts +0 -9
- package/dist/types-ts4.5/plugins/list/actions/join-list-items-scenarios/join-sibling-list-items.d.ts +0 -9
- package/dist/types-ts4.5/plugins/list/actions/merge-lists.d.ts +0 -7
- package/dist/types-ts4.5/plugins/list/actions/outdent-list-items-selected.d.ts +0 -3
- package/dist/types-ts4.5/plugins/list/actions/wrap-and-join-lists.d.ts +0 -15
- package/dist/types-ts4.5/plugins/list/commands/indent-list.d.ts +0 -6
- package/dist/types-ts4.5/plugins/list/commands/index.d.ts +0 -17
- package/dist/types-ts4.5/plugins/list/commands/join-list-item-forward.d.ts +0 -3
- package/dist/types-ts4.5/plugins/list/commands/listBackspace.d.ts +0 -13
- package/dist/types-ts4.5/plugins/list/commands/outdent-list.d.ts +0 -7
- package/dist/types-ts4.5/plugins/list/index.d.ts +0 -3
- package/dist/types-ts4.5/plugins/list/messages.d.ts +0 -27
- package/dist/types-ts4.5/plugins/list/pm-plugins/input-rules/create-list-input-rule.d.ts +0 -9
- package/dist/types-ts4.5/plugins/list/pm-plugins/input-rules/index.d.ts +0 -4
- package/dist/types-ts4.5/plugins/list/pm-plugins/input-rules/wrapping-join-rule.d.ts +0 -12
- package/dist/types-ts4.5/plugins/list/pm-plugins/keymap.d.ts +0 -5
- package/dist/types-ts4.5/plugins/list/pm-plugins/main.d.ts +0 -11
- package/dist/types-ts4.5/plugins/list/transforms.d.ts +0 -4
- package/dist/types-ts4.5/plugins/list/types.d.ts +0 -4
- package/dist/types-ts4.5/plugins/list/utils/analytics.d.ts +0 -5
- package/dist/types-ts4.5/plugins/list/utils/find.d.ts +0 -10
- package/dist/types-ts4.5/plugins/list/utils/indentation.d.ts +0 -2
- package/dist/types-ts4.5/plugins/list/utils/node.d.ts +0 -2
- package/dist/types-ts4.5/plugins/list/utils/selection.d.ts +0 -14
- package/dist/types-ts4.5/utils/input-rules.d.ts +0 -10
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export declare const messages: {
|
|
2
|
-
unorderedList: {
|
|
3
|
-
id: string;
|
|
4
|
-
defaultMessage: string;
|
|
5
|
-
description: string;
|
|
6
|
-
};
|
|
7
|
-
unorderedListDescription: {
|
|
8
|
-
id: string;
|
|
9
|
-
defaultMessage: string;
|
|
10
|
-
description: string;
|
|
11
|
-
};
|
|
12
|
-
orderedList: {
|
|
13
|
-
id: string;
|
|
14
|
-
defaultMessage: string;
|
|
15
|
-
description: string;
|
|
16
|
-
};
|
|
17
|
-
orderedListDescription: {
|
|
18
|
-
id: string;
|
|
19
|
-
defaultMessage: string;
|
|
20
|
-
description: string;
|
|
21
|
-
};
|
|
22
|
-
lists: {
|
|
23
|
-
id: string;
|
|
24
|
-
defaultMessage: string;
|
|
25
|
-
description: string;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type { FeatureFlags } from '../../../../types/feature-flags';
|
|
3
|
-
type Props = {
|
|
4
|
-
listType: NodeType;
|
|
5
|
-
expression: RegExp;
|
|
6
|
-
featureFlags: FeatureFlags;
|
|
7
|
-
};
|
|
8
|
-
export declare function createRuleForListType({ listType, expression, featureFlags, }: Props): import("@atlaskit/prosemirror-input-rules").InputRuleWrapper;
|
|
9
|
-
export {};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
|
-
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
4
|
-
export default function inputRulePlugin(schema: Schema, featureFlags: FeatureFlags): SafePlugin | undefined;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { Node as PMNode, NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type { InputRuleWrapper, FeatureFlags } from '@atlaskit/editor-common/types';
|
|
3
|
-
import { JOIN_SCENARIOS_WHEN_TYPING_TO_INSERT_LIST } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
type WrappingRuleProps = {
|
|
5
|
-
featureFlags: FeatureFlags;
|
|
6
|
-
match: RegExp;
|
|
7
|
-
nodeType: NodeType;
|
|
8
|
-
getAttrs?: Record<string, any> | ((matchResult: RegExpExecArray) => Record<string, any>);
|
|
9
|
-
joinPredicate?: (matchResult: RegExpExecArray, node: PMNode, joinScenario: JOIN_SCENARIOS_WHEN_TYPING_TO_INSERT_LIST) => boolean;
|
|
10
|
-
};
|
|
11
|
-
export declare const createWrappingJoinRule: ({ match, nodeType, getAttrs, joinPredicate, featureFlags, }: WrappingRuleProps) => InputRuleWrapper;
|
|
12
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
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,11 +0,0 @@
|
|
|
1
|
-
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
-
import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
5
|
-
import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
6
|
-
import type { Dispatch } from '../../../event-dispatcher';
|
|
7
|
-
import type { ListState } from '../types';
|
|
8
|
-
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
9
|
-
export declare const pluginKey: PluginKey<ListState>;
|
|
10
|
-
export declare const getDecorations: (doc: Node, state: EditorState, featureFlags: FeatureFlags) => DecorationSet;
|
|
11
|
-
export declare const createPlugin: (eventDispatch: Dispatch, featureFlags: FeatureFlags) => SafePlugin;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { Transaction, Selection } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
export declare function liftFollowingList(from: number, to: number, rootListDepth: number, tr: Transaction): Transaction;
|
|
3
|
-
export declare function liftNodeSelectionList(selection: Selection, tr: Transaction): Transaction;
|
|
4
|
-
export declare function liftTextSelectionList(selection: Selection, tr: Transaction): Transaction;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import type { RestartListsAttributesForListOutdented } from '@atlaskit/editor-common/analytics';
|
|
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 { ResolvedPos, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
export declare function findFirstParentListNode($pos: ResolvedPos): {
|
|
3
|
-
pos: number;
|
|
4
|
-
node: PMNode;
|
|
5
|
-
} | null;
|
|
6
|
-
export declare function findFirstParentListItemNode($pos: ResolvedPos): {
|
|
7
|
-
pos: number;
|
|
8
|
-
node: PMNode;
|
|
9
|
-
} | null;
|
|
10
|
-
export declare const findRootParentListNode: ($pos: ResolvedPos) => ResolvedPos | null;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { Node as PMNode, ResolvedPos, NodeType, NodeRange } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type { EditorState, Transaction, Selection } 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: (state: EditorState) => boolean;
|
|
7
|
-
export declare const isInsideTableCell: (state: EditorState) => boolean;
|
|
8
|
-
export declare const canJoinToPreviousListItem: (state: EditorState) => 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,10 +0,0 @@
|
|
|
1
|
-
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import type { InputRuleWrapper } from '@atlaskit/prosemirror-input-rules';
|
|
3
|
-
import type { AnalyticsEventPayload } from '../plugins/analytics/types';
|
|
4
|
-
type GetPayload = AnalyticsEventPayload | ((state: EditorState, matchResult: RegExpExecArray) => AnalyticsEventPayload);
|
|
5
|
-
/**
|
|
6
|
-
* @private
|
|
7
|
-
* @deprecated Use import {inputRuleWithAnalytics} from "@atlaskit/editor-common/utils"; instead
|
|
8
|
-
*/
|
|
9
|
-
export declare const ruleWithAnalytics: (getPayload: GetPayload) => (originalRule: InputRuleWrapper) => InputRuleWrapper;
|
|
10
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import type { NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
3
|
-
export declare function convertListType({ tr, nextListNodeType, }: {
|
|
4
|
-
tr: Transaction;
|
|
5
|
-
nextListNodeType: NodeType;
|
|
6
|
-
}): void;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { WalkNode } from '@atlaskit/editor-common/utils';
|
|
2
|
-
import { LIST_TEXT_SCENARIOS } from '../../analytics';
|
|
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
|
-
tr: Transaction;
|
|
8
|
-
$next: ResolvedPos;
|
|
9
|
-
$head: ResolvedPos;
|
|
10
|
-
}) => boolean;
|
|
11
|
-
type ScenarioAction = false | [
|
|
12
|
-
ScenariosAllowed,
|
|
13
|
-
DeleteAction
|
|
14
|
-
];
|
|
15
|
-
export declare const calcJoinListScenario: (walkNode: WalkNode, $head: ResolvedPos) => ScenarioAction;
|
|
16
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { joinParagrapWithList } from './join-paragraph-with-list';
|
|
2
|
-
export { joinSiblingListItems } from './join-sibling-list-items';
|
|
3
|
-
export { joinNestedListWithParentListItem } from './join-nested-list-with-parent-list-item';
|
|
4
|
-
export { joinListItemWithParentNestedList } from './join-list-item-with-parent-nested-list';
|
|
5
|
-
export { joinListItemWithParagraph } from './join-list-item-with-paragraph';
|
|
@@ -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
|
-
tr: Transaction;
|
|
5
|
-
$next: ResolvedPos;
|
|
6
|
-
$head: ResolvedPos;
|
|
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
|
-
tr: Transaction;
|
|
5
|
-
$next: ResolvedPos;
|
|
6
|
-
$head: ResolvedPos;
|
|
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
|
-
tr: Transaction;
|
|
5
|
-
$next: ResolvedPos;
|
|
6
|
-
$head: ResolvedPos;
|
|
7
|
-
}) => boolean;
|
|
8
|
-
export declare const joinNestedListWithParentListItem: 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
|
-
tr: Transaction;
|
|
5
|
-
$next: ResolvedPos;
|
|
6
|
-
$head: ResolvedPos;
|
|
7
|
-
}) => boolean;
|
|
8
|
-
export declare const joinParagrapWithList: DeleteAction;
|
|
9
|
-
export {};
|
package/dist/types-ts4.5/plugins/list/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
|
-
tr: Transaction;
|
|
5
|
-
$next: ResolvedPos;
|
|
6
|
-
$head: ResolvedPos;
|
|
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,3 +0,0 @@
|
|
|
1
|
-
import type { Transaction, EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
3
|
-
export declare const outdentListItemsSelected: (tr: Transaction, state: EditorState, featureFlags: FeatureFlags) => void;
|
|
@@ -1,15 +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
|
-
/**
|
|
9
|
-
* Wraps the selection in a list with the given type and attributes.
|
|
10
|
-
*
|
|
11
|
-
* Adapted from https://github.com/ProseMirror/prosemirror-schema-list/blob/master/src/schema-list.js#L64-L89
|
|
12
|
-
*/
|
|
13
|
-
export declare function wrapInList(listType: NodeType, attrs?: {
|
|
14
|
-
[key: string]: any;
|
|
15
|
-
}): (tr: Transaction) => boolean;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { Command } from '../../../types';
|
|
2
|
-
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
|
-
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
type InputMethod = INPUT_METHOD.KEYBOARD | INPUT_METHOD.TOOLBAR;
|
|
5
|
-
export declare const indentList: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (inputMethod?: InputMethod) => Command;
|
|
6
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { ResolvedPos, NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
|
-
import type { Command } from '../../../types';
|
|
4
|
-
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
5
|
-
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
6
|
-
import { outdentList } from './outdent-list';
|
|
7
|
-
import { indentList } from './indent-list';
|
|
8
|
-
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
9
|
-
export { outdentList, indentList };
|
|
10
|
-
export type InputMethod = INPUT_METHOD.KEYBOARD | INPUT_METHOD.TOOLBAR;
|
|
11
|
-
export declare const enterKeyCommand: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (featureFlags: FeatureFlags) => Command;
|
|
12
|
-
export declare const backspaceKeyCommand: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (featureFlags: FeatureFlags) => Command;
|
|
13
|
-
export declare const deleteKeyCommand: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => Command;
|
|
14
|
-
export declare const rootListDepth: (pos: ResolvedPos, nodes: Record<string, NodeType>) => number | undefined;
|
|
15
|
-
export declare const toggleList: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (inputMethod: InputMethod, listType: 'bulletList' | 'orderedList') => Command;
|
|
16
|
-
export declare const toggleBulletList: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (view: EditorView, inputMethod?: InputMethod) => boolean;
|
|
17
|
-
export declare const toggleOrderedList: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (view: EditorView, inputMethod?: InputMethod) => boolean;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { WalkNode } from '@atlaskit/editor-common/utils';
|
|
2
|
-
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
3
|
-
import { LIST_TEXT_SCENARIOS } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
|
|
5
|
-
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
6
|
-
import type { CommandDispatch } from '../../../types';
|
|
7
|
-
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;
|
|
13
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import type { Command } from '../../../types';
|
|
3
|
-
import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
5
|
-
type InputMethod = INPUT_METHOD.KEYBOARD | INPUT_METHOD.TOOLBAR;
|
|
6
|
-
export declare const outdentList: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (inputMethod: InputMethod | undefined, featureFlags: FeatureFlags) => Command;
|
|
7
|
-
export {};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export declare const messages: {
|
|
2
|
-
unorderedList: {
|
|
3
|
-
id: string;
|
|
4
|
-
defaultMessage: string;
|
|
5
|
-
description: string;
|
|
6
|
-
};
|
|
7
|
-
unorderedListDescription: {
|
|
8
|
-
id: string;
|
|
9
|
-
defaultMessage: string;
|
|
10
|
-
description: string;
|
|
11
|
-
};
|
|
12
|
-
orderedList: {
|
|
13
|
-
id: string;
|
|
14
|
-
defaultMessage: string;
|
|
15
|
-
description: string;
|
|
16
|
-
};
|
|
17
|
-
orderedListDescription: {
|
|
18
|
-
id: string;
|
|
19
|
-
defaultMessage: string;
|
|
20
|
-
description: string;
|
|
21
|
-
};
|
|
22
|
-
lists: {
|
|
23
|
-
id: string;
|
|
24
|
-
defaultMessage: string;
|
|
25
|
-
description: string;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type { FeatureFlags } from '../../../../types/feature-flags';
|
|
3
|
-
type Props = {
|
|
4
|
-
listType: NodeType;
|
|
5
|
-
expression: RegExp;
|
|
6
|
-
featureFlags: FeatureFlags;
|
|
7
|
-
};
|
|
8
|
-
export declare function createRuleForListType({ listType, expression, featureFlags, }: Props): import("@atlaskit/prosemirror-input-rules").InputRuleWrapper;
|
|
9
|
-
export {};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { Schema } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
3
|
-
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
4
|
-
export default function inputRulePlugin(schema: Schema, featureFlags: FeatureFlags): SafePlugin | undefined;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { Node as PMNode, NodeType } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type { InputRuleWrapper, FeatureFlags } from '@atlaskit/editor-common/types';
|
|
3
|
-
import { JOIN_SCENARIOS_WHEN_TYPING_TO_INSERT_LIST } from '@atlaskit/editor-common/analytics';
|
|
4
|
-
type WrappingRuleProps = {
|
|
5
|
-
featureFlags: FeatureFlags;
|
|
6
|
-
match: RegExp;
|
|
7
|
-
nodeType: NodeType;
|
|
8
|
-
getAttrs?: Record<string, any> | ((matchResult: RegExpExecArray) => Record<string, any>);
|
|
9
|
-
joinPredicate?: (matchResult: RegExpExecArray, node: PMNode, joinScenario: JOIN_SCENARIOS_WHEN_TYPING_TO_INSERT_LIST) => boolean;
|
|
10
|
-
};
|
|
11
|
-
export declare const createWrappingJoinRule: ({ match, nodeType, getAttrs, joinPredicate, featureFlags, }: WrappingRuleProps) => InputRuleWrapper;
|
|
12
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
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,11 +0,0 @@
|
|
|
1
|
-
import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
|
|
2
|
-
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
4
|
-
import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
5
|
-
import type { Node } from '@atlaskit/editor-prosemirror/model';
|
|
6
|
-
import type { Dispatch } from '../../../event-dispatcher';
|
|
7
|
-
import type { ListState } from '../types';
|
|
8
|
-
import type { FeatureFlags } from '@atlaskit/editor-common/types';
|
|
9
|
-
export declare const pluginKey: PluginKey<ListState>;
|
|
10
|
-
export declare const getDecorations: (doc: Node, state: EditorState, featureFlags: FeatureFlags) => DecorationSet;
|
|
11
|
-
export declare const createPlugin: (eventDispatch: Dispatch, featureFlags: FeatureFlags) => SafePlugin;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { Transaction, Selection } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
export declare function liftFollowingList(from: number, to: number, rootListDepth: number, tr: Transaction): Transaction;
|
|
3
|
-
export declare function liftNodeSelectionList(selection: Selection, tr: Transaction): Transaction;
|
|
4
|
-
export declare function liftTextSelectionList(selection: Selection, tr: Transaction): Transaction;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import type { RestartListsAttributesForListOutdented } from '@atlaskit/editor-common/analytics';
|
|
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 { ResolvedPos, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
export declare function findFirstParentListNode($pos: ResolvedPos): {
|
|
3
|
-
pos: number;
|
|
4
|
-
node: PMNode;
|
|
5
|
-
} | null;
|
|
6
|
-
export declare function findFirstParentListItemNode($pos: ResolvedPos): {
|
|
7
|
-
pos: number;
|
|
8
|
-
node: PMNode;
|
|
9
|
-
} | null;
|
|
10
|
-
export declare const findRootParentListNode: ($pos: ResolvedPos) => ResolvedPos | null;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { Node as PMNode, ResolvedPos, NodeType, NodeRange } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import type { EditorState, Transaction, Selection } 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: (state: EditorState) => boolean;
|
|
7
|
-
export declare const isInsideTableCell: (state: EditorState) => boolean;
|
|
8
|
-
export declare const canJoinToPreviousListItem: (state: EditorState) => 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,10 +0,0 @@
|
|
|
1
|
-
import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import type { InputRuleWrapper } from '@atlaskit/prosemirror-input-rules';
|
|
3
|
-
import type { AnalyticsEventPayload } from '../plugins/analytics/types';
|
|
4
|
-
type GetPayload = AnalyticsEventPayload | ((state: EditorState, matchResult: RegExpExecArray) => AnalyticsEventPayload);
|
|
5
|
-
/**
|
|
6
|
-
* @private
|
|
7
|
-
* @deprecated Use import {inputRuleWithAnalytics} from "@atlaskit/editor-common/utils"; instead
|
|
8
|
-
*/
|
|
9
|
-
export declare const ruleWithAnalytics: (getPayload: GetPayload) => (originalRule: InputRuleWrapper) => InputRuleWrapper;
|
|
10
|
-
export {};
|