@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.
- package/dist/AppForm/createFormHook.public.d.ts +6 -3
- package/dist/AppForm/createFormHook.public.js +2 -4
- package/dist/AppForm/createFormHookTypes.public.d.ts +81 -5
- package/dist/AppForm/initializeAppForm.lib.d.ts +11 -3
- package/dist/AppForm/initializeAppForm.lib.js +11 -1
- package/dist/Components.public.d.ts +2 -2
- package/dist/Field.svelte +8 -5
- package/dist/FieldGroup/FieldGroupApi.public.d.ts +1 -1
- package/dist/createForm.public.d.ts +23 -1
- package/dist/createForm.public.js +22 -0
- package/dist/createForm.svelte.d.ts +2 -2
- package/dist/formApiTypes.public.d.ts +24 -0
- package/dist/formType.public.d.ts +1 -2
- package/dist/index.d.ts +4 -3
- package/dist/index.js +4 -3
- package/package.json +3 -4
- package/dist/AppForm/appFormOptions.public.d.ts +0 -12
- package/dist/AppForm/appFormOptions.public.js +0 -1
- package/src/AppForm/AppForm.svelte +0 -14
- package/src/AppForm/Components.lib.ts +0 -28
- package/src/AppForm/SvelteAppFormApi.public.ts +0 -14
- package/src/AppForm/appFormOptions.public.ts +0 -57
- package/src/AppForm/componentMap.public.ts +0 -19
- package/src/AppForm/contexts.lib.ts +0 -24
- package/src/AppForm/createFormHook.public.ts +0 -33
- package/src/AppForm/createFormHookTypes.public.ts +0 -30
- package/src/AppForm/fieldComponentHelpers.lib.ts +0 -24
- package/src/AppForm/getFormHookHelpers.public.ts +0 -82
- package/src/AppForm/initializeAppForm.lib.ts +0 -18
- package/src/Components.public.ts +0 -371
- package/src/Field.svelte +0 -152
- package/src/FieldGroup/FieldGroupApi.public.ts +0 -100
- package/src/FieldGroup/withFields.lib.ts +0 -82
- package/src/FieldGroup/withFields.public.ts +0 -179
- package/src/FormGroup.svelte +0 -101
- package/src/Subscribe.svelte +0 -26
- package/src/context-keys.ts +0 -2
- package/src/createForm.public.ts +0 -26
- package/src/createForm.svelte.ts +0 -76
- package/src/formApiTypes.public.ts +0 -48
- package/src/formType.public.ts +0 -46
- package/src/index.ts +0 -17
- 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
|
-
}
|