@hamak/ui-shell-api 0.1.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.
Files changed (68) hide show
  1. package/.turbo/turbo-build.log +1 -0
  2. package/README.md +58 -0
  3. package/dist/api/IFeatureManager.d.ts +56 -0
  4. package/dist/api/IFeatureManager.d.ts.map +1 -0
  5. package/dist/api/IFeatureManager.js +5 -0
  6. package/dist/api/ILayoutManager.d.ts +40 -0
  7. package/dist/api/ILayoutManager.d.ts.map +1 -0
  8. package/dist/api/ILayoutManager.js +5 -0
  9. package/dist/api/IRouter.d.ts +40 -0
  10. package/dist/api/IRouter.d.ts.map +1 -0
  11. package/dist/api/IRouter.js +5 -0
  12. package/dist/api/IShell.d.ts +55 -0
  13. package/dist/api/IShell.d.ts.map +1 -0
  14. package/dist/api/IShell.js +5 -0
  15. package/dist/api/IThemeManager.d.ts +36 -0
  16. package/dist/api/IThemeManager.d.ts.map +1 -0
  17. package/dist/api/IThemeManager.js +5 -0
  18. package/dist/api/index.d.ts +10 -0
  19. package/dist/api/index.d.ts.map +1 -0
  20. package/dist/api/index.js +9 -0
  21. package/dist/index.d.ts +12 -0
  22. package/dist/index.d.ts.map +1 -0
  23. package/dist/index.js +14 -0
  24. package/dist/tokens/index.d.ts +6 -0
  25. package/dist/tokens/index.d.ts.map +1 -0
  26. package/dist/tokens/index.js +5 -0
  27. package/dist/tokens/service-tokens.d.ts +57 -0
  28. package/dist/tokens/service-tokens.d.ts.map +1 -0
  29. package/dist/tokens/service-tokens.js +56 -0
  30. package/dist/types/event-types.d.ts +14 -0
  31. package/dist/types/event-types.d.ts.map +1 -0
  32. package/dist/types/event-types.js +5 -0
  33. package/dist/types/feature-types.d.ts +26 -0
  34. package/dist/types/feature-types.d.ts.map +1 -0
  35. package/dist/types/feature-types.js +26 -0
  36. package/dist/types/index.d.ts +11 -0
  37. package/dist/types/index.d.ts.map +1 -0
  38. package/dist/types/index.js +10 -0
  39. package/dist/types/layout-types.d.ts +29 -0
  40. package/dist/types/layout-types.d.ts.map +1 -0
  41. package/dist/types/layout-types.js +5 -0
  42. package/dist/types/route-types.d.ts +22 -0
  43. package/dist/types/route-types.d.ts.map +1 -0
  44. package/dist/types/route-types.js +5 -0
  45. package/dist/types/shell-context.d.ts +34 -0
  46. package/dist/types/shell-context.d.ts.map +1 -0
  47. package/dist/types/shell-context.js +5 -0
  48. package/dist/types/theme-types.d.ts +13 -0
  49. package/dist/types/theme-types.d.ts.map +1 -0
  50. package/dist/types/theme-types.js +5 -0
  51. package/package.json +31 -0
  52. package/src/api/IFeatureManager.ts +68 -0
  53. package/src/api/ILayoutManager.ts +48 -0
  54. package/src/api/IRouter.ts +48 -0
  55. package/src/api/IShell.ts +66 -0
  56. package/src/api/IThemeManager.ts +43 -0
  57. package/src/api/index.ts +10 -0
  58. package/src/index.ts +18 -0
  59. package/src/tokens/index.ts +6 -0
  60. package/src/tokens/service-tokens.ts +64 -0
  61. package/src/types/event-types.ts +22 -0
  62. package/src/types/feature-types.ts +34 -0
  63. package/src/types/index.ts +11 -0
  64. package/src/types/layout-types.ts +33 -0
  65. package/src/types/route-types.ts +24 -0
  66. package/src/types/shell-context.ts +36 -0
  67. package/src/types/theme-types.ts +14 -0
  68. package/tsconfig.json +20 -0
@@ -0,0 +1 @@
1
+ $ tsc -p tsconfig.json
package/README.md ADDED
@@ -0,0 +1,58 @@
1
+ # @amk/ui-shell-api
2
+
3
+ Public API contracts and type definitions for the UI Shell framework.
4
+
5
+ ## Overview
6
+
7
+ This package contains only interfaces and type definitions. It has zero dependencies and provides the contract that all UI Shell implementations must follow.
8
+
9
+ ## Installation
10
+
11
+ ```bash
12
+ npm install @amk/ui-shell-api
13
+ # or
14
+ bun add @amk/ui-shell-api
15
+ ```
16
+
17
+ ## Usage
18
+
19
+ ```typescript
20
+ import type { IShell, IThemeManager, ThemeMode } from '@amk/ui-shell-api';
21
+ import { SHELL_TOKEN, CommonFeatures } from '@amk/ui-shell-api';
22
+
23
+ // Use types for type safety
24
+ function configureShell(shell: IShell) {
25
+ const themeManager: IThemeManager = shell.getThemeManager();
26
+ themeManager.setTheme('dark');
27
+ }
28
+ ```
29
+
30
+ ## Exports
31
+
32
+ ### Types
33
+ - `ThemeMode`, `ThemeConfig`
34
+ - `FeatureFlags`, `CommonFeatures`
35
+ - `RouteConfig`, `RouterOptions`
36
+ - `LayoutSlot`, `ViewportInfo`
37
+ - `ShellEvent`, `ShellContext`
38
+
39
+ ### Interfaces
40
+ - `IShell` - Main shell interface
41
+ - `IThemeManager` - Theme management
42
+ - `IFeatureManager` - Feature flags
43
+ - `IRouter` - Routing
44
+ - `ILayoutManager` - Layout management
45
+
46
+ ### Tokens
47
+ - `SHELL_TOKEN` - DI token for Shell
48
+ - `THEME_MANAGER_TOKEN` - DI token for ThemeManager
49
+ - `FEATURE_MANAGER_TOKEN` - DI token for FeatureManager
50
+ - `LAYOUT_MANAGER_TOKEN` - DI token for LayoutManager
51
+
52
+ ## Philosophy
53
+
54
+ This package follows the **Dependency Inversion Principle** - depend on abstractions, not implementations.
55
+
56
+ ## License
57
+
58
+ MIT
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Feature Manager Interface
3
+ * Public API contract for feature flag management
4
+ */
5
+ import type { FeatureFlags } from '../types';
6
+ export interface IFeatureManager {
7
+ /**
8
+ * Check if a feature is enabled (boolean features)
9
+ */
10
+ isEnabled(key: string): boolean;
11
+ /**
12
+ * Get a feature value with optional default
13
+ */
14
+ get<T = any>(key: string, defaultValue?: T): T;
15
+ /**
16
+ * Set a feature value
17
+ */
18
+ set(key: string, value: any): void;
19
+ /**
20
+ * Enable a feature (set to true)
21
+ */
22
+ enable(key: string): void;
23
+ /**
24
+ * Disable a feature (set to false)
25
+ */
26
+ disable(key: string): void;
27
+ /**
28
+ * Toggle a boolean feature
29
+ */
30
+ toggle(key: string): void;
31
+ /**
32
+ * Update multiple features at once
33
+ */
34
+ update(updates: FeatureFlags): void;
35
+ /**
36
+ * Get all features
37
+ */
38
+ getAll(): Readonly<FeatureFlags>;
39
+ /**
40
+ * Check if a feature exists
41
+ */
42
+ has(key: string): boolean;
43
+ /**
44
+ * Subscribe to feature changes
45
+ */
46
+ subscribe(key: string, listener: (value: any) => void): () => void;
47
+ /**
48
+ * Subscribe to all feature changes
49
+ */
50
+ subscribeAll(listener: (key: string, value: any) => void): () => void;
51
+ /**
52
+ * Clean up resources
53
+ */
54
+ destroy(): void;
55
+ }
56
+ //# sourceMappingURL=IFeatureManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IFeatureManager.d.ts","sourceRoot":"","sources":["../../src/api/IFeatureManager.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IAEhC;;OAEG;IACH,GAAG,CAAC,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IAE/C;;OAEG;IACH,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI,CAAC;IAEnC;;OAEG;IACH,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IAE1B;;OAEG;IACH,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B;;OAEG;IACH,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IAE1B;;OAEG;IACH,MAAM,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI,CAAC;IAEpC;;OAEG;IACH,MAAM,IAAI,QAAQ,CAAC,YAAY,CAAC,CAAC;IAEjC;;OAEG;IACH,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IAE1B;;OAEG;IACH,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,GAAG,MAAM,IAAI,CAAC;IAEnE;;OAEG;IACH,YAAY,CAAC,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,IAAI,GAAG,MAAM,IAAI,CAAC;IAEtE;;OAEG;IACH,OAAO,IAAI,IAAI,CAAC;CACjB"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Feature Manager Interface
3
+ * Public API contract for feature flag management
4
+ */
5
+ export {};
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Layout Manager Interface
3
+ * Public API contract for layout management
4
+ */
5
+ import type { LayoutSlot, LayoutArea } from '../types';
6
+ export interface ILayoutManager {
7
+ /**
8
+ * Register a layout slot
9
+ */
10
+ registerSlot(slot: LayoutSlot): () => void;
11
+ /**
12
+ * Unregister a layout slot
13
+ */
14
+ unregisterSlot(slot: LayoutSlot): void;
15
+ /**
16
+ * Get all slots for an area
17
+ */
18
+ getSlots(area: LayoutArea): LayoutSlot[];
19
+ /**
20
+ * Get all registered areas
21
+ */
22
+ getAreas(): LayoutArea[];
23
+ /**
24
+ * Check if an area has any slots
25
+ */
26
+ hasSlots(area: LayoutArea): boolean;
27
+ /**
28
+ * Subscribe to layout changes
29
+ */
30
+ subscribe(listener: () => void): () => void;
31
+ /**
32
+ * Clear all slots
33
+ */
34
+ clear(): void;
35
+ /**
36
+ * Clean up resources
37
+ */
38
+ destroy(): void;
39
+ }
40
+ //# sourceMappingURL=ILayoutManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ILayoutManager.d.ts","sourceRoot":"","sources":["../../src/api/ILayoutManager.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEvD,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,YAAY,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,IAAI,CAAC;IAE3C;;OAEG;IACH,cAAc,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAAC;IAEvC;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,UAAU,GAAG,UAAU,EAAE,CAAC;IAEzC;;OAEG;IACH,QAAQ,IAAI,UAAU,EAAE,CAAC;IAEzB;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC;IAEpC;;OAEG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC;IAE5C;;OAEG;IACH,KAAK,IAAI,IAAI,CAAC;IAEd;;OAEG;IACH,OAAO,IAAI,IAAI,CAAC;CACjB"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Layout Manager Interface
3
+ * Public API contract for layout management
4
+ */
5
+ export {};
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Router Interface
3
+ * Public API contract for routing
4
+ */
5
+ import type { RouteConfig } from '../types';
6
+ export interface IRouter {
7
+ /**
8
+ * Navigate to a path
9
+ */
10
+ push(path: string): Promise<boolean>;
11
+ /**
12
+ * Replace current route
13
+ */
14
+ replace(path: string): Promise<boolean>;
15
+ /**
16
+ * Go back in history
17
+ */
18
+ back(): void;
19
+ /**
20
+ * Go forward in history
21
+ */
22
+ forward(): void;
23
+ /**
24
+ * Get current route
25
+ */
26
+ getCurrentRoute(): RouteConfig | null;
27
+ /**
28
+ * Subscribe to route changes
29
+ */
30
+ subscribe(listener: (route: RouteConfig) => void): () => void;
31
+ /**
32
+ * Load a route component (lazy loading)
33
+ */
34
+ loadRouteComponent(route: RouteConfig): Promise<any>;
35
+ /**
36
+ * Clean up resources
37
+ */
38
+ destroy(): void;
39
+ }
40
+ //# sourceMappingURL=IRouter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IRouter.d.ts","sourceRoot":"","sources":["../../src/api/IRouter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,MAAM,WAAW,OAAO;IACtB;;OAEG;IACH,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAErC;;OAEG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAExC;;OAEG;IACH,IAAI,IAAI,IAAI,CAAC;IAEb;;OAEG;IACH,OAAO,IAAI,IAAI,CAAC;IAEhB;;OAEG;IACH,eAAe,IAAI,WAAW,GAAG,IAAI,CAAC;IAEtC;;OAEG;IACH,SAAS,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,GAAG,MAAM,IAAI,CAAC;IAE9D;;OAEG;IACH,kBAAkB,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IAErD;;OAEG;IACH,OAAO,IAAI,IAAI,CAAC;CACjB"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Router Interface
3
+ * Public API contract for routing
4
+ */
5
+ export {};
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Shell Interface
3
+ * Public API contract for the UI Shell
4
+ */
5
+ import type { ShellConfig, ShellContext, ShellEventListener, ShellEventType } from '../types';
6
+ import type { IThemeManager } from './IThemeManager';
7
+ import type { IFeatureManager } from './IFeatureManager';
8
+ import type { IRouter } from './IRouter';
9
+ export interface IShell {
10
+ /**
11
+ * Initialize the shell
12
+ */
13
+ initialize(): Promise<void>;
14
+ /**
15
+ * Get shell context for consumers
16
+ */
17
+ getContext(): ShellContext;
18
+ /**
19
+ * Get theme manager
20
+ */
21
+ getThemeManager(): IThemeManager;
22
+ /**
23
+ * Get feature manager
24
+ */
25
+ getFeatureManager(): IFeatureManager;
26
+ /**
27
+ * Get router instance
28
+ */
29
+ getRouter(): IRouter | null;
30
+ /**
31
+ * Emit a shell event
32
+ */
33
+ emit(type: ShellEventType, payload?: any): void;
34
+ /**
35
+ * Subscribe to shell events
36
+ */
37
+ on(type: ShellEventType | '*', listener: ShellEventListener): () => void;
38
+ /**
39
+ * Unsubscribe from shell events
40
+ */
41
+ off(type: ShellEventType | '*', listener: ShellEventListener): void;
42
+ /**
43
+ * Check if shell is ready
44
+ */
45
+ ready(): boolean;
46
+ /**
47
+ * Get configuration
48
+ */
49
+ getConfig(): Readonly<ShellConfig>;
50
+ /**
51
+ * Clean up resources
52
+ */
53
+ destroy(): void;
54
+ }
55
+ //# sourceMappingURL=IShell.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IShell.d.ts","sourceRoot":"","sources":["../../src/api/IShell.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAc,kBAAkB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1G,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,MAAM,WAAW,MAAM;IACrB;;OAEG;IACH,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAE5B;;OAEG;IACH,UAAU,IAAI,YAAY,CAAC;IAE3B;;OAEG;IACH,eAAe,IAAI,aAAa,CAAC;IAEjC;;OAEG;IACH,iBAAiB,IAAI,eAAe,CAAC;IAErC;;OAEG;IACH,SAAS,IAAI,OAAO,GAAG,IAAI,CAAC;IAE5B;;OAEG;IACH,IAAI,CAAC,IAAI,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,GAAG,GAAG,IAAI,CAAC;IAEhD;;OAEG;IACH,EAAE,CAAC,IAAI,EAAE,cAAc,GAAG,GAAG,EAAE,QAAQ,EAAE,kBAAkB,GAAG,MAAM,IAAI,CAAC;IAEzE;;OAEG;IACH,GAAG,CAAC,IAAI,EAAE,cAAc,GAAG,GAAG,EAAE,QAAQ,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAEpE;;OAEG;IACH,KAAK,IAAI,OAAO,CAAC;IAEjB;;OAEG;IACH,SAAS,IAAI,QAAQ,CAAC,WAAW,CAAC,CAAC;IAEnC;;OAEG;IACH,OAAO,IAAI,IAAI,CAAC;CACjB"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Shell Interface
3
+ * Public API contract for the UI Shell
4
+ */
5
+ export {};
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Theme Manager Interface
3
+ * Public API contract for theme management
4
+ */
5
+ import type { ThemeMode } from '../types';
6
+ export interface IThemeManager {
7
+ /**
8
+ * Get the current theme mode
9
+ */
10
+ getTheme(): ThemeMode;
11
+ /**
12
+ * Get the resolved theme (converts 'system' to actual theme)
13
+ */
14
+ getResolvedTheme(): 'light' | 'dark';
15
+ /**
16
+ * Set the theme mode
17
+ */
18
+ setTheme(mode: ThemeMode): void;
19
+ /**
20
+ * Toggle between light and dark themes
21
+ */
22
+ toggleTheme(): void;
23
+ /**
24
+ * Subscribe to theme changes
25
+ */
26
+ subscribe(listener: (theme: ThemeMode) => void): () => void;
27
+ /**
28
+ * Apply custom CSS variables
29
+ */
30
+ setCSSVariables(variables: Record<string, string>): void;
31
+ /**
32
+ * Clean up resources
33
+ */
34
+ destroy(): void;
35
+ }
36
+ //# sourceMappingURL=IThemeManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IThemeManager.d.ts","sourceRoot":"","sources":["../../src/api/IThemeManager.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,QAAQ,IAAI,SAAS,CAAC;IAEtB;;OAEG;IACH,gBAAgB,IAAI,OAAO,GAAG,MAAM,CAAC;IAErC;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI,CAAC;IAEhC;;OAEG;IACH,WAAW,IAAI,IAAI,CAAC;IAEpB;;OAEG;IACH,SAAS,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,GAAG,MAAM,IAAI,CAAC;IAE5D;;OAEG;IACH,eAAe,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;IAEzD;;OAEG;IACH,OAAO,IAAI,IAAI,CAAC;CACjB"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Theme Manager Interface
3
+ * Public API contract for theme management
4
+ */
5
+ export {};
@@ -0,0 +1,10 @@
1
+ /**
2
+ * UI Shell API Interfaces
3
+ * All public interface definitions
4
+ */
5
+ export * from './IShell';
6
+ export * from './IThemeManager';
7
+ export * from './IFeatureManager';
8
+ export * from './IRouter';
9
+ export * from './ILayoutManager';
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * UI Shell API Interfaces
3
+ * All public interface definitions
4
+ */
5
+ export * from './IShell';
6
+ export * from './IThemeManager';
7
+ export * from './IFeatureManager';
8
+ export * from './IRouter';
9
+ export * from './ILayoutManager';
@@ -0,0 +1,12 @@
1
+ /**
2
+ * UI Shell API
3
+ * Public API surface for the UI Shell framework
4
+ *
5
+ * This package contains only type definitions and interfaces.
6
+ * Import implementations from @amk/ui-shell-impl
7
+ */
8
+ export declare const version = "0.1.0";
9
+ export * from './types';
10
+ export * from './api';
11
+ export * from './tokens';
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,eAAO,MAAM,OAAO,UAAU,CAAC;AAG/B,cAAc,SAAS,CAAC;AAGxB,cAAc,OAAO,CAAC;AAGtB,cAAc,UAAU,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,14 @@
1
+ /**
2
+ * UI Shell API
3
+ * Public API surface for the UI Shell framework
4
+ *
5
+ * This package contains only type definitions and interfaces.
6
+ * Import implementations from @amk/ui-shell-impl
7
+ */
8
+ export const version = '0.1.0';
9
+ // Export all types
10
+ export * from './types';
11
+ // Export all API interfaces
12
+ export * from './api';
13
+ // Export service tokens
14
+ export * from './tokens';
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Tokens
3
+ * Export all service tokens
4
+ */
5
+ export * from './service-tokens';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tokens/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Tokens
3
+ * Export all service tokens
4
+ */
5
+ export * from './service-tokens';
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Service Tokens
3
+ * Dependency injection tokens for shell services
4
+ */
5
+ /**
6
+ * Token for Shell service
7
+ */
8
+ export declare const SHELL_TOKEN: unique symbol;
9
+ /**
10
+ * Token for ThemeManager service
11
+ */
12
+ export declare const THEME_MANAGER_TOKEN: unique symbol;
13
+ /**
14
+ * Token for FeatureManager service
15
+ */
16
+ export declare const FEATURE_MANAGER_TOKEN: unique symbol;
17
+ /**
18
+ * Token for Router service
19
+ */
20
+ export declare const ROUTER_TOKEN: unique symbol;
21
+ /**
22
+ * Token for LayoutManager service
23
+ */
24
+ export declare const LAYOUT_MANAGER_TOKEN: unique symbol;
25
+ /**
26
+ * Shell command names
27
+ */
28
+ export declare const ShellCommands: {
29
+ readonly SET_THEME: "shell.setTheme";
30
+ readonly TOGGLE_THEME: "shell.toggleTheme";
31
+ readonly ENABLE_FEATURE: "shell.enableFeature";
32
+ readonly DISABLE_FEATURE: "shell.disableFeature";
33
+ readonly TOGGLE_FEATURE: "shell.toggleFeature";
34
+ readonly NAVIGATE: "shell.navigate";
35
+ readonly NAVIGATE_BACK: "shell.navigateBack";
36
+ };
37
+ /**
38
+ * Shell event names
39
+ */
40
+ export declare const ShellEvents: {
41
+ readonly READY: "shell:ready";
42
+ readonly THEME_CHANGED: "shell:theme-changed";
43
+ readonly FEATURE_TOGGLED: "shell:feature-toggled";
44
+ readonly ROUTE_CHANGED: "shell:route-changed";
45
+ readonly VIEWPORT_RESIZED: "shell:viewport-resized";
46
+ };
47
+ /**
48
+ * Shell view slot names
49
+ */
50
+ export declare const ShellViewSlots: {
51
+ readonly HEADER: "shell.header";
52
+ readonly SIDEBAR: "shell.sidebar";
53
+ readonly MAIN: "shell.main";
54
+ readonly FOOTER: "shell.footer";
55
+ readonly OVERLAY: "shell.overlay";
56
+ };
57
+ //# sourceMappingURL=service-tokens.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service-tokens.d.ts","sourceRoot":"","sources":["../../src/tokens/service-tokens.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,eAAO,MAAM,WAAW,eAAkB,CAAC;AAE3C;;GAEG;AACH,eAAO,MAAM,mBAAmB,eAAyB,CAAC;AAE1D;;GAEG;AACH,eAAO,MAAM,qBAAqB,eAA2B,CAAC;AAE9D;;GAEG;AACH,eAAO,MAAM,YAAY,eAAmB,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,oBAAoB,eAA0B,CAAC;AAE5D;;GAEG;AACH,eAAO,MAAM,aAAa;;;;;;;;CAQhB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,WAAW;;;;;;CAMd,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;CAMjB,CAAC"}
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Service Tokens
3
+ * Dependency injection tokens for shell services
4
+ */
5
+ /**
6
+ * Token for Shell service
7
+ */
8
+ export const SHELL_TOKEN = Symbol('Shell');
9
+ /**
10
+ * Token for ThemeManager service
11
+ */
12
+ export const THEME_MANAGER_TOKEN = Symbol('ThemeManager');
13
+ /**
14
+ * Token for FeatureManager service
15
+ */
16
+ export const FEATURE_MANAGER_TOKEN = Symbol('FeatureManager');
17
+ /**
18
+ * Token for Router service
19
+ */
20
+ export const ROUTER_TOKEN = Symbol('Router');
21
+ /**
22
+ * Token for LayoutManager service
23
+ */
24
+ export const LAYOUT_MANAGER_TOKEN = Symbol('LayoutManager');
25
+ /**
26
+ * Shell command names
27
+ */
28
+ export const ShellCommands = {
29
+ SET_THEME: 'shell.setTheme',
30
+ TOGGLE_THEME: 'shell.toggleTheme',
31
+ ENABLE_FEATURE: 'shell.enableFeature',
32
+ DISABLE_FEATURE: 'shell.disableFeature',
33
+ TOGGLE_FEATURE: 'shell.toggleFeature',
34
+ NAVIGATE: 'shell.navigate',
35
+ NAVIGATE_BACK: 'shell.navigateBack',
36
+ };
37
+ /**
38
+ * Shell event names
39
+ */
40
+ export const ShellEvents = {
41
+ READY: 'shell:ready',
42
+ THEME_CHANGED: 'shell:theme-changed',
43
+ FEATURE_TOGGLED: 'shell:feature-toggled',
44
+ ROUTE_CHANGED: 'shell:route-changed',
45
+ VIEWPORT_RESIZED: 'shell:viewport-resized',
46
+ };
47
+ /**
48
+ * Shell view slot names
49
+ */
50
+ export const ShellViewSlots = {
51
+ HEADER: 'shell.header',
52
+ SIDEBAR: 'shell.sidebar',
53
+ MAIN: 'shell.main',
54
+ FOOTER: 'shell.footer',
55
+ OVERLAY: 'shell.overlay',
56
+ };
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Event Types
3
+ * Type definitions for shell events
4
+ */
5
+ export type ShellEventType = 'theme:changed' | 'feature:toggled' | 'route:changed' | 'viewport:resized' | 'shell:ready' | 'shell:error';
6
+ export interface ShellEvent {
7
+ type: string;
8
+ payload?: any;
9
+ timestamp: number;
10
+ }
11
+ export interface ShellEventListener {
12
+ (event: ShellEvent): void;
13
+ }
14
+ //# sourceMappingURL=event-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-types.d.ts","sourceRoot":"","sources":["../../src/types/event-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,MAAM,cAAc,GACtB,eAAe,GACf,iBAAiB,GACjB,eAAe,GACf,kBAAkB,GAClB,aAAa,GACb,aAAa,CAAC;AAElB,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,kBAAkB;IACjC,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAAC;CAC3B"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Event Types
3
+ * Type definitions for shell events
4
+ */
5
+ export {};
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Feature Types
3
+ * Type definitions for feature flag management
4
+ */
5
+ export interface FeatureFlags {
6
+ [key: string]: boolean | string | number | object;
7
+ }
8
+ /**
9
+ * Common feature flag definitions
10
+ */
11
+ export declare const CommonFeatures: {
12
+ readonly DARK_MODE: "ui.darkMode";
13
+ readonly SIDEBAR: "ui.sidebar";
14
+ readonly MOBILE_NAV: "ui.mobileNav";
15
+ readonly BREADCRUMBS: "ui.breadcrumbs";
16
+ readonly SSR: "experimental.ssr";
17
+ readonly STREAMING: "experimental.streaming";
18
+ readonly LAZY_LOADING: "experimental.lazyLoading";
19
+ readonly VOICE_MODE: "user.voiceMode";
20
+ readonly ADVANCED_COMPOSER: "user.advancedComposer";
21
+ readonly UPGRADE_PILLS: "user.upgradePills";
22
+ readonly REQUEST_RETRY: "performance.requestRetry";
23
+ readonly POLLING: "performance.polling";
24
+ readonly CACHE: "performance.cache";
25
+ };
26
+ //# sourceMappingURL=feature-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feature-types.d.ts","sourceRoot":"","sources":["../../src/types/feature-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,YAAY;IAC3B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;CACnD;AAED;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;CAqBjB,CAAC"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Feature Types
3
+ * Type definitions for feature flag management
4
+ */
5
+ /**
6
+ * Common feature flag definitions
7
+ */
8
+ export const CommonFeatures = {
9
+ // UI Features
10
+ DARK_MODE: 'ui.darkMode',
11
+ SIDEBAR: 'ui.sidebar',
12
+ MOBILE_NAV: 'ui.mobileNav',
13
+ BREADCRUMBS: 'ui.breadcrumbs',
14
+ // Experimental Features
15
+ SSR: 'experimental.ssr',
16
+ STREAMING: 'experimental.streaming',
17
+ LAZY_LOADING: 'experimental.lazyLoading',
18
+ // User Features
19
+ VOICE_MODE: 'user.voiceMode',
20
+ ADVANCED_COMPOSER: 'user.advancedComposer',
21
+ UPGRADE_PILLS: 'user.upgradePills',
22
+ // Performance Features
23
+ REQUEST_RETRY: 'performance.requestRetry',
24
+ POLLING: 'performance.polling',
25
+ CACHE: 'performance.cache',
26
+ };
@@ -0,0 +1,11 @@
1
+ /**
2
+ * UI Shell API Types
3
+ * All public type definitions
4
+ */
5
+ export * from './theme-types';
6
+ export * from './feature-types';
7
+ export * from './route-types';
8
+ export * from './layout-types';
9
+ export * from './event-types';
10
+ export * from './shell-context';
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * UI Shell API Types
3
+ * All public type definitions
4
+ */
5
+ export * from './theme-types';
6
+ export * from './feature-types';
7
+ export * from './route-types';
8
+ export * from './layout-types';
9
+ export * from './event-types';
10
+ export * from './shell-context';