siyuan 0.9.6 → 0.9.7
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/CHANGELOG.md +5 -1
- package/package.json +1 -1
- package/siyuan.d.ts +6 -0
- package/types/config.d.ts +2182 -0
- package/types/index.d.ts +1 -0
- package/types/protyle.d.ts +3 -1
|
@@ -0,0 +1,2182 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (C) 2023 SiYuan Community
|
|
3
|
+
*
|
|
4
|
+
* This program is free software: you can redistribute it and/or modify
|
|
5
|
+
* it under the terms of the GNU Affero General Public License as
|
|
6
|
+
* published by the Free Software Foundation, either version 3 of the
|
|
7
|
+
* License, or (at your option) any later version.
|
|
8
|
+
*
|
|
9
|
+
* This program is distributed in the hope that it will be useful,
|
|
10
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
* GNU Affero General Public License for more details.
|
|
13
|
+
*
|
|
14
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
15
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import {TEditorMode} from "./protyle";
|
|
19
|
+
|
|
20
|
+
export namespace Config {
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Configuration object
|
|
24
|
+
*/
|
|
25
|
+
export interface IConf {
|
|
26
|
+
/**
|
|
27
|
+
* Access authorization code
|
|
28
|
+
*/
|
|
29
|
+
accessAuthCode: TAccessAuthCode;
|
|
30
|
+
account: IAccount;
|
|
31
|
+
ai: IAI;
|
|
32
|
+
api: IAPI;
|
|
33
|
+
appearance: IAppearance;
|
|
34
|
+
bazaar: IBazaar;
|
|
35
|
+
/**
|
|
36
|
+
* Cloud Service Provider Region
|
|
37
|
+
* - `0`: Chinese mainland
|
|
38
|
+
* - `1`: North America
|
|
39
|
+
*/
|
|
40
|
+
cloudRegion: number;
|
|
41
|
+
editor: IEditor;
|
|
42
|
+
export: IExport;
|
|
43
|
+
fileTree: IFileTree;
|
|
44
|
+
flashcard: IFlashCard;
|
|
45
|
+
graph: IGraph;
|
|
46
|
+
keymap: IKeymap;
|
|
47
|
+
/**
|
|
48
|
+
* User interface language
|
|
49
|
+
* Same as {@link IAppearance.lang}
|
|
50
|
+
*/
|
|
51
|
+
lang: TLang;
|
|
52
|
+
/**
|
|
53
|
+
* List of supported languages
|
|
54
|
+
*/
|
|
55
|
+
langs: ILang[];
|
|
56
|
+
/**
|
|
57
|
+
* A list of the IP addresses of the devices on which the kernel resides
|
|
58
|
+
*/
|
|
59
|
+
localIPs: string[];
|
|
60
|
+
/**
|
|
61
|
+
* Log level
|
|
62
|
+
*/
|
|
63
|
+
logLevel: TLogLevel;
|
|
64
|
+
/**
|
|
65
|
+
* Whether to open the user guide after startup
|
|
66
|
+
*/
|
|
67
|
+
openHelp: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Whether it is running in read-only mode
|
|
70
|
+
* 全局只读
|
|
71
|
+
*/
|
|
72
|
+
readonly: boolean;
|
|
73
|
+
repo: IRepo;
|
|
74
|
+
search: ISearch;
|
|
75
|
+
/**
|
|
76
|
+
* Whether to display the changelog for this release version
|
|
77
|
+
*/
|
|
78
|
+
showChangelog: boolean;
|
|
79
|
+
snippet: ISnippet;
|
|
80
|
+
stat: IStat;
|
|
81
|
+
sync: ISync;
|
|
82
|
+
system: ISystem;
|
|
83
|
+
tag: ITag;
|
|
84
|
+
uiLayout: IUiLayout;
|
|
85
|
+
/**
|
|
86
|
+
* Community user data (Encrypted)
|
|
87
|
+
*/
|
|
88
|
+
userData: string;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Access authorization code
|
|
93
|
+
*/
|
|
94
|
+
export type TAccessAuthCode = "" | "*******";
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Account configuration
|
|
98
|
+
*/
|
|
99
|
+
export interface IAccount {
|
|
100
|
+
/**
|
|
101
|
+
* Display the title icon
|
|
102
|
+
*/
|
|
103
|
+
displayTitle: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* Display the VIP icon
|
|
106
|
+
*/
|
|
107
|
+
displayVIP: boolean;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Artificial Intelligence (AI) related configuration
|
|
112
|
+
*/
|
|
113
|
+
export interface IAI {
|
|
114
|
+
openAI: IOpenAI;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Open AI related configuration
|
|
119
|
+
*/
|
|
120
|
+
export interface IOpenAI {
|
|
121
|
+
/**
|
|
122
|
+
* API base URL
|
|
123
|
+
*/
|
|
124
|
+
apiBaseURL: string;
|
|
125
|
+
/**
|
|
126
|
+
* API key
|
|
127
|
+
*/
|
|
128
|
+
apiKey: string;
|
|
129
|
+
/**
|
|
130
|
+
* The maximum number of contexts passed when requesting the API
|
|
131
|
+
*/
|
|
132
|
+
apiMaxContexts: number;
|
|
133
|
+
/**
|
|
134
|
+
* Maximum number of tokens (0 means no limit)
|
|
135
|
+
*/
|
|
136
|
+
apiMaxTokens: number;
|
|
137
|
+
/**
|
|
138
|
+
* The model name called by the API
|
|
139
|
+
*/
|
|
140
|
+
apiModel: TOpenAIAPIModel;
|
|
141
|
+
/**
|
|
142
|
+
* API Provider
|
|
143
|
+
* OpenAI, Azure
|
|
144
|
+
*/
|
|
145
|
+
apiProvider: TOpenAAPIProvider;
|
|
146
|
+
/**
|
|
147
|
+
* API request proxy address
|
|
148
|
+
*/
|
|
149
|
+
apiProxy: string;
|
|
150
|
+
/**
|
|
151
|
+
* Parameter `temperature` that controls the randomness of the generated text
|
|
152
|
+
*/
|
|
153
|
+
apiTemperature: number;
|
|
154
|
+
/**
|
|
155
|
+
* API request timeout (unit: seconds)
|
|
156
|
+
*/
|
|
157
|
+
apiTimeout: number;
|
|
158
|
+
/**
|
|
159
|
+
* API request additional user agent field
|
|
160
|
+
*/
|
|
161
|
+
apiUserAgent: string;
|
|
162
|
+
/**
|
|
163
|
+
* API version number
|
|
164
|
+
*/
|
|
165
|
+
apiVersion: string;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* The model name called by the API
|
|
170
|
+
*/
|
|
171
|
+
export type TOpenAIAPIModel = "gpt-4" | "gpt-4-32k" | "gpt-3.5-turbo" | "gpt-3.5-turbo-16k";
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* API Provider
|
|
175
|
+
*/
|
|
176
|
+
export type TOpenAAPIProvider = "OpenAI" | "Azure";
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* SiYuan API related configuration
|
|
180
|
+
*/
|
|
181
|
+
export interface IAPI {
|
|
182
|
+
/**
|
|
183
|
+
* API Token
|
|
184
|
+
*/
|
|
185
|
+
token: string;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* SiYuan appearance related configuration
|
|
190
|
+
*/
|
|
191
|
+
export interface IAppearance {
|
|
192
|
+
/**
|
|
193
|
+
* Close button behavior
|
|
194
|
+
* - `0`: Exit application
|
|
195
|
+
* - `1`: Minimize to pallets
|
|
196
|
+
*/
|
|
197
|
+
closeButtonBehavior: number;
|
|
198
|
+
/**
|
|
199
|
+
* Dark code block theme
|
|
200
|
+
*/
|
|
201
|
+
codeBlockThemeDark: string;
|
|
202
|
+
/**
|
|
203
|
+
* Light code block theme
|
|
204
|
+
*/
|
|
205
|
+
codeBlockThemeLight: string;
|
|
206
|
+
/**
|
|
207
|
+
* List of installed dark themes
|
|
208
|
+
*/
|
|
209
|
+
darkThemes: string[];
|
|
210
|
+
/**
|
|
211
|
+
* Whether to hide status bar
|
|
212
|
+
*/
|
|
213
|
+
hideStatusBar: boolean;
|
|
214
|
+
/**
|
|
215
|
+
* The name of the icon currently in use
|
|
216
|
+
*/
|
|
217
|
+
icon: string;
|
|
218
|
+
/**
|
|
219
|
+
* List of installed icon names
|
|
220
|
+
*/
|
|
221
|
+
icons: string[];
|
|
222
|
+
/**
|
|
223
|
+
* The version number of the icon currently in use
|
|
224
|
+
*/
|
|
225
|
+
iconVer: string;
|
|
226
|
+
/**
|
|
227
|
+
* The language used by the current user
|
|
228
|
+
*/
|
|
229
|
+
lang: TLang;
|
|
230
|
+
/**
|
|
231
|
+
* List of installed light themes
|
|
232
|
+
*/
|
|
233
|
+
lightThemes: string[];
|
|
234
|
+
/**
|
|
235
|
+
* The current theme mode
|
|
236
|
+
* - `0`: Light theme
|
|
237
|
+
* - `1`: Dark theme
|
|
238
|
+
*/
|
|
239
|
+
mode: number;
|
|
240
|
+
/**
|
|
241
|
+
* Whether the theme mode follows the system theme
|
|
242
|
+
*/
|
|
243
|
+
modeOS: boolean;
|
|
244
|
+
/**
|
|
245
|
+
* The name of the dark theme currently in use
|
|
246
|
+
*/
|
|
247
|
+
themeDark: string;
|
|
248
|
+
/**
|
|
249
|
+
* Whether the current theme has enabled theme JavaScript
|
|
250
|
+
*/
|
|
251
|
+
themeJS: boolean;
|
|
252
|
+
/**
|
|
253
|
+
* The name of the light theme currently in use
|
|
254
|
+
*/
|
|
255
|
+
themeLight: string;
|
|
256
|
+
/**
|
|
257
|
+
* The version number of the theme currently in use
|
|
258
|
+
*/
|
|
259
|
+
themeVer: string;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* The language used by the current user
|
|
264
|
+
*
|
|
265
|
+
* User interface language
|
|
266
|
+
* Same as {@link IAppearance.lang}
|
|
267
|
+
*/
|
|
268
|
+
export type TLang = "en_US" | "es_ES" | "fr_FR" | "zh_CHT" | "zh_CN";
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* SiYuan bazaar related configuration
|
|
272
|
+
*/
|
|
273
|
+
export interface IBazaar {
|
|
274
|
+
/**
|
|
275
|
+
* Whether to disable all plug-ins
|
|
276
|
+
*/
|
|
277
|
+
petalDisabled: boolean;
|
|
278
|
+
/**
|
|
279
|
+
* Whether to trust (enable) the resources for the bazaar
|
|
280
|
+
*/
|
|
281
|
+
trust: boolean;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* SiYuan editor related configuration
|
|
286
|
+
*/
|
|
287
|
+
export interface IEditor {
|
|
288
|
+
/**
|
|
289
|
+
* The default number of backlinks to expand
|
|
290
|
+
*/
|
|
291
|
+
backlinkExpandCount: number;
|
|
292
|
+
/**
|
|
293
|
+
* The default number of backlinks to mention
|
|
294
|
+
*/
|
|
295
|
+
backmentionExpandCount: number;
|
|
296
|
+
/**
|
|
297
|
+
* The maximum length of the dynamic anchor text for block references
|
|
298
|
+
*/
|
|
299
|
+
blockRefDynamicAnchorTextMaxLen: number;
|
|
300
|
+
/**
|
|
301
|
+
* Whether the code block has enabled ligatures
|
|
302
|
+
*/
|
|
303
|
+
codeLigatures: boolean;
|
|
304
|
+
/**
|
|
305
|
+
* Whether the code block is automatically wrapped
|
|
306
|
+
*/
|
|
307
|
+
codeLineWrap: boolean;
|
|
308
|
+
/**
|
|
309
|
+
* Whether the code block displays line numbers
|
|
310
|
+
*/
|
|
311
|
+
codeSyntaxHighlightLineNum: boolean;
|
|
312
|
+
/**
|
|
313
|
+
* The number of spaces generated by the Tab key in the code block, configured as 0 means no
|
|
314
|
+
* conversion to spaces
|
|
315
|
+
*/
|
|
316
|
+
codeTabSpaces: number;
|
|
317
|
+
/**
|
|
318
|
+
* Whether to display the bookmark icon
|
|
319
|
+
*/
|
|
320
|
+
displayBookmarkIcon: boolean;
|
|
321
|
+
/**
|
|
322
|
+
* Whether to display the network image mark
|
|
323
|
+
*/
|
|
324
|
+
displayNetImgMark: boolean;
|
|
325
|
+
/**
|
|
326
|
+
* The number of blocks loaded each time they are dynamically loaded
|
|
327
|
+
*/
|
|
328
|
+
dynamicLoadBlocks: number;
|
|
329
|
+
/**
|
|
330
|
+
* Whether the embedded block displays breadcrumbs
|
|
331
|
+
*/
|
|
332
|
+
embedBlockBreadcrumb: boolean;
|
|
333
|
+
/**
|
|
334
|
+
* Common emoji icons
|
|
335
|
+
*/
|
|
336
|
+
emoji: string[];
|
|
337
|
+
/**
|
|
338
|
+
* The trigger mode of the preview window
|
|
339
|
+
* - `0`: Hover over the cursor
|
|
340
|
+
* - `1`: Hover over the cursor while holding down Ctrl
|
|
341
|
+
* - `2`: Do not trigger the floating window
|
|
342
|
+
*/
|
|
343
|
+
floatWindowMode: number;
|
|
344
|
+
/**
|
|
345
|
+
* The font used in the editor
|
|
346
|
+
*/
|
|
347
|
+
fontFamily: string;
|
|
348
|
+
/**
|
|
349
|
+
* The font size used in the editor
|
|
350
|
+
*/
|
|
351
|
+
fontSize: number;
|
|
352
|
+
/**
|
|
353
|
+
* Whether to enable the use of the mouse wheel to adjust the font size of the editor
|
|
354
|
+
*/
|
|
355
|
+
fontSizeScrollZoom: boolean;
|
|
356
|
+
/**
|
|
357
|
+
* Whether the editor uses maximum width
|
|
358
|
+
*/
|
|
359
|
+
fullWidth: boolean;
|
|
360
|
+
/**
|
|
361
|
+
* The time interval for generating document history, set to 0 to disable document history
|
|
362
|
+
* (unit: minutes)
|
|
363
|
+
*/
|
|
364
|
+
generateHistoryInterval: number;
|
|
365
|
+
/**
|
|
366
|
+
* History retention days
|
|
367
|
+
*/
|
|
368
|
+
historyRetentionDays: number;
|
|
369
|
+
/**
|
|
370
|
+
* Whether to enable text justification
|
|
371
|
+
*/
|
|
372
|
+
justify: boolean;
|
|
373
|
+
/**
|
|
374
|
+
* KeTex macro definition (JSON string)
|
|
375
|
+
*/
|
|
376
|
+
katexMacros: string;
|
|
377
|
+
/**
|
|
378
|
+
* Whether to enable single-click list item mark focus
|
|
379
|
+
*/
|
|
380
|
+
listItemDotNumberClickFocus: boolean;
|
|
381
|
+
/**
|
|
382
|
+
* Whether to enable the list logical reverse indentation scheme
|
|
383
|
+
*/
|
|
384
|
+
listLogicalOutdent: boolean;
|
|
385
|
+
/**
|
|
386
|
+
* Whether to enable the `[[` symbol to search only for document blocks
|
|
387
|
+
*/
|
|
388
|
+
onlySearchForDoc: boolean;
|
|
389
|
+
/**
|
|
390
|
+
* PlantUML rendering service address
|
|
391
|
+
*/
|
|
392
|
+
plantUMLServePath: string;
|
|
393
|
+
/**
|
|
394
|
+
* Whether to enable read-only mode
|
|
395
|
+
*/
|
|
396
|
+
readOnly: boolean;
|
|
397
|
+
/**
|
|
398
|
+
* Whether to enable RTL (left-to-right chirography) mode
|
|
399
|
+
*/
|
|
400
|
+
rtl: boolean;
|
|
401
|
+
/**
|
|
402
|
+
* Whether to enable spell checking
|
|
403
|
+
*/
|
|
404
|
+
spellcheck: boolean;
|
|
405
|
+
/**
|
|
406
|
+
* Whether to enable virtual references
|
|
407
|
+
*/
|
|
408
|
+
virtualBlockRef: boolean;
|
|
409
|
+
/**
|
|
410
|
+
* Virtual reference keyword exclusion list (separated by commas `,`)
|
|
411
|
+
*/
|
|
412
|
+
virtualBlockRefExclude: string;
|
|
413
|
+
/**
|
|
414
|
+
* Virtual reference keyword inclusion list (separated by commas `,`)
|
|
415
|
+
*/
|
|
416
|
+
virtualBlockRefInclude: string;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
/**
|
|
420
|
+
* SiYuan export related configuration
|
|
421
|
+
*/
|
|
422
|
+
export interface IExport {
|
|
423
|
+
/**
|
|
424
|
+
* Add article title (insert the article title as a first-level title at the beginning of
|
|
425
|
+
* the document)
|
|
426
|
+
*/
|
|
427
|
+
addTitle: boolean;
|
|
428
|
+
/**
|
|
429
|
+
* Embedded block export mode
|
|
430
|
+
* - `0`: Original block content
|
|
431
|
+
* - `1`: Quotation block
|
|
432
|
+
*/
|
|
433
|
+
blockEmbedMode: number;
|
|
434
|
+
/**
|
|
435
|
+
* Content block reference export mode
|
|
436
|
+
* - `0`: Original text (deprecated)
|
|
437
|
+
* - `1`: Quotation block (deprecated)
|
|
438
|
+
* - `2`: Anchor text block link
|
|
439
|
+
* - `3`: Anchor text only
|
|
440
|
+
* - `4`: Footnote
|
|
441
|
+
* - `5`: Anchor hash
|
|
442
|
+
*/
|
|
443
|
+
blockRefMode: number;
|
|
444
|
+
/**
|
|
445
|
+
* The symbol on the left side of the block reference anchor text during export
|
|
446
|
+
*/
|
|
447
|
+
blockRefTextLeft: string;
|
|
448
|
+
/**
|
|
449
|
+
* The symbol on the right side of the block reference anchor text during export
|
|
450
|
+
*/
|
|
451
|
+
blockRefTextRight: string;
|
|
452
|
+
/**
|
|
453
|
+
* The path of the template file used when exporting to Docx
|
|
454
|
+
*/
|
|
455
|
+
docxTemplate: string;
|
|
456
|
+
/**
|
|
457
|
+
* File annotation reference export mode
|
|
458
|
+
* - `0`: File name - page number - anchor text
|
|
459
|
+
* - `1`: Anchor text only
|
|
460
|
+
*/
|
|
461
|
+
fileAnnotationRefMode: number;
|
|
462
|
+
/**
|
|
463
|
+
* Custom watermark position, size, style, etc. when exporting to an image
|
|
464
|
+
*/
|
|
465
|
+
imageWatermarkDesc: string;
|
|
466
|
+
/**
|
|
467
|
+
* The watermark text or watermark file path used when exporting to an image
|
|
468
|
+
*/
|
|
469
|
+
imageWatermarkStr: string;
|
|
470
|
+
/**
|
|
471
|
+
* Whether to add YAML Front Matter when exporting to Markdown
|
|
472
|
+
*/
|
|
473
|
+
markdownYFM: boolean;
|
|
474
|
+
/**
|
|
475
|
+
* Pandoc executable file path
|
|
476
|
+
*/
|
|
477
|
+
pandocBin: string;
|
|
478
|
+
/**
|
|
479
|
+
* Whether the beginning of the paragraph is empty two spaces.
|
|
480
|
+
* Insert two full-width spaces `U+3000` at the beginning of the paragraph.
|
|
481
|
+
*/
|
|
482
|
+
paragraphBeginningSpace: boolean;
|
|
483
|
+
/**
|
|
484
|
+
* Custom footer content when exporting to PDF
|
|
485
|
+
*/
|
|
486
|
+
pdfFooter: string;
|
|
487
|
+
/**
|
|
488
|
+
* Custom watermark position, size, style, etc. when exporting to PDF
|
|
489
|
+
*/
|
|
490
|
+
pdfWatermarkDesc: string;
|
|
491
|
+
/**
|
|
492
|
+
* The watermark text or watermark file path used when exporting to PDF
|
|
493
|
+
*/
|
|
494
|
+
pdfWatermarkStr: string;
|
|
495
|
+
/**
|
|
496
|
+
* Tag close marker symbol
|
|
497
|
+
*/
|
|
498
|
+
tagCloseMarker: string;
|
|
499
|
+
/**
|
|
500
|
+
* Tag start marker symbol
|
|
501
|
+
*/
|
|
502
|
+
tagOpenMarker: string;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
/**
|
|
506
|
+
* Document tree related configuration
|
|
507
|
+
*/
|
|
508
|
+
export interface IFileTree {
|
|
509
|
+
/**
|
|
510
|
+
* Whether to allow the creation of sub-documents deeper than 7 levels
|
|
511
|
+
*/
|
|
512
|
+
allowCreateDeeper: boolean;
|
|
513
|
+
/**
|
|
514
|
+
* Whether to automatically locate the currently open document in the document tree
|
|
515
|
+
*/
|
|
516
|
+
alwaysSelectOpenedFile: boolean;
|
|
517
|
+
/**
|
|
518
|
+
* Whether to close all tabs when starting
|
|
519
|
+
*/
|
|
520
|
+
closeTabsOnStart: boolean;
|
|
521
|
+
/**
|
|
522
|
+
* The storage path of the new document
|
|
523
|
+
*/
|
|
524
|
+
docCreateSavePath: string;
|
|
525
|
+
/**
|
|
526
|
+
* The maximum number of documents listed
|
|
527
|
+
*/
|
|
528
|
+
maxListCount: number;
|
|
529
|
+
/**
|
|
530
|
+
* The maximum number of open tabs
|
|
531
|
+
*/
|
|
532
|
+
maxOpenTabCount: number;
|
|
533
|
+
/**
|
|
534
|
+
* Whether to open the file in the current tab
|
|
535
|
+
*/
|
|
536
|
+
openFilesUseCurrentTab: boolean;
|
|
537
|
+
/**
|
|
538
|
+
* The storage path of the new document created using block references
|
|
539
|
+
*/
|
|
540
|
+
refCreateSavePath: string;
|
|
541
|
+
/**
|
|
542
|
+
* Close the secondary confirmation when deleting a document
|
|
543
|
+
*/
|
|
544
|
+
removeDocWithoutConfirm: boolean;
|
|
545
|
+
/**
|
|
546
|
+
* Document sorting method
|
|
547
|
+
* - `0`: File name ascending
|
|
548
|
+
* - `1`: File name descending
|
|
549
|
+
* - `2`: File update time ascending
|
|
550
|
+
* - `3`: File update time descending
|
|
551
|
+
* - `4`: File name natural number ascending
|
|
552
|
+
* - `5`: File name natural number descending
|
|
553
|
+
* - `6`: Custom sorting
|
|
554
|
+
* - `7`: Reference count ascending
|
|
555
|
+
* - `8`: Reference count descending
|
|
556
|
+
* - `9`: File creation time ascending
|
|
557
|
+
* - `10`: File creation time descending
|
|
558
|
+
* - `11`: File size ascending
|
|
559
|
+
* - `12`: File size descending
|
|
560
|
+
* - `13`: Sub-document count ascending
|
|
561
|
+
* - `14`: Sub-document count descending
|
|
562
|
+
* - `15`: Use document tree sorting rules
|
|
563
|
+
* - `256`: Unspecified sorting rules, according to the notebook priority over the document
|
|
564
|
+
* tree to obtain sorting rules
|
|
565
|
+
*/
|
|
566
|
+
sort: number;
|
|
567
|
+
/**
|
|
568
|
+
* Whether to save the content of the .sy file as a single-line JSON object
|
|
569
|
+
*/
|
|
570
|
+
useSingleLineSave: boolean;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
/**
|
|
574
|
+
* Flashcard related configuration
|
|
575
|
+
*/
|
|
576
|
+
export interface IFlashCard {
|
|
577
|
+
/**
|
|
578
|
+
* Whether to enable deck card making
|
|
579
|
+
*/
|
|
580
|
+
deck: boolean;
|
|
581
|
+
/**
|
|
582
|
+
* Whether to enable heading block card making
|
|
583
|
+
*/
|
|
584
|
+
heading: boolean;
|
|
585
|
+
/**
|
|
586
|
+
* Whether to enable list block card making
|
|
587
|
+
*/
|
|
588
|
+
list: boolean;
|
|
589
|
+
/**
|
|
590
|
+
* Whether to enable mark element card making
|
|
591
|
+
*/
|
|
592
|
+
mark: boolean;
|
|
593
|
+
/**
|
|
594
|
+
* Maximum interval days
|
|
595
|
+
*/
|
|
596
|
+
maximumInterval: number;
|
|
597
|
+
/**
|
|
598
|
+
* New card limit
|
|
599
|
+
*/
|
|
600
|
+
newCardLimit: number;
|
|
601
|
+
/**
|
|
602
|
+
* FSRS request retention parameter
|
|
603
|
+
*/
|
|
604
|
+
requestRetention: number;
|
|
605
|
+
/**
|
|
606
|
+
* Review card limit
|
|
607
|
+
*/
|
|
608
|
+
reviewCardLimit: number;
|
|
609
|
+
/**
|
|
610
|
+
* Review mode
|
|
611
|
+
* - `0`: New and old mixed
|
|
612
|
+
* - `1`: New card priority
|
|
613
|
+
* - `2`: Old card priority
|
|
614
|
+
*/
|
|
615
|
+
reviewMode: number;
|
|
616
|
+
/**
|
|
617
|
+
* Whether to enable super block card making
|
|
618
|
+
*/
|
|
619
|
+
superBlock: boolean;
|
|
620
|
+
/**
|
|
621
|
+
* FSRS weight parameter list
|
|
622
|
+
*/
|
|
623
|
+
weights: string;
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
/**
|
|
627
|
+
* SiYuan graph related configuration
|
|
628
|
+
*/
|
|
629
|
+
export interface IGraph {
|
|
630
|
+
global: IGraphGlobal;
|
|
631
|
+
local: IGraphLocal;
|
|
632
|
+
/**
|
|
633
|
+
* Maximum number of content blocks displayed
|
|
634
|
+
*/
|
|
635
|
+
maxBlocks: number;
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
/**
|
|
639
|
+
* Global graph configuration
|
|
640
|
+
*/
|
|
641
|
+
export interface IGraphGlobal {
|
|
642
|
+
d3: IGraphD3;
|
|
643
|
+
/**
|
|
644
|
+
* Whether to display nodes in daily notes
|
|
645
|
+
*/
|
|
646
|
+
dailyNote: boolean;
|
|
647
|
+
/**
|
|
648
|
+
* The minimum number of references to the displayed node
|
|
649
|
+
*/
|
|
650
|
+
minRefs: number;
|
|
651
|
+
type: IGraphType;
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
/**
|
|
655
|
+
* d3.js graph configuration
|
|
656
|
+
*/
|
|
657
|
+
export interface IGraphD3 {
|
|
658
|
+
/**
|
|
659
|
+
* Whether to display the arrow
|
|
660
|
+
*/
|
|
661
|
+
arrow: boolean;
|
|
662
|
+
/**
|
|
663
|
+
* Central gravity intensity
|
|
664
|
+
*/
|
|
665
|
+
centerStrength: number;
|
|
666
|
+
/**
|
|
667
|
+
* Repulsion radius
|
|
668
|
+
*/
|
|
669
|
+
collideRadius: number;
|
|
670
|
+
/**
|
|
671
|
+
* Repulsion intensity
|
|
672
|
+
*/
|
|
673
|
+
collideStrength: number;
|
|
674
|
+
/**
|
|
675
|
+
* Line opacity
|
|
676
|
+
*/
|
|
677
|
+
lineOpacity: number;
|
|
678
|
+
/**
|
|
679
|
+
* Link distance
|
|
680
|
+
*/
|
|
681
|
+
linkDistance: number;
|
|
682
|
+
/**
|
|
683
|
+
* Line width
|
|
684
|
+
*/
|
|
685
|
+
linkWidth: number;
|
|
686
|
+
/**
|
|
687
|
+
* Node size
|
|
688
|
+
*/
|
|
689
|
+
nodeSize: number;
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
/**
|
|
693
|
+
* SiYuan node type filter
|
|
694
|
+
*/
|
|
695
|
+
export interface IGraphType {
|
|
696
|
+
/**
|
|
697
|
+
* Display quote block
|
|
698
|
+
*/
|
|
699
|
+
blockquote: boolean;
|
|
700
|
+
/**
|
|
701
|
+
* Display code block
|
|
702
|
+
*/
|
|
703
|
+
code: boolean;
|
|
704
|
+
/**
|
|
705
|
+
* Display heading block
|
|
706
|
+
*/
|
|
707
|
+
heading: boolean;
|
|
708
|
+
/**
|
|
709
|
+
* Display list block
|
|
710
|
+
*/
|
|
711
|
+
list: boolean;
|
|
712
|
+
/**
|
|
713
|
+
* Display list item
|
|
714
|
+
*/
|
|
715
|
+
listItem: boolean;
|
|
716
|
+
/**
|
|
717
|
+
* Display formula block
|
|
718
|
+
*/
|
|
719
|
+
math: boolean;
|
|
720
|
+
/**
|
|
721
|
+
* Display paragraph block
|
|
722
|
+
*/
|
|
723
|
+
paragraph: boolean;
|
|
724
|
+
/**
|
|
725
|
+
* Display super block
|
|
726
|
+
*/
|
|
727
|
+
super: boolean;
|
|
728
|
+
/**
|
|
729
|
+
* Display table block
|
|
730
|
+
*/
|
|
731
|
+
table: boolean;
|
|
732
|
+
/**
|
|
733
|
+
* Display tag
|
|
734
|
+
*/
|
|
735
|
+
tag: boolean;
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
/**
|
|
739
|
+
* Local graph configuration
|
|
740
|
+
*/
|
|
741
|
+
export interface IGraphLocal {
|
|
742
|
+
d3: IGraphD3;
|
|
743
|
+
/**
|
|
744
|
+
* Whether to display nodes in daily notes
|
|
745
|
+
*/
|
|
746
|
+
dailyNote: boolean;
|
|
747
|
+
type: IGraphType;
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
/**
|
|
751
|
+
* SiYuan keymap related configuration
|
|
752
|
+
*/
|
|
753
|
+
export interface IKeymap {
|
|
754
|
+
editor: IKeymapEditor;
|
|
755
|
+
general: IKeymapGeneral;
|
|
756
|
+
plugin: IKeymapPlugin;
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
/**
|
|
760
|
+
* SiYuan editor shortcut keys
|
|
761
|
+
*/
|
|
762
|
+
export interface IKeymapEditor {
|
|
763
|
+
general: IKeymapEditorGeneral;
|
|
764
|
+
heading: IKeymapEditorHeading;
|
|
765
|
+
insert: IKeymapEditorInsert;
|
|
766
|
+
list: IKeymapEditorList;
|
|
767
|
+
table: IKeymapEditorTable;
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
/**
|
|
771
|
+
* SiYuan editor general shortcut keys
|
|
772
|
+
*/
|
|
773
|
+
export interface IKeymapEditorGeneral extends IKeys {
|
|
774
|
+
ai: IKey;
|
|
775
|
+
alignCenter: IKey;
|
|
776
|
+
alignLeft: IKey;
|
|
777
|
+
alignRight: IKey;
|
|
778
|
+
attr: IKey;
|
|
779
|
+
backlinks: IKey;
|
|
780
|
+
collapse: IKey;
|
|
781
|
+
copyBlockEmbed: IKey;
|
|
782
|
+
copyBlockRef: IKey;
|
|
783
|
+
copyHPath: IKey;
|
|
784
|
+
copyID: IKey;
|
|
785
|
+
copyPlainText: IKey;
|
|
786
|
+
copyProtocol: IKey;
|
|
787
|
+
copyProtocolInMd: IKey;
|
|
788
|
+
copyText: IKey;
|
|
789
|
+
duplicate: IKey;
|
|
790
|
+
exitFocus: IKey;
|
|
791
|
+
expand: IKey;
|
|
792
|
+
expandDown: IKey;
|
|
793
|
+
expandUp: IKey;
|
|
794
|
+
fullscreen: IKey;
|
|
795
|
+
graphView: IKey;
|
|
796
|
+
hLayout: IKey;
|
|
797
|
+
insertAfter: IKey;
|
|
798
|
+
insertBefore: IKey;
|
|
799
|
+
insertBottom: IKey;
|
|
800
|
+
insertRight: IKey;
|
|
801
|
+
jumpToParentNext: IKey;
|
|
802
|
+
moveToDown: IKey;
|
|
803
|
+
moveToUp: IKey;
|
|
804
|
+
netAssets2LocalAssets: IKey;
|
|
805
|
+
netImg2LocalAsset: IKey;
|
|
806
|
+
newContentFile: IKey;
|
|
807
|
+
newNameFile: IKey;
|
|
808
|
+
newNameSettingFile: IKey;
|
|
809
|
+
openBy: IKey;
|
|
810
|
+
optimizeTypography: IKey;
|
|
811
|
+
outline: IKey;
|
|
812
|
+
preview: IKey;
|
|
813
|
+
quickMakeCard: IKey;
|
|
814
|
+
redo: IKey;
|
|
815
|
+
refPopover: IKey;
|
|
816
|
+
refresh: IKey;
|
|
817
|
+
refTab: IKey;
|
|
818
|
+
rename: IKey;
|
|
819
|
+
showInFolder: IKey;
|
|
820
|
+
spaceRepetition: IKey;
|
|
821
|
+
switchReadonly: IKey;
|
|
822
|
+
undo: IKey;
|
|
823
|
+
vLayout: IKey;
|
|
824
|
+
wysiwyg: IKey;
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
/**
|
|
828
|
+
* SiYuan shortcut keys
|
|
829
|
+
*/
|
|
830
|
+
export interface IKeys {
|
|
831
|
+
[key: string]: IKey;
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
/**
|
|
835
|
+
* SiYuan shortcut key
|
|
836
|
+
*/
|
|
837
|
+
export interface IKey {
|
|
838
|
+
/**
|
|
839
|
+
* Custom shortcut key
|
|
840
|
+
*/
|
|
841
|
+
custom: string;
|
|
842
|
+
/**
|
|
843
|
+
* Default shortcut key
|
|
844
|
+
*/
|
|
845
|
+
default: string;
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
/**
|
|
849
|
+
* SiYuan editor heading shortcut keys
|
|
850
|
+
*/
|
|
851
|
+
export interface IKeymapEditorHeading extends IKeys {
|
|
852
|
+
heading1: IKey;
|
|
853
|
+
heading2: IKey;
|
|
854
|
+
heading3: IKey;
|
|
855
|
+
heading4: IKey;
|
|
856
|
+
heading5: IKey;
|
|
857
|
+
heading6: IKey;
|
|
858
|
+
paragraph: IKey;
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
/**
|
|
862
|
+
* SiYuan editor insert shortcut keys
|
|
863
|
+
*/
|
|
864
|
+
export interface IKeymapEditorInsert extends IKeys {
|
|
865
|
+
appearance: IKey;
|
|
866
|
+
bold: IKey;
|
|
867
|
+
check: IKey;
|
|
868
|
+
clearInline: IKey;
|
|
869
|
+
code: IKey;
|
|
870
|
+
"inline-code": IKey;
|
|
871
|
+
"inline-math": IKey;
|
|
872
|
+
italic: IKey;
|
|
873
|
+
kbd: IKey;
|
|
874
|
+
lastUsed: IKey;
|
|
875
|
+
link: IKey;
|
|
876
|
+
mark: IKey;
|
|
877
|
+
memo: IKey;
|
|
878
|
+
ref: IKey;
|
|
879
|
+
strike: IKey;
|
|
880
|
+
sub: IKey;
|
|
881
|
+
sup: IKey;
|
|
882
|
+
table: IKey;
|
|
883
|
+
tag: IKey;
|
|
884
|
+
underline: IKey;
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
/**
|
|
888
|
+
* SiYuan editor list shortcut keys
|
|
889
|
+
*/
|
|
890
|
+
export interface IKeymapEditorList extends IKeys {
|
|
891
|
+
checkToggle: IKey;
|
|
892
|
+
indent: IKey;
|
|
893
|
+
outdent: IKey;
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
/**
|
|
897
|
+
* SiYuan editor table shortcut keys
|
|
898
|
+
*/
|
|
899
|
+
export interface IKeymapEditorTable extends IKeys {
|
|
900
|
+
"delete-column": IKey;
|
|
901
|
+
"delete-row": IKey;
|
|
902
|
+
insertColumnLeft: IKey;
|
|
903
|
+
insertColumnRight: IKey;
|
|
904
|
+
insertRowAbove: IKey;
|
|
905
|
+
insertRowBelow: IKey;
|
|
906
|
+
moveToDown: IKey;
|
|
907
|
+
moveToLeft: IKey;
|
|
908
|
+
moveToRight: IKey;
|
|
909
|
+
moveToUp: IKey;
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
/**
|
|
913
|
+
* SiYuan general shortcut keys
|
|
914
|
+
*/
|
|
915
|
+
export interface IKeymapGeneral extends IKeys {
|
|
916
|
+
addToDatabase: IKey;
|
|
917
|
+
backlinks: IKey;
|
|
918
|
+
bookmark: IKey;
|
|
919
|
+
closeAll: IKey;
|
|
920
|
+
closeLeft: IKey;
|
|
921
|
+
closeOthers: IKey;
|
|
922
|
+
closeRight: IKey;
|
|
923
|
+
closeTab: IKey;
|
|
924
|
+
closeUnmodified: IKey;
|
|
925
|
+
commandPanel: IKey;
|
|
926
|
+
config: IKey;
|
|
927
|
+
dailyNote: IKey;
|
|
928
|
+
dataHistory: IKey;
|
|
929
|
+
editReadonly: IKey;
|
|
930
|
+
enter: IKey;
|
|
931
|
+
enterBack: IKey;
|
|
932
|
+
fileTree: IKey;
|
|
933
|
+
globalGraph: IKey;
|
|
934
|
+
globalSearch: IKey;
|
|
935
|
+
goBack: IKey;
|
|
936
|
+
goForward: IKey;
|
|
937
|
+
goToEditTabNext: IKey;
|
|
938
|
+
goToEditTabPrev: IKey;
|
|
939
|
+
goToTab1: IKey;
|
|
940
|
+
goToTab2: IKey;
|
|
941
|
+
goToTab3: IKey;
|
|
942
|
+
goToTab4: IKey;
|
|
943
|
+
goToTab5: IKey;
|
|
944
|
+
goToTab6: IKey;
|
|
945
|
+
goToTab7: IKey;
|
|
946
|
+
goToTab8: IKey;
|
|
947
|
+
goToTab9: IKey;
|
|
948
|
+
goToTabNext: IKey;
|
|
949
|
+
goToTabPrev: IKey;
|
|
950
|
+
graphView: IKey;
|
|
951
|
+
inbox: IKey;
|
|
952
|
+
lockScreen: IKey;
|
|
953
|
+
mainMenu: IKey;
|
|
954
|
+
move: IKey;
|
|
955
|
+
newFile: IKey;
|
|
956
|
+
outline: IKey;
|
|
957
|
+
recentDocs: IKey;
|
|
958
|
+
replace: IKey;
|
|
959
|
+
riffCard: IKey;
|
|
960
|
+
search: IKey;
|
|
961
|
+
selectOpen1: IKey;
|
|
962
|
+
splitLR: IKey;
|
|
963
|
+
splitMoveB: IKey;
|
|
964
|
+
splitMoveR: IKey;
|
|
965
|
+
splitTB: IKey;
|
|
966
|
+
stickSearch: IKey;
|
|
967
|
+
syncNow: IKey;
|
|
968
|
+
tabToWindow: IKey;
|
|
969
|
+
tag: IKey;
|
|
970
|
+
toggleDock: IKey;
|
|
971
|
+
toggleWin: IKey;
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
/**
|
|
975
|
+
* SiYuan plugin shortcut keys
|
|
976
|
+
*/
|
|
977
|
+
export interface IKeymapPlugin {
|
|
978
|
+
[key: string]: IKeys;
|
|
979
|
+
}
|
|
980
|
+
|
|
981
|
+
/**
|
|
982
|
+
* Supported language
|
|
983
|
+
*/
|
|
984
|
+
export interface ILang {
|
|
985
|
+
/**
|
|
986
|
+
* Language name
|
|
987
|
+
*/
|
|
988
|
+
label: string;
|
|
989
|
+
/**
|
|
990
|
+
* Language identifier
|
|
991
|
+
*/
|
|
992
|
+
name: string;
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
/**
|
|
996
|
+
* Log level
|
|
997
|
+
*/
|
|
998
|
+
export type TLogLevel = "off" | "trace" | "debug" | "info" | "warn" | "error" | "fatal";
|
|
999
|
+
|
|
1000
|
+
/**
|
|
1001
|
+
* Snapshot repository related configuration
|
|
1002
|
+
*/
|
|
1003
|
+
export interface IRepo {
|
|
1004
|
+
/**
|
|
1005
|
+
* Snapshot encryption key (base64 encoded 256-bit key)
|
|
1006
|
+
*/
|
|
1007
|
+
key: string;
|
|
1008
|
+
/**
|
|
1009
|
+
* Synchronous index timing, if it exceeds this time, the user is prompted that the index
|
|
1010
|
+
* performance is degraded (unit: milliseconds)
|
|
1011
|
+
*/
|
|
1012
|
+
syncIndexTiming: number;
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
/**
|
|
1016
|
+
* SiYuan search related configuration
|
|
1017
|
+
*/
|
|
1018
|
+
export interface ISearch {
|
|
1019
|
+
/**
|
|
1020
|
+
* Whether to search in block aliases
|
|
1021
|
+
*/
|
|
1022
|
+
alias: boolean;
|
|
1023
|
+
/**
|
|
1024
|
+
* Whether to search in audio blocks
|
|
1025
|
+
*/
|
|
1026
|
+
audioBlock: boolean;
|
|
1027
|
+
/**
|
|
1028
|
+
* Extract backlink mention keywords from block aliases
|
|
1029
|
+
*/
|
|
1030
|
+
backlinkMentionAlias: boolean;
|
|
1031
|
+
/**
|
|
1032
|
+
* Extract backlink mention keywords from block reference anchor text
|
|
1033
|
+
*/
|
|
1034
|
+
backlinkMentionAnchor: boolean;
|
|
1035
|
+
/**
|
|
1036
|
+
* Extract backlink mention keywords from document names
|
|
1037
|
+
*/
|
|
1038
|
+
backlinkMentionDoc: boolean;
|
|
1039
|
+
/**
|
|
1040
|
+
* Maximum number of backlink mention keywords
|
|
1041
|
+
*/
|
|
1042
|
+
backlinkMentionKeywordsLimit: number;
|
|
1043
|
+
/**
|
|
1044
|
+
* Extract backlink mention keywords from block names
|
|
1045
|
+
*/
|
|
1046
|
+
backlinkMentionName: boolean;
|
|
1047
|
+
/**
|
|
1048
|
+
* Whether to search quote blocks
|
|
1049
|
+
*/
|
|
1050
|
+
blockquote: boolean;
|
|
1051
|
+
/**
|
|
1052
|
+
* Whether to distinguish between uppercase and lowercase letters when searching
|
|
1053
|
+
*/
|
|
1054
|
+
caseSensitive: boolean;
|
|
1055
|
+
/**
|
|
1056
|
+
* Whether to search code blocks
|
|
1057
|
+
*/
|
|
1058
|
+
codeBlock: boolean;
|
|
1059
|
+
/**
|
|
1060
|
+
* Whether to search database blocks
|
|
1061
|
+
*/
|
|
1062
|
+
databaseBlock: boolean;
|
|
1063
|
+
/**
|
|
1064
|
+
* Whether to search document blocks
|
|
1065
|
+
*/
|
|
1066
|
+
document: boolean;
|
|
1067
|
+
/**
|
|
1068
|
+
* Whether to search embedded blocks
|
|
1069
|
+
*/
|
|
1070
|
+
embedBlock: boolean;
|
|
1071
|
+
/**
|
|
1072
|
+
* Whether to search heading blocks
|
|
1073
|
+
*/
|
|
1074
|
+
heading: boolean;
|
|
1075
|
+
/**
|
|
1076
|
+
* Whether to search HTML blocks
|
|
1077
|
+
*/
|
|
1078
|
+
htmlBlock: boolean;
|
|
1079
|
+
/**
|
|
1080
|
+
* Whether to search block attributes
|
|
1081
|
+
*/
|
|
1082
|
+
ial: boolean;
|
|
1083
|
+
/**
|
|
1084
|
+
* Whether to search in iframe blocks
|
|
1085
|
+
*/
|
|
1086
|
+
iframeBlock: boolean;
|
|
1087
|
+
/**
|
|
1088
|
+
* Whether to search resource file paths
|
|
1089
|
+
*/
|
|
1090
|
+
indexAssetPath: boolean;
|
|
1091
|
+
/**
|
|
1092
|
+
* Number of search results displayed
|
|
1093
|
+
*/
|
|
1094
|
+
limit: number;
|
|
1095
|
+
/**
|
|
1096
|
+
* Whether to search list blocks
|
|
1097
|
+
*/
|
|
1098
|
+
list: boolean;
|
|
1099
|
+
/**
|
|
1100
|
+
* Whether to search list items
|
|
1101
|
+
*/
|
|
1102
|
+
listItem: boolean;
|
|
1103
|
+
/**
|
|
1104
|
+
* Whether to search formula blocks
|
|
1105
|
+
*/
|
|
1106
|
+
mathBlock: boolean;
|
|
1107
|
+
/**
|
|
1108
|
+
* Whether to search block notes
|
|
1109
|
+
*/
|
|
1110
|
+
memo: boolean;
|
|
1111
|
+
/**
|
|
1112
|
+
* Whether to search block names
|
|
1113
|
+
*/
|
|
1114
|
+
name: boolean;
|
|
1115
|
+
/**
|
|
1116
|
+
* Whether to search paragraph blocks
|
|
1117
|
+
*/
|
|
1118
|
+
paragraph: boolean;
|
|
1119
|
+
/**
|
|
1120
|
+
* Whether to search super blocks
|
|
1121
|
+
*/
|
|
1122
|
+
superBlock: boolean;
|
|
1123
|
+
/**
|
|
1124
|
+
* Whether to search table blocks
|
|
1125
|
+
*/
|
|
1126
|
+
table: boolean;
|
|
1127
|
+
/**
|
|
1128
|
+
* Whether to search in video blocks
|
|
1129
|
+
*/
|
|
1130
|
+
videoBlock: boolean;
|
|
1131
|
+
/**
|
|
1132
|
+
* Whether to get virtual reference keywords from block aliases
|
|
1133
|
+
*/
|
|
1134
|
+
virtualRefAlias: boolean;
|
|
1135
|
+
/**
|
|
1136
|
+
* Whether to get virtual reference keywords from block reference anchor text
|
|
1137
|
+
*/
|
|
1138
|
+
virtualRefAnchor: boolean;
|
|
1139
|
+
/**
|
|
1140
|
+
* Whether to get virtual reference keywords from document names
|
|
1141
|
+
*/
|
|
1142
|
+
virtualRefDoc: boolean;
|
|
1143
|
+
/**
|
|
1144
|
+
* Whether to get virtual reference keywords from block names
|
|
1145
|
+
*/
|
|
1146
|
+
virtualRefName: boolean;
|
|
1147
|
+
/**
|
|
1148
|
+
* Whether to search in widget blocks
|
|
1149
|
+
*/
|
|
1150
|
+
widgetBlock: boolean;
|
|
1151
|
+
}
|
|
1152
|
+
|
|
1153
|
+
/**
|
|
1154
|
+
* SiYuan code snippets related configuration
|
|
1155
|
+
*/
|
|
1156
|
+
export interface ISnippet {
|
|
1157
|
+
/**
|
|
1158
|
+
* Whether to enable CSS code snippets
|
|
1159
|
+
*/
|
|
1160
|
+
enabledCSS: boolean;
|
|
1161
|
+
/**
|
|
1162
|
+
* Whether to enable JavaScript code snippets
|
|
1163
|
+
*/
|
|
1164
|
+
enabledJS: boolean;
|
|
1165
|
+
}
|
|
1166
|
+
|
|
1167
|
+
/**
|
|
1168
|
+
* SiYuan workspace content statistics
|
|
1169
|
+
*/
|
|
1170
|
+
export interface IStat {
|
|
1171
|
+
/**
|
|
1172
|
+
* Asset file size (unit: bytes)
|
|
1173
|
+
*/
|
|
1174
|
+
assetsSize: number;
|
|
1175
|
+
/**
|
|
1176
|
+
* Number of content blocks
|
|
1177
|
+
*/
|
|
1178
|
+
blockCount: number;
|
|
1179
|
+
/**
|
|
1180
|
+
* Size of resource files after chunk encryption (unit: bytes)
|
|
1181
|
+
*/
|
|
1182
|
+
cAssetsSize: number;
|
|
1183
|
+
/**
|
|
1184
|
+
* Number of content blocks after chunk encryption
|
|
1185
|
+
*/
|
|
1186
|
+
cBlockCount: number;
|
|
1187
|
+
/**
|
|
1188
|
+
* Size of the data directory after chunk encryption (unit: bytes)
|
|
1189
|
+
*/
|
|
1190
|
+
cDataSize: number;
|
|
1191
|
+
/**
|
|
1192
|
+
* Number of content block trees after chunk encryption (number of documents)
|
|
1193
|
+
*/
|
|
1194
|
+
cTreeCount: number;
|
|
1195
|
+
/**
|
|
1196
|
+
* Data directory size (unit: bytes)
|
|
1197
|
+
*/
|
|
1198
|
+
dataSize: number;
|
|
1199
|
+
/**
|
|
1200
|
+
* Number of content block trees (number of documents)
|
|
1201
|
+
*/
|
|
1202
|
+
treeCount: number;
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
/**
|
|
1206
|
+
* SiYuan synchronization related configuration
|
|
1207
|
+
*/
|
|
1208
|
+
export interface ISync {
|
|
1209
|
+
/**
|
|
1210
|
+
* Cloud workspace name
|
|
1211
|
+
*/
|
|
1212
|
+
cloudName: string;
|
|
1213
|
+
/**
|
|
1214
|
+
* Whether to enable synchronization
|
|
1215
|
+
*/
|
|
1216
|
+
enabled: boolean;
|
|
1217
|
+
/**
|
|
1218
|
+
* Whether to create a conflict document when a conflict occurs during synchronization
|
|
1219
|
+
*/
|
|
1220
|
+
generateConflictDoc: boolean;
|
|
1221
|
+
/**
|
|
1222
|
+
* Synchronization mode
|
|
1223
|
+
* - `0`: Not set
|
|
1224
|
+
* - `1`: Automatic synchronization
|
|
1225
|
+
* - `2`: Manual synchronization
|
|
1226
|
+
* - `3`: Completely manual synchronization
|
|
1227
|
+
*/
|
|
1228
|
+
mode: number;
|
|
1229
|
+
/**
|
|
1230
|
+
* Whether to enable synchronization perception
|
|
1231
|
+
*/
|
|
1232
|
+
perception: boolean;
|
|
1233
|
+
/**
|
|
1234
|
+
* Cloud storage service provider
|
|
1235
|
+
* - `0`: SiYuan official cloud storage service
|
|
1236
|
+
* - `2`: Object storage service compatible with S3 protocol
|
|
1237
|
+
* - `3`: Network storage service using WebDAV protocol
|
|
1238
|
+
*/
|
|
1239
|
+
provider: number;
|
|
1240
|
+
s3: ISyncS3;
|
|
1241
|
+
/**
|
|
1242
|
+
* The prompt information of the last synchronization
|
|
1243
|
+
*/
|
|
1244
|
+
stat: string;
|
|
1245
|
+
/**
|
|
1246
|
+
* The time of the last synchronization (Unix timestamp)
|
|
1247
|
+
*/
|
|
1248
|
+
synced: number;
|
|
1249
|
+
webdav: ISyncWebDAV;
|
|
1250
|
+
}
|
|
1251
|
+
|
|
1252
|
+
/**
|
|
1253
|
+
* S3 compatible object storage related configuration
|
|
1254
|
+
*/
|
|
1255
|
+
export interface ISyncS3 {
|
|
1256
|
+
/**
|
|
1257
|
+
* Access key
|
|
1258
|
+
*/
|
|
1259
|
+
accessKey: string;
|
|
1260
|
+
/**
|
|
1261
|
+
* Bucket name
|
|
1262
|
+
*/
|
|
1263
|
+
bucket: string;
|
|
1264
|
+
/**
|
|
1265
|
+
* Service endpoint address
|
|
1266
|
+
*/
|
|
1267
|
+
endpoint: string;
|
|
1268
|
+
/**
|
|
1269
|
+
* Whether to use path-style URLs
|
|
1270
|
+
*/
|
|
1271
|
+
pathStyle: boolean;
|
|
1272
|
+
/**
|
|
1273
|
+
* Storage region
|
|
1274
|
+
*/
|
|
1275
|
+
region: string;
|
|
1276
|
+
/**
|
|
1277
|
+
* Security key
|
|
1278
|
+
*/
|
|
1279
|
+
secretKey: string;
|
|
1280
|
+
/**
|
|
1281
|
+
* Whether to skip TLS verification
|
|
1282
|
+
*/
|
|
1283
|
+
skipTlsVerify: boolean;
|
|
1284
|
+
/**
|
|
1285
|
+
* Timeout (unit: seconds)
|
|
1286
|
+
*/
|
|
1287
|
+
timeout: number;
|
|
1288
|
+
}
|
|
1289
|
+
|
|
1290
|
+
/**
|
|
1291
|
+
* WebDAV related configuration
|
|
1292
|
+
*/
|
|
1293
|
+
export interface ISyncWebDAV {
|
|
1294
|
+
/**
|
|
1295
|
+
* Service endpoint
|
|
1296
|
+
*/
|
|
1297
|
+
endpoint: string;
|
|
1298
|
+
/**
|
|
1299
|
+
* Password
|
|
1300
|
+
*/
|
|
1301
|
+
password: string;
|
|
1302
|
+
/**
|
|
1303
|
+
* Whether to skip TLS verification
|
|
1304
|
+
*/
|
|
1305
|
+
skipTlsVerify: boolean;
|
|
1306
|
+
/**
|
|
1307
|
+
* Timeout (unit: seconds)
|
|
1308
|
+
*/
|
|
1309
|
+
timeout: number;
|
|
1310
|
+
/**
|
|
1311
|
+
* Username
|
|
1312
|
+
*/
|
|
1313
|
+
username: string;
|
|
1314
|
+
}
|
|
1315
|
+
|
|
1316
|
+
/**
|
|
1317
|
+
* System related information
|
|
1318
|
+
*/
|
|
1319
|
+
export interface ISystem {
|
|
1320
|
+
/**
|
|
1321
|
+
* The absolute path of the `resources` directory under the SiYuan installation directory
|
|
1322
|
+
*/
|
|
1323
|
+
appDir: string;
|
|
1324
|
+
/**
|
|
1325
|
+
* Boot automatically
|
|
1326
|
+
*/
|
|
1327
|
+
autoLaunch: boolean;
|
|
1328
|
+
/**
|
|
1329
|
+
* The absolute path of the `conf` directory of the current workspace
|
|
1330
|
+
*/
|
|
1331
|
+
confDir: string;
|
|
1332
|
+
/**
|
|
1333
|
+
* Kernel operating environment
|
|
1334
|
+
* - `docker`: Docker container
|
|
1335
|
+
* - `android`: Android device
|
|
1336
|
+
* - `ios`: iOS device
|
|
1337
|
+
* - `std`: Desktop Electron environment
|
|
1338
|
+
*/
|
|
1339
|
+
container: TSystemContainer;
|
|
1340
|
+
/**
|
|
1341
|
+
* The absolute path of the `data` directory of the current workspace
|
|
1342
|
+
*/
|
|
1343
|
+
dataDir: string;
|
|
1344
|
+
/**
|
|
1345
|
+
* Whether to disable Google Analytics
|
|
1346
|
+
*/
|
|
1347
|
+
disableGoogleAnalytics: boolean;
|
|
1348
|
+
/**
|
|
1349
|
+
* Whether to automatically download the installation package for the new version
|
|
1350
|
+
*/
|
|
1351
|
+
downloadInstallPkg: boolean;
|
|
1352
|
+
/**
|
|
1353
|
+
* The absolute path of the user's home directory for the current operating system user
|
|
1354
|
+
*/
|
|
1355
|
+
homeDir: string;
|
|
1356
|
+
/**
|
|
1357
|
+
* The UUID of the current session
|
|
1358
|
+
*/
|
|
1359
|
+
id: string;
|
|
1360
|
+
/**
|
|
1361
|
+
* Whether the current version is an internal test version
|
|
1362
|
+
*/
|
|
1363
|
+
isInsider: boolean;
|
|
1364
|
+
/**
|
|
1365
|
+
* Whether the current version is a Microsoft Store version
|
|
1366
|
+
*/
|
|
1367
|
+
isMicrosoftStore: boolean;
|
|
1368
|
+
/**
|
|
1369
|
+
* Kernel version number
|
|
1370
|
+
*/
|
|
1371
|
+
kernelVersion: string;
|
|
1372
|
+
/**
|
|
1373
|
+
* Lock screen mode
|
|
1374
|
+
* - `0`: Manual
|
|
1375
|
+
* - `1`: Manual + Follow the operating system
|
|
1376
|
+
*/
|
|
1377
|
+
lockScreenMode: number;
|
|
1378
|
+
/**
|
|
1379
|
+
* The name of the current device
|
|
1380
|
+
*/
|
|
1381
|
+
name: string;
|
|
1382
|
+
networkProxy: INetworkProxy;
|
|
1383
|
+
/**
|
|
1384
|
+
* Whether to enable network serve (whether to allow connections from other devices)
|
|
1385
|
+
*/
|
|
1386
|
+
networkServe: boolean;
|
|
1387
|
+
/**
|
|
1388
|
+
* The operating system name determined at compile time (obtained using the command `go tool
|
|
1389
|
+
* dist list`)
|
|
1390
|
+
* - `android`: Android
|
|
1391
|
+
* - `darwin`: macOS
|
|
1392
|
+
* - `ios`: iOS
|
|
1393
|
+
* - `linux`: Linux
|
|
1394
|
+
* - `windows`: Windows
|
|
1395
|
+
*/
|
|
1396
|
+
os: TSystemOS;
|
|
1397
|
+
/**
|
|
1398
|
+
* Operating system platform name
|
|
1399
|
+
*/
|
|
1400
|
+
osPlatform: string;
|
|
1401
|
+
/**
|
|
1402
|
+
* Whether to upload error logs
|
|
1403
|
+
*/
|
|
1404
|
+
uploadErrLog: boolean;
|
|
1405
|
+
/**
|
|
1406
|
+
* The absolute path of the workspace directory
|
|
1407
|
+
*/
|
|
1408
|
+
workspaceDir: string;
|
|
1409
|
+
}
|
|
1410
|
+
|
|
1411
|
+
/**
|
|
1412
|
+
* Kernel operating environment
|
|
1413
|
+
* - `docker`: Docker container
|
|
1414
|
+
* - `android`: Android device
|
|
1415
|
+
* - `ios`: iOS device
|
|
1416
|
+
* - `std`: Desktop Electron environment
|
|
1417
|
+
*/
|
|
1418
|
+
export type TSystemContainer = "docker" | "android" | "ios" | "std";
|
|
1419
|
+
|
|
1420
|
+
/**
|
|
1421
|
+
* SiYuan Network proxy configuration
|
|
1422
|
+
*/
|
|
1423
|
+
export interface INetworkProxy {
|
|
1424
|
+
/**
|
|
1425
|
+
* Host name or host address
|
|
1426
|
+
*/
|
|
1427
|
+
host: string;
|
|
1428
|
+
/**
|
|
1429
|
+
* Proxy server port number
|
|
1430
|
+
*/
|
|
1431
|
+
port: string;
|
|
1432
|
+
/**
|
|
1433
|
+
* The protocol used by the proxy server
|
|
1434
|
+
* - Empty String: Use the system proxy settings
|
|
1435
|
+
* - `http`: HTTP
|
|
1436
|
+
* - `https`: HTTPS
|
|
1437
|
+
* - `socks5`: SOCKS5
|
|
1438
|
+
*/
|
|
1439
|
+
scheme: TSystemNetworkProxyScheme;
|
|
1440
|
+
}
|
|
1441
|
+
|
|
1442
|
+
/**
|
|
1443
|
+
* The protocol used by the proxy server
|
|
1444
|
+
* - Empty String: Use the system proxy settings
|
|
1445
|
+
* - `http`: HTTP
|
|
1446
|
+
* - `https`: HTTPS
|
|
1447
|
+
* - `socks5`: SOCKS5
|
|
1448
|
+
*/
|
|
1449
|
+
export type TSystemNetworkProxyScheme = "" | "http" | "https" | "socks5";
|
|
1450
|
+
|
|
1451
|
+
/**
|
|
1452
|
+
* The operating system name determined at compile time (obtained using the command `go tool
|
|
1453
|
+
* dist list`)
|
|
1454
|
+
* - `android`: Android
|
|
1455
|
+
* - `darwin`: macOS
|
|
1456
|
+
* - `ios`: iOS
|
|
1457
|
+
* - `linux`: Linux
|
|
1458
|
+
* - `windows`: Windows
|
|
1459
|
+
*/
|
|
1460
|
+
export type TSystemOS = "android" | "darwin" | "ios" | "linux" | "windows";
|
|
1461
|
+
|
|
1462
|
+
/**
|
|
1463
|
+
* SiYuan tag dock related configuration
|
|
1464
|
+
*/
|
|
1465
|
+
export interface ITag {
|
|
1466
|
+
/**
|
|
1467
|
+
* Tag sorting scheme
|
|
1468
|
+
* - `0`: Name alphabetically ascending
|
|
1469
|
+
* - `1`: Name alphabetically descending
|
|
1470
|
+
* - `4`: Name natural ascending
|
|
1471
|
+
* - `5`: Name natural descending
|
|
1472
|
+
* - `7`: Reference count ascending
|
|
1473
|
+
* - `8`: Reference count descending
|
|
1474
|
+
*/
|
|
1475
|
+
sort: number;
|
|
1476
|
+
}
|
|
1477
|
+
|
|
1478
|
+
/**
|
|
1479
|
+
* SiYuan UI layout related configuration
|
|
1480
|
+
*/
|
|
1481
|
+
export interface IUiLayout {
|
|
1482
|
+
bottom: IUILayoutDock;
|
|
1483
|
+
/**
|
|
1484
|
+
* Whether to hide the sidebar
|
|
1485
|
+
*/
|
|
1486
|
+
hideDock: boolean;
|
|
1487
|
+
layout: IUILayoutLayout;
|
|
1488
|
+
left: IUILayoutDock;
|
|
1489
|
+
right: IUILayoutDock;
|
|
1490
|
+
}
|
|
1491
|
+
|
|
1492
|
+
/**
|
|
1493
|
+
* SiYuan dock related configuration
|
|
1494
|
+
*/
|
|
1495
|
+
export interface IUILayoutDock {
|
|
1496
|
+
/**
|
|
1497
|
+
* Dock area list
|
|
1498
|
+
*/
|
|
1499
|
+
data: Array<IUILayoutDockTab[]>;
|
|
1500
|
+
/**
|
|
1501
|
+
* Whether to pin the dock
|
|
1502
|
+
*/
|
|
1503
|
+
pin: boolean;
|
|
1504
|
+
}
|
|
1505
|
+
|
|
1506
|
+
/**
|
|
1507
|
+
* SiYuan dock tab data
|
|
1508
|
+
*/
|
|
1509
|
+
export interface IUILayoutDockTab {
|
|
1510
|
+
/**
|
|
1511
|
+
* Dock tab hotkey
|
|
1512
|
+
*/
|
|
1513
|
+
hotkey?: string;
|
|
1514
|
+
/**
|
|
1515
|
+
* Hotkey description ID
|
|
1516
|
+
*/
|
|
1517
|
+
hotkeyLangId?: string;
|
|
1518
|
+
/**
|
|
1519
|
+
* Tab icon ID
|
|
1520
|
+
*/
|
|
1521
|
+
icon: string;
|
|
1522
|
+
/**
|
|
1523
|
+
* Whether to display the tab
|
|
1524
|
+
*/
|
|
1525
|
+
show: boolean;
|
|
1526
|
+
size: IUILayoutDockPanelSize;
|
|
1527
|
+
/**
|
|
1528
|
+
* Tab title
|
|
1529
|
+
*/
|
|
1530
|
+
title?: string;
|
|
1531
|
+
/**
|
|
1532
|
+
* Tab type
|
|
1533
|
+
*/
|
|
1534
|
+
type: string;
|
|
1535
|
+
}
|
|
1536
|
+
|
|
1537
|
+
/**
|
|
1538
|
+
* SiYuan dock tab size
|
|
1539
|
+
*/
|
|
1540
|
+
export interface IUILayoutDockPanelSize {
|
|
1541
|
+
/**
|
|
1542
|
+
* Tab height (unit: px)
|
|
1543
|
+
*/
|
|
1544
|
+
height: number | null;
|
|
1545
|
+
/**
|
|
1546
|
+
* Tab width (unit: px)
|
|
1547
|
+
*/
|
|
1548
|
+
width: number | null;
|
|
1549
|
+
}
|
|
1550
|
+
|
|
1551
|
+
/**
|
|
1552
|
+
* SiYuan layout item
|
|
1553
|
+
*/
|
|
1554
|
+
export type TUILayoutItem = IUILayoutLayout
|
|
1555
|
+
| IUILayoutWnd
|
|
1556
|
+
| IUILayoutTab
|
|
1557
|
+
| IUILayoutTabEditor
|
|
1558
|
+
| IUILayoutTabAsset
|
|
1559
|
+
| IUILayoutTabCustom
|
|
1560
|
+
| IUILayoutTabBacklink
|
|
1561
|
+
| IUILayoutTabBookmark
|
|
1562
|
+
| IUILayoutTabFiles
|
|
1563
|
+
| IUILayoutTabGraph
|
|
1564
|
+
| IUILayoutTabOutline
|
|
1565
|
+
| IUILayoutTabTag
|
|
1566
|
+
| IUILayoutTabSearch;
|
|
1567
|
+
|
|
1568
|
+
/**
|
|
1569
|
+
* SiYuan panel layout
|
|
1570
|
+
*/
|
|
1571
|
+
export interface IUILayoutLayout {
|
|
1572
|
+
/**
|
|
1573
|
+
* Internal elements
|
|
1574
|
+
*/
|
|
1575
|
+
children: (IUILayoutLayout | IUILayoutWnd)[];
|
|
1576
|
+
/**
|
|
1577
|
+
* Panel content layout direction
|
|
1578
|
+
* - `tb`: Top and bottom layout
|
|
1579
|
+
* - `lr`: Left and right layout
|
|
1580
|
+
*/
|
|
1581
|
+
direction?: TUILayoutDirection;
|
|
1582
|
+
/**
|
|
1583
|
+
* Object name
|
|
1584
|
+
*/
|
|
1585
|
+
instance: "Layout";
|
|
1586
|
+
/**
|
|
1587
|
+
* The direction in which the size can be adjusted
|
|
1588
|
+
* - `tb`: Can adjust the size up and down
|
|
1589
|
+
* - `lr`: Can adjust the size left and right
|
|
1590
|
+
*/
|
|
1591
|
+
resize?: TUILayoutDirection;
|
|
1592
|
+
/**
|
|
1593
|
+
* Panel size
|
|
1594
|
+
*/
|
|
1595
|
+
size?: string;
|
|
1596
|
+
/**
|
|
1597
|
+
* Layout type
|
|
1598
|
+
* - `normal`: Normal panel
|
|
1599
|
+
* - `center`: Center panel
|
|
1600
|
+
* - `top`: Top panel
|
|
1601
|
+
* - `bottom`: Bottom panel
|
|
1602
|
+
* - `left`: Left panel
|
|
1603
|
+
* - `right`: Right panel
|
|
1604
|
+
*/
|
|
1605
|
+
type?: TUILayoutType;
|
|
1606
|
+
}
|
|
1607
|
+
|
|
1608
|
+
/**
|
|
1609
|
+
* SiYuan window layout
|
|
1610
|
+
*/
|
|
1611
|
+
export interface IUILayoutWnd {
|
|
1612
|
+
/**
|
|
1613
|
+
* Internal elements
|
|
1614
|
+
*/
|
|
1615
|
+
children: IUILayoutTab[];
|
|
1616
|
+
/**
|
|
1617
|
+
* Panel height
|
|
1618
|
+
*/
|
|
1619
|
+
height?: string;
|
|
1620
|
+
/**
|
|
1621
|
+
* Object name
|
|
1622
|
+
*/
|
|
1623
|
+
instance: "Wnd";
|
|
1624
|
+
/**
|
|
1625
|
+
* The direction in which the size can be adjusted
|
|
1626
|
+
* - `tb`: Can adjust the size up and down
|
|
1627
|
+
* - `lr`: Can adjust the size left and right
|
|
1628
|
+
*/
|
|
1629
|
+
resize?: TUILayoutDirection;
|
|
1630
|
+
/**
|
|
1631
|
+
* Panel width
|
|
1632
|
+
*/
|
|
1633
|
+
width?: string;
|
|
1634
|
+
}
|
|
1635
|
+
|
|
1636
|
+
|
|
1637
|
+
export interface IUILayoutTab {
|
|
1638
|
+
/**
|
|
1639
|
+
* Whether the tab is active
|
|
1640
|
+
*/
|
|
1641
|
+
active?: boolean;
|
|
1642
|
+
/**
|
|
1643
|
+
* Tab content
|
|
1644
|
+
*/
|
|
1645
|
+
children: (IUILayoutTabAsset | IUILayoutTabBacklink | IUILayoutTabCustom | IUILayoutTabEditor)[];
|
|
1646
|
+
/**
|
|
1647
|
+
* Tab icon
|
|
1648
|
+
*/
|
|
1649
|
+
docIcon?: string;
|
|
1650
|
+
/**
|
|
1651
|
+
* Icon reference ID
|
|
1652
|
+
*/
|
|
1653
|
+
icon?: string;
|
|
1654
|
+
/**
|
|
1655
|
+
* Object name
|
|
1656
|
+
*/
|
|
1657
|
+
instance: "Tab";
|
|
1658
|
+
/**
|
|
1659
|
+
* Localization field key name
|
|
1660
|
+
*/
|
|
1661
|
+
lang?: string;
|
|
1662
|
+
/**
|
|
1663
|
+
* Whether the tab is pinned
|
|
1664
|
+
*/
|
|
1665
|
+
pin?: boolean;
|
|
1666
|
+
/**
|
|
1667
|
+
* Tab title
|
|
1668
|
+
*/
|
|
1669
|
+
title?: string;
|
|
1670
|
+
}
|
|
1671
|
+
|
|
1672
|
+
/**
|
|
1673
|
+
* Tab content
|
|
1674
|
+
*
|
|
1675
|
+
* SiYuan asset file tab
|
|
1676
|
+
*/
|
|
1677
|
+
export interface IUILayoutTabAsset {
|
|
1678
|
+
/**
|
|
1679
|
+
* Object name
|
|
1680
|
+
*/
|
|
1681
|
+
instance: "Asset";
|
|
1682
|
+
/**
|
|
1683
|
+
* (Asset) PDF file page number
|
|
1684
|
+
*/
|
|
1685
|
+
page?: number;
|
|
1686
|
+
/**
|
|
1687
|
+
* (Asset) Asset reference path
|
|
1688
|
+
*/
|
|
1689
|
+
path: string;
|
|
1690
|
+
}
|
|
1691
|
+
|
|
1692
|
+
|
|
1693
|
+
/**
|
|
1694
|
+
* SiYuan back link tab
|
|
1695
|
+
*/
|
|
1696
|
+
export interface IUILayoutTabBacklink {
|
|
1697
|
+
/**
|
|
1698
|
+
* (Backlink) Block ID
|
|
1699
|
+
*/
|
|
1700
|
+
blockId: string;
|
|
1701
|
+
/**
|
|
1702
|
+
* Object name
|
|
1703
|
+
*/
|
|
1704
|
+
instance: "Backlink";
|
|
1705
|
+
/**
|
|
1706
|
+
* (Backlink) Document block ID
|
|
1707
|
+
*/
|
|
1708
|
+
rootId: string;
|
|
1709
|
+
/**
|
|
1710
|
+
* (Backlink) Tab type
|
|
1711
|
+
* - `pin`: Pinned panel
|
|
1712
|
+
* - `local`: The panel of the current document
|
|
1713
|
+
*/
|
|
1714
|
+
type: TUILayoutTabBacklinkType;
|
|
1715
|
+
}
|
|
1716
|
+
|
|
1717
|
+
/**
|
|
1718
|
+
* (Backlink) Tab type
|
|
1719
|
+
* - `pin`: Pinned panel
|
|
1720
|
+
* - `local`: The panel of the current document
|
|
1721
|
+
*/
|
|
1722
|
+
export type TUILayoutTabBacklinkType = "pin" | "local";
|
|
1723
|
+
|
|
1724
|
+
/**
|
|
1725
|
+
* SiYuan bookmark tab
|
|
1726
|
+
*/
|
|
1727
|
+
export interface IUILayoutTabBookmark {
|
|
1728
|
+
/**
|
|
1729
|
+
* Object name
|
|
1730
|
+
*/
|
|
1731
|
+
instance: "Bookmark";
|
|
1732
|
+
}
|
|
1733
|
+
|
|
1734
|
+
/**
|
|
1735
|
+
* SiYuan custom tab
|
|
1736
|
+
*/
|
|
1737
|
+
export interface IUILayoutTabCustom {
|
|
1738
|
+
/**
|
|
1739
|
+
* (Custom) Data of the custom tab
|
|
1740
|
+
*/
|
|
1741
|
+
customModelData: any;
|
|
1742
|
+
/**
|
|
1743
|
+
* (Custom) Type of the custom tab
|
|
1744
|
+
*/
|
|
1745
|
+
customModelType: string;
|
|
1746
|
+
/**
|
|
1747
|
+
* Object name
|
|
1748
|
+
*/
|
|
1749
|
+
instance: "Custom";
|
|
1750
|
+
}
|
|
1751
|
+
|
|
1752
|
+
/**
|
|
1753
|
+
* SiYuan editor tab
|
|
1754
|
+
*/
|
|
1755
|
+
export interface IUILayoutTabEditor {
|
|
1756
|
+
/**
|
|
1757
|
+
* (Editor) Actions to be performed after the tab is loaded
|
|
1758
|
+
*/
|
|
1759
|
+
action: string;
|
|
1760
|
+
/**
|
|
1761
|
+
* (Editor) Block ID
|
|
1762
|
+
*/
|
|
1763
|
+
blockId: string;
|
|
1764
|
+
/**
|
|
1765
|
+
* Object name
|
|
1766
|
+
*/
|
|
1767
|
+
instance: "Editor";
|
|
1768
|
+
/**
|
|
1769
|
+
* (Editor) Editor mode
|
|
1770
|
+
* - `wysiwyg`: WYSIWYG mode
|
|
1771
|
+
* - `preview`: Export preview mode
|
|
1772
|
+
*/
|
|
1773
|
+
mode: TEditorMode;
|
|
1774
|
+
/**
|
|
1775
|
+
* (Editor) Notebook ID
|
|
1776
|
+
*/
|
|
1777
|
+
notebookId: string;
|
|
1778
|
+
/**
|
|
1779
|
+
* (Editor) Document block ID
|
|
1780
|
+
*/
|
|
1781
|
+
rootId: string;
|
|
1782
|
+
}
|
|
1783
|
+
|
|
1784
|
+
/**
|
|
1785
|
+
* SiYuan filetree tab
|
|
1786
|
+
*/
|
|
1787
|
+
export interface IUILayoutTabFiles {
|
|
1788
|
+
/**
|
|
1789
|
+
* Object name
|
|
1790
|
+
*/
|
|
1791
|
+
instance: "Files";
|
|
1792
|
+
}
|
|
1793
|
+
|
|
1794
|
+
|
|
1795
|
+
/**
|
|
1796
|
+
* SiYuan graph tab
|
|
1797
|
+
*/
|
|
1798
|
+
export interface IUILayoutTabGraph {
|
|
1799
|
+
/**
|
|
1800
|
+
* (Graph) Block ID
|
|
1801
|
+
*/
|
|
1802
|
+
blockId: string;
|
|
1803
|
+
/**
|
|
1804
|
+
* Object name
|
|
1805
|
+
*/
|
|
1806
|
+
instance: "Graph";
|
|
1807
|
+
/**
|
|
1808
|
+
* (Graph) Document block ID
|
|
1809
|
+
*/
|
|
1810
|
+
rootId: string;
|
|
1811
|
+
/**
|
|
1812
|
+
* (Graph) Tab type
|
|
1813
|
+
* - `pin`: Pinned graph
|
|
1814
|
+
* - `local`: Graph of the current editor
|
|
1815
|
+
* - `global`: Global graph
|
|
1816
|
+
*/
|
|
1817
|
+
type: TUILayoutTabGraphType;
|
|
1818
|
+
}
|
|
1819
|
+
|
|
1820
|
+
|
|
1821
|
+
/**
|
|
1822
|
+
* (Graph) Tab type
|
|
1823
|
+
* - `pin`: Pinned graph
|
|
1824
|
+
* - `local`: Graph of the current editor
|
|
1825
|
+
* - `global`: Global graph
|
|
1826
|
+
*/
|
|
1827
|
+
export type TUILayoutTabGraphType = "pin" | "local" | "global";
|
|
1828
|
+
|
|
1829
|
+
/**
|
|
1830
|
+
* SiYuan outline tab
|
|
1831
|
+
*/
|
|
1832
|
+
export interface IUILayoutTabOutline {
|
|
1833
|
+
/**
|
|
1834
|
+
* (Outline) Block ID
|
|
1835
|
+
*/
|
|
1836
|
+
blockId: string;
|
|
1837
|
+
/**
|
|
1838
|
+
* Object name
|
|
1839
|
+
*/
|
|
1840
|
+
instance: "Outline";
|
|
1841
|
+
/**
|
|
1842
|
+
* (Outline) Whether the associated editor is in preview mode
|
|
1843
|
+
*/
|
|
1844
|
+
isPreview: boolean;
|
|
1845
|
+
/**
|
|
1846
|
+
* (Outline) Tab type
|
|
1847
|
+
* - `pin`: Pinned outline panel
|
|
1848
|
+
* - `local`: The outline panel of the current editor
|
|
1849
|
+
*/
|
|
1850
|
+
type: TUILayoutTabOutlineType;
|
|
1851
|
+
}
|
|
1852
|
+
|
|
1853
|
+
|
|
1854
|
+
/**
|
|
1855
|
+
* (Outline) Tab type
|
|
1856
|
+
* - `pin`: Pinned outline panel
|
|
1857
|
+
* - `local`: The outline panel of the current editor
|
|
1858
|
+
*/
|
|
1859
|
+
export type TUILayoutTabOutlineType = "pin" | "local";
|
|
1860
|
+
|
|
1861
|
+
/**
|
|
1862
|
+
* SiYuan tag tab
|
|
1863
|
+
*/
|
|
1864
|
+
export interface IUILayoutTabTag {
|
|
1865
|
+
/**
|
|
1866
|
+
* Object name
|
|
1867
|
+
*/
|
|
1868
|
+
instance: "Tag";
|
|
1869
|
+
}
|
|
1870
|
+
|
|
1871
|
+
/**
|
|
1872
|
+
* SiYuan search tab
|
|
1873
|
+
*/
|
|
1874
|
+
export interface IUILayoutTabSearch {
|
|
1875
|
+
config: IUILayoutTabSearchConfig;
|
|
1876
|
+
/**
|
|
1877
|
+
* Object name
|
|
1878
|
+
*/
|
|
1879
|
+
instance: "Search";
|
|
1880
|
+
}
|
|
1881
|
+
|
|
1882
|
+
/**
|
|
1883
|
+
* SiYuan search tab configuration
|
|
1884
|
+
*/
|
|
1885
|
+
export interface IUILayoutTabSearchConfig {
|
|
1886
|
+
/**
|
|
1887
|
+
* Grouping strategy
|
|
1888
|
+
* - `0`: No grouping
|
|
1889
|
+
* - `1`: Group by document
|
|
1890
|
+
*/
|
|
1891
|
+
group: number;
|
|
1892
|
+
hasReplace: any;
|
|
1893
|
+
/**
|
|
1894
|
+
* Readable path list
|
|
1895
|
+
*/
|
|
1896
|
+
hPath: string;
|
|
1897
|
+
/**
|
|
1898
|
+
* Search in the specified paths
|
|
1899
|
+
*/
|
|
1900
|
+
idPath: string[];
|
|
1901
|
+
/**
|
|
1902
|
+
* Search content
|
|
1903
|
+
*/
|
|
1904
|
+
k: string;
|
|
1905
|
+
/**
|
|
1906
|
+
* Search scheme
|
|
1907
|
+
* - `0`: Keyword (default)
|
|
1908
|
+
* - `1`: Query syntax
|
|
1909
|
+
* - `2`: SQL
|
|
1910
|
+
* - `3`: Regular expression
|
|
1911
|
+
* @default 0
|
|
1912
|
+
*/
|
|
1913
|
+
method: number;
|
|
1914
|
+
/**
|
|
1915
|
+
* Custom name of the query condition group
|
|
1916
|
+
*/
|
|
1917
|
+
name?: string;
|
|
1918
|
+
/**
|
|
1919
|
+
* Current page number
|
|
1920
|
+
*/
|
|
1921
|
+
page: number;
|
|
1922
|
+
/**
|
|
1923
|
+
* Replace content
|
|
1924
|
+
*/
|
|
1925
|
+
r: string;
|
|
1926
|
+
/**
|
|
1927
|
+
* Whether to clear the search box after removing the currently used query condition group
|
|
1928
|
+
*/
|
|
1929
|
+
removed?: boolean;
|
|
1930
|
+
replaceTypes: IUILayoutTabSearchConfigReplaceTypes;
|
|
1931
|
+
/**
|
|
1932
|
+
* Search result sorting scheme
|
|
1933
|
+
* - `0`: Block type (default)
|
|
1934
|
+
* - `1`: Ascending by creation time
|
|
1935
|
+
* - `2`: Descending by creation time
|
|
1936
|
+
* - `3`: Ascending by update time
|
|
1937
|
+
* - `4`: Descending by update time
|
|
1938
|
+
* - `5`: By content order (only valid when grouping by document)
|
|
1939
|
+
* - `6`: Ascending by relevance
|
|
1940
|
+
* - `7`: Descending by relevance
|
|
1941
|
+
* @default 0
|
|
1942
|
+
*/
|
|
1943
|
+
sort: number;
|
|
1944
|
+
types: IUILayoutTabSearchConfigTypes;
|
|
1945
|
+
}
|
|
1946
|
+
|
|
1947
|
+
/**
|
|
1948
|
+
* Replace type filtering
|
|
1949
|
+
*/
|
|
1950
|
+
export interface IUILayoutTabSearchConfigReplaceTypes {
|
|
1951
|
+
/**
|
|
1952
|
+
* Replace hyperlinks
|
|
1953
|
+
* @default false
|
|
1954
|
+
*/
|
|
1955
|
+
aHref?: boolean;
|
|
1956
|
+
/**
|
|
1957
|
+
* Replace hyperlink anchor text
|
|
1958
|
+
* @default true
|
|
1959
|
+
*/
|
|
1960
|
+
aText?: boolean;
|
|
1961
|
+
/**
|
|
1962
|
+
* Replace hyperlink title
|
|
1963
|
+
* @default true
|
|
1964
|
+
*/
|
|
1965
|
+
aTitle?: boolean;
|
|
1966
|
+
/**
|
|
1967
|
+
* Replace inline code
|
|
1968
|
+
* @default false
|
|
1969
|
+
*/
|
|
1970
|
+
code?: boolean;
|
|
1971
|
+
/**
|
|
1972
|
+
* Replace code blocks
|
|
1973
|
+
* @default false
|
|
1974
|
+
*/
|
|
1975
|
+
codeBlock?: boolean;
|
|
1976
|
+
/**
|
|
1977
|
+
* Replace document title
|
|
1978
|
+
* @default true
|
|
1979
|
+
*/
|
|
1980
|
+
docTitle?: boolean;
|
|
1981
|
+
/**
|
|
1982
|
+
* Replace italic elements
|
|
1983
|
+
* @default true
|
|
1984
|
+
*/
|
|
1985
|
+
em?: boolean;
|
|
1986
|
+
/**
|
|
1987
|
+
* Replace HTML blocks
|
|
1988
|
+
* @default false
|
|
1989
|
+
*/
|
|
1990
|
+
htmlBlock?: boolean;
|
|
1991
|
+
/**
|
|
1992
|
+
* Replace image addresses
|
|
1993
|
+
* @default false
|
|
1994
|
+
*/
|
|
1995
|
+
imgSrc?: boolean;
|
|
1996
|
+
/**
|
|
1997
|
+
* Replace image anchor text
|
|
1998
|
+
* @default true
|
|
1999
|
+
*/
|
|
2000
|
+
imgText?: boolean;
|
|
2001
|
+
/**
|
|
2002
|
+
* Replace image titles
|
|
2003
|
+
* @default true
|
|
2004
|
+
*/
|
|
2005
|
+
imgTitle?: boolean;
|
|
2006
|
+
/**
|
|
2007
|
+
* Replace inline formulas
|
|
2008
|
+
* @default false
|
|
2009
|
+
*/
|
|
2010
|
+
inlineMath?: boolean;
|
|
2011
|
+
/**
|
|
2012
|
+
* Replace inline memos
|
|
2013
|
+
* @default true
|
|
2014
|
+
*/
|
|
2015
|
+
inlineMemo?: boolean;
|
|
2016
|
+
/**
|
|
2017
|
+
* Replace kdb elements
|
|
2018
|
+
* @default true
|
|
2019
|
+
*/
|
|
2020
|
+
kbd?: boolean;
|
|
2021
|
+
/**
|
|
2022
|
+
* Replace mark elements
|
|
2023
|
+
* @default true
|
|
2024
|
+
*/
|
|
2025
|
+
mark?: boolean;
|
|
2026
|
+
/**
|
|
2027
|
+
* Replace formula blocks
|
|
2028
|
+
* @default false
|
|
2029
|
+
*/
|
|
2030
|
+
mathBlock?: boolean;
|
|
2031
|
+
/**
|
|
2032
|
+
* Replace delete elements
|
|
2033
|
+
* @default true
|
|
2034
|
+
*/
|
|
2035
|
+
s?: boolean;
|
|
2036
|
+
/**
|
|
2037
|
+
* Replace bold elements
|
|
2038
|
+
* @default true
|
|
2039
|
+
*/
|
|
2040
|
+
strong?: boolean;
|
|
2041
|
+
/**
|
|
2042
|
+
* Replace subscript elements
|
|
2043
|
+
* @default true
|
|
2044
|
+
*/
|
|
2045
|
+
sub?: boolean;
|
|
2046
|
+
/**
|
|
2047
|
+
* Replace superscript elements
|
|
2048
|
+
* @default true
|
|
2049
|
+
*/
|
|
2050
|
+
sup?: boolean;
|
|
2051
|
+
/**
|
|
2052
|
+
* Replace tag elements
|
|
2053
|
+
* @default true
|
|
2054
|
+
*/
|
|
2055
|
+
tag?: boolean;
|
|
2056
|
+
/**
|
|
2057
|
+
* Replace rich text elements
|
|
2058
|
+
* @default true
|
|
2059
|
+
*/
|
|
2060
|
+
text?: boolean;
|
|
2061
|
+
/**
|
|
2062
|
+
* Replace underline elements
|
|
2063
|
+
* @default true
|
|
2064
|
+
*/
|
|
2065
|
+
u?: boolean;
|
|
2066
|
+
}
|
|
2067
|
+
|
|
2068
|
+
/**
|
|
2069
|
+
* Search type filtering
|
|
2070
|
+
*/
|
|
2071
|
+
export interface IUILayoutTabSearchConfigTypes {
|
|
2072
|
+
/**
|
|
2073
|
+
* Search results contain audio blocks
|
|
2074
|
+
* @default false
|
|
2075
|
+
*/
|
|
2076
|
+
audioBlock: boolean;
|
|
2077
|
+
/**
|
|
2078
|
+
* Search results contain blockquote blocks
|
|
2079
|
+
* @default false
|
|
2080
|
+
*/
|
|
2081
|
+
blockquote: boolean;
|
|
2082
|
+
/**
|
|
2083
|
+
* Search results contain code blocks
|
|
2084
|
+
* @default false
|
|
2085
|
+
*/
|
|
2086
|
+
codeBlock: boolean;
|
|
2087
|
+
/**
|
|
2088
|
+
* Search results contain database blocks
|
|
2089
|
+
* @default false
|
|
2090
|
+
*/
|
|
2091
|
+
databaseBlock: boolean;
|
|
2092
|
+
/**
|
|
2093
|
+
* Search results contain document blocks
|
|
2094
|
+
* @default false
|
|
2095
|
+
*/
|
|
2096
|
+
document: boolean;
|
|
2097
|
+
/**
|
|
2098
|
+
* Search results contain embed blocks
|
|
2099
|
+
* @default false
|
|
2100
|
+
*/
|
|
2101
|
+
embedBlock: boolean;
|
|
2102
|
+
/**
|
|
2103
|
+
* Search results contain heading blocks
|
|
2104
|
+
* @default false
|
|
2105
|
+
*/
|
|
2106
|
+
heading: boolean;
|
|
2107
|
+
/**
|
|
2108
|
+
* Search results contain html blocks
|
|
2109
|
+
* @default false
|
|
2110
|
+
*/
|
|
2111
|
+
htmlBlock: boolean;
|
|
2112
|
+
/**
|
|
2113
|
+
* Search results contain iframe blocks
|
|
2114
|
+
* @default false
|
|
2115
|
+
*/
|
|
2116
|
+
iframeBlock: boolean;
|
|
2117
|
+
/**
|
|
2118
|
+
* Search results contain list blocks
|
|
2119
|
+
* @default false
|
|
2120
|
+
*/
|
|
2121
|
+
list: boolean;
|
|
2122
|
+
/**
|
|
2123
|
+
* Search results contain list item blocks
|
|
2124
|
+
* @default false
|
|
2125
|
+
*/
|
|
2126
|
+
listItem: boolean;
|
|
2127
|
+
/**
|
|
2128
|
+
* Search results contain math blocks
|
|
2129
|
+
* @default false
|
|
2130
|
+
*/
|
|
2131
|
+
mathBlock: boolean;
|
|
2132
|
+
/**
|
|
2133
|
+
* Search results contain paragraph blocks
|
|
2134
|
+
* @default false
|
|
2135
|
+
*/
|
|
2136
|
+
paragraph: boolean;
|
|
2137
|
+
/**
|
|
2138
|
+
* Search results contain super blocks
|
|
2139
|
+
* @default false
|
|
2140
|
+
*/
|
|
2141
|
+
superBlock: boolean;
|
|
2142
|
+
/**
|
|
2143
|
+
* Search results contain table blocks
|
|
2144
|
+
* @default false
|
|
2145
|
+
*/
|
|
2146
|
+
table: boolean;
|
|
2147
|
+
/**
|
|
2148
|
+
* Search results contain video blocks
|
|
2149
|
+
* @default false
|
|
2150
|
+
*/
|
|
2151
|
+
videoBlock: boolean;
|
|
2152
|
+
/**
|
|
2153
|
+
* Search results contain widget blocks
|
|
2154
|
+
* @default false
|
|
2155
|
+
*/
|
|
2156
|
+
widgetBlock: boolean;
|
|
2157
|
+
}
|
|
2158
|
+
|
|
2159
|
+
|
|
2160
|
+
/**
|
|
2161
|
+
* Panel content layout direction
|
|
2162
|
+
* - `tb`: Top and bottom layout
|
|
2163
|
+
* - `lr`: Left and right layout
|
|
2164
|
+
*
|
|
2165
|
+
* The direction in which the size can be adjusted
|
|
2166
|
+
* - `tb`: Can adjust the size up and down
|
|
2167
|
+
* - `lr`: Can adjust the size left and right
|
|
2168
|
+
*/
|
|
2169
|
+
export type TUILayoutDirection = "tb" | "lr";
|
|
2170
|
+
|
|
2171
|
+
/**
|
|
2172
|
+
* Layout type
|
|
2173
|
+
* - `normal`: Normal panel
|
|
2174
|
+
* - `center`: Center panel
|
|
2175
|
+
* - `top`: Top panel
|
|
2176
|
+
* - `bottom`: Bottom panel
|
|
2177
|
+
* - `left`: Left panel
|
|
2178
|
+
* - `right`: Right panel
|
|
2179
|
+
*/
|
|
2180
|
+
export type TUILayoutType = "normal" | "center" | "top" | "bottom" | "left" | "right";
|
|
2181
|
+
|
|
2182
|
+
}
|