kenikool-ui 1.0.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/README.md +144 -0
- package/dist/cdn-auto-register.js +188 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/dist/types/components/advanced/datepicker.d.ts +86 -0
- package/dist/types/components/advanced/datepicker.d.ts.map +1 -0
- package/dist/types/components/advanced/datepicker.stories.d.ts +48 -0
- package/dist/types/components/advanced/datepicker.stories.d.ts.map +1 -0
- package/dist/types/components/advanced/fileupload.d.ts +75 -0
- package/dist/types/components/advanced/fileupload.d.ts.map +1 -0
- package/dist/types/components/advanced/fileupload.stories.d.ts +46 -0
- package/dist/types/components/advanced/fileupload.stories.d.ts.map +1 -0
- package/dist/types/components/advanced/index.d.ts +4 -0
- package/dist/types/components/advanced/index.d.ts.map +1 -0
- package/dist/types/components/data/avatar.d.ts +94 -0
- package/dist/types/components/data/avatar.d.ts.map +1 -0
- package/dist/types/components/data/avatar.stories.d.ts +51 -0
- package/dist/types/components/data/avatar.stories.d.ts.map +1 -0
- package/dist/types/components/data/badge.d.ts +69 -0
- package/dist/types/components/data/badge.d.ts.map +1 -0
- package/dist/types/components/data/badge.stories.d.ts +48 -0
- package/dist/types/components/data/badge.stories.d.ts.map +1 -0
- package/dist/types/components/data/index.d.ts +5 -0
- package/dist/types/components/data/index.d.ts.map +1 -0
- package/dist/types/components/data/list.d.ts +66 -0
- package/dist/types/components/data/list.d.ts.map +1 -0
- package/dist/types/components/data/list.stories.d.ts +38 -0
- package/dist/types/components/data/list.stories.d.ts.map +1 -0
- package/dist/types/components/data/table.d.ts +70 -0
- package/dist/types/components/data/table.d.ts.map +1 -0
- package/dist/types/components/data/table.stories.d.ts +42 -0
- package/dist/types/components/data/table.stories.d.ts.map +1 -0
- package/dist/types/components/feedback/alert.d.ts +78 -0
- package/dist/types/components/feedback/alert.d.ts.map +1 -0
- package/dist/types/components/feedback/alert.stories.d.ts +35 -0
- package/dist/types/components/feedback/alert.stories.d.ts.map +1 -0
- package/dist/types/components/feedback/index.d.ts +5 -0
- package/dist/types/components/feedback/index.d.ts.map +1 -0
- package/dist/types/components/feedback/loading.d.ts +87 -0
- package/dist/types/components/feedback/loading.d.ts.map +1 -0
- package/dist/types/components/feedback/loading.stories.d.ts +48 -0
- package/dist/types/components/feedback/loading.stories.d.ts.map +1 -0
- package/dist/types/components/feedback/modal.d.ts +93 -0
- package/dist/types/components/feedback/modal.d.ts.map +1 -0
- package/dist/types/components/feedback/modal.stories.d.ts +37 -0
- package/dist/types/components/feedback/modal.stories.d.ts.map +1 -0
- package/dist/types/components/feedback/toast.d.ts +102 -0
- package/dist/types/components/feedback/toast.d.ts.map +1 -0
- package/dist/types/components/feedback/toast.stories.d.ts +51 -0
- package/dist/types/components/feedback/toast.stories.d.ts.map +1 -0
- package/dist/types/components/forms/button.d.ts +64 -0
- package/dist/types/components/forms/button.d.ts.map +1 -0
- package/dist/types/components/forms/button.stories.d.ts +52 -0
- package/dist/types/components/forms/button.stories.d.ts.map +1 -0
- package/dist/types/components/forms/checkbox.d.ts +51 -0
- package/dist/types/components/forms/checkbox.d.ts.map +1 -0
- package/dist/types/components/forms/checkbox.stories.d.ts +31 -0
- package/dist/types/components/forms/checkbox.stories.d.ts.map +1 -0
- package/dist/types/components/forms/index.d.ts +6 -0
- package/dist/types/components/forms/index.d.ts.map +1 -0
- package/dist/types/components/forms/input.d.ts +66 -0
- package/dist/types/components/forms/input.d.ts.map +1 -0
- package/dist/types/components/forms/input.stories.d.ts +49 -0
- package/dist/types/components/forms/input.stories.d.ts.map +1 -0
- package/dist/types/components/forms/radio.d.ts +51 -0
- package/dist/types/components/forms/radio.d.ts.map +1 -0
- package/dist/types/components/forms/radio.stories.d.ts +41 -0
- package/dist/types/components/forms/radio.stories.d.ts.map +1 -0
- package/dist/types/components/forms/select.d.ts +67 -0
- package/dist/types/components/forms/select.d.ts.map +1 -0
- package/dist/types/components/forms/select.stories.d.ts +42 -0
- package/dist/types/components/forms/select.stories.d.ts.map +1 -0
- package/dist/types/components/layout/card.d.ts +66 -0
- package/dist/types/components/layout/card.d.ts.map +1 -0
- package/dist/types/components/layout/card.example.d.ts +5 -0
- package/dist/types/components/layout/card.example.d.ts.map +1 -0
- package/dist/types/components/layout/card.stories.d.ts +40 -0
- package/dist/types/components/layout/card.stories.d.ts.map +1 -0
- package/dist/types/components/layout/container.d.ts +84 -0
- package/dist/types/components/layout/container.d.ts.map +1 -0
- package/dist/types/components/layout/container.stories.d.ts +40 -0
- package/dist/types/components/layout/container.stories.d.ts.map +1 -0
- package/dist/types/components/layout/grid.d.ts +76 -0
- package/dist/types/components/layout/grid.d.ts.map +1 -0
- package/dist/types/components/layout/grid.example.d.ts +11 -0
- package/dist/types/components/layout/grid.example.d.ts.map +1 -0
- package/dist/types/components/layout/grid.stories.d.ts +38 -0
- package/dist/types/components/layout/grid.stories.d.ts.map +1 -0
- package/dist/types/components/layout/index.d.ts +5 -0
- package/dist/types/components/layout/index.d.ts.map +1 -0
- package/dist/types/components/layout/stack.d.ts +82 -0
- package/dist/types/components/layout/stack.d.ts.map +1 -0
- package/dist/types/components/layout/stack.stories.d.ts +44 -0
- package/dist/types/components/layout/stack.stories.d.ts.map +1 -0
- package/dist/types/components/navigation/breadcrumbs.d.ts +62 -0
- package/dist/types/components/navigation/breadcrumbs.d.ts.map +1 -0
- package/dist/types/components/navigation/breadcrumbs.stories.d.ts +32 -0
- package/dist/types/components/navigation/breadcrumbs.stories.d.ts.map +1 -0
- package/dist/types/components/navigation/index.d.ts +4 -0
- package/dist/types/components/navigation/index.d.ts.map +1 -0
- package/dist/types/components/navigation/navbar.d.ts +66 -0
- package/dist/types/components/navigation/navbar.d.ts.map +1 -0
- package/dist/types/components/navigation/navbar.stories.d.ts +37 -0
- package/dist/types/components/navigation/navbar.stories.d.ts.map +1 -0
- package/dist/types/components/navigation/sidebar.d.ts +72 -0
- package/dist/types/components/navigation/sidebar.d.ts.map +1 -0
- package/dist/types/components/navigation/sidebar.stories.d.ts +43 -0
- package/dist/types/components/navigation/sidebar.stories.d.ts.map +1 -0
- package/dist/types/components/typography/index.d.ts +3 -0
- package/dist/types/components/typography/index.d.ts.map +1 -0
- package/dist/types/components/typography/text.d.ts +111 -0
- package/dist/types/components/typography/text.d.ts.map +1 -0
- package/dist/types/components/typography/text.stories.d.ts +48 -0
- package/dist/types/components/typography/text.stories.d.ts.map +1 -0
- package/dist/types/core/base-component.d.ts +178 -0
- package/dist/types/core/base-component.d.ts.map +1 -0
- package/dist/types/core/base-component.example.d.ts +24 -0
- package/dist/types/core/base-component.example.d.ts.map +1 -0
- package/dist/types/core/registry.d.ts +88 -0
- package/dist/types/core/registry.d.ts.map +1 -0
- package/dist/types/core/registry.example.d.ts +42 -0
- package/dist/types/core/registry.example.d.ts.map +1 -0
- package/dist/types/core/smart-defaults.d.ts +45 -0
- package/dist/types/core/smart-defaults.d.ts.map +1 -0
- package/dist/types/core/smart-defaults.example.d.ts +20 -0
- package/dist/types/core/smart-defaults.example.d.ts.map +1 -0
- package/dist/types/core/styles-parser.d.ts +107 -0
- package/dist/types/core/styles-parser.d.ts.map +1 -0
- package/dist/types/core/styles-parser.example.d.ts +10 -0
- package/dist/types/core/styles-parser.example.d.ts.map +1 -0
- package/dist/types/core/theme-system.d.ts +91 -0
- package/dist/types/core/theme-system.d.ts.map +1 -0
- package/dist/types/index.d.ts +24 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/themes/built-in-themes.d.ts +32 -0
- package/dist/types/themes/built-in-themes.d.ts.map +1 -0
- package/dist/types/themes/index.d.ts +5 -0
- package/dist/types/themes/index.d.ts.map +1 -0
- package/dist/types/types/components.d.ts +549 -0
- package/dist/types/types/components.d.ts.map +1 -0
- package/dist/types/types/index.d.ts +379 -0
- package/dist/types/types/index.d.ts.map +1 -0
- package/dist/types/types/theme-config.d.ts +674 -0
- package/dist/types/types/theme-config.d.ts.map +1 -0
- package/dist/types/types/themes.d.ts +325 -0
- package/dist/types/types/themes.d.ts.map +1 -0
- package/dist/types/types/utils.d.ts +293 -0
- package/dist/types/types/utils.d.ts.map +1 -0
- package/dist/types/types/wrappers.d.ts +335 -0
- package/dist/types/types/wrappers.d.ts.map +1 -0
- package/dist/types/utils/accessibility.d.ts +345 -0
- package/dist/types/utils/accessibility.d.ts.map +1 -0
- package/dist/types/utils/accessibility.example.d.ts +50 -0
- package/dist/types/utils/accessibility.example.d.ts.map +1 -0
- package/dist/types/utils/css-variables.d.ts +278 -0
- package/dist/types/utils/css-variables.d.ts.map +1 -0
- package/dist/types/utils/icon-system.d.ts +79 -0
- package/dist/types/utils/icon-system.d.ts.map +1 -0
- package/dist/types/utils/index.d.ts +9 -0
- package/dist/types/utils/index.d.ts.map +1 -0
- package/dist/types/utils/performance.d.ts +141 -0
- package/dist/types/utils/performance.d.ts.map +1 -0
- package/dist/types/utils/security.d.ts +109 -0
- package/dist/types/utils/security.d.ts.map +1 -0
- package/dist/types/utils/validation.d.ts +84 -0
- package/dist/types/utils/validation.d.ts.map +1 -0
- package/dist/types/wrappers/angular/components.d.ts +2 -0
- package/dist/types/wrappers/angular/components.d.ts.map +1 -0
- package/dist/types/wrappers/angular/index.d.ts +6 -0
- package/dist/types/wrappers/angular/index.d.ts.map +1 -0
- package/dist/types/wrappers/angular/module.d.ts +2 -0
- package/dist/types/wrappers/angular/module.d.ts.map +1 -0
- package/dist/types/wrappers/angular/services.d.ts +2 -0
- package/dist/types/wrappers/angular/services.d.ts.map +1 -0
- package/dist/types/wrappers/angular/types.d.ts +44 -0
- package/dist/types/wrappers/angular/types.d.ts.map +1 -0
- package/dist/types/wrappers/react/components.d.ts +2 -0
- package/dist/types/wrappers/react/components.d.ts.map +1 -0
- package/dist/types/wrappers/react/hooks.d.ts +2 -0
- package/dist/types/wrappers/react/hooks.d.ts.map +1 -0
- package/dist/types/wrappers/react/index.d.ts +6 -0
- package/dist/types/wrappers/react/index.d.ts.map +1 -0
- package/dist/types/wrappers/react/provider.d.ts +2 -0
- package/dist/types/wrappers/react/provider.d.ts.map +1 -0
- package/dist/types/wrappers/react/types.d.ts +31 -0
- package/dist/types/wrappers/react/types.d.ts.map +1 -0
- package/dist/types/wrappers/vue/components.d.ts +2 -0
- package/dist/types/wrappers/vue/components.d.ts.map +1 -0
- package/dist/types/wrappers/vue/composables.d.ts +2 -0
- package/dist/types/wrappers/vue/composables.d.ts.map +1 -0
- package/dist/types/wrappers/vue/index.d.ts +6 -0
- package/dist/types/wrappers/vue/index.d.ts.map +1 -0
- package/dist/types/wrappers/vue/plugin.d.ts +2 -0
- package/dist/types/wrappers/vue/plugin.d.ts.map +1 -0
- package/dist/types/wrappers/vue/types.d.ts +38 -0
- package/dist/types/wrappers/vue/types.d.ts.map +1 -0
- package/package.json +138 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Icon System Utility
|
|
3
|
+
*
|
|
4
|
+
* Provides a centralized icon mapping system for all components.
|
|
5
|
+
* Supports emoji icons with validation and sanitization.
|
|
6
|
+
*
|
|
7
|
+
* Requirements:
|
|
8
|
+
* 6.2: THE Component_Library SHALL provide form components with icon support
|
|
9
|
+
*/
|
|
10
|
+
export interface IconMap {
|
|
11
|
+
[key: string]: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Centralized icon mapping for all components
|
|
15
|
+
*/
|
|
16
|
+
export declare const ICON_MAP: IconMap;
|
|
17
|
+
/**
|
|
18
|
+
* Get icon content by name
|
|
19
|
+
* Returns the icon string or the name itself if not found
|
|
20
|
+
*/
|
|
21
|
+
export declare function getIcon(iconName: string): string;
|
|
22
|
+
/**
|
|
23
|
+
* Check if an icon exists in the icon map
|
|
24
|
+
*/
|
|
25
|
+
export declare function hasIcon(iconName: string): boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Sanitize icon name to prevent XSS
|
|
28
|
+
* Removes any HTML/script characters
|
|
29
|
+
*/
|
|
30
|
+
export declare function sanitizeIconName(iconName: string): string;
|
|
31
|
+
/**
|
|
32
|
+
* Validate icon name
|
|
33
|
+
* Returns true if the icon name is valid (alphanumeric, underscore, hyphen)
|
|
34
|
+
*/
|
|
35
|
+
export declare function validateIconName(iconName: string): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Get all available icon names
|
|
38
|
+
*/
|
|
39
|
+
export declare function getAvailableIcons(): string[];
|
|
40
|
+
/**
|
|
41
|
+
* Register a custom icon
|
|
42
|
+
* Allows components to add custom icons to the system
|
|
43
|
+
*/
|
|
44
|
+
export declare function registerIcon(name: string, icon: string): void;
|
|
45
|
+
/**
|
|
46
|
+
* Register multiple custom icons
|
|
47
|
+
*/
|
|
48
|
+
export declare function registerIcons(icons: IconMap): void;
|
|
49
|
+
/**
|
|
50
|
+
* Remove a custom icon
|
|
51
|
+
*/
|
|
52
|
+
export declare function unregisterIcon(name: string): void;
|
|
53
|
+
/**
|
|
54
|
+
* Get icon with fallback
|
|
55
|
+
* Returns the icon or a fallback string if not found
|
|
56
|
+
*/
|
|
57
|
+
export declare function getIconWithFallback(iconName: string, fallback?: string): string;
|
|
58
|
+
/**
|
|
59
|
+
* Create an icon element (for future SVG support)
|
|
60
|
+
* Currently returns text content, but can be extended for SVG
|
|
61
|
+
*/
|
|
62
|
+
export declare function createIconElement(iconName: string): HTMLElement;
|
|
63
|
+
/**
|
|
64
|
+
* Export default icon system
|
|
65
|
+
*/
|
|
66
|
+
export declare const IconSystem: {
|
|
67
|
+
getIcon: typeof getIcon;
|
|
68
|
+
hasIcon: typeof hasIcon;
|
|
69
|
+
sanitizeIconName: typeof sanitizeIconName;
|
|
70
|
+
validateIconName: typeof validateIconName;
|
|
71
|
+
getAvailableIcons: typeof getAvailableIcons;
|
|
72
|
+
registerIcon: typeof registerIcon;
|
|
73
|
+
registerIcons: typeof registerIcons;
|
|
74
|
+
unregisterIcon: typeof unregisterIcon;
|
|
75
|
+
getIconWithFallback: typeof getIconWithFallback;
|
|
76
|
+
createIconElement: typeof createIconElement;
|
|
77
|
+
};
|
|
78
|
+
export default IconSystem;
|
|
79
|
+
//# sourceMappingURL=icon-system.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon-system.d.ts","sourceRoot":"","sources":["../../../src/utils/icon-system.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,WAAW,OAAO;IACtB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,OA8DtB,CAAC;AAEF;;;GAGG;AACH,wBAAgB,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAKhD;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAKjD;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CASzD;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAK1D;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,EAAE,CAE5C;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAS7D;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAIlD;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAGjD;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,MAAM,EAChB,QAAQ,GAAE,MAAY,GACrB,MAAM,CAKR;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,WAAW,CAQ/D;AAED;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;CAWtB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility exports for Kenikool UI
|
|
3
|
+
*/
|
|
4
|
+
export { AccessibilityUtils, AriaManager, FocusManager, FocusTrapImpl as FocusTrap, KeyboardNavigation, ScreenReaderAnnouncer, } from './accessibility';
|
|
5
|
+
export { securityManager, sanitizeHTML, sanitizeAttribute, validateFormInput, applySecureDefaults, type SecurityConfig, type SanitizationResult, type SecurityViolation, } from './security';
|
|
6
|
+
export { ValidationUtils, validateField, validateAttr, validateHtml, type ValidationRule, type ValidationResult, } from './validation';
|
|
7
|
+
export { CSSVariableManager, generateCSSVariables, applyCSSVariables, } from './css-variables';
|
|
8
|
+
export { PerformanceManager } from './performance';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EACL,kBAAkB,EAClB,WAAW,EACX,YAAY,EACZ,aAAa,IAAI,SAAS,EAC1B,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EACL,eAAe,EACf,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,GACvB,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,eAAe,EACf,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,KAAK,cAAc,EACnB,KAAK,gBAAgB,GACtB,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,iBAAiB,GAClB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Performance Optimization System
|
|
3
|
+
*
|
|
4
|
+
* This module provides performance optimization utilities including:
|
|
5
|
+
* - Batched DOM updates
|
|
6
|
+
* - Debouncing and throttling
|
|
7
|
+
* - RAF scheduling
|
|
8
|
+
* - Virtual scrolling support
|
|
9
|
+
*
|
|
10
|
+
* Requirements:
|
|
11
|
+
* 11.4: THE Component_System SHALL render components within 16ms for smooth 60fps performance
|
|
12
|
+
* 11.5: THE Component_System SHALL minimize DOM mutations during updates
|
|
13
|
+
*/
|
|
14
|
+
export interface PerformanceConfig {
|
|
15
|
+
/** Enable/disable performance optimizations */
|
|
16
|
+
enabled: boolean;
|
|
17
|
+
/** Debounce delay in milliseconds */
|
|
18
|
+
debounceMs: number;
|
|
19
|
+
/** Throttle delay in milliseconds */
|
|
20
|
+
throttleMs: number;
|
|
21
|
+
/** Enable batched DOM updates */
|
|
22
|
+
batchUpdates: boolean;
|
|
23
|
+
/** Enable RAF scheduling */
|
|
24
|
+
useRAF: boolean;
|
|
25
|
+
/** Maximum batch size before flushing */
|
|
26
|
+
maxBatchSize: number;
|
|
27
|
+
}
|
|
28
|
+
export interface PerformanceMetrics {
|
|
29
|
+
/** Total number of updates */
|
|
30
|
+
totalUpdates: number;
|
|
31
|
+
/** Number of batched updates */
|
|
32
|
+
batchedUpdates: number;
|
|
33
|
+
/** Average update time in milliseconds */
|
|
34
|
+
averageUpdateTime: number;
|
|
35
|
+
/** Peak update time in milliseconds */
|
|
36
|
+
peakUpdateTime: number;
|
|
37
|
+
/** Number of DOM mutations */
|
|
38
|
+
domMutations: number;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Performance Manager - Singleton for managing performance optimizations
|
|
42
|
+
*/
|
|
43
|
+
export declare class PerformanceManager {
|
|
44
|
+
private static instance;
|
|
45
|
+
private config;
|
|
46
|
+
private updateQueue;
|
|
47
|
+
private rafId;
|
|
48
|
+
private metrics;
|
|
49
|
+
private updateTimes;
|
|
50
|
+
private constructor();
|
|
51
|
+
static getInstance(): PerformanceManager;
|
|
52
|
+
/**
|
|
53
|
+
* Configure the performance manager
|
|
54
|
+
*/
|
|
55
|
+
configure(config: Partial<PerformanceConfig>): void;
|
|
56
|
+
/**
|
|
57
|
+
* Get current configuration
|
|
58
|
+
*/
|
|
59
|
+
getConfig(): PerformanceConfig;
|
|
60
|
+
/**
|
|
61
|
+
* Schedule an update to be batched
|
|
62
|
+
*/
|
|
63
|
+
scheduleUpdate(callback: () => void): void;
|
|
64
|
+
/**
|
|
65
|
+
* Flush all pending updates
|
|
66
|
+
*/
|
|
67
|
+
private flushUpdates;
|
|
68
|
+
/**
|
|
69
|
+
* Get performance metrics
|
|
70
|
+
*/
|
|
71
|
+
getMetrics(): PerformanceMetrics;
|
|
72
|
+
/**
|
|
73
|
+
* Reset performance metrics
|
|
74
|
+
*/
|
|
75
|
+
resetMetrics(): void;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Debounce a function - delays execution until after the specified delay
|
|
79
|
+
*/
|
|
80
|
+
export declare function debounce<T extends (...args: any[]) => any>(func: T, wait: number): (...args: Parameters<T>) => void;
|
|
81
|
+
/**
|
|
82
|
+
* Throttle a function - limits execution to once per specified interval
|
|
83
|
+
*/
|
|
84
|
+
export declare function throttle<T extends (...args: any[]) => any>(func: T, limit: number): (...args: Parameters<T>) => void;
|
|
85
|
+
/**
|
|
86
|
+
* Batch multiple updates into a single RAF frame
|
|
87
|
+
*/
|
|
88
|
+
export declare function batchUpdates(updates: (() => void)[]): void;
|
|
89
|
+
/**
|
|
90
|
+
* Measure the performance of a function
|
|
91
|
+
*/
|
|
92
|
+
export declare function measurePerformance<T extends (...args: any[]) => any>(func: T, label?: string): (...args: Parameters<T>) => ReturnType<T>;
|
|
93
|
+
/**
|
|
94
|
+
* Request animation frame wrapper with error handling
|
|
95
|
+
*/
|
|
96
|
+
export declare function requestAnimationFrameSafe(callback: FrameRequestCallback): number;
|
|
97
|
+
/**
|
|
98
|
+
* Cancel animation frame wrapper with error handling
|
|
99
|
+
*/
|
|
100
|
+
export declare function cancelAnimationFrameSafe(id: number): void;
|
|
101
|
+
/**
|
|
102
|
+
* Virtual scrolling helper for large lists
|
|
103
|
+
*/
|
|
104
|
+
export declare class VirtualScroller {
|
|
105
|
+
private container;
|
|
106
|
+
private items;
|
|
107
|
+
private itemHeight;
|
|
108
|
+
private visibleRange;
|
|
109
|
+
private scrollListener;
|
|
110
|
+
constructor(container: HTMLElement, itemHeight: number);
|
|
111
|
+
/**
|
|
112
|
+
* Set items to be virtualized
|
|
113
|
+
*/
|
|
114
|
+
setItems(items: HTMLElement[]): void;
|
|
115
|
+
/**
|
|
116
|
+
* Get visible items based on scroll position
|
|
117
|
+
*/
|
|
118
|
+
getVisibleItems(): HTMLElement[];
|
|
119
|
+
/**
|
|
120
|
+
* Update visible range and render
|
|
121
|
+
*/
|
|
122
|
+
private updateVisibleRange;
|
|
123
|
+
/**
|
|
124
|
+
* Enable virtual scrolling
|
|
125
|
+
*/
|
|
126
|
+
enable(): void;
|
|
127
|
+
/**
|
|
128
|
+
* Disable virtual scrolling
|
|
129
|
+
*/
|
|
130
|
+
disable(): void;
|
|
131
|
+
/**
|
|
132
|
+
* Get current visible range
|
|
133
|
+
*/
|
|
134
|
+
getVisibleRange(): {
|
|
135
|
+
start: number;
|
|
136
|
+
end: number;
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
export declare const performanceManager: PerformanceManager;
|
|
140
|
+
export default performanceManager;
|
|
141
|
+
//# sourceMappingURL=performance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"performance.d.ts","sourceRoot":"","sources":["../../../src/utils/performance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,MAAM,WAAW,iBAAiB;IAChC,+CAA+C;IAC/C,OAAO,EAAE,OAAO,CAAC;IACjB,qCAAqC;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,qCAAqC;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,iCAAiC;IACjC,YAAY,EAAE,OAAO,CAAC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D,eAAO,MAAM,kBAAkB,oBAAmC,CAAC;AAGnE,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Security and Input Sanitization System
|
|
3
|
+
*
|
|
4
|
+
* This module provides comprehensive security utilities for XSS prevention,
|
|
5
|
+
* Content Security Policy compatibility, and input validation.
|
|
6
|
+
*
|
|
7
|
+
* Requirements:
|
|
8
|
+
* 12.1: THE Component_System SHALL sanitize all user input to prevent XSS attacks
|
|
9
|
+
* 12.2: THE Component_System SHALL use Content Security Policy compatible implementations
|
|
10
|
+
* 12.3: THE Component_System SHALL validate all attribute values and reject malicious content
|
|
11
|
+
* 12.4: THE Component_System SHALL implement secure defaults for form components
|
|
12
|
+
*/
|
|
13
|
+
export interface SecurityConfig {
|
|
14
|
+
/** Enable/disable security features */
|
|
15
|
+
enabled: boolean;
|
|
16
|
+
/** Maximum allowed length for input values */
|
|
17
|
+
maxInputLength: number;
|
|
18
|
+
/** Allowed HTML tags for rich text (if any) */
|
|
19
|
+
allowedTags: string[];
|
|
20
|
+
/** Allowed HTML attributes for rich text (if any) */
|
|
21
|
+
allowedAttributes: string[];
|
|
22
|
+
/** Content Security Policy mode */
|
|
23
|
+
cspMode: 'strict' | 'compatible' | 'disabled';
|
|
24
|
+
/** Whether to log security violations */
|
|
25
|
+
logViolations: boolean;
|
|
26
|
+
/** Whether to throw errors on security violations */
|
|
27
|
+
throwOnViolation: boolean;
|
|
28
|
+
}
|
|
29
|
+
export interface SanitizationResult {
|
|
30
|
+
/** Sanitized output */
|
|
31
|
+
sanitized: string;
|
|
32
|
+
/** Whether the input was modified during sanitization */
|
|
33
|
+
modified: boolean;
|
|
34
|
+
/** Security violations detected */
|
|
35
|
+
violations: SecurityViolation[];
|
|
36
|
+
}
|
|
37
|
+
export interface SecurityViolation {
|
|
38
|
+
/** Type of violation */
|
|
39
|
+
type: 'xss' | 'injection' | 'malicious-content' | 'length-exceeded' | 'invalid-attribute';
|
|
40
|
+
/** Description of the violation */
|
|
41
|
+
description: string;
|
|
42
|
+
/** Original input that caused the violation */
|
|
43
|
+
original: string;
|
|
44
|
+
/** Timestamp of the violation */
|
|
45
|
+
timestamp: Date;
|
|
46
|
+
}
|
|
47
|
+
export declare class SecurityManager {
|
|
48
|
+
private static instance;
|
|
49
|
+
private config;
|
|
50
|
+
private violations;
|
|
51
|
+
private violationCallbacks;
|
|
52
|
+
private constructor();
|
|
53
|
+
static getInstance(): SecurityManager;
|
|
54
|
+
/**
|
|
55
|
+
* Configure the security manager
|
|
56
|
+
*/
|
|
57
|
+
configure(config: Partial<SecurityConfig>): void;
|
|
58
|
+
/**
|
|
59
|
+
* Get current configuration
|
|
60
|
+
*/
|
|
61
|
+
getConfig(): SecurityConfig;
|
|
62
|
+
/**
|
|
63
|
+
* Sanitize HTML input to prevent XSS attacks
|
|
64
|
+
*/
|
|
65
|
+
sanitizeHTML(input: string): SanitizationResult;
|
|
66
|
+
/**
|
|
67
|
+
* Sanitize attribute values to prevent injection attacks
|
|
68
|
+
*/
|
|
69
|
+
sanitizeAttribute(name: string, value: string): SanitizationResult;
|
|
70
|
+
/**
|
|
71
|
+
* Validate form input based on input type
|
|
72
|
+
*/
|
|
73
|
+
validateFormInput(type: string, value: string): SanitizationResult;
|
|
74
|
+
/**
|
|
75
|
+
* Check if a value is safe for CSP
|
|
76
|
+
*/
|
|
77
|
+
isCSPCompatible(value: string): boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Get all security violations
|
|
80
|
+
*/
|
|
81
|
+
getViolations(): SecurityViolation[];
|
|
82
|
+
/**
|
|
83
|
+
* Clear all security violations
|
|
84
|
+
*/
|
|
85
|
+
clearViolations(): void;
|
|
86
|
+
/**
|
|
87
|
+
* Register a callback for security violations
|
|
88
|
+
*/
|
|
89
|
+
onViolation(callback: (violation: SecurityViolation) => void): void;
|
|
90
|
+
/**
|
|
91
|
+
* Remove a violation callback
|
|
92
|
+
*/
|
|
93
|
+
offViolation(callback: (violation: SecurityViolation) => void): void;
|
|
94
|
+
/**
|
|
95
|
+
* Apply secure defaults to a form element
|
|
96
|
+
*/
|
|
97
|
+
applySecureDefaults(element: HTMLElement): void;
|
|
98
|
+
private sanitizeHTMLTags;
|
|
99
|
+
private escapeHTML;
|
|
100
|
+
private handleViolation;
|
|
101
|
+
}
|
|
102
|
+
export declare const securityManager: SecurityManager;
|
|
103
|
+
export declare function sanitizeHTML(input: string): SanitizationResult;
|
|
104
|
+
export declare function sanitizeAttribute(name: string, value: string): SanitizationResult;
|
|
105
|
+
export declare function validateFormInput(type: string, value: string): SanitizationResult;
|
|
106
|
+
export declare function isCSPCompatible(value: string): boolean;
|
|
107
|
+
export declare function applySecureDefaults(element: HTMLElement): void;
|
|
108
|
+
export default securityManager;
|
|
109
|
+
//# sourceMappingURL=security.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"security.d.ts","sourceRoot":"","sources":["../../../src/utils/security.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,WAAW,cAAc;IAC7B,uCAAuC;IACvC,OAAO,EAAE,OAAO,CAAC;IACjB,8CAA8C;IAC9C,cAAc,EAAE,MAAM,CAAC;IACvB,+CAA+C;IAC/C,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,qDAAqD;IACrD,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,mCAAmC;IACnC,OAAO,EAAE,QAAQ,GAAG,YAAY,GAAG,UAAU,CAAC;IAC9C,yCAAyC;IACzC,aAAa,EAAE,OAAO,CAAC;IACvB,qDAAqD;IACrD,gBAAgB,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,kBAAkB;IACjC,uBAAuB;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,yDAAyD;IACzD,QAAQ,EAAE,OAAO,CAAC;IAClB,mCAAmC;IACnC,UAAU,EAAE,iBAAiB,EAAE,CAAC;CACjC;AAED,MAAM,WAAW,iBAAiB;IA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AAgB;IA8DxB,OAAO,CAAC,UAAU;IASlB,OAAO,CAAC,eAAe;CA2BxB;AAGD,eAAO,MAAM,eAAe,iBAAgC,CAAC;AAG7D,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,kBAAkB,CAE9D;AAED,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,GACZ,kBAAkB,CAEpB;AAED,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,GACZ,kBAAkB,CAEpB;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAEtD;AAED,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,CAE9D;AAGD,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Input validation utilities for Kenikool UI components
|
|
3
|
+
*
|
|
4
|
+
* This module provides validation utilities that work with the security system
|
|
5
|
+
* to ensure all user input is properly validated and sanitized.
|
|
6
|
+
*/
|
|
7
|
+
export interface ValidationRule {
|
|
8
|
+
/** Rule identifier */
|
|
9
|
+
id: string;
|
|
10
|
+
/** Validation function */
|
|
11
|
+
validate: (value: any) => boolean;
|
|
12
|
+
/** Error message */
|
|
13
|
+
message: string;
|
|
14
|
+
/** Whether to sanitize the value */
|
|
15
|
+
sanitize: boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface ValidationResult {
|
|
18
|
+
/** Whether validation passed */
|
|
19
|
+
valid: boolean;
|
|
20
|
+
/** Error messages if validation failed */
|
|
21
|
+
errors: string[];
|
|
22
|
+
/** Sanitized value (if applicable) */
|
|
23
|
+
sanitized?: any;
|
|
24
|
+
}
|
|
25
|
+
export declare class ValidationUtils {
|
|
26
|
+
private static rules;
|
|
27
|
+
/**
|
|
28
|
+
* Register a validation rule
|
|
29
|
+
*/
|
|
30
|
+
static registerRule(rule: ValidationRule): void;
|
|
31
|
+
/**
|
|
32
|
+
* Validate a value against a rule
|
|
33
|
+
*/
|
|
34
|
+
static validate(ruleId: string, value: any): ValidationResult;
|
|
35
|
+
/**
|
|
36
|
+
* Validate a value against multiple rules
|
|
37
|
+
*/
|
|
38
|
+
static validateAll(ruleIds: string[], value: any): ValidationResult;
|
|
39
|
+
/**
|
|
40
|
+
* Validate form field based on input type and constraints
|
|
41
|
+
*/
|
|
42
|
+
static validateFormField(type: string, value: string, constraints?: {
|
|
43
|
+
required?: boolean;
|
|
44
|
+
minLength?: number;
|
|
45
|
+
maxLength?: number;
|
|
46
|
+
pattern?: RegExp;
|
|
47
|
+
min?: number;
|
|
48
|
+
max?: number;
|
|
49
|
+
}): ValidationResult;
|
|
50
|
+
/**
|
|
51
|
+
* Validate component attribute value
|
|
52
|
+
*/
|
|
53
|
+
static validateAttribute(name: string, value: string): ValidationResult;
|
|
54
|
+
/**
|
|
55
|
+
* Validate HTML content
|
|
56
|
+
*/
|
|
57
|
+
static validateHTML(content: string): ValidationResult;
|
|
58
|
+
/**
|
|
59
|
+
* Create a validation rule for required fields
|
|
60
|
+
*/
|
|
61
|
+
static createRequiredRule(message?: string): ValidationRule;
|
|
62
|
+
/**
|
|
63
|
+
* Create a validation rule for minimum length
|
|
64
|
+
*/
|
|
65
|
+
static createMinLengthRule(minLength: number, message?: string): ValidationRule;
|
|
66
|
+
/**
|
|
67
|
+
* Create a validation rule for maximum length
|
|
68
|
+
*/
|
|
69
|
+
static createMaxLengthRule(maxLength: number, message?: string): ValidationRule;
|
|
70
|
+
/**
|
|
71
|
+
* Create a validation rule for email format
|
|
72
|
+
*/
|
|
73
|
+
static createEmailRule(message?: string): ValidationRule;
|
|
74
|
+
/**
|
|
75
|
+
* Create a validation rule for URL format
|
|
76
|
+
*/
|
|
77
|
+
static createURLRule(message?: string): ValidationRule;
|
|
78
|
+
private static sanitizeValue;
|
|
79
|
+
}
|
|
80
|
+
export declare function validateField(type: string, value: string, constraints?: any): ValidationResult;
|
|
81
|
+
export declare function validateAttr(name: string, value: string): ValidationResult;
|
|
82
|
+
export declare function validateHtml(content: string): ValidationResult;
|
|
83
|
+
export default ValidationUtils;
|
|
84
|
+
//# sourceMappingURL=validation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../src/utils/validation.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,WAAW,cAAc;IAC7B,sBAAsB;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,0BAA0B;IAC1B,QAAQ,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,OAAO,CAAC;IAClC,oBAAoB;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,oCAAoC;IACpC,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B,gCAAgC;IAChC,KAAK,EAAE,OAAO,CAAC;IACf,0CAA0C;IAC1C,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,sCAAsC;IACtC,SAAS,CAAC,EAAE,GAAG,CAAC;CACjB;AAED,qBAAa,eAAe;IAC1B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAqC;IAEzD;;OAEG;IACH,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI;IAI/C;;OAEG;IACH,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,gBAAgB;IAsB7D;;OAEG;IACH,MAAM,CAAC,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,GAAG,GAAG,gBAAgB;IAqBnE;;OAEG;IACH,MAAM,CAAC,iBAAiB,CACtB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,WAAW,CAAC,EAAE;QACZ,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,GAAG,CAAC,EAAE,MAAM,CAAC;KACd,GACA,gBAAgB;IAyFnB;;OAEG;IACH,MAAM,CAAC,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,gBAAgB;IAkBvE;;OAEG;IACH,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,gBAAgB;IAkBtD;;OAEG;IACH,MAAM,CAAC,kBAAkB,CACvB,OAAO,SAA2B,GACjC,cAAc;IASjB;;OAEG;IACH,MAAM,CAAC,mBAAmB,CACxB,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,MAAM,GACf,cAAc;IASjB;;OAEG;IACH,MAAM,CAAC,mBAAmB,CACxB,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,MAAM,GACf,cAAc;IASjB;;OAEG;IACH,MAAM,CAAC,eAAe,CAAC,OAAO,SAA0B,GAAG,cAAc;IAYzE;;OAEG;IACH,MAAM,CAAC,aAAa,CAAC,OAAO,SAAgB,GAAG,cAAc;IAY7D,OAAO,CAAC,MAAM,CAAC,aAAa;CAwB7B;AAUD,wBAAgB,aAAa,CAC3B,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,WAAW,CAAC,EAAE,GAAG,GAChB,gBAAgB,CAElB;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,gBAAgB,CAE1E;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,gBAAgB,CAE9D;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../../src/wrappers/angular/components.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/wrappers/angular/index.ts"],"names":[],"mappings":"AAEA,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AAGxB,YAAY,EACV,OAAO,EACR,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["../../../../src/wrappers/angular/module.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"services.d.ts","sourceRoot":"","sources":["../../../../src/wrappers/angular/services.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { EventEmitter, ElementRef, ModuleWithProviders, Type } from '@angular/core';
|
|
2
|
+
import type { Observable } from 'rxjs';
|
|
3
|
+
export interface BaseKenikoolAngularComponent {
|
|
4
|
+
elementRef: ElementRef<HTMLElement>;
|
|
5
|
+
ngOnInit(): void;
|
|
6
|
+
ngOnDestroy(): void;
|
|
7
|
+
ngAfterViewInit(): void;
|
|
8
|
+
}
|
|
9
|
+
export interface KenikoolAngularEventEmitters {
|
|
10
|
+
click: EventEmitter<MouseEvent>;
|
|
11
|
+
change: EventEmitter<Event>;
|
|
12
|
+
focus: EventEmitter<FocusEvent>;
|
|
13
|
+
blur: EventEmitter<FocusEvent>;
|
|
14
|
+
keydown: EventEmitter<KeyboardEvent>;
|
|
15
|
+
keyup: EventEmitter<KeyboardEvent>;
|
|
16
|
+
mouseenter: EventEmitter<MouseEvent>;
|
|
17
|
+
mouseleave: EventEmitter<MouseEvent>;
|
|
18
|
+
}
|
|
19
|
+
export interface KenikoolThemeService {
|
|
20
|
+
currentTheme$: Observable<string>;
|
|
21
|
+
availableThemes$: Observable<string[]>;
|
|
22
|
+
setTheme(theme: string): void;
|
|
23
|
+
getTheme(): string;
|
|
24
|
+
getAvailableThemes(): string[];
|
|
25
|
+
}
|
|
26
|
+
export interface KenikoolUIService {
|
|
27
|
+
registerComponent(tagName: string, component: Type<any>): void;
|
|
28
|
+
getComponent(tagName: string): Type<any> | undefined;
|
|
29
|
+
isComponentRegistered(tagName: string): boolean;
|
|
30
|
+
getRegisteredComponents(): string[];
|
|
31
|
+
}
|
|
32
|
+
export interface KenikoolUIModuleConfig {
|
|
33
|
+
theme?: string;
|
|
34
|
+
prefix?: string;
|
|
35
|
+
components?: string[];
|
|
36
|
+
providers?: any[];
|
|
37
|
+
}
|
|
38
|
+
export interface KenikoolUIModule {
|
|
39
|
+
forRoot(config?: KenikoolUIModuleConfig): ModuleWithProviders<KenikoolUIModule>;
|
|
40
|
+
forChild(config?: Partial<KenikoolUIModuleConfig>): ModuleWithProviders<KenikoolUIModule>;
|
|
41
|
+
}
|
|
42
|
+
export declare const KENIKOOL_UI_CONFIG: any;
|
|
43
|
+
export declare const KENIKOOL_UI_THEME: any;
|
|
44
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/wrappers/angular/types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,YAAY,EACZ,UAAU,EACV,mBAAmB,EAEnB,IAAI,EACL,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAGvC,MAAM,WAAW,4BAA4B;IAC3C,UAAU,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC;IACpC,QAAQ,IAAI,IAAI,CAAC;IACjB,WAAW,IAAI,IAAI,CAAC;IACpB,eAAe,IAAI,IAAI,CAAC;CACzB;AAGD,MAAM,WAAW,4BAA4B;IAC3C,KAAK,EAAE,YAAY,CAAC,UAAU,CAAC,CAAC;IAChC,MAAM,EAAE,YAAY,CA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AAO,CAAC,sBAAsB,CAAC,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;CAC3F;AAGD,eAAO,MAAM,kBAAkB,KAAmE,CAAC;AACnG,eAAO,MAAM,iBAAiB,KAAkD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../../src/wrappers/react/components.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../../src/wrappers/react/hooks.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/wrappers/react/index.ts"],"names":[],"mappings":"AAEA,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AAGxB,YAAY,EACV,KAAK,EACN,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../../src/wrappers/react/provider.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ForwardedRef, ReactNode } from 'react';
|
|
2
|
+
export interface BaseKenikoolReactProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
style?: React.CSSProperties;
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
ref?: ForwardedRef<HTMLElement>;
|
|
7
|
+
}
|
|
8
|
+
export interface KenikoolReactEventHandlers {
|
|
9
|
+
onClick?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
10
|
+
onChange?: (event: React.ChangeEvent<HTMLElement>) => void;
|
|
11
|
+
onFocus?: (event: React.FocusEvent<HTMLElement>) => void;
|
|
12
|
+
onBlur?: (event: React.FocusEvent<HTMLElement>) => void;
|
|
13
|
+
onKeyDown?: (event: React.KeyboardEvent<HTMLElement>) => void;
|
|
14
|
+
onKeyUp?: (event: React.KeyboardEvent<HTMLElement>) => void;
|
|
15
|
+
onMouseEnter?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
16
|
+
onMouseLeave?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
17
|
+
}
|
|
18
|
+
export type ReactComponentFactory<T extends HTMLElement, P = {}> = React.ForwardRefExoticComponent<P & BaseKenikoolReactProps & React.RefAttributes<T>>;
|
|
19
|
+
export interface UseThemeReturn {
|
|
20
|
+
theme: string;
|
|
21
|
+
setTheme: (theme: string) => void;
|
|
22
|
+
availableThemes: string[];
|
|
23
|
+
isDark: boolean;
|
|
24
|
+
isLight: boolean;
|
|
25
|
+
}
|
|
26
|
+
export interface UseKenikoolComponentReturn<T extends HTMLElement> {
|
|
27
|
+
component: T | null;
|
|
28
|
+
isConnected: boolean;
|
|
29
|
+
isReady: boolean;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/wrappers/react/types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAkB,SAAS,EAAE,MAAM,OAAO,CAAC;AAGrE,MAAM,WAAW,sBAAsB;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,GAAG,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,CAAC;CACjC;AAGD,MAAM,WAAW,0BAA0B;IACzC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IACzD,QAAQ,CAAC,EAAE,CAAC,KAAK,E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@
|
|
|
1
|
+
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../../src/wrappers/vue/components.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"composables.d.ts","sourceRoot":"","sources":["../../../../src/wrappers/vue/composables.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/wrappers/vue/index.ts"],"names":[],"mappings":"AAEA,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AAGxB,YAAY,EACV,GAAG,EACJ,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../src/wrappers/vue/plugin.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC"}
|