@capacitor/screen-reader 5.0.7-nightly-20231107T150458.0 → 5.0.7
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 +3 -3
- package/android/build.gradle +3 -3
- package/dist/docs.json +2 -2
- package/dist/esm/definitions.d.ts +1 -1
- package/dist/esm/definitions.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
@@ -14,7 +14,7 @@ npx cap sync
|
|
14
14
|
```typescript
|
15
15
|
import { ScreenReader } from '@capacitor/screen-reader';
|
16
16
|
|
17
|
-
ScreenReader.addListener('
|
17
|
+
ScreenReader.addListener('stateChange', ({ value }) => {
|
18
18
|
console.log(`Screen reader is now ${value ? 'on' : 'off'}`);
|
19
19
|
});
|
20
20
|
|
@@ -93,7 +93,7 @@ plugin](https://github.com/capacitor-community/text-to-speech).
|
|
93
93
|
### addListener('stateChange', ...)
|
94
94
|
|
95
95
|
```typescript
|
96
|
-
addListener(eventName: 'stateChange', listener: StateChangeListener) => Promise<PluginListenerHandle>
|
96
|
+
addListener(eventName: 'stateChange', listener: StateChangeListener) => Promise<PluginListenerHandle> & PluginListenerHandle
|
97
97
|
```
|
98
98
|
|
99
99
|
Add a listener for when the screen reader is turned on or off.
|
@@ -108,7 +108,7 @@ Readers).
|
|
108
108
|
| **`eventName`** | <code>'stateChange'</code> |
|
109
109
|
| **`listener`** | <code><a href="#statechangelistener">StateChangeListener</a></code> |
|
110
110
|
|
111
|
-
**Returns:** <code>Promise<<a href="#pluginlistenerhandle">PluginListenerHandle</a>>
|
111
|
+
**Returns:** <code>Promise<<a href="#pluginlistenerhandle">PluginListenerHandle</a>> & <a href="#pluginlistenerhandle">PluginListenerHandle</a></code>
|
112
112
|
|
113
113
|
**Since:** 1.0.0
|
114
114
|
|
package/android/build.gradle
CHANGED
@@ -15,7 +15,7 @@ buildscript {
|
|
15
15
|
}
|
16
16
|
}
|
17
17
|
dependencies {
|
18
|
-
classpath 'com.android.tools.build:gradle:8.
|
18
|
+
classpath 'com.android.tools.build:gradle:8.0.0'
|
19
19
|
if (System.getenv("CAP_PLUGIN_PUBLISH") == "true") {
|
20
20
|
classpath 'io.github.gradle-nexus:publish-plugin:1.3.0'
|
21
21
|
}
|
@@ -31,10 +31,10 @@ if (System.getenv("CAP_PLUGIN_PUBLISH") == "true") {
|
|
31
31
|
|
32
32
|
android {
|
33
33
|
namespace "com.capacitorjs.plugins.screenreader"
|
34
|
-
compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion :
|
34
|
+
compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 33
|
35
35
|
defaultConfig {
|
36
36
|
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 22
|
37
|
-
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion :
|
37
|
+
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 33
|
38
38
|
versionCode 1
|
39
39
|
versionName "1.0"
|
40
40
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
package/dist/docs.json
CHANGED
@@ -45,7 +45,7 @@
|
|
45
45
|
},
|
46
46
|
{
|
47
47
|
"name": "addListener",
|
48
|
-
"signature": "(eventName: 'stateChange', listener: StateChangeListener) => Promise<PluginListenerHandle>",
|
48
|
+
"signature": "(eventName: 'stateChange', listener: StateChangeListener) => Promise<PluginListenerHandle> & PluginListenerHandle",
|
49
49
|
"parameters": [
|
50
50
|
{
|
51
51
|
"name": "eventName",
|
@@ -58,7 +58,7 @@
|
|
58
58
|
"type": "StateChangeListener"
|
59
59
|
}
|
60
60
|
],
|
61
|
-
"returns": "Promise<PluginListenerHandle>",
|
61
|
+
"returns": "Promise<PluginListenerHandle> & PluginListenerHandle",
|
62
62
|
"tags": [
|
63
63
|
{
|
64
64
|
"name": "since",
|
@@ -63,7 +63,7 @@ export interface ScreenReaderPlugin {
|
|
63
63
|
*
|
64
64
|
* @since 1.0.0
|
65
65
|
*/
|
66
|
-
addListener(eventName: 'stateChange', listener: StateChangeListener): Promise<PluginListenerHandle
|
66
|
+
addListener(eventName: 'stateChange', listener: StateChangeListener): Promise<PluginListenerHandle> & PluginListenerHandle;
|
67
67
|
/**
|
68
68
|
* Remove all the listeners that are attached to this plugin.
|
69
69
|
*
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["import type { PluginListenerHandle } from '@capacitor/core';\n\nexport interface SpeakOptions {\n /**\n * The text to speak.\n *\n * @since 1.0.0\n */\n value: string;\n\n /**\n * The language to speak the text in, as its [ISO 639-1\n * Code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g.: \"en\").\n *\n * This option is only supported on Android.\n *\n * @since 1.0.0\n */\n language?: string;\n}\n\nexport interface ScreenReaderState {\n /**\n * Whether a Screen Reader is currently active.\n *\n * @since 1.0.0\n */\n value: boolean;\n}\n\nexport type StateChangeListener = (state: ScreenReaderState) => void;\n\nexport interface ScreenReaderPlugin {\n /**\n * Whether a Screen Reader is currently active.\n *\n * This method is not supported on web (it is not possible to detect Screen\n * Readers).\n *\n * @since 1.0.0\n */\n isEnabled(): Promise<{ value: boolean }>;\n\n /**\n * Text-to-Speech functionality.\n *\n * This function will only work if a Screen Reader is currently active.\n *\n * On web, browsers must support the [SpeechSynthesis\n * API](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis), or\n * this method will throw an error.\n *\n * For more text-to-speech capabilities, please see the [Capacitor Community\n * Text-to-Speech\n * plugin](https://github.com/capacitor-community/text-to-speech).\n *\n * @since 1.0.0\n */\n speak(options: SpeakOptions): Promise<void>;\n\n /**\n * Add a listener for when the screen reader is turned on or off.\n *\n * This event used to be named `'accessibilityScreenReaderStateChange'`.\n *\n * This method is not supported on web (it is not possible to detect Screen\n * Readers).\n *\n * @since 1.0.0\n */\n addListener(\n eventName: 'stateChange',\n listener: StateChangeListener,\n ): Promise<PluginListenerHandle
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["import type { PluginListenerHandle } from '@capacitor/core';\n\nexport interface SpeakOptions {\n /**\n * The text to speak.\n *\n * @since 1.0.0\n */\n value: string;\n\n /**\n * The language to speak the text in, as its [ISO 639-1\n * Code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g.: \"en\").\n *\n * This option is only supported on Android.\n *\n * @since 1.0.0\n */\n language?: string;\n}\n\nexport interface ScreenReaderState {\n /**\n * Whether a Screen Reader is currently active.\n *\n * @since 1.0.0\n */\n value: boolean;\n}\n\nexport type StateChangeListener = (state: ScreenReaderState) => void;\n\nexport interface ScreenReaderPlugin {\n /**\n * Whether a Screen Reader is currently active.\n *\n * This method is not supported on web (it is not possible to detect Screen\n * Readers).\n *\n * @since 1.0.0\n */\n isEnabled(): Promise<{ value: boolean }>;\n\n /**\n * Text-to-Speech functionality.\n *\n * This function will only work if a Screen Reader is currently active.\n *\n * On web, browsers must support the [SpeechSynthesis\n * API](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis), or\n * this method will throw an error.\n *\n * For more text-to-speech capabilities, please see the [Capacitor Community\n * Text-to-Speech\n * plugin](https://github.com/capacitor-community/text-to-speech).\n *\n * @since 1.0.0\n */\n speak(options: SpeakOptions): Promise<void>;\n\n /**\n * Add a listener for when the screen reader is turned on or off.\n *\n * This event used to be named `'accessibilityScreenReaderStateChange'`.\n *\n * This method is not supported on web (it is not possible to detect Screen\n * Readers).\n *\n * @since 1.0.0\n */\n addListener(\n eventName: 'stateChange',\n listener: StateChangeListener,\n ): Promise<PluginListenerHandle> & PluginListenerHandle;\n\n /**\n * Remove all the listeners that are attached to this plugin.\n *\n * @since 1.0.0\n */\n removeAllListeners(): Promise<void>;\n}\n\n/**\n * @deprecated Use `SpeakOptions`.\n * @since 1.0.0\n */\nexport type AccessibilitySpeakOptions = SpeakOptions;\n\n/**\n * @deprecated Use `StateChangeListener`.\n * @since 1.0.0\n */\nexport type ScreenReaderStateChangeCallback = StateChangeListener;\n"]}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@capacitor/screen-reader",
|
3
|
-
"version": "5.0.7
|
3
|
+
"version": "5.0.7",
|
4
4
|
"description": "The Screen Reader API provides access to TalkBack/VoiceOver/etc. and provides simple text-to-speech capabilities for visual accessibility.",
|
5
5
|
"main": "dist/plugin.cjs.js",
|
6
6
|
"module": "dist/esm/index.js",
|
@@ -79,5 +79,5 @@
|
|
79
79
|
"publishConfig": {
|
80
80
|
"access": "public"
|
81
81
|
},
|
82
|
-
"gitHead": "
|
82
|
+
"gitHead": "c5aab483fe0609ab1b2503c245a6c27b6cfd5a7b"
|
83
83
|
}
|