@hamak/ui-shell 0.5.1

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 (143) hide show
  1. package/README.md +414 -0
  2. package/dist/api/api/IFeatureManager.d.ts +56 -0
  3. package/dist/api/api/IFeatureManager.d.ts.map +1 -0
  4. package/dist/api/api/IFeatureManager.js +5 -0
  5. package/dist/api/api/ILayoutManager.d.ts +40 -0
  6. package/dist/api/api/ILayoutManager.d.ts.map +1 -0
  7. package/dist/api/api/ILayoutManager.js +5 -0
  8. package/dist/api/api/IRouter.d.ts +40 -0
  9. package/dist/api/api/IRouter.d.ts.map +1 -0
  10. package/dist/api/api/IRouter.js +5 -0
  11. package/dist/api/api/IShell.d.ts +55 -0
  12. package/dist/api/api/IShell.d.ts.map +1 -0
  13. package/dist/api/api/IShell.js +5 -0
  14. package/dist/api/api/IThemeManager.d.ts +36 -0
  15. package/dist/api/api/IThemeManager.d.ts.map +1 -0
  16. package/dist/api/api/IThemeManager.js +5 -0
  17. package/dist/api/api/index.d.ts +10 -0
  18. package/dist/api/api/index.d.ts.map +1 -0
  19. package/dist/api/api/index.js +9 -0
  20. package/dist/api/index.d.ts +11 -0
  21. package/dist/api/index.d.ts.map +1 -0
  22. package/dist/api/index.js +13 -0
  23. package/dist/api/tokens/index.d.ts +6 -0
  24. package/dist/api/tokens/index.d.ts.map +1 -0
  25. package/dist/api/tokens/index.js +5 -0
  26. package/dist/api/tokens/service-tokens.d.ts +57 -0
  27. package/dist/api/tokens/service-tokens.d.ts.map +1 -0
  28. package/dist/api/tokens/service-tokens.js +56 -0
  29. package/dist/api/types/event-types.d.ts +14 -0
  30. package/dist/api/types/event-types.d.ts.map +1 -0
  31. package/dist/api/types/event-types.js +5 -0
  32. package/dist/api/types/feature-types.d.ts +26 -0
  33. package/dist/api/types/feature-types.d.ts.map +1 -0
  34. package/dist/api/types/feature-types.js +26 -0
  35. package/dist/api/types/index.d.ts +11 -0
  36. package/dist/api/types/index.d.ts.map +1 -0
  37. package/dist/api/types/index.js +10 -0
  38. package/dist/api/types/layout-types.d.ts +29 -0
  39. package/dist/api/types/layout-types.d.ts.map +1 -0
  40. package/dist/api/types/layout-types.js +5 -0
  41. package/dist/api/types/route-types.d.ts +22 -0
  42. package/dist/api/types/route-types.d.ts.map +1 -0
  43. package/dist/api/types/route-types.js +5 -0
  44. package/dist/api/types/shell-context.d.ts +34 -0
  45. package/dist/api/types/shell-context.d.ts.map +1 -0
  46. package/dist/api/types/shell-context.js +5 -0
  47. package/dist/api/types/theme-types.d.ts +13 -0
  48. package/dist/api/types/theme-types.d.ts.map +1 -0
  49. package/dist/api/types/theme-types.js +5 -0
  50. package/dist/impl/core/DefaultFeatureManager.d.ts +24 -0
  51. package/dist/impl/core/DefaultFeatureManager.d.ts.map +1 -0
  52. package/dist/impl/core/DefaultFeatureManager.js +90 -0
  53. package/dist/impl/core/DefaultLayoutManager.d.ts +19 -0
  54. package/dist/impl/core/DefaultLayoutManager.d.ts.map +1 -0
  55. package/dist/impl/core/DefaultLayoutManager.js +71 -0
  56. package/dist/impl/core/DefaultRouter.d.ts +30 -0
  57. package/dist/impl/core/DefaultRouter.d.ts.map +1 -0
  58. package/dist/impl/core/DefaultRouter.js +136 -0
  59. package/dist/impl/core/DefaultShell.d.ts +30 -0
  60. package/dist/impl/core/DefaultShell.d.ts.map +1 -0
  61. package/dist/impl/core/DefaultShell.js +187 -0
  62. package/dist/impl/core/DefaultThemeManager.d.ts +27 -0
  63. package/dist/impl/core/DefaultThemeManager.d.ts.map +1 -0
  64. package/dist/impl/core/DefaultThemeManager.js +101 -0
  65. package/dist/impl/core/index.d.ts +10 -0
  66. package/dist/impl/core/index.d.ts.map +1 -0
  67. package/dist/impl/core/index.js +9 -0
  68. package/dist/impl/index.d.ts +21 -0
  69. package/dist/impl/index.d.ts.map +1 -0
  70. package/dist/impl/index.js +41 -0
  71. package/dist/impl/plugin/ShellPluginFactory.d.ts +11 -0
  72. package/dist/impl/plugin/ShellPluginFactory.d.ts.map +1 -0
  73. package/dist/impl/plugin/ShellPluginFactory.js +73 -0
  74. package/dist/impl/plugin/index.d.ts +6 -0
  75. package/dist/impl/plugin/index.d.ts.map +1 -0
  76. package/dist/impl/plugin/index.js +5 -0
  77. package/dist/impl/providers/CSSVariablesThemeProvider.d.ts +16 -0
  78. package/dist/impl/providers/CSSVariablesThemeProvider.d.ts.map +1 -0
  79. package/dist/impl/providers/CSSVariablesThemeProvider.js +64 -0
  80. package/dist/impl/providers/HashRouterStrategy.d.ts +20 -0
  81. package/dist/impl/providers/HashRouterStrategy.d.ts.map +1 -0
  82. package/dist/impl/providers/HashRouterStrategy.js +67 -0
  83. package/dist/impl/providers/HistoryRouterStrategy.d.ts +21 -0
  84. package/dist/impl/providers/HistoryRouterStrategy.d.ts.map +1 -0
  85. package/dist/impl/providers/HistoryRouterStrategy.js +79 -0
  86. package/dist/impl/providers/LocalStorageProvider.d.ts +13 -0
  87. package/dist/impl/providers/LocalStorageProvider.d.ts.map +1 -0
  88. package/dist/impl/providers/LocalStorageProvider.js +50 -0
  89. package/dist/impl/providers/MemoryStorageProvider.d.ts +14 -0
  90. package/dist/impl/providers/MemoryStorageProvider.d.ts.map +1 -0
  91. package/dist/impl/providers/MemoryStorageProvider.js +29 -0
  92. package/dist/impl/providers/index.d.ts +10 -0
  93. package/dist/impl/providers/index.d.ts.map +1 -0
  94. package/dist/impl/providers/index.js +9 -0
  95. package/dist/impl/utils/index.d.ts +6 -0
  96. package/dist/impl/utils/index.d.ts.map +1 -0
  97. package/dist/impl/utils/index.js +5 -0
  98. package/dist/impl/utils/viewport-utils.d.ts +16 -0
  99. package/dist/impl/utils/viewport-utils.d.ts.map +1 -0
  100. package/dist/impl/utils/viewport-utils.js +52 -0
  101. package/dist/index.d.ts +11 -0
  102. package/dist/index.d.ts.map +1 -0
  103. package/dist/index.js +11 -0
  104. package/dist/spi/guards/NavigationGuard.d.ts +18 -0
  105. package/dist/spi/guards/NavigationGuard.d.ts.map +1 -0
  106. package/dist/spi/guards/NavigationGuard.js +5 -0
  107. package/dist/spi/guards/index.d.ts +6 -0
  108. package/dist/spi/guards/index.d.ts.map +1 -0
  109. package/dist/spi/guards/index.js +5 -0
  110. package/dist/spi/hooks/ShellHooks.d.ts +40 -0
  111. package/dist/spi/hooks/ShellHooks.d.ts.map +1 -0
  112. package/dist/spi/hooks/ShellHooks.js +5 -0
  113. package/dist/spi/hooks/index.d.ts +6 -0
  114. package/dist/spi/hooks/index.d.ts.map +1 -0
  115. package/dist/spi/hooks/index.js +5 -0
  116. package/dist/spi/index.d.ts +18 -0
  117. package/dist/spi/index.d.ts.map +1 -0
  118. package/dist/spi/index.js +22 -0
  119. package/dist/spi/providers/IRouterStrategy.d.ts +35 -0
  120. package/dist/spi/providers/IRouterStrategy.d.ts.map +1 -0
  121. package/dist/spi/providers/IRouterStrategy.js +5 -0
  122. package/dist/spi/providers/IStorageProvider.d.ts +27 -0
  123. package/dist/spi/providers/IStorageProvider.d.ts.map +1 -0
  124. package/dist/spi/providers/IStorageProvider.js +5 -0
  125. package/dist/spi/providers/ITemplateProvider.d.ts +36 -0
  126. package/dist/spi/providers/ITemplateProvider.d.ts.map +1 -0
  127. package/dist/spi/providers/ITemplateProvider.js +5 -0
  128. package/dist/spi/providers/IThemeProvider.d.ts +24 -0
  129. package/dist/spi/providers/IThemeProvider.d.ts.map +1 -0
  130. package/dist/spi/providers/IThemeProvider.js +5 -0
  131. package/dist/spi/providers/index.d.ts +9 -0
  132. package/dist/spi/providers/index.d.ts.map +1 -0
  133. package/dist/spi/providers/index.js +8 -0
  134. package/dist/spi/slots/LayoutSlotProvider.d.ts +31 -0
  135. package/dist/spi/slots/LayoutSlotProvider.d.ts.map +1 -0
  136. package/dist/spi/slots/LayoutSlotProvider.js +5 -0
  137. package/dist/spi/slots/TemplateSlot.d.ts +34 -0
  138. package/dist/spi/slots/TemplateSlot.d.ts.map +1 -0
  139. package/dist/spi/slots/TemplateSlot.js +5 -0
  140. package/dist/spi/slots/index.d.ts +7 -0
  141. package/dist/spi/slots/index.d.ts.map +1 -0
  142. package/dist/spi/slots/index.js +6 -0
  143. package/package.json +67 -0
@@ -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/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,11 @@
1
+ /**
2
+ * UI Shell API
3
+ * Public API surface for the UI Shell framework
4
+ *
5
+ * This module contains only type definitions and interfaces.
6
+ * Import implementations from @hamak/ui-shell or '@hamak/ui-shell/impl'
7
+ */
8
+ export * from './types';
9
+ export * from './api';
10
+ export * from './tokens';
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,cAAc,SAAS,CAAC;AAGxB,cAAc,OAAO,CAAC;AAGtB,cAAc,UAAU,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * UI Shell API
3
+ * Public API surface for the UI Shell framework
4
+ *
5
+ * This module contains only type definitions and interfaces.
6
+ * Import implementations from @hamak/ui-shell or '@hamak/ui-shell/impl'
7
+ */
8
+ // Export all types
9
+ export * from './types';
10
+ // Export all API interfaces
11
+ export * from './api';
12
+ // Export service tokens
13
+ 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/api/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/api/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/api/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/api/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/api/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';
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Layout Types
3
+ * Type definitions for layout and responsive design
4
+ */
5
+ export type LayoutArea = 'header' | 'sidebar' | 'main' | 'footer' | 'overlay';
6
+ export interface LayoutSlot {
7
+ /** Slot identifier */
8
+ id: string;
9
+ /** Slot position/area */
10
+ area: LayoutArea;
11
+ /** Slot priority for ordering */
12
+ priority?: number;
13
+ /** Optional metadata */
14
+ meta?: Record<string, any>;
15
+ }
16
+ export interface ViewportInfo {
17
+ width: number;
18
+ height: number;
19
+ isMobile: boolean;
20
+ isTablet: boolean;
21
+ isDesktop: boolean;
22
+ }
23
+ export type BreakpointName = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
24
+ export interface Breakpoint {
25
+ name: BreakpointName;
26
+ minWidth: number;
27
+ maxWidth?: number;
28
+ }
29
+ //# sourceMappingURL=layout-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout-types.d.ts","sourceRoot":"","sources":["../../../src/api/types/layout-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE9E,MAAM,WAAW,UAAU;IACzB,sBAAsB;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,yBAAyB;IACzB,IAAI,EAAE,UAAU,CAAC;IACjB,iCAAiC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wBAAwB;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC5B;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,MAAM,cAAc,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;AAEtE,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,cAAc,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Layout Types
3
+ * Type definitions for layout and responsive design
4
+ */
5
+ export {};
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Route Types
3
+ * Type definitions for routing
4
+ */
5
+ export interface RouteConfig {
6
+ path: string;
7
+ /** Lazy-loaded component factory */
8
+ component: () => Promise<any>;
9
+ /** Route metadata */
10
+ meta?: Record<string, any>;
11
+ /** Child routes */
12
+ children?: RouteConfig[];
13
+ /** Route guards */
14
+ beforeEnter?: (to: RouteConfig, from: RouteConfig) => boolean | Promise<boolean>;
15
+ }
16
+ export type RouterMode = 'history' | 'hash' | 'memory';
17
+ export interface RouterOptions {
18
+ routes: RouteConfig[];
19
+ mode?: RouterMode;
20
+ base?: string;
21
+ }
22
+ //# sourceMappingURL=route-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"route-types.d.ts","sourceRoot":"","sources":["../../../src/api/types/route-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,oCAAoC;IACpC,SAAS,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC;IAC9B,qBAAqB;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC3B,mBAAmB;IACnB,QAAQ,CAAC,EAAE,WAAW,EAAE,CAAC;IACzB,mBAAmB;IACnB,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAClF;AAED,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEvD,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Route Types
3
+ * Type definitions for routing
4
+ */
5
+ export {};
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Shell Context Types
3
+ * Type definitions for shell context
4
+ */
5
+ import type { ThemeMode, ThemeConfig } from './theme-types';
6
+ import type { FeatureFlags } from './feature-types';
7
+ import type { ViewportInfo } from './layout-types';
8
+ export interface ShellConfig {
9
+ /** Theme configuration */
10
+ theme?: ThemeConfig;
11
+ /** Feature flags and experimental configurations */
12
+ features?: FeatureFlags;
13
+ /** Enable server-side rendering */
14
+ ssr?: boolean;
15
+ /** Enable streaming rendering */
16
+ streaming?: boolean;
17
+ /** Custom shell metadata */
18
+ metadata?: Record<string, any>;
19
+ }
20
+ export interface ShellContext {
21
+ /** Current theme mode */
22
+ theme: ThemeMode;
23
+ /** Set theme mode */
24
+ setTheme: (mode: ThemeMode) => void;
25
+ /** Feature flags */
26
+ features: FeatureFlags;
27
+ /** Check if a feature is enabled */
28
+ isFeatureEnabled: (key: string) => boolean;
29
+ /** Get feature value */
30
+ getFeature: <T = any>(key: string, defaultValue?: T) => T;
31
+ /** Current viewport size */
32
+ viewport: ViewportInfo;
33
+ }
34
+ //# sourceMappingURL=shell-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shell-context.d.ts","sourceRoot":"","sources":["../../../src/api/types/shell-context.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,MAAM,WAAW,WAAW;IAC1B,0BAA0B;IAC1B,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,oDAAoD;IACpD,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,mCAAmC;IACnC,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,iCAAiC;IACjC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAChC;AAED,MAAM,WAAW,YAAY;IAC3B,yBAAyB;IACzB,KAAK,EAAE,SAAS,CAAC;IACjB,qBAAqB;IACrB,QAAQ,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;IACpC,oBAAoB;IACpB,QAAQ,EAAE,YAAY,CAAC;IACvB,oCAAoC;IACpC,gBAAgB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;IAC3C,wBAAwB;IACxB,UAAU,EAAE,CAAC,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;IAC1D,4BAA4B;IAC5B,QAAQ,EAAE,YAAY,CAAC;CACxB"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Shell Context Types
3
+ * Type definitions for shell context
4
+ */
5
+ export {};
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Theme Types
3
+ * Type definitions for theme management
4
+ */
5
+ export type ThemeMode = 'light' | 'dark' | 'system';
6
+ export interface ThemeConfig {
7
+ mode: ThemeMode;
8
+ /** Primary color scheme */
9
+ primaryColor?: string;
10
+ /** Custom CSS variables */
11
+ cssVariables?: Record<string, string>;
12
+ }
13
+ //# sourceMappingURL=theme-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme-types.d.ts","sourceRoot":"","sources":["../../../src/api/types/theme-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEpD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,SAAS,CAAC;IAChB,2BAA2B;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,2BAA2B;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACvC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Theme Types
3
+ * Type definitions for theme management
4
+ */
5
+ export {};
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Default Feature Manager Implementation
3
+ */
4
+ import type { IFeatureManager } from '../../api';
5
+ import type { FeatureFlags } from '../../api';
6
+ export declare class DefaultFeatureManager implements IFeatureManager {
7
+ private features;
8
+ private listeners;
9
+ constructor(initialFeatures?: FeatureFlags);
10
+ isEnabled(key: string): boolean;
11
+ get<T = any>(key: string, defaultValue?: T): T;
12
+ set(key: string, value: any): void;
13
+ enable(key: string): void;
14
+ disable(key: string): void;
15
+ toggle(key: string): void;
16
+ update(updates: FeatureFlags): void;
17
+ getAll(): Readonly<FeatureFlags>;
18
+ has(key: string): boolean;
19
+ subscribe(key: string, listener: (value: any) => void): () => void;
20
+ subscribeAll(listener: (key: string, value: any) => void): () => void;
21
+ destroy(): void;
22
+ private notifyListeners;
23
+ }
24
+ //# sourceMappingURL=DefaultFeatureManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DefaultFeatureManager.d.ts","sourceRoot":"","sources":["../../../src/impl/core/DefaultFeatureManager.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE9C,qBAAa,qBAAsB,YAAW,eAAe;IAC3D,OAAO,CAAC,QAAQ,CAAe;IAC/B,OAAO,CAAC,SAAS,CAAqD;gBAE1D,eAAe,GAAE,YAAiB;IAI9C,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAK/B,GAAG,CAAC,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,CAAC,GAAG,CAAC;IAK9C,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI;IAQlC,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAIzB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAI1B,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAIzB,MAAM,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI;IAMnC,MAAM,IAAI,QAAQ,CAAC,YAAY,CAAC;IAIhC,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAIzB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,GAAG,MAAM,IAAI;IAiBlE,YAAY,CAAC,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,IAAI,GAAG,MAAM,IAAI;IAcrE,OAAO,IAAI,IAAI;IAIf,OAAO,CAAC,eAAe;CAMxB"}
@@ -0,0 +1,90 @@
1
+ /**
2
+ * Default Feature Manager Implementation
3
+ */
4
+ export class DefaultFeatureManager {
5
+ constructor(initialFeatures = {}) {
6
+ Object.defineProperty(this, "features", {
7
+ enumerable: true,
8
+ configurable: true,
9
+ writable: true,
10
+ value: void 0
11
+ });
12
+ Object.defineProperty(this, "listeners", {
13
+ enumerable: true,
14
+ configurable: true,
15
+ writable: true,
16
+ value: new Map()
17
+ });
18
+ this.features = { ...initialFeatures };
19
+ }
20
+ isEnabled(key) {
21
+ const value = this.features[key];
22
+ return typeof value === 'boolean' ? value : Boolean(value);
23
+ }
24
+ get(key, defaultValue) {
25
+ const value = this.features[key];
26
+ return (value !== undefined ? value : defaultValue);
27
+ }
28
+ set(key, value) {
29
+ const oldValue = this.features[key];
30
+ if (oldValue === value)
31
+ return;
32
+ this.features[key] = value;
33
+ this.notifyListeners(key, value);
34
+ }
35
+ enable(key) {
36
+ this.set(key, true);
37
+ }
38
+ disable(key) {
39
+ this.set(key, false);
40
+ }
41
+ toggle(key) {
42
+ this.set(key, !this.isEnabled(key));
43
+ }
44
+ update(updates) {
45
+ Object.entries(updates).forEach(([key, value]) => {
46
+ this.set(key, value);
47
+ });
48
+ }
49
+ getAll() {
50
+ return { ...this.features };
51
+ }
52
+ has(key) {
53
+ return key in this.features;
54
+ }
55
+ subscribe(key, listener) {
56
+ if (!this.listeners.has(key)) {
57
+ this.listeners.set(key, new Set());
58
+ }
59
+ this.listeners.get(key).add(listener);
60
+ return () => {
61
+ const listeners = this.listeners.get(key);
62
+ if (listeners) {
63
+ listeners.delete(listener);
64
+ if (listeners.size === 0) {
65
+ this.listeners.delete(key);
66
+ }
67
+ }
68
+ };
69
+ }
70
+ subscribeAll(listener) {
71
+ const unsubscribers = [];
72
+ const currentKeys = Object.keys(this.features);
73
+ currentKeys.forEach(key => {
74
+ const unsub = this.subscribe(key, value => listener(key, value));
75
+ unsubscribers.push(unsub);
76
+ });
77
+ return () => {
78
+ unsubscribers.forEach(unsub => unsub());
79
+ };
80
+ }
81
+ destroy() {
82
+ this.listeners.clear();
83
+ }
84
+ notifyListeners(key, value) {
85
+ const listeners = this.listeners.get(key);
86
+ if (listeners) {
87
+ listeners.forEach(listener => listener(value));
88
+ }
89
+ }
90
+ }
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Default Layout Manager Implementation
3
+ */
4
+ import type { ILayoutManager } from '../../api';
5
+ import type { LayoutSlot, LayoutArea } from '../../api';
6
+ export declare class DefaultLayoutManager implements ILayoutManager {
7
+ private slots;
8
+ private listeners;
9
+ registerSlot(slot: LayoutSlot): () => void;
10
+ unregisterSlot(slot: LayoutSlot): void;
11
+ getSlots(area: LayoutArea): LayoutSlot[];
12
+ getAreas(): LayoutArea[];
13
+ hasSlots(area: LayoutArea): boolean;
14
+ subscribe(listener: () => void): () => void;
15
+ clear(): void;
16
+ destroy(): void;
17
+ private notifyListeners;
18
+ }
19
+ //# sourceMappingURL=DefaultLayoutManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DefaultLayoutManager.d.ts","sourceRoot":"","sources":["../../../src/impl/core/DefaultLayoutManager.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAExD,qBAAa,oBAAqB,YAAW,cAAc;IACzD,OAAO,CAAC,KAAK,CAA2C;IACxD,OAAO,CAAC,SAAS,CAA8B;IAE/C,YAAY,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,IAAI;IAY1C,cAAc,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI;IAYtC,QAAQ,CAAC,IAAI,EAAE,UAAU,GAAG,UAAU,EAAE;IAWxC,QAAQ,IAAI,UAAU,EAAE;IAIxB,QAAQ,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO;IAKnC,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI;IAK3C,KAAK,IAAI,IAAI;IAKb,OAAO,IAAI,IAAI;IAKf,OAAO,CAAC,eAAe;CAGxB"}