@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
package/styles/progress.css
CHANGED
|
@@ -1,96 +1,96 @@
|
|
|
1
|
-
/* ---------- Progress capsule ---------- */
|
|
2
|
-
|
|
3
|
-
.hj-progress-root {
|
|
4
|
-
--hj-bg: #202126;
|
|
5
|
-
border: 1px solid rgba(0, 0, 0, 0.34);
|
|
6
|
-
color: #ffffff;
|
|
7
|
-
box-shadow: var(--hj-shadow);
|
|
8
|
-
cursor: ew-resize;
|
|
9
|
-
touch-action: none;
|
|
10
|
-
user-select: none;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.hj-progress-root[data-draggable="false"] {
|
|
14
|
-
cursor: default;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.hj-progress-root.is-disabled {
|
|
18
|
-
cursor: default;
|
|
19
|
-
opacity: 0.55;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.hj-progress-root.is-disabled:focus-visible {
|
|
23
|
-
outline: none;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.hj-progress-root.is-readonly {
|
|
27
|
-
cursor: default;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.hj-progress-root:focus-visible {
|
|
31
|
-
outline: 2px solid rgba(255, 255, 255, 0.8);
|
|
32
|
-
outline-offset: 4px;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.hj-progress-canvas {
|
|
36
|
-
transition: filter 180ms ease, opacity 160ms ease;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.hj-progress-overlay {
|
|
40
|
-
z-index: 2;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.hj-progress-root[data-direction="rtl"] > .hj-progress-canvas {
|
|
44
|
-
transform: scaleX(-1);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.hj-progress-root.has-webgl-progress > .hj-progress-canvas:not(.hj-progress-overlay) {
|
|
48
|
-
opacity: 0;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.hj-progress-root.is-dragging .hj-progress-canvas {
|
|
52
|
-
filter: saturate(1.15) brightness(1.08);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/* Text slot container: geometry only (same convention as capsule). */
|
|
56
|
-
.hj-progress-text {
|
|
57
|
-
position: absolute;
|
|
58
|
-
top: 50%;
|
|
59
|
-
left: var(--hj-text-left, var(--hj-copy-left, 30px));
|
|
60
|
-
z-index: 4;
|
|
61
|
-
width: var(--hj-text-width, var(--hj-copy-max-width, 54%));
|
|
62
|
-
background: var(--hj-text-bg, transparent);
|
|
63
|
-
padding: var(--hj-text-pad, 0);
|
|
64
|
-
border-radius: var(--hj-text-radius, 0);
|
|
65
|
-
overflow: hidden;
|
|
66
|
-
transform: translateY(-50%);
|
|
67
|
-
pointer-events: none;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
/* Color slot container: region right of the text area. */
|
|
71
|
-
.hj-progress-visual {
|
|
72
|
-
position: absolute;
|
|
73
|
-
top: 0;
|
|
74
|
-
bottom: 0;
|
|
75
|
-
left: var(--hj-text-width, var(--hj-copy-max-width, 54%));
|
|
76
|
-
right: 0;
|
|
77
|
-
z-index: 3;
|
|
78
|
-
pointer-events: none;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.hj-progress-value {
|
|
82
|
-
position: absolute;
|
|
83
|
-
top: 50%;
|
|
84
|
-
right: var(--hj-value-right);
|
|
85
|
-
z-index: 5;
|
|
86
|
-
min-width: 24%;
|
|
87
|
-
color: #ffffff;
|
|
88
|
-
font-size: 44px;
|
|
89
|
-
font-weight: 480;
|
|
90
|
-
line-height: 1;
|
|
91
|
-
text-align: right;
|
|
92
|
-
letter-spacing: -0.045em;
|
|
93
|
-
text-shadow: 0 2px 12px rgba(0, 0, 0, 0.24);
|
|
94
|
-
transform: translateY(-50%);
|
|
95
|
-
pointer-events: none;
|
|
96
|
-
}
|
|
1
|
+
/* ---------- Progress capsule ---------- */
|
|
2
|
+
|
|
3
|
+
.hj-progress-root {
|
|
4
|
+
--hj-bg: #202126;
|
|
5
|
+
border: 1px solid rgba(0, 0, 0, 0.34);
|
|
6
|
+
color: #ffffff;
|
|
7
|
+
box-shadow: var(--hj-shadow);
|
|
8
|
+
cursor: ew-resize;
|
|
9
|
+
touch-action: none;
|
|
10
|
+
user-select: none;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.hj-progress-root[data-draggable="false"] {
|
|
14
|
+
cursor: default;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.hj-progress-root.is-disabled {
|
|
18
|
+
cursor: default;
|
|
19
|
+
opacity: 0.55;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.hj-progress-root.is-disabled:focus-visible {
|
|
23
|
+
outline: none;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.hj-progress-root.is-readonly {
|
|
27
|
+
cursor: default;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.hj-progress-root:focus-visible {
|
|
31
|
+
outline: 2px solid rgba(255, 255, 255, 0.8);
|
|
32
|
+
outline-offset: 4px;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.hj-progress-canvas {
|
|
36
|
+
transition: filter 180ms ease, opacity 160ms ease;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.hj-progress-overlay {
|
|
40
|
+
z-index: 2;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.hj-progress-root[data-direction="rtl"] > .hj-progress-canvas {
|
|
44
|
+
transform: scaleX(-1);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.hj-progress-root.has-webgl-progress > .hj-progress-canvas:not(.hj-progress-overlay) {
|
|
48
|
+
opacity: 0;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.hj-progress-root.is-dragging .hj-progress-canvas {
|
|
52
|
+
filter: saturate(1.15) brightness(1.08);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* Text slot container: geometry only (same convention as capsule). */
|
|
56
|
+
.hj-progress-text {
|
|
57
|
+
position: absolute;
|
|
58
|
+
top: 50%;
|
|
59
|
+
left: var(--hj-text-left, var(--hj-copy-left, 30px));
|
|
60
|
+
z-index: 4;
|
|
61
|
+
width: var(--hj-text-width, var(--hj-copy-max-width, 54%));
|
|
62
|
+
background: var(--hj-text-bg, transparent);
|
|
63
|
+
padding: var(--hj-text-pad, 0);
|
|
64
|
+
border-radius: var(--hj-text-radius, 0);
|
|
65
|
+
overflow: hidden;
|
|
66
|
+
transform: translateY(-50%);
|
|
67
|
+
pointer-events: none;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* Color slot container: region right of the text area. */
|
|
71
|
+
.hj-progress-visual {
|
|
72
|
+
position: absolute;
|
|
73
|
+
top: 0;
|
|
74
|
+
bottom: 0;
|
|
75
|
+
left: var(--hj-text-width, var(--hj-copy-max-width, 54%));
|
|
76
|
+
right: 0;
|
|
77
|
+
z-index: 3;
|
|
78
|
+
pointer-events: none;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.hj-progress-value {
|
|
82
|
+
position: absolute;
|
|
83
|
+
top: 50%;
|
|
84
|
+
right: var(--hj-value-right);
|
|
85
|
+
z-index: 5;
|
|
86
|
+
min-width: 24%;
|
|
87
|
+
color: #ffffff;
|
|
88
|
+
font-size: 44px;
|
|
89
|
+
font-weight: 480;
|
|
90
|
+
line-height: 1;
|
|
91
|
+
text-align: right;
|
|
92
|
+
letter-spacing: -0.045em;
|
|
93
|
+
text-shadow: 0 2px 12px rgba(0, 0, 0, 0.24);
|
|
94
|
+
transform: translateY(-50%);
|
|
95
|
+
pointer-events: none;
|
|
96
|
+
}
|
package/styles/theme.css
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AvatarStyleModule } from './avatar-creator.js';
|
|
2
|
+
|
|
3
|
+
export declare const identicon: AvatarStyleModule;
|
|
4
|
+
export declare const lorelei: AvatarStyleModule;
|
|
5
|
+
export declare const loreleiNeutral: AvatarStyleModule;
|
|
6
|
+
export declare const notionists: AvatarStyleModule;
|
|
7
|
+
export declare const notionistsNeutral: AvatarStyleModule;
|
|
8
|
+
export declare const openPeeps: AvatarStyleModule;
|
|
9
|
+
export declare const rings: AvatarStyleModule;
|
|
10
|
+
export declare const shapes: AvatarStyleModule;
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* dlc-avatar-creator types.
|
|
3
|
+
*
|
|
4
|
+
* Two option layers:
|
|
5
|
+
* common — provider / style / seed / size / background
|
|
6
|
+
* native — providerOptions, passed through to the upstream generator,
|
|
7
|
+
* validated against the upstream schema (names, types, defaults
|
|
8
|
+
* and array semantics unchanged). Use getStyleDefinitions()
|
|
9
|
+
* to inspect each style's schema and generated controls.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
export type AvatarProviderId = 'dicebear' | 'humation';
|
|
13
|
+
export type AvatarProviderStyleId = string;
|
|
14
|
+
|
|
15
|
+
export interface AvatarControl {
|
|
16
|
+
id: string;
|
|
17
|
+
label: string;
|
|
18
|
+
kind: 'select' | 'color' | 'range' | 'switch' | 'tags';
|
|
19
|
+
options?: string[];
|
|
20
|
+
min?: number;
|
|
21
|
+
max?: number;
|
|
22
|
+
step?: number;
|
|
23
|
+
default?: unknown;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface AvatarStyleDefinition {
|
|
27
|
+
id: string;
|
|
28
|
+
label: string;
|
|
29
|
+
provider: AvatarProviderId;
|
|
30
|
+
title: string;
|
|
31
|
+
designer: string;
|
|
32
|
+
homepage: string;
|
|
33
|
+
source: string;
|
|
34
|
+
license: string;
|
|
35
|
+
licenseUrl: string;
|
|
36
|
+
schema: Record<string, unknown>;
|
|
37
|
+
controls: AvatarControl[];
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* 画风模块(Element / DiceBear 式):从
|
|
42
|
+
* `@5even7/dlc-ui/avatar-creator/styles` 导入,传给 `createAvatarSvg()`。
|
|
43
|
+
*/
|
|
44
|
+
export interface AvatarStyleModule extends AvatarStyleDefinition {
|
|
45
|
+
render(options: {
|
|
46
|
+
seed: string;
|
|
47
|
+
size?: number;
|
|
48
|
+
background?: string;
|
|
49
|
+
options?: Record<string, unknown>;
|
|
50
|
+
strict?: boolean;
|
|
51
|
+
}): AvatarRenderResult;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface AvatarProviderDefinition {
|
|
55
|
+
id: AvatarProviderId;
|
|
56
|
+
label: string;
|
|
57
|
+
styles: AvatarStyleDefinition[];
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface AvatarOptions {
|
|
61
|
+
provider?: AvatarProviderId | string;
|
|
62
|
+
style?: string | AvatarStyleModule;
|
|
63
|
+
seed?: string;
|
|
64
|
+
size?: number;
|
|
65
|
+
background?: string;
|
|
66
|
+
/** Native upstream parameters, validated against the upstream schema. */
|
|
67
|
+
providerOptions?: Record<string, unknown>;
|
|
68
|
+
/** Throw on unrecognized/invalid providerOptions instead of warning. */
|
|
69
|
+
strict?: boolean;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export interface AvatarRenderResult {
|
|
73
|
+
svg: string;
|
|
74
|
+
width: number;
|
|
75
|
+
height: number;
|
|
76
|
+
warnings: string[];
|
|
77
|
+
metadata: {
|
|
78
|
+
provider: string;
|
|
79
|
+
style: string;
|
|
80
|
+
seed: string;
|
|
81
|
+
size?: number;
|
|
82
|
+
background?: string;
|
|
83
|
+
license: string;
|
|
84
|
+
licenseUrl: string;
|
|
85
|
+
source: string;
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export interface AvatarState {
|
|
90
|
+
provider?: string;
|
|
91
|
+
style?: string | AvatarStyleModule;
|
|
92
|
+
seed?: string;
|
|
93
|
+
size?: number;
|
|
94
|
+
background?: string;
|
|
95
|
+
providerOptions: Record<string, unknown>;
|
|
96
|
+
strict: boolean;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export interface AvatarController {
|
|
100
|
+
element: HTMLElement;
|
|
101
|
+
readonly state: AvatarState;
|
|
102
|
+
getSvg(): Promise<string>;
|
|
103
|
+
getResult(): Promise<AvatarRenderResult>;
|
|
104
|
+
toDataUri(): Promise<string>;
|
|
105
|
+
setOptions(options: AvatarOptions): Promise<AvatarRenderResult>;
|
|
106
|
+
setProvider(provider: string): Promise<AvatarRenderResult>;
|
|
107
|
+
setStyle(style: string): Promise<AvatarRenderResult>;
|
|
108
|
+
setSeed(seed: string): Promise<AvatarRenderResult>;
|
|
109
|
+
setSize(size: number): Promise<AvatarRenderResult>;
|
|
110
|
+
setBackground(background: string): Promise<AvatarRenderResult>;
|
|
111
|
+
setProviderOptions(options: Record<string, unknown>): Promise<AvatarRenderResult>;
|
|
112
|
+
randomize(): Promise<AvatarRenderResult>;
|
|
113
|
+
on(event: string, handler: (...args: any[]) => void): () => void;
|
|
114
|
+
off(event: string, handler: (...args: any[]) => void): boolean;
|
|
115
|
+
destroy(): void;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* 同步渲染:画风作为模块导入(见 AvatarStyleModule)。
|
|
120
|
+
* `import { lorelei } from '@5even7/dlc-ui/avatar-creator/styles'`
|
|
121
|
+
* `createAvatarSvg(lorelei, { seed: 'x', size: 160 })`
|
|
122
|
+
*/
|
|
123
|
+
export declare function createAvatarSvg(style: AvatarStyleModule, options?: AvatarOptions): AvatarRenderResult;
|
|
124
|
+
export declare function createAvatarCreator(container: HTMLElement, options?: AvatarOptions): AvatarController;
|
|
125
|
+
export declare function getStyleDefinitions(): AvatarStyleDefinition[];
|
|
126
|
+
export declare function getProviders(): AvatarProviderDefinition[];
|
|
127
|
+
export declare function getProvider(providerId: string): AvatarProviderDefinition | undefined;
|
|
128
|
+
export declare function getStyleDefinition(providerId: string, styleId: string): AvatarStyleDefinition | undefined;
|
|
129
|
+
|
|
130
|
+
export declare function hashSeed(seed: string): number;
|
|
131
|
+
export declare function fnv1a(input: string): number;
|
|
132
|
+
export declare function createPrng(seed?: string): any;
|
|
133
|
+
export declare function escapeXml(content: string): string;
|
|
134
|
+
export declare function applySize(svg: string, size: number | string): string;
|
|
135
|
+
export declare function svgToDataUri(svg: string): string;
|
|
136
|
+
export declare function sanitizeSvg(svg: string): string;
|
|
137
|
+
export declare function cleanText(value: unknown, maxLength?: number): string;
|
|
138
|
+
export declare function validateProviderOptions(
|
|
139
|
+
schema: Record<string, unknown>,
|
|
140
|
+
input: Record<string, unknown>,
|
|
141
|
+
options?: { strict?: boolean }
|
|
142
|
+
): { normalized: Record<string, unknown>; warnings: string[] };
|
|
143
|
+
export declare function buildControlsFromSchema(schema: Record<string, unknown>): AvatarControl[];
|
package/types/capsule.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export {
|
|
2
|
-
CapsuleOptions,
|
|
3
|
-
CapsuleController,
|
|
4
|
-
CapsulePreset,
|
|
5
|
-
Quality,
|
|
6
|
-
PowerPreference,
|
|
7
|
-
createCapsule,
|
|
8
|
-
parseSize,
|
|
9
|
-
dprCapFor,
|
|
10
|
-
effectiveDprCap,
|
|
11
|
-
QUALITY_TIERS,
|
|
12
|
-
hexToRgb01,
|
|
13
|
-
hexToRgba,
|
|
14
|
-
validateColors
|
|
15
|
-
} from './index.js';
|
|
1
|
+
export {
|
|
2
|
+
CapsuleOptions,
|
|
3
|
+
CapsuleController,
|
|
4
|
+
CapsulePreset,
|
|
5
|
+
Quality,
|
|
6
|
+
PowerPreference,
|
|
7
|
+
createCapsule,
|
|
8
|
+
parseSize,
|
|
9
|
+
dprCapFor,
|
|
10
|
+
effectiveDprCap,
|
|
11
|
+
QUALITY_TIERS,
|
|
12
|
+
hexToRgb01,
|
|
13
|
+
hexToRgba,
|
|
14
|
+
validateColors
|
|
15
|
+
} from './index.js';
|
package/types/color.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export {
|
|
2
|
-
ColorBackgroundOptions,
|
|
3
|
-
ColorBackgroundController,
|
|
4
|
-
CapsulePreset,
|
|
5
|
-
Quality,
|
|
6
|
-
PowerPreference,
|
|
7
|
-
createColorBackground,
|
|
8
|
-
parseSize,
|
|
9
|
-
dprCapFor,
|
|
10
|
-
effectiveDprCap,
|
|
11
|
-
QUALITY_TIERS,
|
|
12
|
-
hexToRgb01,
|
|
13
|
-
hexToRgba,
|
|
14
|
-
validateColors
|
|
15
|
-
} from './index.js';
|
|
1
|
+
export {
|
|
2
|
+
ColorBackgroundOptions,
|
|
3
|
+
ColorBackgroundController,
|
|
4
|
+
CapsulePreset,
|
|
5
|
+
Quality,
|
|
6
|
+
PowerPreference,
|
|
7
|
+
createColorBackground,
|
|
8
|
+
parseSize,
|
|
9
|
+
dprCapFor,
|
|
10
|
+
effectiveDprCap,
|
|
11
|
+
QUALITY_TIERS,
|
|
12
|
+
hexToRgb01,
|
|
13
|
+
hexToRgba,
|
|
14
|
+
validateColors
|
|
15
|
+
} from './index.js';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare module '@5even7/dlc-ui/emo/miao/*' {
|
|
2
|
+
/**
|
|
3
|
+
* 单个 miao 动画的 Lottie 数据(同步导入,tree-shaking 只保留用到的)。
|
|
4
|
+
* 用法:`import smile from '@5even7/dlc-ui/emo/miao/smile'`
|
|
5
|
+
* `createEmo(el, { animation: smile })`
|
|
6
|
+
*/
|
|
7
|
+
const animationData: Record<string, any>;
|
|
8
|
+
export default animationData;
|
|
9
|
+
}
|
package/types/emo.d.ts
CHANGED
|
@@ -1,37 +1,38 @@
|
|
|
1
|
-
export {
|
|
2
|
-
EmoOptions,
|
|
3
|
-
MiaoEmoOptions,
|
|
4
|
-
GrokEmoOptions,
|
|
5
|
-
EmoCommonOptions,
|
|
6
|
-
EmoPreset,
|
|
7
|
-
EmoTypeDefinition,
|
|
8
|
-
EmoController,
|
|
9
|
-
EmoType,
|
|
10
|
-
EmoEngine,
|
|
11
|
-
EmoPartColors,
|
|
12
|
-
MiaoPartColors,
|
|
13
|
-
MiaoPartColorKey,
|
|
14
|
-
MiaoName,
|
|
15
|
-
GrokPartColors,
|
|
16
|
-
GrokPartColorKey,
|
|
17
|
-
GrokShape,
|
|
18
|
-
GrokName,
|
|
19
|
-
GrokStateCategory,
|
|
20
|
-
GrokStateMeta,
|
|
21
|
-
GrokCategoryDef,
|
|
22
|
-
EmoPreviewCardOptions,
|
|
23
|
-
EmoPreviewCardController,
|
|
24
|
-
EMO_TYPES,
|
|
25
|
-
EMO_PRESETS,
|
|
26
|
-
EMO_CATEGORIES,
|
|
27
|
-
GROK_CATEGORIES,
|
|
28
|
-
GROK_NAMES,
|
|
29
|
-
GROK_STATE_META,
|
|
30
|
-
getGrokNamesFor,
|
|
31
|
-
getGrokStateMeta,
|
|
32
|
-
getEmoType,
|
|
33
|
-
getEmoPreset,
|
|
34
|
-
getEmoAnimation,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
1
|
+
export {
|
|
2
|
+
EmoOptions,
|
|
3
|
+
MiaoEmoOptions,
|
|
4
|
+
GrokEmoOptions,
|
|
5
|
+
EmoCommonOptions,
|
|
6
|
+
EmoPreset,
|
|
7
|
+
EmoTypeDefinition,
|
|
8
|
+
EmoController,
|
|
9
|
+
EmoType,
|
|
10
|
+
EmoEngine,
|
|
11
|
+
EmoPartColors,
|
|
12
|
+
MiaoPartColors,
|
|
13
|
+
MiaoPartColorKey,
|
|
14
|
+
MiaoName,
|
|
15
|
+
GrokPartColors,
|
|
16
|
+
GrokPartColorKey,
|
|
17
|
+
GrokShape,
|
|
18
|
+
GrokName,
|
|
19
|
+
GrokStateCategory,
|
|
20
|
+
GrokStateMeta,
|
|
21
|
+
GrokCategoryDef,
|
|
22
|
+
EmoPreviewCardOptions,
|
|
23
|
+
EmoPreviewCardController,
|
|
24
|
+
EMO_TYPES,
|
|
25
|
+
EMO_PRESETS,
|
|
26
|
+
EMO_CATEGORIES,
|
|
27
|
+
GROK_CATEGORIES,
|
|
28
|
+
GROK_NAMES,
|
|
29
|
+
GROK_STATE_META,
|
|
30
|
+
getGrokNamesFor,
|
|
31
|
+
getGrokStateMeta,
|
|
32
|
+
getEmoType,
|
|
33
|
+
getEmoPreset,
|
|
34
|
+
getEmoAnimation,
|
|
35
|
+
getEmoAnimationMeta,
|
|
36
|
+
createEmo,
|
|
37
|
+
createEmoPreviewCard
|
|
38
|
+
} from './index.js';
|