@wox-launcher/wox-plugin 0.0.63 → 0.0.66

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/package.json +1 -1
  2. package/types/index.d.ts +19 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wox-launcher/wox-plugin",
3
- "version": "0.0.63",
3
+ "version": "0.0.66",
4
4
  "description": "All nodejs plugin for Wox should use types in this package",
5
5
  "repository": {
6
6
  "type": "git",
package/types/index.d.ts CHANGED
@@ -11,6 +11,13 @@ export interface Selection {
11
11
  FilePaths: string[]
12
12
  }
13
13
 
14
+ export interface QueryEnv {
15
+ /**
16
+ * Active window title when user query
17
+ */
18
+ ActiveWindowTitle: string
19
+ }
20
+
14
21
  export interface Query {
15
22
  /**
16
23
  * By default, Wox will only pass input query to plugin.
@@ -49,8 +56,20 @@ export interface Query {
49
56
  * NOTE: Only available when query type is selection
50
57
  */
51
58
  Selection: Selection
59
+
60
+ /**
61
+ * Additional query environment data
62
+ * expose more context env data to plugin, E.g. plugin A only show result when active window title is "Chrome"
63
+ */
64
+ Env: QueryEnv
65
+
66
+ /**
67
+ * Whether current query is global query
68
+ */
69
+ IsGlobalQuery(): boolean
52
70
  }
53
71
 
72
+
54
73
  export interface Result {
55
74
  Id?: string
56
75
  Title: string