siyuan 1.0.3 → 1.0.5
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 -0
- package/package.json +1 -1
- package/siyuan.d.ts +94 -283
- 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/config.d.ts
CHANGED
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import {TEditorMode} from "./protyle";
|
|
18
|
+
import {TEditorMode, TProtyleAction} from "./protyle";
|
|
19
|
+
import {TDock} from "../siyuan";
|
|
19
20
|
|
|
20
21
|
export namespace Config {
|
|
21
22
|
|
|
@@ -65,6 +66,11 @@ export namespace Config {
|
|
|
65
66
|
* Whether to open the user guide after startup
|
|
66
67
|
*/
|
|
67
68
|
openHelp: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Publishing service
|
|
71
|
+
* 发布服务
|
|
72
|
+
*/
|
|
73
|
+
publish: IPublish;
|
|
68
74
|
/**
|
|
69
75
|
* Whether it is running in read-only mode
|
|
70
76
|
* 全局只读
|
|
@@ -265,7 +271,18 @@ export namespace Config {
|
|
|
265
271
|
* User interface language
|
|
266
272
|
* Same as {@link IAppearance.lang}
|
|
267
273
|
*/
|
|
268
|
-
export type TLang =
|
|
274
|
+
export type TLang =
|
|
275
|
+
"en_US"
|
|
276
|
+
| "es_ES"
|
|
277
|
+
| "fr_FR"
|
|
278
|
+
| "zh_CHT"
|
|
279
|
+
| "zh_CN"
|
|
280
|
+
| "ja_JP"
|
|
281
|
+
| "it_IT"
|
|
282
|
+
| "de_DE"
|
|
283
|
+
| "he_IL"
|
|
284
|
+
| "ru_RU"
|
|
285
|
+
| "pl_PL";
|
|
269
286
|
|
|
270
287
|
/**
|
|
271
288
|
* SiYuan bazaar related configuration
|
|
@@ -285,6 +302,14 @@ export namespace Config {
|
|
|
285
302
|
* SiYuan editor markdown related configuration
|
|
286
303
|
*/
|
|
287
304
|
interface IMarkdown {
|
|
305
|
+
/**
|
|
306
|
+
* Whether to enable the inline asterisk
|
|
307
|
+
*/
|
|
308
|
+
inlineAsterisk: boolean;
|
|
309
|
+
/**
|
|
310
|
+
* Whether to enable the inline underscore
|
|
311
|
+
*/
|
|
312
|
+
inlineUnderscore: boolean;
|
|
288
313
|
/**
|
|
289
314
|
* Whether to enable the inline superscript
|
|
290
315
|
*/
|
|
@@ -301,6 +326,10 @@ export namespace Config {
|
|
|
301
326
|
* Whether to enable the inline math
|
|
302
327
|
*/
|
|
303
328
|
inlineMath: boolean;
|
|
329
|
+
/**
|
|
330
|
+
* Whether to enable the inline strikethrough
|
|
331
|
+
*/
|
|
332
|
+
inlineStrikethrough: boolean;
|
|
304
333
|
}
|
|
305
334
|
|
|
306
335
|
/**
|
|
@@ -326,6 +355,10 @@ export namespace Config {
|
|
|
326
355
|
* The default number of backlinks to mention
|
|
327
356
|
*/
|
|
328
357
|
backmentionExpandCount: number;
|
|
358
|
+
/**
|
|
359
|
+
* Whether the backlink contains children
|
|
360
|
+
*/
|
|
361
|
+
backlinkContainChildren: boolean;
|
|
329
362
|
/**
|
|
330
363
|
* The maximum length of the dynamic anchor text for block references
|
|
331
364
|
*/
|
|
@@ -1032,6 +1065,56 @@ export namespace Config {
|
|
|
1032
1065
|
*/
|
|
1033
1066
|
export type TLogLevel = "off" | "trace" | "debug" | "info" | "warn" | "error" | "fatal";
|
|
1034
1067
|
|
|
1068
|
+
/**
|
|
1069
|
+
* Publishing service
|
|
1070
|
+
*/
|
|
1071
|
+
export interface IPublish {
|
|
1072
|
+
/**
|
|
1073
|
+
* Whether to open the publishing service
|
|
1074
|
+
*/
|
|
1075
|
+
enable: boolean;
|
|
1076
|
+
/**
|
|
1077
|
+
* The basic authentication settings of publishing service
|
|
1078
|
+
*/
|
|
1079
|
+
auth: IPublishAuth;
|
|
1080
|
+
/**
|
|
1081
|
+
* Port on which the publishing service listens
|
|
1082
|
+
*/
|
|
1083
|
+
port: number;
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
/**
|
|
1087
|
+
* Publishing service authentication settings
|
|
1088
|
+
*/
|
|
1089
|
+
export interface IPublishAuth {
|
|
1090
|
+
/**
|
|
1091
|
+
* Whether to enable basic authentication for publishing services
|
|
1092
|
+
*/
|
|
1093
|
+
enable: boolean;
|
|
1094
|
+
/**
|
|
1095
|
+
* List of basic verified accounts
|
|
1096
|
+
*/
|
|
1097
|
+
accounts: IPublishAuthAccount[];
|
|
1098
|
+
}
|
|
1099
|
+
|
|
1100
|
+
/**
|
|
1101
|
+
* Basic authentication account
|
|
1102
|
+
*/
|
|
1103
|
+
export interface IPublishAuthAccount {
|
|
1104
|
+
/**
|
|
1105
|
+
* Account username
|
|
1106
|
+
*/
|
|
1107
|
+
username: string;
|
|
1108
|
+
/**
|
|
1109
|
+
* Account password
|
|
1110
|
+
*/
|
|
1111
|
+
password: string;
|
|
1112
|
+
/**
|
|
1113
|
+
* The memo text of the account
|
|
1114
|
+
*/
|
|
1115
|
+
memo: string;
|
|
1116
|
+
}
|
|
1117
|
+
|
|
1035
1118
|
/**
|
|
1036
1119
|
* Snapshot repository related configuration
|
|
1037
1120
|
*/
|
|
@@ -1320,6 +1403,10 @@ export namespace Config {
|
|
|
1320
1403
|
* Timeout (unit: seconds)
|
|
1321
1404
|
*/
|
|
1322
1405
|
timeout: number;
|
|
1406
|
+
/**
|
|
1407
|
+
* Concurrent requests.
|
|
1408
|
+
*/
|
|
1409
|
+
concurrentReqs: number;
|
|
1323
1410
|
}
|
|
1324
1411
|
|
|
1325
1412
|
/**
|
|
@@ -1342,6 +1429,10 @@ export namespace Config {
|
|
|
1342
1429
|
* Timeout (unit: seconds)
|
|
1343
1430
|
*/
|
|
1344
1431
|
timeout: number;
|
|
1432
|
+
/**
|
|
1433
|
+
* Concurrent requests.
|
|
1434
|
+
*/
|
|
1435
|
+
concurrentReqs: number;
|
|
1345
1436
|
/**
|
|
1346
1437
|
* Username
|
|
1347
1438
|
*/
|
|
@@ -1569,7 +1660,7 @@ export namespace Config {
|
|
|
1569
1660
|
/**
|
|
1570
1661
|
* Tab type
|
|
1571
1662
|
*/
|
|
1572
|
-
type: string;
|
|
1663
|
+
type: TDock | string;
|
|
1573
1664
|
}
|
|
1574
1665
|
|
|
1575
1666
|
/**
|
|
@@ -1705,6 +1796,10 @@ export namespace Config {
|
|
|
1705
1796
|
* Tab title
|
|
1706
1797
|
*/
|
|
1707
1798
|
title?: string;
|
|
1799
|
+
/**
|
|
1800
|
+
* Tab recent view time
|
|
1801
|
+
*/
|
|
1802
|
+
activeTime?: string;
|
|
1708
1803
|
}
|
|
1709
1804
|
|
|
1710
1805
|
/**
|
|
@@ -1794,7 +1889,7 @@ export namespace Config {
|
|
|
1794
1889
|
/**
|
|
1795
1890
|
* (Editor) Actions to be performed after the tab is loaded
|
|
1796
1891
|
*/
|
|
1797
|
-
action:
|
|
1892
|
+
action: TProtyleAction;
|
|
1798
1893
|
/**
|
|
1799
1894
|
* (Editor) Block ID
|
|
1800
1895
|
*/
|
|
@@ -1926,20 +2021,20 @@ export namespace Config {
|
|
|
1926
2021
|
* - `0`: No grouping
|
|
1927
2022
|
* - `1`: Group by document
|
|
1928
2023
|
*/
|
|
1929
|
-
group
|
|
1930
|
-
hasReplace
|
|
2024
|
+
group?: number;
|
|
2025
|
+
hasReplace?: boolean;
|
|
1931
2026
|
/**
|
|
1932
2027
|
* Readable path list
|
|
1933
2028
|
*/
|
|
1934
|
-
hPath
|
|
2029
|
+
hPath?: string;
|
|
1935
2030
|
/**
|
|
1936
2031
|
* Search in the specified paths
|
|
1937
2032
|
*/
|
|
1938
|
-
idPath
|
|
2033
|
+
idPath?: string[];
|
|
1939
2034
|
/**
|
|
1940
2035
|
* Search content
|
|
1941
2036
|
*/
|
|
1942
|
-
k
|
|
2037
|
+
k?: string;
|
|
1943
2038
|
/**
|
|
1944
2039
|
* Search scheme
|
|
1945
2040
|
* - `0`: Keyword (default)
|
|
@@ -1948,7 +2043,7 @@ export namespace Config {
|
|
|
1948
2043
|
* - `3`: Regular expression
|
|
1949
2044
|
* @default 0
|
|
1950
2045
|
*/
|
|
1951
|
-
method
|
|
2046
|
+
method?: number;
|
|
1952
2047
|
/**
|
|
1953
2048
|
* Custom name of the query condition group
|
|
1954
2049
|
*/
|
|
@@ -1956,16 +2051,17 @@ export namespace Config {
|
|
|
1956
2051
|
/**
|
|
1957
2052
|
* Current page number
|
|
1958
2053
|
*/
|
|
1959
|
-
page
|
|
2054
|
+
page?: number;
|
|
1960
2055
|
/**
|
|
1961
2056
|
* Replace content
|
|
1962
2057
|
*/
|
|
1963
|
-
r
|
|
2058
|
+
r?: string;
|
|
1964
2059
|
/**
|
|
1965
2060
|
* Whether to clear the search box after removing the currently used query condition group
|
|
2061
|
+
* 移除后需记录搜索内容 https://github.com/siyuan-note/siyuan/issues/7745
|
|
1966
2062
|
*/
|
|
1967
2063
|
removed?: boolean;
|
|
1968
|
-
replaceTypes
|
|
2064
|
+
replaceTypes?: IUILayoutTabSearchConfigReplaceTypes;
|
|
1969
2065
|
/**
|
|
1970
2066
|
* Search result sorting scheme
|
|
1971
2067
|
* - `0`: Block type (default)
|
|
@@ -1978,8 +2074,8 @@ export namespace Config {
|
|
|
1978
2074
|
* - `7`: Descending by relevance
|
|
1979
2075
|
* @default 0
|
|
1980
2076
|
*/
|
|
1981
|
-
sort
|
|
1982
|
-
types
|
|
2077
|
+
sort?: number;
|
|
2078
|
+
types?: IUILayoutTabSearchConfigTypes;
|
|
1983
2079
|
}
|
|
1984
2080
|
|
|
1985
2081
|
/**
|
|
@@ -2051,6 +2147,11 @@ export namespace Config {
|
|
|
2051
2147
|
* @default true
|
|
2052
2148
|
*/
|
|
2053
2149
|
inlineMemo?: boolean;
|
|
2150
|
+
/**
|
|
2151
|
+
* Replace block refs
|
|
2152
|
+
* @default false
|
|
2153
|
+
*/
|
|
2154
|
+
blockRef?: boolean;
|
|
2054
2155
|
/**
|
|
2055
2156
|
* Replace kdb elements
|
|
2056
2157
|
* @default true
|