@umituz/react-native-settings 4.20.58 → 4.20.60

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.
Files changed (68) hide show
  1. package/.github/ISSUE_TEMPLATE/bug_report.md +51 -0
  2. package/.github/ISSUE_TEMPLATE/documentation.md +52 -0
  3. package/.github/ISSUE_TEMPLATE/feature_request.md +63 -0
  4. package/.github/PULL_REQUEST_TEMPLATE.md +84 -0
  5. package/AI_AGENT_GUIDELINES.md +367 -0
  6. package/ARCHITECTURE.md +246 -0
  7. package/CHANGELOG.md +67 -0
  8. package/CODE_OF_CONDUCT.md +75 -0
  9. package/CONTRIBUTING.md +107 -0
  10. package/DOCUMENTATION_MIGRATION.md +319 -0
  11. package/DOCUMENTATION_TEMPLATE.md +155 -0
  12. package/LICENSE +21 -0
  13. package/README.md +321 -498
  14. package/SECURITY.md +98 -0
  15. package/SETTINGS_SCREEN_GUIDE.md +185 -0
  16. package/TESTING.md +358 -0
  17. package/package.json +13 -2
  18. package/src/application/README.md +85 -271
  19. package/src/domains/about/README.md +85 -440
  20. package/src/domains/about/presentation/hooks/README.md +93 -348
  21. package/src/domains/appearance/README.md +95 -584
  22. package/src/domains/appearance/hooks/README.md +95 -303
  23. package/src/domains/appearance/infrastructure/services/README.md +83 -397
  24. package/src/domains/appearance/presentation/components/README.md +95 -489
  25. package/src/domains/cloud-sync/README.md +73 -439
  26. package/src/domains/cloud-sync/presentation/components/README.md +95 -493
  27. package/src/domains/dev/README.md +71 -457
  28. package/src/domains/disclaimer/README.md +77 -411
  29. package/src/domains/disclaimer/presentation/components/README.md +95 -392
  30. package/src/domains/faqs/README.md +86 -574
  31. package/src/domains/feedback/README.md +79 -553
  32. package/src/domains/feedback/presentation/hooks/README.md +93 -426
  33. package/src/domains/legal/README.md +88 -537
  34. package/src/domains/rating/README.md +73 -440
  35. package/src/domains/rating/presentation/components/README.md +95 -475
  36. package/src/domains/video-tutorials/README.md +77 -470
  37. package/src/domains/video-tutorials/presentation/components/README.md +95 -431
  38. package/src/infrastructure/README.md +78 -425
  39. package/src/infrastructure/repositories/README.md +88 -420
  40. package/src/infrastructure/services/README.md +74 -460
  41. package/src/presentation/components/README.md +97 -480
  42. package/src/presentation/components/SettingsErrorBoundary/README.md +48 -436
  43. package/src/presentation/components/SettingsFooter/README.md +48 -427
  44. package/src/presentation/components/SettingsItemCard/README.md +152 -391
  45. package/src/presentation/components/SettingsItemCard/STRATEGY.md +164 -0
  46. package/src/presentation/components/SettingsSection/README.md +47 -401
  47. package/src/presentation/hooks/README.md +95 -389
  48. package/src/presentation/hooks/mutations/README.md +99 -376
  49. package/src/presentation/hooks/queries/README.md +111 -353
  50. package/src/presentation/navigation/README.md +70 -502
  51. package/src/presentation/navigation/SettingsStackNavigator.tsx +2 -0
  52. package/src/presentation/navigation/components/README.md +70 -295
  53. package/src/presentation/navigation/components/wrappers/SettingsScreenWrapper.tsx +3 -0
  54. package/src/presentation/navigation/hooks/README.md +75 -367
  55. package/src/presentation/navigation/types.ts +1 -0
  56. package/src/presentation/navigation/utils/README.md +100 -380
  57. package/src/presentation/screens/README.md +53 -504
  58. package/src/presentation/screens/SettingsScreen.tsx +4 -2
  59. package/src/presentation/screens/components/SettingsContent/README.md +53 -382
  60. package/src/presentation/screens/components/SettingsHeader/README.md +48 -303
  61. package/src/presentation/screens/components/sections/CustomSettingsList/README.md +47 -359
  62. package/src/presentation/screens/components/sections/FeatureSettingsSection/README.md +81 -176
  63. package/src/presentation/screens/components/sections/IdentitySettingsSection/README.md +40 -297
  64. package/src/presentation/screens/components/sections/ProfileSectionLoader/README.md +47 -451
  65. package/src/presentation/screens/components/sections/SupportSettingsSection/README.md +45 -361
  66. package/src/presentation/screens/hooks/README.md +64 -354
  67. package/src/presentation/screens/types/README.md +79 -409
  68. package/src/presentation/screens/utils/README.md +65 -255
@@ -1,433 +1,97 @@
1
1
  # Video Tutorials Components
2
2
 
3
- Components for displaying video tutorials including cards, sections, and the main tutorials screen.
4
-
5
- ## Components
6
-
7
- ### VideoTutorialCard
8
-
9
- Card component for displaying individual video tutorials with thumbnails, titles, and metadata.
10
-
11
- ```tsx
12
- import { VideoTutorialCard } from '@umituz/react-native-settings';
13
-
14
- function TutorialsList() {
15
- const tutorial = {
16
- id: '1',
17
- title: 'Getting Started with Settings',
18
- description: 'Learn how to configure your app settings',
19
- thumbnail: 'https://example.com/thumb.jpg',
20
- duration: '5:30',
21
- views: 1234,
22
- };
23
-
24
- return (
25
- <VideoTutorialCard
26
- tutorial={tutorial}
27
- onPress={() => playTutorial(tutorial.id)}
28
- />
29
- );
30
- }
31
- ```
32
-
33
- #### Props
34
-
35
- | Prop | Type | Default | Description |
36
- |------|------|---------|-------------|
37
- | `tutorial` | `VideoTutorial` | **Required** | Tutorial data object |
38
- | `onPress` | `() => void` | `undefined` | Press handler |
39
- | `showDuration` | `boolean` | `true` | Show video duration |
40
- | `showViews` | `boolean` | `true` | Show view count |
41
- | `style` | `ViewStyle` | `undefined` | Custom container style |
42
-
43
- #### Example
44
-
45
- ```tsx
46
- <VideoTutorialCard
47
- tutorial={{
48
- id: '1',
49
- title: 'Advanced Settings',
50
- description: 'Deep dive into settings configuration',
51
- thumbnail: 'https://example.com/thumb.jpg',
52
- duration: '10:15',
53
- views: 5678,
54
- publishedAt: new Date('2024-01-01'),
55
- }}
56
- onPress={() => navigation.navigate('VideoPlayer', { tutorialId: '1' })}
57
- showDuration={true}
58
- showViews={true}
59
- />
60
- ```
61
-
62
- ### VideoTutorialSection
63
-
64
- Section component for grouping related video tutorials with a header.
65
-
66
- ```tsx
67
- import { VideoTutorialSection } from '@umituz/react-native-settings';
68
-
69
- function FeaturedSection() {
70
- const tutorials = [
71
- { id: '1', title: 'Tutorial 1', thumbnail: '...' },
72
- { id: '2', title: 'Tutorial 2', thumbnail: '...' },
73
- ];
74
-
75
- return (
76
- <VideoTutorialSection
77
- title="Featured Tutorials"
78
- tutorials={tutorials}
79
- horizontal={true}
80
- onTutorialPress={(tutorial) => playTutorial(tutorial)}
81
- />
82
- );
83
- }
84
- ```
85
-
86
- #### Props
87
-
88
- | Prop | Type | Default | Description |
89
- |------|------|---------|-------------|
90
- | `title` | `string` | **Required** | Section title |
91
- | `tutorials` | `VideoTutorial[]` | **Required** | Array of tutorials |
92
- | `horizontal` | `boolean` | `false` | Horizontal scroll |
93
- | `onTutorialPress` | `(tutorial: VideoTutorial) => void` | `undefined` | Press handler |
94
- | `style` | `ViewStyle` | `undefined` | Custom container style |
95
-
96
- #### Example
97
-
98
- ```tsx
99
- <VideoTutorialSection
100
- title="Getting Started"
101
- tutorials={gettingStartedTutorials}
102
- horizontal={true}
103
- onTutorialPress={(tutorial) => {
104
- Analytics.track('tutorial_opened', { id: tutorial.id });
105
- navigation.navigate('VideoPlayer', { tutorial });
106
- }}
107
- />
108
- ```
109
-
110
- ### VideoTutorialsScreen
111
-
112
- Main screen component for browsing all video tutorials with search and categories.
113
-
114
- ```tsx
115
- import { VideoTutorialsScreen } from '@umituz/react-native-settings';
116
-
117
- function TutorialsScreen() {
118
- return (
119
- <VideoTutorialsScreen
120
- categories={tutorialCategories}
121
- tutorials={allTutorials}
122
- featuredTutorials={featuredTutorials}
123
- onTutorialPress={handleTutorialPress}
124
- />
125
- );
126
- }
127
- ```
128
-
129
- #### Props
130
-
131
- | Prop | Type | Default | Description |
132
- |------|------|---------|-------------|
133
- | `categories` | `TutorialCategory[]` | `[]` | Tutorial categories |
134
- | `tutorials` | `VideoTutorial[]` | `[]` | All tutorials |
135
- | `featuredTutorials` | `VideoTutorial[]` | `[]` | Featured tutorials |
136
- | `onTutorialPress` | `(tutorial: VideoTutorial) => void` | **Required** | Press handler |
137
- | `showSearch` | `boolean` | `true` | Show search bar |
138
- | `showFeatured` | `boolean` | `true` | Show featured section |
139
-
140
- #### Example
141
-
142
- ```tsx
143
- <VideoTutorialsScreen
144
- categories={[
145
- { id: 'getting-started', title: 'Getting Started', count: 5 },
146
- { id: 'advanced', title: 'Advanced', count: 8 },
147
- ]}
148
- tutorials={allTutorials}
149
- featuredTutorials={[tutorial1, tutorial2, tutorial3]}
150
- onTutorialPress={(tutorial) => {
151
- navigation.navigate('VideoPlayer', { tutorialId: tutorial.id });
152
- }}
153
- showSearch={true}
154
- showFeatured={true}
155
- />
156
- ```
157
-
158
- ## Data Types
159
-
160
- ### VideoTutorial
161
-
162
- ```typescript
163
- interface VideoTutorial {
164
- id: string;
165
- title: string;
166
- description?: string;
167
- thumbnail: string;
168
- duration?: string; // e.g., "5:30"
169
- views?: number;
170
- publishedAt?: Date;
171
- categoryId?: string;
172
- url?: string; // Video URL
173
- isExternal?: boolean; // Open in external app
174
- }
175
- ```
176
-
177
- ### TutorialCategory
178
-
179
- ```typescript
180
- interface TutorialCategory {
181
- id: string;
182
- title: string;
183
- description?: string;
184
- thumbnail?: string;
185
- count?: number; // Number of tutorials in category
186
- }
187
- ```
188
-
189
- ## Examples
190
-
191
- ### Basic Tutorial Card
192
-
193
- ```tsx
194
- <VideoTutorialCard
195
- tutorial={{
196
- id: '1',
197
- title: 'Introduction to Settings',
198
- thumbnail: 'https://example.com/thumb1.jpg',
199
- }}
200
- onPress={() => console.log('Pressed')}
201
- />
202
- ```
203
-
204
- ### Detailed Tutorial Card
205
-
206
- ```tsx
207
- <VideoTutorialCard
208
- tutorial={{
209
- id: '2',
210
- title: 'Advanced Configuration',
211
- description: 'Learn advanced settings options',
212
- thumbnail: 'https://example.com/thumb2.jpg',
213
- duration: '12:45',
214
- views: 3456,
215
- publishedAt: new Date('2024-01-15'),
216
- }}
217
- onPress={() => playTutorial('2')}
218
- showDuration={true}
219
- showViews={true}
220
- />
221
- ```
222
-
223
- ### Horizontal Section
224
-
225
- ```tsx
226
- <VideoTutorialSection
227
- title="Featured"
228
- tutorials={featuredTutorials}
229
- horizontal={true}
230
- onTutorialPress={(tutorial) => {
231
- navigation.navigate('VideoPlayer', { tutorialId: tutorial.id });
232
- }}
233
- />
234
- ```
235
-
236
- ### Vertical Section
237
-
238
- ```tsx
239
- <VideoTutorialSection
240
- title="All Tutorials"
241
- tutorials={allTutorials}
242
- horizontal={false}
243
- onTutorialPress={(tutorial) => {
244
- navigation.navigate('VideoPlayer', { tutorialId: tutorial.id });
245
- }}
246
- />
247
- ```
248
-
249
- ### Complete Screen
250
-
251
- ```tsx
252
- function TutorialsScreenWrapper() {
253
- const [searchQuery, setSearchQuery] = useState('');
254
- const [selectedCategory, setSelectedCategory] = useState<string | null>(null);
255
-
256
- const filteredTutorials = useMemo(() => {
257
- return allTutorials.filter(tutorial => {
258
- const matchesSearch = tutorial.title.toLowerCase().includes(searchQuery.toLowerCase());
259
- const matchesCategory = !selectedCategory || tutorial.categoryId === selectedCategory;
260
- return matchesSearch && matchesCategory;
261
- });
262
- }, [searchQuery, selectedCategory]);
263
-
264
- return (
265
- <VideoTutorialsScreen
266
- categories={categories}
267
- tutorials={filteredTutorials}
268
- featuredTutorials={featuredTutorials}
269
- onTutorialPress={handleTutorialPress}
270
- showSearch={true}
271
- showFeatured={true}
272
- />
273
- );
274
- }
275
- ```
276
-
277
- ### External Videos
278
-
279
- ```tsx
280
- <VideoTutorialCard
281
- tutorial={{
282
- id: 'yt-1',
283
- title: 'Video Tutorial on YouTube',
284
- thumbnail: 'https://img.youtube.com/vi/VIDEO_ID/maxresdefault.jpg',
285
- duration: '8:20',
286
- url: 'https://youtube.com/watch?v=VIDEO_ID',
287
- isExternal: true,
288
- }}
289
- onPress={(tutorial) => {
290
- if (tutorial.isExternal && tutorial.url) {
291
- Linking.openURL(tutorial.url);
292
- }
293
- }}
294
- />
295
- ```
296
-
297
- ## Styling
298
-
299
- ### Card Styles
300
-
301
- ```tsx
302
- <VideoTutorialCard
303
- tutorial={tutorial}
304
- style={{
305
- width: 280,
306
- marginHorizontal: 8,
307
- borderRadius: 12,
308
- overflow: 'hidden',
309
- }}
310
- />
311
- ```
312
-
313
- ### Thumbnail Styles
314
-
315
- Thumbnails are displayed with aspect ratio preserved:
316
-
317
- ```tsx
318
- <Image
319
- source={{ uri: tutorial.thumbnail }}
320
- style={{
321
- width: '100%',
322
- aspectRatio: 16 / 9,
323
- backgroundColor: '#f0f0f0',
324
- }}
325
- />
326
- ```
327
-
328
- ### Overlay Information
329
-
330
- Duration and views are overlaid on the thumbnail:
331
-
332
- ```tsx
333
- <View style={styles.overlay}>
334
- <View style={styles.duration}>
335
- <Text style={styles.durationText}>{tutorial.duration}</Text>
336
- </View>
337
- <View style={styles.views}>
338
- <Ionicons name="eye-outline" size={14} color="white" />
339
- <Text style={styles.viewsText}>{formatViews(tutorial.views)}</Text>
340
- </View>
341
- </View>
342
- ```
343
-
344
- ## Loading States
345
-
346
- ### Skeleton Loading
347
-
348
- ```tsx
349
- function TutorialCardSkeleton() {
350
- return (
351
- <View style={styles.skeleton}>
352
- <View style={styles.thumbnailSkeleton} />
353
- <View style={styles.titleSkeleton} />
354
- <View style={styles.descriptionSkeleton} />
355
- </View>
356
- );
357
- }
358
-
359
- function TutorialsList() {
360
- const { data, isLoading } = useTutorials();
361
-
362
- if (isLoading) {
363
- return (
364
- <ScrollView horizontal>
365
- <TutorialCardSkeleton />
366
- <TutorialCardSkeleton />
367
- <TutorialCardSkeleton />
368
- </ScrollView>
369
- );
370
- }
371
-
372
- return (
373
- <VideoTutorialSection
374
- title="Tutorials"
375
- tutorials={data}
376
- horizontal={true}
377
- />
378
- );
379
- }
380
- ```
381
-
382
- ## Empty States
383
-
384
- ### No Tutorials
385
-
386
- ```tsx
387
- function EmptyTutorials() {
388
- return (
389
- <View style={styles.emptyContainer}>
390
- <Ionicons name="videocam-outline" size={64} color="#ccc" />
391
- <Text style={styles.emptyTitle}>No Tutorials</Text>
392
- <Text style={styles.emptyMessage}>
393
- Check back later for new tutorials
394
- </Text>
395
- </View>
396
- );
397
- }
398
- ```
399
-
400
- ### No Search Results
401
-
402
- ```tsx
403
- function NoSearchResults({ query }) {
404
- return (
405
- <View style={styles.emptyContainer}>
406
- <Ionicons name="search-outline" size={64} color="#ccc" />
407
- <Text style={styles.emptyTitle}>No Results</Text>
408
- <Text style={styles.emptyMessage}>
409
- No tutorials found for "{query}"
410
- </Text>
411
- </View>
412
- );
413
- }
414
- ```
415
-
416
- ## Best Practices
417
-
418
- 1. **Thumbnails**: Use high-quality thumbnails (16:9 aspect ratio)
419
- 2. **Duration**: Always show video duration
420
- 3. **Metadata**: Include views and publish date
421
- 4. **External**: Mark external videos clearly
422
- 5. **Loading**: Show skeleton loaders while loading
423
- 6. **Empty**: Provide meaningful empty states
424
- 7. **Accessibility**: Add proper accessibility labels
425
-
426
- ## Related
427
-
428
- - **Video Tutorials Domain**: Video tutorials domain documentation
429
- - **VideoTutorialsScreen**: Main screen component
430
-
431
- ## License
432
-
433
- MIT
3
+ ## Purpose
4
+
5
+ Components for displaying video tutorials including cards, sections, and the main tutorials screen. Provides a complete video learning experience within the app with search, categories, and playback capabilities.
6
+
7
+ ## File Paths
8
+
9
+ - **VideoTutorialCard**: `/Users/umituz/Desktop/github/umituz/apps/artificial_intelligence/npm-packages/react-native-settings/src/domains/video-tutorials/presentation/components/VideoTutorialCard.tsx`
10
+ - **VideoTutorialSection**: `/Users/umituz/Desktop/github/umituz/apps/artificial_intelligence/npm-packages/react-native-settings/src/domains/video-tutorials/presentation/components/VideoTutorialSection.tsx`
11
+ - **VideoTutorialsScreen**: `/Users/umituz/Desktop/github/umituz/apps/artificial_intelligence/npm-packages/react-native-settings/src/domains/video-tutorials/presentation/screens/VideoTutorialsScreen.tsx`
12
+ - **Tutorial Components**: `/Users/umituz/Desktop/github/umituz/apps/artificial_intelligence/npm-packages/react-native-settings/src/domains/video-tutorials/presentation/components/`
13
+
14
+ ## Strategy
15
+
16
+ 1. **Visual Discovery**: Uses thumbnail-based card layouts to make tutorials visually appealing and discoverable. Horizontal scrolling sections allow users to quickly browse many tutorials without deep navigation.
17
+
18
+ 2. **Metadata Display**: Shows key metadata (duration, view count, publish date) to help users assess tutorial relevance and time commitment before watching.
19
+
20
+ 3. **Organized Structure**: Groups tutorials into categories and sections, making it easy for users to find relevant content based on their skill level or specific interests.
21
+
22
+ 4. **Search and Filter**: Includes search functionality to help users quickly find specific tutorials, with real-time filtering as they type.
23
+
24
+ 5. **Flexible Playback**: Supports both embedded video players and external video apps (YouTube, Vimeo) to accommodate different content hosting strategies.
25
+
26
+ ## Restrictions
27
+
28
+ ### ❌ DO NOT
29
+
30
+ - Use low-quality or blurry thumbnails
31
+ - Hide important tutorial metadata
32
+ - Mix horizontal and vertical layouts inconsistently
33
+ - Auto-play videos without user consent
34
+ - Show excessive ads or interruptions
35
+
36
+ ### ❌ NEVER
37
+
38
+ - Display broken or unavailable videos
39
+ - Use incorrect thumbnail URLs
40
+ - Mix aspect ratios (always use 16:9)
41
+ - Allow simultaneous video playback
42
+ - Bypass content rating or age restrictions
43
+
44
+ ### ❌ AVOID
45
+
46
+ - Overly long tutorial titles (truncate if necessary)
47
+ - Cluttered layouts with too much information
48
+ - Slow thumbnail loading without placeholders
49
+ - Difficult category navigation
50
+ - Missing or incomplete tutorial descriptions
51
+
52
+ ## Rules
53
+
54
+ ### ALWAYS
55
+
56
+ - Use high-quality thumbnails with 16:9 aspect ratio
57
+ - Display video duration prominently
58
+ - Show view counts for social proof
59
+ - Organize tutorials into logical categories
60
+ - Provide search functionality
61
+
62
+ ### ✅ MUST
63
+
64
+ - Handle video loading errors gracefully
65
+ - Show placeholder while thumbnails load
66
+ - Support both embedded and external videos
67
+ - Mark external videos clearly
68
+ - Track tutorial views for analytics
69
+
70
+ ### SHOULD
71
+
72
+ - Implement skeleton loading states
73
+ - Show featured tutorials prominently
74
+ - Use horizontal scroll for categories
75
+ - Filter by category or search
76
+ - Show tutorial progress/completion
77
+ - Support offline viewing when possible
78
+
79
+ ## AI Agent Guidelines
80
+
81
+ 1. **Thumbnail Quality**: Always use high-quality thumbnail images (recommended resolution 1280x720px). Implement lazy loading and show skeleton screens while thumbnails load. Use placeholder colors or gradients if thumbnails fail to load.
82
+
83
+ 2. **Metadata Display**: Show duration on all tutorial cards to help users decide if they have time to watch. Display view counts to provide social proof and indicate popularity. Include publish date for time-sensitive content.
84
+
85
+ 3. **Layout Strategy**: Use horizontal scrolling sections for featured tutorials and categories to maximize content density. Use vertical lists for comprehensive tutorial browsing. Maintain consistent card widths (280-320px) for horizontal sections.
86
+
87
+ 4. **External Videos**: Mark videos that open in external apps (YouTube, Vimeo) with clear indicators. Handle deep linking properly to ensure videos open in the user's preferred app. Test on both iOS and Android as video handling differs.
88
+
89
+ 5. **Empty States**: Provide meaningful empty states when no tutorials are available or search returns no results. Use friendly illustrations and helpful text. Include call-to-action buttons to browse all tutorials or contact support.
90
+
91
+ ## Reference
92
+
93
+ - **Card Component**: `/Users/umituz/Desktop/github/umituz/apps/artificial_intelligence/npm-packages/react-native-settings/src/domains/video-tutorials/presentation/components/VideoTutorialCard.tsx`
94
+ - **Section Component**: `/Users/umituz/Desktop/github/umituz/apps/artificial_intelligence/npm-packages/react-native-settings/src/domains/video-tutorials/presentation/components/VideoTutorialSection.tsx`
95
+ - **Main Screen**: `/Users/umituz/Desktop/github/umituz/apps/artificial_intelligence/npm-packages/react-native-settings/src/domains/video-tutorials/presentation/screens/VideoTutorialsScreen.tsx`
96
+ - **Tutorial Components**: `/Users/umituz/Desktop/github/umituz/apps/artificial_intelligence/npm-packages/react-native-settings/src/domains/video-tutorials/presentation/components/`
97
+ - **Video Player**: Check for video player implementation for playback functionality