@mars-stack/ui 8.0.3 → 8.0.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.
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import '../chunk-MLKGABMK.js';
3
- import { useState, useRef, useCallback } from 'react';
3
+ import { useState, useRef, useCallback, useMemo } from 'react';
4
4
 
5
5
  function useZodForm({
6
6
  schema,
@@ -127,7 +127,10 @@ function useZodForm({
127
127
  },
128
128
  [values, handleChange, handleBlur, touched, errors]
129
129
  );
130
- const isValid = Object.keys(errors).length === 0;
130
+ const isValid = useMemo(
131
+ () => Object.keys(validateWithValues(values)).length === 0,
132
+ [values, validateWithValues]
133
+ );
131
134
  return {
132
135
  values,
133
136
  errors,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mars-stack/ui",
3
- "version": "8.0.3",
3
+ "version": "8.0.5",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -50,7 +50,7 @@
50
50
  "prepublishOnly": "yarn build"
51
51
  },
52
52
  "peerDependencies": {
53
- "@mars-stack/core": ">=8.0.3",
53
+ "@mars-stack/core": ">=8.0.5",
54
54
  "clsx": ">=2",
55
55
  "next": ">=14",
56
56
  "react": ">=18"
@@ -68,11 +68,11 @@
68
68
  "@types/react-dom": "^19.2.3",
69
69
  "clsx": "^2.1.1",
70
70
  "jsdom": "^29.0.1",
71
- "next": "^16.2.1",
71
+ "next": "^16.2.2",
72
72
  "react": "^19.0.0",
73
73
  "react-dom": "^19.2.4",
74
74
  "tsup": "^8.0.0",
75
- "typescript": "^5.7.0",
75
+ "typescript": "^6.0.2",
76
76
  "vitest": "^4.1.2",
77
77
  "zod": "^4.3.6"
78
78
  }