@avyn/initials-avatar 1.0.0 → 1.0.1

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/README.md ADDED
@@ -0,0 +1,41 @@
1
+ # @avyn/initials-avatar
2
+
3
+ Framework-agnostic SVG initials avatar generator. No dependencies, ships ESM + CJS + types, works in Node, browsers, and SSR.
4
+
5
+ ## Install
6
+ ```bash
7
+ npm install @avyn/initials-avatar
8
+ ```
9
+
10
+ ## Quick start
11
+ ```ts
12
+ import { createAvatarSvg, createAvatarDataUri, createAvatar } from '@avyn/initials-avatar';
13
+
14
+ const svg = createAvatarSvg('Ada Lovelace', { backgroundColor: '#111827', fontColor: '#f8fafc' });
15
+ const dataUri = createAvatarDataUri('Grace Hopper', { bold: true });
16
+ const { svg: svgString, dataUri } = createAvatar('Alan Turing');
17
+ ```
18
+
19
+ ## Options
20
+ - size (px, default 96)
21
+ - backgroundColor (default deterministic from name)
22
+ - fontColor (default white)
23
+ - fontSize (default 42% of size)
24
+ - fontFamily (default Segoe UI/Arial)
25
+ - borderWidth, borderColor, borderRadius
26
+ - bold (font weight)
27
+ - initialsOverride
28
+
29
+ ## HTTP helpers
30
+ ```ts
31
+ import { createExpressHandler, createFastifyHandler, createNestHandler } from '@avyn/initials-avatar';
32
+
33
+ app.get('/avatar', createExpressHandler({ nameKey: 'name', cacheControl: 'public, max-age=86400' }));
34
+ ```
35
+
36
+ ## React/Vue wrappers
37
+ - React: `@avyn/initials-avatar-react`
38
+ - Vue 3: `@avyn/initials-avatar-vue`
39
+
40
+ ## License
41
+ MIT
package/dist/vue.d.cts CHANGED
@@ -126,8 +126,8 @@ declare const InitialsAvatar: vue.DefineComponent<vue.ExtractPropTypes<{
126
126
  };
127
127
  }>> & Readonly<{}>, {
128
128
  alt: string;
129
- as: "img" | "svg";
130
129
  title: string;
130
+ as: "img" | "svg";
131
131
  size: number;
132
132
  backgroundColor: string;
133
133
  fontColor: string;
package/dist/vue.d.ts CHANGED
@@ -126,8 +126,8 @@ declare const InitialsAvatar: vue.DefineComponent<vue.ExtractPropTypes<{
126
126
  };
127
127
  }>> & Readonly<{}>, {
128
128
  alt: string;
129
- as: "img" | "svg";
130
129
  title: string;
130
+ as: "img" | "svg";
131
131
  size: number;
132
132
  backgroundColor: string;
133
133
  fontColor: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@avyn/initials-avatar",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Framework-agnostic SVG initials avatar generator",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",