@lemonriver/core 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{build-Dm7gVRhb.js → build-CSkdswfd.js} +1 -1
- package/dist/cli/bin.js +5 -5
- package/dist/{config-CubOIzrs.js → config-C5-myPY6.js} +129 -2
- package/dist/{dev-DgLeXPqp.js → dev-DHtYH8sw.js} +2 -2
- package/dist/{mcp-CjYDzcJa.js → mcp-B2UeO1un.js} +1 -1
- package/dist/{preview-CxXQpPk5.js → preview-C1B6-umF.js} +1 -1
- package/dist/{update-b1dSg_FW.js → update-DzL8fpcI.js} +1 -1
- package/dist/vite/index.js +1 -1
- package/package.json +5 -2
- package/release-notes.json +19 -0
- package/src/app/lemonriver/chrome/app-chrome.tsx +52 -0
- package/src/app/lemonriver/chrome/sidebar-extras.tsx +8 -1
- package/src/app/lemonriver/feedback/dialog.tsx +222 -0
- package/src/app/lemonriver/feedback/export.ts +21 -2
- package/src/app/lemonriver/feedback/first-success.ts +30 -0
- package/src/app/lemonriver/feedback/install.ts +18 -0
- package/src/app/lemonriver/feedback/model.ts +88 -0
- package/src/app/lemonriver/help/help-page.tsx +16 -1
- package/src/app/lemonriver/links.ts +16 -0
- package/src/app/lemonriver/settings/backup-section.tsx +13 -0
- package/src/app/lemonriver/settings/settings-page.tsx +20 -0
- package/src/app/lemonriver/share/editor-share.tsx +6 -3
- package/src/app/lemonriver/share/share-dialog.tsx +2 -0
- package/src/app/lemonriver/text/en.ts +45 -0
- package/src/app/lemonriver/text/es.ts +42 -0
- package/src/app/lemonriver/text/ja.ts +41 -0
- package/src/app/lemonriver/text/types.ts +44 -0
- package/src/app/lemonriver/text/zh-cn.ts +45 -0
- package/src/app/lemonriver/text/zh-tw.ts +45 -0
- package/src/app/lemonriver/theme/pages.ts +4 -0
- package/src/app/lemonriver/update/release-notes.ts +22 -0
- package/src/app/lemonriver/update/update-prompt.tsx +28 -4
- package/src/app/components/note-markdown.test.tsx +0 -42
- package/src/app/components/thumbnail-rail-scroll.test.ts +0 -60
- package/src/app/lemonriver/agent-prefs/prefs.test.ts +0 -173
- package/src/app/lemonriver/backup/guide.test.ts +0 -45
- package/src/app/lemonriver/backup/model.test.ts +0 -108
- package/src/app/lemonriver/backup/places.test.ts +0 -154
- package/src/app/lemonriver/board/blocks/classify.test.ts +0 -209
- package/src/app/lemonriver/board/layout.test.ts +0 -245
- package/src/app/lemonriver/board/model/agent-tasks.test.ts +0 -200
- package/src/app/lemonriver/board/model/apply-prompt.test.ts +0 -121
- package/src/app/lemonriver/board/model/cards.test.ts +0 -332
- package/src/app/lemonriver/board/model/changes.test.ts +0 -244
- package/src/app/lemonriver/board/model/filter.test.ts +0 -50
- package/src/app/lemonriver/board/model/history.test.ts +0 -71
- package/src/app/lemonriver/board/model/restructure.test.ts +0 -205
- package/src/app/lemonriver/board/model/self-check.test.ts +0 -329
- package/src/app/lemonriver/board/model/structure.test.ts +0 -350
- package/src/app/lemonriver/board/model/timing.test.ts +0 -113
- package/src/app/lemonriver/features.test.ts +0 -49
- package/src/app/lemonriver/feedback/pending-toast.test.ts +0 -44
- package/src/app/lemonriver/feedback/upload.test.ts +0 -26
- package/src/app/lemonriver/help/model.test.ts +0 -179
- package/src/app/lemonriver/home/brief.test.ts +0 -38
- package/src/app/lemonriver/home/drafts.test.ts +0 -23
- package/src/app/lemonriver/home/sorting.test.ts +0 -24
- package/src/app/lemonriver/home/time.test.ts +0 -33
- package/src/app/lemonriver/outline/files.test.ts +0 -90
- package/src/app/lemonriver/outline/model.test.ts +0 -751
- package/src/app/lemonriver/public-links.test.ts +0 -32
- package/src/app/lemonriver/routes.test.tsx +0 -54
- package/src/app/lemonriver/share/codes.test.ts +0 -49
- package/src/app/lemonriver/share/compare.test.ts +0 -199
- package/src/app/lemonriver/share/folder.test.ts +0 -42
- package/src/app/lemonriver/share/guide.test.ts +0 -78
- package/src/app/lemonriver/share/naming.test.ts +0 -70
- package/src/app/lemonriver/share/paths.test.ts +0 -116
- package/src/app/lemonriver/share/pdf.test.ts +0 -79
- package/src/app/lemonriver/templates/knobs.test.ts +0 -62
- package/src/app/lemonriver/templates/model.test.ts +0 -175
- package/src/app/lemonriver/templates/preview-content.test.ts +0 -117
- package/src/app/lemonriver/templates/recommend.test.ts +0 -71
- package/src/app/lemonriver/text/text.test.ts +0 -90
- package/src/app/lemonriver/theme/pages.test.ts +0 -74
- package/src/app/lemonriver/theme/themes.test.ts +0 -18
- package/src/app/lemonriver/trash/api.test.ts +0 -19
- package/src/app/lemonriver/update/prompt.test.ts +0 -84
- package/src/app/lemonriver/update/version.test.ts +0 -14
- package/src/app/lib/asset-filter.test.ts +0 -176
- package/src/app/lib/inspector/fiber.test.ts +0 -154
- package/src/app/lib/inspector/geometry.test.ts +0 -324
- package/src/app/lib/inspector/text-edit-timeline.test.ts +0 -121
- package/src/app/lib/note-markdown.test.ts +0 -147
- package/src/app/lib/pptx/css.test.ts +0 -205
- package/src/app/lib/pptx/ooxml.test.ts +0 -199
- package/src/app/lib/pptx/text-lines.test.ts +0 -82
- package/src/app/lib/print-ready.test.ts +0 -32
- package/src/app/lib/sdk.test.ts +0 -13
- package/src/app/lib/transition.test.ts +0 -31
- package/src/app/lib/use-document-title.test.ts +0 -14
- package/src/app/lib/utils.test.ts +0 -49
|
@@ -1,329 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from 'vitest';
|
|
2
|
-
import type { SnapNode } from '../blocks/classify.ts';
|
|
3
|
-
import { type CheckedPage, checkDeck, hintsOf, problemsOf, toHex } from './self-check.ts';
|
|
4
|
-
|
|
5
|
-
function node(tag: string, extra: Partial<SnapNode> = {}, children: SnapNode[] = []): SnapNode {
|
|
6
|
-
return {
|
|
7
|
-
tag,
|
|
8
|
-
text: '',
|
|
9
|
-
fullText: extra.fullText ?? extra.text ?? '',
|
|
10
|
-
fontSize: 32,
|
|
11
|
-
lineHeight: 0,
|
|
12
|
-
fontWeight: 400,
|
|
13
|
-
color: '#111111',
|
|
14
|
-
background: '',
|
|
15
|
-
box: { x: 0, y: 540, w: 0, h: 0 },
|
|
16
|
-
clip: null,
|
|
17
|
-
lines: [],
|
|
18
|
-
loc: null,
|
|
19
|
-
placeholder: false,
|
|
20
|
-
step: false,
|
|
21
|
-
children,
|
|
22
|
-
...extra,
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
const page = (children: SnapNode[], notes = '一句话讲稿'): CheckedPage => ({
|
|
27
|
-
n: 1,
|
|
28
|
-
tree: node('div', { box: { x: 0, y: 0, w: 1920, h: 1080 } }, children),
|
|
29
|
-
notes,
|
|
30
|
-
title: '测试页',
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
const findingsOf = (pages: CheckedPage[], options: { accent?: string; minType?: number } = {}) =>
|
|
34
|
-
checkDeck(pages, options).findings;
|
|
35
|
-
|
|
36
|
-
const kinds = (pages: CheckedPage[], options: { accent?: string; minType?: number } = {}) =>
|
|
37
|
-
findingsOf(pages, options).map((finding) => finding.kind);
|
|
38
|
-
|
|
39
|
-
const PARAGRAPH = '这是一段真正的正文,长度超过二十四个字,够格算段落,请认真读。';
|
|
40
|
-
|
|
41
|
-
describe('toHex', () => {
|
|
42
|
-
it('turns rgb and hex into one lowercase hex form', () => {
|
|
43
|
-
expect(toHex('rgb(255, 0, 0)')).toBe('#ff0000');
|
|
44
|
-
expect(toHex('rgba(255, 0, 0, 0.5)')).toBe('#ff0000');
|
|
45
|
-
expect(toHex('#FF0000')).toBe('#ff0000');
|
|
46
|
-
expect(toHex('#f00')).toBe('#ff0000');
|
|
47
|
-
expect(toHex('rgba(0, 0, 0, 0)')).toBe('');
|
|
48
|
-
expect(toHex('color(srgb 1 0 0)')).toBe('');
|
|
49
|
-
});
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
describe('checkDeck', () => {
|
|
53
|
-
it('flags type under 20px and leaves 20px alone', () => {
|
|
54
|
-
expect(kinds([page([node('p', { text: '小字', fontSize: 14 })])])).toContain('tiny');
|
|
55
|
-
expect(kinds([page([node('p', { text: '小字', fontSize: 21 })])])).not.toContain('tiny');
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
it('lets a running part in the header or footer band go down to 18px', () => {
|
|
59
|
-
const line = (y: number, size: number, text = '页码') =>
|
|
60
|
-
node('p', { text, fontSize: size, box: { x: 1600, y, w: 200, h: 30 } });
|
|
61
|
-
expect(kinds([page([line(1000, 21)])])).not.toContain('tiny');
|
|
62
|
-
expect(kinds([page([line(1000, 17)])])).toContain('tiny');
|
|
63
|
-
expect(kinds([page([line(70, 19)])])).not.toContain('tiny');
|
|
64
|
-
expect(kinds([page([line(60, 17)])])).toContain('tiny');
|
|
65
|
-
const midway = node('p', {
|
|
66
|
-
text: '正文',
|
|
67
|
-
fontSize: 19,
|
|
68
|
-
box: { x: 120, y: 500, w: 300, h: 30 },
|
|
69
|
-
});
|
|
70
|
-
expect(kinds([page([midway])])).toContain('tiny');
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
it('does not look for body copy or accent inside the bands', () => {
|
|
74
|
-
const body = node('p', {
|
|
75
|
-
text: PARAGRAPH,
|
|
76
|
-
fontSize: 21,
|
|
77
|
-
box: { x: 120, y: 1000, w: 900, h: 30 },
|
|
78
|
-
});
|
|
79
|
-
expect(kinds([page([body])])).not.toContain('small-body');
|
|
80
|
-
const marked = (x: number) =>
|
|
81
|
-
node('div', { background: '#ff0000', box: { x, y: 960, w: 300, h: 60 } });
|
|
82
|
-
expect(
|
|
83
|
-
kinds([page([marked(100), marked(400), marked(700), marked(1000)])], { accent: '#ff0000' }),
|
|
84
|
-
).not.toContain('accent');
|
|
85
|
-
});
|
|
86
|
-
|
|
87
|
-
it('flags a paragraph under 22px but not a short label at the same size', () => {
|
|
88
|
-
const run = (text: string, size: number) => node('p', { text, fontSize: size });
|
|
89
|
-
expect(kinds([page([run(PARAGRAPH, 21)])])).toContain('small-body');
|
|
90
|
-
expect(kinds([page([run(PARAGRAPH, 22)])])).not.toContain('small-body');
|
|
91
|
-
expect(kinds([page([run('坐标轴 2026', 21)])])).not.toContain('small-body');
|
|
92
|
-
});
|
|
93
|
-
|
|
94
|
-
it('counts a Latin paragraph by its letters', () => {
|
|
95
|
-
const run = (text: string) => node('p', { text, fontSize: 21 });
|
|
96
|
-
expect(kinds([page([run('A short caption line')])])).not.toContain('small-body');
|
|
97
|
-
expect(kinds([page([run('This paragraph is long enough to be real body copy.')])])).toContain(
|
|
98
|
-
'small-body',
|
|
99
|
-
);
|
|
100
|
-
});
|
|
101
|
-
|
|
102
|
-
it('takes a template’s own floor for small type, inside 16 to 20', () => {
|
|
103
|
-
const label = node('p', { text: '短标签', fontSize: 17 });
|
|
104
|
-
expect(kinds([page([label])])).toContain('tiny');
|
|
105
|
-
expect(kinds([page([label])], { minType: 16 })).not.toContain('tiny');
|
|
106
|
-
expect(findingsOf([page([label])], { minType: 12 })).toEqual(findingsOf([page([label])]));
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
it('merges one kind on a page into one entry with every place', () => {
|
|
110
|
-
const small = (x: number, size: number) =>
|
|
111
|
-
node('p', { text: '小字', fontSize: size, box: { x, y: 300, w: 120, h: 30 } });
|
|
112
|
-
const findings = findingsOf([page([small(100, 14), small(400, 18), small(700, 16)])]);
|
|
113
|
-
const tiny = findings.filter((finding) => finding.kind === 'tiny');
|
|
114
|
-
expect(tiny).toHaveLength(1);
|
|
115
|
-
expect(tiny[0].count).toBe(3);
|
|
116
|
-
expect(tiny[0].boxes).toHaveLength(3);
|
|
117
|
-
expect(tiny[0].size).toBe(14);
|
|
118
|
-
expect(tiny[0].detail).toBe('3 runs of type at 14px');
|
|
119
|
-
});
|
|
120
|
-
|
|
121
|
-
it('keeps a page of many small runs to one problem', () => {
|
|
122
|
-
const runs = Array.from({ length: 40 }, (_, i) =>
|
|
123
|
-
node('p', { text: '标注', fontSize: 14, box: { x: 40 * i, y: 700, w: 30, h: 20 } }),
|
|
124
|
-
);
|
|
125
|
-
expect(kinds([page(runs)])).toEqual(['tiny']);
|
|
126
|
-
});
|
|
127
|
-
|
|
128
|
-
it('flags text and pictures that leave the canvas, not a decorative block', () => {
|
|
129
|
-
const bleed = { x: 1600, y: 900, w: 400, h: 100 };
|
|
130
|
-
const text = node('p', { text: '出界', box: bleed });
|
|
131
|
-
const decoration = node('div', { background: '#dddddd', box: bleed });
|
|
132
|
-
const picture = node('img', { box: bleed });
|
|
133
|
-
const inside = node('p', { text: '在页内', box: { x: 1600, y: 900, w: 300, h: 100 } });
|
|
134
|
-
expect(kinds([page([text])])).toContain('overflow');
|
|
135
|
-
expect(kinds([page([decoration])])).not.toContain('overflow');
|
|
136
|
-
expect(kinds([page([picture])])).toContain('overflow');
|
|
137
|
-
expect(kinds([page([inside])])).not.toContain('overflow');
|
|
138
|
-
});
|
|
139
|
-
|
|
140
|
-
it('leaves a copy an ancestor clips away alone, and still flags one that shows', () => {
|
|
141
|
-
const bleed = { x: 1600, y: 900, w: 400, h: 100 };
|
|
142
|
-
const band = { x: 0, y: 860, w: 1920, h: 220 };
|
|
143
|
-
const gone = node('p', {
|
|
144
|
-
text: '行情带副本',
|
|
145
|
-
box: bleed,
|
|
146
|
-
clip: { x: 0, y: 0, w: 1920, h: 880 },
|
|
147
|
-
});
|
|
148
|
-
const trimmed = node('p', { text: '行情带', box: bleed, clip: band });
|
|
149
|
-
const seen = node('p', { text: '出界', box: bleed });
|
|
150
|
-
expect(kinds([page([gone])])).not.toContain('overflow');
|
|
151
|
-
expect(kinds([page([trimmed])])).not.toContain('overflow');
|
|
152
|
-
expect(kinds([page([seen])])).toContain('overflow');
|
|
153
|
-
});
|
|
154
|
-
|
|
155
|
-
it('reads two lines that only touch as separate, and two that overlap as one', () => {
|
|
156
|
-
const line = (y: number) => ({ x: 200, y, w: 600, h: 48 });
|
|
157
|
-
const lineOf = (text: string, y: number) =>
|
|
158
|
-
node('p', {
|
|
159
|
-
text,
|
|
160
|
-
fontSize: 32,
|
|
161
|
-
lineHeight: 48,
|
|
162
|
-
box: line(y),
|
|
163
|
-
lines: [line(y)],
|
|
164
|
-
});
|
|
165
|
-
expect(kinds([page([lineOf('第一行', 200), lineOf('第二行', 242)])])).not.toContain('overlap');
|
|
166
|
-
expect(kinds([page([lineOf('第一行', 200), lineOf('压上来', 224)])])).toContain('overlap');
|
|
167
|
-
});
|
|
168
|
-
|
|
169
|
-
it('leaves a giant number or watermark out of overlap and overflow', () => {
|
|
170
|
-
const giant = node('div', {
|
|
171
|
-
text: 'Q3',
|
|
172
|
-
fontSize: 520,
|
|
173
|
-
box: { x: 1000, y: 500, w: 900, h: 700 },
|
|
174
|
-
});
|
|
175
|
-
expect(kinds([page([giant])])).not.toContain('overflow');
|
|
176
|
-
const body = node('p', { text: '副标题', box: { x: 1000, y: 520, w: 400, h: 60 } });
|
|
177
|
-
expect(kinds([page([giant, body])])).not.toContain('overlap');
|
|
178
|
-
});
|
|
179
|
-
|
|
180
|
-
it('flags a page with no notes', () => {
|
|
181
|
-
expect(kinds([page([], '')])).toContain('no-notes');
|
|
182
|
-
expect(kinds([page([], '一句话讲稿')])).not.toContain('no-notes');
|
|
183
|
-
});
|
|
184
|
-
|
|
185
|
-
it('does not pass a page it could not read', () => {
|
|
186
|
-
const unreadPage: CheckedPage = { n: 3, tree: null, notes: '', title: '' };
|
|
187
|
-
const result = checkDeck([unreadPage]);
|
|
188
|
-
expect(result.unread).toEqual([3]);
|
|
189
|
-
expect(result.findings.map((finding) => finding.kind)).toEqual(['no-notes']);
|
|
190
|
-
});
|
|
191
|
-
|
|
192
|
-
it('flags a title over 24 characters, or over 12 English words', () => {
|
|
193
|
-
const title = (text: string) => node('h1', { text, fontSize: 64 });
|
|
194
|
-
expect(kinds([page([title('一二三四五六七八九十一二三四五六七八九十一二三四五')])])).toContain(
|
|
195
|
-
'long-title',
|
|
196
|
-
);
|
|
197
|
-
expect(kinds([page([title('第三季度经营情况')])])).not.toContain('long-title');
|
|
198
|
-
expect(
|
|
199
|
-
kinds([page([title('one two three four five six seven eight nine ten eleven twelve')])]),
|
|
200
|
-
).not.toContain('long-title');
|
|
201
|
-
expect(
|
|
202
|
-
kinds([
|
|
203
|
-
page([title('one two three four five six seven eight nine ten eleven twelve thirteen')]),
|
|
204
|
-
]),
|
|
205
|
-
).toContain('long-title');
|
|
206
|
-
});
|
|
207
|
-
|
|
208
|
-
it('counts the accent once per block, and flags more than three blocks', () => {
|
|
209
|
-
const accent = (background: string) => node('div', { background });
|
|
210
|
-
const three = [accent('#ff0000'), accent('#ff0000'), accent('#ff0000')];
|
|
211
|
-
const four = [...three, accent('#ff0000')];
|
|
212
|
-
expect(kinds([page(three)], { accent: '#ff0000' })).not.toContain('accent');
|
|
213
|
-
expect(kinds([page(four)], { accent: '#ff0000' })).toContain('accent');
|
|
214
|
-
expect(findingsOf([page(four)], { accent: '#ff0000' })[0]?.measure).toBe(4);
|
|
215
|
-
});
|
|
216
|
-
|
|
217
|
-
it('keeps several accent elements of one block as one use', () => {
|
|
218
|
-
const marked = (y: number) =>
|
|
219
|
-
node('span', { background: '#ff0000', text: '强', box: { x: 20, y, w: 60, h: 40 } });
|
|
220
|
-
const block = node(
|
|
221
|
-
'p',
|
|
222
|
-
{ text: '一段带强调的正文', fontSize: 32, box: { x: 0, y: 100, w: 600, h: 200 } },
|
|
223
|
-
[marked(110), marked(160), marked(210), marked(260)],
|
|
224
|
-
);
|
|
225
|
-
expect(kinds([page([block])], { accent: '#ff0000' })).not.toContain('accent');
|
|
226
|
-
});
|
|
227
|
-
|
|
228
|
-
it('does not flag text that sits inside a panel, and flags text crossing its edge', () => {
|
|
229
|
-
const panel = (children: SnapNode[] = []) =>
|
|
230
|
-
node('div', { background: '#eeeeee', box: { x: 100, y: 100, w: 400, h: 400 } }, children);
|
|
231
|
-
const inside = node('p', { text: '在面板里面', box: { x: 150, y: 150, w: 200, h: 40 } });
|
|
232
|
-
const across = node('p', { text: '跨过边缘', box: { x: 400, y: 150, w: 300, h: 40 } });
|
|
233
|
-
|
|
234
|
-
expect(kinds([page([panel(), inside])])).not.toContain('overlap');
|
|
235
|
-
expect(kinds([page([panel([inside])])])).not.toContain('overlap');
|
|
236
|
-
expect(kinds([page([panel(), across])])).toContain('overlap');
|
|
237
|
-
});
|
|
238
|
-
|
|
239
|
-
it('judges a crossing by the lines the words fall on', () => {
|
|
240
|
-
const panel = node('div', { background: '#eeeeee', box: { x: 100, y: 100, w: 400, h: 400 } });
|
|
241
|
-
const line = (box: { x: number; y: number; w: number; h: number }) =>
|
|
242
|
-
node('p', {
|
|
243
|
-
text: '一行字',
|
|
244
|
-
box: { x: box.x, y: box.y - 10, w: box.w + 200, h: box.h + 20 },
|
|
245
|
-
lines: [box],
|
|
246
|
-
});
|
|
247
|
-
expect(kinds([page([panel, line({ x: 150, y: 150, w: 200, h: 40 })])])).not.toContain(
|
|
248
|
-
'overlap',
|
|
249
|
-
);
|
|
250
|
-
expect(kinds([page([panel, line({ x: 400, y: 150, w: 300, h: 40 })])])).toContain('overlap');
|
|
251
|
-
});
|
|
252
|
-
|
|
253
|
-
it('flags two blocks of text that overlap, but not two parts of one block', () => {
|
|
254
|
-
const a = node('p', { text: '第一段', box: { x: 100, y: 100, w: 300, h: 60 } });
|
|
255
|
-
const b = node('p', { text: '第二段', box: { x: 200, y: 120, w: 300, h: 60 } });
|
|
256
|
-
const apart = node('p', { text: '第三段', box: { x: 100, y: 400, w: 300, h: 60 } });
|
|
257
|
-
expect(kinds([page([a, apart])])).not.toContain('overlap');
|
|
258
|
-
expect(kinds([page([a, b])])).toContain('overlap');
|
|
259
|
-
|
|
260
|
-
const span = (text: string, y: number) =>
|
|
261
|
-
node('span', { text, box: { x: 100, y, w: 200, h: 40 } });
|
|
262
|
-
const oneBlock = node('li', { box: { x: 100, y: 200, w: 300, h: 100 } }, [
|
|
263
|
-
span('同一块', 210),
|
|
264
|
-
span('也是同一块', 240),
|
|
265
|
-
]);
|
|
266
|
-
expect(kinds([page([oneBlock])])).not.toContain('overlap');
|
|
267
|
-
|
|
268
|
-
const loose = node('div', { box: { x: 100, y: 500, w: 300, h: 100 } }, [
|
|
269
|
-
span('第一块', 510),
|
|
270
|
-
span('第二块', 540),
|
|
271
|
-
]);
|
|
272
|
-
expect(kinds([page([loose])])).toContain('overlap');
|
|
273
|
-
});
|
|
274
|
-
|
|
275
|
-
it('judges two runs by their line boxes, not their element boxes', () => {
|
|
276
|
-
const wide = node('p', {
|
|
277
|
-
text: '同一行左边',
|
|
278
|
-
box: { x: 100, y: 300, w: 900, h: 60 },
|
|
279
|
-
lines: [{ x: 100, y: 310, w: 300, h: 40 }],
|
|
280
|
-
});
|
|
281
|
-
const neighbour = node('p', {
|
|
282
|
-
text: '同一行右边',
|
|
283
|
-
box: { x: 500, y: 300, w: 700, h: 60 },
|
|
284
|
-
lines: [{ x: 500, y: 310, w: 300, h: 40 }],
|
|
285
|
-
});
|
|
286
|
-
expect(kinds([page([wide, neighbour])])).not.toContain('overlap');
|
|
287
|
-
|
|
288
|
-
const reaching = node('p', {
|
|
289
|
-
text: '一行很长的字',
|
|
290
|
-
box: { x: 100, y: 600, w: 900, h: 60 },
|
|
291
|
-
lines: [{ x: 100, y: 610, w: 800, h: 40 }],
|
|
292
|
-
});
|
|
293
|
-
const other = node('p', {
|
|
294
|
-
text: '右边一段',
|
|
295
|
-
box: { x: 700, y: 600, w: 700, h: 60 },
|
|
296
|
-
lines: [{ x: 700, y: 610, w: 300, h: 40 }],
|
|
297
|
-
});
|
|
298
|
-
expect(kinds([page([reaching, other])])).toContain('overlap');
|
|
299
|
-
});
|
|
300
|
-
|
|
301
|
-
it('does not flag a span inside its paragraph', () => {
|
|
302
|
-
const outer = node('p', { text: '整段文字', box: { x: 100, y: 200, w: 400, h: 80 } });
|
|
303
|
-
const inner = node('span', { text: '强调', box: { x: 120, y: 210, w: 100, h: 30 } });
|
|
304
|
-
expect(kinds([page([outer, inner])])).not.toContain('overlap');
|
|
305
|
-
});
|
|
306
|
-
|
|
307
|
-
it('counts style choices as hints, not as problems', () => {
|
|
308
|
-
const long = node('h1', { text: '一二三四五六七八九十一二三四五六七八九十一二三四五' });
|
|
309
|
-
const accent = (x: number) =>
|
|
310
|
-
node('div', { background: '#ff0000', box: { x, y: 800, w: 50, h: 50 } });
|
|
311
|
-
const findings = findingsOf(
|
|
312
|
-
[page([long, accent(100), accent(300), accent(500), accent(700)])],
|
|
313
|
-
{ accent: '#ff0000' },
|
|
314
|
-
);
|
|
315
|
-
expect(problemsOf(findings)).toEqual([]);
|
|
316
|
-
expect(
|
|
317
|
-
hintsOf(findings)
|
|
318
|
-
.map((finding) => finding.kind)
|
|
319
|
-
.sort(),
|
|
320
|
-
).toEqual(['accent', 'long-title']);
|
|
321
|
-
});
|
|
322
|
-
|
|
323
|
-
it('reports the page number the deck shows', () => {
|
|
324
|
-
const { findings } = checkDeck([
|
|
325
|
-
{ ...page([node('p', { text: '小字', fontSize: 14 })]), n: 7 },
|
|
326
|
-
]);
|
|
327
|
-
expect(findings.every((finding) => finding.page === 7)).toBe(true);
|
|
328
|
-
});
|
|
329
|
-
});
|
|
@@ -1,350 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from 'vitest';
|
|
2
|
-
import {
|
|
3
|
-
addColumnAfter,
|
|
4
|
-
type BoardColumn,
|
|
5
|
-
chapterProgress,
|
|
6
|
-
columnOfPosition,
|
|
7
|
-
columnsAfterApply,
|
|
8
|
-
columnsAfterInsert,
|
|
9
|
-
columnsAfterMove,
|
|
10
|
-
columnsAfterMoveMany,
|
|
11
|
-
columnsAfterRemove,
|
|
12
|
-
deleteColumnAt,
|
|
13
|
-
insertPageColumn,
|
|
14
|
-
moveColumnBlock,
|
|
15
|
-
orderAfterColumnMove,
|
|
16
|
-
reconcileColumns,
|
|
17
|
-
sanitizeStructure,
|
|
18
|
-
} from './structure.ts';
|
|
19
|
-
|
|
20
|
-
const deck = (): BoardColumn[] => [
|
|
21
|
-
{ title: 'Cover', size: 2 },
|
|
22
|
-
{ title: 'Chapter 1', size: 6 },
|
|
23
|
-
{ title: 'Chapter 2', size: 8 },
|
|
24
|
-
];
|
|
25
|
-
|
|
26
|
-
describe('columnOfPosition', () => {
|
|
27
|
-
it('maps a deck position to the column holding it', () => {
|
|
28
|
-
const columns = deck();
|
|
29
|
-
expect([0, 1, 2, 7, 8, 15].map((p) => columnOfPosition(columns, p))).toEqual([
|
|
30
|
-
0, 0, 1, 1, 2, 2,
|
|
31
|
-
]);
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
it('skips empty columns instead of claiming a position for them', () => {
|
|
35
|
-
const columns = [
|
|
36
|
-
{ title: 'A', size: 1 },
|
|
37
|
-
{ title: 'B', size: 0 },
|
|
38
|
-
{ title: 'C', size: 1 },
|
|
39
|
-
];
|
|
40
|
-
expect(columnOfPosition(columns, 1)).toBe(2);
|
|
41
|
-
});
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
describe('columnsAfterMove', () => {
|
|
45
|
-
it('hands exactly one page over when a card crosses a boundary', () => {
|
|
46
|
-
expect(columnsAfterMove(deck(), 2, 10).map((c) => c.size)).toEqual([2, 5, 9]);
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
it('leaves the structure alone when a card moves inside its own column', () => {
|
|
50
|
-
const columns = deck();
|
|
51
|
-
expect(columnsAfterMove(columns, 3, 6)).toBe(columns);
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
it('keeps a chapter together when the page that heads it moves away', () => {
|
|
55
|
-
// The reported defect: dragging a chapter page into another chapter used to
|
|
56
|
-
// re-group the deck, so the five pages it headed jumped column with it. The
|
|
57
|
-
// structure is the board's own now, so only the dragged page changes column.
|
|
58
|
-
const after = columnsAfterMove(deck(), 2, 12);
|
|
59
|
-
expect(after.map((c) => c.size)).toEqual([2, 5, 9]);
|
|
60
|
-
expect(after.map((c) => c.title)).toEqual(['Cover', 'Chapter 1', 'Chapter 2']);
|
|
61
|
-
});
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
describe('reconcileColumns', () => {
|
|
65
|
-
it('leaves a structure that already matches the deck', () => {
|
|
66
|
-
expect(reconcileColumns(deck(), 16).map((c) => c.size)).toEqual([2, 6, 8]);
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
it('gives pages added outside the board to the last column', () => {
|
|
70
|
-
expect(reconcileColumns(deck(), 18).map((c) => c.size)).toEqual([2, 6, 10]);
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
it('takes pages deleted outside the board off the end', () => {
|
|
74
|
-
expect(reconcileColumns(deck(), 12).map((c) => c.size)).toEqual([2, 6, 4]);
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
it('drops trailing columns a deletion emptied rather than leaving dead labels', () => {
|
|
78
|
-
expect(reconcileColumns(deck(), 8).map((c) => c.title)).toEqual(['Cover', 'Chapter 1']);
|
|
79
|
-
});
|
|
80
|
-
|
|
81
|
-
it('always leaves one column for a deck that still has pages', () => {
|
|
82
|
-
expect(reconcileColumns([], 4)).toEqual([{ title: '', size: 4 }]);
|
|
83
|
-
expect(reconcileColumns(deck(), 1).map((c) => c.size)).toEqual([1]);
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
it('reports no columns for an empty deck', () => {
|
|
87
|
-
expect(reconcileColumns(deck(), 0)).toEqual([]);
|
|
88
|
-
});
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
describe('sanitizeStructure', () => {
|
|
92
|
-
it('accepts a stored structure', () => {
|
|
93
|
-
expect(sanitizeStructure({ columns: [{ title: 'A', size: 2 }] })).toEqual({
|
|
94
|
-
columns: [{ title: 'A', size: 2 }],
|
|
95
|
-
});
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
it('refuses anything that is not a column list', () => {
|
|
99
|
-
expect(sanitizeStructure(null)).toBeNull();
|
|
100
|
-
expect(sanitizeStructure({})).toBeNull();
|
|
101
|
-
expect(sanitizeStructure({ columns: 'nope' })).toBeNull();
|
|
102
|
-
expect(sanitizeStructure({ columns: [{ title: 'A', size: -1 }] })).toBeNull();
|
|
103
|
-
expect(sanitizeStructure({ columns: [{ title: 'A', size: 1.5 }] })).toBeNull();
|
|
104
|
-
});
|
|
105
|
-
|
|
106
|
-
it('fills in a missing title rather than dropping the column', () => {
|
|
107
|
-
expect(sanitizeStructure({ columns: [{ size: 3 }] })).toEqual({
|
|
108
|
-
columns: [{ title: '', size: 3 }],
|
|
109
|
-
});
|
|
110
|
-
});
|
|
111
|
-
});
|
|
112
|
-
|
|
113
|
-
describe('addColumnAfter', () => {
|
|
114
|
-
it('puts an empty chapter right after the one it was asked for', () => {
|
|
115
|
-
const next = addColumnAfter(deck(), 0, 'New');
|
|
116
|
-
expect(next.map((c) => c.title)).toEqual(['Cover', 'New', 'Chapter 1', 'Chapter 2']);
|
|
117
|
-
expect(next[1].size).toBe(0);
|
|
118
|
-
});
|
|
119
|
-
|
|
120
|
-
it('leaves the page count alone', () => {
|
|
121
|
-
const before = deck();
|
|
122
|
-
const next = addColumnAfter(before, 2, 'New');
|
|
123
|
-
expect(next.reduce((sum, c) => sum + c.size, 0)).toBe(16);
|
|
124
|
-
expect(before).toHaveLength(3);
|
|
125
|
-
});
|
|
126
|
-
});
|
|
127
|
-
|
|
128
|
-
describe('deleteColumnAt', () => {
|
|
129
|
-
it('folds the pages of a removed chapter into the one before it', () => {
|
|
130
|
-
expect(deleteColumnAt(deck(), 1)?.map((c) => c.size)).toEqual([8, 8]);
|
|
131
|
-
});
|
|
132
|
-
|
|
133
|
-
it('folds its pages into the next chapter when it is the first one', () => {
|
|
134
|
-
const next = deleteColumnAt(deck(), 0);
|
|
135
|
-
expect(next?.map((c) => c.size)).toEqual([8, 8]);
|
|
136
|
-
expect(next?.[0].title).toBe('Chapter 1');
|
|
137
|
-
});
|
|
138
|
-
|
|
139
|
-
it('refuses to remove the only chapter left', () => {
|
|
140
|
-
expect(deleteColumnAt([{ title: 'All', size: 4 }], 0)).toBeNull();
|
|
141
|
-
expect(deleteColumnAt(deck(), 9)).toBeNull();
|
|
142
|
-
});
|
|
143
|
-
});
|
|
144
|
-
|
|
145
|
-
describe('moving a whole chapter', () => {
|
|
146
|
-
it('carries its pages with it and renumbers the deck', () => {
|
|
147
|
-
const columns = [
|
|
148
|
-
{ title: 'A', size: 2 },
|
|
149
|
-
{ title: 'B', size: 3 },
|
|
150
|
-
{ title: 'C', size: 2 },
|
|
151
|
-
];
|
|
152
|
-
expect(moveColumnBlock(columns, 0, 2)?.map((c) => c.title)).toEqual(['B', 'C', 'A']);
|
|
153
|
-
expect(orderAfterColumnMove(columns, 0, 2)).toEqual([2, 3, 4, 5, 6, 0, 1]);
|
|
154
|
-
expect(orderAfterColumnMove(columns, 2, 0)).toEqual([5, 6, 0, 1, 2, 3, 4]);
|
|
155
|
-
});
|
|
156
|
-
|
|
157
|
-
it('is a permutation of every page, losing none', () => {
|
|
158
|
-
const order = orderAfterColumnMove(deck(), 1, 0);
|
|
159
|
-
expect([...order].sort((a, b) => a - b)).toEqual([...Array(16).keys()]);
|
|
160
|
-
});
|
|
161
|
-
|
|
162
|
-
it('does nothing when the chapter stays where it is', () => {
|
|
163
|
-
expect(moveColumnBlock(deck(), 1, 1)).toBeNull();
|
|
164
|
-
expect(orderAfterColumnMove(deck(), 1, 1)).toEqual([...Array(16).keys()]);
|
|
165
|
-
});
|
|
166
|
-
});
|
|
167
|
-
|
|
168
|
-
describe('columnsAfterMoveMany', () => {
|
|
169
|
-
it('moves several pages across one boundary at once', () => {
|
|
170
|
-
const columns = [
|
|
171
|
-
{ title: 'A', size: 3 },
|
|
172
|
-
{ title: 'B', size: 3 },
|
|
173
|
-
];
|
|
174
|
-
expect(columnsAfterMoveMany(columns, [0, 1], 4).map((c) => c.size)).toEqual([1, 5]);
|
|
175
|
-
});
|
|
176
|
-
|
|
177
|
-
it('leaves a column unchanged when it both gives and takes a page', () => {
|
|
178
|
-
const columns = [
|
|
179
|
-
{ title: 'A', size: 3 },
|
|
180
|
-
{ title: 'B', size: 3 },
|
|
181
|
-
];
|
|
182
|
-
expect(columnsAfterMoveMany(columns, [1], 4).map((c) => c.size)).toEqual([2, 4]);
|
|
183
|
-
expect(columnsAfterMoveMany(columns, [2], 4).map((c) => c.size)).toEqual([2, 4]);
|
|
184
|
-
});
|
|
185
|
-
|
|
186
|
-
it('takes pages from two chapters into a third', () => {
|
|
187
|
-
const columns = [
|
|
188
|
-
{ title: 'A', size: 2 },
|
|
189
|
-
{ title: 'B', size: 2 },
|
|
190
|
-
{ title: 'C', size: 2 },
|
|
191
|
-
];
|
|
192
|
-
expect(columnsAfterMoveMany(columns, [0, 3], 5).map((c) => c.size)).toEqual([1, 1, 4]);
|
|
193
|
-
});
|
|
194
|
-
});
|
|
195
|
-
|
|
196
|
-
describe('insertPageColumn', () => {
|
|
197
|
-
it('drops a card into a chapter of its own between two chapters', () => {
|
|
198
|
-
const columns = [
|
|
199
|
-
{ title: 'A', size: 2 },
|
|
200
|
-
{ title: 'B', size: 3 },
|
|
201
|
-
];
|
|
202
|
-
const result = insertPageColumn(columns, 3, 1, 'New');
|
|
203
|
-
expect(result?.columns.map((c) => [c.title, c.size])).toEqual([
|
|
204
|
-
['A', 2],
|
|
205
|
-
['New', 1],
|
|
206
|
-
['B', 2],
|
|
207
|
-
]);
|
|
208
|
-
expect(result?.order).toEqual([0, 1, 3, 2, 4]);
|
|
209
|
-
});
|
|
210
|
-
|
|
211
|
-
it('removes the chapter its only card came from', () => {
|
|
212
|
-
const columns = [
|
|
213
|
-
{ title: 'A', size: 1 },
|
|
214
|
-
{ title: 'B', size: 2 },
|
|
215
|
-
];
|
|
216
|
-
const result = insertPageColumn(columns, 0, 1, 'New');
|
|
217
|
-
expect(result?.columns.map((c) => [c.title, c.size])).toEqual([
|
|
218
|
-
['New', 1],
|
|
219
|
-
['B', 2],
|
|
220
|
-
]);
|
|
221
|
-
expect(result?.order).toEqual([0, 1, 2]);
|
|
222
|
-
});
|
|
223
|
-
|
|
224
|
-
it('moves a card backwards through the deck as well as forwards', () => {
|
|
225
|
-
const columns = [
|
|
226
|
-
{ title: 'A', size: 2 },
|
|
227
|
-
{ title: 'B', size: 2 },
|
|
228
|
-
{ title: 'C', size: 2 },
|
|
229
|
-
];
|
|
230
|
-
const result = insertPageColumn(columns, 5, 1, 'New');
|
|
231
|
-
expect(result?.columns.map((c) => [c.title, c.size])).toEqual([
|
|
232
|
-
['A', 2],
|
|
233
|
-
['New', 1],
|
|
234
|
-
['B', 2],
|
|
235
|
-
['C', 1],
|
|
236
|
-
]);
|
|
237
|
-
expect(result?.order).toEqual([0, 1, 5, 2, 3, 4]);
|
|
238
|
-
});
|
|
239
|
-
|
|
240
|
-
it('refuses a boundary that is not between two chapters', () => {
|
|
241
|
-
const columns = [
|
|
242
|
-
{ title: 'A', size: 2 },
|
|
243
|
-
{ title: 'B', size: 2 },
|
|
244
|
-
];
|
|
245
|
-
expect(insertPageColumn(columns, 0, 0, 'New')).toBeNull();
|
|
246
|
-
expect(insertPageColumn(columns, 0, 2, 'New')).toBeNull();
|
|
247
|
-
expect(insertPageColumn(columns, 99, 1, 'New')).toBeNull();
|
|
248
|
-
});
|
|
249
|
-
});
|
|
250
|
-
|
|
251
|
-
describe('column bookkeeping for batch edits', () => {
|
|
252
|
-
const columns = [
|
|
253
|
-
{ title: 'A', size: 2 },
|
|
254
|
-
{ title: 'B', size: 3 },
|
|
255
|
-
{ title: 'C', size: 2 },
|
|
256
|
-
];
|
|
257
|
-
|
|
258
|
-
it('takes one page off the chapter that held each removed page', () => {
|
|
259
|
-
expect(columnsAfterRemove(columns, [0, 4, 5]).map((c) => c.size)).toEqual([1, 2, 1]);
|
|
260
|
-
});
|
|
261
|
-
|
|
262
|
-
it('empties a chapter whose pages all went, rather than borrowing a neighbour', () => {
|
|
263
|
-
expect(columnsAfterRemove(columns, [0, 1]).map((c) => c.size)).toEqual([0, 3, 2]);
|
|
264
|
-
});
|
|
265
|
-
|
|
266
|
-
it('adds each new page to the chapter it was added beside', () => {
|
|
267
|
-
expect(columnsAfterInsert(columns, [0, 6]).map((c) => c.size)).toEqual([3, 3, 3]);
|
|
268
|
-
});
|
|
269
|
-
|
|
270
|
-
it('cannot put an emptied chapter back from positions alone, which is why undo replays the saved list', () => {
|
|
271
|
-
const removed = columnsAfterRemove(columns, [0, 1]);
|
|
272
|
-
expect(columnsAfterInsert(removed, [0, 1])).not.toEqual(columns);
|
|
273
|
-
});
|
|
274
|
-
});
|
|
275
|
-
|
|
276
|
-
describe('columnsAfterApply', () => {
|
|
277
|
-
const before = [
|
|
278
|
-
{ title: 'Opening', keys: ['a', 'b'] },
|
|
279
|
-
{ title: 'Middle', keys: ['c'] },
|
|
280
|
-
{ title: 'End', keys: ['d'] },
|
|
281
|
-
];
|
|
282
|
-
|
|
283
|
-
it('keeps a page the apply created right after another page in that page’s chapter', () => {
|
|
284
|
-
expect(columnsAfterApply(before, ['a', 'a2', 'b', 'c', 'd'])).toEqual([
|
|
285
|
-
{ title: 'Opening', size: 3 },
|
|
286
|
-
{ title: 'Middle', size: 1 },
|
|
287
|
-
{ title: 'End', size: 1 },
|
|
288
|
-
]);
|
|
289
|
-
});
|
|
290
|
-
|
|
291
|
-
it('takes a merged page out of the chapter that held it', () => {
|
|
292
|
-
expect(columnsAfterApply(before, ['a', 'c', 'd'])).toEqual([
|
|
293
|
-
{ title: 'Opening', size: 1 },
|
|
294
|
-
{ title: 'Middle', size: 1 },
|
|
295
|
-
{ title: 'End', size: 1 },
|
|
296
|
-
]);
|
|
297
|
-
});
|
|
298
|
-
|
|
299
|
-
it('gives a page added at the very front the chapter of the page behind it', () => {
|
|
300
|
-
expect(columnsAfterApply(before, ['new', 'a', 'b', 'c', 'd']).map((c) => c.size)).toEqual([
|
|
301
|
-
3, 1, 1,
|
|
302
|
-
]);
|
|
303
|
-
});
|
|
304
|
-
|
|
305
|
-
it('keeps a chapter that lost every page, with its title', () => {
|
|
306
|
-
expect(columnsAfterApply(before, ['a', 'b', 'd'])).toEqual([
|
|
307
|
-
{ title: 'Opening', size: 2 },
|
|
308
|
-
{ title: 'Middle', size: 0 },
|
|
309
|
-
{ title: 'End', size: 1 },
|
|
310
|
-
]);
|
|
311
|
-
});
|
|
312
|
-
|
|
313
|
-
it('sends every new page to the chapter named, even one that is still empty', () => {
|
|
314
|
-
const columns = [...before.slice(0, 2), { title: 'End', keys: [] }];
|
|
315
|
-
expect(columnsAfterApply(columns, ['a', 'b', 'c', 'n1', 'n2'], 2)).toEqual([
|
|
316
|
-
{ title: 'Opening', size: 2 },
|
|
317
|
-
{ title: 'Middle', size: 1 },
|
|
318
|
-
{ title: 'End', size: 2 },
|
|
319
|
-
]);
|
|
320
|
-
});
|
|
321
|
-
|
|
322
|
-
it('falls back to the deck’s new length when no page can be matched', () => {
|
|
323
|
-
expect(columnsAfterApply(before, ['x', 'y'])).toEqual([{ title: 'Opening', size: 2 }]);
|
|
324
|
-
});
|
|
325
|
-
});
|
|
326
|
-
|
|
327
|
-
describe('chapterProgress', () => {
|
|
328
|
-
it('counts an empty chapter as nothing at all', () => {
|
|
329
|
-
expect(chapterProgress({}, [])).toEqual({ done: 0, review: 0, total: 0 });
|
|
330
|
-
});
|
|
331
|
-
|
|
332
|
-
it('counts every page when the chapter is finished', () => {
|
|
333
|
-
const cards = { A: { status: 'done' }, B: { status: 'done' } } as const;
|
|
334
|
-
expect(chapterProgress(cards, ['A', 'B'])).toEqual({ done: 2, review: 0, total: 2 });
|
|
335
|
-
});
|
|
336
|
-
|
|
337
|
-
it('separates what is done from what is waiting to be looked over', () => {
|
|
338
|
-
const cards = {
|
|
339
|
-
A: { status: 'done' },
|
|
340
|
-
B: { status: 'review' },
|
|
341
|
-
C: { status: 'doing' },
|
|
342
|
-
} as const;
|
|
343
|
-
expect(chapterProgress(cards, ['A', 'B', 'C'])).toEqual({ done: 1, review: 1, total: 3 });
|
|
344
|
-
});
|
|
345
|
-
|
|
346
|
-
it('does not count a page with no status as done', () => {
|
|
347
|
-
const cards = { A: { status: 'done' }, B: { memo: 'still open' } } as const;
|
|
348
|
-
expect(chapterProgress(cards, ['A', 'B', 'C'])).toEqual({ done: 1, review: 0, total: 3 });
|
|
349
|
-
});
|
|
350
|
-
});
|