@sliprail/sdk 0.1.5 → 0.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/lib/index.d.ts +18 -6
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -52,7 +52,7 @@ export type KVStorage = {
|
|
|
52
52
|
set: (key: string, value: unknown) => Promise<void>;
|
|
53
53
|
get: (key: string) => Promise<unknown | undefined>;
|
|
54
54
|
has: (key: string) => Promise<boolean>;
|
|
55
|
-
|
|
55
|
+
delete: (key: string) => Promise<void>;
|
|
56
56
|
};
|
|
57
57
|
export type LivePreviewContent = {
|
|
58
58
|
content: string;
|
|
@@ -60,7 +60,7 @@ export type LivePreviewContent = {
|
|
|
60
60
|
};
|
|
61
61
|
export type ShortcutContext = SliprailMain & {
|
|
62
62
|
parameter: any;
|
|
63
|
-
getSettings: () => Promise<Record<string, unknown>>;
|
|
63
|
+
getSettings: (keys?: string[]) => Promise<Record<string, unknown>>;
|
|
64
64
|
createWindow: (options: WindowOptions) => WindowControl;
|
|
65
65
|
createStorage: () => KVStorage;
|
|
66
66
|
getWindows: () => WindowControl[];
|
|
@@ -98,6 +98,7 @@ export type ExtensionInfo = {
|
|
|
98
98
|
settingDefinitions?: SettingDefinition[];
|
|
99
99
|
hasSettings: boolean;
|
|
100
100
|
hasStatus: boolean;
|
|
101
|
+
limited: boolean;
|
|
101
102
|
};
|
|
102
103
|
type CommonSettingOptions = {
|
|
103
104
|
id: string;
|
|
@@ -195,12 +196,12 @@ export type SliprailMain = {
|
|
|
195
196
|
openUrl: (url: string) => void;
|
|
196
197
|
openPath: (path: string) => void;
|
|
197
198
|
openFileLocation: (path: string) => void;
|
|
198
|
-
copyFilesToClipboard: (paths: string[]) => void;
|
|
199
199
|
deleteFiles: (paths: string[]) => void;
|
|
200
200
|
saveTextFile: (options: {
|
|
201
201
|
filename: string;
|
|
202
202
|
content: string;
|
|
203
203
|
}) => Promise<void>;
|
|
204
|
+
writeFilesToClipboard: (paths: string[]) => void;
|
|
204
205
|
cutFilesToClipboard: (paths: string[]) => void;
|
|
205
206
|
selectFiles: (options?: SelectFilesOptions) => Promise<string[]>;
|
|
206
207
|
showNotification: (options: {
|
|
@@ -208,8 +209,19 @@ export type SliprailMain = {
|
|
|
208
209
|
message: string;
|
|
209
210
|
}) => any;
|
|
210
211
|
showAlert: (message: string) => void;
|
|
211
|
-
|
|
212
|
-
|
|
212
|
+
writeTextToClipboard: (content: string) => void;
|
|
213
|
+
writeHTMLToClipboard: (content: {
|
|
214
|
+
html: string;
|
|
215
|
+
text: string;
|
|
216
|
+
}) => void;
|
|
217
|
+
writeRTFToClipboard: (content: {
|
|
218
|
+
rtf: string;
|
|
219
|
+
text: string;
|
|
220
|
+
}) => void;
|
|
221
|
+
readTextFromClipboard: () => string;
|
|
222
|
+
readHTMLFromClipboard: () => string;
|
|
223
|
+
readRTFFromClipboard: () => string;
|
|
224
|
+
readFilesFromClipboard: () => string[];
|
|
213
225
|
getSystemWindows: () => Promise<WindowInfo[]>;
|
|
214
226
|
captureAllDisplays: () => Promise<Screenshot[]>;
|
|
215
227
|
createWindowChannel: () => WindowChannel;
|
|
@@ -228,7 +240,7 @@ export type SliprailRenderer = {
|
|
|
228
240
|
openUrl: (url: string) => void;
|
|
229
241
|
openPath: (path: string) => void;
|
|
230
242
|
openFileLocation: (path: string) => void;
|
|
231
|
-
|
|
243
|
+
writeFilesToClipboard: (paths: string[]) => void;
|
|
232
244
|
cutFilesToClipboard: (paths: string[]) => void;
|
|
233
245
|
deleteFiles: (paths: string[]) => void;
|
|
234
246
|
selectDirectory: () => Promise<string | undefined>;
|