@sliprail/sdk 0.1.11 → 0.1.12
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 +11 -0
- package/package.json +12 -3
package/lib/index.d.ts
CHANGED
|
@@ -59,6 +59,9 @@ export type LivePreviewContent = {
|
|
|
59
59
|
content: string;
|
|
60
60
|
type?: 'info' | 'warn' | 'error' | 'hint';
|
|
61
61
|
};
|
|
62
|
+
/**
|
|
63
|
+
* @public
|
|
64
|
+
*/
|
|
62
65
|
export type ShortcutContext = SliprailMain & {
|
|
63
66
|
parameter: any;
|
|
64
67
|
subShortcutId: string;
|
|
@@ -184,6 +187,9 @@ type StatusWarning = {
|
|
|
184
187
|
};
|
|
185
188
|
export type ExtensionStatus = StatusOk | StatusLoading | StatusError | StatusWarning;
|
|
186
189
|
export type SettingDefinition = BooleanSetting | NumberSetting | StringSetting | ArrayStringSetting | ArrayObjectSetting;
|
|
190
|
+
/**
|
|
191
|
+
* @public
|
|
192
|
+
*/
|
|
187
193
|
export type Extension = {
|
|
188
194
|
id?: string;
|
|
189
195
|
name?: string;
|
|
@@ -222,6 +228,7 @@ export type SliprailMain = {
|
|
|
222
228
|
message: string;
|
|
223
229
|
}) => any;
|
|
224
230
|
showAlert: (message: string) => void;
|
|
231
|
+
showConfirm: (message: string) => Promise<boolean>;
|
|
225
232
|
writeTextToClipboard: (content: string) => void;
|
|
226
233
|
writeHTMLToClipboard: (content: {
|
|
227
234
|
html: string;
|
|
@@ -268,6 +275,10 @@ export type SliprailRenderer = {
|
|
|
268
275
|
debugLog: (...logs: unknown[]) => void;
|
|
269
276
|
};
|
|
270
277
|
declare global {
|
|
278
|
+
/**
|
|
279
|
+
* @public
|
|
280
|
+
* A global constant that can be called in the sliprail extension window.
|
|
281
|
+
*/
|
|
271
282
|
var sliprail: SliprailRenderer;
|
|
272
283
|
}
|
|
273
284
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sliprail/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.12",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.mjs",
|
|
@@ -9,13 +9,22 @@
|
|
|
9
9
|
],
|
|
10
10
|
"types": "lib/index.d.ts",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@types/react": "^18.3.
|
|
12
|
+
"@types/react": "^18.3.24"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@types/node": "^20.19.
|
|
15
|
+
"@types/node": "^20.19.24",
|
|
16
16
|
"typescript": "5.6.3"
|
|
17
17
|
},
|
|
18
18
|
"engines": {
|
|
19
19
|
"node": ">=20"
|
|
20
|
+
},
|
|
21
|
+
"magis": {
|
|
22
|
+
"doc": {
|
|
23
|
+
"backUrl": {
|
|
24
|
+
"url": "https://sliprail.fengcen.io",
|
|
25
|
+
"title": "Sliprail",
|
|
26
|
+
"logo": "../../../packages/react-commons/src/assets/sliprail.svg"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
20
29
|
}
|
|
21
30
|
}
|