@cloud-os/sandbox-app-standard-bridge 20251211.0.6 → 20251211.0.8

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.
@@ -1,6 +1,7 @@
1
+ import { Event } from "../../../index";
1
2
  export interface SandboxApplicationBridgePayload {
2
3
  handleClose: () => void;
3
- handleAddEventListener: (event: string, listener: () => Promise<void>) => void;
4
- handleRemoveEventListener: (event: string, listener: () => Promise<void>) => void;
5
- handleClearEventListeners: (event: string) => void;
4
+ handleAddEventListener: (event: Event, listener: () => Promise<void>) => void;
5
+ handleRemoveEventListener: (event: Event, listener: () => Promise<void>) => void;
6
+ handleClearEventListeners: (event: Event) => void;
6
7
  }
@@ -1,10 +1,10 @@
1
- import { SandboxApplicationEvent } from "../../index";
1
+ import { SandboxApplicationEvent, Event } from "../../index";
2
2
  import { SandboxApplicationBridgePayload } from "./Payload/SandboxApplicationBridgePayload";
3
3
  export default class SandboxApplicationBridge implements SandboxApplicationEvent {
4
4
  private readonly payload;
5
5
  constructor(payload: SandboxApplicationBridgePayload);
6
- addEventListener(event: string, listener: () => Promise<void>): void;
7
- removeEventListener(event: string, listener: () => Promise<void>): void;
8
- clearEventListeners(event: string): void;
6
+ addEventListener(event: Event, listener: () => Promise<void>): void;
7
+ removeEventListener(event: Event, listener: () => Promise<void>): void;
8
+ clearEventListeners(event: Event): void;
9
9
  close(): void;
10
10
  }
@@ -1,6 +1,7 @@
1
+ import { Event } from "../../index";
1
2
  export interface SandboxApplicationEvent {
2
3
  close(): void;
3
- addEventListener(event: string, listener: () => Promise<void>): void;
4
- removeEventListener(event: string, listener: () => Promise<void>): void;
5
- clearEventListeners(event: string): void;
4
+ addEventListener(event: Event, listener: () => Promise<void>): void;
5
+ removeEventListener(event: Event, listener: () => Promise<void>): void;
6
+ clearEventListeners(event: Event): void;
6
7
  }
@@ -0,0 +1,5 @@
1
+ export declare const Event: {
2
+ readonly Focus: "focus";
3
+ readonly Blur: "blur";
4
+ };
5
+ export type Event = typeof Event[keyof typeof Event];
@@ -0,0 +1,4 @@
1
+ export const Event = {
2
+ Focus: "focus",
3
+ Blur: "blur",
4
+ };
@@ -5,3 +5,4 @@ export { DateTimeInfo } from "./Communication/DateTimeInfo";
5
5
  export { InstallApplicationInfo } from "./System/InstallApplicationInfo";
6
6
  export { RunningApplciationInfo } from "./System/RunningApplicaationInfo";
7
7
  export { ProcessInfo } from "./System/ProcessInfo";
8
+ export { Event } from "./SandboxApplication/Event";
@@ -1 +1 @@
1
- export {};
1
+ export { Event } from "./SandboxApplication/Event";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloud-os/sandbox-app-standard-bridge",
3
- "version": "20251211.0.6",
3
+ "version": "20251211.0.8",
4
4
  "description": "",
5
5
  "author": "jack8228@enerqi.tw <jack8228@enerqi.tw>",
6
6
  "main": "dist/index.js",