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