Skip to content

Commit 998c737

Browse files
committed
feat: getChanges can now report moves, indents and outdents
1 parent 3b2cddd commit 998c737

8 files changed

+1153
-120
lines changed
Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
[
2+
{
3+
"block": {
4+
"children": [],
5+
"content": [
6+
{
7+
"styles": {},
8+
"text": "C",
9+
"type": "text",
10+
},
11+
],
12+
"id": "double-nested-paragraph-0",
13+
"props": {
14+
"backgroundColor": "default",
15+
"textAlignment": "left",
16+
"textColor": "default",
17+
},
18+
"type": "paragraph",
19+
},
20+
"currentParent": {
21+
"children": [
22+
{
23+
"children": [],
24+
"content": [
25+
{
26+
"styles": {},
27+
"text": "C",
28+
"type": "text",
29+
},
30+
],
31+
"id": "double-nested-paragraph-0",
32+
"props": {
33+
"backgroundColor": "default",
34+
"textAlignment": "left",
35+
"textColor": "default",
36+
},
37+
"type": "paragraph",
38+
},
39+
],
40+
"content": [
41+
{
42+
"styles": {},
43+
"text": "B",
44+
"type": "text",
45+
},
46+
],
47+
"id": "nested-paragraph-0",
48+
"props": {
49+
"backgroundColor": "default",
50+
"textAlignment": "left",
51+
"textColor": "default",
52+
},
53+
"type": "paragraph",
54+
},
55+
"prevBlock": {
56+
"children": [],
57+
"content": [
58+
{
59+
"styles": {},
60+
"text": "C",
61+
"type": "text",
62+
},
63+
],
64+
"id": "double-nested-paragraph-0",
65+
"props": {
66+
"backgroundColor": "default",
67+
"textAlignment": "left",
68+
"textColor": "default",
69+
},
70+
"type": "paragraph",
71+
},
72+
"prevParent": {
73+
"children": [
74+
{
75+
"children": [],
76+
"content": [
77+
{
78+
"styles": {},
79+
"text": "B",
80+
"type": "text",
81+
},
82+
],
83+
"id": "nested-paragraph-0",
84+
"props": {
85+
"backgroundColor": "default",
86+
"textAlignment": "left",
87+
"textColor": "default",
88+
},
89+
"type": "paragraph",
90+
},
91+
{
92+
"children": [],
93+
"content": [
94+
{
95+
"styles": {},
96+
"text": "C",
97+
"type": "text",
98+
},
99+
],
100+
"id": "double-nested-paragraph-0",
101+
"props": {
102+
"backgroundColor": "default",
103+
"textAlignment": "left",
104+
"textColor": "default",
105+
},
106+
"type": "paragraph",
107+
},
108+
],
109+
"content": [
110+
{
111+
"styles": {},
112+
"text": "A",
113+
"type": "text",
114+
},
115+
],
116+
"id": "paragraph-with-children",
117+
"props": {
118+
"backgroundColor": "default",
119+
"textAlignment": "left",
120+
"textColor": "default",
121+
},
122+
"type": "paragraph",
123+
},
124+
"source": {
125+
"type": "local",
126+
},
127+
"type": "indent",
128+
},
129+
]
Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
[
2+
{
3+
"block": {
4+
"children": [],
5+
"content": [
6+
{
7+
"styles": {},
8+
"text": "Target",
9+
"type": "text",
10+
},
11+
],
12+
"id": "target",
13+
"props": {
14+
"backgroundColor": "default",
15+
"textAlignment": "left",
16+
"textColor": "default",
17+
},
18+
"type": "paragraph",
19+
},
20+
"currentParent": {
21+
"children": [
22+
{
23+
"children": [],
24+
"content": [
25+
{
26+
"styles": {},
27+
"text": "Level 2",
28+
"type": "text",
29+
},
30+
],
31+
"id": "level-2",
32+
"props": {
33+
"backgroundColor": "default",
34+
"textAlignment": "left",
35+
"textColor": "default",
36+
},
37+
"type": "paragraph",
38+
},
39+
{
40+
"children": [],
41+
"content": [
42+
{
43+
"styles": {},
44+
"text": "Target",
45+
"type": "text",
46+
},
47+
],
48+
"id": "target",
49+
"props": {
50+
"backgroundColor": "default",
51+
"textAlignment": "left",
52+
"textColor": "default",
53+
},
54+
"type": "paragraph",
55+
},
56+
],
57+
"content": [
58+
{
59+
"styles": {},
60+
"text": "Level 1",
61+
"type": "text",
62+
},
63+
],
64+
"id": "level-1",
65+
"props": {
66+
"backgroundColor": "default",
67+
"textAlignment": "left",
68+
"textColor": "default",
69+
},
70+
"type": "paragraph",
71+
},
72+
"prevBlock": {
73+
"children": [],
74+
"content": [
75+
{
76+
"styles": {},
77+
"text": "Target",
78+
"type": "text",
79+
},
80+
],
81+
"id": "target",
82+
"props": {
83+
"backgroundColor": "default",
84+
"textAlignment": "left",
85+
"textColor": "default",
86+
},
87+
"type": "paragraph",
88+
},
89+
"prevParent": {
90+
"children": [
91+
{
92+
"children": [
93+
{
94+
"children": [],
95+
"content": [
96+
{
97+
"styles": {},
98+
"text": "Level 2",
99+
"type": "text",
100+
},
101+
],
102+
"id": "level-2",
103+
"props": {
104+
"backgroundColor": "default",
105+
"textAlignment": "left",
106+
"textColor": "default",
107+
},
108+
"type": "paragraph",
109+
},
110+
],
111+
"content": [
112+
{
113+
"styles": {},
114+
"text": "Level 1",
115+
"type": "text",
116+
},
117+
],
118+
"id": "level-1",
119+
"props": {
120+
"backgroundColor": "default",
121+
"textAlignment": "left",
122+
"textColor": "default",
123+
},
124+
"type": "paragraph",
125+
},
126+
{
127+
"children": [],
128+
"content": [
129+
{
130+
"styles": {},
131+
"text": "Target",
132+
"type": "text",
133+
},
134+
],
135+
"id": "target",
136+
"props": {
137+
"backgroundColor": "default",
138+
"textAlignment": "left",
139+
"textColor": "default",
140+
},
141+
"type": "paragraph",
142+
},
143+
],
144+
"content": [
145+
{
146+
"styles": {},
147+
"text": "Root",
148+
"type": "text",
149+
},
150+
],
151+
"id": "root",
152+
"props": {
153+
"backgroundColor": "default",
154+
"textAlignment": "left",
155+
"textColor": "default",
156+
},
157+
"type": "paragraph",
158+
},
159+
"source": {
160+
"type": "local",
161+
},
162+
"type": "indent",
163+
},
164+
]

0 commit comments

Comments
 (0)