@edenapp/types 0.14.0 → 0.15.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/AppManifest.d.ts +1 -9
- package/CHANGELOG.md +24 -0
- package/ContextMenu.d.ts +2 -0
- package/EdenConfig.d.ts +6 -16
- package/FilePicker.d.ts +5 -3
- package/Filesystem.d.ts +66 -0
- package/Operations.d.ts +94 -0
- package/Package.d.ts +9 -0
- package/README.md +9 -3
- package/SettingsPanel.d.ts +0 -12
- package/Streams.d.ts +35 -0
- package/User.d.ts +10 -4
- package/commands.d.ts +27 -2
- package/commands.generated.d.ts +700 -779
- package/events.generated.d.ts +42 -47
- package/index.d.ts +28 -13
- package/ipc/edenapi.d.ts +9 -1
- package/package.json +1 -1
package/events.generated.d.ts
CHANGED
|
@@ -17,130 +17,125 @@ export interface AppearanceEvents {
|
|
|
17
17
|
* ContextMenuEvents - Events for the "context-menu" namespace
|
|
18
18
|
*/
|
|
19
19
|
export interface ContextMenuEvents {
|
|
20
|
-
"context-menu/opened": { menu: import("./index").ContextMenuOpenEvent };
|
|
21
20
|
"context-menu/closed": import("./index").ContextMenuResult;
|
|
21
|
+
"context-menu/opened": { menu: import("./index").ContextMenuOpenEvent; };
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* DaemonEvents - Events for the "daemon" namespace
|
|
26
26
|
*/
|
|
27
27
|
export interface DaemonEvents {
|
|
28
|
-
"daemon/changed": { status: import("./index").DaemonStatus };
|
|
28
|
+
"daemon/changed": { status: import("./index").DaemonStatus; };
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
32
|
* FileEvents - Events for the "file" namespace
|
|
33
33
|
*/
|
|
34
34
|
export interface FileEvents {
|
|
35
|
-
"file/opened":
|
|
35
|
+
"file/opened": import("./index").FileOpenedEvent;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
39
|
* FilePickerEvents - Events for the "file-picker" namespace
|
|
40
40
|
*/
|
|
41
41
|
export interface FilePickerEvents {
|
|
42
|
-
"file-picker/opened": { picker: import("./index").FilePickerOpenEvent };
|
|
43
42
|
"file-picker/closed": import("./index").FilePickerResult;
|
|
43
|
+
"file-picker/opened": { picker: import("./index").FilePickerOpenEvent; };
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
47
|
* FsEvents - Events for the "fs" namespace
|
|
48
48
|
*/
|
|
49
49
|
export interface FsEvents {
|
|
50
|
-
"fs/changed": { watchId: string; kind: import("./index").FilesystemChangeKind };
|
|
50
|
+
"fs/changed": { watchId: string; kind: import("./index").FilesystemChangeKind; };
|
|
51
|
+
"fs/trash-changed": { revision: number; };
|
|
51
52
|
}
|
|
52
53
|
|
|
53
54
|
/**
|
|
54
55
|
* I18nEvents - Events for the "i18n" namespace
|
|
55
56
|
*/
|
|
56
57
|
export interface I18nEvents {
|
|
57
|
-
"i18n/locale-changed": { locale: string };
|
|
58
|
+
"i18n/locale-changed": { locale: string; };
|
|
58
59
|
}
|
|
59
60
|
|
|
60
61
|
/**
|
|
61
62
|
* NotificationEvents - Events for the "notification" namespace
|
|
62
63
|
*/
|
|
63
64
|
export interface NotificationEvents {
|
|
64
|
-
"notification/
|
|
65
|
-
"notification/
|
|
66
|
-
"notification/
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
65
|
+
"notification/action-clicked": { notificationId: string; actionId: string; };
|
|
66
|
+
"notification/added": { notification: import("./index").Notification; };
|
|
67
|
+
"notification/removed": { id: string; };
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* OperationEvents - Events for the "operation" namespace
|
|
72
|
+
*/
|
|
73
|
+
export interface OperationEvents {
|
|
74
|
+
"operation/changed": { snapshot: import("./index").OperationSnapshot; };
|
|
70
75
|
}
|
|
71
76
|
|
|
72
77
|
/**
|
|
73
78
|
* PackageEvents - Events for the "package" namespace
|
|
74
79
|
*/
|
|
75
80
|
export interface PackageEvents {
|
|
76
|
-
"package/installed": { manifest: import("./index").InstalledPackageManifest };
|
|
77
|
-
"package/uninstalled": | { kind: "
|
|
78
|
-
| { kind: "dlc"; packageId: string; hostAppId: string };
|
|
81
|
+
"package/installed": { manifest: import("./index").InstalledPackageManifest; };
|
|
82
|
+
"package/uninstalled": { kind: "app"; packageId: string; } | { kind: "dlc"; packageId: string; hostAppId: string; };
|
|
79
83
|
}
|
|
80
84
|
|
|
81
85
|
/**
|
|
82
86
|
* ProcessEvents - Events for the "process" namespace
|
|
83
87
|
*/
|
|
84
88
|
export interface ProcessEvents {
|
|
85
|
-
"process/
|
|
86
|
-
"process/
|
|
87
|
-
"process/
|
|
88
|
-
"process/
|
|
89
|
-
"process/
|
|
89
|
+
"process/error": { appId: string; error: unknown; };
|
|
90
|
+
"process/exited": { appId: string; code: number; };
|
|
91
|
+
"process/launched": { instance: import("./index").AppInstance; };
|
|
92
|
+
"process/reloading": { appId: string; };
|
|
93
|
+
"process/stopped": { appId: string; };
|
|
90
94
|
}
|
|
91
95
|
|
|
92
96
|
/**
|
|
93
97
|
* SessionEvents - Events for the "session" namespace
|
|
94
98
|
*/
|
|
95
99
|
export interface SessionEvents {
|
|
96
|
-
"session/changed":
|
|
97
|
-
currentUser: import("./index").UserProfile | null;
|
|
98
|
-
previousUsername: string | null;
|
|
99
|
-
reason: "login" | "logout" | "system";
|
|
100
|
-
};
|
|
100
|
+
"session/changed": import("./index").SessionChange;
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
/**
|
|
104
104
|
* SettingsEvents - Events for the "settings" namespace
|
|
105
105
|
*/
|
|
106
106
|
export interface SettingsEvents {
|
|
107
|
-
"settings/changed": { appId: string; key: string; value: string };
|
|
108
|
-
"settings/panels-changed": {
|
|
109
|
-
reason: "catalog" | "grants" | "session" | "state" | "visibility";
|
|
110
|
-
/** Limits a state refresh to one panel when supplied. */
|
|
111
|
-
panelId?: string;
|
|
112
|
-
};
|
|
107
|
+
"settings/changed": { appId: string; key: string; value: string; };
|
|
108
|
+
"settings/panels-changed": { reason: "catalog" | "grants" | "session" | "state" | "visibility"; panelId?: string; };
|
|
113
109
|
}
|
|
114
110
|
|
|
115
111
|
/**
|
|
116
112
|
* UserEvents - Events for the "user" namespace
|
|
117
113
|
*/
|
|
118
114
|
export interface UserEvents {
|
|
119
|
-
"user/grant-options-changed": { revision: number };
|
|
115
|
+
"user/grant-options-changed": { revision: number; };
|
|
120
116
|
}
|
|
121
117
|
|
|
122
118
|
/**
|
|
123
119
|
* ViewEvents - Events for the "view" namespace
|
|
124
120
|
*/
|
|
125
121
|
export interface ViewEvents {
|
|
126
|
-
"view/view-removed": { viewId: number; appId: string; webContentsId: number };
|
|
127
122
|
"view/bounds-updated": import("./index").ViewBounds;
|
|
128
|
-
"view/
|
|
129
|
-
"view/
|
|
130
|
-
"view/
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
};
|
|
123
|
+
"view/global-bounds-changed": { workspaceBounds: import("./index").ViewBounds; windowSize: import("./index").WindowSize; };
|
|
124
|
+
"view/interface-scale-changed": { scale: number; };
|
|
125
|
+
"view/mode-changed": { mode: "floating" | "tiled"; bounds: import("./index").ViewBounds; };
|
|
126
|
+
"view/view-load-failed": { viewId: number; appId: string; errorCode: number; errorDescription: string; };
|
|
127
|
+
"view/view-loaded": { viewId: number; appId: string; overlay: boolean; };
|
|
128
|
+
"view/view-removed": { viewId: number; appId: string; webContentsId: number; };
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* VolumeEvents - Events for the "volume" namespace
|
|
133
|
+
*/
|
|
134
|
+
export interface VolumeEvents {
|
|
135
|
+
"volume/changed": { volumes: import("./index").FilesystemVolume[]; };
|
|
141
136
|
}
|
|
142
137
|
|
|
143
138
|
/**
|
|
144
139
|
* Global event map - merge all event namespaces
|
|
145
140
|
*/
|
|
146
|
-
export interface AppEvents extends AppearanceEvents, ContextMenuEvents, DaemonEvents, FileEvents, FilePickerEvents, FsEvents, I18nEvents, NotificationEvents, PackageEvents, ProcessEvents, SessionEvents, SettingsEvents, UserEvents, ViewEvents {}
|
|
141
|
+
export interface AppEvents extends AppearanceEvents, ContextMenuEvents, DaemonEvents, FileEvents, FilePickerEvents, FsEvents, I18nEvents, NotificationEvents, OperationEvents, PackageEvents, ProcessEvents, SessionEvents, SettingsEvents, UserEvents, ViewEvents, VolumeEvents {}
|
package/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { FilesystemLocation } from "./Filesystem";
|
|
2
|
+
|
|
1
3
|
export * from "./AppAssociation";
|
|
2
4
|
export * from "./AppManifest";
|
|
3
5
|
export * from "./Branding";
|
|
@@ -59,8 +61,11 @@ export * from "./channels";
|
|
|
59
61
|
// Export new command types
|
|
60
62
|
export type {
|
|
61
63
|
CommandArgs,
|
|
64
|
+
CommandChunk,
|
|
65
|
+
CommandCompletion,
|
|
62
66
|
CommandMap,
|
|
63
67
|
CommandName,
|
|
68
|
+
CommandResponse,
|
|
64
69
|
CommandResult,
|
|
65
70
|
} from "./commands";
|
|
66
71
|
// Export event types
|
|
@@ -86,9 +91,14 @@ export interface LaunchResult {
|
|
|
86
91
|
appId: string;
|
|
87
92
|
}
|
|
88
93
|
|
|
89
|
-
/**
|
|
90
|
-
|
|
91
|
-
|
|
94
|
+
/** File address and handler context delivered when opening a file. */
|
|
95
|
+
export interface FileOpenedEvent {
|
|
96
|
+
location: FilesystemLocation;
|
|
97
|
+
isDirectory: boolean;
|
|
98
|
+
appId: string;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/** Result of opening a file. */
|
|
92
102
|
export interface FileOpenResult {
|
|
93
103
|
success: boolean;
|
|
94
104
|
appId?: string;
|
|
@@ -116,25 +126,27 @@ export interface FileStats {
|
|
|
116
126
|
}
|
|
117
127
|
|
|
118
128
|
/** Kind of update delivered by a filesystem watch subscription. */
|
|
119
|
-
export type FilesystemChangeKind = "change" | "watch-error";
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
export interface FilesystemTransferArgs {
|
|
123
|
-
from: string;
|
|
124
|
-
to: string;
|
|
125
|
-
/** Replace the complete destination when it already exists. */
|
|
126
|
-
overwrite?: boolean;
|
|
127
|
-
}
|
|
129
|
+
export type FilesystemChangeKind = "change" | "watch-error" | "volume-removed";
|
|
130
|
+
|
|
131
|
+
export * from "./Filesystem";
|
|
128
132
|
|
|
129
133
|
/**
|
|
130
134
|
* Search result for filesystem queries
|
|
131
135
|
*/
|
|
132
136
|
export interface SearchResult {
|
|
137
|
+
location: FilesystemLocation;
|
|
133
138
|
name: string;
|
|
134
|
-
path: string;
|
|
135
139
|
type: "file" | "folder";
|
|
136
140
|
}
|
|
137
141
|
|
|
142
|
+
/** Progress of a filesystem search stream. */
|
|
143
|
+
export interface SearchProgress {
|
|
144
|
+
/** Best matches found so far, ranked from best to worst. */
|
|
145
|
+
results: SearchResult[];
|
|
146
|
+
/** Number of entries examined so far. */
|
|
147
|
+
searched: number;
|
|
148
|
+
}
|
|
149
|
+
|
|
138
150
|
/**
|
|
139
151
|
* Notification type/variant for styling
|
|
140
152
|
*/
|
|
@@ -174,3 +186,6 @@ export interface WallpaperPreset {
|
|
|
174
186
|
export type WallpaperConfig =
|
|
175
187
|
| { type: "preset"; id: string }
|
|
176
188
|
| { type: "custom"; value: string };
|
|
189
|
+
|
|
190
|
+
export * from "./Operations";
|
|
191
|
+
export * from "./Streams";
|
package/ipc/edenapi.d.ts
CHANGED
|
@@ -7,11 +7,14 @@
|
|
|
7
7
|
|
|
8
8
|
import type { CommandArgs, CommandName, CommandResult } from "../commands";
|
|
9
9
|
import type { EventData, EventName } from "../events";
|
|
10
|
+
import type { FilesystemLocation } from "../Filesystem";
|
|
11
|
+
import type { OperationSubmission, OperationsAPI } from "../Operations";
|
|
10
12
|
|
|
11
13
|
/**
|
|
12
14
|
* Eden API - shell commands and event subscriptions
|
|
13
15
|
*/
|
|
14
16
|
export interface EdenAPI {
|
|
17
|
+
operations: OperationsAPI;
|
|
15
18
|
/**
|
|
16
19
|
* Execute a shell command with type-safe arguments
|
|
17
20
|
* @param command - The command name (e.g., "process/launch")
|
|
@@ -20,15 +23,17 @@ export interface EdenAPI {
|
|
|
20
23
|
*
|
|
21
24
|
* @example
|
|
22
25
|
* ```typescript
|
|
23
|
-
* await edenAPI.shellCommand("process/launch", {
|
|
26
|
+
* const launch = await edenAPI.shellCommand("process/launch", {
|
|
24
27
|
* appId: "my-app",
|
|
25
28
|
* bounds: { x: 0, y: 0, width: 800, height: 600 }
|
|
26
29
|
* });
|
|
30
|
+
* await launch.result();
|
|
27
31
|
* ```
|
|
28
32
|
*/
|
|
29
33
|
shellCommand<T extends CommandName>(
|
|
30
34
|
command: T,
|
|
31
35
|
args: CommandArgs<T>,
|
|
36
|
+
submission?: OperationSubmission,
|
|
32
37
|
): Promise<CommandResult<T>>;
|
|
33
38
|
|
|
34
39
|
/**
|
|
@@ -58,4 +63,7 @@ export interface EdenAPI {
|
|
|
58
63
|
* Get the launch arguments passed to this app.
|
|
59
64
|
*/
|
|
60
65
|
getLaunchArgs(): string[];
|
|
66
|
+
|
|
67
|
+
/** Initial file address when launched through file/open. */
|
|
68
|
+
getLaunchFile(): FilesystemLocation | undefined;
|
|
61
69
|
}
|