lovdacn 0.0.2 → 0.0.3

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 (123) hide show
  1. package/README.md +72 -106
  2. package/dist/index.d.ts +1 -0
  3. package/dist/index.js +224 -0
  4. package/package.json +37 -65
  5. package/templates/nativewind/.vscode/extensions.json +1 -0
  6. package/templates/nativewind/.vscode/settings.json +7 -0
  7. package/templates/nativewind/AGENTS.md +3 -0
  8. package/templates/nativewind/CLAUDE.md +1 -0
  9. package/{LICENSE → templates/nativewind/LICENSE} +21 -21
  10. package/templates/nativewind/README.md +56 -0
  11. package/templates/nativewind/app.json +43 -0
  12. package/templates/nativewind/assets/expo.icon/Assets/expo-symbol 2.svg +3 -0
  13. package/templates/nativewind/assets/expo.icon/Assets/grid.png +0 -0
  14. package/templates/nativewind/assets/expo.icon/icon.json +40 -0
  15. package/templates/nativewind/assets/images/android-icon-background.png +0 -0
  16. package/templates/nativewind/assets/images/android-icon-foreground.png +0 -0
  17. package/templates/nativewind/assets/images/android-icon-monochrome.png +0 -0
  18. package/templates/nativewind/assets/images/expo-badge-white.png +0 -0
  19. package/templates/nativewind/assets/images/expo-badge.png +0 -0
  20. package/templates/nativewind/assets/images/expo-logo.png +0 -0
  21. package/templates/nativewind/assets/images/favicon.png +0 -0
  22. package/templates/nativewind/assets/images/icon.png +0 -0
  23. package/templates/nativewind/assets/images/logo-glow.png +0 -0
  24. package/templates/nativewind/assets/images/react-logo.png +0 -0
  25. package/templates/nativewind/assets/images/react-logo@2x.png +0 -0
  26. package/templates/nativewind/assets/images/react-logo@3x.png +0 -0
  27. package/templates/nativewind/assets/images/splash-icon.png +0 -0
  28. package/templates/nativewind/assets/images/tabIcons/explore.png +0 -0
  29. package/templates/nativewind/assets/images/tabIcons/explore@2x.png +0 -0
  30. package/templates/nativewind/assets/images/tabIcons/explore@3x.png +0 -0
  31. package/templates/nativewind/assets/images/tabIcons/home.png +0 -0
  32. package/templates/nativewind/assets/images/tabIcons/home@2x.png +0 -0
  33. package/templates/nativewind/assets/images/tabIcons/home@3x.png +0 -0
  34. package/templates/nativewind/assets/images/tutorial-web.png +0 -0
  35. package/templates/nativewind/babel.config.js +9 -0
  36. package/templates/nativewind/expo-env.d.ts +3 -0
  37. package/templates/nativewind/lvcn.json +16 -0
  38. package/templates/nativewind/metro.config.js +6 -0
  39. package/templates/nativewind/nativewind-env.d.ts +3 -0
  40. package/templates/nativewind/package.json +55 -0
  41. package/templates/nativewind/postcss.config.js +6 -0
  42. package/templates/nativewind/scripts/reset-project.js +114 -0
  43. package/templates/nativewind/src/app/_layout.tsx +25 -0
  44. package/templates/nativewind/src/app/explore.tsx +180 -0
  45. package/templates/nativewind/src/app/index.tsx +12 -0
  46. package/templates/nativewind/src/components/animated-icon.module.css +6 -0
  47. package/templates/nativewind/src/components/animated-icon.tsx +148 -0
  48. package/templates/nativewind/src/components/animated-icon.web.tsx +108 -0
  49. package/templates/nativewind/src/components/app-tabs.tsx +32 -0
  50. package/templates/nativewind/src/components/app-tabs.web.tsx +115 -0
  51. package/templates/nativewind/src/components/external-link.tsx +25 -0
  52. package/templates/nativewind/src/components/hint-row.tsx +35 -0
  53. package/templates/nativewind/src/components/themed-text.tsx +73 -0
  54. package/templates/nativewind/src/components/themed-view.tsx +16 -0
  55. package/templates/nativewind/src/components/ui/button.tsx +106 -0
  56. package/templates/nativewind/src/components/ui/collapsible.tsx +65 -0
  57. package/templates/nativewind/src/components/ui/text.tsx +89 -0
  58. package/templates/nativewind/src/components/web-badge.tsx +43 -0
  59. package/templates/nativewind/src/constants/theme.ts +65 -0
  60. package/templates/nativewind/src/global.css +13 -0
  61. package/templates/nativewind/src/hooks/use-color-scheme.ts +1 -0
  62. package/templates/nativewind/src/hooks/use-color-scheme.web.ts +21 -0
  63. package/templates/nativewind/src/hooks/use-theme.ts +14 -0
  64. package/templates/nativewind/tailwind.config.js +86 -0
  65. package/templates/nativewind/tsconfig.json +21 -0
  66. package/templates/uniwind/.claude/settings.json +5 -0
  67. package/templates/uniwind/.vscode/extensions.json +1 -0
  68. package/templates/uniwind/.vscode/settings.json +7 -0
  69. package/templates/uniwind/AGENTS.md +3 -0
  70. package/templates/uniwind/CLAUDE.md +1 -0
  71. package/templates/uniwind/LICENSE +21 -0
  72. package/templates/uniwind/README.md +56 -0
  73. package/templates/uniwind/app.json +42 -0
  74. package/templates/uniwind/assets/expo.icon/Assets/expo-symbol 2.svg +3 -0
  75. package/templates/uniwind/assets/expo.icon/Assets/grid.png +0 -0
  76. package/templates/uniwind/assets/expo.icon/icon.json +40 -0
  77. package/templates/uniwind/assets/images/android-icon-background.png +0 -0
  78. package/templates/uniwind/assets/images/android-icon-foreground.png +0 -0
  79. package/templates/uniwind/assets/images/android-icon-monochrome.png +0 -0
  80. package/templates/uniwind/assets/images/expo-badge-white.png +0 -0
  81. package/templates/uniwind/assets/images/expo-badge.png +0 -0
  82. package/templates/uniwind/assets/images/expo-logo.png +0 -0
  83. package/templates/uniwind/assets/images/favicon.png +0 -0
  84. package/templates/uniwind/assets/images/icon.png +0 -0
  85. package/templates/uniwind/assets/images/logo-glow.png +0 -0
  86. package/templates/uniwind/assets/images/react-logo.png +0 -0
  87. package/templates/uniwind/assets/images/react-logo@2x.png +0 -0
  88. package/templates/uniwind/assets/images/react-logo@3x.png +0 -0
  89. package/templates/uniwind/assets/images/splash-icon.png +0 -0
  90. package/templates/uniwind/assets/images/tabIcons/explore.png +0 -0
  91. package/templates/uniwind/assets/images/tabIcons/explore@2x.png +0 -0
  92. package/templates/uniwind/assets/images/tabIcons/explore@3x.png +0 -0
  93. package/templates/uniwind/assets/images/tabIcons/home.png +0 -0
  94. package/templates/uniwind/assets/images/tabIcons/home@2x.png +0 -0
  95. package/templates/uniwind/assets/images/tabIcons/home@3x.png +0 -0
  96. package/templates/uniwind/assets/images/tutorial-web.png +0 -0
  97. package/templates/uniwind/expo-env.d.ts +3 -0
  98. package/templates/uniwind/lvcn.json +16 -0
  99. package/templates/uniwind/metro.config.js +14 -0
  100. package/templates/uniwind/package.json +46 -0
  101. package/templates/uniwind/scripts/reset-project.js +114 -0
  102. package/templates/uniwind/src/app/_layout.tsx +23 -0
  103. package/templates/uniwind/src/app/explore.tsx +180 -0
  104. package/templates/uniwind/src/app/index.tsx +98 -0
  105. package/templates/uniwind/src/components/animated-icon.module.css +6 -0
  106. package/templates/uniwind/src/components/animated-icon.tsx +148 -0
  107. package/templates/uniwind/src/components/animated-icon.web.tsx +108 -0
  108. package/templates/uniwind/src/components/app-tabs.tsx +32 -0
  109. package/templates/uniwind/src/components/app-tabs.web.tsx +115 -0
  110. package/templates/uniwind/src/components/external-link.tsx +25 -0
  111. package/templates/uniwind/src/components/hint-row.tsx +35 -0
  112. package/templates/uniwind/src/components/themed-text.tsx +73 -0
  113. package/templates/uniwind/src/components/themed-view.tsx +16 -0
  114. package/templates/uniwind/src/components/ui/collapsible.tsx +65 -0
  115. package/templates/uniwind/src/components/web-badge.tsx +43 -0
  116. package/templates/uniwind/src/constants/theme.ts +65 -0
  117. package/templates/uniwind/src/global.css +12 -0
  118. package/templates/uniwind/src/hooks/use-color-scheme.ts +1 -0
  119. package/templates/uniwind/src/hooks/use-color-scheme.web.ts +21 -0
  120. package/templates/uniwind/src/hooks/use-theme.ts +14 -0
  121. package/templates/uniwind/src/uniwind-types.d.ts +10 -0
  122. package/templates/uniwind/tsconfig.json +20 -0
  123. package/dist/bin.cjs +0 -59578
@@ -0,0 +1,65 @@
1
+ import { SymbolView } from 'expo-symbols';
2
+ import { PropsWithChildren, useState } from 'react';
3
+ import { Pressable, StyleSheet } from 'react-native';
4
+ import Animated, { FadeIn } from 'react-native-reanimated';
5
+
6
+ import { ThemedText } from '@/components/themed-text';
7
+ import { ThemedView } from '@/components/themed-view';
8
+ import { Spacing } from '@/constants/theme';
9
+ import { useTheme } from '@/hooks/use-theme';
10
+
11
+ export function Collapsible({ children, title }: PropsWithChildren & { title: string }) {
12
+ const [isOpen, setIsOpen] = useState(false);
13
+ const theme = useTheme();
14
+
15
+ return (
16
+ <ThemedView>
17
+ <Pressable
18
+ style={({ pressed }) => [styles.heading, pressed && styles.pressedHeading]}
19
+ onPress={() => setIsOpen((value) => !value)}>
20
+ <ThemedView type="backgroundElement" style={styles.button}>
21
+ <SymbolView
22
+ name={{ ios: 'chevron.right', android: 'chevron_right', web: 'chevron_right' }}
23
+ size={14}
24
+ weight="bold"
25
+ tintColor={theme.text}
26
+ style={{ transform: [{ rotate: isOpen ? '-90deg' : '90deg' }] }}
27
+ />
28
+ </ThemedView>
29
+
30
+ <ThemedText type="small">{title}</ThemedText>
31
+ </Pressable>
32
+ {isOpen && (
33
+ <Animated.View entering={FadeIn.duration(200)}>
34
+ <ThemedView type="backgroundElement" style={styles.content}>
35
+ {children}
36
+ </ThemedView>
37
+ </Animated.View>
38
+ )}
39
+ </ThemedView>
40
+ );
41
+ }
42
+
43
+ const styles = StyleSheet.create({
44
+ heading: {
45
+ flexDirection: 'row',
46
+ alignItems: 'center',
47
+ gap: Spacing.two,
48
+ },
49
+ pressedHeading: {
50
+ opacity: 0.7,
51
+ },
52
+ button: {
53
+ width: Spacing.four,
54
+ height: Spacing.four,
55
+ borderRadius: 12,
56
+ justifyContent: 'center',
57
+ alignItems: 'center',
58
+ },
59
+ content: {
60
+ marginTop: Spacing.three,
61
+ borderRadius: Spacing.three,
62
+ marginLeft: Spacing.four,
63
+ padding: Spacing.four,
64
+ },
65
+ });
@@ -0,0 +1,43 @@
1
+ import { version } from 'expo/package.json';
2
+ import { Image } from 'expo-image';
3
+ import { useColorScheme, StyleSheet } from 'react-native';
4
+
5
+ import { ThemedText } from './themed-text';
6
+ import { ThemedView } from './themed-view';
7
+
8
+ import { Spacing } from '@/constants/theme';
9
+
10
+ export function WebBadge() {
11
+ const scheme = useColorScheme();
12
+
13
+ return (
14
+ <ThemedView style={styles.container}>
15
+ <ThemedText type="code" themeColor="textSecondary" style={styles.versionText}>
16
+ v{version}
17
+ </ThemedText>
18
+ <Image
19
+ source={
20
+ scheme === 'dark'
21
+ ? require('@/assets/images/expo-badge-white.png')
22
+ : require('@/assets/images/expo-badge.png')
23
+ }
24
+ style={styles.badgeImage}
25
+ />
26
+ </ThemedView>
27
+ );
28
+ }
29
+
30
+ const styles = StyleSheet.create({
31
+ container: {
32
+ padding: Spacing.five,
33
+ alignItems: 'center',
34
+ gap: Spacing.two,
35
+ },
36
+ versionText: {
37
+ textAlign: 'center',
38
+ },
39
+ badgeImage: {
40
+ width: 123,
41
+ aspectRatio: 123 / 24,
42
+ },
43
+ });
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Below are the colors that are used in the app. The colors are defined in the light and dark mode.
3
+ * There are many other ways to style your app. For example, [Nativewind](https://www.nativewind.dev/), [Tamagui](https://tamagui.dev/), [unistyles](https://reactnativeunistyles.vercel.app), etc.
4
+ */
5
+
6
+ import '@/global.css';
7
+
8
+ import { Platform } from 'react-native';
9
+
10
+ export const Colors = {
11
+ light: {
12
+ text: '#000000',
13
+ background: '#ffffff',
14
+ backgroundElement: '#F0F0F3',
15
+ backgroundSelected: '#E0E1E6',
16
+ textSecondary: '#60646C',
17
+ },
18
+ dark: {
19
+ text: '#ffffff',
20
+ background: '#000000',
21
+ backgroundElement: '#212225',
22
+ backgroundSelected: '#2E3135',
23
+ textSecondary: '#B0B4BA',
24
+ },
25
+ } as const;
26
+
27
+ export type ThemeColor = keyof typeof Colors.light & keyof typeof Colors.dark;
28
+
29
+ export const Fonts = Platform.select({
30
+ ios: {
31
+ /** iOS `UIFontDescriptorSystemDesignDefault` */
32
+ sans: 'system-ui',
33
+ /** iOS `UIFontDescriptorSystemDesignSerif` */
34
+ serif: 'ui-serif',
35
+ /** iOS `UIFontDescriptorSystemDesignRounded` */
36
+ rounded: 'ui-rounded',
37
+ /** iOS `UIFontDescriptorSystemDesignMonospaced` */
38
+ mono: 'ui-monospace',
39
+ },
40
+ default: {
41
+ sans: 'normal',
42
+ serif: 'serif',
43
+ rounded: 'normal',
44
+ mono: 'monospace',
45
+ },
46
+ web: {
47
+ sans: 'var(--font-display)',
48
+ serif: 'var(--font-serif)',
49
+ rounded: 'var(--font-rounded)',
50
+ mono: 'var(--font-mono)',
51
+ },
52
+ });
53
+
54
+ export const Spacing = {
55
+ half: 2,
56
+ one: 4,
57
+ two: 8,
58
+ three: 16,
59
+ four: 24,
60
+ five: 32,
61
+ six: 64,
62
+ } as const;
63
+
64
+ export const BottomTabInset = Platform.select({ ios: 50, android: 80 }) ?? 0;
65
+ export const MaxContentWidth = 800;
@@ -0,0 +1,12 @@
1
+ @import "tailwindcss";
2
+ @import "uniwind";
3
+
4
+ :root {
5
+ --font-display:
6
+ Spline Sans, Inter, ui-sans-serif, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji,
7
+ Segoe UI Symbol, Noto Color Emoji;
8
+ --font-mono:
9
+ ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace;
10
+ --font-rounded: 'SF Pro Rounded', 'Hiragino Maru Gothic ProN', Meiryo, 'MS PGothic', sans-serif;
11
+ --font-serif: Georgia, 'Times New Roman', serif;
12
+ }
@@ -0,0 +1 @@
1
+ export { useColorScheme } from 'react-native';
@@ -0,0 +1,21 @@
1
+ import { useEffect, useState } from 'react';
2
+ import { useColorScheme as useRNColorScheme } from 'react-native';
3
+
4
+ /**
5
+ * To support static rendering, this value needs to be re-calculated on the client side for web
6
+ */
7
+ export function useColorScheme() {
8
+ const [hasHydrated, setHasHydrated] = useState(false);
9
+
10
+ useEffect(() => {
11
+ setHasHydrated(true);
12
+ }, []);
13
+
14
+ const colorScheme = useRNColorScheme();
15
+
16
+ if (hasHydrated) {
17
+ return colorScheme;
18
+ }
19
+
20
+ return 'light';
21
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Learn more about light and dark modes:
3
+ * https://docs.expo.dev/guides/color-schemes/
4
+ */
5
+
6
+ import { Colors } from '@/constants/theme';
7
+ import { useColorScheme } from '@/hooks/use-color-scheme';
8
+
9
+ export function useTheme() {
10
+ const scheme = useColorScheme();
11
+ const theme = scheme === 'unspecified' ? 'light' : scheme;
12
+
13
+ return Colors[theme];
14
+ }
@@ -0,0 +1,10 @@
1
+ // NOTE: This file is generated by uniwind and it should not be edited manually.
2
+ /// <reference types="uniwind/types" />
3
+
4
+ declare module 'uniwind' {
5
+ export interface UniwindConfig {
6
+ themes: readonly ['light', 'dark']
7
+ }
8
+ }
9
+
10
+ export {}
@@ -0,0 +1,20 @@
1
+ {
2
+ "extends": "expo/tsconfig.base",
3
+ "compilerOptions": {
4
+ "strict": true,
5
+ "paths": {
6
+ "@/*": [
7
+ "./src/*"
8
+ ],
9
+ "@/assets/*": [
10
+ "./assets/*"
11
+ ]
12
+ }
13
+ },
14
+ "include": [
15
+ "**/*.ts",
16
+ "**/*.tsx",
17
+ ".expo/types/**/*.ts",
18
+ "expo-env.d.ts"
19
+ ]
20
+ }