@coze-arch/cli 0.0.1-alpha.035e0e

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 (156) hide show
  1. package/README.md +142 -0
  2. package/bin/main +2 -0
  3. package/lib/__templates__/expo/.coze +12 -0
  4. package/lib/__templates__/expo/.cozeproj/scripts/dev_build.sh +46 -0
  5. package/lib/__templates__/expo/.cozeproj/scripts/dev_run.sh +220 -0
  6. package/lib/__templates__/expo/.cozeproj/scripts/prod_build.sh +47 -0
  7. package/lib/__templates__/expo/.cozeproj/scripts/prod_run.sh +34 -0
  8. package/lib/__templates__/expo/.cozeproj/scripts/server_dev_run.sh +45 -0
  9. package/lib/__templates__/expo/README.md +72 -0
  10. package/lib/__templates__/expo/_gitignore +11 -0
  11. package/lib/__templates__/expo/_npmrc +20 -0
  12. package/lib/__templates__/expo/client/app/_layout.tsx +33 -0
  13. package/lib/__templates__/expo/client/app/demo.tsx +1 -0
  14. package/lib/__templates__/expo/client/app/index.tsx +1 -0
  15. package/lib/__templates__/expo/client/app.config.ts +75 -0
  16. package/lib/__templates__/expo/client/assets/fonts/SpaceMono-Regular.ttf +0 -0
  17. package/lib/__templates__/expo/client/assets/images/adaptive-icon.png +0 -0
  18. package/lib/__templates__/expo/client/assets/images/default-avatar.png +0 -0
  19. package/lib/__templates__/expo/client/assets/images/favicon.png +0 -0
  20. package/lib/__templates__/expo/client/assets/images/icon.png +0 -0
  21. package/lib/__templates__/expo/client/assets/images/partial-react-logo.png +0 -0
  22. package/lib/__templates__/expo/client/assets/images/react-logo.png +0 -0
  23. package/lib/__templates__/expo/client/assets/images/react-logo@2x.png +0 -0
  24. package/lib/__templates__/expo/client/assets/images/react-logo@3x.png +0 -0
  25. package/lib/__templates__/expo/client/assets/images/splash-icon.png +0 -0
  26. package/lib/__templates__/expo/client/components/Screen.tsx +330 -0
  27. package/lib/__templates__/expo/client/components/SmartDateInput.tsx +238 -0
  28. package/lib/__templates__/expo/client/components/ThemedText.tsx +33 -0
  29. package/lib/__templates__/expo/client/components/ThemedView.tsx +38 -0
  30. package/lib/__templates__/expo/client/constants/theme.ts +854 -0
  31. package/lib/__templates__/expo/client/contexts/AuthContext.tsx +49 -0
  32. package/lib/__templates__/expo/client/declarations.d.ts +5 -0
  33. package/lib/__templates__/expo/client/eslint-formatter-simple.mjs +49 -0
  34. package/lib/__templates__/expo/client/eslint.config.mjs +98 -0
  35. package/lib/__templates__/expo/client/hooks/useColorScheme.ts +34 -0
  36. package/lib/__templates__/expo/client/hooks/useTheme.ts +13 -0
  37. package/lib/__templates__/expo/client/metro.config.js +121 -0
  38. package/lib/__templates__/expo/client/package.json +93 -0
  39. package/lib/__templates__/expo/client/screens/demo/index.tsx +25 -0
  40. package/lib/__templates__/expo/client/screens/demo/styles.ts +28 -0
  41. package/lib/__templates__/expo/client/scripts/install-missing-deps.js +104 -0
  42. package/lib/__templates__/expo/client/tsconfig.json +24 -0
  43. package/lib/__templates__/expo/client/utils/index.ts +54 -0
  44. package/lib/__templates__/expo/package.json +22 -0
  45. package/lib/__templates__/expo/pnpm-lock.yaml +13975 -0
  46. package/lib/__templates__/expo/pnpm-workspace.yaml +3 -0
  47. package/lib/__templates__/expo/server/package.json +32 -0
  48. package/lib/__templates__/expo/server/src/index.ts +18 -0
  49. package/lib/__templates__/expo/server/tsconfig.json +24 -0
  50. package/lib/__templates__/expo/template.config.js +50 -0
  51. package/lib/__templates__/expo/tsconfig.json +1 -0
  52. package/lib/__templates__/nextjs/.coze +12 -0
  53. package/lib/__templates__/nextjs/README.md +358 -0
  54. package/lib/__templates__/nextjs/_gitignore +99 -0
  55. package/lib/__templates__/nextjs/_npmrc +23 -0
  56. package/lib/__templates__/nextjs/components.json +21 -0
  57. package/lib/__templates__/nextjs/eslint.config.mjs +18 -0
  58. package/lib/__templates__/nextjs/next-env.d.ts +6 -0
  59. package/lib/__templates__/nextjs/next.config.ts +19 -0
  60. package/lib/__templates__/nextjs/package.json +86 -0
  61. package/lib/__templates__/nextjs/pnpm-lock.yaml +10493 -0
  62. package/lib/__templates__/nextjs/postcss.config.mjs +7 -0
  63. package/lib/__templates__/nextjs/public/file.svg +1 -0
  64. package/lib/__templates__/nextjs/public/globe.svg +1 -0
  65. package/lib/__templates__/nextjs/public/next.svg +1 -0
  66. package/lib/__templates__/nextjs/public/vercel.svg +1 -0
  67. package/lib/__templates__/nextjs/public/window.svg +1 -0
  68. package/lib/__templates__/nextjs/scripts/build.sh +14 -0
  69. package/lib/__templates__/nextjs/scripts/dev.sh +33 -0
  70. package/lib/__templates__/nextjs/scripts/prepare.sh +9 -0
  71. package/lib/__templates__/nextjs/scripts/start.sh +15 -0
  72. package/lib/__templates__/nextjs/src/app/favicon.ico +0 -0
  73. package/lib/__templates__/nextjs/src/app/globals.css +137 -0
  74. package/lib/__templates__/nextjs/src/app/layout.tsx +72 -0
  75. package/lib/__templates__/nextjs/src/app/page.tsx +78 -0
  76. package/lib/__templates__/nextjs/src/app/robots.ts +11 -0
  77. package/lib/__templates__/nextjs/src/components/ui/accordion.tsx +66 -0
  78. package/lib/__templates__/nextjs/src/components/ui/alert-dialog.tsx +157 -0
  79. package/lib/__templates__/nextjs/src/components/ui/alert.tsx +66 -0
  80. package/lib/__templates__/nextjs/src/components/ui/aspect-ratio.tsx +11 -0
  81. package/lib/__templates__/nextjs/src/components/ui/avatar.tsx +53 -0
  82. package/lib/__templates__/nextjs/src/components/ui/badge.tsx +46 -0
  83. package/lib/__templates__/nextjs/src/components/ui/breadcrumb.tsx +109 -0
  84. package/lib/__templates__/nextjs/src/components/ui/button-group.tsx +83 -0
  85. package/lib/__templates__/nextjs/src/components/ui/button.tsx +62 -0
  86. package/lib/__templates__/nextjs/src/components/ui/calendar.tsx +220 -0
  87. package/lib/__templates__/nextjs/src/components/ui/card.tsx +92 -0
  88. package/lib/__templates__/nextjs/src/components/ui/carousel.tsx +241 -0
  89. package/lib/__templates__/nextjs/src/components/ui/chart.tsx +357 -0
  90. package/lib/__templates__/nextjs/src/components/ui/checkbox.tsx +32 -0
  91. package/lib/__templates__/nextjs/src/components/ui/collapsible.tsx +33 -0
  92. package/lib/__templates__/nextjs/src/components/ui/command.tsx +184 -0
  93. package/lib/__templates__/nextjs/src/components/ui/context-menu.tsx +252 -0
  94. package/lib/__templates__/nextjs/src/components/ui/dialog.tsx +143 -0
  95. package/lib/__templates__/nextjs/src/components/ui/drawer.tsx +135 -0
  96. package/lib/__templates__/nextjs/src/components/ui/dropdown-menu.tsx +257 -0
  97. package/lib/__templates__/nextjs/src/components/ui/empty.tsx +104 -0
  98. package/lib/__templates__/nextjs/src/components/ui/field.tsx +248 -0
  99. package/lib/__templates__/nextjs/src/components/ui/form.tsx +167 -0
  100. package/lib/__templates__/nextjs/src/components/ui/hover-card.tsx +44 -0
  101. package/lib/__templates__/nextjs/src/components/ui/input-group.tsx +170 -0
  102. package/lib/__templates__/nextjs/src/components/ui/input-otp.tsx +77 -0
  103. package/lib/__templates__/nextjs/src/components/ui/input.tsx +21 -0
  104. package/lib/__templates__/nextjs/src/components/ui/item.tsx +193 -0
  105. package/lib/__templates__/nextjs/src/components/ui/kbd.tsx +28 -0
  106. package/lib/__templates__/nextjs/src/components/ui/label.tsx +24 -0
  107. package/lib/__templates__/nextjs/src/components/ui/menubar.tsx +276 -0
  108. package/lib/__templates__/nextjs/src/components/ui/navigation-menu.tsx +168 -0
  109. package/lib/__templates__/nextjs/src/components/ui/pagination.tsx +127 -0
  110. package/lib/__templates__/nextjs/src/components/ui/popover.tsx +48 -0
  111. package/lib/__templates__/nextjs/src/components/ui/progress.tsx +31 -0
  112. package/lib/__templates__/nextjs/src/components/ui/radio-group.tsx +45 -0
  113. package/lib/__templates__/nextjs/src/components/ui/resizable.tsx +63 -0
  114. package/lib/__templates__/nextjs/src/components/ui/scroll-area.tsx +58 -0
  115. package/lib/__templates__/nextjs/src/components/ui/select.tsx +190 -0
  116. package/lib/__templates__/nextjs/src/components/ui/separator.tsx +28 -0
  117. package/lib/__templates__/nextjs/src/components/ui/sheet.tsx +139 -0
  118. package/lib/__templates__/nextjs/src/components/ui/sidebar.tsx +724 -0
  119. package/lib/__templates__/nextjs/src/components/ui/skeleton.tsx +13 -0
  120. package/lib/__templates__/nextjs/src/components/ui/slider.tsx +63 -0
  121. package/lib/__templates__/nextjs/src/components/ui/sonner.tsx +40 -0
  122. package/lib/__templates__/nextjs/src/components/ui/spinner.tsx +16 -0
  123. package/lib/__templates__/nextjs/src/components/ui/switch.tsx +31 -0
  124. package/lib/__templates__/nextjs/src/components/ui/table.tsx +116 -0
  125. package/lib/__templates__/nextjs/src/components/ui/tabs.tsx +66 -0
  126. package/lib/__templates__/nextjs/src/components/ui/textarea.tsx +18 -0
  127. package/lib/__templates__/nextjs/src/components/ui/toggle-group.tsx +83 -0
  128. package/lib/__templates__/nextjs/src/components/ui/toggle.tsx +47 -0
  129. package/lib/__templates__/nextjs/src/components/ui/tooltip.tsx +61 -0
  130. package/lib/__templates__/nextjs/src/hooks/use-mobile.ts +19 -0
  131. package/lib/__templates__/nextjs/src/lib/utils.ts +6 -0
  132. package/lib/__templates__/nextjs/template.config.js +85 -0
  133. package/lib/__templates__/nextjs/tsconfig.json +34 -0
  134. package/lib/__templates__/templates.json +87 -0
  135. package/lib/__templates__/vite/.coze +12 -0
  136. package/lib/__templates__/vite/README.md +239 -0
  137. package/lib/__templates__/vite/_gitignore +66 -0
  138. package/lib/__templates__/vite/_npmrc +23 -0
  139. package/lib/__templates__/vite/eslint.config.mjs +9 -0
  140. package/lib/__templates__/vite/index.html +13 -0
  141. package/lib/__templates__/vite/package.json +28 -0
  142. package/lib/__templates__/vite/pnpm-lock.yaml +4716 -0
  143. package/lib/__templates__/vite/postcss.config.js +6 -0
  144. package/lib/__templates__/vite/scripts/build.sh +14 -0
  145. package/lib/__templates__/vite/scripts/dev.sh +32 -0
  146. package/lib/__templates__/vite/scripts/prepare.sh +9 -0
  147. package/lib/__templates__/vite/scripts/start.sh +15 -0
  148. package/lib/__templates__/vite/src/index.css +21 -0
  149. package/lib/__templates__/vite/src/index.ts +5 -0
  150. package/lib/__templates__/vite/src/main.ts +64 -0
  151. package/lib/__templates__/vite/tailwind.config.js +9 -0
  152. package/lib/__templates__/vite/template.config.js +90 -0
  153. package/lib/__templates__/vite/tsconfig.json +16 -0
  154. package/lib/__templates__/vite/vite.config.ts +15 -0
  155. package/lib/cli.js +1916 -0
  156. package/package.json +77 -0
@@ -0,0 +1,854 @@
1
+ import { Platform, StyleSheet } from "react-native";
2
+
3
+ export const Colors = {
4
+ light: {
5
+ textPrimary: "#1C1917",
6
+ textSecondary: "#78716c",
7
+ textMuted: "#9CA3AF",
8
+ textDisabled: "#D1D5DB",
9
+ placeholder: "#9CA3AF",
10
+ tabIconDefault: "#9CA3AF",
11
+ tabIconSelected: "#1C1917",
12
+ primary: "#1C1917",
13
+ accent: "#000000",
14
+ link: "#1C1917",
15
+ success: "#16A34A",
16
+ warning: "#F59E0B",
17
+ error: "#DC2626",
18
+ info: "#2563EB",
19
+ backgroundRoot: "#FFF",
20
+ backgroundDefault: "#F9FAFB",
21
+ backgroundSecondary: "#F3F4F6",
22
+ backgroundTertiary: "#E5E7EB",
23
+ border: "#E5E7EB",
24
+ borderLight: "#F3F4F6",
25
+ divider: "#F3F4F6",
26
+ overlay: "rgba(0, 0, 0, 0.4)",
27
+ chartBackground: "rgba(249, 250, 251, 0.5)",
28
+ buttonPrimaryBackground: "#1C1917",
29
+ buttonPrimaryText: "#FFFFFF",
30
+ buttonSecondaryBackground: "#F3F4F6",
31
+ buttonSecondaryText: "#1C1917",
32
+ },
33
+ dark: {
34
+ textPrimary: "#FAFAF9",
35
+ textSecondary: "#A8A29E",
36
+ textMuted: "#6F767E",
37
+ textDisabled: "#4A4D50",
38
+ placeholder: "#6F767E",
39
+ tabIconDefault: "#6F767E",
40
+ tabIconSelected: "#FAFAF9",
41
+ primary: "#FAFAF9",
42
+ accent: "#FFFFFF",
43
+ link: "#FAFAF9",
44
+ success: "#30D158",
45
+ warning: "#FF9F0A",
46
+ error: "#FF453A",
47
+ info: "#64D2FF",
48
+ backgroundRoot: "#0C0A09",
49
+ backgroundDefault: "#1C1C1E",
50
+ backgroundSecondary: "#2C2C2E",
51
+ backgroundTertiary: "#3A3A3C",
52
+ border: "#3A3A3C",
53
+ borderLight: "#2C2C2E",
54
+ divider: "#2C2C2E",
55
+ overlay: "rgba(0, 0, 0, 0.6)",
56
+ chartBackground: "rgba(28, 28, 30, 0.5)",
57
+ buttonPrimaryBackground: "#FAFAF9",
58
+ buttonPrimaryText: "#0C0A09",
59
+ buttonSecondaryBackground: "#2C2C2E",
60
+ buttonSecondaryText: "#FAFAF9",
61
+ },
62
+ };
63
+
64
+ export const Spacing = {
65
+ xs: 4,
66
+ sm: 8,
67
+ md: 12,
68
+ lg: 16,
69
+ xl: 20,
70
+ "2xl": 24,
71
+ "3xl": 32,
72
+ "4xl": 40,
73
+ "5xl": 48,
74
+ "6xl": 64,
75
+ inputHeight: 48,
76
+ buttonHeight: 48,
77
+ avatarSize: 40,
78
+ iconButtonSize: 32,
79
+ contentPaddingHorizontal: 32,
80
+ sectionGap: 40,
81
+ sectionGapLarge: 48,
82
+ itemGap: 8,
83
+ detailGap: 48,
84
+ chartHeight: 128,
85
+ };
86
+
87
+ export const BorderRadius = {
88
+ xs: 4,
89
+ sm: 8,
90
+ md: 12,
91
+ lg: 16,
92
+ xl: 20,
93
+ "2xl": 24,
94
+ "3xl": 40,
95
+ full: 9999,
96
+ };
97
+
98
+ export const Typography = {
99
+ display: {
100
+ fontSize: 112,
101
+ lineHeight: 112,
102
+ fontWeight: "200" as const,
103
+ letterSpacing: -4,
104
+ },
105
+ displayLarge: {
106
+ fontSize: 112,
107
+ lineHeight: 112,
108
+ fontWeight: "200" as const,
109
+ letterSpacing: -2,
110
+ },
111
+ displayMedium: {
112
+ fontSize: 48,
113
+ lineHeight: 56,
114
+ fontWeight: "200" as const,
115
+ },
116
+ h1: {
117
+ fontSize: 32,
118
+ lineHeight: 40,
119
+ fontWeight: "700" as const,
120
+ },
121
+ h2: {
122
+ fontSize: 28,
123
+ lineHeight: 36,
124
+ fontWeight: "700" as const,
125
+ },
126
+ h3: {
127
+ fontSize: 24,
128
+ lineHeight: 32,
129
+ fontWeight: "300" as const,
130
+ },
131
+ h4: {
132
+ fontSize: 20,
133
+ lineHeight: 28,
134
+ fontWeight: "600" as const,
135
+ },
136
+ title: {
137
+ fontSize: 18,
138
+ lineHeight: 24,
139
+ fontWeight: "700" as const,
140
+ },
141
+ body: {
142
+ fontSize: 16,
143
+ lineHeight: 24,
144
+ fontWeight: "400" as const,
145
+ },
146
+ bodyMedium: {
147
+ fontSize: 16,
148
+ lineHeight: 24,
149
+ fontWeight: "500" as const,
150
+ },
151
+ small: {
152
+ fontSize: 14,
153
+ lineHeight: 20,
154
+ fontWeight: "400" as const,
155
+ },
156
+ smallMedium: {
157
+ fontSize: 14,
158
+ lineHeight: 20,
159
+ fontWeight: "500" as const,
160
+ },
161
+ caption: {
162
+ fontSize: 12,
163
+ lineHeight: 16,
164
+ fontWeight: "400" as const,
165
+ },
166
+ captionMedium: {
167
+ fontSize: 12,
168
+ lineHeight: 16,
169
+ fontWeight: "500" as const,
170
+ },
171
+ label: {
172
+ fontSize: 14,
173
+ lineHeight: 20,
174
+ fontWeight: "500" as const,
175
+ letterSpacing: 2,
176
+ textTransform: "uppercase" as const,
177
+ },
178
+ labelSmall: {
179
+ fontSize: 12,
180
+ lineHeight: 16,
181
+ fontWeight: "500" as const,
182
+ letterSpacing: 1,
183
+ textTransform: "uppercase" as const,
184
+ },
185
+ labelTitle: {
186
+ fontSize: 14,
187
+ lineHeight: 20,
188
+ fontWeight: "700" as const,
189
+ letterSpacing: 2,
190
+ textTransform: "uppercase" as const,
191
+ },
192
+ link: {
193
+ fontSize: 16,
194
+ lineHeight: 24,
195
+ fontWeight: "400" as const,
196
+ },
197
+ stat: {
198
+ fontSize: 30,
199
+ lineHeight: 36,
200
+ fontWeight: "300" as const,
201
+ },
202
+ tiny: {
203
+ fontSize: 10,
204
+ lineHeight: 14,
205
+ fontWeight: "400" as const,
206
+ },
207
+ navLabel: {
208
+ fontSize: 10,
209
+ lineHeight: 14,
210
+ fontWeight: "500" as const,
211
+ },
212
+ };
213
+
214
+ export const Fonts = Platform.select({
215
+ ios: {
216
+ sans: "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",
217
+ },
218
+ android: {
219
+ sans: "Roboto, 'Segoe UI', Helvetica, Arial, sans-serif",
220
+ },
221
+ default: {
222
+ sans: "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",
223
+ },
224
+ });
225
+
226
+ export const Shadow = {
227
+ none: {},
228
+ minimal: Platform.select({
229
+ ios: { shadowColor: "#000", shadowOffset: { width: 0, height: 1 }, shadowOpacity: 0.05, shadowRadius: 2 },
230
+ android: { elevation: 1 },
231
+ default: {},
232
+ }),
233
+ sm: Platform.select({
234
+ ios: { shadowColor: "#000", shadowOffset: { width: 0, height: 1 }, shadowOpacity: 0.05, shadowRadius: 2 },
235
+ android: { elevation: 1 },
236
+ default: {},
237
+ }),
238
+ md: Platform.select({
239
+ ios: { shadowColor: "#000", shadowOffset: { width: 0, height: 2 }, shadowOpacity: 0.1, shadowRadius: 4 },
240
+ android: { elevation: 3 },
241
+ default: {},
242
+ }),
243
+ lg: Platform.select({
244
+ ios: { shadowColor: "#000", shadowOffset: { width: 0, height: 4 }, shadowOpacity: 0.15, shadowRadius: 8 },
245
+ android: { elevation: 6 },
246
+ default: {},
247
+ }),
248
+ island: Platform.select({
249
+ ios: { shadowColor: "#000", shadowOffset: { width: 0, height: 4 }, shadowOpacity: 0.1, shadowRadius: 20 },
250
+ android: { elevation: 8 },
251
+ default: {},
252
+ }),
253
+ };
254
+
255
+ export const Duration = {
256
+ fast: 150,
257
+ normal: 250,
258
+ slow: 400,
259
+ };
260
+
261
+ export const ZIndex = {
262
+ base: 0,
263
+ dropdown: 100,
264
+ sticky: 200,
265
+ modal: 300,
266
+ toast: 400,
267
+ overlay: 500,
268
+ };
269
+
270
+ export type Theme = typeof Colors.light;
271
+
272
+ export const CommonStyles = StyleSheet.create({
273
+ container: {
274
+ flex: 1,
275
+ },
276
+ scrollContent: {
277
+ paddingHorizontal: Spacing.contentPaddingHorizontal,
278
+ },
279
+ centerContent: {
280
+ justifyContent: "center",
281
+ alignItems: "center",
282
+ },
283
+ row: {
284
+ flexDirection: "row",
285
+ alignItems: "center",
286
+ },
287
+ rowGap: {
288
+ flexDirection: "row",
289
+ alignItems: "center",
290
+ gap: Spacing.sm,
291
+ },
292
+ rowBetween: {
293
+ flexDirection: "row",
294
+ justifyContent: "space-between",
295
+ alignItems: "center",
296
+ },
297
+ rowBetweenEnd: {
298
+ flexDirection: "row",
299
+ justifyContent: "space-between",
300
+ alignItems: "flex-end",
301
+ },
302
+ rowBetweenStart: {
303
+ flexDirection: "row",
304
+ justifyContent: "space-between",
305
+ alignItems: "flex-start",
306
+ },
307
+ rowCenter: {
308
+ flexDirection: "row",
309
+ justifyContent: "center",
310
+ alignItems: "center",
311
+ },
312
+ rowCenterGap: {
313
+ flexDirection: "row",
314
+ justifyContent: "center",
315
+ alignItems: "center",
316
+ gap: Spacing.detailGap,
317
+ },
318
+ column: {
319
+ flexDirection: "column",
320
+ },
321
+ columnCenter: {
322
+ flexDirection: "column",
323
+ alignItems: "center",
324
+ },
325
+ flex1: {
326
+ flex: 1,
327
+ },
328
+ textCenter: {
329
+ textAlign: "center",
330
+ },
331
+ avatar: {
332
+ width: Spacing.avatarSize,
333
+ height: Spacing.avatarSize,
334
+ borderRadius: Spacing.avatarSize / 2,
335
+ borderWidth: 1,
336
+ justifyContent: "center",
337
+ alignItems: "center",
338
+ },
339
+ iconButton: {
340
+ width: Spacing.iconButtonSize,
341
+ height: Spacing.iconButtonSize,
342
+ borderRadius: Spacing.iconButtonSize / 2,
343
+ justifyContent: "center",
344
+ alignItems: "center",
345
+ },
346
+ button: {
347
+ flexDirection: "row",
348
+ alignItems: "center",
349
+ justifyContent: "center",
350
+ gap: Spacing.sm,
351
+ paddingHorizontal: Spacing.contentPaddingHorizontal,
352
+ paddingVertical: Spacing.md,
353
+ borderWidth: 1,
354
+ borderRadius: BorderRadius.full,
355
+ },
356
+ buttonSmall: {
357
+ flexDirection: "row",
358
+ alignItems: "center",
359
+ justifyContent: "center",
360
+ gap: Spacing.sm,
361
+ paddingHorizontal: Spacing.lg,
362
+ paddingVertical: Spacing.sm,
363
+ borderRadius: BorderRadius.sm,
364
+ },
365
+ card: {
366
+ borderRadius: BorderRadius.xl,
367
+ padding: Spacing.sm,
368
+ },
369
+ chartContainer: {
370
+ height: Spacing.chartHeight,
371
+ borderRadius: BorderRadius.xl,
372
+ padding: Spacing.sm,
373
+ borderWidth: 1,
374
+ position: "relative",
375
+ },
376
+ chartGrid: {
377
+ position: "absolute",
378
+ top: 0,
379
+ left: 0,
380
+ right: 0,
381
+ bottom: 0,
382
+ padding: Spacing.lg,
383
+ justifyContent: "space-between",
384
+ },
385
+ chartEmpty: {
386
+ flex: 1,
387
+ justifyContent: "center",
388
+ alignItems: "center",
389
+ },
390
+ progressBar: {
391
+ width: "100%",
392
+ height: 2,
393
+ borderRadius: 1,
394
+ overflow: "hidden",
395
+ marginTop: Spacing.sm,
396
+ },
397
+ progressFill: {
398
+ height: "100%",
399
+ borderRadius: 1,
400
+ },
401
+ divider: {
402
+ height: 1,
403
+ width: "100%",
404
+ },
405
+ dividerVertical: {
406
+ width: 1,
407
+ height: "100%",
408
+ },
409
+ dot: {
410
+ width: 4,
411
+ height: 4,
412
+ borderRadius: 2,
413
+ },
414
+ absoluteFill: {
415
+ position: "absolute",
416
+ top: 0,
417
+ left: 0,
418
+ right: 0,
419
+ bottom: 0,
420
+ },
421
+ tooltip: {
422
+ paddingHorizontal: Spacing.sm,
423
+ paddingVertical: Spacing.xs,
424
+ borderRadius: BorderRadius.xs,
425
+ },
426
+ emptyState: {
427
+ alignItems: "center",
428
+ paddingVertical: Spacing["2xl"],
429
+ },
430
+ section: {
431
+ marginBottom: Spacing.sectionGap,
432
+ },
433
+ sectionLarge: {
434
+ marginBottom: Spacing.sectionGapLarge,
435
+ },
436
+ sectionHeader: {
437
+ flexDirection: "row",
438
+ justifyContent: "space-between",
439
+ alignItems: "flex-end",
440
+ marginBottom: Spacing["2xl"],
441
+ },
442
+ gridLine: {
443
+ width: "100%",
444
+ height: 1,
445
+ borderTopWidth: 1,
446
+ borderStyle: "dashed",
447
+ },
448
+ statsGrid: {
449
+ flexDirection: "row",
450
+ },
451
+ statsColumn: {
452
+ flex: 1,
453
+ },
454
+ statsColumnLeft: {
455
+ paddingRight: Spacing.lg,
456
+ },
457
+ statsColumnRight: {
458
+ paddingLeft: Spacing.contentPaddingHorizontal,
459
+ borderLeftWidth: 1,
460
+ },
461
+ statsHeader: {
462
+ flexDirection: "row",
463
+ justifyContent: "space-between",
464
+ alignItems: "flex-start",
465
+ marginBottom: Spacing.lg,
466
+ },
467
+ detailItem: {
468
+ alignItems: "center",
469
+ },
470
+ header: {
471
+ flexDirection: "row",
472
+ justifyContent: "space-between",
473
+ alignItems: "flex-end",
474
+ paddingBottom: Spacing.lg,
475
+ },
476
+ loadingContainer: {
477
+ flex: 1,
478
+ justifyContent: "center",
479
+ alignItems: "center",
480
+ },
481
+ glucoseSection: {
482
+ marginTop: Spacing["2xl"],
483
+ marginBottom: Spacing.sectionGap,
484
+ alignItems: "center",
485
+ },
486
+ glucoseHeader: {
487
+ flexDirection: "row",
488
+ alignItems: "center",
489
+ gap: Spacing.sm,
490
+ marginBottom: Spacing.sm,
491
+ },
492
+ glucoseUnit: {
493
+ flexDirection: "row",
494
+ alignItems: "center",
495
+ gap: Spacing.sm,
496
+ marginTop: Spacing.sm,
497
+ },
498
+ glucoseDetails: {
499
+ flexDirection: "row",
500
+ justifyContent: "center",
501
+ gap: Spacing.detailGap,
502
+ marginTop: Spacing["2xl"],
503
+ },
504
+ });
505
+
506
+ export const createThemedStyles = (theme: Theme) => {
507
+ return StyleSheet.create({
508
+ container: {
509
+ ...CommonStyles.container,
510
+ backgroundColor: theme.backgroundRoot,
511
+ },
512
+ scrollContent: {
513
+ ...CommonStyles.scrollContent,
514
+ },
515
+ text: {
516
+ color: theme.textPrimary,
517
+ },
518
+ textPrimary: {
519
+ color: theme.textPrimary,
520
+ },
521
+ textSecondary: {
522
+ color: theme.textSecondary,
523
+ },
524
+ textMuted: {
525
+ color: theme.textMuted,
526
+ },
527
+ textDisabled: {
528
+ color: theme.textDisabled,
529
+ },
530
+ textSuccess: {
531
+ color: theme.success,
532
+ },
533
+ textError: {
534
+ color: theme.error,
535
+ },
536
+ textInfo: {
537
+ color: theme.info,
538
+ },
539
+ textButton: {
540
+ color: theme.buttonPrimaryText,
541
+ },
542
+ avatar: {
543
+ ...CommonStyles.avatar,
544
+ borderColor: theme.border,
545
+ backgroundColor: theme.backgroundRoot,
546
+ },
547
+ avatarText: {
548
+ ...Typography.small,
549
+ fontFamily: "serif",
550
+ color: theme.textPrimary,
551
+ },
552
+ iconButton: {
553
+ ...CommonStyles.iconButton,
554
+ backgroundColor: theme.backgroundSecondary,
555
+ },
556
+ iconButtonText: {
557
+ ...Typography.caption,
558
+ color: theme.textMuted,
559
+ },
560
+ button: {
561
+ ...CommonStyles.button,
562
+ borderColor: theme.border,
563
+ backgroundColor: theme.backgroundRoot,
564
+ ...Shadow.minimal,
565
+ },
566
+ buttonText: {
567
+ ...Typography.smallMedium,
568
+ letterSpacing: 0.5,
569
+ color: theme.textPrimary,
570
+ },
571
+ buttonOutline: {
572
+ ...CommonStyles.buttonSmall,
573
+ backgroundColor: theme.backgroundSecondary,
574
+ },
575
+ buttonOutlineText: {
576
+ ...Typography.small,
577
+ color: theme.textSecondary,
578
+ },
579
+ buttonSmall: {
580
+ ...CommonStyles.buttonSmall,
581
+ backgroundColor: theme.backgroundSecondary,
582
+ },
583
+ buttonSmallText: {
584
+ ...Typography.small,
585
+ color: theme.textSecondary,
586
+ },
587
+ card: {
588
+ ...CommonStyles.card,
589
+ backgroundColor: theme.backgroundRoot,
590
+ },
591
+ chartContainer: {
592
+ ...CommonStyles.chartContainer,
593
+ backgroundColor: theme.chartBackground,
594
+ borderColor: theme.backgroundSecondary,
595
+ },
596
+ chartGrid: {
597
+ ...CommonStyles.chartGrid,
598
+ },
599
+ chartEmpty: {
600
+ ...CommonStyles.chartEmpty,
601
+ },
602
+ chartEmptyText: {
603
+ ...Typography.small,
604
+ color: theme.textMuted,
605
+ },
606
+ chartTooltip: {
607
+ position: "absolute",
608
+ right: 0,
609
+ top: "55%",
610
+ backgroundColor: theme.accent,
611
+ paddingHorizontal: Spacing.sm,
612
+ paddingVertical: Spacing.xs,
613
+ borderRadius: BorderRadius.xs,
614
+ ...Shadow.lg,
615
+ },
616
+ chartTooltipText: {
617
+ ...Typography.tiny,
618
+ color: theme.backgroundRoot,
619
+ },
620
+ progressBar: {
621
+ ...CommonStyles.progressBar,
622
+ backgroundColor: theme.backgroundSecondary,
623
+ },
624
+ progressFill: {
625
+ ...CommonStyles.progressFill,
626
+ backgroundColor: theme.accent,
627
+ },
628
+ progressFillMuted: {
629
+ ...CommonStyles.progressFill,
630
+ backgroundColor: theme.textMuted,
631
+ },
632
+ divider: {
633
+ ...CommonStyles.divider,
634
+ backgroundColor: theme.divider,
635
+ },
636
+ dividerVertical: {
637
+ ...CommonStyles.dividerVertical,
638
+ backgroundColor: theme.borderLight,
639
+ },
640
+ dot: {
641
+ ...CommonStyles.dot,
642
+ backgroundColor: theme.textDisabled,
643
+ },
644
+ tooltip: {
645
+ ...CommonStyles.tooltip,
646
+ backgroundColor: theme.accent,
647
+ ...Shadow.lg,
648
+ },
649
+ tooltipText: {
650
+ color: theme.backgroundRoot,
651
+ },
652
+ gridLine: {
653
+ ...CommonStyles.gridLine,
654
+ borderTopColor: theme.border,
655
+ },
656
+ emptyState: {
657
+ ...CommonStyles.emptyState,
658
+ },
659
+ emptyText: {
660
+ ...Typography.small,
661
+ color: theme.textMuted,
662
+ marginBottom: Spacing.lg,
663
+ },
664
+ section: {
665
+ ...CommonStyles.section,
666
+ },
667
+ sectionLarge: {
668
+ ...CommonStyles.sectionLarge,
669
+ },
670
+ sectionHeader: {
671
+ ...CommonStyles.sectionHeader,
672
+ },
673
+ statsGrid: {
674
+ ...CommonStyles.statsGrid,
675
+ marginBottom: Spacing.sectionGap,
676
+ },
677
+ statsColumn: {
678
+ ...CommonStyles.statsColumn,
679
+ },
680
+ statsColumnLeft: {
681
+ ...CommonStyles.statsColumnLeft,
682
+ },
683
+ statsColumnRight: {
684
+ ...CommonStyles.statsColumnRight,
685
+ borderLeftColor: theme.borderLight,
686
+ },
687
+ statsHeader: {
688
+ ...CommonStyles.statsHeader,
689
+ },
690
+ statsTitle: {
691
+ ...Typography.title,
692
+ color: theme.textPrimary,
693
+ },
694
+ statsValue: {
695
+ ...Typography.stat,
696
+ color: theme.textPrimary,
697
+ },
698
+ statsUnit: {
699
+ ...Typography.caption,
700
+ color: theme.textMuted,
701
+ },
702
+ statsSubtext: {
703
+ ...Typography.caption,
704
+ color: theme.textMuted,
705
+ marginTop: Spacing.sm,
706
+ },
707
+ detailItem: {
708
+ ...CommonStyles.detailItem,
709
+ },
710
+ detailLabel: {
711
+ ...Typography.caption,
712
+ color: theme.textMuted,
713
+ marginBottom: Spacing.xs,
714
+ },
715
+ detailValue: {
716
+ ...Typography.bodyMedium,
717
+ color: theme.textPrimary,
718
+ },
719
+ header: {
720
+ ...CommonStyles.header,
721
+ },
722
+ dateText: {
723
+ ...Typography.captionMedium,
724
+ color: theme.textMuted,
725
+ letterSpacing: 1,
726
+ textTransform: "uppercase",
727
+ marginBottom: Spacing.xs,
728
+ },
729
+ greetingText: {
730
+ ...Typography.h3,
731
+ color: theme.textPrimary,
732
+ },
733
+ greetingName: {
734
+ fontWeight: "700",
735
+ },
736
+ label: {
737
+ ...Typography.label,
738
+ color: theme.textMuted,
739
+ },
740
+ labelSmall: {
741
+ ...Typography.labelSmall,
742
+ color: theme.textMuted,
743
+ },
744
+ labelTitle: {
745
+ ...Typography.labelTitle,
746
+ color: theme.textPrimary,
747
+ },
748
+ loadingContainer: {
749
+ ...CommonStyles.loadingContainer,
750
+ backgroundColor: theme.backgroundRoot,
751
+ },
752
+ statusNormal: {
753
+ ...Typography.smallMedium,
754
+ color: theme.success,
755
+ },
756
+ statusHigh: {
757
+ ...Typography.smallMedium,
758
+ color: theme.error,
759
+ },
760
+ statusLow: {
761
+ ...Typography.smallMedium,
762
+ color: theme.info,
763
+ },
764
+ unitText: {
765
+ ...Typography.smallMedium,
766
+ color: theme.textMuted,
767
+ },
768
+ glucoseSection: {
769
+ ...CommonStyles.glucoseSection,
770
+ },
771
+ glucoseHeader: {
772
+ ...CommonStyles.glucoseHeader,
773
+ },
774
+ glucoseLabel: {
775
+ ...Typography.label,
776
+ color: theme.textMuted,
777
+ },
778
+ glucoseValue: {
779
+ ...Typography.displayLarge,
780
+ color: theme.textPrimary,
781
+ },
782
+ glucoseEmptyValue: {
783
+ ...Typography.displayMedium,
784
+ color: theme.textMuted,
785
+ },
786
+ glucoseUnit: {
787
+ ...CommonStyles.glucoseUnit,
788
+ },
789
+ glucoseDetails: {
790
+ ...CommonStyles.glucoseDetails,
791
+ },
792
+ trendLink: {
793
+ flexDirection: "row",
794
+ alignItems: "center",
795
+ gap: Spacing.xs,
796
+ },
797
+ trendLinkText: {
798
+ ...Typography.caption,
799
+ color: theme.textMuted,
800
+ },
801
+ refreshButton: {
802
+ ...CommonStyles.buttonSmall,
803
+ backgroundColor: theme.backgroundSecondary,
804
+ },
805
+ refreshButtonText: {
806
+ ...Typography.small,
807
+ color: theme.textSecondary,
808
+ },
809
+ input: {
810
+ height: Spacing.inputHeight,
811
+ backgroundColor: theme.backgroundRoot,
812
+ borderRadius: BorderRadius.sm,
813
+ borderWidth: 1,
814
+ borderColor: theme.border,
815
+ paddingHorizontal: Spacing.lg,
816
+ ...Typography.body,
817
+ color: theme.textPrimary,
818
+ },
819
+ inputPlaceholder: {
820
+ color: theme.placeholder,
821
+ },
822
+ link: {
823
+ ...Typography.link,
824
+ color: theme.link,
825
+ },
826
+ navItem: {
827
+ flex: 1,
828
+ alignItems: "center",
829
+ justifyContent: "center",
830
+ paddingVertical: Spacing.sm,
831
+ },
832
+ navIcon: {
833
+ fontSize: 20,
834
+ marginBottom: Spacing.xs,
835
+ },
836
+ navLabel: {
837
+ ...Typography.navLabel,
838
+ },
839
+ navActive: {
840
+ color: theme.textPrimary,
841
+ },
842
+ navInactive: {
843
+ color: theme.textMuted,
844
+ },
845
+ navIndicator: {
846
+ width: 4,
847
+ height: 4,
848
+ borderRadius: 2,
849
+ backgroundColor: theme.textPrimary,
850
+ position: "absolute",
851
+ bottom: -8,
852
+ },
853
+ });
854
+ };