@regle/schemas 1.25.2 → 1.26.0-beta.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/dist/regle-schemas.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @regle/schemas v1.
|
|
2
|
+
* @regle/schemas v1.26.0-beta.1
|
|
3
3
|
* (c) 2026 Victor Garcia
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
@@ -47,7 +47,7 @@ type ProcessNestedFields<TInput extends Record<string, any> | undefined, TOutput
|
|
|
47
47
|
/**
|
|
48
48
|
* @public
|
|
49
49
|
*/
|
|
50
|
-
type RegleSchemaStatus<TInput extends Record<string, any> | undefined = Record<string, any>, TOutput extends Record<string, any> | undefined = TInput, TSchema extends StandardSchemaV1 = StandardSchemaV1, TShortcuts extends RegleShortcutDefinition = {}, IsRoot extends boolean = false> = Omit<RegleCommonStatus<TInput, TOutput>, IsRoot extends false ? '$pending' : ''> & {
|
|
50
|
+
type RegleSchemaStatus<TInput extends Record<string, any> | undefined = Record<string, any>, TOutput extends Record<string, any> | undefined = TInput, TSchema extends StandardSchemaV1 = StandardSchemaV1, TShortcuts extends RegleShortcutDefinition = {}, IsRoot extends boolean = false> = Omit<RegleCommonStatus<TInput, TOutput>, (IsRoot extends false ? '$pending' : '') | '$issues' | '$errors'> & {
|
|
51
51
|
/** 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. */readonly $fields: ProcessNestedFields<JoinDiscriminatedUnions<TInput>, JoinDiscriminatedUnions<TOutput>, TShortcuts>;
|
|
52
52
|
/** Collection of all issues, collected for all children properties and nested forms.
|
|
53
53
|
*
|
|
@@ -71,7 +71,7 @@ type InferRegleSchemaStatusType<TInput extends unknown, TOutput = TInput, TShort
|
|
|
71
71
|
/**
|
|
72
72
|
* @public
|
|
73
73
|
*/
|
|
74
|
-
type RegleSchemaFieldStatus<TInput = any, TOutput = TInput, TShortcuts extends RegleShortcutDefinition = {}> = Omit<RegleCommonStatus<TInput, TOutput>, '$pending' | '$value' | '$silentValue' | '$initialValue' | '$originalValue'> & {
|
|
74
|
+
type RegleSchemaFieldStatus<TInput = any, TOutput = TInput, TShortcuts extends RegleShortcutDefinition = {}> = Omit<RegleCommonStatus<TInput, TOutput>, '$pending' | '$value' | '$silentValue' | '$initialValue' | '$originalValue' | '$issues' | '$errors'> & {
|
|
75
75
|
/** A reference to the original validated model. It can be used to bind your form with v-model.*/$value: MaybeOutput<UnwrapNestedRefs<TInput>>; /** $value variant that will not "touch" the field and update the value silently, running only the rules, so you can easily swap values without impacting user interaction. */
|
|
76
76
|
$silentValue: MaybeOutput<UnwrapNestedRefs<TInput>>;
|
|
77
77
|
/**
|
|
@@ -109,7 +109,7 @@ type RegleSchemaCommonStatus<TInput extends unknown = unknown, TOutput = TInput>
|
|
|
109
109
|
/**
|
|
110
110
|
* @public
|
|
111
111
|
*/
|
|
112
|
-
type RegleSchemaCollectionStatus<TInput extends any[], TOutput = TInput, TShortcuts extends RegleShortcutDefinition = {}> = Omit<RegleSchemaFieldStatus<TInput, TOutput, TShortcuts>, '$errors' | '$silentErrors'> & {
|
|
112
|
+
type RegleSchemaCollectionStatus<TInput extends any[], TOutput = TInput, TShortcuts extends RegleShortcutDefinition = {}> = Omit<RegleSchemaFieldStatus<TInput, TOutput, TShortcuts>, '$issues' | '$errors' | '$silentErrors'> & {
|
|
113
113
|
/** Collection of status for every item in your collection. Each item will be a field you can access or iterate to display your elements. */readonly $each: Array<InferRegleSchemaStatusType<ArrayElement<TInput>, ArrayElement<TOutput>, TShortcuts>>; /** Represents the status of the collection itself. You can have validation rules on the array like minLength, this field represents the isolated status of the collection. */
|
|
114
114
|
readonly $self: RegleSchemaFieldStatus<TInput, TOutput, TShortcuts>;
|
|
115
115
|
/**
|
package/dist/regle-schemas.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@regle/schemas",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.26.0-beta.1",
|
|
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.6.0",
|
|
40
|
-
"@regle/core": "1.
|
|
41
|
-
"@regle/rules": "1.
|
|
40
|
+
"@regle/core": "1.26.0-beta.1",
|
|
41
|
+
"@regle/rules": "1.26.0-beta.1"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@total-typescript/ts-reset": "0.6.1",
|