@atlaskit/editor-core 187.28.5 → 187.29.2

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.
Files changed (220) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cjs/index.js +0 -7
  3. package/dist/cjs/labs/next/presets/universal.js +2 -1
  4. package/dist/cjs/plugins/analytics/index.js +0 -6
  5. package/dist/cjs/plugins/analytics/types/index.js +0 -6
  6. package/dist/cjs/plugins/index.js +0 -7
  7. package/dist/cjs/plugins/tasks-and-decisions/pm-plugins/commands.js +1 -1
  8. package/dist/cjs/utils/commands.js +1 -33
  9. package/dist/cjs/utils/index.js +0 -13
  10. package/dist/cjs/utils/mark.js +2 -46
  11. package/dist/cjs/utils/selection.js +0 -5
  12. package/dist/cjs/version-wrapper.js +1 -1
  13. package/dist/es2019/index.js +0 -1
  14. package/dist/es2019/labs/next/presets/universal.js +2 -1
  15. package/dist/es2019/plugins/analytics/index.js +1 -1
  16. package/dist/es2019/plugins/analytics/types/index.js +1 -1
  17. package/dist/es2019/plugins/index.js +0 -1
  18. package/dist/es2019/plugins/tasks-and-decisions/pm-plugins/commands.js +1 -1
  19. package/dist/es2019/utils/commands.js +1 -33
  20. package/dist/es2019/utils/index.js +1 -2
  21. package/dist/es2019/utils/mark.js +0 -41
  22. package/dist/es2019/utils/selection.js +0 -6
  23. package/dist/es2019/version-wrapper.js +1 -1
  24. package/dist/esm/index.js +0 -1
  25. package/dist/esm/labs/next/presets/universal.js +2 -1
  26. package/dist/esm/plugins/analytics/index.js +1 -1
  27. package/dist/esm/plugins/analytics/types/index.js +1 -1
  28. package/dist/esm/plugins/index.js +0 -1
  29. package/dist/esm/plugins/tasks-and-decisions/pm-plugins/commands.js +1 -1
  30. package/dist/esm/utils/commands.js +1 -31
  31. package/dist/esm/utils/index.js +1 -2
  32. package/dist/esm/utils/mark.js +0 -42
  33. package/dist/esm/utils/selection.js +0 -4
  34. package/dist/esm/version-wrapper.js +1 -1
  35. package/dist/types/index.d.ts +0 -3
  36. package/dist/types/plugins/analytics/index.d.ts +1 -1
  37. package/dist/types/plugins/analytics/types/index.d.ts +1 -1
  38. package/dist/types/plugins/index.d.ts +0 -1
  39. package/dist/types/plugins/paste/index.d.ts +1 -1
  40. package/dist/types/utils/commands.d.ts +1 -4
  41. package/dist/types/utils/index.d.ts +1 -2
  42. package/dist/types/utils/mark.d.ts +2 -12
  43. package/dist/types/utils/selection.d.ts +0 -2
  44. package/dist/types-ts4.5/index.d.ts +0 -3
  45. package/dist/types-ts4.5/plugins/analytics/index.d.ts +1 -1
  46. package/dist/types-ts4.5/plugins/analytics/types/index.d.ts +1 -1
  47. package/dist/types-ts4.5/plugins/index.d.ts +0 -1
  48. package/dist/types-ts4.5/plugins/paste/index.d.ts +1 -1
  49. package/dist/types-ts4.5/utils/commands.d.ts +1 -4
  50. package/dist/types-ts4.5/utils/index.d.ts +1 -2
  51. package/dist/types-ts4.5/utils/mark.d.ts +2 -12
  52. package/dist/types-ts4.5/utils/selection.d.ts +0 -2
  53. package/package.json +7 -3
  54. package/report.api.md +0 -9
  55. package/tmp/api-report-tmp.d.ts +0 -9
  56. package/dist/cjs/plugins/list/actions/conversions.js +0 -153
  57. package/dist/cjs/plugins/list/actions/indent-list-items-selected.js +0 -125
  58. package/dist/cjs/plugins/list/actions/indent-list.js +0 -49
  59. package/dist/cjs/plugins/list/actions/join-list-items-forward.js +0 -59
  60. package/dist/cjs/plugins/list/actions/join-list-items-scenarios/index.js +0 -40
  61. package/dist/cjs/plugins/list/actions/join-list-items-scenarios/join-list-item-with-paragraph.js +0 -88
  62. package/dist/cjs/plugins/list/actions/join-list-items-scenarios/join-list-item-with-parent-nested-list.js +0 -85
  63. package/dist/cjs/plugins/list/actions/join-list-items-scenarios/join-nested-list-with-parent-list-item.js +0 -79
  64. package/dist/cjs/plugins/list/actions/join-list-items-scenarios/join-paragraph-with-list.js +0 -45
  65. package/dist/cjs/plugins/list/actions/join-list-items-scenarios/join-sibling-list-items.js +0 -56
  66. package/dist/cjs/plugins/list/actions/merge-lists.js +0 -27
  67. package/dist/cjs/plugins/list/actions/outdent-list-items-selected.js +0 -291
  68. package/dist/cjs/plugins/list/actions/wrap-and-join-lists.js +0 -98
  69. package/dist/cjs/plugins/list/commands/indent-list.js +0 -71
  70. package/dist/cjs/plugins/list/commands/index.js +0 -348
  71. package/dist/cjs/plugins/list/commands/join-list-item-forward.js +0 -61
  72. package/dist/cjs/plugins/list/commands/listBackspace.js +0 -284
  73. package/dist/cjs/plugins/list/commands/outdent-list.js +0 -70
  74. package/dist/cjs/plugins/list/index.js +0 -133
  75. package/dist/cjs/plugins/list/messages.js +0 -37
  76. package/dist/cjs/plugins/list/pm-plugins/input-rules/create-list-input-rule.js +0 -61
  77. package/dist/cjs/plugins/list/pm-plugins/input-rules/index.js +0 -36
  78. package/dist/cjs/plugins/list/pm-plugins/input-rules/wrapping-join-rule.js +0 -58
  79. package/dist/cjs/plugins/list/pm-plugins/keymap.js +0 -27
  80. package/dist/cjs/plugins/list/pm-plugins/main.js +0 -168
  81. package/dist/cjs/plugins/list/transforms.js +0 -100
  82. package/dist/cjs/plugins/list/types.js +0 -8
  83. package/dist/cjs/plugins/list/utils/analytics.js +0 -22
  84. package/dist/cjs/plugins/list/utils/find.js +0 -68
  85. package/dist/cjs/plugins/list/utils/indentation.js +0 -22
  86. package/dist/cjs/plugins/list/utils/node.js +0 -16
  87. package/dist/cjs/plugins/list/utils/selection.js +0 -95
  88. package/dist/cjs/utils/input-rules.js +0 -30
  89. package/dist/es2019/plugins/list/actions/conversions.js +0 -160
  90. package/dist/es2019/plugins/list/actions/indent-list-items-selected.js +0 -124
  91. package/dist/es2019/plugins/list/actions/indent-list.js +0 -44
  92. package/dist/es2019/plugins/list/actions/join-list-items-forward.js +0 -54
  93. package/dist/es2019/plugins/list/actions/join-list-items-scenarios/index.js +0 -5
  94. package/dist/es2019/plugins/list/actions/join-list-items-scenarios/join-list-item-with-paragraph.js +0 -74
  95. package/dist/es2019/plugins/list/actions/join-list-items-scenarios/join-list-item-with-parent-nested-list.js +0 -78
  96. package/dist/es2019/plugins/list/actions/join-list-items-scenarios/join-nested-list-with-parent-list-item.js +0 -72
  97. package/dist/es2019/plugins/list/actions/join-list-items-scenarios/join-paragraph-with-list.js +0 -37
  98. package/dist/es2019/plugins/list/actions/join-list-items-scenarios/join-sibling-list-items.js +0 -48
  99. package/dist/es2019/plugins/list/actions/merge-lists.js +0 -24
  100. package/dist/es2019/plugins/list/actions/outdent-list-items-selected.js +0 -295
  101. package/dist/es2019/plugins/list/actions/wrap-and-join-lists.js +0 -91
  102. package/dist/es2019/plugins/list/commands/indent-list.js +0 -62
  103. package/dist/es2019/plugins/list/commands/index.js +0 -322
  104. package/dist/es2019/plugins/list/commands/join-list-item-forward.js +0 -53
  105. package/dist/es2019/plugins/list/commands/listBackspace.js +0 -276
  106. package/dist/es2019/plugins/list/commands/outdent-list.js +0 -60
  107. package/dist/es2019/plugins/list/index.js +0 -120
  108. package/dist/es2019/plugins/list/messages.js +0 -29
  109. package/dist/es2019/plugins/list/pm-plugins/input-rules/create-list-input-rule.js +0 -55
  110. package/dist/es2019/plugins/list/pm-plugins/input-rules/index.js +0 -33
  111. package/dist/es2019/plugins/list/pm-plugins/input-rules/wrapping-join-rule.js +0 -52
  112. package/dist/es2019/plugins/list/pm-plugins/keymap.js +0 -19
  113. package/dist/es2019/plugins/list/pm-plugins/main.js +0 -159
  114. package/dist/es2019/plugins/list/transforms.js +0 -102
  115. package/dist/es2019/plugins/list/types.js +0 -1
  116. package/dist/es2019/plugins/list/utils/analytics.js +0 -12
  117. package/dist/es2019/plugins/list/utils/find.js +0 -61
  118. package/dist/es2019/plugins/list/utils/indentation.js +0 -16
  119. package/dist/es2019/plugins/list/utils/node.js +0 -12
  120. package/dist/es2019/plugins/list/utils/selection.js +0 -96
  121. package/dist/es2019/utils/input-rules.js +0 -20
  122. package/dist/esm/plugins/list/actions/conversions.js +0 -147
  123. package/dist/esm/plugins/list/actions/indent-list-items-selected.js +0 -117
  124. package/dist/esm/plugins/list/actions/indent-list.js +0 -43
  125. package/dist/esm/plugins/list/actions/join-list-items-forward.js +0 -52
  126. package/dist/esm/plugins/list/actions/join-list-items-scenarios/index.js +0 -5
  127. package/dist/esm/plugins/list/actions/join-list-items-scenarios/join-list-item-with-paragraph.js +0 -81
  128. package/dist/esm/plugins/list/actions/join-list-items-scenarios/join-list-item-with-parent-nested-list.js +0 -79
  129. package/dist/esm/plugins/list/actions/join-list-items-scenarios/join-nested-list-with-parent-list-item.js +0 -73
  130. package/dist/esm/plugins/list/actions/join-list-items-scenarios/join-paragraph-with-list.js +0 -38
  131. package/dist/esm/plugins/list/actions/join-list-items-scenarios/join-sibling-list-items.js +0 -49
  132. package/dist/esm/plugins/list/actions/merge-lists.js +0 -21
  133. package/dist/esm/plugins/list/actions/outdent-list-items-selected.js +0 -283
  134. package/dist/esm/plugins/list/actions/wrap-and-join-lists.js +0 -92
  135. package/dist/esm/plugins/list/commands/indent-list.js +0 -63
  136. package/dist/esm/plugins/list/commands/index.js +0 -320
  137. package/dist/esm/plugins/list/commands/join-list-item-forward.js +0 -53
  138. package/dist/esm/plugins/list/commands/listBackspace.js +0 -275
  139. package/dist/esm/plugins/list/commands/outdent-list.js +0 -62
  140. package/dist/esm/plugins/list/index.js +0 -127
  141. package/dist/esm/plugins/list/messages.js +0 -29
  142. package/dist/esm/plugins/list/pm-plugins/input-rules/create-list-input-rule.js +0 -56
  143. package/dist/esm/plugins/list/pm-plugins/input-rules/index.js +0 -30
  144. package/dist/esm/plugins/list/pm-plugins/input-rules/wrapping-join-rule.js +0 -51
  145. package/dist/esm/plugins/list/pm-plugins/keymap.js +0 -19
  146. package/dist/esm/plugins/list/pm-plugins/main.js +0 -159
  147. package/dist/esm/plugins/list/transforms.js +0 -92
  148. package/dist/esm/plugins/list/types.js +0 -1
  149. package/dist/esm/plugins/list/utils/analytics.js +0 -12
  150. package/dist/esm/plugins/list/utils/find.js +0 -59
  151. package/dist/esm/plugins/list/utils/indentation.js +0 -16
  152. package/dist/esm/plugins/list/utils/node.js +0 -10
  153. package/dist/esm/plugins/list/utils/selection.js +0 -81
  154. package/dist/esm/utils/input-rules.js +0 -22
  155. package/dist/types/plugins/list/actions/conversions.d.ts +0 -6
  156. package/dist/types/plugins/list/actions/indent-list-items-selected.d.ts +0 -2
  157. package/dist/types/plugins/list/actions/indent-list.d.ts +0 -2
  158. package/dist/types/plugins/list/actions/join-list-items-forward.d.ts +0 -13
  159. package/dist/types/plugins/list/actions/join-list-items-scenarios/index.d.ts +0 -5
  160. package/dist/types/plugins/list/actions/join-list-items-scenarios/join-list-item-with-paragraph.d.ts +0 -9
  161. package/dist/types/plugins/list/actions/join-list-items-scenarios/join-list-item-with-parent-nested-list.d.ts +0 -9
  162. package/dist/types/plugins/list/actions/join-list-items-scenarios/join-nested-list-with-parent-list-item.d.ts +0 -9
  163. package/dist/types/plugins/list/actions/join-list-items-scenarios/join-paragraph-with-list.d.ts +0 -9
  164. package/dist/types/plugins/list/actions/join-list-items-scenarios/join-sibling-list-items.d.ts +0 -9
  165. package/dist/types/plugins/list/actions/merge-lists.d.ts +0 -7
  166. package/dist/types/plugins/list/actions/outdent-list-items-selected.d.ts +0 -3
  167. package/dist/types/plugins/list/actions/wrap-and-join-lists.d.ts +0 -15
  168. package/dist/types/plugins/list/commands/indent-list.d.ts +0 -6
  169. package/dist/types/plugins/list/commands/index.d.ts +0 -17
  170. package/dist/types/plugins/list/commands/join-list-item-forward.d.ts +0 -3
  171. package/dist/types/plugins/list/commands/listBackspace.d.ts +0 -10
  172. package/dist/types/plugins/list/commands/outdent-list.d.ts +0 -7
  173. package/dist/types/plugins/list/index.d.ts +0 -3
  174. package/dist/types/plugins/list/messages.d.ts +0 -27
  175. package/dist/types/plugins/list/pm-plugins/input-rules/create-list-input-rule.d.ts +0 -9
  176. package/dist/types/plugins/list/pm-plugins/input-rules/index.d.ts +0 -4
  177. package/dist/types/plugins/list/pm-plugins/input-rules/wrapping-join-rule.d.ts +0 -12
  178. package/dist/types/plugins/list/pm-plugins/keymap.d.ts +0 -5
  179. package/dist/types/plugins/list/pm-plugins/main.d.ts +0 -11
  180. package/dist/types/plugins/list/transforms.d.ts +0 -4
  181. package/dist/types/plugins/list/types.d.ts +0 -4
  182. package/dist/types/plugins/list/utils/analytics.d.ts +0 -5
  183. package/dist/types/plugins/list/utils/find.d.ts +0 -10
  184. package/dist/types/plugins/list/utils/indentation.d.ts +0 -2
  185. package/dist/types/plugins/list/utils/node.d.ts +0 -2
  186. package/dist/types/plugins/list/utils/selection.d.ts +0 -14
  187. package/dist/types/utils/input-rules.d.ts +0 -10
  188. package/dist/types-ts4.5/plugins/list/actions/conversions.d.ts +0 -6
  189. package/dist/types-ts4.5/plugins/list/actions/indent-list-items-selected.d.ts +0 -2
  190. package/dist/types-ts4.5/plugins/list/actions/indent-list.d.ts +0 -2
  191. package/dist/types-ts4.5/plugins/list/actions/join-list-items-forward.d.ts +0 -16
  192. package/dist/types-ts4.5/plugins/list/actions/join-list-items-scenarios/index.d.ts +0 -5
  193. package/dist/types-ts4.5/plugins/list/actions/join-list-items-scenarios/join-list-item-with-paragraph.d.ts +0 -9
  194. package/dist/types-ts4.5/plugins/list/actions/join-list-items-scenarios/join-list-item-with-parent-nested-list.d.ts +0 -9
  195. package/dist/types-ts4.5/plugins/list/actions/join-list-items-scenarios/join-nested-list-with-parent-list-item.d.ts +0 -9
  196. package/dist/types-ts4.5/plugins/list/actions/join-list-items-scenarios/join-paragraph-with-list.d.ts +0 -9
  197. package/dist/types-ts4.5/plugins/list/actions/join-list-items-scenarios/join-sibling-list-items.d.ts +0 -9
  198. package/dist/types-ts4.5/plugins/list/actions/merge-lists.d.ts +0 -7
  199. package/dist/types-ts4.5/plugins/list/actions/outdent-list-items-selected.d.ts +0 -3
  200. package/dist/types-ts4.5/plugins/list/actions/wrap-and-join-lists.d.ts +0 -15
  201. package/dist/types-ts4.5/plugins/list/commands/indent-list.d.ts +0 -6
  202. package/dist/types-ts4.5/plugins/list/commands/index.d.ts +0 -17
  203. package/dist/types-ts4.5/plugins/list/commands/join-list-item-forward.d.ts +0 -3
  204. package/dist/types-ts4.5/plugins/list/commands/listBackspace.d.ts +0 -13
  205. package/dist/types-ts4.5/plugins/list/commands/outdent-list.d.ts +0 -7
  206. package/dist/types-ts4.5/plugins/list/index.d.ts +0 -3
  207. package/dist/types-ts4.5/plugins/list/messages.d.ts +0 -27
  208. package/dist/types-ts4.5/plugins/list/pm-plugins/input-rules/create-list-input-rule.d.ts +0 -9
  209. package/dist/types-ts4.5/plugins/list/pm-plugins/input-rules/index.d.ts +0 -4
  210. package/dist/types-ts4.5/plugins/list/pm-plugins/input-rules/wrapping-join-rule.d.ts +0 -12
  211. package/dist/types-ts4.5/plugins/list/pm-plugins/keymap.d.ts +0 -5
  212. package/dist/types-ts4.5/plugins/list/pm-plugins/main.d.ts +0 -11
  213. package/dist/types-ts4.5/plugins/list/transforms.d.ts +0 -4
  214. package/dist/types-ts4.5/plugins/list/types.d.ts +0 -4
  215. package/dist/types-ts4.5/plugins/list/utils/analytics.d.ts +0 -5
  216. package/dist/types-ts4.5/plugins/list/utils/find.d.ts +0 -10
  217. package/dist/types-ts4.5/plugins/list/utils/indentation.d.ts +0 -2
  218. package/dist/types-ts4.5/plugins/list/utils/node.d.ts +0 -2
  219. package/dist/types-ts4.5/plugins/list/utils/selection.d.ts +0 -14
  220. 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,4 +0,0 @@
1
- import type { FeatureFlags } from '@atlaskit/editor-common/types';
2
- export type { ListState } from '@atlaskit/editor-plugin-list';
3
- export declare const MAX_NESTED_LIST_INDENTATION = 6;
4
- export type ListPluginOptions = Pick<FeatureFlags, 'restartNumberedLists'>;
@@ -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,2 +0,0 @@
1
- import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
2
- export declare const getListLiftTarget: (resPos: ResolvedPos) => number;
@@ -1,2 +0,0 @@
1
- import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
2
- export declare function isListNodeValidContent(node: PMNode): boolean;
@@ -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,2 +0,0 @@
1
- import type { Transaction } from '@atlaskit/editor-prosemirror/state';
2
- export declare const indentListItemsSelected: (tr: Transaction) => false | null | undefined;
@@ -1,2 +0,0 @@
1
- import type { Transaction } from '@atlaskit/editor-prosemirror/state';
2
- export declare const indentList: (tr: Transaction) => false | undefined;
@@ -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 {};
@@ -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,3 +0,0 @@
1
- import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
2
- import { Command } from '../../../types';
3
- export declare const joinListItemForward: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => Command;
@@ -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,3 +0,0 @@
1
- import type { ListPlugin } from '@atlaskit/editor-plugin-list';
2
- declare const listPlugin: ListPlugin;
3
- export default listPlugin;
@@ -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,4 +0,0 @@
1
- import type { FeatureFlags } from '@atlaskit/editor-common/types';
2
- export type { ListState } from '@atlaskit/editor-plugin-list';
3
- export declare const MAX_NESTED_LIST_INDENTATION = 6;
4
- export type ListPluginOptions = Pick<FeatureFlags, 'restartNumberedLists'>;
@@ -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,2 +0,0 @@
1
- import type { ResolvedPos } from '@atlaskit/editor-prosemirror/model';
2
- export declare const getListLiftTarget: (resPos: ResolvedPos) => number;
@@ -1,2 +0,0 @@
1
- import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
2
- export declare function isListNodeValidContent(node: PMNode): boolean;
@@ -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 {};