solfaces 1.0.2 → 2.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.
Files changed (85) hide show
  1. package/README.md +489 -97
  2. package/SKILL.md +171 -0
  3. package/dist/agent/index.cjs +15 -14
  4. package/dist/agent/index.js +5 -4
  5. package/dist/agent/mcp-server.cjs +2956 -287
  6. package/dist/chunk-6QRDULAO.cjs +191 -0
  7. package/dist/chunk-6QRDULAO.cjs.map +1 -0
  8. package/dist/{chunk-RX6D5FGH.js → chunk-77SPWQU5.js} +69 -28
  9. package/dist/chunk-77SPWQU5.js.map +1 -0
  10. package/dist/chunk-CQWXUU7P.js +239 -0
  11. package/dist/chunk-CQWXUU7P.js.map +1 -0
  12. package/dist/chunk-CXRVPOTI.cjs +244 -0
  13. package/dist/chunk-CXRVPOTI.cjs.map +1 -0
  14. package/dist/chunk-DRUSCLEF.js +177 -0
  15. package/dist/chunk-DRUSCLEF.js.map +1 -0
  16. package/dist/{chunk-VMNATBH3.cjs → chunk-F244Q4KC.cjs} +74 -33
  17. package/dist/chunk-F244Q4KC.cjs.map +1 -0
  18. package/dist/chunk-HVPGR6G5.cjs +647 -0
  19. package/dist/chunk-HVPGR6G5.cjs.map +1 -0
  20. package/dist/{chunk-SNJABBAT.js → chunk-MGP7F65H.js} +3 -3
  21. package/dist/{chunk-SNJABBAT.js.map → chunk-MGP7F65H.js.map} +1 -1
  22. package/dist/chunk-R3MC2AJZ.cjs +2247 -0
  23. package/dist/chunk-R3MC2AJZ.cjs.map +1 -0
  24. package/dist/chunk-SWML743U.js +625 -0
  25. package/dist/chunk-SWML743U.js.map +1 -0
  26. package/dist/chunk-SX3FQDKM.js +2238 -0
  27. package/dist/chunk-SX3FQDKM.js.map +1 -0
  28. package/dist/{chunk-A6N3RPEA.cjs → chunk-WTCXTXTV.cjs} +6 -6
  29. package/dist/{chunk-A6N3RPEA.cjs.map → chunk-WTCXTXTV.cjs.map} +1 -1
  30. package/dist/constants-Bi5uTRp5.d.cts +17 -0
  31. package/dist/constants-Bi5uTRp5.d.ts +17 -0
  32. package/dist/core/index.cjs +69 -29
  33. package/dist/core/index.d.cts +29 -47
  34. package/dist/core/index.d.ts +29 -47
  35. package/dist/core/index.js +3 -3
  36. package/dist/index.cjs +104 -35
  37. package/dist/index.d.cts +4 -2
  38. package/dist/index.d.ts +4 -2
  39. package/dist/index.js +6 -5
  40. package/dist/names/index.cjs +40 -0
  41. package/dist/names/index.cjs.map +1 -0
  42. package/dist/names/index.d.cts +36 -0
  43. package/dist/names/index.d.ts +36 -0
  44. package/dist/names/index.js +3 -0
  45. package/dist/names/index.js.map +1 -0
  46. package/dist/react/index.cjs +454 -397
  47. package/dist/react/index.cjs.map +1 -1
  48. package/dist/react/index.d.cts +17 -3
  49. package/dist/react/index.d.ts +17 -3
  50. package/dist/react/index.js +450 -394
  51. package/dist/react/index.js.map +1 -1
  52. package/dist/solfaces.cdn.global.js +2 -2
  53. package/dist/solfaces.cdn.global.js.map +1 -1
  54. package/dist/themes/index.cjs +29 -17
  55. package/dist/themes/index.d.cts +10 -7
  56. package/dist/themes/index.d.ts +10 -7
  57. package/dist/themes/index.js +1 -1
  58. package/dist/{traits-DAFZnXeS.d.cts → traits-QlWuxZDD.d.cts} +45 -1
  59. package/dist/{traits-DAFZnXeS.d.ts → traits-QlWuxZDD.d.ts} +45 -1
  60. package/dist/vanilla/index.cjs +20 -8
  61. package/dist/vanilla/index.cjs.map +1 -1
  62. package/dist/vanilla/index.d.cts +1 -1
  63. package/dist/vanilla/index.d.ts +1 -1
  64. package/dist/vanilla/index.js +17 -5
  65. package/dist/vanilla/index.js.map +1 -1
  66. package/package.json +22 -5
  67. package/python/solfaces.py +830 -237
  68. package/reference/integrations.md +166 -0
  69. package/reference/react.md +108 -0
  70. package/reference/themes.md +124 -0
  71. package/dist/chunk-2DIKGLXZ.cjs +0 -126
  72. package/dist/chunk-2DIKGLXZ.cjs.map +0 -1
  73. package/dist/chunk-CVFO7YHY.cjs +0 -97
  74. package/dist/chunk-CVFO7YHY.cjs.map +0 -1
  75. package/dist/chunk-H3SK3MNX.cjs +0 -409
  76. package/dist/chunk-H3SK3MNX.cjs.map +0 -1
  77. package/dist/chunk-KSGFMW33.js +0 -401
  78. package/dist/chunk-KSGFMW33.js.map +0 -1
  79. package/dist/chunk-LQWJRHGC.js +0 -86
  80. package/dist/chunk-LQWJRHGC.js.map +0 -1
  81. package/dist/chunk-RX6D5FGH.js.map +0 -1
  82. package/dist/chunk-VMNATBH3.cjs.map +0 -1
  83. package/dist/chunk-WURY4QGH.js +0 -117
  84. package/dist/chunk-WURY4QGH.js.map +0 -1
  85. package/skill.md +0 -463
@@ -1,48 +1,60 @@
1
1
  'use strict';
2
2
 
3
- var chunkCVFO7YHY_cjs = require('../chunk-CVFO7YHY.cjs');
3
+ var chunk6QRDULAO_cjs = require('../chunk-6QRDULAO.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "PRESET_THEMES", {
8
8
  enumerable: true,
9
- get: function () { return chunkCVFO7YHY_cjs.PRESET_THEMES; }
9
+ get: function () { return chunk6QRDULAO_cjs.PRESET_THEMES; }
10
10
  });
11
- Object.defineProperty(exports, "circleTheme", {
11
+ Object.defineProperty(exports, "darkTheme", {
12
12
  enumerable: true,
13
- get: function () { return chunkCVFO7YHY_cjs.circleTheme; }
13
+ get: function () { return chunk6QRDULAO_cjs.darkTheme; }
14
14
  });
15
- Object.defineProperty(exports, "darkTheme", {
15
+ Object.defineProperty(exports, "defaultTheme", {
16
+ enumerable: true,
17
+ get: function () { return chunk6QRDULAO_cjs.defaultTheme; }
18
+ });
19
+ Object.defineProperty(exports, "flatTheme", {
16
20
  enumerable: true,
17
- get: function () { return chunkCVFO7YHY_cjs.darkTheme; }
21
+ get: function () { return chunk6QRDULAO_cjs.flatTheme; }
18
22
  });
19
23
  Object.defineProperty(exports, "getPresetTheme", {
20
24
  enumerable: true,
21
- get: function () { return chunkCVFO7YHY_cjs.getPresetTheme; }
25
+ get: function () { return chunk6QRDULAO_cjs.getPresetTheme; }
22
26
  });
23
- Object.defineProperty(exports, "jupiterTheme", {
27
+ Object.defineProperty(exports, "glassDarkTheme", {
24
28
  enumerable: true,
25
- get: function () { return chunkCVFO7YHY_cjs.jupiterTheme; }
29
+ get: function () { return chunk6QRDULAO_cjs.glassDarkTheme; }
30
+ });
31
+ Object.defineProperty(exports, "glassTheme", {
32
+ enumerable: true,
33
+ get: function () { return chunk6QRDULAO_cjs.glassTheme; }
26
34
  });
27
35
  Object.defineProperty(exports, "lightTheme", {
28
36
  enumerable: true,
29
- get: function () { return chunkCVFO7YHY_cjs.lightTheme; }
37
+ get: function () { return chunk6QRDULAO_cjs.lightTheme; }
30
38
  });
31
39
  Object.defineProperty(exports, "monoTheme", {
32
40
  enumerable: true,
33
- get: function () { return chunkCVFO7YHY_cjs.monoTheme; }
41
+ get: function () { return chunk6QRDULAO_cjs.monoTheme; }
42
+ });
43
+ Object.defineProperty(exports, "pixelCleanTheme", {
44
+ enumerable: true,
45
+ get: function () { return chunk6QRDULAO_cjs.pixelCleanTheme; }
34
46
  });
35
- Object.defineProperty(exports, "neonTheme", {
47
+ Object.defineProperty(exports, "pixelRetroTheme", {
36
48
  enumerable: true,
37
- get: function () { return chunkCVFO7YHY_cjs.neonTheme; }
49
+ get: function () { return chunk6QRDULAO_cjs.pixelRetroTheme; }
38
50
  });
39
- Object.defineProperty(exports, "phantomTheme", {
51
+ Object.defineProperty(exports, "pixelTheme", {
40
52
  enumerable: true,
41
- get: function () { return chunkCVFO7YHY_cjs.phantomTheme; }
53
+ get: function () { return chunk6QRDULAO_cjs.pixelTheme; }
42
54
  });
43
- Object.defineProperty(exports, "solanaTheme", {
55
+ Object.defineProperty(exports, "transparentTheme", {
44
56
  enumerable: true,
45
- get: function () { return chunkCVFO7YHY_cjs.solanaTheme; }
57
+ get: function () { return chunk6QRDULAO_cjs.transparentTheme; }
46
58
  });
47
59
  //# sourceMappingURL=index.cjs.map
48
60
  //# sourceMappingURL=index.cjs.map
@@ -1,14 +1,17 @@
1
- import { a as SolFaceTheme } from '../traits-DAFZnXeS.cjs';
1
+ import { a as SolFaceTheme } from '../traits-QlWuxZDD.cjs';
2
2
 
3
- declare const solanaTheme: SolFaceTheme;
3
+ declare const defaultTheme: SolFaceTheme;
4
4
  declare const darkTheme: SolFaceTheme;
5
5
  declare const lightTheme: SolFaceTheme;
6
6
  declare const monoTheme: SolFaceTheme;
7
- declare const neonTheme: SolFaceTheme;
8
- declare const jupiterTheme: SolFaceTheme;
9
- declare const phantomTheme: SolFaceTheme;
10
- declare const circleTheme: SolFaceTheme;
7
+ declare const flatTheme: SolFaceTheme;
8
+ declare const transparentTheme: SolFaceTheme;
9
+ declare const glassTheme: SolFaceTheme;
10
+ declare const glassDarkTheme: SolFaceTheme;
11
+ declare const pixelTheme: SolFaceTheme;
12
+ declare const pixelRetroTheme: SolFaceTheme;
13
+ declare const pixelCleanTheme: SolFaceTheme;
11
14
  declare const PRESET_THEMES: Record<string, SolFaceTheme>;
12
15
  declare function getPresetTheme(name: string, overrides?: Partial<SolFaceTheme>): SolFaceTheme;
13
16
 
14
- export { PRESET_THEMES, circleTheme, darkTheme, getPresetTheme, jupiterTheme, lightTheme, monoTheme, neonTheme, phantomTheme, solanaTheme };
17
+ export { PRESET_THEMES, darkTheme, defaultTheme, flatTheme, getPresetTheme, glassDarkTheme, glassTheme, lightTheme, monoTheme, pixelCleanTheme, pixelRetroTheme, pixelTheme, transparentTheme };
@@ -1,14 +1,17 @@
1
- import { a as SolFaceTheme } from '../traits-DAFZnXeS.js';
1
+ import { a as SolFaceTheme } from '../traits-QlWuxZDD.js';
2
2
 
3
- declare const solanaTheme: SolFaceTheme;
3
+ declare const defaultTheme: SolFaceTheme;
4
4
  declare const darkTheme: SolFaceTheme;
5
5
  declare const lightTheme: SolFaceTheme;
6
6
  declare const monoTheme: SolFaceTheme;
7
- declare const neonTheme: SolFaceTheme;
8
- declare const jupiterTheme: SolFaceTheme;
9
- declare const phantomTheme: SolFaceTheme;
10
- declare const circleTheme: SolFaceTheme;
7
+ declare const flatTheme: SolFaceTheme;
8
+ declare const transparentTheme: SolFaceTheme;
9
+ declare const glassTheme: SolFaceTheme;
10
+ declare const glassDarkTheme: SolFaceTheme;
11
+ declare const pixelTheme: SolFaceTheme;
12
+ declare const pixelRetroTheme: SolFaceTheme;
13
+ declare const pixelCleanTheme: SolFaceTheme;
11
14
  declare const PRESET_THEMES: Record<string, SolFaceTheme>;
12
15
  declare function getPresetTheme(name: string, overrides?: Partial<SolFaceTheme>): SolFaceTheme;
13
16
 
14
- export { PRESET_THEMES, circleTheme, darkTheme, getPresetTheme, jupiterTheme, lightTheme, monoTheme, neonTheme, phantomTheme, solanaTheme };
17
+ export { PRESET_THEMES, darkTheme, defaultTheme, flatTheme, getPresetTheme, glassDarkTheme, glassTheme, lightTheme, monoTheme, pixelCleanTheme, pixelRetroTheme, pixelTheme, transparentTheme };
@@ -1,3 +1,3 @@
1
- export { PRESET_THEMES, circleTheme, darkTheme, getPresetTheme, jupiterTheme, lightTheme, monoTheme, neonTheme, phantomTheme, solanaTheme } from '../chunk-LQWJRHGC.js';
1
+ export { PRESET_THEMES, darkTheme, defaultTheme, flatTheme, getPresetTheme, glassDarkTheme, glassTheme, lightTheme, monoTheme, pixelCleanTheme, pixelRetroTheme, pixelTheme, transparentTheme } from '../chunk-DRUSCLEF.js';
2
2
  //# sourceMappingURL=index.js.map
3
3
  //# sourceMappingURL=index.js.map
@@ -21,12 +21,53 @@ interface SolFaceTheme {
21
21
  accessoryColor?: string;
22
22
  eyeWhiteColor?: string;
23
23
  noseColor?: string;
24
+ glassesColor?: string;
25
+ earringColor?: string;
26
+ headbandColor?: string;
24
27
  bgOpacity?: number;
25
28
  bgRadius?: number;
26
29
  border?: {
27
30
  color: string;
28
31
  width: number;
29
32
  };
33
+ flat?: boolean;
34
+ cheekEnabled?: boolean;
35
+ cheekColor?: string;
36
+ cheekOpacity?: number;
37
+ skinOpacity?: number;
38
+ shadowEnabled?: boolean;
39
+ _pixel?: boolean;
40
+ _pixelDensity?: number;
41
+ _pixelRounded?: boolean;
42
+ _pixelOutline?: boolean;
43
+ _pixelOutlineColor?: string;
44
+ _pixelOutlineWidth?: number;
45
+ _pixelContrast?: number;
46
+ _pixelSaturation?: number;
47
+ _pixelBrightness?: number;
48
+ _pixelScanlines?: boolean;
49
+ _pixelScanlineOpacity?: number;
50
+ _pixelScanlineSpacing?: number;
51
+ _pixelGrid?: boolean;
52
+ _pixelGridOpacity?: number;
53
+ _pixelGridColor?: string;
54
+ _pixelShadow?: boolean;
55
+ _pixelShadowColor?: string;
56
+ _pixelShadowOffset?: number;
57
+ _glass?: boolean;
58
+ _blurRadius?: number;
59
+ _saturate?: number;
60
+ _tintOpacity?: number;
61
+ _tintColor?: string;
62
+ _borderOpacity?: number;
63
+ _borderWidth?: number;
64
+ _borderColor?: string;
65
+ _specularOpacity?: number;
66
+ _specularColor?: string;
67
+ _specularEnd?: number;
68
+ _lightAngle?: number;
69
+ _rimIntensity?: number;
70
+ _shadow?: string;
30
71
  }
31
72
  interface RenderOptions {
32
73
  size?: number;
@@ -37,6 +78,7 @@ interface RenderOptions {
37
78
  delay?: number;
38
79
  };
39
80
  className?: string;
81
+ detail?: "full" | "simplified" | "auto";
40
82
  colorOverrides?: {
41
83
  skin?: string;
42
84
  eyes?: string;
@@ -54,8 +96,10 @@ declare const EYE_COLORS: string[];
54
96
  declare const HAIR_COLORS: string[];
55
97
  declare const BG_COLORS: string[];
56
98
  declare function generateTraits(walletAddress: string, overrides?: Partial<SolFaceTraits>): SolFaceTraits;
99
+ declare function effectiveAccessory(traits: SolFaceTraits): number;
57
100
  declare function getTraitLabels(traits: SolFaceTraits): Record<string, string>;
58
101
  declare function traitHash(walletAddress: string): string;
59
102
  declare function resolveTheme(themeName?: string, themes?: Record<string, SolFaceTheme>): SolFaceTheme | undefined;
103
+ declare function mergeTheme(base: SolFaceTheme | null | undefined, overrides: SolFaceTheme | null | undefined): SolFaceTheme | null;
60
104
 
61
- export { BG_COLORS as B, EYE_COLORS as E, HAIR_COLORS as H, type RenderOptions as R, SKIN_COLORS as S, type SolFaceTheme as a, type SolFaceTraits as b, getTraitLabels as c, generateTraits as g, resolveTheme as r, traitHash as t };
105
+ export { BG_COLORS as B, EYE_COLORS as E, HAIR_COLORS as H, type RenderOptions as R, SKIN_COLORS as S, type SolFaceTheme as a, type SolFaceTraits as b, getTraitLabels as c, effectiveAccessory as e, generateTraits as g, mergeTheme as m, resolveTheme as r, traitHash as t };
@@ -21,12 +21,53 @@ interface SolFaceTheme {
21
21
  accessoryColor?: string;
22
22
  eyeWhiteColor?: string;
23
23
  noseColor?: string;
24
+ glassesColor?: string;
25
+ earringColor?: string;
26
+ headbandColor?: string;
24
27
  bgOpacity?: number;
25
28
  bgRadius?: number;
26
29
  border?: {
27
30
  color: string;
28
31
  width: number;
29
32
  };
33
+ flat?: boolean;
34
+ cheekEnabled?: boolean;
35
+ cheekColor?: string;
36
+ cheekOpacity?: number;
37
+ skinOpacity?: number;
38
+ shadowEnabled?: boolean;
39
+ _pixel?: boolean;
40
+ _pixelDensity?: number;
41
+ _pixelRounded?: boolean;
42
+ _pixelOutline?: boolean;
43
+ _pixelOutlineColor?: string;
44
+ _pixelOutlineWidth?: number;
45
+ _pixelContrast?: number;
46
+ _pixelSaturation?: number;
47
+ _pixelBrightness?: number;
48
+ _pixelScanlines?: boolean;
49
+ _pixelScanlineOpacity?: number;
50
+ _pixelScanlineSpacing?: number;
51
+ _pixelGrid?: boolean;
52
+ _pixelGridOpacity?: number;
53
+ _pixelGridColor?: string;
54
+ _pixelShadow?: boolean;
55
+ _pixelShadowColor?: string;
56
+ _pixelShadowOffset?: number;
57
+ _glass?: boolean;
58
+ _blurRadius?: number;
59
+ _saturate?: number;
60
+ _tintOpacity?: number;
61
+ _tintColor?: string;
62
+ _borderOpacity?: number;
63
+ _borderWidth?: number;
64
+ _borderColor?: string;
65
+ _specularOpacity?: number;
66
+ _specularColor?: string;
67
+ _specularEnd?: number;
68
+ _lightAngle?: number;
69
+ _rimIntensity?: number;
70
+ _shadow?: string;
30
71
  }
31
72
  interface RenderOptions {
32
73
  size?: number;
@@ -37,6 +78,7 @@ interface RenderOptions {
37
78
  delay?: number;
38
79
  };
39
80
  className?: string;
81
+ detail?: "full" | "simplified" | "auto";
40
82
  colorOverrides?: {
41
83
  skin?: string;
42
84
  eyes?: string;
@@ -54,8 +96,10 @@ declare const EYE_COLORS: string[];
54
96
  declare const HAIR_COLORS: string[];
55
97
  declare const BG_COLORS: string[];
56
98
  declare function generateTraits(walletAddress: string, overrides?: Partial<SolFaceTraits>): SolFaceTraits;
99
+ declare function effectiveAccessory(traits: SolFaceTraits): number;
57
100
  declare function getTraitLabels(traits: SolFaceTraits): Record<string, string>;
58
101
  declare function traitHash(walletAddress: string): string;
59
102
  declare function resolveTheme(themeName?: string, themes?: Record<string, SolFaceTheme>): SolFaceTheme | undefined;
103
+ declare function mergeTheme(base: SolFaceTheme | null | undefined, overrides: SolFaceTheme | null | undefined): SolFaceTheme | null;
60
104
 
61
- export { BG_COLORS as B, EYE_COLORS as E, HAIR_COLORS as H, type RenderOptions as R, SKIN_COLORS as S, type SolFaceTheme as a, type SolFaceTraits as b, getTraitLabels as c, generateTraits as g, resolveTheme as r, traitHash as t };
105
+ export { BG_COLORS as B, EYE_COLORS as E, HAIR_COLORS as H, type RenderOptions as R, SKIN_COLORS as S, type SolFaceTheme as a, type SolFaceTraits as b, getTraitLabels as c, effectiveAccessory as e, generateTraits as g, mergeTheme as m, resolveTheme as r, traitHash as t };
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunkH3SK3MNX_cjs = require('../chunk-H3SK3MNX.cjs');
4
- require('../chunk-2DIKGLXZ.cjs');
5
- var chunkCVFO7YHY_cjs = require('../chunk-CVFO7YHY.cjs');
3
+ var chunkCXRVPOTI_cjs = require('../chunk-CXRVPOTI.cjs');
4
+ var chunkHVPGR6G5_cjs = require('../chunk-HVPGR6G5.cjs');
5
+ var chunk6QRDULAO_cjs = require('../chunk-6QRDULAO.cjs');
6
6
 
7
7
  // src/vanilla/index.ts
8
8
  function mountSolFace(element, walletAddress, options) {
@@ -12,7 +12,7 @@ function mountSolFace(element, walletAddress, options) {
12
12
  return () => {
13
13
  };
14
14
  }
15
- el.innerHTML = chunkH3SK3MNX_cjs.renderSolFaceSVG(walletAddress, options);
15
+ el.innerHTML = chunkHVPGR6G5_cjs.renderSolFaceSVG(walletAddress, options);
16
16
  return () => {
17
17
  el.innerHTML = "";
18
18
  };
@@ -20,8 +20,8 @@ function mountSolFace(element, walletAddress, options) {
20
20
  function setSolFaceImg(img, walletAddress, options) {
21
21
  const el = typeof img === "string" ? document.querySelector(img) : img;
22
22
  if (!el) return;
23
- el.src = chunkH3SK3MNX_cjs.renderSolFaceDataURI(walletAddress, options);
24
- el.alt = chunkH3SK3MNX_cjs.solFaceAltText(walletAddress);
23
+ el.src = chunkHVPGR6G5_cjs.renderSolFaceDataURI(walletAddress, options);
24
+ el.alt = chunkCXRVPOTI_cjs.solFaceAltText(walletAddress);
25
25
  }
26
26
  function autoInit(root = document) {
27
27
  const elements = root.querySelectorAll("[data-solface]");
@@ -31,8 +31,20 @@ function autoInit(root = document) {
31
31
  const size = parseInt(el.getAttribute("data-solface-size") ?? "64", 10);
32
32
  const blink = el.getAttribute("data-solface-blink") === "true";
33
33
  const themeName = el.getAttribute("data-solface-theme");
34
- const theme = themeName && themeName in chunkCVFO7YHY_cjs.PRESET_THEMES ? chunkCVFO7YHY_cjs.PRESET_THEMES[themeName] : void 0;
35
- mountSolFace(el, wallet, { size, enableBlink: blink, theme });
34
+ const flat = el.getAttribute("data-solface-flat") === "true";
35
+ const detail = el.getAttribute("data-solface-detail");
36
+ let theme = themeName && themeName in chunk6QRDULAO_cjs.PRESET_THEMES ? chunk6QRDULAO_cjs.PRESET_THEMES[themeName] : void 0;
37
+ if (flat && theme) {
38
+ theme = { ...theme, flat: true };
39
+ } else if (flat) {
40
+ theme = { flat: true };
41
+ }
42
+ mountSolFace(el, wallet, {
43
+ size,
44
+ enableBlink: blink,
45
+ theme,
46
+ detail: detail ?? "auto"
47
+ });
36
48
  });
37
49
  }
38
50
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/vanilla/index.ts"],"names":["renderSolFaceSVG","renderSolFaceDataURI","solFaceAltText","PRESET_THEMES"],"mappings":";;;;;;;AAUO,SAAS,YAAA,CACd,OAAA,EACA,aAAA,EACA,OAAA,EACY;AACZ,EAAA,MAAM,KAAK,OAAO,OAAA,KAAY,WAC1B,QAAA,CAAS,aAAA,CAA2B,OAAO,CAAA,GAC3C,OAAA;AAEJ,EAAA,IAAI,CAAC,EAAA,EAAI;AACP,IAAA,OAAA,CAAQ,IAAA,CAAK,CAAA,8BAAA,EAAiC,OAAO,CAAA,CAAE,CAAA;AACvD,IAAA,OAAO,MAAM;AAAA,IAAC,CAAA;AAAA,EAChB;AAEA,EAAA,EAAA,CAAG,SAAA,GAAYA,kCAAA,CAAiB,aAAA,EAAe,OAAO,CAAA;AACtD,EAAA,OAAO,MAAM;AAAE,IAAA,EAAA,CAAG,SAAA,GAAY,EAAA;AAAA,EAAI,CAAA;AACpC;AAEO,SAAS,aAAA,CACd,GAAA,EACA,aAAA,EACA,OAAA,EACM;AACN,EAAA,MAAM,KAAK,OAAO,GAAA,KAAQ,WACtB,QAAA,CAAS,aAAA,CAAgC,GAAG,CAAA,GAC5C,GAAA;AAEJ,EAAA,IAAI,CAAC,EAAA,EAAI;AACT,EAAA,EAAA,CAAG,GAAA,GAAMC,sCAAA,CAAqB,aAAA,EAAe,OAAO,CAAA;AACpD,EAAA,EAAA,CAAG,GAAA,GAAMC,iCAAe,aAAa,CAAA;AACvC;AAEO,SAAS,QAAA,CAAS,OAA+B,QAAA,EAAgB;AACtE,EAAA,MAAM,QAAA,GAAW,IAAA,CAAK,gBAAA,CAA8B,gBAAgB,CAAA;AACpE,EAAA,QAAA,CAAS,OAAA,CAAQ,CAAC,EAAA,KAAO;AACvB,IAAA,MAAM,MAAA,GAAS,EAAA,CAAG,YAAA,CAAa,cAAc,CAAA;AAC7C,IAAA,IAAI,CAAC,MAAA,EAAQ;AAEb,IAAA,MAAM,OAAO,QAAA,CAAS,EAAA,CAAG,aAAa,mBAAmB,CAAA,IAAK,MAAM,EAAE,CAAA;AACtE,IAAA,MAAM,KAAA,GAAQ,EAAA,CAAG,YAAA,CAAa,oBAAoB,CAAA,KAAM,MAAA;AACxD,IAAA,MAAM,SAAA,GAAY,EAAA,CAAG,YAAA,CAAa,oBAAoB,CAAA;AAEtD,IAAA,MAAM,QAAQ,SAAA,IAAa,SAAA,IAAaC,+BAAA,GACpCA,+BAAA,CAAc,SAAuC,CAAA,GACrD,MAAA;AAEJ,IAAA,YAAA,CAAa,IAAI,MAAA,EAAQ,EAAE,MAAM,WAAA,EAAa,KAAA,EAAO,OAAO,CAAA;AAAA,EAC9D,CAAC,CAAA;AACH","file":"index.cjs","sourcesContent":["// ═══════════════════════════════════════════════════════════════\n// SOLFACES — Vanilla DOM Helpers\n// Mount avatars directly into DOM elements without React.\n// ═══════════════════════════════════════════════════════════════\n\nimport { renderSolFaceSVG, renderSolFaceDataURI } from \"../core/renderer\";\nimport { solFaceAltText } from \"../core/describe\";\nimport { PRESET_THEMES } from \"../themes/presets\";\nimport type { RenderOptions } from \"../core/traits\";\n\nexport function mountSolFace(\n element: HTMLElement | string,\n walletAddress: string,\n options?: RenderOptions\n): () => void {\n const el = typeof element === \"string\"\n ? document.querySelector<HTMLElement>(element)\n : element;\n\n if (!el) {\n console.warn(`[SolFaces] Element not found: ${element}`);\n return () => {};\n }\n\n el.innerHTML = renderSolFaceSVG(walletAddress, options);\n return () => { el.innerHTML = \"\"; };\n}\n\nexport function setSolFaceImg(\n img: HTMLImageElement | string,\n walletAddress: string,\n options?: RenderOptions\n): void {\n const el = typeof img === \"string\"\n ? document.querySelector<HTMLImageElement>(img)\n : img;\n\n if (!el) return;\n el.src = renderSolFaceDataURI(walletAddress, options);\n el.alt = solFaceAltText(walletAddress);\n}\n\nexport function autoInit(root: HTMLElement | Document = document): void {\n const elements = root.querySelectorAll<HTMLElement>(\"[data-solface]\");\n elements.forEach((el) => {\n const wallet = el.getAttribute(\"data-solface\");\n if (!wallet) return;\n\n const size = parseInt(el.getAttribute(\"data-solface-size\") ?? \"64\", 10);\n const blink = el.getAttribute(\"data-solface-blink\") === \"true\";\n const themeName = el.getAttribute(\"data-solface-theme\") as string | null;\n\n const theme = themeName && themeName in PRESET_THEMES\n ? PRESET_THEMES[themeName as keyof typeof PRESET_THEMES]\n : undefined;\n\n mountSolFace(el, wallet, { size, enableBlink: blink, theme });\n });\n}\n"]}
1
+ {"version":3,"sources":["../../src/vanilla/index.ts"],"names":["renderSolFaceSVG","renderSolFaceDataURI","solFaceAltText","PRESET_THEMES"],"mappings":";;;;;;;AAUO,SAAS,YAAA,CACd,OAAA,EACA,aAAA,EACA,OAAA,EACY;AACZ,EAAA,MAAM,KAAK,OAAO,OAAA,KAAY,WAC1B,QAAA,CAAS,aAAA,CAA2B,OAAO,CAAA,GAC3C,OAAA;AAEJ,EAAA,IAAI,CAAC,EAAA,EAAI;AACP,IAAA,OAAA,CAAQ,IAAA,CAAK,CAAA,8BAAA,EAAiC,OAAO,CAAA,CAAE,CAAA;AACvD,IAAA,OAAO,MAAM;AAAA,IAAC,CAAA;AAAA,EAChB;AAEA,EAAA,EAAA,CAAG,SAAA,GAAYA,kCAAA,CAAiB,aAAA,EAAe,OAAO,CAAA;AACtD,EAAA,OAAO,MAAM;AAAE,IAAA,EAAA,CAAG,SAAA,GAAY,EAAA;AAAA,EAAI,CAAA;AACpC;AAEO,SAAS,aAAA,CACd,GAAA,EACA,aAAA,EACA,OAAA,EACM;AACN,EAAA,MAAM,KAAK,OAAO,GAAA,KAAQ,WACtB,QAAA,CAAS,aAAA,CAAgC,GAAG,CAAA,GAC5C,GAAA;AAEJ,EAAA,IAAI,CAAC,EAAA,EAAI;AACT,EAAA,EAAA,CAAG,GAAA,GAAMC,sCAAA,CAAqB,aAAA,EAAe,OAAO,CAAA;AACpD,EAAA,EAAA,CAAG,GAAA,GAAMC,iCAAe,aAAa,CAAA;AACvC;AAEO,SAAS,QAAA,CAAS,OAA+B,QAAA,EAAgB;AACtE,EAAA,MAAM,QAAA,GAAW,IAAA,CAAK,gBAAA,CAA8B,gBAAgB,CAAA;AACpE,EAAA,QAAA,CAAS,OAAA,CAAQ,CAAC,EAAA,KAAO;AACvB,IAAA,MAAM,MAAA,GAAS,EAAA,CAAG,YAAA,CAAa,cAAc,CAAA;AAC7C,IAAA,IAAI,CAAC,MAAA,EAAQ;AAEb,IAAA,MAAM,OAAO,QAAA,CAAS,EAAA,CAAG,aAAa,mBAAmB,CAAA,IAAK,MAAM,EAAE,CAAA;AACtE,IAAA,MAAM,KAAA,GAAQ,EAAA,CAAG,YAAA,CAAa,oBAAoB,CAAA,KAAM,MAAA;AACxD,IAAA,MAAM,SAAA,GAAY,EAAA,CAAG,YAAA,CAAa,oBAAoB,CAAA;AACtD,IAAA,MAAM,IAAA,GAAO,EAAA,CAAG,YAAA,CAAa,mBAAmB,CAAA,KAAM,MAAA;AACtD,IAAA,MAAM,MAAA,GAAS,EAAA,CAAG,YAAA,CAAa,qBAAqB,CAAA;AAEpD,IAAA,IAAI,QAAQ,SAAA,IAAa,SAAA,IAAaC,+BAAA,GAClCA,+BAAA,CAAc,SAAuC,CAAA,GACrD,MAAA;AAGJ,IAAA,IAAI,QAAQ,KAAA,EAAO;AACjB,MAAA,KAAA,GAAQ,EAAE,GAAG,KAAA,EAAO,IAAA,EAAM,IAAA,EAAK;AAAA,IACjC,WAAW,IAAA,EAAM;AACf,MAAA,KAAA,GAAQ,EAAE,MAAM,IAAA,EAAK;AAAA,IACvB;AAEA,IAAA,YAAA,CAAa,IAAI,MAAA,EAAQ;AAAA,MACvB,IAAA;AAAA,MACA,WAAA,EAAa,KAAA;AAAA,MACb,KAAA;AAAA,MACA,QAAQ,MAAA,IAAU;AAAA,KACnB,CAAA;AAAA,EACH,CAAC,CAAA;AACH","file":"index.cjs","sourcesContent":["// ═══════════════════════════════════════════════════════════════\n// SOLFACES v2 — Vanilla DOM Helpers\n// Mount avatars directly into DOM elements without React.\n// ═══════════════════════════════════════════════════════════════\n\nimport { renderSolFaceSVG, renderSolFaceDataURI } from \"../core/renderer\";\nimport { solFaceAltText } from \"../core/describe\";\nimport { PRESET_THEMES } from \"../themes/presets\";\nimport type { RenderOptions } from \"../core/traits\";\n\nexport function mountSolFace(\n element: HTMLElement | string,\n walletAddress: string,\n options?: RenderOptions,\n): () => void {\n const el = typeof element === \"string\"\n ? document.querySelector<HTMLElement>(element)\n : element;\n\n if (!el) {\n console.warn(`[SolFaces] Element not found: ${element}`);\n return () => {};\n }\n\n el.innerHTML = renderSolFaceSVG(walletAddress, options);\n return () => { el.innerHTML = \"\"; };\n}\n\nexport function setSolFaceImg(\n img: HTMLImageElement | string,\n walletAddress: string,\n options?: RenderOptions,\n): void {\n const el = typeof img === \"string\"\n ? document.querySelector<HTMLImageElement>(img)\n : img;\n\n if (!el) return;\n el.src = renderSolFaceDataURI(walletAddress, options);\n el.alt = solFaceAltText(walletAddress);\n}\n\nexport function autoInit(root: HTMLElement | Document = document): void {\n const elements = root.querySelectorAll<HTMLElement>(\"[data-solface]\");\n elements.forEach((el) => {\n const wallet = el.getAttribute(\"data-solface\");\n if (!wallet) return;\n\n const size = parseInt(el.getAttribute(\"data-solface-size\") ?? \"64\", 10);\n const blink = el.getAttribute(\"data-solface-blink\") === \"true\";\n const themeName = el.getAttribute(\"data-solface-theme\") as string | null;\n const flat = el.getAttribute(\"data-solface-flat\") === \"true\";\n const detail = el.getAttribute(\"data-solface-detail\") as \"full\" | \"simplified\" | \"auto\" | null;\n\n let theme = themeName && themeName in PRESET_THEMES\n ? PRESET_THEMES[themeName as keyof typeof PRESET_THEMES]\n : undefined;\n\n // data-solface-flat overrides theme flat setting\n if (flat && theme) {\n theme = { ...theme, flat: true };\n } else if (flat) {\n theme = { flat: true };\n }\n\n mountSolFace(el, wallet, {\n size,\n enableBlink: blink,\n theme,\n detail: detail ?? \"auto\",\n });\n });\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { R as RenderOptions } from '../traits-DAFZnXeS.cjs';
1
+ import { R as RenderOptions } from '../traits-QlWuxZDD.cjs';
2
2
 
3
3
  declare function mountSolFace(element: HTMLElement | string, walletAddress: string, options?: RenderOptions): () => void;
4
4
  declare function setSolFaceImg(img: HTMLImageElement | string, walletAddress: string, options?: RenderOptions): void;
@@ -1,4 +1,4 @@
1
- import { R as RenderOptions } from '../traits-DAFZnXeS.js';
1
+ import { R as RenderOptions } from '../traits-QlWuxZDD.js';
2
2
 
3
3
  declare function mountSolFace(element: HTMLElement | string, walletAddress: string, options?: RenderOptions): () => void;
4
4
  declare function setSolFaceImg(img: HTMLImageElement | string, walletAddress: string, options?: RenderOptions): void;
@@ -1,6 +1,6 @@
1
- import { renderSolFaceSVG, renderSolFaceDataURI, solFaceAltText } from '../chunk-KSGFMW33.js';
2
- import '../chunk-WURY4QGH.js';
3
- import { PRESET_THEMES } from '../chunk-LQWJRHGC.js';
1
+ import { solFaceAltText } from '../chunk-CQWXUU7P.js';
2
+ import { renderSolFaceSVG, renderSolFaceDataURI } from '../chunk-SWML743U.js';
3
+ import { PRESET_THEMES } from '../chunk-DRUSCLEF.js';
4
4
 
5
5
  // src/vanilla/index.ts
6
6
  function mountSolFace(element, walletAddress, options) {
@@ -29,8 +29,20 @@ function autoInit(root = document) {
29
29
  const size = parseInt(el.getAttribute("data-solface-size") ?? "64", 10);
30
30
  const blink = el.getAttribute("data-solface-blink") === "true";
31
31
  const themeName = el.getAttribute("data-solface-theme");
32
- const theme = themeName && themeName in PRESET_THEMES ? PRESET_THEMES[themeName] : void 0;
33
- mountSolFace(el, wallet, { size, enableBlink: blink, theme });
32
+ const flat = el.getAttribute("data-solface-flat") === "true";
33
+ const detail = el.getAttribute("data-solface-detail");
34
+ let theme = themeName && themeName in PRESET_THEMES ? PRESET_THEMES[themeName] : void 0;
35
+ if (flat && theme) {
36
+ theme = { ...theme, flat: true };
37
+ } else if (flat) {
38
+ theme = { flat: true };
39
+ }
40
+ mountSolFace(el, wallet, {
41
+ size,
42
+ enableBlink: blink,
43
+ theme,
44
+ detail: detail ?? "auto"
45
+ });
34
46
  });
35
47
  }
36
48
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/vanilla/index.ts"],"names":[],"mappings":";;;;;AAUO,SAAS,YAAA,CACd,OAAA,EACA,aAAA,EACA,OAAA,EACY;AACZ,EAAA,MAAM,KAAK,OAAO,OAAA,KAAY,WAC1B,QAAA,CAAS,aAAA,CAA2B,OAAO,CAAA,GAC3C,OAAA;AAEJ,EAAA,IAAI,CAAC,EAAA,EAAI;AACP,IAAA,OAAA,CAAQ,IAAA,CAAK,CAAA,8BAAA,EAAiC,OAAO,CAAA,CAAE,CAAA;AACvD,IAAA,OAAO,MAAM;AAAA,IAAC,CAAA;AAAA,EAChB;AAEA,EAAA,EAAA,CAAG,SAAA,GAAY,gBAAA,CAAiB,aAAA,EAAe,OAAO,CAAA;AACtD,EAAA,OAAO,MAAM;AAAE,IAAA,EAAA,CAAG,SAAA,GAAY,EAAA;AAAA,EAAI,CAAA;AACpC;AAEO,SAAS,aAAA,CACd,GAAA,EACA,aAAA,EACA,OAAA,EACM;AACN,EAAA,MAAM,KAAK,OAAO,GAAA,KAAQ,WACtB,QAAA,CAAS,aAAA,CAAgC,GAAG,CAAA,GAC5C,GAAA;AAEJ,EAAA,IAAI,CAAC,EAAA,EAAI;AACT,EAAA,EAAA,CAAG,GAAA,GAAM,oBAAA,CAAqB,aAAA,EAAe,OAAO,CAAA;AACpD,EAAA,EAAA,CAAG,GAAA,GAAM,eAAe,aAAa,CAAA;AACvC;AAEO,SAAS,QAAA,CAAS,OAA+B,QAAA,EAAgB;AACtE,EAAA,MAAM,QAAA,GAAW,IAAA,CAAK,gBAAA,CAA8B,gBAAgB,CAAA;AACpE,EAAA,QAAA,CAAS,OAAA,CAAQ,CAAC,EAAA,KAAO;AACvB,IAAA,MAAM,MAAA,GAAS,EAAA,CAAG,YAAA,CAAa,cAAc,CAAA;AAC7C,IAAA,IAAI,CAAC,MAAA,EAAQ;AAEb,IAAA,MAAM,OAAO,QAAA,CAAS,EAAA,CAAG,aAAa,mBAAmB,CAAA,IAAK,MAAM,EAAE,CAAA;AACtE,IAAA,MAAM,KAAA,GAAQ,EAAA,CAAG,YAAA,CAAa,oBAAoB,CAAA,KAAM,MAAA;AACxD,IAAA,MAAM,SAAA,GAAY,EAAA,CAAG,YAAA,CAAa,oBAAoB,CAAA;AAEtD,IAAA,MAAM,QAAQ,SAAA,IAAa,SAAA,IAAa,aAAA,GACpC,aAAA,CAAc,SAAuC,CAAA,GACrD,MAAA;AAEJ,IAAA,YAAA,CAAa,IAAI,MAAA,EAAQ,EAAE,MAAM,WAAA,EAAa,KAAA,EAAO,OAAO,CAAA;AAAA,EAC9D,CAAC,CAAA;AACH","file":"index.js","sourcesContent":["// ═══════════════════════════════════════════════════════════════\n// SOLFACES — Vanilla DOM Helpers\n// Mount avatars directly into DOM elements without React.\n// ═══════════════════════════════════════════════════════════════\n\nimport { renderSolFaceSVG, renderSolFaceDataURI } from \"../core/renderer\";\nimport { solFaceAltText } from \"../core/describe\";\nimport { PRESET_THEMES } from \"../themes/presets\";\nimport type { RenderOptions } from \"../core/traits\";\n\nexport function mountSolFace(\n element: HTMLElement | string,\n walletAddress: string,\n options?: RenderOptions\n): () => void {\n const el = typeof element === \"string\"\n ? document.querySelector<HTMLElement>(element)\n : element;\n\n if (!el) {\n console.warn(`[SolFaces] Element not found: ${element}`);\n return () => {};\n }\n\n el.innerHTML = renderSolFaceSVG(walletAddress, options);\n return () => { el.innerHTML = \"\"; };\n}\n\nexport function setSolFaceImg(\n img: HTMLImageElement | string,\n walletAddress: string,\n options?: RenderOptions\n): void {\n const el = typeof img === \"string\"\n ? document.querySelector<HTMLImageElement>(img)\n : img;\n\n if (!el) return;\n el.src = renderSolFaceDataURI(walletAddress, options);\n el.alt = solFaceAltText(walletAddress);\n}\n\nexport function autoInit(root: HTMLElement | Document = document): void {\n const elements = root.querySelectorAll<HTMLElement>(\"[data-solface]\");\n elements.forEach((el) => {\n const wallet = el.getAttribute(\"data-solface\");\n if (!wallet) return;\n\n const size = parseInt(el.getAttribute(\"data-solface-size\") ?? \"64\", 10);\n const blink = el.getAttribute(\"data-solface-blink\") === \"true\";\n const themeName = el.getAttribute(\"data-solface-theme\") as string | null;\n\n const theme = themeName && themeName in PRESET_THEMES\n ? PRESET_THEMES[themeName as keyof typeof PRESET_THEMES]\n : undefined;\n\n mountSolFace(el, wallet, { size, enableBlink: blink, theme });\n });\n}\n"]}
1
+ {"version":3,"sources":["../../src/vanilla/index.ts"],"names":[],"mappings":";;;;;AAUO,SAAS,YAAA,CACd,OAAA,EACA,aAAA,EACA,OAAA,EACY;AACZ,EAAA,MAAM,KAAK,OAAO,OAAA,KAAY,WAC1B,QAAA,CAAS,aAAA,CAA2B,OAAO,CAAA,GAC3C,OAAA;AAEJ,EAAA,IAAI,CAAC,EAAA,EAAI;AACP,IAAA,OAAA,CAAQ,IAAA,CAAK,CAAA,8BAAA,EAAiC,OAAO,CAAA,CAAE,CAAA;AACvD,IAAA,OAAO,MAAM;AAAA,IAAC,CAAA;AAAA,EAChB;AAEA,EAAA,EAAA,CAAG,SAAA,GAAY,gBAAA,CAAiB,aAAA,EAAe,OAAO,CAAA;AACtD,EAAA,OAAO,MAAM;AAAE,IAAA,EAAA,CAAG,SAAA,GAAY,EAAA;AAAA,EAAI,CAAA;AACpC;AAEO,SAAS,aAAA,CACd,GAAA,EACA,aAAA,EACA,OAAA,EACM;AACN,EAAA,MAAM,KAAK,OAAO,GAAA,KAAQ,WACtB,QAAA,CAAS,aAAA,CAAgC,GAAG,CAAA,GAC5C,GAAA;AAEJ,EAAA,IAAI,CAAC,EAAA,EAAI;AACT,EAAA,EAAA,CAAG,GAAA,GAAM,oBAAA,CAAqB,aAAA,EAAe,OAAO,CAAA;AACpD,EAAA,EAAA,CAAG,GAAA,GAAM,eAAe,aAAa,CAAA;AACvC;AAEO,SAAS,QAAA,CAAS,OAA+B,QAAA,EAAgB;AACtE,EAAA,MAAM,QAAA,GAAW,IAAA,CAAK,gBAAA,CAA8B,gBAAgB,CAAA;AACpE,EAAA,QAAA,CAAS,OAAA,CAAQ,CAAC,EAAA,KAAO;AACvB,IAAA,MAAM,MAAA,GAAS,EAAA,CAAG,YAAA,CAAa,cAAc,CAAA;AAC7C,IAAA,IAAI,CAAC,MAAA,EAAQ;AAEb,IAAA,MAAM,OAAO,QAAA,CAAS,EAAA,CAAG,aAAa,mBAAmB,CAAA,IAAK,MAAM,EAAE,CAAA;AACtE,IAAA,MAAM,KAAA,GAAQ,EAAA,CAAG,YAAA,CAAa,oBAAoB,CAAA,KAAM,MAAA;AACxD,IAAA,MAAM,SAAA,GAAY,EAAA,CAAG,YAAA,CAAa,oBAAoB,CAAA;AACtD,IAAA,MAAM,IAAA,GAAO,EAAA,CAAG,YAAA,CAAa,mBAAmB,CAAA,KAAM,MAAA;AACtD,IAAA,MAAM,MAAA,GAAS,EAAA,CAAG,YAAA,CAAa,qBAAqB,CAAA;AAEpD,IAAA,IAAI,QAAQ,SAAA,IAAa,SAAA,IAAa,aAAA,GAClC,aAAA,CAAc,SAAuC,CAAA,GACrD,MAAA;AAGJ,IAAA,IAAI,QAAQ,KAAA,EAAO;AACjB,MAAA,KAAA,GAAQ,EAAE,GAAG,KAAA,EAAO,IAAA,EAAM,IAAA,EAAK;AAAA,IACjC,WAAW,IAAA,EAAM;AACf,MAAA,KAAA,GAAQ,EAAE,MAAM,IAAA,EAAK;AAAA,IACvB;AAEA,IAAA,YAAA,CAAa,IAAI,MAAA,EAAQ;AAAA,MACvB,IAAA;AAAA,MACA,WAAA,EAAa,KAAA;AAAA,MACb,KAAA;AAAA,MACA,QAAQ,MAAA,IAAU;AAAA,KACnB,CAAA;AAAA,EACH,CAAC,CAAA;AACH","file":"index.js","sourcesContent":["// ═══════════════════════════════════════════════════════════════\n// SOLFACES v2 — Vanilla DOM Helpers\n// Mount avatars directly into DOM elements without React.\n// ═══════════════════════════════════════════════════════════════\n\nimport { renderSolFaceSVG, renderSolFaceDataURI } from \"../core/renderer\";\nimport { solFaceAltText } from \"../core/describe\";\nimport { PRESET_THEMES } from \"../themes/presets\";\nimport type { RenderOptions } from \"../core/traits\";\n\nexport function mountSolFace(\n element: HTMLElement | string,\n walletAddress: string,\n options?: RenderOptions,\n): () => void {\n const el = typeof element === \"string\"\n ? document.querySelector<HTMLElement>(element)\n : element;\n\n if (!el) {\n console.warn(`[SolFaces] Element not found: ${element}`);\n return () => {};\n }\n\n el.innerHTML = renderSolFaceSVG(walletAddress, options);\n return () => { el.innerHTML = \"\"; };\n}\n\nexport function setSolFaceImg(\n img: HTMLImageElement | string,\n walletAddress: string,\n options?: RenderOptions,\n): void {\n const el = typeof img === \"string\"\n ? document.querySelector<HTMLImageElement>(img)\n : img;\n\n if (!el) return;\n el.src = renderSolFaceDataURI(walletAddress, options);\n el.alt = solFaceAltText(walletAddress);\n}\n\nexport function autoInit(root: HTMLElement | Document = document): void {\n const elements = root.querySelectorAll<HTMLElement>(\"[data-solface]\");\n elements.forEach((el) => {\n const wallet = el.getAttribute(\"data-solface\");\n if (!wallet) return;\n\n const size = parseInt(el.getAttribute(\"data-solface-size\") ?? \"64\", 10);\n const blink = el.getAttribute(\"data-solface-blink\") === \"true\";\n const themeName = el.getAttribute(\"data-solface-theme\") as string | null;\n const flat = el.getAttribute(\"data-solface-flat\") === \"true\";\n const detail = el.getAttribute(\"data-solface-detail\") as \"full\" | \"simplified\" | \"auto\" | null;\n\n let theme = themeName && themeName in PRESET_THEMES\n ? PRESET_THEMES[themeName as keyof typeof PRESET_THEMES]\n : undefined;\n\n // data-solface-flat overrides theme flat setting\n if (flat && theme) {\n theme = { ...theme, flat: true };\n } else if (flat) {\n theme = { flat: true };\n }\n\n mountSolFace(el, wallet, {\n size,\n enableBlink: blink,\n theme,\n detail: detail ?? \"auto\",\n });\n });\n}\n"]}
package/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "solfaces",
3
- "version": "1.0.2",
4
- "description": "Deterministic wallet avatars for the Solana ecosystem. Zero-dependency trait engine with React, vanilla JS, and server-side rendering support.",
3
+ "version": "2.1.0",
4
+ "description": "Deterministic wallet avatars and names for the Solana ecosystem. SHA-256 name derivation, zero-dependency trait engine with React, vanilla JS, and server-side rendering support.",
5
5
  "author": "https://github.com/jorger3301",
6
6
  "license": "MIT",
7
7
  "repository": {
8
8
  "type": "git",
9
9
  "url": "git+https://github.com/jorger3301/solfaces.git"
10
10
  },
11
+ "homepage": "https://github.com/jorger3301/SolFaces#readme",
11
12
  "keywords": [
12
13
  "solana",
13
14
  "avatar",
@@ -24,7 +25,11 @@
24
25
  "ai-agent",
25
26
  "mcp",
26
27
  "tool-use",
27
- "function-calling"
28
+ "function-calling",
29
+ "name-generator",
30
+ "deterministic-name",
31
+ "sha256",
32
+ "solnames"
28
33
  ],
29
34
  "type": "module",
30
35
  "main": "./dist/index.cjs",
@@ -61,6 +66,11 @@
61
66
  "import": "./dist/agent/index.js",
62
67
  "require": "./dist/agent/index.cjs"
63
68
  },
69
+ "./names": {
70
+ "types": "./dist/names/index.d.ts",
71
+ "import": "./dist/names/index.js",
72
+ "require": "./dist/names/index.cjs"
73
+ },
64
74
  "./cdn": "./dist/solfaces.cdn.global.js"
65
75
  },
66
76
  "bin": {
@@ -69,7 +79,8 @@
69
79
  "files": [
70
80
  "dist",
71
81
  "python",
72
- "skill.md",
82
+ "SKILL.md",
83
+ "reference",
73
84
  "README.md",
74
85
  "LICENSE"
75
86
  ],
@@ -77,15 +88,21 @@
77
88
  "build": "tsup",
78
89
  "dev": "tsup --watch",
79
90
  "typecheck": "tsc --noEmit",
91
+ "test": "vitest run",
92
+ "test:watch": "vitest",
80
93
  "lint": "eslint src/",
81
94
  "prepublishOnly": "npm run build"
82
95
  },
83
96
  "devDependencies": {
97
+ "@eslint/js": "^10.0.1",
84
98
  "@types/node": "^25.3.2",
85
99
  "@types/react": "^19.0.0",
100
+ "eslint": "^10.0.2",
86
101
  "react": "^19.0.0",
87
102
  "tsup": "^8.0.0",
88
- "typescript": "^5.5.0"
103
+ "typescript": "^5.5.0",
104
+ "typescript-eslint": "^8.56.1",
105
+ "vitest": "^4.0.18"
89
106
  },
90
107
  "peerDependencies": {
91
108
  "react": ">=18.0.0"