@vibes.diy/prompts 14.3.114 → 14.3.116
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/index.d.ts +1 -0
- package/index.js +1 -0
- package/index.js.map +1 -1
- package/llms/image-gen.md +46 -23
- package/look-restyle.d.ts +49 -0
- package/look-restyle.js +199 -0
- package/look-restyle.js.map +1 -0
- package/package.json +5 -5
package/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export * from "./json-docs.js";
|
|
|
6
6
|
export * from "./view-state.js";
|
|
7
7
|
export * from "./style-prompts.js";
|
|
8
8
|
export * from "./restyle.js";
|
|
9
|
+
export * from "./look-restyle.js";
|
|
9
10
|
export * from "./themes/index.js";
|
|
10
11
|
export * from "./themes/looks/index.js";
|
|
11
12
|
export { parseContent } from "./segment-parser.js";
|
package/index.js
CHANGED
|
@@ -6,6 +6,7 @@ export * from "./json-docs.js";
|
|
|
6
6
|
export * from "./view-state.js";
|
|
7
7
|
export * from "./style-prompts.js";
|
|
8
8
|
export * from "./restyle.js";
|
|
9
|
+
export * from "./look-restyle.js";
|
|
9
10
|
export * from "./themes/index.js";
|
|
10
11
|
export * from "./themes/looks/index.js";
|
|
11
12
|
export { parseContent } from "./segment-parser.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,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,cAAc,yBAAyB,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGnD,OAAO,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAEvG,OAAO,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAI7F,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,gBAAgB,EAAwB,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,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGnD,OAAO,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAEvG,OAAO,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAI7F,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,gBAAgB,EAAwB,MAAM,iBAAiB,CAAC"}
|
package/llms/image-gen.md
CHANGED
|
@@ -34,20 +34,21 @@ and `.file()` for a transformation input, so a ref you have in hand is ready to
|
|
|
34
34
|
straight to `images`. Ordinary host records hold the app's own data; the image hook
|
|
35
35
|
supplies the associated generated output.
|
|
36
36
|
|
|
37
|
-
For example, refining a saved pottery illustration
|
|
38
|
-
|
|
37
|
+
For example, refining a saved pottery illustration reads its actual output and saves the
|
|
38
|
+
result on another persisted host record. Supply `vessel` and `glazedVessel` from this
|
|
39
|
+
database; create a fresh saved result record for each deliberate new attempt:
|
|
39
40
|
|
|
40
41
|
```jsx
|
|
41
42
|
import { ImgGen, useImgGen } from "use-vibes";
|
|
42
43
|
|
|
43
|
-
function GlazingPreview({ database }) {
|
|
44
|
-
const { document: original, pending, error } = useImgGen({ _id:
|
|
44
|
+
function GlazingPreview({ database, vessel, glazedVessel }) {
|
|
45
|
+
const { document: original, pending, error } = useImgGen({ _id: vessel._id, database });
|
|
45
46
|
const version = original?.versions?.[original.currentVersion ?? 0];
|
|
46
47
|
const source = version?.id ? original?._files?.[version.id] : undefined;
|
|
47
48
|
const sourceReady = source !== undefined;
|
|
48
49
|
return <section>
|
|
49
|
-
<ImgGen _id=
|
|
50
|
-
{sourceReady ? <ImgGen _id=
|
|
50
|
+
<ImgGen _id={vessel._id} database={database} showControls={false} />
|
|
51
|
+
{sourceReady ? <ImgGen _id={glazedVessel._id} database={database}
|
|
51
52
|
prompt="Add a blue glaze while preserving this vessel's shape and composition"
|
|
52
53
|
images={[source]} /> : <p>{error ? error.message : pending ? "Loading saved source…" : "Source image unavailable"}</p>}
|
|
53
54
|
</section>;
|
|
@@ -96,7 +97,7 @@ Do **not** set `model` for img2img: when an input image is present the platform
|
|
|
96
97
|
|
|
97
98
|
## Restyling a Captured Photo
|
|
98
99
|
|
|
99
|
-
A photo booth, a style camera or an avatar-from-a-selfie app
|
|
100
|
+
A photo booth, a style camera or an avatar-from-a-selfie app saves the camera frame and style prompt on the shot's own record, then uses that record's `_id` for its styled result. Save a fresh shot record with its source frame and style prompt for each deliberate new attempt. The styled picture's frame is simply `<ImgGen>`, shown at full size: ImgGen paints the saved result when there is one, and otherwise its own progress bar, its own message when a picture needs another try, and — in the Vibes iPhone app — the **Create with Image Playground** button that a picture started by the camera (rather than a tap) waits on. The person sees each of those right in the frame. Your own words about the shot sit beside or below the frame.
|
|
100
101
|
|
|
101
102
|
Mount that same `<ImgGen>` wherever an unstyled shot is shown in full — the fresh-capture card and the detail view — so a shot saved in one visit styles the next time it opens. Gallery tiles read the saved result through `useImgGen` and show the original until it arrives.
|
|
102
103
|
|
|
@@ -104,14 +105,14 @@ Mount that same `<ImgGen>` wherever an unstyled shot is shown in full — the fr
|
|
|
104
105
|
import { ImgGen, useImgGen } from "use-vibes";
|
|
105
106
|
|
|
106
107
|
function StyledShot({ shot, database }) {
|
|
107
|
-
const { document: styled } = useImgGen({ _id: shot.
|
|
108
|
+
const { document: styled } = useImgGen({ _id: shot._id, database });
|
|
108
109
|
const version = styled?.versions?.[styled.currentVersion ?? 0];
|
|
109
110
|
const ready = Boolean(version?.id && styled?._files?.[version.id]);
|
|
110
111
|
return (
|
|
111
112
|
<figure>
|
|
112
113
|
<div className="aspect-square w-full overflow-hidden rounded-md">
|
|
113
114
|
{shot._files?.original && (
|
|
114
|
-
<ImgGen _id={shot.
|
|
115
|
+
<ImgGen _id={shot._id} database={database} prompt={shot.prompt}
|
|
115
116
|
images={[shot._files.original]} alt={`${shot.style} version`} className="h-full w-full object-contain" />
|
|
116
117
|
)}
|
|
117
118
|
</div>
|
|
@@ -123,7 +124,7 @@ function StyledShot({ shot, database }) {
|
|
|
123
124
|
|
|
124
125
|
## Loading a Specific Doc
|
|
125
126
|
|
|
126
|
-
Load a previously generated image
|
|
127
|
+
Load a previously generated image with its saved host record's `_id`: `<ImgGen _id={doc._id} database={database} />`. A literal such as `_id="my-image-id"` refers to a host record already saved under that exact `_id` in this database. If the host has a `prompt` but no stored image yet, the component generates one.
|
|
127
128
|
|
|
128
129
|
## Illustrations That Are Part of an Item's Identity
|
|
129
130
|
|
|
@@ -188,7 +189,7 @@ function Gallery() {
|
|
|
188
189
|
|
|
189
190
|
## Caching and Versions
|
|
190
191
|
|
|
191
|
-
-
|
|
192
|
+
- The `_id` is always the host record's own `_id`. Store the character, card or audition record first, then pass its `_id` to every portrait of that record, including list cards and detail sheets. Its stored versions are shared across mounts and reloads.
|
|
192
193
|
- Each image has a regenerate button that appends a new version (writes a new `_files.v<N>` entry).
|
|
193
194
|
- Prev / next controls navigate between stored versions.
|
|
194
195
|
- In the Vibes iPhone app, on iPhones with Apple Intelligence, pictures come from Apple's Image Playground, free. A picture started by a tap — ↻, or a button that shows the `<ImgGen>` — opens Image Playground with its prompt (and the `images` input picture, for an edit), and the image the person confirms is saved as a version like any other. A picture that starts on its own shows a **Create with Image Playground** button that does the same. Your code stays the same, and everywhere else pictures are made as usual. Passing `model` keeps that picture on the platform's cloud generation.
|
|
@@ -220,20 +221,43 @@ Your `access.js` governs your app's own records — the story, the hat, the roas
|
|
|
220
221
|
|
|
221
222
|
Every `<ImgGen>` draws with the app's default image model. `listModels({ kind: "image" })` (from `call-ai`, beside `callAI`) returns the image models this app can use, the app's own choice first, and each entry's `id` goes straight into the `model` prop: `<ImgGen prompt="An astronaut riding a horse" model={m.id} />`. The entry with `isDefault: true` is the one ImgGen uses when `model` is left out; with `images` present the default is the platform's image-edit model instead, so img2img leaves `model` out (see above). When the app's maker saved their own provider key, it covers the image model they chose in settings; other models run on the person's credits. The callAI skill's "Choosing a model" section lists every field.
|
|
222
223
|
|
|
223
|
-
To compare image models, call `listModels({ kind: "image" })` and render one `<ImgGen>` per entry with `model={m.id}`. Every picture shares one prompt, each card is labelled with `m.name`, and each
|
|
224
|
+
To compare image models, call `listModels({ kind: "image" })` and render one `<ImgGen>` per entry with `model={m.id}`. Every picture shares one prompt, each card is labelled with `m.name`, and each picture uses its stored audition record's `_id` so a reload shows the saved pictures. Each click saves one new record per model, with its prompt and model choice:
|
|
224
225
|
|
|
225
226
|
### `App.jsx`
|
|
226
227
|
```jsx
|
|
227
228
|
import React, { useEffect, useState } from "react";
|
|
228
|
-
import {
|
|
229
|
+
import { useFireproof } from "use-fireproof";
|
|
230
|
+
import { ImgGen, useVibe } from "use-vibes";
|
|
229
231
|
import { listModels } from "call-ai";
|
|
230
|
-
import { Button, Card, Field, Grid, Input, Stack, Text } from "@vibes.diy/pouf";
|
|
232
|
+
import { Button, Card, Field, Grid, Input, Skeleton, Stack, Text } from "@vibes.diy/pouf";
|
|
233
|
+
|
|
234
|
+
function AuditionComposer({ database, models }) {
|
|
235
|
+
const { can, me, ready } = useVibe("auditions");
|
|
236
|
+
const [draft, setDraft] = useState("a penguin riding a bicycle");
|
|
237
|
+
const [message, setMessage] = useState("");
|
|
238
|
+
const candidates = models.map((m) => ({
|
|
239
|
+
type: "audition", authorHandle: me?.userHandle, prompt: draft,
|
|
240
|
+
modelId: m.id, modelName: m.name, isDefault: m.isDefault
|
|
241
|
+
}));
|
|
242
|
+
const verdicts = candidates.map((candidate) => can.create(candidate));
|
|
243
|
+
if (!ready || verdicts.some((verdict) => verdict.pending)) return <Skeleton variant="row" />;
|
|
244
|
+
if (verdicts.some((verdict) => !verdict.ok)) return <Text muted>Join this app to save an image audition.</Text>;
|
|
245
|
+
async function drawAudition() {
|
|
246
|
+
await Promise.all(candidates.map((candidate) => database.put(candidate)))
|
|
247
|
+
.catch((error) => setMessage(error.message));
|
|
248
|
+
}
|
|
249
|
+
return <Stack>
|
|
250
|
+
<Field label="Picture">{(id) => <Input id={id} value={draft} onChange={setDraft} />}</Field>
|
|
251
|
+
<Button onClick={drawAudition} disabled={draft.trim().length === 0 || models.length === 0}>Draw it with every model</Button>
|
|
252
|
+
<Text>{message}</Text>
|
|
253
|
+
</Stack>;
|
|
254
|
+
}
|
|
231
255
|
|
|
232
256
|
export default function App() {
|
|
257
|
+
const { database, useLiveQuery } = useFireproof("auditions");
|
|
258
|
+
const { docs } = useLiveQuery("type", { key: "audition" });
|
|
233
259
|
const [models, setModels] = useState([]);
|
|
234
260
|
const [message, setMessage] = useState("");
|
|
235
|
-
const [draft, setDraft] = useState("a penguin riding a bicycle");
|
|
236
|
-
const [prompt, setPrompt] = useState("a penguin riding a bicycle");
|
|
237
261
|
useEffect(() => {
|
|
238
262
|
listModels({ kind: "image" })
|
|
239
263
|
.then(setModels)
|
|
@@ -241,14 +265,13 @@ export default function App() {
|
|
|
241
265
|
}, []);
|
|
242
266
|
return (
|
|
243
267
|
<Stack>
|
|
244
|
-
<
|
|
245
|
-
<Button onClick={() => setPrompt(draft)} disabled={draft.trim().length === 0}>Draw it with every model</Button>
|
|
268
|
+
<AuditionComposer database={database} models={models} />
|
|
246
269
|
<Text>{message}</Text>
|
|
247
270
|
<Grid cols={3}>
|
|
248
|
-
{
|
|
249
|
-
<Card key={
|
|
250
|
-
<ImgGen _id={
|
|
251
|
-
<Text>{
|
|
271
|
+
{docs.map((audition) => (
|
|
272
|
+
<Card key={audition._id}>
|
|
273
|
+
<ImgGen _id={audition._id} database={database} prompt={audition.prompt} model={audition.modelId} alt={`${audition.prompt}, drawn by ${audition.modelName}`} />
|
|
274
|
+
<Text>{audition.isDefault ? `${audition.modelName} · this app's default` : audition.modelName}</Text>
|
|
252
275
|
</Card>
|
|
253
276
|
))}
|
|
254
277
|
</Grid>
|
|
@@ -261,7 +284,7 @@ export default function App() {
|
|
|
261
284
|
|
|
262
285
|
- `prompt`: text prompt (required unless `_id` is provided)
|
|
263
286
|
- `images`: array of `File` objects **or stored `_files` refs** for img2img (uses first image; only pass while generating — display stored results via `_id`)
|
|
264
|
-
- `_id`:
|
|
287
|
+
- `_id`: the host record's `_id`; reads its stored image or saves a new image for that record
|
|
265
288
|
- `database`: Fireproof db name or instance (default `"ImgGen"`)
|
|
266
289
|
- `className`, `alt`, `style`: standard image styling
|
|
267
290
|
- `showControls`: toggle regenerate + version nav (default `true`)
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export interface LookDirection {
|
|
2
|
+
readonly colorway: string;
|
|
3
|
+
readonly mode: "light" | "dark";
|
|
4
|
+
readonly headingFont: string;
|
|
5
|
+
readonly bodyFont: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const LOOK_DIRECTIONS: readonly LookDirection[];
|
|
8
|
+
export interface LookColours {
|
|
9
|
+
readonly background: string;
|
|
10
|
+
readonly surface: string;
|
|
11
|
+
readonly textPrimary: string;
|
|
12
|
+
readonly textSecondary: string;
|
|
13
|
+
readonly border: string;
|
|
14
|
+
readonly primary: string;
|
|
15
|
+
readonly accent: string;
|
|
16
|
+
}
|
|
17
|
+
export interface ResolvedLookDirection extends LookDirection {
|
|
18
|
+
readonly name: string;
|
|
19
|
+
readonly colours: LookColours;
|
|
20
|
+
}
|
|
21
|
+
export declare function resolveLookDirection(d: LookDirection): ResolvedLookDirection | undefined;
|
|
22
|
+
export interface CurrentLook {
|
|
23
|
+
readonly colorway?: string;
|
|
24
|
+
readonly page?: string;
|
|
25
|
+
readonly accent?: string;
|
|
26
|
+
readonly font?: string;
|
|
27
|
+
}
|
|
28
|
+
export declare function pickLookDirections(current: CurrentLook, count?: number): readonly ResolvedLookDirection[];
|
|
29
|
+
export declare function lookDirectionText(d: ResolvedLookDirection): string;
|
|
30
|
+
export declare const LOOK_STYLE_DIRECTION_LEAD = "Style direction: ";
|
|
31
|
+
export declare const LOOK_PAINT_NOT_TEXT = "The colour values and font names in the style direction are paint for you to use, never words: do not write them, or any word that is not already in the screenshot, anywhere in the image.";
|
|
32
|
+
export declare function lookRestyleRenderPrompt(d: ResolvedLookDirection): string;
|
|
33
|
+
export interface LookPickData {
|
|
34
|
+
readonly colorway: string;
|
|
35
|
+
readonly mode: "light" | "dark";
|
|
36
|
+
readonly headingFont: string;
|
|
37
|
+
readonly bodyFont: string;
|
|
38
|
+
}
|
|
39
|
+
export declare const LOOK_PICK_PREFIX = "Restyle only \u2014 ";
|
|
40
|
+
export declare const LOOK_PICK_DATA_LEAD = "look: ";
|
|
41
|
+
export declare function lookPickFileName(n: number): string;
|
|
42
|
+
export declare function lookPickText(args: {
|
|
43
|
+
readonly name: string;
|
|
44
|
+
readonly data: LookPickData;
|
|
45
|
+
}): string;
|
|
46
|
+
export declare function parseLookPickText(text: string): LookPickData | undefined;
|
|
47
|
+
export declare function isLookPickFileName(name: string): boolean;
|
|
48
|
+
export declare function isLookPickMessage(content: readonly unknown[]): boolean;
|
|
49
|
+
export declare const LOOK_RESTYLE_INSTRUCTION: string;
|
package/look-restyle.js
ADDED
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import { exception2Result } from "@adviser/cement";
|
|
2
|
+
import { type } from "arktype";
|
|
3
|
+
import { lazyType } from "@vibes.diy/api-types/lazy-type";
|
|
4
|
+
import { cssToHex } from "./themes/color-math.js";
|
|
5
|
+
import { getVibeFont } from "./themes/fonts.js";
|
|
6
|
+
import { generatePalette } from "./themes/palette-gen.js";
|
|
7
|
+
import { oklabDistance } from "./themes/pouf-rooms.js";
|
|
8
|
+
import { getStylePreset } from "./themes/style-presets.js";
|
|
9
|
+
export const LOOK_DIRECTIONS = [
|
|
10
|
+
{ colorway: "atelier", mode: "light", headingFont: "playfair-display", bodyFont: "lora" },
|
|
11
|
+
{ colorway: "matrix", mode: "dark", headingFont: "vt323", bodyFont: "vt323" },
|
|
12
|
+
{ colorway: "neon", mode: "dark", headingFont: "rajdhani", bodyFont: "rajdhani" },
|
|
13
|
+
{ colorway: "brutalist", mode: "light", headingFont: "space-grotesk", bodyFont: "jetbrains-mono" },
|
|
14
|
+
{ colorway: "broadsheet", mode: "light", headingFont: "bebas-neue", bodyFont: "helvetica" },
|
|
15
|
+
{ colorway: "carbon", mode: "dark", headingFont: "inter", bodyFont: "jetbrains-mono" },
|
|
16
|
+
{ colorway: "scrapbook", mode: "light", headingFont: "source-serif-4", bodyFont: "dm-sans" },
|
|
17
|
+
{ colorway: "house", mode: "light", headingFont: "nunito", bodyFont: "nunito" },
|
|
18
|
+
{ colorway: "peach", mode: "light", headingFont: "nunito", bodyFont: "nunito" },
|
|
19
|
+
{ colorway: "lilac", mode: "light", headingFont: "nunito", bodyFont: "dm-sans" },
|
|
20
|
+
{ colorway: "rose", mode: "dark", headingFont: "playfair-display", bodyFont: "dm-sans" },
|
|
21
|
+
{ colorway: "mint", mode: "light", headingFont: "dm-sans", bodyFont: "dm-sans" },
|
|
22
|
+
{ colorway: "aqua", mode: "dark", headingFont: "space-grotesk", bodyFont: "inter" },
|
|
23
|
+
{ colorway: "celery", mode: "light", headingFont: "lora", bodyFont: "nunito" },
|
|
24
|
+
{ colorway: "periwinkle", mode: "light", headingFont: "inter", bodyFont: "inter" },
|
|
25
|
+
];
|
|
26
|
+
export function resolveLookDirection(d) {
|
|
27
|
+
const preset = getStylePreset(d.colorway);
|
|
28
|
+
if (preset === undefined)
|
|
29
|
+
return undefined;
|
|
30
|
+
const palette = generatePalette(preset.palette);
|
|
31
|
+
const c = d.mode === "dark" ? palette.dark : palette.light;
|
|
32
|
+
const background = cssToHex(c.background);
|
|
33
|
+
const surface = cssToHex(c.surface) ?? background;
|
|
34
|
+
const textPrimary = cssToHex(c["text-primary"]);
|
|
35
|
+
const textSecondary = cssToHex(c["text-secondary"]) ?? textPrimary;
|
|
36
|
+
const border = cssToHex(c.border) ?? textSecondary;
|
|
37
|
+
const primary = cssToHex(c.primary);
|
|
38
|
+
const accent = cssToHex(c.accent) ?? primary;
|
|
39
|
+
if (background === undefined ||
|
|
40
|
+
surface === undefined ||
|
|
41
|
+
textPrimary === undefined ||
|
|
42
|
+
textSecondary === undefined ||
|
|
43
|
+
border === undefined ||
|
|
44
|
+
primary === undefined ||
|
|
45
|
+
accent === undefined) {
|
|
46
|
+
return undefined;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
...d,
|
|
50
|
+
name: preset.label,
|
|
51
|
+
colours: { background, surface, textPrimary, textSecondary, border, primary, accent },
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
const WHITE = "#FFFFFF";
|
|
55
|
+
function isDarkPage(hex) {
|
|
56
|
+
return hex !== undefined && oklabDistance(hex, WHITE) > 0.5;
|
|
57
|
+
}
|
|
58
|
+
function distanceFromCurrent(d, current) {
|
|
59
|
+
const page = current.page === undefined ? 0.5 : oklabDistance(d.colours.background, current.page);
|
|
60
|
+
const accent = current.accent === undefined ? 0.25 : oklabDistance(d.colours.accent, current.accent);
|
|
61
|
+
const font = current.font !== undefined && (d.headingFont === current.font || d.bodyFont === current.font) ? 0.15 : 0;
|
|
62
|
+
return page * 2 + accent - font;
|
|
63
|
+
}
|
|
64
|
+
function distanceBetween(a, b) {
|
|
65
|
+
return oklabDistance(a.colours.background, b.colours.background) + oklabDistance(a.colours.accent, b.colours.accent);
|
|
66
|
+
}
|
|
67
|
+
function nextPick(args) {
|
|
68
|
+
let best = 0;
|
|
69
|
+
let bestScore = -Infinity;
|
|
70
|
+
args.left.forEach((d, i) => {
|
|
71
|
+
const spread = args.picked.length === 0 ? 0 : Math.min(...args.picked.map((p) => distanceBetween(d, p)));
|
|
72
|
+
const sameFont = args.picked.some((p) => p.headingFont === d.headingFont) ? 0.2 : 0;
|
|
73
|
+
const score = distanceFromCurrent(d, args.current) + spread * 0.75 - sameFont;
|
|
74
|
+
if (score > bestScore) {
|
|
75
|
+
bestScore = score;
|
|
76
|
+
best = i;
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
return best;
|
|
80
|
+
}
|
|
81
|
+
export function pickLookDirections(current, count = 4) {
|
|
82
|
+
const nearWhite = current.page !== undefined && oklabDistance(current.page, WHITE) < 0.05;
|
|
83
|
+
const left = LOOK_DIRECTIONS.filter((d) => d.colorway !== current.colorway)
|
|
84
|
+
.filter((d) => (nearWhite && d.colorway === "broadsheet") === false)
|
|
85
|
+
.map(resolveLookDirection)
|
|
86
|
+
.filter((d) => d !== undefined);
|
|
87
|
+
const picked = [];
|
|
88
|
+
while (picked.length < count && left.length > 0) {
|
|
89
|
+
const [next] = left.splice(nextPick({ left, picked, current }), 1);
|
|
90
|
+
if (next !== undefined)
|
|
91
|
+
picked.push(next);
|
|
92
|
+
}
|
|
93
|
+
const flipTo = isDarkPage(current.page) ? "light" : "dark";
|
|
94
|
+
if (picked.length > 0 && picked.every((d) => d.mode !== flipTo)) {
|
|
95
|
+
const flip = left
|
|
96
|
+
.filter((d) => d.mode === flipTo)
|
|
97
|
+
.sort((a, b) => distanceFromCurrent(b, current) - distanceFromCurrent(a, current))[0];
|
|
98
|
+
if (flip !== undefined)
|
|
99
|
+
picked[picked.length - 1] = flip;
|
|
100
|
+
}
|
|
101
|
+
return picked;
|
|
102
|
+
}
|
|
103
|
+
function fontPhrase(slug) {
|
|
104
|
+
const f = getVibeFont(slug);
|
|
105
|
+
return f === undefined ? slug : `${f.label} (${f.mood})`;
|
|
106
|
+
}
|
|
107
|
+
export function lookDirectionText(d) {
|
|
108
|
+
const c = d.colours;
|
|
109
|
+
const roles = [
|
|
110
|
+
`background ${c.background}`,
|
|
111
|
+
`surface ${c.surface}`,
|
|
112
|
+
`text-primary ${c.textPrimary}`,
|
|
113
|
+
`text-secondary ${c.textSecondary}`,
|
|
114
|
+
`border ${c.border}`,
|
|
115
|
+
`primary ${c.primary}`,
|
|
116
|
+
`accent ${c.accent}`,
|
|
117
|
+
].join(", ");
|
|
118
|
+
const faces = d.headingFont === d.bodyFont
|
|
119
|
+
? `every heading, label and line of body text set in ${fontPhrase(d.headingFont)}`
|
|
120
|
+
: `headings set in ${fontPhrase(d.headingFont)}; body text, labels and buttons set in ${fontPhrase(d.bodyFont)}`;
|
|
121
|
+
return `the "${d.name}" colour scheme, ${d.mode} mode — ${roles}; ${faces}`;
|
|
122
|
+
}
|
|
123
|
+
export const LOOK_STYLE_DIRECTION_LEAD = "Style direction: ";
|
|
124
|
+
export const LOOK_PAINT_NOT_TEXT = "The colour values and font names in the style direction are paint for you to use, never words: do not write them, or any word that is not already in the screenshot, anywhere in the image.";
|
|
125
|
+
export function lookRestyleRenderPrompt(d) {
|
|
126
|
+
return `This image is a screenshot of a real, working web app on a phone. Make a new screenshot of the SAME app in a new visual style.
|
|
127
|
+
|
|
128
|
+
This is a change of look, not a change of features.
|
|
129
|
+
|
|
130
|
+
KEEP EXACTLY:
|
|
131
|
+
- every element on screen, in the same position and order, with the same layout and proportions;
|
|
132
|
+
- every word: each heading, label, button text, tab, input placeholder, number, date and list item, spelled exactly as shown;
|
|
133
|
+
- the same count of cards, rows, buttons, tabs, pads and badges;
|
|
134
|
+
- the same icons, emoji and pictures in the same places (they may be restyled).
|
|
135
|
+
|
|
136
|
+
CHANGE ONLY: colour palette, typeface, corner shape, borders, shadows, texture, decoration and light-or-dark.
|
|
137
|
+
Change those boldly: the new look should be unmistakably different at a glance — a new typeface for headings and body, a new background, new colours on every surface and accent, new corner shapes and shadows — while the app underneath stays exactly the same.
|
|
138
|
+
|
|
139
|
+
Output a single flat, straight-on phone screenshot of the restyled app, filling the whole frame. No device frame, no hands, no captions, no annotations, nothing added or removed. The black "VIBES DIY" pill in the bottom-right corner is platform chrome: draw it unchanged.
|
|
140
|
+
|
|
141
|
+
${LOOK_STYLE_DIRECTION_LEAD}${lookDirectionText(d)}.
|
|
142
|
+
${LOOK_PAINT_NOT_TEXT}`;
|
|
143
|
+
}
|
|
144
|
+
export const LOOK_PICK_PREFIX = "Restyle only — ";
|
|
145
|
+
export const LOOK_PICK_DATA_LEAD = "look: ";
|
|
146
|
+
export function lookPickFileName(n) {
|
|
147
|
+
return `look-${n}.png`;
|
|
148
|
+
}
|
|
149
|
+
const LOOK_FILE_NAME = /^look-\d+\.png$/;
|
|
150
|
+
export function lookPickText(args) {
|
|
151
|
+
const { data } = args;
|
|
152
|
+
const json = JSON.stringify({
|
|
153
|
+
colorway: data.colorway,
|
|
154
|
+
mode: data.mode,
|
|
155
|
+
headingFont: data.headingFont,
|
|
156
|
+
bodyFont: data.bodyFont,
|
|
157
|
+
});
|
|
158
|
+
return `${LOOK_PICK_PREFIX}keep every feature, screen, label and behaviour exactly as it is, and change only the look to "${args.name}".
|
|
159
|
+
${LOOK_PICK_DATA_LEAD}${json}
|
|
160
|
+
The attached picture is a mood reference for the colours and surfaces, never content: keep every word of the app as it is.`;
|
|
161
|
+
}
|
|
162
|
+
const lookPickData = lazyType(() => type({
|
|
163
|
+
colorway: "string > 0",
|
|
164
|
+
mode: "'light' | 'dark'",
|
|
165
|
+
headingFont: "string > 0",
|
|
166
|
+
bodyFont: "string > 0",
|
|
167
|
+
}));
|
|
168
|
+
export function parseLookPickText(text) {
|
|
169
|
+
if (text.startsWith(LOOK_PICK_PREFIX) === false)
|
|
170
|
+
return undefined;
|
|
171
|
+
const line = text.split("\n").find((l) => l.startsWith(LOOK_PICK_DATA_LEAD));
|
|
172
|
+
if (line === undefined)
|
|
173
|
+
return undefined;
|
|
174
|
+
const json = exception2Result(() => JSON.parse(line.slice(LOOK_PICK_DATA_LEAD.length)));
|
|
175
|
+
if (json.isErr())
|
|
176
|
+
return undefined;
|
|
177
|
+
const parsed = lookPickData(json.Ok());
|
|
178
|
+
if (parsed instanceof type.errors)
|
|
179
|
+
return undefined;
|
|
180
|
+
return { colorway: parsed.colorway, mode: parsed.mode, headingFont: parsed.headingFont, bodyFont: parsed.bodyFont };
|
|
181
|
+
}
|
|
182
|
+
export function isLookPickFileName(name) {
|
|
183
|
+
return LOOK_FILE_NAME.test(name);
|
|
184
|
+
}
|
|
185
|
+
export function isLookPickMessage(content) {
|
|
186
|
+
return content.some((part) => {
|
|
187
|
+
if (typeof part !== "object" || part === null)
|
|
188
|
+
return false;
|
|
189
|
+
const p = part;
|
|
190
|
+
return p.type === "text" && typeof p.text === "string" && parseLookPickText(p.text) !== undefined;
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
export const LOOK_RESTYLE_INSTRUCTION = "New looks. The person picked a new look for their app from the Look tab. Their message opens with " +
|
|
194
|
+
`"${LOOK_PICK_PREFIX.trim()}" and carries the look as data on its "${LOOK_PICK_DATA_LEAD.trim()}" line: a colourway slug, light or dark, ` +
|
|
195
|
+
"and heading and body font slugs from the font catalog. Restyle only: keep every feature, screen, label and behaviour. " +
|
|
196
|
+
"Apply the look with set_app_style, naming that colourway, the mode and both fonts in the instruction. " +
|
|
197
|
+
"The attached picture is a mood reference painted by an image model: read its colours and surfaces, never its words, " +
|
|
198
|
+
"and never rebuild the app from it.";
|
|
199
|
+
//# sourceMappingURL=look-restyle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"look-restyle.js","sourceRoot":"","sources":["../jsr/look-restyle.ts"],"names":[],"mappings":"AAgCA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACn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AAO,SAAS,CAAC;IACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,CAAC,WAAW,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,CAAC;AACtH,CAAC;AAGD,MAAM,UAAU,kBAAkB,CAAC,IAAY;IAC7C,OAAO,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACnC,CAAC;AAQD,MAAM,UAAU,iBAAiB,CAAC,OAA2B;IAC3D,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE;QAC3B,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI;YAAE,OAAO,KAAK,CAAC;QAC5D,MAAM,CAAC,GAAG,IAA0C,CAAC;QACrD,OAAO,CAAC,CAAC,IAAI,KAAK,MAAM,IAAI,OAAO,CAAC,CAAC,IAAI,KAAK,QAAQ,IAAI,iBAAiB,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,SAAS,CAAC;IACpG,CAAC,CAAC,CAAC;AACL,CAAC;AAQD,MAAM,CAAC,MAAM,wBAAwB,GACnC,oGAAoG;IACpG,IAAI,gBAAgB,CAAC,IAAI,EAAE,0CAA0C,mBAAmB,CAAC,IAAI,EAAE,2CAA2C;IAC1I,wHAAwH;IACxH,wGAAwG;IACxG,sHAAsH;IACtH,oCAAoC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibes.diy/prompts",
|
|
3
|
-
"version": "14.3.
|
|
3
|
+
"version": "14.3.116",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"exports": {
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"license": "Apache-2.0",
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@adviser/cement": "~0.5.34",
|
|
42
|
-
"@vibes.diy/api-types": "14.3.
|
|
43
|
-
"@vibes.diy/call-ai-v2": "14.3.
|
|
44
|
-
"@vibes.diy/identity": "14.3.
|
|
45
|
-
"@vibes.diy/use-vibes-types": "14.3.
|
|
42
|
+
"@vibes.diy/api-types": "14.3.116",
|
|
43
|
+
"@vibes.diy/call-ai-v2": "14.3.116",
|
|
44
|
+
"@vibes.diy/identity": "14.3.116",
|
|
45
|
+
"@vibes.diy/use-vibes-types": "14.3.116",
|
|
46
46
|
"arktype": "~2.2.6",
|
|
47
47
|
"json-schema-faker": "~0.6.3"
|
|
48
48
|
},
|