solfaces 2.0.0 → 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.
- package/README.md +134 -14
- package/SKILL.md +171 -0
- package/dist/agent/index.cjs +14 -13
- package/dist/agent/index.js +4 -3
- package/dist/agent/mcp-server.cjs +2240 -10
- package/dist/{chunk-TTGJZEPV.js → chunk-77SPWQU5.js} +43 -12
- package/dist/chunk-77SPWQU5.js.map +1 -0
- package/dist/{chunk-JS527VKL.js → chunk-CQWXUU7P.js} +6 -5
- package/dist/chunk-CQWXUU7P.js.map +1 -0
- package/dist/{chunk-46ZEFA6R.cjs → chunk-CXRVPOTI.cjs} +10 -9
- package/dist/chunk-CXRVPOTI.cjs.map +1 -0
- package/dist/{chunk-23XJ5VDX.cjs → chunk-F244Q4KC.cjs} +47 -16
- package/dist/chunk-F244Q4KC.cjs.map +1 -0
- package/dist/{chunk-6UWILY7E.cjs → chunk-HVPGR6G5.cjs} +2 -2
- package/dist/{chunk-6UWILY7E.cjs.map → chunk-HVPGR6G5.cjs.map} +1 -1
- package/dist/{chunk-LRHYF5QN.js → chunk-MGP7F65H.js} +3 -3
- package/dist/{chunk-LRHYF5QN.js.map → chunk-MGP7F65H.js.map} +1 -1
- package/dist/chunk-R3MC2AJZ.cjs +2247 -0
- package/dist/chunk-R3MC2AJZ.cjs.map +1 -0
- package/dist/{chunk-HCEE4K4T.js → chunk-SWML743U.js} +2 -2
- package/dist/{chunk-HCEE4K4T.js.map → chunk-SWML743U.js.map} +1 -1
- package/dist/chunk-SX3FQDKM.js +2238 -0
- package/dist/chunk-SX3FQDKM.js.map +1 -0
- package/dist/{chunk-546TBMAR.cjs → chunk-WTCXTXTV.cjs} +6 -6
- package/dist/{chunk-546TBMAR.cjs.map → chunk-WTCXTXTV.cjs.map} +1 -1
- package/dist/constants-Bi5uTRp5.d.cts +17 -0
- package/dist/constants-Bi5uTRp5.d.ts +17 -0
- package/dist/core/index.cjs +31 -31
- package/dist/core/index.js +3 -3
- package/dist/index.cjs +63 -34
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +5 -4
- package/dist/names/index.cjs +40 -0
- package/dist/names/index.cjs.map +1 -0
- package/dist/names/index.d.cts +36 -0
- package/dist/names/index.d.ts +36 -0
- package/dist/names/index.js +3 -0
- package/dist/names/index.js.map +1 -0
- package/dist/react/index.cjs +45 -22
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +15 -2
- package/dist/react/index.d.ts +15 -2
- package/dist/react/index.js +30 -8
- package/dist/react/index.js.map +1 -1
- package/dist/solfaces.cdn.global.js +2 -2
- package/dist/solfaces.cdn.global.js.map +1 -1
- package/dist/vanilla/index.cjs +5 -5
- package/dist/vanilla/index.js +2 -2
- package/package.json +22 -5
- package/python/solfaces.py +274 -3
- package/reference/integrations.md +166 -0
- package/reference/react.md +108 -0
- package/reference/themes.md +124 -0
- package/dist/chunk-23XJ5VDX.cjs.map +0 -1
- package/dist/chunk-46ZEFA6R.cjs.map +0 -1
- package/dist/chunk-JS527VKL.js.map +0 -1
- package/dist/chunk-TTGJZEPV.js.map +0 -1
- package/skill.md +0 -608
package/dist/index.cjs
CHANGED
|
@@ -1,132 +1,133 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
3
|
+
var chunkWTCXTXTV_cjs = require('./chunk-WTCXTXTV.cjs');
|
|
4
|
+
var chunkF244Q4KC_cjs = require('./chunk-F244Q4KC.cjs');
|
|
5
|
+
var chunkCXRVPOTI_cjs = require('./chunk-CXRVPOTI.cjs');
|
|
6
|
+
var chunkHVPGR6G5_cjs = require('./chunk-HVPGR6G5.cjs');
|
|
7
7
|
var chunk6QRDULAO_cjs = require('./chunk-6QRDULAO.cjs');
|
|
8
|
+
var chunkR3MC2AJZ_cjs = require('./chunk-R3MC2AJZ.cjs');
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
Object.defineProperty(exports, "renderSolFacePNG", {
|
|
12
13
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkWTCXTXTV_cjs.renderSolFacePNG; }
|
|
14
15
|
});
|
|
15
16
|
Object.defineProperty(exports, "renderSolFacePNGBrowser", {
|
|
16
17
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkWTCXTXTV_cjs.renderSolFacePNGBrowser; }
|
|
18
19
|
});
|
|
19
20
|
Object.defineProperty(exports, "renderSolFacePNGDataURL", {
|
|
20
21
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkWTCXTXTV_cjs.renderSolFacePNGDataURL; }
|
|
22
23
|
});
|
|
23
24
|
Object.defineProperty(exports, "SOLFACE_TOOLS", {
|
|
24
25
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkF244Q4KC_cjs.SOLFACE_TOOLS; }
|
|
26
27
|
});
|
|
27
28
|
Object.defineProperty(exports, "handleToolCall", {
|
|
28
29
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunkF244Q4KC_cjs.handleToolCall; }
|
|
30
31
|
});
|
|
31
32
|
Object.defineProperty(exports, "agentAppearancePrompt", {
|
|
32
33
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunkCXRVPOTI_cjs.agentAppearancePrompt; }
|
|
34
35
|
});
|
|
35
36
|
Object.defineProperty(exports, "describeAppearance", {
|
|
36
37
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
38
|
+
get: function () { return chunkCXRVPOTI_cjs.describeAppearance; }
|
|
38
39
|
});
|
|
39
40
|
Object.defineProperty(exports, "describeTraits", {
|
|
40
41
|
enumerable: true,
|
|
41
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunkCXRVPOTI_cjs.describeTraits; }
|
|
42
43
|
});
|
|
43
44
|
Object.defineProperty(exports, "solFaceAltText", {
|
|
44
45
|
enumerable: true,
|
|
45
|
-
get: function () { return
|
|
46
|
+
get: function () { return chunkCXRVPOTI_cjs.solFaceAltText; }
|
|
46
47
|
});
|
|
47
48
|
Object.defineProperty(exports, "BG_COLORS", {
|
|
48
49
|
enumerable: true,
|
|
49
|
-
get: function () { return
|
|
50
|
+
get: function () { return chunkHVPGR6G5_cjs.BG_COLORS; }
|
|
50
51
|
});
|
|
51
52
|
Object.defineProperty(exports, "EYE_COLORS", {
|
|
52
53
|
enumerable: true,
|
|
53
|
-
get: function () { return
|
|
54
|
+
get: function () { return chunkHVPGR6G5_cjs.EYE_COLORS; }
|
|
54
55
|
});
|
|
55
56
|
Object.defineProperty(exports, "HAIR_COLORS", {
|
|
56
57
|
enumerable: true,
|
|
57
|
-
get: function () { return
|
|
58
|
+
get: function () { return chunkHVPGR6G5_cjs.HAIR_COLORS; }
|
|
58
59
|
});
|
|
59
60
|
Object.defineProperty(exports, "SKIN_COLORS", {
|
|
60
61
|
enumerable: true,
|
|
61
|
-
get: function () { return
|
|
62
|
+
get: function () { return chunkHVPGR6G5_cjs.SKIN_COLORS; }
|
|
62
63
|
});
|
|
63
64
|
Object.defineProperty(exports, "blend", {
|
|
64
65
|
enumerable: true,
|
|
65
|
-
get: function () { return
|
|
66
|
+
get: function () { return chunkHVPGR6G5_cjs.blend; }
|
|
66
67
|
});
|
|
67
68
|
Object.defineProperty(exports, "buzzOpacity", {
|
|
68
69
|
enumerable: true,
|
|
69
|
-
get: function () { return
|
|
70
|
+
get: function () { return chunkHVPGR6G5_cjs.buzzOpacity; }
|
|
70
71
|
});
|
|
71
72
|
Object.defineProperty(exports, "darken", {
|
|
72
73
|
enumerable: true,
|
|
73
|
-
get: function () { return
|
|
74
|
+
get: function () { return chunkHVPGR6G5_cjs.darken; }
|
|
74
75
|
});
|
|
75
76
|
Object.defineProperty(exports, "deriveSkinColors", {
|
|
76
77
|
enumerable: true,
|
|
77
|
-
get: function () { return
|
|
78
|
+
get: function () { return chunkHVPGR6G5_cjs.deriveSkinColors; }
|
|
78
79
|
});
|
|
79
80
|
Object.defineProperty(exports, "effectiveAccessory", {
|
|
80
81
|
enumerable: true,
|
|
81
|
-
get: function () { return
|
|
82
|
+
get: function () { return chunkHVPGR6G5_cjs.effectiveAccessory; }
|
|
82
83
|
});
|
|
83
84
|
Object.defineProperty(exports, "generateTraits", {
|
|
84
85
|
enumerable: true,
|
|
85
|
-
get: function () { return
|
|
86
|
+
get: function () { return chunkHVPGR6G5_cjs.generateTraits; }
|
|
86
87
|
});
|
|
87
88
|
Object.defineProperty(exports, "getTraitLabels", {
|
|
88
89
|
enumerable: true,
|
|
89
|
-
get: function () { return
|
|
90
|
+
get: function () { return chunkHVPGR6G5_cjs.getTraitLabels; }
|
|
90
91
|
});
|
|
91
92
|
Object.defineProperty(exports, "hexToRgb", {
|
|
92
93
|
enumerable: true,
|
|
93
|
-
get: function () { return
|
|
94
|
+
get: function () { return chunkHVPGR6G5_cjs.hexToRgb; }
|
|
94
95
|
});
|
|
95
96
|
Object.defineProperty(exports, "lighten", {
|
|
96
97
|
enumerable: true,
|
|
97
|
-
get: function () { return
|
|
98
|
+
get: function () { return chunkHVPGR6G5_cjs.lighten; }
|
|
98
99
|
});
|
|
99
100
|
Object.defineProperty(exports, "luminance", {
|
|
100
101
|
enumerable: true,
|
|
101
|
-
get: function () { return
|
|
102
|
+
get: function () { return chunkHVPGR6G5_cjs.luminance; }
|
|
102
103
|
});
|
|
103
104
|
Object.defineProperty(exports, "mergeTheme", {
|
|
104
105
|
enumerable: true,
|
|
105
|
-
get: function () { return
|
|
106
|
+
get: function () { return chunkHVPGR6G5_cjs.mergeTheme; }
|
|
106
107
|
});
|
|
107
108
|
Object.defineProperty(exports, "renderSolFaceBase64", {
|
|
108
109
|
enumerable: true,
|
|
109
|
-
get: function () { return
|
|
110
|
+
get: function () { return chunkHVPGR6G5_cjs.renderSolFaceBase64; }
|
|
110
111
|
});
|
|
111
112
|
Object.defineProperty(exports, "renderSolFaceDataURI", {
|
|
112
113
|
enumerable: true,
|
|
113
|
-
get: function () { return
|
|
114
|
+
get: function () { return chunkHVPGR6G5_cjs.renderSolFaceDataURI; }
|
|
114
115
|
});
|
|
115
116
|
Object.defineProperty(exports, "renderSolFaceSVG", {
|
|
116
117
|
enumerable: true,
|
|
117
|
-
get: function () { return
|
|
118
|
+
get: function () { return chunkHVPGR6G5_cjs.renderSolFaceSVG; }
|
|
118
119
|
});
|
|
119
120
|
Object.defineProperty(exports, "resolveTheme", {
|
|
120
121
|
enumerable: true,
|
|
121
|
-
get: function () { return
|
|
122
|
+
get: function () { return chunkHVPGR6G5_cjs.resolveTheme; }
|
|
122
123
|
});
|
|
123
124
|
Object.defineProperty(exports, "rgbToHex", {
|
|
124
125
|
enumerable: true,
|
|
125
|
-
get: function () { return
|
|
126
|
+
get: function () { return chunkHVPGR6G5_cjs.rgbToHex; }
|
|
126
127
|
});
|
|
127
128
|
Object.defineProperty(exports, "traitHash", {
|
|
128
129
|
enumerable: true,
|
|
129
|
-
get: function () { return
|
|
130
|
+
get: function () { return chunkHVPGR6G5_cjs.traitHash; }
|
|
130
131
|
});
|
|
131
132
|
Object.defineProperty(exports, "PRESET_THEMES", {
|
|
132
133
|
enumerable: true,
|
|
@@ -136,5 +137,33 @@ Object.defineProperty(exports, "getPresetTheme", {
|
|
|
136
137
|
enumerable: true,
|
|
137
138
|
get: function () { return chunk6QRDULAO_cjs.getPresetTheme; }
|
|
138
139
|
});
|
|
140
|
+
Object.defineProperty(exports, "ADJECTIVES", {
|
|
141
|
+
enumerable: true,
|
|
142
|
+
get: function () { return chunkR3MC2AJZ_cjs.ADJECTIVES; }
|
|
143
|
+
});
|
|
144
|
+
Object.defineProperty(exports, "NOUNS", {
|
|
145
|
+
enumerable: true,
|
|
146
|
+
get: function () { return chunkR3MC2AJZ_cjs.NOUNS; }
|
|
147
|
+
});
|
|
148
|
+
Object.defineProperty(exports, "SOLNAMES_VERSION", {
|
|
149
|
+
enumerable: true,
|
|
150
|
+
get: function () { return chunkR3MC2AJZ_cjs.SOLNAMES_VERSION; }
|
|
151
|
+
});
|
|
152
|
+
Object.defineProperty(exports, "deriveIdentity", {
|
|
153
|
+
enumerable: true,
|
|
154
|
+
get: function () { return chunkR3MC2AJZ_cjs.deriveIdentity; }
|
|
155
|
+
});
|
|
156
|
+
Object.defineProperty(exports, "deriveName", {
|
|
157
|
+
enumerable: true,
|
|
158
|
+
get: function () { return chunkR3MC2AJZ_cjs.deriveName; }
|
|
159
|
+
});
|
|
160
|
+
Object.defineProperty(exports, "isValidSolName", {
|
|
161
|
+
enumerable: true,
|
|
162
|
+
get: function () { return chunkR3MC2AJZ_cjs.isValidSolName; }
|
|
163
|
+
});
|
|
164
|
+
Object.defineProperty(exports, "parseSolName", {
|
|
165
|
+
enumerable: true,
|
|
166
|
+
get: function () { return chunkR3MC2AJZ_cjs.parseSolName; }
|
|
167
|
+
});
|
|
139
168
|
//# sourceMappingURL=index.cjs.map
|
|
140
169
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { B as BG_COLORS, E as EYE_COLORS, H as HAIR_COLORS, R as RenderOptions, S as SKIN_COLORS, a as SolFaceTheme, b as SolFaceTraits, e as effectiveAccessory, g as generateTraits, c as getTraitLabels, m as mergeTheme, r as resolveTheme, t as traitHash } from './traits-QlWuxZDD.cjs';
|
|
2
2
|
export { DerivedColors, DescribeOptions, PNGOptions, agentAppearancePrompt, blend, buzzOpacity, darken, deriveSkinColors, describeAppearance, describeTraits, hexToRgb, lighten, luminance, renderSolFaceBase64, renderSolFaceDataURI, renderSolFacePNG, renderSolFacePNGBrowser, renderSolFacePNGDataURL, renderSolFaceSVG, rgbToHex, solFaceAltText } from './core/index.cjs';
|
|
3
|
+
export { ParsedSolName, deriveIdentity, deriveName, isValidSolName, parseSolName } from './names/index.cjs';
|
|
4
|
+
export { A as ADJECTIVES, N as NOUNS, a as NameFormat, S as SOLNAMES_VERSION, b as SolNameIdentity } from './constants-Bi5uTRp5.cjs';
|
|
3
5
|
export { PRESET_THEMES, getPresetTheme } from './themes/index.cjs';
|
|
4
6
|
export { SOLFACE_TOOLS, SolFaceTool, handleToolCall } from './agent/index.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { B as BG_COLORS, E as EYE_COLORS, H as HAIR_COLORS, R as RenderOptions, S as SKIN_COLORS, a as SolFaceTheme, b as SolFaceTraits, e as effectiveAccessory, g as generateTraits, c as getTraitLabels, m as mergeTheme, r as resolveTheme, t as traitHash } from './traits-QlWuxZDD.js';
|
|
2
2
|
export { DerivedColors, DescribeOptions, PNGOptions, agentAppearancePrompt, blend, buzzOpacity, darken, deriveSkinColors, describeAppearance, describeTraits, hexToRgb, lighten, luminance, renderSolFaceBase64, renderSolFaceDataURI, renderSolFacePNG, renderSolFacePNGBrowser, renderSolFacePNGDataURL, renderSolFaceSVG, rgbToHex, solFaceAltText } from './core/index.js';
|
|
3
|
+
export { ParsedSolName, deriveIdentity, deriveName, isValidSolName, parseSolName } from './names/index.js';
|
|
4
|
+
export { A as ADJECTIVES, N as NOUNS, a as NameFormat, S as SOLNAMES_VERSION, b as SolNameIdentity } from './constants-Bi5uTRp5.js';
|
|
3
5
|
export { PRESET_THEMES, getPresetTheme } from './themes/index.js';
|
|
4
6
|
export { SOLFACE_TOOLS, SolFaceTool, handleToolCall } from './agent/index.js';
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export { renderSolFacePNG, renderSolFacePNGBrowser, renderSolFacePNGDataURL } from './chunk-
|
|
2
|
-
export { SOLFACE_TOOLS, handleToolCall } from './chunk-
|
|
3
|
-
export { agentAppearancePrompt, describeAppearance, describeTraits, solFaceAltText } from './chunk-
|
|
4
|
-
export { BG_COLORS, EYE_COLORS, HAIR_COLORS, SKIN_COLORS, blend, buzzOpacity, darken, deriveSkinColors, effectiveAccessory, generateTraits, getTraitLabels, hexToRgb, lighten, luminance, mergeTheme, renderSolFaceBase64, renderSolFaceDataURI, renderSolFaceSVG, resolveTheme, rgbToHex, traitHash } from './chunk-
|
|
1
|
+
export { renderSolFacePNG, renderSolFacePNGBrowser, renderSolFacePNGDataURL } from './chunk-MGP7F65H.js';
|
|
2
|
+
export { SOLFACE_TOOLS, handleToolCall } from './chunk-77SPWQU5.js';
|
|
3
|
+
export { agentAppearancePrompt, describeAppearance, describeTraits, solFaceAltText } from './chunk-CQWXUU7P.js';
|
|
4
|
+
export { BG_COLORS, EYE_COLORS, HAIR_COLORS, SKIN_COLORS, blend, buzzOpacity, darken, deriveSkinColors, effectiveAccessory, generateTraits, getTraitLabels, hexToRgb, lighten, luminance, mergeTheme, renderSolFaceBase64, renderSolFaceDataURI, renderSolFaceSVG, resolveTheme, rgbToHex, traitHash } from './chunk-SWML743U.js';
|
|
5
5
|
export { PRESET_THEMES, getPresetTheme } from './chunk-DRUSCLEF.js';
|
|
6
|
+
export { ADJECTIVES, NOUNS, SOLNAMES_VERSION, deriveIdentity, deriveName, isValidSolName, parseSolName } from './chunk-SX3FQDKM.js';
|
|
6
7
|
//# sourceMappingURL=index.js.map
|
|
7
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkR3MC2AJZ_cjs = require('../chunk-R3MC2AJZ.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "ADJECTIVES", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () { return chunkR3MC2AJZ_cjs.ADJECTIVES; }
|
|
10
|
+
});
|
|
11
|
+
Object.defineProperty(exports, "BLOCKED_COMBOS", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () { return chunkR3MC2AJZ_cjs.BLOCKED_COMBOS; }
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(exports, "NOUNS", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () { return chunkR3MC2AJZ_cjs.NOUNS; }
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports, "SOLNAMES_VERSION", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function () { return chunkR3MC2AJZ_cjs.SOLNAMES_VERSION; }
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(exports, "deriveIdentity", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: function () { return chunkR3MC2AJZ_cjs.deriveIdentity; }
|
|
26
|
+
});
|
|
27
|
+
Object.defineProperty(exports, "deriveName", {
|
|
28
|
+
enumerable: true,
|
|
29
|
+
get: function () { return chunkR3MC2AJZ_cjs.deriveName; }
|
|
30
|
+
});
|
|
31
|
+
Object.defineProperty(exports, "isValidSolName", {
|
|
32
|
+
enumerable: true,
|
|
33
|
+
get: function () { return chunkR3MC2AJZ_cjs.isValidSolName; }
|
|
34
|
+
});
|
|
35
|
+
Object.defineProperty(exports, "parseSolName", {
|
|
36
|
+
enumerable: true,
|
|
37
|
+
get: function () { return chunkR3MC2AJZ_cjs.parseSolName; }
|
|
38
|
+
});
|
|
39
|
+
//# sourceMappingURL=index.cjs.map
|
|
40
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { b as SolNameIdentity, a as NameFormat } from '../constants-Bi5uTRp5.cjs';
|
|
2
|
+
export { A as ADJECTIVES, B as BLOCKED_COMBOS, N as NOUNS, S as SOLNAMES_VERSION } from '../constants-Bi5uTRp5.cjs';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Derive a deterministic name from a Solana wallet address.
|
|
6
|
+
*
|
|
7
|
+
* @param wallet Base58 wallet address
|
|
8
|
+
* @param format Name format (default: "display")
|
|
9
|
+
* @returns Formatted name string
|
|
10
|
+
*/
|
|
11
|
+
declare function deriveName(wallet: string, format?: NameFormat): string;
|
|
12
|
+
/**
|
|
13
|
+
* Derive the full identity bundle for a wallet address.
|
|
14
|
+
* Returns all four name formats plus component parts.
|
|
15
|
+
*/
|
|
16
|
+
declare function deriveIdentity(wallet: string): SolNameIdentity;
|
|
17
|
+
|
|
18
|
+
interface ParsedSolName {
|
|
19
|
+
adjective: string;
|
|
20
|
+
noun: string;
|
|
21
|
+
discriminator?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Check if a string is a valid SolName (display, tag, or full format).
|
|
25
|
+
*/
|
|
26
|
+
declare function isValidSolName(name: string): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Parse a SolName string into its component parts.
|
|
29
|
+
* Supports display ("SunnyIcon"), tag ("SunnyIcon#2f95"),
|
|
30
|
+
* and full ("SunnyIcon-InfiniteOre") formats.
|
|
31
|
+
*
|
|
32
|
+
* Returns null if the name doesn't match any valid format.
|
|
33
|
+
*/
|
|
34
|
+
declare function parseSolName(name: string): ParsedSolName | null;
|
|
35
|
+
|
|
36
|
+
export { NameFormat, type ParsedSolName, SolNameIdentity, deriveIdentity, deriveName, isValidSolName, parseSolName };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { b as SolNameIdentity, a as NameFormat } from '../constants-Bi5uTRp5.js';
|
|
2
|
+
export { A as ADJECTIVES, B as BLOCKED_COMBOS, N as NOUNS, S as SOLNAMES_VERSION } from '../constants-Bi5uTRp5.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Derive a deterministic name from a Solana wallet address.
|
|
6
|
+
*
|
|
7
|
+
* @param wallet Base58 wallet address
|
|
8
|
+
* @param format Name format (default: "display")
|
|
9
|
+
* @returns Formatted name string
|
|
10
|
+
*/
|
|
11
|
+
declare function deriveName(wallet: string, format?: NameFormat): string;
|
|
12
|
+
/**
|
|
13
|
+
* Derive the full identity bundle for a wallet address.
|
|
14
|
+
* Returns all four name formats plus component parts.
|
|
15
|
+
*/
|
|
16
|
+
declare function deriveIdentity(wallet: string): SolNameIdentity;
|
|
17
|
+
|
|
18
|
+
interface ParsedSolName {
|
|
19
|
+
adjective: string;
|
|
20
|
+
noun: string;
|
|
21
|
+
discriminator?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Check if a string is a valid SolName (display, tag, or full format).
|
|
25
|
+
*/
|
|
26
|
+
declare function isValidSolName(name: string): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Parse a SolName string into its component parts.
|
|
29
|
+
* Supports display ("SunnyIcon"), tag ("SunnyIcon#2f95"),
|
|
30
|
+
* and full ("SunnyIcon-InfiniteOre") formats.
|
|
31
|
+
*
|
|
32
|
+
* Returns null if the name doesn't match any valid format.
|
|
33
|
+
*/
|
|
34
|
+
declare function parseSolName(name: string): ParsedSolName | null;
|
|
35
|
+
|
|
36
|
+
export { NameFormat, type ParsedSolName, SolNameIdentity, deriveIdentity, deriveName, isValidSolName, parseSolName };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
|
package/dist/react/index.cjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkHVPGR6G5_cjs = require('../chunk-HVPGR6G5.cjs');
|
|
4
|
+
var chunkR3MC2AJZ_cjs = require('../chunk-R3MC2AJZ.cjs');
|
|
4
5
|
var react = require('react');
|
|
5
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
7
|
|
|
@@ -73,7 +74,7 @@ function HairFront({ hi, id, hairCol, skin, flat }) {
|
|
|
73
74
|
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "46", y: "28", width: "8", height: "14", rx: "4" })
|
|
74
75
|
] });
|
|
75
76
|
case 7: {
|
|
76
|
-
const bOp =
|
|
77
|
+
const bOp = chunkHVPGR6G5_cjs.buzzOpacity(hairCol, skin);
|
|
77
78
|
return /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "15", y: "13", width: "34", height: "16", rx: "10", ry: "8", fill: hairCol, opacity: bOp });
|
|
78
79
|
}
|
|
79
80
|
case 8:
|
|
@@ -264,7 +265,7 @@ function Mouth({ mi, lipColor, isDark }) {
|
|
|
264
265
|
return /* @__PURE__ */ jsxRuntime.jsx("path", { d: `M${cx - 4} ${y} Q${cx} ${y + 4} ${cx + 4} ${y}`, fill: "none", stroke: lipColor, strokeWidth: "1.4", strokeLinecap: "round" });
|
|
265
266
|
}
|
|
266
267
|
}
|
|
267
|
-
function Accessory({ ai,
|
|
268
|
+
function Accessory({ ai, glassesColor, earringColor, headbandColor }) {
|
|
268
269
|
switch (ai) {
|
|
269
270
|
case 0:
|
|
270
271
|
return null;
|
|
@@ -445,42 +446,44 @@ function SolFace({
|
|
|
445
446
|
traitOverrides,
|
|
446
447
|
colorOverrides,
|
|
447
448
|
detail: detailProp,
|
|
449
|
+
showName = false,
|
|
450
|
+
namePosition = "below",
|
|
451
|
+
nameFormat = "display",
|
|
448
452
|
className,
|
|
449
453
|
style,
|
|
450
454
|
...rest
|
|
451
455
|
}) {
|
|
452
456
|
const traits = react.useMemo(
|
|
453
|
-
() =>
|
|
457
|
+
() => chunkHVPGR6G5_cjs.generateTraits(walletAddress, traitOverrides),
|
|
454
458
|
[walletAddress, traitOverrides]
|
|
455
459
|
);
|
|
456
460
|
const detailOpt = detailProp ?? "auto";
|
|
457
461
|
const full = detailOpt === "full" || detailOpt === "auto" && size >= 48;
|
|
458
462
|
const flat = theme?.flat ?? false;
|
|
459
|
-
const skinColors = theme?.skinColors ??
|
|
460
|
-
const eyeColors = theme?.eyeColors ??
|
|
461
|
-
const hairColors = theme?.hairColors ??
|
|
462
|
-
const bgColors = theme?.bgColors ??
|
|
463
|
+
const skinColors = theme?.skinColors ?? chunkHVPGR6G5_cjs.SKIN_COLORS;
|
|
464
|
+
const eyeColors = theme?.eyeColors ?? chunkHVPGR6G5_cjs.EYE_COLORS;
|
|
465
|
+
const hairColors = theme?.hairColors ?? chunkHVPGR6G5_cjs.HAIR_COLORS;
|
|
466
|
+
const bgColors = theme?.bgColors ?? chunkHVPGR6G5_cjs.BG_COLORS;
|
|
463
467
|
const skin = colorOverrides?.skin ?? skinColors[traits.skinColor % skinColors.length];
|
|
464
468
|
const eyeCol = colorOverrides?.eyes ?? eyeColors[traits.eyeColor % eyeColors.length];
|
|
465
469
|
const hairCol = colorOverrides?.hair ?? hairColors[traits.hairColor % hairColors.length];
|
|
466
470
|
const bgCol = colorOverrides?.bg ?? bgColors[traits.bgColor % bgColors.length];
|
|
467
|
-
const derived = react.useMemo(() =>
|
|
471
|
+
const derived = react.useMemo(() => chunkHVPGR6G5_cjs.deriveSkinColors(skin), [skin]);
|
|
468
472
|
const bgOpacity = theme?.bgOpacity ?? 1;
|
|
469
473
|
const bgRadius = theme?.bgRadius ?? 4;
|
|
470
474
|
const browColor = colorOverrides?.eyebrow ?? theme?.eyebrowColor ?? derived.browColor;
|
|
471
475
|
const noseFill = colorOverrides?.nose ?? theme?.noseColor ?? derived.noseFill;
|
|
472
476
|
const lipColor = colorOverrides?.mouth ?? theme?.mouthColor ?? derived.lipColor;
|
|
473
|
-
const accColor = colorOverrides?.accessory ?? theme?.accessoryColor ?? derived.accessoryColor;
|
|
474
477
|
const eyeWhite = colorOverrides?.eyeWhite ?? theme?.eyeWhiteColor ?? derived.eyeWhiteAdapted;
|
|
475
478
|
const glassesColor = theme?.glassesColor ?? "#4a4a5a";
|
|
476
|
-
const earringColor = theme?.earringColor ??
|
|
477
|
-
const headbandColor = theme?.headbandColor ??
|
|
479
|
+
const earringColor = theme?.earringColor ?? chunkHVPGR6G5_cjs.blend(skin, "#d4a840", 0.4);
|
|
480
|
+
const headbandColor = theme?.headbandColor ?? chunkHVPGR6G5_cjs.blend(hairCol, "#c04040", 0.5);
|
|
478
481
|
const id = react.useMemo(() => "sf" + djb2(walletAddress).toString(36), [walletAddress]);
|
|
479
482
|
const cheekEnabled = theme?.cheekEnabled ?? true;
|
|
480
483
|
const cheekColor = theme?.cheekColor ?? derived.cheekColor;
|
|
481
484
|
const cheekOpacity = theme?.cheekOpacity ?? derived.cheekOpacity;
|
|
482
485
|
const hi = traits.hairStyle % 10;
|
|
483
|
-
const ai =
|
|
486
|
+
const ai = chunkHVPGR6G5_cjs.effectiveAccessory(traits);
|
|
484
487
|
const blinkEnabled = !!enableBlink;
|
|
485
488
|
const blinkDuration = typeof enableBlink === "object" ? enableBlink.duration ?? 4 : 4;
|
|
486
489
|
const blinkDelay = typeof enableBlink === "object" ? enableBlink.delay ?? 0 : 0;
|
|
@@ -488,7 +491,7 @@ function SolFace({
|
|
|
488
491
|
const bgFill = flat ? bgCol : `url(#${id}bg)`;
|
|
489
492
|
const skinFill = flat ? skin : `url(#${id}sg)`;
|
|
490
493
|
if (theme?._pixel) {
|
|
491
|
-
const pixelSvg =
|
|
494
|
+
const pixelSvg = chunkHVPGR6G5_cjs.renderSolFaceSVG(walletAddress, {
|
|
492
495
|
size,
|
|
493
496
|
theme: { ...theme, _pixel: false, _glass: false },
|
|
494
497
|
traitOverrides,
|
|
@@ -514,12 +517,12 @@ function SolFace({
|
|
|
514
517
|
/* @__PURE__ */ jsxRuntime.jsx("stop", { offset: "100%", stopColor: derived.skinLo })
|
|
515
518
|
] }),
|
|
516
519
|
/* @__PURE__ */ jsxRuntime.jsxs("linearGradient", { id: `${id}hg`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
517
|
-
/* @__PURE__ */ jsxRuntime.jsx("stop", { offset: "0%", stopColor:
|
|
518
|
-
/* @__PURE__ */ jsxRuntime.jsx("stop", { offset: "100%", stopColor:
|
|
520
|
+
/* @__PURE__ */ jsxRuntime.jsx("stop", { offset: "0%", stopColor: chunkHVPGR6G5_cjs.lighten(hairCol, 0.15) }),
|
|
521
|
+
/* @__PURE__ */ jsxRuntime.jsx("stop", { offset: "100%", stopColor: chunkHVPGR6G5_cjs.darken(hairCol, 0.15) })
|
|
519
522
|
] }),
|
|
520
523
|
/* @__PURE__ */ jsxRuntime.jsxs("linearGradient", { id: `${id}bg`, x1: "0", y1: "0", x2: "1", y2: "1", children: [
|
|
521
|
-
/* @__PURE__ */ jsxRuntime.jsx("stop", { offset: "0%", stopColor:
|
|
522
|
-
/* @__PURE__ */ jsxRuntime.jsx("stop", { offset: "100%", stopColor:
|
|
524
|
+
/* @__PURE__ */ jsxRuntime.jsx("stop", { offset: "0%", stopColor: chunkHVPGR6G5_cjs.lighten(bgCol, 0.12) }),
|
|
525
|
+
/* @__PURE__ */ jsxRuntime.jsx("stop", { offset: "100%", stopColor: chunkHVPGR6G5_cjs.darken(bgCol, 0.12) })
|
|
523
526
|
] }),
|
|
524
527
|
full && cheekEnabled && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
525
528
|
/* @__PURE__ */ jsxRuntime.jsxs("radialGradient", { id: `${id}glow`, cx: "0.5", cy: "0.28", r: "0.45", children: [
|
|
@@ -555,23 +558,43 @@ function SolFace({
|
|
|
555
558
|
/* @__PURE__ */ jsxRuntime.jsx(Ears, { earFill: derived.earFill, earShadow: derived.earShadow }),
|
|
556
559
|
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "14", y: "16", width: "36", height: "38", rx: "12", ry: "12", fill: skinFill }),
|
|
557
560
|
full && cheekEnabled && !flat && /* @__PURE__ */ jsxRuntime.jsx(FaceOverlays, { id }),
|
|
558
|
-
ai === 5 && /* @__PURE__ */ jsxRuntime.jsx(Accessory, { ai: 5,
|
|
561
|
+
ai === 5 && /* @__PURE__ */ jsxRuntime.jsx(Accessory, { ai: 5, glassesColor, earringColor, headbandColor }),
|
|
559
562
|
/* @__PURE__ */ jsxRuntime.jsx(HairFront, { hi, id, hairCol, skin, flat }),
|
|
560
563
|
/* @__PURE__ */ jsxRuntime.jsx("g", { className: blinkEnabled ? `${id}-eyes` : void 0, children: /* @__PURE__ */ jsxRuntime.jsx(Eyes, { ei: traits.eyeStyle % 8, eyeCol, eyeWhite, lidColor: derived.lidColor, full }) }),
|
|
561
564
|
/* @__PURE__ */ jsxRuntime.jsx(Eyebrows, { bi: traits.eyebrows % 5, browColor }),
|
|
562
565
|
/* @__PURE__ */ jsxRuntime.jsx(Nose, { ni: traits.nose % 4, noseFill }),
|
|
563
566
|
/* @__PURE__ */ jsxRuntime.jsx(Mouth, { mi: traits.mouth % 8, lipColor, isDark: derived.isDark }),
|
|
564
|
-
ai !== 0 && ai !== 5 && /* @__PURE__ */ jsxRuntime.jsx(Accessory, { ai,
|
|
567
|
+
ai !== 0 && ai !== 5 && /* @__PURE__ */ jsxRuntime.jsx(Accessory, { ai, glassesColor, earringColor, headbandColor }),
|
|
565
568
|
theme?.border && /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "0", y: "0", width: "64", height: "64", fill: "none", stroke: theme.border.color, strokeWidth: theme.border.width, rx: bgRadius })
|
|
566
569
|
]
|
|
567
570
|
}
|
|
568
571
|
);
|
|
569
572
|
if (theme?._glass) {
|
|
570
|
-
|
|
573
|
+
const glassEl = /* @__PURE__ */ jsxRuntime.jsx(GlassWrapper, { size, theme, children: svgElement });
|
|
574
|
+
if (!showName) return glassEl;
|
|
575
|
+
const glassName = chunkR3MC2AJZ_cjs.deriveName(walletAddress, nameFormat);
|
|
576
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "inline-flex", flexDirection: "column", alignItems: "center", gap: 4 }, children: [
|
|
577
|
+
namePosition === "above" && /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: Math.max(10, size / 5), fontFamily: "inherit" }, children: glassName }),
|
|
578
|
+
glassEl,
|
|
579
|
+
namePosition === "below" && /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: Math.max(10, size / 5), fontFamily: "inherit" }, children: glassName })
|
|
580
|
+
] });
|
|
571
581
|
}
|
|
572
|
-
return svgElement;
|
|
582
|
+
if (!showName) return svgElement;
|
|
583
|
+
const walletName = chunkR3MC2AJZ_cjs.deriveName(walletAddress, nameFormat);
|
|
584
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "inline-flex", flexDirection: "column", alignItems: "center", gap: 4 }, children: [
|
|
585
|
+
namePosition === "above" && /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: Math.max(10, size / 5), fontFamily: "inherit" }, children: walletName }),
|
|
586
|
+
svgElement,
|
|
587
|
+
namePosition === "below" && /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: Math.max(10, size / 5), fontFamily: "inherit" }, children: walletName })
|
|
588
|
+
] });
|
|
589
|
+
}
|
|
590
|
+
function useSolName(wallet, format) {
|
|
591
|
+
return react.useMemo(() => {
|
|
592
|
+
if (format) return chunkR3MC2AJZ_cjs.deriveName(wallet, format);
|
|
593
|
+
return chunkR3MC2AJZ_cjs.deriveIdentity(wallet);
|
|
594
|
+
}, [wallet, format]);
|
|
573
595
|
}
|
|
574
596
|
|
|
575
597
|
exports.SolFace = SolFace;
|
|
598
|
+
exports.useSolName = useSolName;
|
|
576
599
|
//# sourceMappingURL=index.cjs.map
|
|
577
600
|
//# sourceMappingURL=index.cjs.map
|