@yuktishaalaa/yuktai 2.0.9 → 2.0.12

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.
@@ -0,0 +1,114 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ReactNode } from 'react';
3
+
4
+ interface Plugin {
5
+ name: string;
6
+ execute(input: any): any | Promise<any>;
7
+ }
8
+ declare class Runtime {
9
+ private plugins;
10
+ register(name: string, plugin: Plugin): void;
11
+ /**
12
+ * 🔹 Direct Plugin Access
13
+ * This is what YuktAI.use(name) calls.
14
+ */
15
+ use(name: string): Plugin | undefined;
16
+ /**
17
+ * 🔹 Run task
18
+ */
19
+ run(task: string, input: unknown): Promise<unknown>;
20
+ getPlugins(): string[];
21
+ }
22
+
23
+ type ColorBlindMode = "none" | "deuteranopia" | "protanopia" | "tritanopia" | "achromatopsia";
24
+ type Severity = "critical" | "serious" | "moderate" | "minor";
25
+ type AlertType = "success" | "error" | "info" | "warning";
26
+ interface A11yConfig {
27
+ enabled: boolean;
28
+ highContrast?: boolean;
29
+ darkMode?: boolean;
30
+ reduceMotion?: boolean;
31
+ autoFix?: boolean;
32
+ fontSizeMultiplier?: number;
33
+ colorBlindMode?: ColorBlindMode;
34
+ keyboardHints?: boolean;
35
+ speechEnabled?: boolean;
36
+ showPreferencePanel?: boolean;
37
+ showAuditBadge?: boolean;
38
+ showSkipLinks?: boolean;
39
+ largeTargets?: boolean;
40
+ timeoutWarning?: number;
41
+ }
42
+ interface A11yFix {
43
+ tag: string;
44
+ fix: string;
45
+ severity: Severity;
46
+ element: string;
47
+ }
48
+ interface A11yReport {
49
+ fixed: number;
50
+ scanned: number;
51
+ renderTime: number;
52
+ score: number;
53
+ details: A11yFix[];
54
+ }
55
+ declare function speak(text: string, priority?: "polite" | "assertive"): void;
56
+ declare function showVisualAlert(message: string, type?: AlertType): void;
57
+ declare function announce(message: string, type?: AlertType, useSpeech?: boolean): void;
58
+ declare function trapFocus(modal: HTMLElement): void;
59
+ declare const wcagPlugin: {
60
+ name: string;
61
+ version: string;
62
+ observer: MutationObserver | null;
63
+ execute(config: A11yConfig): Promise<string>;
64
+ applyFixes(config: A11yConfig): A11yReport;
65
+ scan(): A11yReport;
66
+ startObserver(config: A11yConfig): void;
67
+ stopObserver(): void;
68
+ announce: typeof announce;
69
+ speak: typeof speak;
70
+ showVisualAlert: typeof showVisualAlert;
71
+ trapFocus: typeof trapFocus;
72
+ };
73
+
74
+ interface YuktAIWrapperProps {
75
+ children?: ReactNode;
76
+ position?: "left" | "right";
77
+ }
78
+ declare function YuktAIWrapper({ children, position }: YuktAIWrapperProps): react_jsx_runtime.JSX.Element;
79
+
80
+ declare const aiPlugin: {
81
+ name: string;
82
+ execute(input: string): Promise<string>;
83
+ };
84
+
85
+ declare const voicePlugin: {
86
+ name: string;
87
+ execute(input: string): Promise<string>;
88
+ };
89
+
90
+ declare global {
91
+ var __yuktai_runtime__: Runtime | undefined;
92
+ }
93
+ declare const YuktAI: {
94
+ wcagPlugin: {
95
+ name: string;
96
+ version: string;
97
+ observer: MutationObserver | null;
98
+ execute(config: A11yConfig): Promise<string>;
99
+ applyFixes(config: A11yConfig): A11yReport;
100
+ scan(): A11yReport;
101
+ startObserver(config: A11yConfig): void;
102
+ stopObserver(): void;
103
+ announce: (message: string, type?: AlertType, useSpeech?: boolean) => void;
104
+ speak: (text: string, priority?: "polite" | "assertive") => void;
105
+ showVisualAlert: (message: string, type?: AlertType) => void;
106
+ trapFocus: (modal: HTMLElement) => void;
107
+ };
108
+ list(): string[];
109
+ use(name: string): Plugin | undefined;
110
+ fix(config?: Partial<A11yConfig>): A11yReport;
111
+ scan(): A11yReport;
112
+ };
113
+
114
+ export { type A11yConfig, type A11yFix, type A11yReport, type ColorBlindMode, Runtime, type Severity, YuktAI, YuktAIWrapper, type YuktAIWrapperProps, aiPlugin, YuktAIWrapper as default, voicePlugin, wcagPlugin as wcag, wcagPlugin };
@@ -0,0 +1,114 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ReactNode } from 'react';
3
+
4
+ interface Plugin {
5
+ name: string;
6
+ execute(input: any): any | Promise<any>;
7
+ }
8
+ declare class Runtime {
9
+ private plugins;
10
+ register(name: string, plugin: Plugin): void;
11
+ /**
12
+ * 🔹 Direct Plugin Access
13
+ * This is what YuktAI.use(name) calls.
14
+ */
15
+ use(name: string): Plugin | undefined;
16
+ /**
17
+ * 🔹 Run task
18
+ */
19
+ run(task: string, input: unknown): Promise<unknown>;
20
+ getPlugins(): string[];
21
+ }
22
+
23
+ type ColorBlindMode = "none" | "deuteranopia" | "protanopia" | "tritanopia" | "achromatopsia";
24
+ type Severity = "critical" | "serious" | "moderate" | "minor";
25
+ type AlertType = "success" | "error" | "info" | "warning";
26
+ interface A11yConfig {
27
+ enabled: boolean;
28
+ highContrast?: boolean;
29
+ darkMode?: boolean;
30
+ reduceMotion?: boolean;
31
+ autoFix?: boolean;
32
+ fontSizeMultiplier?: number;
33
+ colorBlindMode?: ColorBlindMode;
34
+ keyboardHints?: boolean;
35
+ speechEnabled?: boolean;
36
+ showPreferencePanel?: boolean;
37
+ showAuditBadge?: boolean;
38
+ showSkipLinks?: boolean;
39
+ largeTargets?: boolean;
40
+ timeoutWarning?: number;
41
+ }
42
+ interface A11yFix {
43
+ tag: string;
44
+ fix: string;
45
+ severity: Severity;
46
+ element: string;
47
+ }
48
+ interface A11yReport {
49
+ fixed: number;
50
+ scanned: number;
51
+ renderTime: number;
52
+ score: number;
53
+ details: A11yFix[];
54
+ }
55
+ declare function speak(text: string, priority?: "polite" | "assertive"): void;
56
+ declare function showVisualAlert(message: string, type?: AlertType): void;
57
+ declare function announce(message: string, type?: AlertType, useSpeech?: boolean): void;
58
+ declare function trapFocus(modal: HTMLElement): void;
59
+ declare const wcagPlugin: {
60
+ name: string;
61
+ version: string;
62
+ observer: MutationObserver | null;
63
+ execute(config: A11yConfig): Promise<string>;
64
+ applyFixes(config: A11yConfig): A11yReport;
65
+ scan(): A11yReport;
66
+ startObserver(config: A11yConfig): void;
67
+ stopObserver(): void;
68
+ announce: typeof announce;
69
+ speak: typeof speak;
70
+ showVisualAlert: typeof showVisualAlert;
71
+ trapFocus: typeof trapFocus;
72
+ };
73
+
74
+ interface YuktAIWrapperProps {
75
+ children?: ReactNode;
76
+ position?: "left" | "right";
77
+ }
78
+ declare function YuktAIWrapper({ children, position }: YuktAIWrapperProps): react_jsx_runtime.JSX.Element;
79
+
80
+ declare const aiPlugin: {
81
+ name: string;
82
+ execute(input: string): Promise<string>;
83
+ };
84
+
85
+ declare const voicePlugin: {
86
+ name: string;
87
+ execute(input: string): Promise<string>;
88
+ };
89
+
90
+ declare global {
91
+ var __yuktai_runtime__: Runtime | undefined;
92
+ }
93
+ declare const YuktAI: {
94
+ wcagPlugin: {
95
+ name: string;
96
+ version: string;
97
+ observer: MutationObserver | null;
98
+ execute(config: A11yConfig): Promise<string>;
99
+ applyFixes(config: A11yConfig): A11yReport;
100
+ scan(): A11yReport;
101
+ startObserver(config: A11yConfig): void;
102
+ stopObserver(): void;
103
+ announce: (message: string, type?: AlertType, useSpeech?: boolean) => void;
104
+ speak: (text: string, priority?: "polite" | "assertive") => void;
105
+ showVisualAlert: (message: string, type?: AlertType) => void;
106
+ trapFocus: (modal: HTMLElement) => void;
107
+ };
108
+ list(): string[];
109
+ use(name: string): Plugin | undefined;
110
+ fix(config?: Partial<A11yConfig>): A11yReport;
111
+ scan(): A11yReport;
112
+ };
113
+
114
+ export { type A11yConfig, type A11yFix, type A11yReport, type ColorBlindMode, Runtime, type Severity, YuktAI, YuktAIWrapper, type YuktAIWrapperProps, aiPlugin, YuktAIWrapper as default, voicePlugin, wcagPlugin as wcag, wcagPlugin };