orcas-angular 1.0.0 → 1.0.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 (3) hide show
  1. package/README.md +51 -15
  2. package/index.ts +5 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,17 +1,53 @@
1
1
  # orcas-angular
2
2
 
3
- A collection of reusable Angular utilities and services used across the application. Each area of functionality lives in its own folder, each with a dedicated `README.md`.
4
-
5
- ## Folders
6
-
7
- | Folder | Description | README |
8
- |---|---|---|
9
- | [`async/`](./async/README.md) | Async helpers: delay, polling, and cooperative cancellation tokens | ✅ |
10
- | [`dev/`](./dev/README.md) | Development tools: browser-console command registry and a debug service template | ✅ |
11
- | [`framework/`](./framework/README.md) | Angular framework utilities: async-aware service initialization during bootstrap | ✅ |
12
- | [`localization/`](./localization/README.md) | Runtime i18n: JSON-based translation loading, language switching, and a `LocalizePipe` | ✅ |
13
- | [`log/`](./log/README.md) | Structured logging with the Echo library: log levels, system tags, and custom writers | ✅ |
14
- | [`navigation/`](./navigation/README.md) | Navigation history stack and a `[back-on-click]` directive for safe back-navigation | ✅ |
15
- | [`storage/`](./storage/README.md) | Reactive file-backed settings storage using Angular signals, with support for Tauri, Capacitor, and localStorage | ✅ |
16
- | [`theme/`](./theme/README.md) | Light / dark mode management with OS-preference fallback and class-based DOM toggling | ✅ |
17
- | [`ui/`](./ui/README.md) | UI components: context menu system with viewport clamping and nested sub-menu support | ✅ |
3
+ A collection of reusable Angular utilities and services, designed with support for Tauri and Capacitor. This library provides structural support for common application needs like storage, localization, theme management, and structured logging.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install orcas-angular
9
+ ```
10
+
11
+ ## Features
12
+
13
+ - **Storage**: Reactive, file-backed storage layer using Angular signals. Supports Tauri, Capacitor, and `localStorage`.
14
+ - **Localization**: JSON-based runtime translation loading and switching.
15
+ - **Theme**: Light / dark mode management with system preference fallback.
16
+ - **Logging**: Structured logging with log levels and system tags.
17
+ - **Async**: Cancellation tokens and cooperative async helpers.
18
+ - **UI**: Context menu system with viewport clamping.
19
+ - **Navigation**: History stack management with back-navigation protection.
20
+ - **Framework**: Async-aware service initialization during app bootstrap.
21
+
22
+ ## Usage
23
+
24
+ ### Root Initialization
25
+
26
+ Use `ServicesInit` to initialize your file-backed services during app startup:
27
+
28
+ ```typescript
29
+ import { ServicesInit, FileBoxService, ThemeService } from 'orcas-angular';
30
+
31
+ // In your app initialization (e.g., APP_INITIALIZER or similar)
32
+ await servicesInit.init(FileBoxService, 'settings.json');
33
+ await servicesInit.init(ThemeService);
34
+ ```
35
+
36
+ ### Storage
37
+
38
+ ```typescript
39
+ import { SettingsService } from 'orcas-angular';
40
+
41
+ export class MyService {
42
+ private settings = inject(SettingsService);
43
+ public $isExpertMode = this.settings.getNewSignal(false, 'expert-mode');
44
+
45
+ async toggle() {
46
+ await this.settings.set(!this.$isExpertMode(), 'expert-mode');
47
+ }
48
+ }
49
+ ```
50
+
51
+ ## License
52
+
53
+ MPL-2.0 + Commons Clause (See LICENSE file for details).
package/index.ts CHANGED
@@ -7,6 +7,7 @@ export * from './localization/localize.pipe';
7
7
  export * from './localization/localization.interface';
8
8
  export * from './log/echo';
9
9
  export * from './log/log-systems';
10
+ export * from './log/echo-provider';
10
11
  export * from './navigation/navigation-stack.service';
11
12
  export * from './navigation/back-on-click.directive';
12
13
  export * from './storage/files';
@@ -18,4 +19,7 @@ export * from './storage/tauri-files.service';
18
19
  export * from './storage/capacitor-files.service';
19
20
  export * from './storage/local-storage-files.service';
20
21
  export * from './theme/theme.service';
21
- export * from './ui/context-menu/index';
22
+ export * from './ui/context-menu/context-menu.component';
23
+ export * from './ui/context-menu/context-header.component';
24
+ export * from './ui/context-menu/context-button.component';
25
+ export * from './ui/context-menu/context-menu-trigger.directive';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orcas-angular",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "A collection of reusable Angular utilities and services, with support for Tauri and Capacitor.",
5
5
  "main": "index.ts",
6
6
  "types": "index.ts",