@edenapp/types 0.4.1 → 0.5.1

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 CHANGED
@@ -67,6 +67,13 @@ export interface WindowConfig {
67
67
 
68
68
  /** Controls which Eden runtime helpers are injected into the app */
69
69
  injections?: WindowInjectionOptions;
70
+
71
+ /**
72
+ * How interface scaling is handled for this app.
73
+ * - "auto": SDK applies interface scale automatically (default for regular apps)
74
+ * - "manual": SDK doesn't apply scaling, app handles it (default for overlays)
75
+ */
76
+ scaling?: "auto" | "manual";
70
77
  }
71
78
 
72
79
  /**
@@ -107,9 +114,9 @@ export interface SettingOption {
107
114
  /** Value stored when this option is selected */
108
115
  value: string;
109
116
  /** Display label for this option */
110
- label: string;
117
+ label: string | Record<string, string>;
111
118
  /** Optional description for this option */
112
- description?: string;
119
+ description?: string | Record<string, string>;
113
120
  }
114
121
 
115
122
  /**
@@ -119,9 +126,11 @@ export interface SettingDefinition {
119
126
  /** Unique key for this setting */
120
127
  key: string;
121
128
  /** Display label */
122
- label: string;
129
+ label: string | Record<string, string>;
123
130
  /** Description shown as help text */
124
- description?: string;
131
+ description?: string | Record<string, string>;
132
+ /** Grant key used for access control */
133
+ grant?: string;
125
134
  /** Input type */
126
135
  type: SettingType;
127
136
  /** Default value (as string, will be parsed based on type) */
@@ -145,13 +154,67 @@ export interface SettingsCategory {
145
154
  /** Category ID */
146
155
  id: string;
147
156
  /** Display name */
148
- name: string;
157
+ name: string | Record<string, string>;
158
+ /** Category description (optional) */
159
+ description?: string | Record<string, string>;
149
160
  /** Category icon (optional) */
150
161
  icon?: string;
162
+ /** Optional custom view ID for system settings */
163
+ view?: string;
164
+ /** Grant key used for access control */
165
+ grant?: string;
166
+ /** Grant scope (default: "settings") */
167
+ grantScope?: "settings" | "global";
151
168
  /** Settings in this category */
152
169
  settings: SettingDefinition[];
153
170
  }
154
171
 
172
+ /**
173
+ * App-specific grant definition
174
+ */
175
+ export type AppGrantDefinition =
176
+ | AppGrantDefinitionApp
177
+ | AppGrantDefinitionPreset;
178
+
179
+ export interface AppGrantDefinitionApp {
180
+ /** Grant scope (default) */
181
+ scope?: "app";
182
+ /** Grant ID (namespaced by app ID at runtime) */
183
+ id: string;
184
+ /** Human-readable label */
185
+ label: string | Record<string, string>;
186
+ /** Optional description */
187
+ description?: string | Record<string, string>;
188
+ /** Optional permissions unlocked by this grant */
189
+ permissions?: string[];
190
+ }
191
+
192
+ export interface AppGrantDefinitionPreset {
193
+ /** Grant scope */
194
+ scope: "preset";
195
+ /** Preset ID (resolved by Eden at runtime) */
196
+ preset: string;
197
+ }
198
+
199
+ /**
200
+ * Resolved grant definition with full metadata.
201
+ * Used after preset resolution - both app and preset grants normalize to this shape.
202
+ */
203
+ export interface ResolvedGrant {
204
+ /** Grant scope - "app" for app-specific, "preset" for system-wide presets */
205
+ scope: "app" | "preset";
206
+ /** Grant ID - unique identifier for this grant */
207
+ id: string;
208
+ /** Human-readable label */
209
+ label: string | Record<string, string>;
210
+ /** Optional description */
211
+ description?: string | Record<string, string>;
212
+ /** Permissions unlocked by this grant */
213
+ permissions: string[];
214
+ /** Original preset ID (only present for preset grants) */
215
+ preset?: string;
216
+ }
217
+
155
218
  /**
156
219
  * App Manifest Interface
157
220
  *
@@ -162,8 +225,11 @@ export interface AppManifest {
162
225
  /** Unique identifier for the app (e.g., "com.example.myapp") */
163
226
  id: string;
164
227
 
165
- /** Human-readable name */
166
- name: string;
228
+ /**
229
+ * Human-readable name.
230
+ * Can be a simple string or a map of locales to names (e.g. { "en": "Files", "pl": "Pliki" })
231
+ */
232
+ name: string | Record<string, string>;
167
233
 
168
234
  /** Version string (semver recommended) */
169
235
  version: string;
@@ -234,9 +300,6 @@ export interface AppManifest {
234
300
  cwd?: string;
235
301
  };
236
302
 
237
- /** Internal flag indicating if this is a prebuilt system app */
238
- isPrebuilt?: boolean;
239
-
240
303
  /**
241
304
  * Permissions requested by this app.
242
305
  * Supports glob patterns: "fs/*" for all fs permissions, "*" for all permissions.
@@ -274,6 +337,11 @@ export interface AppManifest {
274
337
  */
275
338
  settings?: SettingsCategory[];
276
339
 
340
+ /**
341
+ * App-specific user grants for feature-level access control.
342
+ */
343
+ grants?: AppGrantDefinition[];
344
+
277
345
  /**
278
346
  * Additional files or directories to include in the bundle.
279
347
  * Use this to include files that are normally excluded (e.g., node_modules with native bindings).
@@ -282,3 +350,23 @@ export interface AppManifest {
282
350
  */
283
351
  include?: string[];
284
352
  }
353
+
354
+ /**
355
+ * Runtime App Manifest
356
+ *
357
+ * Extended manifest with computed runtime fields.
358
+ * This is what Eden uses internally after loading and processing an app.
359
+ */
360
+ export interface RuntimeAppManifest extends AppManifest {
361
+ /** Whether this is a prebuilt system app */
362
+ isPrebuilt: boolean;
363
+
364
+ /** Whether this is a core app (always allowed to launch) */
365
+ isCore: boolean;
366
+
367
+ /** Whether this app is restricted to vendor users */
368
+ isRestricted: boolean;
369
+
370
+ /** Grants with presets resolved to full definitions */
371
+ resolvedGrants: ResolvedGrant[];
372
+ }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @edenapp/types
2
2
 
3
+ ## 0.5.1
4
+
5
+ ## 0.5.0
6
+
7
+ ### Minor Changes
8
+
9
+ - major ui refinement
10
+
3
11
  ## 0.4.1
4
12
 
5
13
  ### Patch Changes
@@ -0,0 +1,186 @@
1
+ export type ContextMenuCloseReason =
2
+ | "select"
3
+ | "dismiss"
4
+ | "replaced"
5
+ | "close";
6
+
7
+ export interface ContextMenuPosition {
8
+ left?: number;
9
+ right?: number;
10
+ top?: number;
11
+ bottom?: number;
12
+ }
13
+
14
+ /**
15
+ * Available icon names for context menu items.
16
+ */
17
+ export type ContextMenuIconName =
18
+ // Actions
19
+ | "plus"
20
+ | "minus"
21
+ | "x"
22
+ | "check"
23
+ | "check-circle"
24
+ | "x-circle"
25
+ | "refresh-cw"
26
+ | "refresh-ccw"
27
+ | "rotate-cw"
28
+ | "rotate-ccw"
29
+ // Edit
30
+ | "edit"
31
+ | "edit-2"
32
+ | "edit-3"
33
+ | "scissors"
34
+ | "copy"
35
+ | "clipboard"
36
+ // Files
37
+ | "file"
38
+ | "file-text"
39
+ | "file-plus"
40
+ | "file-minus"
41
+ | "folder"
42
+ | "folder-plus"
43
+ | "folder-minus"
44
+ | "save"
45
+ | "download"
46
+ | "upload"
47
+ // Trash
48
+ | "trash"
49
+ | "trash-2"
50
+ // Navigation
51
+ | "arrow-up"
52
+ | "arrow-down"
53
+ | "arrow-left"
54
+ | "arrow-right"
55
+ | "chevron-up"
56
+ | "chevron-down"
57
+ | "chevron-left"
58
+ | "chevron-right"
59
+ | "corner-up-left"
60
+ | "corner-up-right"
61
+ | "move"
62
+ | "maximize"
63
+ | "minimize"
64
+ | "maximize-2"
65
+ | "minimize-2"
66
+ // View
67
+ | "eye"
68
+ | "eye-off"
69
+ | "zoom-in"
70
+ | "zoom-out"
71
+ | "search"
72
+ | "filter"
73
+ | "list"
74
+ | "grid"
75
+ | "layout"
76
+ | "sidebar"
77
+ | "columns"
78
+ // Media
79
+ | "play"
80
+ | "pause"
81
+ | "stop-circle"
82
+ | "skip-back"
83
+ | "skip-forward"
84
+ | "volume"
85
+ | "volume-1"
86
+ | "volume-2"
87
+ | "volume-x"
88
+ | "image"
89
+ | "camera"
90
+ | "film"
91
+ | "music"
92
+ // Communication
93
+ | "mail"
94
+ | "message-square"
95
+ | "message-circle"
96
+ | "send"
97
+ | "share"
98
+ | "share-2"
99
+ | "phone"
100
+ // Users
101
+ | "user"
102
+ | "user-plus"
103
+ | "user-minus"
104
+ | "user-x"
105
+ | "user-check"
106
+ | "users"
107
+ // Settings
108
+ | "settings"
109
+ | "sliders"
110
+ | "tool"
111
+ | "wrench"
112
+ | "terminal"
113
+ | "code"
114
+ // Status
115
+ | "info"
116
+ | "alert-circle"
117
+ | "alert-triangle"
118
+ | "help-circle"
119
+ | "bell"
120
+ | "bell-off"
121
+ // Misc
122
+ | "star"
123
+ | "heart"
124
+ | "bookmark"
125
+ | "flag"
126
+ | "tag"
127
+ | "clock"
128
+ | "calendar"
129
+ | "lock"
130
+ | "unlock"
131
+ | "key"
132
+ | "shield"
133
+ | "link"
134
+ | "link-2"
135
+ | "external-link"
136
+ | "log-in"
137
+ | "log-out"
138
+ | "power"
139
+ | "more-horizontal"
140
+ | "more-vertical"
141
+ | "menu"
142
+ | "home"
143
+ | "globe"
144
+ | "package"
145
+ | "printer"
146
+ | "archive"
147
+ | "box"
148
+ | "hash"
149
+ | "at-sign"
150
+ | "percent"
151
+ | "type"
152
+ | "bold"
153
+ | "italic"
154
+ | "underline"
155
+ | "align-left"
156
+ | "align-center"
157
+ | "align-right";
158
+
159
+ export type ContextMenuItem =
160
+ | {
161
+ type: "item";
162
+ id: string;
163
+ label: string;
164
+ icon?: ContextMenuIconName;
165
+ shortcut?: string;
166
+ disabled?: boolean;
167
+ danger?: boolean;
168
+ }
169
+ | { type: "separator" }
170
+ | { type: "title"; label: string };
171
+
172
+ export interface ContextMenuOpenArgs {
173
+ title?: string;
174
+ position: ContextMenuPosition;
175
+ items: ContextMenuItem[];
176
+ }
177
+
178
+ export interface ContextMenuOpenEvent extends ContextMenuOpenArgs {
179
+ requestId: string;
180
+ }
181
+
182
+ export interface ContextMenuResult {
183
+ requestId: string;
184
+ itemId?: string;
185
+ reason: ContextMenuCloseReason;
186
+ }
package/EdenConfig.d.ts CHANGED
@@ -28,12 +28,20 @@ export interface EdenConfig {
28
28
  window?: {
29
29
  width?: number;
30
30
  height?: number;
31
+ minWidth?: number;
32
+ minHeight?: number;
31
33
  title?: string;
32
34
  backgroundColor?: string;
33
35
  };
34
36
  tiling?: TilingConfig;
35
37
  development?: boolean;
36
38
 
37
- /** List of app IDs to start automatically when Eden launches */
38
- autostart?: string[];
39
+ /** App ID used for login UI when no user is active */
40
+ loginAppId?: string;
41
+
42
+ /** Apps allowed to launch regardless of user grants */
43
+ coreApps?: string[];
44
+
45
+ /** Apps blocked from launch for non-vendor users */
46
+ restrictedApps?: string[];
39
47
  }
@@ -0,0 +1,24 @@
1
+ import type { EdenUserConfig } from "./User";
2
+
3
+ export interface EdenSeedSettings {
4
+ /** Map of appId to settings key/value pairs */
5
+ [appId: string]: Record<string, string>;
6
+ }
7
+
8
+ /**
9
+ * Seed data for one-time initialization
10
+ *
11
+ * Contains data that is seeded into the database on first run.
12
+ * This is separate from runtime config because the data becomes
13
+ * mutable after seeding.
14
+ */
15
+ export interface EdenSeedConfig {
16
+ /** Users to seed on first run */
17
+ users?: EdenUserConfig[];
18
+
19
+ /** Default username to seed */
20
+ defaultUsername?: string;
21
+
22
+ /** Settings to seed (namespaced by appId) */
23
+ settings?: EdenSeedSettings;
24
+ }
package/User.d.ts ADDED
@@ -0,0 +1,20 @@
1
+ export type UserRole = "standard" | "vendor";
2
+
3
+ export interface UserProfile {
4
+ username: string;
5
+ name: string;
6
+ role: UserRole;
7
+ grants: string[];
8
+ createdAt: number;
9
+ updatedAt: number;
10
+ }
11
+
12
+ export interface EdenUserConfig {
13
+ username: string;
14
+ name: string;
15
+ role?: UserRole;
16
+ password?: string;
17
+ passwordHash?: string;
18
+ passwordSalt?: string;
19
+ grants?: string[];
20
+ }
@@ -1,8 +1,9 @@
1
1
  /**
2
2
  * AUTO-GENERATED FILE - DO NOT EDIT
3
- *
4
- * This file is automatically generated by scripts/generate-commands.ts
5
- * Run 'npm run codegen' to regenerate.
3
+ *
4
+ * This file is automatically generated by scripts/codegen
5
+ * Generated by scripts/codegen
6
+ * Run 'pnpm run codegen' to regenerate.
6
7
  */
7
8
 
8
9
  /**
@@ -72,6 +73,51 @@ export interface AppbusCommands {
72
73
  };
73
74
  }
74
75
 
76
+ /**
77
+ * AppearanceCommands - Commands for the "appearance" namespace
78
+ */
79
+ export interface AppearanceCommands {
80
+ "appearance/set-wallpaper": {
81
+ args: {
82
+ wallpaper: import("./index").WallpaperConfig };
83
+ response: void;
84
+ };
85
+ "appearance/get-wallpaper": {
86
+ args: Record<string, never>;
87
+ response: { wallpaper: import("./index").WallpaperPreset };
88
+ };
89
+ "appearance/get-presets": {
90
+ args: Record<string, never>;
91
+ response: {
92
+ solid: import("./index").WallpaperPreset[];
93
+ gradients: import("./index").WallpaperPreset[];
94
+ };
95
+ };
96
+ }
97
+
98
+ /**
99
+ * ContextMenuCommands - Commands for the "context-menu" namespace
100
+ */
101
+ export interface ContextMenuCommands {
102
+ "context-menu/register-display": {
103
+ args: { };
104
+ response: { success: boolean };
105
+ };
106
+ "context-menu/open": {
107
+ args: import("./index").ContextMenuOpenArgs & { };
108
+ response: { requestId: string };
109
+ };
110
+ "context-menu/resolve": {
111
+ args: import("./index").ContextMenuResult & { };
112
+ response: { success: boolean };
113
+ };
114
+ "context-menu/close": {
115
+ args: {
116
+ requestId?: string };
117
+ response: { success: boolean };
118
+ };
119
+ }
120
+
75
121
  /**
76
122
  * DbCommands - Commands for the "db" namespace
77
123
  */
@@ -193,21 +239,26 @@ export interface FileCommands {
193
239
  * Open a file with a specific app
194
240
  */
195
241
  "file/open-with": {
196
- args: { path: string; appId: string };
242
+ args: {
243
+ path: string;
244
+ appId: string };
197
245
  response: import("./index").FileOpenResult;
198
246
  };
199
247
  /**
200
248
  * Get the default handler app for a file extension
201
249
  */
202
250
  "file/get-handler": {
203
- args: { extension: string };
251
+ args: {
252
+ extension: string };
204
253
  response: { appId: string | undefined };
205
254
  };
206
255
  /**
207
256
  * Set user preference for a file extension's default handler
208
257
  */
209
258
  "file/set-default-handler": {
210
- args: { extension: string; appId: string };
259
+ args: {
260
+ extension: string;
261
+ appId: string };
211
262
  response: void;
212
263
  };
213
264
  /**
@@ -221,7 +272,8 @@ export interface FileCommands {
221
272
  * Get all apps that can handle a specific file extension
222
273
  */
223
274
  "file/get-supported-handlers": {
224
- args: { extension: string };
275
+ args: {
276
+ extension: string };
225
277
  response: import("./index").FileHandlerInfo[];
226
278
  };
227
279
  /**
@@ -229,7 +281,10 @@ export interface FileCommands {
229
281
  */
230
282
  "file/get-associations": {
231
283
  args: Record<string, never>;
232
- response: Record<string, { default: string | undefined; userOverride: string | undefined }>;
284
+ response: Record<
285
+ string,
286
+ { default: string | undefined; userOverride: string | undefined }
287
+ >;
233
288
  };
234
289
  }
235
290
 
@@ -304,22 +359,34 @@ export interface FsCommands {
304
359
  };
305
360
  }
306
361
 
362
+ /**
363
+ * I18nCommands - Commands for the "i18n" namespace
364
+ */
365
+ export interface I18nCommands {
366
+ "i18n/get-locale": {
367
+ args: Record<string, never>;
368
+ response: { locale: string };
369
+ };
370
+ "i18n/get-common": {
371
+ args: { locale: string };
372
+ response: {
373
+ translations: Record<string, any>;
374
+ };
375
+ };
376
+ }
377
+
307
378
  /**
308
379
  * EventCommands - Commands for the "event" namespace
309
380
  */
310
381
  export interface EventCommands {
311
382
  "event/subscribe": {
312
383
  args: {
313
- eventName: string;
314
- _callerWebContentsId?: number;
315
- _callerAppId?: string };
384
+ eventName: string };
316
385
  response: void;
317
386
  };
318
387
  "event/unsubscribe": {
319
388
  args: {
320
- eventName: string;
321
- _callerWebContentsId?: number;
322
- _callerAppId?: string };
389
+ eventName: string };
323
390
  response: void;
324
391
  };
325
392
  "event/exists": {
@@ -353,8 +420,9 @@ export interface PackageCommands {
353
420
  * Install an application from a local path.
354
421
  */
355
422
  "package/install": {
356
- args: { sourcePath: string };
357
- response: import("./index").AppManifest;
423
+ args: {
424
+ sourcePath: string };
425
+ response: import("./index").RuntimeAppManifest;
358
426
  };
359
427
  /**
360
428
  * Uninstall an application by its ID.
@@ -365,11 +433,14 @@ export interface PackageCommands {
365
433
  };
366
434
  /**
367
435
  * List all installed applications.
368
- * @param showHidden - If true, includes overlay apps (hidden by default)
436
+ * @param showHidden - If true, includes overlay apps and daemons (hidden by default)
437
+ * @param showRestricted - If true, includes apps the current user cannot launch (hidden by default)
369
438
  */
370
439
  "package/list": {
371
- args: { showHidden?: boolean };
372
- response: import("./index").AppManifest[];
440
+ args: {
441
+ showHidden?: boolean;
442
+ showRestricted?: boolean };
443
+ response: import("./index").RuntimeAppManifest[];
373
444
  };
374
445
  /**
375
446
  * Toggle hot reload for an app
@@ -403,6 +474,14 @@ export interface PackageCommands {
403
474
  path: string };
404
475
  response: { success: boolean; manifest?: import("./index").AppManifest; error?: string };
405
476
  };
477
+ /**
478
+ * Get the installed size of an app in bytes
479
+ */
480
+ "package/get-size": {
481
+ args: {
482
+ appId: string };
483
+ response: { size: number | undefined };
484
+ };
406
485
  }
407
486
 
408
487
  /**
@@ -500,18 +579,22 @@ export interface SettingsCommands {
500
579
  };
501
580
  /**
502
581
  * List all settings in any app's namespace (superuser only)
582
+ * @param showRestricted - If true, includes settings the current user cannot access (hidden by default)
503
583
  */
504
584
  "settings/list/su": {
505
585
  args: {
506
- appId: string };
586
+ appId: string;
587
+ showRestricted?: boolean };
507
588
  response: { keys: string[] };
508
589
  };
509
590
  /**
510
591
  * Get all settings with values for any app (superuser only)
592
+ * @param showRestricted - If true, includes settings the current user cannot access (hidden by default)
511
593
  */
512
594
  "settings/get-all/su": {
513
595
  args: {
514
- appId: string };
596
+ appId: string;
597
+ showRestricted?: boolean };
515
598
  response: { settings: Record<string, string> };
516
599
  };
517
600
  /**
@@ -526,13 +609,122 @@ export interface SettingsCommands {
526
609
  };
527
610
  /**
528
611
  * Get the Eden settings schema
612
+ * @param showRestricted - If true, includes settings the current user cannot access (hidden by default)
529
613
  */
530
614
  "settings/schema": {
531
- args: Record<string, never>;
615
+ args: {
616
+ showRestricted?: boolean };
532
617
  response: { schema: import("./index").SettingsCategory[] };
533
618
  };
534
619
  }
535
620
 
621
+ /**
622
+ * UserCommands - Commands for the "user" namespace
623
+ */
624
+ export interface UserCommands {
625
+ /**
626
+ * List all users.
627
+ */
628
+ "user/list": {
629
+ args: Record<string, never>;
630
+ response: { users: import("./index").UserProfile[] };
631
+ };
632
+ /**
633
+ * Return the current logged-in user.
634
+ */
635
+ "user/get-current": {
636
+ args: Record<string, never>;
637
+ response: { user: import("./index").UserProfile | null };
638
+ };
639
+ /**
640
+ * Authenticate a user and establish a session.
641
+ */
642
+ "user/login": {
643
+ args: {
644
+ username: string;
645
+ password: string };
646
+ response: { success: boolean; user?: import("./index").UserProfile; error?: string };
647
+ };
648
+ /**
649
+ * End the current session.
650
+ */
651
+ "user/logout": {
652
+ args: Record<string, never>;
653
+ response: { success: boolean };
654
+ };
655
+ /**
656
+ * Create a new user.
657
+ */
658
+ "user/create": {
659
+ args: {
660
+ username?: string;
661
+ name: string;
662
+ role?: import("./index").UserRole;
663
+ password: string;
664
+ grants?: string[] };
665
+ response: { user: import("./index").UserProfile };
666
+ };
667
+ /**
668
+ * Update user profile details or grants.
669
+ */
670
+ "user/update": {
671
+ args: {
672
+ username: string;
673
+ name?: string;
674
+ role?: import("./index").UserRole;
675
+ grants?: string[] };
676
+ response: { user: import("./index").UserProfile };
677
+ };
678
+ /**
679
+ * Delete a user.
680
+ */
681
+ "user/delete": {
682
+ args: {
683
+ username: string };
684
+ response: { success: boolean };
685
+ };
686
+ /**
687
+ * Set a user's password.
688
+ */
689
+ "user/set-password": {
690
+ args: {
691
+ username: string;
692
+ password: string };
693
+ response: { success: boolean };
694
+ };
695
+ /**
696
+ * Change the current user's password.
697
+ */
698
+ "user/change-password": {
699
+ args: {
700
+ currentPassword: string;
701
+ newPassword: string };
702
+ response: { success: boolean; error?: string };
703
+ };
704
+ /**
705
+ * Check whether the current user has a specific grant.
706
+ */
707
+ "user/has-grant": {
708
+ args: { grant: string };
709
+ response: { allowed: boolean };
710
+ };
711
+ /**
712
+ * Return the configured default username.
713
+ */
714
+ "user/get-default": {
715
+ args: Record<string, never>;
716
+ response: { username: string | null };
717
+ };
718
+ /**
719
+ * Update the configured default username.
720
+ */
721
+ "user/set-default": {
722
+ args: {
723
+ username: string | null };
724
+ response: { success: boolean };
725
+ };
726
+ }
727
+
536
728
  /**
537
729
  * ViewCommands - Commands for the "view" namespace
538
730
  */
@@ -629,9 +821,25 @@ export interface ViewCommands {
629
821
  args: Record<string, never>;
630
822
  response: import("./index").WindowSize;
631
823
  };
824
+ /**
825
+ * Set the interface scale (zoom factor) for all views.
826
+ * @param scale - Scale factor as a string (e.g., "1.0" for 100%, "1.5" for 150%)
827
+ */
828
+ "view/set-interface-scale": {
829
+ args: {
830
+ scale: string };
831
+ response: { success: boolean };
832
+ };
833
+ /**
834
+ * Get the current interface scale.
835
+ */
836
+ "view/get-interface-scale": {
837
+ args: Record<string, never>;
838
+ response: { scale: number };
839
+ };
632
840
  }
633
841
 
634
842
  /**
635
843
  * Global command map - merge all command namespaces
636
844
  */
637
- export interface CommandMap extends SystemCommands, AppbusCommands, DbCommands, FileCommands, FsCommands, EventCommands, NotificationCommands, PackageCommands, ProcessCommands, SettingsCommands, ViewCommands {}
845
+ export interface CommandMap extends SystemCommands, AppbusCommands, AppearanceCommands, ContextMenuCommands, DbCommands, FileCommands, FsCommands, I18nCommands, EventCommands, NotificationCommands, PackageCommands, ProcessCommands, SettingsCommands, UserCommands, ViewCommands {}
@@ -1,10 +1,26 @@
1
1
  /**
2
2
  * AUTO-GENERATED FILE - DO NOT EDIT
3
- *
4
- * This file is automatically generated by scripts/generate-commands.ts
3
+ *
4
+ * This file is automatically generated by scripts/codegen
5
+ * Generated by scripts/codegen
5
6
  * Run 'pnpm run codegen' to regenerate.
6
7
  */
7
8
 
9
+ /**
10
+ * AppearanceEvents - Events for the "appearance" namespace
11
+ */
12
+ export interface AppearanceEvents {
13
+ "appearance/wallpaper-changed": import("./index").WallpaperPreset;
14
+ }
15
+
16
+ /**
17
+ * ContextMenuEvents - Events for the "context-menu" namespace
18
+ */
19
+ export interface ContextMenuEvents {
20
+ "context-menu/opened": { menu: import("./index").ContextMenuOpenEvent };
21
+ "context-menu/closed": import("./index").ContextMenuResult;
22
+ }
23
+
8
24
  /**
9
25
  * FileEvents - Events for the "file" namespace
10
26
  */
@@ -12,6 +28,13 @@ export interface FileEvents {
12
28
  "file/opened": { path: string; isDirectory: boolean; appId: string };
13
29
  }
14
30
 
31
+ /**
32
+ * I18nEvents - Events for the "i18n" namespace
33
+ */
34
+ export interface I18nEvents {
35
+ "i18n/locale-changed": { locale: string };
36
+ }
37
+
15
38
  /**
16
39
  * NotificationEvents - Events for the "notification" namespace
17
40
  */
@@ -24,7 +47,7 @@ export interface NotificationEvents {
24
47
  * PackageEvents - Events for the "package" namespace
25
48
  */
26
49
  export interface PackageEvents {
27
- "package/installed": { manifest: import("./index").AppManifest };
50
+ "package/installed": { manifest: import("./index").RuntimeAppManifest };
28
51
  "package/uninstalled": { appId: string };
29
52
  }
30
53
 
@@ -45,6 +68,17 @@ export interface SettingsEvents {
45
68
  "settings/changed": { appId: string; key: string; value: string };
46
69
  }
47
70
 
71
+ /**
72
+ * UserEvents - Events for the "user" namespace
73
+ */
74
+ export interface UserEvents {
75
+ "user/changed": {
76
+ currentUser: import("./index").UserProfile | null;
77
+ previousUsername: string | null;
78
+ reason: "login" | "logout" | "system";
79
+ };
80
+ }
81
+
48
82
  /**
49
83
  * ViewEvents - Events for the "view" namespace
50
84
  */
@@ -67,4 +101,4 @@ export interface ViewEvents {
67
101
  /**
68
102
  * Global event map - merge all event namespaces
69
103
  */
70
- export interface AppEvents extends FileEvents, NotificationEvents, PackageEvents, ProcessEvents, SettingsEvents, ViewEvents {}
104
+ export interface AppEvents extends AppearanceEvents, ContextMenuEvents, FileEvents, I18nEvents, NotificationEvents, PackageEvents, ProcessEvents, SettingsEvents, UserEvents, ViewEvents {}
package/global.d.ts CHANGED
@@ -5,10 +5,12 @@ import type { EdenAPI, AppBusAPI, AppBusConnection } from "./ipc";
5
5
  export interface EdenFrame {
6
6
  // Public API
7
7
  setTitle: (title: string) => void;
8
+ resetTitle: () => void;
8
9
 
9
10
  // Internal state (used by frame system)
10
11
  _internal: {
11
12
  appId: string;
13
+ appName: string | Record<string, string>;
12
14
  injected: boolean;
13
15
  config: {
14
16
  mode?: "tiled" | "floating" | "both";
package/index.d.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  import { AppManifest } from "./AppManifest";
2
2
 
3
3
  export * from "./EdenConfig";
4
+ export * from "./EdenSeedConfig";
5
+ export * from "./User";
4
6
 
5
7
  export * from "./AppManifest";
6
8
 
@@ -93,6 +95,7 @@ export interface SystemInfo {
93
95
  nodeVersion: string;
94
96
  electronVersion: string;
95
97
  runningApps: string[];
98
+ release: boolean;
96
99
  }
97
100
 
98
101
  export interface WindowSize {
@@ -162,3 +165,16 @@ export interface Notification {
162
165
  /** Notification type for styling (default: info) */
163
166
  type?: NotificationType;
164
167
  }
168
+
169
+ export * from "./ContextMenu";
170
+
171
+ export interface WallpaperPreset {
172
+ id: string;
173
+ name: string;
174
+ type: "color" | "gradient" | "custom";
175
+ value: string;
176
+ }
177
+
178
+ export type WallpaperConfig =
179
+ | { type: "preset"; id: string }
180
+ | { type: "custom"; value: string };
package/ipc/appbus.d.ts CHANGED
@@ -117,31 +117,31 @@ export interface AppBusConnection<
117
117
  /** Listen for messages from the other side */
118
118
  on<K extends keyof TReceive>(
119
119
  method: K,
120
- callback: (args: TReceive[K]) => void
120
+ callback: (args: TReceive[K]) => void,
121
121
  ): void;
122
122
  /** Listen for messages only once, then auto-remove */
123
123
  once<K extends keyof TReceive>(
124
124
  method: K,
125
- callback: (args: TReceive[K]) => void
125
+ callback: (args: TReceive[K]) => void,
126
126
  ): void;
127
127
  /** Remove a listener */
128
128
  off<K extends keyof TReceive>(
129
129
  method: K,
130
- callback: (args: TReceive[K]) => void
130
+ callback: (args: TReceive[K]) => void,
131
131
  ): void;
132
132
 
133
133
  /** Send a request and wait for response (other side handles) */
134
134
  request<K extends keyof TRequest>(
135
135
  method: K,
136
- args?: TRequest[K]["args"]
136
+ args?: TRequest[K]["args"],
137
137
  ): Promise<TRequest[K]["result"]>;
138
138
 
139
139
  /** Register a handler for requests from the other side */
140
140
  handle<K extends keyof THandle>(
141
141
  method: K,
142
142
  handler: (
143
- args: THandle[K]["args"]
144
- ) => THandle[K]["result"] | Promise<THandle[K]["result"]>
143
+ args: THandle[K]["args"],
144
+ ) => THandle[K]["result"] | Promise<THandle[K]["result"]>,
145
145
  ): void;
146
146
  /** Remove a handler */
147
147
  removeHandler<K extends keyof THandle>(method: K): void;
@@ -166,7 +166,7 @@ export interface ClientInfo {
166
166
  */
167
167
  export type ServiceConnectCallback = (
168
168
  connection: AppBusConnection,
169
- clientInfo: ClientInfo
169
+ clientInfo: ClientInfo,
170
170
  ) => void;
171
171
 
172
172
  /**
@@ -200,7 +200,7 @@ export interface AppBusAPI {
200
200
  exposeService(
201
201
  serviceName: string,
202
202
  onConnect: ServiceConnectCallback,
203
- options?: ServiceOptions
203
+ options?: ServiceOptions,
204
204
  ): Promise<{ success: boolean; error?: string }>;
205
205
 
206
206
  /**
@@ -216,7 +216,7 @@ export interface AppBusAPI {
216
216
  */
217
217
  connect(
218
218
  targetAppId: string,
219
- serviceName: string
219
+ serviceName: string,
220
220
  ): Promise<AppBusConnection | { error: string }>;
221
221
 
222
222
  /**
package/ipc/edenapi.d.ts CHANGED
@@ -28,7 +28,7 @@ export interface EdenAPI {
28
28
  */
29
29
  shellCommand<T extends CommandName>(
30
30
  command: T,
31
- args: CommandArgs<T>
31
+ args: CommandArgs<T>,
32
32
  ): Promise<CommandResult<T>>;
33
33
 
34
34
  /**
@@ -38,7 +38,7 @@ export interface EdenAPI {
38
38
  */
39
39
  subscribe<T extends EventName>(
40
40
  event: T,
41
- callback: (data: EventData<T>) => void
41
+ callback: (data: EventData<T>) => void,
42
42
  ): Promise<void>;
43
43
 
44
44
  /**
@@ -46,7 +46,7 @@ export interface EdenAPI {
46
46
  */
47
47
  unsubscribe<T extends EventName>(
48
48
  event: T,
49
- callback: (data: EventData<T>) => void
49
+ callback: (data: EventData<T>) => void,
50
50
  ): void;
51
51
 
52
52
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edenapp/types",
3
- "version": "0.4.1",
3
+ "version": "0.5.1",
4
4
  "description": "TypeScript type definitions for the Eden platform",
5
5
  "types": "index.d.ts",
6
6
  "author": "Dariusz Majnert",