@sliprail/sdk 0.1.13 → 0.1.14
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/lib/index.d.ts +12 -6
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -93,14 +93,20 @@ export type ShortcutPreview = {
|
|
|
93
93
|
style?: CSSProperties;
|
|
94
94
|
};
|
|
95
95
|
export type ShortcutContextMenu = {
|
|
96
|
-
displayName:
|
|
96
|
+
displayName: LocalizedString;
|
|
97
97
|
executeShortcutId: string;
|
|
98
98
|
};
|
|
99
|
+
export type SupportedLanguage = 'en' | 'zh-hans';
|
|
100
|
+
export type LocalizedString = string | ({
|
|
101
|
+
en: string;
|
|
102
|
+
} & {
|
|
103
|
+
[key in Exclude<SupportedLanguage, 'en'>]?: string;
|
|
104
|
+
});
|
|
99
105
|
export type Shortcut = {
|
|
100
106
|
id: string;
|
|
101
|
-
displayName:
|
|
107
|
+
displayName: LocalizedString;
|
|
102
108
|
hidden?: boolean;
|
|
103
|
-
description?:
|
|
109
|
+
description?: LocalizedString;
|
|
104
110
|
icon?: string | {
|
|
105
111
|
src: string;
|
|
106
112
|
template?: boolean;
|
|
@@ -123,9 +129,9 @@ export type ExtensionSettingValue = undefined | boolean | string | string[] | Ex
|
|
|
123
129
|
export type ExtensionSettings = Record<string, ExtensionSettingValue>;
|
|
124
130
|
type CommonSettingOptions = {
|
|
125
131
|
id: string;
|
|
126
|
-
displayName:
|
|
132
|
+
displayName: LocalizedString;
|
|
127
133
|
prependDescription?: string | string[];
|
|
128
|
-
description?:
|
|
134
|
+
description?: LocalizedString;
|
|
129
135
|
defaultValue?: unknown;
|
|
130
136
|
refreshOnOtherChange?: boolean | string | string[];
|
|
131
137
|
showRefreshOnError?: boolean;
|
|
@@ -197,7 +203,7 @@ export type SettingDefinition = BooleanSetting | NumberSetting | StringSetting |
|
|
|
197
203
|
*/
|
|
198
204
|
export type Extension = {
|
|
199
205
|
id?: string;
|
|
200
|
-
name?:
|
|
206
|
+
name?: LocalizedString;
|
|
201
207
|
role?: string;
|
|
202
208
|
icon?: string | {
|
|
203
209
|
src: string;
|