glimpse-sdk 0.8.0 → 0.9.0
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/LICENSE +24 -17
- package/PROTOCOL.md +536 -0
- package/README.md +40 -117
- package/dist/index.d.ts +174 -0
- package/dist/index.js +78 -0
- package/dist/jsx-runtime.d.ts +16 -0
- package/dist/jsx-runtime.js +7 -0
- package/dist/reconciler.d.ts +30 -0
- package/dist/reconciler.js +583 -0
- package/package.json +40 -39
- package/dist/src/app.d.ts +0 -66
- package/dist/src/app.js +0 -272
- package/dist/src/events.d.ts +0 -36
- package/dist/src/events.js +0 -37
- package/dist/src/index.d.ts +0 -5
- package/dist/src/index.js +0 -5
- package/dist/src/ipc.d.ts +0 -28
- package/dist/src/ipc.js +0 -214
- package/dist/src/protocol.d.ts +0 -23
- package/dist/src/protocol.js +0 -36
- package/dist/src/widgets.d.ts +0 -528
- package/dist/src/widgets.js +0 -619
- package/src/app.ts +0 -347
- package/src/events.ts +0 -85
- package/src/index.ts +0 -68
- package/src/ipc.ts +0 -233
- package/src/protocol.ts +0 -43
- package/src/widgets.ts +0 -491
package/README.md
CHANGED
|
@@ -1,128 +1,51 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
# glimpse-sdk
|
|
2
|
+
|
|
3
|
+
Write a [glimpse](https://github.com/alex-oleshkevich/glimpse) panel applet in React. The applet is
|
|
4
|
+
a Node program: the panel starts it, and the SDK speaks the panel's NDJSON protocol on
|
|
5
|
+
stdin and stdout.
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { Hero, Indicator, Popover, Row, run, Section } from "glimpse-sdk";
|
|
9
|
+
|
|
10
|
+
await run(
|
|
11
|
+
<>
|
|
12
|
+
<Indicator icon="face-smile-symbolic" tooltip="Hello">Hello</Indicator>
|
|
13
|
+
<Popover>
|
|
14
|
+
<Hero icon="face-smile-symbolic" title="Hello" />
|
|
15
|
+
<Section title="Hello">
|
|
16
|
+
<Row title="It works" />
|
|
17
|
+
</Section>
|
|
18
|
+
</Popover>
|
|
19
|
+
</>,
|
|
20
|
+
);
|
|
11
21
|
```
|
|
12
22
|
|
|
13
|
-
##
|
|
14
|
-
|
|
15
|
-
Create and live-run a TypeScript applet project with the Glimpse tooling:
|
|
23
|
+
## Start
|
|
16
24
|
|
|
17
|
-
```sh
|
|
18
|
-
glimpse-shell applets new counter --lang typescript
|
|
19
|
-
cd counter
|
|
20
|
-
glimpse-shell applets dev
|
|
21
25
|
```
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
## Goals
|
|
26
|
-
|
|
27
|
-
- typed protocol models
|
|
28
|
-
- typed widget builders
|
|
29
|
-
- async runtime
|
|
30
|
-
- widget-local callbacks, with explicit typed handler registration available when needed
|
|
31
|
-
- separate `status(state)` and `popover(state)` methods; state mutation via `await this.setState(...)`
|
|
32
|
-
|
|
33
|
-
## Example
|
|
34
|
-
|
|
35
|
-
```ts
|
|
36
|
-
import {
|
|
37
|
-
Applet,
|
|
38
|
-
Column,
|
|
39
|
-
Hero,
|
|
40
|
-
Label,
|
|
41
|
-
StatusItem,
|
|
42
|
-
Tile,
|
|
43
|
-
type TreeNode,
|
|
44
|
-
} from "glimpse-sdk";
|
|
45
|
-
|
|
46
|
-
interface DeployState {
|
|
47
|
-
version: string;
|
|
48
|
-
status: string;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
class DeployApplet extends Applet<DeployState> {
|
|
52
|
-
constructor() {
|
|
53
|
-
super();
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
protected initialState(): DeployState {
|
|
57
|
-
return { version: "2026.04.07", status: "Ready" };
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
protected async status(state: DeployState): Promise<StatusItem[]> {
|
|
61
|
-
return [
|
|
62
|
-
new StatusItem({
|
|
63
|
-
id: "deploy",
|
|
64
|
-
icon: "software-update-available-symbolic",
|
|
65
|
-
label: state.status,
|
|
66
|
-
}),
|
|
67
|
-
];
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
protected async popover(state: DeployState): Promise<TreeNode | null> {
|
|
71
|
-
return new Column({
|
|
72
|
-
children: [
|
|
73
|
-
new Hero({
|
|
74
|
-
icon: "software-update-available-symbolic",
|
|
75
|
-
title: "Deploy",
|
|
76
|
-
subtitle: state.version,
|
|
77
|
-
}),
|
|
78
|
-
new Label("Version"),
|
|
79
|
-
new Tile({
|
|
80
|
-
id: "deploy_now",
|
|
81
|
-
primary: "Deploy now",
|
|
82
|
-
left_icon: "media-playback-start-symbolic",
|
|
83
|
-
on_click: async () => {
|
|
84
|
-
await this.setState({ status: "Deploying" });
|
|
85
|
-
},
|
|
86
|
-
}),
|
|
87
|
-
],
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
await new DeployApplet().run();
|
|
26
|
+
glimpsectl applets new
|
|
27
|
+
cd <dir> && npm install && npm run build
|
|
28
|
+
glimpsectl applets dev .
|
|
93
29
|
```
|
|
94
30
|
|
|
95
|
-
|
|
31
|
+
`applets new` writes `index.tsx`, `package.json`, `tsconfig.json`, `README.md` and the desktop
|
|
32
|
+
entry. `npm run build` bundles everything into `build/applet.mjs` with a `#!/usr/bin/env node`
|
|
33
|
+
shebang.
|
|
96
34
|
|
|
97
|
-
|
|
98
|
-
Explicit registration helpers are still available when the handler should live
|
|
99
|
-
outside the widget tree:
|
|
35
|
+
Set `"jsxImportSource": "glimpse-sdk"` in `tsconfig.json`.
|
|
100
36
|
|
|
101
|
-
|
|
102
|
-
- `this.onScroll(id, handler)`
|
|
103
|
-
- `this.onInput(id, handler)`
|
|
104
|
-
- `this.onChange(id, handler)`
|
|
105
|
-
- `this.onToggle(id, handler)`
|
|
37
|
+
## API
|
|
106
38
|
|
|
107
|
-
|
|
108
|
-
`
|
|
39
|
+
- Components: `Indicator`, `Popover`, `Hero`, `Section`, `Row`, `SwitchRow`, `Fader`, `Entry`,
|
|
40
|
+
`Placeholder`, `Footer`, `Box`, `Label`, `Image`, `Button`, `Switch`, `Scale`, `Spinner`,
|
|
41
|
+
`Progress` and `Separator`.
|
|
42
|
+
- Hooks: `useState`, `useEffect`, `useOptions`, `usePlacement`, `usePopoverOpen`,
|
|
43
|
+
`useAppletName` and `useStateDir`. `useStateDir` returns the applet's private, persistent
|
|
44
|
+
directory.
|
|
45
|
+
- Host requests: `notify`, `copy`, `openUri`, `sessionAction` and `closePopover`.
|
|
109
46
|
|
|
110
|
-
|
|
47
|
+
The applet runs in a sandbox. Beyond its state directory, it reaches only the paths the user
|
|
48
|
+
grants under `[applets."<id>"] sandbox` in the glimpse config, and it has no network unless
|
|
49
|
+
`network = true`.
|
|
111
50
|
|
|
112
|
-
|
|
113
|
-
actions. `ipc(service)` only resolves the socket path — the connection is
|
|
114
|
-
opened lazily.
|
|
115
|
-
|
|
116
|
-
```ts
|
|
117
|
-
import { ipc } from "glimpse-sdk";
|
|
118
|
-
|
|
119
|
-
const sub = ipc("shell"); // "shell" | "wallpaper" | "idle" | "lock"
|
|
120
|
-
|
|
121
|
-
// Fire an action; awaits the ack, throws IpcError if the server rejects it.
|
|
122
|
-
const ack = await sub.dispatch("open_uri", { uri: "https://example.com" });
|
|
123
|
-
|
|
124
|
-
// Stream events until the socket closes.
|
|
125
|
-
for await (const ev of sub.listen("audio.*")) {
|
|
126
|
-
console.log(ev.name, ev.fields);
|
|
127
|
-
}
|
|
128
|
-
```
|
|
51
|
+
The wire format is specified in [PROTOCOL.md](PROTOCOL.md).
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { type Io, type Placement } from "./reconciler.ts";
|
|
2
|
+
export { Fragment, jsx, jsxDEV, jsxs } from "./jsx-runtime.ts";
|
|
3
|
+
export type Node = string | number | boolean | null | undefined | Node[] | {
|
|
4
|
+
type: unknown;
|
|
5
|
+
props: unknown;
|
|
6
|
+
key: unknown;
|
|
7
|
+
};
|
|
8
|
+
export type FC<P = object> = (props: P & {
|
|
9
|
+
key?: string | number;
|
|
10
|
+
}) => Node;
|
|
11
|
+
export type ClassName = "dim-label" | "caption" | "heading" | "title-1" | "title-2" | "title-3" | "title-4" | "numeric" | "accent" | "success" | "warning" | "error" | "flat" | "pill" | "circular";
|
|
12
|
+
type Align = "fill" | "start" | "end" | "center" | "baseline";
|
|
13
|
+
export declare const Indicator: FC<{
|
|
14
|
+
icon?: string;
|
|
15
|
+
tooltip?: string;
|
|
16
|
+
text?: string;
|
|
17
|
+
badge?: string;
|
|
18
|
+
overlay?: string;
|
|
19
|
+
dot?: string;
|
|
20
|
+
severity?: "info" | "warning" | "error";
|
|
21
|
+
attention?: boolean;
|
|
22
|
+
notice?: boolean;
|
|
23
|
+
className?: ClassName;
|
|
24
|
+
onPress?: (button: number) => void;
|
|
25
|
+
onScroll?: (dx: number, dy: number) => void;
|
|
26
|
+
children?: Node;
|
|
27
|
+
}>;
|
|
28
|
+
export declare const Popover: FC<{
|
|
29
|
+
className?: ClassName;
|
|
30
|
+
children?: Node;
|
|
31
|
+
}>;
|
|
32
|
+
export declare const Hero: FC<{
|
|
33
|
+
icon?: string;
|
|
34
|
+
title?: string;
|
|
35
|
+
subtitle?: string;
|
|
36
|
+
className?: ClassName;
|
|
37
|
+
}>;
|
|
38
|
+
export declare const Section: FC<{
|
|
39
|
+
title?: string;
|
|
40
|
+
count?: string;
|
|
41
|
+
className?: ClassName;
|
|
42
|
+
children?: Node;
|
|
43
|
+
}>;
|
|
44
|
+
export declare const Row: FC<{
|
|
45
|
+
icon?: string;
|
|
46
|
+
title?: string;
|
|
47
|
+
subtitle?: string;
|
|
48
|
+
value?: string;
|
|
49
|
+
selected?: boolean;
|
|
50
|
+
busy?: boolean;
|
|
51
|
+
className?: ClassName;
|
|
52
|
+
onActivate?: () => void;
|
|
53
|
+
}>;
|
|
54
|
+
export declare const SwitchRow: FC<{
|
|
55
|
+
icon?: string;
|
|
56
|
+
title?: string;
|
|
57
|
+
subtitle?: string;
|
|
58
|
+
active?: boolean;
|
|
59
|
+
busy?: boolean;
|
|
60
|
+
className?: ClassName;
|
|
61
|
+
onToggle?: (active: boolean) => void;
|
|
62
|
+
}>;
|
|
63
|
+
export declare const Fader: FC<{
|
|
64
|
+
icon?: string;
|
|
65
|
+
value?: number;
|
|
66
|
+
maximum?: number;
|
|
67
|
+
floor?: number;
|
|
68
|
+
muted?: boolean;
|
|
69
|
+
className?: ClassName;
|
|
70
|
+
onChange?: (value: number) => void;
|
|
71
|
+
onMute?: () => void;
|
|
72
|
+
}>;
|
|
73
|
+
export declare const Entry: FC<{
|
|
74
|
+
placeholder?: string;
|
|
75
|
+
value?: string;
|
|
76
|
+
className?: ClassName;
|
|
77
|
+
onChange?: (value: string) => void;
|
|
78
|
+
onSubmit?: (value: string) => void;
|
|
79
|
+
}>;
|
|
80
|
+
export declare const Placeholder: FC<{
|
|
81
|
+
icon?: string;
|
|
82
|
+
title?: string;
|
|
83
|
+
description?: string;
|
|
84
|
+
className?: ClassName;
|
|
85
|
+
}>;
|
|
86
|
+
export declare const Footer: FC<{
|
|
87
|
+
className?: ClassName;
|
|
88
|
+
children?: Node;
|
|
89
|
+
}>;
|
|
90
|
+
export declare const Box: FC<{
|
|
91
|
+
orientation?: "horizontal" | "vertical";
|
|
92
|
+
spacing?: number;
|
|
93
|
+
homogeneous?: boolean;
|
|
94
|
+
halign?: Align;
|
|
95
|
+
valign?: Align;
|
|
96
|
+
hexpand?: boolean;
|
|
97
|
+
vexpand?: boolean;
|
|
98
|
+
className?: ClassName;
|
|
99
|
+
children?: Node;
|
|
100
|
+
}>;
|
|
101
|
+
export declare const Label: FC<{
|
|
102
|
+
text?: string;
|
|
103
|
+
wrap?: boolean;
|
|
104
|
+
xalign?: number;
|
|
105
|
+
ellipsize?: "none" | "start" | "middle" | "end";
|
|
106
|
+
lines?: number;
|
|
107
|
+
className?: ClassName;
|
|
108
|
+
children?: Node;
|
|
109
|
+
}>;
|
|
110
|
+
export declare const Image: FC<{
|
|
111
|
+
icon?: string;
|
|
112
|
+
tooltip?: string;
|
|
113
|
+
pixelSize?: number;
|
|
114
|
+
className?: ClassName;
|
|
115
|
+
}>;
|
|
116
|
+
export declare const Button: FC<{
|
|
117
|
+
text?: string;
|
|
118
|
+
icon?: string;
|
|
119
|
+
tooltip?: string;
|
|
120
|
+
sensitive?: boolean;
|
|
121
|
+
className?: ClassName;
|
|
122
|
+
onClick?: () => void;
|
|
123
|
+
children?: Node;
|
|
124
|
+
}>;
|
|
125
|
+
export declare const Switch: FC<{
|
|
126
|
+
active?: boolean;
|
|
127
|
+
sensitive?: boolean;
|
|
128
|
+
className?: ClassName;
|
|
129
|
+
onToggle?: (active: boolean) => void;
|
|
130
|
+
}>;
|
|
131
|
+
export declare const Scale: FC<{
|
|
132
|
+
value?: number;
|
|
133
|
+
min?: number;
|
|
134
|
+
max?: number;
|
|
135
|
+
step?: number;
|
|
136
|
+
sensitive?: boolean;
|
|
137
|
+
className?: ClassName;
|
|
138
|
+
onChange?: (value: number) => void;
|
|
139
|
+
}>;
|
|
140
|
+
export declare const Spinner: FC<{
|
|
141
|
+
className?: ClassName;
|
|
142
|
+
}>;
|
|
143
|
+
export declare const Progress: FC<{
|
|
144
|
+
text?: string;
|
|
145
|
+
fraction?: number;
|
|
146
|
+
className?: ClassName;
|
|
147
|
+
children?: Node;
|
|
148
|
+
}>;
|
|
149
|
+
export declare const Separator: FC<{
|
|
150
|
+
orientation?: "horizontal" | "vertical";
|
|
151
|
+
className?: ClassName;
|
|
152
|
+
}>;
|
|
153
|
+
export type { Io, Placement };
|
|
154
|
+
export declare function useState<T>(initial: T | (() => T)): [T, (action: T | ((prev: T) => T)) => void];
|
|
155
|
+
export declare function useEffect(effect: () => void | (() => void), deps?: readonly unknown[]): void;
|
|
156
|
+
export declare function useOptions<T extends Record<string, unknown> = Record<string, unknown>>(): T;
|
|
157
|
+
export declare function usePlacement(): Placement | null;
|
|
158
|
+
export declare function usePopoverOpen(): boolean;
|
|
159
|
+
export declare function useAppletName(): string;
|
|
160
|
+
export declare function useStateDir(): string;
|
|
161
|
+
export declare function createElement(type: unknown, props?: Record<string, unknown> | null, ...children: unknown[]): unknown;
|
|
162
|
+
export declare function notify(message: {
|
|
163
|
+
summary: string;
|
|
164
|
+
body?: string;
|
|
165
|
+
icon?: string;
|
|
166
|
+
urgency?: "low" | "normal" | "critical";
|
|
167
|
+
}): void;
|
|
168
|
+
export declare function copy(text: string): void;
|
|
169
|
+
export declare function openUri(uri: string): void;
|
|
170
|
+
export type SessionAction = "lock" | "suspend" | "hibernate" | "log-out" | "reboot" | "power-off";
|
|
171
|
+
export declare function sessionAction(action: SessionAction): void;
|
|
172
|
+
export { sessionAction as session };
|
|
173
|
+
export declare function closePopover(): void;
|
|
174
|
+
export declare function run(element: unknown, io?: Io): Promise<void>;
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { nameStore, openStore, optionsStore, placementStore, redirectConsole, send, session, stateStore, standardIo, } from "./reconciler.js";
|
|
2
|
+
import * as react from "react";
|
|
3
|
+
redirectConsole();
|
|
4
|
+
export { Fragment, jsx, jsxDEV, jsxs } from "./jsx-runtime.js";
|
|
5
|
+
export const Indicator = "indicator";
|
|
6
|
+
export const Popover = "popover";
|
|
7
|
+
export const Hero = "hero";
|
|
8
|
+
export const Section = "section";
|
|
9
|
+
export const Row = "row";
|
|
10
|
+
export const SwitchRow = "switchrow";
|
|
11
|
+
export const Fader = "fader";
|
|
12
|
+
export const Entry = "entry";
|
|
13
|
+
export const Placeholder = "placeholder";
|
|
14
|
+
export const Footer = "footer";
|
|
15
|
+
export const Box = "box";
|
|
16
|
+
export const Label = "label";
|
|
17
|
+
export const Image = "image";
|
|
18
|
+
export const Button = "button";
|
|
19
|
+
export const Switch = "switch";
|
|
20
|
+
export const Scale = "scale";
|
|
21
|
+
export const Spinner = "spinner";
|
|
22
|
+
export const Progress = "progress";
|
|
23
|
+
export const Separator = "separator";
|
|
24
|
+
export function useState(initial) {
|
|
25
|
+
return react.useState(initial);
|
|
26
|
+
}
|
|
27
|
+
export function useEffect(effect, deps) {
|
|
28
|
+
react.useEffect(effect, deps);
|
|
29
|
+
}
|
|
30
|
+
export function useOptions() {
|
|
31
|
+
return react.useSyncExternalStore(optionsStore.subscribe, optionsStore.get);
|
|
32
|
+
}
|
|
33
|
+
export function usePlacement() {
|
|
34
|
+
return react.useSyncExternalStore(placementStore.subscribe, placementStore.get);
|
|
35
|
+
}
|
|
36
|
+
export function usePopoverOpen() {
|
|
37
|
+
return react.useSyncExternalStore(openStore.subscribe, openStore.get);
|
|
38
|
+
}
|
|
39
|
+
export function useAppletName() {
|
|
40
|
+
return react.useSyncExternalStore(nameStore.subscribe, nameStore.get);
|
|
41
|
+
}
|
|
42
|
+
export function useStateDir() {
|
|
43
|
+
return react.useSyncExternalStore(stateStore.subscribe, stateStore.get);
|
|
44
|
+
}
|
|
45
|
+
export function createElement(type, props, ...children) {
|
|
46
|
+
return react.createElement(type, props ?? null, ...children);
|
|
47
|
+
}
|
|
48
|
+
export function notify(message) {
|
|
49
|
+
const wire = {
|
|
50
|
+
t: "notify",
|
|
51
|
+
summary: message.summary,
|
|
52
|
+
};
|
|
53
|
+
if (message.body !== undefined)
|
|
54
|
+
wire.body = message.body;
|
|
55
|
+
if (message.icon !== undefined)
|
|
56
|
+
wire.icon = message.icon;
|
|
57
|
+
if (message.urgency !== undefined)
|
|
58
|
+
wire.urgency = message.urgency;
|
|
59
|
+
send(wire);
|
|
60
|
+
}
|
|
61
|
+
export function copy(text) {
|
|
62
|
+
send({ t: "copy", text });
|
|
63
|
+
}
|
|
64
|
+
export function openUri(uri) {
|
|
65
|
+
send({ t: "open-uri", uri });
|
|
66
|
+
}
|
|
67
|
+
export function sessionAction(action) {
|
|
68
|
+
send({ t: "session", action });
|
|
69
|
+
}
|
|
70
|
+
export { sessionAction as session };
|
|
71
|
+
export function closePopover() {
|
|
72
|
+
send({ t: "close-popover" });
|
|
73
|
+
}
|
|
74
|
+
export async function run(element, io) {
|
|
75
|
+
redirectConsole();
|
|
76
|
+
await session(element, io ?? standardIo());
|
|
77
|
+
process.exit(0);
|
|
78
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Fragment } from "react/jsx-runtime";
|
|
2
|
+
import type { Node } from "./index.ts";
|
|
3
|
+
type JsxFn = (type: unknown, props: unknown, key?: unknown) => unknown;
|
|
4
|
+
export declare const jsx: JsxFn;
|
|
5
|
+
export declare const jsxs: JsxFn;
|
|
6
|
+
export { Fragment };
|
|
7
|
+
export declare function jsxDEV(type: unknown, props: unknown, key?: unknown): unknown;
|
|
8
|
+
export declare namespace JSX {
|
|
9
|
+
type Element = Node;
|
|
10
|
+
interface ElementChildrenAttribute {
|
|
11
|
+
children: unknown;
|
|
12
|
+
}
|
|
13
|
+
interface IntrinsicElements {
|
|
14
|
+
[elemName: string]: Record<string, unknown>;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { Readable } from "node:stream";
|
|
2
|
+
export type Placement = {
|
|
3
|
+
output: string | null;
|
|
4
|
+
position: string;
|
|
5
|
+
orientation: string;
|
|
6
|
+
zone: string;
|
|
7
|
+
size: number;
|
|
8
|
+
};
|
|
9
|
+
export type Io = {
|
|
10
|
+
writeLine: (line: string) => void;
|
|
11
|
+
lines: AsyncIterable<string | string[]>;
|
|
12
|
+
};
|
|
13
|
+
type Store<T> = {
|
|
14
|
+
get: () => T;
|
|
15
|
+
set: (value: T) => void;
|
|
16
|
+
subscribe: (listener: () => void) => () => void;
|
|
17
|
+
};
|
|
18
|
+
export declare const optionsStore: Store<Record<string, unknown>>;
|
|
19
|
+
export declare const placementStore: Store<Placement | null>;
|
|
20
|
+
export declare const nameStore: Store<string>;
|
|
21
|
+
export declare const stateStore: Store<string>;
|
|
22
|
+
export declare const openStore: Store<boolean>;
|
|
23
|
+
export declare function setEmit(write: (message: unknown) => void): void;
|
|
24
|
+
export declare function send(message: unknown): void;
|
|
25
|
+
export declare function redirectConsole(): void;
|
|
26
|
+
export declare function restoreConsole(): void;
|
|
27
|
+
export declare function session(element: unknown, io: Io): Promise<void>;
|
|
28
|
+
export declare function stdinLines(input?: Readable): AsyncIterable<string[]>;
|
|
29
|
+
export declare function standardIo(): Io;
|
|
30
|
+
export {};
|