@sliprail/sdk 0.1.4 → 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.
Files changed (2) hide show
  1. package/lib/index.d.ts +5 -6
  2. package/package.json +1 -1
package/lib/index.d.ts CHANGED
@@ -54,14 +54,11 @@ export type KVStorage = {
54
54
  has: (key: string) => Promise<boolean>;
55
55
  remove: (key: string) => Promise<void>;
56
56
  };
57
- export type LoadSubShortcutsContext = {
58
- signal: AbortSignal;
59
- };
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
63
  getSettings: () => Promise<Record<string, unknown>>;
67
64
  createWindow: (options: WindowOptions) => 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;
@@ -242,7 +242,6 @@ export type SliprailRenderer = {
242
242
  debugLog: (...logs: unknown[]) => void;
243
243
  };
244
244
  declare global {
245
- var sliprailMain: SliprailMain;
246
- var sliprailRenderer: SliprailRenderer;
245
+ var sliprail: SliprailRenderer;
247
246
  }
248
247
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sliprail/sdk",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "lib/index.mjs",