create-huenei-template 0.2.18 → 0.3.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.
- package/dist/templates/frontend/hub-pre-sales/.cursor/context/pre-sales.md +3 -2
- package/dist/templates/frontend/hub-pre-sales/.cursor/rules/architech.mdc +13 -1
- package/dist/templates/frontend/hub-pre-sales/.cursor/rules/component-patterns.mdc +1 -1
- package/dist/templates/frontend/hub-pre-sales/.cursor/rules/gsap-animations.mdc +46 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/rules/pre-sales-mode.mdc +2 -1
- package/dist/templates/frontend/hub-pre-sales/.cursor/rules/restrictions.mdc +3 -1
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/animate/SKILL.md +23 -10
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/delight/SKILL.md +3 -4
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/gsap-core/SKILL.md +254 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/gsap-frameworks/SKILL.md +266 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/gsap-performance/SKILL.md +79 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/gsap-plugins/SKILL.md +433 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/gsap-react/SKILL.md +136 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/gsap-scrolltrigger/SKILL.md +296 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/gsap-timeline/SKILL.md +107 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/gsap-utils/SKILL.md +284 -0
- package/dist/templates/frontend/hub-pre-sales/.cursor/skills/overdrive/SKILL.md +1 -1
- package/dist/templates/frontend/hub-pre-sales/AGENTS.md +13 -3
- package/dist/templates/frontend/hub-pre-sales/README.md +2 -1
- package/dist/templates/frontend/hub-pre-sales/package.json +84 -82
- package/dist/templates/frontend/hub-pre-sales/src/lib/gsap.ts +6 -0
- package/dist/templates/frontend/pre-sales/.cursor/rules/architech.mdc +199 -199
- package/dist/templates/frontend/pre-sales/.cursor/rules/deployment-ready.mdc +52 -52
- package/dist/templates/frontend/pre-sales/.cursor/rules/domain-business-bootstrap.mdc +74 -74
- package/dist/templates/frontend/pre-sales/.cursor/rules/pre-sales-mode.mdc +104 -104
- package/dist/templates/frontend/pre-sales/.cursor/rules/separation-of-concerns.mdc +41 -41
- package/dist/templates/frontend/pre-sales/.cursor/skills/deploy-to-vercel/SKILL.md +296 -296
- package/dist/templates/frontend/pre-sales/.cursor/skills/deploy-to-vercel/resources/deploy-codex.sh +301 -301
- package/dist/templates/frontend/pre-sales/.cursor/skills/deploy-to-vercel/resources/deploy.sh +301 -301
- package/dist/templates/frontend/pre-sales/src/__tests__/components/layout/sidebar.test.tsx +58 -58
- package/dist/templates/frontend/pre-sales/src/__tests__/lib/auth.test.ts +102 -102
- package/dist/templates/frontend/pre-sales/src/__tests__/routes/__root.test.tsx +72 -72
- package/dist/templates/frontend/pre-sales/src/__tests__/routes/_authenticated.test.tsx +57 -57
- package/dist/templates/frontend/pre-sales/src/components/layout/navbar.tsx +121 -121
- package/dist/templates/frontend/pre-sales/src/components/ui/combobox.tsx +308 -308
- package/dist/templates/frontend/pre-sales/src/components/ui/command.tsx +179 -179
- package/dist/templates/frontend/pre-sales/src/data/dashboard.ts +249 -249
- package/dist/templates/frontend/pre-sales/src/hooks/useTheme.ts +73 -73
- package/dist/templates/frontend/pre-sales/src/index.css +282 -282
- package/dist/templates/frontend/pre-sales/src/routes/__root.tsx +62 -62
- package/dist/templates/frontend/pre-sales/src/routes/auth/iniciar-sesion.tsx +173 -173
- package/dist/templates/frontend/react-vite/.npmrc.example +28 -0
- package/dist/templates/frontend/react-vite/README.md +17 -0
- package/dist/templates/frontend/react-vite/eslint.config.js +41 -31
- package/dist/templates/frontend/react-vite/package.json +2 -0
- package/dist/templates/frontend/react-vite/src/index.css +3 -15
- package/dist/templates/frontend/react-vite/src/main.tsx +36 -33
- package/dist/templates/frontend/react-vite/src/routes/__root.tsx +3 -3
- package/dist/templates/frontend/react-vite/src/routes/index.tsx +185 -187
- package/dist/templates/frontend/react-vite/src/routes/ui-components.tsx +698 -922
- package/dist/templates/frontend/react-vite/vite.config.ts +7 -2
- package/dist/templates/frontend/react-vite-help/.vscode/settings.json +26 -0
- package/dist/templates/mobile/expo-base/package.json +3 -2
- package/dist/templates/mobile/expo-base/pnpm-workspace.yaml +3 -0
- package/dist/templates/mobile/expo-base/src/features/auth/login-screen.tsx +144 -177
- package/dist/templates/mobile/expo-base/src/i18n/locales/en-US.json +136 -134
- package/dist/templates/mobile/expo-base/src/i18n/locales/es-AR.json +136 -134
- package/package.json +1 -1
- package/templates/frontend/hub-pre-sales/.cursor/context/pre-sales.md +3 -2
- package/templates/frontend/hub-pre-sales/.cursor/rules/architech.mdc +13 -1
- package/templates/frontend/hub-pre-sales/.cursor/rules/component-patterns.mdc +1 -1
- package/templates/frontend/hub-pre-sales/.cursor/rules/gsap-animations.mdc +46 -0
- package/templates/frontend/hub-pre-sales/.cursor/rules/pre-sales-mode.mdc +2 -1
- package/templates/frontend/hub-pre-sales/.cursor/rules/restrictions.mdc +3 -1
- package/templates/frontend/hub-pre-sales/.cursor/skills/animate/SKILL.md +23 -10
- package/templates/frontend/hub-pre-sales/.cursor/skills/delight/SKILL.md +3 -4
- package/templates/frontend/hub-pre-sales/.cursor/skills/gsap-core/SKILL.md +254 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/gsap-frameworks/SKILL.md +266 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/gsap-performance/SKILL.md +79 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/gsap-plugins/SKILL.md +433 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/gsap-react/SKILL.md +136 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/gsap-scrolltrigger/SKILL.md +296 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/gsap-timeline/SKILL.md +107 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/gsap-utils/SKILL.md +284 -0
- package/templates/frontend/hub-pre-sales/.cursor/skills/overdrive/SKILL.md +1 -1
- package/templates/frontend/hub-pre-sales/AGENTS.md +13 -3
- package/templates/frontend/hub-pre-sales/README.md +2 -1
- package/templates/frontend/hub-pre-sales/package.json +84 -82
- package/templates/frontend/hub-pre-sales/pnpm-lock.yaml +6597 -6575
- package/templates/frontend/hub-pre-sales/skills-lock.json +53 -0
- package/templates/frontend/hub-pre-sales/src/lib/gsap.ts +6 -0
- package/templates/frontend/pre-sales/.cursor/rules/architech.mdc +199 -199
- package/templates/frontend/pre-sales/.cursor/rules/deployment-ready.mdc +52 -52
- package/templates/frontend/pre-sales/.cursor/rules/domain-business-bootstrap.mdc +74 -74
- package/templates/frontend/pre-sales/.cursor/rules/pre-sales-mode.mdc +104 -104
- package/templates/frontend/pre-sales/.cursor/rules/separation-of-concerns.mdc +41 -41
- package/templates/frontend/pre-sales/.cursor/skills/deploy-to-vercel/SKILL.md +296 -296
- package/templates/frontend/pre-sales/.cursor/skills/deploy-to-vercel/resources/deploy-codex.sh +301 -301
- package/templates/frontend/pre-sales/.cursor/skills/deploy-to-vercel/resources/deploy.sh +301 -301
- package/templates/frontend/pre-sales/pnpm-lock.yaml +6448 -6448
- package/templates/frontend/pre-sales/skills-lock.json +10 -10
- package/templates/frontend/pre-sales/src/__tests__/components/layout/sidebar.test.tsx +58 -58
- package/templates/frontend/pre-sales/src/__tests__/lib/auth.test.ts +102 -102
- package/templates/frontend/pre-sales/src/__tests__/routes/__root.test.tsx +72 -72
- package/templates/frontend/pre-sales/src/__tests__/routes/_authenticated.test.tsx +57 -57
- package/templates/frontend/pre-sales/src/components/layout/navbar.tsx +121 -121
- package/templates/frontend/pre-sales/src/components/ui/combobox.tsx +308 -308
- package/templates/frontend/pre-sales/src/components/ui/command.tsx +179 -179
- package/templates/frontend/pre-sales/src/data/dashboard.ts +249 -249
- package/templates/frontend/pre-sales/src/hooks/useTheme.ts +73 -73
- package/templates/frontend/pre-sales/src/index.css +282 -282
- package/templates/frontend/pre-sales/src/routes/__root.tsx +62 -62
- package/templates/frontend/pre-sales/src/routes/auth/iniciar-sesion.tsx +173 -173
- package/templates/frontend/react-vite/.npmrc.example +28 -0
- package/templates/frontend/react-vite/README.md +17 -0
- package/templates/frontend/react-vite/eslint.config.js +41 -31
- package/templates/frontend/react-vite/package.json +2 -0
- package/templates/frontend/react-vite/pnpm-lock.yaml +535 -13
- package/templates/frontend/react-vite/src/index.css +3 -15
- package/templates/frontend/react-vite/src/main.tsx +36 -33
- package/templates/frontend/react-vite/src/routes/__root.tsx +3 -3
- package/templates/frontend/react-vite/src/routes/index.tsx +185 -187
- package/templates/frontend/react-vite/src/routes/ui-components.tsx +698 -922
- package/templates/frontend/react-vite/vite.config.ts +7 -2
- package/templates/frontend/react-vite-help/.vscode/settings.json +26 -0
- package/templates/mobile/expo-base/package.json +3 -2
- package/templates/mobile/expo-base/pnpm-lock.yaml +10240 -11354
- package/templates/mobile/expo-base/pnpm-workspace.yaml +3 -0
- package/templates/mobile/expo-base/src/features/auth/login-screen.tsx +144 -177
- package/templates/mobile/expo-base/src/i18n/locales/en-US.json +136 -134
- package/templates/mobile/expo-base/src/i18n/locales/es-AR.json +136 -134
- package/templates/backend/nestjs-api-mysql-prisma-express/.cursor/agents/nestjs-code-reviewer.md +0 -54
- package/templates/backend/nestjs-api-mysql-prisma-express/.cursor/agents/prisma-guardian.md +0 -67
- package/templates/backend/nestjs-api-mysql-prisma-express/.cursor/agents/test-runner.md +0 -57
- package/templates/backend/nestjs-api-mysql-prisma-express/.cursor/commands/new-endpoint.md +0 -209
- package/templates/backend/nestjs-api-mysql-prisma-express/.cursor/commands/new-model.md +0 -201
- package/templates/backend/nestjs-api-mysql-prisma-express/.cursor/hooks/autoTestOnStop.ts +0 -127
- package/templates/backend/nestjs-api-mysql-prisma-express/.cursor/hooks/blockDangerous.ts +0 -98
- package/templates/backend/nestjs-api-mysql-prisma-express/.cursor/hooks/ensureTestsExist.ts +0 -405
- package/templates/backend/nestjs-api-mysql-prisma-express/.cursor/hooks/formatOnEdit.ts +0 -70
- package/templates/backend/nestjs-api-mysql-prisma-express/.cursor/hooks/protectSecrets.ts +0 -101
- package/templates/backend/nestjs-api-mysql-prisma-express/.cursor/hooks/sessionInit.ts +0 -104
- package/templates/backend/nestjs-api-mysql-prisma-express/.cursor/hooks/validatePrisma.ts +0 -121
- package/templates/backend/nestjs-api-mysql-prisma-express/.cursor/hooks.json +0 -46
- package/templates/backend/nestjs-api-mysql-prisma-fastify/.cursor/agents/nestjs-code-reviewer.md +0 -54
- package/templates/backend/nestjs-api-mysql-prisma-fastify/.cursor/agents/prisma-guardian.md +0 -67
- package/templates/backend/nestjs-api-mysql-prisma-fastify/.cursor/agents/test-runner.md +0 -57
- package/templates/backend/nestjs-api-mysql-prisma-fastify/.cursor/commands/new-endpoint.md +0 -209
- package/templates/backend/nestjs-api-mysql-prisma-fastify/.cursor/commands/new-model.md +0 -201
- package/templates/backend/nestjs-api-mysql-prisma-fastify/.cursor/hooks/autoTestOnStop.ts +0 -127
- package/templates/backend/nestjs-api-mysql-prisma-fastify/.cursor/hooks/blockDangerous.ts +0 -98
- package/templates/backend/nestjs-api-mysql-prisma-fastify/.cursor/hooks/ensureTestsExist.ts +0 -405
- package/templates/backend/nestjs-api-mysql-prisma-fastify/.cursor/hooks/formatOnEdit.ts +0 -70
- package/templates/backend/nestjs-api-mysql-prisma-fastify/.cursor/hooks/protectSecrets.ts +0 -101
- package/templates/backend/nestjs-api-mysql-prisma-fastify/.cursor/hooks/sessionInit.ts +0 -104
- package/templates/backend/nestjs-api-mysql-prisma-fastify/.cursor/hooks/validatePrisma.ts +0 -121
- package/templates/backend/nestjs-api-mysql-prisma-fastify/.cursor/hooks.json +0 -46
- package/templates/backend/nestjs-api-mysql-sequelize-express/.cursor/agents/nestjs-code-reviewer.md +0 -23
- package/templates/backend/nestjs-api-mysql-sequelize-express/.cursor/agents/sequelize-guardian.md +0 -37
- package/templates/backend/nestjs-api-mysql-sequelize-express/.cursor/agents/test-runner.md +0 -33
- package/templates/backend/nestjs-api-mysql-sequelize-express/.cursor/commands/new-endpoint.md +0 -76
- package/templates/backend/nestjs-api-mysql-sequelize-express/.cursor/commands/new-model.md +0 -85
- package/templates/backend/nestjs-api-mysql-sequelize-express/.cursor/hooks/autoTestOnStop.ts +0 -127
- package/templates/backend/nestjs-api-mysql-sequelize-express/.cursor/hooks/blockDangerous.ts +0 -98
- package/templates/backend/nestjs-api-mysql-sequelize-express/.cursor/hooks/ensureTestsExist.ts +0 -397
- package/templates/backend/nestjs-api-mysql-sequelize-express/.cursor/hooks/formatOnEdit.ts +0 -66
- package/templates/backend/nestjs-api-mysql-sequelize-express/.cursor/hooks/protectSecrets.ts +0 -101
- package/templates/backend/nestjs-api-mysql-sequelize-express/.cursor/hooks/sessionInit.ts +0 -104
- package/templates/backend/nestjs-api-mysql-sequelize-express/.cursor/hooks.json +0 -41
- package/templates/backend/nestjs-api-mysql-sequelize-fastify/.cursor/agents/nestjs-code-reviewer.md +0 -23
- package/templates/backend/nestjs-api-mysql-sequelize-fastify/.cursor/agents/sequelize-guardian.md +0 -37
- package/templates/backend/nestjs-api-mysql-sequelize-fastify/.cursor/agents/test-runner.md +0 -33
- package/templates/backend/nestjs-api-mysql-sequelize-fastify/.cursor/commands/new-endpoint.md +0 -76
- package/templates/backend/nestjs-api-mysql-sequelize-fastify/.cursor/commands/new-model.md +0 -85
- package/templates/backend/nestjs-api-mysql-sequelize-fastify/.cursor/hooks/autoTestOnStop.ts +0 -127
- package/templates/backend/nestjs-api-mysql-sequelize-fastify/.cursor/hooks/blockDangerous.ts +0 -98
- package/templates/backend/nestjs-api-mysql-sequelize-fastify/.cursor/hooks/ensureTestsExist.ts +0 -397
- package/templates/backend/nestjs-api-mysql-sequelize-fastify/.cursor/hooks/formatOnEdit.ts +0 -66
- package/templates/backend/nestjs-api-mysql-sequelize-fastify/.cursor/hooks/protectSecrets.ts +0 -101
- package/templates/backend/nestjs-api-mysql-sequelize-fastify/.cursor/hooks/sessionInit.ts +0 -104
- package/templates/backend/nestjs-api-mysql-sequelize-fastify/.cursor/hooks.json +0 -41
- package/templates/backend/nestjs-api-postgres/.cursor/agents/nestjs-code-reviewer.md +0 -54
- package/templates/backend/nestjs-api-postgres/.cursor/agents/prisma-guardian.md +0 -62
- package/templates/backend/nestjs-api-postgres/.cursor/agents/security-auditor.md +0 -71
- package/templates/backend/nestjs-api-postgres/.cursor/agents/test-runner.md +0 -58
- package/templates/backend/nestjs-api-postgres/.cursor/commands/add-pagination.md +0 -235
- package/templates/backend/nestjs-api-postgres/.cursor/commands/add-seed.md +0 -160
- package/templates/backend/nestjs-api-postgres/.cursor/commands/add-tests.md +0 -322
- package/templates/backend/nestjs-api-postgres/.cursor/commands/new-endpoint.md +0 -209
- package/templates/backend/nestjs-api-postgres/.cursor/commands/new-guard.md +0 -195
- package/templates/backend/nestjs-api-postgres/.cursor/commands/new-interceptor.md +0 -188
- package/templates/backend/nestjs-api-postgres/.cursor/commands/new-middleware.md +0 -176
- package/templates/backend/nestjs-api-postgres/.cursor/commands/new-model.md +0 -201
- package/templates/backend/nestjs-api-postgres/.cursor/hooks/auto-retry.ts +0 -62
- package/templates/backend/nestjs-api-postgres/.cursor/hooks/block-dangerous.ts +0 -202
- package/templates/backend/nestjs-api-postgres/.cursor/hooks/format-and-validate.ts +0 -124
- package/templates/backend/nestjs-api-postgres/.cursor/hooks/protect-secrets.ts +0 -105
- package/templates/backend/nestjs-api-postgres/.cursor/hooks/session-context.ts +0 -130
- package/templates/backend/nestjs-api-postgres/.cursor/hooks.json +0 -36
- package/templates/backend/nestjs-api-postgres/.cursor/mcp.json +0 -21
- package/templates/backend/nestjs-api-sqlite/.cursor/agents/code-reviewer.md +0 -153
- package/templates/backend/nestjs-api-sqlite/.cursor/agents/nestjs-architect.md +0 -138
- package/templates/backend/nestjs-api-sqlite/.cursor/agents/prisma-analyst.md +0 -164
- package/templates/backend/nestjs-api-sqlite/.cursor/agents/security-auditor.md +0 -150
- package/templates/backend/nestjs-api-sqlite/.cursor/agents/test-engineer.md +0 -290
- package/templates/backend/nestjs-api-sqlite/.cursor/commands/add-pagination.md +0 -235
- package/templates/backend/nestjs-api-sqlite/.cursor/commands/add-seed.md +0 -172
- package/templates/backend/nestjs-api-sqlite/.cursor/commands/add-tests.md +0 -322
- package/templates/backend/nestjs-api-sqlite/.cursor/commands/new-endpoint.md +0 -209
- package/templates/backend/nestjs-api-sqlite/.cursor/commands/new-guard.md +0 -195
- package/templates/backend/nestjs-api-sqlite/.cursor/commands/new-interceptor.md +0 -188
- package/templates/backend/nestjs-api-sqlite/.cursor/commands/new-middleware.md +0 -176
- package/templates/backend/nestjs-api-sqlite/.cursor/commands/new-model.md +0 -201
- package/templates/backend/nestjs-api-sqlite/.cursor/hooks/auto-format.ts +0 -80
- package/templates/backend/nestjs-api-sqlite/.cursor/hooks/block-dangerous-commands.ts +0 -144
- package/templates/backend/nestjs-api-sqlite/.cursor/hooks/prisma-schema-watcher.ts +0 -64
- package/templates/backend/nestjs-api-sqlite/.cursor/hooks/protect-sensitive-files.ts +0 -122
- package/templates/backend/nestjs-api-sqlite/.cursor/hooks/session-context.ts +0 -105
- package/templates/backend/nestjs-api-sqlite/.cursor/hooks.json +0 -18
- package/templates/backend/nestjs-api-sqlite/.cursor/mcp.json +0 -17
- package/templates/backend/nestjs-api-sqlserver/.cursor/agents/nestjs-code-reviewer.md +0 -54
- package/templates/backend/nestjs-api-sqlserver/.cursor/agents/prisma-guardian.md +0 -67
- package/templates/backend/nestjs-api-sqlserver/.cursor/agents/test-runner.md +0 -57
- package/templates/backend/nestjs-api-sqlserver/.cursor/commands/new-endpoint.md +0 -209
- package/templates/backend/nestjs-api-sqlserver/.cursor/commands/new-model.md +0 -201
- package/templates/backend/nestjs-api-sqlserver/.cursor/hooks/autoTestOnStop.ts +0 -127
- package/templates/backend/nestjs-api-sqlserver/.cursor/hooks/blockDangerous.ts +0 -98
- package/templates/backend/nestjs-api-sqlserver/.cursor/hooks/ensureTestsExist.ts +0 -405
- package/templates/backend/nestjs-api-sqlserver/.cursor/hooks/formatOnEdit.ts +0 -70
- package/templates/backend/nestjs-api-sqlserver/.cursor/hooks/protectSecrets.ts +0 -101
- package/templates/backend/nestjs-api-sqlserver/.cursor/hooks/sessionInit.ts +0 -104
- package/templates/backend/nestjs-api-sqlserver/.cursor/hooks/validatePrisma.ts +0 -121
- package/templates/backend/nestjs-api-sqlserver/.cursor/hooks.json +0 -46
- package/templates/frontend/angular-base/.cursor/agents/accessibility-reviewer.md +0 -67
- package/templates/frontend/angular-base/.cursor/agents/angular-code-reviewer.md +0 -60
- package/templates/frontend/angular-base/.cursor/agents/qa-test-expert.md +0 -70
- package/templates/frontend/angular-base/.cursor/agents/security-auditor.md +0 -58
- package/templates/frontend/angular-base/.cursor/commands/add-e2e-test.md +0 -236
- package/templates/frontend/angular-base/.cursor/commands/new-component.md +0 -211
- package/templates/frontend/angular-base/.cursor/commands/new-form.md +0 -284
- package/templates/frontend/angular-base/.cursor/commands/new-interceptor.md +0 -257
- package/templates/frontend/angular-base/.cursor/commands/new-page.md +0 -215
- package/templates/frontend/angular-base/.cursor/commands/new-service.md +0 -203
- package/templates/frontend/angular-base/.cursor/hooks/auto-format.ts +0 -70
- package/templates/frontend/angular-base/.cursor/hooks/auto-test-on-stop.ts +0 -113
- package/templates/frontend/angular-base/.cursor/hooks/block-dangerous-commands.ts +0 -160
- package/templates/frontend/angular-base/.cursor/hooks/ensure-tests-exist.ts +0 -363
- package/templates/frontend/angular-base/.cursor/hooks/protect-sensitive-files.ts +0 -118
- package/templates/frontend/angular-base/.cursor/hooks/session-context.ts +0 -110
- package/templates/frontend/angular-base/.cursor/hooks.json +0 -41
- package/templates/frontend/angular-base/.cursor/mcp.json +0 -21
- package/templates/frontend/angular-nx/.cursor/agents/angular-code-reviewer.md +0 -64
- package/templates/frontend/angular-nx/.cursor/agents/ci-watcher.md +0 -480
- package/templates/frontend/angular-nx/.cursor/agents/nx-architecture-guardian.md +0 -69
- package/templates/frontend/angular-nx/.cursor/agents/qa-test-expert.md +0 -75
- package/templates/frontend/angular-nx/.cursor/agents/security-auditor.md +0 -61
- package/templates/frontend/angular-nx/.cursor/commands/ci-monitor.md +0 -428
- package/templates/frontend/angular-nx/.cursor/hooks/auto-format.ts +0 -70
- package/templates/frontend/angular-nx/.cursor/hooks/auto-test-on-stop.ts +0 -115
- package/templates/frontend/angular-nx/.cursor/hooks/block-dangerous-commands.ts +0 -188
- package/templates/frontend/angular-nx/.cursor/hooks/ensure-tests-exist.ts +0 -399
- package/templates/frontend/angular-nx/.cursor/hooks/protect-sensitive-files.ts +0 -128
- package/templates/frontend/angular-nx/.cursor/hooks/session-context.ts +0 -121
- package/templates/frontend/angular-nx/.cursor/hooks.json +0 -41
- package/templates/frontend/angular-nx/.cursor/mcp.json +0 -12
- package/templates/frontend/hub-pre-sales/.cursor/agents/frontend-senior.agent.md +0 -49
- package/templates/frontend/hub-pre-sales/.cursor/agents/pre-sales-builder.agent.md +0 -98
- package/templates/frontend/hub-pre-sales/.cursor/agents/pre-sales-demo-runner.agent.md +0 -36
- package/templates/frontend/hub-pre-sales/.cursor/agents/pre-sales-refactor.agent.md +0 -54
- package/templates/frontend/hub-pre-sales/.cursor/agents/pre-sales-validator.agent.md +0 -69
- package/templates/frontend/hub-pre-sales/.cursor/agents/qa-test-expert.agent.md +0 -48
- package/templates/frontend/hub-pre-sales/.cursor/agents/security-expert.agent.md +0 -39
- package/templates/frontend/hub-pre-sales/.cursor/agents/ux-ui-expert.agent.md +0 -45
- package/templates/frontend/hub-pre-sales/.cursor/commands/add-calendar.md +0 -151
- package/templates/frontend/hub-pre-sales/.cursor/commands/add-chart.md +0 -148
- package/templates/frontend/hub-pre-sales/.cursor/commands/add-dashboard.md +0 -135
- package/templates/frontend/hub-pre-sales/.cursor/commands/add-form.md +0 -128
- package/templates/frontend/hub-pre-sales/.cursor/commands/add-login.md +0 -160
- package/templates/frontend/hub-pre-sales/.cursor/commands/add-map.md +0 -172
- package/templates/frontend/hub-pre-sales/.cursor/commands/add-route.md +0 -211
- package/templates/frontend/hub-pre-sales/.cursor/commands/add-screen.md +0 -118
- package/templates/frontend/hub-pre-sales/.cursor/commands/add-table.md +0 -156
- package/templates/frontend/hub-pre-sales/.cursor/commands/add-tests.md +0 -269
- package/templates/frontend/hub-pre-sales/.cursor/commands/mock-backend.md +0 -139
- package/templates/frontend/hub-pre-sales/.cursor/commands/new-component.md +0 -192
- package/templates/frontend/hub-pre-sales/.cursor/commands/new-form.md +0 -268
- package/templates/frontend/hub-pre-sales/.cursor/commands/new-page.md +0 -203
- package/templates/frontend/hub-pre-sales/.cursor/commands/new-query.md +0 -287
- package/templates/frontend/hub-pre-sales/.cursor/commands/new-table.md +0 -299
- package/templates/frontend/hub-pre-sales/.cursor/commands/prepare-preview.md +0 -48
- package/templates/frontend/hub-pre-sales/.cursor/commands/refactor-ui.md +0 -94
- package/templates/frontend/hub-pre-sales/.cursor/commands/ver-demo.md +0 -58
- package/templates/frontend/hub-pre-sales/.cursor/hooks/checkFileLength.ts +0 -69
- package/templates/frontend/hub-pre-sales/.cursor/hooks/injectPreSalesContext.ts +0 -103
- package/templates/frontend/hub-pre-sales/.cursor/hooks.json +0 -23
- package/templates/frontend/hub-pre-sales/.cursor/mcp.json +0 -17
- package/templates/frontend/pre-sales/.cursor/agents/frontend-senior.agent.md +0 -49
- package/templates/frontend/pre-sales/.cursor/agents/pre-sales-builder.agent.md +0 -92
- package/templates/frontend/pre-sales/.cursor/agents/pre-sales-demo-runner.agent.md +0 -36
- package/templates/frontend/pre-sales/.cursor/agents/pre-sales-deploy.agent.md +0 -87
- package/templates/frontend/pre-sales/.cursor/agents/pre-sales-refactor.agent.md +0 -54
- package/templates/frontend/pre-sales/.cursor/agents/pre-sales-validator.agent.md +0 -69
- package/templates/frontend/pre-sales/.cursor/agents/qa-test-expert.agent.md +0 -48
- package/templates/frontend/pre-sales/.cursor/agents/security-expert.agent.md +0 -39
- package/templates/frontend/pre-sales/.cursor/agents/ux-ui-expert.agent.md +0 -45
- package/templates/frontend/pre-sales/.cursor/commands/add-calendar.md +0 -151
- package/templates/frontend/pre-sales/.cursor/commands/add-chart.md +0 -148
- package/templates/frontend/pre-sales/.cursor/commands/add-dashboard.md +0 -135
- package/templates/frontend/pre-sales/.cursor/commands/add-form.md +0 -128
- package/templates/frontend/pre-sales/.cursor/commands/add-login.md +0 -160
- package/templates/frontend/pre-sales/.cursor/commands/add-map.md +0 -172
- package/templates/frontend/pre-sales/.cursor/commands/add-route.md +0 -211
- package/templates/frontend/pre-sales/.cursor/commands/add-screen.md +0 -118
- package/templates/frontend/pre-sales/.cursor/commands/add-table.md +0 -156
- package/templates/frontend/pre-sales/.cursor/commands/add-tests.md +0 -269
- package/templates/frontend/pre-sales/.cursor/commands/deploy-demo.md +0 -73
- package/templates/frontend/pre-sales/.cursor/commands/mock-backend.md +0 -139
- package/templates/frontend/pre-sales/.cursor/commands/new-component.md +0 -192
- package/templates/frontend/pre-sales/.cursor/commands/new-form.md +0 -268
- package/templates/frontend/pre-sales/.cursor/commands/new-page.md +0 -203
- package/templates/frontend/pre-sales/.cursor/commands/new-query.md +0 -287
- package/templates/frontend/pre-sales/.cursor/commands/new-table.md +0 -299
- package/templates/frontend/pre-sales/.cursor/commands/prepare-deploy.md +0 -135
- package/templates/frontend/pre-sales/.cursor/commands/refactor-ui.md +0 -94
- package/templates/frontend/pre-sales/.cursor/commands/ver-demo.md +0 -58
- package/templates/frontend/pre-sales/.cursor/hooks/checkFileLength.ts +0 -69
- package/templates/frontend/pre-sales/.cursor/hooks/ensureTestsExist.ts +0 -220
- package/templates/frontend/pre-sales/.cursor/hooks/injectPreSalesContext.ts +0 -97
- package/templates/frontend/pre-sales/.cursor/hooks.json +0 -23
- package/templates/frontend/pre-sales/.cursor/mcp.json +0 -13
- package/templates/frontend/react-ssr/.cursor/agents/accessibility-reviewer.md +0 -22
- package/templates/frontend/react-ssr/.cursor/agents/nextjs-code-reviewer.md +0 -24
- package/templates/frontend/react-ssr/.cursor/agents/react-test-expert.md +0 -32
- package/templates/frontend/react-ssr/.cursor/agents/security-auditor.md +0 -25
- package/templates/frontend/react-ssr/.cursor/commands/new-component.md +0 -97
- package/templates/frontend/react-ssr/.cursor/commands/new-page.md +0 -95
- package/templates/frontend/react-ssr/.cursor/commands/new-prisma-model.md +0 -66
- package/templates/frontend/react-ssr/.cursor/commands/new-server-action.md +0 -89
- package/templates/frontend/react-ssr/.cursor/hooks/auto-format.ts +0 -64
- package/templates/frontend/react-ssr/.cursor/hooks/auto-test-on-stop.ts +0 -94
- package/templates/frontend/react-ssr/.cursor/hooks/block-dangerous-commands.ts +0 -120
- package/templates/frontend/react-ssr/.cursor/hooks/ensure-tests-exist.ts +0 -209
- package/templates/frontend/react-ssr/.cursor/hooks/protect-sensitive-files.ts +0 -101
- package/templates/frontend/react-ssr/.cursor/hooks/session-context.ts +0 -93
- package/templates/frontend/react-ssr/.cursor/hooks/tsconfig.json +0 -10
- package/templates/frontend/react-ssr/.cursor/hooks.json +0 -41
- package/templates/frontend/react-vite/.cursor/agents/frontend-senior.agent.md +0 -49
- package/templates/frontend/react-vite/.cursor/agents/qa-test-expert.agent.md +0 -126
- package/templates/frontend/react-vite/.cursor/agents/security-expert.agent.md +0 -39
- package/templates/frontend/react-vite/.cursor/agents/ux-ui-expert.agent.md +0 -45
- package/templates/frontend/react-vite/.cursor/commands/add-route.md +0 -211
- package/templates/frontend/react-vite/.cursor/commands/add-tests.md +0 -269
- package/templates/frontend/react-vite/.cursor/commands/new-component.md +0 -232
- package/templates/frontend/react-vite/.cursor/commands/new-form.md +0 -268
- package/templates/frontend/react-vite/.cursor/commands/new-page.md +0 -203
- package/templates/frontend/react-vite/.cursor/commands/new-query.md +0 -287
- package/templates/frontend/react-vite/.cursor/commands/new-table.md +0 -299
- package/templates/frontend/react-vite/.cursor/hooks/autoTestOnStop.ts +0 -117
- package/templates/frontend/react-vite/.cursor/hooks/blockDangerous.ts +0 -75
- package/templates/frontend/react-vite/.cursor/hooks/ensureTestsExist.ts +0 -306
- package/templates/frontend/react-vite/.cursor/hooks/formatOnEdit.ts +0 -49
- package/templates/frontend/react-vite/.cursor/hooks/protectSecrets.ts +0 -88
- package/templates/frontend/react-vite/.cursor/hooks/sessionInit.ts +0 -77
- package/templates/frontend/react-vite/.cursor/hooks.json +0 -41
- package/templates/frontend/react-vite/.cursor/mcp.json +0 -17
- package/templates/frontend/react-vite-help/.cursor/RECONSTRUCTION-PROMPT.md +0 -738
- package/templates/frontend/react-vite-help/.cursor/agents/frontend-senior.agent.md +0 -49
- package/templates/frontend/react-vite-help/.cursor/agents/qa-test-expert.agent.md +0 -49
- package/templates/frontend/react-vite-help/.cursor/agents/security-expert.agent.md +0 -39
- package/templates/frontend/react-vite-help/.cursor/agents/ux-ui-expert.agent.md +0 -45
- package/templates/frontend/react-vite-help/.cursor/commands/add-route.md +0 -211
- package/templates/frontend/react-vite-help/.cursor/commands/add-tests.md +0 -269
- package/templates/frontend/react-vite-help/.cursor/commands/new-component.md +0 -232
- package/templates/frontend/react-vite-help/.cursor/commands/new-form.md +0 -268
- package/templates/frontend/react-vite-help/.cursor/commands/new-page.md +0 -203
- package/templates/frontend/react-vite-help/.cursor/commands/new-query.md +0 -287
- package/templates/frontend/react-vite-help/.cursor/commands/new-table.md +0 -299
- package/templates/frontend/react-vite-help/.cursor/hooks/ensureTestsExist.ts +0 -220
- package/templates/frontend/react-vite-help/.cursor/hooks.json +0 -10
- package/templates/frontend/react-vite-help/.cursor/mcp.json +0 -17
- package/templates/mobile/expo-base/.cursor/agents/api-integration.md +0 -139
- package/templates/mobile/expo-base/.cursor/agents/feature-architect.md +0 -131
- package/templates/mobile/expo-base/.cursor/agents/i18n-manager.md +0 -147
- package/templates/mobile/expo-base/.cursor/agents/quality-reviewer.md +0 -137
- package/templates/mobile/expo-base/.cursor/agents/testing-specialist.md +0 -123
- package/templates/mobile/expo-base/.cursor/agents/theme-engineer.md +0 -106
- package/templates/mobile/expo-base/.cursor/commands/add-translation.md +0 -184
- package/templates/mobile/expo-base/.cursor/commands/new-api-service.md +0 -280
- package/templates/mobile/expo-base/.cursor/commands/new-component.md +0 -298
- package/templates/mobile/expo-base/.cursor/commands/new-hook.md +0 -291
- package/templates/mobile/expo-base/.cursor/commands/new-modal.md +0 -345
- package/templates/mobile/expo-base/.cursor/commands/new-screen.md +0 -267
- package/templates/mobile/expo-base/.cursor/commands/new-tab.md +0 -238
- package/templates/mobile/expo-base/.cursor/mcp.json +0 -21
|
@@ -4,7 +4,7 @@ import react from "@vitejs/plugin-react";
|
|
|
4
4
|
import tailwindcss from "@tailwindcss/vite";
|
|
5
5
|
import { TanStackRouterVite } from "@tanstack/router-plugin/vite";
|
|
6
6
|
|
|
7
|
-
export default defineConfig({
|
|
7
|
+
export default defineConfig(({ mode }) => ({
|
|
8
8
|
plugins: [
|
|
9
9
|
TanStackRouterVite({
|
|
10
10
|
target: "react",
|
|
@@ -24,4 +24,9 @@ export default defineConfig({
|
|
|
24
24
|
},
|
|
25
25
|
dedupe: ["react", "react-dom"],
|
|
26
26
|
},
|
|
27
|
-
|
|
27
|
+
// @huenei/design-system ships bundled ESM that reads process.env.NODE_ENV.
|
|
28
|
+
// The `process` object itself is shimmed in index.html.
|
|
29
|
+
define: {
|
|
30
|
+
"process.env.NODE_ENV": JSON.stringify(mode),
|
|
31
|
+
},
|
|
32
|
+
}));
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"editor.tabSize": 2,
|
|
3
|
+
"editor.insertSpaces": true,
|
|
4
|
+
"editor.detectIndentation": false,
|
|
5
|
+
"editor.lineHeight": 22,
|
|
6
|
+
"editor.formatOnSave": true,
|
|
7
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
8
|
+
"files.eol": "\n",
|
|
9
|
+
"prettier.requireConfig": true,
|
|
10
|
+
"prettier.useEditorConfig": false,
|
|
11
|
+
"eslint.validate": ["javascript", "typescript", "typescriptreact"],
|
|
12
|
+
"eslint.format.enable": true,
|
|
13
|
+
"editor.codeActionsOnSave": {
|
|
14
|
+
"source.fixAll.eslint": "always"
|
|
15
|
+
},
|
|
16
|
+
"css.validate": false,
|
|
17
|
+
"less.validate": false,
|
|
18
|
+
"scss.validate": false,
|
|
19
|
+
"tailwindCSS.validate": true,
|
|
20
|
+
"tailwindCSS.emmetCompletions": true,
|
|
21
|
+
"editor.quickSuggestions": {
|
|
22
|
+
"strings": true
|
|
23
|
+
},
|
|
24
|
+
"terminal.integrated.fontFamily": "MesloLGS NF",
|
|
25
|
+
"terminal.integrated.fontSize": 13
|
|
26
|
+
}
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
"scripts": {
|
|
6
6
|
"start": "expo start",
|
|
7
7
|
"reset-project": "node ./scripts/reset-project.js",
|
|
8
|
-
"android": "expo
|
|
9
|
-
"ios": "expo
|
|
8
|
+
"android": "expo run:android",
|
|
9
|
+
"ios": "expo run:ios",
|
|
10
10
|
"web": "expo start --web",
|
|
11
11
|
"lint": "eslint .",
|
|
12
12
|
"lint:fix": "eslint . --fix",
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@expo/vector-icons": "^15.0.3",
|
|
25
|
+
"@huenei/ui-mobile": "^1.0.2",
|
|
25
26
|
"@react-native-async-storage/async-storage": "^2.2.0",
|
|
26
27
|
"@react-navigation/bottom-tabs": "^7.4.0",
|
|
27
28
|
"@react-navigation/elements": "^2.6.3",
|
|
@@ -1,177 +1,144 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Login Screen
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
const [
|
|
29
|
-
|
|
30
|
-
const [
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
);
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
header: {
|
|
146
|
-
marginBottom: tokens.spacing['3xl'],
|
|
147
|
-
},
|
|
148
|
-
title: {
|
|
149
|
-
...typography.h2,
|
|
150
|
-
marginBottom: tokens.spacing.xs,
|
|
151
|
-
},
|
|
152
|
-
subtitle: {
|
|
153
|
-
...typography.body,
|
|
154
|
-
},
|
|
155
|
-
form: {
|
|
156
|
-
marginBottom: tokens.spacing.xl,
|
|
157
|
-
},
|
|
158
|
-
forgotPassword: {
|
|
159
|
-
...typography.bodyMedium,
|
|
160
|
-
textAlign: 'right',
|
|
161
|
-
marginBottom: tokens.spacing.lg,
|
|
162
|
-
},
|
|
163
|
-
loginButton: {
|
|
164
|
-
marginTop: tokens.spacing.md,
|
|
165
|
-
},
|
|
166
|
-
footer: {
|
|
167
|
-
flexDirection: 'row',
|
|
168
|
-
justifyContent: 'center',
|
|
169
|
-
alignItems: 'center',
|
|
170
|
-
},
|
|
171
|
-
footerText: {
|
|
172
|
-
...typography.body,
|
|
173
|
-
},
|
|
174
|
-
registerLink: {
|
|
175
|
-
...typography.bodyMedium,
|
|
176
|
-
},
|
|
177
|
-
});
|
|
1
|
+
/**
|
|
2
|
+
* Login Screen
|
|
3
|
+
*
|
|
4
|
+
* Login del design system (@huenei/ui-mobile): Background + LoginCard.
|
|
5
|
+
* Usuario = email. Auth mock del template; forgot* → forgot-password.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import { LoginCard, type TextFieldStatus } from '@huenei/ui-mobile';
|
|
9
|
+
import { Link, router } from 'expo-router';
|
|
10
|
+
import { useState } from 'react';
|
|
11
|
+
import { useTranslation } from 'react-i18next';
|
|
12
|
+
import { Alert, StyleSheet, Text, View } from 'react-native';
|
|
13
|
+
|
|
14
|
+
import { useAuth } from '@/contexts/auth-context';
|
|
15
|
+
import { useTheme } from '@/hooks/use-theme';
|
|
16
|
+
import { tokens } from '@/theme/tokens';
|
|
17
|
+
import { typography } from '@/theme/typography';
|
|
18
|
+
import * as validators from '@/utils/validators';
|
|
19
|
+
|
|
20
|
+
export function LoginScreen() {
|
|
21
|
+
const { t } = useTranslation();
|
|
22
|
+
const { colors } = useTheme();
|
|
23
|
+
const { login } = useAuth();
|
|
24
|
+
|
|
25
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
26
|
+
const [usernameStatus, setUsernameStatus] =
|
|
27
|
+
useState<TextFieldStatus>('default');
|
|
28
|
+
const [passwordStatus, setPasswordStatus] =
|
|
29
|
+
useState<TextFieldStatus>('default');
|
|
30
|
+
const [usernameInlineText, setUsernameInlineText] = useState<
|
|
31
|
+
string | undefined
|
|
32
|
+
>();
|
|
33
|
+
const [passwordInlineText, setPasswordInlineText] = useState<
|
|
34
|
+
string | undefined
|
|
35
|
+
>();
|
|
36
|
+
|
|
37
|
+
function goToForgotPassword() {
|
|
38
|
+
router.push('/(public)/forgot-password');
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function clearFieldErrors() {
|
|
42
|
+
setUsernameStatus('default');
|
|
43
|
+
setPasswordStatus('default');
|
|
44
|
+
setUsernameInlineText(undefined);
|
|
45
|
+
setPasswordInlineText(undefined);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
async function handleSubmit(values: { username: string; password: string }) {
|
|
49
|
+
clearFieldErrors();
|
|
50
|
+
|
|
51
|
+
const email = values.username.trim();
|
|
52
|
+
const password = values.password;
|
|
53
|
+
|
|
54
|
+
const emailValidation = validators.combine(
|
|
55
|
+
validators.required(email),
|
|
56
|
+
validators.email(email),
|
|
57
|
+
);
|
|
58
|
+
const passwordValidation = validators.required(password);
|
|
59
|
+
|
|
60
|
+
let hasError = false;
|
|
61
|
+
|
|
62
|
+
if (!emailValidation.isValid) {
|
|
63
|
+
setUsernameStatus('error');
|
|
64
|
+
setUsernameInlineText(emailValidation.message);
|
|
65
|
+
hasError = true;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
if (!passwordValidation.isValid) {
|
|
69
|
+
setPasswordStatus('error');
|
|
70
|
+
setPasswordInlineText(passwordValidation.message);
|
|
71
|
+
hasError = true;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if (hasError) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
setIsLoading(true);
|
|
79
|
+
try {
|
|
80
|
+
await login(email, password);
|
|
81
|
+
router.replace('/(tabs)');
|
|
82
|
+
} catch {
|
|
83
|
+
Alert.alert(t('feedback.error'), t('feedback.pleaseTryAgain'));
|
|
84
|
+
} finally {
|
|
85
|
+
setIsLoading(false);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
return (
|
|
90
|
+
<View style={styles.content}>
|
|
91
|
+
<LoginCard
|
|
92
|
+
title={t('auth.signIn')}
|
|
93
|
+
description={t('auth.loginToAccount')}
|
|
94
|
+
usernameLabel={t('auth.email')}
|
|
95
|
+
usernamePlaceholder={t('auth.enterEmail')}
|
|
96
|
+
passwordLabel={t('auth.password')}
|
|
97
|
+
passwordPlaceholder={t('auth.enterPassword')}
|
|
98
|
+
submitLabel={t('common.next')}
|
|
99
|
+
forgotUsernameLabel={t('auth.forgotUsername')}
|
|
100
|
+
forgotPasswordLabel={t('auth.forgotPassword')}
|
|
101
|
+
forgotCredentialsLabel={t('auth.forgotCredentials')}
|
|
102
|
+
showForgotUsername
|
|
103
|
+
showForgotPassword
|
|
104
|
+
showForgotCredentials
|
|
105
|
+
usernameStatus={usernameStatus}
|
|
106
|
+
passwordStatus={passwordStatus}
|
|
107
|
+
usernameInlineText={usernameInlineText}
|
|
108
|
+
passwordInlineText={passwordInlineText}
|
|
109
|
+
loading={isLoading}
|
|
110
|
+
onSubmit={handleSubmit}
|
|
111
|
+
onForgotUsername={goToForgotPassword}
|
|
112
|
+
onForgotPassword={goToForgotPassword}
|
|
113
|
+
onForgotCredentials={goToForgotPassword}
|
|
114
|
+
/>
|
|
115
|
+
|
|
116
|
+
<View style={styles.footer}>
|
|
117
|
+
<Text style={[typography.body, { color: colors.textSecondary }]}>
|
|
118
|
+
{t('auth.noAccount')}{' '}
|
|
119
|
+
</Text>
|
|
120
|
+
<Link href="/(public)/register" asChild>
|
|
121
|
+
<Text style={[typography.bodyMedium, { color: colors.interactive }]}>
|
|
122
|
+
{t('auth.signUp')}
|
|
123
|
+
</Text>
|
|
124
|
+
</Link>
|
|
125
|
+
</View>
|
|
126
|
+
</View>
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
const styles = StyleSheet.create({
|
|
131
|
+
content: {
|
|
132
|
+
flex: 1,
|
|
133
|
+
justifyContent: 'center',
|
|
134
|
+
paddingHorizontal: tokens.spacing.lg,
|
|
135
|
+
paddingVertical: tokens.spacing.xl,
|
|
136
|
+
gap: tokens.spacing.lg,
|
|
137
|
+
},
|
|
138
|
+
footer: {
|
|
139
|
+
flexDirection: 'row',
|
|
140
|
+
justifyContent: 'center',
|
|
141
|
+
alignItems: 'center',
|
|
142
|
+
flexWrap: 'wrap',
|
|
143
|
+
},
|
|
144
|
+
});
|