@regle/mcp-server 1.21.2 → 1.21.5
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-mcp-server.js +79 -79
- package/package.json +4 -4
package/dist/regle-mcp-server.js
CHANGED
|
@@ -359,7 +359,7 @@ const rawData = {
|
|
|
359
359
|
"description": "Create a scoped validation system for collecting and validating multiple form instances.\nUseful for dynamic forms, multi-step wizards, or component-based form architectures.",
|
|
360
360
|
"parameters": [{
|
|
361
361
|
"name": "options",
|
|
362
|
-
"type": "CreateScopedUseRegleOptions<TCustomRegle, TAsRecord>",
|
|
362
|
+
"type": "CreateScopedUseRegleOptions<TCustomRegle, TAsRecord> | undefined",
|
|
363
363
|
"description": "- Configuration options",
|
|
364
364
|
"optional": true
|
|
365
365
|
}],
|
|
@@ -515,12 +515,12 @@ const rawData = {
|
|
|
515
515
|
"description": "Type helper to provide autocomplete and type-checking for your form rules.\nIt returns the rules without any processing - useful with computed rules.",
|
|
516
516
|
"parameters": [{
|
|
517
517
|
"name": "state",
|
|
518
|
-
"type": "TState | DeepReactiveState<TState>",
|
|
518
|
+
"type": "Maybe<TState> | DeepReactiveState<TState>",
|
|
519
519
|
"description": "- The state reference",
|
|
520
520
|
"optional": false
|
|
521
521
|
}, {
|
|
522
522
|
"name": "rulesFactory",
|
|
523
|
-
"type": "Unwrap<TState> extends PrimitiveTypes ? TDecl : Unwrap<TState> extends Record<string, any> ? TRules : {}",
|
|
523
|
+
"type": "Unwrap<TState> extends MaybeInput<PrimitiveTypes> ? TDecl : Unwrap<TState> extends Record<string, any> ? TRules : {}",
|
|
524
524
|
"description": "",
|
|
525
525
|
"optional": false
|
|
526
526
|
}],
|
|
@@ -576,7 +576,7 @@ const rawData = {
|
|
|
576
576
|
"optional": false
|
|
577
577
|
}, {
|
|
578
578
|
"name": "_scoped",
|
|
579
|
-
"type": "TScoped",
|
|
579
|
+
"type": "TScoped | undefined",
|
|
580
580
|
"description": "- Internal flag for scoped validation (default: false)",
|
|
581
581
|
"optional": true
|
|
582
582
|
}],
|
|
@@ -591,7 +591,7 @@ const rawData = {
|
|
|
591
591
|
"parameters": [
|
|
592
592
|
{
|
|
593
593
|
"name": "root",
|
|
594
|
-
"type": "TRoot",
|
|
594
|
+
"type": "TRoot | undefined",
|
|
595
595
|
"description": "- The Regle status object",
|
|
596
596
|
"optional": false
|
|
597
597
|
},
|
|
@@ -660,7 +660,7 @@ const rawData = {
|
|
|
660
660
|
"description": "Composable to collect and merge all Regle instances created with the default `useScopedRegle` within the same scope.\nReturns a merged `r$` object allowing validation across multiple components simultaneously.\n\nChildren properties like `$value` and `$errors` are converted to arrays instead of objects.\nYou have access to all validation properties like `$error`, `$invalid`, `$validate()`, etc.",
|
|
661
661
|
"parameters": [{
|
|
662
662
|
"name": "namespace",
|
|
663
|
-
"type": "MaybeRefOrGetter<string | string[]>",
|
|
663
|
+
"type": "MaybeRefOrGetter<string | string[]> | undefined",
|
|
664
664
|
"description": "- Optional namespace or array of namespaces to filter which scoped instances to collect",
|
|
665
665
|
"optional": true
|
|
666
666
|
}],
|
|
@@ -674,7 +674,7 @@ const rawData = {
|
|
|
674
674
|
"description": "`useRegle` serves as the foundation for validation logic.\nIt transforms your data and validation rules into a powerful, reactive validation system.",
|
|
675
675
|
"parameters": [{
|
|
676
676
|
"name": "params",
|
|
677
|
-
"type": "[state: TState | DeepReactiveState<TState>, rulesFactory: Unwrap<TState> extends PrimitiveTypes ? MaybeRefOrGetter
|
|
677
|
+
"type": "[state: Maybe<TState> | DeepReactiveState<TState>, rulesFactory: Unwrap<TState> extends MaybeInput<PrimitiveTypes> ? MaybeRefOrGetter<...> : Unwrap<...> extends Record<...> ? MaybeComputedOrGetter<......",
|
|
678
678
|
"description": "",
|
|
679
679
|
"optional": false
|
|
680
680
|
}],
|
|
@@ -687,7 +687,7 @@ const rawData = {
|
|
|
687
687
|
"kind": "function",
|
|
688
688
|
"description": "",
|
|
689
689
|
"parameters": [],
|
|
690
|
-
"returnType": "Ref<$InternalRegleStatusType, $InternalRegleStatusType>",
|
|
690
|
+
"returnType": "Ref<$InternalRegleStatusType | undefined, $InternalRegleStatusType | undefined>",
|
|
691
691
|
"example": "",
|
|
692
692
|
"tags": { "internal": "This is the internal function that creates the root storage for the Regle instance.\nThis allows shared logic between all `useRegle` like composables" }
|
|
693
693
|
},
|
|
@@ -702,7 +702,7 @@ const rawData = {
|
|
|
702
702
|
"optional": false
|
|
703
703
|
}, {
|
|
704
704
|
"name": "options",
|
|
705
|
-
"type": "useRulesFnOptions<TRules, TValidationGroups, TState>",
|
|
705
|
+
"type": "useRulesFnOptions<TRules, TValidationGroups, TState> | undefined",
|
|
706
706
|
"description": "",
|
|
707
707
|
"optional": true
|
|
708
708
|
}],
|
|
@@ -712,11 +712,11 @@ const rawData = {
|
|
|
712
712
|
},
|
|
713
713
|
{
|
|
714
714
|
"name": "useScopedRegle",
|
|
715
|
-
"kind": "
|
|
715
|
+
"kind": "const",
|
|
716
716
|
"description": "Clone of `useRegle` that automatically registers its instance for collection by `useCollectScope`.\nEvery time it's called, a new instance is added for the parent scope to collect.\n\nCan be called multiple times anywhere in your app - not restricted to components or DOM.\nWhen the component is unmounted or scope is disposed, the instance is automatically unregistered.",
|
|
717
717
|
"parameters": [{
|
|
718
718
|
"name": "params",
|
|
719
|
-
"type": "[state: TState | DeepReactiveState<TState>, rulesFactory: Unwrap<TState> extends PrimitiveTypes ? MaybeRefOrGetter
|
|
719
|
+
"type": "[state: Maybe<TState> | DeepReactiveState<TState>, rulesFactory: Unwrap<TState> extends MaybeInput<PrimitiveTypes> ? MaybeRefOrGetter<...> : Unwrap<...> extends Record<...> ? MaybeComputedOrGetter<......",
|
|
720
720
|
"description": "",
|
|
721
721
|
"optional": false
|
|
722
722
|
}],
|
|
@@ -766,11 +766,11 @@ const rawData = {
|
|
|
766
766
|
"description": "Allows only alphabetic characters.",
|
|
767
767
|
"parameters": [{
|
|
768
768
|
"name": "params",
|
|
769
|
-
"type": "[options?: MaybeRefOrGetter<CommonAlphaOptions
|
|
769
|
+
"type": "[options?: MaybeRefOrGetter<Maybe<CommonAlphaOptions | undefined>>]",
|
|
770
770
|
"description": "",
|
|
771
771
|
"optional": false
|
|
772
772
|
}],
|
|
773
|
-
"returnType": "RegleRuleDefinition<\"alpha\", string, [options?: CommonAlphaOptions], false, boolean, string
|
|
773
|
+
"returnType": "RegleRuleDefinition<\"alpha\", string, [options?: CommonAlphaOptions | undefined], false, boolean, MaybeInput<string>, string, false>",
|
|
774
774
|
"example": "import { alpha } from '@regle/rules';\n\nconst { r$ } = useRegle({ name: '' }, {\n name: {\n alpha,\n // or with symbols allowed\n alpha: alpha({ allowSymbols: true }),\n },\n})",
|
|
775
775
|
"tags": { "see": "://reglejs.dev/core-concepts/rules/built-in-rules#alpha Documentation" }
|
|
776
776
|
},
|
|
@@ -780,11 +780,11 @@ const rawData = {
|
|
|
780
780
|
"description": "Allows only alphanumeric characters.",
|
|
781
781
|
"parameters": [{
|
|
782
782
|
"name": "params",
|
|
783
|
-
"type": "[options?: MaybeRefOrGetter<CommonAlphaOptions
|
|
783
|
+
"type": "[options?: MaybeRefOrGetter<Maybe<CommonAlphaOptions | undefined>>]",
|
|
784
784
|
"description": "",
|
|
785
785
|
"optional": false
|
|
786
786
|
}],
|
|
787
|
-
"returnType": "RegleRuleDefinition<\"alphaNum\", string | number, [options?: CommonAlphaOptions], false, boolean, string
|
|
787
|
+
"returnType": "RegleRuleDefinition<\"alphaNum\", string | number, [options?: CommonAlphaOptions | undefined], false, boolean, MaybeInput<string>, string | number, false>",
|
|
788
788
|
"example": "import { alphaNum } from '@regle/rules';\n\nconst { r$ } = useRegle({ name: '' }, {\n name: {\n alphaNum,\n // or with symbols allowed\n alphaNum: alphaNum({ allowSymbols: true }),\n },\n})",
|
|
789
789
|
"tags": { "see": "://reglejs.dev/core-concepts/rules/built-in-rules#alphanum Documentation" }
|
|
790
790
|
},
|
|
@@ -809,7 +809,7 @@ const rawData = {
|
|
|
809
809
|
"parameters": [
|
|
810
810
|
{
|
|
811
811
|
"name": "_condition",
|
|
812
|
-
"type": "MaybeRefOrGetter<boolean
|
|
812
|
+
"type": "MaybeRefOrGetter<Maybe<boolean>>",
|
|
813
813
|
"description": "- The condition to check (ref, getter, or value)",
|
|
814
814
|
"optional": false
|
|
815
815
|
},
|
|
@@ -821,7 +821,7 @@ const rawData = {
|
|
|
821
821
|
},
|
|
822
822
|
{
|
|
823
823
|
"name": "options",
|
|
824
|
-
"type": "ApplyIfOptions",
|
|
824
|
+
"type": "ApplyIfOptions | undefined",
|
|
825
825
|
"description": "",
|
|
826
826
|
"optional": true
|
|
827
827
|
}
|
|
@@ -837,7 +837,7 @@ const rawData = {
|
|
|
837
837
|
"parameters": [
|
|
838
838
|
{
|
|
839
839
|
"name": "_condition",
|
|
840
|
-
"type": "MaybeRefOrGetter<boolean
|
|
840
|
+
"type": "MaybeRefOrGetter<Maybe<boolean>>",
|
|
841
841
|
"description": "- The condition to check (ref, getter, or value)",
|
|
842
842
|
"optional": false
|
|
843
843
|
},
|
|
@@ -849,7 +849,7 @@ const rawData = {
|
|
|
849
849
|
},
|
|
850
850
|
{
|
|
851
851
|
"name": "otherwiseRules",
|
|
852
|
-
"type": "MaybeRefOrGetter<TRulesDelc>",
|
|
852
|
+
"type": "MaybeRefOrGetter<TRulesDelc> | undefined",
|
|
853
853
|
"description": "",
|
|
854
854
|
"optional": true
|
|
855
855
|
}
|
|
@@ -864,11 +864,11 @@ const rawData = {
|
|
|
864
864
|
"description": "Checks if at least one key is filled in the object.",
|
|
865
865
|
"parameters": [{
|
|
866
866
|
"name": "keys",
|
|
867
|
-
"type": "MaybeRefOrGetter<readonly (NoInfer<keyof T> & string)[]>",
|
|
867
|
+
"type": "MaybeRefOrGetter<readonly (NoInfer<keyof T> & string)[] | undefined>",
|
|
868
868
|
"description": "",
|
|
869
869
|
"optional": true
|
|
870
870
|
}],
|
|
871
|
-
"returnType": "RegleRuleDefinition<\"atLeastOne\", T, [keys?: readonly (NoInfer<keyof T> & string)[]], false, boolean, false, T, boolean>",
|
|
871
|
+
"returnType": "RegleRuleDefinition<\"atLeastOne\", T, [keys?: readonly (NoInfer<keyof T> & string)[] | undefined], false, boolean, false, T, boolean>",
|
|
872
872
|
"example": "import { atLeastOne } from '@regle/rules';\n\nconst { r$ } = useRegle({ user: { firstName: '', lastName: '' } }, {\n user: {\n atLeastOne,\n // or\n atLeastOne: atLeastOne(['firstName', 'lastName'])\n // or\n atLeastOne: atLeastOne<{ firstName: string; lastName: string }>(['firstName', 'lastName'])\n },\n});",
|
|
873
873
|
"tags": { "see": "://reglejs.dev/core-concepts/rules/built-in-rules#atleastone Documentation" }
|
|
874
874
|
},
|
|
@@ -878,11 +878,11 @@ const rawData = {
|
|
|
878
878
|
"description": "Checks if a number is in specified bounds. `min` and `max` are both inclusive by default.",
|
|
879
879
|
"parameters": [{
|
|
880
880
|
"name": "params",
|
|
881
|
-
"type": "[min: MaybeRefOrGetter<number
|
|
881
|
+
"type": "[min: MaybeRefOrGetter<Maybe<number>>, max: MaybeRefOrGetter<Maybe<number>>, options?: MaybeRefOrGetter<Maybe<CommonComparisonOptions | undefined>>]",
|
|
882
882
|
"description": "",
|
|
883
883
|
"optional": false
|
|
884
884
|
}],
|
|
885
|
-
"returnType": "RegleRuleDefinition<\"between\", number, [min: number, max: number, options?: CommonComparisonOptions], false, boolean, number
|
|
885
|
+
"returnType": "RegleRuleDefinition<\"between\", number, [min: number, max: number, options?: CommonComparisonOptions | undefined], false, boolean, MaybeInput<number>, number, false>",
|
|
886
886
|
"example": "import { between } from '@regle/rules';\n\nconst maxCount = ref(6);\n\nconst { r$ } = useRegle({ count: 0 }, {\n count: {\n between: between(1, 6),\n // or with reactive max\n between: between(1, maxCount, { allowEqual: false }),\n // or with getter\n between: between(() => maxCount.value, 10)\n },\n})",
|
|
887
887
|
"tags": { "see": "://reglejs.dev/core-concepts/rules/built-in-rules#between Documentation" }
|
|
888
888
|
},
|
|
@@ -910,11 +910,11 @@ const rawData = {
|
|
|
910
910
|
"description": "Checks if the string contains the specified substring.",
|
|
911
911
|
"parameters": [{
|
|
912
912
|
"name": "params",
|
|
913
|
-
"type": "[part: MaybeRefOrGetter<string
|
|
913
|
+
"type": "[part: MaybeRefOrGetter<Maybe<MaybeInput<string>>>]",
|
|
914
914
|
"description": "",
|
|
915
915
|
"optional": false
|
|
916
916
|
}],
|
|
917
|
-
"returnType": "RegleRuleDefinition<\"contains\", string, [part: string], false, boolean, string
|
|
917
|
+
"returnType": "RegleRuleDefinition<\"contains\", string, [part: MaybeInput<string>], false, boolean, MaybeInput<string>, string, false>",
|
|
918
918
|
"example": "import { contains } from '@regle/rules';\n\nconst { r$ } = useRegle({ bestLib: '' }, {\n bestLib: {\n contains: contains('regle')\n },\n})",
|
|
919
919
|
"tags": { "see": "://reglejs.dev/core-concepts/rules/built-in-rules#contains Documentation" }
|
|
920
920
|
},
|
|
@@ -924,11 +924,11 @@ const rawData = {
|
|
|
924
924
|
"description": "Requires a string field to contain at least a given number of special characters.",
|
|
925
925
|
"parameters": [{
|
|
926
926
|
"name": "params",
|
|
927
|
-
"type": "[minCharactersCount?: MaybeRefOrGetter<number
|
|
927
|
+
"type": "[minCharactersCount?: MaybeRefOrGetter<Maybe<number | undefined>>]",
|
|
928
928
|
"description": "",
|
|
929
929
|
"optional": false
|
|
930
930
|
}],
|
|
931
|
-
"returnType": "RegleRuleDefinition<\"containsSpecialCharacter\", string, [minCharactersCount?: number], false, { $valid: boolean; minCharactersCount: number; }, string, string, false>",
|
|
931
|
+
"returnType": "RegleRuleDefinition<\"containsSpecialCharacter\", string, [minCharactersCount?: number | undefined], false, { $valid: boolean; minCharactersCount: number; }, string, string, false>",
|
|
932
932
|
"example": "import { useRegle, containsSpecialCharacter } from '@regle/rules';\n\nconst { r$ } = useRegle({ password: '' }, {\n password: {\n containsSpecialCharacter,\n // or with a minimum number of special characters\n containsSpecialCharacter: containsSpecialCharacter(2)\n }\n})",
|
|
933
933
|
"tags": { "see": "://reglejs.dev/core-concepts/rules/built-in-rules#containsSpecialCharacter Documentation" }
|
|
934
934
|
},
|
|
@@ -938,11 +938,11 @@ const rawData = {
|
|
|
938
938
|
"description": "Requires a string field to contain at least a given number of uppercase letters.",
|
|
939
939
|
"parameters": [{
|
|
940
940
|
"name": "params",
|
|
941
|
-
"type": "[minUppercaseCount?: MaybeRefOrGetter<number
|
|
941
|
+
"type": "[minUppercaseCount?: MaybeRefOrGetter<Maybe<number | undefined>>]",
|
|
942
942
|
"description": "",
|
|
943
943
|
"optional": false
|
|
944
944
|
}],
|
|
945
|
-
"returnType": "RegleRuleDefinition<\"containsUppercase\", string, [minUppercaseCount?: number], false, { $valid: boolean; minUppercaseCount: number; }, string, string, false>",
|
|
945
|
+
"returnType": "RegleRuleDefinition<\"containsUppercase\", string, [minUppercaseCount?: number | undefined], false, { $valid: boolean; minUppercaseCount: number; }, string, string, false>",
|
|
946
946
|
"example": "import { useRegle, containsUppercase } from '@regle/rules';\n\nconst { r$ } = useRegle({ password: '' }, {\n password: { containsUppercase },\n // or with a minimum number of uppercase letters\n password: { containsUppercase: containsUppercase(2) }\n})",
|
|
947
947
|
"tags": { "see": "://reglejs.dev/core-concepts/rules/built-in-rules#containsUppercase Documentation" }
|
|
948
948
|
},
|
|
@@ -961,11 +961,11 @@ const rawData = {
|
|
|
961
961
|
"description": "Checks if the date is after the given parameter.",
|
|
962
962
|
"parameters": [{
|
|
963
963
|
"name": "params",
|
|
964
|
-
"type": "[after: MaybeRefOrGetter<string | Date
|
|
964
|
+
"type": "[after: MaybeRefOrGetter<Maybe<MaybeInput<string | Date>>>, options?: MaybeRefOrGetter<Maybe<CommonComparisonOptions | undefined>>]",
|
|
965
965
|
"description": "",
|
|
966
966
|
"optional": false
|
|
967
967
|
}],
|
|
968
|
-
"returnType": "RegleRuleDefinition<\"dateAfter\", string | Date, [after: string | Date
|
|
968
|
+
"returnType": "RegleRuleDefinition<\"dateAfter\", string | Date, [after: MaybeInput<string | Date>, options?: CommonComparisonOptions | undefined], false, true | { ...; } | { ...; }, MaybeInput<...>, string | Date, fa...",
|
|
969
969
|
"example": "import { dateAfter } from '@regle/rules';\n\nconst { r$ } = useRegle({ birthday: null as Date | null }, {\n birthday: {\n dateAfter: dateAfter(new Date()),\n // or with options\n dateAfter: dateAfter(new Date(), { allowEqual: false }),\n },\n})",
|
|
970
970
|
"tags": { "see": "://reglejs.dev/core-concepts/rules/built-in-rules#dateafter Documentation" }
|
|
971
971
|
},
|
|
@@ -975,11 +975,11 @@ const rawData = {
|
|
|
975
975
|
"description": "Checks if the date is before the given parameter.",
|
|
976
976
|
"parameters": [{
|
|
977
977
|
"name": "params",
|
|
978
|
-
"type": "[before: MaybeRefOrGetter<string | Date
|
|
978
|
+
"type": "[before: MaybeRefOrGetter<Maybe<MaybeInput<string | Date>>>, options?: MaybeRefOrGetter<Maybe<CommonComparisonOptions | undefined>>]",
|
|
979
979
|
"description": "",
|
|
980
980
|
"optional": false
|
|
981
981
|
}],
|
|
982
|
-
"returnType": "RegleRuleDefinition<\"dateBefore\", string | Date, [before: string | Date
|
|
982
|
+
"returnType": "RegleRuleDefinition<\"dateBefore\", string | Date, [before: MaybeInput<string | Date>, options?: CommonComparisonOptions | undefined], false, true | { ...; } | { ...; }, MaybeInput<...>, string | Date, ...",
|
|
983
983
|
"example": "import { dateBefore } from '@regle/rules';\n\nconst { r$ } = useRegle({ birthday: null as Date | null }, {\n birthday: {\n dateBefore: dateBefore(new Date()),\n // or with options\n dateBefore: dateBefore(new Date(), { allowEqual: false }),\n },\n})",
|
|
984
984
|
"tags": { "see": "://reglejs.dev/core-concepts/rules/built-in-rules#datebefore Documentation" }
|
|
985
985
|
},
|
|
@@ -989,11 +989,11 @@ const rawData = {
|
|
|
989
989
|
"description": "Checks if the date falls between the specified bounds.",
|
|
990
990
|
"parameters": [{
|
|
991
991
|
"name": "params",
|
|
992
|
-
"type": "[before: MaybeRefOrGetter<string | Date
|
|
992
|
+
"type": "[before: MaybeRefOrGetter<Maybe<MaybeInput<string | Date>>>, after: MaybeRefOrGetter<Maybe<MaybeInput<string | Date>>>, options?: MaybeRefOrGetter<...>]",
|
|
993
993
|
"description": "",
|
|
994
994
|
"optional": false
|
|
995
995
|
}],
|
|
996
|
-
"returnType": "RegleRuleDefinition<\"dateBetween\", string | Date, [before: string | Date
|
|
996
|
+
"returnType": "RegleRuleDefinition<\"dateBetween\", string | Date, [before: MaybeInput<string | Date>, after: MaybeInput<string | Date>, options?: CommonComparisonOptions | undefined], ... 4 more ..., false>",
|
|
997
997
|
"example": "import { dateBetween } from '@regle/rules';\n\nconst { r$ } = useRegle({ birthday: null as Date | null }, {\n birthday: {\n dateBetween: dateBetween(new Date(), new Date(2030, 3, 1)),\n // or with options\n dateBetween: dateBetween(new Date(), new Date(2030, 3, 1), { allowEqual: false }),\n },\n})",
|
|
998
998
|
"tags": { "see": "://reglejs.dev/core-concepts/rules/built-in-rules#datebetween Documentation" }
|
|
999
999
|
},
|
|
@@ -1039,11 +1039,11 @@ const rawData = {
|
|
|
1039
1039
|
"description": "Checks if the string ends with the specified substring.",
|
|
1040
1040
|
"parameters": [{
|
|
1041
1041
|
"name": "params",
|
|
1042
|
-
"type": "[part: MaybeRefOrGetter<string
|
|
1042
|
+
"type": "[part: MaybeRefOrGetter<Maybe<MaybeInput<string>>>]",
|
|
1043
1043
|
"description": "",
|
|
1044
1044
|
"optional": false
|
|
1045
1045
|
}],
|
|
1046
|
-
"returnType": "RegleRuleDefinition<\"endsWith\", string, [part: string], false, boolean, string
|
|
1046
|
+
"returnType": "RegleRuleDefinition<\"endsWith\", string, [part: MaybeInput<string>], false, boolean, MaybeInput<string>, string, false>",
|
|
1047
1047
|
"example": "import { endsWith } from '@regle/rules';\n\nconst { r$ } = useRegle({ firstName: '' }, {\n firstName: { endsWith: endsWith('foo') },\n})",
|
|
1048
1048
|
"tags": { "see": "://reglejs.dev/core-concepts/rules/built-in-rules#endswith Documentation" }
|
|
1049
1049
|
},
|
|
@@ -1053,7 +1053,7 @@ const rawData = {
|
|
|
1053
1053
|
"description": "Requires the input value to have a strict specified length. Works with arrays, objects and strings.",
|
|
1054
1054
|
"parameters": [{
|
|
1055
1055
|
"name": "params",
|
|
1056
|
-
"type": "[count: MaybeRefOrGetter<number
|
|
1056
|
+
"type": "[count: MaybeRefOrGetter<Maybe<number>>]",
|
|
1057
1057
|
"description": "",
|
|
1058
1058
|
"optional": false
|
|
1059
1059
|
}],
|
|
@@ -1067,7 +1067,7 @@ const rawData = {
|
|
|
1067
1067
|
"description": "Requires the input value to have a strict specified length. Works with arrays, objects and strings.",
|
|
1068
1068
|
"parameters": [{
|
|
1069
1069
|
"name": "params",
|
|
1070
|
-
"type": "[count: MaybeRefOrGetter<number
|
|
1070
|
+
"type": "[count: MaybeRefOrGetter<Maybe<number>>]",
|
|
1071
1071
|
"description": "",
|
|
1072
1072
|
"optional": false
|
|
1073
1073
|
}],
|
|
@@ -1081,11 +1081,11 @@ const rawData = {
|
|
|
1081
1081
|
"description": "Requires a field to have a strict numeric value.",
|
|
1082
1082
|
"parameters": [{
|
|
1083
1083
|
"name": "params",
|
|
1084
|
-
"type": "[count: MaybeRefOrGetter<number
|
|
1084
|
+
"type": "[count: MaybeRefOrGetter<Maybe<number>>]",
|
|
1085
1085
|
"description": "",
|
|
1086
1086
|
"optional": false
|
|
1087
1087
|
}],
|
|
1088
|
-
"returnType": "RegleRuleDefinition<\"exactValue\", number, [count: number], false, boolean, number
|
|
1088
|
+
"returnType": "RegleRuleDefinition<\"exactValue\", number, [count: number], false, boolean, MaybeInput<number>, number, false>",
|
|
1089
1089
|
"example": "import { exactValue } from '@regle/rules';\n\nconst exactCount = ref(6);\n\nconst { r$ } = useRegle({ count: 0 }, {\n count: {\n exactValue: exactValue(6),\n // or with reactive value\n exactValue: exactValue(exactCount),\n // or with getter\n exactValue: exactValue(() => exactCount.value)\n },\n})",
|
|
1090
1090
|
"tags": { "see": "://reglejs.dev/core-concepts/rules/built-in-rules#exactvalue Documentation" }
|
|
1091
1091
|
},
|
|
@@ -1104,7 +1104,7 @@ const rawData = {
|
|
|
1104
1104
|
"description": "Requires a value to be a file with a specific type.",
|
|
1105
1105
|
"parameters": [{
|
|
1106
1106
|
"name": "params",
|
|
1107
|
-
"type": "[accept: MaybeRefOrGetter<readonly string[]
|
|
1107
|
+
"type": "[accept: MaybeRefOrGetter<Maybe<readonly string[]>>]",
|
|
1108
1108
|
"description": "",
|
|
1109
1109
|
"optional": false
|
|
1110
1110
|
}],
|
|
@@ -1150,11 +1150,11 @@ const rawData = {
|
|
|
1150
1150
|
"description": "Validates HTTP URLs.",
|
|
1151
1151
|
"parameters": [{
|
|
1152
1152
|
"name": "params",
|
|
1153
|
-
"type": "[options?: MaybeRefOrGetter<UrlOptions
|
|
1153
|
+
"type": "[options?: MaybeRefOrGetter<Maybe<UrlOptions | undefined>>]",
|
|
1154
1154
|
"description": "",
|
|
1155
1155
|
"optional": false
|
|
1156
1156
|
}],
|
|
1157
|
-
"returnType": "RegleRuleDefinition<\"httpUrl\", string, [options?: UrlOptions], false, boolean, unknown, string, false>",
|
|
1157
|
+
"returnType": "RegleRuleDefinition<\"httpUrl\", string, [options?: UrlOptions | undefined], false, boolean, unknown, string, false>",
|
|
1158
1158
|
"example": "import { httpUrl } from '@regle/rules';\n\nconst { r$ } = useRegle({ bestUrl: '' }, {\n bestUrl: { httpUrl },\n // or to force https protocol\n bestUrl: { httpUrl: httpUrl({ protocol: /^https$/ }) },\n})",
|
|
1159
1159
|
"tags": { "see": "://reglejs.dev/core-concepts/rules/built-in-rules#httpurl Documentation" }
|
|
1160
1160
|
},
|
|
@@ -1289,11 +1289,11 @@ const rawData = {
|
|
|
1289
1289
|
"description": "Validates MAC addresses. Call as a function to specify a custom separator (e.g., `':'` or an empty string for `00ff1122334455`).",
|
|
1290
1290
|
"parameters": [{
|
|
1291
1291
|
"name": "params",
|
|
1292
|
-
"type": "[separator?: MaybeRefOrGetter<string
|
|
1292
|
+
"type": "[separator?: MaybeRefOrGetter<Maybe<string | undefined>>]",
|
|
1293
1293
|
"description": "",
|
|
1294
1294
|
"optional": false
|
|
1295
1295
|
}],
|
|
1296
|
-
"returnType": "RegleRuleDefinition<\"macAddress\", string, [separator?: string], false, boolean, string
|
|
1296
|
+
"returnType": "RegleRuleDefinition<\"macAddress\", string, [separator?: string | undefined], false, boolean, MaybeInput<string>, string, false>",
|
|
1297
1297
|
"example": "import { macAddress } from '@regle/rules';\n\nconst { r$ } = useRegle({ address: '' }, {\n address: {\n macAddress,\n // or with custom separator\n macAddress: macAddress('-')\n },\n})",
|
|
1298
1298
|
"tags": { "see": "://reglejs.dev/core-concepts/rules/built-in-rules#macaddress Documentation" }
|
|
1299
1299
|
},
|
|
@@ -1303,7 +1303,7 @@ const rawData = {
|
|
|
1303
1303
|
"description": "Tests a value against one or more regular expressions.\nReturns `true` if the value is empty or matches **all** provided patterns.",
|
|
1304
1304
|
"parameters": [{
|
|
1305
1305
|
"name": "_value",
|
|
1306
|
-
"type": "string | number",
|
|
1306
|
+
"type": "string | number | null | undefined",
|
|
1307
1307
|
"description": "- The value to test",
|
|
1308
1308
|
"optional": false
|
|
1309
1309
|
}, {
|
|
@@ -1322,7 +1322,7 @@ const rawData = {
|
|
|
1322
1322
|
"description": "Requires a value to be a file with a maximum size.",
|
|
1323
1323
|
"parameters": [{
|
|
1324
1324
|
"name": "params",
|
|
1325
|
-
"type": "[maxSize: MaybeRefOrGetter<number
|
|
1325
|
+
"type": "[maxSize: MaybeRefOrGetter<Maybe<number>>]",
|
|
1326
1326
|
"description": "",
|
|
1327
1327
|
"optional": false
|
|
1328
1328
|
}],
|
|
@@ -1336,11 +1336,11 @@ const rawData = {
|
|
|
1336
1336
|
"description": "Requires the input value to have a maximum specified length, inclusive. Works with arrays, objects and strings.",
|
|
1337
1337
|
"parameters": [{
|
|
1338
1338
|
"name": "params",
|
|
1339
|
-
"type": "[max: MaybeRefOrGetter<number
|
|
1339
|
+
"type": "[max: MaybeRefOrGetter<Maybe<number>>, options?: MaybeRefOrGetter<Maybe<CommonComparisonOptions | undefined>>]",
|
|
1340
1340
|
"description": "",
|
|
1341
1341
|
"optional": false
|
|
1342
1342
|
}],
|
|
1343
|
-
"returnType": "RegleRuleDefinition<\"maxLength\", string | any[] | Record<PropertyKey, any>, [max: number, options?: CommonComparisonOptions], false, boolean, unknown, string |
|
|
1343
|
+
"returnType": "RegleRuleDefinition<\"maxLength\", string | any[] | Record<PropertyKey, any>, [max: number, options?: CommonComparisonOptions | undefined], false, boolean, unknown, string | ... 1 more ... | Record<...>...",
|
|
1344
1344
|
"example": "import { maxLength } from '@regle/rules';\n\nconst maxValue = ref(6);\n\nconst { r$ } = useRegle({ name: '' }, {\n name: {\n maxLength: maxLength(6),\n // or with reactive value\n maxLength: maxLength(maxValue),\n // or with getter\n maxLength: maxLength(() => maxValue.value)\n },\n})",
|
|
1345
1345
|
"tags": { "see": "://reglejs.dev/core-concepts/rules/built-in-rules#maxlength Documentation" }
|
|
1346
1346
|
},
|
|
@@ -1350,11 +1350,11 @@ const rawData = {
|
|
|
1350
1350
|
"description": "Requires a field to have a specified maximum numeric value.",
|
|
1351
1351
|
"parameters": [{
|
|
1352
1352
|
"name": "params",
|
|
1353
|
-
"type": "[max: MaybeRefOrGetter<string | number
|
|
1353
|
+
"type": "[max: MaybeRefOrGetter<Maybe<string | number>>, options?: MaybeRefOrGetter<Maybe<CommonComparisonOptions | undefined>>]",
|
|
1354
1354
|
"description": "",
|
|
1355
1355
|
"optional": false
|
|
1356
1356
|
}],
|
|
1357
|
-
"returnType": "RegleRuleDefinition<\"maxValue\", string | number, [max: string | number, options?: CommonComparisonOptions], false, boolean, string | number
|
|
1357
|
+
"returnType": "RegleRuleDefinition<\"maxValue\", string | number, [max: string | number, options?: CommonComparisonOptions | undefined], false, boolean, MaybeInput<string | number>, string | number, false>",
|
|
1358
1358
|
"example": "import { maxValue } from '@regle/rules';\n\nconst maxCount = ref(6);\n\nconst { r$ } = useRegle({ count: 0 }, {\n count: {\n maxValue: maxValue(6),\n // or with options\n maxValue: maxValue(maxCount, { allowEqual: false }),\n // or with getter\n maxValue: maxValue(() => maxCount.value)\n },\n})",
|
|
1359
1359
|
"tags": { "see": "://reglejs.dev/core-concepts/rules/built-in-rules#maxvalue Documentation" }
|
|
1360
1360
|
},
|
|
@@ -1364,11 +1364,11 @@ const rawData = {
|
|
|
1364
1364
|
"description": "Requires a value to be a file with a minimum size.",
|
|
1365
1365
|
"parameters": [{
|
|
1366
1366
|
"name": "params",
|
|
1367
|
-
"type": "[minSize: MaybeRefOrGetter<number
|
|
1367
|
+
"type": "[minSize: MaybeRefOrGetter<Maybe<number>>]",
|
|
1368
1368
|
"description": "",
|
|
1369
1369
|
"optional": false
|
|
1370
1370
|
}],
|
|
1371
|
-
"returnType": "RegleRuleDefinition<\"minFileSize\", File, [minSize: number], false, true | { $valid: boolean; fileSize: number; }, File
|
|
1371
|
+
"returnType": "RegleRuleDefinition<\"minFileSize\", File, [minSize: number], false, true | { $valid: boolean; fileSize: number; }, MaybeInput<File>, File, false>",
|
|
1372
1372
|
"example": "import { type InferInput } from '@regle/core';\nimport { minFileSize } from '@regle/rules';\n\nconst {r$} = useRegle({ file: null as File | null }, {\n file: { minFileSize: minFileSize(1_000_000) }, // 1 MB\n})",
|
|
1373
1373
|
"tags": { "see": "://reglejs.dev/core-concepts/rules/built-in-rules#minfilesize Documentation" }
|
|
1374
1374
|
},
|
|
@@ -1378,11 +1378,11 @@ const rawData = {
|
|
|
1378
1378
|
"description": "Requires the input value to have a minimum specified length, inclusive. Works with arrays, objects and strings.",
|
|
1379
1379
|
"parameters": [{
|
|
1380
1380
|
"name": "params",
|
|
1381
|
-
"type": "[min: MaybeRefOrGetter<number
|
|
1381
|
+
"type": "[min: MaybeRefOrGetter<Maybe<number>>, options?: MaybeRefOrGetter<Maybe<CommonComparisonOptions | undefined>>]",
|
|
1382
1382
|
"description": "",
|
|
1383
1383
|
"optional": false
|
|
1384
1384
|
}],
|
|
1385
|
-
"returnType": "RegleRuleDefinition<\"minLength\", string | any[] | Record<PropertyKey, any>, [min: number, options?: CommonComparisonOptions], false, boolean,
|
|
1385
|
+
"returnType": "RegleRuleDefinition<\"minLength\", string | any[] | Record<PropertyKey, any>, [min: number, options?: CommonComparisonOptions | undefined], false, boolean, MaybeInput<...>, string | ... 1 more ... | Rec...",
|
|
1386
1386
|
"example": "import { minLength } from '@regle/rules';\n\nconst minValue = ref(6);\n\nconst { r$ } = useRegle({ name: '' }, {\n name: {\n minLength: minLength(6),\n // or with reactive value\n minLength: minLength(minValue),\n // or with getter\n minLength: minLength(() => minValue.value)\n },\n})",
|
|
1387
1387
|
"tags": { "see": "://reglejs.dev/core-concepts/rules/built-in-rules#minlength Documentation" }
|
|
1388
1388
|
},
|
|
@@ -1392,11 +1392,11 @@ const rawData = {
|
|
|
1392
1392
|
"description": "Requires a field to have a specified minimum numeric value.",
|
|
1393
1393
|
"parameters": [{
|
|
1394
1394
|
"name": "params",
|
|
1395
|
-
"type": "[min: MaybeRefOrGetter<string | number
|
|
1395
|
+
"type": "[min: MaybeRefOrGetter<Maybe<string | number>>, options?: MaybeRefOrGetter<Maybe<CommonComparisonOptions | undefined>>]",
|
|
1396
1396
|
"description": "",
|
|
1397
1397
|
"optional": false
|
|
1398
1398
|
}],
|
|
1399
|
-
"returnType": "RegleRuleDefinition<\"minValue\", string | number, [min: string | number, options?: CommonComparisonOptions], false, boolean, string | number
|
|
1399
|
+
"returnType": "RegleRuleDefinition<\"minValue\", string | number, [min: string | number, options?: CommonComparisonOptions | undefined], false, boolean, MaybeInput<string | number>, string | number, false>",
|
|
1400
1400
|
"example": "import { minValue } from '@regle/rules';\n\nconst minCount = ref(6);\n\nconst { r$ } = useRegle({ count: 0 }, {\n count: {\n minValue: minValue(6),\n // or with options\n minValue: minValue(minCount, { allowEqual: false }),\n // or with getter\n minValue: minValue(() => minCount.value)\n },\n})",
|
|
1401
1401
|
"tags": { "see": "://reglejs.dev/core-concepts/rules/built-in-rules#minvalue Documentation" }
|
|
1402
1402
|
},
|
|
@@ -1425,7 +1425,7 @@ const rawData = {
|
|
|
1425
1425
|
"optional": false
|
|
1426
1426
|
}, {
|
|
1427
1427
|
"name": "message",
|
|
1428
|
-
"type": "RegleRuleDefinitionWithMetadataProcessor<TValue, RegleRuleMetadataConsumer<TValue, TParams, TMetadata>, string | string[]>",
|
|
1428
|
+
"type": "RegleRuleDefinitionWithMetadataProcessor<TValue, RegleRuleMetadataConsumer<TValue, TParams, TMetadata>, string | string[]> | undefined",
|
|
1429
1429
|
"description": "- Optional custom error message",
|
|
1430
1430
|
"optional": true
|
|
1431
1431
|
}],
|
|
@@ -1461,7 +1461,7 @@ const rawData = {
|
|
|
1461
1461
|
"description": "- Array of allowed values",
|
|
1462
1462
|
"optional": false
|
|
1463
1463
|
}],
|
|
1464
|
-
"returnType": "RegleRuleDefinition<\"oneOf\", TEnum[keyof TEnum], [options: TEnum], false, boolean, TEnum[keyof TEnum]
|
|
1464
|
+
"returnType": "RegleRuleDefinition<\"oneOf\", TEnum[keyof TEnum], [options: TEnum], false, boolean, MaybeInput<TEnum[keyof TEnum]>, string | number, boolean>",
|
|
1465
1465
|
"example": "import { oneOf } from '@regle/rules';\n\nconst { r$ } = useRegle({ aliment: 'Fish' }, {\n aliment: {\n oneOf: oneOf(['Fish', 'Meat', 'Bone'])\n },\n})",
|
|
1466
1466
|
"tags": { "see": "://reglejs.dev/core-concepts/rules/built-in-rules#oneof Documentation" }
|
|
1467
1467
|
},
|
|
@@ -1499,11 +1499,11 @@ const rawData = {
|
|
|
1499
1499
|
"description": "Checks if the value matches one or more regular expressions.",
|
|
1500
1500
|
"parameters": [{
|
|
1501
1501
|
"name": "params",
|
|
1502
|
-
"type": "[regexp: MaybeRefOrGetter<RegExp | readonly RegExp[]
|
|
1502
|
+
"type": "[regexp: MaybeRefOrGetter<Maybe<RegExp | readonly RegExp[]>>]",
|
|
1503
1503
|
"description": "",
|
|
1504
1504
|
"optional": false
|
|
1505
1505
|
}],
|
|
1506
|
-
"returnType": "RegleRuleDefinition<\"regex\", string | number, [regexp: RegExp | readonly RegExp[]], false, boolean, string | number
|
|
1506
|
+
"returnType": "RegleRuleDefinition<\"regex\", string | number, [regexp: RegExp | readonly RegExp[]], false, boolean, MaybeInput<string | number>, string | number, false>",
|
|
1507
1507
|
"example": "import { regex } from '@regle/rules';\n\nconst { r$ } = useRegle({ name: '' }, {\n name: {\n regex: regex(/^foo/),\n // or with multiple patterns\n regex: regex([/^bar/, /baz$/]),\n },\n})",
|
|
1508
1508
|
"tags": { "see": "://reglejs.dev/core-concepts/rules/built-in-rules#regex Documentation" }
|
|
1509
1509
|
},
|
|
@@ -1522,7 +1522,7 @@ const rawData = {
|
|
|
1522
1522
|
"description": "Requires non-empty data, only if provided data property, ref, or a function resolves to `true`.",
|
|
1523
1523
|
"parameters": [{
|
|
1524
1524
|
"name": "params",
|
|
1525
|
-
"type": "[condition: MaybeRefOrGetter<boolean
|
|
1525
|
+
"type": "[condition: MaybeRefOrGetter<Maybe<boolean>>]",
|
|
1526
1526
|
"description": "",
|
|
1527
1527
|
"optional": false
|
|
1528
1528
|
}],
|
|
@@ -1536,7 +1536,7 @@ const rawData = {
|
|
|
1536
1536
|
"description": "Requires non-empty data, only if provided data property, ref, or a function resolves to `false`.",
|
|
1537
1537
|
"parameters": [{
|
|
1538
1538
|
"name": "params",
|
|
1539
|
-
"type": "[condition: MaybeRefOrGetter<boolean
|
|
1539
|
+
"type": "[condition: MaybeRefOrGetter<Maybe<boolean>>]",
|
|
1540
1540
|
"description": "",
|
|
1541
1541
|
"optional": false
|
|
1542
1542
|
}],
|
|
@@ -1555,11 +1555,11 @@ const rawData = {
|
|
|
1555
1555
|
"optional": false
|
|
1556
1556
|
}, {
|
|
1557
1557
|
"name": "otherName",
|
|
1558
|
-
"type": "MaybeRefOrGetter<string>",
|
|
1558
|
+
"type": "MaybeRefOrGetter<string> | undefined",
|
|
1559
1559
|
"description": "- Optional name for the other field (used in error message)",
|
|
1560
1560
|
"optional": true
|
|
1561
1561
|
}],
|
|
1562
|
-
"returnType": "RegleRuleDefinition<\"sameAs\", TTarget, [target: TTarget, otherName?: string], false, boolean, TTarget extends infer M ? M : TTarget
|
|
1562
|
+
"returnType": "RegleRuleDefinition<\"sameAs\", TTarget, [target: TTarget, otherName?: string | undefined], false, boolean, TTarget extends MaybeInput<infer M> ? M : MaybeInput<TTarget>, unknown, false>",
|
|
1563
1563
|
"example": "import { sameAs } from '@regle/rules';\n\nconst form = ref({\n password: '',\n confirmPassword: '',\n});\n\nconst { r$ } = useRegle(form, {\n confirmPassword: {\n sameAs: sameAs(() => form.value.password),\n }\n})",
|
|
1564
1564
|
"tags": { "see": "://reglejs.dev/core-concepts/rules/built-in-rules#sameas Documentation" }
|
|
1565
1565
|
},
|
|
@@ -1569,11 +1569,11 @@ const rawData = {
|
|
|
1569
1569
|
"description": "Checks if the string starts with the specified substring.",
|
|
1570
1570
|
"parameters": [{
|
|
1571
1571
|
"name": "params",
|
|
1572
|
-
"type": "[part: MaybeRefOrGetter<string
|
|
1572
|
+
"type": "[part: MaybeRefOrGetter<Maybe<MaybeInput<string>>>]",
|
|
1573
1573
|
"description": "",
|
|
1574
1574
|
"optional": false
|
|
1575
1575
|
}],
|
|
1576
|
-
"returnType": "RegleRuleDefinition<\"startsWith\", string, [part: string], false, boolean, string
|
|
1576
|
+
"returnType": "RegleRuleDefinition<\"startsWith\", string, [part: MaybeInput<string>], false, boolean, MaybeInput<string>, string, false>",
|
|
1577
1577
|
"example": "import { startsWith } from '@regle/rules';\n\nconst { r$ } = useRegle({ bestLib: '' }, {\n bestLib: {\n startsWith: startsWith('regle')\n },\n})",
|
|
1578
1578
|
"tags": { "see": "://reglejs.dev/core-concepts/rules/built-in-rules#startswith Documentation" }
|
|
1579
1579
|
},
|
|
@@ -1592,7 +1592,7 @@ const rawData = {
|
|
|
1592
1592
|
"description": "Coerces any string, number, or Date value into a `Date` using the `Date` constructor.",
|
|
1593
1593
|
"parameters": [{
|
|
1594
1594
|
"name": "argument",
|
|
1595
|
-
"type": "string | number | Date",
|
|
1595
|
+
"type": "string | number | Date | null | undefined",
|
|
1596
1596
|
"description": "- The value to convert to a Date",
|
|
1597
1597
|
"optional": false
|
|
1598
1598
|
}],
|
|
@@ -1638,11 +1638,11 @@ const rawData = {
|
|
|
1638
1638
|
"description": "Validates URLs.",
|
|
1639
1639
|
"parameters": [{
|
|
1640
1640
|
"name": "params",
|
|
1641
|
-
"type": "[options?: MaybeRefOrGetter<UrlOptions
|
|
1641
|
+
"type": "[options?: MaybeRefOrGetter<Maybe<UrlOptions | undefined>>]",
|
|
1642
1642
|
"description": "",
|
|
1643
1643
|
"optional": false
|
|
1644
1644
|
}],
|
|
1645
|
-
"returnType": "RegleRuleDefinition<\"url\", string, [options?: UrlOptions], false, boolean, unknown, string, false>",
|
|
1645
|
+
"returnType": "RegleRuleDefinition<\"url\", string, [options?: UrlOptions | undefined], false, boolean, unknown, string, false>",
|
|
1646
1646
|
"example": "import { url } from '@regle/rules';\n\nconst { r$ } = useRegle({ bestUrl: '' }, {\n bestUrl: { url },\n // or with custom protocol validation\n bestUrl: { url: url({ protocol: /^https?$/ }) },\n})",
|
|
1647
1647
|
"tags": { "see": "://reglejs.dev/core-concepts/rules/built-in-rules#url Documentation" }
|
|
1648
1648
|
},
|
|
@@ -1657,7 +1657,7 @@ const rawData = {
|
|
|
1657
1657
|
"optional": false
|
|
1658
1658
|
}, {
|
|
1659
1659
|
"name": "depsArray",
|
|
1660
|
-
"type": "[...TParams]",
|
|
1660
|
+
"type": "[...TParams] | undefined",
|
|
1661
1661
|
"description": "- Array of reactive dependencies (refs or getters)",
|
|
1662
1662
|
"optional": true
|
|
1663
1663
|
}],
|
|
@@ -1744,7 +1744,7 @@ const rawData = {
|
|
|
1744
1744
|
"description": "Create a scoped validation system for schema-based validation.\nSimilar to `createScopedUseRegle` but for use with Standard Schema libraries.",
|
|
1745
1745
|
"parameters": [{
|
|
1746
1746
|
"name": "options",
|
|
1747
|
-
"type": "CreateScopedUseRegleSchemaOptions<TCustomRegle, TAsRecord>",
|
|
1747
|
+
"type": "CreateScopedUseRegleSchemaOptions<TCustomRegle, TAsRecord> | undefined",
|
|
1748
1748
|
"description": "- Configuration options",
|
|
1749
1749
|
"optional": true
|
|
1750
1750
|
}],
|
|
@@ -1786,7 +1786,7 @@ const rawData = {
|
|
|
1786
1786
|
"description": "",
|
|
1787
1787
|
"parameters": [{
|
|
1788
1788
|
"name": "namespace",
|
|
1789
|
-
"type": "MaybeRefOrGetter<string | string[]>",
|
|
1789
|
+
"type": "MaybeRefOrGetter<string | string[]> | undefined",
|
|
1790
1790
|
"description": "",
|
|
1791
1791
|
"optional": true
|
|
1792
1792
|
}],
|
|
@@ -1800,11 +1800,11 @@ const rawData = {
|
|
|
1800
1800
|
"description": "`useRegleSchema` enables validation using Standard Schema compatible libraries\nlike Zod, Valibot, or ArkType.",
|
|
1801
1801
|
"parameters": [{
|
|
1802
1802
|
"name": "params",
|
|
1803
|
-
"type": "[state: MaybeRef<DeepPartial<NoInferLegacy<TState>>> | DeepReactiveState<DeepPartial<NoInferLegacy<TState>>>, rulesFactory: MaybeRef<...>, options
|
|
1803
|
+
"type": "[state: MaybeRef<DeepPartial<NoInferLegacy<TState>>> | DeepReactiveState<DeepPartial<NoInferLegacy<TState>>>, rulesFactory: MaybeRef<...>, options?: useRegleSchemaFnOptions<...> | undefined]",
|
|
1804
1804
|
"description": "",
|
|
1805
1805
|
"optional": false
|
|
1806
1806
|
}],
|
|
1807
|
-
"returnType": "NonNullable<TState> extends PrimitiveTypes ? { r$: Raw<Omit<RegleCommonStatus<PrimitiveTypes & TState & {}, Record<string, any>>, \"$pending\" | ... 3 more ... | \"$originalValue\"> & { ...; } & {
|
|
1807
|
+
"returnType": "NonNullable<TState> extends PrimitiveTypes ? { r$: Raw<Omit<RegleCommonStatus<PrimitiveTypes & TState & {}, Record<string, any>>, \"$pending\" | ... 3 more ... | \"$originalValue\"> & { ...; } & {} & { .....",
|
|
1808
1808
|
"example": "import { useRegleSchema } from '@regle/schemas';\nimport * as v from 'valibot';\n\n// With Valibot\nconst { r$ } = useRegleSchema(\n { name: '', email: '' },\n v.object({\n name: v.pipe(v.string(), v.minLength(3)),\n email: v.pipe(v.string(), v.email())\n })\n);\n\n// With Zod\nimport { z } from 'zod';\n\nconst { r$ } = useRegleSchema(\n { name: '' },\n z.object({\n name: z.string().min(3)\n })\n);\n\n// Access validation state\nr$.$valid // Whether all validations pass\nr$.$value // The current form values\nr$.name.$errors // Errors for the name field",
|
|
1809
1809
|
"tags": { "see": "://reglejs.dev/integrations/schemas-libraries Documentation" }
|
|
1810
1810
|
},
|
|
@@ -1814,11 +1814,11 @@ const rawData = {
|
|
|
1814
1814
|
"description": "",
|
|
1815
1815
|
"parameters": [{
|
|
1816
1816
|
"name": "params",
|
|
1817
|
-
"type": "[state: MaybeRef<DeepPartial<NoInferLegacy<TState>>> | DeepReactiveState<DeepPartial<NoInferLegacy<TState>>>, rulesFactory: MaybeRef<...>, options
|
|
1817
|
+
"type": "[state: MaybeRef<DeepPartial<NoInferLegacy<TState>>> | DeepReactiveState<DeepPartial<NoInferLegacy<TState>>>, rulesFactory: MaybeRef<...>, options?: useRegleSchemaFnOptions<...> | undefined]",
|
|
1818
1818
|
"description": "",
|
|
1819
1819
|
"optional": false
|
|
1820
1820
|
}],
|
|
1821
|
-
"returnType": "NonNullable<TState> extends PrimitiveTypes ? { r$: Raw<Omit<RegleCommonStatus<PrimitiveTypes & TState & {}, Record<string, any>>, \"$pending\" | ... 3 more ... | \"$originalValue\"> & { ...; } & {
|
|
1821
|
+
"returnType": "NonNullable<TState> extends PrimitiveTypes ? { r$: Raw<Omit<RegleCommonStatus<PrimitiveTypes & TState & {}, Record<string, any>>, \"$pending\" | ... 3 more ... | \"$originalValue\"> & { ...; } & {} & { .....",
|
|
1822
1822
|
"example": "",
|
|
1823
1823
|
"tags": {}
|
|
1824
1824
|
},
|
|
@@ -2002,7 +2002,7 @@ function searchApi(query) {
|
|
|
2002
2002
|
});
|
|
2003
2003
|
return results;
|
|
2004
2004
|
}
|
|
2005
|
-
var version = "1.21.
|
|
2005
|
+
var version = "1.21.5";
|
|
2006
2006
|
let posthogClient = null;
|
|
2007
2007
|
posthogClient = new PostHog("phc_kqgJoylCpKkGkkRGxb4MyN2mViehoQcUFEGwVkk4l8E", {
|
|
2008
2008
|
host: "https://eu.i.posthog.com",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@regle/mcp-server",
|
|
3
|
-
"version": "1.21.
|
|
3
|
+
"version": "1.21.5",
|
|
4
4
|
"description": "MCP Server for Regle",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -51,11 +51,11 @@
|
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/node": "24.12.0",
|
|
54
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
54
|
+
"@typescript/native-preview": "7.0.0-dev.20260331.1",
|
|
55
55
|
"dotenv": "17.3.1",
|
|
56
|
-
"tsdown": "0.21.
|
|
56
|
+
"tsdown": "0.21.7",
|
|
57
57
|
"tsx": "4.21.0",
|
|
58
|
-
"typescript": "
|
|
58
|
+
"typescript": "6.0.2"
|
|
59
59
|
},
|
|
60
60
|
"scripts": {
|
|
61
61
|
"typecheck": "tsgo --noEmit",
|