@edenapp/sdk 0.5.1 → 0.5.2

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.
Files changed (56) hide show
  1. package/dist/app-frame/frame-injector.js +6 -6
  2. package/dist/app-frame/frame-injector.js.map +3 -3
  3. package/dist/apps/prebuilt/com.eden.context-menu/dist/assets/{index-DUrqfNSi.js → index-B-ks_-b3.js} +1 -1
  4. package/dist/apps/prebuilt/com.eden.context-menu/dist/index.html +1 -1
  5. package/dist/apps/prebuilt/com.eden.eveshell/dist/assets/{index-CEfffVHu.js → index-CokBDS24.js} +1 -1
  6. package/dist/apps/prebuilt/com.eden.eveshell/dist/index.html +1 -1
  7. package/dist/apps/prebuilt/com.eden.eveshell/manifest.json +9 -1
  8. package/dist/apps/prebuilt/com.eden.example.hello/backend/node_modules/@edenapp/types/AppManifest.d.ts +9 -3
  9. package/dist/apps/prebuilt/com.eden.example.hello/backend/node_modules/@edenapp/types/CHANGELOG.md +6 -0
  10. package/dist/apps/prebuilt/com.eden.example.hello/backend/node_modules/@edenapp/types/commands.generated.d.ts +61 -15
  11. package/dist/apps/prebuilt/com.eden.example.hello/backend/node_modules/@edenapp/types/global.d.ts +8 -3
  12. package/dist/apps/prebuilt/com.eden.example.hello/backend/node_modules/@edenapp/types/package.json +1 -1
  13. package/dist/apps/prebuilt/com.eden.example.hello/frontend/node_modules/@edenapp/types/AppManifest.d.ts +9 -3
  14. package/dist/apps/prebuilt/com.eden.example.hello/frontend/node_modules/@edenapp/types/CHANGELOG.md +6 -0
  15. package/dist/apps/prebuilt/com.eden.example.hello/frontend/node_modules/@edenapp/types/commands.generated.d.ts +61 -15
  16. package/dist/apps/prebuilt/com.eden.example.hello/frontend/node_modules/@edenapp/types/global.d.ts +8 -3
  17. package/dist/apps/prebuilt/com.eden.example.hello/frontend/node_modules/@edenapp/types/package.json +1 -1
  18. package/dist/apps/prebuilt/com.eden.login/dist/assets/{index-DyI95N2f.js → index-KswMPsHx.js} +1 -1
  19. package/dist/apps/prebuilt/com.eden.login/dist/index.html +1 -1
  20. package/dist/apps/prebuilt/com.eden.toaster/dist/assets/{index-C4cVyh7j.js → index-b5EUNXyn.js} +2 -2
  21. package/dist/apps/prebuilt/com.eden.toaster/dist/index.html +1 -1
  22. package/dist/generated/runtime.d.ts.map +1 -1
  23. package/dist/generated/runtime.js +6 -1
  24. package/dist/generated/runtime.js.map +1 -1
  25. package/dist/process-manager/ProcessHandler.d.ts +12 -0
  26. package/dist/process-manager/ProcessHandler.d.ts.map +1 -1
  27. package/dist/process-manager/ProcessHandler.js +24 -3
  28. package/dist/process-manager/ProcessHandler.js.map +1 -1
  29. package/dist/view-manager/ViewCreator.d.ts.map +1 -1
  30. package/dist/view-manager/ViewCreator.js +2 -1
  31. package/dist/view-manager/ViewCreator.js.map +1 -1
  32. package/dist/view-manager/ViewHandler.d.ts +67 -20
  33. package/dist/view-manager/ViewHandler.d.ts.map +1 -1
  34. package/dist/view-manager/ViewHandler.js +204 -122
  35. package/dist/view-manager/ViewHandler.js.map +1 -1
  36. package/package.json +4 -4
  37. package/dist/main.d.ts +0 -2
  38. package/dist/main.d.ts.map +0 -1
  39. package/dist/main.js +0 -15
  40. package/dist/main.js.map +0 -1
  41. package/dist/view-manager/DevToolsManager.d.ts +0 -29
  42. package/dist/view-manager/DevToolsManager.d.ts.map +0 -1
  43. package/dist/view-manager/DevToolsManager.js +0 -88
  44. package/dist/view-manager/DevToolsManager.js.map +0 -1
  45. package/dist/view-manager/LayoutCalculator.d.ts +0 -49
  46. package/dist/view-manager/LayoutCalculator.d.ts.map +0 -1
  47. package/dist/view-manager/LayoutCalculator.js +0 -94
  48. package/dist/view-manager/LayoutCalculator.js.map +0 -1
  49. package/dist/view-manager/TilingManager.d.ts +0 -61
  50. package/dist/view-manager/TilingManager.d.ts.map +0 -1
  51. package/dist/view-manager/TilingManager.js +0 -142
  52. package/dist/view-manager/TilingManager.js.map +0 -1
  53. package/dist/view-manager/ViewLifecycle.d.ts +0 -66
  54. package/dist/view-manager/ViewLifecycle.d.ts.map +0 -1
  55. package/dist/view-manager/ViewLifecycle.js +0 -142
  56. package/dist/view-manager/ViewLifecycle.js.map +0 -1
@@ -490,6 +490,7 @@ export interface PackageCommands {
490
490
  export interface ProcessCommands {
491
491
  /**
492
492
  * Launch an application instance.
493
+ * Requires "process/manage" permission.
493
494
  */
494
495
  "process/launch": {
495
496
  args: {
@@ -499,13 +500,23 @@ export interface ProcessCommands {
499
500
  };
500
501
  /**
501
502
  * Stop a running application instance.
503
+ * Requires "process/manage" permission.
502
504
  */
503
505
  "process/stop": {
504
506
  args: { appId: string };
505
507
  response: { success: boolean };
506
508
  };
509
+ /**
510
+ * Stop the caller app instance.
511
+ * No explicit permission required - this endpoint only allows self-exit.
512
+ */
513
+ "process/exit": {
514
+ args: { };
515
+ response: { success: boolean };
516
+ };
507
517
  /**
508
518
  * List all running application processes.
519
+ * Requires "process/read" permission.
509
520
  * @param showHidden - If true, includes overlay apps (hidden by default)
510
521
  */
511
522
  "process/list": {
@@ -730,7 +741,16 @@ export interface UserCommands {
730
741
  */
731
742
  export interface ViewCommands {
732
743
  /**
733
- * Update the bounds (position and size) of a specific view.
744
+ * Update bounds for the caller's own view.
745
+ */
746
+ "view/update-bounds": {
747
+ args: {
748
+ bounds: import("./index").ViewBounds };
749
+ response: { success: boolean };
750
+ };
751
+ /**
752
+ * Update bounds for any app view.
753
+ * Requires "view/manage" permission.
734
754
  */
735
755
  "view/update-view-bounds": {
736
756
  args: {
@@ -739,7 +759,16 @@ export interface ViewCommands {
739
759
  response: { success: boolean };
740
760
  };
741
761
  /**
742
- * Show or hide a specific view.
762
+ * Show or hide the caller's own view.
763
+ */
764
+ "view/set-visibility": {
765
+ args: {
766
+ visible: boolean };
767
+ response: { success: boolean };
768
+ };
769
+ /**
770
+ * Show or hide any app view.
771
+ * Requires "view/manage" permission.
743
772
  */
744
773
  "view/set-view-visibility": {
745
774
  args: {
@@ -748,14 +777,24 @@ export interface ViewCommands {
748
777
  response: { success: boolean };
749
778
  };
750
779
  /**
751
- * Bring an application's view to the front and focus it.
780
+ * Bring caller's own view to the front and focus it.
752
781
  */
753
- "view/focus-app": {
754
- args: { appId: string };
782
+ "view/focus": {
783
+ args: { };
784
+ response: { success: boolean };
785
+ };
786
+ /**
787
+ * Bring any app view to the front and focus it.
788
+ * Requires "view/manage" permission.
789
+ */
790
+ "view/focus-view": {
791
+ args: {
792
+ appId: string };
755
793
  response: { success: boolean };
756
794
  };
757
795
  /**
758
796
  * Update the available workspace bounds (e.g. after taskbar resize).
797
+ * Requires "view/manage" permission for app callers.
759
798
  */
760
799
  "view/update-global-bounds": {
761
800
  args: {
@@ -764,7 +803,16 @@ export interface ViewCommands {
764
803
  response: { success: boolean };
765
804
  };
766
805
  /**
767
- * Toggle between floating and tiled window modes.
806
+ * Toggle caller's own view between floating and tiled window modes.
807
+ */
808
+ "view/toggle-mode": {
809
+ args: {
810
+ mode?: "floating" | "tiled" };
811
+ response: { success: boolean };
812
+ };
813
+ /**
814
+ * Toggle any app view between floating and tiled window modes.
815
+ * Requires "view/manage" permission.
768
816
  */
769
817
  "view/toggle-view-mode": {
770
818
  args: {
@@ -773,45 +821,43 @@ export interface ViewCommands {
773
821
  response: { success: boolean };
774
822
  };
775
823
  /**
776
- * Start dragging a window.
824
+ * Start dragging caller's own view.
777
825
  */
778
826
  "view/start-drag": {
779
827
  args: {
780
- appId: string;
781
828
  startX: number;
782
829
  startY: number };
783
830
  response: { success: boolean };
784
831
  };
785
832
  /**
786
- * End the current drag operation.
833
+ * End drag operation for caller's own view.
787
834
  */
788
835
  "view/end-drag": {
789
- args: { appId: string };
836
+ args: { };
790
837
  response: { success: boolean };
791
838
  };
792
839
  /**
793
840
  * Handle global mouse up event to stop any active drag/resize operations.
841
+ * Requires "view/manage" permission for app callers.
794
842
  */
795
843
  "view/global-mouseup": {
796
844
  args: Record<string, never>;
797
845
  response: { success: boolean };
798
846
  };
799
847
  /**
800
- * Start resizing a window.
848
+ * Start resizing caller's own view.
801
849
  */
802
850
  "view/start-resize": {
803
851
  args: {
804
- appId: string;
805
852
  startX: number;
806
853
  startY: number };
807
854
  response: { success: boolean };
808
855
  };
809
856
  /**
810
- * End the current resize operation.
857
+ * End resize operation for caller's own view.
811
858
  */
812
859
  "view/end-resize": {
813
- args: {
814
- appId: string };
860
+ args: { };
815
861
  response: { success: boolean };
816
862
  };
817
863
  /**
@@ -1,11 +1,15 @@
1
1
  // Ambient declarations for renderer globals
2
2
 
3
+ import type { AppFrameInjectionMode, CSSInjectionMode } from "./AppManifest";
3
4
  import type { EdenAPI, AppBusAPI, AppBusConnection } from "./ipc";
4
5
 
5
6
  export interface EdenFrame {
6
7
  // Public API
7
8
  setTitle: (title: string) => void;
8
9
  resetTitle: () => void;
10
+ close: () => Promise<void>;
11
+ minimize: () => Promise<void>;
12
+ toggleMode: () => Promise<void>;
9
13
 
10
14
  // Internal state (used by frame system)
11
15
  _internal: {
@@ -21,6 +25,10 @@ export interface EdenFrame {
21
25
  resizable?: boolean;
22
26
  minSize?: { width: number; height: number };
23
27
  maxSize?: { width: number; height: number };
28
+ injections?: {
29
+ css?: CSSInjectionMode;
30
+ appFrame?: AppFrameInjectionMode;
31
+ };
24
32
  };
25
33
  currentMode: "tiled" | "floating";
26
34
  bounds: {
@@ -53,6 +61,3 @@ declare global {
53
61
  edenFrame?: EdenFrame;
54
62
  }
55
63
  }
56
-
57
- // This export is important - it marks the file as a module
58
- export {};
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edenapp/types",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "TypeScript type definitions for the Eden platform",
5
5
  "types": "index.d.ts",
6
6
  "author": "Dariusz Majnert",
@@ -13,7 +13,8 @@ export type WindowMode = "floating" | "tiled" | "both";
13
13
  * - "tokens": Inject only CSS custom property definitions
14
14
  * - "none": Don't inject any CSS
15
15
  */
16
- export type CSSInjectionMode = "full" | "tokens" | "none";
16
+ export type CSSInjectionMode = "none" | "tokens" | "full";
17
+ export type AppFrameInjectionMode = "none" | "window-only" | "full" | boolean;
17
18
 
18
19
  export interface WindowInjectionOptions {
19
20
  /**
@@ -24,8 +25,13 @@ export interface WindowInjectionOptions {
24
25
  */
25
26
  css?: CSSInjectionMode;
26
27
 
27
- /** Inject the Eden app frame with title bar controls (default: true) */
28
- appFrame?: boolean;
28
+ /**
29
+ * Inject Eden app frame runtime and visuals (default: true).
30
+ * - true | "full": full Eden frame (rounded container + system top bar controls)
31
+ * - "window-only": keep frame runtime/container, but app renders its own top bar
32
+ * - false | "none": disable app frame injection entirely
33
+ */
34
+ appFrame?: AppFrameInjectionMode;
29
35
  }
30
36
 
31
37
  export interface WindowConfig {
@@ -1,5 +1,11 @@
1
1
  # @edenapp/types
2
2
 
3
+ ## 0.5.2
4
+
5
+ ### Patch Changes
6
+
7
+ - gate view and process endpoints and add "window-only" inejction mode to appframe
8
+
3
9
  ## 0.5.1
4
10
 
5
11
  ## 0.5.0
@@ -490,6 +490,7 @@ export interface PackageCommands {
490
490
  export interface ProcessCommands {
491
491
  /**
492
492
  * Launch an application instance.
493
+ * Requires "process/manage" permission.
493
494
  */
494
495
  "process/launch": {
495
496
  args: {
@@ -499,13 +500,23 @@ export interface ProcessCommands {
499
500
  };
500
501
  /**
501
502
  * Stop a running application instance.
503
+ * Requires "process/manage" permission.
502
504
  */
503
505
  "process/stop": {
504
506
  args: { appId: string };
505
507
  response: { success: boolean };
506
508
  };
509
+ /**
510
+ * Stop the caller app instance.
511
+ * No explicit permission required - this endpoint only allows self-exit.
512
+ */
513
+ "process/exit": {
514
+ args: { };
515
+ response: { success: boolean };
516
+ };
507
517
  /**
508
518
  * List all running application processes.
519
+ * Requires "process/read" permission.
509
520
  * @param showHidden - If true, includes overlay apps (hidden by default)
510
521
  */
511
522
  "process/list": {
@@ -730,7 +741,16 @@ export interface UserCommands {
730
741
  */
731
742
  export interface ViewCommands {
732
743
  /**
733
- * Update the bounds (position and size) of a specific view.
744
+ * Update bounds for the caller's own view.
745
+ */
746
+ "view/update-bounds": {
747
+ args: {
748
+ bounds: import("./index").ViewBounds };
749
+ response: { success: boolean };
750
+ };
751
+ /**
752
+ * Update bounds for any app view.
753
+ * Requires "view/manage" permission.
734
754
  */
735
755
  "view/update-view-bounds": {
736
756
  args: {
@@ -739,7 +759,16 @@ export interface ViewCommands {
739
759
  response: { success: boolean };
740
760
  };
741
761
  /**
742
- * Show or hide a specific view.
762
+ * Show or hide the caller's own view.
763
+ */
764
+ "view/set-visibility": {
765
+ args: {
766
+ visible: boolean };
767
+ response: { success: boolean };
768
+ };
769
+ /**
770
+ * Show or hide any app view.
771
+ * Requires "view/manage" permission.
743
772
  */
744
773
  "view/set-view-visibility": {
745
774
  args: {
@@ -748,14 +777,24 @@ export interface ViewCommands {
748
777
  response: { success: boolean };
749
778
  };
750
779
  /**
751
- * Bring an application's view to the front and focus it.
780
+ * Bring caller's own view to the front and focus it.
752
781
  */
753
- "view/focus-app": {
754
- args: { appId: string };
782
+ "view/focus": {
783
+ args: { };
784
+ response: { success: boolean };
785
+ };
786
+ /**
787
+ * Bring any app view to the front and focus it.
788
+ * Requires "view/manage" permission.
789
+ */
790
+ "view/focus-view": {
791
+ args: {
792
+ appId: string };
755
793
  response: { success: boolean };
756
794
  };
757
795
  /**
758
796
  * Update the available workspace bounds (e.g. after taskbar resize).
797
+ * Requires "view/manage" permission for app callers.
759
798
  */
760
799
  "view/update-global-bounds": {
761
800
  args: {
@@ -764,7 +803,16 @@ export interface ViewCommands {
764
803
  response: { success: boolean };
765
804
  };
766
805
  /**
767
- * Toggle between floating and tiled window modes.
806
+ * Toggle caller's own view between floating and tiled window modes.
807
+ */
808
+ "view/toggle-mode": {
809
+ args: {
810
+ mode?: "floating" | "tiled" };
811
+ response: { success: boolean };
812
+ };
813
+ /**
814
+ * Toggle any app view between floating and tiled window modes.
815
+ * Requires "view/manage" permission.
768
816
  */
769
817
  "view/toggle-view-mode": {
770
818
  args: {
@@ -773,45 +821,43 @@ export interface ViewCommands {
773
821
  response: { success: boolean };
774
822
  };
775
823
  /**
776
- * Start dragging a window.
824
+ * Start dragging caller's own view.
777
825
  */
778
826
  "view/start-drag": {
779
827
  args: {
780
- appId: string;
781
828
  startX: number;
782
829
  startY: number };
783
830
  response: { success: boolean };
784
831
  };
785
832
  /**
786
- * End the current drag operation.
833
+ * End drag operation for caller's own view.
787
834
  */
788
835
  "view/end-drag": {
789
- args: { appId: string };
836
+ args: { };
790
837
  response: { success: boolean };
791
838
  };
792
839
  /**
793
840
  * Handle global mouse up event to stop any active drag/resize operations.
841
+ * Requires "view/manage" permission for app callers.
794
842
  */
795
843
  "view/global-mouseup": {
796
844
  args: Record<string, never>;
797
845
  response: { success: boolean };
798
846
  };
799
847
  /**
800
- * Start resizing a window.
848
+ * Start resizing caller's own view.
801
849
  */
802
850
  "view/start-resize": {
803
851
  args: {
804
- appId: string;
805
852
  startX: number;
806
853
  startY: number };
807
854
  response: { success: boolean };
808
855
  };
809
856
  /**
810
- * End the current resize operation.
857
+ * End resize operation for caller's own view.
811
858
  */
812
859
  "view/end-resize": {
813
- args: {
814
- appId: string };
860
+ args: { };
815
861
  response: { success: boolean };
816
862
  };
817
863
  /**
@@ -1,11 +1,15 @@
1
1
  // Ambient declarations for renderer globals
2
2
 
3
+ import type { AppFrameInjectionMode, CSSInjectionMode } from "./AppManifest";
3
4
  import type { EdenAPI, AppBusAPI, AppBusConnection } from "./ipc";
4
5
 
5
6
  export interface EdenFrame {
6
7
  // Public API
7
8
  setTitle: (title: string) => void;
8
9
  resetTitle: () => void;
10
+ close: () => Promise<void>;
11
+ minimize: () => Promise<void>;
12
+ toggleMode: () => Promise<void>;
9
13
 
10
14
  // Internal state (used by frame system)
11
15
  _internal: {
@@ -21,6 +25,10 @@ export interface EdenFrame {
21
25
  resizable?: boolean;
22
26
  minSize?: { width: number; height: number };
23
27
  maxSize?: { width: number; height: number };
28
+ injections?: {
29
+ css?: CSSInjectionMode;
30
+ appFrame?: AppFrameInjectionMode;
31
+ };
24
32
  };
25
33
  currentMode: "tiled" | "floating";
26
34
  bounds: {
@@ -53,6 +61,3 @@ declare global {
53
61
  edenFrame?: EdenFrame;
54
62
  }
55
63
  }
56
-
57
- // This export is important - it marks the file as a module
58
- export {};
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edenapp/types",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "TypeScript type definitions for the Eden platform",
5
5
  "types": "index.d.ts",
6
6
  "author": "Dariusz Majnert",