@tanstack/react-form 0.13.1 → 0.13.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.
@@ -1,6 +1,6 @@
1
1
  import type { FormApi, FormOptions, Validator } from '@tanstack/form-core';
2
- import { type UseField, type FieldComponent } from './useField';
3
- import { type ValidateFormData } from './validateFormData';
2
+ import { type UseField, type FieldComponent } from './useField.cjs';
3
+ import { type ValidateFormData } from './validateFormData.cjs';
4
4
  export type FormFactory<TFormData, TFormValidator extends Validator<TFormData, unknown> | undefined = undefined> = {
5
5
  useForm: (opts?: FormOptions<TFormData, TFormValidator>) => FormApi<TFormData, TFormValidator>;
6
6
  useField: UseField<TFormData>;
@@ -1,8 +1,8 @@
1
1
  export type { DeepKeys, DeepValue, FieldApiOptions, FieldInfo, FieldMeta, FieldOptions, FieldState, FormOptions, FormState, RequiredByKey, Updater, UpdaterFn, ValidationCause, ValidationError, ValidationMeta, } from '@tanstack/form-core';
2
2
  export { FormApi, FieldApi, functionalUpdate, mergeForm, } from '@tanstack/form-core';
3
- export { useForm } from './useForm';
4
- export type { UseField, FieldComponent } from './useField';
5
- export { useField, Field } from './useField';
6
- export type { FormFactory } from './createFormFactory';
7
- export { createFormFactory } from './createFormFactory';
8
- export { useTransform } from './useTransform';
3
+ export { useForm } from './useForm.cjs';
4
+ export type { UseField, FieldComponent } from './useField.cjs';
5
+ export { useField, Field } from './useField.cjs';
6
+ export type { FormFactory } from './createFormFactory.cjs';
7
+ export { createFormFactory } from './createFormFactory.cjs';
8
+ export { useTransform } from './useTransform.cjs';
@@ -2,7 +2,7 @@
2
2
  import React from 'rehackt';
3
3
  import type { DeepKeys, DeepValue, Narrow, Validator } from '@tanstack/form-core';
4
4
  import { FieldApi } from '@tanstack/form-core';
5
- import type { UseFieldOptions } from './types';
5
+ import type { UseFieldOptions } from './types.cjs';
6
6
  declare module '@tanstack/form-core' {
7
7
  interface FieldApi<TParentData, TName extends DeepKeys<TParentData>, TFieldValidator extends Validator<DeepValue<TParentData, TName>, unknown> | undefined = undefined, TFormValidator extends Validator<TParentData, unknown> | undefined = undefined, TData extends DeepValue<TParentData, TName> = DeepValue<TParentData, TName>> {
8
8
  Field: FieldComponent<TParentData, TFormValidator>;
@@ -3,7 +3,7 @@ import type { FormState, FormOptions, Validator } from '@tanstack/form-core';
3
3
  import { FormApi } from '@tanstack/form-core';
4
4
  import type { NoInfer } from '@tanstack/react-store';
5
5
  import { type PropsWithChildren, type ReactNode } from 'rehackt';
6
- import { type UseField, type FieldComponent } from './useField';
6
+ import { type UseField, type FieldComponent } from './useField.cjs';
7
7
  declare module '@tanstack/form-core' {
8
8
  interface FormApi<TFormData, TFormValidator> {
9
9
  Provider: (props: PropsWithChildren) => JSX.Element;
@@ -1,5 +1,3 @@
1
- /// <reference types="react" />
2
- /// <reference types="node" />
3
1
  import { decode } from 'decode-formdata';
4
2
  import type { FormApi, FormOptions, ValidationError, Validator } from '@tanstack/form-core';
5
3
  type OnServerValidateFn<TFormData> = (props: {
@@ -1,6 +1,6 @@
1
1
  import type { FormApi, FormOptions, Validator } from '@tanstack/form-core';
2
- import { type UseField, type FieldComponent } from './useField';
3
- import { type ValidateFormData } from './validateFormData';
2
+ import { type UseField, type FieldComponent } from './useField.js';
3
+ import { type ValidateFormData } from './validateFormData.js';
4
4
  export type FormFactory<TFormData, TFormValidator extends Validator<TFormData, unknown> | undefined = undefined> = {
5
5
  useForm: (opts?: FormOptions<TFormData, TFormValidator>) => FormApi<TFormData, TFormValidator>;
6
6
  useField: UseField<TFormData>;
@@ -1,8 +1,8 @@
1
1
  export type { DeepKeys, DeepValue, FieldApiOptions, FieldInfo, FieldMeta, FieldOptions, FieldState, FormOptions, FormState, RequiredByKey, Updater, UpdaterFn, ValidationCause, ValidationError, ValidationMeta, } from '@tanstack/form-core';
2
2
  export { FormApi, FieldApi, functionalUpdate, mergeForm, } from '@tanstack/form-core';
3
- export { useForm } from './useForm';
4
- export type { UseField, FieldComponent } from './useField';
5
- export { useField, Field } from './useField';
6
- export type { FormFactory } from './createFormFactory';
7
- export { createFormFactory } from './createFormFactory';
8
- export { useTransform } from './useTransform';
3
+ export { useForm } from './useForm.js';
4
+ export type { UseField, FieldComponent } from './useField.js';
5
+ export { useField, Field } from './useField.js';
6
+ export type { FormFactory } from './createFormFactory.js';
7
+ export { createFormFactory } from './createFormFactory.js';
8
+ export { useTransform } from './useTransform.js';
@@ -2,7 +2,7 @@
2
2
  import React from 'rehackt';
3
3
  import type { DeepKeys, DeepValue, Narrow, Validator } from '@tanstack/form-core';
4
4
  import { FieldApi } from '@tanstack/form-core';
5
- import type { UseFieldOptions } from './types';
5
+ import type { UseFieldOptions } from './types.js';
6
6
  declare module '@tanstack/form-core' {
7
7
  interface FieldApi<TParentData, TName extends DeepKeys<TParentData>, TFieldValidator extends Validator<DeepValue<TParentData, TName>, unknown> | undefined = undefined, TFormValidator extends Validator<TParentData, unknown> | undefined = undefined, TData extends DeepValue<TParentData, TName> = DeepValue<TParentData, TName>> {
8
8
  Field: FieldComponent<TParentData, TFormValidator>;
@@ -3,7 +3,7 @@ import type { FormState, FormOptions, Validator } from '@tanstack/form-core';
3
3
  import { FormApi } from '@tanstack/form-core';
4
4
  import type { NoInfer } from '@tanstack/react-store';
5
5
  import { type PropsWithChildren, type ReactNode } from 'rehackt';
6
- import { type UseField, type FieldComponent } from './useField';
6
+ import { type UseField, type FieldComponent } from './useField.js';
7
7
  declare module '@tanstack/form-core' {
8
8
  interface FormApi<TFormData, TFormValidator> {
9
9
  Provider: (props: PropsWithChildren) => JSX.Element;
@@ -1,5 +1,3 @@
1
- /// <reference types="react" />
2
- /// <reference types="node" />
3
1
  import { decode } from 'decode-formdata';
4
2
  import type { FormApi, FormOptions, ValidationError, Validator } from '@tanstack/form-core';
5
3
  type OnServerValidateFn<TFormData> = (props: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/react-form",
3
- "version": "0.13.1",
3
+ "version": "0.13.4",
4
4
  "description": "Powerful, type-safe forms for React.",
5
5
  "author": "tannerlinsley",
6
6
  "license": "MIT",
@@ -44,7 +44,7 @@
44
44
  "@tanstack/react-store": "^0.2.1",
45
45
  "decode-formdata": "^0.4.0",
46
46
  "rehackt": "^0.0.3",
47
- "@tanstack/form-core": "0.13.1"
47
+ "@tanstack/form-core": "0.13.4"
48
48
  },
49
49
  "peerDependencies": {
50
50
  "react": "^17.0.0 || ^18.0.0",
@@ -62,9 +62,9 @@
62
62
  "scripts": {
63
63
  "clean": "rimraf ./dist && rimraf ./coverage",
64
64
  "test:eslint": "eslint --ext .ts,.tsx ./src",
65
- "test:types:versions49": "../../node_modules/typescript49/bin/tsc --project tsconfig.legacy.json",
66
- "test:types:versions50": "../../node_modules/typescript50/bin/tsc",
67
- "test:types:versions51": "../../node_modules/typescript51/bin/tsc",
65
+ "test:types:versions49": "node ../../node_modules/typescript49/lib/tsc.js --project tsconfig.legacy.json",
66
+ "test:types:versions50": "node ../../node_modules/typescript50/lib/tsc.js",
67
+ "test:types:versions51": "node ../../node_modules/typescript51/lib/tsc.js",
68
68
  "test:types:versions52": "tsc",
69
69
  "test:types": "pnpm run \"/^test:types:versions.*/\"",
70
70
  "test:lib": "vitest",