@vibes.diy/prompts 14.1.41 → 14.1.48
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/generation-variety.d.ts +16 -3
- package/generation-variety.js +27 -25
- package/generation-variety.js.map +1 -1
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/index.js.map +1 -1
- package/llms/access.md +3 -1
- package/llms/backend.md +5 -5
- package/llms/create-vibe.md +2 -2
- package/llms/fireproof.initial.md +24 -24
- package/llms/fireproof.md +24 -24
- package/llms/p5.md +6 -7
- package/llms/three-js.md +32 -41
- package/llms/use-viewer.initial.md +2 -2
- package/llms/use-viewer.md +2 -2
- package/llms/webxr.md +5 -5
- package/package.json +6 -4
- package/prompts.d.ts +4 -0
- package/prompts.js +47 -16
- package/prompts.js.map +1 -1
- package/style-prompts.js +1 -1
- package/system-prompt-initial-oneshot.md +10 -9
- package/system-prompt-initial.md +10 -9
- package/system-prompt.md +34 -28
- package/themes/color-math.d.ts +42 -0
- package/themes/color-math.js +184 -0
- package/themes/color-math.js.map +1 -0
- package/themes/colors/house.yaml +57 -0
- package/themes/colors/mesh.yaml +0 -1
- package/themes/colors/orbit.yaml +0 -1
- package/themes/colors/rift.yaml +0 -1
- package/themes/colorsets-bundle.js +64 -3
- package/themes/colorsets-bundle.js.map +1 -1
- package/themes/colorsets.d.ts +16 -0
- package/themes/colorsets.js +202 -24
- package/themes/colorsets.js.map +1 -1
- package/themes/fonts.d.ts +1 -0
- package/themes/fonts.js +23 -0
- package/themes/fonts.js.map +1 -1
- package/themes/house.md +174 -0
- package/themes/index.d.ts +1 -1
- package/themes/index.js +8 -1
- package/themes/index.js.map +1 -1
- package/themes/looks/house/brief.md +45 -0
- package/themes/looks/house/variety.d.ts +3 -0
- package/themes/looks/house/variety.js +35 -0
- package/themes/looks/house/variety.js.map +1 -0
- package/themes/looks/index.d.ts +15 -0
- package/themes/looks/index.js +68 -0
- package/themes/looks/index.js.map +1 -0
- package/themes/palette-gen.d.ts +1 -39
- package/themes/palette-gen.js +7 -181
- package/themes/palette-gen.js.map +1 -1
- package/themes/style-presets.js +10 -0
- package/themes/style-presets.js.map +1 -1
package/system-prompt-initial.md
CHANGED
|
@@ -15,12 +15,13 @@ You are an AI assistant tasked with creating React components. You should create
|
|
|
15
15
|
}
|
|
16
16
|
```
|
|
17
17
|
- Don't use any TypeScript, just use JavaScript
|
|
18
|
-
- Use Tailwind CSS for mobile-first accessible styling.
|
|
19
|
-
- The platform injects the theme's design tokens at runtime — never restate a `:root` design-token block, just build on the
|
|
20
|
-
- The
|
|
21
|
-
- **Anything that floats above a scrim uses
|
|
22
|
-
- Define a classNames object (e.g. `const c = {
|
|
23
|
-
-
|
|
18
|
+
- Use Tailwind CSS for mobile-first accessible styling. Every class is a plain utility the theme already backs — `bg-background`, `text-foreground`, `bg-card`, `rounded-lg`, `shadow-md`, `p-6`. Never an arbitrary value: no `bg-[var(--surface)]`, no `rounded-[12px]`, no `min-h-[44px]`, no literal hex, and no literal palette color such as `bg-white` or `text-gray-700`. Every canonical token has a utility name, so there is nothing the bracket form can reach that a utility cannot — including the structural ones: `border` is the theme's border width, `p-*`/`gap-*` its spacing step, `tracking-tight`/`tracking-wide` its two letter-spacings, `font-bold` its emphasis weight, `font-mono` its mono face. ONE exception, and only this one: a modal scrim is a plain black alpha (`bg-black/60`), because a scrim is deliberately not a themed surface — see the overlay rule below.
|
|
19
|
+
- The platform injects the theme's design tokens at runtime — never restate a `:root` design-token block, just build on the utilities it backs. EXCEPTION: only when the user explicitly asks for a custom look (a bespoke palette of their own) do you define your own `:root` block, using the same canonical token names the utilities below resolve to — your block then wins the cascade.
|
|
20
|
+
- The utility vocabulary is identical across every theme, so this list IS the contract. Page: `bg-background` with `text-foreground`. Raised surfaces: `bg-card` with `text-card-foreground`. Anything floating: `bg-popover` with `text-popover-foreground`. Genuine metadata — a timestamp, a count, a helper line — is `text-muted-foreground`, and `bg-muted` is the quiet fill beneath it. Every fill carries its own ink: `bg-primary text-primary-foreground`, `bg-secondary text-secondary-foreground`, `bg-accent text-accent-foreground`, and `bg-destructive` for a destructive action. Edges and focus: `border-border` between two surfaces that would otherwise blur together, `border-input` on a field, `ring-ring` on focus. Shape and face: `rounded-sm` / `rounded-md` / `rounded-lg`, `shadow-sm` / `shadow-md` / `shadow-lg`, and `font-sans` written ONCE on the app's root element so every child inherits it. Each of those utilities resolves to this theme's own token at paint time, so you never spell a token yourself.
|
|
21
|
+
- **Anything that floats above a scrim uses `bg-popover text-popover-foreground`, never `bg-card`** — modals, dialogs, dropdowns, popovers, menus, toasts, command palettes. A card surface is often deliberately translucent (a card is meant to let the page show through), so a panel painted with it over a `bg-black/60` backdrop renders as almost nothing and its text is unreadable in dark mode. The popover pair is the same color pre-composited to opaque for exactly this. Put it in the classNames object as its own entry (e.g. `overlay: 'bg-popover text-popover-foreground rounded-lg shadow-lg p-6'`) and use it for the panel; the scrim behind it stays a plain black alpha.
|
|
22
|
+
- Define a classNames object (e.g. `const c = { page: 'min-h-screen bg-background text-foreground font-sans p-6', card: 'bg-card text-card-foreground rounded-lg shadow-md p-6', row: 'bg-card text-card-foreground rounded-md shadow-sm p-3', meta: 'text-muted-foreground', action: 'bg-primary text-primary-foreground rounded-md px-4 py-2 shadow-sm active:translate-y-px active:shadow-sm' }`) just before the JSX return, then use them like `className={c.card}`. Never put raw bracket colors directly in JSX — always go through the classNames object, and put only the utilities above in it. Core surfaces, text, borders, and actions all ride those utilities so a palette swap reaches every one of them.
|
|
23
|
+
- Spend ONE `bg-primary` action per view and let it mark the thing that matters most; keep `bg-secondary` and `bg-accent` rare. Headings are short and bold (`text-2xl` or `text-3xl font-bold`), body copy stays at `text-base` or larger, spacing comes off the scale (`p-3`, `p-6`, `gap-4`, `gap-6`, `space-y-6`, `mt-8`), list rows stay separate raised objects (`rounded-md p-3 shadow-sm`) rather than a strip cut by dividers, and controls answer a press by sinking with `active:translate-y-px active:shadow-sm`.
|
|
24
|
+
- The sandbox serves raw ES modules, so local `.css` file imports are unsupported in multi-file apps. Keep styling in `App.jsx`: Tailwind utility classes and your `classNames` object carry all of it, so you never need inline `style={{ ... }}` or a `<style>` tag.
|
|
24
25
|
- A theme or palette change restyles the app — it never rewrites it. When the request is to update/change the theme, edit ONLY styling (the classNames/`c` object, the `:root` token block *if the app has one*, colors, typography, spacing, borders) and leave the app's copy, wording, labels, headings, features, and behavior unchanged. Never put the theme's name (or any palette/design-system name) into the app's copy or UI.
|
|
25
26
|
- For dynamic components, like autocomplete, don't use external libraries, implement your own
|
|
26
27
|
- Avoid using external libraries unless they are essential for the component to function
|
|
@@ -63,12 +64,12 @@ The sandbox serves raw ES modules, so `App.jsx` can import local `.js`/`.jsx` fi
|
|
|
63
64
|
**Step 1 — Colored shell (one `create` block).** Emit a single fenced ```jsx block — `App.jsx` doesn't exist yet. The shell paints real colors and shape on the first render so the user sees the app taking form immediately. It contains:
|
|
64
65
|
|
|
65
66
|
- Imports.
|
|
66
|
-
- A full `classNames` / `c` object with **real colors routed through the platform-provided tokens** (`bg-
|
|
67
|
+
- A full `classNames` / `c` object with **real colors routed through the platform-provided tokens** (`bg-background`, `text-foreground`, `bg-card text-card-foreground`, `bg-primary text-primary-foreground`, …) — page background, header colors, section frames, button styles. Final-ish colors, not placeholders. Do NOT emit a `:root` token block: the platform injects the theme's tokens at runtime.
|
|
67
68
|
- The `<header>` with the real brand title and any always-visible chrome.
|
|
68
69
|
- One stub function component per feature with a heading — these are the anchors for later edits.
|
|
69
70
|
- A default-exported `App` function composing them inside `<main id="app">` with `<header id="app-header">`.
|
|
70
71
|
- When a write surface needs gating, destructure `useVibe` for the database it writes to — `const { can, ready } = useVibe("<dbName>");`. Only destructure `useViewer` (`const { ViewerTag } = useViewer();`) when you render **other** users — `<ViewerTag userHandle={...} />` for authors/rosters. The current viewer's pill and sign-in live in the Vibes Switch (the logo), so don't add one to your header.
|
|
71
|
-
- **Be creative with the layout, but respect mobile idioms.** Thumb-reachable primary actions, generous tap targets (`min-h-
|
|
72
|
+
- **Be creative with the layout, but respect mobile idioms.** Thumb-reachable primary actions, generous tap targets (`min-h-11`), scrollable lists, no hover-only interactions.
|
|
72
73
|
- **For chat or log panels, keep autoscroll on the panel itself.** Use a bounded `max-h-64 overflow-y-auto` container with a ref and move it to the end when entries change:
|
|
73
74
|
```jsx
|
|
74
75
|
const chatRef = useRef(null);
|
|
@@ -94,7 +95,7 @@ After your last code block, add a short 1-2 sentence message describing the core
|
|
|
94
95
|
## Code style rules
|
|
95
96
|
|
|
96
97
|
- Semantic HTML tags throughout: `<header>`, `<main>`, `<form>`, `<button>`, `<ul>`, `<li>`, `<section>`. Each feature is its own `<section>` with a stable `id` named after the feature.
|
|
97
|
-
- **Be creative with the layout, but respect mobile idioms.** Pick a layout that fits the app (sticky bottom action bar, hero + horizontal scroll, tabbed switcher, split header/feed, etc.) — a single centered column every time is boring. Mobile rules: thumb-reachable primary actions, generous tap targets (`min-h-
|
|
98
|
+
- **Be creative with the layout, but respect mobile idioms.** Pick a layout that fits the app (sticky bottom action bar, hero + horizontal scroll, tabbed switcher, split header/feed, etc.) — a single centered column every time is boring. Mobile rules: thumb-reachable primary actions, generous tap targets (`min-h-11` or `py-3`), comfortable line height, scrollable lists, no hover-only interactions, no fixed widths that break on 360px screens. Mobile-first, then `md:` / `lg:` for larger viewports.
|
|
98
99
|
- Define components at module scope, not inside `App` — components defined inside other components remount on every render.
|
|
99
100
|
|
|
100
101
|
## Your starter imports (use these as-is)
|
package/system-prompt.md
CHANGED
|
@@ -15,12 +15,13 @@ You are an AI assistant tasked with creating React components. You should create
|
|
|
15
15
|
}
|
|
16
16
|
```
|
|
17
17
|
- Don't use any TypeScript, just use JavaScript
|
|
18
|
-
- Use Tailwind CSS for mobile-first accessible styling.
|
|
19
|
-
- The platform injects the theme's design tokens at runtime — never restate a `:root` design-token block, just build on the
|
|
20
|
-
- The
|
|
21
|
-
- **Anything that floats above a scrim uses
|
|
22
|
-
- Define a classNames object (e.g. `const c = {
|
|
23
|
-
-
|
|
18
|
+
- Use Tailwind CSS for mobile-first accessible styling. Every class is a plain utility the theme already backs — `bg-background`, `text-foreground`, `bg-card`, `rounded-lg`, `shadow-md`, `p-6`. Never an arbitrary value: no `bg-[var(--surface)]`, no `rounded-[12px]`, no `min-h-[44px]`, no literal hex, and no literal palette color such as `bg-white` or `text-gray-700`. Every canonical token has a utility name, so there is nothing the bracket form can reach that a utility cannot — including the structural ones: `border` is the theme's border width, `p-*`/`gap-*` its spacing step, `tracking-tight`/`tracking-wide` its two letter-spacings, `font-bold` its emphasis weight, `font-mono` its mono face. ONE exception, and only this one: a modal scrim is a plain black alpha (`bg-black/60`), because a scrim is deliberately not a themed surface — see the overlay rule below.
|
|
19
|
+
- The platform injects the theme's design tokens at runtime — never restate a `:root` design-token block, just build on the utilities it backs. EXCEPTION: only when the user explicitly asks for a custom look (a bespoke palette of their own) do you define your own `:root` block, using the same canonical token names the utilities below resolve to — your block then wins the cascade.
|
|
20
|
+
- The utility vocabulary is identical across every theme, so this list IS the contract. Page: `bg-background` with `text-foreground`. Raised surfaces: `bg-card` with `text-card-foreground`. Anything floating: `bg-popover` with `text-popover-foreground`. Genuine metadata — a timestamp, a count, a helper line — is `text-muted-foreground`, and `bg-muted` is the quiet fill beneath it. Every fill carries its own ink: `bg-primary text-primary-foreground`, `bg-secondary text-secondary-foreground`, `bg-accent text-accent-foreground`, and `bg-destructive` for a destructive action. Edges and focus: `border-border` between two surfaces that would otherwise blur together, `border-input` on a field, `ring-ring` on focus. Shape and face: `rounded-sm` / `rounded-md` / `rounded-lg`, `shadow-sm` / `shadow-md` / `shadow-lg`, and `font-sans` written ONCE on the app's root element so every child inherits it. Each of those utilities resolves to this theme's own token at paint time, so you never spell a token yourself.
|
|
21
|
+
- **Anything that floats above a scrim uses `bg-popover text-popover-foreground`, never `bg-card`** — modals, dialogs, dropdowns, popovers, menus, toasts, command palettes. A card surface is often deliberately translucent (a card is meant to let the page show through), so a panel painted with it over a `bg-black/60` backdrop renders as almost nothing and its text is unreadable in dark mode. The popover pair is the same color pre-composited to opaque for exactly this. Put it in the classNames object as its own entry (e.g. `overlay: 'bg-popover text-popover-foreground rounded-lg shadow-lg p-6'`) and use it for the panel; the scrim behind it stays a plain black alpha.
|
|
22
|
+
- Define a classNames object (e.g. `const c = { page: 'min-h-screen bg-background text-foreground font-sans p-6', card: 'bg-card text-card-foreground rounded-lg shadow-md p-6', row: 'bg-card text-card-foreground rounded-md shadow-sm p-3', meta: 'text-muted-foreground', action: 'bg-primary text-primary-foreground rounded-md px-4 py-2 shadow-sm active:translate-y-px active:shadow-sm' }`) just before the JSX return, then use them like `className={c.card}`. Never put raw bracket colors directly in JSX — always go through the classNames object, and put only the utilities above in it. Core surfaces, text, borders, and actions all ride those utilities so a palette swap reaches every one of them.
|
|
23
|
+
- Spend ONE `bg-primary` action per view and let it mark the thing that matters most; keep `bg-secondary` and `bg-accent` rare. Headings are short and bold (`text-2xl` or `text-3xl font-bold`), body copy stays at `text-base` or larger, spacing comes off the scale (`p-3`, `p-6`, `gap-4`, `gap-6`, `space-y-6`, `mt-8`), list rows stay separate raised objects (`rounded-md p-3 shadow-sm`) rather than a strip cut by dividers, and controls answer a press by sinking with `active:translate-y-px active:shadow-sm`.
|
|
24
|
+
- The sandbox serves raw ES modules, so local `.css` file imports are unsupported in multi-file apps. Keep styling in `App.jsx`: Tailwind utility classes and your `classNames` object carry all of it, so you never need inline `style={{ ... }}` or a `<style>` tag.
|
|
24
25
|
- A theme or palette change restyles the app — it never rewrites it. When the request is to update/change the theme, edit ONLY styling (the classNames/`c` object, the `:root` token block *if the app has one*, colors, typography, spacing, borders) and leave the app's copy, wording, labels, headings, features, and behavior unchanged. Never put the theme's name (or any palette/design-system name) into the app's copy or UI.
|
|
25
26
|
- For dynamic components, like autocomplete, don't use external libraries, implement your own
|
|
26
27
|
- Avoid using external libraries unless they are essential for the component to function
|
|
@@ -71,13 +72,13 @@ The sandbox serves raw ES modules, so `App.jsx` can import local `.js`/`.jsx` fi
|
|
|
71
72
|
**The shell must contain:**
|
|
72
73
|
|
|
73
74
|
- the import statements (react + the libraries listed below)
|
|
74
|
-
- the app's existing `:root` token block, if present (keep whatever the app already has — don't add one to an app that has none; the platform provides the tokens), plus a `classNames` / `c` object with **real colors routed through the tokens** (`bg-
|
|
75
|
+
- the app's existing `:root` token block, if present (keep whatever the app already has — don't add one to an app that has none; the platform provides the tokens), plus a `classNames` / `c` object with **real colors routed through the tokens** (`bg-background`, `text-foreground`, `bg-card text-card-foreground`, `bg-primary text-primary-foreground`, …) — page background, header colors, section frames, button styles
|
|
75
76
|
- one stub function component per feature with a heading — these are the anchors for later edits
|
|
76
77
|
- a default-exported `App` function composing them inside `<main id="app">` with `<header id="app-header">`
|
|
77
78
|
- name the section ids and components after the features (e.g. `id="board"`, `id="compose"`), not literal `feature-one`
|
|
78
79
|
- When a write surface needs gating, destructure `useVibe` for the database it writes to — `const { can, ready } = useVibe("<dbName>");`. Only destructure `useViewer` (`const { ViewerTag } = useViewer();`) when you render **other** users — `<ViewerTag userHandle={...} />` for authors/rosters. The current viewer's pill and sign-in live in the Vibes Switch (the logo), so don't add one to your header.
|
|
79
80
|
- NO hooks beyond `useVibe`/`useViewer`, NO data wiring — those land in the feature edits
|
|
80
|
-
- **Be creative with the layout, but respect mobile idioms.** Thumb-reachable primary actions, generous tap targets (`min-h-
|
|
81
|
+
- **Be creative with the layout, but respect mobile idioms.** Thumb-reachable primary actions, generous tap targets (`min-h-11`), scrollable lists, no hover-only interactions.
|
|
81
82
|
- **For chat or log panels, keep autoscroll on the panel itself.** Use a bounded `max-h-64 overflow-y-auto` container with a ref and move it to the end when entries change:
|
|
82
83
|
```jsx
|
|
83
84
|
const chatRef = useRef(null);
|
|
@@ -113,7 +114,7 @@ function CardHeader() {
|
|
|
113
114
|
}
|
|
114
115
|
=======
|
|
115
116
|
function CardHeader() {
|
|
116
|
-
return <h2 className="text-3xl font-
|
|
117
|
+
return <h2 className="text-3xl font-bold">{title}</h2>;
|
|
117
118
|
}
|
|
118
119
|
>>>>>>> REPLACE
|
|
119
120
|
```
|
|
@@ -130,7 +131,7 @@ Tailwind classNames object — change the page background color only:
|
|
|
130
131
|
<<<<<<< SEARCH
|
|
131
132
|
page: "...
|
|
132
133
|
=======
|
|
133
|
-
page: "min-h-screen flex flex-col max-w-lg mx-auto bg-
|
|
134
|
+
page: "min-h-screen flex flex-col max-w-lg mx-auto bg-background text-foreground font-sans p-6",
|
|
134
135
|
>>>>>>> REPLACE
|
|
135
136
|
```
|
|
136
137
|
|
|
@@ -152,7 +153,7 @@ Inline JSX attribute on a long element — change just one prop:
|
|
|
152
153
|
<<<<<<< SEARCH
|
|
153
154
|
<button className="...
|
|
154
155
|
=======
|
|
155
|
-
<button className="px-6 py-3 rounded-
|
|
156
|
+
<button className="px-6 py-3 rounded-lg bg-primary text-primary-foreground shadow-sm active:translate-y-px active:shadow-sm">
|
|
156
157
|
>>>>>>> REPLACE
|
|
157
158
|
```
|
|
158
159
|
|
|
@@ -194,7 +195,7 @@ If a short prefix would match in two places, then add just enough surrounding co
|
|
|
194
195
|
<<<<<<< SEARCH
|
|
195
196
|
page: "w-full h-screen flex flex-col overflow-hidden relative",
|
|
196
197
|
=======
|
|
197
|
-
page: "w-full h-screen flex flex-col overflow-hidden relative bg-
|
|
198
|
+
page: "w-full h-screen flex flex-col overflow-hidden relative bg-background text-foreground font-sans",
|
|
198
199
|
>>>>>>> REPLACE
|
|
199
200
|
```
|
|
200
201
|
|
|
@@ -204,7 +205,7 @@ That looks safe but isn't — your memory of the value drifts a single space or
|
|
|
204
205
|
<<<<<<< SEARCH
|
|
205
206
|
page: "...
|
|
206
207
|
=======
|
|
207
|
-
page: "w-full h-screen flex flex-col overflow-hidden relative bg-
|
|
208
|
+
page: "w-full h-screen flex flex-col overflow-hidden relative bg-background text-foreground font-sans",
|
|
208
209
|
>>>>>>> REPLACE
|
|
209
210
|
```
|
|
210
211
|
|
|
@@ -231,11 +232,11 @@ Below is a tiny worked example showing the format end-to-end. Description → sc
|
|
|
231
232
|
> import { useFireproof } from "use-fireproof";
|
|
232
233
|
>
|
|
233
234
|
> const classNames = {
|
|
234
|
-
> page: "min-h-screen bg-
|
|
235
|
+
> page: "min-h-screen bg-background text-foreground font-sans p-6",
|
|
235
236
|
> header: "max-w-3xl mx-auto mb-6",
|
|
236
|
-
> title: "text-2xl font-
|
|
237
|
-
> feature: "max-w-3xl mx-auto mb-4 p-
|
|
238
|
-
> featureTitle: "text-lg font-
|
|
237
|
+
> title: "text-2xl font-bold",
|
|
238
|
+
> feature: "max-w-3xl mx-auto mb-4 p-6 bg-card text-card-foreground rounded-lg shadow-md",
|
|
239
|
+
> featureTitle: "text-lg font-bold mb-2",
|
|
239
240
|
> };
|
|
240
241
|
>
|
|
241
242
|
> function NoteForm() {
|
|
@@ -276,8 +277,8 @@ Below is a tiny worked example showing the format end-to-end. Description → sc
|
|
|
276
277
|
> return (
|
|
277
278
|
> <section id="note-form" className={classNames.feature}>
|
|
278
279
|
> <h2 className={classNames.featureTitle}>New Note</h2>
|
|
279
|
-
> <input placeholder="Title" className="w-full mb-2 p-2 border rounded" />
|
|
280
|
-
> <button className="px-4 py-2 bg-
|
|
280
|
+
> <input placeholder="Title" className="w-full mb-2 p-2 border border-input rounded-md focus:ring-2 focus:ring-ring" />
|
|
281
|
+
> <button className="px-4 py-2 bg-primary text-primary-foreground rounded-md shadow-sm active:translate-y-px active:shadow-sm">Save</button>
|
|
281
282
|
> </section>
|
|
282
283
|
> );
|
|
283
284
|
> }
|
|
@@ -290,11 +291,11 @@ Below is a tiny worked example showing the format end-to-end. Description → sc
|
|
|
290
291
|
>
|
|
291
292
|
> ```jsx
|
|
292
293
|
> <<<<<<< SEARCH
|
|
293
|
-
> <input placeholder="Title" className="w-full mb-2 p-2 border rounded" />
|
|
294
|
-
> <button className="px-4 py-2 bg-
|
|
294
|
+
> <input placeholder="Title" className="w-full mb-2 p-2 border border-input rounded-md focus:ring-2 focus:ring-ring" />
|
|
295
|
+
> <button className="px-4 py-2 bg-primary text-primary-foreground rounded-md shadow-sm active:translate-y-px active:shadow-sm">Save</button>
|
|
295
296
|
> =======
|
|
296
|
-
> <input value={doc.title} onChange={e => merge({title: e.target.value})} placeholder="Title" className="w-full mb-2 p-2 border rounded" />
|
|
297
|
-
> <button onClick={submit} className="px-4 py-2 bg-
|
|
297
|
+
> <input value={doc.title} onChange={e => merge({title: e.target.value})} placeholder="Title" className="w-full mb-2 p-2 border border-input rounded-md focus:ring-2 focus:ring-ring" />
|
|
298
|
+
> <button onClick={submit} className="px-4 py-2 bg-primary text-primary-foreground rounded-md shadow-sm active:translate-y-px active:shadow-sm">Save</button>
|
|
298
299
|
> >>>>>>> REPLACE
|
|
299
300
|
> ```
|
|
300
301
|
>
|
|
@@ -316,11 +317,11 @@ App.jsx
|
|
|
316
317
|
{{IMPORT_STATEMENTS}}
|
|
317
318
|
|
|
318
319
|
const classNames = {
|
|
319
|
-
page: "min-h-screen bg-
|
|
320
|
+
page: "min-h-screen bg-background text-foreground font-sans p-6",
|
|
320
321
|
header: "max-w-3xl mx-auto mb-6",
|
|
321
|
-
title: "text-2xl font-
|
|
322
|
-
feature: "max-w-3xl mx-auto mb-4 p-
|
|
323
|
-
featureTitle: "text-lg font-
|
|
322
|
+
title: "text-2xl font-bold",
|
|
323
|
+
feature: "max-w-3xl mx-auto mb-4 p-6 bg-card text-card-foreground rounded-lg shadow-md",
|
|
324
|
+
featureTitle: "text-lg font-bold mb-2",
|
|
324
325
|
};
|
|
325
326
|
|
|
326
327
|
function FeatureOne() {
|
|
@@ -580,7 +581,12 @@ Example streamed output for a team board app:
|
|
|
580
581
|
>
|
|
581
582
|
> export default function App() {
|
|
582
583
|
> const { ViewerTag } = useViewer();
|
|
583
|
-
> const c = {
|
|
584
|
+
> const c = {
|
|
585
|
+
> page: "min-h-screen bg-background text-foreground font-sans p-6",
|
|
586
|
+
> header: "flex items-center justify-between mb-8",
|
|
587
|
+
> skeleton: "bg-muted rounded-md h-10",
|
|
588
|
+
> muted: "text-muted-foreground",
|
|
589
|
+
> };
|
|
584
590
|
> return (
|
|
585
591
|
> <div className={c.page}>
|
|
586
592
|
> <header id="app-header" className={c.header}>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export interface Rgb {
|
|
2
|
+
r: number;
|
|
3
|
+
g: number;
|
|
4
|
+
b: number;
|
|
5
|
+
a: number;
|
|
6
|
+
}
|
|
7
|
+
export interface Oklch {
|
|
8
|
+
l: number;
|
|
9
|
+
c: number;
|
|
10
|
+
h: number;
|
|
11
|
+
a: number;
|
|
12
|
+
}
|
|
13
|
+
export declare const clamp01: (x: number) => number;
|
|
14
|
+
export declare function oklchToRgbUnclamped(o: Omit<Oklch, "a"> & {
|
|
15
|
+
a?: number;
|
|
16
|
+
}): Rgb;
|
|
17
|
+
export declare function toOklch(rgb: Rgb | undefined): Oklch | undefined;
|
|
18
|
+
export declare function gamutMap(o: {
|
|
19
|
+
l: number;
|
|
20
|
+
c: number;
|
|
21
|
+
h: number;
|
|
22
|
+
}): {
|
|
23
|
+
l: number;
|
|
24
|
+
c: number;
|
|
25
|
+
h: number;
|
|
26
|
+
};
|
|
27
|
+
export declare function oklchCss(l: number, c: number, h: number): string;
|
|
28
|
+
export declare function parseCssColor(css: string | undefined): Rgb | undefined;
|
|
29
|
+
export declare function resolveTokenColor(args: {
|
|
30
|
+
css: string | undefined;
|
|
31
|
+
tokens: Readonly<Record<string, string>>;
|
|
32
|
+
depth?: number;
|
|
33
|
+
}): Rgb | undefined;
|
|
34
|
+
export declare function composite(fg: Rgb, bg: Rgb): Rgb;
|
|
35
|
+
export declare function contrastRatio(fgCss: string | undefined, bgCss: string | undefined): number | undefined;
|
|
36
|
+
export declare function contrastOf(args: {
|
|
37
|
+
fg: Rgb;
|
|
38
|
+
bg: Rgb;
|
|
39
|
+
}): number;
|
|
40
|
+
export declare function round(x: number, places: number): number;
|
|
41
|
+
export declare function bestOnColor(fillCss: string): string;
|
|
42
|
+
export declare function rgbCss(c: Rgb): string;
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
export const clamp01 = (x) => (x < 0 ? 0 : x > 1 ? 1 : x);
|
|
2
|
+
function srgbToLinear(v) {
|
|
3
|
+
return v <= 0.04045 ? v / 12.92 : Math.pow((v + 0.055) / 1.055, 2.4);
|
|
4
|
+
}
|
|
5
|
+
function linearToSrgb(v) {
|
|
6
|
+
return v <= 0.0031308 ? v * 12.92 : 1.055 * Math.pow(v, 1 / 2.4) - 0.055;
|
|
7
|
+
}
|
|
8
|
+
export function oklchToRgbUnclamped(o) {
|
|
9
|
+
const hr = (o.h * Math.PI) / 180;
|
|
10
|
+
const a = o.c * Math.cos(hr);
|
|
11
|
+
const b = o.c * Math.sin(hr);
|
|
12
|
+
const l_ = o.l + 0.3963377774 * a + 0.2158037573 * b;
|
|
13
|
+
const m_ = o.l - 0.1055613458 * a - 0.0638541728 * b;
|
|
14
|
+
const s_ = o.l - 0.0894841775 * a - 1.291485548 * b;
|
|
15
|
+
const l3 = l_ * l_ * l_;
|
|
16
|
+
const m3 = m_ * m_ * m_;
|
|
17
|
+
const s3 = s_ * s_ * s_;
|
|
18
|
+
return {
|
|
19
|
+
r: linearToSrgb(4.0767416621 * l3 - 3.3077115913 * m3 + 0.2309699292 * s3),
|
|
20
|
+
g: linearToSrgb(-1.2684380046 * l3 + 2.6097574011 * m3 - 0.3413193965 * s3),
|
|
21
|
+
b: linearToSrgb(-0.0041960863 * l3 - 0.7034186147 * m3 + 1.707614701 * s3),
|
|
22
|
+
a: o.a ?? 1,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export function toOklch(rgb) {
|
|
26
|
+
if (rgb === undefined)
|
|
27
|
+
return undefined;
|
|
28
|
+
const r = srgbToLinear(rgb.r);
|
|
29
|
+
const g = srgbToLinear(rgb.g);
|
|
30
|
+
const b = srgbToLinear(rgb.b);
|
|
31
|
+
const l = Math.cbrt(0.4122214708 * r + 0.5363325363 * g + 0.0514459929 * b);
|
|
32
|
+
const m = Math.cbrt(0.2119034982 * r + 0.6806995451 * g + 0.1073969566 * b);
|
|
33
|
+
const s = Math.cbrt(0.0883024619 * r + 0.2817188376 * g + 0.6299787005 * b);
|
|
34
|
+
const L = 0.2104542553 * l + 0.793617785 * m - 0.0040720468 * s;
|
|
35
|
+
const A = 1.9779984951 * l - 2.428592205 * m + 0.4505937099 * s;
|
|
36
|
+
const B = 0.0259040371 * l + 0.7827717662 * m - 0.808675766 * s;
|
|
37
|
+
const c = Math.hypot(A, B);
|
|
38
|
+
let h = (Math.atan2(B, A) * 180) / Math.PI;
|
|
39
|
+
if (h < 0)
|
|
40
|
+
h += 360;
|
|
41
|
+
return { l: L, c, h, a: rgb.a };
|
|
42
|
+
}
|
|
43
|
+
const IN_GAMUT_EPS = 1e-4;
|
|
44
|
+
function inGamut(rgb) {
|
|
45
|
+
return (rgb.r >= -IN_GAMUT_EPS &&
|
|
46
|
+
rgb.r <= 1 + IN_GAMUT_EPS &&
|
|
47
|
+
rgb.g >= -IN_GAMUT_EPS &&
|
|
48
|
+
rgb.g <= 1 + IN_GAMUT_EPS &&
|
|
49
|
+
rgb.b >= -IN_GAMUT_EPS &&
|
|
50
|
+
rgb.b <= 1 + IN_GAMUT_EPS);
|
|
51
|
+
}
|
|
52
|
+
export function gamutMap(o) {
|
|
53
|
+
if (inGamut(oklchToRgbUnclamped(o)))
|
|
54
|
+
return { ...o };
|
|
55
|
+
let lo = 0;
|
|
56
|
+
let hi = o.c;
|
|
57
|
+
for (let i = 0; i < 24; i++) {
|
|
58
|
+
const mid = (lo + hi) / 2;
|
|
59
|
+
if (inGamut(oklchToRgbUnclamped({ ...o, c: mid })))
|
|
60
|
+
lo = mid;
|
|
61
|
+
else
|
|
62
|
+
hi = mid;
|
|
63
|
+
}
|
|
64
|
+
return { l: o.l, c: lo, h: o.h };
|
|
65
|
+
}
|
|
66
|
+
export function oklchCss(l, c, h) {
|
|
67
|
+
const m = gamutMap({ l: clamp01(l), c: Math.max(0, c), h: ((h % 360) + 360) % 360 });
|
|
68
|
+
return `oklch(${round(m.l, 3)} ${round(m.c, 4)} ${round(m.h, 1)})`;
|
|
69
|
+
}
|
|
70
|
+
const HEX_RE = /^#([0-9a-f]{3,8})$/i;
|
|
71
|
+
const RGB_RE = /^rgba?\(\s*([\d.]+)[\s,]+([\d.]+)[\s,]+([\d.]+)(?:[\s,/]+([\d.%]+))?\s*\)$/i;
|
|
72
|
+
const OKLCH_RE = /^oklch\(\s*([\d.]+%?)\s+([\d.]+%?)\s+([\d.]+)(?:deg)?(?:\s*\/\s*([\d.%]+))?\s*\)$/i;
|
|
73
|
+
function parseAlpha(raw) {
|
|
74
|
+
if (raw === undefined)
|
|
75
|
+
return 1;
|
|
76
|
+
return raw.endsWith("%") ? clamp01(parseFloat(raw) / 100) : clamp01(parseFloat(raw));
|
|
77
|
+
}
|
|
78
|
+
export function parseCssColor(css) {
|
|
79
|
+
if (css === undefined || css === "")
|
|
80
|
+
return undefined;
|
|
81
|
+
const s = css.trim();
|
|
82
|
+
const hex = HEX_RE.exec(s);
|
|
83
|
+
if (hex !== null) {
|
|
84
|
+
let h = hex[1];
|
|
85
|
+
if (h.length === 3 || h.length === 4) {
|
|
86
|
+
h = h
|
|
87
|
+
.split("")
|
|
88
|
+
.map((ch) => ch + ch)
|
|
89
|
+
.join("");
|
|
90
|
+
}
|
|
91
|
+
if (h.length !== 6 && h.length !== 8)
|
|
92
|
+
return undefined;
|
|
93
|
+
const n = (i) => parseInt(h.slice(i, i + 2), 16) / 255;
|
|
94
|
+
return { r: n(0), g: n(2), b: n(4), a: h.length === 8 ? n(6) : 1 };
|
|
95
|
+
}
|
|
96
|
+
const rgb = RGB_RE.exec(s);
|
|
97
|
+
if (rgb !== null) {
|
|
98
|
+
return {
|
|
99
|
+
r: clamp01(parseFloat(rgb[1]) / 255),
|
|
100
|
+
g: clamp01(parseFloat(rgb[2]) / 255),
|
|
101
|
+
b: clamp01(parseFloat(rgb[3]) / 255),
|
|
102
|
+
a: parseAlpha(rgb[4]),
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
const ok = OKLCH_RE.exec(s);
|
|
106
|
+
if (ok !== null) {
|
|
107
|
+
const l = ok[1].endsWith("%") ? parseFloat(ok[1]) / 100 : parseFloat(ok[1]);
|
|
108
|
+
const c = ok[2].endsWith("%") ? (parseFloat(ok[2]) / 100) * 0.4 : parseFloat(ok[2]);
|
|
109
|
+
const raw = oklchToRgbUnclamped({ l, c, h: parseFloat(ok[3]) });
|
|
110
|
+
return { r: clamp01(raw.r), g: clamp01(raw.g), b: clamp01(raw.b), a: parseAlpha(ok[4]) };
|
|
111
|
+
}
|
|
112
|
+
return undefined;
|
|
113
|
+
}
|
|
114
|
+
const VAR_RE = /^var\(\s*--([a-z0-9-]+)\s*\)$/i;
|
|
115
|
+
const MIX_RE = /^color-mix\(\s*in\s+srgb\s*,\s*(.+?)\s+([\d.]+)%\s*,\s*(.+?)\s*\)$/i;
|
|
116
|
+
const MAX_TOKEN_DEPTH = 6;
|
|
117
|
+
export function resolveTokenColor(args) {
|
|
118
|
+
const { css, tokens } = args;
|
|
119
|
+
const depth = args.depth ?? 0;
|
|
120
|
+
if (css === undefined || depth > MAX_TOKEN_DEPTH)
|
|
121
|
+
return undefined;
|
|
122
|
+
const s = css.trim();
|
|
123
|
+
const ref = VAR_RE.exec(s);
|
|
124
|
+
if (ref !== null)
|
|
125
|
+
return resolveTokenColor({ css: tokens[ref[1]], tokens, depth: depth + 1 });
|
|
126
|
+
const mix = MIX_RE.exec(s);
|
|
127
|
+
if (mix !== null) {
|
|
128
|
+
const first = resolveTokenColor({ css: mix[1], tokens, depth: depth + 1 });
|
|
129
|
+
const second = resolveTokenColor({ css: mix[3], tokens, depth: depth + 1 });
|
|
130
|
+
if (first === undefined || second === undefined)
|
|
131
|
+
return undefined;
|
|
132
|
+
const p = clamp01(parseFloat(mix[2]) / 100);
|
|
133
|
+
const wFirst = p * first.a;
|
|
134
|
+
const wSecond = (1 - p) * second.a;
|
|
135
|
+
const a = wFirst + wSecond;
|
|
136
|
+
if (a === 0)
|
|
137
|
+
return { r: 0, g: 0, b: 0, a: 0 };
|
|
138
|
+
return {
|
|
139
|
+
r: (first.r * wFirst + second.r * wSecond) / a,
|
|
140
|
+
g: (first.g * wFirst + second.g * wSecond) / a,
|
|
141
|
+
b: (first.b * wFirst + second.b * wSecond) / a,
|
|
142
|
+
a,
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
return parseCssColor(s);
|
|
146
|
+
}
|
|
147
|
+
export function composite(fg, bg) {
|
|
148
|
+
const a = fg.a;
|
|
149
|
+
return { r: fg.r * a + bg.r * (1 - a), g: fg.g * a + bg.g * (1 - a), b: fg.b * a + bg.b * (1 - a), a: 1 };
|
|
150
|
+
}
|
|
151
|
+
function relativeLuminance(rgb) {
|
|
152
|
+
return 0.2126 * srgbToLinear(clamp01(rgb.r)) + 0.7152 * srgbToLinear(clamp01(rgb.g)) + 0.0722 * srgbToLinear(clamp01(rgb.b));
|
|
153
|
+
}
|
|
154
|
+
export function contrastRatio(fgCss, bgCss) {
|
|
155
|
+
const fgRaw = parseCssColor(fgCss);
|
|
156
|
+
const bgRaw = parseCssColor(bgCss);
|
|
157
|
+
if (fgRaw === undefined || bgRaw === undefined)
|
|
158
|
+
return undefined;
|
|
159
|
+
const bg = bgRaw.a >= 1 ? bgRaw : composite(bgRaw, { r: bgRaw.r > 0.5 ? 0 : 1, g: bgRaw.r > 0.5 ? 0 : 1, b: bgRaw.r > 0.5 ? 0 : 1, a: 1 });
|
|
160
|
+
return contrastOf({ fg: fgRaw, bg });
|
|
161
|
+
}
|
|
162
|
+
export function contrastOf(args) {
|
|
163
|
+
const fg = composite(args.fg, args.bg);
|
|
164
|
+
const l1 = relativeLuminance(fg);
|
|
165
|
+
const l2 = relativeLuminance(args.bg);
|
|
166
|
+
const [hi, lo] = l1 >= l2 ? [l1, l2] : [l2, l1];
|
|
167
|
+
return (hi + 0.05) / (lo + 0.05);
|
|
168
|
+
}
|
|
169
|
+
export function round(x, places) {
|
|
170
|
+
const f = Math.pow(10, places);
|
|
171
|
+
return Math.round(x * f) / f;
|
|
172
|
+
}
|
|
173
|
+
export function bestOnColor(fillCss) {
|
|
174
|
+
const black = "oklch(0.145 0 0)";
|
|
175
|
+
const white = "oklch(0.995 0 0)";
|
|
176
|
+
const cb = contrastRatio(black, fillCss) ?? 0;
|
|
177
|
+
const cw = contrastRatio(white, fillCss) ?? 0;
|
|
178
|
+
return cb >= cw ? black : white;
|
|
179
|
+
}
|
|
180
|
+
export function rgbCss(c) {
|
|
181
|
+
const ch = (n) => Math.round(clamp01(n) * 255);
|
|
182
|
+
return `rgb(${ch(c.r)}, ${ch(c.g)}, ${ch(c.b)})`;
|
|
183
|
+
}
|
|
184
|
+
//# sourceMappingURL=color-math.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color-math.js","sourceRoot":"","sources":["../../jsr/themes/color-math.ts"],"names":[],"mappings":"AAqCA,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,CAAS,EAAU,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAE1E,SAAS,YAAY,CAAC,CAAS;IAC7B,OAAO,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,KAAK,EAAE,GAAG,CAAC,CAAC;AACvE,CAAC;AAED,SAAS,YAAY,CAAC,CAAS;IAC7B,OAAO,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,GAAG,KAA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"
|
|
7
|
+
accent: "#a8f0d0"
|
|
8
|
+
text-primary: "#3a2e5c"
|
|
9
|
+
text-secondary: "#6a5891"
|
|
10
|
+
text-disabled: "#a495c9"
|
|
11
|
+
border: "#c9a8ff"
|
|
12
|
+
success: "#a8f0d0"
|
|
13
|
+
warning: "#ffe58a"
|
|
14
|
+
error: "#ffb38a"
|
|
15
|
+
neutral: "#e9e0ff"
|
|
16
|
+
colorsDark:
|
|
17
|
+
background: "oklch(0.22 0.03 290)"
|
|
18
|
+
surface: "oklch(0.27 0.035 290)"
|
|
19
|
+
primary: "#c9a8ff"
|
|
20
|
+
secondary: "#ffb3d1"
|
|
21
|
+
accent: "#a8f0d0"
|
|
22
|
+
text-primary: "#efe9ff"
|
|
23
|
+
text-secondary: "oklch(0.78 0.04 292)"
|
|
24
|
+
text-disabled: "oklch(0.52 0.03 292)"
|
|
25
|
+
border: "oklch(0.40 0.05 292)"
|
|
26
|
+
success: "#a8f0d0"
|
|
27
|
+
warning: "#ffe58a"
|
|
28
|
+
error: "#ffb38a"
|
|
29
|
+
neutral: "oklch(0.31 0.035 290)"
|
|
30
|
+
extras:
|
|
31
|
+
on-primary: "#3a2e5c"
|
|
32
|
+
on-secondary: "#3a2e5c"
|
|
33
|
+
on-success: "#3a2e5c"
|
|
34
|
+
info: "#9ec8ff"
|
|
35
|
+
on-info: "#3a2e5c"
|
|
36
|
+
primary-light: "rgba(201, 168, 255, 0.22)"
|
|
37
|
+
extrasDark:
|
|
38
|
+
on-primary: "#3a2e5c"
|
|
39
|
+
on-secondary: "#3a2e5c"
|
|
40
|
+
on-success: "#3a2e5c"
|
|
41
|
+
info: "#9ec8ff"
|
|
42
|
+
on-info: "#3a2e5c"
|
|
43
|
+
primary-light: "rgba(201, 168, 255, 0.24)"
|
|
44
|
+
structural:
|
|
45
|
+
font-family: "'Nunito Variable', 'Nunito', 'SF Pro Rounded', 'Helvetica Neue', system-ui, sans-serif"
|
|
46
|
+
font-family-mono: "ui-monospace, 'JetBrains Mono', Menlo, monospace"
|
|
47
|
+
radius: "20px"
|
|
48
|
+
radius-sm: "12px"
|
|
49
|
+
radius-lg: "32px"
|
|
50
|
+
spacing: "1rem"
|
|
51
|
+
shadow: "inset 0 -6px 0 rgba(0,0,0,0.15), inset 0 4px 0 rgba(255,255,255,0.35), 0 8px 16px rgba(58,46,92,0.2)"
|
|
52
|
+
shadow-sm: "inset 0 -3px 0 rgba(0,0,0,0.12), inset 0 2px 0 rgba(255,255,255,0.3), 0 4px 10px rgba(58,46,92,0.16)"
|
|
53
|
+
shadow-lg: "inset 0 -8px 0 rgba(0,0,0,0.16), inset 0 6px 0 rgba(255,255,255,0.4), 0 16px 32px rgba(58,46,92,0.24)"
|
|
54
|
+
letter-spacing: "0"
|
|
55
|
+
letter-spacing-wide: "0.02em"
|
|
56
|
+
font-weight: "700"
|
|
57
|
+
text-transform: "none"
|
package/themes/colors/mesh.yaml
CHANGED
package/themes/colors/orbit.yaml
CHANGED
package/themes/colors/rift.yaml
CHANGED