@hamak/ui-shell-api 0.4.6 → 0.4.8

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/package.json CHANGED
@@ -1,12 +1,15 @@
1
1
  {
2
2
  "name": "@hamak/ui-shell-api",
3
- "version": "0.4.6",
3
+ "version": "0.4.8",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "UI Shell API - Core UI shell interfaces",
7
7
  "main": "dist/index.js",
8
8
  "types": "dist/index.d.ts",
9
9
  "sideEffects": false,
10
+ "files": [
11
+ "dist"
12
+ ],
10
13
  "repository": {
11
14
  "type": "git",
12
15
  "url": "https://github.com/amah/app-framework.git",
@@ -1 +0,0 @@
1
- $ tsc -p tsconfig.json && tsc -p tsconfig.es2015.json
package/CHANGELOG.md DELETED
@@ -1,41 +0,0 @@
1
- ## 0.4.0 (2025-11-10)
2
-
3
- ### 🚀 Features
4
-
5
- - implement notification plugin with UI and backend components ([c19ffcf](https://github.com/amah/app-framework/commit/c19ffcf))
6
- - add ES2015 build support and fix TypeScript config for logging packages ([be5e45e](https://github.com/amah/app-framework/commit/be5e45e))
7
- - complete logging system build and add optional console interception ([f390bc6](https://github.com/amah/app-framework/commit/f390bc6))
8
- - implement core pluggable logging system (Phase 1) ([2abdc1a](https://github.com/amah/app-framework/commit/2abdc1a))
9
-
10
- ### 🩹 Fixes
11
-
12
- - add notification packages to workspaces ([97a234d](https://github.com/amah/app-framework/commit/97a234d))
13
-
14
- ### ❤️ Thank You
15
-
16
- - Amah
17
- - Claude
18
-
19
- ## 0.3.0 (2025-11-06)
20
-
21
- ### 🚀 Features
22
-
23
- - migrate from Turbo to Nx 22 with comprehensive monorepo setup ([e63801e](https://github.com/amah/app-framework/commit/e63801e))
24
- - add Nx Release for automated dependency management ([01d474f](https://github.com/amah/app-framework/commit/01d474f))
25
- - migrate from Turbo to Nx 22 monorepo orchestration ([d374271](https://github.com/amah/app-framework/commit/d374271))
26
- - add configurable main padding and resizable sidebar to DashboardLayout ([c1d25bf](https://github.com/amah/app-framework/commit/c1d25bf))
27
- - add debug logging and version management system ([ea514fc](https://github.com/amah/app-framework/commit/ea514fc))
28
- - **ui-store:** add STORE_EXTENSIONS_TOKEN for DI-based middleware/reducer registration ([e855bdd](https://github.com/amah/app-framework/commit/e855bdd))
29
- - Rename package scope from @amk to @hamak and configure npm publishing ([b6040b5](https://github.com/amah/app-framework/commit/b6040b5))
30
- - Add hybrid local/CI-CD development workflow with bun link ([d09f528](https://github.com/amah/app-framework/commit/d09f528))
31
- - Add Turborepo for intelligent build orchestration and fix test type errors ([ba41db8](https://github.com/amah/app-framework/commit/ba41db8))
32
- - Add Redux store integration with ui-store package and demo ([e5aafa8](https://github.com/amah/app-framework/commit/e5aafa8))
33
-
34
- ### 🩹 Fixes
35
-
36
- - move git config to top-level release.git in nx.json ([1bb2187](https://github.com/amah/app-framework/commit/1bb2187))
37
-
38
- ### ❤️ Thank You
39
-
40
- - Amah
41
- - Claude
package/project.json DELETED
@@ -1,24 +0,0 @@
1
- {
2
- "name": "@hamak/ui-shell-api",
3
- "$schema": "../../../node_modules/nx/schemas/project-schema.json",
4
- "sourceRoot": "packages/ui-shell/ui-shell-api/src",
5
- "projectType": "library",
6
- "targets": {
7
- "build": {
8
- "executor": "nx:run-commands",
9
- "outputs": ["{projectRoot}/dist"],
10
- "options": {
11
- "command": "tsc -p tsconfig.json && tsc -p tsconfig.es2015.json",
12
- "cwd": "{projectRoot}"
13
- }
14
- },
15
- "clean": {
16
- "executor": "nx:run-commands",
17
- "options": {
18
- "command": "rm -rf dist",
19
- "cwd": "{projectRoot}"
20
- }
21
- }
22
- },
23
- "tags": ["type:library", "scope:ui-shell"]
24
- }
@@ -1,68 +0,0 @@
1
- /**
2
- * Feature Manager Interface
3
- * Public API contract for feature flag management
4
- */
5
-
6
- import type { FeatureFlags } from '../types';
7
-
8
- export interface IFeatureManager {
9
- /**
10
- * Check if a feature is enabled (boolean features)
11
- */
12
- isEnabled(key: string): boolean;
13
-
14
- /**
15
- * Get a feature value with optional default
16
- */
17
- get<T = any>(key: string, defaultValue?: T): T;
18
-
19
- /**
20
- * Set a feature value
21
- */
22
- set(key: string, value: any): void;
23
-
24
- /**
25
- * Enable a feature (set to true)
26
- */
27
- enable(key: string): void;
28
-
29
- /**
30
- * Disable a feature (set to false)
31
- */
32
- disable(key: string): void;
33
-
34
- /**
35
- * Toggle a boolean feature
36
- */
37
- toggle(key: string): void;
38
-
39
- /**
40
- * Update multiple features at once
41
- */
42
- update(updates: FeatureFlags): void;
43
-
44
- /**
45
- * Get all features
46
- */
47
- getAll(): Readonly<FeatureFlags>;
48
-
49
- /**
50
- * Check if a feature exists
51
- */
52
- has(key: string): boolean;
53
-
54
- /**
55
- * Subscribe to feature changes
56
- */
57
- subscribe(key: string, listener: (value: any) => void): () => void;
58
-
59
- /**
60
- * Subscribe to all feature changes
61
- */
62
- subscribeAll(listener: (key: string, value: any) => void): () => void;
63
-
64
- /**
65
- * Clean up resources
66
- */
67
- destroy(): void;
68
- }
@@ -1,48 +0,0 @@
1
- /**
2
- * Layout Manager Interface
3
- * Public API contract for layout management
4
- */
5
-
6
- import type { LayoutSlot, LayoutArea } from '../types';
7
-
8
- export interface ILayoutManager {
9
- /**
10
- * Register a layout slot
11
- */
12
- registerSlot(slot: LayoutSlot): () => void;
13
-
14
- /**
15
- * Unregister a layout slot
16
- */
17
- unregisterSlot(slot: LayoutSlot): void;
18
-
19
- /**
20
- * Get all slots for an area
21
- */
22
- getSlots(area: LayoutArea): LayoutSlot[];
23
-
24
- /**
25
- * Get all registered areas
26
- */
27
- getAreas(): LayoutArea[];
28
-
29
- /**
30
- * Check if an area has any slots
31
- */
32
- hasSlots(area: LayoutArea): boolean;
33
-
34
- /**
35
- * Subscribe to layout changes
36
- */
37
- subscribe(listener: () => void): () => void;
38
-
39
- /**
40
- * Clear all slots
41
- */
42
- clear(): void;
43
-
44
- /**
45
- * Clean up resources
46
- */
47
- destroy(): void;
48
- }
@@ -1,48 +0,0 @@
1
- /**
2
- * Router Interface
3
- * Public API contract for routing
4
- */
5
-
6
- import type { RouteConfig } from '../types';
7
-
8
- export interface IRouter {
9
- /**
10
- * Navigate to a path
11
- */
12
- push(path: string): Promise<boolean>;
13
-
14
- /**
15
- * Replace current route
16
- */
17
- replace(path: string): Promise<boolean>;
18
-
19
- /**
20
- * Go back in history
21
- */
22
- back(): void;
23
-
24
- /**
25
- * Go forward in history
26
- */
27
- forward(): void;
28
-
29
- /**
30
- * Get current route
31
- */
32
- getCurrentRoute(): RouteConfig | null;
33
-
34
- /**
35
- * Subscribe to route changes
36
- */
37
- subscribe(listener: (route: RouteConfig) => void): () => void;
38
-
39
- /**
40
- * Load a route component (lazy loading)
41
- */
42
- loadRouteComponent(route: RouteConfig): Promise<any>;
43
-
44
- /**
45
- * Clean up resources
46
- */
47
- destroy(): void;
48
- }
package/src/api/IShell.ts DELETED
@@ -1,66 +0,0 @@
1
- /**
2
- * Shell Interface
3
- * Public API contract for the UI Shell
4
- */
5
-
6
- import type { ShellConfig, ShellContext, ShellEvent, ShellEventListener, ShellEventType } from '../types';
7
- import type { IThemeManager } from './IThemeManager';
8
- import type { IFeatureManager } from './IFeatureManager';
9
- import type { IRouter } from './IRouter';
10
-
11
- export interface IShell {
12
- /**
13
- * Initialize the shell
14
- */
15
- initialize(): Promise<void>;
16
-
17
- /**
18
- * Get shell context for consumers
19
- */
20
- getContext(): ShellContext;
21
-
22
- /**
23
- * Get theme manager
24
- */
25
- getThemeManager(): IThemeManager;
26
-
27
- /**
28
- * Get feature manager
29
- */
30
- getFeatureManager(): IFeatureManager;
31
-
32
- /**
33
- * Get router instance
34
- */
35
- getRouter(): IRouter | null;
36
-
37
- /**
38
- * Emit a shell event
39
- */
40
- emit(type: ShellEventType, payload?: any): void;
41
-
42
- /**
43
- * Subscribe to shell events
44
- */
45
- on(type: ShellEventType | '*', listener: ShellEventListener): () => void;
46
-
47
- /**
48
- * Unsubscribe from shell events
49
- */
50
- off(type: ShellEventType | '*', listener: ShellEventListener): void;
51
-
52
- /**
53
- * Check if shell is ready
54
- */
55
- ready(): boolean;
56
-
57
- /**
58
- * Get configuration
59
- */
60
- getConfig(): Readonly<ShellConfig>;
61
-
62
- /**
63
- * Clean up resources
64
- */
65
- destroy(): void;
66
- }
@@ -1,43 +0,0 @@
1
- /**
2
- * Theme Manager Interface
3
- * Public API contract for theme management
4
- */
5
-
6
- import type { ThemeMode } from '../types';
7
-
8
- export interface IThemeManager {
9
- /**
10
- * Get the current theme mode
11
- */
12
- getTheme(): ThemeMode;
13
-
14
- /**
15
- * Get the resolved theme (converts 'system' to actual theme)
16
- */
17
- getResolvedTheme(): 'light' | 'dark';
18
-
19
- /**
20
- * Set the theme mode
21
- */
22
- setTheme(mode: ThemeMode): void;
23
-
24
- /**
25
- * Toggle between light and dark themes
26
- */
27
- toggleTheme(): void;
28
-
29
- /**
30
- * Subscribe to theme changes
31
- */
32
- subscribe(listener: (theme: ThemeMode) => void): () => void;
33
-
34
- /**
35
- * Apply custom CSS variables
36
- */
37
- setCSSVariables(variables: Record<string, string>): void;
38
-
39
- /**
40
- * Clean up resources
41
- */
42
- destroy(): void;
43
- }
package/src/api/index.ts DELETED
@@ -1,10 +0,0 @@
1
- /**
2
- * UI Shell API Interfaces
3
- * All public interface definitions
4
- */
5
-
6
- export * from './IShell';
7
- export * from './IThemeManager';
8
- export * from './IFeatureManager';
9
- export * from './IRouter';
10
- export * from './ILayoutManager';
package/src/index.ts DELETED
@@ -1,18 +0,0 @@
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 @hamak/ui-shell-impl
7
- */
8
-
9
- export const version = '0.2.2';
10
-
11
- // Export all types
12
- export * from './types';
13
-
14
- // Export all API interfaces
15
- export * from './api';
16
-
17
- // Export service tokens
18
- export * from './tokens';
@@ -1,6 +0,0 @@
1
- /**
2
- * Tokens
3
- * Export all service tokens
4
- */
5
-
6
- export * from './service-tokens';
@@ -1,64 +0,0 @@
1
- /**
2
- * Service Tokens
3
- * Dependency injection tokens for shell services
4
- */
5
-
6
- /**
7
- * Token for Shell service
8
- */
9
- export const SHELL_TOKEN = Symbol('Shell');
10
-
11
- /**
12
- * Token for ThemeManager service
13
- */
14
- export const THEME_MANAGER_TOKEN = Symbol('ThemeManager');
15
-
16
- /**
17
- * Token for FeatureManager service
18
- */
19
- export const FEATURE_MANAGER_TOKEN = Symbol('FeatureManager');
20
-
21
- /**
22
- * Token for Router service
23
- */
24
- export const ROUTER_TOKEN = Symbol('Router');
25
-
26
- /**
27
- * Token for LayoutManager service
28
- */
29
- export const LAYOUT_MANAGER_TOKEN = Symbol('LayoutManager');
30
-
31
- /**
32
- * Shell command names
33
- */
34
- export const ShellCommands = {
35
- SET_THEME: 'shell.setTheme',
36
- TOGGLE_THEME: 'shell.toggleTheme',
37
- ENABLE_FEATURE: 'shell.enableFeature',
38
- DISABLE_FEATURE: 'shell.disableFeature',
39
- TOGGLE_FEATURE: 'shell.toggleFeature',
40
- NAVIGATE: 'shell.navigate',
41
- NAVIGATE_BACK: 'shell.navigateBack',
42
- } as const;
43
-
44
- /**
45
- * Shell event names
46
- */
47
- export const ShellEvents = {
48
- READY: 'shell:ready',
49
- THEME_CHANGED: 'shell:theme-changed',
50
- FEATURE_TOGGLED: 'shell:feature-toggled',
51
- ROUTE_CHANGED: 'shell:route-changed',
52
- VIEWPORT_RESIZED: 'shell:viewport-resized',
53
- } as const;
54
-
55
- /**
56
- * Shell view slot names
57
- */
58
- export const ShellViewSlots = {
59
- HEADER: 'shell.header',
60
- SIDEBAR: 'shell.sidebar',
61
- MAIN: 'shell.main',
62
- FOOTER: 'shell.footer',
63
- OVERLAY: 'shell.overlay',
64
- } as const;
@@ -1,22 +0,0 @@
1
- /**
2
- * Event Types
3
- * Type definitions for shell events
4
- */
5
-
6
- export type ShellEventType =
7
- | 'theme:changed'
8
- | 'feature:toggled'
9
- | 'route:changed'
10
- | 'viewport:resized'
11
- | 'shell:ready'
12
- | 'shell:error';
13
-
14
- export interface ShellEvent {
15
- type: string;
16
- payload?: any;
17
- timestamp: number;
18
- }
19
-
20
- export interface ShellEventListener {
21
- (event: ShellEvent): void;
22
- }
@@ -1,34 +0,0 @@
1
- /**
2
- * Feature Types
3
- * Type definitions for feature flag management
4
- */
5
-
6
- export interface FeatureFlags {
7
- [key: string]: boolean | string | number | object;
8
- }
9
-
10
- /**
11
- * Common feature flag definitions
12
- */
13
- export const CommonFeatures = {
14
- // UI Features
15
- DARK_MODE: 'ui.darkMode',
16
- SIDEBAR: 'ui.sidebar',
17
- MOBILE_NAV: 'ui.mobileNav',
18
- BREADCRUMBS: 'ui.breadcrumbs',
19
-
20
- // Experimental Features
21
- SSR: 'experimental.ssr',
22
- STREAMING: 'experimental.streaming',
23
- LAZY_LOADING: 'experimental.lazyLoading',
24
-
25
- // User Features
26
- VOICE_MODE: 'user.voiceMode',
27
- ADVANCED_COMPOSER: 'user.advancedComposer',
28
- UPGRADE_PILLS: 'user.upgradePills',
29
-
30
- // Performance Features
31
- REQUEST_RETRY: 'performance.requestRetry',
32
- POLLING: 'performance.polling',
33
- CACHE: 'performance.cache',
34
- } as const;
@@ -1,11 +0,0 @@
1
- /**
2
- * UI Shell API Types
3
- * All public type definitions
4
- */
5
-
6
- export * from './theme-types';
7
- export * from './feature-types';
8
- export * from './route-types';
9
- export * from './layout-types';
10
- export * from './event-types';
11
- export * from './shell-context';
@@ -1,33 +0,0 @@
1
- /**
2
- * Layout Types
3
- * Type definitions for layout and responsive design
4
- */
5
-
6
- export type LayoutArea = 'header' | 'sidebar' | 'main' | 'footer' | 'overlay';
7
-
8
- export interface LayoutSlot {
9
- /** Slot identifier */
10
- id: string;
11
- /** Slot position/area */
12
- area: LayoutArea;
13
- /** Slot priority for ordering */
14
- priority?: number;
15
- /** Optional metadata */
16
- meta?: Record<string, any>;
17
- }
18
-
19
- export interface ViewportInfo {
20
- width: number;
21
- height: number;
22
- isMobile: boolean;
23
- isTablet: boolean;
24
- isDesktop: boolean;
25
- }
26
-
27
- export type BreakpointName = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
28
-
29
- export interface Breakpoint {
30
- name: BreakpointName;
31
- minWidth: number;
32
- maxWidth?: number;
33
- }
@@ -1,24 +0,0 @@
1
- /**
2
- * Route Types
3
- * Type definitions for routing
4
- */
5
-
6
- export interface RouteConfig {
7
- path: string;
8
- /** Lazy-loaded component factory */
9
- component: () => Promise<any>;
10
- /** Route metadata */
11
- meta?: Record<string, any>;
12
- /** Child routes */
13
- children?: RouteConfig[];
14
- /** Route guards */
15
- beforeEnter?: (to: RouteConfig, from: RouteConfig) => boolean | Promise<boolean>;
16
- }
17
-
18
- export type RouterMode = 'history' | 'hash' | 'memory';
19
-
20
- export interface RouterOptions {
21
- routes: RouteConfig[];
22
- mode?: RouterMode;
23
- base?: string;
24
- }
@@ -1,36 +0,0 @@
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
- }
@@ -1,14 +0,0 @@
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
- }
@@ -1,24 +0,0 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "compilerOptions": {
4
- "target": "ES2015",
5
- "lib": [
6
- "ES2015",
7
- "DOM",
8
- "DOM.Iterable"
9
- ],
10
- "outDir": "dist/es2015",
11
- "declaration": false,
12
- "declarationMap": false,
13
- "sourceMap": false,
14
- "downlevelIteration": true,
15
- "composite": false
16
- },
17
- "include": [
18
- "src/**/*"
19
- ],
20
- "exclude": [
21
- "node_modules",
22
- "dist"
23
- ]
24
- }
package/tsconfig.json DELETED
@@ -1,20 +0,0 @@
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
- }