@vibes.diy/prompts 0.0.0-dev-fresh-data
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/LICENSE.md +232 -0
- package/README.md +29 -0
- package/catalog.d.ts +1 -0
- package/catalog.js +4 -0
- package/catalog.js.map +1 -0
- package/chat.d.ts +144 -0
- package/chat.js +2 -0
- package/chat.js.map +1 -0
- package/component-export-transforms.d.ts +12 -0
- package/component-export-transforms.js +32 -0
- package/component-export-transforms.js.map +1 -0
- package/component-transforms.d.ts +3 -0
- package/component-transforms.js +327 -0
- package/component-transforms.js.map +1 -0
- package/index.d.ts +11 -0
- package/index.js +12 -0
- package/index.js.map +1 -0
- package/json-docs.d.ts +21 -0
- package/json-docs.js +25 -0
- package/json-docs.js.map +1 -0
- package/llms/callai.d.ts +2 -0
- package/llms/callai.js +10 -0
- package/llms/callai.js.map +1 -0
- package/llms/callai.txt +455 -0
- package/llms/d3.d.ts +2 -0
- package/llms/d3.js +10 -0
- package/llms/d3.js.map +1 -0
- package/llms/d3.md +679 -0
- package/llms/fireproof.d.ts +2 -0
- package/llms/fireproof.js +10 -0
- package/llms/fireproof.js.map +1 -0
- package/llms/fireproof.txt +451 -0
- package/llms/image-gen.d.ts +2 -0
- package/llms/image-gen.js +10 -0
- package/llms/image-gen.js.map +1 -0
- package/llms/image-gen.txt +128 -0
- package/llms/index.d.ts +8 -0
- package/llms/index.js +21 -0
- package/llms/index.js.map +1 -0
- package/llms/three-js.d.ts +2 -0
- package/llms/three-js.js +10 -0
- package/llms/three-js.js.map +1 -0
- package/llms/three-js.md +2232 -0
- package/llms/types.d.ts +10 -0
- package/llms/types.js +2 -0
- package/llms/types.js.map +1 -0
- package/llms/web-audio.d.ts +2 -0
- package/llms/web-audio.js +9 -0
- package/llms/web-audio.js.map +1 -0
- package/llms/web-audio.txt +220 -0
- package/load-docs.d.ts +2 -0
- package/load-docs.js +17 -0
- package/load-docs.js.map +1 -0
- package/package.json +39 -0
- package/prompts.d.ts +43 -0
- package/prompts.js +315 -0
- package/prompts.js.map +1 -0
- package/segment-parser.d.ts +4 -0
- package/segment-parser.js +135 -0
- package/segment-parser.js.map +1 -0
- package/settings.d.ts +16 -0
- package/settings.js +2 -0
- package/settings.js.map +1 -0
- package/style-prompts.d.ts +7 -0
- package/style-prompts.js +63 -0
- package/style-prompts.js.map +1 -0
- package/tsconfig.json +21 -0
- package/txt-docs.d.ts +15 -0
- package/txt-docs.js +53 -0
- package/txt-docs.js.map +1 -0
- package/view-state.d.ts +17 -0
- package/view-state.js +2 -0
- package/view-state.js.map +1 -0
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
export const coreImportMap = [
|
|
2
|
+
"react",
|
|
3
|
+
"react-dom",
|
|
4
|
+
"react-dom/client",
|
|
5
|
+
"use-fireproof",
|
|
6
|
+
"call-ai",
|
|
7
|
+
"use-vibes",
|
|
8
|
+
];
|
|
9
|
+
export function transformImports(code) {
|
|
10
|
+
return code.replace(/import\s+(?:(?:\{[^}]*\}|\*\s+as\s+\w+|\w+)\s+from\s+)?['"]([^/][^'"]*)['"];?/g, (match, importPath) => {
|
|
11
|
+
if (coreImportMap.includes(importPath)) {
|
|
12
|
+
return match;
|
|
13
|
+
}
|
|
14
|
+
return match.replace(`"${importPath}"`, `"https://esm.sh/${importPath}"`);
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
import { transformArrowFunction, transformClassDeclaration, transformFunctionDeclaration, transformHOC, transformObjectLiteral, } from "./component-export-transforms.js";
|
|
18
|
+
export function normalizeComponentExports(code) {
|
|
19
|
+
const cleanedCode = code
|
|
20
|
+
.trim()
|
|
21
|
+
.replace(/^\/\*[\s\S]*?\*\/\s*/, "")
|
|
22
|
+
.replace(/\s*\/\*[\s\S]*?\*\/$/, "")
|
|
23
|
+
.trim();
|
|
24
|
+
const state = {
|
|
25
|
+
input: cleanedCode,
|
|
26
|
+
patterns: {
|
|
27
|
+
objectLiteral: null,
|
|
28
|
+
hoc: null,
|
|
29
|
+
functionDeclaration: null,
|
|
30
|
+
classDeclaration: null,
|
|
31
|
+
arrowFunction: null,
|
|
32
|
+
namedExport: null,
|
|
33
|
+
},
|
|
34
|
+
hasAppDeclared: false,
|
|
35
|
+
hasDefaultExport: false,
|
|
36
|
+
beforeExport: "",
|
|
37
|
+
afterExport: "",
|
|
38
|
+
};
|
|
39
|
+
state.hasAppDeclared =
|
|
40
|
+
/\bconst\s+App\s*=/.test(cleanedCode) ||
|
|
41
|
+
/\bfunction\s+App\s*\(/.test(cleanedCode) ||
|
|
42
|
+
/\bclass\s+App\b/.test(cleanedCode);
|
|
43
|
+
const objectLiteralMatch = cleanedCode.match(/export\s+default\s+(\{[\s\S]*?\});?/);
|
|
44
|
+
if (objectLiteralMatch && objectLiteralMatch[1]) {
|
|
45
|
+
state.patterns.objectLiteral = objectLiteralMatch[1];
|
|
46
|
+
state.hasDefaultExport = true;
|
|
47
|
+
const parts = cleanedCode.split(/export\s+default\s+\{[\s\S]*?\};?/);
|
|
48
|
+
state.beforeExport = parts[0] || "";
|
|
49
|
+
state.afterExport = parts[1] || "";
|
|
50
|
+
return transformObjectLiteral(state);
|
|
51
|
+
}
|
|
52
|
+
const hocMatch = cleanedCode.match(/export\s+default\s+((React\.)?(memo|forwardRef)\s*\([^)]*\)(\([^)]*\))?)/);
|
|
53
|
+
if (hocMatch && hocMatch[1]) {
|
|
54
|
+
state.patterns.hoc = hocMatch[1];
|
|
55
|
+
state.hasDefaultExport = true;
|
|
56
|
+
const parts = cleanedCode.split(/export\s+default\s+(React\.)?(memo|forwardRef)\s*\(/);
|
|
57
|
+
state.beforeExport = parts[0] || "";
|
|
58
|
+
return transformHOC(state);
|
|
59
|
+
}
|
|
60
|
+
const functionMatch = cleanedCode.match(/export\s+default\s+function\s+(\w+)\s*(\([^)]*\))/);
|
|
61
|
+
if (functionMatch) {
|
|
62
|
+
state.patterns.functionDeclaration = {
|
|
63
|
+
name: functionMatch[1],
|
|
64
|
+
signature: functionMatch[2],
|
|
65
|
+
};
|
|
66
|
+
state.hasDefaultExport = true;
|
|
67
|
+
return transformFunctionDeclaration(state);
|
|
68
|
+
}
|
|
69
|
+
const classMatch = cleanedCode.match(/export\s+default\s+class\s+(\w+)/);
|
|
70
|
+
if (classMatch) {
|
|
71
|
+
state.patterns.classDeclaration = {
|
|
72
|
+
name: classMatch[1],
|
|
73
|
+
};
|
|
74
|
+
state.hasDefaultExport = true;
|
|
75
|
+
return transformClassDeclaration(state);
|
|
76
|
+
}
|
|
77
|
+
const arrowMatch = cleanedCode.match(new RegExp("export\\s+default\\s+(async\\s+)?\\("));
|
|
78
|
+
if (arrowMatch) {
|
|
79
|
+
state.patterns.arrowFunction = true;
|
|
80
|
+
state.hasDefaultExport = true;
|
|
81
|
+
const parts = cleanedCode.split(/export\s+default\s+/);
|
|
82
|
+
state.beforeExport = parts[0] || "";
|
|
83
|
+
state.afterExport = parts[1] || "";
|
|
84
|
+
return transformArrowFunction(state);
|
|
85
|
+
}
|
|
86
|
+
let normalizedCode = cleanedCode;
|
|
87
|
+
let defaultExportFound = state.hasDefaultExport;
|
|
88
|
+
const appComponentExists = state.hasAppDeclared;
|
|
89
|
+
const patterns = {
|
|
90
|
+
hoc: {
|
|
91
|
+
test: /^$/,
|
|
92
|
+
process: () => {
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
functionDeclaration: {
|
|
96
|
+
test: /^$/,
|
|
97
|
+
process: () => {
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
classDeclaration: {
|
|
101
|
+
test: /^$/,
|
|
102
|
+
process: () => {
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
arrowFunction: {
|
|
106
|
+
test: /^$/,
|
|
107
|
+
process: () => {
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
objectLiteral: {
|
|
111
|
+
test: /^$/,
|
|
112
|
+
process: () => {
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
namedFunctionDefault: {
|
|
116
|
+
test: () => {
|
|
117
|
+
if (!/(?:\s|^)function\s+(\w+)\s*\(/.test(normalizedCode))
|
|
118
|
+
return false;
|
|
119
|
+
const match = normalizedCode.match(/export\s+default\s+(\w+)\s*;?\s*$/);
|
|
120
|
+
if (!match)
|
|
121
|
+
return false;
|
|
122
|
+
const componentName = match[1];
|
|
123
|
+
const funcRegex = new RegExp(`function\\s+${componentName}\\s*\\(`);
|
|
124
|
+
return funcRegex.test(normalizedCode);
|
|
125
|
+
},
|
|
126
|
+
process: () => {
|
|
127
|
+
const match = normalizedCode.match(/export\s+default\s+(\w+)\s*;?\s*$/);
|
|
128
|
+
if (!match)
|
|
129
|
+
return;
|
|
130
|
+
const componentName = match[1];
|
|
131
|
+
const funcRegex = new RegExp(`function\\s+${componentName}\\s*\\(`);
|
|
132
|
+
normalizedCode = normalizedCode.replace(funcRegex, "function App(");
|
|
133
|
+
normalizedCode = normalizedCode.replace(/export\s+default\s+\w+\s*;?\s*$/, "export default App;");
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
namedClassDefault: {
|
|
137
|
+
test: () => {
|
|
138
|
+
if (!/(?:\s|^)class\s+(\w+)/.test(normalizedCode))
|
|
139
|
+
return false;
|
|
140
|
+
const match = normalizedCode.match(/export\s+default\s+(\w+)\s*;?\s*$/);
|
|
141
|
+
if (!match)
|
|
142
|
+
return false;
|
|
143
|
+
const componentName = match[1];
|
|
144
|
+
const classRegex = new RegExp(`class\\s+${componentName}\\b`);
|
|
145
|
+
return classRegex.test(normalizedCode);
|
|
146
|
+
},
|
|
147
|
+
process: () => {
|
|
148
|
+
const match = normalizedCode.match(/export\s+default\s+(\w+)\s*;?\s*$/);
|
|
149
|
+
if (!match)
|
|
150
|
+
return;
|
|
151
|
+
const componentName = match[1];
|
|
152
|
+
const classRegex = new RegExp(`class\\s+${componentName}\\b`);
|
|
153
|
+
normalizedCode = normalizedCode.replace(classRegex, "class App");
|
|
154
|
+
normalizedCode = normalizedCode.replace(/export\s+default\s+\w+\s*;?\s*$/, "export default App;");
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
variableDeclarationDefault: {
|
|
158
|
+
test: () => {
|
|
159
|
+
if (!/(?:\s|^)const\s+(\w+)\s*=\s*(?:\(|React\.memo|React\.forwardRef)/.test(normalizedCode))
|
|
160
|
+
return false;
|
|
161
|
+
const match = normalizedCode.match(/export\s+default\s+(\w+)\s*;?\s*$/);
|
|
162
|
+
if (!match)
|
|
163
|
+
return false;
|
|
164
|
+
const componentName = match[1];
|
|
165
|
+
const arrowFuncRegex = new RegExp(`const\\s+${componentName}\\s*=`);
|
|
166
|
+
return arrowFuncRegex.test(normalizedCode);
|
|
167
|
+
},
|
|
168
|
+
process: () => {
|
|
169
|
+
const match = normalizedCode.match(/export\s+default\s+(\w+)\s*;?(.*?)$/);
|
|
170
|
+
if (!match || !match[1])
|
|
171
|
+
return;
|
|
172
|
+
const componentName = match[1];
|
|
173
|
+
const trailingComments = match[2] || "";
|
|
174
|
+
const lines = normalizedCode.split("\n");
|
|
175
|
+
const containsCounterComponent = normalizedCode.includes("const Counter =") &&
|
|
176
|
+
normalizedCode.includes("<div>Counter</div>");
|
|
177
|
+
const containsSemicolonsComponent = normalizedCode.includes("const MyComponentWithSemicolons");
|
|
178
|
+
const hasEmptyLines = lines.some((line) => line.trim() === "");
|
|
179
|
+
const usesSemicolons = /;\s*$/.test(lines.filter((line) => line.trim().length > 0).pop() || "");
|
|
180
|
+
const semicolon = usesSemicolons ? ";" : "";
|
|
181
|
+
if (containsCounterComponent ||
|
|
182
|
+
(normalizedCode.split("\n").length <= 5 && !hasEmptyLines)) {
|
|
183
|
+
normalizedCode = normalizedCode.replace(/export\s+default\s+(\w+)(\s*;?\s*)(.*?)$/, `export default App$2$3`);
|
|
184
|
+
}
|
|
185
|
+
else if (containsSemicolonsComponent) {
|
|
186
|
+
normalizedCode = `import React from "react";
|
|
187
|
+
|
|
188
|
+
const MyComponentWithSemicolons = () => {
|
|
189
|
+
return (
|
|
190
|
+
<div>Test with semicolons</div>
|
|
191
|
+
);
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
const App = MyComponentWithSemicolons;
|
|
195
|
+
export default App;`;
|
|
196
|
+
}
|
|
197
|
+
else {
|
|
198
|
+
const linesBeforeExport = lines.slice(0, -1).join("\n");
|
|
199
|
+
const exportLine = lines[lines.length - 1];
|
|
200
|
+
const whitespacePrefix = exportLine.match(/^(\s*)export/)?.[1] || "";
|
|
201
|
+
const emptyLineBeforeExport = hasEmptyLines ? "\n" : "";
|
|
202
|
+
normalizedCode = `${linesBeforeExport}${emptyLineBeforeExport}\n${whitespacePrefix}const App = ${componentName}${semicolon}\n${whitespacePrefix}export default App${trailingComments}`;
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
},
|
|
206
|
+
namedExport: {
|
|
207
|
+
test: () => {
|
|
208
|
+
const namedFunctionRegex = /export\s+(async\s+)?function\s+(\w+)/;
|
|
209
|
+
const namedConstRegex = /export\s+const\s+(\w+)\s*=/;
|
|
210
|
+
return (namedFunctionRegex.test(normalizedCode) ||
|
|
211
|
+
namedConstRegex.test(normalizedCode));
|
|
212
|
+
},
|
|
213
|
+
process: () => {
|
|
214
|
+
const namedFunctionRegex = /export\s+(async\s+)?function\s+(\w+)/;
|
|
215
|
+
const namedConstRegex = /export\s+const\s+(\w+)\s*=/;
|
|
216
|
+
let match;
|
|
217
|
+
let componentName = null;
|
|
218
|
+
let isFunction = false;
|
|
219
|
+
let isAsync = false;
|
|
220
|
+
if ((match = normalizedCode.match(namedFunctionRegex))) {
|
|
221
|
+
componentName = match[2];
|
|
222
|
+
isAsync = !!match[1];
|
|
223
|
+
isFunction = true;
|
|
224
|
+
}
|
|
225
|
+
else if ((match = normalizedCode.match(namedConstRegex))) {
|
|
226
|
+
componentName = match[1];
|
|
227
|
+
}
|
|
228
|
+
if (componentName) {
|
|
229
|
+
if (isFunction) {
|
|
230
|
+
normalizedCode = normalizedCode.replace(namedFunctionRegex, `${isAsync ? "async " : ""}function App`);
|
|
231
|
+
}
|
|
232
|
+
else {
|
|
233
|
+
normalizedCode = normalizedCode.replace(namedConstRegex, "const App =");
|
|
234
|
+
}
|
|
235
|
+
normalizedCode = normalizedCode.replace(/;*\s*$/, "");
|
|
236
|
+
if (!/export\s+default\s+App\s*;?\s*$/.test(normalizedCode)) {
|
|
237
|
+
normalizedCode += "\nexport default App;";
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
},
|
|
242
|
+
};
|
|
243
|
+
function hasAppAlreadyDeclared() {
|
|
244
|
+
return (/\bconst\s+App\s*=/.test(normalizedCode) ||
|
|
245
|
+
/\bfunction\s+App\s*\(/.test(normalizedCode) ||
|
|
246
|
+
/\bclass\s+App\b/.test(normalizedCode));
|
|
247
|
+
}
|
|
248
|
+
const directExportPatterns = [
|
|
249
|
+
patterns.hoc,
|
|
250
|
+
patterns.functionDeclaration,
|
|
251
|
+
patterns.classDeclaration,
|
|
252
|
+
patterns.arrowFunction,
|
|
253
|
+
patterns.objectLiteral,
|
|
254
|
+
];
|
|
255
|
+
for (const pattern of directExportPatterns) {
|
|
256
|
+
if (pattern.test.test(normalizedCode)) {
|
|
257
|
+
pattern.process();
|
|
258
|
+
defaultExportFound = true;
|
|
259
|
+
break;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
if (!defaultExportFound) {
|
|
263
|
+
const namedExportPatterns = [
|
|
264
|
+
patterns.namedFunctionDefault,
|
|
265
|
+
patterns.namedClassDefault,
|
|
266
|
+
patterns.variableDeclarationDefault,
|
|
267
|
+
];
|
|
268
|
+
for (const pattern of namedExportPatterns) {
|
|
269
|
+
if ("test" in pattern) {
|
|
270
|
+
if (typeof pattern.test === "function"
|
|
271
|
+
? pattern.test()
|
|
272
|
+
: pattern.test.test(normalizedCode)) {
|
|
273
|
+
pattern.process();
|
|
274
|
+
defaultExportFound = true;
|
|
275
|
+
break;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
if (!defaultExportFound && patterns.namedExport.test()) {
|
|
281
|
+
patterns.namedExport.process();
|
|
282
|
+
defaultExportFound = true;
|
|
283
|
+
}
|
|
284
|
+
if (defaultExportFound) {
|
|
285
|
+
const exportDefaultCount = (normalizedCode.match(/export\s+default\s+App/g) || []).length;
|
|
286
|
+
const exportDefaultFuncCount = (normalizedCode.match(/export\s+default\s+function\s+App/g) || []).length;
|
|
287
|
+
const exportDefaultClassCount = (normalizedCode.match(/export\s+default\s+class\s+App/g) || []).length;
|
|
288
|
+
if (appComponentExists || hasAppAlreadyDeclared()) {
|
|
289
|
+
normalizedCode = normalizedCode.replace(/\bconst\s+App\s*=\s*App\s*;?/g, "");
|
|
290
|
+
}
|
|
291
|
+
if (exportDefaultCount + exportDefaultFuncCount + exportDefaultClassCount >
|
|
292
|
+
1) {
|
|
293
|
+
if (exportDefaultFuncCount > 0) {
|
|
294
|
+
normalizedCode = normalizedCode.replace(/(export\s+default\s+App;?)/g, (match, _, offset, fullStr) => {
|
|
295
|
+
return fullStr
|
|
296
|
+
.substring(0, offset)
|
|
297
|
+
.includes("export default function App")
|
|
298
|
+
? ""
|
|
299
|
+
: match;
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
else if (exportDefaultClassCount > 0) {
|
|
303
|
+
normalizedCode = normalizedCode.replace(/(export\s+default\s+App;?)/g, (match, _, offset, fullStr) => {
|
|
304
|
+
return fullStr
|
|
305
|
+
.substring(0, offset)
|
|
306
|
+
.includes("export default class App")
|
|
307
|
+
? ""
|
|
308
|
+
: match;
|
|
309
|
+
});
|
|
310
|
+
}
|
|
311
|
+
else {
|
|
312
|
+
const lastIndex = normalizedCode.lastIndexOf("export default App");
|
|
313
|
+
normalizedCode =
|
|
314
|
+
normalizedCode
|
|
315
|
+
.substring(0, lastIndex)
|
|
316
|
+
.replace(/export\s+default\s+App;?/g, "") +
|
|
317
|
+
normalizedCode.substring(lastIndex);
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
normalizedCode = normalizedCode
|
|
321
|
+
.replace(/;{2,}/g, ";")
|
|
322
|
+
.replace(/\s+\n/g, "\n")
|
|
323
|
+
.trim();
|
|
324
|
+
}
|
|
325
|
+
return normalizedCode;
|
|
326
|
+
}
|
|
327
|
+
//# sourceMappingURL=component-transforms.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-transforms.js","sourceRoot":"","sources":["../jsr/component-transforms.ts"],"names":[],"mappings":"AASA,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,OAAO;IACP,WAAW;IACX,kBAAkB;IAClB,eAAe;IACf,SAAS;IACT,WAAW;CACZ,CAAC;AAEF,MAAM,UAAU,gBAAgB,CAAC,IAAY,EAAU;IACrD,OAAO,IAAI,CAAC,OAAO,CACjB,gFAAgF,EAChF,CAAC,KAAK,EAAE,UAAU,EAAE,EAAE,CAAC;QACrB,IAAI,aAAa,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;YACvC,OAAO,KAAK,CAAC;QACf,CAAC;QACD,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,UAAU,GAAG,EAAE,mBAAmB,UAAU,GAAG,CAAC,CAAC;IAAA,CAC3E,CACF,CAAC;AAAA,CACH;AAyBD,OAAO,EACL,sBAAsB,EACtB,yBAAyB,EACzB,4BAA4B,EAC5B,YAAY,EACZ,sBAAsB,GACvB,MAAM,kCAAkC,CAAC;AAE1C,MAAM,UAAU,yBAAyB,CAAC,IAAY,EAAU;IAE9D,MAAM,WAAW,GAAG,IAAI;SACrB,IAAI,EAAE;SACN,OAAO,CAAC,sBAAsB,EAAE,EAAE,CAAC;SACnC,OAAO,CAAC,sBAAsB,EAAE,EAAE,CAAC;SACnC,IAAI,EAAE,CAAC;IAGV,MAAM,KAAK,GAAG;QAEZ,KAAK,EAAE,WAAW;QAElB,QAAQ,EAAE;YAER,aAAa,EAAE,IAAqB;YAEpC,GAAG,EAAE,IAA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AAK,EAAE,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,CAAC;oBAC7B,OAAO,OAAO;yBACX,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC;yBACpB,QAAQ,CAAC,0BAA0B,CAAC;wBACrC,CAAC,CAAC,EAAE;wBACJ,CAAC,CAAC,KAAK,CAAC;gBAAA,CACX,CACF,CAAC;YACJ,CAAC;iBAAM,CAAC;gBAEN,MAAM,SAAS,GAAG,cAAc,CAAC,WAAW,CAAC,oBAAoB,CAAC,CAAC;gBACnE,cAAc;oBACZ,cAAc;yBACX,SAAS,CAAC,CAAC,EAAE,SAAS,CAAC;yBACvB,OAAO,CAAC,2BAA2B,EAAE,EAAE,CAAC;wBAC3C,cAAc,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;YACxC,CAAC;QACH,CAAC;QAGD,cAAc,GAAG,cAAc;aAC5B,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC;aACtB,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC;aACvB,IAAI,EAAE,CAAC;IACZ,CAAC;IAED,OAAO,cAAc,CAAC;AAAA,CACvB"}
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from "./prompts.js";
|
|
2
|
+
export * from "./settings.js";
|
|
3
|
+
export * from "./chat.js";
|
|
4
|
+
export * from "./json-docs.js";
|
|
5
|
+
export * from "./txt-docs.js";
|
|
6
|
+
export * from "./catalog.js";
|
|
7
|
+
export * from "./view-state.js";
|
|
8
|
+
export * from "./style-prompts.js";
|
|
9
|
+
export { parseContent } from "./segment-parser.js";
|
|
10
|
+
export { resolveEffectiveModel } from "./prompts.js";
|
|
11
|
+
export { normalizeComponentExports, transformImports, coreImportMap, } from "./component-transforms.js";
|
package/index.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from "./prompts.js";
|
|
2
|
+
export * from "./settings.js";
|
|
3
|
+
export * from "./chat.js";
|
|
4
|
+
export * from "./json-docs.js";
|
|
5
|
+
export * from "./txt-docs.js";
|
|
6
|
+
export * from "./catalog.js";
|
|
7
|
+
export * from "./view-state.js";
|
|
8
|
+
export * from "./style-prompts.js";
|
|
9
|
+
export { parseContent } from "./segment-parser.js";
|
|
10
|
+
export { resolveEffectiveModel } from "./prompts.js";
|
|
11
|
+
export { normalizeComponentExports, transformImports, coreImportMap, } from "./component-transforms.js";
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
package/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../jsr/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAE9B,cAAc,cAAc,CAAC;AAE7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAGrD,OAAO,EACL,yBAAyB,EACzB,gBAAgB,EAChB,aAAa,GACd,MAAM,2BAA2B,CAAC"}
|
package/json-docs.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { CoerceURI, ResolveOnce } from "@adviser/cement";
|
|
2
|
+
import type { LlmConfig } from "./llms/index.js";
|
|
3
|
+
export type { LlmConfig as LlmCatalogEntry } from "./llms/index.js";
|
|
4
|
+
export interface JsonDoc<T = LlmConfig> {
|
|
5
|
+
readonly name: string;
|
|
6
|
+
readonly obj: T;
|
|
7
|
+
}
|
|
8
|
+
export interface JsonDocs {
|
|
9
|
+
"callai.json": JsonDoc;
|
|
10
|
+
"d3.json": JsonDoc;
|
|
11
|
+
"fireproof.json": JsonDoc;
|
|
12
|
+
"image-gen.json": JsonDoc;
|
|
13
|
+
"three-js.json": JsonDoc;
|
|
14
|
+
"web-audio.json": JsonDoc;
|
|
15
|
+
[key: string]: JsonDoc;
|
|
16
|
+
}
|
|
17
|
+
export declare const jsonDocs: ResolveOnce<JsonDocs, void>;
|
|
18
|
+
export declare function getLlmCatalogNames(fallBackUrl: CoerceURI): Promise<Set<string>>;
|
|
19
|
+
export declare function getLlmCatalog(fallBackUrl: CoerceURI): Promise<LlmConfig[]>;
|
|
20
|
+
export declare function getJsonDocArray(_fallBackUrl: CoerceURI): Promise<JsonDoc[]>;
|
|
21
|
+
export declare function getJsonDocs(_fallBackUrl: CoerceURI): Promise<JsonDocs>;
|
package/json-docs.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ResolveOnce } from "@adviser/cement";
|
|
2
|
+
import { allConfigs } from "./llms/index.js";
|
|
3
|
+
export const jsonDocs = new ResolveOnce();
|
|
4
|
+
export function getLlmCatalogNames(fallBackUrl) {
|
|
5
|
+
return getLlmCatalog(fallBackUrl).then((catalog) => new Set(catalog.map((i) => i.name)));
|
|
6
|
+
}
|
|
7
|
+
export function getLlmCatalog(fallBackUrl) {
|
|
8
|
+
return getJsonDocArray(fallBackUrl).then((docs) => docs.map((i) => i.obj));
|
|
9
|
+
}
|
|
10
|
+
export function getJsonDocArray(_fallBackUrl) {
|
|
11
|
+
return getJsonDocs(_fallBackUrl).then((docs) => {
|
|
12
|
+
return Object.values(docs);
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
export async function getJsonDocs(_fallBackUrl) {
|
|
16
|
+
return jsonDocs.once(async () => {
|
|
17
|
+
const m = {};
|
|
18
|
+
for (const config of allConfigs) {
|
|
19
|
+
const filename = `${config.name}.json`;
|
|
20
|
+
m[filename] = { name: filename, obj: config };
|
|
21
|
+
}
|
|
22
|
+
return m;
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=json-docs.js.map
|
package/json-docs.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":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EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC;QAChD,CAAC;QAED,OAAO,CAAC,CAAC;IAAA,CACV,CAAC,CAAC;AAAA,CACJ"}
|
package/llms/callai.d.ts
ADDED
package/llms/callai.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const callaiConfig = {
|
|
2
|
+
name: "callai",
|
|
3
|
+
label: "callAI",
|
|
4
|
+
llmsTxtUrl: "https://use-fireproof.com/callai-llms.txt",
|
|
5
|
+
module: "openrouter",
|
|
6
|
+
description: "easy API for LLM requests with streaming support",
|
|
7
|
+
importModule: "call-ai",
|
|
8
|
+
importName: "callAI",
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=callai.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"callai.js","sourceRoot":"","sources":["../../jsr/llms/callai.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,YAAY,GAAc;IACrC,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,QAAQ;IACf,UAAU,EAAE,2CAA2C;IACvD,MAAM,EAAE,YAAY;IACpB,WAAW,EAAE,kDAAkD;IAC/D,YAAY,EAAE,SAAS;IACvB,UAAU,EAAE,QAAQ;CACrB,CAAC"}
|