@sveltejs/kit 2.45.0 → 2.46.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": "@sveltejs/kit",
3
- "version": "2.45.0",
3
+ "version": "2.46.1",
4
4
  "description": "SvelteKit is the fastest way to build Svelte apps",
5
5
  "keywords": [
6
6
  "framework",
@@ -1850,19 +1850,23 @@ export type RemoteFormFieldType<T> = {
1850
1850
  // Input element properties based on type
1851
1851
  type InputElementProps<T extends keyof InputTypeMap> = T extends 'checkbox' | 'radio'
1852
1852
  ? {
1853
+ name: string;
1853
1854
  type: T;
1855
+ value?: string;
1854
1856
  'aria-invalid': boolean | 'false' | 'true' | undefined;
1855
1857
  get checked(): boolean;
1856
1858
  set checked(value: boolean);
1857
1859
  }
1858
1860
  : T extends 'file'
1859
1861
  ? {
1862
+ name: string;
1860
1863
  type: 'file';
1861
1864
  'aria-invalid': boolean | 'false' | 'true' | undefined;
1862
1865
  get files(): FileList | null;
1863
1866
  set files(v: FileList | null);
1864
1867
  }
1865
1868
  : {
1869
+ name: string;
1866
1870
  type: T;
1867
1871
  'aria-invalid': boolean | 'false' | 'true' | undefined;
1868
1872
  get value(): string | number;
@@ -1882,10 +1886,10 @@ export type RemoteFormFieldValue = string | string[] | number | boolean | File |
1882
1886
 
1883
1887
  type AsArgs<Type extends keyof InputTypeMap, Value> = Type extends 'checkbox'
1884
1888
  ? Value extends string[]
1885
- ? [type: 'checkbox', value: Value[number] | (string & {})]
1889
+ ? [type: Type, value: Value[number] | (string & {})]
1886
1890
  : [type: Type]
1887
- : Type extends 'radio'
1888
- ? [type: 'radio', value: Value | (string & {})]
1891
+ : Type extends 'radio' | 'submit' | 'hidden'
1892
+ ? [type: Type, value: Value | (string & {})]
1889
1893
  : [type: Type];
1890
1894
 
1891
1895
  /**
@@ -1925,7 +1929,7 @@ type RemoteFormFields<T> =
1925
1929
  : RemoteFormFieldContainer<T> & { [K in keyof T]-?: RemoteFormFields<T[K]> };
1926
1930
 
1927
1931
  // By breaking this out into its own type, we avoid the TS recursion depth limit
1928
- type RecursiveFormFields = RemoteFormField<any> & { [key: string]: RecursiveFormFields };
1932
+ type RecursiveFormFields = RemoteFormField<any> & { [key: string | number]: RecursiveFormFields };
1929
1933
 
1930
1934
  type MaybeArray<T> = T | T[];
1931
1935
 
@@ -1945,6 +1949,36 @@ type ExtractId<Input> = Input extends { id: infer Id }
1945
1949
  : string | number
1946
1950
  : string | number;
1947
1951
 
1952
+ /**
1953
+ * Recursively maps an input type to a structure where each field can create a validation issue.
1954
+ * This mirrors the runtime behavior of the `invalid` proxy passed to form handlers.
1955
+ */
1956
+ type InvalidField<T> =
1957
+ WillRecurseIndefinitely<T> extends true
1958
+ ? Record<string | number, any>
1959
+ : NonNullable<T> extends string | number | boolean | File
1960
+ ? (message: string) => StandardSchemaV1.Issue
1961
+ : NonNullable<T> extends Array<infer U>
1962
+ ? {
1963
+ [K in number]: InvalidField<U>;
1964
+ } & ((message: string) => StandardSchemaV1.Issue)
1965
+ : NonNullable<T> extends RemoteFormInput
1966
+ ? {
1967
+ [K in keyof T]-?: InvalidField<T[K]>;
1968
+ } & ((message: string) => StandardSchemaV1.Issue)
1969
+ : Record<string, never>;
1970
+
1971
+ /**
1972
+ * A function and proxy object used to imperatively create validation errors in form handlers.
1973
+ *
1974
+ * Call `invalid(issue1, issue2, ...issueN)` to throw a validation error.
1975
+ * If an issue is a `string`, it applies to the form as a whole (and will show up in `fields.allIssues()`)
1976
+ * Access properties to create field-specific issues: `invalid.fieldName('message')`.
1977
+ * The type structure mirrors the input data structure for type-safe field access.
1978
+ */
1979
+ export type Invalid<Input = any> = ((...issues: Array<string | StandardSchemaV1.Issue>) => never) &
1980
+ InvalidField<Input>;
1981
+
1948
1982
  /**
1949
1983
  * The return value of a remote `form` function. See [Remote functions](https://svelte.dev/docs/kit/remote-functions#form) for full documentation.
1950
1984
  */
@@ -41,6 +41,7 @@ import {
41
41
  import { import_peer } from '../../utils/import.js';
42
42
  import { compact } from '../../utils/array.js';
43
43
  import { should_ignore } from './static_analysis/utils.js';
44
+ import { rollupVersion } from 'vite';
44
45
 
45
46
  const cwd = process.cwd();
46
47
 
@@ -675,6 +676,15 @@ async function kit({ svelte_config }) {
675
676
  // Set up manualChunks to isolate *.remote.ts files
676
677
  const { manualChunks } = config.build.rollupOptions.output;
677
678
 
679
+ const [major, minor] = rollupVersion.split('.').map(Number);
680
+ const is_outdated_rollup = major === 4 && minor < 52;
681
+ if (is_outdated_rollup) {
682
+ console.warn(
683
+ 'Rollup >=4.52.0 is recommended when using SvelteKit remote functions as it fixes some bugs related to code-splitting. Current version: ' +
684
+ rollupVersion
685
+ );
686
+ }
687
+
678
688
  config.build.rollupOptions.output = {
679
689
  ...config.build.rollupOptions.output,
680
690
  manualChunks(id, meta) {
@@ -685,8 +695,19 @@ async function kit({ svelte_config }) {
685
695
  return `remote-${hash(relative)}`;
686
696
  }
687
697
 
688
- if (imported_by_remotes.has(id)) {
689
- return `chunk-${uid++}`;
698
+ // With onlyExplicitManualChunks Rollup will keep any manual chunk's dependencies out of that chunk.
699
+ // This option only exists on more recent Rollup versions; use this as a fallback for older versions.
700
+ if (is_outdated_rollup) {
701
+ // Prevent core runtime and env from ending up in a remote chunk, which could break because of initialization order
702
+ if (id === `${runtime_directory}/app/server/index.js`) {
703
+ return 'app-server';
704
+ }
705
+ if (id === `${runtime_directory}/shared-server.js`) {
706
+ return 'app-shared-server';
707
+ }
708
+ if (imported_by_remotes.has(id)) {
709
+ return `chunk-${uid++}`;
710
+ }
690
711
  }
691
712
 
692
713
  // If there was an existing manualChunks function, call it
@@ -707,6 +728,11 @@ async function kit({ svelte_config }) {
707
728
  }
708
729
  }
709
730
  };
731
+
732
+ if (!is_outdated_rollup) {
733
+ // @ts-expect-error only exists in more recent Rollup versions https://rollupjs.org/configuration-options/#output-onlyexplicitmanualchunks
734
+ config.build.rollupOptions.onlyExplicitManualChunks = true;
735
+ }
710
736
  },
711
737
 
712
738
  configureServer(_dev_server) {
@@ -20,7 +20,7 @@ import { get_cache, run_remote_function } from './shared.js';
20
20
  *
21
21
  * @template Output
22
22
  * @overload
23
- * @param {() => MaybePromise<Output>} fn
23
+ * @param {(invalid: import('@sveltejs/kit').Invalid<void>) => MaybePromise<Output>} fn
24
24
  * @returns {RemoteForm<void, Output>}
25
25
  * @since 2.27
26
26
  */
@@ -33,7 +33,7 @@ import { get_cache, run_remote_function } from './shared.js';
33
33
  * @template Output
34
34
  * @overload
35
35
  * @param {'unchecked'} validate
36
- * @param {(data: Input) => MaybePromise<Output>} fn
36
+ * @param {(data: Input, invalid: import('@sveltejs/kit').Invalid<Input>) => MaybePromise<Output>} fn
37
37
  * @returns {RemoteForm<Input, Output>}
38
38
  * @since 2.27
39
39
  */
@@ -46,7 +46,7 @@ import { get_cache, run_remote_function } from './shared.js';
46
46
  * @template Output
47
47
  * @overload
48
48
  * @param {Schema} validate
49
- * @param {(data: StandardSchemaV1.InferOutput<Schema>) => MaybePromise<Output>} fn
49
+ * @param {(data: StandardSchemaV1.InferOutput<Schema>, invalid: import('@sveltejs/kit').Invalid<StandardSchemaV1.InferOutput<Schema>>) => MaybePromise<Output>} fn
50
50
  * @returns {RemoteForm<StandardSchemaV1.InferInput<Schema>, Output>}
51
51
  * @since 2.27
52
52
  */
@@ -54,18 +54,19 @@ import { get_cache, run_remote_function } from './shared.js';
54
54
  * @template {RemoteFormInput} Input
55
55
  * @template Output
56
56
  * @param {any} validate_or_fn
57
- * @param {(data?: Input) => MaybePromise<Output>} [maybe_fn]
57
+ * @param {(data_or_invalid: any, invalid?: any) => MaybePromise<Output>} [maybe_fn]
58
58
  * @returns {RemoteForm<Input, Output>}
59
59
  * @since 2.27
60
60
  */
61
61
  /*@__NO_SIDE_EFFECTS__*/
62
62
  // @ts-ignore we don't want to prefix `fn` with an underscore, as that will be user-visible
63
63
  export function form(validate_or_fn, maybe_fn) {
64
- /** @type {(data?: Input) => Output} */
64
+ /** @type {any} */
65
65
  const fn = maybe_fn ?? validate_or_fn;
66
66
 
67
67
  /** @type {StandardSchemaV1 | null} */
68
- const schema = !maybe_fn || validate_or_fn === 'unchecked' ? null : validate_or_fn;
68
+ const schema =
69
+ !maybe_fn || validate_or_fn === 'unchecked' ? null : /** @type {any} */ (validate_or_fn);
69
70
 
70
71
  /**
71
72
  * @param {string | number | boolean} [key]
@@ -152,29 +153,7 @@ export function form(validate_or_fn, maybe_fn) {
152
153
  }
153
154
 
154
155
  if (validated?.issues !== undefined) {
155
- output.issues = flatten_issues(validated.issues);
156
-
157
- // if it was a progressively-enhanced submission, we don't need
158
- // to return the input — it's already there
159
- if (!event.isRemoteRequest) {
160
- output.input = {};
161
-
162
- for (let key of form_data.keys()) {
163
- // redact sensitive fields
164
- if (/^[.\]]?_/.test(key)) continue;
165
-
166
- const is_array = key.endsWith('[]');
167
- const values = form_data.getAll(key).filter((value) => typeof value === 'string');
168
-
169
- if (is_array) key = key.slice(0, -2);
170
-
171
- output.input = set_nested_value(
172
- /** @type {Record<string, any>} */ (output.input),
173
- key,
174
- is_array ? values : values[0]
175
- );
176
- }
177
- }
156
+ handle_issues(output, validated.issues, event.isRemoteRequest, form_data);
178
157
  } else {
179
158
  if (validated !== undefined) {
180
159
  data = validated.value;
@@ -182,7 +161,24 @@ export function form(validate_or_fn, maybe_fn) {
182
161
 
183
162
  state.refreshes ??= {};
184
163
 
185
- output.result = await run_remote_function(event, state, true, data, (d) => d, fn);
164
+ const invalid = create_invalid();
165
+
166
+ try {
167
+ output.result = await run_remote_function(
168
+ event,
169
+ state,
170
+ true,
171
+ data,
172
+ (d) => d,
173
+ (data) => (!maybe_fn ? fn(invalid) : fn(data, invalid))
174
+ );
175
+ } catch (e) {
176
+ if (e instanceof ValidationError) {
177
+ handle_issues(output, e.issues, event.isRemoteRequest, form_data);
178
+ } else {
179
+ throw e;
180
+ }
181
+ }
186
182
  }
187
183
 
188
184
  // We don't need to care about args or deduplicating calls, because uneval results are only relevant in full page reloads
@@ -213,6 +209,7 @@ export function form(validate_or_fn, maybe_fn) {
213
209
  return create_field_proxy(
214
210
  {},
215
211
  () => data?.input ?? {},
212
+ () => {},
216
213
  (path, value) => {
217
214
  if (data) {
218
215
  // don't override a submission
@@ -290,3 +287,124 @@ export function form(validate_or_fn, maybe_fn) {
290
287
 
291
288
  return create_instance();
292
289
  }
290
+
291
+ /**
292
+ * @param {{ issues?: Record<string, any>, input?: Record<string, any>, result: any }} output
293
+ * @param {readonly StandardSchemaV1.Issue[]} issues
294
+ * @param {boolean} is_remote_request
295
+ * @param {FormData} form_data
296
+ */
297
+ function handle_issues(output, issues, is_remote_request, form_data) {
298
+ output.issues = flatten_issues(issues);
299
+
300
+ // if it was a progressively-enhanced submission, we don't need
301
+ // to return the input — it's already there
302
+ if (!is_remote_request) {
303
+ output.input = {};
304
+
305
+ for (let key of form_data.keys()) {
306
+ // redact sensitive fields
307
+ if (/^[.\]]?_/.test(key)) continue;
308
+
309
+ const is_array = key.endsWith('[]');
310
+ const values = form_data.getAll(key).filter((value) => typeof value === 'string');
311
+
312
+ if (is_array) key = key.slice(0, -2);
313
+
314
+ output.input = set_nested_value(
315
+ /** @type {Record<string, any>} */ (output.input),
316
+ key,
317
+ is_array ? values : values[0]
318
+ );
319
+ }
320
+ }
321
+ }
322
+
323
+ /**
324
+ * Creates an invalid function that can be used to imperatively mark form fields as invalid
325
+ * @returns {import('@sveltejs/kit').Invalid}
326
+ */
327
+ function create_invalid() {
328
+ /**
329
+ * @param {...(string | StandardSchemaV1.Issue)} issues
330
+ * @returns {never}
331
+ */
332
+ function invalid(...issues) {
333
+ throw new ValidationError(
334
+ issues.map((issue) => {
335
+ if (typeof issue === 'string') {
336
+ return {
337
+ path: [],
338
+ message: issue
339
+ };
340
+ }
341
+
342
+ return issue;
343
+ })
344
+ );
345
+ }
346
+
347
+ return /** @type {import('@sveltejs/kit').Invalid} */ (
348
+ new Proxy(invalid, {
349
+ get(target, prop) {
350
+ if (typeof prop === 'symbol') return /** @type {any} */ (target)[prop];
351
+
352
+ /**
353
+ * @param {string} message
354
+ * @param {(string | number)[]} path
355
+ * @returns {StandardSchemaV1.Issue}
356
+ */
357
+ const create_issue = (message, path = []) => ({
358
+ message,
359
+ path
360
+ });
361
+
362
+ return create_issue_proxy(prop, create_issue, []);
363
+ }
364
+ })
365
+ );
366
+ }
367
+
368
+ /**
369
+ * Error thrown when form validation fails imperatively
370
+ */
371
+ class ValidationError extends Error {
372
+ /**
373
+ * @param {StandardSchemaV1.Issue[]} issues
374
+ */
375
+ constructor(issues) {
376
+ super('Validation failed');
377
+ this.name = 'ValidationError';
378
+ this.issues = issues;
379
+ }
380
+ }
381
+
382
+ /**
383
+ * Creates a proxy that builds up a path and returns a function to create an issue
384
+ * @param {string | number} key
385
+ * @param {(message: string, path: (string | number)[]) => StandardSchemaV1.Issue} create_issue
386
+ * @param {(string | number)[]} path
387
+ */
388
+ function create_issue_proxy(key, create_issue, path) {
389
+ const new_path = [...path, key];
390
+
391
+ /**
392
+ * @param {string} message
393
+ * @returns {StandardSchemaV1.Issue}
394
+ */
395
+ const issue_func = (message) => create_issue(message, new_path);
396
+
397
+ return new Proxy(issue_func, {
398
+ get(target, prop) {
399
+ if (typeof prop === 'symbol') return /** @type {any} */ (target)[prop];
400
+
401
+ // Handle array access like invalid.items[0]
402
+ if (/^\d+$/.test(prop)) {
403
+ return create_issue_proxy(parseInt(prop, 10), create_issue, new_path);
404
+ }
405
+
406
+ // Handle property access like invalid.field.nested
407
+ return create_issue_proxy(prop, create_issue, new_path);
408
+ }
409
+ });
410
+ }
@@ -16,7 +16,9 @@ import {
16
16
  create_field_proxy,
17
17
  deep_set,
18
18
  set_nested_value,
19
- throw_on_old_property_access
19
+ throw_on_old_property_access,
20
+ split_path,
21
+ build_path_string
20
22
  } from '../../form-utils.svelte.js';
21
23
 
22
24
  /**
@@ -62,6 +64,13 @@ export function form(id) {
62
64
  */
63
65
  let input = $state.raw({});
64
66
 
67
+ // TODO 3.0: Remove versions state and related logic; it's a workaround for $derived not updating when created inside $effects
68
+ /**
69
+ * This allows us to update individual fields granularly
70
+ * @type {Record<string, number>}
71
+ */
72
+ const versions = $state({});
73
+
65
74
  /** @type {Record<string, InternalRemoteFormIssue[]>} */
66
75
  let issues = $state.raw({});
67
76
 
@@ -212,6 +221,13 @@ export function form(id) {
212
221
  } else {
213
222
  input = {};
214
223
 
224
+ for (const [key, value] of Object.entries(versions)) {
225
+ if (value !== undefined) {
226
+ versions[key] ??= 0;
227
+ versions[key] += 1;
228
+ }
229
+ }
230
+
215
231
  if (form_result.refreshes) {
216
232
  refresh_queries(form_result.refreshes, updates);
217
233
  } else {
@@ -390,6 +406,18 @@ export function form(id) {
390
406
  element.type === 'checkbox' && !element.checked ? null : element.value
391
407
  );
392
408
  }
409
+
410
+ versions[name] ??= 0;
411
+ versions[name] += 1;
412
+
413
+ const path = split_path(name);
414
+
415
+ while (path.pop() !== undefined) {
416
+ const name = build_path_string(path);
417
+
418
+ versions[name] ??= 0;
419
+ versions[name] += 1;
420
+ }
393
421
  });
394
422
 
395
423
  return () => {
@@ -482,6 +510,7 @@ export function form(id) {
482
510
  create_field_proxy(
483
511
  {},
484
512
  () => input,
513
+ (path) => versions[path],
485
514
  (path, value) => {
486
515
  if (path.length === 0) {
487
516
  input = value;
@@ -512,6 +541,9 @@ export function form(id) {
512
541
 
513
542
  const id = ++validate_id;
514
543
 
544
+ // wait a tick in case the user is calling validate() right after set() which takes time to propagate
545
+ await tick();
546
+
515
547
  const form_data = new FormData(element, submitter);
516
548
 
517
549
  /** @type {readonly StandardSchemaV1.Issue[]} */
@@ -519,6 +551,10 @@ export function form(id) {
519
551
 
520
552
  const validated = await preflight_schema?.['~standard'].validate(convert(form_data));
521
553
 
554
+ if (validate_id !== id) {
555
+ return;
556
+ }
557
+
522
558
  if (validated?.issues) {
523
559
  array = validated.issues;
524
560
  } else {
@@ -2,7 +2,7 @@
2
2
  /** @import { RemoteFunctionResponse } from 'types' */
3
3
  /** @import { Query } from './query.svelte.js' */
4
4
  import * as devalue from 'devalue';
5
- import { app, goto, query_map } from '../client.js';
5
+ import { app, goto, query_map, remote_responses } from '../client.js';
6
6
  import { HttpError, Redirect } from '@sveltejs/kit/internal';
7
7
  import { tick } from 'svelte';
8
8
  import { create_remote_cache_key, stringify_remote_arg } from '../../shared.js';
@@ -62,6 +62,7 @@ export function create_remote_function(id, create) {
62
62
  void tick().then(() => {
63
63
  if (!entry.count && entry === query_map.get(cache_key)) {
64
64
  query_map.delete(cache_key);
65
+ delete remote_responses[cache_key];
65
66
  }
66
67
  });
67
68
  }
@@ -3,6 +3,7 @@
3
3
  /** @import { StandardSchemaV1 } from '@standard-schema/spec' */
4
4
 
5
5
  import { DEV } from 'esm-env';
6
+ import { untrack } from 'svelte';
6
7
 
7
8
  /**
8
9
  * Sets a value in a nested object using a path string, not mutating the original object but returning a new object
@@ -174,19 +175,27 @@ export function deep_get(object, path) {
174
175
  * Creates a proxy-based field accessor for form data
175
176
  * @param {any} target - Function or empty POJO
176
177
  * @param {() => Record<string, any>} get_input - Function to get current input data
178
+ * @param {(path: string) => void} depend - Function to make an effect depend on a specific field
177
179
  * @param {(path: (string | number)[], value: any) => void} set_input - Function to set input data
178
180
  * @param {() => Record<string, InternalRemoteFormIssue[]>} get_issues - Function to get current issues
179
181
  * @param {(string | number)[]} path - Current access path
180
182
  * @returns {any} Proxy object with name(), value(), and issues() methods
181
183
  */
182
- export function create_field_proxy(target, get_input, set_input, get_issues, path = []) {
184
+ export function create_field_proxy(target, get_input, depend, set_input, get_issues, path = []) {
185
+ const path_string = build_path_string(path);
186
+
187
+ const get_value = () => {
188
+ depend(path_string);
189
+ return untrack(() => deep_get(get_input(), path));
190
+ };
191
+
183
192
  return new Proxy(target, {
184
193
  get(target, prop) {
185
194
  if (typeof prop === 'symbol') return target[prop];
186
195
 
187
196
  // Handle array access like jobs[0]
188
197
  if (/^\d+$/.test(prop)) {
189
- return create_field_proxy({}, get_input, set_input, get_issues, [
198
+ return create_field_proxy({}, get_input, depend, set_input, get_issues, [
190
199
  ...path,
191
200
  parseInt(prop, 10)
192
201
  ]);
@@ -199,18 +208,17 @@ export function create_field_proxy(target, get_input, set_input, get_issues, pat
199
208
  set_input(path, newValue);
200
209
  return newValue;
201
210
  };
202
- return create_field_proxy(set_func, get_input, set_input, get_issues, [...path, prop]);
211
+ return create_field_proxy(set_func, get_input, depend, set_input, get_issues, [
212
+ ...path,
213
+ prop
214
+ ]);
203
215
  }
204
216
 
205
217
  if (prop === 'value') {
206
- const value_func = function () {
207
- // TODO Ideally we'd create a $derived just above and use it here but we can't because of push_reaction which prevents
208
- // changes to deriveds created within an effect to rerun the effect - an argument for
209
- // reverting that change in async mode?
210
- // TODO we did that in Svelte now; bump Svelte version and use $derived here
211
- return deep_get(get_input(), path);
212
- };
213
- return create_field_proxy(value_func, get_input, set_input, get_issues, [...path, prop]);
218
+ return create_field_proxy(get_value, get_input, depend, set_input, get_issues, [
219
+ ...path,
220
+ prop
221
+ ]);
214
222
  }
215
223
 
216
224
  if (prop === 'issues' || prop === 'allIssues') {
@@ -230,7 +238,10 @@ export function create_field_proxy(target, get_input, set_input, get_issues, pat
230
238
  }));
231
239
  };
232
240
 
233
- return create_field_proxy(issues_func, get_input, set_input, get_issues, [...path, prop]);
241
+ return create_field_proxy(issues_func, get_input, depend, set_input, get_issues, [
242
+ ...path,
243
+ prop
244
+ ]);
234
245
  }
235
246
 
236
247
  if (prop === 'as') {
@@ -266,6 +277,19 @@ export function create_field_proxy(target, get_input, set_input, get_issues, pat
266
277
  base_props.type = type === 'file multiple' ? 'file' : type;
267
278
  }
268
279
 
280
+ // Handle submit and hidden inputs
281
+ if (type === 'submit' || type === 'hidden') {
282
+ if (DEV) {
283
+ if (!input_value) {
284
+ throw new Error(`\`${type}\` inputs must have a value`);
285
+ }
286
+ }
287
+
288
+ return Object.defineProperties(base_props, {
289
+ value: { value: input_value, enumerable: true }
290
+ });
291
+ }
292
+
269
293
  // Handle select inputs
270
294
  if (type === 'select' || type === 'select multiple') {
271
295
  return Object.defineProperties(base_props, {
@@ -273,8 +297,7 @@ export function create_field_proxy(target, get_input, set_input, get_issues, pat
273
297
  value: {
274
298
  enumerable: true,
275
299
  get() {
276
- const input = get_input();
277
- return deep_get(input, path);
300
+ return get_value();
278
301
  }
279
302
  }
280
303
  });
@@ -297,8 +320,7 @@ export function create_field_proxy(target, get_input, set_input, get_issues, pat
297
320
  checked: {
298
321
  enumerable: true,
299
322
  get() {
300
- const input = get_input();
301
- const value = deep_get(input, path);
323
+ const value = get_value();
302
324
 
303
325
  if (type === 'radio') {
304
326
  return value === input_value;
@@ -321,8 +343,7 @@ export function create_field_proxy(target, get_input, set_input, get_issues, pat
321
343
  files: {
322
344
  enumerable: true,
323
345
  get() {
324
- const input = get_input();
325
- const value = deep_get(input, path);
346
+ const value = get_value();
326
347
 
327
348
  // Convert File/File[] to FileList-like object
328
349
  if (value instanceof File) {
@@ -362,20 +383,21 @@ export function create_field_proxy(target, get_input, set_input, get_issues, pat
362
383
  value: {
363
384
  enumerable: true,
364
385
  get() {
365
- const input = get_input();
366
- const value = deep_get(input, path);
367
-
386
+ const value = get_value();
368
387
  return value != null ? String(value) : '';
369
388
  }
370
389
  }
371
390
  });
372
391
  };
373
392
 
374
- return create_field_proxy(as_func, get_input, set_input, get_issues, [...path, 'as']);
393
+ return create_field_proxy(as_func, get_input, depend, set_input, get_issues, [
394
+ ...path,
395
+ 'as'
396
+ ]);
375
397
  }
376
398
 
377
399
  // Handle property access (nested fields)
378
- return create_field_proxy({}, get_input, set_input, get_issues, [...path, prop]);
400
+ return create_field_proxy({}, get_input, depend, set_input, get_issues, [...path, prop]);
379
401
  }
380
402
  });
381
403
  }
@@ -385,7 +407,7 @@ export function create_field_proxy(target, get_input, set_input, get_issues, pat
385
407
  * @param {(string | number)[]} path
386
408
  * @returns {string}
387
409
  */
388
- function build_path_string(path) {
410
+ export function build_path_string(path) {
389
411
  let result = '';
390
412
 
391
413
  for (const segment of path) {
package/src/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  // generated during release, do not modify
2
2
 
3
3
  /** @type {string} */
4
- export const VERSION = '2.45.0';
4
+ export const VERSION = '2.46.1';
package/types/index.d.ts CHANGED
@@ -1826,19 +1826,23 @@ declare module '@sveltejs/kit' {
1826
1826
  // Input element properties based on type
1827
1827
  type InputElementProps<T extends keyof InputTypeMap> = T extends 'checkbox' | 'radio'
1828
1828
  ? {
1829
+ name: string;
1829
1830
  type: T;
1831
+ value?: string;
1830
1832
  'aria-invalid': boolean | 'false' | 'true' | undefined;
1831
1833
  get checked(): boolean;
1832
1834
  set checked(value: boolean);
1833
1835
  }
1834
1836
  : T extends 'file'
1835
1837
  ? {
1838
+ name: string;
1836
1839
  type: 'file';
1837
1840
  'aria-invalid': boolean | 'false' | 'true' | undefined;
1838
1841
  get files(): FileList | null;
1839
1842
  set files(v: FileList | null);
1840
1843
  }
1841
1844
  : {
1845
+ name: string;
1842
1846
  type: T;
1843
1847
  'aria-invalid': boolean | 'false' | 'true' | undefined;
1844
1848
  get value(): string | number;
@@ -1858,10 +1862,10 @@ declare module '@sveltejs/kit' {
1858
1862
 
1859
1863
  type AsArgs<Type extends keyof InputTypeMap, Value> = Type extends 'checkbox'
1860
1864
  ? Value extends string[]
1861
- ? [type: 'checkbox', value: Value[number] | (string & {})]
1865
+ ? [type: Type, value: Value[number] | (string & {})]
1862
1866
  : [type: Type]
1863
- : Type extends 'radio'
1864
- ? [type: 'radio', value: Value | (string & {})]
1867
+ : Type extends 'radio' | 'submit' | 'hidden'
1868
+ ? [type: Type, value: Value | (string & {})]
1865
1869
  : [type: Type];
1866
1870
 
1867
1871
  /**
@@ -1901,7 +1905,7 @@ declare module '@sveltejs/kit' {
1901
1905
  : RemoteFormFieldContainer<T> & { [K in keyof T]-?: RemoteFormFields<T[K]> };
1902
1906
 
1903
1907
  // By breaking this out into its own type, we avoid the TS recursion depth limit
1904
- type RecursiveFormFields = RemoteFormField<any> & { [key: string]: RecursiveFormFields };
1908
+ type RecursiveFormFields = RemoteFormField<any> & { [key: string | number]: RecursiveFormFields };
1905
1909
 
1906
1910
  type MaybeArray<T> = T | T[];
1907
1911
 
@@ -1921,6 +1925,36 @@ declare module '@sveltejs/kit' {
1921
1925
  : string | number
1922
1926
  : string | number;
1923
1927
 
1928
+ /**
1929
+ * Recursively maps an input type to a structure where each field can create a validation issue.
1930
+ * This mirrors the runtime behavior of the `invalid` proxy passed to form handlers.
1931
+ */
1932
+ type InvalidField<T> =
1933
+ WillRecurseIndefinitely<T> extends true
1934
+ ? Record<string | number, any>
1935
+ : NonNullable<T> extends string | number | boolean | File
1936
+ ? (message: string) => StandardSchemaV1.Issue
1937
+ : NonNullable<T> extends Array<infer U>
1938
+ ? {
1939
+ [K in number]: InvalidField<U>;
1940
+ } & ((message: string) => StandardSchemaV1.Issue)
1941
+ : NonNullable<T> extends RemoteFormInput
1942
+ ? {
1943
+ [K in keyof T]-?: InvalidField<T[K]>;
1944
+ } & ((message: string) => StandardSchemaV1.Issue)
1945
+ : Record<string, never>;
1946
+
1947
+ /**
1948
+ * A function and proxy object used to imperatively create validation errors in form handlers.
1949
+ *
1950
+ * Call `invalid(issue1, issue2, ...issueN)` to throw a validation error.
1951
+ * If an issue is a `string`, it applies to the form as a whole (and will show up in `fields.allIssues()`)
1952
+ * Access properties to create field-specific issues: `invalid.fieldName('message')`.
1953
+ * The type structure mirrors the input data structure for type-safe field access.
1954
+ */
1955
+ export type Invalid<Input = any> = ((...issues: Array<string | StandardSchemaV1.Issue>) => never) &
1956
+ InvalidField<Input>;
1957
+
1924
1958
  /**
1925
1959
  * The return value of a remote `form` function. See [Remote functions](https://svelte.dev/docs/kit/remote-functions#form) for full documentation.
1926
1960
  */
@@ -3108,7 +3142,7 @@ declare module '$app/server' {
3108
3142
  *
3109
3143
  * @since 2.27
3110
3144
  */
3111
- export function form<Output>(fn: () => MaybePromise<Output>): RemoteForm<void, Output>;
3145
+ export function form<Output>(fn: (invalid: import("@sveltejs/kit").Invalid<void>) => MaybePromise<Output>): RemoteForm<void, Output>;
3112
3146
  /**
3113
3147
  * Creates a form object that can be spread onto a `<form>` element.
3114
3148
  *
@@ -3116,7 +3150,7 @@ declare module '$app/server' {
3116
3150
  *
3117
3151
  * @since 2.27
3118
3152
  */
3119
- export function form<Input extends RemoteFormInput, Output>(validate: "unchecked", fn: (data: Input) => MaybePromise<Output>): RemoteForm<Input, Output>;
3153
+ export function form<Input extends RemoteFormInput, Output>(validate: "unchecked", fn: (data: Input, invalid: import("@sveltejs/kit").Invalid<Input>) => MaybePromise<Output>): RemoteForm<Input, Output>;
3120
3154
  /**
3121
3155
  * Creates a form object that can be spread onto a `<form>` element.
3122
3156
  *
@@ -3124,7 +3158,7 @@ declare module '$app/server' {
3124
3158
  *
3125
3159
  * @since 2.27
3126
3160
  */
3127
- export function form<Schema extends StandardSchemaV1<RemoteFormInput, Record<string, any>>, Output>(validate: Schema, fn: (data: StandardSchemaV1.InferOutput<Schema>) => MaybePromise<Output>): RemoteForm<StandardSchemaV1.InferInput<Schema>, Output>;
3161
+ export function form<Schema extends StandardSchemaV1<RemoteFormInput, Record<string, any>>, Output>(validate: Schema, fn: (data: StandardSchemaV1.InferOutput<Schema>, invalid: import("@sveltejs/kit").Invalid<StandardSchemaV1.InferOutput<Schema>>) => MaybePromise<Output>): RemoteForm<StandardSchemaV1.InferInput<Schema>, Output>;
3128
3162
  /**
3129
3163
  * Creates a remote prerender function. When called from the browser, the function will be invoked on the server via a `fetch` call.
3130
3164
  *
@@ -72,6 +72,8 @@
72
72
  "RemoteFormInput",
73
73
  "RemoteFormIssue",
74
74
  "ExtractId",
75
+ "InvalidField",
76
+ "Invalid",
75
77
  "RemoteForm",
76
78
  "RemoteCommand",
77
79
  "RemoteResource",
@@ -209,6 +211,6 @@
209
211
  null,
210
212
  null
211
213
  ],
212
- "mappings": ";;;;;;;;;;;kBAkCiBA,OAAOA;;;;;;;;;;;;;;;;;;;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