@regle/schemas 1.18.0-beta.2 → 1.18.0-beta.4
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/regle-schemas.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @regle/schemas v1.18.0-beta.
|
|
2
|
+
* @regle/schemas v1.18.0-beta.4
|
|
3
3
|
* (c) 2026 Victor Garcia
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
@@ -48,7 +48,7 @@ type ProcessNestedFields<TState extends Record<string, any> | undefined, TShortc
|
|
|
48
48
|
*/
|
|
49
49
|
type RegleSchemaStatus<TState extends Record<string, any> | undefined = Record<string, any>, TSchema extends StandardSchemaV1 = StandardSchemaV1, TShortcuts extends RegleShortcutDefinition = {}, IsRoot extends boolean = false> = Omit<RegleCommonStatus<TState>, IsRoot extends false ? '$pending' : ''> & {
|
|
50
50
|
/** Represents all the children of your object. You can access any nested child at any depth to get the relevant data you need for your form. */
|
|
51
|
-
readonly $fields: ProcessNestedFields<TState
|
|
51
|
+
readonly $fields: ProcessNestedFields<JoinDiscriminatedUnions<TState>, TShortcuts>;
|
|
52
52
|
/** Collection of all issues, collected for all children properties and nested forms.
|
|
53
53
|
*
|
|
54
54
|
* Only contains errors from properties where $dirty equals true. */
|
|
@@ -61,7 +61,7 @@ type RegleSchemaStatus<TState extends Record<string, any> | undefined = Record<s
|
|
|
61
61
|
readonly $silentErrors: RegleErrorTree<TState, false, true>;
|
|
62
62
|
/** Will return a copy of your state with only the fields that are dirty. By default it will filter out nullish values or objects, but you can override it with the first parameter $extractDirtyFields(false). */
|
|
63
63
|
$extractDirtyFields: (filterNullishValues?: boolean) => DeepPartial<TState>;
|
|
64
|
-
} & ProcessNestedFields<TState
|
|
64
|
+
} & ProcessNestedFields<JoinDiscriminatedUnions<TState>, TShortcuts> & (IsRoot extends true ? {
|
|
65
65
|
/** Sets all properties as dirty, triggering all rules. It returns a promise that will either resolve to false or a type safe copy of your form state. Values that had the required rule will be transformed into a non-nullable value (type only). */
|
|
66
66
|
$validate: (forceValues?: TState extends EmptyObject ? (HasNamedKeys<TState> extends true ? TState : any) : TState) => Promise<RegleSchemaResult<StandardSchemaV1.InferOutput<TSchema>>>;
|
|
67
67
|
} : {}) & ([TShortcuts['nested']] extends [never] ? {} : { [K in keyof TShortcuts['nested']]: ReturnType<NonNullable<TShortcuts['nested']>[K]> });
|
package/dist/regle-schemas.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@regle/schemas",
|
|
3
|
-
"version": "1.18.0-beta.
|
|
3
|
+
"version": "1.18.0-beta.4",
|
|
4
4
|
"description": "Schemas adapter for Regle",
|
|
5
5
|
"homepage": "https://reglejs.dev/",
|
|
6
6
|
"license": "MIT",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@standard-schema/spec": "1.1.0",
|
|
39
39
|
"type-fest": "5.4.1",
|
|
40
|
-
"@regle/core": "1.18.0-beta.
|
|
41
|
-
"@regle/rules": "1.18.0-beta.
|
|
40
|
+
"@regle/core": "1.18.0-beta.4",
|
|
41
|
+
"@regle/rules": "1.18.0-beta.4"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@total-typescript/ts-reset": "0.6.1",
|