yeow-api 0.2.109 → 0.2.111

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/src/event.ts +3 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yeow-api",
3
- "version": "0.2.109",
3
+ "version": "0.2.111",
4
4
  "description": "Yeow API",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
package/src/event.ts CHANGED
@@ -378,6 +378,7 @@ export function eventOn<K extends keyof EventMap>(
378
378
 
379
379
  const cbId = _registerCallback((data: RawEvent) => {
380
380
  const wrapped = adaptEvent(eventType, data);
381
+ const dispatchId = data?._dispatchId;
381
382
  const cancellable = data?._cancellable;
382
383
  const localMods: { cancelled?: boolean } = {};
383
384
 
@@ -393,7 +394,7 @@ export function eventOn<K extends keyof EventMap>(
393
394
  const complete = (result?: Record<string, unknown>) => {
394
395
  $send('task', {
395
396
  type: 'event.complete',
396
- params: { callbackId: cbId, mods: result },
397
+ params: { callbackId: cbId, dispatchId, mods: result },
397
398
  cb: '',
398
399
  });
399
400
  };
@@ -406,7 +407,7 @@ export function eventOn<K extends keyof EventMap>(
406
407
  ...(result && typeof result === 'object' ? result : {}),
407
408
  };
408
409
  if (localMods.cancelled) mods.cancelled = true;
409
- $send('task', { type: 'event.complete', params: { callbackId: cbId, mods }, cb: '' });
410
+ $send('task', { type: 'event.complete', params: { callbackId: cbId, dispatchId, mods }, cb: '' });
410
411
  }, { persistent: true });
411
412
 
412
413
  const gh = globalThis as any;