@applicaster/zapp-react-native-utils 13.0.0-rc.22 → 13.0.0-rc.23
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.
|
@@ -111,22 +111,29 @@ export class AccessibilityManager {
|
|
|
111
111
|
textToRead = localizedMessage;
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
114
|
+
const readHeadings = () => {
|
|
115
|
+
if (this.headingQueue.length > 0) {
|
|
116
|
+
const heading = this.headingQueue.shift()!; // Get the next heading
|
|
117
117
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
118
|
+
this.ttsManager?.readText(heading); // Read the heading
|
|
119
|
+
|
|
120
|
+
if (this.headingTimeout) {
|
|
121
|
+
clearTimeout(this.headingTimeout);
|
|
122
|
+
}
|
|
121
123
|
|
|
122
|
-
|
|
124
|
+
const pauseTime = this.calculateReadingTime(heading); // Calculate pause time based on the heading
|
|
123
125
|
|
|
124
|
-
|
|
126
|
+
// Set a timeout to read the next heading
|
|
127
|
+
this.headingTimeout = setTimeout(() => {
|
|
128
|
+
readHeadings(); // Call the function recursively to read the next heading
|
|
129
|
+
}, pauseTime);
|
|
130
|
+
} else {
|
|
131
|
+
// No more headings to read, read the main text
|
|
125
132
|
this.ttsManager?.readText(textToRead);
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
readHeadings(); // Start reading headings
|
|
130
137
|
|
|
131
138
|
this.announcements$.next({
|
|
132
139
|
message: textToRead,
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
import { subscriber } from "../../functionUtils";
|
|
14
14
|
import { coreLogger } from "../../logger";
|
|
15
15
|
import { ACTION } from "./utils/enums";
|
|
16
|
+
|
|
16
17
|
const logger = coreLogger.addSubsystem("focusManager");
|
|
17
18
|
|
|
18
19
|
const isFocusEnabled = (focusableItem): boolean => {
|
|
@@ -477,7 +478,7 @@ export const focusManager = (function () {
|
|
|
477
478
|
function isCurrentFocusOnTheTopScreen() {
|
|
478
479
|
const routes = R.pathOr([], ["root", "children"], focusableTree);
|
|
479
480
|
|
|
480
|
-
if (routes.length <= 1) {
|
|
481
|
+
if (currentFocusNode && routes.length <= 1) {
|
|
481
482
|
// there is only one or zero routes
|
|
482
483
|
return true;
|
|
483
484
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@applicaster/zapp-react-native-utils",
|
|
3
|
-
"version": "13.0.0-rc.
|
|
3
|
+
"version": "13.0.0-rc.23",
|
|
4
4
|
"description": "Applicaster Zapp React Native utilities package",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"homepage": "https://github.com/applicaster/quickbrick#readme",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@applicaster/applicaster-types": "13.0.0-rc.
|
|
31
|
+
"@applicaster/applicaster-types": "13.0.0-rc.23",
|
|
32
32
|
"buffer": "^5.2.1",
|
|
33
33
|
"camelize": "^1.0.0",
|
|
34
34
|
"create-react-context": "^0.2.3",
|