@codeleap/form 5.0.7 → 5.0.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codeleap/form",
3
- "version": "5.0.7",
3
+ "version": "5.0.9",
4
4
  "main": "src/index.ts",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {
@@ -9,9 +9,9 @@
9
9
  "directory": "packages/form"
10
10
  },
11
11
  "devDependencies": {
12
- "@codeleap/config": "5.0.7",
13
- "@codeleap/types": "5.0.7",
14
- "@codeleap/store": "5.0.7",
12
+ "@codeleap/config": "5.0.9",
13
+ "@codeleap/types": "5.0.9",
14
+ "@codeleap/store": "5.0.9",
15
15
  "zod": "3.23.8",
16
16
  "ts-node-dev": "1.1.8"
17
17
  },
@@ -20,8 +20,8 @@
20
20
  "playground": "bun src/test.ts"
21
21
  },
22
22
  "peerDependencies": {
23
- "@codeleap/types": "5.0.7",
24
- "@codeleap/store": "5.0.7",
23
+ "@codeleap/types": "5.0.9",
24
+ "@codeleap/store": "5.0.9",
25
25
  "zod": "*",
26
26
  "react": "18.2.0",
27
27
  "typescript": "5.5.2",
package/package.json.bak CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codeleap/form",
3
- "version": "5.0.7",
3
+ "version": "5.0.9",
4
4
  "main": "src/index.ts",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {
@@ -12,11 +12,13 @@ type Props = {
12
12
 
13
13
  type NumberFieldOptions<Validate extends NumberValidator> = FieldOptions<number | number[], Validate> & Props
14
14
 
15
+ const MAX_VALID_DIGITS = 1000000000000000 // maximum number of digits that the input supports to perform operations
16
+
15
17
  export class NumberField<Validate extends NumberValidator> extends Field<number | number[], Validate> {
16
18
  _type = "NUMBER"
17
19
 
18
20
  constructor(options: NumberFieldOptions<Validate>) {
19
- const { min = 0, max = 100000, defaultValue, ...others } = options
21
+ const { min = 0, max = MAX_VALID_DIGITS, defaultValue, ...others } = options
20
22
 
21
23
  const isMultiple = Array.isArray(defaultValue)
22
24