@tanstack/svelte-form 2.0.0-alpha.0 → 2.0.0-alpha.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.
Files changed (43) hide show
  1. package/dist/AppForm/createFormHook.public.d.ts +6 -3
  2. package/dist/AppForm/createFormHook.public.js +2 -4
  3. package/dist/AppForm/createFormHookTypes.public.d.ts +81 -5
  4. package/dist/AppForm/initializeAppForm.lib.d.ts +11 -3
  5. package/dist/AppForm/initializeAppForm.lib.js +11 -1
  6. package/dist/Components.public.d.ts +2 -2
  7. package/dist/Field.svelte +8 -5
  8. package/dist/FieldGroup/FieldGroupApi.public.d.ts +1 -1
  9. package/dist/createForm.public.d.ts +23 -1
  10. package/dist/createForm.public.js +22 -0
  11. package/dist/createForm.svelte.d.ts +2 -2
  12. package/dist/formApiTypes.public.d.ts +24 -0
  13. package/dist/formType.public.d.ts +1 -2
  14. package/dist/index.d.ts +4 -3
  15. package/dist/index.js +4 -3
  16. package/package.json +3 -4
  17. package/dist/AppForm/appFormOptions.public.d.ts +0 -12
  18. package/dist/AppForm/appFormOptions.public.js +0 -1
  19. package/src/AppForm/AppForm.svelte +0 -14
  20. package/src/AppForm/Components.lib.ts +0 -28
  21. package/src/AppForm/SvelteAppFormApi.public.ts +0 -14
  22. package/src/AppForm/appFormOptions.public.ts +0 -57
  23. package/src/AppForm/componentMap.public.ts +0 -19
  24. package/src/AppForm/contexts.lib.ts +0 -24
  25. package/src/AppForm/createFormHook.public.ts +0 -33
  26. package/src/AppForm/createFormHookTypes.public.ts +0 -30
  27. package/src/AppForm/fieldComponentHelpers.lib.ts +0 -24
  28. package/src/AppForm/getFormHookHelpers.public.ts +0 -82
  29. package/src/AppForm/initializeAppForm.lib.ts +0 -18
  30. package/src/Components.public.ts +0 -371
  31. package/src/Field.svelte +0 -152
  32. package/src/FieldGroup/FieldGroupApi.public.ts +0 -100
  33. package/src/FieldGroup/withFields.lib.ts +0 -82
  34. package/src/FieldGroup/withFields.public.ts +0 -179
  35. package/src/FormGroup.svelte +0 -101
  36. package/src/Subscribe.svelte +0 -26
  37. package/src/context-keys.ts +0 -2
  38. package/src/createForm.public.ts +0 -26
  39. package/src/createForm.svelte.ts +0 -76
  40. package/src/formApiTypes.public.ts +0 -48
  41. package/src/formType.public.ts +0 -46
  42. package/src/index.ts +0 -17
  43. package/src/utils.lib.ts +0 -30
package/src/index.ts DELETED
@@ -1,17 +0,0 @@
1
- export * from '@tanstack/form-core'
2
- export * from '@tanstack/svelte-store'
3
-
4
- export * from './createForm.public'
5
- export * from './formApiTypes.public'
6
- export * from './formType.public'
7
- export * from './Components.public'
8
- export { default as Field, createField } from './Field.svelte'
9
- export { default as FormGroup, createFormGroup } from './FormGroup.svelte'
10
- export * from './FieldGroup/FieldGroupApi.public'
11
- export * from './FieldGroup/withFields.public'
12
- export * from './AppForm/SvelteAppFormApi.public'
13
- export * from './AppForm/appFormOptions.public'
14
- export * from './AppForm/componentMap.public'
15
- export * from './AppForm/createFormHook.public'
16
- export * from './AppForm/createFormHookTypes.public'
17
- export * from './AppForm/getFormHookHelpers.public'
package/src/utils.lib.ts DELETED
@@ -1,30 +0,0 @@
1
- export function withComponentProps<
2
- TProps extends object,
3
- TExtra extends object,
4
- >(props: TProps, extra: TExtra): TProps & TExtra {
5
- return new Proxy(props as TProps & TExtra, {
6
- get(target, property, receiver) {
7
- if (Reflect.has(extra, property)) return Reflect.get(extra, property)
8
- return Reflect.get(target, property, receiver)
9
- },
10
- has(target, property) {
11
- return Reflect.has(extra, property) || Reflect.has(target, property)
12
- },
13
- ownKeys(target) {
14
- return [
15
- ...new Set([...Reflect.ownKeys(target), ...Reflect.ownKeys(extra)]),
16
- ]
17
- },
18
- getOwnPropertyDescriptor(target, property) {
19
- if (Reflect.has(extra, property)) {
20
- return {
21
- configurable: true,
22
- enumerable: true,
23
- value: Reflect.get(extra, property),
24
- writable: false,
25
- }
26
- }
27
- return Reflect.getOwnPropertyDescriptor(target, property)
28
- },
29
- })
30
- }