tvi-cli 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +147 -0
- package/dist/index.js +4315 -0
- package/package.json +75 -0
- package/templates/addons/biome/biome.json.hbs +83 -0
- package/templates/addons/husky/.husky/pre-commit +1 -0
- package/templates/addons/pwa/apps/web/next/public/favicon/apple-touch-icon.png +0 -0
- package/templates/addons/pwa/apps/web/next/public/favicon/favicon-96x96.png +0 -0
- package/templates/addons/pwa/apps/web/next/public/favicon/favicon.svg +6 -0
- package/templates/addons/pwa/apps/web/next/public/favicon/site.webmanifest.hbs +21 -0
- package/templates/addons/pwa/apps/web/next/public/favicon/web-app-manifest-192x192.png +0 -0
- package/templates/addons/pwa/apps/web/next/public/favicon/web-app-manifest-512x512.png +0 -0
- package/templates/addons/pwa/apps/web/next/src/app/manifest.ts.hbs +26 -0
- package/templates/addons/pwa/apps/web/vite/public/logo.png +0 -0
- package/templates/addons/pwa/apps/web/vite/pwa-assets.config.ts.hbs +12 -0
- package/templates/addons/turborepo/turbo.json.hbs +43 -0
- package/templates/api/orpc/native/utils/orpc.ts.hbs +35 -0
- package/templates/api/orpc/server/base/src/lib/context.ts.hbs +125 -0
- package/templates/api/orpc/server/base/src/lib/orpc.ts.hbs +21 -0
- package/templates/api/orpc/server/next/src/app/rpc/[...all]/route.ts.hbs +23 -0
- package/templates/api/orpc/web/nuxt/app/plugins/orpc.ts.hbs +35 -0
- package/templates/api/orpc/web/react/base/src/utils/orpc.ts.hbs +42 -0
- package/templates/api/orpc/web/solid/src/utils/orpc.ts.hbs +30 -0
- package/templates/api/orpc/web/svelte/src/lib/orpc.ts.hbs +31 -0
- package/templates/api/trpc/native/utils/trpc.ts.hbs +32 -0
- package/templates/api/trpc/server/base/src/lib/context.ts.hbs +127 -0
- package/templates/api/trpc/server/base/src/lib/trpc.ts.hbs +26 -0
- package/templates/api/trpc/server/next/src/app/trpc/[trpc]/route.ts +14 -0
- package/templates/api/trpc/web/react/base/src/utils/trpc.ts.hbs +97 -0
- package/templates/auth/native/native-base/lib/auth-client.ts.hbs +13 -0
- package/templates/auth/native/nativewind/app/(drawer)/index.tsx.hbs +95 -0
- package/templates/auth/native/nativewind/components/sign-in.tsx.hbs +93 -0
- package/templates/auth/native/nativewind/components/sign-up.tsx.hbs +104 -0
- package/templates/auth/native/unistyles/app/(drawer)/index.tsx.hbs +179 -0
- package/templates/auth/native/unistyles/components/sign-in.tsx.hbs +134 -0
- package/templates/auth/native/unistyles/components/sign-up.tsx.hbs +152 -0
- package/templates/auth/server/base/src/lib/auth.ts.hbs +141 -0
- package/templates/auth/server/db/drizzle/mysql/src/db/schema/auth.ts +58 -0
- package/templates/auth/server/db/drizzle/postgres/src/db/schema/auth.ts +47 -0
- package/templates/auth/server/db/drizzle/sqlite/src/db/schema/auth.ts +55 -0
- package/templates/auth/server/db/mongoose/mongodb/src/db/models/auth.model.ts +68 -0
- package/templates/auth/server/db/prisma/mongodb/prisma/schema/auth.prisma +59 -0
- package/templates/auth/server/db/prisma/mysql/prisma/schema/auth.prisma +59 -0
- package/templates/auth/server/db/prisma/postgres/prisma/schema/auth.prisma +59 -0
- package/templates/auth/server/db/prisma/sqlite/prisma/schema/auth.prisma +59 -0
- package/templates/auth/server/next/src/app/api/auth/[...all]/route.ts +4 -0
- package/templates/auth/web/nuxt/app/components/SignInForm.vue +77 -0
- package/templates/auth/web/nuxt/app/components/SignUpForm.vue +84 -0
- package/templates/auth/web/nuxt/app/components/UserMenu.vue +42 -0
- package/templates/auth/web/nuxt/app/middleware/auth.ts +12 -0
- package/templates/auth/web/nuxt/app/pages/dashboard.vue +27 -0
- package/templates/auth/web/nuxt/app/pages/login.vue +24 -0
- package/templates/auth/web/nuxt/app/plugins/auth-client.ts +16 -0
- package/templates/auth/web/react/base/src/lib/auth-client.ts.hbs +10 -0
- package/templates/auth/web/react/next/src/app/dashboard/page.tsx.hbs +47 -0
- package/templates/auth/web/react/next/src/app/login/page.tsx +16 -0
- package/templates/auth/web/react/next/src/components/sign-in-form.tsx +135 -0
- package/templates/auth/web/react/next/src/components/sign-up-form.tsx +160 -0
- package/templates/auth/web/react/next/src/components/theme-provider.tsx +11 -0
- package/templates/auth/web/react/next/src/components/user-menu.tsx +60 -0
- package/templates/auth/web/react/react-router/src/components/sign-in-form.tsx +135 -0
- package/templates/auth/web/react/react-router/src/components/sign-up-form.tsx +160 -0
- package/templates/auth/web/react/react-router/src/components/user-menu.tsx +60 -0
- package/templates/auth/web/react/react-router/src/routes/dashboard.tsx.hbs +40 -0
- package/templates/auth/web/react/react-router/src/routes/login.tsx +13 -0
- package/templates/auth/web/react/tanstack-router/src/components/sign-in-form.tsx +139 -0
- package/templates/auth/web/react/tanstack-router/src/components/sign-up-form.tsx +164 -0
- package/templates/auth/web/react/tanstack-router/src/components/user-menu.tsx +62 -0
- package/templates/auth/web/react/tanstack-router/src/routes/dashboard.tsx.hbs +47 -0
- package/templates/auth/web/react/tanstack-router/src/routes/login.tsx +18 -0
- package/templates/auth/web/react/tanstack-start/src/components/sign-in-form.tsx +139 -0
- package/templates/auth/web/react/tanstack-start/src/components/sign-up-form.tsx +164 -0
- package/templates/auth/web/react/tanstack-start/src/components/user-menu.tsx +62 -0
- package/templates/auth/web/react/tanstack-start/src/routes/dashboard.tsx.hbs +51 -0
- package/templates/auth/web/react/tanstack-start/src/routes/login.tsx +18 -0
- package/templates/auth/web/solid/src/components/sign-in-form.tsx +132 -0
- package/templates/auth/web/solid/src/components/sign-up-form.tsx +158 -0
- package/templates/auth/web/solid/src/components/user-menu.tsx.hbs +55 -0
- package/templates/auth/web/solid/src/lib/auth-client.ts +5 -0
- package/templates/auth/web/solid/src/routes/dashboard.tsx +38 -0
- package/templates/auth/web/solid/src/routes/login.tsx +23 -0
- package/templates/auth/web/svelte/src/components/SignInForm.svelte +108 -0
- package/templates/auth/web/svelte/src/components/SignUpForm.svelte +142 -0
- package/templates/auth/web/svelte/src/components/UserMenu.svelte +54 -0
- package/templates/auth/web/svelte/src/lib/auth-client.ts +6 -0
- package/templates/auth/web/svelte/src/routes/dashboard/+page.svelte +31 -0
- package/templates/auth/web/svelte/src/routes/login/+page.svelte +12 -0
- package/templates/backend/convex/packages/backend/_gitignore +2 -0
- package/templates/backend/convex/packages/backend/convex/README.md +90 -0
- package/templates/backend/convex/packages/backend/convex/healthCheck.ts +7 -0
- package/templates/backend/convex/packages/backend/convex/schema.ts +9 -0
- package/templates/backend/convex/packages/backend/convex/todos.ts +42 -0
- package/templates/backend/convex/packages/backend/convex/tsconfig.json +25 -0
- package/templates/backend/convex/packages/backend/package.json.hbs +17 -0
- package/templates/backend/server/elysia/src/index.ts.hbs +72 -0
- package/templates/backend/server/express/src/index.ts.hbs +88 -0
- package/templates/backend/server/fastify/src/index.ts.hbs +155 -0
- package/templates/backend/server/hono/src/index.ts.hbs +133 -0
- package/templates/backend/server/next/next-env.d.ts +5 -0
- package/templates/backend/server/next/next.config.ts +7 -0
- package/templates/backend/server/next/package.json.hbs +24 -0
- package/templates/backend/server/next/src/app/route.ts +5 -0
- package/templates/backend/server/next/src/middleware.ts +19 -0
- package/templates/backend/server/next/tsconfig.json.hbs +33 -0
- package/templates/backend/server/server-base/_gitignore +52 -0
- package/templates/backend/server/server-base/package.json.hbs +28 -0
- package/templates/backend/server/server-base/src/routers/index.ts.hbs +53 -0
- package/templates/backend/server/server-base/tsconfig.json.hbs +39 -0
- package/templates/base/_gitignore +2 -0
- package/templates/base/package.json.hbs +11 -0
- package/templates/db/drizzle/mysql/drizzle.config.ts.hbs +10 -0
- package/templates/db/drizzle/mysql/src/db/index.ts.hbs +20 -0
- package/templates/db/drizzle/postgres/drizzle.config.ts.hbs +10 -0
- package/templates/db/drizzle/postgres/src/db/index.ts.hbs +12 -0
- package/templates/db/drizzle/sqlite/drizzle.config.ts.hbs +24 -0
- package/templates/db/drizzle/sqlite/src/db/index.ts.hbs +35 -0
- package/templates/db/mongoose/mongodb/src/db/index.ts.hbs +9 -0
- package/templates/db/prisma/mongodb/prisma/index.ts.hbs +5 -0
- package/templates/db/prisma/mongodb/prisma/schema/schema.prisma +10 -0
- package/templates/db/prisma/mongodb/prisma.config.ts.hbs +8 -0
- package/templates/db/prisma/mysql/prisma/index.ts +5 -0
- package/templates/db/prisma/mysql/prisma/schema/schema.prisma +10 -0
- package/templates/db/prisma/mysql/prisma.config.ts +8 -0
- package/templates/db/prisma/postgres/prisma/index.ts +5 -0
- package/templates/db/prisma/postgres/prisma/schema/schema.prisma.hbs +13 -0
- package/templates/db/prisma/postgres/prisma.config.ts.hbs +12 -0
- package/templates/db/prisma/sqlite/prisma/index.ts +5 -0
- package/templates/db/prisma/sqlite/prisma/schema/schema.prisma +10 -0
- package/templates/db/prisma/sqlite/prisma.config.ts +8 -0
- package/templates/examples/ai/native/nativewind/app/(drawer)/ai.tsx.hbs +155 -0
- package/templates/examples/ai/native/nativewind/polyfills.js +25 -0
- package/templates/examples/ai/native/unistyles/app/(drawer)/ai.tsx.hbs +279 -0
- package/templates/examples/ai/native/unistyles/polyfills.js +25 -0
- package/templates/examples/ai/server/next/src/app/ai/route.ts +15 -0
- package/templates/examples/ai/web/nuxt/app/pages/ai.vue +63 -0
- package/templates/examples/ai/web/react/next/src/app/ai/page.tsx +67 -0
- package/templates/examples/ai/web/react/react-router/src/routes/ai.tsx +64 -0
- package/templates/examples/ai/web/react/tanstack-router/src/routes/ai.tsx +69 -0
- package/templates/examples/ai/web/react/tanstack-start/src/routes/ai.tsx +69 -0
- package/templates/examples/ai/web/svelte/src/routes/ai/+page.svelte +98 -0
- package/templates/examples/todo/native/nativewind/app/(drawer)/todos.tsx.hbs +295 -0
- package/templates/examples/todo/native/unistyles/app/(drawer)/todos.tsx.hbs +340 -0
- package/templates/examples/todo/server/drizzle/base/src/routers/todo.ts.hbs +79 -0
- package/templates/examples/todo/server/drizzle/mysql/src/db/schema/todo.ts +7 -0
- package/templates/examples/todo/server/drizzle/postgres/src/db/schema/todo.ts +7 -0
- package/templates/examples/todo/server/drizzle/sqlite/src/db/schema/todo.ts +7 -0
- package/templates/examples/todo/server/mongoose/base/src/routers/todo.ts.hbs +66 -0
- package/templates/examples/todo/server/mongoose/mongodb/src/db/models/todo.model.ts +24 -0
- package/templates/examples/todo/server/prisma/base/src/routers/todo.ts.hbs +118 -0
- package/templates/examples/todo/server/prisma/mongodb/prisma/schema/todo.prisma +7 -0
- package/templates/examples/todo/server/prisma/mysql/prisma/schema/todo.prisma +7 -0
- package/templates/examples/todo/server/prisma/postgres/prisma/schema/todo.prisma +7 -0
- package/templates/examples/todo/server/prisma/sqlite/prisma/schema/todo.prisma +7 -0
- package/templates/examples/todo/web/nuxt/app/pages/todos.vue +108 -0
- package/templates/examples/todo/web/react/next/src/app/todos/page.tsx.hbs +245 -0
- package/templates/examples/todo/web/react/react-router/src/routes/todos.tsx.hbs +242 -0
- package/templates/examples/todo/web/react/tanstack-router/src/routes/todos.tsx.hbs +247 -0
- package/templates/examples/todo/web/react/tanstack-start/src/routes/todos.tsx.hbs +268 -0
- package/templates/examples/todo/web/solid/src/routes/todos.tsx.hbs +132 -0
- package/templates/examples/todo/web/svelte/src/routes/todos/+page.svelte.hbs +317 -0
- package/templates/extras/_npmrc.hbs +5 -0
- package/templates/extras/pnpm-workspace.yaml +3 -0
- package/templates/frontend/native/native-base/assets/adaptive-icon.png +0 -0
- package/templates/frontend/native/native-base/assets/favicon.png +0 -0
- package/templates/frontend/native/native-base/assets/icon.png +0 -0
- package/templates/frontend/native/native-base/assets/splash.png +0 -0
- package/templates/frontend/native/nativewind/_gitignore +25 -0
- package/templates/frontend/native/nativewind/app/(drawer)/(tabs)/_layout.tsx +46 -0
- package/templates/frontend/native/nativewind/app/(drawer)/(tabs)/index.tsx +19 -0
- package/templates/frontend/native/nativewind/app/(drawer)/(tabs)/two.tsx +19 -0
- package/templates/frontend/native/nativewind/app/(drawer)/_layout.tsx.hbs +67 -0
- package/templates/frontend/native/nativewind/app/(drawer)/index.tsx.hbs +95 -0
- package/templates/frontend/native/nativewind/app/+html.tsx +47 -0
- package/templates/frontend/native/nativewind/app/+not-found.tsx +29 -0
- package/templates/frontend/native/nativewind/app/_layout.tsx.hbs +126 -0
- package/templates/frontend/native/nativewind/app/modal.tsx +14 -0
- package/templates/frontend/native/nativewind/app-env.d.ts +2 -0
- package/templates/frontend/native/nativewind/app.json +46 -0
- package/templates/frontend/native/nativewind/babel.config.js +11 -0
- package/templates/frontend/native/nativewind/components/container.tsx +8 -0
- package/templates/frontend/native/nativewind/components/header-button.tsx +26 -0
- package/templates/frontend/native/nativewind/components/tabbar-icon.tsx +8 -0
- package/templates/frontend/native/nativewind/global.css +50 -0
- package/templates/frontend/native/nativewind/lib/android-navigation-bar.tsx +11 -0
- package/templates/frontend/native/nativewind/lib/constants.ts +18 -0
- package/templates/frontend/native/nativewind/lib/use-color-scheme.ts +12 -0
- package/templates/frontend/native/nativewind/metro.config.js +59 -0
- package/templates/frontend/native/nativewind/package.json.hbs +49 -0
- package/templates/frontend/native/nativewind/tailwind.config.js +59 -0
- package/templates/frontend/native/nativewind/tsconfig.json.hbs +23 -0
- package/templates/frontend/native/unistyles/_gitignore +24 -0
- package/templates/frontend/native/unistyles/app/(drawer)/(tabs)/_layout.tsx +39 -0
- package/templates/frontend/native/unistyles/app/(drawer)/(tabs)/index.tsx +37 -0
- package/templates/frontend/native/unistyles/app/(drawer)/(tabs)/two.tsx +37 -0
- package/templates/frontend/native/unistyles/app/(drawer)/_layout.tsx.hbs +87 -0
- package/templates/frontend/native/unistyles/app/(drawer)/index.tsx.hbs +194 -0
- package/templates/frontend/native/unistyles/app/+html.tsx +48 -0
- package/templates/frontend/native/unistyles/app/+not-found.tsx +65 -0
- package/templates/frontend/native/unistyles/app/_layout.tsx.hbs +104 -0
- package/templates/frontend/native/unistyles/app/modal.tsx +33 -0
- package/templates/frontend/native/unistyles/app.json +44 -0
- package/templates/frontend/native/unistyles/babel.config.js +20 -0
- package/templates/frontend/native/unistyles/breakpoints.ts +9 -0
- package/templates/frontend/native/unistyles/components/container.tsx +15 -0
- package/templates/frontend/native/unistyles/components/header-button.tsx +36 -0
- package/templates/frontend/native/unistyles/components/tabbar-icon.tsx +8 -0
- package/templates/frontend/native/unistyles/expo-env.d.ts +3 -0
- package/templates/frontend/native/unistyles/index.js +2 -0
- package/templates/frontend/native/unistyles/metro.config.js +20 -0
- package/templates/frontend/native/unistyles/package.json.hbs +50 -0
- package/templates/frontend/native/unistyles/theme.ts +98 -0
- package/templates/frontend/native/unistyles/tsconfig.json.hbs +17 -0
- package/templates/frontend/native/unistyles/unistyles.ts +27 -0
- package/templates/frontend/nuxt/_gitignore +24 -0
- package/templates/frontend/nuxt/app/app.config.ts +15 -0
- package/templates/frontend/nuxt/app/app.vue +13 -0
- package/templates/frontend/nuxt/app/assets/css/main.css +2 -0
- package/templates/frontend/nuxt/app/components/Header.vue.hbs +45 -0
- package/templates/frontend/nuxt/app/components/Loader.vue +5 -0
- package/templates/frontend/nuxt/app/components/ModeToggle.vue +23 -0
- package/templates/frontend/nuxt/app/layouts/default.vue.hbs +11 -0
- package/templates/frontend/nuxt/app/pages/index.vue.hbs +57 -0
- package/templates/frontend/nuxt/app/plugins/vue-query.ts.hbs +44 -0
- package/templates/frontend/nuxt/nuxt.config.ts.hbs +19 -0
- package/templates/frontend/nuxt/package.json.hbs +25 -0
- package/templates/frontend/nuxt/public/favicon.ico +0 -0
- package/templates/frontend/nuxt/public/robots.txt +2 -0
- package/templates/frontend/nuxt/server/tsconfig.json +3 -0
- package/templates/frontend/nuxt/tsconfig.json.hbs +9 -0
- package/templates/frontend/react/next/next-env.d.ts.hbs +5 -0
- package/templates/frontend/react/next/next.config.ts.hbs +5 -0
- package/templates/frontend/react/next/package.json.hbs +34 -0
- package/templates/frontend/react/next/postcss.config.mjs.hbs +5 -0
- package/templates/frontend/react/next/src/app/favicon.ico +0 -0
- package/templates/frontend/react/next/src/app/layout.tsx.hbs +41 -0
- package/templates/frontend/react/next/src/app/page.tsx.hbs +68 -0
- package/templates/frontend/react/next/src/components/mode-toggle.tsx.hbs +39 -0
- package/templates/frontend/react/next/src/components/providers.tsx.hbs +56 -0
- package/templates/frontend/react/next/src/components/theme-provider.tsx.hbs +11 -0
- package/templates/frontend/react/next/tsconfig.json.hbs +33 -0
- package/templates/frontend/react/react-router/package.json.hbs +42 -0
- package/templates/frontend/react/react-router/public/favicon.ico +0 -0
- package/templates/frontend/react/react-router/react-router.config.ts +6 -0
- package/templates/frontend/react/react-router/src/components/mode-toggle.tsx +37 -0
- package/templates/frontend/react/react-router/src/components/theme-provider.tsx +73 -0
- package/templates/frontend/react/react-router/src/root.tsx.hbs +152 -0
- package/templates/frontend/react/react-router/src/routes/_index.tsx.hbs +74 -0
- package/templates/frontend/react/react-router/src/routes.ts +4 -0
- package/templates/frontend/react/react-router/tsconfig.json.hbs +32 -0
- package/templates/frontend/react/react-router/vite.config.ts.hbs +33 -0
- package/templates/frontend/react/tanstack-router/index.html +12 -0
- package/templates/frontend/react/tanstack-router/package.json.hbs +41 -0
- package/templates/frontend/react/tanstack-router/src/components/mode-toggle.tsx +37 -0
- package/templates/frontend/react/tanstack-router/src/components/theme-provider.tsx +73 -0
- package/templates/frontend/react/tanstack-router/src/main.tsx.hbs +66 -0
- package/templates/frontend/react/tanstack-router/src/routes/__root.tsx.hbs +100 -0
- package/templates/frontend/react/tanstack-router/src/routes/index.tsx.hbs +74 -0
- package/templates/frontend/react/tanstack-router/tsconfig.json.hbs +23 -0
- package/templates/frontend/react/tanstack-router/vite.config.ts.hbs +39 -0
- package/templates/frontend/react/tanstack-start/package.json.hbs +44 -0
- package/templates/frontend/react/tanstack-start/public/robots.txt +3 -0
- package/templates/frontend/react/tanstack-start/src/router.tsx.hbs +144 -0
- package/templates/frontend/react/tanstack-start/src/routes/__root.tsx.hbs +97 -0
- package/templates/frontend/react/tanstack-start/src/routes/index.tsx.hbs +74 -0
- package/templates/frontend/react/tanstack-start/tsconfig.json.hbs +33 -0
- package/templates/frontend/react/tanstack-start/vite.config.ts +8 -0
- package/templates/frontend/react/web-base/_gitignore +52 -0
- package/templates/frontend/react/web-base/components.json +21 -0
- package/templates/frontend/react/web-base/src/components/header.tsx.hbs +79 -0
- package/templates/frontend/react/web-base/src/components/loader.tsx +9 -0
- package/templates/frontend/react/web-base/src/components/ui/button.tsx +59 -0
- package/templates/frontend/react/web-base/src/components/ui/card.tsx +92 -0
- package/templates/frontend/react/web-base/src/components/ui/checkbox.tsx +30 -0
- package/templates/frontend/react/web-base/src/components/ui/dropdown-menu.tsx +257 -0
- package/templates/frontend/react/web-base/src/components/ui/input.tsx +21 -0
- package/templates/frontend/react/web-base/src/components/ui/label.tsx +22 -0
- package/templates/frontend/react/web-base/src/components/ui/skeleton.tsx +13 -0
- package/templates/frontend/react/web-base/src/components/ui/sonner.tsx +25 -0
- package/templates/frontend/react/web-base/src/index.css +134 -0
- package/templates/frontend/react/web-base/src/lib/utils.ts +6 -0
- package/templates/frontend/solid/_gitignore +7 -0
- package/templates/frontend/solid/index.html +13 -0
- package/templates/frontend/solid/package.json.hbs +27 -0
- package/templates/frontend/solid/public/robots.txt +3 -0
- package/templates/frontend/solid/src/components/header.tsx.hbs +38 -0
- package/templates/frontend/solid/src/components/loader.tsx +9 -0
- package/templates/frontend/solid/src/main.tsx.hbs +38 -0
- package/templates/frontend/solid/src/routes/__root.tsx.hbs +34 -0
- package/templates/frontend/solid/src/routes/index.tsx.hbs +61 -0
- package/templates/frontend/solid/src/styles.css +5 -0
- package/templates/frontend/solid/tsconfig.json.hbs +34 -0
- package/templates/frontend/solid/vite.config.js.hbs +39 -0
- package/templates/frontend/svelte/_gitignore +23 -0
- package/templates/frontend/svelte/_npmrc +1 -0
- package/templates/frontend/svelte/package.json.hbs +31 -0
- package/templates/frontend/svelte/src/app.css +5 -0
- package/templates/frontend/svelte/src/app.d.ts +13 -0
- package/templates/frontend/svelte/src/app.html +12 -0
- package/templates/frontend/svelte/src/components/Header.svelte.hbs +40 -0
- package/templates/frontend/svelte/src/lib/index.ts +1 -0
- package/templates/frontend/svelte/src/routes/+layout.svelte.hbs +54 -0
- package/templates/frontend/svelte/src/routes/+page.svelte.hbs +72 -0
- package/templates/frontend/svelte/static/favicon.png +0 -0
- package/templates/frontend/svelte/svelte.config.js +18 -0
- package/templates/frontend/svelte/tsconfig.json.hbs +24 -0
- package/templates/frontend/svelte/vite.config.ts +7 -0
- package/templates/runtime/workers/apps/server/wrangler.jsonc.hbs +34 -0
@@ -0,0 +1,87 @@
|
|
1
|
+
import { Ionicons, MaterialIcons } from "@expo/vector-icons";
|
2
|
+
import { Link } from "expo-router";
|
3
|
+
import { Drawer } from "expo-router/drawer";
|
4
|
+
import { useUnistyles } from "react-native-unistyles";
|
5
|
+
|
6
|
+
import { HeaderButton } from "../../components/header-button";
|
7
|
+
|
8
|
+
const DrawerLayout = () => {
|
9
|
+
const { theme } = useUnistyles();
|
10
|
+
|
11
|
+
return (
|
12
|
+
<Drawer
|
13
|
+
screenOptions=\{{
|
14
|
+
headerStyle: {
|
15
|
+
backgroundColor: theme.colors.background,
|
16
|
+
},
|
17
|
+
headerTitleStyle: {
|
18
|
+
color: theme.colors.foreground,
|
19
|
+
},
|
20
|
+
headerTintColor: theme.colors.foreground,
|
21
|
+
drawerStyle: {
|
22
|
+
backgroundColor: theme.colors.background,
|
23
|
+
},
|
24
|
+
drawerLabelStyle: {
|
25
|
+
color: theme.colors.foreground,
|
26
|
+
},
|
27
|
+
drawerInactiveTintColor: theme.colors.mutedForeground,
|
28
|
+
}}
|
29
|
+
>
|
30
|
+
<Drawer.Screen
|
31
|
+
name="index"
|
32
|
+
options=\{{
|
33
|
+
headerTitle: "Home",
|
34
|
+
drawerLabel: "Home",
|
35
|
+
drawerIcon: ({ size, color }) => (
|
36
|
+
<Ionicons name="home-outline" size={size} color={color} />
|
37
|
+
),
|
38
|
+
}}
|
39
|
+
/>
|
40
|
+
<Drawer.Screen
|
41
|
+
name="(tabs)"
|
42
|
+
options=\{{
|
43
|
+
headerTitle: "Tabs",
|
44
|
+
drawerLabel: "Tabs",
|
45
|
+
drawerIcon: ({ size, color }) => (
|
46
|
+
<MaterialIcons name="border-bottom" size={size} color={color} />
|
47
|
+
),
|
48
|
+
headerRight: () => (
|
49
|
+
<Link href="/modal" asChild>
|
50
|
+
<HeaderButton />
|
51
|
+
</Link>
|
52
|
+
),
|
53
|
+
}}
|
54
|
+
/>
|
55
|
+
{{#if (includes examples "todo")}}
|
56
|
+
<Drawer.Screen
|
57
|
+
name="todos"
|
58
|
+
options=\{{
|
59
|
+
headerTitle: "Todos",
|
60
|
+
drawerLabel: "Todos",
|
61
|
+
drawerIcon: ({ size, color }) => (
|
62
|
+
<Ionicons name="checkbox-outline" size={size} color={color} />
|
63
|
+
),
|
64
|
+
}}
|
65
|
+
/>
|
66
|
+
{{/if}}
|
67
|
+
{{#if (includes examples "ai")}}
|
68
|
+
<Drawer.Screen
|
69
|
+
name="ai"
|
70
|
+
options=\{{
|
71
|
+
headerTitle: "AI",
|
72
|
+
drawerLabel: "AI",
|
73
|
+
drawerIcon: ({ size, color }) => (
|
74
|
+
<Ionicons
|
75
|
+
name="chatbubble-ellipses-outline"
|
76
|
+
size={size}
|
77
|
+
color={color}
|
78
|
+
/>
|
79
|
+
),
|
80
|
+
}}
|
81
|
+
/>
|
82
|
+
{{/if}}
|
83
|
+
</Drawer>
|
84
|
+
);
|
85
|
+
};
|
86
|
+
|
87
|
+
export default DrawerLayout;
|
@@ -0,0 +1,194 @@
|
|
1
|
+
import { ScrollView, Text, View } from "react-native";
|
2
|
+
import { StyleSheet } from "react-native-unistyles";
|
3
|
+
import { Container } from "@/components/container";
|
4
|
+
|
5
|
+
{{#if (eq api "orpc")}}
|
6
|
+
import { useQuery } from "@tanstack/react-query";
|
7
|
+
import { orpc } from "@/utils/orpc";
|
8
|
+
{{/if}}
|
9
|
+
{{#if (eq api "trpc")}}
|
10
|
+
import { useQuery } from "@tanstack/react-query";
|
11
|
+
import { trpc } from "@/utils/trpc";
|
12
|
+
{{/if}}
|
13
|
+
{{#if (eq backend "convex")}}
|
14
|
+
import { useQuery } from "convex/react";
|
15
|
+
import { api } from "@{{ projectName }}/backend/convex/_generated/api";
|
16
|
+
{{/if}}
|
17
|
+
|
18
|
+
export default function Home() {
|
19
|
+
{{#if (eq api "orpc")}}
|
20
|
+
const healthCheck = useQuery(orpc.healthCheck.queryOptions());
|
21
|
+
{{/if}}
|
22
|
+
{{#if (eq api "trpc")}}
|
23
|
+
const healthCheck = useQuery(trpc.healthCheck.queryOptions());
|
24
|
+
{{/if}}
|
25
|
+
{{#if (eq backend "convex")}}
|
26
|
+
const healthCheck = useQuery(api.healthCheck.get);
|
27
|
+
{{/if}}
|
28
|
+
|
29
|
+
return (
|
30
|
+
<Container>
|
31
|
+
<ScrollView
|
32
|
+
contentContainerStyle={styles.container}
|
33
|
+
showsVerticalScrollIndicator={false}
|
34
|
+
>
|
35
|
+
<Text className="font-mono text-foreground text-3xl font-bold mb-4">
|
36
|
+
TVI
|
37
|
+
</Text>
|
38
|
+
<View style={styles.statusCard}>
|
39
|
+
<View style={styles.statusHeader}>
|
40
|
+
<Text style={styles.statusTitle}>System Status</Text>
|
41
|
+
<View style={styles.statusBadge}>
|
42
|
+
<Text style={styles.statusBadgeText}>LIVE</Text>
|
43
|
+
</View>
|
44
|
+
</View>
|
45
|
+
|
46
|
+
{{#if (eq backend "convex")}}
|
47
|
+
<View style={styles.statusRow}>
|
48
|
+
<View
|
49
|
+
style={[
|
50
|
+
styles.statusDot,
|
51
|
+
healthCheck === "OK"
|
52
|
+
? styles.statusDotSuccess
|
53
|
+
: styles.statusDotWarning,
|
54
|
+
]}
|
55
|
+
/>
|
56
|
+
<View style={styles.statusContent}>
|
57
|
+
<Text style={styles.statusLabel}>Convex</Text>
|
58
|
+
<Text style={styles.statusDescription}>
|
59
|
+
{healthCheck === undefined
|
60
|
+
? "Checking connection..."
|
61
|
+
: healthCheck === "OK"
|
62
|
+
? "All systems operational"
|
63
|
+
: "Service unavailable"}
|
64
|
+
</Text>
|
65
|
+
</View>
|
66
|
+
</View>
|
67
|
+
{{else}}
|
68
|
+
{{#unless (eq api "none")}}
|
69
|
+
<View style={styles.statusRow}>
|
70
|
+
<View
|
71
|
+
style={[
|
72
|
+
styles.statusDot,
|
73
|
+
healthCheck.data
|
74
|
+
? styles.statusDotSuccess
|
75
|
+
: styles.statusDotWarning,
|
76
|
+
]}
|
77
|
+
/>
|
78
|
+
<View style={styles.statusContent}>
|
79
|
+
<Text style={styles.statusLabel}>
|
80
|
+
{{#if (eq api "orpc")}}
|
81
|
+
ORPC
|
82
|
+
{{/if}}
|
83
|
+
{{#if (eq api "trpc")}}
|
84
|
+
TRPC
|
85
|
+
{{/if}}
|
86
|
+
</Text>
|
87
|
+
<Text style={styles.statusDescription}>
|
88
|
+
{{#if (eq api "orpc")}}
|
89
|
+
{healthCheck.isLoading
|
90
|
+
? "Checking connection..."
|
91
|
+
: healthCheck.data
|
92
|
+
? "All systems operational"
|
93
|
+
: "Service unavailable"}
|
94
|
+
{{/if}}
|
95
|
+
{{#if (eq api "trpc")}}
|
96
|
+
{healthCheck.isLoading
|
97
|
+
? "Checking connection..."
|
98
|
+
: healthCheck.data
|
99
|
+
? "All systems operational"
|
100
|
+
: "Service unavailable"}
|
101
|
+
{{/if}}
|
102
|
+
</Text>
|
103
|
+
</View>
|
104
|
+
</View>
|
105
|
+
{{/unless}}
|
106
|
+
{{/if}}
|
107
|
+
</View>
|
108
|
+
</ScrollView>
|
109
|
+
</Container>
|
110
|
+
);
|
111
|
+
}
|
112
|
+
|
113
|
+
const styles = StyleSheet.create((theme) => ({
|
114
|
+
container: {
|
115
|
+
paddingHorizontal: theme.spacing.md,
|
116
|
+
},
|
117
|
+
heroSection: {
|
118
|
+
paddingVertical: theme.spacing.xl,
|
119
|
+
},
|
120
|
+
heroTitle: {
|
121
|
+
fontSize: theme.fontSize["4xl"],
|
122
|
+
fontWeight: "bold",
|
123
|
+
color: theme.colors.foreground,
|
124
|
+
marginBottom: theme.spacing.sm,
|
125
|
+
},
|
126
|
+
heroSubtitle: {
|
127
|
+
fontSize: theme.fontSize.lg,
|
128
|
+
color: theme.colors.mutedForeground,
|
129
|
+
lineHeight: 28,
|
130
|
+
},
|
131
|
+
statusCard: {
|
132
|
+
backgroundColor: theme.colors.card,
|
133
|
+
borderWidth: 1,
|
134
|
+
borderColor: theme.colors.border,
|
135
|
+
borderRadius: theme.borderRadius.xl,
|
136
|
+
padding: theme.spacing.lg,
|
137
|
+
marginBottom: theme.spacing.lg,
|
138
|
+
shadowColor: "#000",
|
139
|
+
shadowOffset: { width: 0, height: 1 },
|
140
|
+
shadowOpacity: 0.05,
|
141
|
+
shadowRadius: 3,
|
142
|
+
elevation: 2,
|
143
|
+
},
|
144
|
+
statusHeader: {
|
145
|
+
flexDirection: "row",
|
146
|
+
alignItems: "center",
|
147
|
+
justifyContent: "space-between",
|
148
|
+
marginBottom: theme.spacing.md,
|
149
|
+
},
|
150
|
+
statusTitle: {
|
151
|
+
fontSize: theme.fontSize.lg,
|
152
|
+
fontWeight: "600",
|
153
|
+
color: theme.colors.cardForeground,
|
154
|
+
},
|
155
|
+
statusBadge: {
|
156
|
+
backgroundColor: theme.colors.secondary,
|
157
|
+
paddingHorizontal: theme.spacing.sm + 4,
|
158
|
+
paddingVertical: theme.spacing.xs,
|
159
|
+
borderRadius: 9999,
|
160
|
+
},
|
161
|
+
statusBadgeText: {
|
162
|
+
fontSize: theme.fontSize.xs,
|
163
|
+
fontWeight: "500",
|
164
|
+
color: theme.colors.secondaryForeground,
|
165
|
+
},
|
166
|
+
statusRow: {
|
167
|
+
flexDirection: "row",
|
168
|
+
alignItems: "center",
|
169
|
+
gap: theme.spacing.sm + 4,
|
170
|
+
},
|
171
|
+
statusDot: {
|
172
|
+
height: 12,
|
173
|
+
width: 12,
|
174
|
+
borderRadius: 6,
|
175
|
+
},
|
176
|
+
statusDotSuccess: {
|
177
|
+
backgroundColor: theme.colors.success,
|
178
|
+
},
|
179
|
+
statusDotWarning: {
|
180
|
+
backgroundColor: "#F59E0B",
|
181
|
+
},
|
182
|
+
statusContent: {
|
183
|
+
flex: 1,
|
184
|
+
},
|
185
|
+
statusLabel: {
|
186
|
+
fontSize: theme.fontSize.sm,
|
187
|
+
fontWeight: "500",
|
188
|
+
color: theme.colors.cardForeground,
|
189
|
+
},
|
190
|
+
statusDescription: {
|
191
|
+
fontSize: theme.fontSize.xs,
|
192
|
+
color: theme.colors.mutedForeground,
|
193
|
+
}
|
194
|
+
}));
|
@@ -0,0 +1,48 @@
|
|
1
|
+
import { ScrollViewStyleReset } from 'expo-router/html';
|
2
|
+
|
3
|
+
import '../unistyles';
|
4
|
+
|
5
|
+
// This file is web-only and used to configure the root HTML for every
|
6
|
+
// web page during static rendering.
|
7
|
+
// The contents of this function only run in Node.js environments and
|
8
|
+
// do not have access to the DOM or browser APIs.
|
9
|
+
export default function Root({ children }: { children: React.ReactNode }) {
|
10
|
+
return (
|
11
|
+
<html lang="en">
|
12
|
+
<head>
|
13
|
+
<meta charSet="utf-8" />
|
14
|
+
<meta httpEquiv="X-UA-Compatible" content="IE=edge" />
|
15
|
+
|
16
|
+
{/*
|
17
|
+
This viewport disables scaling which makes the mobile website act more like a native app.
|
18
|
+
However this does reduce built-in accessibility. If you want to enable scaling, use this instead:
|
19
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
|
20
|
+
*/}
|
21
|
+
<meta
|
22
|
+
name="viewport"
|
23
|
+
content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1.00001,viewport-fit=cover"
|
24
|
+
/>
|
25
|
+
{/*
|
26
|
+
Disable body scrolling on web. This makes ScrollView components work closer to how they do on native.
|
27
|
+
However, body scrolling is often nice to have for mobile web. If you want to enable it, remove this line.
|
28
|
+
*/}
|
29
|
+
<ScrollViewStyleReset />
|
30
|
+
|
31
|
+
{/* Using raw CSS styles as an escape-hatch to ensure the background color never flickers in dark-mode. */}
|
32
|
+
<style dangerouslySetInnerHTML={{ __html: responsiveBackground }} />
|
33
|
+
{/* Add any additional <head> elements that you want globally available on web... */}
|
34
|
+
</head>
|
35
|
+
<body>{children}</body>
|
36
|
+
</html>
|
37
|
+
);
|
38
|
+
}
|
39
|
+
|
40
|
+
const responsiveBackground = `
|
41
|
+
body {
|
42
|
+
background-color: #fff;
|
43
|
+
}
|
44
|
+
@media (prefers-color-scheme: dark) {
|
45
|
+
body {
|
46
|
+
background-color: #000;
|
47
|
+
}
|
48
|
+
}`;
|
@@ -0,0 +1,65 @@
|
|
1
|
+
import { Container } from "@/components/container";
|
2
|
+
import { Link, Stack } from "expo-router";
|
3
|
+
import { Text, View } from "react-native";
|
4
|
+
import { StyleSheet } from "react-native-unistyles";
|
5
|
+
|
6
|
+
export default function NotFoundScreen() {
|
7
|
+
return (
|
8
|
+
<>
|
9
|
+
<Stack.Screen options={{ title: "Oops!" }} />
|
10
|
+
<Container>
|
11
|
+
<View style={styles.container}>
|
12
|
+
<View style={styles.content}>
|
13
|
+
<Text style={styles.emoji}>?</Text>
|
14
|
+
<Text style={styles.title}>Page Not Found</Text>
|
15
|
+
<Text style={styles.description}>
|
16
|
+
Sorry, the page you're looking for doesn't exist.
|
17
|
+
</Text>
|
18
|
+
<Link href="/" style={styles.button}>
|
19
|
+
<Text style={styles.buttonText}>Go to Home</Text>
|
20
|
+
</Link>
|
21
|
+
</View>
|
22
|
+
</View>
|
23
|
+
</Container>
|
24
|
+
</>
|
25
|
+
);
|
26
|
+
}
|
27
|
+
|
28
|
+
const styles = StyleSheet.create((theme) => ({
|
29
|
+
container: {
|
30
|
+
flex: 1,
|
31
|
+
justifyContent: "center",
|
32
|
+
alignItems: "center",
|
33
|
+
padding: theme.spacing.lg,
|
34
|
+
},
|
35
|
+
content: {
|
36
|
+
alignItems: "center",
|
37
|
+
},
|
38
|
+
emoji: {
|
39
|
+
fontSize: 64,
|
40
|
+
marginBottom: theme.spacing.md,
|
41
|
+
},
|
42
|
+
title: {
|
43
|
+
fontSize: theme.fontSize["2xl"],
|
44
|
+
fontWeight: "bold",
|
45
|
+
color: theme.colors.foreground,
|
46
|
+
marginBottom: theme.spacing.sm,
|
47
|
+
textAlign: "center",
|
48
|
+
},
|
49
|
+
description: {
|
50
|
+
color: theme.colors.mutedForeground,
|
51
|
+
textAlign: "center",
|
52
|
+
marginBottom: theme.spacing.xl,
|
53
|
+
maxWidth: 280,
|
54
|
+
},
|
55
|
+
button: {
|
56
|
+
backgroundColor: `${theme.colors.primary}1A`, // 10% opacity
|
57
|
+
paddingHorizontal: theme.spacing.lg,
|
58
|
+
paddingVertical: theme.spacing.sm + 4,
|
59
|
+
borderRadius: theme.borderRadius.lg,
|
60
|
+
},
|
61
|
+
buttonText: {
|
62
|
+
color: theme.colors.primary,
|
63
|
+
fontWeight: "500",
|
64
|
+
},
|
65
|
+
}));
|
@@ -0,0 +1,104 @@
|
|
1
|
+
{{#if (includes examples "ai")}}
|
2
|
+
import "@/polyfills";
|
3
|
+
{{/if}}
|
4
|
+
{{#if (eq api "trpc")}}
|
5
|
+
import { queryClient } from "@/utils/trpc";
|
6
|
+
{{/if}}
|
7
|
+
{{#if (eq api "orpc")}}
|
8
|
+
import { queryClient } from "@/utils/orpc";
|
9
|
+
{{/if}}
|
10
|
+
{{#if (eq backend "convex")}}
|
11
|
+
import { ConvexProvider, ConvexReactClient } from "convex/react";
|
12
|
+
{{else}}
|
13
|
+
{{#unless (eq api "none")}}
|
14
|
+
import { QueryClientProvider } from "@tanstack/react-query";
|
15
|
+
{{/unless}}
|
16
|
+
{{/if}}
|
17
|
+
import { Stack } from "expo-router";
|
18
|
+
import { GestureHandlerRootView } from "react-native-gesture-handler";
|
19
|
+
import { useUnistyles } from "react-native-unistyles";
|
20
|
+
|
21
|
+
export const unstable_settings = {
|
22
|
+
// Ensure that reloading on `/modal` keeps a back button present.
|
23
|
+
initialRouteName: "(drawer)",
|
24
|
+
};
|
25
|
+
|
26
|
+
{{#if (eq backend "convex")}}
|
27
|
+
const convex = new ConvexReactClient(process.env.EXPO_PUBLIC_CONVEX_URL!, {
|
28
|
+
unsavedChangesWarning: false,
|
29
|
+
});
|
30
|
+
{{/if}}
|
31
|
+
|
32
|
+
export default function RootLayout() {
|
33
|
+
const { theme } = useUnistyles();
|
34
|
+
|
35
|
+
return (
|
36
|
+
{{#if (eq backend "convex")}}
|
37
|
+
<ConvexProvider client={convex}>
|
38
|
+
<GestureHandlerRootView style=\{{ flex: 1 }}>
|
39
|
+
<Stack
|
40
|
+
screenOptions=\{{
|
41
|
+
headerStyle: {
|
42
|
+
backgroundColor: theme.colors.background,
|
43
|
+
},
|
44
|
+
headerTitleStyle: {
|
45
|
+
color: theme.colors.foreground,
|
46
|
+
},
|
47
|
+
headerTintColor: theme.colors.foreground,
|
48
|
+
}}
|
49
|
+
>
|
50
|
+
<Stack.Screen name="(drawer)" options=\{{ headerShown: false }} />
|
51
|
+
<Stack.Screen
|
52
|
+
name="modal"
|
53
|
+
options=\{{ title: "Modal", presentation: "modal" }}
|
54
|
+
/>
|
55
|
+
</Stack>
|
56
|
+
</GestureHandlerRootView>
|
57
|
+
</ConvexProvider>
|
58
|
+
{{else}}
|
59
|
+
{{#unless (eq api "none")}}
|
60
|
+
<QueryClientProvider client={queryClient}>
|
61
|
+
<GestureHandlerRootView style=\{{ flex: 1 }}>
|
62
|
+
<Stack
|
63
|
+
screenOptions=\{{
|
64
|
+
headerStyle: {
|
65
|
+
backgroundColor: theme.colors.background,
|
66
|
+
},
|
67
|
+
headerTitleStyle: {
|
68
|
+
color: theme.colors.foreground,
|
69
|
+
},
|
70
|
+
headerTintColor: theme.colors.foreground,
|
71
|
+
}}
|
72
|
+
>
|
73
|
+
<Stack.Screen name="(drawer)" options=\{{ headerShown: false }} />
|
74
|
+
<Stack.Screen
|
75
|
+
name="modal"
|
76
|
+
options=\{{ title: "Modal", presentation: "modal" }}
|
77
|
+
/>
|
78
|
+
</Stack>
|
79
|
+
</GestureHandlerRootView>
|
80
|
+
</QueryClientProvider>
|
81
|
+
{{else}}
|
82
|
+
<GestureHandlerRootView style=\{{ flex: 1 }}>
|
83
|
+
<Stack
|
84
|
+
screenOptions=\{{
|
85
|
+
headerStyle: {
|
86
|
+
backgroundColor: theme.colors.background,
|
87
|
+
},
|
88
|
+
headerTitleStyle: {
|
89
|
+
color: theme.colors.foreground,
|
90
|
+
},
|
91
|
+
headerTintColor: theme.colors.foreground,
|
92
|
+
}}
|
93
|
+
>
|
94
|
+
<Stack.Screen name="(drawer)" options=\{{ headerShown: false }} />
|
95
|
+
<Stack.Screen
|
96
|
+
name="modal"
|
97
|
+
options=\{{ title: "Modal", presentation: "modal" }}
|
98
|
+
/>
|
99
|
+
</Stack>
|
100
|
+
</GestureHandlerRootView>
|
101
|
+
{{/unless}}
|
102
|
+
{{/if}}
|
103
|
+
);
|
104
|
+
}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
import { Container } from "@/components/container";
|
2
|
+
import { Text, View } from "react-native";
|
3
|
+
import { StyleSheet } from "react-native-unistyles";
|
4
|
+
|
5
|
+
export default function Modal() {
|
6
|
+
return (
|
7
|
+
<Container>
|
8
|
+
<View style={styles.container}>
|
9
|
+
<View style={styles.header}>
|
10
|
+
<Text style={styles.title}>Modal</Text>
|
11
|
+
</View>
|
12
|
+
</View>
|
13
|
+
</Container>
|
14
|
+
);
|
15
|
+
}
|
16
|
+
|
17
|
+
const styles = StyleSheet.create((theme) => ({
|
18
|
+
container: {
|
19
|
+
flex: 1,
|
20
|
+
padding: theme.spacing.lg,
|
21
|
+
},
|
22
|
+
header: {
|
23
|
+
flexDirection: "row",
|
24
|
+
alignItems: "center",
|
25
|
+
justifyContent: "space-between",
|
26
|
+
marginBottom: theme.spacing.xl,
|
27
|
+
},
|
28
|
+
title: {
|
29
|
+
fontSize: theme.fontSize["2xl"],
|
30
|
+
fontWeight: "bold",
|
31
|
+
color: theme.colors.foreground,
|
32
|
+
},
|
33
|
+
}));
|
@@ -0,0 +1,44 @@
|
|
1
|
+
{
|
2
|
+
"expo": {
|
3
|
+
"name": "my-tvi-app",
|
4
|
+
"slug": "my-tvi-app",
|
5
|
+
"version": "1.0.0",
|
6
|
+
"newArchEnabled": true,
|
7
|
+
"scheme": "my-tvi-app",
|
8
|
+
"web": {
|
9
|
+
"bundler": "metro",
|
10
|
+
"output": "static",
|
11
|
+
"favicon": "./assets/favicon.png"
|
12
|
+
},
|
13
|
+
"plugins": [
|
14
|
+
"expo-router",
|
15
|
+
"react-native-edge-to-edge",
|
16
|
+
"expo-secure-store"
|
17
|
+
],
|
18
|
+
"experiments": {
|
19
|
+
"typedRoutes": true,
|
20
|
+
"tsconfigPaths": true,
|
21
|
+
"reactCompiler": true
|
22
|
+
},
|
23
|
+
"orientation": "portrait",
|
24
|
+
"icon": "./assets/icon.png",
|
25
|
+
"userInterfaceStyle": "automatic",
|
26
|
+
"splash": {
|
27
|
+
"image": "./assets/splash.png",
|
28
|
+
"resizeMode": "contain",
|
29
|
+
"backgroundColor": "#ffffff"
|
30
|
+
},
|
31
|
+
"assetBundlePatterns": ["**/*"],
|
32
|
+
"ios": {
|
33
|
+
"supportsTablet": true,
|
34
|
+
"bundleIdentifier": "com.shaneholloman.tvi"
|
35
|
+
},
|
36
|
+
"android": {
|
37
|
+
"adaptiveIcon": {
|
38
|
+
"foregroundImage": "./assets/adaptive-icon.png",
|
39
|
+
"backgroundColor": "#ffffff"
|
40
|
+
},
|
41
|
+
"package": "com.shaneholloman.tvi"
|
42
|
+
}
|
43
|
+
}
|
44
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module.exports = function (api) {
|
2
|
+
api.cache(true);
|
3
|
+
const plugins = [];
|
4
|
+
|
5
|
+
plugins.push([
|
6
|
+
'react-native-unistyles/plugin',
|
7
|
+
{
|
8
|
+
autoProcessRoot: 'app',
|
9
|
+
autoProcessImports: ['@/components'],
|
10
|
+
},
|
11
|
+
]);
|
12
|
+
|
13
|
+
plugins.push('react-native-reanimated/plugin');
|
14
|
+
|
15
|
+
return {
|
16
|
+
presets: ['babel-preset-expo'],
|
17
|
+
|
18
|
+
plugins,
|
19
|
+
};
|
20
|
+
};
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import { SafeAreaView } from "react-native";
|
3
|
+
import { StyleSheet } from "react-native-unistyles";
|
4
|
+
|
5
|
+
export const Container = ({ children }: { children: React.ReactNode }) => {
|
6
|
+
return <SafeAreaView style={styles.container}>{children}</SafeAreaView>;
|
7
|
+
};
|
8
|
+
|
9
|
+
const styles = StyleSheet.create((theme, rt) => ({
|
10
|
+
container: {
|
11
|
+
flex: 1,
|
12
|
+
backgroundColor: theme.colors.background,
|
13
|
+
paddingBottom: rt.insets.bottom,
|
14
|
+
},
|
15
|
+
}));
|
@@ -0,0 +1,36 @@
|
|
1
|
+
import FontAwesome from "@expo/vector-icons/FontAwesome";
|
2
|
+
import { forwardRef } from "react";
|
3
|
+
import { Pressable } from "react-native";
|
4
|
+
import { StyleSheet } from "react-native-unistyles";
|
5
|
+
|
6
|
+
export const HeaderButton = forwardRef<
|
7
|
+
typeof Pressable,
|
8
|
+
{ onPress?: () => void }
|
9
|
+
>(({ onPress }, ref) => {
|
10
|
+
return (
|
11
|
+
<Pressable onPress={onPress} style={styles.button}>
|
12
|
+
{({ pressed }) => (
|
13
|
+
<FontAwesome
|
14
|
+
name="info-circle"
|
15
|
+
size={20}
|
16
|
+
color={styles.icon.color}
|
17
|
+
style={{
|
18
|
+
opacity: pressed ? 0.7 : 1,
|
19
|
+
}}
|
20
|
+
/>
|
21
|
+
)}
|
22
|
+
</Pressable>
|
23
|
+
);
|
24
|
+
});
|
25
|
+
|
26
|
+
const styles = StyleSheet.create((theme) => ({
|
27
|
+
button: {
|
28
|
+
padding: theme.spacing.sm,
|
29
|
+
marginRight: theme.spacing.sm,
|
30
|
+
borderRadius: theme.borderRadius.lg,
|
31
|
+
backgroundColor: `${theme.colors.secondary}80`, // 50% opacity
|
32
|
+
},
|
33
|
+
icon: {
|
34
|
+
color: theme.colors.secondaryForeground,
|
35
|
+
},
|
36
|
+
}));
|