-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathconcepts.ts
More file actions
176 lines (167 loc) · 10.3 KB
/
Copy pathconcepts.ts
File metadata and controls
176 lines (167 loc) · 10.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
import "server-only";
import type { ConceptSubject } from "@/lib/ad-run";
import type { CreativeDirectionKey } from "./directions";
/** Server-only prompt implementations for the cross-runtime direction catalog. */
export type PromptInput = {
brandName: string;
domain: string;
/** One or two plain sentences describing what the brand actually sells. */
summary: string;
industry: string;
/** Visual mood pulled from the site's styleguide, e.g. "modern, confident, premium". */
mood: string;
/** Heading-first Google Font family verified against the styleguide's font links. */
fontFamily: string | null;
/** Brand colors as plain-English phrases (never hex — models print hex codes into the art). */
colorA: string;
colorB: string;
/** The exact company or Product this individual ad promotes. */
subject: ConceptSubject;
headline: string;
subheadline: string;
};
function typography(p: PromptInput, opts?: { includeUrl?: boolean }): string {
return [
`TEXT IS THE #1 PRIORITY. The typography must look like it was set by a professional designer in Figma — clean, sharp, flawless. Follow these rules exactly:`,
`• The image must contain EXACTLY these pieces of text, and absolutely nothing else — no labels, no numbering, no extra words:`,
` "${p.headline}" — set largest, bold (this is the headline)`,
p.subheadline
? ` "${p.subheadline}" — set at about 40% of the headline size, regular weight`
: "",
` "${p.brandName}" — set small (the brand name)`,
opts?.includeUrl ? ` "${p.domain}" — set small` : "",
`• Spelling must be 100% correct, letter for letter. Do NOT invent, add, translate, repeat, or drop any words.`,
p.fontFamily
? `• Use ${p.fontFamily}, the brand's Google Font, for every text element. Preserve its authentic letterforms and use it consistently.`
: `• Use ONE clean, modern geometric sans-serif typeface (Inter / Geist / Helvetica style) for everything. Consistent, even letterforms.`,
`• Tight professional kerning; comfortable line-height; no letter overlaps, no squished or stretched glyphs, no warping, no faux-3D.`,
`• Strong contrast: place text over the calmest part of the composition so every character is perfectly legible.`,
`• Clear hierarchy and generous breathing room. Never hyphenate or break a word across lines.`,
`• IMPORTANT: everything in this brief is an instruction to you, NOT copy to render. The ONLY text that may appear in the image is the quoted strings listed above. Never transcribe rules, notes, or any other sentence from this brief into the artwork.`,
]
.filter(Boolean)
.join("\n");
}
const HARD_RULES = [
`HARD RULES:`,
`• Never print hex codes, color codes, or color names anywhere in the image.`,
`• No placeholder labels, lorem ipsum, hashtags, fake URLs, or gibberish micro-text of any kind.`,
`• Absolutely NO people, faces, or hands.`,
`• No watermarks, borders, or frames.`,
].join("\n");
const brandLine = (p: PromptInput) =>
[
`The brand: ${p.brandName} (${p.domain})${p.industry ? `, ${p.industry}` : ""}.`,
p.summary ? `What they sell: ${p.summary}` : "",
p.subject.kind === "product"
? `CAMPAIGN FOCUS: the specific ${p.brandName} product "${p.subject.name}". Product facts: ${p.subject.description}. Make the central visual unmistakably about this product, not a generic company-level metaphor or a different offering.`
: `CAMPAIGN FOCUS: ${p.brandName} as a company and its overall value, not any one specific product.`,
`Brand visual mood: ${p.mood}.`,
]
.filter(Boolean)
.join(" ");
type PromptBuilder = (input: PromptInput) => string;
const PROMPT_BUILDERS = {
product_hero: (p) =>
[
`A premium square 1:1 editorial advertisement: a single hero product shot with dramatic studio lighting.`,
brandLine(p),
`One flagship product (or an elegant stand-in object that embodies the offering) on a seamless studio backdrop in ${p.colorA}, lit with one dramatic key light and a soft rim light in ${p.colorB}. Deep, soft shadow under the object. Composition like a high-end print campaign: product slightly off-center, headline in the negative space.`,
typography(p),
HARD_RULES,
].join("\n\n"),
isometric: (p) =>
[
`A premium square 1:1 advertisement in the style of a top-tier SaaS landing page: a crisp isometric 3D diagram.`,
brandLine(p),
`A clean isometric illustration of an abstract system — floating planes, nodes, and connecting pipes — that visualises the product working. Dominant color ${p.colorA} with accents of ${p.colorB} on a very light neutral background. Soft ambient occlusion, precise 30-degree isometric angles, matte materials, zero clutter.`,
typography(p),
HARD_RULES,
].join("\n\n"),
typographic: (p) =>
[
`A premium square 1:1 Swiss-design typographic poster. Typography IS the artwork.`,
brandLine(p),
`Massive, confident headline type filling most of the frame on a flat ${p.colorA} background, set on a strict grid with one deliberate asymmetric offset. A single thin rule line and the small wordmark and URL anchor the corners. Ink color in ${p.colorB} or the strongest opposite of the background — the type must contrast HARD against the background (never light-on-light or dark-on-dark). International Typographic Style: order, whitespace, tension.`,
typography(p, { includeUrl: true }),
HARD_RULES,
].join("\n\n"),
macro_material: (p) =>
[
`A premium square 1:1 advertisement built on an extreme macro close-up of a beautiful material.`,
brandLine(p),
`Fill the frame with one sumptuous macro texture that evokes the brand — liquid, fabric, brushed metal, glass, or organic surface — rendered in ${p.colorA} with glints of ${p.colorB}. Shallow depth of field, razor-sharp focal band, luxurious light. The texture leaves one calm, softly blurred region where the text sits.`,
typography(p),
HARD_RULES,
].join("\n\n"),
gradient_field: (p) =>
[
`A premium square 1:1 advertisement made of pure atmosphere: a vast, smooth gradient field.`,
brandLine(p),
`An expansive color field flowing from deep ${p.colorA} into luminous ${p.colorB}, with subtle grain and one soft light bloom rising from the lower third — like dawn over a horizon. No objects at all. The gradient alone carries the emotion; the typography carries the message.`,
typography(p),
HARD_RULES,
].join("\n\n"),
editorial_spread: (p) =>
[
`A premium square 1:1 advertisement styled like a page from a minimalist lifestyle magazine (Kinfolk / Monocle).`,
brandLine(p),
`A quiet, beautifully art-directed still-life scene on a table or shelf — objects related to the offering, natural window light, muted tones grounded in ${p.colorA} with a single accent of ${p.colorB}. Lots of calm negative space. Text set like refined magazine layout: small, precise, unhurried.`,
typography(p),
HARD_RULES,
].join("\n\n"),
sculptural_object: (p) =>
[
`A premium square 1:1 advertisement featuring one abstract 3D sculpture in an empty studio space.`,
brandLine(p),
`A single elegant sculptural form — a twisted ribbon, torus, or fluid glass shape — that metaphorically embodies the product, floating in a softly lit infinite room washed in ${p.colorA}. The sculpture refracts and glows with ${p.colorB}. Octane-render quality, soft global illumination, mirror-calm floor reflection.`,
typography(p),
HARD_RULES,
].join("\n\n"),
data_viz: (p) =>
[
`A premium square 1:1 advertisement where an abstract data visualisation becomes the artwork.`,
brandLine(p),
`One oversized, beautiful chart form — an ascending line, layered area curves, or a radial plot — drawn as art, not UI: thick luminous strokes in ${p.colorB} over a deep ${p.colorA} canvas, with faint grid ticks and glow. The curve should feel optimistic and rising. No axis labels, no numbers, no legend — pure form.`,
typography(p),
HARD_RULES,
].join("\n\n"),
blueprint: (p) =>
[
`A premium square 1:1 advertisement drawn as a technical blueprint schematic.`,
brandLine(p),
`A precise engineering drawing of a machine or system that represents the offering: fine white and ${p.colorB} line work, dashed construction lines, small circular detail callouts, on a rich ${p.colorA} drafting-paper background with subtle grid. Confident, exact, drafted by hand on a light table. The callout circles stay EMPTY — no annotation text.`,
typography(p),
HARD_RULES,
].join("\n\n"),
retro_arcade: (p) =>
[
`A premium square 1:1 advertisement in a late-80s arcade aesthetic — but executed with modern polish.`,
brandLine(p),
`A neon wireframe grid racing toward a glowing horizon, a low chrome sun, and one bold geometric shape floating center — all in electric ${p.colorA} and ${p.colorB} against near-black. Scanline shimmer, phosphor glow, immaculate symmetry. Nostalgic but expensive-looking.`,
typography(p),
HARD_RULES,
].join("\n\n"),
monochrome_crop: (p) =>
[
`A premium square 1:1 advertisement: a tight, single-hue detail crop with extreme restraint.`,
brandLine(p),
`An ultra-tight crop of one exquisite detail — an edge, a curve, a clasp, a surface — of an object embodying the brand, rendered entirely in tones of ${p.colorA} (highlights, midtones, shadows all within that hue). One razor-thin accent line of ${p.colorB}. Dramatic chiaroscuro, vast dark negative space where the type sits.`,
typography(p),
HARD_RULES,
].join("\n\n"),
collage: (p) =>
[
`A premium square 1:1 advertisement composed as a layered cut-paper collage.`,
brandLine(p),
`Hand-cut paper shapes — arcs, torn strips, circles, and abstract forms suggesting the offering — layered with real drop shadows on a warm paper background. Palette anchored in ${p.colorA} and ${p.colorB} with cream and kraft accents. Playful but rigorously composed, like a gallery poster.`,
typography(p),
HARD_RULES,
].join("\n\n"),
} satisfies Record<CreativeDirectionKey, PromptBuilder>;
export function buildConceptPrompt(
key: CreativeDirectionKey,
input: PromptInput,
): string {
return PROMPT_BUILDERS[key](input);
}