@umituz/react-native-ai-generation-content 1.11.4 → 1.11.6
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/package.json +1 -1
- package/src/infrastructure/services/job-poller.service.ts +1 -1
- package/src/presentation/components/GenerationProgressBar.tsx +3 -3
- package/src/presentation/components/GenerationProgressContent.tsx +8 -8
- package/src/presentation/components/PendingJobCard.tsx +7 -7
- package/src/presentation/components/PendingJobCardActions.tsx +4 -4
package/package.json
CHANGED
|
@@ -70,7 +70,7 @@ export async function pollJob<T = unknown>(
|
|
|
70
70
|
// Wait for polling interval (skip first attempt)
|
|
71
71
|
if (attempt > 0) {
|
|
72
72
|
const interval = calculatePollingInterval({ attempt, config: pollingConfig });
|
|
73
|
-
await new Promise((resolve) => setTimeout(resolve, interval));
|
|
73
|
+
await new Promise<void>((resolve) => setTimeout(() => resolve(), interval));
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
try {
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import React from "react";
|
|
7
|
-
import { View, StyleSheet
|
|
8
|
-
import { useAppDesignTokens } from "@umituz/react-native-design-system";
|
|
7
|
+
import { AtomicText, View, StyleSheet } from "react-native";
|
|
8
|
+
import { AtomicText, useAppDesignTokens } AtomicText } from "@umituz/react-native-design-system";
|
|
9
9
|
|
|
10
10
|
export interface GenerationProgressBarProps {
|
|
11
11
|
progress: number;
|
|
@@ -48,7 +48,7 @@ export const GenerationProgressBar: React.FC<GenerationProgressBarProps> = ({
|
|
|
48
48
|
]}
|
|
49
49
|
>
|
|
50
50
|
{Math.round(clampedProgress)}%
|
|
51
|
-
</
|
|
51
|
+
</AtomicText>
|
|
52
52
|
</View>
|
|
53
53
|
);
|
|
54
54
|
};
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import React from "react";
|
|
7
|
-
import {
|
|
8
|
-
import { useAppDesignTokens } from "@umituz/react-native-design-system";
|
|
9
|
-
import { GenerationProgressBar } from "./GenerationProgressBar";
|
|
7
|
+
import { AtomicText, View, TouchableOpacity, StyleSheet } from "react-native";
|
|
8
|
+
import { AtomicText, useAppDesignTokens } AtomicText } from "@umituz/react-native-design-system";
|
|
9
|
+
import { AtomicText, GenerationProgressBar } from "./GenerationProgressBar";
|
|
10
10
|
|
|
11
11
|
export interface GenerationProgressContentProps {
|
|
12
12
|
progress: number;
|
|
@@ -45,13 +45,13 @@ export const GenerationProgressContent: React.FC<
|
|
|
45
45
|
return (
|
|
46
46
|
<View style={[styles.modal, { backgroundColor: activeBgColor }]}>
|
|
47
47
|
{title && (
|
|
48
|
-
<
|
|
48
|
+
<AtomicText type="bodyMedium" style={[styles.title, { color: activeTextColor }]}>{title}</AtomicText>
|
|
49
49
|
)}
|
|
50
50
|
|
|
51
51
|
{message && (
|
|
52
|
-
<
|
|
52
|
+
<AtomicText type="bodyMedium" style={[styles.message, { color: activeTextColor }]}>
|
|
53
53
|
{message}
|
|
54
|
-
</
|
|
54
|
+
</AtomicText>
|
|
55
55
|
)}
|
|
56
56
|
|
|
57
57
|
<GenerationProgressBar
|
|
@@ -62,7 +62,7 @@ export const GenerationProgressContent: React.FC<
|
|
|
62
62
|
/>
|
|
63
63
|
|
|
64
64
|
{hint && (
|
|
65
|
-
<
|
|
65
|
+
<AtomicText type="bodyMedium" style={[styles.hint, { color: activeTextColor }]}>{hint}</AtomicText>
|
|
66
66
|
)}
|
|
67
67
|
|
|
68
68
|
{onDismiss && (
|
|
@@ -73,7 +73,7 @@ export const GenerationProgressContent: React.FC<
|
|
|
73
73
|
]}
|
|
74
74
|
onPress={onDismiss}
|
|
75
75
|
>
|
|
76
|
-
<
|
|
76
|
+
<AtomicText type="bodyMedium" style={styles.dismissText}>{dismissLabel || "OK"}</AtomicText>
|
|
77
77
|
</TouchableOpacity>
|
|
78
78
|
)}
|
|
79
79
|
</View>
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import React from "react";
|
|
7
|
-
import {
|
|
8
|
-
import { useAppDesignTokens } from "@umituz/react-native-design-system";
|
|
7
|
+
import { AtomicText, View, ActivityIndicator, StyleSheet } from "react-native";
|
|
8
|
+
import { AtomicText, useAppDesignTokens } AtomicText } from "@umituz/react-native-design-system";
|
|
9
9
|
import type { BackgroundJob } from "../../domain/entities/job.types";
|
|
10
|
-
import { PendingJobProgressBar } from "./PendingJobProgressBar";
|
|
11
|
-
import { PendingJobCardActions } from "./PendingJobCardActions";
|
|
10
|
+
import { AtomicText, PendingJobProgressBar } from "./PendingJobProgressBar";
|
|
11
|
+
import { AtomicText, PendingJobCardActions } from "./PendingJobCardActions";
|
|
12
12
|
|
|
13
13
|
export interface StatusLabels {
|
|
14
14
|
readonly queued?: string;
|
|
@@ -106,10 +106,10 @@ export function PendingJobCard<TInput = unknown, TResult = unknown>({
|
|
|
106
106
|
)}
|
|
107
107
|
<View style={styles.content}>
|
|
108
108
|
<View>
|
|
109
|
-
{typeLabel && <
|
|
110
|
-
<
|
|
109
|
+
{typeLabel && <AtomicText type="bodyMedium" style={styles.typeText}>{typeLabel}</AtomicText>}
|
|
110
|
+
<AtomicText type="bodyMedium" style={styles.statusText} numberOfLines={1}>
|
|
111
111
|
{statusText}
|
|
112
|
-
</
|
|
112
|
+
</AtomicText>
|
|
113
113
|
{!isFailed && <PendingJobProgressBar progress={job.progress} />}
|
|
114
114
|
</View>
|
|
115
115
|
{renderActions ? (
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import React from "react";
|
|
7
|
-
import { View, TouchableOpacity,
|
|
8
|
-
import { useAppDesignTokens } from "@umituz/react-native-design-system";
|
|
7
|
+
import { AtomicText, View, TouchableOpacity, StyleSheet } from "react-native";
|
|
8
|
+
import { AtomicText, useAppDesignTokens } AtomicText } from "@umituz/react-native-design-system";
|
|
9
9
|
|
|
10
10
|
export interface PendingJobCardActionsProps {
|
|
11
11
|
id: string;
|
|
@@ -57,7 +57,7 @@ export const PendingJobCardActions: React.FC<PendingJobCardActionsProps> = ({
|
|
|
57
57
|
style={styles.actionButton}
|
|
58
58
|
onPress={() => onRetry(id)}
|
|
59
59
|
>
|
|
60
|
-
<
|
|
60
|
+
<AtomicText type="bodyMedium" style={styles.text}>↻</AtomicText>
|
|
61
61
|
</TouchableOpacity>
|
|
62
62
|
)}
|
|
63
63
|
{onCancel && (
|
|
@@ -65,7 +65,7 @@ export const PendingJobCardActions: React.FC<PendingJobCardActionsProps> = ({
|
|
|
65
65
|
style={styles.actionButton}
|
|
66
66
|
onPress={() => onCancel(id)}
|
|
67
67
|
>
|
|
68
|
-
<
|
|
68
|
+
<AtomicText type="bodyMedium" style={styles.errorText}>✕</AtomicText>
|
|
69
69
|
</TouchableOpacity>
|
|
70
70
|
)}
|
|
71
71
|
</View>
|