@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.
- package/.turbo/turbo-build.log +1 -0
- package/README.md +58 -0
- package/dist/api/IFeatureManager.d.ts +56 -0
- package/dist/api/IFeatureManager.d.ts.map +1 -0
- package/dist/api/IFeatureManager.js +5 -0
- package/dist/api/ILayoutManager.d.ts +40 -0
- package/dist/api/ILayoutManager.d.ts.map +1 -0
- package/dist/api/ILayoutManager.js +5 -0
- package/dist/api/IRouter.d.ts +40 -0
- package/dist/api/IRouter.d.ts.map +1 -0
- package/dist/api/IRouter.js +5 -0
- package/dist/api/IShell.d.ts +55 -0
- package/dist/api/IShell.d.ts.map +1 -0
- package/dist/api/IShell.js +5 -0
- package/dist/api/IThemeManager.d.ts +36 -0
- package/dist/api/IThemeManager.d.ts.map +1 -0
- package/dist/api/IThemeManager.js +5 -0
- package/dist/api/index.d.ts +10 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +9 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +14 -0
- package/dist/tokens/index.d.ts +6 -0
- package/dist/tokens/index.d.ts.map +1 -0
- package/dist/tokens/index.js +5 -0
- package/dist/tokens/service-tokens.d.ts +57 -0
- package/dist/tokens/service-tokens.d.ts.map +1 -0
- package/dist/tokens/service-tokens.js +56 -0
- package/dist/types/event-types.d.ts +14 -0
- package/dist/types/event-types.d.ts.map +1 -0
- package/dist/types/event-types.js +5 -0
- package/dist/types/feature-types.d.ts +26 -0
- package/dist/types/feature-types.d.ts.map +1 -0
- package/dist/types/feature-types.js +26 -0
- package/dist/types/index.d.ts +11 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +10 -0
- package/dist/types/layout-types.d.ts +29 -0
- package/dist/types/layout-types.d.ts.map +1 -0
- package/dist/types/layout-types.js +5 -0
- package/dist/types/route-types.d.ts +22 -0
- package/dist/types/route-types.d.ts.map +1 -0
- package/dist/types/route-types.js +5 -0
- package/dist/types/shell-context.d.ts +34 -0
- package/dist/types/shell-context.d.ts.map +1 -0
- package/dist/types/shell-context.js +5 -0
- package/dist/types/theme-types.d.ts +13 -0
- package/dist/types/theme-types.d.ts.map +1 -0
- package/dist/types/theme-types.js +5 -0
- package/package.json +31 -0
- package/src/api/IFeatureManager.ts +68 -0
- package/src/api/ILayoutManager.ts +48 -0
- package/src/api/IRouter.ts +48 -0
- package/src/api/IShell.ts +66 -0
- package/src/api/IThemeManager.ts +43 -0
- package/src/api/index.ts +10 -0
- package/src/index.ts +18 -0
- package/src/tokens/index.ts +6 -0
- package/src/tokens/service-tokens.ts +64 -0
- package/src/types/event-types.ts +22 -0
- package/src/types/feature-types.ts +34 -0
- package/src/types/index.ts +11 -0
- package/src/types/layout-types.ts +33 -0
- package/src/types/route-types.ts +24 -0
- package/src/types/shell-context.ts +36 -0
- package/src/types/theme-types.ts +14 -0
- package/tsconfig.json +20 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shell Context Types
|
|
3
|
+
* Type definitions for shell context
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { ThemeMode, ThemeConfig } from './theme-types';
|
|
7
|
+
import type { FeatureFlags } from './feature-types';
|
|
8
|
+
import type { ViewportInfo } from './layout-types';
|
|
9
|
+
|
|
10
|
+
export interface ShellConfig {
|
|
11
|
+
/** Theme configuration */
|
|
12
|
+
theme?: ThemeConfig;
|
|
13
|
+
/** Feature flags and experimental configurations */
|
|
14
|
+
features?: FeatureFlags;
|
|
15
|
+
/** Enable server-side rendering */
|
|
16
|
+
ssr?: boolean;
|
|
17
|
+
/** Enable streaming rendering */
|
|
18
|
+
streaming?: boolean;
|
|
19
|
+
/** Custom shell metadata */
|
|
20
|
+
metadata?: Record<string, any>;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface ShellContext {
|
|
24
|
+
/** Current theme mode */
|
|
25
|
+
theme: ThemeMode;
|
|
26
|
+
/** Set theme mode */
|
|
27
|
+
setTheme: (mode: ThemeMode) => void;
|
|
28
|
+
/** Feature flags */
|
|
29
|
+
features: FeatureFlags;
|
|
30
|
+
/** Check if a feature is enabled */
|
|
31
|
+
isFeatureEnabled: (key: string) => boolean;
|
|
32
|
+
/** Get feature value */
|
|
33
|
+
getFeature: <T = any>(key: string, defaultValue?: T) => T;
|
|
34
|
+
/** Current viewport size */
|
|
35
|
+
viewport: ViewportInfo;
|
|
36
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Theme Types
|
|
3
|
+
* Type definitions for theme management
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export type ThemeMode = 'light' | 'dark' | 'system';
|
|
7
|
+
|
|
8
|
+
export interface ThemeConfig {
|
|
9
|
+
mode: ThemeMode;
|
|
10
|
+
/** Primary color scheme */
|
|
11
|
+
primaryColor?: string;
|
|
12
|
+
/** Custom CSS variables */
|
|
13
|
+
cssVariables?: Record<string, string>;
|
|
14
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "ES2022",
|
|
5
|
+
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
6
|
+
"declaration": true,
|
|
7
|
+
"declarationMap": true,
|
|
8
|
+
"outDir": "dist",
|
|
9
|
+
"rootDir": "src",
|
|
10
|
+
"strict": true,
|
|
11
|
+
"esModuleInterop": true,
|
|
12
|
+
"skipLibCheck": true,
|
|
13
|
+
"forceConsistentCasingInFileNames": true,
|
|
14
|
+
"moduleResolution": "bundler",
|
|
15
|
+
"resolveJsonModule": true,
|
|
16
|
+
"allowSyntheticDefaultImports": true
|
|
17
|
+
},
|
|
18
|
+
"include": ["src/**/*"],
|
|
19
|
+
"exclude": ["node_modules", "dist"]
|
|
20
|
+
}
|