open-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 +199 -0
- package/THIRD_PARTY_NOTICES.md +11 -0
- package/dist/core/generator.d.ts +11 -0
- package/dist/core/generator.d.ts.map +1 -0
- package/dist/core/hash.d.ts +5 -0
- package/dist/core/hash.d.ts.map +1 -0
- package/dist/core/parts.d.ts +8 -0
- package/dist/core/parts.d.ts.map +1 -0
- package/dist/core/svg.d.ts +5 -0
- package/dist/core/svg.d.ts.map +1 -0
- package/dist/core/types.d.ts +25 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1573 -0
- package/dist/react/Avatar.d.ts +9 -0
- package/dist/react/Avatar.d.ts.map +1 -0
- package/dist/react/AvatarGrid.d.ts +11 -0
- package/dist/react/AvatarGrid.d.ts.map +1 -0
- package/dist/react/index.d.ts +5 -0
- package/dist/react/index.d.ts.map +1 -0
- package/dist/react.d.ts +2 -0
- package/dist/react.d.ts.map +1 -0
- package/dist/react.js +98 -0
- package/dist/vue/Avatar.d.ts +58 -0
- package/dist/vue/Avatar.d.ts.map +1 -0
- package/dist/vue/AvatarGrid.d.ts +46 -0
- package/dist/vue/AvatarGrid.d.ts.map +1 -0
- package/dist/vue/index.d.ts +5 -0
- package/dist/vue/index.d.ts.map +1 -0
- package/dist/vue.d.ts +2 -0
- package/dist/vue.d.ts.map +1 -0
- package/dist/vue.js +116 -0
- package/package.json +88 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 OpenAvatar contributors
|
|
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,199 @@
|
|
|
1
|
+
# OpenAvatar
|
|
2
|
+
|
|
3
|
+
OpenAvatar is a TypeScript SVG avatar generator with deterministic hashes, a demo page, and framework wrappers for React and Vue.
|
|
4
|
+
|
|
5
|
+
It generates head-focused SVG avatars from selectable parts, including background, hair, skin, expression, beard, and eyewear. The returned hash records the exact selected combination, so a saved avatar can be reproduced even if more options are added later.
|
|
6
|
+
|
|
7
|
+
## Features
|
|
8
|
+
|
|
9
|
+
- Deterministic SVG avatar generation from any string or saved OpenAvatar hash.
|
|
10
|
+
- Stable snapshot hashes in the `op-xxx-xxx:xxxx~category:value` format.
|
|
11
|
+
- Transparent, solid color, and patterned backgrounds.
|
|
12
|
+
- `circle`, `rounded-square`, and `square` output shapes.
|
|
13
|
+
- React and Vue component entry points.
|
|
14
|
+
- Bilingual demo UI with random batches, option filters, hash loading, and integration examples.
|
|
15
|
+
- MIT licensed.
|
|
16
|
+
|
|
17
|
+
## Install
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm install open-avatar
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
For local development in this repository:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npm install
|
|
27
|
+
npm run dev
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Core API
|
|
31
|
+
|
|
32
|
+
```ts
|
|
33
|
+
import {
|
|
34
|
+
generateAvatar,
|
|
35
|
+
generateAvatarSvg,
|
|
36
|
+
generateAvatarUrl,
|
|
37
|
+
generateRandomAvatar,
|
|
38
|
+
generateRandomAvatars,
|
|
39
|
+
getAvatarParts,
|
|
40
|
+
getTotalCombinations
|
|
41
|
+
} from "open-avatar";
|
|
42
|
+
|
|
43
|
+
const avatar = generateAvatar("user-42", {
|
|
44
|
+
shape: "rounded-square",
|
|
45
|
+
size: 160,
|
|
46
|
+
title: "User 42"
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
console.log(avatar.hash);
|
|
50
|
+
console.log(avatar.svg);
|
|
51
|
+
console.log(avatar.url);
|
|
52
|
+
console.log(avatar.parts);
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
`generateAvatar()` returns:
|
|
56
|
+
|
|
57
|
+
```ts
|
|
58
|
+
type AvatarResult = {
|
|
59
|
+
hash: string;
|
|
60
|
+
svg: string;
|
|
61
|
+
url: string;
|
|
62
|
+
shape: "rounded-square" | "circle" | "square";
|
|
63
|
+
parts: AvatarParts;
|
|
64
|
+
};
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Hashes
|
|
68
|
+
|
|
69
|
+
OpenAvatar accepts any string as input. User-provided values are normalized into a short root hash, then the generated avatar returns a snapshot hash that stores the selected parts:
|
|
70
|
+
|
|
71
|
+
```ts
|
|
72
|
+
const draft = generateAvatar("customer:10086");
|
|
73
|
+
|
|
74
|
+
// Save this value after the user is satisfied.
|
|
75
|
+
const savedHash = draft.hash;
|
|
76
|
+
|
|
77
|
+
// Later, the same hash reproduces the same avatar.
|
|
78
|
+
const fixed = generateAvatar(savedHash);
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Snapshot hashes are intentionally longer than a simple seed. They preserve the exact generated combination, so future option additions do not change existing saved avatars.
|
|
82
|
+
|
|
83
|
+
## React
|
|
84
|
+
|
|
85
|
+
```tsx
|
|
86
|
+
import { Avatar } from "open-avatar/react";
|
|
87
|
+
|
|
88
|
+
export function UserAvatar() {
|
|
89
|
+
return (
|
|
90
|
+
<Avatar
|
|
91
|
+
hash="op-user-42:1yf1e7~background:trianglify-blue~hair:bob-black~skin:peach~expression:happy-raisedExcited-smile~beard:none~clothing:shirtCrewNeck~eyewear:none"
|
|
92
|
+
shape="circle"
|
|
93
|
+
size={96}
|
|
94
|
+
title="User avatar"
|
|
95
|
+
/>
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## Vue
|
|
101
|
+
|
|
102
|
+
```vue
|
|
103
|
+
<script setup lang="ts">
|
|
104
|
+
import { Avatar } from "open-avatar/vue";
|
|
105
|
+
</script>
|
|
106
|
+
|
|
107
|
+
<template>
|
|
108
|
+
<Avatar
|
|
109
|
+
hash="op-user-42:1yf1e7~background:trianglify-blue~hair:bob-black~skin:peach~expression:happy-raisedExcited-smile~beard:none~clothing:shirtCrewNeck~eyewear:none"
|
|
110
|
+
shape="rounded-square"
|
|
111
|
+
:size="96"
|
|
112
|
+
title="User avatar"
|
|
113
|
+
/>
|
|
114
|
+
</template>
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Demo
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
npm run dev
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
The demo includes:
|
|
124
|
+
|
|
125
|
+
- 9-avatar random preview grid.
|
|
126
|
+
- Hash loading and fixed avatar preview.
|
|
127
|
+
- Random-by-string workflow for choosing and saving a final hash.
|
|
128
|
+
- Option filters with localized display names.
|
|
129
|
+
- Light, dark, circular, rounded, square, navigation, menu, and dense stacked examples.
|
|
130
|
+
- Collapsible React/Vue integration notes.
|
|
131
|
+
|
|
132
|
+
## Examples
|
|
133
|
+
|
|
134
|
+
Runnable examples live in `examples/`.
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
cd examples/react
|
|
138
|
+
npm install
|
|
139
|
+
npm run dev
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
cd examples/vue
|
|
144
|
+
npm install
|
|
145
|
+
npm run dev
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
The examples use Vite aliases to import this repository during local development. In an external project, install `open-avatar` and remove the local aliases.
|
|
149
|
+
|
|
150
|
+
## Development
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
npm test
|
|
154
|
+
npm run build
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Example builds:
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
cd examples/react
|
|
161
|
+
npm run build
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
cd examples/vue
|
|
166
|
+
npm run build
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
## Publishing
|
|
170
|
+
|
|
171
|
+
Before publishing, verify the package contents:
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
npm test
|
|
175
|
+
npm run build
|
|
176
|
+
npm pack --dry-run
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Publish the current version:
|
|
180
|
+
|
|
181
|
+
```bash
|
|
182
|
+
npm login
|
|
183
|
+
npm publish
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
For future releases, update the version first:
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
npm version patch
|
|
190
|
+
npm publish
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
Use `npm version minor` for compatible feature releases and `npm version major` for breaking changes.
|
|
194
|
+
|
|
195
|
+
## License
|
|
196
|
+
|
|
197
|
+
OpenAvatar is released under the MIT License. See `LICENSE`.
|
|
198
|
+
|
|
199
|
+
This project uses DiceBear Avataaars assets and APIs. See `THIRD_PARTY_NOTICES.md` for attribution details.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Third Party Notices
|
|
2
|
+
|
|
3
|
+
OpenAvatar includes hair SVG path designs adapted from Avataaars by Pablo Stanley through
|
|
4
|
+
DiceBear's `@dicebear/avataaars` package.
|
|
5
|
+
|
|
6
|
+
- Avataaars: https://avataaars.com/
|
|
7
|
+
- DiceBear Avataaars package: https://www.dicebear.com/styles/avataaars/
|
|
8
|
+
- Source package: https://unpkg.com/@dicebear/avataaars@9.2.2/
|
|
9
|
+
|
|
10
|
+
DiceBear code is distributed under the MIT License. Avataaars assets are published for
|
|
11
|
+
personal and commercial use by Pablo Stanley.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AvatarOptions, AvatarParts, AvatarResult } from './types';
|
|
2
|
+
|
|
3
|
+
export declare const MAX_RANDOM_AVATAR_BATCH = 1000;
|
|
4
|
+
export declare function getAvatarParts(hash: string): AvatarParts;
|
|
5
|
+
export declare function generateAvatarSvg(hash: string, options?: AvatarOptions): string;
|
|
6
|
+
export declare function generateAvatarUrl(hash: string, options?: AvatarOptions): string;
|
|
7
|
+
export declare function generateAvatar(hash: string, options?: AvatarOptions): AvatarResult;
|
|
8
|
+
export declare function generateRandomAvatar(options?: AvatarOptions): AvatarResult;
|
|
9
|
+
export declare function generateRandomAvatars(count: number, options?: AvatarOptions): ReadonlyArray<AvatarResult>;
|
|
10
|
+
export declare function getTotalCombinations(): number;
|
|
11
|
+
//# sourceMappingURL=generator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../src/core/generator.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACV,aAAa,EAGb,WAAW,EACX,YAAY,EAEb,MAAM,SAAS,CAAC;AAGjB,eAAO,MAAM,uBAAuB,OAAO,CAAC;AAkI5C,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAExD;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,aAAkB,GAAG,MAAM,CAUnF;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,aAAkB,GAAG,MAAM,CAEnF;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,aAAkB,GAAG,YAAY,CActF;AAED,wBAAgB,oBAAoB,CAAC,OAAO,GAAE,aAAkB,GAAG,YAAY,CAE9E;AAED,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,MAAM,EACb,OAAO,GAAE,aAAkB,GAC1B,aAAa,CAAC,YAAY,CAAC,CA+B7B;AAED,wBAAgB,oBAAoB,IAAI,MAAM,CAE7C"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare function normalizeHash(hash: string): string;
|
|
2
|
+
export declare function hashToSeed(hash: string): number;
|
|
3
|
+
export declare function indexFromSeed(seed: number, length: number, salt: number): number;
|
|
4
|
+
export declare function createRandomHash(): string;
|
|
5
|
+
//# sourceMappingURL=hash.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hash.d.ts","sourceRoot":"","sources":["../../src/core/hash.ts"],"names":[],"mappings":"AAEA,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAQlD;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAS/C;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAahF;AAYD,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AvatarPart, AvatarPartCatalog, AvatarParts } from './types';
|
|
2
|
+
|
|
3
|
+
export declare const avatarParts: AvatarPartCatalog;
|
|
4
|
+
export declare function cloneAvatarPart(part: Readonly<AvatarPart>): AvatarPart;
|
|
5
|
+
export declare function freezeAvatarParts(parts: AvatarParts): AvatarParts;
|
|
6
|
+
export declare function getAvatarPartCatalog(): AvatarPartCatalog;
|
|
7
|
+
export declare function getPartCombinationCount(): number;
|
|
8
|
+
//# sourceMappingURL=parts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parts.d.ts","sourceRoot":"","sources":["../../src/core/parts.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAiB,WAAW,EAAE,MAAM,SAAS,CAAC;AAmWzF,eAAO,MAAM,WAAW,EAAE,iBAQxB,CAAC;AAEH,wBAAgB,eAAe,CAAC,IAAI,EAAE,QAAQ,CAAC,UAAU,CAAC,GAAG,UAAU,CAEtE;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,WAAW,GAAG,WAAW,CAEjE;AAED,wBAAgB,oBAAoB,IAAI,iBAAiB,CAUxD;AAED,wBAAgB,uBAAuB,IAAI,MAAM,CAUhD"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { AvatarParts, AvatarShape } from './types';
|
|
2
|
+
|
|
3
|
+
export declare function renderAvatarSvg(parts: AvatarParts, shape: AvatarShape, hash: string, title?: string, size?: number): string;
|
|
4
|
+
export declare function svgToDataUrl(svg: string): string;
|
|
5
|
+
//# sourceMappingURL=svg.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"svg.d.ts","sourceRoot":"","sources":["../../src/core/svg.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAqOxD,wBAAgB,eAAe,CAC7B,KAAK,EAAE,WAAW,EAClB,KAAK,EAAE,WAAW,EAClB,IAAI,EAAE,MAAM,EACZ,KAAK,CAAC,EAAE,MAAM,EACd,IAAI,GAAE,MAAqB,GAC1B,MAAM,CAQR;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEhD"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export type AvatarShape = "rounded-square" | "circle" | "square";
|
|
2
|
+
export type AvatarPartCategory = "background" | "hair" | "skin" | "expression" | "beard" | "clothing" | "eyewear";
|
|
3
|
+
export interface AvatarPart {
|
|
4
|
+
readonly id: string;
|
|
5
|
+
readonly label: string;
|
|
6
|
+
readonly labels?: Readonly<Record<"en" | "zh", string>>;
|
|
7
|
+
readonly svg: string;
|
|
8
|
+
}
|
|
9
|
+
export type AvatarPartMap = Readonly<Record<AvatarPartCategory, ReadonlyArray<AvatarPart>>>;
|
|
10
|
+
export type AvatarParts = Readonly<Record<AvatarPartCategory, AvatarPart>>;
|
|
11
|
+
export type ReadonlyAvatarPart = Readonly<AvatarPart>;
|
|
12
|
+
export type AvatarPartCatalog = Readonly<Record<AvatarPartCategory, ReadonlyArray<ReadonlyAvatarPart>>>;
|
|
13
|
+
export interface AvatarOptions {
|
|
14
|
+
shape?: AvatarShape;
|
|
15
|
+
size?: number;
|
|
16
|
+
title?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface AvatarResult {
|
|
19
|
+
readonly hash: string;
|
|
20
|
+
readonly svg: string;
|
|
21
|
+
readonly url: string;
|
|
22
|
+
readonly shape: AvatarShape;
|
|
23
|
+
readonly parts: AvatarParts;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/core/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG,gBAAgB,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEjE,MAAM,MAAM,kBAAkB,GAC1B,YAAY,GACZ,MAAM,GACN,MAAM,GACN,YAAY,GACZ,OAAO,GACP,UAAU,GACV,SAAS,CAAC;AAEd,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,IAAI,GAAG,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;IACxD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,MAAM,aAAa,GAAG,QAAQ,CAAC,MAAM,CAAC,kBAAkB,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AAC5F,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC,MAAM,CAAC,kBAAkB,EAAE,UAAU,CAAC,CAAC,CAAC;AAC3E,MAAM,MAAM,kBAAkB,GAAG,QAAQ,CAAC,UAAU,CAAC,CAAC;AACtD,MAAM,MAAM,iBAAiB,GAAG,QAAQ,CAAC,MAAM,CAAC,kBAAkB,EAAE,aAAa,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC;AAExG,MAAM,WAAW,aAAa;IAC5B,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;CAC7B"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type { AvatarOptions, AvatarPartCatalog, AvatarPart, AvatarPartCategory, AvatarPartMap, AvatarParts, ReadonlyAvatarPart, AvatarResult, AvatarShape } from './core/types';
|
|
2
|
+
export { MAX_RANDOM_AVATAR_BATCH, generateAvatar, generateAvatarSvg, generateAvatarUrl, generateRandomAvatar, generateRandomAvatars, getAvatarParts, getTotalCombinations } from './core/generator';
|
|
3
|
+
export { getAvatarPartCatalog } from './core/parts';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,aAAa,EACb,iBAAiB,EACjB,UAAU,EACV,kBAAkB,EAClB,aAAa,EACb,WAAW,EACX,kBAAkB,EAClB,YAAY,EACZ,WAAW,EACZ,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,uBAAuB,EACvB,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,qBAAqB,EACrB,cAAc,EACd,oBAAoB,EACrB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC"}
|