@magic-marker/prosemirror-suggest-changes 0.3.1 → 0.3.3-wrap-unwrap.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 (94) hide show
  1. package/dist/commands.d.ts +3 -1
  2. package/dist/commands.js +14 -2
  3. package/dist/contentBetween.d.ts +2 -0
  4. package/dist/contentBetween.js +33 -0
  5. package/dist/features/wrapUnwrap/__tests__/blockquoteUnwrapAllNodes.data.d.ts +38 -0
  6. package/dist/features/wrapUnwrap/__tests__/blockquoteUnwrapAllNodes.playwright.test.d.ts +1 -0
  7. package/dist/features/wrapUnwrap/__tests__/blockquoteUnwrapAllNodes.test.d.ts +1 -0
  8. package/dist/features/wrapUnwrap/__tests__/blockquoteUnwrapOneNode.data.d.ts +45 -0
  9. package/dist/features/wrapUnwrap/__tests__/blockquoteUnwrapOneNode.playwright.test.d.ts +1 -0
  10. package/dist/features/wrapUnwrap/__tests__/blockquoteUnwrapOneNode.test.d.ts +1 -0
  11. package/dist/features/wrapUnwrap/__tests__/blockquoteUnwrapSingleNode.data.d.ts +38 -0
  12. package/dist/features/wrapUnwrap/__tests__/blockquoteUnwrapSingleNode.playwright.test.d.ts +1 -0
  13. package/dist/features/wrapUnwrap/__tests__/blockquoteUnwrapSingleNode.test.d.ts +1 -0
  14. package/dist/features/wrapUnwrap/__tests__/blockquoteWrapAllNodes.data.d.ts +38 -0
  15. package/dist/features/wrapUnwrap/__tests__/blockquoteWrapAllNodes.playwright.test.d.ts +1 -0
  16. package/dist/features/wrapUnwrap/__tests__/blockquoteWrapAllNodes.test.d.ts +1 -0
  17. package/dist/features/wrapUnwrap/__tests__/blockquoteWrapSingleNode.data.d.ts +38 -0
  18. package/dist/features/wrapUnwrap/__tests__/blockquoteWrapSingleNode.playwright.test.d.ts +1 -0
  19. package/dist/features/wrapUnwrap/__tests__/blockquoteWrapSingleNode.test.d.ts +1 -0
  20. package/dist/features/wrapUnwrap/__tests__/listItemLiftLast.data.d.ts +54 -0
  21. package/dist/features/wrapUnwrap/__tests__/listItemLiftLast.playwright.test.d.ts +1 -0
  22. package/dist/features/wrapUnwrap/__tests__/listItemLiftLast.test.d.ts +1 -0
  23. package/dist/features/wrapUnwrap/__tests__/listItemLiftMiddle.data.d.ts +48 -0
  24. package/dist/features/wrapUnwrap/__tests__/listItemLiftMiddle.playwright.test.d.ts +1 -0
  25. package/dist/features/wrapUnwrap/__tests__/listItemLiftMiddle.test.d.ts +1 -0
  26. package/dist/features/wrapUnwrap/__tests__/listItemLiftMultipleToTheTop.data.d.ts +74 -0
  27. package/dist/features/wrapUnwrap/__tests__/listItemLiftMultipleToTheTop.playwright.test.d.ts +1 -0
  28. package/dist/features/wrapUnwrap/__tests__/listItemLiftMultipleToTheTop.test.d.ts +1 -0
  29. package/dist/features/wrapUnwrap/__tests__/listItemLiftNestedOnce.data.d.ts +71 -0
  30. package/dist/features/wrapUnwrap/__tests__/listItemLiftNestedOnce.playwright.test.d.ts +1 -0
  31. package/dist/features/wrapUnwrap/__tests__/listItemLiftNestedOnce.test.d.ts +1 -0
  32. package/dist/features/wrapUnwrap/__tests__/listItemLiftTop.data.d.ts +54 -0
  33. package/dist/features/wrapUnwrap/__tests__/listItemLiftTop.playwright.test.d.ts +1 -0
  34. package/dist/features/wrapUnwrap/__tests__/listItemLiftTop.test.d.ts +1 -0
  35. package/dist/features/wrapUnwrap/__tests__/listItemSinkMultiple.data.d.ts +181 -0
  36. package/dist/features/wrapUnwrap/__tests__/listItemSinkMultiple.page.d.ts +30 -0
  37. package/dist/features/wrapUnwrap/__tests__/listItemSinkMultiple.playwright.test.d.ts +1 -0
  38. package/dist/features/wrapUnwrap/__tests__/listItemSinkMultiple.test.d.ts +1 -0
  39. package/dist/features/wrapUnwrap/__tests__/listItemSinkOneOnce.data.d.ts +51 -0
  40. package/dist/features/wrapUnwrap/__tests__/listItemSinkOneOnce.playwright.test.d.ts +1 -0
  41. package/dist/features/wrapUnwrap/__tests__/listItemSinkOneOnce.test.d.ts +1 -0
  42. package/dist/features/wrapUnwrap/__tests__/listItemsLiftMixedLevels.data.d.ts +74 -0
  43. package/dist/features/wrapUnwrap/__tests__/listItemsLiftMixedLevels.playwright.test.d.ts +1 -0
  44. package/dist/features/wrapUnwrap/__tests__/listItemsLiftMixedLevels.test.d.ts +1 -0
  45. package/dist/features/wrapUnwrap/__tests__/nestedListItemLiftToOuter.data.d.ts +71 -0
  46. package/dist/features/wrapUnwrap/__tests__/nestedListItemLiftToOuter.playwright.test.d.ts +1 -0
  47. package/dist/features/wrapUnwrap/__tests__/nestedListItemLiftToOuter.test.d.ts +1 -0
  48. package/dist/features/wrapUnwrap/__tests__/nestedListItemsLiftMultipleLevels.data.d.ts +114 -0
  49. package/dist/features/wrapUnwrap/__tests__/nestedListItemsLiftMultipleLevels.playwright.test.d.ts +1 -0
  50. package/dist/features/wrapUnwrap/__tests__/nestedListItemsLiftMultipleLevels.test.d.ts +1 -0
  51. package/dist/features/wrapUnwrap/__tests__/testUtils.d.ts +5 -0
  52. package/dist/features/wrapUnwrap/__tests__/tripleBlockquoteLiftMultipleNodesToTheTop.data.d.ts +44 -0
  53. package/dist/features/wrapUnwrap/__tests__/tripleBlockquoteLiftMultipleNodesToTheTop.playwright.test.d.ts +1 -0
  54. package/dist/features/wrapUnwrap/__tests__/tripleBlockquoteLiftMultipleNodesToTheTop.test.d.ts +1 -0
  55. package/dist/features/wrapUnwrap/__tests__/tripleBlockquoteLiftMultipleNodesUp.data.d.ts +38 -0
  56. package/dist/features/wrapUnwrap/__tests__/tripleBlockquoteLiftMultipleNodesUp.playwright.test.d.ts +1 -0
  57. package/dist/features/wrapUnwrap/__tests__/tripleBlockquoteLiftMultipleNodesUp.test.d.ts +1 -0
  58. package/dist/features/wrapUnwrap/__tests__/tripleBlockquoteLiftOneNodeFromMiddle.data.d.ts +46 -0
  59. package/dist/features/wrapUnwrap/__tests__/tripleBlockquoteLiftOneNodeFromMiddle.playwright.test.d.ts +1 -0
  60. package/dist/features/wrapUnwrap/__tests__/tripleBlockquoteLiftOneNodeFromMiddle.test.d.ts +1 -0
  61. package/dist/features/wrapUnwrap/__tests__/tripleBlockquoteLiftOneNodeToTheTop.data.d.ts +57 -0
  62. package/dist/features/wrapUnwrap/__tests__/tripleBlockquoteLiftOneNodeToTheTop.playwright.test.d.ts +1 -0
  63. package/dist/features/wrapUnwrap/__tests__/tripleBlockquoteLiftOneNodeToTheTop.test.d.ts +1 -0
  64. package/dist/features/wrapUnwrap/__tests__/tripleBlockquoteLiftOneNodeUp.data.d.ts +45 -0
  65. package/dist/features/wrapUnwrap/__tests__/tripleBlockquoteLiftOneNodeUp.playwright.test.d.ts +1 -0
  66. package/dist/features/wrapUnwrap/__tests__/tripleBlockquoteLiftOneNodeUp.test.d.ts +1 -0
  67. package/dist/features/wrapUnwrap/__tests__/tripleBlockquoteWrap.data.d.ts +44 -0
  68. package/dist/features/wrapUnwrap/__tests__/tripleBlockquoteWrap.playwright.test.d.ts +1 -0
  69. package/dist/features/wrapUnwrap/__tests__/tripleBlockquoteWrap.test.d.ts +1 -0
  70. package/dist/features/wrapUnwrap/__tests__/tripleBlockquoteWrapMultiple.data.d.ts +44 -0
  71. package/dist/features/wrapUnwrap/__tests__/tripleBlockquoteWrapMultiple.playwright.test.d.ts +1 -0
  72. package/dist/features/wrapUnwrap/__tests__/tripleBlockquoteWrapMultiple.test.d.ts +1 -0
  73. package/dist/features/wrapUnwrap/addStructureMark.d.ts +41 -0
  74. package/dist/features/wrapUnwrap/addStructureMark.js +15 -0
  75. package/dist/features/wrapUnwrap/findMatchingNodeSides.d.ts +15 -0
  76. package/dist/features/wrapUnwrap/findMatchingNodeSides.js +133 -0
  77. package/dist/features/wrapUnwrap/handleStructureStep.d.ts +4 -0
  78. package/dist/features/wrapUnwrap/handleStructureStep.js +174 -0
  79. package/dist/features/wrapUnwrap/revertStructureSuggestion.d.ts +44 -0
  80. package/dist/features/wrapUnwrap/revertStructureSuggestion.js +374 -0
  81. package/dist/generateId.js +2 -2
  82. package/dist/index.d.ts +1 -1
  83. package/dist/index.js +1 -1
  84. package/dist/rebaseStep.d.ts +9 -0
  85. package/dist/rebaseStep.js +11 -0
  86. package/dist/replaceAroundStep.js +6 -1
  87. package/dist/replaceStep.js +5 -0
  88. package/dist/schema.d.ts +2 -1
  89. package/dist/schema.js +37 -1
  90. package/dist/testing/testBuilders.d.ts +1 -2
  91. package/dist/utils.d.ts +1 -0
  92. package/dist/utils.js +6 -2
  93. package/package.json +1 -1
  94. package/src/features/wrapUnwrap/README.md +198 -0
@@ -51,7 +51,9 @@ export declare function revertSuggestionsInRange(from?: number, to?: number): Co
51
51
  * The deletion mark will be removed, and their contents left in the doc.
52
52
  * Modifications tracked in modification marks will be reverted.
53
53
  */
54
- export declare function revertSuggestion(suggestionId: SuggestionId, from?: number, to?: number): Command;
54
+ export declare function revertSuggestion(suggestionId: SuggestionId, from?: number, to?: number, opts?: {
55
+ structure: boolean;
56
+ }): Command;
55
57
  /**
56
58
  * Command that updates the selection to cover an existing change.
57
59
  */
package/dist/commands.js CHANGED
@@ -5,6 +5,7 @@ import { suggestChangesKey } from "./plugin.js";
5
5
  import { getSuggestionMarks } from "./utils.js";
6
6
  import { ZWSP } from "./constants.js";
7
7
  import { maybeRevertJoinMark } from "./features/joinOnDelete/index.js";
8
+ import { applyStructureSuggestion, isStructureSuggestion, revertAllStructureSuggestions, revertStructureSuggestion } from "./features/wrapUnwrap/revertStructureSuggestion.js";
8
9
  /**
9
10
  * Given a node and a transform, add a set of steps to the
10
11
  * transform that applies all marks of type markTypeToApply
@@ -193,6 +194,9 @@ export function applySuggestionsToRange(doc, from, to) {
193
194
  * contents left in the doc.
194
195
  */ export function applySuggestion(suggestionId, from, to) {
195
196
  return (state, dispatch)=>{
197
+ if (isStructureSuggestion(suggestionId, state.tr)) {
198
+ return applyStructureSuggestion(suggestionId)(state, dispatch);
199
+ }
196
200
  const { deletion, insertion } = getSuggestionMarks(state.schema);
197
201
  const tr = state.tr;
198
202
  applySuggestionsToTransform(state.doc, tr, insertion, deletion, suggestionId, from, to);
@@ -214,7 +218,9 @@ export function applySuggestionsToRange(doc, from, to) {
214
218
  */ export function revertSuggestions(state, dispatch) {
215
219
  const { deletion, insertion } = getSuggestionMarks(state.schema);
216
220
  const tr = state.tr;
217
- applySuggestionsToTransform(state.doc, tr, deletion, insertion);
221
+ const doc = state.doc;
222
+ revertAllStructureSuggestions(doc, tr);
223
+ applySuggestionsToTransform(doc, tr, deletion, insertion);
218
224
  applyModificationsToTransform(tr.doc, tr, -1);
219
225
  tr.setMeta(suggestChangesKey, {
220
226
  skip: true
@@ -247,8 +253,14 @@ export function applySuggestionsToRange(doc, from, to) {
247
253
  * This means that all content within the insertion mark will be deleted.
248
254
  * The deletion mark will be removed, and their contents left in the doc.
249
255
  * Modifications tracked in modification marks will be reverted.
250
- */ export function revertSuggestion(suggestionId, from, to) {
256
+ */ export function revertSuggestion(suggestionId, from, to, opts) {
251
257
  return (state, dispatch)=>{
258
+ if (opts?.structure === true) {
259
+ return revertStructureSuggestion(suggestionId)(state, dispatch);
260
+ }
261
+ if (opts?.structure !== false && isStructureSuggestion(suggestionId, state.tr)) {
262
+ return revertStructureSuggestion(suggestionId)(state, dispatch);
263
+ }
252
264
  const { deletion, insertion } = getSuggestionMarks(state.schema);
253
265
  const tr = state.tr;
254
266
  applySuggestionsToTransform(state.doc, tr, deletion, insertion, suggestionId, from, to);
@@ -0,0 +1,2 @@
1
+ import { type Node } from "prosemirror-model";
2
+ export declare function contentBetween(doc: Node, from: number, to: number): boolean;
@@ -0,0 +1,33 @@
1
+ /*
2
+ This function is used by ProseMirror to verify structure steps
3
+ https://github.com/ProseMirror/prosemirror-transform/blob/1.11.0/src/replace_step.ts#L163
4
+ https://github.com/ProseMirror/prosemirror-transform/blob/1.11.0/src/replace_step.ts#L110
5
+
6
+ If step is a structure step (structure: true),
7
+ it means the range it covers does not contain any content
8
+ except for closing and opening tokens (see https://prosemirror.net/docs/ref/#transform.ReplaceStep)
9
+
10
+ ProseMirror throws an error if this function returns true for a structure step
11
+ https://github.com/ProseMirror/prosemirror-transform/blob/1.11.0/src/replace_step.ts#L30
12
+
13
+ We can use this function to do the opposite -
14
+ if some step has structure: false,
15
+ but this function return false,
16
+ then we can treat the step as a structure step
17
+ */ export function contentBetween(doc, from, to) {
18
+ // eslint-disable-next-line prefer-const
19
+ let $from = doc.resolve(from), dist = to - from, depth = $from.depth;
20
+ while(dist > 0 && depth > 0 && $from.indexAfter(depth) == $from.node(depth).childCount){
21
+ depth--;
22
+ dist--;
23
+ }
24
+ if (dist > 0) {
25
+ let next = $from.node(depth).maybeChild($from.indexAfter(depth));
26
+ while(dist > 0){
27
+ if (!next || next.isLeaf) return true;
28
+ next = next.firstChild;
29
+ dist--;
30
+ }
31
+ }
32
+ return false;
33
+ }
@@ -0,0 +1,38 @@
1
+ export declare const initialDoc: import("prosemirror-model").Node & {
2
+ tag: {
3
+ [tag: string]: number;
4
+ };
5
+ };
6
+ export declare const finalDoc: import("prosemirror-model").Node & {
7
+ tag: {
8
+ [tag: string]: number;
9
+ };
10
+ };
11
+ export declare const finalDocWithMarks: import("prosemirror-model").Node & {
12
+ tag: {
13
+ [tag: string]: number;
14
+ };
15
+ };
16
+ export declare const steps: {
17
+ stepType: string;
18
+ from: number;
19
+ to: number;
20
+ gapFrom: number;
21
+ gapTo: number;
22
+ insert: number;
23
+ structure: boolean;
24
+ }[];
25
+ export declare const inverseSteps: {
26
+ stepType: string;
27
+ from: number;
28
+ to: number;
29
+ gapFrom: number;
30
+ gapTo: number;
31
+ insert: number;
32
+ slice: {
33
+ content: {
34
+ type: string;
35
+ }[];
36
+ };
37
+ structure: boolean;
38
+ }[];
@@ -0,0 +1,45 @@
1
+ export declare const initialDoc: import("prosemirror-model").Node & {
2
+ tag: {
3
+ [tag: string]: number;
4
+ };
5
+ };
6
+ export declare const finalDoc: import("prosemirror-model").Node & {
7
+ tag: {
8
+ [tag: string]: number;
9
+ };
10
+ };
11
+ export declare const finalDocWithMarks: import("prosemirror-model").Node & {
12
+ tag: {
13
+ [tag: string]: number;
14
+ };
15
+ };
16
+ export declare const steps: {
17
+ stepType: string;
18
+ from: number;
19
+ to: number;
20
+ gapFrom: number;
21
+ gapTo: number;
22
+ insert: number;
23
+ slice: {
24
+ content: {
25
+ type: string;
26
+ }[];
27
+ openStart: number;
28
+ };
29
+ structure: boolean;
30
+ }[];
31
+ export declare const inverseSteps: {
32
+ stepType: string;
33
+ from: number;
34
+ to: number;
35
+ gapFrom: number;
36
+ gapTo: number;
37
+ insert: number;
38
+ slice: {
39
+ content: {
40
+ type: string;
41
+ }[];
42
+ openStart: number;
43
+ };
44
+ structure: boolean;
45
+ }[];
@@ -0,0 +1,38 @@
1
+ export declare const initialDoc: import("prosemirror-model").Node & {
2
+ tag: {
3
+ [tag: string]: number;
4
+ };
5
+ };
6
+ export declare const finalDoc: import("prosemirror-model").Node & {
7
+ tag: {
8
+ [tag: string]: number;
9
+ };
10
+ };
11
+ export declare const finalDocWithMarks: import("prosemirror-model").Node & {
12
+ tag: {
13
+ [tag: string]: number;
14
+ };
15
+ };
16
+ export declare const steps: {
17
+ stepType: string;
18
+ from: number;
19
+ to: number;
20
+ gapFrom: number;
21
+ gapTo: number;
22
+ insert: number;
23
+ structure: boolean;
24
+ }[];
25
+ export declare const inverseSteps: {
26
+ stepType: string;
27
+ from: number;
28
+ to: number;
29
+ gapFrom: number;
30
+ gapTo: number;
31
+ insert: number;
32
+ slice: {
33
+ content: {
34
+ type: string;
35
+ }[];
36
+ };
37
+ structure: boolean;
38
+ }[];
@@ -0,0 +1,38 @@
1
+ export declare const initialDoc: import("prosemirror-model").Node & {
2
+ tag: {
3
+ [tag: string]: number;
4
+ };
5
+ };
6
+ export declare const finalDoc: import("prosemirror-model").Node & {
7
+ tag: {
8
+ [tag: string]: number;
9
+ };
10
+ };
11
+ export declare const finalDocWithMarks: import("prosemirror-model").Node & {
12
+ tag: {
13
+ [tag: string]: number;
14
+ };
15
+ };
16
+ export declare const steps: {
17
+ stepType: string;
18
+ from: number;
19
+ to: number;
20
+ gapFrom: number;
21
+ gapTo: number;
22
+ insert: number;
23
+ slice: {
24
+ content: {
25
+ type: string;
26
+ }[];
27
+ };
28
+ structure: boolean;
29
+ }[];
30
+ export declare const inverseSteps: {
31
+ stepType: string;
32
+ from: number;
33
+ to: number;
34
+ gapFrom: number;
35
+ gapTo: number;
36
+ insert: number;
37
+ structure: boolean;
38
+ }[];
@@ -0,0 +1,38 @@
1
+ export declare const initialDoc: import("prosemirror-model").Node & {
2
+ tag: {
3
+ [tag: string]: number;
4
+ };
5
+ };
6
+ export declare const finalDoc: import("prosemirror-model").Node & {
7
+ tag: {
8
+ [tag: string]: number;
9
+ };
10
+ };
11
+ export declare const finalDocWithMarks: import("prosemirror-model").Node & {
12
+ tag: {
13
+ [tag: string]: number;
14
+ };
15
+ };
16
+ export declare const steps: {
17
+ stepType: string;
18
+ from: number;
19
+ to: number;
20
+ gapFrom: number;
21
+ gapTo: number;
22
+ insert: number;
23
+ slice: {
24
+ content: {
25
+ type: string;
26
+ }[];
27
+ };
28
+ structure: boolean;
29
+ }[];
30
+ export declare const inverseSteps: {
31
+ stepType: string;
32
+ from: number;
33
+ to: number;
34
+ gapFrom: number;
35
+ gapTo: number;
36
+ insert: number;
37
+ structure: boolean;
38
+ }[];
@@ -0,0 +1,54 @@
1
+ export declare const initialDoc: import("prosemirror-model").Node & {
2
+ tag: {
3
+ [tag: string]: number;
4
+ };
5
+ };
6
+ export declare const finalDoc: import("prosemirror-model").Node & {
7
+ tag: {
8
+ [tag: string]: number;
9
+ };
10
+ };
11
+ export declare const finalDocWithMarks: import("prosemirror-model").Node & {
12
+ tag: {
13
+ [tag: string]: number;
14
+ };
15
+ };
16
+ export declare const steps: {
17
+ stepType: string;
18
+ from: number;
19
+ to: number;
20
+ gapFrom: number;
21
+ gapTo: number;
22
+ insert: number;
23
+ slice: {
24
+ content: {
25
+ type: string;
26
+ attrs: {
27
+ order: number;
28
+ };
29
+ }[];
30
+ openStart: number;
31
+ };
32
+ structure: boolean;
33
+ }[];
34
+ export declare const inverseSteps: {
35
+ stepType: string;
36
+ from: number;
37
+ to: number;
38
+ gapFrom: number;
39
+ gapTo: number;
40
+ insert: number;
41
+ slice: {
42
+ content: {
43
+ type: string;
44
+ attrs: {
45
+ order: number;
46
+ };
47
+ content: {
48
+ type: string;
49
+ }[];
50
+ }[];
51
+ openStart: number;
52
+ };
53
+ structure: boolean;
54
+ }[];
@@ -0,0 +1,48 @@
1
+ export declare const initialDoc: import("prosemirror-model").Node & {
2
+ tag: {
3
+ [tag: string]: number;
4
+ };
5
+ };
6
+ export declare const finalDoc: import("prosemirror-model").Node & {
7
+ tag: {
8
+ [tag: string]: number;
9
+ };
10
+ };
11
+ export declare const finalDocWithMarks: import("prosemirror-model").Node & {
12
+ tag: {
13
+ [tag: string]: number;
14
+ };
15
+ };
16
+ export declare const steps: {
17
+ stepType: string;
18
+ from: number;
19
+ to: number;
20
+ gapFrom: number;
21
+ gapTo: number;
22
+ insert: number;
23
+ slice: {
24
+ content: {
25
+ type: string;
26
+ attrs: {
27
+ order: number;
28
+ };
29
+ }[];
30
+ openStart: number;
31
+ openEnd: number;
32
+ };
33
+ structure: boolean;
34
+ }[];
35
+ export declare const inverseSteps: {
36
+ stepType: string;
37
+ from: number;
38
+ to: number;
39
+ gapFrom: number;
40
+ gapTo: number;
41
+ insert: number;
42
+ slice: {
43
+ content: {
44
+ type: string;
45
+ }[];
46
+ };
47
+ structure: boolean;
48
+ }[];
@@ -0,0 +1,74 @@
1
+ export declare const initialDoc: import("prosemirror-model").Node & {
2
+ tag: {
3
+ [tag: string]: number;
4
+ };
5
+ };
6
+ export declare const finalDoc: import("prosemirror-model").Node & {
7
+ tag: {
8
+ [tag: string]: number;
9
+ };
10
+ };
11
+ export declare const finalDocWithMarks: import("prosemirror-model").Node & {
12
+ tag: {
13
+ [tag: string]: number;
14
+ };
15
+ };
16
+ export declare const steps: ({
17
+ stepType: string;
18
+ from: number;
19
+ to: number;
20
+ gapFrom?: never;
21
+ gapTo?: never;
22
+ insert?: never;
23
+ slice?: never;
24
+ structure?: never;
25
+ } | {
26
+ stepType: string;
27
+ from: number;
28
+ to: number;
29
+ gapFrom: number;
30
+ gapTo: number;
31
+ insert: number;
32
+ slice: {
33
+ content: {
34
+ type: string;
35
+ attrs: {
36
+ order: number;
37
+ };
38
+ }[];
39
+ openStart: number;
40
+ openEnd: number;
41
+ };
42
+ structure: boolean;
43
+ })[];
44
+ export declare const inverseSteps: ({
45
+ stepType: string;
46
+ from: number;
47
+ to: number;
48
+ slice: {
49
+ content: {
50
+ type: string;
51
+ }[];
52
+ openStart: number;
53
+ openEnd: number;
54
+ };
55
+ gapFrom?: never;
56
+ gapTo?: never;
57
+ insert?: never;
58
+ structure?: never;
59
+ } | {
60
+ stepType: string;
61
+ from: number;
62
+ to: number;
63
+ gapFrom: number;
64
+ gapTo: number;
65
+ insert: number;
66
+ slice: {
67
+ content: {
68
+ type: string;
69
+ }[];
70
+ openStart?: never;
71
+ openEnd?: never;
72
+ };
73
+ structure: boolean;
74
+ })[];
@@ -0,0 +1,71 @@
1
+ export declare const initialDoc: import("prosemirror-model").Node & {
2
+ tag: {
3
+ [tag: string]: number;
4
+ };
5
+ };
6
+ export declare const finalDoc: import("prosemirror-model").Node & {
7
+ tag: {
8
+ [tag: string]: number;
9
+ };
10
+ };
11
+ export declare const finalDocWithMarks: import("prosemirror-model").Node & {
12
+ tag: {
13
+ [tag: string]: number;
14
+ };
15
+ };
16
+ export declare const steps: {
17
+ stepType: string;
18
+ from: number;
19
+ to: number;
20
+ gapFrom: number;
21
+ gapTo: number;
22
+ insert: number;
23
+ slice: {
24
+ content: {
25
+ type: string;
26
+ content: {
27
+ type: string;
28
+ attrs: {
29
+ order: number;
30
+ };
31
+ }[];
32
+ }[];
33
+ openStart: number;
34
+ };
35
+ structure: boolean;
36
+ }[];
37
+ export declare const inverseSteps: ({
38
+ stepType: string;
39
+ from: number;
40
+ to: number;
41
+ gapFrom: number;
42
+ gapTo: number;
43
+ insert: number;
44
+ slice: {
45
+ content: {
46
+ type: string;
47
+ }[];
48
+ openStart: number;
49
+ };
50
+ structure: boolean;
51
+ } | {
52
+ stepType: string;
53
+ from: number;
54
+ to: number;
55
+ gapFrom: number;
56
+ gapTo: number;
57
+ insert: number;
58
+ slice: {
59
+ content: {
60
+ type: string;
61
+ content: {
62
+ type: string;
63
+ attrs: {
64
+ order: number;
65
+ };
66
+ }[];
67
+ }[];
68
+ openStart: number;
69
+ };
70
+ structure: boolean;
71
+ })[];
@@ -0,0 +1,54 @@
1
+ export declare const initialDoc: import("prosemirror-model").Node & {
2
+ tag: {
3
+ [tag: string]: number;
4
+ };
5
+ };
6
+ export declare const finalDoc: import("prosemirror-model").Node & {
7
+ tag: {
8
+ [tag: string]: number;
9
+ };
10
+ };
11
+ export declare const finalDocWithMarks: import("prosemirror-model").Node & {
12
+ tag: {
13
+ [tag: string]: number;
14
+ };
15
+ };
16
+ export declare const steps: {
17
+ stepType: string;
18
+ from: number;
19
+ to: number;
20
+ gapFrom: number;
21
+ gapTo: number;
22
+ insert: number;
23
+ slice: {
24
+ content: {
25
+ type: string;
26
+ attrs: {
27
+ order: number;
28
+ };
29
+ }[];
30
+ openEnd: number;
31
+ };
32
+ structure: boolean;
33
+ }[];
34
+ export declare const inverseSteps: {
35
+ stepType: string;
36
+ from: number;
37
+ to: number;
38
+ gapFrom: number;
39
+ gapTo: number;
40
+ insert: number;
41
+ slice: {
42
+ content: {
43
+ type: string;
44
+ attrs: {
45
+ order: number;
46
+ };
47
+ content: {
48
+ type: string;
49
+ }[];
50
+ }[];
51
+ openEnd: number;
52
+ };
53
+ structure: boolean;
54
+ }[];