@wox-launcher/wox-plugin 0.0.102 → 0.0.103

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 +11 -11
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wox-launcher/wox-plugin",
3
- "version": "0.0.102",
3
+ "version": "0.0.103",
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
@@ -175,7 +175,7 @@ export interface ExecuteResultAction {
175
175
  * If true, Wox will not hide after user select this result
176
176
  */
177
177
  PreventHideAfterAction?: boolean
178
- Action: (actionContext: ActionContext) => Promise<void>
178
+ Action: (ctx: Context, actionContext: ActionContext) => Promise<void>
179
179
  /**
180
180
  * Hotkey to trigger this action. E.g. "ctrl+Shift+Space", "Ctrl+1", "Command+K"
181
181
  * Case insensitive, space insensitive
@@ -207,7 +207,7 @@ export interface FormResultAction {
207
207
  */
208
208
  PreventHideAfterAction?: boolean
209
209
  Form: PluginSettingDefinitionItem[]
210
- OnSubmit: (actionContext: FormActionContext) => Promise<void>
210
+ OnSubmit: (ctx: Context, actionContext: FormActionContext) => Promise<void>
211
211
  /**
212
212
  * Hotkey to trigger this action. E.g. "ctrl+Shift+Space", "Ctrl+1", "Command+K"
213
213
  * Case insensitive, space insensitive
@@ -333,22 +333,22 @@ export interface PublicAPI {
333
333
  /**
334
334
  * Register setting changed callback
335
335
  */
336
- OnSettingChanged: (ctx: Context, callback: (key: string, value: string) => void) => Promise<void>
336
+ OnSettingChanged: (ctx: Context, callback: (ctx: Context, key: string, value: string) => void) => Promise<void>
337
337
 
338
338
  /**
339
339
  * Get dynamic setting definition
340
340
  */
341
- OnGetDynamicSetting: (ctx: Context, callback: (key: string) => PluginSettingDefinitionItem) => Promise<void>
341
+ OnGetDynamicSetting: (ctx: Context, callback: (ctx: Context, key: string) => PluginSettingDefinitionItem) => Promise<void>
342
342
 
343
343
  /**
344
344
  * Register deep link callback
345
345
  */
346
- OnDeepLink: (ctx: Context, callback: (arguments: MapString) => void) => Promise<void>
346
+ OnDeepLink: (ctx: Context, callback: (ctx: Context, arguments: MapString) => void) => Promise<void>
347
347
 
348
348
  /**
349
349
  * Register on load event
350
350
  */
351
- OnUnload: (ctx: Context, callback: () => Promise<void>) => Promise<void>
351
+ OnUnload: (ctx: Context, callback: (ctx: Context) => Promise<void>) => Promise<void>
352
352
 
353
353
  /**
354
354
  * Register query commands
@@ -366,7 +366,7 @@ export interface PublicAPI {
366
366
  * @param callback Callback function that takes MRUData and returns Result or null
367
367
  * Return null if the MRU data is no longer valid
368
368
  */
369
- OnMRURestore: (ctx: Context, callback: (mruData: MRUData) => Promise<Result | null>) => Promise<void>
369
+ OnMRURestore: (ctx: Context, callback: (ctx: Context, mruData: MRUData) => Promise<Result | null>) => Promise<void>
370
370
 
371
371
  /**
372
372
  * Get the current state of a result that is displayed in the UI.
@@ -380,7 +380,7 @@ export interface PublicAPI {
380
380
  * Example:
381
381
  * ```typescript
382
382
  * // In an action handler
383
- * Action: async (actionContext) => {
383
+ * Action: async (ctx, actionContext) => {
384
384
  * // Get current result state
385
385
  * const updatableResult = await api.GetUpdatableResult(ctx, actionContext.ResultId)
386
386
  * if (updatableResult === null) {
@@ -417,7 +417,7 @@ export interface PublicAPI {
417
417
  * Example:
418
418
  * ```typescript
419
419
  * // In an action handler
420
- * Action: async (actionContext) => {
420
+ * Action: async (ctx, actionContext) => {
421
421
  * // Update only the title
422
422
  * const success = await api.UpdateResult(ctx, {
423
423
  * Id: actionContext.ResultId,
@@ -457,7 +457,7 @@ export interface PublicAPI {
457
457
  *
458
458
  * Example - Refresh after marking item as favorite:
459
459
  * ```typescript
460
- * Action: async (actionContext) => {
460
+ * Action: async (ctx, actionContext) => {
461
461
  * markAsFavorite(item)
462
462
  * // Refresh query and preserve user's current selection
463
463
  * await api.RefreshQuery(ctx, { PreserveSelectedIndex: true })
@@ -466,7 +466,7 @@ export interface PublicAPI {
466
466
  *
467
467
  * Example - Refresh after deleting item:
468
468
  * ```typescript
469
- * Action: async (actionContext) => {
469
+ * Action: async (ctx, actionContext) => {
470
470
  * deleteItem(item)
471
471
  * // Refresh query and reset to first item
472
472
  * await api.RefreshQuery(ctx, { PreserveSelectedIndex: false })