@vibes.diy/prompts 2.2.10 → 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 (112) 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/image-gen.d.ts +2 -0
  6. package/llms/image-gen.js +9 -0
  7. package/llms/image-gen.js.map +1 -0
  8. package/llms/image-gen.md +102 -0
  9. package/llms/index.d.ts +1 -1
  10. package/llms/index.js +3 -3
  11. package/package.json +3 -3
  12. package/prompts.d.ts +6 -0
  13. package/prompts.js +36 -3
  14. package/prompts.js.map +1 -1
  15. package/settings.d.ts +1 -0
  16. package/system-prompt-initial.md +2 -2
  17. package/system-prompt.md +2 -2
  18. package/themes/aether.md +41 -0
  19. package/themes/archive.md +43 -0
  20. package/themes/atelier.md +42 -0
  21. package/themes/atlas.md +42 -0
  22. package/themes/broadsheet.md +20 -0
  23. package/themes/brutalist.md +208 -0
  24. package/themes/capsule.md +47 -0
  25. package/themes/carbon.md +42 -0
  26. package/themes/chrome.md +132 -0
  27. package/themes/chrono.md +33 -0
  28. package/themes/codex.md +45 -0
  29. package/themes/computer-angel-heaven.md +57 -0
  30. package/themes/console.md +46 -0
  31. package/themes/default.md +96 -0
  32. package/themes/desktop.md +49 -0
  33. package/themes/dial.md +46 -0
  34. package/themes/dossier.md +35 -0
  35. package/themes/edge.md +39 -0
  36. package/themes/exemplars/aether/App.jsx +224 -0
  37. package/themes/exemplars/archive/App.jsx +222 -0
  38. package/themes/exemplars/atelier/App.jsx +224 -0
  39. package/themes/exemplars/atlas/App.jsx +216 -0
  40. package/themes/exemplars/broadsheet/App.jsx +216 -0
  41. package/themes/exemplars/brutalist/App.jsx +290 -0
  42. package/themes/exemplars/capsule/App.jsx +216 -0
  43. package/themes/exemplars/carbon/App.jsx +216 -0
  44. package/themes/exemplars/chrome/App.jsx +253 -0
  45. package/themes/exemplars/chrono/App.jsx +222 -0
  46. package/themes/exemplars/codex/App.jsx +224 -0
  47. package/themes/exemplars/computer-angel-heaven/App.jsx +224 -0
  48. package/themes/exemplars/console/App.jsx +216 -0
  49. package/themes/exemplars/default/App.jsx +219 -0
  50. package/themes/exemplars/desktop/App.jsx +224 -0
  51. package/themes/exemplars/dial/App.jsx +216 -0
  52. package/themes/exemplars/dossier/App.jsx +224 -0
  53. package/themes/exemplars/edge/App.jsx +216 -0
  54. package/themes/exemplars/guild/App.jsx +224 -0
  55. package/themes/exemplars/hearth/App.jsx +224 -0
  56. package/themes/exemplars/industrial/App.jsx +224 -0
  57. package/themes/exemplars/matrix/App.jsx +224 -0
  58. package/themes/exemplars/mesh/App.jsx +222 -0
  59. package/themes/exemplars/neomario/App.jsx +222 -0
  60. package/themes/exemplars/neon/App.jsx +224 -0
  61. package/themes/exemplars/nexus/App.jsx +216 -0
  62. package/themes/exemplars/opus/App.jsx +224 -0
  63. package/themes/exemplars/orbit/App.jsx +224 -0
  64. package/themes/exemplars/palate/App.jsx +224 -0
  65. package/themes/exemplars/pitch/App.jsx +222 -0
  66. package/themes/exemplars/poster/App.jsx +222 -0
  67. package/themes/exemplars/proof/App.jsx +224 -0
  68. package/themes/exemplars/recon/App.jsx +216 -0
  69. package/themes/exemplars/rift/App.jsx +224 -0
  70. package/themes/exemplars/rune/App.jsx +224 -0
  71. package/themes/exemplars/scrapbook/App.jsx +222 -0
  72. package/themes/exemplars/sensor/App.jsx +224 -0
  73. package/themes/exemplars/signal/App.jsx +222 -0
  74. package/themes/exemplars/slab/App.jsx +224 -0
  75. package/themes/exemplars/specimen/App.jsx +222 -0
  76. package/themes/exemplars/terminal/App.jsx +224 -0
  77. package/themes/exemplars/vault/App.jsx +222 -0
  78. package/themes/exemplars/winter-sports/App.jsx +224 -0
  79. package/themes/exemplars/zine/App.jsx +214 -0
  80. package/themes/guild.md +44 -0
  81. package/themes/hearth.md +45 -0
  82. package/themes/index.d.ts +11 -0
  83. package/themes/index.js +272 -0
  84. package/themes/index.js.map +1 -0
  85. package/themes/industrial.md +37 -0
  86. package/themes/matrix.md +41 -0
  87. package/themes/mesh.md +42 -0
  88. package/themes/neomario.md +47 -0
  89. package/themes/neon.md +48 -0
  90. package/themes/nexus.md +40 -0
  91. package/themes/opus.md +61 -0
  92. package/themes/orbit.md +46 -0
  93. package/themes/palate.md +35 -0
  94. package/themes/pitch.md +39 -0
  95. package/themes/poster.md +39 -0
  96. package/themes/proof.md +41 -0
  97. package/themes/recon.md +39 -0
  98. package/themes/rift.md +45 -0
  99. package/themes/rune.md +44 -0
  100. package/themes/scrapbook.md +43 -0
  101. package/themes/sensor.md +42 -0
  102. package/themes/signal.md +37 -0
  103. package/themes/slab.md +35 -0
  104. package/themes/specimen.md +21 -0
  105. package/themes/terminal.md +39 -0
  106. package/themes/vault.md +41 -0
  107. package/themes/winter-sports.md +39 -0
  108. package/themes/zine.md +40 -0
  109. package/llms/img-vibes.d.ts +0 -2
  110. package/llms/img-vibes.js +0 -9
  111. package/llms/img-vibes.js.map +0 -1
  112. package/llms/img-vibes.md +0 -167
package/llms/img-vibes.md DELETED
@@ -1,167 +0,0 @@
1
- # ImgVibes Component
2
-
3
- ## Basic Usage
4
-
5
- The ImgVibes component can be used in several ways:
6
-
7
- 1. **With a prompt prop** - Immediately generates an image (cached across reloads):
8
-
9
- ```jsx
10
- import { ImgVibes } from "img-vibes";
11
-
12
- function MyComponent() {
13
- return <ImgVibes prompt="A sunset over mountains" />;
14
- }
15
- ```
16
-
17
- 2. **With an input image** - Edits or transforms an uploaded image:
18
-
19
- ```jsx
20
- import { ImgVibes } from "img-vibes";
21
-
22
- function MyComponent() {
23
- const [file, setFile] = useState(null);
24
- return (
25
- <div>
26
- <input type="file" accept="image/*" onChange={(e) => setFile(e.target.files[0])} />
27
- {file && <ImgVibes prompt="Make it look like a watercolor painting" images={[file]} />}
28
- </div>
29
- );
30
- }
31
- ```
32
-
33
- The input image is automatically resized (max 1024px) and compressed as JPEG before sending.
34
-
35
- 3. **With an \_id prop** - Loads a specific image from the database:
36
-
37
- ```jsx
38
- import { ImgVibes } from "img-vibes";
39
-
40
- function MyComponent() {
41
- return <ImgVibes _id="my-image-id" database={database} />;
42
- }
43
- ```
44
-
45
- If the document has a `prompt` field but no generated image yet, it will generate one automatically.
46
-
47
- ## Gallery Pattern
48
-
49
- Images and prompts are tracked in a Fireproof database with a `type` of `image`. If a database is not provided, it uses `"ImgVibes"` as the default.
50
-
51
- Display stored images by their ID using `useLiveQuery`:
52
-
53
- ```jsx
54
- import { useFireproof } from "use-fireproof";
55
- import { ImgVibes } from "img-vibes";
56
-
57
- function MyComponent() {
58
- const { database, useLiveQuery } = useFireproof("my-db-name");
59
- const { docs: imageDocuments } = useLiveQuery("type", {
60
- key: "image",
61
- descending: true,
62
- });
63
-
64
- return (
65
- <div>
66
- <ImgVibes database={database} prompt="A colorful landscape" />
67
- {imageDocuments.length > 0 && (
68
- <div className="history">
69
- <h3>Previously Generated Images</h3>
70
- <ul className="image-list">
71
- {imageDocuments.map((doc) => (
72
- <li key={doc._id} className="image-item">
73
- <ImgVibes _id={doc._id} database={database} />
74
- </li>
75
- ))}
76
- </ul>
77
- </div>
78
- )}
79
- </div>
80
- );
81
- }
82
- ```
83
-
84
- ## Passing User Images Through App State
85
-
86
- When your app captures or collects images earlier in the flow (camera, file picker, canvas), store the `File` object in React state and pass it to `ImgVibes` later. This is the most common pattern for img2img — don't discard the user's image before reaching ImgVibes:
87
-
88
- ```jsx
89
- import { useState } from "react";
90
- import { ImgVibes } from "img-vibes";
91
-
92
- function App() {
93
- const [photo, setPhoto] = useState(null);
94
- const [prompt, setPrompt] = useState("");
95
- const [submitted, setSubmitted] = useState(false);
96
-
97
- return (
98
- <div>
99
- {!submitted ? (
100
- <>
101
- <input type="file" accept="image/*" onChange={(e) => setPhoto(e.target.files[0])} />
102
- <input value={prompt} onChange={(e) => setPrompt(e.target.value)} placeholder="Transform into..." />
103
- <button onClick={() => setSubmitted(true)} disabled={!photo || !prompt}>
104
- Go
105
- </button>
106
- </>
107
- ) : (
108
- <ImgVibes prompt={prompt} images={[photo]} />
109
- )}
110
- </div>
111
- );
112
- }
113
- ```
114
-
115
- **Key rule**: Any time the user provides an image (camera capture, file upload, canvas export) and the app later generates an image based on it, the `File` must be kept in state and passed via the `images` prop. Never generate without the user's image when one was provided — that's the whole point of img2img.
116
-
117
- ## Caching and Versions
118
-
119
- - Same prompt generates a deterministic `_id` (hash-based), so results are cached across reloads
120
- - Each image has a **regenerate** button that creates a new version
121
- - Use **prev/next** controls to navigate between versions
122
- - Set `showControls={false}` to hide the regen and version navigation buttons
123
-
124
- ## Styling
125
-
126
- ImgVibes supports custom styling through CSS variables or custom class names:
127
-
128
- ```jsx
129
- // With CSS variables in your styles
130
- :root {
131
- --imggen-text-color: #222;
132
- --imggen-accent: #0088ff;
133
- --imggen-border-radius: 8px;
134
- }
135
-
136
- // With custom class names
137
- <ImgVibes
138
- prompt="A landscape"
139
- className="my-custom-image"
140
- />
141
- ```
142
-
143
- #### Props
144
-
145
- - `prompt`: Text prompt for image generation (required unless `_id` is provided)
146
- - `images`: Array of `File` objects for img2img editing/transformation (uses first image, optional)
147
- - `_id`: Document ID to load a specific image instead of generating a new one
148
- - `database`: Database name or instance to use for storing images (default: `'ImgVibes'`)
149
- - `className`: CSS class name for the image element (optional)
150
- - `alt`: Alt text for the image element (optional)
151
- - `style`: Inline styles for the image element (optional)
152
- - `showControls`: Toggle regenerate and version navigation buttons (default: `true`)
153
- - `model`: Override the image generation model for this component (optional). Use a catalog model id such as `"openai/gpt-5-image-mini"` or `"prodia/flux-2.klein.9b"`. When omitted, the app's configured default is used. Note: img2img (passing `images`) is only supported for `prodia/*` models today.
154
-
155
- ## Choosing a Model
156
-
157
- By default, images are generated with the app's configured image model. Pass the `model` prop when you want a specific `<ImgVibes>` to use a different backend — for example, routing an OpenAI-family image model for one component while leaving the rest of the app on the default:
158
-
159
- ```jsx
160
- import { ImgVibes } from "img-vibes";
161
-
162
- function MyComponent() {
163
- return <ImgVibes prompt="An astronaut riding a horse" model="openai/gpt-5-image-mini" />;
164
- }
165
- ```
166
-
167
- Model ids follow the `provider/model-name` form from the platform's model catalog. Unknown or unavailable ids surface as an error through the component's error UI.