rivet-design 0.1.14 → 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/dist/jest.config.d.ts.map +1 -1
- package/dist/jest.config.js +42 -1
- package/dist/jest.config.js.map +1 -1
- package/dist/services/LLMService.d.ts.map +1 -1
- package/dist/services/LLMService.js +2 -0
- package/dist/services/LLMService.js.map +1 -1
- package/dist/shared/FileSystemAdapter.d.ts +9 -0
- package/dist/shared/FileSystemAdapter.d.ts.map +1 -0
- package/dist/shared/FileSystemAdapter.js +7 -0
- package/dist/shared/FileSystemAdapter.js.map +1 -0
- package/dist/shared/LLMService.d.ts +58 -0
- package/dist/shared/LLMService.d.ts.map +1 -0
- package/dist/shared/LLMService.js +169 -0
- package/dist/shared/LLMService.js.map +1 -0
- package/dist/shared/types.d.ts +25 -0
- package/dist/shared/types.d.ts.map +1 -0
- package/dist/shared/types.js +6 -0
- package/dist/shared/types.js.map +1 -0
- package/package.json +23 -16
- package/src/ui/dist/assets/main-BLxJfHns.css +1 -0
- package/src/ui/dist/assets/{main-Cj-e8nRg.js → main-Bga_UZFY.js} +44 -34
- package/src/ui/dist/index.html +2 -2
- package/src/ui/dist/assets/main-QSIylYLL.css +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jest.config.d.ts","sourceRoot":"","sources":["../src/jest.config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAEnC,QAAA,MAAM,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"jest.config.d.ts","sourceRoot":"","sources":["../src/jest.config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAEnC,QAAA,MAAM,MAAM,EAAE,MAoEb,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
package/dist/jest.config.js
CHANGED
|
@@ -16,17 +16,58 @@ const config = {
|
|
|
16
16
|
'^@rivet/core$': '<rootDir>/src/index-core',
|
|
17
17
|
'^@rivet/core/(.*)$': '<rootDir>/src/$1',
|
|
18
18
|
'^@rivet/server$': '<rootDir>/src/server',
|
|
19
|
+
'^@/(.*)$': '<rootDir>/src/ui/src/$1',
|
|
19
20
|
},
|
|
20
21
|
setupFilesAfterEnv: [],
|
|
21
22
|
collectCoverageFrom: [
|
|
22
23
|
'src/**/*.{ts,tsx}',
|
|
23
24
|
'!src/**/*.d.ts',
|
|
24
|
-
'!src/ui/**/*',
|
|
25
25
|
'!src/proxy/**/*',
|
|
26
26
|
'!src/scripts/**/*',
|
|
27
27
|
],
|
|
28
28
|
coverageDirectory: 'coverage',
|
|
29
29
|
coverageReporters: ['text', 'lcov', 'html'],
|
|
30
|
+
// Use different test environments based on file location
|
|
31
|
+
projects: [
|
|
32
|
+
{
|
|
33
|
+
displayName: 'node',
|
|
34
|
+
testEnvironment: 'node',
|
|
35
|
+
testMatch: [
|
|
36
|
+
'<rootDir>/**/__tests__/**/*.+(ts|js)',
|
|
37
|
+
'<rootDir>/**/*.(test|spec).+(ts|js)',
|
|
38
|
+
],
|
|
39
|
+
testPathIgnorePatterns: [
|
|
40
|
+
'/node_modules/',
|
|
41
|
+
'/dist/',
|
|
42
|
+
'<rootDir>/dist/',
|
|
43
|
+
'<rootDir>/ui/',
|
|
44
|
+
],
|
|
45
|
+
transform: {
|
|
46
|
+
'^.+\\.(ts|tsx)$': 'ts-jest',
|
|
47
|
+
},
|
|
48
|
+
moduleNameMapper: {
|
|
49
|
+
'^@rivet/core$': '<rootDir>/index-core',
|
|
50
|
+
'^@rivet/core/(.*)$': '<rootDir>/$1',
|
|
51
|
+
'^@rivet/server$': '<rootDir>/server',
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
displayName: 'jsdom',
|
|
56
|
+
testEnvironment: 'jsdom',
|
|
57
|
+
testMatch: [
|
|
58
|
+
'<rootDir>/ui/**/__tests__/**/*.+(ts|tsx)',
|
|
59
|
+
'<rootDir>/ui/**/*.(test|spec).+(ts|tsx)',
|
|
60
|
+
],
|
|
61
|
+
transform: {
|
|
62
|
+
'^.+\\.(ts|tsx)$': 'ts-jest',
|
|
63
|
+
},
|
|
64
|
+
moduleNameMapper: {
|
|
65
|
+
'^@/(.*)$': '<rootDir>/ui/src/$1',
|
|
66
|
+
'^@rivet/core$': '<rootDir>/index-core',
|
|
67
|
+
'^@rivet/core/(.*)$': '<rootDir>/$1',
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
],
|
|
30
71
|
};
|
|
31
72
|
exports.default = config;
|
|
32
73
|
//# sourceMappingURL=jest.config.js.map
|
package/dist/jest.config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jest.config.js","sourceRoot":"","sources":["../src/jest.config.ts"],"names":[],"mappings":";;AAEA,MAAM,MAAM,GAAW;IACrB,MAAM,EAAE,SAAS;IACjB,eAAe,EAAE,MAAM;IACvB,KAAK,EAAE,CAAC,WAAW,CAAC;IACpB,SAAS,EAAE;QACT,uCAAuC;QACvC,sCAAsC;KACvC;IACD,sBAAsB,EAAE,CAAC,gBAAgB,EAAE,QAAQ,EAAE,iBAAiB,CAAC;IACvE,SAAS,EAAE;QACT,iBAAiB,EAAE,SAAS;KAC7B;IACD,gBAAgB,EAAE;QAChB,eAAe,EAAE,0BAA0B;QAC3C,oBAAoB,EAAE,kBAAkB;QACxC,iBAAiB,EAAE,sBAAsB;
|
|
1
|
+
{"version":3,"file":"jest.config.js","sourceRoot":"","sources":["../src/jest.config.ts"],"names":[],"mappings":";;AAEA,MAAM,MAAM,GAAW;IACrB,MAAM,EAAE,SAAS;IACjB,eAAe,EAAE,MAAM;IACvB,KAAK,EAAE,CAAC,WAAW,CAAC;IACpB,SAAS,EAAE;QACT,uCAAuC;QACvC,sCAAsC;KACvC;IACD,sBAAsB,EAAE,CAAC,gBAAgB,EAAE,QAAQ,EAAE,iBAAiB,CAAC;IACvE,SAAS,EAAE;QACT,iBAAiB,EAAE,SAAS;KAC7B;IACD,gBAAgB,EAAE;QAChB,eAAe,EAAE,0BAA0B;QAC3C,oBAAoB,EAAE,kBAAkB;QACxC,iBAAiB,EAAE,sBAAsB;QACzC,UAAU,EAAE,yBAAyB;KACtC;IACD,kBAAkB,EAAE,EAAE;IACtB,mBAAmB,EAAE;QACnB,mBAAmB;QACnB,gBAAgB;QAChB,iBAAiB;QACjB,mBAAmB;KACpB;IACD,iBAAiB,EAAE,UAAU;IAC7B,iBAAiB,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;IAC3C,yDAAyD;IACzD,QAAQ,EAAE;QACR;YACE,WAAW,EAAE,MAAM;YACnB,eAAe,EAAE,MAAM;YACvB,SAAS,EAAE;gBACT,sCAAsC;gBACtC,qCAAqC;aACtC;YACD,sBAAsB,EAAE;gBACtB,gBAAgB;gBAChB,QAAQ;gBACR,iBAAiB;gBACjB,eAAe;aAChB;YACD,SAAS,EAAE;gBACT,iBAAiB,EAAE,SAAS;aAC7B;YACD,gBAAgB,EAAE;gBAChB,eAAe,EAAE,sBAAsB;gBACvC,oBAAoB,EAAE,cAAc;gBACpC,iBAAiB,EAAE,kBAAkB;aACtC;SACF;QACD;YACE,WAAW,EAAE,OAAO;YACpB,eAAe,EAAE,OAAO;YACxB,SAAS,EAAE;gBACT,0CAA0C;gBAC1C,yCAAyC;aAC1C;YACD,SAAS,EAAE;gBACT,iBAAiB,EAAE,SAAS;aAC7B;YACD,gBAAgB,EAAE;gBAChB,UAAU,EAAE,qBAAqB;gBACjC,eAAe,EAAE,sBAAsB;gBACvC,oBAAoB,EAAE,cAAc;aACrC;SACF;KACF;CACF,CAAC;AAEF,kBAAe,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LLMService.d.ts","sourceRoot":"","sources":["../../src/services/LLMService.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,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AAEF,KAAK,UAAU,GAAG;IAChB,OAAO,EAAE,cAAc,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,UAAU,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,qBAAa,UAAU;IACrB,OAAO,CAAC,GAAG,CAA8B;IACzC,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,cAAc,CAA0B;gBAEpC,QAAQ,CAAC,EAAE,MAAM;YAWf,gBAAgB;IAoDxB,sBAAsB,CAC1B,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,yBAAyB,CAAC;IA2CrC,OAAO,CAAC,mBAAmB;IAa3B,OAAO,CAAC,oBAAoB;YAyDd,2BAA2B;CAsB1C"}
|
|
@@ -148,6 +148,8 @@ RETURN THIS JSON FORMAT:
|
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
GOOD: Search for entire JSX blocks with context
|
|
151
|
+
GOOD: Modify underlying component code directly
|
|
152
|
+
BAD: Inline style changes like "style={{ marginTop: 10 }}"
|
|
151
153
|
BAD: Single props like "title={flow.title}" (appears multiple times)
|
|
152
154
|
|
|
153
155
|
If no files need modification, return: {"modifications": []}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LLMService.js","sourceRoot":"","sources":["../../src/services/LLMService.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,4CAA+C;AAG/C,uEAAoE;AAEpE,MAAM,eAAe,GAAG,0BAA0B,CAAC;AACnD,MAAM,wBAAwB,GAAG,IAAI,CA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KAAK,CAAC,2BAA2B,CACvC,aAKE;QAIF,IAAI,CAAC,GAAG,CAAC,KAAK,CACZ,YAAY,aAAa,CAAC,MAAM,gDAAgD,CACjF,CAAC;QAEF,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,kBAAkB,CAAC,aAAa,CAAC,CAAC;QAE5E,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;YAC9B,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,YAAY,EAAE,MAAM,CAAC,YAAY;YACjC,OAAO,EAAE,MAAM,CAAC,OAAO;SACxB,CAAC,CAAC,CAAC;IACN,CAAC;CACF;AA7MD,gCA6MC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FileSystem adapter interface
|
|
3
|
+
* Allows LLMService to work with both Node fs (CLI) and VirtualFileSystem (Web)
|
|
4
|
+
*/
|
|
5
|
+
export interface FileSystemAdapter {
|
|
6
|
+
readFile(filePath: string): Promise<string>;
|
|
7
|
+
writeFile(filePath: string, content: string): Promise<void>;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=FileSystemAdapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileSystemAdapter.d.ts","sourceRoot":"","sources":["../../src/shared/FileSystemAdapter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC5C,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileSystemAdapter.js","sourceRoot":"","sources":["../../src/shared/FileSystemAdapter.ts"],"names":[],"mappings":";AAAA;;;GAGG"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { ElementContext } from '../types/change-types';
|
|
2
|
+
import { IFileModificationService } from './types';
|
|
3
|
+
export type AppliedModificationResult = {
|
|
4
|
+
modifiedCode: Array<{
|
|
5
|
+
filePath: string;
|
|
6
|
+
modifiedCode: string;
|
|
7
|
+
changes: string;
|
|
8
|
+
}>;
|
|
9
|
+
changes: string;
|
|
10
|
+
};
|
|
11
|
+
export type BE_BoundingRect = {
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
width: number;
|
|
15
|
+
height: number;
|
|
16
|
+
top: number;
|
|
17
|
+
left: number;
|
|
18
|
+
right: number;
|
|
19
|
+
bottom: number;
|
|
20
|
+
};
|
|
21
|
+
export type BE_ElementContext = {
|
|
22
|
+
xpath: string;
|
|
23
|
+
tagName: string;
|
|
24
|
+
className: string;
|
|
25
|
+
id: string;
|
|
26
|
+
textContent: string;
|
|
27
|
+
attributes: Record<string, string>;
|
|
28
|
+
filePath: string;
|
|
29
|
+
boundingRect: BE_BoundingRect;
|
|
30
|
+
};
|
|
31
|
+
type LLMContext = {
|
|
32
|
+
element: ElementContext;
|
|
33
|
+
componentCode: string;
|
|
34
|
+
fileName: string;
|
|
35
|
+
};
|
|
36
|
+
export type LLMRequest = {
|
|
37
|
+
instruction: string;
|
|
38
|
+
context: LLMContext;
|
|
39
|
+
temperature?: number;
|
|
40
|
+
};
|
|
41
|
+
export type MultiElementLLMRequest = {
|
|
42
|
+
instruction: string;
|
|
43
|
+
context: LLMContext[];
|
|
44
|
+
temperature?: number;
|
|
45
|
+
};
|
|
46
|
+
export declare class LLMService {
|
|
47
|
+
private log;
|
|
48
|
+
private proxyUrl;
|
|
49
|
+
private fileModService;
|
|
50
|
+
constructor(fileModService: IFileModificationService, proxyUrl?: string);
|
|
51
|
+
private makeProxyRequest;
|
|
52
|
+
modifyMultipleElements(request: MultiElementLLMRequest): Promise<AppliedModificationResult>;
|
|
53
|
+
private groupElementsByFile;
|
|
54
|
+
private buildMultiFilePrompt;
|
|
55
|
+
private applyMultiFileModifications;
|
|
56
|
+
}
|
|
57
|
+
export {};
|
|
58
|
+
//# sourceMappingURL=LLMService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LLMService.d.ts","sourceRoot":"","sources":["../../src/shared/LLMService.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAwBnD,MAAM,MAAM,yBAAyB,GAAG;IACtC,YAAY,EAAE,KAAK,CAAC;QAClB,QAAQ,EAAE,MAAM,CAAC;QACjB,YAAY,EAAE,MAAM,CAAC;QACrB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC,CAAC;IACH,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAGF,MAAM,MAAM,eAAe,GAAG;IAC5B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAGF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,eAAe,CAAC;CAC/B,CAAC;AAEF,KAAK,UAAU,GAAG;IAChB,OAAO,EAAE,cAAc,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,UAAU,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,qBAAa,UAAU;IACrB,OAAO,CAAC,GAAG,CAA8B;IACzC,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,cAAc,CAA2B;gBAErC,cAAc,EAAE,wBAAwB,EAAE,QAAQ,CAAC,EAAE,MAAM;YAWzD,gBAAgB;IAoDxB,sBAAsB,CAC1B,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,yBAAyB,CAAC;IA2CrC,OAAO,CAAC,mBAAmB;IAa3B,OAAO,CAAC,oBAAoB;YAyDd,2BAA2B;CAsB1C"}
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LLMService = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const logger_1 = require("../utils/logger");
|
|
6
|
+
const ANTHROPIC_MODEL = 'claude-sonnet-4-20250514';
|
|
7
|
+
const CLAUDE_MAX_OUTPUT_TOKENS = 8192;
|
|
8
|
+
const DEFAULT_PROD_PROXY_URL = 'https://rivet-proxy.onrender.com';
|
|
9
|
+
// const DEFAULT_DEV_PROD_PROXY_URL = 'https://rivet-proxy-dev.onrender.com';
|
|
10
|
+
// Zod schema for structured LLM responses
|
|
11
|
+
const CodeModificationSchema = zod_1.z.object({
|
|
12
|
+
modifications: zod_1.z
|
|
13
|
+
.array(zod_1.z.object({
|
|
14
|
+
filePath: zod_1.z.string().describe('Target file path for this modification'),
|
|
15
|
+
search: zod_1.z.string().describe('Exact text to find in this specific file'),
|
|
16
|
+
replacement: zod_1.z.string().describe('Replacement text'),
|
|
17
|
+
changes: zod_1.z.string().describe('Description of changes for this file'),
|
|
18
|
+
}))
|
|
19
|
+
.describe('Array of file-specific modifications (can be empty if no changes needed)'),
|
|
20
|
+
});
|
|
21
|
+
class LLMService {
|
|
22
|
+
constructor(fileModService, proxyUrl) {
|
|
23
|
+
this.log = (0, logger_1.createLogger)('LLMService');
|
|
24
|
+
if (proxyUrl) {
|
|
25
|
+
this.proxyUrl = proxyUrl;
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
this.proxyUrl = DEFAULT_PROD_PROXY_URL;
|
|
29
|
+
}
|
|
30
|
+
this.fileModService = fileModService;
|
|
31
|
+
this.log.info(`LLMService initialized with proxy URL: ${this.proxyUrl}`);
|
|
32
|
+
}
|
|
33
|
+
async makeProxyRequest(prompt, temperature) {
|
|
34
|
+
const proxyRequest = {
|
|
35
|
+
provider: 'anthropic',
|
|
36
|
+
model: ANTHROPIC_MODEL,
|
|
37
|
+
messages: [],
|
|
38
|
+
prompt,
|
|
39
|
+
temperature,
|
|
40
|
+
maxTokens: CLAUDE_MAX_OUTPUT_TOKENS,
|
|
41
|
+
stream: false,
|
|
42
|
+
schema: 'CodeModificationSchema',
|
|
43
|
+
};
|
|
44
|
+
try {
|
|
45
|
+
const response = await fetch(`${this.proxyUrl}/api/llm`, {
|
|
46
|
+
method: 'POST',
|
|
47
|
+
headers: {
|
|
48
|
+
'Content-Type': 'application/json',
|
|
49
|
+
'X-Rivet-Client': 'rivet-cli',
|
|
50
|
+
},
|
|
51
|
+
body: JSON.stringify(proxyRequest),
|
|
52
|
+
});
|
|
53
|
+
if (!response.ok) {
|
|
54
|
+
const errorData = await response
|
|
55
|
+
.json()
|
|
56
|
+
.catch(() => ({ error: 'Unknown error' }));
|
|
57
|
+
throw new Error(`Proxy request failed: ${errorData.error || response.statusText}`);
|
|
58
|
+
}
|
|
59
|
+
const result = await response.json();
|
|
60
|
+
if (!result.success || !result.data) {
|
|
61
|
+
throw new Error(`Proxy returned error: ${result.error || 'No response data'}`);
|
|
62
|
+
}
|
|
63
|
+
return result.data;
|
|
64
|
+
}
|
|
65
|
+
catch (error) {
|
|
66
|
+
this.log.error('Proxy request error:', error);
|
|
67
|
+
throw new Error(`Proxy request failed: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
async modifyMultipleElements(request) {
|
|
71
|
+
const { instruction, context, temperature } = request;
|
|
72
|
+
// Group elements by file
|
|
73
|
+
const elementsByFile = this.groupElementsByFile(context);
|
|
74
|
+
// Use new multi-file prompt and schema
|
|
75
|
+
const prompt = this.buildMultiFilePrompt(instruction, elementsByFile);
|
|
76
|
+
try {
|
|
77
|
+
const result = await this.makeProxyRequest(prompt, temperature);
|
|
78
|
+
// Validate against multi-file schema
|
|
79
|
+
const validation = CodeModificationSchema.safeParse(result);
|
|
80
|
+
if (!validation.success) {
|
|
81
|
+
this.log.error('Multi-file schema validation failed. Raw response:', result);
|
|
82
|
+
throw new Error(`Invalid response format: ${JSON.stringify(validation.error.issues)}`);
|
|
83
|
+
}
|
|
84
|
+
const appliedModifications = await this.applyMultiFileModifications(validation.data.modifications);
|
|
85
|
+
return {
|
|
86
|
+
modifiedCode: appliedModifications,
|
|
87
|
+
// TODO: Simplify this, changes aren't rendered in UI today
|
|
88
|
+
changes: validation.data.modifications
|
|
89
|
+
.map((mod) => mod.changes)
|
|
90
|
+
.join('\n'),
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
catch (error) {
|
|
94
|
+
this.log.error('Multi-element modification error:', error);
|
|
95
|
+
throw new Error(`Failed to modify multiple elements: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
groupElementsByFile(contexts) {
|
|
99
|
+
const elementsByFile = new Map();
|
|
100
|
+
for (const ctx of contexts) {
|
|
101
|
+
if (!elementsByFile.has(ctx.fileName)) {
|
|
102
|
+
elementsByFile.set(ctx.fileName, []);
|
|
103
|
+
}
|
|
104
|
+
elementsByFile.get(ctx.fileName).push(ctx);
|
|
105
|
+
}
|
|
106
|
+
return elementsByFile;
|
|
107
|
+
}
|
|
108
|
+
buildMultiFilePrompt(instruction, elementsByFile) {
|
|
109
|
+
return `You are a React/TypeScript expert. Analyze these files and apply changes where relevant.
|
|
110
|
+
|
|
111
|
+
INSTRUCTION: ${instruction}
|
|
112
|
+
|
|
113
|
+
FILES AND ELEMENTS:
|
|
114
|
+
${Array.from(elementsByFile.entries())
|
|
115
|
+
.map(([filePath, contexts]) => {
|
|
116
|
+
// All contexts for the same file should have the same componentCode
|
|
117
|
+
const componentCode = contexts[0].componentCode;
|
|
118
|
+
return `
|
|
119
|
+
━━━ FILE: ${filePath} ━━━
|
|
120
|
+
SELECTED ELEMENTS: ${contexts
|
|
121
|
+
.map((ctx) => `<${ctx.element.tagName}> (classes: "${ctx.element.className || 'none'}", text: "${ctx.element.textContent?.substring(0, 30) || 'none'}")`)
|
|
122
|
+
.join(', ')}
|
|
123
|
+
|
|
124
|
+
CURRENT CODE:
|
|
125
|
+
${componentCode}
|
|
126
|
+
`;
|
|
127
|
+
})
|
|
128
|
+
.join('\n')}
|
|
129
|
+
|
|
130
|
+
REQUIREMENTS:
|
|
131
|
+
1. Search strings must be UNIQUE (appear exactly once in file)
|
|
132
|
+
2. Include 2-3 lines of context to ensure uniqueness
|
|
133
|
+
3. Search strings must EXACTLY match the file content (including whitespace, indentation)
|
|
134
|
+
4. Copy search text character-for-character from the provided code
|
|
135
|
+
5. ALL 4 fields required: filePath, search, replacement, changes
|
|
136
|
+
|
|
137
|
+
RETURN THIS JSON FORMAT:
|
|
138
|
+
{
|
|
139
|
+
"modifications": [
|
|
140
|
+
{
|
|
141
|
+
"filePath": "path/to/file.tsx",
|
|
142
|
+
"search": "unique multi-line block",
|
|
143
|
+
"replacement": "modified multi-line block",
|
|
144
|
+
"changes": "description of what changed"
|
|
145
|
+
}
|
|
146
|
+
]
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
GOOD: Search for entire JSX blocks with context
|
|
150
|
+
GOOD: Modify underlying component code directly
|
|
151
|
+
BAD: Inline style changes like "style={{ marginTop: 10 }}"
|
|
152
|
+
BAD: Single props like "title={flow.title}" (appears multiple times)
|
|
153
|
+
|
|
154
|
+
If no files need modification, return: {"modifications": []}
|
|
155
|
+
|
|
156
|
+
RETURN ONLY THE JSON - NO OTHER TEXT.`;
|
|
157
|
+
}
|
|
158
|
+
async applyMultiFileModifications(modifications) {
|
|
159
|
+
this.log.debug(`Applying ${modifications.length} modification(s) using FileModificationService`);
|
|
160
|
+
const results = await this.fileModService.applyModifications(modifications);
|
|
161
|
+
return results.map((result) => ({
|
|
162
|
+
filePath: result.filePath,
|
|
163
|
+
modifiedCode: result.modifiedCode,
|
|
164
|
+
changes: result.changes,
|
|
165
|
+
}));
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
exports.LLMService = LLMService;
|
|
169
|
+
//# sourceMappingURL=LLMService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LLMService.js","sourceRoot":"","sources":["../../src/shared/LLMService.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,4CAA+C;AAK/C,MAAM,eAAe,GAAG,0BAA0B,CAAC;AACnD,MAAM,wBAAwB,GAAG,IAAI,CAAC;AAEtC,MAAM,sBAAsB,GAAG,kCAAkC,CAAC;AAClE,6EAA6E;AAE7E,0CAA0C;AAC1C,MAAM,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IACtC,aAAa,EAAE,OAAC;SACb,KAAK,CACJ,OAAC,CAAC,MAAM,CAAC;QACP,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,wCAAwC,CAAC;QACvE,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QA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AAO;SACxB,CAAC,CAAC,CAAC;IACN,CAAC;CACF;AA7MD,gCA6MC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared types for CLI and Web
|
|
3
|
+
*/
|
|
4
|
+
export type FileModification = {
|
|
5
|
+
filePath: string;
|
|
6
|
+
search: string;
|
|
7
|
+
replacement: string;
|
|
8
|
+
changes: string;
|
|
9
|
+
};
|
|
10
|
+
export type ModificationResult = {
|
|
11
|
+
filePath: string;
|
|
12
|
+
originalCode: string;
|
|
13
|
+
modifiedCode: string;
|
|
14
|
+
changes: string;
|
|
15
|
+
modificationsApplied: number;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Interface for file modification services
|
|
19
|
+
* Implemented by both Node FileModificationService and VFSFileModificationService
|
|
20
|
+
*/
|
|
21
|
+
export interface IFileModificationService {
|
|
22
|
+
applyModifications(modifications: FileModification[]): Promise<ModificationResult[]>;
|
|
23
|
+
getActiveLocks(): string[];
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/shared/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,oBAAoB,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACvC,kBAAkB,CAChB,aAAa,EAAE,gBAAgB,EAAE,GAChC,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC;IACjC,cAAc,IAAI,MAAM,EAAE,CAAC;CAC5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/shared/types.ts"],"names":[],"mappings":";AAAA;;GAEG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rivet-design",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.15",
|
|
4
4
|
"description": "Local visual web development tool with AI-powered code modification",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -10,8 +10,10 @@
|
|
|
10
10
|
"build": "tsc && npm run build:ui && npm run build:bin",
|
|
11
11
|
"build:ui": "cd src/ui && vite build",
|
|
12
12
|
"build:bin": "mkdir -p bin && cp src/bin-template.js bin/rivet.js && chmod +x bin/rivet.js",
|
|
13
|
+
"build:landing": "cd landing && yarn build",
|
|
13
14
|
"dev": "tsc --watch",
|
|
14
|
-
"
|
|
15
|
+
"dev:landing": "cd landing && yarn dev",
|
|
16
|
+
"clean": "rm -rf dist src/ui/dist bin landing/dist",
|
|
15
17
|
"pack": "npm run build && npm pack",
|
|
16
18
|
"prepublishOnly": "npm run build",
|
|
17
19
|
"lint": "eslint . --ext ts,tsx,js,jsx",
|
|
@@ -48,37 +50,42 @@
|
|
|
48
50
|
"simple-git": "^3.19.1",
|
|
49
51
|
"tailwind-merge": "^3.3.1",
|
|
50
52
|
"update-notifier": "^7.0.0",
|
|
51
|
-
"zod": "^4.0.17"
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
"@eslint/js": "^9.36.0",
|
|
55
|
-
"@types/cors": "^2.8.13",
|
|
56
|
-
"@types/express": "^4.17.17",
|
|
57
|
-
"@types/jest": "^30.0.0",
|
|
53
|
+
"zod": "^4.0.17",
|
|
54
|
+
"@types/cors": "^2.8.19",
|
|
55
|
+
"@types/express": "^5.0.3",
|
|
58
56
|
"@types/node": "^20.4.5",
|
|
59
57
|
"@types/react": "^18.2.43",
|
|
60
58
|
"@types/react-dom": "^18.2.17",
|
|
61
59
|
"@types/update-notifier": "^6.0.8",
|
|
62
|
-
"@typescript-eslint/eslint-plugin": "^8.44.0",
|
|
63
|
-
"@typescript-eslint/parser": "^8.44.0",
|
|
64
60
|
"@vitejs/plugin-react": "^4.2.1",
|
|
65
61
|
"autoprefixer": "^10.4.16",
|
|
62
|
+
"postcss": "^8.4.32",
|
|
63
|
+
"tailwindcss": "^3.4.0",
|
|
64
|
+
"typescript": "^5.1.6",
|
|
65
|
+
"vite": "^5.0.8"
|
|
66
|
+
},
|
|
67
|
+
"devDependencies": {
|
|
68
|
+
"@eslint/js": "^9.36.0",
|
|
69
|
+
"@testing-library/dom": "^10.4.1",
|
|
70
|
+
"@testing-library/react": "^16.3.0",
|
|
71
|
+
"@testing-library/react-hooks": "^8.0.1",
|
|
72
|
+
"@types/jest": "^30.0.0",
|
|
73
|
+
"@typescript-eslint/eslint-plugin": "^8.44.0",
|
|
74
|
+
"@typescript-eslint/parser": "^8.44.0",
|
|
66
75
|
"eslint": "^9.36.0",
|
|
67
76
|
"eslint-config-prettier": "^10.1.8",
|
|
68
77
|
"eslint-plugin-react": "^7.37.5",
|
|
69
78
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
70
79
|
"husky": "^9.1.7",
|
|
71
80
|
"jest": "^30.1.3",
|
|
81
|
+
"jest-environment-jsdom": "^30.2.0",
|
|
72
82
|
"jiti": "^2.5.1",
|
|
73
83
|
"knip": "^5.63.1",
|
|
74
84
|
"lint-staged": "^16.1.6",
|
|
75
|
-
"postcss": "^8.4.32",
|
|
76
85
|
"prettier": "^3.6.2",
|
|
77
86
|
"prettier-plugin-tailwindcss": "^0.6.14",
|
|
78
|
-
"
|
|
79
|
-
"ts-jest": "^29.4.4"
|
|
80
|
-
"typescript": "^5.1.6",
|
|
81
|
-
"vite": "^5.0.8"
|
|
87
|
+
"supabase": "^2.47.2",
|
|
88
|
+
"ts-jest": "^29.4.4"
|
|
82
89
|
},
|
|
83
90
|
"files": [
|
|
84
91
|
"dist/",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.bottom-0{bottom:0}.bottom-4{bottom:1rem}.bottom-6{bottom:1.5rem}.left-1\/2{left:50%}.right-0{right:0}.right-4{right:1rem}.z-ui-primary{z-index:50}.order-1{order:1}.order-2{order:2}.m-0{margin:0}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.ml-1{margin-left:.25rem}.mt-0\.5{margin-top:.125rem}.block{display:block}.flex{display:flex}.grid{display:grid}.h-4{height:1rem}.h-5{height:1.25rem}.h-96{height:24rem}.h-full{height:100%}.h-screen{height:100vh}.max-h-32{max-height:8rem}.max-h-96{max-height:24rem}.min-h-0{min-height:0px}.min-h-\[2\.5rem\]{min-height:2.5rem}.w-28{width:7rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-96{width:24rem}.w-full{width:100%}.min-w-0{min-width:0px}.max-w-\[100vw\]{max-width:100vw}.max-w-\[80\%\]{max-width:80%}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-auto{cursor:auto}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.resize{resize:both}.list-none{list-style-type:none}.grid-cols-\[auto_1fr_auto\]{grid-template-columns:auto 1fr auto}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-6{gap:1.5rem}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.self-start{align-self:flex-start}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.whitespace-pre-wrap{white-space:pre-wrap}.rounded{border-radius:.25rem}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-none{border-radius:0}.border{border-width:1px}.border-0{border-width:0px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-t{border-top-width:1px}.border-none{border-style:none}.border-accent-error{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.border-accent-success{--tw-border-opacity: 1;border-color:rgb(16 185 129 / var(--tw-border-opacity, 1))}.border-accent-warning{--tw-border-opacity: 1;border-color:rgb(245 158 11 / var(--tw-border-opacity, 1))}.border-divider{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity, 1))}.border-primary\/30{border-color:#f973164d}.border-white{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity, 1))}.bg-accent-error\/90{background-color:#ef4444e6}.bg-accent-success\/90{background-color:#10b981e6}.bg-accent-warning\/20{background-color:#f59e0b33}.bg-content-muted\/90{background-color:#d1d5dbe6}.bg-divider-muted{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1))}.bg-main{--tw-bg-opacity: 1;background-color:rgb(30 30 34 / var(--tw-bg-opacity, 1))}.bg-main-input{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}.bg-primary{--tw-bg-opacity: 1;background-color:rgb(249 115 22 / var(--tw-bg-opacity, 1))}.bg-primary\/20{background-color:#f9731633}.bg-transparent{background-color:transparent}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.pl-3{padding-left:.75rem}.pr-10{padding-right:2.5rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-semibold{font-weight:600}.text-accent-warning{--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity, 1))}.text-content{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-content-muted{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.text-content-subtle{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-primary{--tw-text-opacity: 1;color:rgb(249 115 22 / var(--tw-text-opacity, 1))}.placeholder-content-subtle::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}.placeholder-content-subtle::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}.opacity-25{opacity:.25}.opacity-50{opacity:.5}.opacity-75{opacity:.75}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.scrollbar-hide{-ms-overflow-style:none;scrollbar-width:none}.scrollbar-hide::-webkit-scrollbar{display:none}.focus-within\:border-primary:focus-within{--tw-border-opacity: 1;border-color:rgb(249 115 22 / var(--tw-border-opacity, 1))}.focus-within\:ring-1:focus-within{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-within\:ring-primary:focus-within{--tw-ring-opacity: 1;--tw-ring-color: rgb(249 115 22 / var(--tw-ring-opacity, 1))}.hover\:border-divider:hover{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity, 1))}.hover\:border-white:hover{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity, 1))}.hover\:bg-black\/10:hover{background-color:#0000001a}.hover\:bg-content-muted\/10:hover{background-color:#d1d5db1a}.hover\:bg-divider-muted:hover{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1))}.hover\:bg-main-input:hover{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}.hover\:bg-primary-hover:hover{--tw-bg-opacity: 1;background-color:rgb(234 88 12 / var(--tw-bg-opacity, 1))}.hover\:bg-white\/10:hover{background-color:#ffffff1a}.hover\:text-content-muted:hover{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.focus\:border-primary:focus{--tw-border-opacity: 1;border-color:rgb(249 115 22 / var(--tw-border-opacity, 1))}.focus\:bg-divider-muted:focus{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-primary:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(249 115 22 / var(--tw-ring-opacity, 1))}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.data-\[swipe\=cancel\]\:translate-x-0[data-swipe=cancel]{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[swipe\=move\]\:translate-x-\[var\(--radix-toast-swipe-move-x\)\][data-swipe=move]{--tw-translate-x: var(--radix-toast-swipe-move-x);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group[data-state=open] .group-data-\[state\=open\]\:rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}
|