@botharness/pixel-avatar 0.1.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/LICENSE +21 -0
- package/README.md +22 -0
- package/dist/index.d.ts +114 -0
- package/dist/index.js +2041 -0
- package/dist/index.js.map +1 -0
- package/package.json +49 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 BotHarness
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# @botharness/pixel-avatar
|
|
2
|
+
|
|
3
|
+
Seeded, editable 32×32 chibi pixel avatars with state symbols they can morph into.
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
import {
|
|
7
|
+
pixelAvatarSvg,
|
|
8
|
+
seededRecipe,
|
|
9
|
+
faceCells,
|
|
10
|
+
pixelSymbolCells,
|
|
11
|
+
} from '@botharness/pixel-avatar';
|
|
12
|
+
|
|
13
|
+
const recipe = seededRecipe('DeepSeekBot');
|
|
14
|
+
const svg = pixelAvatarSvg(recipe); // 32×32 viewBox, crisp edges, no ids or scripts
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
- `seededRecipe(name)`: the same name always gives the same face. `createSeededRecipe(namespace)` makes a factory with its own set of faces.
|
|
18
|
+
- `AVATAR_PARTS`, `AVATAR_SWATCHES`, `AVATAR_PRESETS`, `DEFAULT_RECIPE`: everything an editor needs.
|
|
19
|
+
- `isPixelAvatarRecipe`, `canonicalRecipe`: validate and normalise saved recipes.
|
|
20
|
+
- `AVATAR_HAIR_PARTS`, `AVATAR_RANGES`, `detailedRecipe(recipe)`: optional finer controls. A recipe may carry `bangs`, `sideHair`, `backHair`, `spacing`, `height` and `hairLength`, all six or none; `detailedRecipe` derives them from the plain `hair` so an editor can start from what is on screen. Recipes without them render exactly as before.
|
|
21
|
+
- `faceCells`, `pixelSymbolCells`, `symbolArtCells`: pixels for [`@botharness/pixel-morph`](../morph).
|
|
22
|
+
- `pixelAvatarSvg(recipe, { turns, classPrefix })`: optional pre-rendered head turns, and rig layer classes (`<prefix>-body`, `-head`, `-face`, `-gaze`, `-blink`) for CSS animation.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { PixelCell, PixelCell as PixelCell$1 } from "@botharness/pixel-morph";
|
|
2
|
+
|
|
3
|
+
//#region src/recipe.d.ts
|
|
4
|
+
declare const AVATAR_PARTS: {
|
|
5
|
+
readonly head: readonly ["round", "oval", "square", "long", "heart", "vchin", "chubby", "diamond"];
|
|
6
|
+
readonly pose: readonly ["front", "left", "right"];
|
|
7
|
+
readonly hair: readonly ["crop", "sweep", "spiky", "buzz", "curly", "mohawk", "bob", "long", "bun", "pigtails", "afro", "twintails", "drills", "ponytail", "sidetail", "hime", "odango", "messy", "wavy", "braids", "wolf", "ahoge", "none"];
|
|
8
|
+
readonly eyes: readonly ["round", "dot", "sparkle", "lashes", "sleepy", "happy", "wink", "sharp"];
|
|
9
|
+
readonly brows: readonly ["soft", "thick", "raised", "angry", "worried", "none"];
|
|
10
|
+
readonly nose: readonly ["button", "dot", "line", "none"];
|
|
11
|
+
readonly mouth: readonly ["smile", "grin", "open", "flat", "smirk", "cat", "tongue", "o"];
|
|
12
|
+
readonly cheeks: readonly ["blush", "freckles", "none"];
|
|
13
|
+
readonly glasses: readonly ["none", "round", "square", "shades", "monocle"];
|
|
14
|
+
readonly outfit: readonly ["tee", "shirttie", "hoodie", "turtleneck", "sailor", "blazer", "overalls", "dress", "kimono", "cardigan", "maid", "jacket"];
|
|
15
|
+
readonly backdrop: readonly ["sparkles", "hearts", "stars", "dots", "none"];
|
|
16
|
+
readonly accessory: readonly ["none", "beanie", "cap", "headphones", "flower", "bow", "earring", "crown", "halo", "catears", "hairclip", "horns", "beret", "ribbon", "headband", "bunnyears", "horseears", "flowercrown", "witch", "pins"];
|
|
17
|
+
};
|
|
18
|
+
declare const AVATAR_HAIR_PARTS: {
|
|
19
|
+
readonly bangs: readonly ["crop", "bob", "sweep", "spiky", "curly", "messy", "wolf", "wavy", "ahoge", "hime", "buzz", "mohawk", "none"];
|
|
20
|
+
readonly sideHair: readonly ["crop", "bun", "bob", "long", "hime", "curly", "braids", "none"];
|
|
21
|
+
readonly backHair: readonly ["none", "bob", "long", "wavy", "wolf", "bun", "odango", "pigtails", "twintails", "drills", "ponytail", "sidetail", "afro"];
|
|
22
|
+
};
|
|
23
|
+
declare const AVATAR_RANGES: {
|
|
24
|
+
readonly spacing: readonly [-1, 1];
|
|
25
|
+
readonly height: readonly [-1, 1];
|
|
26
|
+
readonly hairLength: readonly [-2, 2];
|
|
27
|
+
};
|
|
28
|
+
type AvatarHairPart = keyof typeof AVATAR_HAIR_PARTS;
|
|
29
|
+
type AvatarRange = keyof typeof AVATAR_RANGES;
|
|
30
|
+
type AvatarPart = keyof typeof AVATAR_PARTS;
|
|
31
|
+
declare const AVATAR_COLORS: readonly ["skinColor", "hairColor", "eyeColor", "shirtColor"];
|
|
32
|
+
type AvatarColor = (typeof AVATAR_COLORS)[number];
|
|
33
|
+
type PixelAvatarRecipe = {
|
|
34
|
+
schemaVersion: 1;
|
|
35
|
+
family: 'illustrated';
|
|
36
|
+
assetVersion: 1;
|
|
37
|
+
rigVersion: 1;
|
|
38
|
+
} & { [P in AvatarPart]: (typeof AVATAR_PARTS)[P][number] } & Record<AvatarColor, string> & { [P in AvatarHairPart]?: (typeof AVATAR_PARTS)['hair'][number] } & { [P in AvatarRange]?: number };
|
|
39
|
+
declare const DEFAULT_RECIPE: PixelAvatarRecipe;
|
|
40
|
+
declare function isPixelAvatarRecipe(value: unknown): value is PixelAvatarRecipe;
|
|
41
|
+
declare function canonicalRecipe(recipe: PixelAvatarRecipe): PixelAvatarRecipe;
|
|
42
|
+
declare function detailedRecipe(recipe: PixelAvatarRecipe): PixelAvatarRecipe;
|
|
43
|
+
declare const AVATAR_SWATCHES: Record<AvatarColor, readonly string[]>;
|
|
44
|
+
/**
|
|
45
|
+
* Returns a name-seeded recipe factory. Different namespaces give different faces for the same
|
|
46
|
+
* name; the factory takes the name only, so it is safe to pass straight to `Array.map`.
|
|
47
|
+
*/
|
|
48
|
+
declare function createSeededRecipe(namespace: string): (seed: string) => PixelAvatarRecipe;
|
|
49
|
+
/** The same name always gives the same face (BotHarness's namespace). */
|
|
50
|
+
declare const seededRecipe: (seed: string) => PixelAvatarRecipe;
|
|
51
|
+
declare const AVATAR_PRESETS: readonly PixelAvatarRecipe[];
|
|
52
|
+
//#endregion
|
|
53
|
+
//#region src/figure.d.ts
|
|
54
|
+
type Cell = string | undefined;
|
|
55
|
+
type Grid = Cell[][];
|
|
56
|
+
type PixelGrid = Grid;
|
|
57
|
+
type Recipe = PixelAvatarRecipe;
|
|
58
|
+
declare function pixelTileColor(hair: string): string;
|
|
59
|
+
declare function pixelFigure(recipe: Recipe, yawDeg: number): {
|
|
60
|
+
tile: string;
|
|
61
|
+
body: string;
|
|
62
|
+
head: string;
|
|
63
|
+
cells: PixelCell$1[];
|
|
64
|
+
};
|
|
65
|
+
//#endregion
|
|
66
|
+
//#region src/random.d.ts
|
|
67
|
+
declare function seededRandom(seed: string): () => number;
|
|
68
|
+
//#endregion
|
|
69
|
+
//#region src/svg.d.ts
|
|
70
|
+
/** Head-turn offsets (degrees) the thinking animation cycles through. */
|
|
71
|
+
declare const AVATAR_TURNS: readonly [-14, -7, 7, 14];
|
|
72
|
+
interface PixelAvatarSvgOptions {
|
|
73
|
+
/** Extra yaw offsets to pre-render as hidden `[data-avatar-turn]` layers. */
|
|
74
|
+
turns?: readonly number[];
|
|
75
|
+
/** Class prefix for the rig layers (`-body`, `-head`, `-face`, `-gaze`, `-blink`). */
|
|
76
|
+
classPrefix?: string;
|
|
77
|
+
}
|
|
78
|
+
/** Every visible pixel of the face at its pose, in paint order, for morphing. */
|
|
79
|
+
declare function faceCells(recipe: PixelAvatarRecipe): PixelCell$1[];
|
|
80
|
+
/** A 32×32 SVG of the avatar: tile, body, head rig, optional turn layers and an empty morph layer. */
|
|
81
|
+
declare function pixelAvatarSvg(recipe: PixelAvatarRecipe, options?: PixelAvatarSvgOptions): string;
|
|
82
|
+
//#endregion
|
|
83
|
+
//#region src/symbols.d.ts
|
|
84
|
+
declare const SYMBOLS: {
|
|
85
|
+
readonly thinking: readonly ["........................", "........................", "........................", "...........AAAA.........", "..........AAAAAA........", ".........AAAAAAAA.......", ".......AAAAAAAAAAA......", ".....AAAAAAAAAAAAA......", "....AAAAAAAAAAAAAAAA....", "....AAAAAAAAAAAAAAAAA...", "...AAAAAAAAAAAAAAAAAAA..", "...AAAAHHAAAHHAAAHHAAA..", "....AAAHHAAAHHAAAHHAAA..", "....AAAAAAAAAAAAAAAAAA..", ".....AAAAAAAAAAAAAAAA...", ".....AAAAAAAAAAAAAAA....", ".......AAAAAAAAAAA......", "........................", "....AA..................", "...AAAA.................", "...AAAA.................", "..A.AA..................", ".AAA....................", "..A....................."];
|
|
86
|
+
readonly ask: readonly ["........................", "........................", "...........AAA..........", "........AAAAAAAA........", ".......AAAAAAAAAA.......", ".......AAAAAAAAAA.......", "......AAAAA...AAAA......", "......AAAA....AAAA......", "......AAA.....AAAA......", "......AAA.....AAAA......", "..............AAAA......", ".............AAAAA......", "............AAAAA.......", "...........AAAAA........", "...........AAA..........", "..........AAAA..........", "..........AAAA..........", "...........AA...........", "........................", "..........AAAA..........", "..........AAAA..........", "..........AAAA..........", "...........AA...........", "........................"];
|
|
87
|
+
readonly read: readonly ["........................", "........................", "........................", "........................", "..AAAAAAA......AAAAAAA..", ".AAAAAAAAAA..AAAAAAAAAA.", ".AAAAAAAAAAAAAAAAAAAAAA.", ".AAAAAAAAAAAAAAAAAAAAAA.", ".AAAHHHHHAAAAAAHHHHHAAA.", ".AAAHHHHHAAAAAAHHHHHAAA.", ".AAAAAAAAAAAAAAAAAAAAAA.", ".AAAAAAAAAAAAAAAAAAAAAA.", ".AAAHHHHHAAAAAAHHHHHAAA.", ".AAAAAAAAAAAAAAAAAAAAAA.", ".AAAAAAAAAAAAAAAAAAAAAA.", ".AAAAAAAAAAAAAAAAAAAAAA.", ".AAAAAAAAAAAAAAAAAAAAAA.", ".AAAAAAAAAAAAAAAAAAAAAA.", "...........AA...........", "........................", "........................", "........................", "........................", "........................"];
|
|
88
|
+
readonly write: readonly ["........................", ".....AAAAAAAAAA.........", "....AAAAAAAAAAAA........", "....AAAAAAAAAAAAA.......", "....AAAAAAAAAAAAAA......", "....AAAAAAAAAAAAAAA.....", "....AAAAAAAAAAAAAAAA....", "....AAAAAAAAAAAAAAAA....", "....AAAAAAAAAAAAAAAA....", "....AAAAAAAHHAAAAAAA....", "....AAAAAAAHHAAAAAAA....", "....AAAAAAAHHAAAAAAA....", "....AAAAAAAHHAAAAAAA....", "....AAAHHHHHHHHHHAAA....", "....AAAAAAAHHAAAAAAA....", "....AAAAAAAHHAAAAAAA....", "....AAAAAAAHHAAAAAAA....", "....AAAAAAAHHAAAAAAA....", "....AAAAAAAAAAAAAAAA....", "....AAAAAAAAAAAAAAAA....", "....AAAAAAAAAAAAAAAA....", "....AAAAAAAAAAAAAAAA....", ".....AAAAAAAAAAAAAA.....", "........................"];
|
|
89
|
+
readonly edit: readonly ["........................", "........................", "........................", "...............AA.......", ".............HHAAA......", ".............HHHAAA.....", "............AAHHHAAA....", "...........AAAAHHHAAA...", "..........AAAAAAHHHAA...", ".........AAAAAAAAHHH....", "........AAAAAAAAAAHH....", ".......AAAAAAAAAAA......", "......AAAAAAAAAAA.......", ".....AAAAAAAAAAA........", "....AAAAAAAAAAA.........", "...AAAAAAAAAAA..........", "...AAHHAAAAAA...........", "...AAHHHAAAA............", "...AAAHHAAA.............", "...AAAAAAA..............", "...AAAAAA...............", "........................", "........................", "........................"];
|
|
90
|
+
readonly bash: readonly ["........................", "........................", "........................", "....AAAAAAAAAAAAAAAA....", "..AAAAAAAAAAAAAAAAAAAA..", "..AAAAAAAAAAAAAAAAAAAA..", ".AAAAAAAAAAAAAAAAAAAAAA.", ".AAAAAAAAAAAAAAAAAAAAAA.", ".AAAAHHAAAAAAAAAAAAAAAA.", ".AAAAHHHAAAAAAAAAAAAAAA.", ".AAAAAHHHAAAAAAAAAAAAAA.", ".AAAAAAHHHAAAAAAAAAAAAA.", ".AAAAAAHHHAAAAAAAAAAAAA.", ".AAAAAHHHAAAAAAAAAAAAAA.", ".AAAAHHHAAAAAAAAAAAAAAA.", ".AAAAHHAAAAHHHHHHHAAAAA.", ".AAAAAAAAAAAAAAAAAAAAAA.", ".AAAAAAAAAAAAAAAAAAAAAA.", "..AAAAAAAAAAAAAAAAAAAA..", "..AAAAAAAAAAAAAAAAAAAA..", "....AAAAAAAAAAAAAAAA....", "........................", "........................", "........................"];
|
|
91
|
+
readonly search: readonly ["........................", "........................", ".......AAAAAA...........", "......AAAAAAAA..........", "....AAAAAAAAAAAA........", "....AAAAAAAAAAAA........", "...AAAA......AAAA.......", "..AAAA........AAAA......", "..AAAA........AAAA......", "..AAAA........AAAA......", "..AAAA........AAAA......", "..AAAA........AAAA......", "..AAAA........AAAA......", "...AAAA......AAAA.......", "....AAAAAAAAAAAAA.......", "....AAAAAAAAAAAAAA......", "......AAAAAAAAAAAAA.....", ".......AAAAAA..AAAAA....", "................AAAAA...", ".................AAAAA..", "..................AAAAA.", "...................AAAA.", "....................AA..", "........................"];
|
|
92
|
+
readonly web: readonly ["........................", "........................", ".........AHHHHA.........", ".......AAHHHHHHAA.......", ".....AAAAHHAAHHAAAA.....", "....AAAAHHAAAAHHAAAA....", "....HHHHHHHHHHHHHHHH....", "...AHHHHHHHHHHHHHHHHA...", "...AAAAAHAAAAAAHAAAAA...", "..AAAAAHHAAAAAAHAAAAAA..", "..AAAAAHHAAAAAAHHAAAAA..", "..HHHHHHHHHHHHHHHHHHHH..", "..HHHHHHHHHHHHHHHHHHHH..", "..AAAAAHHAAAAAAHHAAAAA..", "..AAAAAHHAAAAAAHAAAAAA..", "...AAAAAHAAAAAAHAAAAA...", "...AHHHHHHHHHHHHHHHHA...", "....HHHHHHHHHHHHHHHH....", "....AAAAHHAAAAHHAAAA....", ".....AAAAHHAAHHAAAA.....", ".......AAHHHHHHAA.......", ".........AHHHHA.........", "........................", "........................"];
|
|
93
|
+
readonly fetch: readonly ["........................", "..........AAA...........", "..........AAAA..........", "..........AAAA..........", "..........AAAA..........", "..........AAAA..........", "..........AAAA..........", ".....AA...AAAA...AA.....", "....AAAA..AAAA..AAAA....", "....AAAAA.AAAA.AAAAA....", ".....AAAAAAAAAAAAAA.....", "......AAAAAAAAAAAA......", ".......AAAAAAAAAA.......", "........AAAAAAAA........", ".........AAAAAA.........", "..AAA.....AAAA.....AAA..", "..AAA......AA......AAA..", "..AAA..............AAA..", "..AAA..............AAA..", "..AAAAAAAAAAAAAAAAAAAA..", "..AAAAAAAAAAAAAAAAAAAA..", "..AAAAAAAAAAAAAAAAAAAA..", "...AAAAAAAAAAAAAAAAAA...", "........................"];
|
|
94
|
+
readonly todo: readonly ["........................", "........................", "....AAAAAAAAAAAAAAAA....", "....AAAAAAAAAAAAAAAA....", "...AAAAAAAAAAAAAAAAAA...", "...AAAAAAAAAAAAAAAAAA...", "...AAAAAAAAHAAAAAAAAA...", "...AAAAAAAHHAAAAAAAAA...", "...AAAHHAHHAAHHHHHAAA...", "...AAAAHHHAAAHHHHHAAA...", "...AAAAAHAAAAAAAAAAAA...", "...AAAAAAAAAAAAAAAAAA...", "...AAAAAAAAAAAAAAAAAA...", "...AAAAAAAAHAAAAAAAAA...", "...AAAAAAAHHAAAAAAAAA...", "...AAAHHAHHAAHHHHHAAA...", "...AAAAHHHAAAHHHHHAAA...", "...AAAAAHAAAAAAAAAAAA...", "...AAAAAAAAAAAAAAAAAA...", "...AAAAAAAAAAAAAAAAAA...", "...AAAAAAAAAAAAAAAAAA...", "....AAAAAAAAAAAAAAAA....", ".....AAAAAAAAAAAAAA.....", "........................"];
|
|
95
|
+
readonly subagent: readonly ["........................", "........................", "........................", "........................", ".....AAAA......AAAA.....", "....AAAAAA....AAAAAA....", "....AAAAAAA..AAAAAAA....", "....AAAAAAA..AAAAAAA....", "....AAAAAAA..AAAAAAA....", "....AAAAAA...AAAAAAA....", ".....AAAAA....AAAAA.....", "........................", "........................", "........................", ".......A................", "....AAAAAAA..AAAAAAA....", "...AAAAAAAAAAAAAAAAAA...", "..AAAAAAAAAAAAAAAAAAAA..", ".AAAAAAAAAAAAAAAAAAAAAA.", ".AAAAAAAAAAAAAAAAAAAAAA.", ".AAAAAAAAAAAAAAAAAAAAAA.", "........................", "........................", "........................"];
|
|
96
|
+
readonly workflow: readonly ["........................", "........................", "........................", "..AAAAAA.........AAAAA..", "..AAAAAA........AAAAAAA.", ".AAAAAAAAAAAAAAAAAAAAAA.", ".AAAAAAAAAAAAAAAAAAAAAA.", ".AAAAAAAAAAAAAAAAAAAAAA.", ".AAAAAAA....AAA.AAAAAAA.", "..AAAAAA....AAA..AAAAA..", "............AAA.........", "............AAA.........", "............AAA.........", "............AAA.........", "............AAA..AAAAA..", "............AAA.AAAAAAA.", ".............AAAAAAAAAA.", ".............AAAAAAAAAA.", "...............AAAAAAAA.", "................AAAAAAA.", ".................AAAAA..", "........................", "........................", "........................"];
|
|
97
|
+
readonly goal: readonly ["........................", "....AA..................", "...AAAA.................", "...AAAAAAAAAAAAAAAAA....", "...AAAAAAAAAAAAAAAA.....", "...AAAAAAAAAAAAAAA......", "...AAAAAAAAAAAAAAA......", "...AAAAAAAAAAAAAA.......", "...AAAAAAAAAAAAAA.......", "...AAAAAAAAAAAAAAA......", "...AAAAAAAAAAAAAAAA.....", "...AAAAAAAAAAAAAAAAA....", "...AAAA.................", "...AAAA.................", "...AAAA.................", "...AAAA.................", "...AAAA.................", "...AAAA.................", "...AAAA.................", "...AAAA.................", "...AAAA.................", "...AAAA.................", "...AAAA.................", "....AA.................."];
|
|
98
|
+
readonly present: readonly ["........................", "........................", "...AAAAAAAAAAAAAAAAAA...", "..AAAAAAAAAAAAAAAAAAAA..", ".AAAAAAAAAAAAAAAAAAAAAA.", ".AAAAAAAAAAAAAAAAAHAAAA.", ".AAAAAAAAAAAAAAAAAHAAAA.", ".AAAAAAAAAHAAAAAAAHAAAA.", ".AAAAAAAAAHAAAHAAAHAAAA.", ".AAAAAHAAAHAAAHAAAHAAAA.", ".AAAAAHAAAHAAAHAAAHAAAA.", ".AAAAAHAAAHAAAHAAAHAAAA.", ".AAAAAHAAAHAAAHAAAHAAAA.", ".AAAAAHAAAHAAAHAAAHAAAA.", ".AAAAAAAAAAAAAAAAAAAAAA.", "..AAAAAAAAAAAAAAAAAAAA..", "...AAAAAAAAAAAAAAAAAA...", ".........AAAAAA.........", "........AAAAAAAA........", "........AAA..AAA........", ".......AAA....AAA.......", ".......AAA....AAA.......", ".......AA......AA.......", "........................"];
|
|
99
|
+
readonly approval: readonly ["........................", "........................", ".........AAAAAA.........", "......AAAAAAAAAAAA......", "....AAAAAAAAAAAAAAAA....", "...AAAAAAAAHHAAAAAAAA...", "...AAAAAAAAHHAAAAAAAA...", "...AAAAAAAAHHAAAAAAAA...", "...AAAAAAAAHHAAAAAAAA...", "...AAAAAAAAHHAAAAAAAA...", "...AAAAAAAAHHAAAAAAAA...", "...AAAAAAAAHHAAAAAAAA...", "...AAAAAAAAHHAAAAAAAA...", "....AAAAAAAHHAAAAAAA....", "....AAAAAAAAAAAAAAAA....", "....AAAAAAAAAAAAAAAA....", ".....AAAAAAHHAAAAAA.....", ".....AAAAAAHHAAAAAA.....", "......AAAAAAAAAAAA......", ".......AAAAAAAAAA.......", "........AAAAAAAA........", ".........AAAAA..........", "...........AA...........", "........................"];
|
|
100
|
+
readonly other: readonly ["........................", "........................", "........................", "...........AA...........", "...........AA...........", "..........AAAA..........", "..........AAAA..........", "..........AAAA..........", ".........AAAAAA.........", "........AAAAAAAA........", ".....AAAAAAAAAAAAAA.....", "...AAAAAAAAAAAAAAAAAA...", "...AAAAAAAAAAAAAAAAAA...", ".....AAAAAAAAAAAAAA.....", "........AAAAAAAA........", ".........AAAAAA.........", "..........AAAA..........", "..........AAAA..........", "..........AAAA..........", "...........AA...........", "...........AA...........", "........................", "........................", "........................"];
|
|
101
|
+
};
|
|
102
|
+
type PixelSymbol = keyof typeof SYMBOLS;
|
|
103
|
+
declare const PIXEL_SYMBOLS: PixelSymbol[];
|
|
104
|
+
declare function pixelSymbolCells(symbol: PixelSymbol, color: string): PixelCell$1[];
|
|
105
|
+
/**
|
|
106
|
+
* Colours a 24×24 character-art symbol (`A` body, `H` highlight, anything else empty) into
|
|
107
|
+
* cells on the 32 grid: the body in `color`, highlights lighter, the lower-right edge darker,
|
|
108
|
+
* and a one-pixel ink outline. This is how every built-in symbol is drawn, so a host can add
|
|
109
|
+
* its own symbols in the same style without touching the package.
|
|
110
|
+
*/
|
|
111
|
+
declare function symbolArtCells(rows: readonly string[], color: string): PixelCell$1[];
|
|
112
|
+
//#endregion
|
|
113
|
+
export { AVATAR_COLORS, AVATAR_HAIR_PARTS, AVATAR_PARTS, AVATAR_PRESETS, AVATAR_RANGES, AVATAR_SWATCHES, AVATAR_TURNS, type AvatarColor, type AvatarHairPart, type AvatarPart, type AvatarRange, DEFAULT_RECIPE, PIXEL_SYMBOLS, type PixelAvatarRecipe, type PixelAvatarSvgOptions, type PixelCell, type PixelGrid, type PixelSymbol, canonicalRecipe, createSeededRecipe, detailedRecipe, faceCells, isPixelAvatarRecipe, pixelAvatarSvg, pixelFigure, pixelSymbolCells, pixelTileColor, seededRandom, seededRecipe, symbolArtCells };
|
|
114
|
+
//# sourceMappingURL=index.d.ts.map
|