@sliprail/sdk 0.1.18 → 0.1.20

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 +3 -2
  2. package/package.json +2 -2
package/lib/index.d.ts CHANGED
@@ -77,6 +77,7 @@ export type ShortcutContext = SliprailMain & {
77
77
  createStorage: () => KVStorage;
78
78
  getWindows: (options?: GetWindowsOptions) => WindowControl[];
79
79
  channel: WindowChannel | undefined;
80
+ toPreviewUrl: (filePath: string) => string;
80
81
  events: {
81
82
  on: (event: 'settingsChange', callback: () => unknown) => void;
82
83
  };
@@ -89,6 +90,8 @@ export type ShortcutPreview = {
89
90
  buffer: unknown;
90
91
  mimeType: string;
91
92
  };
93
+ } | {
94
+ url: string;
92
95
  } | {
93
96
  text: string;
94
97
  style?: CSSProperties;
@@ -203,8 +206,6 @@ export type SettingDefinition = BooleanSetting | NumberSetting | StringSetting |
203
206
  * @public
204
207
  */
205
208
  export type Extension = {
206
- id?: string;
207
- displayName?: LocalizedString;
208
209
  icon?: string | {
209
210
  src: string;
210
211
  template?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sliprail/sdk",
3
- "version": "0.1.18",
3
+ "version": "0.1.20",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "lib/index.mjs",
@@ -9,7 +9,7 @@
9
9
  ],
10
10
  "types": "lib/index.d.ts",
11
11
  "dependencies": {
12
- "@types/react": "^18.3.24"
12
+ "@types/react": "^18.3.27"
13
13
  },
14
14
  "devDependencies": {
15
15
  "@types/node": "^20.19.27",