@tanstack/react-form 0.29.0 → 0.29.2

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.
@@ -1,7 +1,6 @@
1
1
  import { decode } from 'decode-formdata';
2
2
  import { FormOptions, ValidationError, Validator } from '@tanstack/form-core';
3
3
  import { ServerFormState } from './types.cjs';
4
-
5
4
  type OnServerValidateFn<TFormData> = (props: {
6
5
  value: TFormData;
7
6
  }) => ValidationError;
@@ -1,5 +1,4 @@
1
1
  import { ServerFormState } from './types.cjs';
2
-
3
2
  interface ServerValidateErrorState<TFormData> {
4
3
  formState: ServerFormState<TFormData>;
5
4
  }
@@ -1,3 +1,2 @@
1
1
  import { FormState } from '@tanstack/form-core';
2
-
3
2
  export type ServerFormState<TFormData> = Pick<FormState<TFormData>, 'values' | 'errors' | 'errorMap'>;
@@ -1,7 +1,6 @@
1
1
  import { decode } from 'decode-formdata';
2
2
  import { FormOptions, ValidationError, Validator } from '@tanstack/form-core';
3
3
  import { FetchFn } from '@tanstack/start';
4
-
5
4
  type Ctx = Parameters<FetchFn<FormData, unknown>>[1];
6
5
  type OnServerValidateFn<TFormData> = (props: {
7
6
  value: TFormData;
@@ -1,5 +1,4 @@
1
1
  import { ServerFormState } from './types.cjs';
2
-
3
2
  interface ServerValidateErrorState<TFormData> {
4
3
  formState: ServerFormState<TFormData>;
5
4
  response: Response;
@@ -1,6 +1,5 @@
1
1
  import { FetchFnCtx } from '@tanstack/start';
2
2
  import { ServerFormState } from './types.cjs';
3
-
4
3
  export declare const initialFormState: {
5
4
  errorMap: {
6
5
  onServer: undefined;
@@ -1,3 +1,2 @@
1
1
  import { FormState } from '@tanstack/form-core';
2
-
3
2
  export type ServerFormState<TFormData> = Pick<FormState<TFormData>, 'values' | 'errors' | 'errorMap'>;
@@ -1,6 +1,5 @@
1
1
  import { DeepKeys, DeepValue, FieldApiOptions, Validator } from '@tanstack/form-core';
2
2
  import { FunctionComponent } from 'react';
3
-
4
3
  /**
5
4
  * The field options.
6
5
  */
@@ -1,6 +1,5 @@
1
1
  import { FieldApi, DeepKeys, DeepValue, Validator } from '@tanstack/form-core';
2
2
  import { NodeType, UseFieldOptions } from './types.cjs';
3
-
4
3
  interface ReactFieldApi<TParentData, TFormValidator extends Validator<TParentData, unknown> | undefined = undefined> {
5
4
  /**
6
5
  * A pre-bound and type-safe sub-field component using this field as a root.
@@ -2,7 +2,6 @@ import { FormApi, FormOptions, FormState, Validator } from '@tanstack/form-core'
2
2
  import { FieldComponent, UseField } from './useField.cjs';
3
3
  import { NoInfer } from '@tanstack/react-store';
4
4
  import { NodeType } from './types.cjs';
5
-
6
5
  /**
7
6
  * Fields that are added onto the `FormAPI` from `@tanstack/form-core` and returned from `useForm`
8
7
  */
@@ -1,3 +1,2 @@
1
1
  import { useLayoutEffect } from 'react';
2
-
3
2
  export declare const useIsomorphicLayoutEffect: typeof useLayoutEffect;
@@ -1,3 +1,2 @@
1
1
  import { FormApi, FormTransform, Validator } from '@tanstack/form-core';
2
-
3
2
  export declare function useTransform<TFormData, TFormValidator extends Validator<TFormData, unknown> | undefined = undefined>(fn: (formBase: FormApi<any, any>) => FormApi<TFormData, TFormValidator>, deps: unknown[]): FormTransform<TFormData, TFormValidator>;
@@ -1,7 +1,6 @@
1
1
  import { decode } from 'decode-formdata';
2
2
  import { FormOptions, ValidationError, Validator } from '@tanstack/form-core';
3
3
  import { ServerFormState } from './types.js';
4
-
5
4
  type OnServerValidateFn<TFormData> = (props: {
6
5
  value: TFormData;
7
6
  }) => ValidationError;
@@ -1,5 +1,4 @@
1
1
  import { ServerFormState } from './types.js';
2
-
3
2
  interface ServerValidateErrorState<TFormData> {
4
3
  formState: ServerFormState<TFormData>;
5
4
  }
@@ -1,3 +1,2 @@
1
1
  import { FormState } from '@tanstack/form-core';
2
-
3
2
  export type ServerFormState<TFormData> = Pick<FormState<TFormData>, 'values' | 'errors' | 'errorMap'>;
@@ -1,7 +1,6 @@
1
1
  import { decode } from 'decode-formdata';
2
2
  import { FormOptions, ValidationError, Validator } from '@tanstack/form-core';
3
3
  import { FetchFn } from '@tanstack/start';
4
-
5
4
  type Ctx = Parameters<FetchFn<FormData, unknown>>[1];
6
5
  type OnServerValidateFn<TFormData> = (props: {
7
6
  value: TFormData;
@@ -1,5 +1,4 @@
1
1
  import { ServerFormState } from './types.js';
2
-
3
2
  interface ServerValidateErrorState<TFormData> {
4
3
  formState: ServerFormState<TFormData>;
5
4
  response: Response;
@@ -1,6 +1,5 @@
1
1
  import { FetchFnCtx } from '@tanstack/start';
2
2
  import { ServerFormState } from './types.js';
3
-
4
3
  export declare const initialFormState: {
5
4
  errorMap: {
6
5
  onServer: undefined;
@@ -1,3 +1,2 @@
1
1
  import { FormState } from '@tanstack/form-core';
2
-
3
2
  export type ServerFormState<TFormData> = Pick<FormState<TFormData>, 'values' | 'errors' | 'errorMap'>;
@@ -1,6 +1,5 @@
1
1
  import { DeepKeys, DeepValue, FieldApiOptions, Validator } from '@tanstack/form-core';
2
2
  import { FunctionComponent } from 'react';
3
-
4
3
  /**
5
4
  * The field options.
6
5
  */
@@ -1,6 +1,5 @@
1
1
  import { FieldApi, DeepKeys, DeepValue, Validator } from '@tanstack/form-core';
2
2
  import { NodeType, UseFieldOptions } from './types.js';
3
-
4
3
  interface ReactFieldApi<TParentData, TFormValidator extends Validator<TParentData, unknown> | undefined = undefined> {
5
4
  /**
6
5
  * A pre-bound and type-safe sub-field component using this field as a root.
@@ -2,7 +2,6 @@ import { FormApi, FormOptions, FormState, Validator } from '@tanstack/form-core'
2
2
  import { FieldComponent, UseField } from './useField.js';
3
3
  import { NoInfer } from '@tanstack/react-store';
4
4
  import { NodeType } from './types.js';
5
-
6
5
  /**
7
6
  * Fields that are added onto the `FormAPI` from `@tanstack/form-core` and returned from `useForm`
8
7
  */
@@ -1,3 +1,2 @@
1
1
  import { useLayoutEffect } from 'react';
2
-
3
2
  export declare const useIsomorphicLayoutEffect: typeof useLayoutEffect;
@@ -1,3 +1,2 @@
1
1
  import { FormApi, FormTransform, Validator } from '@tanstack/form-core';
2
-
3
2
  export declare function useTransform<TFormData, TFormValidator extends Validator<TFormData, unknown> | undefined = undefined>(fn: (formBase: FormApi<any, any>) => FormApi<TFormData, TFormValidator>, deps: unknown[]): FormTransform<TFormData, TFormValidator>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/react-form",
3
- "version": "0.29.0",
3
+ "version": "0.29.2",
4
4
  "description": "Powerful, type-safe forms for React.",
5
5
  "author": "tannerlinsley",
6
6
  "license": "MIT",
@@ -57,19 +57,19 @@
57
57
  "src"
58
58
  ],
59
59
  "dependencies": {
60
- "@remix-run/node": "^2.11.0",
60
+ "@remix-run/node": "^2.11.1",
61
61
  "@tanstack/react-store": "^0.5.5",
62
62
  "decode-formdata": "^0.7.5",
63
- "@tanstack/form-core": "0.28.0"
63
+ "@tanstack/form-core": "0.29.2"
64
64
  },
65
65
  "devDependencies": {
66
- "@tanstack/start": "^1.46.4",
66
+ "@tanstack/start": "^1.47.2",
67
67
  "@types/react": "^18.3.3",
68
68
  "@types/react-dom": "^18.3.0",
69
69
  "@vitejs/plugin-react": "^4.3.1",
70
70
  "react": "^18.3.1",
71
71
  "react-dom": "^18.3.1",
72
- "vite": "^5.3.5"
72
+ "vite": "^5.4.0"
73
73
  },
74
74
  "peerDependencies": {
75
75
  "@tanstack/start": "^1.43.13",