@vibes.diy/prompts 2.2.9 → 2.2.11

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 (117) hide show
  1. package/index.d.ts +1 -0
  2. package/index.js +1 -0
  3. package/index.js.map +1 -1
  4. package/json-docs.d.ts +1 -1
  5. package/llms/fireproof.md +148 -0
  6. package/llms/image-gen.d.ts +2 -0
  7. package/llms/image-gen.js +9 -0
  8. package/llms/image-gen.js.map +1 -0
  9. package/llms/image-gen.md +102 -0
  10. package/llms/index.d.ts +1 -1
  11. package/llms/index.js +3 -3
  12. package/llms/types.d.ts +2 -2
  13. package/llms/web-audio.js +0 -2
  14. package/llms/web-audio.js.map +1 -1
  15. package/llms/web-audio.md +3 -0
  16. package/package.json +3 -3
  17. package/prompts.d.ts +6 -0
  18. package/prompts.js +37 -4
  19. package/prompts.js.map +1 -1
  20. package/settings.d.ts +1 -0
  21. package/system-prompt-initial.md +2 -2
  22. package/system-prompt.md +3 -3
  23. package/themes/aether.md +41 -0
  24. package/themes/archive.md +43 -0
  25. package/themes/atelier.md +42 -0
  26. package/themes/atlas.md +42 -0
  27. package/themes/broadsheet.md +20 -0
  28. package/themes/brutalist.md +208 -0
  29. package/themes/capsule.md +47 -0
  30. package/themes/carbon.md +42 -0
  31. package/themes/chrome.md +132 -0
  32. package/themes/chrono.md +33 -0
  33. package/themes/codex.md +45 -0
  34. package/themes/computer-angel-heaven.md +57 -0
  35. package/themes/console.md +46 -0
  36. package/themes/default.md +96 -0
  37. package/themes/desktop.md +49 -0
  38. package/themes/dial.md +46 -0
  39. package/themes/dossier.md +35 -0
  40. package/themes/edge.md +39 -0
  41. package/themes/exemplars/aether/App.jsx +224 -0
  42. package/themes/exemplars/archive/App.jsx +222 -0
  43. package/themes/exemplars/atelier/App.jsx +224 -0
  44. package/themes/exemplars/atlas/App.jsx +216 -0
  45. package/themes/exemplars/broadsheet/App.jsx +216 -0
  46. package/themes/exemplars/brutalist/App.jsx +290 -0
  47. package/themes/exemplars/capsule/App.jsx +216 -0
  48. package/themes/exemplars/carbon/App.jsx +216 -0
  49. package/themes/exemplars/chrome/App.jsx +253 -0
  50. package/themes/exemplars/chrono/App.jsx +222 -0
  51. package/themes/exemplars/codex/App.jsx +224 -0
  52. package/themes/exemplars/computer-angel-heaven/App.jsx +224 -0
  53. package/themes/exemplars/console/App.jsx +216 -0
  54. package/themes/exemplars/default/App.jsx +219 -0
  55. package/themes/exemplars/desktop/App.jsx +224 -0
  56. package/themes/exemplars/dial/App.jsx +216 -0
  57. package/themes/exemplars/dossier/App.jsx +224 -0
  58. package/themes/exemplars/edge/App.jsx +216 -0
  59. package/themes/exemplars/guild/App.jsx +224 -0
  60. package/themes/exemplars/hearth/App.jsx +224 -0
  61. package/themes/exemplars/industrial/App.jsx +224 -0
  62. package/themes/exemplars/matrix/App.jsx +224 -0
  63. package/themes/exemplars/mesh/App.jsx +222 -0
  64. package/themes/exemplars/neomario/App.jsx +222 -0
  65. package/themes/exemplars/neon/App.jsx +224 -0
  66. package/themes/exemplars/nexus/App.jsx +216 -0
  67. package/themes/exemplars/opus/App.jsx +224 -0
  68. package/themes/exemplars/orbit/App.jsx +224 -0
  69. package/themes/exemplars/palate/App.jsx +224 -0
  70. package/themes/exemplars/pitch/App.jsx +222 -0
  71. package/themes/exemplars/poster/App.jsx +222 -0
  72. package/themes/exemplars/proof/App.jsx +224 -0
  73. package/themes/exemplars/recon/App.jsx +216 -0
  74. package/themes/exemplars/rift/App.jsx +224 -0
  75. package/themes/exemplars/rune/App.jsx +224 -0
  76. package/themes/exemplars/scrapbook/App.jsx +222 -0
  77. package/themes/exemplars/sensor/App.jsx +224 -0
  78. package/themes/exemplars/signal/App.jsx +222 -0
  79. package/themes/exemplars/slab/App.jsx +224 -0
  80. package/themes/exemplars/specimen/App.jsx +222 -0
  81. package/themes/exemplars/terminal/App.jsx +224 -0
  82. package/themes/exemplars/vault/App.jsx +222 -0
  83. package/themes/exemplars/winter-sports/App.jsx +224 -0
  84. package/themes/exemplars/zine/App.jsx +214 -0
  85. package/themes/guild.md +44 -0
  86. package/themes/hearth.md +45 -0
  87. package/themes/index.d.ts +11 -0
  88. package/themes/index.js +272 -0
  89. package/themes/index.js.map +1 -0
  90. package/themes/industrial.md +37 -0
  91. package/themes/matrix.md +41 -0
  92. package/themes/mesh.md +42 -0
  93. package/themes/neomario.md +47 -0
  94. package/themes/neon.md +48 -0
  95. package/themes/nexus.md +40 -0
  96. package/themes/opus.md +61 -0
  97. package/themes/orbit.md +46 -0
  98. package/themes/palate.md +35 -0
  99. package/themes/pitch.md +39 -0
  100. package/themes/poster.md +39 -0
  101. package/themes/proof.md +41 -0
  102. package/themes/recon.md +39 -0
  103. package/themes/rift.md +45 -0
  104. package/themes/rune.md +44 -0
  105. package/themes/scrapbook.md +43 -0
  106. package/themes/sensor.md +42 -0
  107. package/themes/signal.md +37 -0
  108. package/themes/slab.md +35 -0
  109. package/themes/specimen.md +21 -0
  110. package/themes/terminal.md +39 -0
  111. package/themes/vault.md +41 -0
  112. package/themes/winter-sports.md +39 -0
  113. package/themes/zine.md +40 -0
  114. package/llms/img-vibes.d.ts +0 -2
  115. package/llms/img-vibes.js +0 -9
  116. package/llms/img-vibes.js.map +0 -1
  117. package/llms/img-vibes.md +0 -167
package/index.d.ts CHANGED
@@ -4,6 +4,7 @@ export * from "./chat.js";
4
4
  export * from "./json-docs.js";
5
5
  export * from "./view-state.js";
6
6
  export * from "./style-prompts.js";
7
+ export * from "./themes/index.js";
7
8
  export { parseContent } from "./segment-parser.js";
8
9
  export { resolveEffectiveModel } from "./prompts.js";
9
10
  export { normalizeComponentExports, transformImports, coreImportMap } from "./component-transforms.js";
package/index.js CHANGED
@@ -4,6 +4,7 @@ export * from "./chat.js";
4
4
  export * from "./json-docs.js";
5
5
  export * from "./view-state.js";
6
6
  export * from "./style-prompts.js";
7
+ export * from "./themes/index.js";
7
8
  export { parseContent } from "./segment-parser.js";
8
9
  export { resolveEffectiveModel } from "./prompts.js";
9
10
  export { normalizeComponentExports, transformImports, coreImportMap } from "./component-transforms.js";
package/index.js.map CHANGED
@@ -1 +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;AAE/B,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,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAEvG,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC"}
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;AAE/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAGrD,OAAO,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAEvG,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC"}
package/json-docs.d.ts CHANGED
@@ -8,7 +8,7 @@ export interface JsonDocs {
8
8
  "callai.json": JsonDoc;
9
9
  "d3.json": JsonDoc;
10
10
  "fireproof.json": JsonDoc;
11
- "img-vibes.json": JsonDoc;
11
+ "image-gen.json": JsonDoc;
12
12
  "three-js.json": JsonDoc;
13
13
  "web-audio.json": JsonDoc;
14
14
  [key: string]: JsonDoc;
package/llms/fireproof.md CHANGED
@@ -274,6 +274,80 @@ database.subscribe((changes) => {
274
274
  }, true);
275
275
  ```
276
276
 
277
+ ### Working with Files
278
+
279
+ Fireproof documents carry attachments under `_files`. Save a `File` (or `Blob`) by assigning it to a key on `_files`, and Fireproof handles upload, durable storage, and URL minting for you.
280
+
281
+ #### Attaching files on save
282
+
283
+ ```jsx
284
+ const { useDocument } = useFireproof("photo-album");
285
+ const { doc, merge, submit } = useDocument({ _files: {}, caption: "" });
286
+
287
+ // In a file input change handler:
288
+ const onPick = (e) => merge({ _files: { photo: e.target.files[0] } });
289
+ ```
290
+
291
+ `File` and `Blob` are both accepted. Submit the document the normal way (`submit()` from `useDocument`, or `database.put(doc)`).
292
+
293
+ For multi-file uploads (e.g. `<input multiple>`), build the `_files` map keyed by filename:
294
+
295
+ ```jsx
296
+ const onPickMany = (e) => {
297
+ const next = {};
298
+ for (const f of e.target.files) next[f.name] = f;
299
+ merge({ _files: next });
300
+ };
301
+ ```
302
+
303
+ Iterate the map with `Object.entries(doc._files)` to render or process each entry (see "Displaying files" below).
304
+
305
+ #### Displaying files
306
+
307
+ After a doc round-trips through the database, each `_files.<key>` entry carries a stable `url` you can drop straight into any browser-native subresource — `<img>`, `<video>`, `<audio>`, CSS `background-image`, `@font-face`, `<a download>`, etc.
308
+
309
+ ```jsx
310
+ {
311
+ doc._files.photo && <img src={doc._files.photo.url} alt={doc.caption} />;
312
+ }
313
+ ```
314
+
315
+ For galleries with arbitrary keys, iterate the map:
316
+
317
+ ```jsx
318
+ {
319
+ Object.entries(doc._files ?? {}).map(([key, meta]) => <img key={key} src={meta.url} alt={key} />);
320
+ }
321
+ ```
322
+
323
+ The platform-minted `url` is stable for the lifetime of that file, so the browser cache works normally.
324
+
325
+ #### Reading raw bytes
326
+
327
+ When you need the bytes themselves (transcoding, hashing, ML features, custom downloads), call `meta.file()` on the entry — it returns a `Promise<File>`:
328
+
329
+ ```jsx
330
+ const f = await doc._files.photo.file();
331
+ const buf = await f.arrayBuffer();
332
+ const hash = await crypto.subtle.digest("SHA-256", buf);
333
+ ```
334
+
335
+ For plain `<img>` rendering, prefer `meta.url` — it skips one fetch and lets the browser handle cache and decoding.
336
+
337
+ #### Each `_files.<key>` entry shape
338
+
339
+ After save + round-trip, an entry has:
340
+
341
+ ```ts
342
+ {
343
+ url: string; // ready-to-use URL for <img>/<video>/etc.
344
+ type: string; // MIME type
345
+ size: number; // bytes
346
+ lastModified?: number; // epoch ms (for File only)
347
+ file: () => Promise<File>; // bytes on demand
348
+ }
349
+ ```
350
+
277
351
  ### Form Validation
278
352
 
279
353
  You can use React's `useState` to manage validation states and error messages. Validate inputs at the UI level before allowing submission.
@@ -386,3 +460,77 @@ export default function App() {
386
460
  ```
387
461
 
388
462
  IMPORTANT: Don't use `useState()` on form data, instead use `merge()` and `submit()` from `useDocument`. Only use `useState` for ephemeral UI state (active tabs, open/closed panels, cursor positions). Keep your data model in Fireproof.
463
+
464
+ ## Example Image Uploader
465
+
466
+ This pattern uses `_files` end-to-end: save a `File` directly, render thumbnails with `<img src={meta.url}>`.
467
+
468
+ ```jsx
469
+ import React from "react";
470
+ import { useFireproof } from "use-fireproof";
471
+
472
+ export default function App() {
473
+ // 1. Hooks and document shapes
474
+ const { useDocument, useLiveQuery } = useFireproof("image-uploads");
475
+
476
+ const { doc, merge, submit } = useDocument({
477
+ _files: {},
478
+ caption: "",
479
+ type: "upload",
480
+ createdAt: Date.now(),
481
+ });
482
+
483
+ const { docs } = useLiveQuery("type", { key: "upload", descending: true, limit: 12 });
484
+
485
+ // 2. Event handlers
486
+ const onPickFile = (e) => {
487
+ const f = e.target.files?.[0];
488
+ if (f) merge({ _files: { photo: f } });
489
+ };
490
+
491
+ const onSubmit = (e) => {
492
+ e.preventDefault();
493
+ if (!doc._files?.photo) return;
494
+ submit();
495
+ };
496
+
497
+ // 3. ClassNames
498
+ const c = {
499
+ bg: "bg-white",
500
+ card: "bg-gray-50",
501
+ border: "border-gray-200",
502
+ accent: "bg-blue-500 hover:bg-blue-600",
503
+ text: "text-gray-700",
504
+ };
505
+
506
+ // 4. JSX return
507
+ return (
508
+ <div className={`p-6 max-w-lg mx-auto ${c.bg} shadow-lg rounded-lg`}>
509
+ <h2 className="text-2xl font-bold mb-4">Image Uploader</h2>
510
+ <form onSubmit={onSubmit} className="space-y-3">
511
+ <input type="file" accept="image/*" onChange={onPickFile} className={`w-full ${c.border} border rounded p-2`} />
512
+ <input
513
+ type="text"
514
+ placeholder="Caption"
515
+ value={doc.caption}
516
+ onChange={(e) => merge({ caption: e.target.value })}
517
+ className={`w-full ${c.border} border rounded p-2`}
518
+ />
519
+ <button type="submit" className={`px-4 py-2 ${c.accent} text-white rounded`}>
520
+ Upload
521
+ </button>
522
+ </form>
523
+
524
+ <h3 className="text-lg font-semibold mt-6">Recent Uploads</h3>
525
+ <div className="grid grid-cols-2 gap-4 mt-2">
526
+ {docs.map((d) => (
527
+ <div key={d._id} className={`${c.border} border p-2 rounded shadow-sm ${c.card}`}>
528
+ {d._files?.photo?.url && <img src={d._files.photo.url} alt={d.caption || "upload"} className="w-full h-auto rounded" />}
529
+ <p className={`text-sm ${c.text} mt-2`}>{d.caption || "No caption"}</p>
530
+ </div>
531
+ ))}
532
+ </div>
533
+ </div>
534
+ );
535
+ }
536
+ ```
@@ -0,0 +1,2 @@
1
+ import type { LlmConfig } from "./types.js";
2
+ export declare const imageGenConfig: LlmConfig;
@@ -0,0 +1,9 @@
1
+ export const imageGenConfig = {
2
+ name: "image-gen",
3
+ label: "Image Generation",
4
+ module: "OpenAi",
5
+ description: "Generate and edit images",
6
+ importModule: "img-gen",
7
+ importName: "ImgGen",
8
+ };
9
+ //# sourceMappingURL=image-gen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image-gen.js","sourceRoot":"","sources":["../../jsr/llms/image-gen.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,cAAc,GAAc;IACvC,IAAI,EAAE,WAAW;IACjB,KAAK,EAAE,kBAAkB;IACzB,MAAM,EAAE,QAAQ;IAChB,WAAW,EAAE,0BAA0B;IACvC,YAAY,EAAE,SAAS;IACvB,UAAU,EAAE,QAAQ;CACrB,CAAC"}
@@ -0,0 +1,102 @@
1
+ # ImgGen Component
2
+
3
+ Generate and edit images from a text prompt. Each generated image lands as a file ref on the doc — display reads the platform-minted URL via `_files`.
4
+
5
+ ## Basic Usage
6
+
7
+ ```jsx
8
+ import { ImgGen } from "use-vibes";
9
+
10
+ function MyComponent() {
11
+ return <ImgGen prompt="A sunset over mountains" />;
12
+ }
13
+ ```
14
+
15
+ `<ImgGen>` writes the doc into a Fireproof database (default name `"ImgGen"`). The doc carries `_files.v1 = { uploadId, type, size }` and the platform mints `_files.v1.url` on read. Render the image with:
16
+
17
+ ```jsx
18
+ const ver = doc.versions?.[doc.currentVersion ?? 0];
19
+ const meta = ver?.id ? doc._files?.[ver.id] : undefined;
20
+ return <img src={meta?.url} alt={doc.prompt} />;
21
+ ```
22
+
23
+ This is the same `_files`-shape contract documented in `fireproof.md`'s "Working with Files" section — read it first if you have not seen the platform's file/URL story.
24
+
25
+ ## Editing an Uploaded Image
26
+
27
+ Pass a `File` object via `images` to run img2img:
28
+
29
+ ```jsx
30
+ import { useState } from "react";
31
+ import { ImgGen } from "use-vibes";
32
+
33
+ function MyComponent() {
34
+ const [file, setFile] = useState(null);
35
+ return (
36
+ <div>
37
+ <input type="file" accept="image/*" onChange={(e) => setFile(e.target.files[0])} />
38
+ {file && <ImgGen prompt="Make it look like a watercolor painting" images={[file]} />}
39
+ </div>
40
+ );
41
+ }
42
+ ```
43
+
44
+ The input image is automatically resized (max 1024px) and compressed as JPEG before sending. img2img is currently supported on `prodia/*` models.
45
+
46
+ ## Loading a Specific Doc
47
+
48
+ ```jsx
49
+ <ImgGen _id="my-image-id" database={database} />
50
+ ```
51
+
52
+ If the doc has a `prompt` but no `_files` yet, the component generates one.
53
+
54
+ ## Gallery Pattern
55
+
56
+ Browse stored images with `useLiveQuery`:
57
+
58
+ ```jsx
59
+ import { useFireproof } from "use-fireproof";
60
+ import { ImgGen } from "use-vibes";
61
+
62
+ function MyComponent() {
63
+ const { useLiveQuery } = useFireproof("ImgGen");
64
+ const { docs } = useLiveQuery("type", { key: "image", descending: true });
65
+
66
+ return (
67
+ <div>
68
+ <ImgGen prompt="A colorful landscape" />
69
+ {docs.map((doc) => {
70
+ const ver = doc.versions?.[doc.currentVersion ?? 0];
71
+ const meta = ver?.id ? doc._files?.[ver.id] : undefined;
72
+ return <img key={doc._id} src={meta?.url} alt={doc.prompt} width={128} />;
73
+ })}
74
+ </div>
75
+ );
76
+ }
77
+ ```
78
+
79
+ ## Caching and Versions
80
+
81
+ - Same prompt produces a deterministic `_id` (hash-based), so results are cached across reloads.
82
+ - Each image has a regenerate button that appends a new version (writes a new `_files.v<N>` entry).
83
+ - Prev / next controls navigate between stored versions.
84
+ - Set `showControls={false}` to hide regenerate and version navigation.
85
+
86
+ ## Choosing a Model
87
+
88
+ ```jsx
89
+ <ImgGen prompt="An astronaut riding a horse" model="openai/gpt-5-image-mini" />
90
+ ```
91
+
92
+ Model ids follow the `provider/model-name` form from the platform's model catalog. Unknown ids surface as an error in the component's error UI.
93
+
94
+ #### Props
95
+
96
+ - `prompt`: text prompt (required unless `_id` is provided)
97
+ - `images`: array of `File` objects for img2img (uses first image)
98
+ - `_id`: load a specific doc instead of generating
99
+ - `database`: Fireproof db name or instance (default `"ImgGen"`)
100
+ - `className`, `alt`, `style`: standard image styling
101
+ - `showControls`: toggle regenerate + version nav (default `true`)
102
+ - `model`: override the image-gen model for this component
package/llms/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export { callaiConfig } from "./callai.js";
2
2
  export { fireproofConfig } from "./fireproof.js";
3
- export { imgVibesConfig } from "./img-vibes.js";
3
+ export { imageGenConfig } from "./image-gen.js";
4
4
  export { webAudioConfig } from "./web-audio.js";
5
5
  export { d3Config } from "./d3.js";
6
6
  export { threeJsConfig } from "./three-js.js";
package/llms/index.js CHANGED
@@ -1,14 +1,14 @@
1
1
  import { callaiConfig } from "./callai.js";
2
2
  import { fireproofConfig } from "./fireproof.js";
3
- import { imgVibesConfig } from "./img-vibes.js";
3
+ import { imageGenConfig } from "./image-gen.js";
4
4
  import { webAudioConfig } from "./web-audio.js";
5
5
  import { d3Config } from "./d3.js";
6
6
  import { threeJsConfig } from "./three-js.js";
7
7
  export { callaiConfig } from "./callai.js";
8
8
  export { fireproofConfig } from "./fireproof.js";
9
- export { imgVibesConfig } from "./img-vibes.js";
9
+ export { imageGenConfig } from "./image-gen.js";
10
10
  export { webAudioConfig } from "./web-audio.js";
11
11
  export { d3Config } from "./d3.js";
12
12
  export { threeJsConfig } from "./three-js.js";
13
- export const allConfigs = [callaiConfig, imgVibesConfig, webAudioConfig, d3Config, threeJsConfig, fireproofConfig];
13
+ export const allConfigs = [callaiConfig, imageGenConfig, webAudioConfig, d3Config, threeJsConfig, fireproofConfig];
14
14
  //# sourceMappingURL=index.js.map
package/llms/types.d.ts CHANGED
@@ -3,7 +3,7 @@ export interface LlmConfig {
3
3
  label: string;
4
4
  module: string;
5
5
  description: string;
6
- importModule: string;
7
- importName: string;
6
+ importModule?: string;
7
+ importName?: string;
8
8
  importType?: "named" | "namespace" | "default";
9
9
  }
package/llms/web-audio.js CHANGED
@@ -3,7 +3,5 @@ export const webAudioConfig = {
3
3
  label: "Web Audio API",
4
4
  module: "web-audio",
5
5
  description: "Web Audio fundamentals; echo/delay with effects in the feedback path; mic monitoring with a metronome; audio‑clock scheduling; timing design for multi‑channel drum machines and MIDI synths with accurate voice overlap.",
6
- importModule: "web-audio",
7
- importName: "WebAudioAPI",
8
6
  };
9
7
  //# sourceMappingURL=web-audio.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"web-audio.js","sourceRoot":"","sources":["../../jsr/llms/web-audio.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,cAAc,GAAc;IACvC,IAAI,EAAE,WAAW;IACjB,KAAK,EAAE,eAAe;IACtB,MAAM,EAAE,WAAW;IACnB,WAAW,EACT,2NAA2N;IAC7N,YAAY,EAAE,WAAW;IACzB,UAAU,EAAE,aAAa;CAC1B,CAAC"}
1
+ {"version":3,"file":"web-audio.js","sourceRoot":"","sources":["../../jsr/llms/web-audio.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,cAAc,GAAc;IACvC,IAAI,EAAE,WAAW;IACjB,KAAK,EAAE,eAAe;IACtB,MAAM,EAAE,WAAW;IACnB,WAAW,EACT,2NAA2N;CAC9N,CAAC"}
package/llms/web-audio.md CHANGED
@@ -2,6 +2,9 @@
2
2
 
3
3
  Authoritative source: Issue #228 research threads — comments 3192681700, 3192696052, 3192806626.
4
4
 
5
+ > **Web Audio is a browser built-in.** Use `window.AudioContext` (with the
6
+ > `window.webkitAudioContext` fallback) directly, gated on a user gesture as shown below.
7
+
5
8
  ## 1) Fundamentals and Core Nodes
6
9
 
7
10
  - AudioContext — master interface and clock (`audioCtx.currentTime`). Resume on a user gesture.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibes.diy/prompts",
3
- "version": "2.2.9",
3
+ "version": "2.2.11",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "description": "",
@@ -30,8 +30,8 @@
30
30
  "@fireproof/core-types-base": "~0.24.19",
31
31
  "@fireproof/core-types-protocols-cloud": "~0.24.19",
32
32
  "@fireproof/use-fireproof": "~0.24.19",
33
- "@vibes.diy/call-ai-v2": "^2.2.9",
34
- "@vibes.diy/use-vibes-types": "^2.2.9",
33
+ "@vibes.diy/call-ai-v2": "^2.2.11",
34
+ "@vibes.diy/use-vibes-types": "^2.2.11",
35
35
  "arktype": "~2.2.0",
36
36
  "json-schema-faker": "~0.6.1"
37
37
  },
package/prompts.d.ts CHANGED
@@ -39,6 +39,10 @@ export declare const preAllocSchema: {
39
39
  readonly type: "string";
40
40
  readonly description: "A short, vivid one-line description of what an icon for this app should depict \u2014 what it shows, not how it's drawn. Examples: 'a fox on a record player', 'a sailboat on a calm lake', 'a chef whisking eggs'. Don't mention colors, line weights, letters, numbers, or framing \u2014 those are added separately by the renderer.";
41
41
  };
42
+ readonly theme: {
43
+ readonly type: "string";
44
+ readonly description: "Optional theme slug from the theme catalog above. Pick one only if the user's prompt clearly implies a visual style (retro, brutalist, dark terminal, magazine, etc.). Leave empty/omit if no strong style signal.";
45
+ };
42
46
  };
43
47
  };
44
48
  export declare const preAllocParsed: import("arktype/internal/variants/object.ts").ObjectType<{
@@ -48,11 +52,13 @@ export declare const preAllocParsed: import("arktype/internal/variants/object.ts
48
52
  slug: string;
49
53
  }[];
50
54
  iconDescription: string;
55
+ theme?: string | undefined;
51
56
  }, {}>;
52
57
  export type PreAllocParsed = typeof preAllocParsed.infer;
53
58
  export interface SystemPromptResult {
54
59
  systemPrompt: string;
55
60
  skills: string[];
61
+ theme?: string;
56
62
  demoData: boolean;
57
63
  model: string;
58
64
  }
package/prompts.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { loadAsset, KeyedResolvOnce } from "@adviser/cement";
2
2
  import { getLlmCatalog, getLlmCatalogNames } from "./json-docs.js";
3
+ import { getThemeCatalogNames, vibesThemes } from "./themes/index.js";
3
4
  import { type } from "arktype";
4
5
  import { defaultStylePrompt } from "./style-prompts.js";
5
6
  export const DEFAULT_CODING_MODEL = "anthropic/claude-opus-4.5";
@@ -28,17 +29,23 @@ export async function resolveEffectiveModel(settingsDoc, vibeDoc) {
28
29
  return defaultCodingModel();
29
30
  }
30
31
  export async function getDefaultSkills() {
31
- return ["fireproof", "callai", "img-vibes", "web-audio"];
32
+ return ["fireproof", "callai", "image-gen", "web-audio"];
32
33
  }
33
34
  export async function makePreAllocUserMessage(userPrompt) {
34
35
  const catalog = await getLlmCatalog();
35
36
  const catalogText = catalog.map((l) => `- ${l.name}: ${l.description}`).join("\n");
37
+ const themeText = vibesThemes
38
+ .map((t) => `- ${t.slug}: ${t.name}${t.bodyFont ? ` (${t.bodyFont.replace(/['"]/g, "").split(",")[0].trim()})` : ""}`)
39
+ .join("\n");
36
40
  return [
37
- "Pick skills from this catalog that fit the user's app request, propose 3 title/slug pairs for naming, and propose a one-line icon subject.",
41
+ "Pick skills from this catalog that fit the user's app request, propose 3 title/slug pairs for naming, propose a one-line icon subject, and optionally pick a theme if a clear visual style is implied.",
38
42
  "",
39
43
  "Skill catalog:",
40
44
  catalogText,
41
45
  "",
46
+ "Theme catalog:",
47
+ themeText,
48
+ "",
42
49
  "User request:",
43
50
  userPrompt,
44
51
  ].join("\n");
@@ -66,19 +73,24 @@ export const preAllocSchema = {
66
73
  type: "string",
67
74
  description: "A short, vivid one-line description of what an icon for this app should depict — what it shows, not how it's drawn. Examples: 'a fox on a record player', 'a sailboat on a calm lake', 'a chef whisking eggs'. Don't mention colors, line weights, letters, numbers, or framing — those are added separately by the renderer.",
68
75
  },
76
+ theme: {
77
+ type: "string",
78
+ description: "Optional theme slug from the theme catalog above. Pick one only if the user's prompt clearly implies a visual style (retro, brutalist, dark terminal, magazine, etc.). Leave empty/omit if no strong style signal.",
79
+ },
69
80
  },
70
81
  };
71
82
  export const preAllocParsed = type({
72
83
  skills: type("string").array(),
73
84
  pairs: type({ title: "string", slug: "string" }).array(),
74
85
  iconDescription: "string",
86
+ "theme?": "string",
75
87
  });
76
88
  export function generateImportStatements(llms) {
77
89
  const seen = new Set();
78
90
  return llms
91
+ .filter((l) => Boolean(l.importModule && l.importName))
79
92
  .slice()
80
93
  .sort((a, b) => a.importModule.localeCompare(b.importModule))
81
- .filter((l) => l.importModule && l.importName)
82
94
  .filter((l) => {
83
95
  const key = `${l.importModule}:${l.importName}`;
84
96
  if (seen.has(key))
@@ -136,7 +148,26 @@ export async function makeBaseSystemPrompt(model, sessionDoc) {
136
148
  concatenatedLlmsTxts.push(`</${llm.label}-docs>`);
137
149
  }
138
150
  const concatenatedLlmsTxt = concatenatedLlmsTxts.join("\n");
139
- const stylePrompt = sessionDoc?.stylePrompt || defaultStylePrompt;
151
+ const themeCatalogNames = getThemeCatalogNames();
152
+ const requestedTheme = typeof sessionDoc?.theme === "string" ? sessionDoc.theme : undefined;
153
+ const validatedTheme = requestedTheme && themeCatalogNames.has(requestedTheme) ? requestedTheme : undefined;
154
+ let themeDesignSection = "";
155
+ if (validatedTheme) {
156
+ const rTheme = await keyedLoadAsset.get(`theme:${validatedTheme}`).once(async () => {
157
+ return loadAsset(`./themes/${validatedTheme}.md`, {
158
+ fallBackUrl: pkgBaseUrl,
159
+ basePath: () => import.meta.url,
160
+ mock: { fetch: sessionDoc.fetch },
161
+ });
162
+ });
163
+ if (rTheme.isErr()) {
164
+ console.warn(`Failed to load theme ${validatedTheme}:`, rTheme.Err());
165
+ }
166
+ else {
167
+ themeDesignSection = `<theme-design-md>\n${rTheme.Ok() ?? ""}\n</theme-design-md>`;
168
+ }
169
+ }
170
+ const stylePrompt = sessionDoc?.stylePrompt || (themeDesignSection ? "" : defaultStylePrompt);
140
171
  const demoDataLines = includeDemoData
141
172
  ? "\n- If your app has a function that uses callAI with a schema to save data, include a Demo Data button that calls that function with an example prompt. Don't write an extra function, use real app code so the data illustrates what it looks like to use the app.\n- Never have an instance of callAI that is only used to generate demo data, always use the same calls that are triggered by user actions in the app."
142
173
  : "";
@@ -151,12 +182,14 @@ export async function makeBaseSystemPrompt(model, sessionDoc) {
151
182
  .replaceAll("{{STYLE_PROMPT}}", stylePrompt)
152
183
  .replaceAll("{{DEMO_DATA}}", demoDataLines)
153
184
  .replaceAll("{{CONCATENATED_LLMS}}", concatenatedLlmsTxt)
185
+ .replaceAll("{{THEME_DESIGN}}", themeDesignSection)
154
186
  .replaceAll("{{TITLE_SECTION}}", titleSection)
155
187
  .replaceAll("{{USER_PROMPT}}", userPromptSection)
156
188
  .replaceAll("{{IMPORT_STATEMENTS}}", importStatements);
157
189
  return {
158
190
  systemPrompt,
159
191
  skills: selectedNames,
192
+ theme: validatedTheme,
160
193
  demoData: include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C;IACH,IAAI,KAAK,CAAC,KAAK,EAAE,EAAE,CAAC;QAClB,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;IACrC,CAAC;IACD,OAAO,KAAK,CAAC,EAAE,EAAE,CAAC;AACpB,CAAC"}
package/settings.d.ts CHANGED
@@ -5,6 +5,7 @@ export interface UserSettings {
5
5
  model?: string;
6
6
  showModelPickerInChat?: boolean;
7
7
  skills?: string[];
8
+ theme?: string;
8
9
  title?: string;
9
10
  demoData?: boolean;
10
11
  }
@@ -13,7 +13,7 @@ You are an AI assistant tasked with creating React components. You should create
13
13
  - Use Fireproof for data persistence
14
14
  - Use `callAI` to fetch AI, use schema like this: `JSON.parse(await callAI(prompt, { schema: { properties: { todos: { type: 'array', items: { type: 'string' } } } } }))` and save final responses as individual Fireproof documents.
15
15
  - Always show loading states during any async operation (callAI, fetch, database queries): use a useState boolean (e.g. `isLoading`), set it true before the call and false in .finally(). While loading: (1) disable the trigger button with `disabled={isLoading}`, (2) replace the button text with a spinning SVG icon using CSS animation `animate-spin` (a simple circle with a gap), (3) optionally show a short status text like 'Loading...' near the button. Never leave the user clicking a button with no visual feedback. Pattern: `setIsLoading(true); try { await callAI(...); } finally { setIsLoading(false); }`
16
- - For file uploads use drag and drop and store using the `doc._files` API
16
+ - For file uploads use drag and drop and store using the `doc._files` API; for AI image generation use `<ImgGen prompt="..." />`
17
17
  - Don't try to generate png or base64 data, use placeholder image APIs instead, like https://picsum.photos/400 where 400 is the square size
18
18
  - Never use emojis in the UI. Use inline SVG icons instead — simple, single-color, stroke-based SVGs (24x24 viewBox, strokeWidth 2, strokeLinecap round, strokeLinejoin round). Build icons directly in JSX, do not import icon libraries.
19
19
  - List data items on the main page of your app so users don't have to hunt for them
@@ -21,7 +21,7 @@ You are an AI assistant tasked with creating React components. You should create
21
21
  - Add small AI-powered suggestion buttons next to form field groups and empty states. When tapped, use callAI to generate example ideas and fill them in, so users can see what's possible without typing from scratch. Use the same callAI calls the app already makes for real functionality — don't create separate AI functions just for suggestions.{{DEMO_DATA}}
22
22
 
23
23
  {{CONCATENATED_LLMS}}
24
-
24
+ {{THEME_DESIGN}}
25
25
  {{TITLE_SECTION}}{{USER_PROMPT}}IMPORTANT: You are working in one JavaScript file (`App.jsx`). This is the **first turn** — `App.jsx` does not exist yet. You'll scaffold it once, then sculpt it through a rapid stream of small edits the user can watch land in real time.
26
26
 
27
27
  Before writing code, provide a title and brief description of the app. Then list the top 3 features that are the best fit for a mobile web database with real-time collaboration and describe a short planned workflow showing how those features connect into a coherent user experience.
package/system-prompt.md CHANGED
@@ -13,7 +13,7 @@ You are an AI assistant tasked with creating React components. You should create
13
13
  - Use Fireproof for data persistence
14
14
  - Use `callAI` to fetch AI, use schema like this: `JSON.parse(await callAI(prompt, { schema: { properties: { todos: { type: 'array', items: { type: 'string' } } } } }))` and save final responses as individual Fireproof documents.
15
15
  - Always show loading states during any async operation (callAI, fetch, database queries): use a useState boolean (e.g. `isLoading`), set it true before the call and false in .finally(). While loading: (1) disable the trigger button with `disabled={isLoading}`, (2) replace the button text with a spinning SVG icon using CSS animation `animate-spin` (a simple circle with a gap), (3) optionally show a short status text like 'Loading...' near the button. Never leave the user clicking a button with no visual feedback. Pattern: `setIsLoading(true); try { await callAI(...); } finally { setIsLoading(false); }`
16
- - For file uploads use drag and drop and store using the `doc._files` API
16
+ - For file uploads use drag and drop and store using the `doc._files` API; for AI image generation use `<ImgGen prompt="..." />`
17
17
  - Don't try to generate png or base64 data, use placeholder image APIs instead, like https://picsum.photos/400 where 400 is the square size
18
18
  - Never use emojis in the UI. Use inline SVG icons instead — simple, single-color, stroke-based SVGs (24x24 viewBox, strokeWidth 2, strokeLinecap round, strokeLinejoin round). Build icons directly in JSX, do not import icon libraries.
19
19
  - Consider and potentially reuse/extend code from previous responses if relevant
@@ -27,7 +27,7 @@ You are an AI assistant tasked with creating React components. You should create
27
27
  - Add small AI-powered suggestion buttons next to form field groups and empty states. When tapped, use callAI to generate example ideas and fill them in, so users can see what's possible without typing from scratch. Use the same callAI calls the app already makes for real functionality — don't create separate AI functions just for suggestions.{{DEMO_DATA}}
28
28
 
29
29
  {{CONCATENATED_LLMS}}
30
-
30
+ {{THEME_DESIGN}}
31
31
  {{TITLE_SECTION}}{{USER_PROMPT}}IMPORTANT: You are working in one JavaScript file (`App.jsx`). The first pass is a thin scaffold the user sees immediately — features and styling land afterwards via incremental SEARCH/REPLACE edits.
32
32
 
33
33
  Before writing code, provide a title and brief description of the app. Then list the top 3 features that are the best fit for a mobile web database with real-time collaboration and describe a short planned workflow showing how those features connect into a coherent user experience.
@@ -50,7 +50,7 @@ Every code block must be preceded by the file name on its own line. The file is
50
50
 
51
51
  Each `<<<<<<< SEARCH` snippet must match exactly one place in the current file (the stub `function FeatureN() {...}` is the natural target — include the whole function body for uniqueness). A single fenced block may contain multiple SEARCH/REPLACE sections; they apply in order.
52
52
 
53
- **Make each edit as small as syntactically valid.** The smallest valid SEARCH→REPLACE that produces a working app is the goal _not_ a finished feature in one shot. Each edit lands on the live preview within hundreds of milliseconds; small edits = many fast paints = the user sees the app evolve. Large edits = long pauses = the user sees nothing happen for seconds.
53
+ **Keep each edit small, but group a small handful of related changes together — not one tiny tweak per edit.** Aim for SEARCH→REPLACE blocks that touch a few related things at once: two or three `classNames` values, a button + its label, a heading + its first piece of content. The smallest _useful_ edit is the target, not the smallest possible one. Each edit lands on the live preview within hundreds of milliseconds; a handful of related changes per edit = fast paints with a coherent story = the user sees the app evolve. Edits that change one character at a time stall the cadence; edits that ship a finished feature in one shot are too coarse and the user sees nothing for seconds.
54
54
 
55
55
  **Bias early edits toward visible changes; save data wiring and state for the end.** Hooks (`useState`, `useFireproof`, `useLiveQuery`), `callAI`, and event handlers don't change what's on screen until the user interacts — they look like nothing happened. Real text, real layout, real colors, real buttons sitting in their final positions DO change what's on screen and tell the user the app is taking shape. Order the edits accordingly:
56
56