{"_id":"@aireact/smartform","_rev":"4-1df3beb44ffe219f59d5d32b82481861","name":"@aireact/smartform","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"@aireact/smartform","version":"1.0.0","keywords":["react","form","validation","ai","smart-form","auto-correction"],"author":{"name":"reachbrt"},"license":"MIT","_id":"@aireact/smartform@1.0.0","maintainers":[{"name":"aivue","email":"reachbrt@gmail.com"}],"dist":{"shasum":"4709d67dc45616b8f6541b2e75189b47a7e6c6ce","tarball":"https://registry.npmjs.org/@aireact/smartform/-/smartform-1.0.0.tgz","fileCount":10,"integrity":"sha512-b9raNfnM0Jr80ZUsUBMBhNlydzNy+JffVVKbYgoHSXwNVLDhWGpR+LTBPku1XlcffgapwC9cL8ZxZSoU2ylBRw==","signatures":[{"sig":"MEUCIE6n1d9VxF0uMwEtpJXdatxt2/oenyRLuXdvKZsG7J+MAiEAwgwAB+WGErIDJrRubTPA+xMsMV84U+z2eglHdfi1muM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":114465},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./dist/smartform.css":"./dist/smartform.css"},"gitHead":"3578555f09dd610edce51f84a4d6d27a6b2146bd","scripts":{"dev":"vite build --watch","build":"tsc && vite build"},"_npmUser":{"name":"aivue","email":"reachbrt@gmail.com"},"_npmVersion":"10.9.2","description":"AI form validation & auto-correction for React","directories":{},"sideEffects":["*.css"],"_nodeVersion":"22.14.0","dependencies":{"@aireact/core":"*"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.0.10","typescript":"^5.3.3","@types/react":"^18.2.45","vite-plugin-dts":"^3.7.0","@types/react-dom":"^18.2.18","@vitejs/plugin-react":"^4.2.1"},"peerDependencies":{"react":"^18.0.0","react-dom":"^18.0.0"},"_npmOperationalInternal":{"tmp":"tmp/smartform_1.0.0_1765693673966_0.27941394747209847","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@aireact/smartform","version":"1.0.1","keywords":["react","form","validation","ai","smart-form","auto-correction"],"author":{"name":"reachbrt"},"license":"MIT","_id":"@aireact/smartform@1.0.1","maintainers":[{"name":"aivue","email":"reachbrt@gmail.com"}],"dist":{"shasum":"7b7a4d0151f3481441ae52a96e4c92f0078e0c30","tarball":"https://registry.npmjs.org/@aireact/smartform/-/smartform-1.0.1.tgz","fileCount":11,"integrity":"sha512-I1E2ZVQ+vZ1WZkDjmmNyC29D1cWIZX0x1oVBG8168R6d7FccCIQZBMpUvQyMEDUbh4lkA9mdVIfDlqw9vDdiWA==","signatures":[{"sig":"MEUCIQCpD9odkp1V0eVPXUOKUWCqmBlVHHtnkzYxorBxZKYfGgIgZ3FmsCxL2e0GUukYWe5vmamRjS6HX/mtSm8G2d/yFQk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":117572},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./dist/smartform.css":"./dist/smartform.css"},"gitHead":"6857364eda430b8e9222514d3a5eeb6a5175c5b7","scripts":{"dev":"vite build --watch","build":"tsc && vite build"},"_npmUser":{"name":"aivue","email":"reachbrt@gmail.com"},"_npmVersion":"10.9.2","description":"AI form validation & auto-correction for React","directories":{},"sideEffects":["*.css"],"_nodeVersion":"22.14.0","dependencies":{"@aireact/core":"*"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.0.10","typescript":"^5.3.3","@types/react":"^18.2.45","vite-plugin-dts":"^3.7.0","@types/react-dom":"^18.2.18","@vitejs/plugin-react":"^4.2.1"},"peerDependencies":{"react":"^18.0.0","react-dom":"^18.0.0"},"_npmOperationalInternal":{"tmp":"tmp/smartform_1.0.1_1765694952856_0.08892060567455795","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@aireact/smartform","version":"1.0.2","keywords":["react","form","validation","ai","smart-form","auto-correction"],"author":{"name":"reachbrt"},"license":"MIT","_id":"@aireact/smartform@1.0.2","maintainers":[{"name":"aivue","email":"reachbrt@gmail.com"}],"dist":{"shasum":"349ff242100baf7a90b2f0c709266a8a963c8e32","tarball":"https://registry.npmjs.org/@aireact/smartform/-/smartform-1.0.2.tgz","fileCount":11,"integrity":"sha512-PLARNqZI+1Mw/2Oa1oK4ueoBK1RIB8IXjtiyWe+Ui/QiIJBGZ0ZoCD+Y3drGLDiBzukS6Y3E2IoHaRhiQ1bSBw==","signatures":[{"sig":"MEUCIQD6zNFeqkKFoLPAE0HDVuyov7pXqOvy/u0Hn6maghzSsAIgE6MlsaUHlTEP7le3+int1sE0a7c5/ORQP4XXtTOzu4k=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":117572},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./dist/smartform.css":"./dist/smartform.css"},"gitHead":"6857364eda430b8e9222514d3a5eeb6a5175c5b7","scripts":{"dev":"vite build --watch","build":"tsc && vite build"},"_npmUser":{"name":"aivue","email":"reachbrt@gmail.com"},"_npmVersion":"10.9.2","description":"AI form validation & auto-correction for React","directories":{},"sideEffects":["*.css"],"_nodeVersion":"22.14.0","dependencies":{"@aireact/core":"*"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.0.10","typescript":"^5.3.3","@types/react":"^18.2.45","vite-plugin-dts":"^3.7.0","@types/react-dom":"^18.2.18","@vitejs/plugin-react":"^4.2.1"},"peerDependencies":{"react":"^18.0.0","react-dom":"^18.0.0"},"_npmOperationalInternal":{"tmp":"tmp/smartform_1.0.2_1765696312151_0.777423422216525","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@aireact/smartform","version":"1.0.3","description":"AI form validation & auto-correction for React","type":"module","main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"import":"./dist/index.js","types":"./dist/index.d.ts"},"./dist/smartform.css":"./dist/smartform.css"},"scripts":{"build":"tsc && vite build","dev":"vite build --watch"},"peerDependencies":{"react":"^18.0.0","react-dom":"^18.0.0"},"dependencies":{"@aireact/core":"*"},"devDependencies":{"@types/react":"^18.2.45","@types/react-dom":"^18.2.18","@vitejs/plugin-react":"^4.2.1","typescript":"^5.3.3","vite":"^5.0.10","vite-plugin-dts":"^3.7.0"},"keywords":["react","form","validation","ai","smart-form","auto-correction"],"author":{"name":"reachbrt"},"license":"MIT","sideEffects":["*.css"],"_id":"@aireact/smartform@1.0.3","gitHead":"eb0d57118209adc317afca9ec14db9074a14377b","_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-Tq95ViX4j/v4HdN+PFdYUGTAWBifcYzjQU+jZ53U/sDbsCOMyylG+tRpp4V4R2zrNC3nxgBN8BNxjvKWCMCoIQ==","shasum":"06d5255579555e714f98649e18e0d1671f003816","tarball":"https://registry.npmjs.org/@aireact/smartform/-/smartform-1.0.3.tgz","fileCount":11,"unpackedSize":138268,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDNf2wEj75leb3AiBJCJvS853zD3dosg/rTkfuc6jFdBAiBvdxYRz5rMzihUbxO0O1wy44A0oZ2Yc7L2YcXGGoOb7g=="}]},"_npmUser":{"name":"aivue","email":"reachbrt@gmail.com"},"directories":{},"maintainers":[{"name":"aivue","email":"reachbrt@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/smartform_1.0.3_1766466244665_0.25804401080822315"},"_hasShrinkwrap":false}},"time":{"created":"2025-12-14T06:27:53.886Z","modified":"2025-12-23T05:04:05.062Z","1.0.0":"2025-12-14T06:27:54.114Z","1.0.1":"2025-12-14T06:49:13.002Z","1.0.2":"2025-12-14T07:11:52.310Z","1.0.3":"2025-12-23T05:04:04.830Z"},"author":{"name":"reachbrt"},"license":"MIT","keywords":["react","form","validation","ai","smart-form","auto-correction"],"description":"AI form validation & auto-correction for React","maintainers":[{"name":"aivue","email":"reachbrt@gmail.com"}],"readme":"# @aireact/smartform\n\n🚀 **AI-Powered Form Validation for React**\n\nIntelligent form validation and auto-completion powered by AI for smarter user experiences.\n\n<p>\n  <a href=\"https://www.npmjs.com/package/@aireact/smartform\"><img src=\"https://img.shields.io/npm/v/@aireact/smartform.svg?style=flat-square\" alt=\"npm version\"></a>\n  <a href=\"https://www.npmjs.com/package/@aireact/smartform\"><img src=\"https://img.shields.io/npm/dm/@aireact/smartform\" alt=\"npm downloads\"></a>\n  <a href=\"https://github.com/reachbrt/AIReact/blob/main/LICENSE\"><img src=\"https://img.shields.io/npm/l/@aireact/smartform.svg?style=flat-square\" alt=\"MIT License\"></a>\n  <a href=\"https://github.com/reachbrt/AIReact\"><img src=\"https://img.shields.io/github/stars/reachbrt/AIReact?style=social\" alt=\"GitHub Stars\"></a>\n</p>\n\n## ✨ Features\n\n- **🧠 AI Validation**: Intelligent field validation using AI\n- **📝 Auto-Complete**: Smart field suggestions and completion\n- **🎯 Context-Aware**: Understands form context for better validation\n- **⚡ Real-time**: Instant feedback as users type\n- **🎨 Customizable**: Fully stylable components\n- **🔧 TypeScript**: Full TypeScript support\n\n## 📦 Installation\n\n```bash\nnpm install @aireact/smartform @aireact/core\n```\n\n## 🚀 Quick Start\n\n```tsx\nimport { SmartForm, useSmartValidation } from '@aireact/smartform';\nimport '@aireact/smartform/style.css';\n\nfunction App() {\n  return (\n    <SmartForm\n      provider=\"openai\"\n      apiKey={process.env.REACT_APP_OPENAI_API_KEY}\n      onSubmit={(data) => console.log('Form data:', data)}\n    >\n      <SmartForm.Field name=\"email\" type=\"email\" label=\"Email\" />\n      <SmartForm.Field name=\"phone\" type=\"tel\" label=\"Phone\" />\n      <SmartForm.Field name=\"address\" type=\"text\" label=\"Address\" />\n      <button type=\"submit\">Submit</button>\n    </SmartForm>\n  );\n}\n```\n\n### Using the Hook\n\n```tsx\nimport { useSmartValidation } from '@aireact/smartform';\n\nfunction CustomForm() {\n  const {\n    validate,\n    errors,\n    isValidating,\n    suggestions\n  } = useSmartValidation({\n    provider: 'openai',\n    apiKey: process.env.REACT_APP_OPENAI_API_KEY,\n    context: 'user registration form'\n  });\n\n  const handleBlur = async (field, value) => {\n    await validate(field, value);\n  };\n\n  return (\n    <form>\n      <input\n        name=\"email\"\n        onBlur={(e) => handleBlur('email', e.target.value)}\n      />\n      {errors.email && <span className=\"error\">{errors.email}</span>}\n      {suggestions.email && <span className=\"hint\">{suggestions.email}</span>}\n    </form>\n  );\n}\n```\n\n## 📖 Props\n\n| Prop | Type | Default | Description |\n|------|------|---------|-------------|\n| `provider` | string | - | AI provider |\n| `apiKey` | string | - | API key |\n| `context` | string | - | Form context |\n| `onSubmit` | function | - | Submit handler |\n| `validateOnBlur` | boolean | true | Validate on blur |\n| `showSuggestions` | boolean | true | Show AI suggestions |\n\n## 🎨 Customization\n\n```css\n:root {\n  --aireact-form-error: #f44336;\n  --aireact-form-success: #4caf50;\n  --aireact-form-hint: #2196f3;\n}\n```\n\n## 📦 Related Packages\n\n### React (@aireact)\n- [@aireact/core](https://www.npmjs.com/package/@aireact/core) - Core AI Client\n- [@aireact/autosuggest](https://www.npmjs.com/package/@aireact/autosuggest) - AI Suggestions\n- [@aireact/predictive-input](https://www.npmjs.com/package/@aireact/predictive-input) - Predictive Text\n- [@aireact/chatbot](https://www.npmjs.com/package/@aireact/chatbot) - AI Chat Components\n\n### Vue.js (@aivue)\n- [@aivue/smartform](https://www.npmjs.com/package/@aivue/smartform) - Vue SmartForm\n- [@aivue/core](https://www.npmjs.com/package/@aivue/core) - Vue Core AI Client\n\n### Angular (@aiangular) - Coming Soon\n- @aiangular/smartform - Angular SmartForm\n\n## 🔗 More Information\n\n- [GitHub Repository](https://github.com/reachbrt/AIReact)\n- [Full Documentation](https://github.com/reachbrt/AIReact/wiki)\n- [Report Issues](https://github.com/reachbrt/AIReact/issues)\n\n## 📄 License\n\nMIT © [Bharatkumar Subramanian](https://github.com/reachbrt)\n\n","readmeFilename":"README.md"}