@lincyaw/kernel 1.0.0-rc.114 → 1.0.0-rc.115
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.
- package/package.json +1 -1
- package/src/contracts/desktop.ts +23 -0
- package/src/contracts.ts +1 -0
package/package.json
CHANGED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** The installed app's bounded window/update bridge; ordinary browser sessions have no bridge. */
|
|
2
|
+
export interface DesktopUpdateState {
|
|
3
|
+
phase: 'idle' | 'checking' | 'current' | 'available' | 'downloading' | 'ready' | 'installing' | 'error'
|
|
4
|
+
version?: string
|
|
5
|
+
progress?: number
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface DesktopState {
|
|
9
|
+
version: string
|
|
10
|
+
platform: 'darwin' | 'win32' | 'linux'
|
|
11
|
+
fullscreen: boolean
|
|
12
|
+
update: DesktopUpdateState
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface DesktopHost {
|
|
16
|
+
getSnapshot(): DesktopState
|
|
17
|
+
subscribe(changed: () => void): () => void
|
|
18
|
+
activateUpdate(): Promise<void>
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
declare global {
|
|
22
|
+
interface Window { presmiumDesktop?: DesktopHost }
|
|
23
|
+
}
|
package/src/contracts.ts
CHANGED