siyuan 1.0.4 → 1.0.6
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 +15 -2
- package/package.json +1 -1
- package/siyuan.d.ts +96 -284
- package/types/block/Panel.d.ts +27 -0
- package/types/config.d.ts +116 -15
- package/types/constants.ts +193 -40
- package/types/events.d.ts +2 -2
- package/types/index.d.ts +427 -0
- package/types/layout/Model.d.ts +23 -0
- package/types/layout/Tab.d.ts +36 -0
- package/types/layout/Wnd.d.ts +34 -0
- package/types/layout/dock/Files.d.ts +56 -0
- package/types/layout/dock/Inbox.d.ts +18 -0
- package/types/mobile/dock/MobileBacklinks.d.ts +10 -0
- package/types/mobile/dock/MobileBookmarks.d.ts +8 -0
- package/types/mobile/dock/MobileFiles.d.ts +31 -0
- package/types/mobile/dock/MobileOutline.d.ts +12 -0
- package/types/mobile/dock/MobileTags.d.ts +8 -0
- package/types/protyle/util/compatibility.d.ts +16 -0
- package/types/protyle.d.ts +430 -136
package/types/constants.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {IObject,
|
|
1
|
+
import {IObject, Config} from "../siyuan";
|
|
2
|
+
|
|
3
|
+
const altNumber = navigator.platform.toUpperCase().indexOf("MAC") > -1 ? "⌃" : "⌥";
|
|
2
4
|
|
|
3
5
|
export abstract class Constants {
|
|
4
6
|
public static readonly SIYUAN_VERSION: string;
|
|
@@ -39,15 +41,21 @@ export abstract class Constants {
|
|
|
39
41
|
public static readonly SIYUAN_EXPORT_PDF: string = "siyuan-export-pdf";
|
|
40
42
|
public static readonly SIYUAN_EXPORT_NEWWINDOW: string = "siyuan-export-newwindow";
|
|
41
43
|
|
|
44
|
+
public static readonly SIYUAN_CONTEXT_MENU: string = "siyuan-context-menu";
|
|
45
|
+
|
|
42
46
|
// custom
|
|
43
47
|
public static readonly CUSTOM_SY_READONLY: string = "custom-sy-readonly";
|
|
44
48
|
public static readonly CUSTOM_SY_FULLWIDTH: string = "custom-sy-fullwidth";
|
|
49
|
+
public static readonly CUSTOM_SY_AV_VIEW: string = "custom-sy-av-view";
|
|
45
50
|
public static readonly CUSTOM_REMINDER_WECHAT: string = "custom-reminder-wechat";
|
|
46
51
|
public static readonly CUSTOM_RIFF_DECKS: string = "custom-riff-decks";
|
|
47
52
|
|
|
48
53
|
// size
|
|
49
|
-
public static readonly
|
|
50
|
-
public static readonly
|
|
54
|
+
public static readonly SIZE_DATABASE_MAZ_SIZE: number = 102400;
|
|
55
|
+
public static readonly SIZE_SCROLL_TB: number = 24;
|
|
56
|
+
public static readonly SIZE_SCROLL_STEP: number = 256;
|
|
57
|
+
public static readonly SIZE_LINK_TEXT_MAX: number = 64;
|
|
58
|
+
public static readonly SIZE_TOOLBAR_HEIGHT: number = 32;
|
|
51
59
|
public static readonly SIZE_GET_MAX = 102400;
|
|
52
60
|
public static readonly SIZE_UNDO = 64;
|
|
53
61
|
public static readonly SIZE_TITLE = 512;
|
|
@@ -67,20 +75,22 @@ export abstract class Constants {
|
|
|
67
75
|
public static readonly CB_GET_ALL = "cb-get-all"; // 获取所有块
|
|
68
76
|
public static readonly CB_GET_BACKLINK = "cb-get-backlink"; // 悬浮窗为传递型需展示上下文
|
|
69
77
|
public static readonly CB_GET_UNUNDO = "cb-get-unundo"; // 不需要记录历史
|
|
70
|
-
public static readonly CB_GET_SCROLL = "cb-get-scroll"; //
|
|
78
|
+
public static readonly CB_GET_SCROLL = "cb-get-scroll"; // 滚动到指定位置,用于直接打开文档,必有 rootID
|
|
71
79
|
public static readonly CB_GET_CONTEXT = "cb-get-context"; // 包含上下文
|
|
72
|
-
public static readonly CB_GET_ROOTSCROLL = "cb-get-rootscroll"; // 如果为 rootID
|
|
80
|
+
public static readonly CB_GET_ROOTSCROLL = "cb-get-rootscroll"; // 如果为 rootID 就滚动到指定位置,必有 rootID
|
|
73
81
|
public static readonly CB_GET_HTML = "cb-get-html"; // 直接渲染,不需要再 /api/block/getDocInfo,否则搜索表格无法定位
|
|
74
82
|
public static readonly CB_GET_HISTORY = "cb-get-history"; // 历史渲染
|
|
83
|
+
public static readonly CB_GET_OPENNEW = "cb-get-opennew"; // 编辑器只读后新建文件需为临时解锁状态 & https://github.com/siyuan-note/siyuan/issues/12197
|
|
75
84
|
|
|
76
85
|
// localstorage
|
|
77
86
|
public static readonly LOCAL_ZOOM = "local-zoom";
|
|
78
87
|
public static readonly LOCAL_SEARCHDATA = "local-searchdata";
|
|
79
88
|
public static readonly LOCAL_SEARCHKEYS = "local-searchkeys";
|
|
80
89
|
public static readonly LOCAL_SEARCHASSET = "local-searchasset";
|
|
90
|
+
public static readonly LOCAL_SEARCHUNREF = "local-searchunref";
|
|
81
91
|
public static readonly LOCAL_DOCINFO = "local-docinfo"; // only mobile
|
|
82
92
|
public static readonly LOCAL_DAILYNOTEID = "local-dailynoteid"; // string
|
|
83
|
-
public static readonly
|
|
93
|
+
public static readonly LOCAL_HISTORY = "local-history";
|
|
84
94
|
public static readonly LOCAL_CODELANG = "local-codelang"; // string
|
|
85
95
|
public static readonly LOCAL_FONTSTYLES = "local-fontstyles";
|
|
86
96
|
public static readonly LOCAL_EXPORTPDF = "local-exportpdf";
|
|
@@ -92,6 +102,69 @@ export abstract class Constants {
|
|
|
92
102
|
public static readonly LOCAL_AI = "local-ai";
|
|
93
103
|
public static readonly LOCAL_PLUGINTOPUNPIN = "local-plugintopunpin";
|
|
94
104
|
public static readonly LOCAL_FLASHCARD = "local-flashcard";
|
|
105
|
+
public static readonly LOCAL_FILEPOSITION = "local-fileposition";
|
|
106
|
+
public static readonly LOCAL_FILESPATHS = "local-filespaths";
|
|
107
|
+
public static readonly LOCAL_DIALOGPOSITION = "local-dialogposition";
|
|
108
|
+
public static readonly LOCAL_SESSION_FIRSTLOAD = "local-session-firstload";
|
|
109
|
+
public static readonly LOCAL_OUTLINE = "local-outline";
|
|
110
|
+
public static readonly LOCAL_PLUGIN_DOCKS = "local-plugin-docks";
|
|
111
|
+
|
|
112
|
+
// dialog
|
|
113
|
+
public static readonly DIALOG_OPENCARD = "dialog-opencard";
|
|
114
|
+
public static readonly DIALOG_MAKECARD = "dialog-makecard";
|
|
115
|
+
public static readonly DIALOG_VIEWCARDS = "dialog-viewcards";
|
|
116
|
+
public static readonly DIALOG_DIALYNOTE = "dialog-dialynote";
|
|
117
|
+
public static readonly DIALOG_RECENTDOCS = "dialog-recentdocs";
|
|
118
|
+
public static readonly DIALOG_SWITCHTAB = "dialog-switchtab";
|
|
119
|
+
public static readonly DIALOG_SEARCH = "dialog-search";
|
|
120
|
+
public static readonly DIALOG_REPLACE = "dialog-replace";
|
|
121
|
+
public static readonly DIALOG_GLOBALSEARCH = "dialog-globalsearch";
|
|
122
|
+
public static readonly DIALOG_HISTORYCOMPARE = "dialog-historycompare";
|
|
123
|
+
|
|
124
|
+
public static readonly DIALOG_ACCESSAUTHCODE = "dialog-accessauthcode"; // 访问鉴权码
|
|
125
|
+
public static readonly DIALOG_AICUSTOMACTION = "dialog-aicustomaction"; // AI 自定义操作
|
|
126
|
+
public static readonly DIALOG_AIUPDATECUSTOMACTION = "dialog-aiupdatecustomaction"; // 更新 AI 自定义操作
|
|
127
|
+
public static readonly DIALOG_BACKGROUNDLINK = "dialog-backgroundlink"; // 题头图-随机
|
|
128
|
+
public static readonly DIALOG_BACKGROUNDRANDOM = "dialog-backgroundrandom"; // 题头图-链接
|
|
129
|
+
public static readonly DIALOG_CHANGELOG = "dialog-changelog"; // 更新日志
|
|
130
|
+
public static readonly DIALOG_COMMANDPANEL = "dialog-commandpanel"; // 插件命令面板
|
|
131
|
+
public static readonly DIALOG_DEACTIVATEUSER = "dialog-deactivateuser"; // 注销账户
|
|
132
|
+
public static readonly DIALOG_EMOJIS = "dialog-emojis"; // 文档、笔记本图表
|
|
133
|
+
public static readonly DIALOG_EXPORTIMAGE = "dialog-exportimage"; // 导出为图片
|
|
134
|
+
public static readonly DIALOG_EXPORTTEMPLATE = "dialog-exporttemplate"; // 导出为模板
|
|
135
|
+
public static readonly DIALOG_EXPORTWORD = "dialog-exportword"; // 导出为 word
|
|
136
|
+
public static readonly DIALOG_HISTORY = "dialog-history"; // 数据历史(Alt + H)
|
|
137
|
+
public static readonly DIALOG_HISTORYDOC = "dialog-historydoc"; // 文档历史
|
|
138
|
+
public static readonly DIALOG_MOVEPATHTO = "dialog-movepathto"; // 移动文档
|
|
139
|
+
public static readonly DIALOG_RENAME = "dialog-rename"; // 重命名
|
|
140
|
+
public static readonly DIALOG_RENAMEASSETS = "dialog-renameassets"; // 重命名资源文件
|
|
141
|
+
public static readonly DIALOG_RENAMEBOOKMARK = "dialog-renamebookmark"; // 重命名书签
|
|
142
|
+
public static readonly DIALOG_RENAMETAG = "dialog-renametag"; // 重命名标签
|
|
143
|
+
public static readonly DIALOG_REPLACETYPE = "dialog-replacetype"; // 替换 - 替换类型
|
|
144
|
+
public static readonly DIALOG_SAVECRITERION = "dialog-savecriterion"; // 保存查询条件
|
|
145
|
+
public static readonly DIALOG_SEARCHTYPE = "dialog-searchtype"; // 搜索 - 类型
|
|
146
|
+
public static readonly DIALOG_SEARCHASSETSTYPE = "dialog-searchassetstype"; // 搜索资源文件 - 类型
|
|
147
|
+
public static readonly DIALOG_SETTING = "dialog-setting"; // 设置面板
|
|
148
|
+
public static readonly DIALOG_SNAPSHOTTAG = "dialog-snapshottag"; // 标记快照
|
|
149
|
+
public static readonly DIALOG_SNAPSHOTMEMO = "dialog-snapshotmemo"; // 快照备注
|
|
150
|
+
public static readonly DIALOG_SNIPPETS = "dialog-snippets"; // 代码片段
|
|
151
|
+
public static readonly DIALOG_SYNCADDCLOUDDIR = "dialog-syncaddclouddir"; // 新建云端同步目录
|
|
152
|
+
public static readonly DIALOG_SYNCCHOOSEDIR = "dialog-syncchoosedir"; // 选择云端同步目录
|
|
153
|
+
public static readonly DIALOG_SYNCCHOOSEDIRECTION = "dialog-syncchoosedirection"; // 选择云端同步方向
|
|
154
|
+
public static readonly DIALOG_TRANSFERBLOCKREF = "dialog-transferblockref"; // 转移引用
|
|
155
|
+
public static readonly DIALOG_WECHATREMINDER = "dialog-wechatreminder"; // 微信提醒
|
|
156
|
+
public static readonly DIALOG_PASSWORD = "dialog-password"; // 导入同步密钥
|
|
157
|
+
public static readonly DIALOG_SETPASSWORD = "dialog-setpassword"; // 设置同步密钥
|
|
158
|
+
public static readonly DIALOG_BOOTSYNCFAILED = "dialog-bootsyncfailed"; // 启动时同步数据失败
|
|
159
|
+
public static readonly DIALOG_KERNELFAULT = "dialog-kernelfault"; // 内核退出
|
|
160
|
+
public static readonly DIALOG_STATEEXCEPTED = "dialog-stateexcepted"; // 状态异常
|
|
161
|
+
public static readonly DIALOG_ATTR = "dialog-attr"; // 设置块属性
|
|
162
|
+
public static readonly DIALOG_SETCUSTOMATTR = "dialog-setcustomattr"; // 设置自定义属性
|
|
163
|
+
public static readonly DIALOG_CREATENOTEBOOK = "dialog-createnotebook"; // 创建笔记本
|
|
164
|
+
public static readonly DIALOG_NOTEBOOKCONF = "dialog-notebookconf"; // 笔记本设置
|
|
165
|
+
public static readonly DIALOG_CREATEWORKSPACE = "dialog-createworkspace"; // 创建工作空间
|
|
166
|
+
public static readonly DIALOG_OPENWORKSPACE = "dialog-openworkspace"; // 打开工作空间
|
|
167
|
+
public static readonly DIALOG_SAVEWORKSPACE = "dialog-saveworkspace"; // 保存工作空间
|
|
95
168
|
|
|
96
169
|
// timeout
|
|
97
170
|
public static readonly TIMEOUT_DBLCLICK = 190;
|
|
@@ -106,15 +179,22 @@ export abstract class Constants {
|
|
|
106
179
|
zh_CHT: "20211226090932-5lcq56f",
|
|
107
180
|
en_US: "20210808180117-6v0mkxr",
|
|
108
181
|
fr_FR: "20210808180117-6v0mkxr",
|
|
182
|
+
es_ES: "20210808180117-6v0mkxr",
|
|
183
|
+
ja_JP: "20240530133126-axarxgx",
|
|
184
|
+
it_IT: "20210808180117-6v0mkxr",
|
|
185
|
+
de_DE: "20210808180117-6v0mkxr",
|
|
186
|
+
he_IL: "20210808180117-6v0mkxr",
|
|
187
|
+
ru_RU: "20210808180117-6v0mkxr",
|
|
188
|
+
pl_PL: "20210808180117-6v0mkxr",
|
|
109
189
|
};
|
|
110
190
|
public static readonly QUICK_DECK_ID = "20230218211946-2kw8jgx";
|
|
111
191
|
|
|
112
|
-
public static
|
|
192
|
+
public static KEYCODELIST: { [key: number]: string } = {
|
|
113
193
|
8: "⌫",
|
|
114
194
|
9: "⇥",
|
|
115
195
|
13: "↩",
|
|
116
196
|
16: "⇧",
|
|
117
|
-
17: "
|
|
197
|
+
17: "⌃",
|
|
118
198
|
18: "⌥",
|
|
119
199
|
19: "Pause",
|
|
120
200
|
20: "CapsLock",
|
|
@@ -197,6 +277,26 @@ export abstract class Constants {
|
|
|
197
277
|
121: "F10",
|
|
198
278
|
122: "F11",
|
|
199
279
|
123: "F12",
|
|
280
|
+
124: "F13",
|
|
281
|
+
125: "F14",
|
|
282
|
+
126: "F15",
|
|
283
|
+
127: "F16",
|
|
284
|
+
128: "F17",
|
|
285
|
+
129: "F18",
|
|
286
|
+
130: "F19",
|
|
287
|
+
131: "F20",
|
|
288
|
+
132: "F21",
|
|
289
|
+
133: "F22",
|
|
290
|
+
134: "F23",
|
|
291
|
+
135: "F24",
|
|
292
|
+
136: "F25",
|
|
293
|
+
137: "F26",
|
|
294
|
+
138: "F27",
|
|
295
|
+
139: "F28",
|
|
296
|
+
140: "F29",
|
|
297
|
+
141: "F30",
|
|
298
|
+
142: "F31",
|
|
299
|
+
143: "F32",
|
|
200
300
|
144: "NumLock",
|
|
201
301
|
145: "ScrollLock",
|
|
202
302
|
182: "MyComputer",
|
|
@@ -213,11 +313,12 @@ export abstract class Constants {
|
|
|
213
313
|
221: "]",
|
|
214
314
|
222: "'",
|
|
215
315
|
};
|
|
316
|
+
|
|
216
317
|
// 冲突不使用 "⌘S/Q"
|
|
217
318
|
// "⌘", "⇧", "⌥", "⌃"
|
|
218
|
-
// "⌘A", "⌘X", "⌘C", "⌘V", "⌘-", "⌘=", "⌘0", "⇧⌘V", "⌘/", "⇧↑", "⇧↓", "⇧→", "⇧←", "⇧⇥", "
|
|
219
|
-
// "⌘Home", "⌘End", "⇧↩", "↩", "PageUp", "PageDown", "⌫", "⌦" 不可自定义
|
|
220
|
-
public static readonly SIYUAN_KEYMAP: IKeymap = {
|
|
319
|
+
// "⌘A", "⌘X", "⌘C", "⌘V", "⌘-", "⌘=", "⌘0", "⇧⌘V", "⌘/", "⇧↑", "⇧↓", "⇧→", "⇧←", "⇧⇥", "⌃D", "⇧⌘→", "⇧⌘←",
|
|
320
|
+
// "⌘Home", "⌘End", "⇧↩", "↩", "PageUp", "PageDown", "⌫", "⌦", "Escape" 不可自定义
|
|
321
|
+
public static readonly SIYUAN_KEYMAP: Config.IKeymap = {
|
|
221
322
|
general: {
|
|
222
323
|
mainMenu: {default: "⌥\\", custom: "⌥\\"},
|
|
223
324
|
commandPanel: {default: "⌥⇧P", custom: "⌥⇧P"},
|
|
@@ -233,16 +334,16 @@ export abstract class Constants {
|
|
|
233
334
|
stickSearch: {default: "⇧⌘F", custom: "⇧⌘F"},
|
|
234
335
|
replace: {default: "⌘R", custom: "⌘R"},
|
|
235
336
|
closeTab: {default: "⌘W", custom: "⌘W"},
|
|
236
|
-
fileTree: {default: "
|
|
237
|
-
outline: {default: "
|
|
238
|
-
bookmark: {default: "
|
|
239
|
-
tag: {default: "
|
|
240
|
-
dailyNote: {default: "
|
|
241
|
-
inbox: {default: "
|
|
242
|
-
backlinks: {default: "
|
|
243
|
-
graphView: {default: "
|
|
244
|
-
globalGraph: {default: "
|
|
245
|
-
riffCard: {default: "
|
|
337
|
+
fileTree: {default: altNumber + "1", custom: altNumber + "1"},
|
|
338
|
+
outline: {default: altNumber + "2", custom: altNumber + "2"},
|
|
339
|
+
bookmark: {default: altNumber + "3", custom: altNumber + "3"},
|
|
340
|
+
tag: {default: altNumber + "4", custom: altNumber + "4"},
|
|
341
|
+
dailyNote: {default: altNumber + "5", custom: altNumber + "5"},
|
|
342
|
+
inbox: {default: altNumber + "6", custom: altNumber + "6"},
|
|
343
|
+
backlinks: {default: altNumber + "7", custom: altNumber + "7"},
|
|
344
|
+
graphView: {default: altNumber + "8", custom: altNumber + "8"},
|
|
345
|
+
globalGraph: {default: altNumber + "9", custom: altNumber + "9"},
|
|
346
|
+
riffCard: {default: altNumber + "0", custom: altNumber + "0"},
|
|
246
347
|
config: {default: "⌥P", custom: "⌥P"},
|
|
247
348
|
dataHistory: {default: "⌥H", custom: "⌥H"},
|
|
248
349
|
toggleWin: {default: "⌥M", custom: "⌥M"},
|
|
@@ -259,6 +360,8 @@ export abstract class Constants {
|
|
|
259
360
|
goToTab9: {default: "⌘9", custom: "⌘9"},
|
|
260
361
|
goToTabNext: {default: "⇧⌘]", custom: "⇧⌘]"},
|
|
261
362
|
goToTabPrev: {default: "⇧⌘[", custom: "⇧⌘["},
|
|
363
|
+
goToEditTabNext: {default: "⌃⇥", custom: "⌃⇥"},
|
|
364
|
+
goToEditTabPrev: {default: "⌃⇧⇥", custom: "⌃⇧⇥"},
|
|
262
365
|
move: {default: "", custom: ""},
|
|
263
366
|
selectOpen1: {default: "", custom: ""},
|
|
264
367
|
toggleDock: {default: "", custom: ""},
|
|
@@ -271,21 +374,16 @@ export abstract class Constants {
|
|
|
271
374
|
closeUnmodified: {default: "", custom: ""},
|
|
272
375
|
closeLeft: {default: "", custom: ""},
|
|
273
376
|
closeRight: {default: "", custom: ""},
|
|
377
|
+
tabToWindow: {default: "", custom: ""},
|
|
378
|
+
addToDatabase: {default: "", custom: ""},
|
|
379
|
+
unsplit: {default: "", custom: ""},
|
|
380
|
+
unsplitAll: {default: "", custom: ""},
|
|
274
381
|
},
|
|
275
382
|
editor: {
|
|
276
383
|
general: {
|
|
277
384
|
duplicate: {default: "⌘D", custom: "⌘D"},
|
|
278
385
|
expandDown: {default: "⌥⇧↓", custom: "⌥⇧↓"},
|
|
279
386
|
expandUp: {default: "⌥⇧↑", custom: "⌥⇧↑"},
|
|
280
|
-
copyPlainText: {default: "", custom: ""},
|
|
281
|
-
copyID: {default: "", custom: ""},
|
|
282
|
-
copyProtocolInMd: {default: "", custom: ""},
|
|
283
|
-
netImg2LocalAsset: {default: "", custom: ""},
|
|
284
|
-
optimizeTypography: {default: "", custom: ""},
|
|
285
|
-
hLayout: {default: "", custom: ""},
|
|
286
|
-
vLayout: {default: "", custom: ""},
|
|
287
|
-
refPopover: {default: "", custom: ""},
|
|
288
|
-
copyText: {default: "", custom: ""},
|
|
289
387
|
expand: {default: "⌘↓", custom: "⌘↓"},
|
|
290
388
|
collapse: {default: "⌘↑", custom: "⌘↑"},
|
|
291
389
|
insertBottom: {default: "⌥⌘.", custom: "⌥⌘."},
|
|
@@ -319,8 +417,24 @@ export abstract class Constants {
|
|
|
319
417
|
insertBefore: {default: "⇧⌘B", custom: "⇧⌘B"},
|
|
320
418
|
insertAfter: {default: "⇧⌘A", custom: "⇧⌘A"},
|
|
321
419
|
jumpToParentNext: {default: "⇧⌘N", custom: "⇧⌘N"},
|
|
420
|
+
jumpToParentPrev: {default: "⇧⌘M", custom: "⇧⌘M"},
|
|
421
|
+
jumpToParent: {default: "⇧⌘J", custom: "⇧⌘J"},
|
|
322
422
|
moveToUp: {default: "⇧⌘↑", custom: "⇧⌘↑"},
|
|
323
423
|
moveToDown: {default: "⇧⌘↓", custom: "⇧⌘↓"},
|
|
424
|
+
duplicateCompletely: {default: "", custom: ""},
|
|
425
|
+
copyPlainText: {default: "", custom: ""},
|
|
426
|
+
copyID: {default: "", custom: ""},
|
|
427
|
+
copyProtocolInMd: {default: "", custom: ""},
|
|
428
|
+
netImg2LocalAsset: {default: "", custom: ""},
|
|
429
|
+
netAssets2LocalAssets: {default: "", custom: ""},
|
|
430
|
+
optimizeTypography: {default: "", custom: ""},
|
|
431
|
+
hLayout: {default: "", custom: ""},
|
|
432
|
+
vLayout: {default: "", custom: ""},
|
|
433
|
+
refPopover: {default: "", custom: ""},
|
|
434
|
+
copyText: {default: "", custom: ""},
|
|
435
|
+
exitFocus: {default: "", custom: ""},
|
|
436
|
+
ai: {default: "", custom: ""},
|
|
437
|
+
switchReadonly: {default: "", custom: ""},
|
|
324
438
|
},
|
|
325
439
|
insert: {
|
|
326
440
|
appearance: {default: "⌥⌘X", custom: "⌥⌘X"},
|
|
@@ -340,8 +454,11 @@ export abstract class Constants {
|
|
|
340
454
|
"inline-code": {default: "⌘G", custom: "⌘G"},
|
|
341
455
|
link: {default: "⌘K", custom: "⌘K"},
|
|
342
456
|
check: {default: "⌘L", custom: "⌘L"},
|
|
457
|
+
"ordered-list": {default: "", custom: ""},
|
|
458
|
+
list: {default: "", custom: ""},
|
|
343
459
|
table: {default: "⌘O", custom: "⌘O"},
|
|
344
460
|
code: {default: "⇧⌘K", custom: "⇧⌘K"},
|
|
461
|
+
quote: {default: "", custom: ""},
|
|
345
462
|
clearInline: {default: "⌘\\", custom: "⌘\\"},
|
|
346
463
|
},
|
|
347
464
|
heading: {
|
|
@@ -374,7 +491,7 @@ export abstract class Constants {
|
|
|
374
491
|
plugin: {},
|
|
375
492
|
};
|
|
376
493
|
|
|
377
|
-
public static readonly SIYUAN_EMPTY_LAYOUT:
|
|
494
|
+
public static readonly SIYUAN_EMPTY_LAYOUT: Config.IUiLayout = {
|
|
378
495
|
hideDock: false,
|
|
379
496
|
layout: {
|
|
380
497
|
"direction": "tb",
|
|
@@ -405,7 +522,13 @@ export abstract class Constants {
|
|
|
405
522
|
"size": "auto",
|
|
406
523
|
"type": "center",
|
|
407
524
|
"instance": "Layout",
|
|
408
|
-
"children": [{
|
|
525
|
+
"children": [{
|
|
526
|
+
"instance": "Wnd",
|
|
527
|
+
"children": [{
|
|
528
|
+
"instance": "Tab",
|
|
529
|
+
"children": []
|
|
530
|
+
}]
|
|
531
|
+
}]
|
|
409
532
|
}, {
|
|
410
533
|
"direction": "tb",
|
|
411
534
|
"size": "0px",
|
|
@@ -446,13 +569,13 @@ export abstract class Constants {
|
|
|
446
569
|
data: [
|
|
447
570
|
[{
|
|
448
571
|
type: "file",
|
|
449
|
-
size: {width:
|
|
572
|
+
size: {width: 232, height: 0},
|
|
450
573
|
show: true,
|
|
451
574
|
icon: "iconFiles",
|
|
452
575
|
hotkeyLangId: "fileTree",
|
|
453
576
|
}, {
|
|
454
577
|
type: "outline",
|
|
455
|
-
size: {width:
|
|
578
|
+
size: {width: 232, height: 0},
|
|
456
579
|
show: false,
|
|
457
580
|
icon: "iconAlignCenter",
|
|
458
581
|
hotkeyLangId: "outline",
|
|
@@ -464,13 +587,13 @@ export abstract class Constants {
|
|
|
464
587
|
hotkeyLangId: "inbox",
|
|
465
588
|
}], [{
|
|
466
589
|
type: "bookmark",
|
|
467
|
-
size: {width:
|
|
590
|
+
size: {width: 232, height: 0},
|
|
468
591
|
show: false,
|
|
469
592
|
icon: "iconBookmark",
|
|
470
593
|
hotkeyLangId: "bookmark",
|
|
471
594
|
}, {
|
|
472
595
|
type: "tag",
|
|
473
|
-
size: {width:
|
|
596
|
+
size: {width: 232, height: 0},
|
|
474
597
|
show: false,
|
|
475
598
|
icon: "iconTags",
|
|
476
599
|
hotkeyLangId: "tag",
|
|
@@ -503,6 +626,33 @@ export abstract class Constants {
|
|
|
503
626
|
}
|
|
504
627
|
};
|
|
505
628
|
|
|
629
|
+
public static readonly SIYUAN_DEFAULT_REPLACETYPES: Required<Config.IUILayoutTabSearchConfigReplaceTypes> = {
|
|
630
|
+
"text": true,
|
|
631
|
+
"imgText": true,
|
|
632
|
+
"imgTitle": true,
|
|
633
|
+
"imgSrc": false,
|
|
634
|
+
"aText": true,
|
|
635
|
+
"aTitle": true,
|
|
636
|
+
"aHref": false,
|
|
637
|
+
"code": false,
|
|
638
|
+
"em": true,
|
|
639
|
+
"strong": true,
|
|
640
|
+
"inlineMath": false,
|
|
641
|
+
"inlineMemo": true,
|
|
642
|
+
"blockRef": false,
|
|
643
|
+
"kbd": true,
|
|
644
|
+
"mark": true,
|
|
645
|
+
"s": true,
|
|
646
|
+
"sub": true,
|
|
647
|
+
"sup": true,
|
|
648
|
+
"tag": true,
|
|
649
|
+
"u": true,
|
|
650
|
+
"docTitle": true,
|
|
651
|
+
"codeBlock": false,
|
|
652
|
+
"mathBlock": false,
|
|
653
|
+
"htmlBlock": false
|
|
654
|
+
};
|
|
655
|
+
|
|
506
656
|
// image
|
|
507
657
|
public static readonly SIYUAN_IMAGE_VIP: string = `<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
|
508
658
|
<path fill="#ffd00f" d="M2.288 12.643l23.487 12.853c0.286 0.153 0.477 0.45 0.477 0.791 0 0.082-0.011 0.161-0.032 0.237l0.001-0.006c-0.119 0.395-0.479 0.678-0.905 0.678-0.004 0-0.009-0-0.013-0h-19.439c-0.958 0-1.766-0.684-1.885-1.595l-1.691-12.956z"></path>
|
|
@@ -517,7 +667,7 @@ export abstract class Constants {
|
|
|
517
667
|
|
|
518
668
|
// assets
|
|
519
669
|
public static readonly SIYUAN_ASSETS_IMAGE: string[] = [".apng", ".ico", ".cur", ".jpg", ".jpe", ".jpeg", ".jfif", ".pjp", ".pjpeg", ".png", ".gif", ".webp", ".bmp", ".svg", ".avif"];
|
|
520
|
-
public static readonly SIYUAN_ASSETS_AUDIO: string[] = [".mp3", ".wav", ".ogg", ".m4a"];
|
|
670
|
+
public static readonly SIYUAN_ASSETS_AUDIO: string[] = [".mp3", ".wav", ".ogg", ".m4a", ".aac"];
|
|
521
671
|
public static readonly SIYUAN_ASSETS_VIDEO: string[] = [".mov", ".weba", ".mkv", ".mp4", ".webm"];
|
|
522
672
|
public static readonly SIYUAN_ASSETS_EXTS: string[] = [".pdf"].concat(Constants.SIYUAN_ASSETS_IMAGE).concat(Constants.SIYUAN_ASSETS_AUDIO).concat(Constants.SIYUAN_ASSETS_VIDEO);
|
|
523
673
|
public static readonly SIYUAN_ASSETS_SEARCH: string[] = [".txt", ".md", ".markdown", ".docx", ".xlsx", ".pptx", ".pdf", ".json", ".log", ".sql", ".html", ".xml", ".java", ".h", ".c",
|
|
@@ -557,14 +707,17 @@ export abstract class Constants {
|
|
|
557
707
|
"lightfair", "magula", "mono-blue", "nnfx-light", "panda-syntax-light", "paraiso-light", "purebasic", "qtcreator-light", "routeros", "school-book",
|
|
558
708
|
"stackoverflow-light", "tokyo-night-light", "vs", "xcode", "default"];
|
|
559
709
|
public static readonly ZWSP: string = "\u200b";
|
|
560
|
-
public static readonly INLINE_TYPE: string[] = ["block-ref", "kbd", "text", "file-annotation-ref", "a", "strong", "em", "u", "s", "mark", "sup", "sub", "tag", "code", "inline-math", "inline-memo"];
|
|
710
|
+
public static readonly INLINE_TYPE: string[] = ["block-ref", "kbd", "text", "file-annotation-ref", "a", "strong", "em", "u", "s", "mark", "sup", "sub", "tag", "code", "inline-math", "inline-memo", "clear"];
|
|
561
711
|
public static readonly BLOCK_HINT_KEYS: string[] = ["((", "[[", "((", "【【"];
|
|
562
|
-
public static readonly BLOCK_HINT_CLOSE_KEYS: IObject;
|
|
712
|
+
public static readonly BLOCK_HINT_CLOSE_KEYS: IObject = {"((": "))", "[[": "]]", "((": "))", "【【": "】】"};
|
|
563
713
|
// common: "bash", "c", "csharp", "cpp", "css", "diff", "go", "xml", "json", "java", "javascript", "kotlin", "less", "lua", "makefile", "markdown", "objectivec", "php", "php-template", "perl", "plaintext", "python", "python-repl", "r", "ruby", "rust", "scss", "sql", "shell", "swift", "ini", "typescript", "vbnet", "yaml", "properties", "1c", "armasm", "avrasm", "actionscript", "ada", "angelscript", "accesslog", "apache", "applescript", "arcade", "arduino", "asciidoc", "aspectj", "abnf", "autohotkey", "autoit", "awk", "basic", "bnf", "dos", "brainfuck", "cal", "cmake", "csp", "cos", "capnproto", "ceylon", "clean", "clojure", "clojure-repl", "coffeescript", "coq", "crystal", "d", "dns", "dart", "delphi", "dts", "django", "dockerfile", "dust", "erb", "elixir", "elm", "erlang", "erlang-repl", "excel", "ebnf", "fsharp", "fix", "flix", "fortran", "gcode", "gams", "gauss", "glsl", "gml", "gherkin", "golo", "gradle", "groovy", "haml", "hsp", "http", "handlebars", "haskell", "haxe", "hy", "irpf90", "isbl", "inform7", "x86asm", "jboss-cli", "julia", "julia-repl", "ldif", "llvm", "lsl", "latex", "lasso", "leaf", "lisp", "livecodeserver", "livescript", "mel", "mipsasm", "matlab", "maxima", "mercury", "axapta", "routeros", "mizar", "mojolicious", "monkey", "moonscript", "n1ql", "nsis", "nestedtext", "nginx", "nim", "nix", "node-repl", "ocaml", "openscad", "ruleslanguage", "oxygene", "pf", "parser3", "pony", "pgsql", "powershell", "processing", "prolog", "protobuf", "puppet", "purebasic", "profile", "q", "qml", "reasonml", "rib", "rsl", "roboconf", "sas", "sml", "sqf", "step21", "scala", "scheme", "scilab", "smali", "smalltalk", "stan", "stata", "stylus", "subunit", "tp", "taggerscript", "tcl", "tap", "thrift", "twig", "vbscript", "vbscript-html", "vhdl", "vala", "verilog", "vim", "wasm", "mathematica", "wren", "xl", "xquery", "zephir", "crmsh", "dsconfig", "graphql",
|
|
564
|
-
// third: "yul", "solidity", "abap", "hlsl"
|
|
714
|
+
// third: "yul", "solidity", "abap", "hlsl", "gdscript"
|
|
565
715
|
public static readonly ALIAS_CODE_LANGUAGES: string[] = [
|
|
566
716
|
"js", "ts", "html", "toml", "c#", "bat",
|
|
567
717
|
];
|
|
718
|
+
public static readonly SIYUAN_RENDER_CODE_LANGUAGES: string[] = [
|
|
719
|
+
"abc", "plantuml", "mermaid", "flowchart", "echarts", "mindmap", "graphviz", "math"
|
|
720
|
+
];
|
|
568
721
|
|
|
569
722
|
// Google Analytics 事件
|
|
570
723
|
public static readonly ANALYTICS_EVT_ON_GET_CONFIG: string = "siyuan.onGetConfig";
|
package/types/events.d.ts
CHANGED