@idealyst/cli 1.1.9 → 1.2.1

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 (324) hide show
  1. package/dist/commands/add.js +233 -0
  2. package/dist/commands/add.js.map +1 -0
  3. package/dist/commands/index.js +13 -0
  4. package/dist/commands/index.js.map +1 -0
  5. package/dist/commands/info.js +193 -0
  6. package/dist/commands/info.js.map +1 -0
  7. package/dist/commands/init.js +155 -0
  8. package/dist/commands/init.js.map +1 -0
  9. package/dist/constants.js +119 -0
  10. package/dist/constants.js.map +1 -0
  11. package/dist/generators/core/index.js +23 -0
  12. package/dist/generators/core/index.js.map +1 -0
  13. package/dist/generators/core/mobile.js +286 -0
  14. package/dist/generators/core/mobile.js.map +1 -0
  15. package/dist/generators/core/shared.js +207 -0
  16. package/dist/generators/core/shared.js.map +1 -0
  17. package/dist/generators/core/web.js +377 -0
  18. package/dist/generators/core/web.js.map +1 -0
  19. package/dist/generators/extensions/api.js +223 -0
  20. package/dist/generators/extensions/api.js.map +1 -0
  21. package/dist/generators/extensions/devcontainer.js +510 -0
  22. package/dist/generators/extensions/devcontainer.js.map +1 -0
  23. package/dist/generators/extensions/graphql.js +202 -0
  24. package/dist/generators/extensions/graphql.js.map +1 -0
  25. package/dist/generators/extensions/index.js +17 -0
  26. package/dist/generators/extensions/index.js.map +1 -0
  27. package/dist/generators/extensions/prisma.js +249 -0
  28. package/dist/generators/extensions/prisma.js.map +1 -0
  29. package/dist/generators/extensions/trpc.js +258 -0
  30. package/dist/generators/extensions/trpc.js.map +1 -0
  31. package/dist/generators/index.js +106 -4
  32. package/dist/generators/index.js.map +1 -1
  33. package/dist/generators/reactNative.js +177 -0
  34. package/dist/generators/reactNative.js.map +1 -0
  35. package/dist/generators/workspace.js +272 -0
  36. package/dist/generators/workspace.js.map +1 -0
  37. package/dist/identifiers/android.js +75 -0
  38. package/dist/identifiers/android.js.map +1 -0
  39. package/dist/identifiers/index.js +35 -0
  40. package/dist/identifiers/index.js.map +1 -0
  41. package/dist/identifiers/ios.js +65 -0
  42. package/dist/identifiers/ios.js.map +1 -0
  43. package/dist/index.js +41 -319
  44. package/dist/index.js.map +1 -1
  45. package/dist/templates/copier.js +135 -0
  46. package/dist/templates/copier.js.map +1 -0
  47. package/dist/templates/index.js +23 -0
  48. package/dist/templates/index.js.map +1 -0
  49. package/dist/templates/merger.js +113 -0
  50. package/dist/templates/merger.js.map +1 -0
  51. package/dist/templates/processor.js +142 -0
  52. package/dist/templates/processor.js.map +1 -0
  53. package/dist/types/commands/add.d.ts +14 -0
  54. package/dist/types/commands/index.d.ts +6 -0
  55. package/dist/types/commands/info.d.ts +10 -0
  56. package/dist/types/commands/init.d.ts +19 -0
  57. package/dist/types/constants.d.ts +76 -0
  58. package/dist/types/generators/core/index.d.ts +6 -0
  59. package/dist/types/generators/core/mobile.d.ts +13 -0
  60. package/dist/types/generators/core/shared.d.ts +8 -0
  61. package/dist/types/generators/core/web.d.ts +8 -0
  62. package/dist/types/generators/extensions/api.d.ts +8 -0
  63. package/dist/types/generators/extensions/devcontainer.d.ts +15 -0
  64. package/dist/types/generators/extensions/graphql.d.ts +8 -0
  65. package/dist/types/generators/extensions/index.d.ts +8 -0
  66. package/dist/types/generators/extensions/prisma.d.ts +8 -0
  67. package/dist/types/generators/extensions/trpc.d.ts +9 -0
  68. package/dist/types/generators/index.d.ts +11 -3
  69. package/dist/types/generators/reactNative.d.ts +19 -0
  70. package/dist/types/generators/workspace.d.ts +8 -0
  71. package/dist/types/identifiers/android.d.ts +26 -0
  72. package/dist/types/identifiers/index.d.ts +26 -0
  73. package/dist/types/identifiers/ios.d.ts +21 -0
  74. package/dist/types/index.d.ts +3 -0
  75. package/dist/types/templates/copier.d.ts +24 -0
  76. package/dist/types/templates/index.d.ts +6 -0
  77. package/dist/types/templates/merger.d.ts +43 -0
  78. package/dist/types/templates/processor.d.ts +39 -0
  79. package/dist/types/types.d.ts +153 -5
  80. package/dist/types/utils/filesystem.d.ts +56 -0
  81. package/dist/types/utils/index.d.ts +7 -0
  82. package/dist/types/utils/logger.d.ts +58 -0
  83. package/dist/types/utils/shell.d.ts +35 -0
  84. package/dist/types/utils/validation.d.ts +32 -0
  85. package/dist/types/wizard/index.d.ts +20 -0
  86. package/dist/types/wizard/steps/apiExtension.d.ts +5 -0
  87. package/dist/types/wizard/steps/appDisplayName.d.ts +5 -0
  88. package/dist/types/wizard/steps/devcontainerExtension.d.ts +5 -0
  89. package/dist/types/wizard/steps/graphqlExtension.d.ts +5 -0
  90. package/dist/types/wizard/steps/index.d.ts +12 -0
  91. package/dist/types/wizard/steps/orgDomain.d.ts +5 -0
  92. package/dist/types/wizard/steps/prismaExtension.d.ts +5 -0
  93. package/dist/types/wizard/steps/projectName.d.ts +5 -0
  94. package/dist/types/wizard/steps/summary.d.ts +5 -0
  95. package/dist/types/wizard/steps/trpcExtension.d.ts +5 -0
  96. package/dist/types/wizard/validators.d.ts +17 -0
  97. package/dist/types.js +41 -0
  98. package/dist/types.js.map +1 -1
  99. package/dist/utils/filesystem.js +173 -0
  100. package/dist/utils/filesystem.js.map +1 -0
  101. package/dist/utils/index.js +24 -0
  102. package/dist/utils/index.js.map +1 -0
  103. package/dist/utils/logger.js +95 -0
  104. package/dist/utils/logger.js.map +1 -0
  105. package/dist/utils/shell.js +113 -0
  106. package/dist/utils/shell.js.map +1 -0
  107. package/dist/utils/validation.js +196 -0
  108. package/dist/utils/validation.js.map +1 -0
  109. package/dist/wizard/index.js +177 -0
  110. package/dist/wizard/index.js.map +1 -0
  111. package/dist/wizard/steps/apiExtension.js +33 -0
  112. package/dist/wizard/steps/apiExtension.js.map +1 -0
  113. package/dist/wizard/steps/appDisplayName.js +53 -0
  114. package/dist/wizard/steps/appDisplayName.js.map +1 -0
  115. package/dist/wizard/steps/devcontainerExtension.js +78 -0
  116. package/dist/wizard/steps/devcontainerExtension.js.map +1 -0
  117. package/dist/wizard/steps/graphqlExtension.js +37 -0
  118. package/dist/wizard/steps/graphqlExtension.js.map +1 -0
  119. package/dist/wizard/steps/index.js +25 -0
  120. package/dist/wizard/steps/index.js.map +1 -0
  121. package/dist/wizard/steps/orgDomain.js +40 -0
  122. package/dist/wizard/steps/orgDomain.js.map +1 -0
  123. package/dist/wizard/steps/prismaExtension.js +33 -0
  124. package/dist/wizard/steps/prismaExtension.js.map +1 -0
  125. package/dist/wizard/steps/projectName.js +40 -0
  126. package/dist/wizard/steps/projectName.js.map +1 -0
  127. package/dist/wizard/steps/summary.js +107 -0
  128. package/dist/wizard/steps/summary.js.map +1 -0
  129. package/dist/wizard/steps/trpcExtension.js +37 -0
  130. package/dist/wizard/steps/trpcExtension.js.map +1 -0
  131. package/dist/wizard/validators.js +35 -0
  132. package/dist/wizard/validators.js.map +1 -0
  133. package/package.json +6 -19
  134. package/README.md +0 -110
  135. package/dist/generators/init.js +0 -268
  136. package/dist/generators/init.js.map +0 -1
  137. package/dist/generators/utils.js +0 -682
  138. package/dist/generators/utils.js.map +0 -1
  139. package/dist/scripts/configure-react-native-monorepo.js +0 -144
  140. package/dist/scripts/configure-react-native-monorepo.js.map +0 -1
  141. package/dist/template/.devcontainer/Dockerfile +0 -26
  142. package/dist/template/.devcontainer/devcontainer.json +0 -113
  143. package/dist/template/.devcontainer/docker-compose.yml +0 -59
  144. package/dist/template/.devcontainer/figma-mcp.sh +0 -32
  145. package/dist/template/.devcontainer/gitignore.template +0 -2
  146. package/dist/template/.devcontainer/setup.sh +0 -45
  147. package/dist/template/DOCKER.md +0 -0
  148. package/dist/template/Dockerfile +0 -111
  149. package/dist/template/README.md +0 -233
  150. package/dist/template/docker/nginx/prod.conf +0 -238
  151. package/dist/template/docker/nginx.conf +0 -131
  152. package/dist/template/docker/postgres/init.sql +0 -41
  153. package/dist/template/docker/prometheus/prometheus.yml +0 -52
  154. package/dist/template/docker-compose.prod.yml +0 -146
  155. package/dist/template/docker-compose.yml +0 -143
  156. package/dist/template/dockerignore.template +0 -151
  157. package/dist/template/env.example.template +0 -36
  158. package/dist/template/gitignore.template +0 -56
  159. package/dist/template/jest.config.js +0 -20
  160. package/dist/template/mcp.json.template +0 -8
  161. package/dist/template/package.json +0 -45
  162. package/dist/template/packages/api/README.md +0 -510
  163. package/dist/template/packages/api/__tests__/api.test.ts +0 -26
  164. package/dist/template/packages/api/env.example.template +0 -6
  165. package/dist/template/packages/api/gitignore.template +0 -35
  166. package/dist/template/packages/api/jest.config.js +0 -23
  167. package/dist/template/packages/api/jest.setup.js +0 -9
  168. package/dist/template/packages/api/package.json +0 -66
  169. package/dist/template/packages/api/src/context.ts +0 -52
  170. package/dist/template/packages/api/src/controllers/TestController.ts +0 -0
  171. package/dist/template/packages/api/src/graphql/builder.ts +0 -75
  172. package/dist/template/packages/api/src/graphql/generated.ts +0 -64
  173. package/dist/template/packages/api/src/graphql/index.ts +0 -75
  174. package/dist/template/packages/api/src/graphql/types/index.ts +0 -44
  175. package/dist/template/packages/api/src/graphql/types/test.ts +0 -245
  176. package/dist/template/packages/api/src/index.ts +0 -26
  177. package/dist/template/packages/api/src/lib/database.ts +0 -23
  178. package/dist/template/packages/api/src/router/index.ts +0 -163
  179. package/dist/template/packages/api/src/routers/test.ts +0 -161
  180. package/dist/template/packages/api/src/server.ts +0 -68
  181. package/dist/template/packages/api/src/trpc.ts +0 -28
  182. package/dist/template/packages/api/tsconfig.json +0 -44
  183. package/dist/template/packages/database/README.md +0 -162
  184. package/dist/template/packages/database/gitignore.template +0 -41
  185. package/dist/template/packages/database/package.json +0 -49
  186. package/dist/template/packages/database/prisma/seed.ts +0 -64
  187. package/dist/template/packages/database/schema.prisma +0 -107
  188. package/dist/template/packages/database/src/index.ts +0 -15
  189. package/dist/template/packages/database/src/validators.ts +0 -10
  190. package/dist/template/packages/database/tsconfig.json +0 -18
  191. package/dist/template/packages/mobile/README.md +0 -86
  192. package/dist/template/packages/mobile/__tests__/App.test.tsx +0 -156
  193. package/dist/template/packages/mobile/__tests__/components.test.tsx +0 -300
  194. package/dist/template/packages/mobile/app.json +0 -5
  195. package/dist/template/packages/mobile/babel.config.js +0 -10
  196. package/dist/template/packages/mobile/gitignore.template +0 -73
  197. package/dist/template/packages/mobile/index.js +0 -6
  198. package/dist/template/packages/mobile/jest.config.js +0 -21
  199. package/dist/template/packages/mobile/jest.setup.js +0 -12
  200. package/dist/template/packages/mobile/metro.config.js +0 -36
  201. package/dist/template/packages/mobile/package.json +0 -60
  202. package/dist/template/packages/mobile/src/App.tsx +0 -8
  203. package/dist/template/packages/mobile/src/utils/trpc.ts +0 -7
  204. package/dist/template/packages/mobile/tsconfig.json +0 -28
  205. package/dist/template/packages/shared/README.md +0 -135
  206. package/dist/template/packages/shared/__tests__/shared.test.ts +0 -51
  207. package/dist/template/packages/shared/gitignore.template +0 -35
  208. package/dist/template/packages/shared/jest.config.js +0 -22
  209. package/dist/template/packages/shared/package.json +0 -68
  210. package/dist/template/packages/shared/src/components/App.tsx +0 -57
  211. package/dist/template/packages/shared/src/components/HelloWorld.tsx +0 -531
  212. package/dist/template/packages/shared/src/components/index.ts +0 -1
  213. package/dist/template/packages/shared/src/graphql/client.ts +0 -34
  214. package/dist/template/packages/shared/src/index.ts +0 -22
  215. package/dist/template/packages/shared/src/navigation/AppRouter.tsx +0 -565
  216. package/dist/template/packages/shared/src/trpc/client.ts +0 -44
  217. package/dist/template/packages/shared/tsconfig.json +0 -22
  218. package/dist/template/packages/web/README.md +0 -131
  219. package/dist/template/packages/web/__tests__/App.test.tsx +0 -342
  220. package/dist/template/packages/web/__tests__/components.test.tsx +0 -564
  221. package/dist/template/packages/web/gitignore.template +0 -35
  222. package/dist/template/packages/web/index.html +0 -13
  223. package/dist/template/packages/web/jest.config.js +0 -27
  224. package/dist/template/packages/web/jest.setup.js +0 -24
  225. package/dist/template/packages/web/package.json +0 -69
  226. package/dist/template/packages/web/src/App.tsx +0 -14
  227. package/dist/template/packages/web/src/components/TestDemo.tsx +0 -164
  228. package/dist/template/packages/web/src/main.tsx +0 -25
  229. package/dist/template/packages/web/src/utils/trpc.ts +0 -7
  230. package/dist/template/packages/web/tsconfig.json +0 -26
  231. package/dist/template/packages/web/vite.config.ts +0 -98
  232. package/dist/template/setup.sh +0 -30
  233. package/dist/template/tsconfig.json +0 -22
  234. package/dist/template/yarnrc.yml.template +0 -4
  235. package/dist/types/generators/init.d.ts +0 -5
  236. package/dist/types/generators/utils.d.ts +0 -45
  237. package/dist/types/scripts/configure-react-native-monorepo.d.ts +0 -23
  238. package/template/.devcontainer/Dockerfile +0 -26
  239. package/template/.devcontainer/devcontainer.json +0 -113
  240. package/template/.devcontainer/docker-compose.yml +0 -59
  241. package/template/.devcontainer/figma-mcp.sh +0 -32
  242. package/template/.devcontainer/setup.sh +0 -45
  243. package/template/.dockerignore +0 -151
  244. package/template/.env.example +0 -36
  245. package/template/.env.production +0 -56
  246. package/template/DOCKER.md +0 -0
  247. package/template/Dockerfile +0 -111
  248. package/template/README.md +0 -233
  249. package/template/docker/nginx/prod.conf +0 -238
  250. package/template/docker/nginx.conf +0 -131
  251. package/template/docker/postgres/init.sql +0 -41
  252. package/template/docker/prometheus/prometheus.yml +0 -52
  253. package/template/docker-compose.prod.yml +0 -146
  254. package/template/docker-compose.yml +0 -143
  255. package/template/jest.config.js +0 -20
  256. package/template/package.json +0 -45
  257. package/template/packages/api/.env.example +0 -6
  258. package/template/packages/api/README.md +0 -510
  259. package/template/packages/api/__tests__/api.test.ts +0 -26
  260. package/template/packages/api/jest.config.js +0 -23
  261. package/template/packages/api/jest.setup.js +0 -9
  262. package/template/packages/api/package.json +0 -66
  263. package/template/packages/api/src/context.ts +0 -52
  264. package/template/packages/api/src/controllers/TestController.ts +0 -0
  265. package/template/packages/api/src/graphql/builder.ts +0 -75
  266. package/template/packages/api/src/graphql/generated.ts +0 -64
  267. package/template/packages/api/src/graphql/index.ts +0 -75
  268. package/template/packages/api/src/graphql/types/index.ts +0 -44
  269. package/template/packages/api/src/graphql/types/test.ts +0 -245
  270. package/template/packages/api/src/index.ts +0 -26
  271. package/template/packages/api/src/lib/database.ts +0 -23
  272. package/template/packages/api/src/router/index.ts +0 -163
  273. package/template/packages/api/src/routers/test.ts +0 -161
  274. package/template/packages/api/src/server.ts +0 -68
  275. package/template/packages/api/src/trpc.ts +0 -28
  276. package/template/packages/api/tsconfig.json +0 -44
  277. package/template/packages/database/README.md +0 -162
  278. package/template/packages/database/package.json +0 -49
  279. package/template/packages/database/prisma/seed.ts +0 -64
  280. package/template/packages/database/schema.prisma +0 -107
  281. package/template/packages/database/src/index.ts +0 -15
  282. package/template/packages/database/src/validators.ts +0 -10
  283. package/template/packages/database/tsconfig.json +0 -18
  284. package/template/packages/mobile/README.md +0 -86
  285. package/template/packages/mobile/__tests__/App.test.tsx +0 -156
  286. package/template/packages/mobile/__tests__/components.test.tsx +0 -300
  287. package/template/packages/mobile/app.json +0 -5
  288. package/template/packages/mobile/babel.config.js +0 -26
  289. package/template/packages/mobile/index.js +0 -8
  290. package/template/packages/mobile/jest.config.js +0 -21
  291. package/template/packages/mobile/jest.setup.js +0 -12
  292. package/template/packages/mobile/metro.config.js +0 -36
  293. package/template/packages/mobile/package.json +0 -60
  294. package/template/packages/mobile/src/App.tsx +0 -8
  295. package/template/packages/mobile/src/utils/trpc.ts +0 -7
  296. package/template/packages/mobile/tsconfig.json +0 -28
  297. package/template/packages/shared/README.md +0 -135
  298. package/template/packages/shared/__tests__/shared.test.ts +0 -51
  299. package/template/packages/shared/jest.config.js +0 -22
  300. package/template/packages/shared/package.json +0 -68
  301. package/template/packages/shared/src/components/App.tsx +0 -57
  302. package/template/packages/shared/src/components/HelloWorld.tsx +0 -531
  303. package/template/packages/shared/src/components/index.ts +0 -1
  304. package/template/packages/shared/src/graphql/client.ts +0 -34
  305. package/template/packages/shared/src/index.ts +0 -25
  306. package/template/packages/shared/src/navigation/AppRouter.tsx +0 -565
  307. package/template/packages/shared/src/trpc/client.ts +0 -44
  308. package/template/packages/shared/src/unistyles.ts +0 -50
  309. package/template/packages/shared/tsconfig.json +0 -22
  310. package/template/packages/web/README.md +0 -131
  311. package/template/packages/web/__tests__/App.test.tsx +0 -342
  312. package/template/packages/web/__tests__/components.test.tsx +0 -564
  313. package/template/packages/web/index.html +0 -13
  314. package/template/packages/web/jest.config.js +0 -27
  315. package/template/packages/web/jest.setup.js +0 -24
  316. package/template/packages/web/package.json +0 -69
  317. package/template/packages/web/src/App.tsx +0 -14
  318. package/template/packages/web/src/components/TestDemo.tsx +0 -164
  319. package/template/packages/web/src/main.tsx +0 -27
  320. package/template/packages/web/src/utils/trpc.ts +0 -7
  321. package/template/packages/web/tsconfig.json +0 -26
  322. package/template/packages/web/vite.config.ts +0 -114
  323. package/template/setup.sh +0 -30
  324. package/template/tsconfig.json +0 -22
@@ -1,565 +0,0 @@
1
- import {
2
- Accordion,
3
- Alert,
4
- Avatar,
5
- Badge,
6
- Button,
7
- Card,
8
- Chip,
9
- Icon,
10
- Progress,
11
- Screen,
12
- Slider,
13
- Switch,
14
- Text,
15
- View,
16
- } from "@idealyst/components";
17
- import { NavigatorParam } from "@idealyst/navigation";
18
- import { useState } from "react";
19
- import { HelloWorld } from "../components/HelloWorld";
20
-
21
- // Dashboard Screen - Overview with stats and quick info
22
- const DashboardScreen = () => {
23
- const [progress] = useState(68);
24
-
25
- return (
26
- <Screen>
27
- <View spacing="lg">
28
- <View spacing="sm">
29
- <Text size="xl" weight="bold">
30
- Dashboard
31
- </Text>
32
- <Text size="md" style={{ opacity: 0.7 }}>
33
- Idealyst Framework Showcase
34
- </Text>
35
- </View>
36
-
37
- {/* Stats Cards */}
38
- <View
39
- style={{
40
- flexDirection: "row",
41
- gap: 16,
42
- flexWrap: "wrap",
43
- marginTop: 16,
44
- }}
45
- >
46
- <Card type="elevated" style={{ flex: 1, minWidth: 150, padding: 16 }}>
47
- <View spacing="sm">
48
- <Icon name="toy-brick" size="lg" />
49
- <Text size="xl" weight="bold">
50
- 34
51
- </Text>
52
- <Text size="sm" style={{ opacity: 0.7 }}>
53
- Components
54
- </Text>
55
- </View>
56
- </Card>
57
-
58
- <Card type="elevated" style={{ flex: 1, minWidth: 150, padding: 16 }}>
59
- <View spacing="sm">
60
- <Icon name="palette" size="lg" />
61
- <Text size="xl" weight="bold">
62
- 5
63
- </Text>
64
- <Text size="sm" style={{ opacity: 0.7 }}>
65
- Intent Colors
66
- </Text>
67
- </View>
68
- </Card>
69
-
70
- <Card type="elevated" style={{ flex: 1, minWidth: 150, padding: 16 }}>
71
- <View spacing="sm">
72
- <Icon name="devices" size="lg" />
73
- <Text size="xl" weight="bold">
74
- 2
75
- </Text>
76
- <Text size="sm" style={{ opacity: 0.7 }}>
77
- Platforms
78
- </Text>
79
- </View>
80
- </Card>
81
- </View>
82
-
83
- {/* Progress Section */}
84
- <Card type="outlined" style={{ marginTop: 16, padding: 16 }}>
85
- <View spacing="md">
86
- <View
87
- style={{
88
- flexDirection: "row",
89
- justifyContent: "space-between",
90
- alignItems: "center",
91
- }}
92
- >
93
- <Text size="lg" weight="semibold">
94
- Framework Adoption
95
- </Text>
96
- <Badge type="filled" color="green">
97
- Active
98
- </Badge>
99
- </View>
100
- <Progress value={progress} variant="linear" intent="primary" showLabel />
101
- <Text size="sm" style={{ opacity: 0.7 }}>
102
- You're making great progress exploring the framework!
103
- </Text>
104
- </View>
105
- </Card>
106
-
107
- {/* Quick Info Alert */}
108
- <Alert
109
- intent="info"
110
- title="Welcome to Idealyst"
111
- message="This showcase demonstrates drawer navigation and various components from the framework. Explore the different screens using the drawer menu."
112
- type="soft"
113
- />
114
- </View>
115
- </Screen>
116
- );
117
- };
118
-
119
- // Component Gallery - Showcase UI components
120
- const ComponentGalleryScreen = () => {
121
- return (
122
- <Screen>
123
- <View spacing="lg">
124
- <View spacing="sm">
125
- <Text size="xl" weight="bold">
126
- Component Gallery
127
- </Text>
128
- <Text size="md" style={{ opacity: 0.7 }}>
129
- Explore various UI components
130
- </Text>
131
- </View>
132
-
133
- {/* Avatars Section */}
134
- <Card type="outlined" style={{ marginTop: 16, padding: 16 }}>
135
- <View spacing="md">
136
- <Text size="lg" weight="semibold">
137
- Avatars
138
- </Text>
139
- <View style={{ flexDirection: "row", gap: 12, flexWrap: "wrap" }}>
140
- <Avatar fallback="JD" size="sm" shape="circle" color="blue" />
141
- <Avatar fallback="AS" size="md" shape="circle" color="purple" />
142
- <Avatar fallback="MK" size="lg" shape="circle" color="green" />
143
- <Avatar fallback="RC" size="xl" shape="circle" color="orange" />
144
- </View>
145
- </View>
146
- </Card>
147
-
148
- {/* Badges & Chips */}
149
- <Card type="outlined" style={{ marginTop: 16, padding: 16 }}>
150
- <View spacing="md">
151
- <Text size="lg" weight="semibold">
152
- Badges & Chips
153
- </Text>
154
- <View spacing="sm">
155
- <View style={{ flexDirection: "row", gap: 8, flexWrap: "wrap" }}>
156
- <Badge type="filled" color="red">
157
- 5
158
- </Badge>
159
- <Badge type="filled" color="blue">
160
- New
161
- </Badge>
162
- <Badge type="outlined" color="green">
163
- Active
164
- </Badge>
165
- <Badge type="dot" color="orange" />
166
- </View>
167
- <View style={{ flexDirection: "row", gap: 8, flexWrap: "wrap", marginTop: 8 }}>
168
- <Chip label="React" />
169
- <Chip label="React Native" />
170
- <Chip label="TypeScript" />
171
- <Chip label="Cross-platform" />
172
- </View>
173
- </View>
174
- </View>
175
- </Card>
176
-
177
- {/* Buttons */}
178
- <Card type="outlined" style={{ marginTop: 16, padding: 16 }}>
179
- <View spacing="md">
180
- <Text size="lg" weight="semibold">
181
- Buttons
182
- </Text>
183
- <View style={{ gap: 12 }}>
184
- <View style={{ flexDirection: "row", gap: 8, flexWrap: "wrap" }}>
185
- <Button type="contained" intent="primary" leftIcon="check">
186
- Primary
187
- </Button>
188
- <Button type="outlined" intent="neutral" leftIcon="heart">
189
- Neutral
190
- </Button>
191
- <Button type="text" intent="error" leftIcon="delete">
192
- Delete
193
- </Button>
194
- </View>
195
- <View style={{ flexDirection: "row", gap: 8, flexWrap: "wrap" }}>
196
- <Button type="contained" intent="success" size="sm">
197
- Success
198
- </Button>
199
- <Button type="contained" intent="warning" size="md">
200
- Warning
201
- </Button>
202
- <Button type="contained" intent="error" size="lg">
203
- Error
204
- </Button>
205
- </View>
206
- </View>
207
- </View>
208
- </Card>
209
-
210
- {/* Accordion */}
211
- <Accordion
212
- type="bordered"
213
- items={[
214
- {
215
- id: "1",
216
- title: "What is Idealyst?",
217
- content: (
218
- <Text size="sm">
219
- Idealyst is a cross-platform React framework with 34+ components,
220
- built for both web and mobile applications.
221
- </Text>
222
- ),
223
- },
224
- {
225
- id: "2",
226
- title: "Key Features",
227
- content: (
228
- <View spacing="sm">
229
- <Text size="sm">• Cross-platform (React & React Native)</Text>
230
- <Text size="sm">• 7,447+ Material Design Icons</Text>
231
- <Text size="sm">• Consistent API patterns</Text>
232
- <Text size="sm">• Built-in theming system</Text>
233
- </View>
234
- ),
235
- },
236
- ]}
237
- defaultExpanded={["1"]}
238
- />
239
- </View>
240
- </Screen>
241
- );
242
- };
243
-
244
- // Interactive Demo - Forms and interactive elements
245
- const InteractiveDemoScreen = () => {
246
- const [switchValue, setSwitchValue] = useState(true);
247
- const [sliderValue, setSliderValue] = useState(50);
248
- const [loading, setLoading] = useState(false);
249
-
250
- const handleAction = () => {
251
- setLoading(true);
252
- setTimeout(() => setLoading(false), 2000);
253
- };
254
-
255
- return (
256
- <Screen>
257
- <View spacing="lg">
258
- <View spacing="sm">
259
- <Text size="xl" weight="bold">
260
- Interactive Demo
261
- </Text>
262
- <Text size="md" style={{ opacity: 0.7 }}>
263
- Try out interactive components
264
- </Text>
265
- </View>
266
-
267
- {/* Switch Control */}
268
- <Card type="outlined" style={{ marginTop: 16, padding: 16 }}>
269
- <View spacing="md">
270
- <View
271
- style={{
272
- flexDirection: "row",
273
- justifyContent: "space-between",
274
- alignItems: "center",
275
- }}
276
- >
277
- <View spacing="xs" style={{ flex: 1 }}>
278
- <Text size="md" weight="semibold">
279
- Enable Notifications
280
- </Text>
281
- <Text size="sm" style={{ opacity: 0.7 }}>
282
- Receive updates and alerts
283
- </Text>
284
- </View>
285
- <Switch checked={switchValue} onCheckedChange={setSwitchValue} />
286
- </View>
287
- </View>
288
- </Card>
289
-
290
- {/* Slider Control */}
291
- <Card type="outlined" style={{ marginTop: 16, padding: 16 }}>
292
- <View spacing="md">
293
- <View
294
- style={{
295
- flexDirection: "row",
296
- justifyContent: "space-between",
297
- alignItems: "center",
298
- }}
299
- >
300
- <Text size="md" weight="semibold">
301
- Volume
302
- </Text>
303
- <Badge type="filled" color="blue">
304
- {sliderValue}%
305
- </Badge>
306
- </View>
307
- <Slider
308
- value={sliderValue}
309
- onValueChange={setSliderValue}
310
- min={0}
311
- max={100}
312
- />
313
- </View>
314
- </Card>
315
-
316
- {/* Action Buttons */}
317
- <Card type="outlined" style={{ marginTop: 16, padding: 16 }}>
318
- <View spacing="md">
319
- <Text size="md" weight="semibold">
320
- Actions
321
- </Text>
322
- <View style={{ flexDirection: "row", gap: 12, flexWrap: "wrap" }}>
323
- <Button
324
- type="contained"
325
- intent="primary"
326
- leftIcon="rocket"
327
- onPress={handleAction}
328
- >
329
- Launch
330
- </Button>
331
- <Button type="outlined" intent="neutral" leftIcon="refresh">
332
- Refresh
333
- </Button>
334
- <Button type="text" intent="error" leftIcon="close">
335
- Cancel
336
- </Button>
337
- </View>
338
- </View>
339
- </Card>
340
-
341
- {/* Status Alerts */}
342
- <View spacing="sm" style={{ marginTop: 16 }}>
343
- <Alert
344
- intent="success"
345
- title="Success"
346
- message="Your changes have been saved successfully."
347
- type="soft"
348
- />
349
- <Alert
350
- intent="warning"
351
- title="Warning"
352
- message="Please review your settings before continuing."
353
- type="outlined"
354
- />
355
- </View>
356
- </View>
357
- </Screen>
358
- );
359
- };
360
-
361
- // Theme Showcase - Different variants and intents
362
- const ThemeShowcaseScreen = () => {
363
- return (
364
- <Screen>
365
- <View spacing="lg">
366
- <View spacing="sm">
367
- <Text size="xl" weight="bold">
368
- Theme Showcase
369
- </Text>
370
- <Text size="md" style={{ opacity: 0.7 }}>
371
- Explore variants and intent colors
372
- </Text>
373
- </View>
374
-
375
- {/* Card Variants */}
376
- <View spacing="sm" style={{ marginTop: 16 }}>
377
- <Text size="lg" weight="semibold">
378
- Card Variants
379
- </Text>
380
- <Card type="default" style={{ padding: 16 }}>
381
- <Text weight="semibold">Default Card</Text>
382
- <Text size="sm" style={{ opacity: 0.7 }}>
383
- Standard card with minimal styling
384
- </Text>
385
- </Card>
386
- <Card type="outlined" style={{ padding: 16 }}>
387
- <Text weight="semibold">Outlined Card</Text>
388
- <Text size="sm" style={{ opacity: 0.7 }}>
389
- Card with visible border
390
- </Text>
391
- </Card>
392
- <Card type="elevated" style={{ padding: 16 }}>
393
- <Text weight="semibold">Elevated Card</Text>
394
- <Text size="sm" style={{ opacity: 0.7 }}>
395
- Card with shadow elevation
396
- </Text>
397
- </Card>
398
- <Card type="filled" style={{ padding: 16 }}>
399
- <Text weight="semibold">Filled Card</Text>
400
- <Text size="sm" style={{ opacity: 0.7 }}>
401
- Card with background fill
402
- </Text>
403
- </Card>
404
- </View>
405
-
406
- {/* Intent Colors */}
407
- <View spacing="sm" style={{ marginTop: 16 }}>
408
- <Text size="lg" weight="semibold">
409
- Intent Colors
410
- </Text>
411
- <View style={{ gap: 12 }}>
412
- <Button type="contained" intent="primary">
413
- Primary Intent
414
- </Button>
415
- <Button type="contained" intent="neutral">
416
- Neutral Intent
417
- </Button>
418
- <Button type="contained" intent="success">
419
- Success Intent
420
- </Button>
421
- <Button type="contained" intent="warning">
422
- Warning Intent
423
- </Button>
424
- <Button type="contained" intent="error">
425
- Error Intent
426
- </Button>
427
- </View>
428
- </View>
429
-
430
- {/* Progress Indicators */}
431
- <Card type="outlined" style={{ marginTop: 16, padding: 16 }}>
432
- <View spacing="md">
433
- <Text size="lg" weight="semibold">
434
- Progress Indicators
435
- </Text>
436
- <View spacing="sm">
437
- <Progress value={80} variant="linear" intent="primary" showLabel />
438
- <Progress value={60} variant="linear" intent="success" showLabel />
439
- <Progress value={40} variant="linear" intent="warning" showLabel />
440
- <Progress value={20} variant="linear" intent="error" showLabel />
441
- </View>
442
- </View>
443
- </Card>
444
- </View>
445
- </Screen>
446
- );
447
- };
448
-
449
- // API Integration - HelloWorld component showcase
450
- const APIIntegrationScreen = () => (
451
- <Screen>
452
- <View spacing="lg">
453
- <View spacing="sm">
454
- <Text size="xl" weight="bold">
455
- API Integration
456
- </Text>
457
- <Text size="md" style={{ opacity: 0.7 }}>
458
- RPC communication example
459
- </Text>
460
- </View>
461
-
462
- <Card type="outlined" style={{ marginTop: 16, padding: 16 }}>
463
- <View spacing="md">
464
- <View style={{ flexDirection: "row", alignItems: "center", gap: 8 }}>
465
- <Icon name="api" size="md" />
466
- <Text size="lg" weight="semibold">
467
- Server Communication
468
- </Text>
469
- </View>
470
- <Text size="sm" style={{ opacity: 0.7 }}>
471
- This component demonstrates RPC integration between the client and server.
472
- </Text>
473
- </View>
474
- </Card>
475
-
476
- <HelloWorld name="Idealyst Framework" />
477
-
478
- <Alert
479
- intent="info"
480
- title="How it works"
481
- message="The HelloWorld component uses RPC to communicate with the backend server, showcasing the framework's built-in API integration capabilities."
482
- type="soft"
483
- style={{ marginTop: 16 }}
484
- />
485
- </View>
486
- </Screen>
487
- );
488
-
489
- const AppRouter: NavigatorParam = {
490
- type: "navigator",
491
- path: "/",
492
- layout: "drawer",
493
- routes: [
494
- {
495
- type: "screen",
496
- path: "/",
497
- component: DashboardScreen,
498
- options: {
499
- title: "Dashboard",
500
- tabBarLabel: "Dashboard",
501
- tabBarIcon: ({ focused }: { focused: boolean }) => (
502
- <Icon
503
- name="view-dashboard"
504
- color={focused ? "blue" : "gray"}
505
- size="md"
506
- />
507
- ),
508
- },
509
- },
510
- {
511
- type: "screen",
512
- path: "/gallery",
513
- component: ComponentGalleryScreen,
514
- options: {
515
- title: "Component Gallery",
516
- tabBarLabel: "Gallery",
517
- tabBarIcon: ({ focused }: { focused: boolean }) => (
518
- <Icon name="toy-brick" color={focused ? "blue" : "gray"} size="md" />
519
- ),
520
- },
521
- },
522
- {
523
- type: "screen",
524
- path: "/interactive",
525
- component: InteractiveDemoScreen,
526
- options: {
527
- title: "Interactive Demo",
528
- tabBarLabel: "Interactive",
529
- tabBarIcon: ({ focused }: { focused: boolean }) => (
530
- <Icon
531
- name="gesture-tap"
532
- color={focused ? "blue" : "gray"}
533
- size="md"
534
- />
535
- ),
536
- },
537
- },
538
- {
539
- type: "screen",
540
- path: "/theme",
541
- component: ThemeShowcaseScreen,
542
- options: {
543
- title: "Theme Showcase",
544
- tabBarLabel: "Themes",
545
- tabBarIcon: ({ focused }: { focused: boolean }) => (
546
- <Icon name="palette" color={focused ? "blue" : "gray"} size="md" />
547
- ),
548
- },
549
- },
550
- {
551
- type: "screen",
552
- path: "/api",
553
- component: APIIntegrationScreen,
554
- options: {
555
- title: "API Integration",
556
- tabBarLabel: "API",
557
- tabBarIcon: ({ focused }: { focused: boolean }) => (
558
- <Icon name="api" color={focused ? "blue" : "gray"} size="md" />
559
- ),
560
- },
561
- },
562
- ],
563
- };
564
-
565
- export default AppRouter;
@@ -1,44 +0,0 @@
1
- import { createTRPCProxyClient, httpBatchLink } from "@trpc/client";
2
- import { createTRPCReact } from "@trpc/react-query";
3
- import type { AppRouter } from "@{{workspaceScope}}/api";
4
-
5
- // Create the tRPC React hooks with full type safety
6
- export const trpc: ReturnType<typeof createTRPCReact<AppRouter>> =
7
- createTRPCReact<AppRouter>();
8
-
9
- // Configuration for tRPC client
10
- export interface TRPCClientConfig {
11
- apiUrl: string;
12
- headers?: () => Record<string, string>;
13
- }
14
-
15
- // Create tRPC client factory
16
- export function createTRPCClient(
17
- config: TRPCClientConfig
18
- ): ReturnType<typeof trpc.createClient> {
19
- return trpc.createClient({
20
- links: [
21
- httpBatchLink({
22
- url: config.apiUrl,
23
- headers: config.headers,
24
- }),
25
- ],
26
- });
27
- }
28
-
29
- // Create a vanilla client (for use outside of React components)
30
- export function createVanillaTRPCClient(
31
- config: TRPCClientConfig
32
- ): ReturnType<typeof createTRPCProxyClient<AppRouter>> {
33
- return createTRPCProxyClient<AppRouter>({
34
- links: [
35
- httpBatchLink({
36
- url: config.apiUrl,
37
- headers: config.headers,
38
- }),
39
- ],
40
- });
41
- }
42
-
43
- // Export types
44
- export type { AppRouter } from "@{{workspaceScope}}/api";
@@ -1,50 +0,0 @@
1
- /**
2
- * Theme configuration for Unistyles.
3
- *
4
- * This file must be imported BEFORE any @idealyst/components to ensure
5
- * the theme is registered before stylesheets are created.
6
- *
7
- * Customize your themes here by extending the base Idealyst themes.
8
- */
9
- import { StyleSheet } from 'react-native-unistyles';
10
- import { fromTheme, lightTheme, darkTheme } from '@idealyst/theme';
11
-
12
- // Create custom themes by extending the base themes
13
- // You can use .addIntent(), .addRadius(), .addShadow(), .setSizes() to customize
14
- const customLightTheme = fromTheme(lightTheme)
15
- // Example: Add custom intents
16
- // .addIntent('brand', {
17
- // primary: '#6366f1',
18
- // secondary: '#8b5cf6',
19
- // contrast: '#ffffff',
20
- // })
21
- .build();
22
-
23
- const customDarkTheme = fromTheme(darkTheme)
24
- // Example: Add custom intents (should match light theme)
25
- // .addIntent('brand', {
26
- // primary: '#818cf8',
27
- // secondary: '#a78bfa',
28
- // contrast: '#000000',
29
- // })
30
- .build();
31
-
32
- // Register custom theme type for TypeScript inference
33
- declare module '@idealyst/theme' {
34
- interface CustomThemeRegistry {
35
- theme: typeof customLightTheme;
36
- }
37
- }
38
-
39
- // Configure Unistyles with your themes
40
- StyleSheet.configure({
41
- settings: {
42
- initialTheme: 'light',
43
- // Enable adaptive themes to follow system preference
44
- // adaptiveThemes: true,
45
- },
46
- themes: {
47
- light: customLightTheme,
48
- dark: customDarkTheme,
49
- },
50
- });
@@ -1,22 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2020",
4
- "module": "ESNext",
5
- "moduleResolution": "bundler",
6
- "lib": ["ES2020"],
7
- "esModuleInterop": true,
8
- "allowSyntheticDefaultImports": true,
9
- "strict": true,
10
- "skipLibCheck": true,
11
- "forceConsistentCasingInFileNames": true,
12
- "declaration": true,
13
- "jsx": "react-jsx",
14
- "noEmit": true
15
- },
16
- "include": [
17
- "src/**/*"
18
- ],
19
- "exclude": [
20
- "node_modules"
21
- ]
22
- }