@object-ui/plugin-ai 2.0.0 → 3.0.0

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/README.md +125 -0
  2. package/package.json +11 -11
package/README.md ADDED
@@ -0,0 +1,125 @@
1
+ # @object-ui/plugin-ai
2
+
3
+ AI-powered components for Object UI — form assistance, recommendations, and natural language queries.
4
+
5
+ ## Features
6
+
7
+ - 🤖 **AI Form Assist** - Intelligent field suggestions and auto-fill for forms
8
+ - 💡 **AI Recommendations** - Display AI-generated recommendations in list, grid, or carousel layouts
9
+ - 🗣️ **Natural Language Query** - Let users query data using natural language
10
+ - 📦 **Auto-registered** - Components register with `ComponentRegistry` on import
11
+ - 🎯 **Type-Safe** - Full TypeScript support
12
+
13
+ ## Installation
14
+
15
+ ```bash
16
+ npm install @object-ui/plugin-ai
17
+ ```
18
+
19
+ **Peer Dependencies:**
20
+ - `react` ^18.0.0 || ^19.0.0
21
+ - `react-dom` ^18.0.0 || ^19.0.0
22
+ - `@object-ui/core`
23
+
24
+ ## Quick Start
25
+
26
+ ```tsx
27
+ import { AIFormAssist, AIRecommendations, NLQueryInput } from '@object-ui/plugin-ai';
28
+
29
+ function SmartForm() {
30
+ return (
31
+ <div>
32
+ <AIFormAssist
33
+ formId="new-contact"
34
+ objectName="Contact"
35
+ fields={['name', 'email', 'company']}
36
+ showConfidence
37
+ />
38
+ </div>
39
+ );
40
+ }
41
+
42
+ function RecommendationsPanel() {
43
+ return (
44
+ <AIRecommendations
45
+ objectName="Product"
46
+ maxResults={5}
47
+ layout="grid"
48
+ recommendations={recommendationsData}
49
+ />
50
+ );
51
+ }
52
+
53
+ function SearchBar() {
54
+ return (
55
+ <NLQueryInput
56
+ objectName="Order"
57
+ placeholder="Ask a question about your orders..."
58
+ suggestions={['Show orders from last week', 'Top customers by revenue']}
59
+ />
60
+ );
61
+ }
62
+ ```
63
+
64
+ ## API
65
+
66
+ ### AIFormAssist
67
+
68
+ AI-powered form field suggestions and auto-fill:
69
+
70
+ ```tsx
71
+ <AIFormAssist
72
+ formId="new-lead"
73
+ objectName="Lead"
74
+ fields={['name', 'email', 'phone']}
75
+ autoFill={false}
76
+ showConfidence
77
+ showReasoning={false}
78
+ />
79
+ ```
80
+
81
+ ### AIRecommendations
82
+
83
+ Display AI-generated recommendations:
84
+
85
+ ```tsx
86
+ <AIRecommendations
87
+ objectName="Product"
88
+ recommendations={data}
89
+ maxResults={10}
90
+ layout="list" // 'list' | 'grid' | 'carousel'
91
+ showScores={false}
92
+ emptyMessage="No recommendations available"
93
+ />
94
+ ```
95
+
96
+ ### NLQueryInput
97
+
98
+ Natural language query input for data exploration:
99
+
100
+ ```tsx
101
+ <NLQueryInput
102
+ objectName="Order"
103
+ placeholder="Ask anything..."
104
+ suggestions={['Recent orders', 'Revenue by month']}
105
+ showHistory={false}
106
+ />
107
+ ```
108
+
109
+ ### Schema-Driven Usage
110
+
111
+ Components auto-register with `ComponentRegistry`:
112
+
113
+ ```json
114
+ {
115
+ "type": "ai-form-assist",
116
+ "formId": "new-contact",
117
+ "objectName": "Contact",
118
+ "fields": ["name", "email"],
119
+ "showConfidence": true
120
+ }
121
+ ```
122
+
123
+ ## License
124
+
125
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@object-ui/plugin-ai",
3
- "version": "2.0.0",
3
+ "version": "3.0.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.umd.cjs",
6
6
  "module": "dist/index.js",
@@ -18,21 +18,21 @@
18
18
  "peerDependencies": {
19
19
  "react": "^18.0.0 || ^19.0.0",
20
20
  "react-dom": "^18.0.0 || ^19.0.0",
21
- "@object-ui/core": "2.0.0",
22
- "@object-ui/types": "2.0.0",
23
- "@object-ui/components": "2.0.0",
24
- "@object-ui/react": "2.0.0"
21
+ "@object-ui/components": "3.0.0",
22
+ "@object-ui/core": "3.0.0",
23
+ "@object-ui/react": "3.0.0",
24
+ "@object-ui/types": "3.0.0"
25
25
  },
26
26
  "dependencies": {
27
- "clsx": "^2.1.0",
27
+ "clsx": "^2.1.1",
28
28
  "lucide-react": "^0.344.0",
29
- "tailwind-merge": "^2.2.1"
29
+ "tailwind-merge": "^2.6.1"
30
30
  },
31
31
  "devDependencies": {
32
- "@types/node": "^25.2.2",
33
- "@types/react": "^19.2.13",
34
- "@types/react-dom": "^19.2.3",
35
- "@vitejs/plugin-react": "^5.1.3",
32
+ "@types/node": "^25.2.3",
33
+ "@types/react": "19.2.13",
34
+ "@types/react-dom": "19.2.3",
35
+ "@vitejs/plugin-react": "^5.1.4",
36
36
  "vite": "^7.3.1",
37
37
  "vite-plugin-dts": "^4.5.4",
38
38
  "vitest": "^4.0.18"