@regle/schemas 1.21.0 → 1.21.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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @regle/schemas v1.21.0
2
+ * @regle/schemas v1.21.2
3
3
  * (c) 2026 Victor Garcia
4
4
  * @license MIT
5
5
  */
@@ -12,7 +12,7 @@ type MaybeSchemaVariantStatus<TState extends Record<string, any> | undefined = R
12
12
  $fields: ProcessChildrenFields<TState, TShortcuts>[keyof ProcessChildrenFields<TState, TShortcuts>];
13
13
  } & (HasNamedKeys<TState> extends true ? ProcessChildrenFields<TState, TShortcuts>[keyof ProcessChildrenFields<TState, TShortcuts>] : {}) : RegleSchemaStatus<TState, TSchema, TShortcuts, TRoot>;
14
14
  type ProcessChildrenFields<TState extends Record<string, any> | undefined, TShortcuts extends RegleShortcutDefinition = {}> = { [TIndex in keyof TupleToPlainObj<UnionToTuple<TState>>]: TIndex extends `${infer TIndexInt extends number}` ? { [TKey in keyof UnionToTuple<TState>[TIndexInt] as NonNullable<UnionToTuple<TState>[TIndexInt]>[TKey] extends UnionToTuple<TState>[TIndexInt][TKey] ? TKey : never]-?: InferRegleSchemaStatusType<NonNullable<UnionToTuple<TState>[TIndexInt]>[TKey], TShortcuts> } & { [TKey in keyof UnionToTuple<TState>[TIndexInt] as NonNullable<UnionToTuple<TState>[TIndexInt]>[TKey] extends UnionToTuple<TState>[TIndexInt][TKey] ? never : TKey]?: InferRegleSchemaStatusType<NonNullable<UnionToTuple<TState>[TIndexInt]>[TKey], TShortcuts> } : {} };
15
- type RegleSchema<TState extends Record<string, any>, TSchema extends StandardSchemaV1, TShortcuts extends RegleShortcutDefinition = {}, TAdditionalReturnProperties extends Record<string, any> = {}> = {
15
+ type RegleSchema<TState extends Record<string, any>, TSchema extends StandardSchemaV1 = StandardSchemaV1, TShortcuts extends RegleShortcutDefinition = {}, TAdditionalReturnProperties extends Record<string, any> = {}> = {
16
16
  /**
17
17
  * r$ is a reactive object containing the values, errors, dirty state and all the necessary validations properties you'll need to display information.
18
18
  *
@@ -20,7 +20,7 @@ type RegleSchema<TState extends Record<string, any>, TSchema extends StandardSch
20
20
  */
21
21
  r$: Raw<MaybeSchemaVariantStatus<TState, TSchema, TShortcuts, true>>;
22
22
  } & TAdditionalReturnProperties;
23
- type RegleSingleFieldSchema<TState extends Maybe<PrimitiveTypes>, TSchema extends StandardSchemaV1, TShortcuts extends RegleShortcutDefinition = {}, TAdditionalReturnProperties extends Record<string, any> = {}> = {
23
+ type RegleSingleFieldSchema<TState extends Maybe<PrimitiveTypes>, TSchema extends StandardSchemaV1 = StandardSchemaV1, TShortcuts extends RegleShortcutDefinition = {}, TAdditionalReturnProperties extends Record<string, any> = {}> = {
24
24
  /**
25
25
  * r$ is a reactive object containing the values, errors, dirty state and all the necessary validations properties you'll need to display information.
26
26
  *
@@ -93,7 +93,7 @@ type RegleSchemaFieldStatus<TState = any, TShortcuts extends RegleShortcutDefini
93
93
  * Collect all metadata of validators, including the error message.
94
94
  */
95
95
  readonly $silentIssues: (RegleFieldIssue & StandardSchemaV1.Issue)[]; /** 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). */
96
- readonly $externalErrors?: string[]; /** Represents the inactive status. Is true when this state have empty rules */
96
+ readonly $externalErrors: string[]; /** Represents the inactive status. Is true when this state have empty rules */
97
97
  readonly $inactive: boolean; /** This is reactive tree containing all the declared rules of your field. To know more about the rule properties check the rules properties section */
98
98
  readonly $rules: {
99
99
  [`~validator`]: RegleRuleStatus<TState, []>;
@@ -104,7 +104,7 @@ type RegleSchemaFieldStatus<TState = any, TShortcuts extends RegleShortcutDefini
104
104
  /**
105
105
  * @public
106
106
  */
107
- type RegleSchemaCollectionStatus<TState extends any[], TShortcuts extends RegleShortcutDefinition = {}> = Omit<RegleSchemaFieldStatus<TState, TShortcuts>, '$errors' | '$silentErrors' | '$validate'> & {
107
+ type RegleSchemaCollectionStatus<TState extends any[], TShortcuts extends RegleShortcutDefinition = {}> = Omit<RegleSchemaFieldStatus<TState, TShortcuts>, '$errors' | '$silentErrors'> & {
108
108
  /** 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<TState>, 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. */
109
109
  readonly $self: RegleSchemaFieldStatus<TState, TShortcuts>;
110
110
  /**
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @regle/schemas v1.21.0
2
+ * @regle/schemas v1.21.2
3
3
  * (c) 2026 Victor Garcia
4
4
  * @license MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @regle/schemas v1.21.0
2
+ * @regle/schemas v1.21.2
3
3
  * (c) 2026 Victor Garcia
4
4
  * @license MIT
5
5
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@regle/schemas",
3
- "version": "1.21.0",
3
+ "version": "1.21.2",
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.5.0",
40
- "@regle/core": "1.21.0",
41
- "@regle/rules": "1.21.0"
40
+ "@regle/core": "1.21.2",
41
+ "@regle/rules": "1.21.2"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@total-typescript/ts-reset": "0.6.1",