@nodaro/prompts 1.35.0 → 1.36.0
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/dist/index.cjs +207 -24
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +20 -2
- package/dist/index.d.ts +20 -2
- package/dist/index.js +203 -26
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/__tests__/creator-presets.test.ts +214 -1
- package/src/__tests__/factory-presets.test.ts +18 -1
- package/src/__tests__/realism-wording.test.ts +41 -0
- package/src/factory-presets/generate-image.ts +114 -0
- package/src/factory-presets/index.ts +15 -1
- package/src/factory-presets/shared-image.ts +42 -0
- package/src/factory-presets/text.ts +11 -0
- package/src/index.ts +1 -0
- package/src/prompt-wizard-categories.ts +2 -2
- package/src/provider-prompt-doctrine.ts +2 -2
- package/src/realism-wording.ts +39 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// packages/prompts/src/realism-wording.ts
|
|
2
|
+
/**
|
|
3
|
+
* Realism and viewpoint wording for everyday-photo prompts: skin and finish
|
|
4
|
+
* sentences, the identity-keeping realism instruction for an edit, and the eye-level
|
|
5
|
+
* viewpoint and empty-hands sentences, worded for any person.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/** Who a sentence is about: gendered ("she" / "her") or neutral ("the person" / "their"). */
|
|
9
|
+
export interface PersonWords {
|
|
10
|
+
readonly subject: string
|
|
11
|
+
readonly possessive: string
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const NEUTRAL_PERSON: PersonWords = { subject: "the person", possessive: "their" }
|
|
15
|
+
|
|
16
|
+
const cap = (s: string): string => (s.length === 0 ? s : `${s[0]!.toUpperCase()}${s.slice(1)}`)
|
|
17
|
+
|
|
18
|
+
export const REALISM_SKIN =
|
|
19
|
+
"Skin shows its real structure: visible pores that vary in size across the nose and cheeks, fine vellus hair catching the light, faint uneven pigmentation, a little redness around the nostrils, natural oil on the forehead."
|
|
20
|
+
|
|
21
|
+
export const REALISM_FINISH =
|
|
22
|
+
"The plain look of an everyday small-sensor snapshot: colour left as it was recorded, deep focus from the nearest shoulder to the background, a fine grain in the darker areas, bright areas that fade rather than clip."
|
|
23
|
+
|
|
24
|
+
export const REALISM_PASS_INSTRUCTION =
|
|
25
|
+
"Make this photo look like an unretouched everyday snapshot: skin that shows its pores, its " +
|
|
26
|
+
"fine hairs and the small changes in tone real skin has, colour left as it was recorded, everything " +
|
|
27
|
+
"sharp from the shoulders to the background, a little grain in the shadows. Take out anything that makes it " +
|
|
28
|
+
"look rendered — smoothed, waxy or airbrushed skin, a glow, over-sharpened edges — and add no text or icons. " +
|
|
29
|
+
"Otherwise it stays the same person in the same frame: the face and its proportions, hair, clothing, pose and " +
|
|
30
|
+
"background as they are."
|
|
31
|
+
|
|
32
|
+
/** The frame by its viewpoint only — never by a device. */
|
|
33
|
+
export function realismViewpoint(p: PersonWords): string {
|
|
34
|
+
return `${cap(p.subject)} is looking straight at the viewer from eye level, mid-sentence: ${p.possessive} face and shoulders close up, the framing loose and a little crooked, both arms relaxed and down out of the frame. The whole image is the photograph itself, edge to edge, with no text or icons anywhere.`
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function realismEmptyHands(p: PersonWords): string {
|
|
38
|
+
return `${cap(p.possessive)} hands are empty; ${p.subject} is holding nothing.`
|
|
39
|
+
}
|