@5even7/dlc-ui 0.2.16 → 0.2.17
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 +4 -1
- package/README.md +7 -4
- package/dist/emo.cjs +1199 -4457
- package/dist/emo.mjs +47 -30
- package/dist/index.cjs +1199 -4459
- package/dist/index.mjs +47 -31
- package/dist/index.umd.js +53471 -33624
- package/dist/index.umd.min.js +1 -1
- package/dist/vue2.cjs +1207 -4469
- package/dist/vue2.mjs +49 -37
- package/dist/vue3.cjs +1207 -4469
- package/dist/vue3.mjs +49 -37
- package/package.json +1 -1
- package/types/emo.d.ts +3 -0
- package/types/index.d.ts +31 -7
- package/types/vue3.d.ts +1 -1
package/package.json
CHANGED
package/types/emo.d.ts
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -2,6 +2,31 @@ export type Quality = 'auto' | 'low' | 'medium' | 'high';
|
|
|
2
2
|
export type PowerPreference = 'default' | 'high-performance' | 'low-power';
|
|
3
3
|
export type ColorTuple = [string, string, string, string];
|
|
4
4
|
|
|
5
|
+
export type MiaoPartColorKey =
|
|
6
|
+
| 'leftEye'
|
|
7
|
+
| 'rightEye'
|
|
8
|
+
| 'mouth'
|
|
9
|
+
| 'mouthFill'
|
|
10
|
+
| 'sleepBreath'
|
|
11
|
+
| 'shuttlecock'
|
|
12
|
+
| 'meditationFigure'
|
|
13
|
+
| 'meditationBubble'
|
|
14
|
+
| 'musicNotes'
|
|
15
|
+
| 'leftEyeOverlay'
|
|
16
|
+
| 'questionMark'
|
|
17
|
+
| 'leftBlush'
|
|
18
|
+
| 'rightBlush'
|
|
19
|
+
| 'sighBreath'
|
|
20
|
+
| 'particles';
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Per-part color overrides for a Miao emoji. Values are any CSS color
|
|
24
|
+
* (#fff / #rrggbb / named / rgb() / rgba(), alpha ignored); null or missing
|
|
25
|
+
* keys keep the asset's original color, and keys the current animation does
|
|
26
|
+
* not support are ignored.
|
|
27
|
+
*/
|
|
28
|
+
export type MiaoPartColors = Partial<Record<MiaoPartColorKey, string | null>>;
|
|
29
|
+
|
|
5
30
|
export interface CapsulePreset {
|
|
6
31
|
id: string;
|
|
7
32
|
code: string;
|
|
@@ -40,7 +65,7 @@ export interface EmoTypeDefinition {
|
|
|
40
65
|
type: string;
|
|
41
66
|
label: string;
|
|
42
67
|
names: string[];
|
|
43
|
-
|
|
68
|
+
partColors: string[];
|
|
44
69
|
}
|
|
45
70
|
|
|
46
71
|
export interface Copy {
|
|
@@ -134,8 +159,7 @@ export interface EmoOptions {
|
|
|
134
159
|
name?: string;
|
|
135
160
|
width?: number | string;
|
|
136
161
|
height?: number | string;
|
|
137
|
-
|
|
138
|
-
accentColor?: string | null;
|
|
162
|
+
partColors?: MiaoPartColors;
|
|
139
163
|
speed?: number;
|
|
140
164
|
loop?: boolean;
|
|
141
165
|
autoplay?: boolean;
|
|
@@ -279,7 +303,7 @@ export interface EmoController extends Emitter {
|
|
|
279
303
|
setSegment(value: EmoOptions['segment']): this;
|
|
280
304
|
setName(value: string): this;
|
|
281
305
|
setType(value: string): this;
|
|
282
|
-
|
|
306
|
+
setPartColors(value: MiaoPartColors): this;
|
|
283
307
|
setOpacity(value: number): this;
|
|
284
308
|
setBackground(value: string): this;
|
|
285
309
|
setSize(width?: number | string, height?: number | string): this;
|
|
@@ -298,8 +322,7 @@ export interface EmoController extends Emitter {
|
|
|
298
322
|
readonly renderer: 'svg' | 'canvas';
|
|
299
323
|
readonly paused: boolean;
|
|
300
324
|
readonly segment: [number, number] | null;
|
|
301
|
-
readonly
|
|
302
|
-
readonly accentColor: string | null;
|
|
325
|
+
readonly partColors: MiaoPartColors;
|
|
303
326
|
readonly background: string;
|
|
304
327
|
}
|
|
305
328
|
|
|
@@ -336,11 +359,12 @@ export declare const EMO_TYPES: EmoTypeDefinition[];
|
|
|
336
359
|
export declare const EMO_PRESETS: EmoPreset[];
|
|
337
360
|
export declare const EMO_CATEGORIES: Record<string, string>;
|
|
338
361
|
export declare function getEmoPreset(type?: string, name?: string): EmoPreset;
|
|
362
|
+
export declare function getEmoAnimation(type?: string, name?: string): any;
|
|
339
363
|
|
|
340
364
|
export declare const DEFAULTS: {
|
|
341
365
|
capsule: Required<Pick<CapsuleOptions, 'width' | 'height' | 'quality' | 'respectReducedMotion' | 'mouseColor' | 'renderer' | 'textRatio' | 'renderScale' | 'powerPreference' | 'fps' | 'paused' | 'static'>>;
|
|
342
366
|
progress: Required<Pick<ProgressOptions, 'width' | 'height' | 'min' | 'max' | 'step' | 'draggable' | 'keyboard' | 'disabled' | 'readonly' | 'direction' | 'precision' | 'valueSuffix' | 'edgeStyle' | 'quality' | 'respectReducedMotion' | 'renderer' | 'textRatio' | 'showValue' | 'renderScale' | 'powerPreference' | 'fps' | 'paused' | 'static'>>;
|
|
343
|
-
emo: Required<Pick<EmoOptions, 'type' | 'name' | 'width' | 'height' | '
|
|
367
|
+
emo: Required<Pick<EmoOptions, 'type' | 'name' | 'width' | 'height' | 'partColors' | 'speed' | 'loop' | 'autoplay' | 'direction' | 'opacity' | 'fit' | 'renderer' | 'paused' | 'background' | 'respectReducedMotion'>> & Pick<EmoOptions, 'segment'>;
|
|
344
368
|
};
|
|
345
369
|
|
|
346
370
|
export declare const COPY: Copy;
|
package/types/vue3.d.ts
CHANGED
|
@@ -110,7 +110,7 @@ export interface EmoComponent {
|
|
|
110
110
|
setSegment(value: EmoOptions['segment']): any;
|
|
111
111
|
setName(value: string): any;
|
|
112
112
|
setType(value: string): any;
|
|
113
|
-
|
|
113
|
+
setPartColors(value: import('./index').MiaoPartColors): any;
|
|
114
114
|
setOpacity(value: number): any;
|
|
115
115
|
setBackground(value: string): any;
|
|
116
116
|
setSize(width?: number | string, height?: number | string): any;
|