@tanstack/vue-form 0.16.0 → 0.16.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/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@tanstack/vue-form",
|
3
|
-
"version": "0.16.
|
3
|
+
"version": "0.16.1",
|
4
4
|
"description": "Powerful, type-safe forms for Vue.",
|
5
5
|
"author": "tannerlinsley",
|
6
6
|
"license": "MIT",
|
@@ -34,7 +34,7 @@
|
|
34
34
|
],
|
35
35
|
"dependencies": {
|
36
36
|
"@tanstack/vue-store": "^0.3.1",
|
37
|
-
"@tanstack/form-core": "0.16.
|
37
|
+
"@tanstack/form-core": "0.16.1"
|
38
38
|
},
|
39
39
|
"devDependencies": {
|
40
40
|
"@vitejs/plugin-vue": "^5.0.4",
|
@@ -49,7 +49,9 @@
|
|
49
49
|
"test:types:versions49": "node ../../node_modules/typescript49/lib/tsc.js --project tsconfig.legacy.json",
|
50
50
|
"test:types:versions50": "node ../../node_modules/typescript50/lib/tsc.js",
|
51
51
|
"test:types:versions51": "node ../../node_modules/typescript51/lib/tsc.js",
|
52
|
-
"test:types:versions52": "tsc",
|
52
|
+
"test:types:versions52": "node ../../node_modules/typescript52/lib/tsc.js",
|
53
|
+
"test:types:versions53": "node ../../node_modules/typescript53/lib/tsc.js",
|
54
|
+
"test:types:versions54": "tsc",
|
53
55
|
"test:types": "pnpm run \"/^test:types:versions.*/\"",
|
54
56
|
"fixme:test:lib": "pnpm run test:2 && pnpm run test:2.7 && pnpm run test:3",
|
55
57
|
"test:lib": "vitest",
|
package/src/useField.tsx
CHANGED
@@ -40,7 +40,7 @@ export type UseField<
|
|
40
40
|
TData extends DeepValue<TParentData, TName> = DeepValue<TParentData, TName>,
|
41
41
|
>(
|
42
42
|
opts: Omit<
|
43
|
-
UseFieldOptions<TParentData, TName, TFieldValidator, TFormValidator>,
|
43
|
+
UseFieldOptions<TParentData, TName, TFieldValidator, TFormValidator, TData>,
|
44
44
|
'form'
|
45
45
|
>,
|
46
46
|
) => {
|
@@ -133,7 +133,8 @@ type FieldComponentProps<
|
|
133
133
|
TFormValidator extends
|
134
134
|
| Validator<TParentData, unknown>
|
135
135
|
| undefined = undefined,
|
136
|
-
|
136
|
+
TData extends DeepValue<TParentData, TName> = DeepValue<TParentData, TName>,
|
137
|
+
> = UseFieldOptions<TParentData, TName, TFieldValidator, TFormValidator, TData>
|
137
138
|
|
138
139
|
export type FieldComponent<
|
139
140
|
TParentData,
|
@@ -148,7 +149,13 @@ export type FieldComponent<
|
|
148
149
|
TData extends DeepValue<TParentData, TName> = DeepValue<TParentData, TName>,
|
149
150
|
>(
|
150
151
|
fieldOptions: Omit<
|
151
|
-
FieldComponentProps<
|
152
|
+
FieldComponentProps<
|
153
|
+
TParentData,
|
154
|
+
TName,
|
155
|
+
TFieldValidator,
|
156
|
+
TFormValidator,
|
157
|
+
TData
|
158
|
+
>,
|
152
159
|
'form'
|
153
160
|
>,
|
154
161
|
context: SetupContext<
|
@@ -184,12 +191,14 @@ export const Field = defineComponent(
|
|
184
191
|
TFormValidator extends
|
185
192
|
| Validator<TParentData, unknown>
|
186
193
|
| undefined = undefined,
|
194
|
+
TData extends DeepValue<TParentData, TName> = DeepValue<TParentData, TName>,
|
187
195
|
>(
|
188
196
|
fieldOptions: UseFieldOptions<
|
189
197
|
TParentData,
|
190
198
|
TName,
|
191
199
|
TFieldValidator,
|
192
|
-
TFormValidator
|
200
|
+
TFormValidator,
|
201
|
+
TData
|
193
202
|
>,
|
194
203
|
context: SetupContext,
|
195
204
|
) => {
|