feat(companion): add event surface snapshot helper

This commit is contained in:
William Valentin
2026-02-16 22:22:18 -08:00
parent a6e9daaaef
commit 29523bcdac
7 changed files with 86 additions and 2 deletions
+13
View File
@@ -1,6 +1,7 @@
import type {
CompanionEventName,
CompanionEventEnvelope,
EventSurfaceSnapshot,
CompanionEventHandler,
CanvasClearResult,
CanvasDeleteResult,
@@ -301,6 +302,10 @@ export class MacOSCompanionClient {
return this.runtime.getPendingWorkSnapshot();
}
getEventSurfaceSnapshot(): EventSurfaceSnapshot {
return this.runtime.getEventSurfaceSnapshot();
}
waitForAnyEvent<TData = unknown>(
eventNames: readonly (CompanionEventName | string)[],
options?: {
@@ -571,6 +576,10 @@ export class IOSCompanionClient {
return this.runtime.getPendingWorkSnapshot();
}
getEventSurfaceSnapshot(): EventSurfaceSnapshot {
return this.runtime.getEventSurfaceSnapshot();
}
waitForAnyEvent<TData = unknown>(
eventNames: readonly (CompanionEventName | string)[],
options?: {
@@ -839,6 +848,10 @@ export class AndroidCompanionClient {
return this.runtime.getPendingWorkSnapshot();
}
getEventSurfaceSnapshot(): EventSurfaceSnapshot {
return this.runtime.getEventSurfaceSnapshot();
}
waitForAnyEvent<TData = unknown>(
eventNames: readonly (CompanionEventName | string)[],
options?: {