remix-validated-form 2.0.0 → 2.0.1-beta.0

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 (101) hide show
  1. package/.turbo/turbo-build.log +9 -0
  2. package/.turbo/turbo-dev.log +0 -0
  3. package/browser/ValidatedForm.d.ts +0 -0
  4. package/browser/ValidatedForm.js +0 -0
  5. package/browser/hooks.d.ts +0 -0
  6. package/browser/hooks.js +0 -0
  7. package/browser/index.d.ts +0 -0
  8. package/browser/index.js +0 -0
  9. package/browser/internal/flatten.d.ts +0 -0
  10. package/browser/internal/flatten.js +0 -0
  11. package/browser/internal/formContext.d.ts +0 -0
  12. package/browser/internal/formContext.js +0 -0
  13. package/browser/internal/util.d.ts +0 -0
  14. package/browser/internal/util.js +0 -0
  15. package/browser/server.d.ts +0 -0
  16. package/browser/server.js +0 -0
  17. package/browser/test-data/testFormData.d.ts +0 -0
  18. package/browser/test-data/testFormData.js +0 -0
  19. package/browser/validation/createValidator.d.ts +0 -0
  20. package/browser/validation/createValidator.js +0 -0
  21. package/browser/validation/types.d.ts +0 -0
  22. package/browser/validation/types.js +0 -0
  23. package/browser/validation/validation.test.d.ts +0 -0
  24. package/browser/validation/validation.test.js +0 -0
  25. package/browser/validation/withYup.d.ts +0 -0
  26. package/browser/validation/withYup.js +0 -0
  27. package/browser/validation/withZod.d.ts +0 -0
  28. package/browser/validation/withZod.js +0 -0
  29. package/build/ValidatedForm.d.ts +0 -0
  30. package/build/ValidatedForm.js +0 -0
  31. package/build/hooks.d.ts +0 -0
  32. package/build/hooks.js +0 -0
  33. package/build/index.d.ts +0 -0
  34. package/build/index.js +0 -0
  35. package/build/internal/flatten.d.ts +0 -0
  36. package/build/internal/flatten.js +0 -0
  37. package/build/internal/formContext.d.ts +0 -0
  38. package/build/internal/formContext.js +0 -0
  39. package/build/internal/util.d.ts +0 -0
  40. package/build/internal/util.js +0 -0
  41. package/build/server.d.ts +0 -0
  42. package/build/server.js +0 -0
  43. package/build/test-data/testFormData.d.ts +0 -0
  44. package/build/test-data/testFormData.js +0 -0
  45. package/build/validation/createValidator.d.ts +0 -0
  46. package/build/validation/createValidator.js +0 -0
  47. package/build/validation/types.d.ts +0 -0
  48. package/build/validation/types.js +0 -0
  49. package/build/validation/validation.test.d.ts +0 -0
  50. package/build/validation/validation.test.js +0 -0
  51. package/build/validation/withYup.d.ts +0 -0
  52. package/build/validation/withYup.js +0 -0
  53. package/build/validation/withZod.d.ts +0 -0
  54. package/build/validation/withZod.js +0 -0
  55. package/jest.config.js +5 -0
  56. package/package.json +7 -32
  57. package/src/ValidatedForm.tsx +151 -0
  58. package/src/hooks.ts +60 -0
  59. package/src/index.ts +8 -0
  60. package/src/internal/flatten.ts +48 -0
  61. package/src/internal/formContext.ts +36 -0
  62. package/src/internal/util.ts +23 -0
  63. package/src/server.ts +10 -0
  64. package/src/test-data/testFormData.ts +55 -0
  65. package/src/validation/createValidator.ts +24 -0
  66. package/src/validation/types.ts +26 -0
  67. package/src/validation/validation.test.ts +317 -0
  68. package/src/validation/withYup.ts +43 -0
  69. package/src/validation/withZod.ts +51 -0
  70. package/tsconfig.json +5 -0
  71. package/.eslintcache +0 -1
  72. package/.eslintignore +0 -1
  73. package/.prettierignore +0 -10
  74. package/LICENSE +0 -21
  75. package/README.md +0 -235
  76. package/browser/flatten.d.ts +0 -4
  77. package/browser/flatten.js +0 -35
  78. package/build/flatten.d.ts +0 -4
  79. package/build/flatten.js +0 -43
  80. package/sample-app/.env +0 -7
  81. package/sample-app/README.md +0 -53
  82. package/sample-app/app/components/ErrorBox.tsx +0 -34
  83. package/sample-app/app/components/FormInput.tsx +0 -40
  84. package/sample-app/app/components/FormSelect.tsx +0 -37
  85. package/sample-app/app/components/SubjectForm.tsx +0 -150
  86. package/sample-app/app/entry.client.tsx +0 -4
  87. package/sample-app/app/entry.server.tsx +0 -21
  88. package/sample-app/app/root.tsx +0 -92
  89. package/sample-app/app/routes/index.tsx +0 -5
  90. package/sample-app/app/routes/subjects/$id.edit.tsx +0 -98
  91. package/sample-app/app/routes/subjects/index.tsx +0 -112
  92. package/sample-app/app/routes/subjects/new.tsx +0 -46
  93. package/sample-app/app/services/db.server.ts +0 -23
  94. package/sample-app/app/types.ts +0 -6
  95. package/sample-app/package-lock.json +0 -10890
  96. package/sample-app/package.json +0 -36
  97. package/sample-app/prisma/dev.db +0 -0
  98. package/sample-app/prisma/schema.prisma +0 -34
  99. package/sample-app/public/favicon.ico +0 -0
  100. package/sample-app/remix.config.js +0 -10
  101. package/sample-app/remix.env.d.ts +0 -2
@@ -1,36 +0,0 @@
1
- {
2
- "private": true,
3
- "name": "remix-app-template",
4
- "description": "",
5
- "license": "",
6
- "scripts": {
7
- "build": "remix build",
8
- "dev": "remix dev",
9
- "postinstall": "remix setup node",
10
- "start": "remix-serve build"
11
- },
12
- "dependencies": {
13
- "@chakra-ui/react": "^1.7.3",
14
- "@emotion/react": "^11.7.0",
15
- "@emotion/styled": "^11.6.0",
16
- "@prisma/client": "^3.6.0",
17
- "@remix-run/react": "^1.0.6",
18
- "@remix-run/serve": "^1.0.6",
19
- "framer-motion": "^4.1.17",
20
- "react": "^17.0.2",
21
- "react-dom": "^17.0.2",
22
- "remix": "^1.0.6",
23
- "zod": "^3.11.6"
24
- },
25
- "devDependencies": {
26
- "@remix-run/dev": "^1.0.6",
27
- "@types/react": "^17.0.24",
28
- "@types/react-dom": "^17.0.9",
29
- "prisma": "^3.6.0",
30
- "typescript": "^4.1.2"
31
- },
32
- "engines": {
33
- "node": ">=14"
34
- },
35
- "sideEffects": false
36
- }
Binary file
@@ -1,34 +0,0 @@
1
- // This is your Prisma schema file,
2
- // learn more about it in the docs: https://pris.ly/d/prisma-schema
3
-
4
- generator client {
5
- provider = "prisma-client-js"
6
- }
7
-
8
- datasource db {
9
- provider = "sqlite"
10
- url = env("DATABASE_URL")
11
- }
12
-
13
- model Subject {
14
- id Int @id @default(autoincrement())
15
- name String
16
- description String
17
- subjectDays SubjectDays[]
18
- teacher Teacher?
19
- }
20
-
21
- model Teacher {
22
- id Int @id @default(autoincrement())
23
- name String
24
- email String
25
- subject Subject? @relation(fields: [subjectId], references: [id])
26
- subjectId Int @unique
27
- }
28
-
29
- model SubjectDays {
30
- id Int @id @default(autoincrement())
31
- subject Subject @relation(fields: [subjectId], references: [id])
32
- subjectId Int
33
- day String
34
- }
Binary file
@@ -1,10 +0,0 @@
1
- /**
2
- * @type {import('@remix-run/dev/config').AppConfig}
3
- */
4
- module.exports = {
5
- appDirectory: "app",
6
- browserBuildDirectory: "public/build",
7
- publicPath: "/build/",
8
- serverBuildDirectory: "build",
9
- devServerPort: 8002,
10
- };
@@ -1,2 +0,0 @@
1
- /// <reference types="@remix-run/dev" />
2
- /// <reference types="@remix-run/node/globals" />