@edenapp/types 0.8.0 → 0.10.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.
@@ -0,0 +1,10 @@
1
+ export interface AppAssociation {
2
+ appId: string;
3
+ kind: string;
4
+ label?: string;
5
+ }
6
+
7
+ export interface AppAssociationStore {
8
+ version: 1;
9
+ associations: Record<string, AppAssociation>;
10
+ }
package/AppManifest.d.ts CHANGED
@@ -77,6 +77,16 @@ export interface WindowConfig {
77
77
  /** Whether to show the title in the title bar (default: true) */
78
78
  showTitle?: boolean;
79
79
 
80
+ /** Whether to show the minimize button in the title bar (default: true) */
81
+ showMinimize?: boolean;
82
+
83
+ /**
84
+ * Stacking priority for overlay windows (default: 0).
85
+ * Higher-priority overlays are displayed above lower-priority overlays.
86
+ * Within the same priority, normal view recency controls ordering.
87
+ */
88
+ overlayPriority?: number;
89
+
80
90
  /** Controls which Eden runtime helpers are injected into the app */
81
91
  injections?: WindowInjectionOptions;
82
92
 
@@ -147,6 +157,8 @@ export interface SettingDefinition {
147
157
  description?: string | Record<string, string>;
148
158
  /** Grant key used for access control */
149
159
  grant?: string;
160
+ /** App IDs allowed to read this setting from the owner's namespace */
161
+ sharedWith?: string[];
150
162
  /** Input type */
151
163
  type: SettingType;
152
164
  /** Default value (as string, will be parsed based on type) */
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # @edenapp/types
2
2
 
3
+ ## 0.10.0
4
+
5
+ ## 0.9.0
6
+
3
7
  ## 0.8.0
4
8
 
5
9
  ### Minor Changes
@@ -0,0 +1,42 @@
1
+ import type { ViewBounds } from "./index";
2
+
3
+ export type FilePickerMode = "open" | "save";
4
+
5
+ export type FilePickerSelectionMode = "file" | "directory";
6
+
7
+ export type FilePickerCloseReason = "select" | "cancel" | "close";
8
+
9
+ export interface FilePickerFilter {
10
+ name: string;
11
+ extensions?: string[];
12
+ mimeTypes?: string[];
13
+ }
14
+
15
+ export interface FilePickerOpenArgs {
16
+ mode: FilePickerMode;
17
+ selection?: FilePickerSelectionMode;
18
+ multiple?: boolean;
19
+ title?: string;
20
+ initialPath?: string;
21
+ suggestedName?: string;
22
+ filters?: FilePickerFilter[];
23
+ confirmLabel?: string;
24
+ canCreateDirectories?: boolean;
25
+ overwritePrompt?: boolean;
26
+ }
27
+
28
+ export interface FilePickerOpenEvent extends FilePickerOpenArgs {
29
+ requestId: string;
30
+ opener: {
31
+ appId: string;
32
+ viewId?: number;
33
+ bounds?: ViewBounds;
34
+ };
35
+ }
36
+
37
+ export interface FilePickerResult {
38
+ requestId: string;
39
+ reason: FilePickerCloseReason;
40
+ path?: string;
41
+ paths?: string[];
42
+ }
@@ -19,6 +19,36 @@ export interface SystemCommands {
19
19
  };
20
20
  }
21
21
 
22
+ /**
23
+ * AssociationsCommands - Commands for the "associations" namespace
24
+ */
25
+ export interface AssociationsCommands {
26
+ "associations/get": {
27
+ args: { key: string };
28
+ response: {
29
+ association: import("./index").AppAssociation | undefined;
30
+ };
31
+ };
32
+ "associations/set": {
33
+ args: {
34
+ key: string;
35
+ appId: string;
36
+ kind: string;
37
+ label?: string };
38
+ response: { success: boolean };
39
+ };
40
+ "associations/remove": {
41
+ args: { key: string };
42
+ response: { success: boolean };
43
+ };
44
+ "associations/list": {
45
+ args: { kindPrefix?: string };
46
+ response: {
47
+ associations: Record<string, import("./index").AppAssociation>;
48
+ };
49
+ };
50
+ }
51
+
22
52
  /**
23
53
  * AppbusCommands - Commands for the "appbus" namespace
24
54
  */
@@ -288,6 +318,29 @@ export interface FileCommands {
288
318
  };
289
319
  }
290
320
 
321
+ /**
322
+ * FilePickerCommands - Commands for the "file-picker" namespace
323
+ */
324
+ export interface FilePickerCommands {
325
+ "file-picker/register-display": {
326
+ args: { };
327
+ response: { success: boolean };
328
+ };
329
+ "file-picker/open": {
330
+ args: import("./index").FilePickerOpenArgs & { };
331
+ response: { requestId: string };
332
+ };
333
+ "file-picker/resolve": {
334
+ args: import("./index").FilePickerResult & { };
335
+ response: { success: boolean };
336
+ };
337
+ "file-picker/close": {
338
+ args: {
339
+ requestId?: string };
340
+ response: { success: boolean };
341
+ };
342
+ }
343
+
291
344
  /**
292
345
  * FsCommands - Commands for the "fs" namespace
293
346
  */
@@ -421,6 +474,13 @@ export interface EventCommands {
421
474
  * NotificationCommands - Commands for the "notification" namespace
422
475
  */
423
476
  export interface NotificationCommands {
477
+ /**
478
+ * Register the notification display provider.
479
+ */
480
+ "notification/register-display": {
481
+ args: { };
482
+ response: { success: boolean };
483
+ };
424
484
  /**
425
485
  * Push a new notification to subscribers.
426
486
  */
@@ -429,9 +489,27 @@ export interface NotificationCommands {
429
489
  title: string;
430
490
  message: string;
431
491
  timeout?: number;
432
- type?: import("./index").NotificationType };
492
+ type?: import("./index").NotificationType;
493
+ actions?: import("./index").NotificationAction[] };
433
494
  response: import("./index").Notification;
434
495
  };
496
+ /**
497
+ * Report a notification action click from the toaster.
498
+ */
499
+ "notification/action-clicked": {
500
+ args: {
501
+ notificationId: string;
502
+ actionId: string };
503
+ response: { success: boolean };
504
+ };
505
+ /**
506
+ * Report a notification dismissal from the toaster.
507
+ */
508
+ "notification/dismissed": {
509
+ args: {
510
+ notificationId: string };
511
+ response: { success: boolean };
512
+ };
435
513
  }
436
514
 
437
515
  /**
@@ -571,7 +649,8 @@ export interface SettingsCommands {
571
649
  */
572
650
  "settings/get": {
573
651
  args: {
574
- key: string };
652
+ key: string;
653
+ appId?: string };
575
654
  response: { value: string | undefined };
576
655
  };
577
656
  /**
@@ -925,4 +1004,4 @@ export interface ViewCommands {
925
1004
  /**
926
1005
  * Global command map - merge all command namespaces
927
1006
  */
928
- export interface CommandMap extends SystemCommands, AppbusCommands, AppearanceCommands, ContextMenuCommands, DbCommands, FileCommands, FsCommands, I18nCommands, EventCommands, NotificationCommands, PackageCommands, ProcessCommands, SettingsCommands, UserCommands, ViewCommands {}
1007
+ export interface CommandMap extends SystemCommands, AssociationsCommands, AppbusCommands, AppearanceCommands, ContextMenuCommands, DbCommands, FileCommands, FilePickerCommands, FsCommands, I18nCommands, EventCommands, NotificationCommands, PackageCommands, ProcessCommands, SettingsCommands, UserCommands, ViewCommands {}
@@ -28,6 +28,14 @@ export interface FileEvents {
28
28
  "file/opened": { path: string; isDirectory: boolean; appId: string };
29
29
  }
30
30
 
31
+ /**
32
+ * FilePickerEvents - Events for the "file-picker" namespace
33
+ */
34
+ export interface FilePickerEvents {
35
+ "file-picker/opened": { picker: import("./index").FilePickerOpenEvent };
36
+ "file-picker/closed": import("./index").FilePickerResult;
37
+ }
38
+
31
39
  /**
32
40
  * I18nEvents - Events for the "i18n" namespace
33
41
  */
@@ -41,6 +49,10 @@ export interface I18nEvents {
41
49
  export interface NotificationEvents {
42
50
  "notification/added": { notification: import("./index").Notification };
43
51
  "notification/removed": { id: string };
52
+ "notification/action-clicked": {
53
+ notificationId: string;
54
+ actionId: string;
55
+ };
44
56
  }
45
57
 
46
58
  /**
@@ -101,4 +113,4 @@ export interface ViewEvents {
101
113
  /**
102
114
  * Global event map - merge all event namespaces
103
115
  */
104
- export interface AppEvents extends AppearanceEvents, ContextMenuEvents, FileEvents, I18nEvents, NotificationEvents, PackageEvents, ProcessEvents, SettingsEvents, UserEvents, ViewEvents {}
116
+ export interface AppEvents extends AppearanceEvents, ContextMenuEvents, FileEvents, FilePickerEvents, I18nEvents, NotificationEvents, PackageEvents, ProcessEvents, SettingsEvents, UserEvents, ViewEvents {}
package/global.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  // Ambient declarations for renderer globals
2
2
 
3
3
  import type { AppFrameInjectionMode, CSSInjectionMode } from "./AppManifest";
4
+ import type { EdenKeyboardAPI } from "./keyboard";
4
5
  import type { EdenAPI, AppBusAPI, AppBusConnection } from "./ipc";
5
6
 
6
7
  export interface EdenFrame {
@@ -19,6 +20,8 @@ export interface EdenFrame {
19
20
  config: {
20
21
  mode?: "tiled" | "floating" | "both";
21
22
  showTitle?: boolean;
23
+ showMinimize?: boolean;
24
+ overlayPriority?: number;
22
25
  defaultSize?: { width: number; height: number };
23
26
  defaultPosition?: { x: number; y: number };
24
27
  movable?: boolean;
@@ -59,5 +62,6 @@ declare global {
59
62
  getAppAPI: () => AppBusConnection;
60
63
 
61
64
  edenFrame?: EdenFrame;
65
+ edenKeyboard: EdenKeyboardAPI;
62
66
  }
63
67
  }
package/index.d.ts CHANGED
@@ -5,6 +5,7 @@ export * from "./EdenSeedConfig";
5
5
  export * from "./User";
6
6
 
7
7
  export * from "./AppManifest";
8
+ export * from "./AppAssociation";
8
9
  export * from "./ProcessMetrics";
9
10
 
10
11
  export * from "./global";
@@ -12,6 +13,7 @@ export * from "./global";
12
13
  export * from "./worker";
13
14
 
14
15
  export * from "./ipc";
16
+ export * from "./keyboard";
15
17
 
16
18
  /**
17
19
  * App Instance Interface
@@ -157,6 +159,12 @@ export interface SearchResult {
157
159
  */
158
160
  export type NotificationType = "info" | "success" | "warning" | "danger";
159
161
 
162
+ export interface NotificationAction {
163
+ id: string;
164
+ label: string;
165
+ dismissOnClick?: boolean;
166
+ }
167
+
160
168
  /**
161
169
  * Notification data structure
162
170
  */
@@ -169,9 +177,11 @@ export interface Notification {
169
177
  createdAt: number;
170
178
  /** Notification type for styling (default: info) */
171
179
  type?: NotificationType;
180
+ actions?: NotificationAction[];
172
181
  }
173
182
 
174
183
  export * from "./ContextMenu";
184
+ export * from "./FilePicker";
175
185
 
176
186
  export interface WallpaperPreset {
177
187
  id: string;
package/keyboard.d.ts ADDED
@@ -0,0 +1,72 @@
1
+ export type EdenKeyboardPlacementMode = "docked" | "floating";
2
+
3
+ export type EdenKeyboardLayout = "text" | "number";
4
+
5
+ export interface EdenKeyboardTargetBounds {
6
+ x: number;
7
+ y: number;
8
+ width: number;
9
+ height: number;
10
+ }
11
+
12
+ export interface EdenKeyboardTarget {
13
+ kind: "input" | "textarea" | "contenteditable";
14
+ multiline: boolean;
15
+ inputType?: string | null;
16
+ inputMode?: string | null;
17
+ enterKeyHint?: string | null;
18
+ }
19
+
20
+ export interface EdenKeyboardFocusState {
21
+ visible: boolean;
22
+ sessionId: number;
23
+ target?: EdenKeyboardTarget;
24
+ targetBounds?: EdenKeyboardTargetBounds;
25
+ placementMode?: EdenKeyboardPlacementMode;
26
+ }
27
+
28
+ export interface EdenKeyboardInsetState {
29
+ visible: boolean;
30
+ placementMode: EdenKeyboardPlacementMode;
31
+ bottomInset: number;
32
+ }
33
+
34
+ export interface EdenKeyboardState extends EdenKeyboardInsetState {
35
+ enabled: boolean;
36
+ target?: EdenKeyboardTarget;
37
+ layout: EdenKeyboardLayout;
38
+ showNumberRow: boolean;
39
+ }
40
+
41
+ export type EdenKeyboardAction =
42
+ | { type: "insertText"; text: string }
43
+ | { type: "backspace" }
44
+ | { type: "enter" };
45
+
46
+ export type EdenKeyboardDragPoint =
47
+ | { space: "screen"; x: number; y: number }
48
+ | { space: "keyboard-client"; x: number; y: number };
49
+
50
+ export type EdenKeyboardDragInput = "system-cursor" | "renderer-events";
51
+
52
+ export interface EdenKeyboardStartDragRequest {
53
+ point: EdenKeyboardDragPoint;
54
+ input: EdenKeyboardDragInput;
55
+ }
56
+
57
+ export interface EdenKeyboardUpdateDragRequest {
58
+ point: EdenKeyboardDragPoint;
59
+ }
60
+
61
+ export interface EdenKeyboardAPI {
62
+ show(): Promise<{ success: boolean }>;
63
+ sendAction(action: EdenKeyboardAction): Promise<{ success: boolean }>;
64
+ hide(): Promise<{ success: boolean }>;
65
+ startDrag(
66
+ request: EdenKeyboardStartDragRequest,
67
+ ): Promise<{ success: boolean }>;
68
+ updateDrag(request: EdenKeyboardUpdateDragRequest): void;
69
+ endDrag(): Promise<{ success: boolean }>;
70
+ getState(): Promise<EdenKeyboardState>;
71
+ onStateChanged?(callback: (state: EdenKeyboardState) => void): () => void;
72
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edenapp/types",
3
- "version": "0.8.0",
3
+ "version": "0.10.0",
4
4
  "description": "TypeScript type definitions for the Eden platform",
5
5
  "types": "index.d.ts",
6
6
  "author": "Dariusz Majnert",