@sliprail/sdk 0.1.4 → 0.1.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/lib/index.d.ts +9 -8
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -52,18 +52,15 @@ 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
|
-
|
|
56
|
-
};
|
|
57
|
-
export type LoadSubShortcutsContext = {
|
|
58
|
-
signal: AbortSignal;
|
|
55
|
+
delete: (key: string) => Promise<void>;
|
|
59
56
|
};
|
|
60
57
|
export type LivePreviewContent = {
|
|
61
58
|
content: string;
|
|
62
59
|
type?: 'info' | 'warn' | 'error' | 'hint';
|
|
63
60
|
};
|
|
64
|
-
export type ShortcutContext = {
|
|
61
|
+
export type ShortcutContext = SliprailMain & {
|
|
65
62
|
parameter: any;
|
|
66
|
-
getSettings: () => Promise<Record<string, unknown>>;
|
|
63
|
+
getSettings: (keys?: string[]) => Promise<Record<string, unknown>>;
|
|
67
64
|
createWindow: (options: WindowOptions) => WindowControl;
|
|
68
65
|
createStorage: () => KVStorage;
|
|
69
66
|
getWindows: () => WindowControl[];
|
|
@@ -72,6 +69,9 @@ export type ShortcutContext = {
|
|
|
72
69
|
on: (event: 'settingsChange', callback: () => unknown) => void;
|
|
73
70
|
};
|
|
74
71
|
};
|
|
72
|
+
export type LoadSubShortcutsContext = ShortcutContext & {
|
|
73
|
+
signal: AbortSignal;
|
|
74
|
+
};
|
|
75
75
|
export type Shortcut = {
|
|
76
76
|
id: string;
|
|
77
77
|
displayName: string;
|
|
@@ -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;
|
|
@@ -210,6 +211,7 @@ export type SliprailMain = {
|
|
|
210
211
|
showAlert: (message: string) => void;
|
|
211
212
|
copyToClipboard: (content: string) => void;
|
|
212
213
|
pasteFromClipboard: () => string;
|
|
214
|
+
pasteFilesFromClipboard: () => string[];
|
|
213
215
|
getSystemWindows: () => Promise<WindowInfo[]>;
|
|
214
216
|
captureAllDisplays: () => Promise<Screenshot[]>;
|
|
215
217
|
createWindowChannel: () => WindowChannel;
|
|
@@ -242,7 +244,6 @@ export type SliprailRenderer = {
|
|
|
242
244
|
debugLog: (...logs: unknown[]) => void;
|
|
243
245
|
};
|
|
244
246
|
declare global {
|
|
245
|
-
var
|
|
246
|
-
var sliprailRenderer: SliprailRenderer;
|
|
247
|
+
var sliprail: SliprailRenderer;
|
|
247
248
|
}
|
|
248
249
|
export {};
|