ape-accessibility 0.2.5 → 0.4.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 +188 -130
- package/dist/auto.cjs +276 -0
- package/dist/auto.d.cts +2 -0
- package/dist/auto.d.ts +2 -0
- package/dist/auto.global.js +276 -0
- package/dist/auto.js +276 -0
- package/dist/index.cjs +209 -204
- package/dist/index.d.cts +31 -1
- package/dist/index.d.ts +31 -1
- package/dist/index.global.js +209 -204
- package/dist/index.js +209 -204
- package/package.json +74 -63
package/dist/index.d.cts
CHANGED
|
@@ -2,11 +2,22 @@ interface WidgetConfig {
|
|
|
2
2
|
position?: 'bottom-left' | 'bottom-right';
|
|
3
3
|
zIndex?: number;
|
|
4
4
|
containerId?: string;
|
|
5
|
+
theme?: Partial<WidgetTheme>;
|
|
5
6
|
}
|
|
6
7
|
interface WidgetInstance {
|
|
7
8
|
destroy: () => void;
|
|
9
|
+
updateConfig: (config: WidgetConfig) => void;
|
|
8
10
|
config: WidgetConfig;
|
|
9
11
|
}
|
|
12
|
+
interface WidgetTheme {
|
|
13
|
+
primary500: string;
|
|
14
|
+
primary600: string;
|
|
15
|
+
primary700: string;
|
|
16
|
+
panelBackground: string;
|
|
17
|
+
fabActive: string;
|
|
18
|
+
fabInactive: string;
|
|
19
|
+
backdrop: string;
|
|
20
|
+
}
|
|
10
21
|
|
|
11
22
|
interface AccessibilitySettings {
|
|
12
23
|
fontSize?: number;
|
|
@@ -38,6 +49,25 @@ type AccessibilityProfile = 'none' | 'visionImpaired' | 'cognitive' | 'motorImpa
|
|
|
38
49
|
declare function init(config?: WidgetConfig): WidgetInstance;
|
|
39
50
|
declare function destroy(): void;
|
|
40
51
|
declare function getSettings(): AccessibilitySettings;
|
|
52
|
+
declare function configure(config?: WidgetConfig): WidgetConfig;
|
|
53
|
+
declare function getConfig(): WidgetConfig;
|
|
41
54
|
declare function resetAllSettings(): void;
|
|
55
|
+
declare const accessibility: {
|
|
56
|
+
init: typeof init;
|
|
57
|
+
destroy: typeof destroy;
|
|
58
|
+
getSettings: typeof getSettings;
|
|
59
|
+
resetAllSettings: typeof resetAllSettings;
|
|
60
|
+
configure: typeof configure;
|
|
61
|
+
getConfig: typeof getConfig;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
interface AccessibilityWidgetProps {
|
|
65
|
+
config?: WidgetConfig;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* React wrapper: mounts the widget once and updates config at runtime.
|
|
69
|
+
* Renders `null` because the widget itself is mounted into Shadow DOM.
|
|
70
|
+
*/
|
|
71
|
+
declare function AccessibilityWidget({ config }: AccessibilityWidgetProps): null;
|
|
42
72
|
|
|
43
|
-
export { type AccessibilityProfile, type AccessibilitySettings, type WidgetConfig, type WidgetInstance, destroy, getSettings, init, resetAllSettings };
|
|
73
|
+
export { type AccessibilityProfile, type AccessibilitySettings, AccessibilityWidget, type WidgetConfig, type WidgetInstance, type WidgetTheme, accessibility, configure, destroy, getConfig, getSettings, init, resetAllSettings };
|
package/dist/index.d.ts
CHANGED
|
@@ -2,11 +2,22 @@ interface WidgetConfig {
|
|
|
2
2
|
position?: 'bottom-left' | 'bottom-right';
|
|
3
3
|
zIndex?: number;
|
|
4
4
|
containerId?: string;
|
|
5
|
+
theme?: Partial<WidgetTheme>;
|
|
5
6
|
}
|
|
6
7
|
interface WidgetInstance {
|
|
7
8
|
destroy: () => void;
|
|
9
|
+
updateConfig: (config: WidgetConfig) => void;
|
|
8
10
|
config: WidgetConfig;
|
|
9
11
|
}
|
|
12
|
+
interface WidgetTheme {
|
|
13
|
+
primary500: string;
|
|
14
|
+
primary600: string;
|
|
15
|
+
primary700: string;
|
|
16
|
+
panelBackground: string;
|
|
17
|
+
fabActive: string;
|
|
18
|
+
fabInactive: string;
|
|
19
|
+
backdrop: string;
|
|
20
|
+
}
|
|
10
21
|
|
|
11
22
|
interface AccessibilitySettings {
|
|
12
23
|
fontSize?: number;
|
|
@@ -38,6 +49,25 @@ type AccessibilityProfile = 'none' | 'visionImpaired' | 'cognitive' | 'motorImpa
|
|
|
38
49
|
declare function init(config?: WidgetConfig): WidgetInstance;
|
|
39
50
|
declare function destroy(): void;
|
|
40
51
|
declare function getSettings(): AccessibilitySettings;
|
|
52
|
+
declare function configure(config?: WidgetConfig): WidgetConfig;
|
|
53
|
+
declare function getConfig(): WidgetConfig;
|
|
41
54
|
declare function resetAllSettings(): void;
|
|
55
|
+
declare const accessibility: {
|
|
56
|
+
init: typeof init;
|
|
57
|
+
destroy: typeof destroy;
|
|
58
|
+
getSettings: typeof getSettings;
|
|
59
|
+
resetAllSettings: typeof resetAllSettings;
|
|
60
|
+
configure: typeof configure;
|
|
61
|
+
getConfig: typeof getConfig;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
interface AccessibilityWidgetProps {
|
|
65
|
+
config?: WidgetConfig;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* React wrapper: mounts the widget once and updates config at runtime.
|
|
69
|
+
* Renders `null` because the widget itself is mounted into Shadow DOM.
|
|
70
|
+
*/
|
|
71
|
+
declare function AccessibilityWidget({ config }: AccessibilityWidgetProps): null;
|
|
42
72
|
|
|
43
|
-
export { type AccessibilityProfile, type AccessibilitySettings, type WidgetConfig, type WidgetInstance, destroy, getSettings, init, resetAllSettings };
|
|
73
|
+
export { type AccessibilityProfile, type AccessibilitySettings, AccessibilityWidget, type WidgetConfig, type WidgetInstance, type WidgetTheme, accessibility, configure, destroy, getConfig, getSettings, init, resetAllSettings };
|