@umituz/react-native-ai-generation-content 1.17.37 → 1.17.39

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.17.37",
3
+ "version": "1.17.39",
4
4
  "description": "Provider-agnostic AI generation orchestration for React Native",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -0,0 +1,24 @@
1
+ /**
2
+ * AI Script Generator Types
3
+ */
4
+
5
+ export interface ScriptSection {
6
+ readonly id: string;
7
+ readonly type: "hook" | "intro" | "main" | "transition" | "cta";
8
+ readonly title: string;
9
+ readonly content: string;
10
+ readonly duration: number; // in seconds
11
+ readonly notes?: string;
12
+ }
13
+
14
+ export interface ScriptGenerationRequest {
15
+ readonly topic: string;
16
+ readonly videoType: string;
17
+ readonly duration: number;
18
+ readonly targetAudience?: string;
19
+ readonly keyPoints?: string;
20
+ }
21
+
22
+ export interface ScriptGenerationResponse {
23
+ readonly script: readonly ScriptSection[];
24
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./domain/types/script.types";
2
+ export * from "./presentation/components";
@@ -0,0 +1,159 @@
1
+ /**
2
+ * ScriptDisplay Component
3
+ * Generic display for AI-generated scripts with sections, durations and types.
4
+ */
5
+
6
+ import React from "react";
7
+ import { View, TouchableOpacity, StyleSheet } from "react-native";
8
+ import {
9
+ AtomicText,
10
+ AtomicIcon,
11
+ useAppDesignTokens,
12
+ } from "@umituz/react-native-design-system";
13
+ import type { ScriptSection } from "../domain/types/script.types";
14
+
15
+ export interface ScriptDisplayProps {
16
+ readonly script: readonly ScriptSection[];
17
+ readonly onUseScript: () => void;
18
+ readonly title?: string;
19
+ readonly useButtonText?: string;
20
+ }
21
+
22
+ export const ScriptDisplay: React.FC<ScriptDisplayProps> = ({
23
+ script,
24
+ onUseScript,
25
+ title = "Generated Script",
26
+ useButtonText = "Use This Script",
27
+ }) => {
28
+ const tokens = useAppDesignTokens();
29
+
30
+ return (
31
+ <View style={styles.container}>
32
+ <View style={styles.header}>
33
+ <AtomicText
34
+ type="bodyLarge"
35
+ style={[styles.headerTitle, { color: tokens.colors.textPrimary }]}
36
+ >
37
+ 📝 {title}
38
+ </AtomicText>
39
+ <TouchableOpacity onPress={onUseScript}>
40
+ <AtomicIcon name="Check" size="md" color="primary" />
41
+ </TouchableOpacity>
42
+ </View>
43
+
44
+ {script.map((section) => (
45
+ <View
46
+ key={section.id}
47
+ style={[
48
+ styles.section,
49
+ { backgroundColor: tokens.colors.surface },
50
+ ]}
51
+ >
52
+ <View style={styles.sectionHeader}>
53
+ <AtomicText
54
+ type="bodyMedium"
55
+ style={{ color: tokens.colors.primary, fontWeight: "600" }}
56
+ >
57
+ {section.title} ({section.duration}s)
58
+ </AtomicText>
59
+ <View
60
+ style={[
61
+ styles.badge,
62
+ { backgroundColor: tokens.colors.primary + "20" },
63
+ ]}
64
+ >
65
+ <AtomicText
66
+ type="labelSmall"
67
+ style={{ color: tokens.colors.primary }}
68
+ >
69
+ {section.type.toUpperCase()}
70
+ </AtomicText>
71
+ </View>
72
+ </View>
73
+ <AtomicText
74
+ type="bodySmall"
75
+ style={{
76
+ color: tokens.colors.textPrimary,
77
+ marginTop: 8,
78
+ lineHeight: 22,
79
+ }}
80
+ >
81
+ {section.content}
82
+ </AtomicText>
83
+ {section.notes && ( section.notes.length > 0) && (
84
+ <AtomicText
85
+ type="labelSmall"
86
+ style={{
87
+ color: tokens.colors.textSecondary,
88
+ marginTop: 8,
89
+ fontStyle: "italic",
90
+ }}
91
+ >
92
+ 💡 {section.notes}
93
+ </AtomicText>
94
+ )}
95
+ </View>
96
+ ))}
97
+
98
+ <TouchableOpacity
99
+ style={[
100
+ styles.useButton,
101
+ { backgroundColor: tokens.colors.primary },
102
+ ]}
103
+ onPress={onUseScript}
104
+ >
105
+ <AtomicIcon name="Check" size="md" color="onSurface" />
106
+ <AtomicText
107
+ type="bodyLarge"
108
+ style={styles.useButtonText}
109
+ >
110
+ {useButtonText}
111
+ </AtomicText>
112
+ </TouchableOpacity>
113
+ </View>
114
+ );
115
+ };
116
+
117
+ const styles = StyleSheet.create({
118
+ container: {
119
+ padding: 16,
120
+ width: "100%",
121
+ },
122
+ header: {
123
+ flexDirection: "row",
124
+ alignItems: "center",
125
+ justifyContent: "space-between",
126
+ marginBottom: 16,
127
+ },
128
+ headerTitle: {
129
+ fontWeight: "700",
130
+ },
131
+ section: {
132
+ padding: 16,
133
+ borderRadius: 12,
134
+ marginBottom: 12,
135
+ },
136
+ sectionHeader: {
137
+ flexDirection: "row",
138
+ alignItems: "center",
139
+ justifyContent: "space-between",
140
+ },
141
+ badge: {
142
+ paddingHorizontal: 8,
143
+ paddingVertical: 4,
144
+ borderRadius: 6,
145
+ },
146
+ useButton: {
147
+ flexDirection: "row",
148
+ alignItems: "center",
149
+ justifyContent: "center",
150
+ padding: 18,
151
+ borderRadius: 16,
152
+ marginTop: 16,
153
+ },
154
+ useButtonText: {
155
+ color: "#FFFFFF",
156
+ fontWeight: "700",
157
+ marginLeft: 12,
158
+ },
159
+ });
@@ -0,0 +1 @@
1
+ export * from "./ScriptDisplay";
package/src/index.ts CHANGED
@@ -281,7 +281,7 @@ export {
281
281
  // New Generic Sections
282
282
  AIGenerationProgressInline,
283
283
  PromptInput,
284
- HeroSection,
284
+ AIGenerationHero,
285
285
  // Buttons
286
286
  GenerateButton,
287
287
  // Display
@@ -325,7 +325,7 @@ export type {
325
325
  DualImagePickerProps,
326
326
  AIGenerationProgressInlineProps,
327
327
  PromptInputProps,
328
- HeroSectionProps,
328
+ AIGenerationHeroProps,
329
329
  // Buttons
330
330
  GenerateButtonProps,
331
331
  // Display
@@ -414,6 +414,8 @@ export * from "./features/replace-background";
414
414
  // =============================================================================
415
415
 
416
416
  export * from "./features/upscaling";
417
+ export * from "./features/script-generator";
418
+
417
419
 
418
420
  // =============================================================================
419
421
  // FEATURES - Photo Restoration
@@ -13,14 +13,14 @@ import {
13
13
  useAppDesignTokens,
14
14
  } from "@umituz/react-native-design-system";
15
15
 
16
- export interface HeroSectionProps {
16
+ export interface AIGenerationHeroProps {
17
17
  readonly title: string;
18
18
  readonly subtitle?: string;
19
19
  readonly iconName?: string;
20
20
  readonly gradientColors?: readonly [string, string, ...string[]];
21
21
  }
22
22
 
23
- export const HeroSection: React.FC<HeroSectionProps> = ({
23
+ export const AIGenerationHero: React.FC<AIGenerationHeroProps> = ({
24
24
  title,
25
25
  subtitle,
26
26
  iconName,
@@ -6,7 +6,7 @@ export { PendingJobProgressBar } from "./PendingJobProgressBar";
6
6
  export { PendingJobCardActions } from "./PendingJobCardActions";
7
7
  export { AIGenerationProgressInline } from "./AIGenerationProgressInline";
8
8
  export { PromptInput } from "./PromptInput";
9
- export { HeroSection } from "./HeroSection";
9
+ export { AIGenerationHero } from "./AIGenerationHero";
10
10
 
11
11
  export type {
12
12
  GenerationProgressModalProps,
@@ -25,7 +25,7 @@ export type { PendingJobProgressBarProps } from "./PendingJobProgressBar";
25
25
  export type { PendingJobCardActionsProps } from "./PendingJobCardActions";
26
26
  export type { AIGenerationProgressInlineProps } from "./AIGenerationProgressInline";
27
27
  export type { PromptInputProps } from "./PromptInput";
28
- export type { HeroSectionProps } from "./HeroSection";
28
+ export type { AIGenerationHeroProps } from "./AIGenerationHero";
29
29
 
30
30
  export * from "./result";
31
31
  export * from "./photo-step";