@ng-desktop/desktop 0.4.0 → 0.5.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/README.md CHANGED
@@ -1,14 +1,54 @@
1
- # @ng-desktop/desktop
1
+ # `@ng-desktop/desktop`
2
2
 
3
- Linux GTK4 / Desktop OS system services (Theme, Clipboard, Notifications, Dialogs, SQLite, Network, Compute, FileSystem, DropTarget)
3
+ Angular desktop OS services powered by the Rust host bridge: theme signals, notifications, clipboard, file/confirm dialogs, `(closeRequest)` guards, scroll telemetry, SQLite WAL live queries, XDG filesystem + kernel file watching, network monitoring, drag-and-drop, and multithreaded fuzzy compute.
4
4
 
5
- Part of **[NgDesktop Engine](https://github.com/Gaspar1992/ng-desktop-engine)** — Native desktop rendering engine for Angular 22+ (`GTK4`, `WinUI 3`, `AppKit`).
6
-
7
- ## Installation
5
+ ## Install
8
6
 
9
7
  ```bash
10
- pnpm add @ng-desktop/desktop
8
+ pnpm add @ng-desktop/desktop @ng-desktop/platform
9
+ ```
10
+
11
+ Peer dependencies: `@angular/core >= 22.0.0`, `@ng-desktop/platform`.
12
+
13
+ ## Quick Usage
14
+
15
+ ```ts
16
+ import { inject, Injectable } from '@angular/core';
17
+ import {
18
+ NativeDesktopService,
19
+ NativeFileSystemService,
20
+ NativeSqliteService,
21
+ } from '@ng-desktop/desktop';
22
+
23
+ @Injectable({ providedIn: 'root' })
24
+ export class WorkspaceStore {
25
+ private readonly desktop = inject(NativeDesktopService);
26
+ private readonly sqlite = inject(NativeSqliteService);
27
+ private readonly fs = inject(NativeFileSystemService);
28
+
29
+ readonly tasks = this.sqlite.liveQuery<{ id: string; title: string }>(
30
+ 'SELECT id, title FROM tasks ORDER BY id DESC;',
31
+ );
32
+ readonly config = this.fs.watchJson(this.fs.resolveXdgPath('config', 'settings.json'), {
33
+ dark: true,
34
+ });
35
+
36
+ notifySaved(title: string): void {
37
+ this.desktop.notify('Saved', title);
38
+ }
39
+ }
11
40
  ```
12
41
 
13
- - Repository path: `packages/desktop-native`
14
- - Documentation & Ecosystem Guide: https://github.com/Gaspar1992/ng-desktop-engine/blob/main/docs/ECOSYSTEM_COMPATIBILITY.md
42
+ Add `provideNativeDesktop()` to `appConfig.providers`.
43
+
44
+ ## Key Exports
45
+
46
+ - **OS Hub & Lifecycle:** `provideNativeDesktop`, `NativeDesktopService` (`theme`, `notify`, `confirmDialog`, `openFileDialog`, `saveFileDialog`, `onScroll`, `onScrollBottom`, `onWindowCloseRequest`, `setPreventClose`, `closeWindow`, `setAppMenu`, `setTray`, `registerShortcut`)
47
+ - **SQLite & Storage:** `NativeSqliteService` (`execute`, `query`, `liveQuery`)
48
+ - **Filesystem & Watcher:** `NativeFileSystemService` (`resolveXdgPath`, `readText`, `writeText`, `readJson`, `writeJson`, `watchFile`, `watchJson`)
49
+ - **Networking, Compute & Drop:** `NativeNetworkService`, `NativeComputeService` (`fuzzyFilter`, `hash`), `NativeDropTargetDirective`
50
+
51
+ ## Documentation
52
+
53
+ - [Getting Started with External Angular 22+ & Nx Apps](../../docs/GETTING_STARTED.md)
54
+ - [Architectural Roadmap & OS Maturity Matrix](../../ROADMAP.md)
@@ -22,10 +22,10 @@ export class NativeComputeService {
22
22
  hash(input) {
23
23
  return this.bridge.computeHash(input);
24
24
  }
25
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.6", ngImport: i0, type: NativeComputeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
26
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.2.6", ngImport: i0, type: NativeComputeService, providedIn: 'root' });
25
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeComputeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
26
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeComputeService, providedIn: 'root' });
27
27
  }
28
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.6", ngImport: i0, type: NativeComputeService, decorators: [{
28
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeComputeService, decorators: [{
29
29
  type: Injectable,
30
30
  args: [{ providedIn: 'root' }]
31
31
  }] });
@@ -269,10 +269,10 @@ export class NativeDesktopService {
269
269
  unlisten();
270
270
  };
271
271
  }
272
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.6", ngImport: i0, type: NativeDesktopService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
273
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.2.6", ngImport: i0, type: NativeDesktopService, providedIn: 'root' });
272
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeDesktopService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
273
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeDesktopService, providedIn: 'root' });
274
274
  }
275
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.6", ngImport: i0, type: NativeDesktopService, decorators: [{
275
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeDesktopService, decorators: [{
276
276
  type: Injectable,
277
277
  args: [{ providedIn: 'root' }]
278
278
  }], ctorParameters: () => [] });
@@ -44,10 +44,10 @@ export class NativeDropTargetDirective {
44
44
  ngOnDestroy() {
45
45
  this.unlisten();
46
46
  }
47
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.6", ngImport: i0, type: NativeDropTargetDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
48
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.2.6", type: NativeDropTargetDirective, isStandalone: true, selector: "[ngNativeDropTarget]", outputs: { fileDrop: "fileDrop" }, ngImport: i0 });
47
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeDropTargetDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
48
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.3.0", type: NativeDropTargetDirective, isStandalone: true, selector: "[ngNativeDropTarget]", outputs: { fileDrop: "fileDrop" }, ngImport: i0 });
49
49
  }
50
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.6", ngImport: i0, type: NativeDropTargetDirective, decorators: [{
50
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeDropTargetDirective, decorators: [{
51
51
  type: Directive,
52
52
  args: [{
53
53
  selector: '[ngNativeDropTarget]',
@@ -74,10 +74,10 @@ export class NativeFileSystemService {
74
74
  }
75
75
  return changed;
76
76
  }
77
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.6", ngImport: i0, type: NativeFileSystemService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
78
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.2.6", ngImport: i0, type: NativeFileSystemService, providedIn: 'root' });
77
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeFileSystemService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
78
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeFileSystemService, providedIn: 'root' });
79
79
  }
80
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.6", ngImport: i0, type: NativeFileSystemService, decorators: [{
80
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeFileSystemService, decorators: [{
81
81
  type: Injectable,
82
82
  args: [{ providedIn: 'root' }]
83
83
  }] });
@@ -33,10 +33,10 @@ export class NativeNetworkService {
33
33
  this.isOnline.set(online);
34
34
  this.isMetered.set(metered);
35
35
  }
36
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.6", ngImport: i0, type: NativeNetworkService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
37
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.2.6", ngImport: i0, type: NativeNetworkService, providedIn: 'root' });
36
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeNetworkService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
37
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeNetworkService, providedIn: 'root' });
38
38
  }
39
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.6", ngImport: i0, type: NativeNetworkService, decorators: [{
39
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeNetworkService, decorators: [{
40
40
  type: Injectable,
41
41
  args: [{ providedIn: 'root' }]
42
42
  }], ctorParameters: () => [] });
@@ -53,10 +53,10 @@ export class NativeSqliteService {
53
53
  destroy,
54
54
  };
55
55
  }
56
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.6", ngImport: i0, type: NativeSqliteService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
57
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.2.6", ngImport: i0, type: NativeSqliteService, providedIn: 'root' });
56
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeSqliteService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
57
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeSqliteService, providedIn: 'root' });
58
58
  }
59
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.6", ngImport: i0, type: NativeSqliteService, decorators: [{
59
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.3.0", ngImport: i0, type: NativeSqliteService, decorators: [{
60
60
  type: Injectable,
61
61
  args: [{ providedIn: 'root' }]
62
62
  }] });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ng-desktop/desktop",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "Linux GTK4 / Desktop OS system services (Theme, Clipboard, Notifications, Dialogs, SQLite, Network, Compute, FileSystem, DropTarget)",
5
5
  "license": "MIT",
6
6
  "keywords": [