@umituz/react-native-ai-generation-content 1.20.40 → 1.20.41
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-ai-generation-content",
|
|
3
|
-
"version": "1.20.
|
|
3
|
+
"version": "1.20.41",
|
|
4
4
|
"description": "Provider-agnostic AI generation orchestration for React Native with result preview components",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"types": "src/index.ts",
|
|
@@ -25,31 +25,8 @@ export interface PartnerConfig {
|
|
|
25
25
|
readonly maxNameLength?: number;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
/** Category Data - App provides */
|
|
29
|
-
export interface CategoryData {
|
|
30
|
-
readonly id: string;
|
|
31
|
-
readonly titleKey: string;
|
|
32
|
-
readonly descriptionKey?: string;
|
|
33
|
-
readonly icon: string;
|
|
34
|
-
readonly imageUrl?: string;
|
|
35
|
-
readonly subcategories?: readonly CategoryData[];
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/** Scenario Data - App provides */
|
|
39
|
-
export interface ScenarioData {
|
|
40
|
-
readonly id: string;
|
|
41
|
-
readonly categoryId?: string;
|
|
42
|
-
readonly titleKey: string;
|
|
43
|
-
readonly descriptionKey: string;
|
|
44
|
-
readonly icon: string;
|
|
45
|
-
readonly imageUrl?: string;
|
|
46
|
-
readonly previewImageUrl?: string;
|
|
47
|
-
readonly aiPrompt: string;
|
|
48
|
-
readonly storyTemplate?: string;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
28
|
/** Visual Style Option */
|
|
52
|
-
export interface
|
|
29
|
+
export interface FlowVisualStyleData {
|
|
53
30
|
readonly id: string;
|
|
54
31
|
readonly icon: string;
|
|
55
32
|
readonly labelKey: string;
|
|
@@ -57,7 +34,7 @@ export interface VisualStyleData {
|
|
|
57
34
|
}
|
|
58
35
|
|
|
59
36
|
/** Uploaded Image Data */
|
|
60
|
-
export interface
|
|
37
|
+
export interface FlowUploadedImageData {
|
|
61
38
|
readonly uri: string;
|
|
62
39
|
readonly base64: string;
|
|
63
40
|
readonly mimeType: string;
|
|
@@ -88,9 +65,9 @@ export interface FlowState {
|
|
|
88
65
|
readonly currentStepId: string;
|
|
89
66
|
readonly currentStepIndex: number;
|
|
90
67
|
readonly completedSteps: readonly string[];
|
|
91
|
-
readonly selectedCategory?:
|
|
92
|
-
readonly selectedScenario?:
|
|
93
|
-
readonly partners: Record<string,
|
|
68
|
+
readonly selectedCategory?: unknown;
|
|
69
|
+
readonly selectedScenario?: unknown;
|
|
70
|
+
readonly partners: Record<string, FlowUploadedImageData | undefined>;
|
|
94
71
|
readonly partnerNames: Record<string, string>;
|
|
95
72
|
readonly textInput?: string;
|
|
96
73
|
readonly visualStyle?: string;
|
|
@@ -107,9 +84,9 @@ export interface FlowActions {
|
|
|
107
84
|
goToStep: (stepId: string) => void;
|
|
108
85
|
nextStep: () => void;
|
|
109
86
|
previousStep: () => void;
|
|
110
|
-
setCategory: (category:
|
|
111
|
-
setScenario: (scenario:
|
|
112
|
-
setPartnerImage: (partnerId: string, image:
|
|
87
|
+
setCategory: (category: unknown) => void;
|
|
88
|
+
setScenario: (scenario: unknown) => void;
|
|
89
|
+
setPartnerImage: (partnerId: string, image: FlowUploadedImageData | undefined) => void;
|
|
113
90
|
setPartnerName: (partnerId: string, name: string) => void;
|
|
114
91
|
setTextInput: (text: string) => void;
|
|
115
92
|
setVisualStyle: (styleId: string) => void;
|
|
@@ -148,9 +125,9 @@ export interface FlowCallbacks {
|
|
|
148
125
|
|
|
149
126
|
/** Flow Data Provider - App provides data */
|
|
150
127
|
export interface FlowDataProvider {
|
|
151
|
-
readonly categories?: readonly
|
|
152
|
-
readonly scenarios?: readonly
|
|
153
|
-
readonly visualStyles?: readonly
|
|
128
|
+
readonly categories?: readonly unknown[];
|
|
129
|
+
readonly scenarios?: readonly unknown[];
|
|
130
|
+
readonly visualStyles?: readonly FlowVisualStyleData[];
|
|
154
131
|
readonly surprisePrompts?: readonly string[];
|
|
155
132
|
}
|
|
156
133
|
|
package/src/index.ts
CHANGED
|
@@ -210,9 +210,7 @@ export type {
|
|
|
210
210
|
StepComponentProps,
|
|
211
211
|
StepTransition,
|
|
212
212
|
PartnerConfig,
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
VisualStyleData,
|
|
216
|
-
UploadedImageData,
|
|
213
|
+
FlowVisualStyleData,
|
|
214
|
+
FlowUploadedImageData,
|
|
217
215
|
FlowGenerationStatus,
|
|
218
216
|
} from "./domain/entities/flow-config.types";
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import { useRef, useCallback, useMemo } from "react";
|
|
7
7
|
import { createFlowStore, type FlowStoreType } from "./useFlowStore";
|
|
8
|
-
import type { FlowState, FlowActions, StepDefinition } from "../../domain/entities/flow-config.types";
|
|
8
|
+
import type { FlowState, FlowActions, StepDefinition, FlowUploadedImageData } from "../../domain/entities/flow-config.types";
|
|
9
9
|
|
|
10
10
|
interface UseFlowConfig {
|
|
11
11
|
steps: readonly StepDefinition[];
|
|
@@ -20,7 +20,7 @@ interface UseFlowReturn extends FlowState, FlowActions {
|
|
|
20
20
|
isFirstStep: boolean;
|
|
21
21
|
isLastStep: boolean;
|
|
22
22
|
hasPartner: (partnerId: string) => boolean;
|
|
23
|
-
getPartnerImage: (partnerId: string) =>
|
|
23
|
+
getPartnerImage: (partnerId: string) => FlowUploadedImageData | undefined;
|
|
24
24
|
getPartnerName: (partnerId: string) => string;
|
|
25
25
|
}
|
|
26
26
|
|
|
@@ -7,9 +7,7 @@ import { createStore } from "@umituz/react-native-design-system";
|
|
|
7
7
|
import type {
|
|
8
8
|
FlowState,
|
|
9
9
|
FlowActions,
|
|
10
|
-
|
|
11
|
-
ScenarioData,
|
|
12
|
-
UploadedImageData,
|
|
10
|
+
FlowUploadedImageData,
|
|
13
11
|
StepDefinition,
|
|
14
12
|
} from "../../domain/entities/flow-config.types";
|
|
15
13
|
|
|
@@ -84,10 +82,10 @@ export const createFlowStore = (config: FlowStoreConfig) => {
|
|
|
84
82
|
}
|
|
85
83
|
},
|
|
86
84
|
|
|
87
|
-
setCategory: (category:
|
|
88
|
-
setScenario: (scenario:
|
|
85
|
+
setCategory: (category: unknown) => set({ selectedCategory: category }),
|
|
86
|
+
setScenario: (scenario: unknown) => set({ selectedScenario: scenario }),
|
|
89
87
|
|
|
90
|
-
setPartnerImage: (partnerId: string, image:
|
|
88
|
+
setPartnerImage: (partnerId: string, image: FlowUploadedImageData | undefined) => {
|
|
91
89
|
const { partners } = get();
|
|
92
90
|
set({ partners: { ...partners, [partnerId]: image } });
|
|
93
91
|
},
|