@tanstack/react-form 0.26.0 → 0.26.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 +1 @@
1
- {"version":3,"file":"getFormData.cjs","sources":["../../../src/start/getFormData.tsx"],"sourcesContent":["import { type FetchFn } from '@tanstack/start'\nimport { _tanstackInternalsCookie } from './utils'\nimport type { ServerFormState } from './types'\n\ntype FetchFnCtx = Parameters<FetchFn<never, never>>[1]\n\nexport const initialFormState = {\n errorMap: {\n onServer: undefined,\n },\n errors: [],\n}\n\nexport const getFormData = async (ctx: FetchFnCtx) => {\n const data = (await _tanstackInternalsCookie.parse(\n ctx.request.headers.get('Cookie'),\n )) as undefined | ServerFormState<any>\n // Delete the cookie before it hits the client again¸\n ctx.request.headers.delete('Cookie')\n if (!data) return initialFormState\n return data\n}\n"],"names":["_tanstackInternalsCookie"],"mappings":";;;AAMO,MAAM,mBAAmB;AAAA,EAC9B,UAAU;AAAA,IACR,UAAU;AAAA,EACZ;AAAA,EACA,QAAQ,CAAC;AACX;AAEa,MAAA,cAAc,OAAO,QAAoB;AAC9C,QAAA,OAAQ,MAAMA,MAAAA,yBAAyB;AAAA,IAC3C,IAAI,QAAQ,QAAQ,IAAI,QAAQ;AAAA,EAAA;AAG9B,MAAA,QAAQ,QAAQ,OAAO,QAAQ;AACnC,MAAI,CAAC;AAAa,WAAA;AACX,SAAA;AACT;;;"}
1
+ {"version":3,"file":"getFormData.cjs","sources":["../../../src/start/getFormData.tsx"],"sourcesContent":["import { _tanstackInternalsCookie } from './utils'\nimport type { FetchFnCtx } from '@tanstack/start'\nimport type { ServerFormState } from './types'\n\nexport const initialFormState = {\n errorMap: {\n onServer: undefined,\n },\n errors: [],\n}\n\nexport const getFormData = async (ctx: FetchFnCtx) => {\n const data = (await _tanstackInternalsCookie.parse(\n ctx.request.headers.get('Cookie'),\n )) as undefined | ServerFormState<any>\n // Delete the cookie before it hits the client again¸\n ctx.request.headers.delete('Cookie')\n if (!data) return initialFormState\n return data\n}\n"],"names":["_tanstackInternalsCookie"],"mappings":";;;AAIO,MAAM,mBAAmB;AAAA,EAC9B,UAAU;AAAA,IACR,UAAU;AAAA,EACZ;AAAA,EACA,QAAQ,CAAC;AACX;AAEa,MAAA,cAAc,OAAO,QAAoB;AAC9C,QAAA,OAAQ,MAAMA,MAAAA,yBAAyB;AAAA,IAC3C,IAAI,QAAQ,QAAQ,IAAI,QAAQ;AAAA,EAAA;AAG9B,MAAA,QAAQ,QAAQ,OAAO,QAAQ;AACnC,MAAI,CAAC;AAAa,WAAA;AACX,SAAA;AACT;;;"}
@@ -1,7 +1,6 @@
1
- import { FetchFn } from '@tanstack/start';
1
+ import { FetchFnCtx } from '@tanstack/start';
2
2
  import { ServerFormState } from './types.cjs';
3
3
 
4
- type FetchFnCtx = Parameters<FetchFn<never, never>>[1];
5
4
  export declare const initialFormState: {
6
5
  errorMap: {
7
6
  onServer: undefined;
@@ -14,4 +13,3 @@ export declare const getFormData: (ctx: FetchFnCtx) => Promise<{
14
13
  };
15
14
  errors: never[];
16
15
  } | ServerFormState<any>>;
17
- export {};
@@ -1,7 +1,6 @@
1
- import { FetchFn } from '@tanstack/start';
1
+ import { FetchFnCtx } from '@tanstack/start';
2
2
  import { ServerFormState } from './types.js';
3
3
 
4
- type FetchFnCtx = Parameters<FetchFn<never, never>>[1];
5
4
  export declare const initialFormState: {
6
5
  errorMap: {
7
6
  onServer: undefined;
@@ -14,4 +13,3 @@ export declare const getFormData: (ctx: FetchFnCtx) => Promise<{
14
13
  };
15
14
  errors: never[];
16
15
  } | ServerFormState<any>>;
17
- export {};
@@ -1 +1 @@
1
- {"version":3,"file":"getFormData.js","sources":["../../../src/start/getFormData.tsx"],"sourcesContent":["import { type FetchFn } from '@tanstack/start'\nimport { _tanstackInternalsCookie } from './utils'\nimport type { ServerFormState } from './types'\n\ntype FetchFnCtx = Parameters<FetchFn<never, never>>[1]\n\nexport const initialFormState = {\n errorMap: {\n onServer: undefined,\n },\n errors: [],\n}\n\nexport const getFormData = async (ctx: FetchFnCtx) => {\n const data = (await _tanstackInternalsCookie.parse(\n ctx.request.headers.get('Cookie'),\n )) as undefined | ServerFormState<any>\n // Delete the cookie before it hits the client again¸\n ctx.request.headers.delete('Cookie')\n if (!data) return initialFormState\n return data\n}\n"],"names":[],"mappings":";AAMO,MAAM,mBAAmB;AAAA,EAC9B,UAAU;AAAA,IACR,UAAU;AAAA,EACZ;AAAA,EACA,QAAQ,CAAC;AACX;AAEa,MAAA,cAAc,OAAO,QAAoB;AAC9C,QAAA,OAAQ,MAAM,yBAAyB;AAAA,IAC3C,IAAI,QAAQ,QAAQ,IAAI,QAAQ;AAAA,EAAA;AAG9B,MAAA,QAAQ,QAAQ,OAAO,QAAQ;AACnC,MAAI,CAAC;AAAa,WAAA;AACX,SAAA;AACT;"}
1
+ {"version":3,"file":"getFormData.js","sources":["../../../src/start/getFormData.tsx"],"sourcesContent":["import { _tanstackInternalsCookie } from './utils'\nimport type { FetchFnCtx } from '@tanstack/start'\nimport type { ServerFormState } from './types'\n\nexport const initialFormState = {\n errorMap: {\n onServer: undefined,\n },\n errors: [],\n}\n\nexport const getFormData = async (ctx: FetchFnCtx) => {\n const data = (await _tanstackInternalsCookie.parse(\n ctx.request.headers.get('Cookie'),\n )) as undefined | ServerFormState<any>\n // Delete the cookie before it hits the client again¸\n ctx.request.headers.delete('Cookie')\n if (!data) return initialFormState\n return data\n}\n"],"names":[],"mappings":";AAIO,MAAM,mBAAmB;AAAA,EAC9B,UAAU;AAAA,IACR,UAAU;AAAA,EACZ;AAAA,EACA,QAAQ,CAAC;AACX;AAEa,MAAA,cAAc,OAAO,QAAoB;AAC9C,QAAA,OAAQ,MAAM,yBAAyB;AAAA,IAC3C,IAAI,QAAQ,QAAQ,IAAI,QAAQ;AAAA,EAAA;AAG9B,MAAA,QAAQ,QAAQ,OAAO,QAAQ;AACnC,MAAI,CAAC;AAAa,WAAA;AACX,SAAA;AACT;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/react-form",
3
- "version": "0.26.0",
3
+ "version": "0.26.1",
4
4
  "description": "Powerful, type-safe forms for React.",
5
5
  "author": "tannerlinsley",
6
6
  "license": "MIT",
@@ -63,7 +63,7 @@
63
63
  "@tanstack/form-core": "0.25.3"
64
64
  },
65
65
  "devDependencies": {
66
- "@tanstack/start": "^1.42.1",
66
+ "@tanstack/start": "^1.43.13",
67
67
  "@types/react": "^18.3.3",
68
68
  "@types/react-dom": "^18.3.0",
69
69
  "@vitejs/plugin-react": "^4.3.0",
@@ -72,7 +72,7 @@
72
72
  "vite": "^5.1.4"
73
73
  },
74
74
  "peerDependencies": {
75
- "@tanstack/start": "^1.40.1",
75
+ "@tanstack/start": "^1.43.13",
76
76
  "react": "^17.0.0 || ^18.0.0 || ^19.0.0"
77
77
  },
78
78
  "peerDependenciesMeta": {
@@ -1,9 +1,7 @@
1
- import { type FetchFn } from '@tanstack/start'
2
1
  import { _tanstackInternalsCookie } from './utils'
2
+ import type { FetchFnCtx } from '@tanstack/start'
3
3
  import type { ServerFormState } from './types'
4
4
 
5
- type FetchFnCtx = Parameters<FetchFn<never, never>>[1]
6
-
7
5
  export const initialFormState = {
8
6
  errorMap: {
9
7
  onServer: undefined,