kimu-core 0.4.1 → 0.5.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/.editorconfig +116 -30
- package/.gitattributes +81 -11
- package/.github/FUNDING.yml +8 -8
- package/.github/kimu-copilot-instructions.md +3779 -3779
- package/.github/workflows/deploy-demo.yml +39 -39
- package/.nvmrc +1 -0
- package/.prettierignore +44 -0
- package/.prettierrc +16 -0
- package/FUNDING.md +31 -31
- package/icon.svg +10 -10
- package/kimu-core-0.5.0.tgz +0 -0
- package/package.json +10 -3
- package/scripts/minify-css-assets.js +82 -82
- package/src/core/index.ts +47 -47
- package/src/core/kimu-global-styles.ts +136 -136
- package/src/core/kimu-reactive.ts +196 -196
- package/src/extensions/{kimu-home → app-root}/component.ts +5 -5
- package/src/extensions/extensions-manifest.json +4 -4
- package/src/main.ts +3 -3
- package/src/modules-repository/api-axios/CHANGELOG.md +48 -48
- package/src/modules-repository/api-axios/QUICK-REFERENCE.md +178 -178
- package/src/modules-repository/api-axios/README.md +304 -304
- package/src/modules-repository/api-axios/api-axios-service.ts +355 -355
- package/src/modules-repository/api-axios/examples.ts +293 -293
- package/src/modules-repository/api-axios/index.ts +19 -19
- package/src/modules-repository/api-axios/interfaces.ts +71 -71
- package/src/modules-repository/api-axios/module.ts +41 -41
- package/src/modules-repository/api-core/CHANGELOG.md +42 -42
- package/src/modules-repository/api-core/QUICK-REFERENCE.md +192 -192
- package/src/modules-repository/api-core/README.md +435 -435
- package/src/modules-repository/api-core/api-core-service.ts +289 -289
- package/src/modules-repository/api-core/examples.ts +432 -432
- package/src/modules-repository/api-core/index.ts +8 -8
- package/src/modules-repository/api-core/interfaces.ts +83 -83
- package/src/modules-repository/api-core/module.ts +30 -30
- package/src/modules-repository/event-bus/README.md +273 -273
- package/src/modules-repository/event-bus/event-bus-service.ts +176 -176
- package/src/modules-repository/event-bus/module.ts +30 -30
- package/src/modules-repository/notification/README.md +423 -423
- package/src/modules-repository/notification/module.ts +30 -30
- package/src/modules-repository/notification/notification-service.ts +436 -436
- package/src/modules-repository/router/README.it.md +61 -10
- package/src/modules-repository/router/README.md +61 -10
- package/src/modules-repository/router/router-config.ts.example +61 -0
- package/src/modules-repository/router/router.ts +18 -0
- package/src/modules-repository/state/README.md +409 -409
- package/src/modules-repository/state/module.ts +30 -30
- package/src/modules-repository/state/state-service.ts +296 -296
- package/src/modules-repository/theme/README.md +311 -267
- package/src/modules-repository/theme/module.ts +30 -30
- package/src/modules-repository/theme/pre-build.js +40 -40
- package/src/modules-repository/theme/theme-service.ts +411 -389
- package/src/modules-repository/theme/themes/theme-cherry-blossom.css +78 -78
- package/src/modules-repository/theme/themes/theme-cozy.css +111 -111
- package/src/modules-repository/theme/themes/theme-cyberpunk.css +150 -150
- package/src/modules-repository/theme/themes/theme-dark.css +79 -79
- package/src/modules-repository/theme/themes/theme-forest.css +171 -171
- package/src/modules-repository/theme/themes/theme-gold.css +100 -100
- package/src/modules-repository/theme/themes/theme-high-contrast.css +126 -126
- package/src/modules-repository/theme/themes/theme-lava.css +101 -101
- package/src/modules-repository/theme/themes/theme-lavender.css +90 -90
- package/src/modules-repository/theme/themes/theme-light.css +79 -79
- package/src/modules-repository/theme/themes/theme-matrix.css +103 -103
- package/src/modules-repository/theme/themes/theme-midnight.css +81 -81
- package/src/modules-repository/theme/themes/theme-nord.css +94 -94
- package/src/modules-repository/theme/themes/theme-ocean.css +84 -84
- package/src/modules-repository/theme/themes/theme-retro80s.css +343 -343
- package/src/modules-repository/theme/themes/theme-sunset.css +62 -62
- package/src/modules-repository/theme/themes-config-default.json +19 -0
- package/src/modules-repository/theme/themes-config.d.ts +27 -27
- package/src/modules-repository/theme/{themes-config.json → themes-config.json.example} +223 -213
- /package/src/extensions/{kimu-home → app-root}/lang/en.json +0 -0
- /package/src/extensions/{kimu-home → app-root}/lang/it.json +0 -0
- /package/src/extensions/{kimu-home → app-root}/style.css +0 -0
- /package/src/extensions/{kimu-home → app-root}/view.html +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* KIMU API Core Module - Main Entry Point
|
|
3
|
-
* Exports all public APIs for the module
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
export { default as ApiCoreModule } from './module';
|
|
7
|
-
export { ApiCoreService, apiCoreService } from './api-core-service';
|
|
8
|
-
export * from './interfaces';
|
|
1
|
+
/**
|
|
2
|
+
* KIMU API Core Module - Main Entry Point
|
|
3
|
+
* Exports all public APIs for the module
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export { default as ApiCoreModule } from './module';
|
|
7
|
+
export { ApiCoreService, apiCoreService } from './api-core-service';
|
|
8
|
+
export * from './interfaces';
|
|
@@ -1,83 +1,83 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* KIMU API Core Module - Type Definitions
|
|
3
|
-
* Provides interfaces for HTTP API interactions
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* HTTP methods supported by the API service
|
|
8
|
-
*/
|
|
9
|
-
export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD' | 'OPTIONS';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Configuration options for API requests
|
|
13
|
-
*/
|
|
14
|
-
export interface ApiRequestOptions {
|
|
15
|
-
/** HTTP method (default: GET) */
|
|
16
|
-
method?: HttpMethod;
|
|
17
|
-
/** Request headers */
|
|
18
|
-
headers?: Record<string, string>;
|
|
19
|
-
/** Request body (will be JSON stringified if object) */
|
|
20
|
-
body?: any;
|
|
21
|
-
/** Query parameters to append to URL */
|
|
22
|
-
params?: Record<string, string | number | boolean>;
|
|
23
|
-
/** Request timeout in milliseconds */
|
|
24
|
-
timeout?: number;
|
|
25
|
-
/** Response type expected */
|
|
26
|
-
responseType?: 'json' | 'text' | 'blob' | 'arraybuffer';
|
|
27
|
-
/** Credentials mode for fetch */
|
|
28
|
-
credentials?: RequestCredentials;
|
|
29
|
-
/** Cache mode for fetch */
|
|
30
|
-
cache?: RequestCache;
|
|
31
|
-
/** Abort signal for cancellation */
|
|
32
|
-
signal?: AbortSignal;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Response structure returned by API calls
|
|
37
|
-
*/
|
|
38
|
-
export interface ApiResponse<T = any> {
|
|
39
|
-
/** Response data */
|
|
40
|
-
data: T;
|
|
41
|
-
/** HTTP status code */
|
|
42
|
-
status: number;
|
|
43
|
-
/** HTTP status text */
|
|
44
|
-
statusText: string;
|
|
45
|
-
/** Response headers */
|
|
46
|
-
headers: Headers;
|
|
47
|
-
/** Original fetch Response object */
|
|
48
|
-
raw: Response;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Error structure for failed API calls
|
|
53
|
-
*/
|
|
54
|
-
export interface ApiError {
|
|
55
|
-
/** Error message */
|
|
56
|
-
message: string;
|
|
57
|
-
/** HTTP status code (if available) */
|
|
58
|
-
status?: number;
|
|
59
|
-
/** HTTP status text (if available) */
|
|
60
|
-
statusText?: string;
|
|
61
|
-
/** Response data (if available) */
|
|
62
|
-
data?: any;
|
|
63
|
-
/** Original error object */
|
|
64
|
-
originalError: Error;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Global configuration for API service
|
|
69
|
-
*/
|
|
70
|
-
export interface ApiConfig {
|
|
71
|
-
/** Base URL for all requests */
|
|
72
|
-
baseURL?: string;
|
|
73
|
-
/** Default timeout in milliseconds */
|
|
74
|
-
timeout?: number;
|
|
75
|
-
/** Default headers for all requests */
|
|
76
|
-
headers?: Record<string, string>;
|
|
77
|
-
/** Request interceptor function */
|
|
78
|
-
requestInterceptor?: (config: ApiRequestOptions) => ApiRequestOptions | Promise<ApiRequestOptions>;
|
|
79
|
-
/** Response interceptor function */
|
|
80
|
-
responseInterceptor?: <T>(response: ApiResponse<T>) => ApiResponse<T> | Promise<ApiResponse<T>>;
|
|
81
|
-
/** Error interceptor function */
|
|
82
|
-
errorInterceptor?: (error: ApiError) => ApiError | Promise<ApiError>;
|
|
83
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* KIMU API Core Module - Type Definitions
|
|
3
|
+
* Provides interfaces for HTTP API interactions
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* HTTP methods supported by the API service
|
|
8
|
+
*/
|
|
9
|
+
export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD' | 'OPTIONS';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Configuration options for API requests
|
|
13
|
+
*/
|
|
14
|
+
export interface ApiRequestOptions {
|
|
15
|
+
/** HTTP method (default: GET) */
|
|
16
|
+
method?: HttpMethod;
|
|
17
|
+
/** Request headers */
|
|
18
|
+
headers?: Record<string, string>;
|
|
19
|
+
/** Request body (will be JSON stringified if object) */
|
|
20
|
+
body?: any;
|
|
21
|
+
/** Query parameters to append to URL */
|
|
22
|
+
params?: Record<string, string | number | boolean>;
|
|
23
|
+
/** Request timeout in milliseconds */
|
|
24
|
+
timeout?: number;
|
|
25
|
+
/** Response type expected */
|
|
26
|
+
responseType?: 'json' | 'text' | 'blob' | 'arraybuffer';
|
|
27
|
+
/** Credentials mode for fetch */
|
|
28
|
+
credentials?: RequestCredentials;
|
|
29
|
+
/** Cache mode for fetch */
|
|
30
|
+
cache?: RequestCache;
|
|
31
|
+
/** Abort signal for cancellation */
|
|
32
|
+
signal?: AbortSignal;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Response structure returned by API calls
|
|
37
|
+
*/
|
|
38
|
+
export interface ApiResponse<T = any> {
|
|
39
|
+
/** Response data */
|
|
40
|
+
data: T;
|
|
41
|
+
/** HTTP status code */
|
|
42
|
+
status: number;
|
|
43
|
+
/** HTTP status text */
|
|
44
|
+
statusText: string;
|
|
45
|
+
/** Response headers */
|
|
46
|
+
headers: Headers;
|
|
47
|
+
/** Original fetch Response object */
|
|
48
|
+
raw: Response;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Error structure for failed API calls
|
|
53
|
+
*/
|
|
54
|
+
export interface ApiError {
|
|
55
|
+
/** Error message */
|
|
56
|
+
message: string;
|
|
57
|
+
/** HTTP status code (if available) */
|
|
58
|
+
status?: number;
|
|
59
|
+
/** HTTP status text (if available) */
|
|
60
|
+
statusText?: string;
|
|
61
|
+
/** Response data (if available) */
|
|
62
|
+
data?: any;
|
|
63
|
+
/** Original error object */
|
|
64
|
+
originalError: Error;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Global configuration for API service
|
|
69
|
+
*/
|
|
70
|
+
export interface ApiConfig {
|
|
71
|
+
/** Base URL for all requests */
|
|
72
|
+
baseURL?: string;
|
|
73
|
+
/** Default timeout in milliseconds */
|
|
74
|
+
timeout?: number;
|
|
75
|
+
/** Default headers for all requests */
|
|
76
|
+
headers?: Record<string, string>;
|
|
77
|
+
/** Request interceptor function */
|
|
78
|
+
requestInterceptor?: (config: ApiRequestOptions) => ApiRequestOptions | Promise<ApiRequestOptions>;
|
|
79
|
+
/** Response interceptor function */
|
|
80
|
+
responseInterceptor?: <T>(response: ApiResponse<T>) => ApiResponse<T> | Promise<ApiResponse<T>>;
|
|
81
|
+
/** Error interceptor function */
|
|
82
|
+
errorInterceptor?: (error: ApiError) => ApiError | Promise<ApiError>;
|
|
83
|
+
}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* KIMU API Core Module
|
|
3
|
-
* Entry point for the API Core module
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import { KimuModule } from '../../core/kimu-module';
|
|
7
|
-
import { apiCoreService } from './api-core-service';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* API Core Module Class
|
|
11
|
-
* Provides HTTP client functionality based on native fetch API
|
|
12
|
-
*/
|
|
13
|
-
export default class ApiCoreModule extends KimuModule {
|
|
14
|
-
constructor(name = 'api-core', version = '1.0.0', options?: any) {
|
|
15
|
-
super(name, version, options);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Get the API Core service instance
|
|
20
|
-
* @returns ApiCoreService singleton instance
|
|
21
|
-
*/
|
|
22
|
-
getService() {
|
|
23
|
-
return apiCoreService;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
// Re-export for convenience
|
|
28
|
-
export { apiCoreService } from './api-core-service';
|
|
29
|
-
export { ApiCoreService } from './api-core-service';
|
|
30
|
-
export * from './interfaces';
|
|
1
|
+
/**
|
|
2
|
+
* KIMU API Core Module
|
|
3
|
+
* Entry point for the API Core module
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { KimuModule } from '../../core/kimu-module';
|
|
7
|
+
import { apiCoreService } from './api-core-service';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* API Core Module Class
|
|
11
|
+
* Provides HTTP client functionality based on native fetch API
|
|
12
|
+
*/
|
|
13
|
+
export default class ApiCoreModule extends KimuModule {
|
|
14
|
+
constructor(name = 'api-core', version = '1.0.0', options?: any) {
|
|
15
|
+
super(name, version, options);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Get the API Core service instance
|
|
20
|
+
* @returns ApiCoreService singleton instance
|
|
21
|
+
*/
|
|
22
|
+
getService() {
|
|
23
|
+
return apiCoreService;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// Re-export for convenience
|
|
28
|
+
export { apiCoreService } from './api-core-service';
|
|
29
|
+
export { ApiCoreService } from './api-core-service';
|
|
30
|
+
export * from './interfaces';
|