uilint-react 0.1.13 → 0.1.15
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/README.md +5 -3
- package/dist/index.js +3 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -55,12 +55,14 @@ You'll need to add API routes for the React component:
|
|
|
55
55
|
```ts
|
|
56
56
|
// app/api/uilint/analyze/route.ts
|
|
57
57
|
import { NextRequest, NextResponse } from "next/server";
|
|
58
|
-
import { OllamaClient } from "uilint-core";
|
|
58
|
+
import { OllamaClient, UILINT_DEFAULT_OLLAMA_MODEL } from "uilint-core";
|
|
59
59
|
|
|
60
60
|
export async function POST(request: NextRequest) {
|
|
61
61
|
const { styleSummary, styleGuide, generateGuide, model } =
|
|
62
62
|
await request.json();
|
|
63
|
-
const client = new OllamaClient({
|
|
63
|
+
const client = new OllamaClient({
|
|
64
|
+
model: model || UILINT_DEFAULT_OLLAMA_MODEL,
|
|
65
|
+
});
|
|
64
66
|
|
|
65
67
|
if (generateGuide) {
|
|
66
68
|
const styleGuideContent = await client.generateStyleGuide(styleSummary);
|
|
@@ -192,7 +194,7 @@ For LLM-powered features, you need [Ollama](https://ollama.ai) installed locally
|
|
|
192
194
|
|
|
193
195
|
```bash
|
|
194
196
|
# Install Ollama, then pull the default model
|
|
195
|
-
ollama pull
|
|
197
|
+
ollama pull qwen3-coder:30b
|
|
196
198
|
```
|
|
197
199
|
|
|
198
200
|
## Related Packages
|
package/dist/index.js
CHANGED
|
@@ -46,16 +46,16 @@ function isNode() {
|
|
|
46
46
|
import {
|
|
47
47
|
createStyleSummary as createStyleSummary2,
|
|
48
48
|
buildAnalysisPrompt,
|
|
49
|
-
buildStyleGuidePrompt
|
|
49
|
+
buildStyleGuidePrompt,
|
|
50
|
+
UILINT_DEFAULT_OLLAMA_MODEL
|
|
50
51
|
} from "uilint-core";
|
|
51
52
|
var DEFAULT_API_ENDPOINT = "/api/uilint/analyze";
|
|
52
|
-
var DEFAULT_MODEL = "qwen2.5-coder:7b";
|
|
53
53
|
var LLMClient = class {
|
|
54
54
|
apiEndpoint;
|
|
55
55
|
model;
|
|
56
56
|
constructor(options = {}) {
|
|
57
57
|
this.apiEndpoint = options.apiEndpoint || DEFAULT_API_ENDPOINT;
|
|
58
|
-
this.model = options.model ||
|
|
58
|
+
this.model = options.model || UILINT_DEFAULT_OLLAMA_MODEL;
|
|
59
59
|
}
|
|
60
60
|
/**
|
|
61
61
|
* Analyzes extracted styles and returns issues
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "uilint-react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.15",
|
|
4
4
|
"description": "React component for AI-powered UI consistency checking",
|
|
5
5
|
"author": "Peter Suggate",
|
|
6
6
|
"repository": {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"node": ">=20.0.0"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"uilint-core": "^0.1.
|
|
37
|
+
"uilint-core": "^0.1.15"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"react": "^19.0.0",
|