@edsis/angular 22.0.72 → 22.0.74

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.
@@ -1,17 +1,19 @@
1
1
  import * as _angular_core from '@angular/core';
2
2
  import { InjectionToken, EnvironmentProviders } from '@angular/core';
3
3
 
4
- declare const EDSIS_RUNTIME_SCHEMA_VERSION: 1;
4
+ declare const EDSIS_RUNTIME_LEGACY_SCHEMA_VERSION: 1;
5
+ declare const EDSIS_RUNTIME_SCHEMA_VERSION: 2;
5
6
  declare const EDSIS_RUNTIME_PLATFORMS: readonly ["windows", "macos", "linux", "ios", "android", "web"];
7
+ declare const EDSIS_DEVICE_TYPES: readonly ["browser", "windows", "macos", "android", "ipados"];
6
8
  declare const EDSIS_RUNTIME_CAPABILITIES: readonly ["window-controls", "window-layout", "app-menu", "tray", "notification-badge", "native-notification", "dialog", "clipboard-text", "open-url", "network-diagnostics", "google-native-sign-in"];
7
9
  type EdsisRuntimePlatform = (typeof EDSIS_RUNTIME_PLATFORMS)[number];
10
+ type EdsisDeviceType = (typeof EDSIS_DEVICE_TYPES)[number];
8
11
  type EdsisRuntimeCapability = (typeof EDSIS_RUNTIME_CAPABILITIES)[number];
9
12
  type EdsisRuntimeEnvironment = 'production' | 'development' | 'local';
10
13
  type EdsisRuntimeHost = 'tauri' | 'browser';
11
14
  type EdsisDeviceFamily = 'desktop' | 'tablet' | 'responsive';
12
15
  type EdsisUiProfile = 'desktop' | 'tablet' | 'responsive';
13
- interface EdsisRuntimeContextV1 {
14
- readonly schemaVersion: 1;
16
+ interface EdsisRuntimeContextBase {
15
17
  readonly host: EdsisRuntimeHost;
16
18
  readonly environment: EdsisRuntimeEnvironment;
17
19
  readonly platform: EdsisRuntimePlatform;
@@ -26,9 +28,23 @@ interface EdsisRuntimeContextV1 {
26
28
  };
27
29
  readonly capabilities: readonly EdsisRuntimeCapability[];
28
30
  }
31
+ /** Legacy wire payload accepted during the schema V2 migration. */
32
+ interface EdsisRuntimeContextV1 extends EdsisRuntimeContextBase {
33
+ readonly schemaVersion: 1;
34
+ }
35
+ /** Canonical runtime payload returned to Angular consumers. */
36
+ interface EdsisRuntimeContextV2 extends EdsisRuntimeContextBase {
37
+ readonly schemaVersion: 2;
38
+ readonly deviceType: EdsisDeviceType;
39
+ }
40
+ type EdsisRuntimeContext = EdsisRuntimeContextV2;
41
+ type EdsisRuntimeWireContext = EdsisRuntimeContextV1 | EdsisRuntimeContextV2;
29
42
  declare function isEdsisRuntimeContextV1(value: unknown): value is EdsisRuntimeContextV1;
30
- declare function freezeEdsisRuntimeContext(context: EdsisRuntimeContextV1): EdsisRuntimeContextV1;
31
- declare function createBrowserRuntimeContext(environment: EdsisRuntimeEnvironment): EdsisRuntimeContextV1;
43
+ declare function isEdsisRuntimeContextV2(value: unknown): value is EdsisRuntimeContextV2;
44
+ /** Validate either supported wire schema and normalize it to the immutable V2 contract. */
45
+ declare function normalizeEdsisRuntimeContext(value: unknown): EdsisRuntimeContextV2 | null;
46
+ declare function freezeEdsisRuntimeContext<T extends EdsisRuntimeWireContext>(context: T): T;
47
+ declare function createBrowserRuntimeContext(environment: EdsisRuntimeEnvironment): EdsisRuntimeContextV2;
32
48
 
33
49
  type EdsisWindowControlAction = 'close' | 'minimize' | 'toggle-maximize';
34
50
  declare class NativeHostService {
@@ -64,7 +80,8 @@ declare class RuntimeContextService {
64
80
  private readonly config;
65
81
  private readonly contextState;
66
82
  private initialization;
67
- readonly context: _angular_core.Signal<EdsisRuntimeContextV1>;
83
+ readonly context: _angular_core.Signal<EdsisRuntimeContextV2>;
84
+ readonly deviceType: _angular_core.Signal<"windows" | "macos" | "android" | "browser" | "ipados">;
68
85
  readonly isDesktopShell: _angular_core.Signal<boolean>;
69
86
  readonly isTabletShell: _angular_core.Signal<boolean>;
70
87
  readonly isIPadOS: _angular_core.Signal<boolean>;
@@ -97,5 +114,5 @@ declare class TabletViewportService {
97
114
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<TabletViewportService>;
98
115
  }
99
116
 
100
- export { EDSIS_RUNTIME_CAPABILITIES, EDSIS_RUNTIME_CONFIG, EDSIS_RUNTIME_PLATFORMS, EDSIS_RUNTIME_READY_EVENT, EDSIS_RUNTIME_SCHEMA_VERSION, EDSIS_TABLET_MINIMUM_VIEWPORT_WIDTH, NativeHostService, RuntimeContextService, TabletViewportService, createBrowserRuntimeContext, freezeEdsisRuntimeContext, isEdsisRuntimeContextV1, provideEdsisRuntime, setNativeNotificationBadge };
101
- export type { EdsisDeviceFamily, EdsisRuntimeCapability, EdsisRuntimeConfig, EdsisRuntimeContextV1, EdsisRuntimeEnvironment, EdsisRuntimeHost, EdsisRuntimePlatform, EdsisUiProfile, EdsisWindowControlAction, ResolvedEdsisRuntimeConfig, TabletViewportBlockReason };
117
+ export { EDSIS_DEVICE_TYPES, EDSIS_RUNTIME_CAPABILITIES, EDSIS_RUNTIME_CONFIG, EDSIS_RUNTIME_LEGACY_SCHEMA_VERSION, EDSIS_RUNTIME_PLATFORMS, EDSIS_RUNTIME_READY_EVENT, EDSIS_RUNTIME_SCHEMA_VERSION, EDSIS_TABLET_MINIMUM_VIEWPORT_WIDTH, NativeHostService, RuntimeContextService, TabletViewportService, createBrowserRuntimeContext, freezeEdsisRuntimeContext, isEdsisRuntimeContextV1, isEdsisRuntimeContextV2, normalizeEdsisRuntimeContext, provideEdsisRuntime, setNativeNotificationBadge };
118
+ export type { EdsisDeviceFamily, EdsisDeviceType, EdsisRuntimeCapability, EdsisRuntimeConfig, EdsisRuntimeContext, EdsisRuntimeContextV1, EdsisRuntimeContextV2, EdsisRuntimeEnvironment, EdsisRuntimeHost, EdsisRuntimePlatform, EdsisRuntimeWireContext, EdsisUiProfile, EdsisWindowControlAction, ResolvedEdsisRuntimeConfig, TabletViewportBlockReason };