@vibes.diy/prompts 12.2.2 → 12.2.4

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 (65) hide show
  1. package/generation-variety.d.ts +17 -0
  2. package/generation-variety.js +80 -0
  3. package/generation-variety.js.map +1 -0
  4. package/index.d.ts +2 -0
  5. package/index.js +2 -0
  6. package/index.js.map +1 -1
  7. package/llms/backend.md +64 -6
  8. package/llms/fireproof.md +4 -4
  9. package/package.json +4 -4
  10. package/prompts.js +26 -43
  11. package/prompts.js.map +1 -1
  12. package/restyle.d.ts +155 -0
  13. package/restyle.js +254 -0
  14. package/restyle.js.map +1 -0
  15. package/settings.d.ts +2 -0
  16. package/style-prompts.d.ts +1 -1
  17. package/style-prompts.js +13 -6
  18. package/style-prompts.js.map +1 -1
  19. package/system-prompt.md +2 -2
  20. package/themes/colors/aether.yaml +2 -2
  21. package/themes/colors/archive.yaml +1 -1
  22. package/themes/colors/atelier.yaml +1 -1
  23. package/themes/colors/atlas.yaml +1 -1
  24. package/themes/colors/broadsheet.yaml +1 -1
  25. package/themes/colors/brutalist.yaml +8 -5
  26. package/themes/colors/capsule.yaml +1 -1
  27. package/themes/colors/carbon.yaml +1 -1
  28. package/themes/colors/chrono.yaml +1 -1
  29. package/themes/colors/computer-angel-heaven.yaml +1 -1
  30. package/themes/colors/console.yaml +1 -1
  31. package/themes/colors/default.yaml +1 -1
  32. package/themes/colors/desktop.yaml +1 -1
  33. package/themes/colors/edge.yaml +1 -1
  34. package/themes/colors/hearth.yaml +1 -1
  35. package/themes/colors/industrial.yaml +1 -1
  36. package/themes/colors/mesh.yaml +1 -1
  37. package/themes/colors/neomario.yaml +1 -1
  38. package/themes/colors/neon.yaml +1 -1
  39. package/themes/colors/orbit.yaml +1 -1
  40. package/themes/colors/rune.yaml +1 -1
  41. package/themes/colors/scrapbook.yaml +1 -1
  42. package/themes/colors/slab.yaml +1 -1
  43. package/themes/colors/specimen.yaml +1 -1
  44. package/themes/colors/winter-sports.yaml +1 -1
  45. package/themes/colors/zine.yaml +1 -1
  46. package/themes/colorsets-bundle.js +34 -31
  47. package/themes/colorsets-bundle.js.map +1 -1
  48. package/themes/colorsets.d.ts +3 -4
  49. package/themes/colorsets.js +25 -22
  50. package/themes/colorsets.js.map +1 -1
  51. package/themes/fonts.d.ts +9 -0
  52. package/themes/fonts.js +80 -0
  53. package/themes/fonts.js.map +1 -0
  54. package/themes/index.d.ts +5 -1
  55. package/themes/index.js +5 -1
  56. package/themes/index.js.map +1 -1
  57. package/themes/ornament-pad.d.ts +27 -0
  58. package/themes/ornament-pad.js +145 -0
  59. package/themes/ornament-pad.js.map +1 -0
  60. package/themes/palette-gen.d.ts +125 -0
  61. package/themes/palette-gen.js +473 -0
  62. package/themes/palette-gen.js.map +1 -0
  63. package/themes/style-presets.d.ts +11 -0
  64. package/themes/style-presets.js +79 -0
  65. package/themes/style-presets.js.map +1 -0
@@ -0,0 +1,17 @@
1
+ export interface LayoutArchetype {
2
+ readonly id: string;
3
+ readonly guidance: string;
4
+ }
5
+ export interface Flourish {
6
+ readonly id: string;
7
+ readonly guidance: string;
8
+ }
9
+ export declare const LAYOUT_ARCHETYPES: readonly LayoutArchetype[];
10
+ export declare const FLOURISHES: readonly Flourish[];
11
+ export declare const FLOURISH_DRAW_COUNT = 2;
12
+ export interface GenerationVariety {
13
+ readonly archetype: string;
14
+ readonly flourishes: string[];
15
+ }
16
+ export declare function drawGenerationVariety(rnd: () => number): GenerationVariety;
17
+ export declare function renderVarietySection(variety: Partial<GenerationVariety>): string;
@@ -0,0 +1,80 @@
1
+ export const LAYOUT_ARCHETYPES = [
2
+ {
3
+ id: "single-column-feed",
4
+ guidance: "One vertical column at every width, newest-first. The primary compose/create control sits at the top of the column where a thumb reaches it, and entries stack below. Cap the column with a comfortable max width and centre it on wide screens — never split it into side-by-side columns.",
5
+ },
6
+ {
7
+ id: "card-grid",
8
+ guidance: "A responsive grid of equal-weight cards: ONE column on a phone, two or three only from `sm:`/`lg:` up. Every card is self-contained and must read completely on its own at one-column width — never let a card depend on the card beside it to make sense.",
9
+ },
10
+ {
11
+ id: "stacked-sections",
12
+ guidance: "A single scrolling page of clearly labelled sections read top to bottom, most important first, each with its own heading and controls. Sections are full width on a phone and may pair up only from `lg:`. Nothing may hide behind horizontal scroll.",
13
+ },
14
+ {
15
+ id: "list-detail-sheet",
16
+ guidance: "A scrollable list of items; selecting one opens its detail as a full-screen sheet layered over the list, with an obvious back/close control at the top of the sheet. The detail may sit beside the list only from `lg:` up — never a permanently split two-pane view on a small screen.",
17
+ },
18
+ {
19
+ id: "tab-shell",
20
+ guidance: "Two to four top-level areas behind a fixed bottom tab bar within thumb reach, each area a single scrolling column. If this app genuinely has only one top-level area, drop the bar and build that one column — never invent filler tabs to justify the shell.",
21
+ },
22
+ ];
23
+ export const FLOURISHES = [
24
+ {
25
+ id: "hover-lift",
26
+ guidance: "Interactive surfaces (buttons, tappable rows, cards) rest at `shadow-[var(--vibes-shadow)]` and rise on pointer hover to `hover:shadow-[var(--vibes-shadow-lg)]`, with an upward translate of `var(--border-width)`, returning on leave. Hover-only decoration: every affordance stays complete and reachable with no pointer at all.",
27
+ },
28
+ {
29
+ id: "press-slam",
30
+ guidance: "Interactive elements rest at `shadow-[var(--vibes-shadow)]` and answer `:active` by seating themselves: `active:shadow-none` plus a translate of `var(--border-width)` on both axes, resolving in well under 150ms. Same generic affordances as any other press state.",
31
+ },
32
+ {
33
+ id: "accent-rule",
34
+ guidance: "Every section heading carries a short leading bar in `bg-[var(--accent)]`, its thickness from `var(--border-width)` and its length from `var(--spacing)`, sitting immediately before or beneath the heading text.",
35
+ },
36
+ {
37
+ id: "focus-halo",
38
+ guidance: "Focusable controls take a visible `focus-visible` ring in `ring-[var(--primary)]` at `ring-[length:var(--border-width)]`, distinct from their resting border. Applies to every focusable control in the app, not a chosen few.",
39
+ },
40
+ {
41
+ id: "item-stagger",
42
+ guidance: "Items appearing in any repeated list or grid fade and rise into place with a short transition (<=200ms), staggered slightly by index, and settle — no looping motion. Purely temporal, so it borrows no color or size at all.",
43
+ },
44
+ {
45
+ id: "inset-divider",
46
+ guidance: "Wherever sibling items stack vertically, separate them with a hairline in `border-[var(--border)]` at `var(--border-width)`, inset to the container's own horizontal padding rather than bleeding to the full edge.",
47
+ },
48
+ ];
49
+ export const FLOURISH_DRAW_COUNT = 2;
50
+ function pickIndex(rnd, length) {
51
+ const raw = Math.floor(rnd() * length);
52
+ return raw >= length ? length - 1 : raw;
53
+ }
54
+ export function drawGenerationVariety(rnd) {
55
+ const archetype = LAYOUT_ARCHETYPES[pickIndex(rnd, LAYOUT_ARCHETYPES.length)].id;
56
+ const pool = FLOURISHES.map((f) => f.id);
57
+ const flourishes = [];
58
+ const count = FLOURISH_DRAW_COUNT > pool.length ? pool.length : FLOURISH_DRAW_COUNT;
59
+ while (flourishes.length < count) {
60
+ flourishes.push(...pool.splice(pickIndex(rnd, pool.length), 1));
61
+ }
62
+ return { archetype, flourishes };
63
+ }
64
+ export function renderVarietySection(variety) {
65
+ const archetype = LAYOUT_ARCHETYPES.find((a) => a.id === variety.archetype);
66
+ const drawn = variety.flourishes ?? [];
67
+ const flourishes = FLOURISHES.filter((f) => drawn.includes(f.id));
68
+ if (archetype === undefined && flourishes.length === 0)
69
+ return "";
70
+ const parts = [];
71
+ if (archetype !== undefined) {
72
+ parts.push(`## Layout archetype — ${archetype.id}\n\n${archetype.guidance}\n\nThis is THIS app's structural shape. Build the whole app inside it; do not blend two archetypes, and do not fall back to a desktop shape that a phone has to recover from.`);
73
+ }
74
+ if (flourishes.length > 0) {
75
+ const bullets = flourishes.map((f) => `- **${f.id}** — ${f.guidance}`).join("\n");
76
+ parts.push(`## Flourishes\n\nApply these — and no other decorative treatment — consistently everywhere their affordance occurs:\n\n${bullets}\n\nEvery flourish above is written in design tokens on purpose. Never swap a token for a literal color, shadow or size inside them: the owner restyles the app by changing tokens, and a literal buried in a hover or focus state survives that change invisibly.`);
77
+ }
78
+ return parts.join("\n\n");
79
+ }
80
+ //# sourceMappingURL=generation-variety.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generation-variety.js","sourceRoot":"","sources":["../jsr/generation-variety.ts"],"names":[],"mappings":"AAqDA,MAAM,CAAC,MAAM,iBAAiB,GAA+B;IAC3D;QACE,EAAE,EAAE,oBAAoB;QACxB,QAAQ,EACN,6RAA6R;KAChS;IACD;QACE,EAAE,EAAE,WAAW;QACf,QAAQ,EACN,4PAA4P;KAC/P;IACD;QACE,EAAE,EAAE,kBAAkB;QACtB,QAAQ,EACN,uPAAuP;KAC1P;IACD;QACE,EAAE,EAAE,mBAAmB;QACvB,QAAQ,EACN,yRAAyR;KAC5R;IACD;QACE,EAAE,EAAE,WAAW;QACf,QAAQ,EACN,+PAA+P;KAClQ;CACF,CAAC;AASF,MAAM,CAAC,MAAM,UAAU,GAAwB;IAC7C;QACE,EAAE,EAAE,YAAY;QAChB,QAAQ,EACN,uUAAuU;KAC1U;IACD;QACE,EAAE,EAAE,YAAY;QAChB,QAAQ,EACN,wQAAwQ;KAC3Q;IACD;QACE,EAAE,EAAE,aAAa;QACjB,QAAQ,EACN,mNAAmN;KACtN;IACD;QACE,EAAE,EAAE,YAAY;QAChB,QAAQ,EACN,gOAAgO;KACnO;IACD;QACE,EAAE,EAAE,cAAc;QAClB,QAAQ,EACN,+NAA+N;KAClO;IACD;QACE,EAAE,EAAE,eAAe;QACnB,QAAQ,EACN,qNAAqN;KACxN;CACF,CAAC;AAGF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC;AASrC,SAAS,SAAS,CAAC,GAAiB,EAAE,MAAc;IAClD,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG,MAAM,CAAC,CAAC;IACvC,OAAO,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;AAC1C,CAAC;AAeD,MAAM,UAAU,qBAAq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,CACR,yBAAyB,SAAS,CAAC,EAAE,OAAO,SAAS,CAAC,QAAQ,gLAAgL,CAC/O,CAAC;IACJ,CAAC;IACD,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC1B,MAAM,OAAO,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAClF,KAAK,CAAC,IAAI,CACR,0HAA0H,OAAO,oQAAoQ,CACtY,CAAC;IACJ,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAC5B,CAAC"}
package/index.d.ts CHANGED
@@ -1,9 +1,11 @@
1
1
  export * from "./prompts.js";
2
2
  export * from "./settings.js";
3
+ export * from "./generation-variety.js";
3
4
  export * from "./chat.js";
4
5
  export * from "./json-docs.js";
5
6
  export * from "./view-state.js";
6
7
  export * from "./style-prompts.js";
8
+ export * from "./restyle.js";
7
9
  export * from "./themes/index.js";
8
10
  export { parseContent } from "./segment-parser.js";
9
11
  export { normalizeComponentExports, transformImports, coreImportMap } from "./component-transforms.js";
package/index.js CHANGED
@@ -1,9 +1,11 @@
1
1
  export * from "./prompts.js";
2
2
  export * from "./settings.js";
3
+ export * from "./generation-variety.js";
3
4
  export * from "./chat.js";
4
5
  export * from "./json-docs.js";
5
6
  export * from "./view-state.js";
6
7
  export * from "./style-prompts.js";
8
+ export * from "./restyle.js";
7
9
  export * from "./themes/index.js";
8
10
  export { parseContent } from "./segment-parser.js";
9
11
  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;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGnD,OAAO,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAEvG,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAIpE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../jsr/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,yBAAyB,CAAC;AACxC,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGnD,OAAO,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAEvG,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAIpE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC"}
package/llms/backend.md CHANGED
@@ -130,7 +130,12 @@ await ctx.db.delete(docId, { db: "notes" });
130
130
  const docs = await ctx.db.query({ db: "notes", field: "type", key: "note", limit: 100 }); // a filtered page
131
131
  const doc = await ctx.db.get("state:cursor", { db: "notes" }); // one doc by _id, or null
132
132
  const text = await ctx.callAI("prompt", { model: "openrouter/auto", max_tokens: 500 }); // server-side AI call
133
+ const json = JSON.parse(
134
+ await ctx.callAI("rate this", { schema: { properties: { verdict: { type: "string" }, score: { type: "number" } } } })
135
+ ); // structured output
133
136
  const res = await ctx.fetch("https://api.example.com/x", { headers }); // outbound HTTP — use this, not bare fetch()
137
+ await ctx.notify({ toHandle: "alice", body: "Your turn", dedupeKey: "game-7-turn-3" }); // one participant; throws on failure
138
+ ctx.log("info", "tick finished", { written: 3 }); // diagnostics — read back with: vibes-diy app logs owner/slug
134
139
  ```
135
140
 
136
141
  - `{ db }` names the Fireproof database (same names `App.jsx` uses with
@@ -178,10 +183,10 @@ const res = await ctx.fetch("https://api.example.com/x", { headers }); // outbou
178
183
  array operation (`.filter()`, `.map()`, spread) returns a plain array with no
179
184
  `next`. On the last page the property is absent, not undefined — `"next" in
180
185
  page` is `false`.
181
- - Both reads are read-ACL-gated as the acting identity, through the same gate:
186
+ - Both reads are read-gated as the acting identity, through the same gate:
182
187
  anonymous `fetch` callers are denied, and in `fetch`/`onChange` a database
183
188
  bound to an access function cannot be read at all (keep those lanes' read
184
- databases on plain ACLs). In `scheduled` (admin mode) reads are
189
+ databases unbound). In `scheduled` (admin mode) reads are
185
190
  **unfiltered** — access-fn-bound databases return every doc, across all users
186
191
  and channels. Made for `scheduled` sweeps: read, decide, then `put`/`delete`.
187
192
  - The one exception to that last sentence is the declared opt-in above,
@@ -221,14 +226,67 @@ const res = await ctx.fetch("https://api.example.com/x", { headers }); // outbou
221
226
  account of the user who triggered the handler (the writer in `onChange`, the
222
227
  signed-in caller in `fetch`), or the app owner when no user is involved
223
228
  (`scheduled` ticks, anonymous webhooks). Options: `model` (default
224
- `"openrouter/auto"`), `max_tokens`, `temperature`. No streaming and no schema
225
- mode — for structured output, ask for JSON in the prompt and `JSON.parse`
226
- defensively. Budget: a handful of calls per invocation (currently 5) and
227
- ~64k prompt chars; a denied or failed call **throws** — catch it and degrade
229
+ `"openrouter/auto"`), `max_tokens`, `temperature`, `schema`. No streaming.
230
+ **Schema mode works the same way it does in `App.jsx`**: pass
231
+ `{ schema: { properties: { … }, required: [ … ] } }` and the platform
232
+ constrains the model the best way that model supports (native JSON schema,
233
+ tool mode, or a schema system message). The result still comes back as a
234
+ **string** — `JSON.parse` it. When you pass a schema and name no `model`,
235
+ the default shifts to a schema-capable model rather than
236
+ `"openrouter/auto"`. Budget: a handful of calls per invocation (currently 5)
237
+ and ~64k prompt **characters**; a denied or failed call **throws** — catch it and degrade
228
238
  (e.g. write the doc back with an error field) rather than losing the event.
229
239
  Keep interactive/streaming AI in `App.jsx` via `callAI`; use `ctx.callAI`
230
240
  when the result must be server-authoritative (moderation, digests,
231
241
  summaries users shouldn't be able to forge).
242
+ - **`ctx.notify({ toHandle, body, dedupeKey })` sends one person a notification.**
243
+ It takes a single object with all three fields — match the object form in the
244
+ example above, which is the calling convention (codegen has been observed
245
+ passing these positionally). The message lands in that person's bell, inbox,
246
+ and push notifications.
247
+ - `toHandle` is one handle, and the platform delivers to people already in
248
+ this app: the owner, an accepted invite or approved request, or a handle
249
+ named in the access function's persisted grant state.
250
+ - `body` is the whole message — plain text, 500 chars max. The platform
251
+ titles it with the app's name and links it back to the app, so spend the
252
+ body on what happened and who it concerns.
253
+ - `dedupeKey` names the happening, so one event delivers once however many
254
+ times the handler runs: `"round-4-started"`, `"order-42-shipped"`,
255
+ `"game-7-turn-3"`. The platform keys it per (app, recipient).
256
+ - `await` it and let it throw. Success resolves with nothing to inspect; a
257
+ missing field, an over-long body, or a handle outside the app rejects the
258
+ promise. Usually the surrounding work should survive an undeliverable
259
+ message, so catch it and carry on:
260
+
261
+ ```js
262
+ try {
263
+ await ctx.notify({ toHandle: game.opponent, body: "Your turn", dedupeKey: `game-${game._id}-turn-${game.turn}` });
264
+ } catch (err) {
265
+ ctx.log("warn", "notify failed", { game: game._id, reason: err.message });
266
+ }
267
+ ```
268
+
269
+ - Reach for it when **one** person needs to know **one** thing: your turn,
270
+ your request was approved, your order shipped. Each user also controls a
271
+ "messages from a vibe" switch, so treat a notification as a nudge toward the
272
+ app rather than the place the information lives.
273
+ - When everyone using the app should see something — the schedule changed, a
274
+ new round started — write that change to a database the audience already
275
+ reads. Their `useLiveQuery` puts it on screen the moment it commits, for
276
+ exactly the people entitled to see it, because the platform resolves that
277
+ audience per reader at read time. The app's own screen is the source of
278
+ truth; that's what makes it the right surface for anything shared.
279
+ - **`ctx.log(level?, ...args)` is the handler's diagnostic lane.** It is the
280
+ output that reaches the owner, who reads it back with
281
+ `vibes-diy app logs <owner>/<slug> --since 1h [--tail]` — the isolate's
282
+ `console` output is collected nowhere, so route anything worth seeing later
283
+ through `ctx.log`. The level is optional and comes first (`"debug"`, `"info"`,
284
+ `"warn"`, `"error"`); any other first argument is the message and the level
285
+ defaults to `info`, so `ctx.log("cache miss", { key })` and
286
+ `ctx.log("warn", "feed empty", { url })` both work. Log the shape of a run
287
+ rather than its contents: document ids, counts, statuses, timings, and an
288
+ error's message and code. Identifiers make the stream diagnostic while users'
289
+ document bodies and `ctx.secrets` values stay in the handler.
232
290
 
233
291
  ## Worked external-data pattern — cache into the live database
234
292
 
package/llms/fireproof.md CHANGED
@@ -5,7 +5,7 @@ Fireproof is a document database with live sync, designed to make browser apps e
5
5
  ## Key Features
6
6
 
7
7
  - **Apps run anywhere:** Bundle UI, data, and logic together.
8
- - **Real-Time, local-first:** Writes land in the local replica instantly and sync in the background; the server validates each on ingest and streams the accepted ones live to every viewer. `useLiveQuery` keeps the UI in sync as data arrives, so you render empty states rather than loading spinners — but a synced write can still be rejected on ingest (access denied, conflicts): the local optimistic revision converges **server-wins** — and the platform surfaces the reason **only when the app's access rules provide one**; a reason-less rejection (e.g. a db-level ACL) converges silently. Keep the UI reactive to the store rather than depending on a toast; don't assume every write lands, but don't hand-roll denial errors either.
8
+ - **Real-Time, local-first:** Writes land in the local replica instantly and sync in the background; the server validates each on ingest and streams the accepted ones live to every viewer. `useLiveQuery` keeps the UI in sync as data arrives, so you render empty states rather than loading spinners — but a synced write can still be rejected on ingest (access denied, conflicts): the local optimistic revision converges **server-wins** — and the platform surfaces the reason **only when the app's access rules provide one**; a reason-less rejection converges silently. Keep the UI reactive to the store rather than depending on a toast; don't assume every write lands, but don't hand-roll denial errors either.
9
9
  - **Unified API:** TypeScript works with Deno, Bun, Node.js, and the browser.
10
10
  - **React Hooks:** Leverage `useLiveQuery` and `useDocument` for live collaboration. Note: these are NOT top-level exports — they are returned by the `useFireproof()` hook. Always destructure from `const { useLiveQuery, useDocument, database } = useFireproof("dbName")`.
11
11
 
@@ -21,7 +21,7 @@ Each document has an `_id`, which can be auto-generated or set explicitly. Auto-
21
21
 
22
22
  Use granular documents, e.g. one document per user action, so saving a form or clicking a button should typically create or update a single document, or just a few documents. Avoid patterns that require a single document to grow without bound.
23
23
 
24
- `useLiveQuery` populates and refreshes the UI reactively as data arrives, so you usually render empty states rather than loading spinners. Writes are optimistic and local: `put()`/`save()`/`del()` land in the local replica instantly, and transport or offline failures queue and retry automatically. If the server's access rules reject a synced write, the local optimistic revision converges **server-wins** (it is overwritten by the server's version) — and the **platform** surfaces the reason in a write-fail toast **only when the app's access rules provide one** (`forbidden("…")`); a reason-less rejection (e.g. a db-level ACL) converges silently. So do **not** wrap writes in `try/catch` to show denial errors to the user; keep the UI reactive to the store (`useLiveQuery`/`useDocument`) so the converged state is the feedback, and gate write surfaces up front with `useVibe(dbName).can.create/edit/delete` so a disallowed action never renders in the first place.
24
+ `useLiveQuery` populates and refreshes the UI reactively as data arrives, so you usually render empty states rather than loading spinners. Writes are optimistic and local: `put()`/`save()`/`del()` land in the local replica instantly, and transport or offline failures queue and retry automatically. If the server's access rules reject a synced write, the local optimistic revision converges **server-wins** (it is overwritten by the server's version) — and the **platform** surfaces the reason in a write-fail toast **only when the app's access rules provide one** (`forbidden("…")`); a reason-less rejection converges silently. So do **not** wrap writes in `try/catch` to show denial errors to the user; keep the UI reactive to the store (`useLiveQuery`/`useDocument`) so the converged state is the feedback, and gate write surfaces up front with `useVibe(dbName).can.create/edit/delete` so a disallowed action never renders in the first place.
25
25
 
26
26
  ### Basic Example
27
27
 
@@ -330,7 +330,7 @@ App.jsx
330
330
 
331
331
  ## Offline writes are on by default (`offlineQueue`)
332
332
 
333
- For signed-in users, writes are **local-first by default**: a `put`/`del` that fails on the network is durably queued on the device (it resolves, stays visible, and syncs to the cloud when you're back online) instead of rolling back. You don't opt in — every signed-in vibe gets this. An access-denied/validation rejection is **not** queued: it converges **server-wins** (the local optimistic revision is overwritten by the server's version); the platform surfaces the reason only when the app's access rules provide one, and a reason-less rejection (e.g. a db-level ACL) converges silently — so keep the UI reactive to the store rather than depending on a toast. Only transport failures queue and retry.
333
+ For signed-in users, writes are **local-first by default**: a `put`/`del` that fails on the network is durably queued on the device (it resolves, stays visible, and syncs to the cloud when you're back online) instead of rolling back. You don't opt in — every signed-in vibe gets this. An access-denied/validation rejection is **not** queued: it converges **server-wins** (the local optimistic revision is overwritten by the server's version); the platform surfaces the reason only when the app's access rules provide one, and a reason-less rejection converges silently — so keep the UI reactive to the store rather than depending on a toast. Only transport failures queue and retry.
334
334
 
335
335
  Pass `{ offlineQueue: false }` for **server-first, fail-fast** writes: a `put` resolves only when the server accepts it, and a network failure rejects immediately with nothing queued. Choose this for **collaborative multi-writer apps** where two people may edit the same doc — sync is blind last-arrival-wins (Firefly has no `_rev`), so a stale write replayed on reconnect can silently overwrite a newer one. When a lost write is safer than a surprise overwrite, opt out.
336
336
 
@@ -356,7 +356,7 @@ The old `{ anonymousLocal: true }` option (and its `migrate` hook) is **deprecat
356
356
 
357
357
  ## Architecture: Where's My Data?
358
358
 
359
- Data lives in a local replica (IndexedDB) that the app reads and writes instantly; that replica syncs to the Firefly server in the background. The server is the authority on acceptance — each synced write is validated by the app's access rules on ingest, persisted, and then synced to all users who have read access. A write that fails validation or hits a conflict is rejected on ingest: the local optimistic revision converges **server-wins**, and the platform surfaces the reason **only when the app's access rules provide one** — a reason-less rejection (e.g. a db-level ACL) converges silently, so keep the UI reactive to the store rather than depending on a toast. Don't assume the write always lands, but don't hand-roll your own denial error UI — let it converge.
359
+ Data lives in a local replica (IndexedDB) that the app reads and writes instantly; that replica syncs to the Firefly server in the background. The server is the authority on acceptance — each synced write is validated by the app's access rules on ingest, persisted, and then synced to all users who have read access. A write that fails validation or hits a conflict is rejected on ingest: the local optimistic revision converges **server-wins**, and the platform surfaces the reason **only when the app's access rules provide one** — a reason-less rejection converges silently, so keep the UI reactive to the store rather than depending on a toast. Don't assume the write always lands, but don't hand-roll your own denial error UI — let it converge.
360
360
 
361
361
  ## Using Fireproof in JavaScript
362
362
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibes.diy/prompts",
3
- "version": "12.2.2",
3
+ "version": "12.2.4",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "description": "",
@@ -24,9 +24,9 @@
24
24
  "license": "Apache-2.0",
25
25
  "dependencies": {
26
26
  "@adviser/cement": "~0.5.34",
27
- "@vibes.diy/call-ai-v2": "^12.2.2",
28
- "@vibes.diy/identity": "^12.2.2",
29
- "@vibes.diy/use-vibes-types": "^12.2.2",
27
+ "@vibes.diy/call-ai-v2": "^12.2.4",
28
+ "@vibes.diy/identity": "^12.2.4",
29
+ "@vibes.diy/use-vibes-types": "^12.2.4",
30
30
  "arktype": "~2.2.3",
31
31
  "json-schema-faker": "~0.6.2"
32
32
  },
package/prompts.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import { loadAsset, KeyedResolvOnce } from "@adviser/cement";
2
2
  import { getLlmCatalog, getLlmCatalogNames } from "./json-docs.js";
3
- import { composeDesignMd, curatedThemes, getColorsetCatalogNames, getThemeCatalogNames, parseColorsetYaml, } from "./themes/index.js";
3
+ import { curatedThemes, getColorsetCatalogNames, getThemeCatalogNames } from "./themes/index.js";
4
+ import { renderVarietySection } from "./generation-variety.js";
4
5
  import { type } from "arktype";
5
6
  import { defaultStylePrompt } from "./style-prompts.js";
6
7
  export async function getDefaultSkills() {
@@ -195,49 +196,31 @@ export async function makeBaseSystemPrompt(model, sessionDoc) {
195
196
  : validatedTheme && colorsetCatalogNames.has(validatedTheme)
196
197
  ? validatedTheme
197
198
  : undefined;
198
- let themeDesignSection = "";
199
- if (validatedTheme) {
200
- const rTheme = await keyedLoadAsset.get(`theme:${validatedTheme}`).once(async () => {
201
- return loadAsset(`./themes/${validatedTheme}.md`, {
202
- fallBackUrl: pkgBaseUrl,
203
- basePath: () => import.meta.url,
204
- mock: { fetch: sessionDoc.fetch },
205
- });
206
- });
207
- if (rTheme.isErr()) {
208
- console.warn(`Failed to load theme ${validatedTheme}:`, rTheme.Err());
209
- }
210
- else {
211
- let designMd = rTheme.Ok() ?? "";
212
- if (validatedColorTheme) {
213
- const rColorset = await keyedLoadAsset.get(`colorset:${validatedColorTheme}`).once(async () => {
214
- return loadAsset(`./themes/colors/${validatedColorTheme}.yaml`, {
215
- fallBackUrl: pkgBaseUrl,
216
- basePath: () => import.meta.url,
217
- mock: { fetch: sessionDoc.fetch },
218
- });
219
- });
220
- if (rColorset.isErr()) {
221
- console.warn(`Failed to load colorset ${validatedColorTheme}:`, rColorset.Err());
222
- }
223
- else {
224
- designMd = composeDesignMd(designMd, parseColorsetYaml(rColorset.Ok() ?? ""), { slim: isFirstTurn });
225
- }
226
- }
227
- const retheme = "Applying or switching a theme restyles the app; it must NEVER rewrite it. Change only styling (the classNames/`c` object" +
228
- (isFirstTurn ? "" : ", the `:root` token block") +
229
- ", and CSS) and leave the app's copy, wording, labels, headings, feature set, and behavior exactly as they are. " +
230
- "NEVER write the theme's name — or any design-system, palette, or color-scheme name from the frontmatter or headings above " +
231
- '(e.g. "Atlas Reference", "Matrix Status") — into the app\'s UI, headings, labels, content, or comments. ' +
232
- "Theme names are designer vocabulary, not user-facing copy.";
233
- const tokenSource = isFirstTurn
234
- ? "The theme above defines the app's personality; the platform injects its color + structural tokens at runtime, so do NOT restate a `:root` block. "
235
- : "The theme above defines ONLY visual styling — colors, typography, spacing, borders, and other appearance. ";
236
- themeDesignSection = `<theme-design-md>\n${designMd}\n</theme-design-md>\n\n` + tokenSource + retheme;
237
- }
238
- }
199
+ const themeTokenSection = validatedTheme === undefined
200
+ ? ""
201
+ : "<theme-tokens>\nThe platform injects this app's color + structural tokens at runtime — " +
202
+ "`--background`, `--surface`, `--primary`, `--secondary`, `--accent`, `--text-primary`, `--text-secondary`, " +
203
+ "`--border`, `--radius`, `--border-width`, `--font-family`, `--vibes-spacing`, `--vibes-shadow` and their " +
204
+ "siblings, light and dark. Two of those names are deliberately prefixed: `--vibes-spacing` and " +
205
+ "`--vibes-shadow`/`--vibes-shadow-sm`/`--vibes-shadow-lg`, because Tailwind v4 defines the bare `--spacing` " +
206
+ "and `--shadow*` itself and writing those would repoint its own utilities. " +
207
+ "Do NOT restate a `:root` block and do NOT write literal colors, radii, shadows or font stacks: build every " +
208
+ "surface, text, border and action on the variables via Tailwind bracket notation — `bg-[var(--background)]`, " +
209
+ "`text-[var(--text-primary)]`, `border-[var(--border)]`, `rounded-[var(--radius)]`. The owner restyles the " +
210
+ "whole app by swapping those token values, so anything you inline as a literal is a part of the app they can " +
211
+ "never restyle.\n</theme-tokens>\n\n" +
212
+ "Applying or switching a theme restyles the app; it must NEVER rewrite it. Change only styling (the " +
213
+ "classNames/`c` object, and CSS) and leave the app's copy, wording, labels, headings, feature set, and " +
214
+ "behavior exactly as they are. NEVER write the theme's name — or any design-system, palette, or color-scheme " +
215
+ 'name (e.g. "Atlas Reference", "Matrix Status") — into the app\'s UI, headings, labels, content, or comments. ' +
216
+ "Theme names are designer vocabulary, not user-facing copy.";
217
+ const varietySection = renderVarietySection({
218
+ ...(typeof sessionDoc?.layoutArchetype === "string" ? { archetype: sessionDoc.layoutArchetype } : {}),
219
+ ...(Array.isArray(sessionDoc?.flourishes) ? { flourishes: sessionDoc.flourishes } : {}),
220
+ });
221
+ const themeDesignSection = [themeTokenSection, varietySection].filter((s) => s.length > 0).join("\n\n");
239
222
  const styleFallback = sessionDoc?.suppressDefaultStylePrompt ? "" : defaultStylePrompt;
240
- const stylePrompt = sessionDoc?.stylePrompt || (themeDesignSection ? "" : styleFallback);
223
+ const stylePrompt = sessionDoc?.stylePrompt || (validatedTheme === undefined ? styleFallback : "");
241
224
  const demoDataLines = includeDemoData
242
225
  ? "\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."
243
226
  : "";
package/prompts.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"prompts.js","sourceRoot":"","sources":["../jsr/prompts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAmB,MAAM,gBAAgB,CAAC;AACpF,OAAO,EACL,eAAe,EACf,aAAa,EACb,uBAAuB,EACvB,oBAAoB,EACpB,iBAAiB,GAClB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAExD,MAAM,CAAC,KAAK,UAAU,gBAAgB;IACpC,OAAO,CAAC,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC;AAC1D,CAAC;AAWD,MAAM,4BAA4B,GAChC,msCAAmsC,CAAC;AAUtsC,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,UAAkB;IAC9D,MAAM,OAAO,GAAG,MAAM,aAAa,EAAE,CAAC;IACtC,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAKnF,MAAM,SAAS,GAAG,aAAa;SAC5B,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,QAAQ,CAAC,CA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ACpC,WAAW,EAAE,oBAAoB;YACjC,QAAQ,EAAE,GAAG,EAAE,CAAC,OAAO,IAAI,CAAC,GAAG;SAChC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;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;AAED,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,IAAY;IAC7C,MAAM,KAAK,GAAG,MAAM,cAAc,CAAC,GAAG,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE;QACtE,OAAO,SAAS,CAAC,YAAY,IAAI,KAAK,EAAE;YACtC,WAAW,EAAE,oBAAoB;YACjC,QAAQ,EAAE,GAAG,EAAE,CAAC,OAAO,IAAI,CAAC,GAAG;SAChC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;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/restyle.d.ts ADDED
@@ -0,0 +1,155 @@
1
+ export declare const RESTYLE_CUE_WORDS: readonly string[];
2
+ export declare function makeRestyleRouterMessage(userMessage: string): string;
3
+ export declare const restyleRouterSchema: {
4
+ readonly name: "restyle_route";
5
+ readonly required: readonly ["appearanceOnly", "functionalChange"];
6
+ readonly properties: {
7
+ readonly appearanceOnly: {
8
+ readonly type: "boolean";
9
+ readonly description: "True only when EVERY part of the message is an appearance request the platform's style tokens (colors, saturation, contrast, density, rounding, shadow, text case, font) can serve on their own.";
10
+ };
11
+ readonly functionalChange: {
12
+ readonly type: "boolean";
13
+ readonly description: "True when ANY part of the message asks for a feature, control, element, page, layout restructuring, copy change, data change or behavior change — i.e. anything that needs code written or edited. True when unsure.";
14
+ };
15
+ };
16
+ };
17
+ export declare const restyleRouterParsed: import("arktype/internal/variants/object.ts").ObjectType<{
18
+ appearanceOnly: boolean;
19
+ functionalChange: boolean;
20
+ }, {}>;
21
+ export type RestyleRouterParsed = typeof restyleRouterParsed.infer;
22
+ export declare function routeFromRestyleAnswer(parsed: RestyleRouterParsed): "restyle" | "codegen";
23
+ export interface RestyleCurrent {
24
+ readonly hues: readonly [
25
+ number,
26
+ ...(readonly ({
27
+ readonly mode: "derived";
28
+ } | {
29
+ readonly mode: "pinned";
30
+ readonly h: number;
31
+ } | undefined)[])
32
+ ];
33
+ readonly character: {
34
+ readonly chroma: number;
35
+ readonly contrast: number;
36
+ readonly neutralTint: number;
37
+ readonly surfaceLift: number;
38
+ readonly fillLevel: number;
39
+ readonly scheme: string;
40
+ };
41
+ readonly font: string;
42
+ readonly pad: {
43
+ readonly x: number;
44
+ readonly y: number;
45
+ };
46
+ readonly pins: readonly string[];
47
+ }
48
+ export declare function hueWord(h: number): string;
49
+ export declare function makeRestyleMapperMessage({ current, instruction, }: {
50
+ readonly current: RestyleCurrent;
51
+ readonly instruction: string;
52
+ }): string;
53
+ export declare const restyleMapperSchema: {
54
+ readonly name: "restyle_map";
55
+ readonly required: readonly ["hues", "character", "font", "pad", "targeted", "description"];
56
+ readonly properties: {
57
+ readonly hues: {
58
+ readonly type: "array";
59
+ readonly description: "1 to 3 hue controls. The first is the primary hue angle. Repeat the current values unless the instruction targets colors specifically.";
60
+ readonly items: {
61
+ readonly type: "object";
62
+ readonly properties: {
63
+ readonly h: {
64
+ readonly type: "number";
65
+ readonly description: "Hue angle in degrees, 0-360.";
66
+ };
67
+ readonly pinned: {
68
+ readonly type: "boolean";
69
+ readonly description: "True to freeze this control at `h`; false to let it follow the scheme from hue 1. The first entry is always a concrete angle and ignores this flag.";
70
+ };
71
+ };
72
+ };
73
+ };
74
+ readonly character: {
75
+ readonly type: "object";
76
+ readonly description: "The five palette scalars (each 0..1) plus the hue scheme.";
77
+ readonly properties: {
78
+ readonly chroma: {
79
+ readonly type: "number";
80
+ };
81
+ readonly contrast: {
82
+ readonly type: "number";
83
+ };
84
+ readonly neutralTint: {
85
+ readonly type: "number";
86
+ };
87
+ readonly surfaceLift: {
88
+ readonly type: "number";
89
+ };
90
+ readonly fillLevel: {
91
+ readonly type: "number";
92
+ };
93
+ readonly scheme: {
94
+ readonly type: "string";
95
+ readonly description: "analogous | split-complementary | triadic | complementary";
96
+ };
97
+ };
98
+ };
99
+ readonly font: {
100
+ readonly type: "string";
101
+ readonly description: "A font slug from the catalog above. Repeat the current one unless asked to change it.";
102
+ };
103
+ readonly pad: {
104
+ readonly type: "object";
105
+ readonly description: "Ornament pad position. Both axes -1..+1.";
106
+ readonly properties: {
107
+ readonly x: {
108
+ readonly type: "number";
109
+ readonly description: "-1 loose .. +1 tight";
110
+ };
111
+ readonly y: {
112
+ readonly type: "number";
113
+ readonly description: "-1 formal .. +1 informal";
114
+ };
115
+ };
116
+ };
117
+ readonly targeted: {
118
+ readonly type: "array";
119
+ readonly description: "Which pinned groups the instruction named specifically. Allowed values: hue, font, ornament-pins. Empty for a pure mood nudge.";
120
+ readonly items: {
121
+ readonly type: "string";
122
+ };
123
+ };
124
+ readonly description: {
125
+ readonly type: "string";
126
+ readonly description: "One short sentence, in plain language, saying what changed. No control names and no numbers.";
127
+ };
128
+ };
129
+ };
130
+ export declare const restyleMapperParsed: import("arktype/internal/variants/object.ts").ObjectType<{
131
+ hues: {
132
+ h: number;
133
+ pinned?: boolean | undefined;
134
+ }[];
135
+ character: {
136
+ chroma: number;
137
+ contrast: number;
138
+ neutralTint: number;
139
+ surfaceLift: number;
140
+ fillLevel: number;
141
+ scheme: string;
142
+ };
143
+ font: string;
144
+ pad: {
145
+ x: number;
146
+ y: number;
147
+ };
148
+ targeted?: string[] | undefined;
149
+ description: string;
150
+ }, {}>;
151
+ export type RestyleMapperParsed = typeof restyleMapperParsed.infer;
152
+ export declare const RESTYLE_TARGETS: readonly ["hue", "font", "ornament-pins"];
153
+ export type RestyleTarget = (typeof RESTYLE_TARGETS)[number];
154
+ export declare function validRestyleTargets(raw: readonly string[] | undefined): RestyleTarget[];
155
+ export declare function isPadDrivenToken(token: string): boolean;