-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathchange.ts
More file actions
93 lines (77 loc) · 2.05 KB
/
change.ts
File metadata and controls
93 lines (77 loc) · 2.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
import type { BasePage, LineId } from "./base.ts";
/** change that creates a new line */
export interface InsertChange {
/** insert above the line indicated by this ID
*
* specify `"_end"` when inserting at the end
*/
_insert: LineId;
/** data of the line to insert */
lines: NewLine;
}
export interface NewLine {
/** ID of the newly inserted line */
id: LineId;
/** text of the line */
text: string;
}
export interface ChangeLine {
/** string before change */
origText: string;
/** string after change */
text: string;
}
/** change that deletes an existing line */
export interface DeleteChange {
/** ID of the line to delete */
_delete: LineId;
/** always `-1` */
lines: -1;
}
/** occurs when the thumbnail text of a page is changed */
export interface DescriptionsChange {
/** new thumbnail text */
descriptions: string[];
}
/** occurs when the thumbnail of a page is changed */
export interface ImageChange {
/** new thumbnail URL
*
* becomes `null` when the thumbnail is removed
*/
image: string | null;
}
export interface FilesChange {
/** Array of file IDs
*
* These IDs reference files that have been uploaded to the page.
* Files can include images, documents, or other attachments.
*/
files: string[];
}
export interface HelpFeelsChange {
/** Array of Helpfeel entries without the leading "? " prefix
*
* Helpfeel is a Scrapbox notation for creating help/documentation entries.
* Example: "? How to use" becomes "How to use" in this array.
* These entries are used to build the page's help documentation.
*/
helpfeels: string[];
}
export interface InfoboxDefinitionChange {
/** Array of trimmed lines from infobox tables
*
* Contains lines from tables marked with either `table:infobox` or `table:cosense`
*/
infoboxDefinition: string[];
}
export interface LinesCountChange {
linesCount: number;
}
export interface CharsCountChange {
charsCount: number;
}
/** occurs when the pin status of a page is changed */
export interface PinChange {
pin: BasePage["pin"];
}