expo-speech 10.0.3 → 10.2.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/CHANGELOG.md CHANGED
@@ -10,11 +10,19 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
- ## 10.0.32021-10-21
13
+ ## 10.2.0 — 2022-04-18
14
14
 
15
- _This version does not introduce any user-facing changes._
15
+ ### ⚠️ Notices
16
+
17
+ - On Android bump `compileSdkVersion` to `31`, `targetSdkVersion` to `31` and `Java` version to `11`. ([#16941](https://github.com/expo/expo/pull/16941) by [@bbarthec](https://github.com/bbarthec))
18
+
19
+ ## 10.1.1 - 2022-02-01
20
+
21
+ ### 🐛 Bug fixes
22
+
23
+ - Fix `Plugin with id 'maven' not found` build error from Android Gradle 7. ([#16080](https://github.com/expo/expo/pull/16080) by [@kudo](https://github.com/kudo))
16
24
 
17
- ## 10.0.2 — 2021-10-15
25
+ ## 10.1.0 — 2021-12-03
18
26
 
19
27
  _This version does not introduce any user-facing changes._
20
28
 
package/README.md CHANGED
@@ -4,16 +4,16 @@ Provides text-to-speech functionality.
4
4
 
5
5
  # API documentation
6
6
 
7
- - [Documentation for the master branch](https://github.com/expo/expo/blob/master/docs/pages/versions/unversioned/sdk/speech.md)
8
- - [Documentation for the latest stable release](https://docs.expo.io/versions/latest/sdk/speech/)
7
+ - [Documentation for the main branch](https://github.com/expo/expo/blob/main/docs/pages/versions/unversioned/sdk/speech.md)
8
+ - [Documentation for the latest stable release](https://docs.expo.dev/versions/latest/sdk/speech/)
9
9
 
10
10
  # Installation in managed Expo projects
11
11
 
12
- For managed [managed](https://docs.expo.io/versions/latest/introduction/managed-vs-bare/) Expo projects, please follow the installation instructions in the [API documentation for the latest stable release](https://docs.expo.io/versions/latest/sdk/speech/).
12
+ For [managed](https://docs.expo.dev/versions/latest/introduction/managed-vs-bare/) Expo projects, please follow the installation instructions in the [API documentation for the latest stable release](https://docs.expo.dev/versions/latest/sdk/speech/).
13
13
 
14
14
  # Installation in bare React Native projects
15
15
 
16
- For bare React Native projects, you must ensure that you have [installed and configured the `react-native-unimodules` package](https://github.com/expo/expo/tree/master/packages/react-native-unimodules) before continuing.
16
+ For bare React Native projects, you must ensure that you have [installed and configured the `expo` package](https://docs.expo.dev/bare/installing-expo-modules/) before continuing.
17
17
 
18
18
  ### Add the package to your npm dependencies
19
19
 
@@ -1,74 +1,88 @@
1
1
  apply plugin: 'com.android.library'
2
2
  apply plugin: 'kotlin-android'
3
- apply plugin: 'maven'
3
+ apply plugin: 'maven-publish'
4
4
 
5
5
  group = 'host.exp.exponent'
6
- version = '10.0.3'
6
+ version = '10.2.0'
7
7
 
8
8
  buildscript {
9
+ def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
10
+ if (expoModulesCorePlugin.exists()) {
11
+ apply from: expoModulesCorePlugin
12
+ applyKotlinExpoModulesCorePlugin()
13
+ }
14
+
9
15
  // Simple helper that allows the root project to override versions declared by this library.
10
16
  ext.safeExtGet = { prop, fallback ->
11
17
  rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
12
18
  }
13
19
 
20
+ // Ensures backward compatibility
21
+ ext.getKotlinVersion = {
22
+ if (ext.has("kotlinVersion")) {
23
+ ext.kotlinVersion()
24
+ } else {
25
+ ext.safeExtGet("kotlinVersion", "1.6.10")
26
+ }
27
+ }
28
+
14
29
  repositories {
15
30
  mavenCentral()
16
31
  }
17
32
 
18
33
  dependencies {
19
- classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${safeExtGet('kotlinVersion', '1.4.21')}")
34
+ classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${getKotlinVersion()}")
20
35
  }
21
36
  }
22
37
 
23
- // Upload android library to maven with javadoc and android sources
24
- configurations {
25
- deployerJars
26
- }
27
-
28
38
  // Creating sources with comments
29
39
  task androidSourcesJar(type: Jar) {
30
40
  classifier = 'sources'
31
41
  from android.sourceSets.main.java.srcDirs
32
42
  }
33
43
 
34
- // Put the androidSources and javadoc to the artifacts
35
- artifacts {
36
- archives androidSourcesJar
37
- }
38
-
39
- uploadArchives {
40
- repositories {
41
- mavenDeployer {
42
- configuration = configurations.deployerJars
43
- repository(url: mavenLocal().url)
44
+ afterEvaluate {
45
+ publishing {
46
+ publications {
47
+ release(MavenPublication) {
48
+ from components.release
49
+ // Add additional sourcesJar to artifacts
50
+ artifact(androidSourcesJar)
51
+ }
52
+ }
53
+ repositories {
54
+ maven {
55
+ url = mavenLocal().url
56
+ }
44
57
  }
45
58
  }
46
59
  }
47
60
 
48
61
  android {
49
- compileSdkVersion safeExtGet("compileSdkVersion", 30)
62
+ compileSdkVersion safeExtGet("compileSdkVersion", 31)
50
63
 
51
64
  compileOptions {
52
- sourceCompatibility JavaVersion.VERSION_1_8
53
- targetCompatibility JavaVersion.VERSION_1_8
65
+ sourceCompatibility JavaVersion.VERSION_11
66
+ targetCompatibility JavaVersion.VERSION_11
67
+ }
68
+
69
+ kotlinOptions {
70
+ jvmTarget = JavaVersion.VERSION_11.majorVersion
54
71
  }
55
72
 
56
73
  defaultConfig {
57
74
  minSdkVersion safeExtGet("minSdkVersion", 21)
58
- targetSdkVersion safeExtGet("targetSdkVersion", 30)
75
+ targetSdkVersion safeExtGet("targetSdkVersion", 31)
59
76
  versionCode 18
60
- versionName "10.0.3"
77
+ versionName "10.2.0"
61
78
  }
62
79
  lintOptions {
63
80
  abortOnError false
64
81
  }
65
- kotlinOptions {
66
- jvmTarget = JavaVersion.VERSION_1_8
67
- }
68
82
  }
69
83
 
70
84
  dependencies {
71
85
  implementation project(':expo-modules-core')
72
86
 
73
- implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${safeExtGet('kotlinVersion', '1.4.21')}"
87
+ implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${getKotlinVersion()}"
74
88
  }
@@ -1,2 +1,3 @@
1
1
  declare const _default: import("expo-modules-core").ProxyNativeModule;
2
2
  export default _default;
3
+ //# sourceMappingURL=ExponentSpeech.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExponentSpeech.d.ts","sourceRoot":"","sources":["../src/Speech/ExponentSpeech.ts"],"names":[],"mappings":";AACA,wBAAiD"}
@@ -10,3 +10,4 @@ declare const _default: {
10
10
  maxSpeechInputLength: number;
11
11
  };
12
12
  export default _default;
13
+ //# sourceMappingURL=ExponentSpeech.web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExponentSpeech.web.d.ts","sourceRoot":"","sources":["../src/Speech/ExponentSpeech.web.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAgB,MAAM,gBAAgB,CAAC;;;cA2BrD,MAAM,QAAQ,MAAM,WAAW,aAAa,GAAG,QAAQ,wBAAwB,CAAC;iBAiE7E,QAAQ,QAAQ,EAAE,CAAC;kBAYlB,QAAQ,OAAO,CAAC;YAGtB,QAAQ,IAAI,CAAC;aAGZ,QAAQ,IAAI,CAAC;cAGZ,QAAQ,IAAI,CAAC;;;AA1F/B,wBA8FE"}
package/build/Speech.d.ts CHANGED
@@ -36,3 +36,4 @@ export declare function resume(): Promise<void>;
36
36
  * On iOS, this returns `Number.MAX_VALUE`.
37
37
  */
38
38
  export declare const maxSpeechInputLength: number;
39
+ //# sourceMappingURL=Speech.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Speech.d.ts","sourceRoot":"","sources":["../src/Speech/Speech.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,YAAY,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAInG,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,YAAY,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;AAoD7E;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,aAAkB,QAK9D;AAGD;;;GAGG;AACH,wBAAsB,uBAAuB,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC,CAKhE;AAGD;;;;GAIG;AACH,wBAAsB,eAAe,IAAI,OAAO,CAAC,OAAO,CAAC,CAExD;AAGD;;GAEG;AACH,wBAAsB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAE1C;AAGD;;GAEG;AACH,wBAAsB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAK3C;AAGD;;;GAGG;AACH,wBAAsB,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAM5C;AAoBD;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,MAAgE,CAAC"}
@@ -26,8 +26,9 @@ export declare type SpeechOptions = {
26
26
  */
27
27
  onDone?: () => void | SpeechEventCallback;
28
28
  /**
29
- * __(Android only).__ A callback that is invoked when an error occurred while speaking.
29
+ * A callback that is invoked when an error occurred while speaking.
30
30
  * @param error
31
+ * @platform android
31
32
  */
32
33
  onError?: (error: Error) => void | SpeechEventCallback;
33
34
  volume?: number;
@@ -75,3 +76,4 @@ export declare type WebVoice = Voice & {
75
76
  name: string;
76
77
  voiceURI: string;
77
78
  };
79
+ //# sourceMappingURL=Speech.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Speech.types.d.ts","sourceRoot":"","sources":["../src/Speech/Speech.types.ts"],"names":[],"mappings":"AAAA,oBAAY,mBAAmB,GAAG,CAAC,IAAI,EAAE,wBAAwB,EAAE,EAAE,EAAE,oBAAoB,KAAK,GAAG,CAAC;AAGpG,oBAAY,aAAa,GAAG;IAC1B;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,GAAG,mBAAmB,CAAC;IAC3C;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,I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QAGvB","sourcesContent":["export type SpeechEventCallback = (this: SpeechSynthesisUtterance, ev: SpeechSynthesisEvent) => any;\n\n// @needsAudit @docsMissing\nexport type SpeechOptions = {\n /**\n * The code of a language that should be used to read the `text`, refer to IETF BCP 47 to see\n * valid codes.\n */\n language?: string;\n /**\n * Pitch of the voice to speak `text`. `1.0` is the normal pitch.\n */\n pitch?: number;\n /**\n * Rate of the voice to speak `text`. `1.0` is the normal rate.\n */\n rate?: number;\n /**\n * A callback that is invoked when speaking starts.\n */\n onStart?: () => void | SpeechEventCallback;\n /**\n * A callback that is invoked when speaking is stopped by calling `Speech.stop()`.\n */\n onStopped?: () => void | SpeechEventCallback;\n /**\n * A callback that is invoked when speaking finishes.\n */\n onDone?: () => void | SpeechEventCallback;\n /**\n * __(Android only).__ A callback that is invoked when an error occurred while speaking.\n * @param error\n */\n onError?: (error: Error) => void | SpeechEventCallback;\n volume?: number;\n /**\n * Voice identifier.\n */\n voice?: string;\n _voiceIndex?: number;\n onBoundary?: SpeechEventCallback | null;\n onMark?: SpeechEventCallback | null;\n onPause?: SpeechEventCallback | null;\n onResume?: SpeechEventCallback | null;\n};\n\n// @needsAudit\n/**\n * Enum representing the voice quality.\n */\nexport enum VoiceQuality {\n Default = 'Default',\n Enhanced = 'Enhanced',\n}\n\n// @needsAudit\n/**\n * Object describing the available voices on the device.\n */\nexport type Voice = {\n /**\n * Voice unique identifier.\n */\n identifier: string;\n /**\n * Voice name.\n */\n name: string;\n /**\n * Voice quality.\n */\n quality: VoiceQuality;\n /**\n * Voice language.\n */\n language: string;\n};\n\n// @docsMissing\nexport type WebVoice = Voice & {\n isDefault: boolean;\n localService: boolean;\n name: string;\n voiceURI: string;\n};\n"]}
1
+ {"version":3,"file":"Speech.types.js","sourceRoot":"","sources":["../src/Speech/Speech.types.ts"],"names":[],"mappings":"AA+CA,cAAc;AACd;;GAEG;AACH,MAAM,CAAN,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,mCAAmB,CAAA;IACnB,qCAAqB,CAAA;AACvB,CAAC,EAHW,YAAY,KAAZ,YAAY,QAGvB","sourcesContent":["export type SpeechEventCallback = (this: SpeechSynthesisUtterance, ev: SpeechSynthesisEvent) => any;\n\n// @needsAudit @docsMissing\nexport type SpeechOptions = {\n /**\n * The code of a language that should be used to read the `text`, refer to IETF BCP 47 to see\n * valid codes.\n */\n language?: string;\n /**\n * Pitch of the voice to speak `text`. `1.0` is the normal pitch.\n */\n pitch?: number;\n /**\n * Rate of the voice to speak `text`. `1.0` is the normal rate.\n */\n rate?: number;\n /**\n * A callback that is invoked when speaking starts.\n */\n onStart?: () => void | SpeechEventCallback;\n /**\n * A callback that is invoked when speaking is stopped by calling `Speech.stop()`.\n */\n onStopped?: () => void | SpeechEventCallback;\n /**\n * A callback that is invoked when speaking finishes.\n */\n onDone?: () => void | SpeechEventCallback;\n /**\n * A callback that is invoked when an error occurred while speaking.\n * @param error\n * @platform android\n */\n onError?: (error: Error) => void | SpeechEventCallback;\n volume?: number;\n /**\n * Voice identifier.\n */\n voice?: string;\n _voiceIndex?: number;\n onBoundary?: SpeechEventCallback | null;\n onMark?: SpeechEventCallback | null;\n onPause?: SpeechEventCallback | null;\n onResume?: SpeechEventCallback | null;\n};\n\n// @needsAudit\n/**\n * Enum representing the voice quality.\n */\nexport enum VoiceQuality {\n Default = 'Default',\n Enhanced = 'Enhanced',\n}\n\n// @needsAudit\n/**\n * Object describing the available voices on the device.\n */\nexport type Voice = {\n /**\n * Voice unique identifier.\n */\n identifier: string;\n /**\n * Voice name.\n */\n name: string;\n /**\n * Voice quality.\n */\n quality: VoiceQuality;\n /**\n * Voice language.\n */\n language: string;\n};\n\n// @docsMissing\nexport type WebVoice = Voice & {\n isDefault: boolean;\n localService: boolean;\n name: string;\n voiceURI: string;\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-speech",
3
- "version": "10.0.3",
3
+ "version": "10.2.0",
4
4
  "description": "Provides text-to-speech functionality.",
5
5
  "main": "build/Speech.js",
6
6
  "types": "build/Speech.d.ts",
@@ -33,13 +33,14 @@
33
33
  "license": "MIT",
34
34
  "homepage": "https://docs.expo.dev/versions/latest/sdk/speech/",
35
35
  "jest": {
36
- "preset": "expo-module-scripts/ios"
37
- },
38
- "dependencies": {
39
- "expo-modules-core": "~0.4.4"
36
+ "preset": "expo-module-scripts"
40
37
  },
38
+ "dependencies": {},
41
39
  "devDependencies": {
42
40
  "expo-module-scripts": "^2.0.0"
43
41
  },
44
- "gitHead": "4fa0497a180ae707fa860cb03858630ab7af19f4"
42
+ "peerDependencies": {
43
+ "expo": "*"
44
+ },
45
+ "gitHead": "22dce752354bb429c84851bc4389abe47a766b1f"
45
46
  }
@@ -28,8 +28,9 @@ export type SpeechOptions = {
28
28
  */
29
29
  onDone?: () => void | SpeechEventCallback;
30
30
  /**
31
- * __(Android only).__ A callback that is invoked when an error occurred while speaking.
31
+ * A callback that is invoked when an error occurred while speaking.
32
32
  * @param error
33
+ * @platform android
33
34
  */
34
35
  onError?: (error: Error) => void | SpeechEventCallback;
35
36
  volume?: number;