@wox-launcher/wox-plugin 0.0.16 → 0.0.18
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/dist/index.d.ts +6 -1
- package/dist/index.js +38 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ export interface Result {
|
|
|
25
25
|
Id?: string;
|
|
26
26
|
Title: string;
|
|
27
27
|
Description?: string;
|
|
28
|
-
|
|
28
|
+
Icon: WoxImage;
|
|
29
29
|
Score?: number;
|
|
30
30
|
Action: () => Promise<boolean>;
|
|
31
31
|
}
|
|
@@ -58,3 +58,8 @@ export interface PublicAPI {
|
|
|
58
58
|
*/
|
|
59
59
|
GetTranslation: (key: string) => Promise<string>;
|
|
60
60
|
}
|
|
61
|
+
export type WoxImageType = "AbsolutePath" | "RelativeToPluginPath" | "Svg" | "Base64" | "Remote";
|
|
62
|
+
export interface WoxImage {
|
|
63
|
+
ImageType: WoxImageType;
|
|
64
|
+
ImageData: string;
|
|
65
|
+
}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,40 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var WoxImage;
|
|
4
|
+
(function (WoxImage) {
|
|
5
|
+
function FromAbsolutePath(path) {
|
|
6
|
+
return {
|
|
7
|
+
ImageType: "AbsolutePath",
|
|
8
|
+
ImageData: path,
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
WoxImage.FromAbsolutePath = FromAbsolutePath;
|
|
12
|
+
function FromRelativeToPluginPath(path) {
|
|
13
|
+
return {
|
|
14
|
+
ImageType: "RelativeToPluginPath",
|
|
15
|
+
ImageData: path,
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
WoxImage.FromRelativeToPluginPath = FromRelativeToPluginPath;
|
|
19
|
+
function FromSvg(svg) {
|
|
20
|
+
return {
|
|
21
|
+
ImageType: "Svg",
|
|
22
|
+
ImageData: svg,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
WoxImage.FromSvg = FromSvg;
|
|
26
|
+
function FromBase64(base64) {
|
|
27
|
+
return {
|
|
28
|
+
ImageType: "Base64",
|
|
29
|
+
ImageData: base64,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
WoxImage.FromBase64 = FromBase64;
|
|
33
|
+
function FromRemote(url) {
|
|
34
|
+
return {
|
|
35
|
+
ImageType: "Remote",
|
|
36
|
+
ImageData: url,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
WoxImage.FromRemote = FromRemote;
|
|
40
|
+
})(WoxImage || (WoxImage = {}));
|