@sliprail/sdk 0.1.3 → 0.1.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/lib/index.d.ts +13 -7
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -27,9 +27,16 @@ export type WindowOptions = {
|
|
|
27
27
|
height?: number;
|
|
28
28
|
maximize?: boolean;
|
|
29
29
|
alwaysOnTop?: boolean;
|
|
30
|
+
resizable?: boolean;
|
|
31
|
+
transparent?: boolean;
|
|
32
|
+
skipTaskbar?: boolean;
|
|
33
|
+
thickFrame?: boolean;
|
|
34
|
+
fullscreen?: boolean;
|
|
35
|
+
fullscreenable?: boolean;
|
|
36
|
+
frame?: boolean;
|
|
37
|
+
hasShadow?: boolean;
|
|
30
38
|
parameters?: Record<string, unknown>;
|
|
31
39
|
channel?: WindowChannel;
|
|
32
|
-
resizable?: boolean;
|
|
33
40
|
onClose?: () => void;
|
|
34
41
|
};
|
|
35
42
|
export type WindowControl = {
|
|
@@ -47,14 +54,11 @@ export type KVStorage = {
|
|
|
47
54
|
has: (key: string) => Promise<boolean>;
|
|
48
55
|
remove: (key: string) => Promise<void>;
|
|
49
56
|
};
|
|
50
|
-
export type LoadSubShortcutsContext = {
|
|
51
|
-
signal: AbortSignal;
|
|
52
|
-
};
|
|
53
57
|
export type LivePreviewContent = {
|
|
54
58
|
content: string;
|
|
55
59
|
type?: 'info' | 'warn' | 'error' | 'hint';
|
|
56
60
|
};
|
|
57
|
-
export type ShortcutContext = {
|
|
61
|
+
export type ShortcutContext = SliprailMain & {
|
|
58
62
|
parameter: any;
|
|
59
63
|
getSettings: () => Promise<Record<string, unknown>>;
|
|
60
64
|
createWindow: (options: WindowOptions) => WindowControl;
|
|
@@ -65,6 +69,9 @@ export type ShortcutContext = {
|
|
|
65
69
|
on: (event: 'settingsChange', callback: () => unknown) => void;
|
|
66
70
|
};
|
|
67
71
|
};
|
|
72
|
+
export type LoadSubShortcutsContext = ShortcutContext & {
|
|
73
|
+
signal: AbortSignal;
|
|
74
|
+
};
|
|
68
75
|
export type Shortcut = {
|
|
69
76
|
id: string;
|
|
70
77
|
displayName: string;
|
|
@@ -235,7 +242,6 @@ export type SliprailRenderer = {
|
|
|
235
242
|
debugLog: (...logs: unknown[]) => void;
|
|
236
243
|
};
|
|
237
244
|
declare global {
|
|
238
|
-
var
|
|
239
|
-
var sliprailRenderer: SliprailRenderer;
|
|
245
|
+
var sliprail: SliprailRenderer;
|
|
240
246
|
}
|
|
241
247
|
export {};
|