siyuan 1.1.5 → 1.1.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 +12 -0
- package/package.json +1 -1
- package/siyuan.d.ts +3 -1
- package/types/config.d.ts +75 -41
- package/types/constants.ts +70 -5
- package/types/index.d.ts +254 -13
- package/types/protyle.d.ts +575 -281
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v1.1.8 2026
|
|
4
|
+
|
|
5
|
+
## v1.1.7 2025-12-23
|
|
6
|
+
|
|
7
|
+
* [Provide plugins rendering interfaces for code blocks, formula blocks, etc](https://github.com/siyuan-note/siyuan/issues/16586)
|
|
8
|
+
|
|
9
|
+
## v1.1.6 2025-12-02
|
|
10
|
+
|
|
11
|
+
* [Synchronize config, constants, and protyle](https://github.com/siyuan-note/petal/issues/42)
|
|
12
|
+
* [Improve code block language selection](https://github.com/siyuan-note/siyuan/pull/15966)
|
|
13
|
+
* [Add onDataChanged method to handle data changes in the plugin](https://github.com/siyuan-note/siyuan/pull/16244)
|
|
14
|
+
|
|
3
15
|
## v1.1.5 2025-09-09
|
|
4
16
|
|
|
5
17
|
* [Adjust imports to separate type and general](https://github.com/siyuan-note/petal/pull/41)
|
package/package.json
CHANGED
package/siyuan.d.ts
CHANGED
|
@@ -208,7 +208,7 @@ export interface IEventBusMap {
|
|
|
208
208
|
"sync-fail": IWebSocketData;
|
|
209
209
|
"mobile-keyboard-show": void;
|
|
210
210
|
"mobile-keyboard-hide": void;
|
|
211
|
-
"code-language-update": { languages: string[] };
|
|
211
|
+
"code-language-update": { languages: string[], type: "init" | "match", listElement: HTMLElement, value: string };
|
|
212
212
|
"code-language-change": {
|
|
213
213
|
language: string,
|
|
214
214
|
languageElements: HTMLElement[],
|
|
@@ -428,6 +428,8 @@ export abstract class Plugin {
|
|
|
428
428
|
|
|
429
429
|
onload(): void;
|
|
430
430
|
|
|
431
|
+
onDataChanged(): void
|
|
432
|
+
|
|
431
433
|
onunload(): void;
|
|
432
434
|
|
|
433
435
|
uninstall(): void;
|
package/types/config.d.ts
CHANGED
|
@@ -67,7 +67,7 @@ export namespace Config {
|
|
|
67
67
|
*/
|
|
68
68
|
openHelp: boolean;
|
|
69
69
|
/**
|
|
70
|
-
*
|
|
70
|
+
* Publish service
|
|
71
71
|
* 发布服务
|
|
72
72
|
*/
|
|
73
73
|
publish: IPublish;
|
|
@@ -263,6 +263,14 @@ export namespace Config {
|
|
|
263
263
|
* The version number of the theme currently in use
|
|
264
264
|
*/
|
|
265
265
|
themeVer: string;
|
|
266
|
+
statusBar: IAppearanceStatusBar;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
export interface IAppearanceStatusBar {
|
|
270
|
+
msgTaskDatabaseIndexCommitDisabled: boolean;
|
|
271
|
+
msgTaskHistoryDatabaseIndexCommitDisabled: boolean;
|
|
272
|
+
msgTaskAssetDatabaseIndexCommitDisabled: boolean;
|
|
273
|
+
msgTaskHistoryGenerateFileDisabled: boolean;
|
|
266
274
|
}
|
|
267
275
|
|
|
268
276
|
/**
|
|
@@ -365,6 +373,14 @@ export namespace Config {
|
|
|
365
373
|
* Whether the backlink contains children
|
|
366
374
|
*/
|
|
367
375
|
backlinkContainChildren: boolean;
|
|
376
|
+
/**
|
|
377
|
+
* Backlink sort mode
|
|
378
|
+
*/
|
|
379
|
+
backlinkSort: number;
|
|
380
|
+
/**
|
|
381
|
+
* Backmention sort mode
|
|
382
|
+
*/
|
|
383
|
+
backmentionSort: number;
|
|
368
384
|
/**
|
|
369
385
|
* The maximum length of the dynamic anchor text for block references
|
|
370
386
|
*/
|
|
@@ -402,6 +418,13 @@ export namespace Config {
|
|
|
402
418
|
* Whether the embedded block displays breadcrumbs
|
|
403
419
|
*/
|
|
404
420
|
embedBlockBreadcrumb: boolean;
|
|
421
|
+
/**
|
|
422
|
+
* Heading embed mode for embedded blocks
|
|
423
|
+
* - `0`: Show title with blocks below (default)
|
|
424
|
+
* - `1`: Show only title
|
|
425
|
+
* - `2`: Show only blocks below title
|
|
426
|
+
*/
|
|
427
|
+
headingEmbedMode: number;
|
|
405
428
|
/**
|
|
406
429
|
* Common emoji icons
|
|
407
430
|
*/
|
|
@@ -646,6 +669,14 @@ export namespace Config {
|
|
|
646
669
|
* Whether to save the content of the .sy file as a single-line JSON object
|
|
647
670
|
*/
|
|
648
671
|
useSingleLineSave: boolean;
|
|
672
|
+
/**
|
|
673
|
+
* The .sy and database .json files larger than this value will prompt a warning (unit: MB)
|
|
674
|
+
*/
|
|
675
|
+
largeFileWarningSize: number;
|
|
676
|
+
/**
|
|
677
|
+
* Whether to create new documents at the top of the document tree
|
|
678
|
+
*/
|
|
679
|
+
createDocAtTop: boolean;
|
|
649
680
|
}
|
|
650
681
|
|
|
651
682
|
/**
|
|
@@ -992,29 +1023,35 @@ export namespace Config {
|
|
|
992
1023
|
* SiYuan general shortcut keys
|
|
993
1024
|
*/
|
|
994
1025
|
export interface IKeymapGeneral extends IKeys {
|
|
995
|
-
|
|
996
|
-
backlinks: IKey;
|
|
997
|
-
bookmark: IKey;
|
|
998
|
-
closeAll: IKey;
|
|
999
|
-
closeLeft: IKey;
|
|
1000
|
-
closeOthers: IKey;
|
|
1001
|
-
closeRight: IKey;
|
|
1002
|
-
closeTab: IKey;
|
|
1003
|
-
closeUnmodified: IKey;
|
|
1026
|
+
mainMenu: IKey;
|
|
1004
1027
|
commandPanel: IKey;
|
|
1005
|
-
config: IKey;
|
|
1006
|
-
dailyNote: IKey;
|
|
1007
|
-
dataHistory: IKey;
|
|
1008
1028
|
editReadonly: IKey;
|
|
1009
|
-
|
|
1029
|
+
syncNow: IKey;
|
|
1010
1030
|
enterBack: IKey;
|
|
1031
|
+
enter: IKey;
|
|
1032
|
+
goForward: IKey;
|
|
1033
|
+
goBack: IKey;
|
|
1034
|
+
newFile: IKey;
|
|
1035
|
+
search: IKey;
|
|
1036
|
+
globalSearch: IKey;
|
|
1037
|
+
stickSearch: IKey;
|
|
1038
|
+
replace: IKey;
|
|
1039
|
+
closeTab: IKey;
|
|
1011
1040
|
fileTree: IKey;
|
|
1041
|
+
outline: IKey;
|
|
1042
|
+
bookmark: IKey;
|
|
1043
|
+
tag: IKey;
|
|
1044
|
+
dailyNote: IKey;
|
|
1045
|
+
inbox: IKey;
|
|
1046
|
+
backlinks: IKey;
|
|
1047
|
+
graphView: IKey;
|
|
1012
1048
|
globalGraph: IKey;
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1049
|
+
riffCard: IKey;
|
|
1050
|
+
config: IKey;
|
|
1051
|
+
dataHistory: IKey;
|
|
1052
|
+
toggleWin: IKey;
|
|
1053
|
+
lockScreen: IKey;
|
|
1054
|
+
recentDocs: IKey;
|
|
1018
1055
|
goToTab1: IKey;
|
|
1019
1056
|
goToTab2: IKey;
|
|
1020
1057
|
goToTab3: IKey;
|
|
@@ -1026,28 +1063,25 @@ export namespace Config {
|
|
|
1026
1063
|
goToTab9: IKey;
|
|
1027
1064
|
goToTabNext: IKey;
|
|
1028
1065
|
goToTabPrev: IKey;
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
mainMenu: IKey;
|
|
1066
|
+
goToEditTabNext: IKey;
|
|
1067
|
+
goToEditTabPrev: IKey;
|
|
1068
|
+
recentClosed: IKey;
|
|
1033
1069
|
move: IKey;
|
|
1034
|
-
newFile: IKey;
|
|
1035
|
-
outline: IKey;
|
|
1036
|
-
recentDocs: IKey;
|
|
1037
|
-
replace: IKey;
|
|
1038
|
-
riffCard: IKey;
|
|
1039
|
-
search: IKey;
|
|
1040
1070
|
selectOpen1: IKey;
|
|
1071
|
+
toggleDock: IKey;
|
|
1041
1072
|
splitLR: IKey;
|
|
1042
|
-
splitMoveB: IKey;
|
|
1043
1073
|
splitMoveR: IKey;
|
|
1044
1074
|
splitTB: IKey;
|
|
1045
|
-
|
|
1046
|
-
|
|
1075
|
+
splitMoveB: IKey;
|
|
1076
|
+
closeOthers: IKey;
|
|
1077
|
+
closeAll: IKey;
|
|
1078
|
+
closeUnmodified: IKey;
|
|
1079
|
+
closeLeft: IKey;
|
|
1080
|
+
closeRight: IKey;
|
|
1047
1081
|
tabToWindow: IKey;
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1082
|
+
addToDatabase: IKey;
|
|
1083
|
+
unsplit: IKey;
|
|
1084
|
+
unsplitAll: IKey;
|
|
1051
1085
|
}
|
|
1052
1086
|
|
|
1053
1087
|
/**
|
|
@@ -1077,29 +1111,29 @@ export namespace Config {
|
|
|
1077
1111
|
export type TLogLevel = "off" | "trace" | "debug" | "info" | "warn" | "error" | "fatal";
|
|
1078
1112
|
|
|
1079
1113
|
/**
|
|
1080
|
-
*
|
|
1114
|
+
* Publish service
|
|
1081
1115
|
*/
|
|
1082
1116
|
export interface IPublish {
|
|
1083
1117
|
/**
|
|
1084
|
-
* Whether to open the
|
|
1118
|
+
* Whether to open the publish service
|
|
1085
1119
|
*/
|
|
1086
1120
|
enable: boolean;
|
|
1087
1121
|
/**
|
|
1088
|
-
* The basic authentication settings of
|
|
1122
|
+
* The basic authentication settings of publish service
|
|
1089
1123
|
*/
|
|
1090
1124
|
auth: IPublishAuth;
|
|
1091
1125
|
/**
|
|
1092
|
-
* Port on which the
|
|
1126
|
+
* Port on which the publish service listens
|
|
1093
1127
|
*/
|
|
1094
1128
|
port: number;
|
|
1095
1129
|
}
|
|
1096
1130
|
|
|
1097
1131
|
/**
|
|
1098
|
-
*
|
|
1132
|
+
* Publish service authentication settings
|
|
1099
1133
|
*/
|
|
1100
1134
|
export interface IPublishAuth {
|
|
1101
1135
|
/**
|
|
1102
|
-
* Whether to enable basic authentication for
|
|
1136
|
+
* Whether to enable basic authentication for publish services
|
|
1103
1137
|
*/
|
|
1104
1138
|
enable: boolean;
|
|
1105
1139
|
/**
|
package/types/constants.ts
CHANGED
|
@@ -150,6 +150,7 @@ export abstract class Constants {
|
|
|
150
150
|
public static readonly LOCAL_IMAGES = "local-images";
|
|
151
151
|
public static readonly LOCAL_EMOJIS = "local-emojis";
|
|
152
152
|
public static readonly LOCAL_MOVE_PATH = "local-move-path";
|
|
153
|
+
public static readonly LOCAL_RECENT_DOCS = "local-recent-docs";
|
|
153
154
|
|
|
154
155
|
// dialog
|
|
155
156
|
public static readonly DIALOG_CONFIRM = "dialog-confirm";
|
|
@@ -209,6 +210,69 @@ export abstract class Constants {
|
|
|
209
210
|
public static readonly DIALOG_OPENWORKSPACE = "dialog-openworkspace"; // 打开工作空间
|
|
210
211
|
public static readonly DIALOG_SAVEWORKSPACE = "dialog-saveworkspace"; // 保存工作空间
|
|
211
212
|
|
|
213
|
+
// menu
|
|
214
|
+
public static readonly MENU_BAR_WORKSPACE = "barWorkspace"; // 顶栏主菜单
|
|
215
|
+
public static readonly MENU_BAR_PLUGIN = "topBarPlugin"; // 顶栏插件菜单
|
|
216
|
+
public static readonly MENU_BAR_ZOOM = "barZoom"; // 顶栏缩放菜单
|
|
217
|
+
public static readonly MENU_BAR_MODE = "barmode"; // 顶栏外观菜单
|
|
218
|
+
public static readonly MENU_BAR_MORE = "barmore"; // 顶栏更多菜单
|
|
219
|
+
public static readonly MENU_STATUS_HELP = "statusHelp"; // 状态栏帮助菜单
|
|
220
|
+
public static readonly MENU_STATUS_BACKGROUND_TASK = "statusBackgroundTask"; // 状态栏后台任务菜单
|
|
221
|
+
public static readonly MENU_DOCK_MOBILE = "dockMobileMenu"; // 移动端侧栏插件选项菜单
|
|
222
|
+
|
|
223
|
+
public static readonly MENU_BLOCK_SINGLE = "block-single"; // 单选块菜单
|
|
224
|
+
public static readonly MENU_BLOCK_MULTI = "block-multi"; // 多选块菜单
|
|
225
|
+
public static readonly MENU_TITLE = "titleMenu"; // 文档块菜单
|
|
226
|
+
public static readonly MENU_FROM_TITLE_PROTYLE = "title-protyle"; // 在 Protyle 触发的文档块菜单
|
|
227
|
+
public static readonly MENU_FROM_TITLE_BREADCRUMB = "title-breadcrumb"; // 在面包屑触发的文档块菜单
|
|
228
|
+
public static readonly MENU_BREADCRUMB_MORE = "breadcrumbMore"; // 面包屑更多菜单
|
|
229
|
+
public static readonly MENU_BREADCRUMB_MOBILE_PATH = "breadcrumb-mobile-path"; // 移动端面包屑菜单
|
|
230
|
+
|
|
231
|
+
public static readonly MENU_DOC_TREE_MORE = "docTreeMore"; // 侧栏文档树右键菜单
|
|
232
|
+
public static readonly MENU_FROM_DOC_TREE_MORE_NOTEBOOK = "tree-notebook"; // 侧栏文档树右键菜单,单个笔记本
|
|
233
|
+
public static readonly MENU_FROM_DOC_TREE_MORE_DOC = "tree-doc"; // 侧栏文档树右键菜单,单个文档
|
|
234
|
+
public static readonly MENU_FROM_DOC_TREE_MORE_ITEMS = "tree-items"; // 侧栏文档树右键菜单,多个文档或笔记本
|
|
235
|
+
public static readonly MENU_TAG = "tagMenu"; // 侧栏标签菜单
|
|
236
|
+
public static readonly MENU_BOOKMARK = "bookmarkMenu"; // 侧栏书签菜单
|
|
237
|
+
public static readonly MENU_OUTLINE_CONTEXT = "outline-context"; // 大纲标题右键菜单
|
|
238
|
+
public static readonly MENU_OUTLINE_EXPAND_LEVEL = "outline-expand-level"; // 大纲展开层级菜单
|
|
239
|
+
|
|
240
|
+
public static readonly MENU_AV_VIEW = "av-view"; // 数据库视图标题菜单
|
|
241
|
+
public static readonly MENU_AV_HEADER_CELL = "av-header-cell"; // 数据库字段标题菜单
|
|
242
|
+
public static readonly MENU_AV_HEADER_ADD = "av-header-add"; // 数据库添加字段菜单
|
|
243
|
+
public static readonly MENU_AV_ADD_FILTER = "av-add-filter"; // 数据库添加筛选条件菜单
|
|
244
|
+
public static readonly MENU_AV_ADD_SORT = "av-add-sort"; // 数据库添加排序条件菜单
|
|
245
|
+
public static readonly MENU_AV_COL_OPTION = "av-col-option"; // 数据库单选多选字段的选项编辑菜单
|
|
246
|
+
public static readonly MENU_AV_COL_FORMAT_NUMBER = "av-col-format-number"; // 数据库数字字段格式化菜单
|
|
247
|
+
public static readonly MENU_AV_GROUP_DATE = "avGroupDate"; // 数据库日期字段分组菜单的日期菜单
|
|
248
|
+
public static readonly MENU_AV_GROUP_SORT = "avGroupSort"; // 数据库日期字段分组菜单的排序菜单
|
|
249
|
+
public static readonly MENU_AV_ASSET_EDIT = "av-asset-edit"; // 数据库资源字段链接或资源文件菜单
|
|
250
|
+
public static readonly MENU_AV_CALC = "av-calc"; // 数据库计算菜单
|
|
251
|
+
public static readonly MENU_AV_PAGE_SIZE = "av-page-size"; // 数据库条目数菜单
|
|
252
|
+
|
|
253
|
+
public static readonly MENU_SEARCH_MORE = "searchMore"; // 搜索更多菜单
|
|
254
|
+
public static readonly MENU_SEARCH_METHOD = "searchMethod"; // 搜索方式菜单
|
|
255
|
+
public static readonly MENU_SEARCH_ASSET_MORE = "searchAssetMore"; // 资源文件搜索更多菜单
|
|
256
|
+
public static readonly MENU_SEARCH_ASSET_METHOD = "searchAssetMethod"; // 资源文件搜索方式菜单
|
|
257
|
+
public static readonly MENU_SEARCH_UNREF_MORE = "searchUnRefMore"; // 列出引用失效的块的更多菜单
|
|
258
|
+
public static readonly MENU_SEARCH_HISTORY = "search-history"; // 搜索历史菜单
|
|
259
|
+
public static readonly MENU_SEARCH_REPLACE_HISTORY = "search-replace-history"; // 替换历史菜单
|
|
260
|
+
public static readonly MENU_SEARCH_ASSET_HISTORY = "search-asset-history"; // 资源文件搜索历史菜单
|
|
261
|
+
public static readonly MENU_MOVE_PATH_HISTORY = "move-path-history"; // 移动文档窗口搜索历史菜单
|
|
262
|
+
|
|
263
|
+
public static readonly MENU_BACKGROUND_ASSET = "background-asset"; // 资源文件选择器菜单
|
|
264
|
+
public static readonly MENU_AI = "ai"; // 块 AI 菜单
|
|
265
|
+
public static readonly MENU_TAB = "tab"; // 页签右键菜单
|
|
266
|
+
public static readonly MENU_TAB_LIST = "tabList"; // 页签切换菜单
|
|
267
|
+
|
|
268
|
+
public static readonly MENU_INLINE_CONTEXT = "inline-context"; // 文本右键菜单
|
|
269
|
+
public static readonly MENU_INLINE_IMG = "inline-img"; // 图片元素菜单
|
|
270
|
+
public static readonly MENU_INLINE_FILE_ANNOTATION_REF = "inline-file-annotation-ref"; // PDF 标注元素菜单
|
|
271
|
+
public static readonly MENU_INLINE_REF = "inline-block-ref"; // 块引用元素菜单
|
|
272
|
+
public static readonly MENU_INLINE_A = "inline-a"; // 超链接元素菜单
|
|
273
|
+
public static readonly MENU_INLINE_TAG = "inline-tag"; // 行级标签元素菜单
|
|
274
|
+
public static readonly MENU_INLINE_MATH = "inline-math"; // 行级公式元素菜单
|
|
275
|
+
|
|
212
276
|
// timeout
|
|
213
277
|
public static readonly TIMEOUT_OPENDIALOG = 50;
|
|
214
278
|
public static readonly TIMEOUT_DBLCLICK = 190;
|
|
@@ -408,6 +472,7 @@ export abstract class Constants {
|
|
|
408
472
|
goToTabPrev: {default: "⇧⌘[", custom: "⇧⌘["},
|
|
409
473
|
goToEditTabNext: {default: "⌃⇥", custom: "⌃⇥"},
|
|
410
474
|
goToEditTabPrev: {default: "⌃⇧⇥", custom: "⌃⇧⇥"},
|
|
475
|
+
recentClosed: {default: "⇧⌘T", custom: "⇧⌘T"},
|
|
411
476
|
move: {default: "", custom: ""},
|
|
412
477
|
selectOpen1: {default: "", custom: ""},
|
|
413
478
|
toggleDock: {default: "", custom: ""},
|
|
@@ -527,10 +592,10 @@ export abstract class Constants {
|
|
|
527
592
|
checkToggle: {default: "⌘↩", custom: "⌘↩"},
|
|
528
593
|
},
|
|
529
594
|
table: {
|
|
530
|
-
insertRowAbove: {default: "
|
|
531
|
-
insertRowBelow: {default: "
|
|
532
|
-
insertColumnLeft: {default: "
|
|
533
|
-
insertColumnRight: {default: "
|
|
595
|
+
insertRowAbove: {default: "", custom: ""},
|
|
596
|
+
insertRowBelow: {default: "", custom: ""},
|
|
597
|
+
insertColumnLeft: {default: "", custom: ""},
|
|
598
|
+
insertColumnRight: {default: "", custom: ""},
|
|
534
599
|
moveToUp: {default: "⌥⌘T", custom: "⌥⌘T"},
|
|
535
600
|
moveToDown: {default: "⌥⌘B", custom: "⌥⌘B"},
|
|
536
601
|
moveToLeft: {default: "⌥⌘L", custom: "⌥⌘L"},
|
|
@@ -715,7 +780,7 @@ export abstract class Constants {
|
|
|
715
780
|
</svg>`;
|
|
716
781
|
|
|
717
782
|
// assets
|
|
718
|
-
public static readonly SIYUAN_ASSETS_IMAGE: string[] = [".apng", ".ico", ".cur", ".jpg", ".jpe", ".jpeg", ".jfif", ".pjp", ".pjpeg", ".png", ".gif", ".webp", ".bmp", ".svg", ".avif"];
|
|
783
|
+
public static readonly SIYUAN_ASSETS_IMAGE: string[] = [".apng", ".ico", ".cur", ".jpg", ".jpe", ".jpeg", ".jfif", ".pjp", ".pjpeg", ".png", ".gif", ".webp", ".bmp", ".svg", ".avif", ".tiff", ".tif"];
|
|
719
784
|
public static readonly SIYUAN_ASSETS_AUDIO: string[] = [".mp3", ".wav", ".ogg", ".m4a", ".aac", ".flac"];
|
|
720
785
|
public static readonly SIYUAN_ASSETS_VIDEO: string[] = [".mov", ".weba", ".mkv", ".mp4", ".webm"];
|
|
721
786
|
public static readonly SIYUAN_ASSETS_EXTS: string[] = [".pdf"].concat(Constants.SIYUAN_ASSETS_IMAGE).concat(Constants.SIYUAN_ASSETS_AUDIO).concat(Constants.SIYUAN_ASSETS_VIDEO);
|
package/types/index.d.ts
CHANGED
|
@@ -40,7 +40,24 @@ export * as platformUtils from "./protyle/util/compatibility";
|
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
type TDockPosition = "Left" | "Right" | "Bottom"
|
|
43
|
-
|
|
43
|
+
type TAVView = "table" | "gallery" | "kanban"
|
|
44
|
+
type TAVFilterOperator =
|
|
45
|
+
"="
|
|
46
|
+
| "!="
|
|
47
|
+
| ">"
|
|
48
|
+
| ">="
|
|
49
|
+
| "<"
|
|
50
|
+
| "<="
|
|
51
|
+
| "Contains"
|
|
52
|
+
| "Does not contains"
|
|
53
|
+
| "Is empty"
|
|
54
|
+
| "Is not empty"
|
|
55
|
+
| "Starts with"
|
|
56
|
+
| "Ends with"
|
|
57
|
+
| "Is between"
|
|
58
|
+
| "Is relative to today"
|
|
59
|
+
| "Is true"
|
|
60
|
+
| "Is false"
|
|
44
61
|
export type TAVCol =
|
|
45
62
|
"text"
|
|
46
63
|
| "date"
|
|
@@ -61,11 +78,11 @@ export type TAVCol =
|
|
|
61
78
|
| "lineNumber"
|
|
62
79
|
|
|
63
80
|
interface ILayoutOptions {
|
|
64
|
-
direction?: Config.TUILayoutDirection
|
|
65
|
-
size?: string
|
|
66
|
-
resize?: Config.TUILayoutDirection
|
|
67
|
-
type?: Config.TUILayoutType
|
|
68
|
-
element?: HTMLElement
|
|
81
|
+
direction?: Config.TUILayoutDirection;
|
|
82
|
+
size?: string;
|
|
83
|
+
resize?: Config.TUILayoutDirection;
|
|
84
|
+
type?: Config.TUILayoutType;
|
|
85
|
+
element?: HTMLElement;
|
|
69
86
|
}
|
|
70
87
|
|
|
71
88
|
interface IOperationSrcs {
|
|
@@ -75,15 +92,15 @@ interface IOperationSrcs {
|
|
|
75
92
|
}
|
|
76
93
|
|
|
77
94
|
interface INotebook {
|
|
78
|
-
name: string
|
|
79
|
-
id: string
|
|
80
|
-
closed: boolean
|
|
81
|
-
icon: string
|
|
82
|
-
sort: number
|
|
95
|
+
name: string;
|
|
96
|
+
id: string;
|
|
97
|
+
closed: boolean;
|
|
98
|
+
icon: string;
|
|
99
|
+
sort: number;
|
|
83
100
|
dueFlashcardCount?: string;
|
|
84
101
|
newFlashcardCount?: string;
|
|
85
102
|
flashcardCount?: string;
|
|
86
|
-
sortMode: number
|
|
103
|
+
sortMode: number;
|
|
87
104
|
}
|
|
88
105
|
|
|
89
106
|
interface IEmojiItem {
|
|
@@ -122,6 +139,230 @@ interface IBackStack {
|
|
|
122
139
|
zoomId?: string
|
|
123
140
|
}
|
|
124
141
|
|
|
142
|
+
export interface IAV {
|
|
143
|
+
id: string;
|
|
144
|
+
name: string;
|
|
145
|
+
view: IAVTable | IAVGallery;
|
|
146
|
+
viewID: string;
|
|
147
|
+
viewType: TAVView;
|
|
148
|
+
views: IAVView[];
|
|
149
|
+
isMirror?: boolean;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
interface IAVView {
|
|
153
|
+
name: string;
|
|
154
|
+
desc: string;
|
|
155
|
+
id: string;
|
|
156
|
+
type: TAVView;
|
|
157
|
+
icon: string;
|
|
158
|
+
hideAttrViewName: boolean;
|
|
159
|
+
pageSize: number;
|
|
160
|
+
showIcon: boolean;
|
|
161
|
+
wrapField: boolean;
|
|
162
|
+
groupHidden?: number, // 0:显示,1:空白隐藏,2:手动隐藏
|
|
163
|
+
groupFolded?: boolean,
|
|
164
|
+
filters: IAVFilter[],
|
|
165
|
+
sorts: IAVSort[],
|
|
166
|
+
groups: IAVView[]
|
|
167
|
+
group: IAVGroup
|
|
168
|
+
groupKey: IAVColumn
|
|
169
|
+
groupValue: IAVCellValue
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
interface IAVTable extends IAVView {
|
|
173
|
+
columns: IAVColumn[],
|
|
174
|
+
rows: IAVRow[],
|
|
175
|
+
rowCount: number,
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
interface IAVGallery extends IAVView {
|
|
179
|
+
coverFrom: number; // 0:无,1:内容图,2:资源字段,3:内容块
|
|
180
|
+
coverFromAssetKeyID?: string;
|
|
181
|
+
cardSize: number; // 0:小卡片,1:中卡片,2:大卡片
|
|
182
|
+
cardAspectRatio: number;
|
|
183
|
+
displayFieldName: boolean;
|
|
184
|
+
fitImage: boolean;
|
|
185
|
+
cards: IAVGalleryItem[],
|
|
186
|
+
desc: string
|
|
187
|
+
fields: IAVColumn[]
|
|
188
|
+
cardCount: number,
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
interface IAVFilter {
|
|
192
|
+
column: string,
|
|
193
|
+
operator: TAVFilterOperator,
|
|
194
|
+
quantifier?: string,
|
|
195
|
+
value: IAVCellValue,
|
|
196
|
+
relativeDate?: IAVRelativeDate
|
|
197
|
+
relativeDate2?: IAVRelativeDate
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
interface IAVRelativeDate {
|
|
201
|
+
count: number; // 数量
|
|
202
|
+
unit: number; // 单位:0: 天、1: 周、2: 月、3: 年
|
|
203
|
+
direction: number; // 方向:-1: 前、0: 现在、1: 后
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
interface IAVGroup {
|
|
207
|
+
field: string,
|
|
208
|
+
method?: number // 0: 按值分组、1: 按数字范围分组、2: 按相对日期分组、3: 按天日期分组、4: 按周日期分组、5: 按月日期分组、6: 按年日期分组
|
|
209
|
+
range?: {
|
|
210
|
+
numStart: number // 数字范围起始值 0
|
|
211
|
+
numEnd: number // 数字范围结束值 1000
|
|
212
|
+
numStep: number // 数字范围步长 100
|
|
213
|
+
}
|
|
214
|
+
hideEmpty?: boolean
|
|
215
|
+
order?: number // 升序: 0(默认), 降序: 1, 手动排序: 2, 按选项排序: 3
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
interface IAVSort {
|
|
219
|
+
column: string,
|
|
220
|
+
order: "ASC" | "DESC"
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
interface IAVColumn {
|
|
224
|
+
width: string,
|
|
225
|
+
icon: string,
|
|
226
|
+
id: string,
|
|
227
|
+
name: string,
|
|
228
|
+
desc: string,
|
|
229
|
+
wrap: boolean,
|
|
230
|
+
pin: boolean,
|
|
231
|
+
hidden: boolean,
|
|
232
|
+
type: TAVCol,
|
|
233
|
+
numberFormat: string,
|
|
234
|
+
template: string,
|
|
235
|
+
calc: IAVCalc,
|
|
236
|
+
updated?: {
|
|
237
|
+
includeTime: boolean
|
|
238
|
+
}
|
|
239
|
+
created?: {
|
|
240
|
+
includeTime: boolean
|
|
241
|
+
}
|
|
242
|
+
date?: {
|
|
243
|
+
autoFillNow: boolean,
|
|
244
|
+
fillSpecificTime: boolean,
|
|
245
|
+
}
|
|
246
|
+
// 选项列表
|
|
247
|
+
options?: {
|
|
248
|
+
name: string,
|
|
249
|
+
color: string,
|
|
250
|
+
desc?: string,
|
|
251
|
+
}[],
|
|
252
|
+
relation?: IAVColumnRelation,
|
|
253
|
+
rollup?: IAVCellRollupValue
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
interface IAVRow {
|
|
257
|
+
id: string,
|
|
258
|
+
cells: IAVCell[]
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
interface IAVGalleryItem {
|
|
262
|
+
coverURL?: string;
|
|
263
|
+
coverContent?: string;
|
|
264
|
+
id: string;
|
|
265
|
+
values: IAVCell[];
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
interface IAVCell {
|
|
269
|
+
id: string,
|
|
270
|
+
color: string,
|
|
271
|
+
bgColor: string,
|
|
272
|
+
value: IAVCellValue,
|
|
273
|
+
valueType: TAVCol,
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
interface IAVCellValue {
|
|
277
|
+
keyID?: string,
|
|
278
|
+
id?: string,
|
|
279
|
+
blockID?: string // 为 row id
|
|
280
|
+
type: TAVCol,
|
|
281
|
+
isDetached?: boolean,
|
|
282
|
+
text?: {
|
|
283
|
+
content: string
|
|
284
|
+
},
|
|
285
|
+
number?: {
|
|
286
|
+
content?: number,
|
|
287
|
+
isNotEmpty: boolean,
|
|
288
|
+
format?: string,
|
|
289
|
+
formattedContent?: string
|
|
290
|
+
},
|
|
291
|
+
mSelect?: IAVCellSelectValue[]
|
|
292
|
+
mAsset?: IAVCellAssetValue[]
|
|
293
|
+
block?: {
|
|
294
|
+
content: string,
|
|
295
|
+
id?: string,
|
|
296
|
+
icon?: string
|
|
297
|
+
}
|
|
298
|
+
url?: {
|
|
299
|
+
content: string
|
|
300
|
+
}
|
|
301
|
+
phone?: {
|
|
302
|
+
content: string
|
|
303
|
+
}
|
|
304
|
+
email?: {
|
|
305
|
+
content: string
|
|
306
|
+
}
|
|
307
|
+
template?: {
|
|
308
|
+
content: string
|
|
309
|
+
},
|
|
310
|
+
checkbox?: {
|
|
311
|
+
checked: boolean,
|
|
312
|
+
content?: string, // gallery 中显示 https://github.com/siyuan-note/siyuan/issues/15389
|
|
313
|
+
}
|
|
314
|
+
relation?: IAVCellRelationValue
|
|
315
|
+
rollup?: {
|
|
316
|
+
contents?: IAVCellValue[]
|
|
317
|
+
}
|
|
318
|
+
date?: IAVCellDateValue
|
|
319
|
+
created?: IAVCellDateValue
|
|
320
|
+
updated?: IAVCellDateValue
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
interface IAVCellRelationValue {
|
|
324
|
+
blockIDs: string[];
|
|
325
|
+
contents?: IAVCellValue[];
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
interface IAVCellDateValue {
|
|
329
|
+
content?: number,
|
|
330
|
+
isNotEmpty?: boolean
|
|
331
|
+
content2?: number,
|
|
332
|
+
isNotEmpty2?: boolean
|
|
333
|
+
hasEndDate?: boolean
|
|
334
|
+
formattedContent?: string,
|
|
335
|
+
isNotTime?: boolean // 默认 true
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
interface IAVCellSelectValue {
|
|
339
|
+
content: string,
|
|
340
|
+
color: string
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
interface IAVCellAssetValue {
|
|
344
|
+
content: string,
|
|
345
|
+
name: string,
|
|
346
|
+
type: "file" | "image"
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
interface IAVColumnRelation {
|
|
350
|
+
avID?: string;
|
|
351
|
+
backKeyID?: string;
|
|
352
|
+
isTwoWay?: boolean;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
interface IAVCellRollupValue {
|
|
356
|
+
relationKeyID?: string; // 关联列 ID
|
|
357
|
+
keyID?: string;
|
|
358
|
+
calc?: IAVCalc;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
interface IAVCalc {
|
|
362
|
+
operator?: string,
|
|
363
|
+
result?: IAVCellValue
|
|
364
|
+
}
|
|
365
|
+
|
|
125
366
|
export interface IOperation {
|
|
126
367
|
action: TOperation, // move, delete 不需要传 data
|
|
127
368
|
id?: string,
|
|
@@ -450,7 +691,7 @@ export declare class subMenu {
|
|
|
450
691
|
|
|
451
692
|
export declare class App {
|
|
452
693
|
plugins: Plugin[];
|
|
453
|
-
appId: string
|
|
694
|
+
appId: string;
|
|
454
695
|
}
|
|
455
696
|
|
|
456
697
|
export declare class Menus {
|