@capacitor/screen-reader 1.0.6 → 1.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/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.0.7](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/screen-reader@1.0.6...@capacitor/screen-reader@1.0.7) (2022-01-19)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * inline source code in esm map files ([#760](https://github.com/ionic-team/capacitor-plugins/issues/760)) ([a960489](https://github.com/ionic-team/capacitor-plugins/commit/a960489a19db0182b90d187a50deff9dfbe51038))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [1.0.6](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/screen-reader@1.0.5...@capacitor/screen-reader@1.0.6) (2021-11-03)
7
18
 
8
19
  **Note:** Version bump only for package @capacitor/screen-reader
@@ -43,8 +43,8 @@ android {
43
43
 
44
44
  repositories {
45
45
  google()
46
- jcenter()
47
46
  mavenCentral()
47
+ jcenter()
48
48
  }
49
49
 
50
50
 
@@ -1 +1 @@
1
- {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":""}
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"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,YAAY,GAAG,cAAc,CAAqB,cAAc,EAAE;IACtE,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;CAC9D,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,YAAY,EAAE,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,YAAY,GAAG,cAAc,CAAqB,cAAc,EAAE;IACtE,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;CAC9D,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,YAAY,EAAE,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { ScreenReaderPlugin } from './definitions';\n\nconst ScreenReader = registerPlugin<ScreenReaderPlugin>('ScreenReader', {\n web: () => import('./web').then(m => new m.ScreenReaderWeb()),\n});\n\nexport * from './definitions';\nexport { ScreenReader };\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,eAAgB,SAAQ,SAAS;IAC5C,KAAK,CAAC,SAAS;QACb,MAAM,IAAI,CAAC,WAAW,CAAC,+CAA+C,CAAC,CAAC;IAC1E,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,OAAqB;QAC/B,IAAI,CAAC,CAAC,iBAAiB,IAAI,MAAM,CAAC,EAAE;YAClC,MAAM,IAAI,CAAC,WAAW,CACpB,kDAAkD,CACnD,CAAC;SACH;QAED,MAAM,SAAS,GAAG,IAAI,wBAAwB,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAE9D,IAAI,OAAO,CAAC,QAAQ,EAAE;YACpB,SAAS,CAAC,IAAI,GAAG,OAAO,CAAC,QAAQ,CAAC;SACnC;QAED,eAAe,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IACnC,CAAC;CACF"}
1
+ {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,eAAgB,SAAQ,SAAS;IAC5C,KAAK,CAAC,SAAS;QACb,MAAM,IAAI,CAAC,WAAW,CAAC,+CAA+C,CAAC,CAAC;IAC1E,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,OAAqB;QAC/B,IAAI,CAAC,CAAC,iBAAiB,IAAI,MAAM,CAAC,EAAE;YAClC,MAAM,IAAI,CAAC,WAAW,CACpB,kDAAkD,CACnD,CAAC;SACH;QAED,MAAM,SAAS,GAAG,IAAI,wBAAwB,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAE9D,IAAI,OAAO,CAAC,QAAQ,EAAE;YACpB,SAAS,CAAC,IAAI,GAAG,OAAO,CAAC,QAAQ,CAAC;SACnC;QAED,eAAe,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IACnC,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type { ScreenReaderPlugin, SpeakOptions } from './definitions';\n\nexport class ScreenReaderWeb extends WebPlugin implements ScreenReaderPlugin {\n async isEnabled(): Promise<never> {\n throw this.unavailable('This feature is not available in the browser.');\n }\n\n async speak(options: SpeakOptions): Promise<void> {\n if (!('speechSynthesis' in window)) {\n throw this.unavailable(\n 'Browser does not support the SpeechSynthesis API',\n );\n }\n\n const utterance = new SpeechSynthesisUtterance(options.value);\n\n if (options.language) {\n utterance.lang = options.language;\n }\n\n speechSynthesis.speak(utterance);\n }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capacitor/screen-reader",
3
- "version": "1.0.6",
3
+ "version": "1.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": "64df93225736e9dfad336562f5e53e5a2243052b"
82
+ "gitHead": "f18ee6482e1ec8e5fb0290d51f598397133af990"
83
83
  }