@yuktishaalaa/yuktai 2.0.15 → 2.0.18

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.
@@ -38,6 +38,13 @@ interface A11yConfig {
38
38
  showSkipLinks?: boolean;
39
39
  largeTargets?: boolean;
40
40
  timeoutWarning?: number;
41
+ dyslexiaFont?: boolean;
42
+ localFont?: string;
43
+ plainEnglish?: boolean;
44
+ summarisePage?: boolean;
45
+ translateLanguage?: string;
46
+ voiceControl?: boolean;
47
+ smartLabels?: boolean;
41
48
  }
42
49
  interface A11yFix {
43
50
  tag: string;
@@ -56,6 +63,11 @@ declare function speak(text: string, priority?: "polite" | "assertive"): void;
56
63
  declare function showVisualAlert(message: string, type?: AlertType): void;
57
64
  declare function announce(message: string, type?: AlertType, useSpeech?: boolean): void;
58
65
  declare function trapFocus(modal: HTMLElement): void;
66
+ declare function handlePlainEnglish(enabled: boolean): Promise<void>;
67
+ declare function handleSummarisePage(enabled: boolean): Promise<void>;
68
+ declare function handleTranslate(language: string): Promise<void>;
69
+ declare function handleVoiceControl(enabled: boolean): Promise<void>;
70
+ declare function handleSmartLabels(enabled: boolean): Promise<void>;
59
71
  declare const wcagPlugin: {
60
72
  name: string;
61
73
  version: string;
@@ -69,13 +81,23 @@ declare const wcagPlugin: {
69
81
  speak: typeof speak;
70
82
  showVisualAlert: typeof showVisualAlert;
71
83
  trapFocus: typeof trapFocus;
84
+ handlePlainEnglish: typeof handlePlainEnglish;
85
+ handleSummarisePage: typeof handleSummarisePage;
86
+ handleTranslate: typeof handleTranslate;
87
+ handleVoiceControl: typeof handleVoiceControl;
88
+ handleSmartLabels: typeof handleSmartLabels;
89
+ SUPPORTED_LANGUAGES: {
90
+ code: string;
91
+ label: string;
92
+ }[];
72
93
  };
73
94
 
74
95
  interface YuktAIWrapperProps {
75
- children?: ReactNode;
76
96
  position?: "left" | "right";
97
+ children: ReactNode;
98
+ config?: Partial<A11yConfig>;
77
99
  }
78
- declare function YuktAIWrapper({ children, position }: YuktAIWrapperProps): react_jsx_runtime.JSX.Element;
100
+ declare function YuktAIWrapper({ position, children, config: configOverrides, }: YuktAIWrapperProps): react_jsx_runtime.JSX.Element;
79
101
 
80
102
  declare const aiPlugin: {
81
103
  name: string;
@@ -104,6 +126,15 @@ declare const YuktAI: {
104
126
  speak: (text: string, priority?: "polite" | "assertive") => void;
105
127
  showVisualAlert: (message: string, type?: AlertType) => void;
106
128
  trapFocus: (modal: HTMLElement) => void;
129
+ handlePlainEnglish: (enabled: boolean) => Promise<void>;
130
+ handleSummarisePage: (enabled: boolean) => Promise<void>;
131
+ handleTranslate: (language: string) => Promise<void>;
132
+ handleVoiceControl: (enabled: boolean) => Promise<void>;
133
+ handleSmartLabels: (enabled: boolean) => Promise<void>;
134
+ SUPPORTED_LANGUAGES: {
135
+ code: string;
136
+ label: string;
137
+ }[];
107
138
  };
108
139
  list(): string[];
109
140
  use(name: string): Plugin | undefined;
package/dist/index.d.ts CHANGED
@@ -38,6 +38,13 @@ interface A11yConfig {
38
38
  showSkipLinks?: boolean;
39
39
  largeTargets?: boolean;
40
40
  timeoutWarning?: number;
41
+ dyslexiaFont?: boolean;
42
+ localFont?: string;
43
+ plainEnglish?: boolean;
44
+ summarisePage?: boolean;
45
+ translateLanguage?: string;
46
+ voiceControl?: boolean;
47
+ smartLabels?: boolean;
41
48
  }
42
49
  interface A11yFix {
43
50
  tag: string;
@@ -56,6 +63,11 @@ declare function speak(text: string, priority?: "polite" | "assertive"): void;
56
63
  declare function showVisualAlert(message: string, type?: AlertType): void;
57
64
  declare function announce(message: string, type?: AlertType, useSpeech?: boolean): void;
58
65
  declare function trapFocus(modal: HTMLElement): void;
66
+ declare function handlePlainEnglish(enabled: boolean): Promise<void>;
67
+ declare function handleSummarisePage(enabled: boolean): Promise<void>;
68
+ declare function handleTranslate(language: string): Promise<void>;
69
+ declare function handleVoiceControl(enabled: boolean): Promise<void>;
70
+ declare function handleSmartLabels(enabled: boolean): Promise<void>;
59
71
  declare const wcagPlugin: {
60
72
  name: string;
61
73
  version: string;
@@ -69,13 +81,23 @@ declare const wcagPlugin: {
69
81
  speak: typeof speak;
70
82
  showVisualAlert: typeof showVisualAlert;
71
83
  trapFocus: typeof trapFocus;
84
+ handlePlainEnglish: typeof handlePlainEnglish;
85
+ handleSummarisePage: typeof handleSummarisePage;
86
+ handleTranslate: typeof handleTranslate;
87
+ handleVoiceControl: typeof handleVoiceControl;
88
+ handleSmartLabels: typeof handleSmartLabels;
89
+ SUPPORTED_LANGUAGES: {
90
+ code: string;
91
+ label: string;
92
+ }[];
72
93
  };
73
94
 
74
95
  interface YuktAIWrapperProps {
75
- children?: ReactNode;
76
96
  position?: "left" | "right";
97
+ children: ReactNode;
98
+ config?: Partial<A11yConfig>;
77
99
  }
78
- declare function YuktAIWrapper({ children, position }: YuktAIWrapperProps): react_jsx_runtime.JSX.Element;
100
+ declare function YuktAIWrapper({ position, children, config: configOverrides, }: YuktAIWrapperProps): react_jsx_runtime.JSX.Element;
79
101
 
80
102
  declare const aiPlugin: {
81
103
  name: string;
@@ -104,6 +126,15 @@ declare const YuktAI: {
104
126
  speak: (text: string, priority?: "polite" | "assertive") => void;
105
127
  showVisualAlert: (message: string, type?: AlertType) => void;
106
128
  trapFocus: (modal: HTMLElement) => void;
129
+ handlePlainEnglish: (enabled: boolean) => Promise<void>;
130
+ handleSummarisePage: (enabled: boolean) => Promise<void>;
131
+ handleTranslate: (language: string) => Promise<void>;
132
+ handleVoiceControl: (enabled: boolean) => Promise<void>;
133
+ handleSmartLabels: (enabled: boolean) => Promise<void>;
134
+ SUPPORTED_LANGUAGES: {
135
+ code: string;
136
+ label: string;
137
+ }[];
107
138
  };
108
139
  list(): string[];
109
140
  use(name: string): Plugin | undefined;