@tanstack/react-form-remix 1.27.7 → 1.28.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.
@@ -1,2 +1,2 @@
1
- import { AnyFormApi, FormTransform } from '@tanstack/react-form';
2
- export declare function useTransform(fn: (formBase: AnyFormApi) => AnyFormApi, deps: unknown[]): FormTransform<any, any, any, any, any, any, any, any, any, any, any, any>;
1
+ import { AnyFormApi } from '@tanstack/react-form';
2
+ export declare const useTransform: (fn: (formBase: AnyFormApi) => AnyFormApi, deps?: unknown[]) => (data: unknown) => unknown;
@@ -1,9 +1,5 @@
1
- function useTransform(fn, deps) {
2
- return {
3
- fn,
4
- deps
5
- };
6
- }
1
+ import { useCallback } from "react";
2
+ const useTransform = useCallback;
7
3
  export {
8
4
  useTransform
9
5
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useTransform.js","sources":["../../src/useTransform.ts"],"sourcesContent":["import type { AnyFormApi, FormTransform } from '@tanstack/react-form'\n\nexport function useTransform(\n fn: (formBase: AnyFormApi) => AnyFormApi,\n deps: unknown[],\n): FormTransform<any, any, any, any, any, any, any, any, any, any, any, any> {\n return {\n fn,\n deps,\n }\n}\n"],"names":[],"mappings":"AAEO,SAAS,aACd,IACA,MAC2E;AAC3E,SAAO;AAAA,IACL;AAAA,IACA;AAAA,EAAA;AAEJ;"}
1
+ {"version":3,"file":"useTransform.js","sources":["../../src/useTransform.ts"],"sourcesContent":["import { useCallback } from 'react'\nimport type { AnyFormApi } from '@tanstack/react-form'\n\nexport const useTransform: (\n fn: (formBase: AnyFormApi) => AnyFormApi,\n deps?: unknown[],\n) => (data: unknown) => unknown = useCallback as never\n"],"names":[],"mappings":";AAGO,MAAM,eAGqB;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/react-form-remix",
3
- "version": "1.27.7",
3
+ "version": "1.28.1",
4
4
  "description": "Powerful, type-safe forms for React.",
5
5
  "author": "tannerlinsley",
6
6
  "license": "MIT",
@@ -33,7 +33,7 @@
33
33
  ],
34
34
  "dependencies": {
35
35
  "decode-formdata": "^0.9.0",
36
- "@tanstack/react-form": "1.27.7"
36
+ "@tanstack/react-form": "1.28.1"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@tanstack/react-start": "^1.134.9",
@@ -1,11 +1,7 @@
1
- import type { AnyFormApi, FormTransform } from '@tanstack/react-form'
1
+ import { useCallback } from 'react'
2
+ import type { AnyFormApi } from '@tanstack/react-form'
2
3
 
3
- export function useTransform(
4
+ export const useTransform: (
4
5
  fn: (formBase: AnyFormApi) => AnyFormApi,
5
- deps: unknown[],
6
- ): FormTransform<any, any, any, any, any, any, any, any, any, any, any, any> {
7
- return {
8
- fn,
9
- deps,
10
- }
11
- }
6
+ deps?: unknown[],
7
+ ) => (data: unknown) => unknown = useCallback as never