@5even7/dlc-ui 0.2.18 → 0.2.20
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/CHANGELOG.md +158 -144
- package/EXTENDING.md +114 -0
- package/LICENSE +21 -21
- package/README.md +389 -338
- package/THIRD_PARTY_NOTICES.md +221 -0
- package/dist/avatar-creator/styles/humation.mjs +26 -0
- package/dist/avatar-creator/styles.mjs +76 -0
- package/dist/avatar-creator.cjs +7831 -0
- package/dist/avatar-creator.mjs +74 -0
- package/dist/capsule.cjs +185 -66
- package/dist/capsule.mjs +364 -1340
- package/dist/chunks/avatar-creator-DiAmhpRa.mjs +687 -0
- package/dist/chunks/color-DnmNceaf.mjs +350 -0
- package/dist/chunks/controls-B5_ctvvA.mjs +160 -0
- package/dist/chunks/copy-7J0XIj_0.mjs +13 -0
- package/dist/chunks/cosmic-fallback-v8G5_ibh.mjs +408 -0
- package/dist/chunks/emitter-CxLYMSbw.mjs +38 -0
- package/dist/chunks/emo-Dvahy5Qr.mjs +1140 -0
- package/dist/chunks/hash-BiO02UNb.mjs +38 -0
- package/dist/chunks/humation-B9OPUGL7.mjs +2987 -0
- package/dist/chunks/identicon-BUdMd-yf.mjs +3063 -0
- package/dist/chunks/index-BchW1tWE.mjs +478 -0
- package/dist/chunks/index-BtH8Lbra.mjs +296 -0
- package/dist/chunks/index-C02dvGLD.mjs +263 -0
- package/dist/chunks/index-CFybYBA1.mjs +278 -0
- package/dist/chunks/index-DgI872-7.mjs +241 -0
- package/dist/chunks/index-_sf_14Zu.mjs +455 -0
- package/dist/chunks/index-w5Pzdwhv.mjs +305 -0
- package/dist/chunks/motion-a8_f8_Ui.mjs +177 -0
- package/dist/chunks/number-BqWLX0iQ.mjs +231 -0
- package/dist/chunks/progress-KweS4Rx0.mjs +1836 -0
- package/dist/chunks/size-Bztk2ryJ.mjs +22 -0
- package/dist/chunks/wrapper-DXhy1E7Z.mjs +514 -0
- package/dist/color.cjs +186 -67
- package/dist/color.mjs +341 -1280
- package/dist/emo/miao/angry.mjs +4 -0
- package/dist/emo/miao/asleep.mjs +4 -0
- package/dist/emo/miao/badminton.mjs +4 -0
- package/dist/emo/miao/confident.mjs +4 -0
- package/dist/emo/miao/cry.mjs +4 -0
- package/dist/emo/miao/investigate.mjs +4 -0
- package/dist/emo/miao/laugh.mjs +4 -0
- package/dist/emo/miao/leisure.mjs +4 -0
- package/dist/emo/miao/mock.mjs +4 -0
- package/dist/emo/miao/music.mjs +4 -0
- package/dist/emo/miao/mute.mjs +4 -0
- package/dist/emo/miao/panic.mjs +4 -0
- package/dist/emo/miao/ponder.mjs +4 -0
- package/dist/emo/miao/question.mjs +4 -0
- package/dist/emo/miao/sad.mjs +4 -0
- package/dist/emo/miao/shocked.mjs +4 -0
- package/dist/emo/miao/shy.mjs +4 -0
- package/dist/emo/miao/sigh.mjs +4 -0
- package/dist/emo/miao/smile.mjs +4 -0
- package/dist/emo/miao/snigger.mjs +4 -0
- package/dist/emo/miao/static.mjs +4 -0
- package/dist/emo/miao/yawn.mjs +4 -0
- package/dist/emo/miao/yummy.mjs +4 -0
- package/dist/emo.cjs +27161 -25964
- package/dist/emo.mjs +8 -1421
- package/dist/index.cjs +32729 -24466
- package/dist/index.mjs +16 -4757
- package/dist/index.umd.js +33115 -24852
- package/dist/index.umd.min.js +3 -1
- package/dist/progress.cjs +195 -76
- package/dist/progress.mjs +7 -2448
- package/dist/vue2.cjs +33282 -25002
- package/dist/vue2.mjs +63 -5131
- package/dist/vue3.cjs +33282 -25002
- package/dist/vue3.mjs +53 -5122
- package/package.json +161 -136
- package/styles/avatar-creator.css +38 -0
- package/styles/base.css +32 -32
- package/styles/color.css +18 -18
- package/styles/emo.css +110 -89
- package/styles/progress.css +96 -96
- package/styles/theme.css +1 -0
- package/types/avatar-creator-styles.d.ts +10 -0
- package/types/avatar-creator.d.ts +143 -0
- package/types/capsule.d.ts +15 -15
- package/types/color.d.ts +15 -15
- package/types/emo-miao.d.ts +9 -0
- package/types/emo.d.ts +38 -37
- package/types/index.d.ts +593 -554
- package/types/progress.d.ts +16 -16
- package/types/vue2.d.ts +11 -10
- package/types/vue3.d.ts +169 -146
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
import { x as xml, s as schema } from './identicon-BUdMd-yf.mjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
|
|
5
|
+
*
|
|
6
|
+
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
|
7
|
+
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic
|
|
8
|
+
*/
|
|
9
|
+
const shape1 = {
|
|
10
|
+
rectangle: (components, colors) => `<path fill-rule="evenodd" clip-rule="evenodd" d="M90 10H10v80h80V10ZM0 0v100h100V0H0Z" fill="${xml(`${colors.shape1}`)}"/>`,
|
|
11
|
+
rectangleFilled: (components, colors) => `<path d="M0 0h100v100H0V0Z" fill="${xml(`${colors.shape1}`)}"/>`,
|
|
12
|
+
ellipseFilled: (components, colors) => `<path d="M100 50A50 50 0 1 1 0 50a50 50 0 0 1 100 0Z" fill="${xml(`${colors.shape1}`)}"/>`,
|
|
13
|
+
ellipse: (components, colors) => `<path fill-rule="evenodd" clip-rule="evenodd" d="M50 90a40 40 0 1 0 0-80 40 40 0 0 0 0 80Zm0 10A50 50 0 1 0 50 0a50 50 0 0 0 0 100Z" fill="${xml(`${colors.shape1}`)}"/>`,
|
|
14
|
+
polygonFilled: (components, colors) => `<path d="m50 7 50 86.6H0L50 7Z" fill="${xml(`${colors.shape1}`)}"/>`,
|
|
15
|
+
polygon: (components, colors) => `<path fill-rule="evenodd" clip-rule="evenodd" d="M50 7 0 93.6h100L50 7Zm0 20L17.3 83.6h65.4L50 27Z" fill="${xml(`${colors.shape1}`)}"/>`,
|
|
16
|
+
line: (components, colors) => `<path fill="${xml(`${colors.shape1}`)}" d="M45-150h10v400H45z"/>`,
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
|
|
21
|
+
*
|
|
22
|
+
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
|
23
|
+
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic
|
|
24
|
+
*/
|
|
25
|
+
const shape2 = {
|
|
26
|
+
rectangle: (components, colors) => `<path fill-rule="evenodd" clip-rule="evenodd" d="M90 10H10v80h80V10ZM0 0v100h100V0H0Z" fill="${xml(`${colors.shape2}`)}"/>`,
|
|
27
|
+
rectangleFilled: (components, colors) => `<path d="M0 0h100v100H0V0Z" fill="${xml(`${colors.shape2}`)}"/>`,
|
|
28
|
+
ellipseFilled: (components, colors) => `<path d="M100 50A50 50 0 1 1 0 50a50 50 0 0 1 100 0Z" fill="${xml(`${colors.shape2}`)}"/>`,
|
|
29
|
+
ellipse: (components, colors) => `<path fill-rule="evenodd" clip-rule="evenodd" d="M50 90a40 40 0 1 0 0-80 40 40 0 0 0 0 80Zm0 10A50 50 0 1 0 50 0a50 50 0 0 0 0 100Z" fill="${xml(`${colors.shape2}`)}"/>`,
|
|
30
|
+
polygonFilled: (components, colors) => `<path d="m50 7 50 86.6H0L50 7Z" fill="${xml(`${colors.shape2}`)}"/>`,
|
|
31
|
+
polygon: (components, colors) => `<path fill-rule="evenodd" clip-rule="evenodd" d="M50 7 0 93.6h100L50 7Zm0 20L17.3 83.6h65.4L50 27Z" fill="${xml(`${colors.shape2}`)}"/>`,
|
|
32
|
+
line: (components, colors) => `<path fill="${xml(`${colors.shape2}`)}" d="M45-150h10v400H45z"/>`,
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
|
|
37
|
+
*
|
|
38
|
+
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
|
39
|
+
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic
|
|
40
|
+
*/
|
|
41
|
+
const shape3 = {
|
|
42
|
+
rectangle: (components, colors) => `<path fill-rule="evenodd" clip-rule="evenodd" d="M90 10H10v80h80V10ZM0 0v100h100V0H0Z" fill="${xml(`${colors.shape3}`)}"/>`,
|
|
43
|
+
rectangleFilled: (components, colors) => `<path d="M0 0h100v100H0V0Z" fill="${xml(`${colors.shape3}`)}"/>`,
|
|
44
|
+
ellipseFilled: (components, colors) => `<path d="M100 50A50 50 0 1 1 0 50a50 50 0 0 1 100 0Z" fill="${xml(`${colors.shape3}`)}"/>`,
|
|
45
|
+
ellipse: (components, colors) => `<path fill-rule="evenodd" clip-rule="evenodd" d="M50 90a40 40 0 1 0 0-80 40 40 0 0 0 0 80Zm0 10A50 50 0 1 0 50 0a50 50 0 0 0 0 100Z" fill="${xml(`${colors.shape3}`)}"/>`,
|
|
46
|
+
polygonFilled: (components, colors) => `<path d="m50 7 50 86.6H0L50 7Z" fill="${xml(`${colors.shape3}`)}"/>`,
|
|
47
|
+
polygon: (components, colors) => `<path fill-rule="evenodd" clip-rule="evenodd" d="M50 7 0 93.6h100L50 7Zm0 20L17.3 83.6h65.4L50 27Z" fill="${xml(`${colors.shape3}`)}"/>`,
|
|
48
|
+
line: (components, colors) => `<path fill="${xml(`${colors.shape3}`)}" d="M45-150h10v400H45z"/>`,
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
|
|
53
|
+
*
|
|
54
|
+
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
|
55
|
+
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic
|
|
56
|
+
*/
|
|
57
|
+
|
|
58
|
+
var components = /*#__PURE__*/Object.freeze({
|
|
59
|
+
__proto__: null,
|
|
60
|
+
shape1: shape1,
|
|
61
|
+
shape2: shape2,
|
|
62
|
+
shape3: shape3
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
|
|
67
|
+
*
|
|
68
|
+
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
|
69
|
+
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic
|
|
70
|
+
*/
|
|
71
|
+
function pickComponent({ prng, group, width, height, values = [], rotation, offsetX, offsetY, }) {
|
|
72
|
+
const componentCollection = components;
|
|
73
|
+
const key = prng.pick(values);
|
|
74
|
+
const pickedRotation = prng.integer(Math.min(...rotation), Math.max(...rotation));
|
|
75
|
+
const pickedOffsetX = prng.integer(Math.min(...offsetX), Math.max(...offsetX));
|
|
76
|
+
const pickedOffsetY = prng.integer(Math.min(...offsetY), Math.max(...offsetY));
|
|
77
|
+
if (key && componentCollection[group][key]) {
|
|
78
|
+
return {
|
|
79
|
+
name: key,
|
|
80
|
+
value(components, colors) {
|
|
81
|
+
var _a, _b, _c;
|
|
82
|
+
let result = componentCollection[group][key](components, colors);
|
|
83
|
+
if (this.rotation || this.offsetX || this.offsetY) {
|
|
84
|
+
result = `<g transform="translate(${(_a = this.offsetX) !== null && _a !== void 0 ? _a : 0}, ${(_b = this.offsetY) !== null && _b !== void 0 ? _b : 0}) rotate(${(_c = this.rotation) !== null && _c !== void 0 ? _c : 0} ${width / 2} ${height / 2})">${result}</g>`;
|
|
85
|
+
}
|
|
86
|
+
return result;
|
|
87
|
+
},
|
|
88
|
+
rotation: pickedRotation,
|
|
89
|
+
offsetX: pickedOffsetX,
|
|
90
|
+
offsetY: pickedOffsetY,
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
return undefined;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
|
|
100
|
+
*
|
|
101
|
+
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
|
102
|
+
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic
|
|
103
|
+
*/
|
|
104
|
+
function getComponents({ prng, options, }) {
|
|
105
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
106
|
+
const shape1Component = pickComponent({
|
|
107
|
+
prng,
|
|
108
|
+
group: 'shape1',
|
|
109
|
+
values: options.shape1,
|
|
110
|
+
width: 100,
|
|
111
|
+
height: 100,
|
|
112
|
+
rotation: ((_a = options.shape1Rotation) === null || _a === void 0 ? void 0 : _a.length) ? options.shape1Rotation : [0],
|
|
113
|
+
offsetX: ((_b = options.shape1OffsetX) === null || _b === void 0 ? void 0 : _b.length) ? options.shape1OffsetX : [0],
|
|
114
|
+
offsetY: ((_c = options.shape1OffsetY) === null || _c === void 0 ? void 0 : _c.length) ? options.shape1OffsetY : [0],
|
|
115
|
+
});
|
|
116
|
+
const shape2Component = pickComponent({
|
|
117
|
+
prng,
|
|
118
|
+
group: 'shape2',
|
|
119
|
+
values: options.shape2,
|
|
120
|
+
width: 100,
|
|
121
|
+
height: 100,
|
|
122
|
+
rotation: ((_d = options.shape2Rotation) === null || _d === void 0 ? void 0 : _d.length) ? options.shape2Rotation : [0],
|
|
123
|
+
offsetX: ((_e = options.shape2OffsetX) === null || _e === void 0 ? void 0 : _e.length) ? options.shape2OffsetX : [0],
|
|
124
|
+
offsetY: ((_f = options.shape2OffsetY) === null || _f === void 0 ? void 0 : _f.length) ? options.shape2OffsetY : [0],
|
|
125
|
+
});
|
|
126
|
+
const shape3Component = pickComponent({
|
|
127
|
+
prng,
|
|
128
|
+
group: 'shape3',
|
|
129
|
+
values: options.shape3,
|
|
130
|
+
width: 100,
|
|
131
|
+
height: 100,
|
|
132
|
+
rotation: ((_g = options.shape3Rotation) === null || _g === void 0 ? void 0 : _g.length) ? options.shape3Rotation : [0],
|
|
133
|
+
offsetX: ((_h = options.shape3OffsetX) === null || _h === void 0 ? void 0 : _h.length) ? options.shape3OffsetX : [0],
|
|
134
|
+
offsetY: ((_j = options.shape3OffsetY) === null || _j === void 0 ? void 0 : _j.length) ? options.shape3OffsetY : [0],
|
|
135
|
+
});
|
|
136
|
+
return {
|
|
137
|
+
shape1: shape1Component,
|
|
138
|
+
shape2: shape2Component,
|
|
139
|
+
shape3: shape3Component,
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
|
|
145
|
+
*
|
|
146
|
+
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
|
147
|
+
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic
|
|
148
|
+
*/
|
|
149
|
+
function convertColor(color) {
|
|
150
|
+
return 'transparent' === color ? color : `#${color}`;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
|
|
155
|
+
*
|
|
156
|
+
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
|
157
|
+
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic
|
|
158
|
+
*/
|
|
159
|
+
function getColors({ prng, options }) {
|
|
160
|
+
var _a, _b, _c;
|
|
161
|
+
return {
|
|
162
|
+
shape1: convertColor(prng.pick((_a = options.shape1Color) !== null && _a !== void 0 ? _a : [], 'transparent')),
|
|
163
|
+
shape2: convertColor(prng.pick((_b = options.shape2Color) !== null && _b !== void 0 ? _b : [], 'transparent')),
|
|
164
|
+
shape3: convertColor(prng.pick((_c = options.shape3Color) !== null && _c !== void 0 ? _c : [], 'transparent')),
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
|
|
170
|
+
*
|
|
171
|
+
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
|
172
|
+
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic
|
|
173
|
+
*/
|
|
174
|
+
function onPreCreate({ prng, options }) {
|
|
175
|
+
var _a, _b, _c, _d;
|
|
176
|
+
const usedColors = new Set();
|
|
177
|
+
function getAvailableColors(colors) {
|
|
178
|
+
const filteredColors = colors.filter((color) => !usedColors.has(color));
|
|
179
|
+
return filteredColors.length > 0 ? filteredColors : colors;
|
|
180
|
+
}
|
|
181
|
+
function getColor(colors) {
|
|
182
|
+
const availableColors = getAvailableColors(colors);
|
|
183
|
+
const color = prng.pick(availableColors, 'transparent');
|
|
184
|
+
usedColors.add(color);
|
|
185
|
+
return color;
|
|
186
|
+
}
|
|
187
|
+
options.shape1Color = [getColor((_a = options.shape1Color) !== null && _a !== void 0 ? _a : [])];
|
|
188
|
+
options.shape2Color = [getColor((_b = options.shape2Color) !== null && _b !== void 0 ? _b : [])];
|
|
189
|
+
options.shape3Color = [getColor((_c = options.shape3Color) !== null && _c !== void 0 ? _c : [])];
|
|
190
|
+
options.backgroundColor = getAvailableColors((_d = options.backgroundColor) !== null && _d !== void 0 ? _d : []);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Do not change this file manually! This file was generated with the "Dicebear Exporter"-Plugin for Figma.
|
|
195
|
+
*
|
|
196
|
+
* Plugin: https://www.figma.com/community/plugin/1005765655729342787
|
|
197
|
+
* File: https://www.figma.com/file/bX8ZT8jK2fo5Uy8G6j2Qic
|
|
198
|
+
*/
|
|
199
|
+
const meta = {
|
|
200
|
+
title: 'Shapes',
|
|
201
|
+
creator: 'DiceBear',
|
|
202
|
+
source: 'https://www.dicebear.com',
|
|
203
|
+
homepage: 'https://www.dicebear.com',
|
|
204
|
+
license: {
|
|
205
|
+
name: 'CC0 1.0',
|
|
206
|
+
url: 'https://creativecommons.org/publicdomain/zero/1.0/',
|
|
207
|
+
},
|
|
208
|
+
};
|
|
209
|
+
const create = ({ prng, options }) => {
|
|
210
|
+
var _a, _b, _c, _d, _e, _f;
|
|
211
|
+
onPreCreate({ prng, options });
|
|
212
|
+
const components = getComponents({ prng, options });
|
|
213
|
+
const colors = getColors({ prng, options });
|
|
214
|
+
return {
|
|
215
|
+
attributes: {
|
|
216
|
+
viewBox: '0 0 100 100',
|
|
217
|
+
fill: 'none',
|
|
218
|
+
'shape-rendering': 'auto',
|
|
219
|
+
},
|
|
220
|
+
body: `<g transform="matrix(1.2 0 0 1.2 -10 -10)">${(_b = (_a = components.shape1) === null || _a === void 0 ? void 0 : _a.value(components, colors)) !== null && _b !== void 0 ? _b : ''}</g><g transform="matrix(.8 0 0 .8 10 10)">${(_d = (_c = components.shape2) === null || _c === void 0 ? void 0 : _c.value(components, colors)) !== null && _d !== void 0 ? _d : ''}</g><g transform="matrix(.4 0 0 .4 30 30)">${(_f = (_e = components.shape3) === null || _e === void 0 ? void 0 : _e.value(components, colors)) !== null && _f !== void 0 ? _f : ''}</g>`,
|
|
221
|
+
extra: () => ({
|
|
222
|
+
...Object.entries(components).reduce((acc, [key, value]) => {
|
|
223
|
+
acc[key] = value === null || value === void 0 ? void 0 : value.name;
|
|
224
|
+
return acc;
|
|
225
|
+
}, {}),
|
|
226
|
+
...Object.entries(colors).reduce((acc, [key, value]) => {
|
|
227
|
+
acc[`${key}Color`] = value;
|
|
228
|
+
return acc;
|
|
229
|
+
}, {}),
|
|
230
|
+
}),
|
|
231
|
+
};
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
var module$1 = /*#__PURE__*/Object.freeze({
|
|
235
|
+
__proto__: null,
|
|
236
|
+
create: create,
|
|
237
|
+
meta: meta,
|
|
238
|
+
schema: schema
|
|
239
|
+
});
|
|
240
|
+
|
|
241
|
+
export { meta as a, module$1 as m };
|