@edenapp/types 0.6.2 → 0.6.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @edenapp/types
2
2
 
3
+ ## 0.6.3
4
+
5
+ ### Patch Changes
6
+
7
+ - submenus in ctx menus and open with... in files app
8
+
3
9
  ## 0.6.2
4
10
 
5
11
  ### Patch Changes
package/ContextMenu.d.ts CHANGED
@@ -156,15 +156,21 @@ export type ContextMenuIconName =
156
156
  | "align-center"
157
157
  | "align-right";
158
158
 
159
+ export type ContextMenuIcon =
160
+ | ContextMenuIconName
161
+ | { type: "glyph"; name: ContextMenuIconName }
162
+ | { type: "app"; appId: string };
163
+
159
164
  export type ContextMenuItem =
160
165
  | {
161
166
  type: "item";
162
167
  id: string;
163
168
  label: string;
164
- icon?: ContextMenuIconName;
169
+ icon?: ContextMenuIcon;
165
170
  shortcut?: string;
166
171
  disabled?: boolean;
167
172
  danger?: boolean;
173
+ items?: ContextMenuItem[];
168
174
  }
169
175
  | { type: "separator" }
170
176
  | { type: "title"; label: string };
@@ -385,7 +385,7 @@ export interface I18nCommands {
385
385
  "i18n/get-common": {
386
386
  args: { locale: string };
387
387
  response: {
388
- translations: Record<string, any>;
388
+ translations: import("./index").RecursiveObject<string>;
389
389
  };
390
390
  };
391
391
  }
@@ -57,7 +57,7 @@ export interface PackageEvents {
57
57
  export interface ProcessEvents {
58
58
  "process/launched": { instance: import("./index").AppInstance };
59
59
  "process/stopped": { appId: string };
60
- "process/error": { appId: string; error: any };
60
+ "process/error": { appId: string; error: unknown };
61
61
  "process/exited": { appId: string; code: number };
62
62
  }
63
63
 
package/index.d.ts CHANGED
@@ -57,7 +57,7 @@ export interface IPCMessage {
57
57
  target: string;
58
58
 
59
59
  /** Message payload */
60
- payload: any;
60
+ payload: unknown;
61
61
 
62
62
  /** Unique message ID for tracking responses */
63
63
  messageId: string;
@@ -76,6 +76,10 @@ export interface ViewBounds {
76
76
  height: number;
77
77
  }
78
78
 
79
+ export type RecursiveObject<T> = {
80
+ [key: string]: T | RecursiveObject<T>;
81
+ };
82
+
79
83
  // Export new command types
80
84
  export type {
81
85
  CommandName,
package/ipc/appbus.d.ts CHANGED
@@ -9,13 +9,13 @@
9
9
  * Schema for fire-and-forget messages (send/on/once)
10
10
  * Keys are method names, values are the payload types
11
11
  */
12
- export type MessageSchema = Record<string, any>;
12
+ export type MessageSchema = Record<string, unknown>;
13
13
 
14
14
  /**
15
15
  * Schema for request/response (request/handle)
16
16
  * Keys are method names, values are { args, result } types
17
17
  */
18
- export type RequestSchema = Record<string, { args: any; result: any }>;
18
+ export type RequestSchema = Record<string, { args: unknown; result: unknown }>;
19
19
 
20
20
  /**
21
21
  * Defines a bidirectional communication protocol between two sides.
@@ -55,16 +55,6 @@ export interface ChannelProtocol {
55
55
  peerHandles: RequestSchema;
56
56
  }
57
57
 
58
- /**
59
- * Default empty protocol (all any)
60
- */
61
- type DefaultProtocol = {
62
- hostMessages: MessageSchema;
63
- peerMessages: MessageSchema;
64
- hostHandles: RequestSchema;
65
- peerHandles: RequestSchema;
66
- };
67
-
68
58
  /**
69
59
  * AppBus connection from the HOST perspective (the side that exposes the service).
70
60
  * - send() sends hostMessages
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edenapp/types",
3
- "version": "0.6.2",
3
+ "version": "0.6.3",
4
4
  "description": "TypeScript type definitions for the Eden platform",
5
5
  "types": "index.d.ts",
6
6
  "author": "Dariusz Majnert",