@regle/schemas 1.3.0 → 1.3.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.
Files changed (2) hide show
  1. package/dist/regle-schemas.d.ts +107 -152
  2. package/package.json +12 -12
@@ -18,22 +18,19 @@ type ExcludeByType<T, U> = { [K in keyof T as T[K] extends U ? never : K]: T[K]
18
18
  type PrimitiveTypes = string | number | boolean | bigint | Date | File;
19
19
  type isRecordLiteral<T extends unknown> = NonNullable<T> extends Date | File ? false : NonNullable<T> extends Record<string, any> ? true : false;
20
20
  type NoInferLegacy<A extends any> = [A][A extends any ? 0 : never];
21
-
22
21
  //#endregion
23
22
  //#region src/types/utils/Array.types.d.ts
24
23
  type ArrayElement$1<T> = T extends Array<infer U> ? U : never;
25
-
26
24
  //#endregion
27
- //#region ../../node_modules/.pnpm/type-fest@4.40.1/node_modules/type-fest/source/primitive.d.ts
25
+ //#region ../../node_modules/.pnpm/type-fest@4.41.0/node_modules/type-fest/source/primitive.d.ts
28
26
  /**
29
27
  Matches any [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive).
30
28
 
31
29
  @category Type
32
30
  */
33
31
  type Primitive$1 = null | undefined | string | number | boolean | symbol | bigint;
34
-
35
32
  //#endregion
36
- //#region ../../node_modules/.pnpm/type-fest@4.40.1/node_modules/type-fest/source/observable-like.d.ts
33
+ //#region ../../node_modules/.pnpm/type-fest@4.41.0/node_modules/type-fest/source/observable-like.d.ts
37
34
  declare global {
38
35
  // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
39
36
  interface SymbolConstructor {
@@ -41,8 +38,6 @@ declare global {
41
38
  }
42
39
  }
43
40
 
44
- //#endregion
45
- //#region ../../node_modules/.pnpm/type-fest@4.40.1/node_modules/type-fest/source/union-to-intersection.d.ts
46
41
  /**
47
42
  @remarks
48
43
  The TC39 observable proposal defines a `closed` property, but some implementations (such as xstream) do not as of 10/08/2021.
@@ -54,6 +49,8 @@ As well, some guidance on making an `Observable` to not include `closed` propert
54
49
  @category Observable
55
50
  */
56
51
 
52
+ //#endregion
53
+ //#region ../../node_modules/.pnpm/type-fest@4.41.0/node_modules/type-fest/source/union-to-intersection.d.ts
57
54
  /**
58
55
  Convert a union type to an intersection type using [distributive conditional types](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-8.html#distributive-conditional-types).
59
56
 
@@ -99,7 +96,7 @@ type Intersection = UnionToIntersection<Union>;
99
96
 
100
97
  @category Type
101
98
  */
102
- type UnionToIntersection$1<Union> = (
99
+ type UnionToIntersection<Union> = (
103
100
  // `extends unknown` is always going to be the case and is used to convert the
104
101
  // `Union` into a [distributive conditional
105
102
  // type](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-8.html#distributive-conditional-types).
@@ -114,9 +111,8 @@ Union extends unknown
114
111
  ) extends ((mergedIntersection: infer Intersection) => void)
115
112
  // The `& Union` is to allow indexing by the resulting type
116
113
  ? Intersection & Union : never;
117
-
118
114
  //#endregion
119
- //#region ../../node_modules/.pnpm/type-fest@4.40.1/node_modules/type-fest/source/empty-object.d.ts
115
+ //#region ../../node_modules/.pnpm/type-fest@4.41.0/node_modules/type-fest/source/empty-object.d.ts
120
116
  declare const emptyObjectSymbol$1: unique symbol;
121
117
 
122
118
  /**
@@ -164,10 +160,9 @@ type Fail = IsEmptyObject<null>; //=> false
164
160
  @see EmptyObject
165
161
  @category Object
166
162
  */
167
- type IsEmptyObject<T> = T extends EmptyObject$1 ? true : false;
168
-
163
+ type IsEmptyObject$1<T> = T extends EmptyObject$1 ? true : false;
169
164
  //#endregion
170
- //#region ../../node_modules/.pnpm/type-fest@4.40.1/node_modules/type-fest/source/optional-keys-of.d.ts
165
+ //#region ../../node_modules/.pnpm/type-fest@4.41.0/node_modules/type-fest/source/optional-keys-of.d.ts
171
166
  /**
172
167
  Extract all optional keys from the given type.
173
168
 
@@ -203,11 +198,9 @@ const update2: UpdateOperation<User> = {
203
198
  */
204
199
  type OptionalKeysOf$1<BaseType extends object> = BaseType extends unknown // For distributing `BaseType`
205
200
  ? (keyof { [Key in keyof BaseType as BaseType extends Record<Key, BaseType[Key]> ? never : Key]: never }) & (keyof BaseType) // Intersect with `keyof BaseType` to ensure result of `OptionalKeysOf<BaseType>` is always assignable to `keyof BaseType`
206
- : never;
207
-
201
+ : never; // Should never happen
208
202
  //#endregion
209
- //#region ../../node_modules/.pnpm/type-fest@4.40.1/node_modules/type-fest/source/required-keys-of.d.ts
210
- // Should never happen
203
+ //#region ../../node_modules/.pnpm/type-fest@4.41.0/node_modules/type-fest/source/required-keys-of.d.ts
211
204
  /**
212
205
  Extract all required keys from the given type.
213
206
 
@@ -233,12 +226,10 @@ const validator2 = createValidation<User>('surname', value => value.length < 25)
233
226
  @category Utilities
234
227
  */
235
228
  type RequiredKeysOf$1<BaseType extends object> = BaseType extends unknown // For distributing `BaseType`
236
- ? Exclude<keyof BaseType, OptionalKeysOf$1<BaseType>> : never;
229
+ ? Exclude<keyof BaseType, OptionalKeysOf$1<BaseType>> : never; // Should never happen
237
230
 
238
231
  //#endregion
239
- //#region ../../node_modules/.pnpm/type-fest@4.40.1/node_modules/type-fest/source/is-never.d.ts
240
- // Should never happen
241
-
232
+ //#region ../../node_modules/.pnpm/type-fest@4.41.0/node_modules/type-fest/source/is-never.d.ts
242
233
  /**
243
234
  Returns a boolean for whether the given type is `never`.
244
235
 
@@ -281,9 +272,8 @@ endIfEqual('abc', '123');
281
272
  @category Utilities
282
273
  */
283
274
  type IsNever$1<T> = [T] extends [never] ? true : false;
284
-
285
275
  //#endregion
286
- //#region ../../node_modules/.pnpm/type-fest@4.40.1/node_modules/type-fest/source/if-never.d.ts
276
+ //#region ../../node_modules/.pnpm/type-fest@4.41.0/node_modules/type-fest/source/if-never.d.ts
287
277
  /**
288
278
  An if-else-like type that resolves depending on whether the given type is `never`.
289
279
 
@@ -303,10 +293,9 @@ type ShouldBeBar = IfNever<'not never', 'foo', 'bar'>;
303
293
  @category Type Guard
304
294
  @category Utilities
305
295
  */
306
- type IfNever$1<T, TypeIfNever = true, TypeIfNotNever = false> = (IsNever$1<T> extends true ? TypeIfNever : TypeIfNotNever);
307
-
296
+ type IfNever$1$1<T, TypeIfNever = true, TypeIfNotNever = false> = (IsNever$1<T> extends true ? TypeIfNever : TypeIfNotNever);
308
297
  //#endregion
309
- //#region ../../node_modules/.pnpm/type-fest@4.40.1/node_modules/type-fest/source/is-any.d.ts
298
+ //#region ../../node_modules/.pnpm/type-fest@4.41.0/node_modules/type-fest/source/is-any.d.ts
310
299
  // Can eventually be replaced with the built-in once this library supports
311
300
  // TS5.4+ only. Tracked in https://github.com/sindresorhus/type-fest/issues/848
312
301
  type NoInfer$1<T> = T extends infer U ? U : never;
@@ -340,19 +329,18 @@ const anyA = get(anyObject, 'a');
340
329
  @category Utilities
341
330
  */
342
331
  type IsAny$1<T> = 0 extends 1 & NoInfer$1<T> ? true : false;
343
-
344
332
  //#endregion
345
- //#region ../../node_modules/.pnpm/type-fest@4.40.1/node_modules/type-fest/source/internal/keys.d.ts
333
+ //#region ../../node_modules/.pnpm/type-fest@4.41.0/node_modules/type-fest/source/internal/keys.d.ts
346
334
  /**
347
335
  Disallows any of the given keys.
348
336
  */
349
337
  type RequireNone<KeysType extends PropertyKey> = Partial<Record<KeysType, never>>;
350
338
 
351
- //#endregion
352
- //#region ../../node_modules/.pnpm/type-fest@4.40.1/node_modules/type-fest/source/simplify.d.ts
353
339
  /**
354
340
  Utility type to retrieve only literal keys from type.
355
341
  */
342
+ //#endregion
343
+ //#region ../../node_modules/.pnpm/type-fest@4.41.0/node_modules/type-fest/source/simplify.d.ts
356
344
  /**
357
345
  Useful to flatten the type output to improve type hints shown in editors. And also to transform an interface into a type to aide with assignability.
358
346
 
@@ -411,9 +399,8 @@ fn(someInterface as Simplify<SomeInterface>); // Good: transform an `interface`
411
399
  @category Object
412
400
  */
413
401
  type Simplify$1<T> = { [KeyType in keyof T]: T[KeyType] } & {};
414
-
415
402
  //#endregion
416
- //#region ../../node_modules/.pnpm/type-fest@4.40.1/node_modules/type-fest/source/omit-index-signature.d.ts
403
+ //#region ../../node_modules/.pnpm/type-fest@4.41.0/node_modules/type-fest/source/omit-index-signature.d.ts
417
404
  /**
418
405
  Omit any index signatures from the given object type, leaving only explicitly defined properties.
419
406
 
@@ -505,9 +492,8 @@ type ExampleWithoutIndexSignatures = OmitIndexSignature<Example>;
505
492
  @category Object
506
493
  */
507
494
  type OmitIndexSignature$1<ObjectType> = { [KeyType in keyof ObjectType as {} extends Record<KeyType, unknown> ? never : KeyType]: ObjectType[KeyType] };
508
-
509
495
  //#endregion
510
- //#region ../../node_modules/.pnpm/type-fest@4.40.1/node_modules/type-fest/source/pick-index-signature.d.ts
496
+ //#region ../../node_modules/.pnpm/type-fest@4.41.0/node_modules/type-fest/source/pick-index-signature.d.ts
511
497
  /**
512
498
  Pick only index signatures from the given object type, leaving out all explicitly defined properties.
513
499
 
@@ -554,9 +540,8 @@ type ExampleIndexSignature = PickIndexSignature<Example>;
554
540
  @category Object
555
541
  */
556
542
  type PickIndexSignature$1<ObjectType> = { [KeyType in keyof ObjectType as {} extends Record<KeyType, unknown> ? KeyType : never]: ObjectType[KeyType] };
557
-
558
543
  //#endregion
559
- //#region ../../node_modules/.pnpm/type-fest@4.40.1/node_modules/type-fest/source/merge.d.ts
544
+ //#region ../../node_modules/.pnpm/type-fest@4.41.0/node_modules/type-fest/source/merge.d.ts
560
545
  // Merges two objects without worrying about index signatures.
561
546
  type SimpleMerge$1<Destination, Source> = { [Key in keyof Destination as Key extends keyof Source ? never : Key]: Destination[Key] } & Source;
562
547
 
@@ -595,9 +580,8 @@ export type FooBar = Merge<Foo, Bar>;
595
580
  @category Object
596
581
  */
597
582
  type Merge$1<Destination, Source> = Simplify$1<SimpleMerge$1<PickIndexSignature$1<Destination>, PickIndexSignature$1<Source>> & SimpleMerge$1<OmitIndexSignature$1<Destination>, OmitIndexSignature$1<Source>>>;
598
-
599
583
  //#endregion
600
- //#region ../../node_modules/.pnpm/type-fest@4.40.1/node_modules/type-fest/source/if-any.d.ts
584
+ //#region ../../node_modules/.pnpm/type-fest@4.41.0/node_modules/type-fest/source/if-any.d.ts
601
585
  /**
602
586
  An if-else-like type that resolves depending on whether the given type is `any`.
603
587
 
@@ -617,10 +601,9 @@ type ShouldBeBar = IfAny<'not any', 'foo', 'bar'>;
617
601
  @category Type Guard
618
602
  @category Utilities
619
603
  */
620
- type IfAny$1<T, TypeIfAny = true, TypeIfNotAny = false> = (IsAny$1<T> extends true ? TypeIfAny : TypeIfNotAny);
621
-
604
+ type IfAny$1$1<T, TypeIfAny = true, TypeIfNotAny = false> = (IsAny$1<T> extends true ? TypeIfAny : TypeIfNotAny);
622
605
  //#endregion
623
- //#region ../../node_modules/.pnpm/type-fest@4.40.1/node_modules/type-fest/source/internal/type.d.ts
606
+ //#region ../../node_modules/.pnpm/type-fest@4.41.0/node_modules/type-fest/source/internal/type.d.ts
624
607
  /**
625
608
  Matches any primitive, `void`, `Date`, or `RegExp` value.
626
609
  */
@@ -639,10 +622,29 @@ Multiple call signatures cannot currently be supported due to a TypeScript limit
639
622
  @see https://github.com/microsoft/TypeScript/issues/29732
640
623
  */
641
624
 
642
- //#endregion
643
- //#region ../../node_modules/.pnpm/type-fest@4.40.1/node_modules/type-fest/source/internal/object.d.ts
644
625
  // Should never happen
645
626
 
627
+ /**
628
+ An if-else-like type that resolves depending on whether the given type is `any` or `never`.
629
+
630
+ @example
631
+ ```
632
+ // When `T` is a NOT `any` or `never` (like `string`) => Returns `IfNotAnyOrNever` branch
633
+ type A = IfNotAnyOrNever<string, 'VALID', 'IS_ANY', 'IS_NEVER'>;
634
+ //=> 'VALID'
635
+
636
+ // When `T` is `any` => Returns `IfAny` branch
637
+ type B = IfNotAnyOrNever<any, 'VALID', 'IS_ANY', 'IS_NEVER'>;
638
+ //=> 'IS_ANY'
639
+
640
+ // When `T` is `never` => Returns `IfNever` branch
641
+ type C = IfNotAnyOrNever<never, 'VALID', 'IS_ANY', 'IS_NEVER'>;
642
+ //=> 'IS_NEVER'
643
+ ```
644
+ */
645
+ type IfNotAnyOrNever<T, IfNotAnyOrNever, IfAny = any, IfNever = never> = IsAny$1<T> extends true ? IfAny : IsNever$1<T> extends true ? IfNever : IfNotAnyOrNever;
646
+ //#endregion
647
+ //#region ../../node_modules/.pnpm/type-fest@4.41.0/node_modules/type-fest/source/internal/object.d.ts
646
648
  /**
647
649
  Merges user specified options with default options.
648
650
 
@@ -695,11 +697,10 @@ type Result = ApplyDefaultOptions<PathsOptions, DefaultPathsOptions, SpecifiedOp
695
697
  // Types of property 'leavesOnly' are incompatible. Type 'string' is not assignable to type 'boolean'.
696
698
  ```
697
699
  */
698
- type ApplyDefaultOptions$1<Options extends object, Defaults extends Simplify$1<Omit<Required<Options>, RequiredKeysOf$1<Options>> & Partial<Record<RequiredKeysOf$1<Options>, never>>>, SpecifiedOptions extends Options> = IfAny$1<SpecifiedOptions, Defaults, IfNever$1<SpecifiedOptions, Defaults, Simplify$1<Merge$1<Defaults, { [Key in keyof SpecifiedOptions as Key extends OptionalKeysOf$1<Options> ? Extract<SpecifiedOptions[Key], undefined> extends never ? Key : never : Key]: SpecifiedOptions[Key] }> & Required<Options>> // `& Required<Options>` ensures that `ApplyDefaultOptions<SomeOption, ...>` is always assignable to `Required<SomeOption>`
700
+ type ApplyDefaultOptions$1<Options extends object, Defaults extends Simplify$1<Omit<Required<Options>, RequiredKeysOf$1<Options>> & Partial<Record<RequiredKeysOf$1<Options>, never>>>, SpecifiedOptions extends Options> = IfAny$1$1<SpecifiedOptions, Defaults, IfNever$1$1<SpecifiedOptions, Defaults, Simplify$1<Merge$1<Defaults, { [Key in keyof SpecifiedOptions as Key extends OptionalKeysOf$1<Options> ? Extract<SpecifiedOptions[Key], undefined> extends never ? Key : never : Key]: SpecifiedOptions[Key] }> & Required<Options>> // `& Required<Options>` ensures that `ApplyDefaultOptions<SomeOption, ...>` is always assignable to `Required<SomeOption>`
699
701
  >>;
700
-
701
702
  //#endregion
702
- //#region ../../node_modules/.pnpm/type-fest@4.40.1/node_modules/type-fest/source/require-exactly-one.d.ts
703
+ //#region ../../node_modules/.pnpm/type-fest@4.41.0/node_modules/type-fest/source/require-exactly-one.d.ts
703
704
  /**
704
705
  Create a type that requires exactly one of the given keys and disallows more. The remaining keys are kept as is.
705
706
 
@@ -729,10 +730,10 @@ const responder: RequireExactlyOne<Responder, 'text' | 'json'> = {
729
730
 
730
731
  @category Object
731
732
  */
732
- type RequireExactlyOne<ObjectType, KeysType extends keyof ObjectType = keyof ObjectType> = { [Key in KeysType]: (Required<Pick<ObjectType, Key>> & Partial<Record<Exclude<KeysType, Key>, never>>) }[KeysType] & Omit<ObjectType, KeysType>;
733
-
733
+ type RequireExactlyOne<ObjectType, KeysType extends keyof ObjectType = keyof ObjectType> = IfNotAnyOrNever<ObjectType, IfNever$1$1<KeysType, never, _RequireExactlyOne<ObjectType, IfAny$1$1<KeysType, keyof ObjectType, KeysType>>>>;
734
+ type _RequireExactlyOne<ObjectType, KeysType extends keyof ObjectType> = { [Key in KeysType]: (Required<Pick<ObjectType, Key>> & Partial<Record<Exclude<KeysType, Key>, never>>) }[KeysType] & Omit<ObjectType, KeysType>;
734
735
  //#endregion
735
- //#region ../../node_modules/.pnpm/type-fest@4.40.1/node_modules/type-fest/source/require-one-or-none.d.ts
736
+ //#region ../../node_modules/.pnpm/type-fest@4.41.0/node_modules/type-fest/source/require-one-or-none.d.ts
736
737
  /**
737
738
  Create a type that requires exactly one of the given keys and disallows more, or none of the given keys. The remaining keys are kept as is.
738
739
 
@@ -763,11 +764,10 @@ const responder3: Responder = {
763
764
 
764
765
  @category Object
765
766
  */
766
- type RequireOneOrNone<ObjectType, KeysType extends keyof ObjectType = keyof ObjectType> = (RequireExactlyOne<ObjectType, KeysType> | RequireNone<KeysType>) & Omit<ObjectType, KeysType>;
767
-
767
+ type RequireOneOrNone<ObjectType, KeysType extends keyof ObjectType = keyof ObjectType> = IfNotAnyOrNever<ObjectType, IfNever$1$1<KeysType, ObjectType, _RequireOneOrNone<ObjectType, IfAny$1$1<KeysType, keyof ObjectType, KeysType>>>>;
768
+ type _RequireOneOrNone<ObjectType, KeysType extends keyof ObjectType> = (RequireExactlyOne<ObjectType, KeysType> | RequireNone<KeysType>) & Omit<ObjectType, KeysType>; // Ignore unspecified keys.
768
769
  //#endregion
769
- //#region ../../node_modules/.pnpm/type-fest@4.40.1/node_modules/type-fest/source/partial-deep.d.ts
770
- // Ignore unspecified keys.
770
+ //#region ../../node_modules/.pnpm/type-fest@4.41.0/node_modules/type-fest/source/partial-deep.d.ts
771
771
  /**
772
772
  @see {@link PartialDeep}
773
773
  */
@@ -884,12 +884,11 @@ type PartialReadonlySetDeep$1<T, Options extends Required<PartialDeepOptions$1>>
884
884
  Same as `PartialDeep`, but accepts only `object`s as inputs. Internal helper for `PartialDeep`.
885
885
  */
886
886
  type PartialObjectDeep$1<ObjectType extends object, Options extends Required<PartialDeepOptions$1>> = (ObjectType extends ((...arguments_: any) => unknown) ? (...arguments_: Parameters<ObjectType>) => ReturnType<ObjectType> : {}) & ({ [KeyType in keyof ObjectType]?: _PartialDeep$1<ObjectType[KeyType], Options> });
887
-
888
887
  //#endregion
889
- //#region ../../node_modules/.pnpm/type-fest@4.40.1/node_modules/type-fest/source/required-deep.d.ts
888
+ //#region ../../node_modules/.pnpm/type-fest@4.41.0/node_modules/type-fest/source/required-deep.d.ts
890
889
 
891
890
  //#endregion
892
- //#region ../../node_modules/.pnpm/type-fest@4.40.1/node_modules/type-fest/source/union-to-tuple.d.ts
891
+ //#region ../../node_modules/.pnpm/type-fest@4.41.0/node_modules/type-fest/source/union-to-tuple.d.ts
893
892
  /**
894
893
  Returns the last element of a union type.
895
894
 
@@ -899,7 +898,7 @@ type Last = LastOfUnion<1 | 2 | 3>;
899
898
  //=> 3
900
899
  ```
901
900
  */
902
- type LastOfUnion<T> = UnionToIntersection$1<T extends any ? () => T : never> extends (() => (infer R)) ? R : never;
901
+ type LastOfUnion<T> = UnionToIntersection<T extends any ? () => T : never> extends (() => (infer R)) ? R : never;
903
902
 
904
903
  /**
905
904
  Convert a union type into an unordered tuple type of its elements.
@@ -936,10 +935,9 @@ const petList = Object.keys(pets) as UnionToTuple<Pet>;
936
935
 
937
936
  @category Array
938
937
  */
939
- type UnionToTuple$1<T, L = LastOfUnion<T>> = IsNever$1<T> extends false ? [...UnionToTuple$1<Exclude<T, L>>, L] : [];
940
-
938
+ type UnionToTuple<T, L = LastOfUnion<T>> = IsNever$1<T> extends false ? [...UnionToTuple<Exclude<T, L>>, L] : [];
941
939
  //#endregion
942
- //#region ../../node_modules/.pnpm/type-fest@4.40.1/node_modules/type-fest/source/is-null.d.ts
940
+ //#region ../../node_modules/.pnpm/type-fest@4.41.0/node_modules/type-fest/source/is-null.d.ts
943
941
  /**
944
942
  Returns a boolean for whether the given type is `null`.
945
943
 
@@ -960,9 +958,8 @@ type Example2 = NonNullFallback<number, string>;
960
958
  @category Utilities
961
959
  */
962
960
  type IsNull<T> = [T] extends [null] ? true : false;
963
-
964
961
  //#endregion
965
- //#region ../../node_modules/.pnpm/type-fest@4.40.1/node_modules/type-fest/source/is-unknown.d.ts
962
+ //#region ../../node_modules/.pnpm/type-fest@4.41.0/node_modules/type-fest/source/is-unknown.d.ts
966
963
  /**
967
964
  Returns a boolean for whether the given type is `unknown`.
968
965
 
@@ -1006,10 +1003,9 @@ store.execute((state, payload) => ({value: state.value + payload}), someExternal
1006
1003
 
1007
1004
  @category Utilities
1008
1005
  */
1009
- type IsUnknown$1<T> = (unknown extends T // `T` can be `unknown` or `any`
1006
+ type IsUnknown<T> = (unknown extends T // `T` can be `unknown` or `any`
1010
1007
  ? IsNull<T> extends false // `any` can be `null`, but `unknown` can't be
1011
1008
  ? true : false : false);
1012
-
1013
1009
  //#endregion
1014
1010
  //#region src/types/core/modifiers.types.d.ts
1015
1011
  interface RegleBehaviourOptions {
@@ -1096,7 +1092,6 @@ type RegleShortcutDefinition<TCustomRules extends Record<string, any> = {}> = {
1096
1092
  collections?: ShortcutCommonFn<RegleCollectionStatus<any[], Partial<TCustomRules> & Partial<DefaultValidators>>>;
1097
1093
  };
1098
1094
  type AddDollarToOptions<T extends Record<string, any>> = { [K in keyof T as `$${string & K}`]: T[K] };
1099
-
1100
1095
  //#endregion
1101
1096
  //#region src/types/core/useRegle.types.d.ts
1102
1097
  type Regle<TState extends Record<string, any> = EmptyObject$1, TRules extends ReglePartialRuleTree<TState, CustomRulesDeclarationTree> = EmptyObject$1, TValidationGroups extends Record<string, RegleValidationGroupEntry[]> = {}, TShortcuts extends RegleShortcutDefinition = {}, TAdditionalReturnProperties extends Record<string, any> = {}> = {
@@ -1117,7 +1112,6 @@ type RegleSingleField<TState extends Maybe<PrimitiveTypes> = any, TRules extends
1117
1112
  } & TAdditionalReturnProperties;
1118
1113
  type DeepReactiveState<T extends Record<string, any> | unknown | undefined> = ExtendOnlyRealRecord<T> extends true ? { [K in keyof T]: InferDeepReactiveState<T[K]> } : never;
1119
1114
  type InferDeepReactiveState<TState> = NonNullable<TState> extends Array<infer U extends Record<string, any>> ? DeepReactiveState<U[]> : NonNullable<TState> extends Date | File ? MaybeRef<TState> : NonNullable<TState> extends Record<string, any> ? DeepReactiveState<TState> : MaybeRef<TState>;
1120
-
1121
1115
  //#endregion
1122
1116
  //#region src/types/core/reset.types.d.ts
1123
1117
  type ResetOptions<TState extends unknown> = RequireOneOrNone<{
@@ -1137,23 +1131,21 @@ type ResetOptions<TState extends unknown> = RequireOneOrNone<{
1137
1131
  */
1138
1132
  clearExternalErrors?: boolean;
1139
1133
  }, 'toInitialState' | 'toState'>;
1140
-
1141
1134
  //#endregion
1142
1135
  //#region src/types/core/scopedRegle.types.d.ts
1143
1136
  type ScopedInstancesRecord = Record<string, Record<string, SuperCompatibleRegleRoot>> & {
1144
1137
  '~~global': Record<string, SuperCompatibleRegleRoot>;
1145
1138
  };
1146
1139
  type ScopedInstancesRecordLike = Partial<ScopedInstancesRecord>;
1147
-
1148
1140
  //#endregion
1149
1141
  //#region src/types/core/results.types.d.ts
1150
1142
  type PartialFormState<TState extends Record<string, any>> = [unknown] extends [TState] ? {} : Prettify<{ [K in keyof TState as ExtendOnlyRealRecord<TState[K]> extends true ? never : TState[K] extends Array<any> ? never : K]?: MaybeOutput<TState[K]> } & { [K in keyof TState as ExtendOnlyRealRecord<TState[K]> extends true ? K : TState[K] extends Array<any> ? K : never]: NonNullable<TState[K]> extends Array<infer U extends Record<string, any>> ? PartialFormState<U>[] : PartialFormState<TState[K]> }>;
1151
1143
  type RegleResult<Data extends Record<string, any> | any[] | unknown, TRules extends ReglePartialRuleTree<any>> = {
1152
1144
  valid: false;
1153
- data: IsUnknown$1<Data> extends true ? unknown : NonNullable<Data> extends Date | File ? MaybeOutput<Data> : NonNullable<Data> extends Array<infer U extends Record<string, any>> ? PartialFormState<U>[] : NonNullable<Data> extends Record<string, any> ? PartialFormState<NonNullable<Data>> : MaybeOutput<Data>;
1145
+ data: IsUnknown<Data> extends true ? unknown : NonNullable<Data> extends Date | File ? MaybeOutput<Data> : NonNullable<Data> extends Array<infer U extends Record<string, any>> ? PartialFormState<U>[] : NonNullable<Data> extends Record<string, any> ? PartialFormState<NonNullable<Data>> : MaybeOutput<Data>;
1154
1146
  } | {
1155
1147
  valid: true;
1156
- data: IsUnknown$1<Data> extends true ? unknown : Data extends Array<infer U extends Record<string, any>> ? DeepSafeFormState<U, TRules>[] : Data extends Date | File ? SafeFieldProperty<Data, TRules> : Data extends Record<string, any> ? DeepSafeFormState<Data, TRules> : SafeFieldProperty<Data, TRules>;
1148
+ data: IsUnknown<Data> extends true ? unknown : Data extends Array<infer U extends Record<string, any>> ? DeepSafeFormState<U, TRules>[] : Data extends Date | File ? SafeFieldProperty<Data, TRules> : Data extends Record<string, any> ? DeepSafeFormState<Data, TRules> : SafeFieldProperty<Data, TRules>;
1157
1149
  };
1158
1150
  /**
1159
1151
  * Infer safe output from any `r$` instance
@@ -1174,7 +1166,6 @@ type ArrayHaveAtLeastOneRequiredField<TState extends Maybe<any[]>, TRule extends
1174
1166
  type SafeProperty<TState, TRule extends RegleFormPropertyType<any, any> | undefined> = unknown extends TState ? unknown : TRule extends RegleCollectionRuleDecl<any, any> ? TState extends Array<infer U extends Record<string, any>> ? DeepSafeFormState<U, ExtractFromGetter<TRule['$each']>>[] : TState : TRule extends ReglePartialRuleTree<any, any> ? ExtendOnlyRealRecord<TState> extends true ? DeepSafeFormState<NonNullable<TState> extends Record<string, any> ? JoinDiscriminatedUnions<NonNullable<TState>> : {}, TRule> : TRule extends RegleRuleDecl<any, any> ? FieldHaveRequiredRule<TRule> extends true ? TState : MaybeOutput<TState> : TState : TState;
1175
1167
  type IsPropertyOutputRequired<TState, TRule extends RegleFormPropertyType<any, any> | undefined> = [unknown] extends [TState] ? unknown : NonNullable<TState> extends Array<any> ? TRule extends RegleCollectionRuleDecl<any, any> ? ArrayHaveAtLeastOneRequiredField<NonNullable<TState>, TRule> extends false ? false : true : false : TRule extends ReglePartialRuleTree<any, any> ? ExtendOnlyRealRecord<TState> extends true ? ObjectHaveAtLeastOneRequiredField<NonNullable<TState> extends Record<string, any> ? NonNullable<TState> : {}, TRule> extends false ? false : true : TRule extends RegleRuleDecl<any, any> ? FieldHaveRequiredRule<TRule> extends false ? false : true : false : false;
1176
1168
  type SafeFieldProperty<TState, TRule extends RegleFormPropertyType<any, any> | undefined = never> = FieldHaveRequiredRule<TRule> extends true ? NonNullable<TState> : MaybeOutput<TState>;
1177
-
1178
1169
  //#endregion
1179
1170
  //#region ../../node_modules/.pnpm/expect-type@1.2.1/node_modules/expect-type/dist/utils.d.ts
1180
1171
  /**
@@ -1215,7 +1206,7 @@ type IsAny$2<T> = [T] extends [Secret] ? Not<IsNever$2<T>> : false;
1215
1206
  /**
1216
1207
  * Determines if the given type is `unknown`.
1217
1208
  */
1218
- type IsUnknown<T> = [unknown] extends [T] ? Not<IsAny$2<T>> : false;
1209
+ type IsUnknown$1<T> = [unknown] extends [T] ? Not<IsAny$2<T>> : false;
1219
1210
  /**
1220
1211
  * Determines if a type is either `never` or `any`.
1221
1212
  */
@@ -1285,13 +1276,13 @@ type MutuallyExtends<Left, Right> = And<[Extends<Left, Right>, Extends<Right, Le
1285
1276
  * Convert a union to an intersection.
1286
1277
  * `A | B | C` -\> `A & B & C`
1287
1278
  */
1288
- type UnionToIntersection<Union> = (Union extends any ? (distributedUnion: Union) => void : never) extends ((mergedIntersection: infer Intersection) => void) ? Intersection : never;
1279
+ type UnionToIntersection$1<Union> = (Union extends any ? (distributedUnion: Union) => void : never) extends ((mergedIntersection: infer Intersection) => void) ? Intersection : never;
1289
1280
  /**
1290
1281
  * Get the last element of a union.
1291
1282
  * First, converts to a union of `() => T` functions,
1292
1283
  * then uses {@linkcode UnionToIntersection} to get the last one.
1293
1284
  */
1294
- type LastOf<Union> = UnionToIntersection<Union extends any ? () => Union : never> extends (() => infer R) ? R : never;
1285
+ type LastOf<Union> = UnionToIntersection$1<Union extends any ? () => Union : never> extends (() => infer R) ? R : never;
1295
1286
  /**
1296
1287
  * Intermediate type for {@linkcode UnionToTuple} which pushes the
1297
1288
  * "last" union member to the end of a tuple, and recursively prepends
@@ -1301,11 +1292,8 @@ type TuplifyUnion<Union, LastElement = LastOf<Union>> = IsNever$2<Union> extends
1301
1292
  /**
1302
1293
  * Convert a union like `1 | 2 | 3` to a tuple like `[1, 2, 3]`.
1303
1294
  */
1304
- type UnionToTuple<Union> = TuplifyUnion<Union>;
1305
- type IsUnion<T> = Not<Extends<UnionToTuple<T>['length'], 1>>;
1306
-
1307
- //#endregion
1308
- //#region ../../node_modules/.pnpm/expect-type@1.2.1/node_modules/expect-type/dist/overloads.d.ts
1295
+ type UnionToTuple$1<Union> = TuplifyUnion<Union>;
1296
+ type IsUnion<T> = Not<Extends<UnionToTuple$1<T>['length'], 1>>;
1309
1297
  /**
1310
1298
  * A recursive version of `Pick` that selects properties from the left type that are present in the right type.
1311
1299
  * The "leaf" types from `Left` are used - only the keys of `Right` are considered.
@@ -1317,6 +1305,8 @@ type IsUnion<T> = Not<Extends<UnionToTuple<T>['length'], 1>>;
1317
1305
  * type Result = DeepPickMatchingProps<typeof user, {name: unknown; address: {city: unknown}}> // {name: string, address: {city: string}}
1318
1306
  * ```
1319
1307
  */
1308
+ //#endregion
1309
+ //#region ../../node_modules/.pnpm/expect-type@1.2.1/node_modules/expect-type/dist/overloads.d.ts
1320
1310
  /**
1321
1311
  * The simple(ish) way to get overload info from a function
1322
1312
  * {@linkcode FunctionType}. Recent versions of TypeScript will match any
@@ -1581,8 +1571,7 @@ type ConstructorOverloadParameters<ConstructorType> = ConstructorOverloadsUnion<
1581
1571
  /**
1582
1572
  * Calculates the number of overloads for a given function type.
1583
1573
  */
1584
- type NumOverloads<FunctionType> = UnionToTuple<OverloadsInfoUnion<FunctionType>>['length'];
1585
-
1574
+ type NumOverloads<FunctionType> = UnionToTuple$1<OverloadsInfoUnion<FunctionType>>['length'];
1586
1575
  //#endregion
1587
1576
  //#region ../../node_modules/.pnpm/expect-type@1.2.1/node_modules/expect-type/dist/branding.d.ts
1588
1577
  /**
@@ -1605,7 +1594,7 @@ type DeepBrand<T> = IsNever$2<T> extends true ? {
1605
1594
  type: 'never';
1606
1595
  } : IsAny$2<T> extends true ? {
1607
1596
  type: 'any';
1608
- } : IsUnknown<T> extends true ? {
1597
+ } : IsUnknown$1<T> extends true ? {
1609
1598
  type: 'unknown';
1610
1599
  } : T extends string | number | boolean | symbol | bigint | null | undefined | void ? {
1611
1600
  type: 'primitive';
@@ -1620,7 +1609,7 @@ type DeepBrand<T> = IsNever$2<T> extends true ? {
1620
1609
  return: DeepBrand<R>;
1621
1610
  this: DeepBrand<ThisParameterType<T>>;
1622
1611
  props: DeepBrand<Omit<T, keyof Function>>;
1623
- } : UnionToTuple<OverloadsInfoUnion<T>> extends infer OverloadsTuple ? {
1612
+ } : UnionToTuple$1<OverloadsInfoUnion<T>> extends infer OverloadsTuple ? {
1624
1613
  type: 'overloads';
1625
1614
  overloads: { [K in keyof OverloadsTuple]: DeepBrand<OverloadsTuple[K]> };
1626
1615
  } : never : T extends any[] ? {
@@ -1638,13 +1627,12 @@ type DeepBrand<T> = IsNever$2<T> extends true ? {
1638
1627
  * Checks if two types are strictly equal using branding.
1639
1628
  */
1640
1629
  type StrictEqualUsingBranding<Left, Right> = MutuallyExtends<DeepBrand<Left>, DeepBrand<Right>>;
1641
-
1642
1630
  //#endregion
1643
1631
  //#region ../../node_modules/.pnpm/expect-type@1.2.1/node_modules/expect-type/dist/messages.d.ts
1644
1632
  /**
1645
1633
  * Determines the printable type representation for a given type.
1646
1634
  */
1647
- type PrintType<T> = IsUnknown<T> extends true ? 'unknown' : IsNever$2<T> extends true ? 'never' : IsAny$2<T> extends true ? never : boolean extends T ? 'boolean' : T extends boolean ? `literal boolean: ${T}` : string extends T ? 'string' : T extends string ? `literal string: ${T}` : number extends T ? 'number' : T extends number ? `literal number: ${T}` : bigint extends T ? 'bigint' : T extends bigint ? `literal bigint: ${T}` : T extends null ? 'null' : T extends undefined ? 'undefined' : T extends ((...args: any[]) => any) ? 'function' : '...';
1635
+ type PrintType<T> = IsUnknown$1<T> extends true ? 'unknown' : IsNever$2<T> extends true ? 'never' : IsAny$2<T> extends true ? never : boolean extends T ? 'boolean' : T extends boolean ? `literal boolean: ${T}` : string extends T ? 'string' : T extends string ? `literal string: ${T}` : number extends T ? 'number' : T extends number ? `literal number: ${T}` : bigint extends T ? 'bigint' : T extends bigint ? `literal bigint: ${T}` : T extends null ? 'null' : T extends undefined ? 'undefined' : T extends ((...args: any[]) => any) ? 'function' : '...';
1648
1636
  /**
1649
1637
  * Helper for showing end-user a hint why their type assertion is failing.
1650
1638
  * This swaps "leaf" types with a literal message about what the actual and
@@ -1652,17 +1640,16 @@ type PrintType<T> = IsUnknown<T> extends true ? 'unknown' : IsNever$2<T> extends
1652
1640
  * otherwise `LeafTypeOf<Actual>` returns `never`, which extends everything 🤔
1653
1641
  */
1654
1642
  type MismatchInfo<Actual, Expected> = And<[Extends<PrintType<Actual>, '...'>, Not<IsAny$2<Actual>>]> extends true ? And<[Extends<any[], Actual>, Extends<any[], Expected>]> extends true ? Array<MismatchInfo<Extract<Actual, any[]>[number], Extract<Expected, any[]>[number]>> : { [K in UsefulKeys<Actual> | UsefulKeys<Expected>]: MismatchInfo<K extends keyof Actual ? Actual[K] : never, K extends keyof Expected ? Expected[K] : never> } : StrictEqualUsingBranding<Actual, Expected> extends true ? Actual : `Expected: ${PrintType<Expected>}, Actual: ${PrintType<Exclude<Actual, Expected>>}`;
1655
-
1656
- //#endregion
1657
- //#region src/types/core/variants.types.d.ts
1658
1643
  /**
1659
1644
  * @internal
1660
1645
  */
1646
+ //#endregion
1647
+ //#region src/types/core/variants.types.d.ts
1661
1648
 
1662
1649
  type MaybeVariantStatus<TState extends Record<string, any> | undefined = Record<string, any>, TRules extends ReglePartialRuleTree<NonNullable<TState>> = Record<string, any>, TShortcuts extends RegleShortcutDefinition = {}> = IsUnion<NonNullable<TState>> extends true ? Omit<RegleStatus<TState, TRules, TShortcuts>, '$fields'> & {
1663
1650
  $fields: ProcessChildrenFields<TState, TRules, TShortcuts>[keyof ProcessChildrenFields<TState, TRules, TShortcuts>];
1664
1651
  } : RegleStatus<TState, TRules, TShortcuts>;
1665
- type ProcessChildrenFields<TState extends Record<string, any> | undefined, TRules extends ReglePartialRuleTree<NonNullable<TState>>, TShortcuts extends RegleShortcutDefinition = {}> = { [TIndex in keyof TupleToPlainObj<UnionToTuple$1<TState>>]: TIndex extends `${infer TIndexInt extends number}` ? { [TKey in keyof UnionToTuple$1<TState>[TIndexInt] as IsEmptyObject<FindCorrespondingVariant<UnionToTuple$1<TState>[TIndexInt] extends Record<string, any> ? UnionToTuple$1<TState>[TIndexInt] : never, UnionToTuple$1<TRules>> extends [infer U] ? TKey extends keyof U ? U[TKey] : EmptyObject$1 : EmptyObject$1> extends true ? TKey extends keyof TState ? TState[TKey] extends NonNullable<TState[TKey]> ? TKey : never : never : TKey]-?: InferRegleStatusType<FindCorrespondingVariant<UnionToTuple$1<TState>[TIndexInt] extends Record<string, any> ? UnionToTuple$1<TState>[TIndexInt] : never, UnionToTuple$1<TRules>> extends [infer U] ? TKey extends keyof U ? U[TKey] : EmptyObject$1 : EmptyObject$1, NonNullable<UnionToTuple$1<TState>[TIndexInt]>, TKey, TShortcuts> } & { [TKey in keyof UnionToTuple$1<TState>[TIndexInt] as IsEmptyObject<FindCorrespondingVariant<UnionToTuple$1<TState>[TIndexInt] extends Record<string, any> ? UnionToTuple$1<TState>[TIndexInt] : never, UnionToTuple$1<TRules>> extends [infer U] ? TKey extends keyof U ? U[TKey] : EmptyObject$1 : EmptyObject$1> extends true ? TKey extends keyof TState ? TState[TKey] extends NonNullable<TState[TKey]> ? never : TKey : TKey : never]?: InferRegleStatusType<FindCorrespondingVariant<UnionToTuple$1<TState>[TIndexInt] extends Record<string, any> ? UnionToTuple$1<TState>[TIndexInt] : never, UnionToTuple$1<TRules>> extends [infer U] ? TKey extends keyof U ? U[TKey] : EmptyObject$1 : EmptyObject$1, NonNullable<UnionToTuple$1<TState>[TIndexInt]>, TKey, TShortcuts> } : {} };
1652
+ type ProcessChildrenFields<TState extends Record<string, any> | undefined, TRules extends ReglePartialRuleTree<NonNullable<TState>>, TShortcuts extends RegleShortcutDefinition = {}> = { [TIndex in keyof TupleToPlainObj<UnionToTuple<TState>>]: TIndex extends `${infer TIndexInt extends number}` ? { [TKey in keyof UnionToTuple<TState>[TIndexInt] as IsEmptyObject$1<FindCorrespondingVariant<UnionToTuple<TState>[TIndexInt] extends Record<string, any> ? UnionToTuple<TState>[TIndexInt] : never, UnionToTuple<TRules>> extends [infer U] ? TKey extends keyof U ? U[TKey] : EmptyObject$1 : EmptyObject$1> extends true ? TKey extends keyof TState ? TState[TKey] extends NonNullable<TState[TKey]> ? TKey : never : never : TKey]-?: InferRegleStatusType<FindCorrespondingVariant<UnionToTuple<TState>[TIndexInt] extends Record<string, any> ? UnionToTuple<TState>[TIndexInt] : never, UnionToTuple<TRules>> extends [infer U] ? TKey extends keyof U ? U[TKey] : EmptyObject$1 : EmptyObject$1, NonNullable<UnionToTuple<TState>[TIndexInt]>, TKey, TShortcuts> } & { [TKey in keyof UnionToTuple<TState>[TIndexInt] as IsEmptyObject$1<FindCorrespondingVariant<UnionToTuple<TState>[TIndexInt] extends Record<string, any> ? UnionToTuple<TState>[TIndexInt] : never, UnionToTuple<TRules>> extends [infer U] ? TKey extends keyof U ? U[TKey] : EmptyObject$1 : EmptyObject$1> extends true ? TKey extends keyof TState ? TState[TKey] extends NonNullable<TState[TKey]> ? never : TKey : TKey : never]?: InferRegleStatusType<FindCorrespondingVariant<UnionToTuple<TState>[TIndexInt] extends Record<string, any> ? UnionToTuple<TState>[TIndexInt] : never, UnionToTuple<TRules>> extends [infer U] ? TKey extends keyof U ? U[TKey] : EmptyObject$1 : EmptyObject$1, NonNullable<UnionToTuple<TState>[TIndexInt]>, TKey, TShortcuts> } : {} };
1666
1653
  type FindCorrespondingVariant<TState extends Record<string, any>, TRules extends any[]> = TRules extends [infer F, ...infer R] ? F extends ReglePartialRuleTree<TState> ? [F] : FindCorrespondingVariant<TState, R> : [];
1667
1654
  //#endregion
1668
1655
  //#region src/core/useRegle/useRegle.d.ts
@@ -1722,23 +1709,21 @@ type RetrieveUnionUnknownKeysOf<T extends readonly any[]> = T extends [infer F,
1722
1709
  /**
1723
1710
  * Transforms a union and apply undefined values to non-present keys to support intersection
1724
1711
  */
1725
- type NormalizeUnion<TUnion> = RetrieveUnionUnknownValues<NonNullable<UnionToTuple$1<TUnion>>, RetrieveUnionUnknownKeysOf<NonNullable<UnionToTuple$1<TUnion>>>[number]>[number];
1712
+ type NormalizeUnion<TUnion> = RetrieveUnionUnknownValues<NonNullable<UnionToTuple<TUnion>>, RetrieveUnionUnknownKeysOf<NonNullable<UnionToTuple<TUnion>>>[number]>[number];
1726
1713
  /**
1727
1714
  * Combine all members of a union type, merging types for each key, and keeping loose types
1728
1715
  */
1729
- type JoinDiscriminatedUnions<TUnion extends unknown> = isRecordLiteral<TUnion> extends true ? Prettify<Partial<UnionToIntersection$1<RemoveCommonKey<UnionToTuple$1<NonNullable<TUnion>>, keyof NormalizeUnion<NonNullable<TUnion>>>[number]>> & Pick<NormalizeUnion<NonNullable<TUnion>>, keyof NormalizeUnion<NonNullable<TUnion>>>> : TUnion;
1716
+ type JoinDiscriminatedUnions<TUnion extends unknown> = isRecordLiteral<TUnion> extends true ? Prettify<Partial<UnionToIntersection<RemoveCommonKey<UnionToTuple<NonNullable<TUnion>>, keyof NormalizeUnion<NonNullable<TUnion>>>[number]>> & Pick<NormalizeUnion<NonNullable<TUnion>>, keyof NormalizeUnion<NonNullable<TUnion>>>> : TUnion;
1730
1717
  type EnumLike = {
1731
1718
  [k: string]: string | number;
1732
1719
  [nu: number]: string;
1733
1720
  };
1734
1721
  type UnwrapMaybeRef<T extends MaybeRef<any> | DeepReactiveState<any>> = T extends Ref<any> ? UnwrapRef<T> : UnwrapNestedRefs<T>;
1735
1722
  type TupleToPlainObj<T> = { [I in keyof T & `${number}`]: T[I] };
1736
-
1737
1723
  //#endregion
1738
1724
  //#region src/types/utils/mismatch.types.d.ts
1739
1725
  type isDeepExact<TRules, TTree> = { [K in keyof TRules]-?: CheckDeepExact<NonNullable<TRules[K]>, K extends keyof JoinDiscriminatedUnions<TTree> ? NonNullable<JoinDiscriminatedUnions<TTree>[K]> : never> }[keyof TRules] extends true ? true : false;
1740
1726
  type CheckDeepExact<TRules, TTree> = [TTree] extends [never] ? false : TRules extends RegleCollectionRuleDecl ? TTree extends Array<any> ? isDeepExact<NonNullable<TRules['$each']>, JoinDiscriminatedUnions<NonNullable<ArrayElement$1<TTree>>>> : TRules extends RegleRuleDecl ? true : TRules extends ReglePartialRuleTree<any> ? isDeepExact<TRules, TTree> : false : TRules extends RegleRuleDecl ? true : TRules extends ReglePartialRuleTree<any> ? isDeepExact<TRules, TTree> : false;
1741
-
1742
1727
  //#endregion
1743
1728
  //#region src/types/utils/infer.types.d.ts
1744
1729
 
@@ -1752,7 +1737,6 @@ type CreateFn<T extends any[]> = (...args: T) => any;
1752
1737
  */
1753
1738
  type RegleUniversalParams<T extends any[] = [], F = CreateFn<T>> = [T] extends [[]] ? [] : Parameters<F extends ((...args: infer Args) => any) ? (...args: { [K in keyof Args]: MaybeRefOrGetter<Maybe<Args[K]>> }) => any : never>;
1754
1739
  type UnwrapRegleUniversalParams<T extends MaybeRefOrGetter[] = [], F = CreateFn<T>> = [T] extends [[]] ? [] : Parameters<F extends ((...args: infer Args) => any) ? (...args: { [K in keyof Args]: Args[K] extends MaybeRefOrGetter<Maybe<infer U>> ? U : Args[K] }) => any : never>;
1755
-
1756
1740
  //#endregion
1757
1741
  //#region src/types/rules/rule.internal.types.d.ts
1758
1742
  /**
@@ -1853,7 +1837,6 @@ type RegleCollectionRuleDefinition<TValue = any[], TCustomRules extends Partial<
1853
1837
  }) | ({
1854
1838
  $each: MaybeGetter<RegleFormPropertyType<ArrayElement$1<NonNullable<TValue>>, TCustomRules>, ArrayElement$1<TValue>>;
1855
1839
  } & CollectionRegleBehaviourOptions);
1856
-
1857
1840
  //#endregion
1858
1841
  //#region src/types/rules/rule.init.types.d.ts
1859
1842
  type RegleInitPropertyGetter<TValue, TReturn, TParams extends [...any[]], TMetadata extends RegleRuleMetadataDefinition> = TReturn | ((metadata: RegleRuleMetadataConsumer<TValue, TParams, TMetadata>) => TReturn);
@@ -1943,7 +1926,6 @@ type DefaultValidators = {
1943
1926
  startsWith: RegleRuleWithParamsDefinition<string, [part: Maybe<string>], false, boolean>;
1944
1927
  url: RegleRuleDefinition<string, [], false, boolean, string>;
1945
1928
  };
1946
-
1947
1929
  //#endregion
1948
1930
  //#region src/types/rules/rule.custom.types.d.ts
1949
1931
  type CustomRulesDeclarationTree = {
@@ -1951,7 +1933,6 @@ type CustomRulesDeclarationTree = {
1951
1933
  };
1952
1934
  type DefaultValidatorsTree = { [K in keyof DefaultValidators]: RegleRuleRawInput<any, any[], boolean, any> | undefined };
1953
1935
  type AllRulesDeclarations = CustomRulesDeclarationTree & DefaultValidatorsTree;
1954
-
1955
1936
  //#endregion
1956
1937
  //#region src/types/rules/rule.declaration.types.d.ts
1957
1938
  /**
@@ -2019,7 +2000,6 @@ type InlineRuleDeclaration<TValue extends any = any, TParams extends any[] = any
2019
2000
  * Regroup inline and registered rules
2020
2001
  * */
2021
2002
  type FormRuleDeclaration<TValue extends any = unknown, TParams extends any[] = any[], TReturn extends RegleRuleMetadataDefinition | Promise<RegleRuleMetadataDefinition> = RegleRuleMetadataDefinition | Promise<RegleRuleMetadataDefinition>, TMetadata extends RegleRuleMetadataDefinition = (TReturn extends Promise<infer M> ? M : TReturn), TAsync extends boolean = boolean> = InlineRuleDeclaration<TValue, TParams, TReturn> | RegleRuleDefinition<TValue, TParams, TAsync, TMetadata> | RegleRuleWithParamsDefinitionInput<TValue, [param?: any], TAsync, TMetadata> | RegleRuleWithParamsDefinitionInput<TValue, [param?: any, ...any[]], TAsync, TMetadata>;
2022
-
2023
2003
  //#endregion
2024
2004
  //#region src/types/rules/rule.errors.types.d.ts
2025
2005
  type RegleErrorTree<TState = MaybeRef<Record<string, any> | any[]>> = { readonly [K in keyof JoinDiscriminatedUnions<UnwrapMaybeRef<TState>>]: RegleValidationErrors<JoinDiscriminatedUnions<UnwrapMaybeRef<TState>>[K], false> };
@@ -2051,7 +2031,7 @@ type RegleRoot<TState extends Record<string, any> = {}, TRules extends ReglePart
2051
2031
  */
2052
2032
  type RegleStatus<TState extends Record<string, any> | undefined = Record<string, any>, TRules extends ReglePartialRuleTree<NonNullable<TState>> = Record<string, any>, TShortcuts extends RegleShortcutDefinition = {}> = RegleCommonStatus<TState> & {
2053
2033
  /** 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. */
2054
- readonly $fields: { readonly [TKey in keyof TState as TRules[TKey] extends NonNullable<TRules[TKey]> ? NonNullable<TRules[TKey]> extends RegleRuleDecl ? IsEmptyObject<TRules[TKey]> extends true ? TKey : never : never : TKey]: IsUnion<NonNullable<TRules[TKey]>> extends true ? ExtendOnlyRealRecord<TState[TKey]> extends true ? MaybeVariantStatus<NonNullable<TState>[TKey], NonNullable<TRules[TKey]>, TShortcuts> : InferRegleStatusType<NonNullable<TRules[TKey]>, NonNullable<TState>, TKey, TShortcuts> : InferRegleStatusType<NonNullable<TRules[TKey]>, NonNullable<TState>, TKey, TShortcuts> } & { readonly [TKey in keyof TState as TRules[TKey] extends NonNullable<TRules[TKey]> ? NonNullable<TRules[TKey]> extends RegleRuleDecl ? IsEmptyObject<TRules[TKey]> extends true ? never : TKey : TKey : never]-?: IsUnion<NonNullable<TRules[TKey]>> extends true ? ExtendOnlyRealRecord<TState[TKey]> extends true ? MaybeVariantStatus<NonNullable<TState>[TKey], NonNullable<TRules[TKey]>, TShortcuts> : InferRegleStatusType<NonNullable<TRules[TKey]>, NonNullable<TState>, TKey, TShortcuts> : InferRegleStatusType<NonNullable<TRules[TKey]>, NonNullable<TState>, TKey, TShortcuts> };
2034
+ readonly $fields: { readonly [TKey in keyof TState as TRules[TKey] extends NonNullable<TRules[TKey]> ? NonNullable<TRules[TKey]> extends RegleRuleDecl ? IsEmptyObject$1<TRules[TKey]> extends true ? TKey : never : never : TKey]: IsUnion<NonNullable<TRules[TKey]>> extends true ? ExtendOnlyRealRecord<TState[TKey]> extends true ? MaybeVariantStatus<NonNullable<TState>[TKey], NonNullable<TRules[TKey]>, TShortcuts> : InferRegleStatusType<NonNullable<TRules[TKey]>, NonNullable<TState>, TKey, TShortcuts> : InferRegleStatusType<NonNullable<TRules[TKey]>, NonNullable<TState>, TKey, TShortcuts> } & { readonly [TKey in keyof TState as TRules[TKey] extends NonNullable<TRules[TKey]> ? NonNullable<TRules[TKey]> extends RegleRuleDecl ? IsEmptyObject$1<TRules[TKey]> extends true ? never : TKey : TKey : never]-?: IsUnion<NonNullable<TRules[TKey]>> extends true ? ExtendOnlyRealRecord<TState[TKey]> extends true ? MaybeVariantStatus<NonNullable<TState>[TKey], NonNullable<TRules[TKey]>, TShortcuts> : InferRegleStatusType<NonNullable<TRules[TKey]>, NonNullable<TState>, TKey, TShortcuts> : InferRegleStatusType<NonNullable<TRules[TKey]>, NonNullable<TState>, TKey, TShortcuts> };
2055
2035
  /**
2056
2036
  * Collection of all the error messages, collected for all children properties and nested forms.
2057
2037
  *
@@ -2103,7 +2083,7 @@ type RegleFieldStatus<TState extends any = any, TRules extends RegleFormProperty
2103
2083
  /** 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). */
2104
2084
  $validate: () => Promise<RegleResult<TState, TRules>>;
2105
2085
  /** This is reactive tree containing all the declared rules of your field. To know more about the rule properties check the rules properties section */
2106
- readonly $rules: IsEmptyObject<TRules> extends true ? {
2086
+ readonly $rules: IsEmptyObject$1<TRules> extends true ? {
2107
2087
  readonly [x: string]: RegleRuleStatus<TState, any[], any>;
2108
2088
  } : { readonly [TRuleKey in keyof Omit<TRules, '$each' | keyof FieldRegleBehaviourOptions>]: RegleRuleStatus<TState, TRules[TRuleKey] extends RegleRuleDefinition<any, infer TParams, any> ? TParams : [], TRules[TRuleKey] extends RegleRuleDefinition<any, any, any, infer TMetadata> ? TMetadata : TRules[TRuleKey] extends InlineRuleDeclaration<any, any[], infer TMetadata> ? TMetadata extends Promise<infer P> ? P : TMetadata : any> };
2109
2089
  } & ([TShortcuts['fields']] extends [never] ? {} : { [K in keyof TShortcuts['fields']]: ReturnType<NonNullable<TShortcuts['fields']>[K]> });
@@ -2189,7 +2169,7 @@ type RegleRuleStatus<TValue = any, TParams extends any[] = any[], TMetadata exte
2189
2169
  /** Reset the $valid, $metadata and $pending states */
2190
2170
  $reset(): void;
2191
2171
  /** Returns the original rule validator function. */
2192
- $validator: ((value: IsUnknown$1<TValue> extends true ? any : MaybeInput<TValue>, ...args: any[]) => RegleRuleMetadataDefinition | Promise<RegleRuleMetadataDefinition>) & ((value: IsUnknown$1<TValue> extends true ? any : TValue, ...args: [TParams] extends [never[]] ? [] : [unknown[]] extends [TParams] ? any[] : TParams) => RegleRuleMetadataDefinition | Promise<RegleRuleMetadataDefinition>);
2172
+ $validator: ((value: IsUnknown<TValue> extends true ? any : MaybeInput<TValue>, ...args: any[]) => RegleRuleMetadataDefinition | Promise<RegleRuleMetadataDefinition>) & ((value: IsUnknown<TValue> extends true ? any : TValue, ...args: [TParams] extends [never[]] ? [] : [unknown[]] extends [TParams] ? any[] : TParams) => RegleRuleMetadataDefinition | Promise<RegleRuleMetadataDefinition>);
2193
2173
  } & ([TParams] extends [never[]] ? {} : [unknown[]] extends [TParams] ? {
2194
2174
  readonly $params?: any[];
2195
2175
  } : {
@@ -2325,7 +2305,6 @@ type useCollectScopeFn<TNamedScoped extends boolean = false> = TNamedScoped exte
2325
2305
  } : <TValue extends Record<string, unknown>[] = Record<string, unknown>[]>(namespace?: MaybeRefOrGetter<string>) => {
2326
2306
  r$: MergedScopedRegles<TValue>;
2327
2307
  };
2328
-
2329
2308
  //#endregion
2330
2309
  //#region src/core/createScopedUseRegle/useScopedRegle.d.ts
2331
2310
  type UseScopedRegleOptions<TAsRecord extends boolean> = {
@@ -2333,7 +2312,6 @@ type UseScopedRegleOptions<TAsRecord extends boolean> = {
2333
2312
  } & (TAsRecord extends true ? {
2334
2313
  scopeKey: string;
2335
2314
  } : {});
2336
-
2337
2315
  //#endregion
2338
2316
  //#region src/core/createScopedUseRegle/createScopedUseRegle.d.ts
2339
2317
  type CreateScopedUseRegleOptions<TCustomRegle extends useRegleFn<any, any>, TAsRecord extends boolean> = {
@@ -2350,18 +2328,16 @@ type CreateScopedUseRegleOptions<TCustomRegle extends useRegleFn<any, any>, TAsR
2350
2328
  */
2351
2329
  asRecord?: TAsRecord;
2352
2330
  };
2353
-
2354
2331
  //#endregion
2355
- //#region ../../node_modules/.pnpm/type-fest@4.40.1/node_modules/type-fest/source/primitive.d.ts
2332
+ //#region ../../node_modules/.pnpm/type-fest@4.41.0/node_modules/type-fest/source/primitive.d.ts
2356
2333
  /**
2357
2334
  Matches any [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive).
2358
2335
 
2359
2336
  @category Type
2360
2337
  */
2361
2338
  type Primitive = null | undefined | string | number | boolean | symbol | bigint;
2362
-
2363
2339
  //#endregion
2364
- //#region ../../node_modules/.pnpm/type-fest@4.40.1/node_modules/type-fest/source/observable-like.d.ts
2340
+ //#region ../../node_modules/.pnpm/type-fest@4.41.0/node_modules/type-fest/source/observable-like.d.ts
2365
2341
  declare global {
2366
2342
  // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
2367
2343
  interface SymbolConstructor {
@@ -2369,8 +2345,6 @@ declare global {
2369
2345
  }
2370
2346
  }
2371
2347
 
2372
- //#endregion
2373
- //#region ../../node_modules/.pnpm/type-fest@4.40.1/node_modules/type-fest/source/empty-object.d.ts
2374
2348
  /**
2375
2349
  @remarks
2376
2350
  The TC39 observable proposal defines a `closed` property, but some implementations (such as xstream) do not as of 10/08/2021.
@@ -2381,6 +2355,8 @@ As well, some guidance on making an `Observable` to not include `closed` propert
2381
2355
 
2382
2356
  @category Observable
2383
2357
  */
2358
+ //#endregion
2359
+ //#region ../../node_modules/.pnpm/type-fest@4.41.0/node_modules/type-fest/source/empty-object.d.ts
2384
2360
  declare const emptyObjectSymbol: unique symbol;
2385
2361
 
2386
2362
  /**
@@ -2413,8 +2389,6 @@ type EmptyObject = {
2413
2389
  [emptyObjectSymbol]?: never;
2414
2390
  };
2415
2391
 
2416
- //#endregion
2417
- //#region ../../node_modules/.pnpm/type-fest@4.40.1/node_modules/type-fest/source/optional-keys-of.d.ts
2418
2392
  /**
2419
2393
  Returns a `boolean` for whether the type is strictly equal to an empty plain object, the `{}` value.
2420
2394
 
@@ -2430,6 +2404,8 @@ type Fail = IsEmptyObject<null>; //=> false
2430
2404
  @see EmptyObject
2431
2405
  @category Object
2432
2406
  */
2407
+ //#endregion
2408
+ //#region ../../node_modules/.pnpm/type-fest@4.41.0/node_modules/type-fest/source/optional-keys-of.d.ts
2433
2409
  /**
2434
2410
  Extract all optional keys from the given type.
2435
2411
 
@@ -2465,11 +2441,9 @@ const update2: UpdateOperation<User> = {
2465
2441
  */
2466
2442
  type OptionalKeysOf<BaseType extends object> = BaseType extends unknown // For distributing `BaseType`
2467
2443
  ? (keyof { [Key in keyof BaseType as BaseType extends Record<Key, BaseType[Key]> ? never : Key]: never }) & (keyof BaseType) // Intersect with `keyof BaseType` to ensure result of `OptionalKeysOf<BaseType>` is always assignable to `keyof BaseType`
2468
- : never;
2469
-
2444
+ : never; // Should never happen
2470
2445
  //#endregion
2471
- //#region ../../node_modules/.pnpm/type-fest@4.40.1/node_modules/type-fest/source/required-keys-of.d.ts
2472
- // Should never happen
2446
+ //#region ../../node_modules/.pnpm/type-fest@4.41.0/node_modules/type-fest/source/required-keys-of.d.ts
2473
2447
  /**
2474
2448
  Extract all required keys from the given type.
2475
2449
 
@@ -2495,12 +2469,10 @@ const validator2 = createValidation<User>('surname', value => value.length < 25)
2495
2469
  @category Utilities
2496
2470
  */
2497
2471
  type RequiredKeysOf<BaseType extends object> = BaseType extends unknown // For distributing `BaseType`
2498
- ? Exclude<keyof BaseType, OptionalKeysOf<BaseType>> : never;
2472
+ ? Exclude<keyof BaseType, OptionalKeysOf<BaseType>> : never; // Should never happen
2499
2473
 
2500
2474
  //#endregion
2501
- //#region ../../node_modules/.pnpm/type-fest@4.40.1/node_modules/type-fest/source/is-never.d.ts
2502
- // Should never happen
2503
-
2475
+ //#region ../../node_modules/.pnpm/type-fest@4.41.0/node_modules/type-fest/source/is-never.d.ts
2504
2476
  /**
2505
2477
  Returns a boolean for whether the given type is `never`.
2506
2478
 
@@ -2543,9 +2515,8 @@ endIfEqual('abc', '123');
2543
2515
  @category Utilities
2544
2516
  */
2545
2517
  type IsNever<T> = [T] extends [never] ? true : false;
2546
-
2547
2518
  //#endregion
2548
- //#region ../../node_modules/.pnpm/type-fest@4.40.1/node_modules/type-fest/source/if-never.d.ts
2519
+ //#region ../../node_modules/.pnpm/type-fest@4.41.0/node_modules/type-fest/source/if-never.d.ts
2549
2520
  /**
2550
2521
  An if-else-like type that resolves depending on whether the given type is `never`.
2551
2522
 
@@ -2565,10 +2536,9 @@ type ShouldBeBar = IfNever<'not never', 'foo', 'bar'>;
2565
2536
  @category Type Guard
2566
2537
  @category Utilities
2567
2538
  */
2568
- type IfNever<T, TypeIfNever = true, TypeIfNotNever = false> = (IsNever<T> extends true ? TypeIfNever : TypeIfNotNever);
2569
-
2539
+ type IfNever$1<T, TypeIfNever = true, TypeIfNotNever = false> = (IsNever<T> extends true ? TypeIfNever : TypeIfNotNever);
2570
2540
  //#endregion
2571
- //#region ../../node_modules/.pnpm/type-fest@4.40.1/node_modules/type-fest/source/internal/array.d.ts
2541
+ //#region ../../node_modules/.pnpm/type-fest@4.41.0/node_modules/type-fest/source/internal/array.d.ts
2572
2542
  /**
2573
2543
  Extract the element of an array that also works for array union.
2574
2544
 
@@ -2578,8 +2548,6 @@ It creates a type-safe way to access the element type of `unknown` type.
2578
2548
  */
2579
2549
  type ArrayElement<T> = T extends readonly unknown[] ? T[0] : never;
2580
2550
 
2581
- //#endregion
2582
- //#region ../../node_modules/.pnpm/type-fest@4.40.1/node_modules/type-fest/source/is-any.d.ts
2583
2551
  /**
2584
2552
  Returns the static, fixed-length portion of the given array, excluding variable-length parts.
2585
2553
 
@@ -2590,6 +2558,8 @@ type B = StaticPartOfArray<A>;
2590
2558
  //=> [string, number, boolean]
2591
2559
  ```
2592
2560
  */
2561
+ //#endregion
2562
+ //#region ../../node_modules/.pnpm/type-fest@4.41.0/node_modules/type-fest/source/is-any.d.ts
2593
2563
  // Can eventually be replaced with the built-in once this library supports
2594
2564
  // TS5.4+ only. Tracked in https://github.com/sindresorhus/type-fest/issues/848
2595
2565
  type NoInfer<T> = T extends infer U ? U : never;
@@ -2623,9 +2593,8 @@ const anyA = get(anyObject, 'a');
2623
2593
  @category Utilities
2624
2594
  */
2625
2595
  type IsAny<T> = 0 extends 1 & NoInfer<T> ? true : false;
2626
-
2627
2596
  //#endregion
2628
- //#region ../../node_modules/.pnpm/type-fest@4.40.1/node_modules/type-fest/source/simplify.d.ts
2597
+ //#region ../../node_modules/.pnpm/type-fest@4.41.0/node_modules/type-fest/source/simplify.d.ts
2629
2598
  /**
2630
2599
  Useful to flatten the type output to improve type hints shown in editors. And also to transform an interface into a type to aide with assignability.
2631
2600
 
@@ -2684,9 +2653,8 @@ fn(someInterface as Simplify<SomeInterface>); // Good: transform an `interface`
2684
2653
  @category Object
2685
2654
  */
2686
2655
  type Simplify<T> = { [KeyType in keyof T]: T[KeyType] } & {};
2687
-
2688
2656
  //#endregion
2689
- //#region ../../node_modules/.pnpm/type-fest@4.40.1/node_modules/type-fest/source/omit-index-signature.d.ts
2657
+ //#region ../../node_modules/.pnpm/type-fest@4.41.0/node_modules/type-fest/source/omit-index-signature.d.ts
2690
2658
  /**
2691
2659
  Omit any index signatures from the given object type, leaving only explicitly defined properties.
2692
2660
 
@@ -2778,9 +2746,8 @@ type ExampleWithoutIndexSignatures = OmitIndexSignature<Example>;
2778
2746
  @category Object
2779
2747
  */
2780
2748
  type OmitIndexSignature<ObjectType> = { [KeyType in keyof ObjectType as {} extends Record<KeyType, unknown> ? never : KeyType]: ObjectType[KeyType] };
2781
-
2782
2749
  //#endregion
2783
- //#region ../../node_modules/.pnpm/type-fest@4.40.1/node_modules/type-fest/source/pick-index-signature.d.ts
2750
+ //#region ../../node_modules/.pnpm/type-fest@4.41.0/node_modules/type-fest/source/pick-index-signature.d.ts
2784
2751
  /**
2785
2752
  Pick only index signatures from the given object type, leaving out all explicitly defined properties.
2786
2753
 
@@ -2827,9 +2794,8 @@ type ExampleIndexSignature = PickIndexSignature<Example>;
2827
2794
  @category Object
2828
2795
  */
2829
2796
  type PickIndexSignature<ObjectType> = { [KeyType in keyof ObjectType as {} extends Record<KeyType, unknown> ? KeyType : never]: ObjectType[KeyType] };
2830
-
2831
2797
  //#endregion
2832
- //#region ../../node_modules/.pnpm/type-fest@4.40.1/node_modules/type-fest/source/merge.d.ts
2798
+ //#region ../../node_modules/.pnpm/type-fest@4.41.0/node_modules/type-fest/source/merge.d.ts
2833
2799
  // Merges two objects without worrying about index signatures.
2834
2800
  type SimpleMerge<Destination, Source> = { [Key in keyof Destination as Key extends keyof Source ? never : Key]: Destination[Key] } & Source;
2835
2801
 
@@ -2868,9 +2834,8 @@ export type FooBar = Merge<Foo, Bar>;
2868
2834
  @category Object
2869
2835
  */
2870
2836
  type Merge<Destination, Source> = Simplify<SimpleMerge<PickIndexSignature<Destination>, PickIndexSignature<Source>> & SimpleMerge<OmitIndexSignature<Destination>, OmitIndexSignature<Source>>>;
2871
-
2872
2837
  //#endregion
2873
- //#region ../../node_modules/.pnpm/type-fest@4.40.1/node_modules/type-fest/source/if-any.d.ts
2838
+ //#region ../../node_modules/.pnpm/type-fest@4.41.0/node_modules/type-fest/source/if-any.d.ts
2874
2839
  /**
2875
2840
  An if-else-like type that resolves depending on whether the given type is `any`.
2876
2841
 
@@ -2890,21 +2855,20 @@ type ShouldBeBar = IfAny<'not any', 'foo', 'bar'>;
2890
2855
  @category Type Guard
2891
2856
  @category Utilities
2892
2857
  */
2893
- type IfAny<T, TypeIfAny = true, TypeIfNotAny = false> = (IsAny<T> extends true ? TypeIfAny : TypeIfNotAny);
2894
-
2858
+ type IfAny$1<T, TypeIfAny = true, TypeIfNotAny = false> = (IsAny<T> extends true ? TypeIfAny : TypeIfNotAny);
2895
2859
  //#endregion
2896
- //#region ../../node_modules/.pnpm/type-fest@4.40.1/node_modules/type-fest/source/internal/type.d.ts
2860
+ //#region ../../node_modules/.pnpm/type-fest@4.41.0/node_modules/type-fest/source/internal/type.d.ts
2897
2861
  /**
2898
2862
  Matches any primitive, `void`, `Date`, or `RegExp` value.
2899
2863
  */
2900
2864
  type BuiltIns = Primitive | void | Date | RegExp;
2901
2865
 
2902
- //#endregion
2903
- //#region ../../node_modules/.pnpm/type-fest@4.40.1/node_modules/type-fest/source/internal/object.d.ts
2904
2866
  /**
2905
2867
  Matches non-recursive types.
2906
2868
  */
2907
2869
 
2870
+ //#endregion
2871
+ //#region ../../node_modules/.pnpm/type-fest@4.41.0/node_modules/type-fest/source/internal/object.d.ts
2908
2872
  /**
2909
2873
  Merges user specified options with default options.
2910
2874
 
@@ -2957,11 +2921,10 @@ type Result = ApplyDefaultOptions<PathsOptions, DefaultPathsOptions, SpecifiedOp
2957
2921
  // Types of property 'leavesOnly' are incompatible. Type 'string' is not assignable to type 'boolean'.
2958
2922
  ```
2959
2923
  */
2960
- type ApplyDefaultOptions<Options extends object, Defaults extends Simplify<Omit<Required<Options>, RequiredKeysOf<Options>> & Partial<Record<RequiredKeysOf<Options>, never>>>, SpecifiedOptions extends Options> = IfAny<SpecifiedOptions, Defaults, IfNever<SpecifiedOptions, Defaults, Simplify<Merge<Defaults, { [Key in keyof SpecifiedOptions as Key extends OptionalKeysOf<Options> ? Extract<SpecifiedOptions[Key], undefined> extends never ? Key : never : Key]: SpecifiedOptions[Key] }> & Required<Options>> // `& Required<Options>` ensures that `ApplyDefaultOptions<SomeOption, ...>` is always assignable to `Required<SomeOption>`
2924
+ type ApplyDefaultOptions<Options extends object, Defaults extends Simplify<Omit<Required<Options>, RequiredKeysOf<Options>> & Partial<Record<RequiredKeysOf<Options>, never>>>, SpecifiedOptions extends Options> = IfAny$1<SpecifiedOptions, Defaults, IfNever$1<SpecifiedOptions, Defaults, Simplify<Merge<Defaults, { [Key in keyof SpecifiedOptions as Key extends OptionalKeysOf<Options> ? Extract<SpecifiedOptions[Key], undefined> extends never ? Key : never : Key]: SpecifiedOptions[Key] }> & Required<Options>> // `& Required<Options>` ensures that `ApplyDefaultOptions<SomeOption, ...>` is always assignable to `Required<SomeOption>`
2961
2925
  >>;
2962
-
2963
2926
  //#endregion
2964
- //#region ../../node_modules/.pnpm/type-fest@4.40.1/node_modules/type-fest/source/partial-deep.d.ts
2927
+ //#region ../../node_modules/.pnpm/type-fest@4.41.0/node_modules/type-fest/source/partial-deep.d.ts
2965
2928
  /**
2966
2929
  @see {@link PartialDeep}
2967
2930
  */
@@ -3078,7 +3041,6 @@ type PartialReadonlySetDeep<T, Options extends Required<PartialDeepOptions>> = {
3078
3041
  Same as `PartialDeep`, but accepts only `object`s as inputs. Internal helper for `PartialDeep`.
3079
3042
  */
3080
3043
  type PartialObjectDeep<ObjectType extends object, Options extends Required<PartialDeepOptions>> = (ObjectType extends ((...arguments_: any) => unknown) ? (...arguments_: Parameters<ObjectType>) => ReturnType<ObjectType> : {}) & ({ [KeyType in keyof ObjectType]?: _PartialDeep<ObjectType[KeyType], Options> });
3081
-
3082
3044
  //#endregion
3083
3045
  //#region src/types/core.types.d.ts
3084
3046
  type RegleSchema<TState extends Record<string, any>, TSchema extends Record<string, any>, TShortcuts extends RegleShortcutDefinition = {}, TAdditionalReturnProperties extends Record<string, any> = {}> = {
@@ -3167,7 +3129,6 @@ type RegleSchemaCollectionStatus<TSchema extends Record<string, any>, TState ext
3167
3129
  /** 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). */
3168
3130
  $extractDirtyFields: (filterNullishValues?: boolean) => PartialDeep<TState>;
3169
3131
  } & ([TShortcuts['collections']] extends [never] ? {} : { [K in keyof TShortcuts['collections']]: ReturnType<NonNullable<TShortcuts['collections']>[K]> });
3170
-
3171
3132
  //#endregion
3172
3133
  //#region src/types/options.types.d.ts
3173
3134
  type RegleSchemaBehaviourOptions = {
@@ -3185,7 +3146,6 @@ type RegleSchemaBehaviourOptions = {
3185
3146
  onValidate?: boolean;
3186
3147
  };
3187
3148
  };
3188
-
3189
3149
  //#endregion
3190
3150
  //#region src/core/useRegleSchema.d.ts
3191
3151
  type useRegleSchemaFnOptions<TAdditionalOptions extends Record<string, any>> = Omit<Partial<DeepMaybeRef<RegleBehaviourOptions>> & LocalRegleBehaviourOptions<Record<string, any>, {}, never>, 'validationGroups' | 'lazy' | 'rewardEarly' | 'silent'> & RegleSchemaBehaviourOptions & TAdditionalOptions;
@@ -3216,7 +3176,6 @@ interface useRegleSchemaFn<TShortcuts extends RegleShortcutDefinition<any> = nev
3216
3176
  * Docs: {@link https://reglejs.dev/integrations/valibot#usage}
3217
3177
  */
3218
3178
  declare const useRegleSchema: useRegleSchemaFn<RegleShortcutDefinition<any>, {}, {}>;
3219
-
3220
3179
  //#endregion
3221
3180
  //#region src/core/withDeps.d.ts
3222
3181
  /**
@@ -3236,7 +3195,6 @@ declare const useRegleSchema: useRegleSchemaFn<RegleShortcutDefinition<any>, {},
3236
3195
  * ```
3237
3196
  */
3238
3197
  declare function withDeps<TSchema extends StandardSchemaV1, TParams extends unknown[] = []>(schema: TSchema, depsArray: [...TParams]): TSchema;
3239
-
3240
3198
  //#endregion
3241
3199
  //#region src/core/inferSchema.d.ts
3242
3200
  interface inferSchemaFn {
@@ -3254,7 +3212,6 @@ interface inferSchemaFn {
3254
3212
  * @param schema - Your schema
3255
3213
  */
3256
3214
  declare const inferSchema: inferSchemaFn;
3257
-
3258
3215
  //#endregion
3259
3216
  //#region src/core/defineRegleSchemaConfig.d.ts
3260
3217
  /**
@@ -3277,7 +3234,6 @@ declare function defineRegleSchemaConfig<TShortcuts extends RegleShortcutDefinit
3277
3234
  useRegleSchema: useRegleSchemaFn<TShortcuts>;
3278
3235
  inferSchema: inferSchemaFn;
3279
3236
  };
3280
-
3281
3237
  //#endregion
3282
3238
  //#region src/core/createScopedUseRegleSchema.d.ts
3283
3239
  type CreateScopedUseRegleSchemaOptions<TCustomRegle extends useRegleSchemaFn<any, any>, TAsRecord extends boolean> = Omit<CreateScopedUseRegleOptions<any, TAsRecord>, 'customUseRegle'> & {
@@ -3299,6 +3255,5 @@ declare const createScopedUseRegleSchema: <TCustomRegle extends useRegleSchemaFn
3299
3255
  useScopedRegle: TReturnedRegle;
3300
3256
  useCollectScope: useCollectScopeFn<TAsRecord>;
3301
3257
  };
3302
-
3303
3258
  //#endregion
3304
3259
  export { InferRegleSchemaStatusType, RegleSchema, RegleSchemaBehaviourOptions, RegleSchemaCollectionStatus, RegleSchemaFieldStatus, RegleSchemaResult, RegleSchemaStatus, RegleSingleFieldSchema, createScopedUseRegleSchema, defineRegleSchemaConfig, inferSchema, useCollectSchemaScope, useRegleSchema, useScopedRegleSchema, withDeps };
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@regle/schemas",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "Schemas adapter for Regle",
5
5
  "dependencies": {
6
6
  "@standard-schema/spec": "1.0.0",
7
- "@regle/core": "1.3.0",
8
- "@regle/rules": "1.3.0"
7
+ "@regle/rules": "1.3.1",
8
+ "@regle/core": "1.3.1"
9
9
  },
10
10
  "peerDependencies": {
11
11
  "valibot": "^1.0.0",
@@ -25,23 +25,23 @@
25
25
  },
26
26
  "devDependencies": {
27
27
  "@total-typescript/ts-reset": "0.6.1",
28
- "@types/node": "22.15.3",
28
+ "@types/node": "22.15.29",
29
29
  "@typescript-eslint/eslint-plugin": "8.28.0",
30
30
  "@typescript-eslint/parser": "8.28.0",
31
31
  "@vue/test-utils": "2.4.6",
32
- "eslint": "9.25.1",
33
- "eslint-config-prettier": "9.1.0",
34
- "eslint-plugin-vue": "9.33.0",
32
+ "eslint": "9.28.0",
33
+ "eslint-config-prettier": "10.1.5",
34
+ "eslint-plugin-vue": "10.1.0",
35
35
  "prettier": "3.5.3",
36
- "tsdown": "0.12.3",
37
- "type-fest": "4.40.1",
36
+ "tsdown": "0.12.7",
37
+ "type-fest": "4.41.0",
38
38
  "typescript": "5.8.3",
39
39
  "valibot": "1.1.0",
40
- "vitest": "3.1.2",
41
- "vue": "3.5.13",
40
+ "vitest": "3.2.2",
41
+ "vue": "3.5.16",
42
42
  "vue-eslint-parser": "10.1.3",
43
43
  "vue-tsc": "2.2.10",
44
- "zod": "3.25.30"
44
+ "zod": "3.25.51"
45
45
  },
46
46
  "type": "module",
47
47
  "exports": {