@5even7/dlc-ui 0.2.11 → 0.2.13
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 +48 -42
- package/LICENSE +21 -21
- package/README.md +258 -255
- package/dist/capsule.cjs +307 -71
- package/dist/capsule.mjs +828 -604
- package/dist/color.cjs +338 -82
- package/dist/color.mjs +879 -631
- package/dist/index.cjs +997 -253
- package/dist/index.mjs +2704 -1976
- package/dist/index.umd.js +997 -253
- package/dist/index.umd.min.js +1 -1
- package/dist/progress.cjs +632 -172
- package/dist/progress.mjs +1827 -1379
- package/dist/vue2.cjs +1141 -266
- package/dist/vue2.mjs +2893 -2056
- package/dist/vue3.cjs +1141 -266
- package/dist/vue3.mjs +2893 -2056
- package/package.json +118 -118
- package/styles/base.css +32 -32
- package/styles/color.css +18 -18
- package/styles/progress.css +53 -50
- package/types/capsule.d.ts +15 -13
- package/types/color.d.ts +15 -13
- package/types/index.d.ts +204 -116
- package/types/progress.d.ts +16 -14
- package/types/vue3.d.ts +38 -22
package/types/index.d.ts
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
export type Quality = 'auto' | 'low' | 'medium' | 'high';
|
|
2
|
-
export type
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
export type Quality = 'auto' | 'low' | 'medium' | 'high';
|
|
2
|
+
export type PowerPreference = 'default' | 'high-performance' | 'low-power';
|
|
3
|
+
export type ColorTuple = [string, string, string, string];
|
|
4
|
+
|
|
5
|
+
export interface CapsulePreset {
|
|
6
|
+
id: string;
|
|
7
|
+
code: string;
|
|
8
|
+
name: string;
|
|
9
|
+
group: 'warm' | 'cold';
|
|
10
|
+
theme?: 'light' | 'dark';
|
|
11
|
+
subtitle?: string;
|
|
12
|
+
seed: number;
|
|
13
|
+
speed: number;
|
|
14
|
+
colors: ColorTuple;
|
|
15
|
+
}
|
|
16
|
+
|
|
16
17
|
export interface ProgressPreset {
|
|
17
18
|
id: string;
|
|
18
19
|
code: string;
|
|
@@ -23,7 +24,7 @@ export interface ProgressPreset {
|
|
|
23
24
|
edgeStyle: 'flow' | 'tide';
|
|
24
25
|
colors: ColorTuple;
|
|
25
26
|
}
|
|
26
|
-
|
|
27
|
+
|
|
27
28
|
export interface Copy {
|
|
28
29
|
brandName: string;
|
|
29
30
|
valueSuffix: string;
|
|
@@ -34,7 +35,7 @@ export interface Copy {
|
|
|
34
35
|
export interface CapsuleOptions {
|
|
35
36
|
preset?: string;
|
|
36
37
|
width?: number | string;
|
|
37
|
-
height?: number | string;
|
|
38
|
+
height?: number | string;
|
|
38
39
|
colors?: string[];
|
|
39
40
|
seed?: number;
|
|
40
41
|
speed?: number;
|
|
@@ -45,22 +46,33 @@ export interface CapsuleOptions {
|
|
|
45
46
|
mouseColor?: boolean;
|
|
46
47
|
renderer?: 'auto' | 'webgl2' | 'canvas2d';
|
|
47
48
|
quality?: Quality;
|
|
49
|
+
renderScale?: number;
|
|
50
|
+
powerPreference?: PowerPreference;
|
|
51
|
+
fps?: number;
|
|
52
|
+
paused?: boolean;
|
|
53
|
+
static?: boolean;
|
|
48
54
|
respectReducedMotion?: boolean;
|
|
49
55
|
cssVars?: Record<string, string>;
|
|
50
56
|
[key: string]: unknown;
|
|
51
57
|
}
|
|
52
|
-
|
|
58
|
+
|
|
53
59
|
export interface ProgressOptions {
|
|
54
60
|
preset?: string;
|
|
55
|
-
width?: number | string;
|
|
56
|
-
height?: number | string;
|
|
57
|
-
value?: number;
|
|
58
|
-
|
|
59
|
-
|
|
61
|
+
width?: number | string;
|
|
62
|
+
height?: number | string;
|
|
63
|
+
value?: number;
|
|
64
|
+
modelValue?: number;
|
|
65
|
+
min?: number;
|
|
66
|
+
max?: number;
|
|
67
|
+
step?: number | 'any';
|
|
60
68
|
draggable?: boolean;
|
|
69
|
+
keyboard?: boolean;
|
|
61
70
|
disabled?: boolean;
|
|
62
71
|
readonly?: boolean;
|
|
63
72
|
valueSuffix?: string;
|
|
73
|
+
precision?: number;
|
|
74
|
+
formatValue?: (value: number, context: { min: number; max: number; suffix: string }) => string;
|
|
75
|
+
direction?: 'ltr' | 'rtl';
|
|
64
76
|
edgeStyle?: 'flow' | 'tide';
|
|
65
77
|
colors?: string[];
|
|
66
78
|
textRatio?: number;
|
|
@@ -70,32 +82,42 @@ export interface ProgressOptions {
|
|
|
70
82
|
showValue?: boolean;
|
|
71
83
|
renderer?: 'auto' | 'webgl2' | 'canvas2d';
|
|
72
84
|
quality?: Quality;
|
|
85
|
+
renderScale?: number;
|
|
86
|
+
powerPreference?: PowerPreference;
|
|
87
|
+
fps?: number;
|
|
88
|
+
paused?: boolean;
|
|
89
|
+
static?: boolean;
|
|
73
90
|
respectReducedMotion?: boolean;
|
|
74
91
|
cssVars?: Record<string, string>;
|
|
75
92
|
[key: string]: unknown;
|
|
76
93
|
}
|
|
77
|
-
|
|
94
|
+
|
|
78
95
|
export interface ColorBackgroundOptions {
|
|
79
96
|
preset?: string;
|
|
80
|
-
colors?: string[];
|
|
81
|
-
seed?: number;
|
|
82
|
-
speed?: number;
|
|
83
|
-
renderer?: 'auto' | 'webgl2' | 'canvas2d';
|
|
84
|
-
quality?: Quality;
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
export interface
|
|
98
|
-
|
|
97
|
+
colors?: string[];
|
|
98
|
+
seed?: number;
|
|
99
|
+
speed?: number;
|
|
100
|
+
renderer?: 'auto' | 'webgl2' | 'canvas2d';
|
|
101
|
+
quality?: Quality;
|
|
102
|
+
renderScale?: number;
|
|
103
|
+
powerPreference?: PowerPreference;
|
|
104
|
+
fps?: number;
|
|
105
|
+
paused?: boolean;
|
|
106
|
+
static?: boolean;
|
|
107
|
+
mouseColor?: boolean;
|
|
108
|
+
respectReducedMotion?: boolean;
|
|
109
|
+
opacity?: number;
|
|
110
|
+
fallbackColor?: boolean | string;
|
|
111
|
+
[key: string]: unknown;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export interface Emitter {
|
|
115
|
+
on(event: string, handler: (...args: any[]) => void): () => void;
|
|
116
|
+
off(event: string, handler: (...args: any[]) => void): boolean;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export interface CapsuleController extends Emitter {
|
|
120
|
+
element: HTMLElement;
|
|
99
121
|
canvas: HTMLCanvasElement;
|
|
100
122
|
preset: CapsulePreset;
|
|
101
123
|
setPreset(ref: string): this;
|
|
@@ -109,13 +131,23 @@ export interface CapsuleController extends Emitter {
|
|
|
109
131
|
setCssVars(vars: Record<string, string>): this;
|
|
110
132
|
setLabel(label: string): this;
|
|
111
133
|
setSize(width?: number | string, height?: number | string): this;
|
|
112
|
-
randomize(): this;
|
|
113
|
-
pause(): this;
|
|
114
|
-
resume(): this;
|
|
115
|
-
setQuality(quality: Quality): this;
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
134
|
+
randomize(): this;
|
|
135
|
+
pause(): this;
|
|
136
|
+
resume(): this;
|
|
137
|
+
setQuality(quality: Quality): this;
|
|
138
|
+
setRenderScale(value: number): this;
|
|
139
|
+
setPaused(value: boolean): this;
|
|
140
|
+
setStatic(value: boolean): this;
|
|
141
|
+
setFps(value: number): this;
|
|
142
|
+
readonly paused: boolean;
|
|
143
|
+
readonly static: boolean;
|
|
144
|
+
readonly fps: number;
|
|
145
|
+
readonly quality: Quality;
|
|
146
|
+
readonly renderScale: number;
|
|
147
|
+
readonly mouseColor: boolean;
|
|
148
|
+
dispose(): void;
|
|
149
|
+
}
|
|
150
|
+
|
|
119
151
|
export interface ProgressController extends Emitter {
|
|
120
152
|
element: HTMLElement;
|
|
121
153
|
canvas: HTMLCanvasElement;
|
|
@@ -123,6 +155,7 @@ export interface ProgressController extends Emitter {
|
|
|
123
155
|
setValue(value: number, source?: string): this;
|
|
124
156
|
getValue(): number;
|
|
125
157
|
setRange(min: number, max: number): this;
|
|
158
|
+
setStep(step: number | 'any'): this;
|
|
126
159
|
setPreset(ref: string): this;
|
|
127
160
|
setColors(colors: string[]): this;
|
|
128
161
|
setEdgeStyle(style: 'flow' | 'tide'): this;
|
|
@@ -132,20 +165,40 @@ export interface ProgressController extends Emitter {
|
|
|
132
165
|
setCssVars(vars: Record<string, string>): this;
|
|
133
166
|
setLabel(label: string): this;
|
|
134
167
|
setValueSuffix(suffix: string): this;
|
|
168
|
+
setPrecision(precision: number): this;
|
|
169
|
+
setFormatValue(formatter: ProgressOptions['formatValue'] | null): this;
|
|
170
|
+
setDirection(direction: 'ltr' | 'rtl'): this;
|
|
135
171
|
setShowValue(show: boolean): this;
|
|
136
172
|
setSize(width?: number | string, height?: number | string): this;
|
|
137
173
|
randomize(): this;
|
|
138
174
|
pause(): this;
|
|
139
|
-
resume(): this;
|
|
140
|
-
setQuality(quality: Quality): this;
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
175
|
+
resume(): this;
|
|
176
|
+
setQuality(quality: Quality): this;
|
|
177
|
+
setRenderScale(value: number): this;
|
|
178
|
+
setPaused(value: boolean): this;
|
|
179
|
+
setStatic(value: boolean): this;
|
|
180
|
+
setFps(value: number): this;
|
|
181
|
+
readonly min: number;
|
|
182
|
+
readonly max: number;
|
|
183
|
+
readonly step: number | 'any';
|
|
184
|
+
readonly precision: number;
|
|
185
|
+
readonly formatValue: ProgressOptions['formatValue'] | null;
|
|
186
|
+
readonly direction: 'ltr' | 'rtl';
|
|
187
|
+
readonly showValue: boolean;
|
|
188
|
+
readonly valueSuffix: string;
|
|
189
|
+
readonly paused: boolean;
|
|
190
|
+
readonly static: boolean;
|
|
191
|
+
readonly fps: number;
|
|
192
|
+
readonly quality: Quality;
|
|
193
|
+
readonly renderScale: number;
|
|
194
|
+
dispose(): void;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
export interface ColorBackgroundController extends Emitter {
|
|
198
|
+
element: HTMLElement;
|
|
199
|
+
layer: HTMLElement;
|
|
200
|
+
canvas: HTMLCanvasElement;
|
|
201
|
+
preset: CapsulePreset;
|
|
149
202
|
setPreset(ref: string): this;
|
|
150
203
|
setColors(colors: string[]): this;
|
|
151
204
|
setSeed(seed: number): this;
|
|
@@ -153,69 +206,104 @@ export interface ColorBackgroundController extends Emitter {
|
|
|
153
206
|
setFallbackColor(value: boolean | string): this;
|
|
154
207
|
setMouseColor(value: boolean): this;
|
|
155
208
|
setQuality(quality: Quality): this;
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
export declare
|
|
176
|
-
|
|
209
|
+
setRenderScale(value: number): this;
|
|
210
|
+
setPaused(value: boolean): this;
|
|
211
|
+
setStatic(value: boolean): this;
|
|
212
|
+
setFps(value: number): this;
|
|
213
|
+
setOpacity(value: number): this;
|
|
214
|
+
randomize(): this;
|
|
215
|
+
pause(): this;
|
|
216
|
+
resume(): this;
|
|
217
|
+
dispose(): void;
|
|
218
|
+
readonly paused: boolean;
|
|
219
|
+
readonly static: boolean;
|
|
220
|
+
readonly fps: number;
|
|
221
|
+
readonly quality: Quality;
|
|
222
|
+
readonly renderScale: number;
|
|
223
|
+
readonly opacity: number;
|
|
224
|
+
readonly fallbackColor: boolean | string;
|
|
225
|
+
readonly mouseColor: boolean;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
export declare class ProgressCapsuleController {
|
|
229
|
+
value: number;
|
|
230
|
+
min: number;
|
|
231
|
+
max: number;
|
|
232
|
+
step: number | 'any';
|
|
233
|
+
webglActive: boolean;
|
|
234
|
+
setProgress(nextValue: number, source?: string): boolean;
|
|
235
|
+
setRange(min: number, max: number): this;
|
|
236
|
+
setStep(step: number | 'any'): this;
|
|
237
|
+
setPrecision(precision: number): this;
|
|
238
|
+
setFormatValue(formatter: ProgressOptions['formatValue'] | null): this;
|
|
239
|
+
setDirection(direction: 'ltr' | 'rtl'): this;
|
|
240
|
+
setValueSuffix(suffix: string): this;
|
|
241
|
+
setShowValue(show: boolean): this;
|
|
242
|
+
update(delta: number, paused: boolean, now: number): void;
|
|
243
|
+
draw(): void;
|
|
244
|
+
randomize(): number;
|
|
245
|
+
dispose(): void;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
export declare function createCapsule(container: HTMLElement, options?: CapsuleOptions): CapsuleController;
|
|
249
|
+
export declare function createProgressCapsule(container: HTMLElement, options?: ProgressOptions): ProgressController;
|
|
250
|
+
export declare function createColorBackground(host: HTMLElement, options?: ColorBackgroundOptions): ColorBackgroundController;
|
|
251
|
+
|
|
177
252
|
export declare const PRESETS: CapsulePreset[];
|
|
178
253
|
export declare const PROGRESS_PRESETS: ProgressPreset[];
|
|
179
254
|
export declare const ALL_PRESETS: Array<CapsulePreset | ProgressPreset>;
|
|
180
255
|
export declare function getPreset(kind: 'capsule' | 'progress', ref: string): CapsulePreset | ProgressPreset;
|
|
181
|
-
|
|
256
|
+
|
|
182
257
|
export declare const DEFAULTS: {
|
|
183
|
-
capsule: Required<Pick<CapsuleOptions, 'width' | 'height' | 'quality' | 'respectReducedMotion' | 'mouseColor' | 'renderer' | 'textRatio'>>;
|
|
184
|
-
progress: Required<Pick<ProgressOptions, 'width' | 'height' | 'min' | 'max' | 'draggable' | 'disabled' | 'readonly' | 'valueSuffix' | 'edgeStyle' | 'quality' | 'respectReducedMotion' | 'renderer' | 'textRatio' | 'showValue'>>;
|
|
258
|
+
capsule: Required<Pick<CapsuleOptions, 'width' | 'height' | 'quality' | 'respectReducedMotion' | 'mouseColor' | 'renderer' | 'textRatio' | 'renderScale' | 'powerPreference' | 'fps' | 'paused' | 'static'>>;
|
|
259
|
+
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'>>;
|
|
185
260
|
};
|
|
186
|
-
|
|
187
|
-
export declare const COPY: Copy;
|
|
188
|
-
export declare function parseSize(value: number | string): string;
|
|
189
|
-
export declare const QUALITY_TIERS: Record<'low' | 'medium' | 'high', { dpr: number }>;
|
|
190
|
-
export declare function dprCapFor(quality: Quality): number;
|
|
191
|
-
export declare function
|
|
192
|
-
export declare function
|
|
261
|
+
|
|
262
|
+
export declare const COPY: Copy;
|
|
263
|
+
export declare function parseSize(value: number | string): string;
|
|
264
|
+
export declare const QUALITY_TIERS: Record<'low' | 'medium' | 'high', { dpr: number }>;
|
|
265
|
+
export declare function dprCapFor(quality: Quality): number;
|
|
266
|
+
export declare function effectiveDprCap(quality: Quality, renderScale?: number): number;
|
|
267
|
+
export declare function pauseAll(): void;
|
|
268
|
+
export declare function resumeAll(): void;
|
|
193
269
|
export declare function hexToRgb01(hex: string): [number, number, number];
|
|
194
270
|
export declare function hexToRgba(hex: string, alpha?: number): string;
|
|
195
271
|
export declare function normalizeColor(color: string): string | null;
|
|
196
272
|
export declare function validateColors(colors: unknown): boolean;
|
|
197
|
-
|
|
198
|
-
export declare class CosmicRenderer {
|
|
199
|
-
constructor(canvas: HTMLCanvasElement, preset: CapsulePreset, options?: {
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
273
|
+
|
|
274
|
+
export declare class CosmicRenderer {
|
|
275
|
+
constructor(canvas: HTMLCanvasElement, preset: CapsulePreset, options?: {
|
|
276
|
+
dprCap?: number;
|
|
277
|
+
mouseColor?: boolean;
|
|
278
|
+
eventTarget?: HTMLElement;
|
|
279
|
+
powerPreference?: PowerPreference;
|
|
280
|
+
onContextLost?: (event: Event) => void;
|
|
281
|
+
onContextRestored?: () => void;
|
|
282
|
+
});
|
|
283
|
+
draw(elapsedSeconds: number, paused?: boolean): void;
|
|
284
|
+
setPreset(preset: CapsulePreset): void;
|
|
285
|
+
setDprCap(cap: number): void;
|
|
286
|
+
randomize(): void;
|
|
287
|
+
resize(): void;
|
|
288
|
+
dispose(): void;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
export declare class FallbackRenderer {
|
|
292
|
+
constructor(canvas: HTMLCanvasElement, preset: CapsulePreset, options?: { dprCap?: number });
|
|
293
|
+
draw(elapsedSeconds: number): void;
|
|
294
|
+
setPreset(preset: CapsulePreset): void;
|
|
295
|
+
setDprCap(cap: number): void;
|
|
296
|
+
resize(): void;
|
|
297
|
+
dispose(): void;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
export declare class ProgressFlowRenderer {
|
|
301
|
+
constructor(canvas: HTMLCanvasElement, preset: ProgressPreset, options?: {
|
|
302
|
+
powerPreference?: PowerPreference;
|
|
303
|
+
onContextLost?: (event: Event) => void;
|
|
304
|
+
onContextRestored?: () => void;
|
|
305
|
+
});
|
|
306
|
+
draw(time: number, progress: number, effectImage?: CanvasImageSource | null): void;
|
|
307
|
+
resize(width: number, height: number, dpr: number): void;
|
|
308
|
+
dispose(): void;
|
|
309
|
+
}
|
package/types/progress.d.ts
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
export {
|
|
2
|
-
ProgressOptions,
|
|
3
|
-
ProgressController,
|
|
4
|
-
ProgressPreset,
|
|
5
|
-
ProgressCapsuleController,
|
|
6
|
-
Quality,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
export {
|
|
2
|
+
ProgressOptions,
|
|
3
|
+
ProgressController,
|
|
4
|
+
ProgressPreset,
|
|
5
|
+
ProgressCapsuleController,
|
|
6
|
+
Quality,
|
|
7
|
+
PowerPreference,
|
|
8
|
+
createProgressCapsule,
|
|
9
|
+
parseSize,
|
|
10
|
+
dprCapFor,
|
|
11
|
+
effectiveDprCap,
|
|
12
|
+
QUALITY_TIERS,
|
|
13
|
+
hexToRgb01,
|
|
14
|
+
hexToRgba,
|
|
15
|
+
validateColors
|
|
16
|
+
} from './index.js';
|
package/types/vue3.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { CapsuleOptions, ProgressOptions } from './index.js';
|
|
2
|
-
|
|
1
|
+
import { CapsuleOptions, ProgressOptions } from './index.js';
|
|
2
|
+
|
|
3
3
|
export interface CosmicCapsuleComponent {
|
|
4
4
|
name: 'dlc-capsule';
|
|
5
|
-
props: (keyof CapsuleOptions)[];
|
|
6
|
-
emits: string[];
|
|
7
|
-
mounted: () => void;
|
|
8
|
-
beforeUnmount: () => void;
|
|
9
|
-
render: (h: Function) => any;
|
|
10
|
-
methods: {
|
|
11
|
-
randomize(): any;
|
|
12
|
-
pause(): any;
|
|
13
|
-
resume(): any;
|
|
5
|
+
props: (keyof CapsuleOptions)[];
|
|
6
|
+
emits: string[];
|
|
7
|
+
mounted: () => void;
|
|
8
|
+
beforeUnmount: () => void;
|
|
9
|
+
render: (h: Function) => any;
|
|
10
|
+
methods: {
|
|
11
|
+
randomize(): any;
|
|
12
|
+
pause(): any;
|
|
13
|
+
resume(): any;
|
|
14
14
|
setPreset(preset: CapsuleOptions['preset']): any;
|
|
15
15
|
setSize(width?: number | string, height?: number | string): any;
|
|
16
16
|
setColors(colors: string[]): any;
|
|
@@ -21,24 +21,29 @@ export interface CosmicCapsuleComponent {
|
|
|
21
21
|
setLabel(label: string): any;
|
|
22
22
|
setMouseColor(value: boolean): any;
|
|
23
23
|
setQuality(quality: CapsuleOptions['quality']): any;
|
|
24
|
+
setRenderScale(value: number): any;
|
|
25
|
+
setPaused(value: boolean): any;
|
|
26
|
+
setStatic(value: boolean): any;
|
|
27
|
+
setFps(value: number): any;
|
|
24
28
|
getController(): any;
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
|
|
28
32
|
export interface ProgressCapsuleComponent {
|
|
29
33
|
name: 'dlc-progress';
|
|
30
|
-
props: (keyof ProgressOptions)[];
|
|
31
|
-
emits: string[];
|
|
32
|
-
mounted: () => void;
|
|
33
|
-
beforeUnmount: () => void;
|
|
34
|
-
render: (h: Function) => any;
|
|
34
|
+
props: (keyof ProgressOptions)[];
|
|
35
|
+
emits: string[];
|
|
36
|
+
mounted: () => void;
|
|
37
|
+
beforeUnmount: () => void;
|
|
38
|
+
render: (h: Function) => any;
|
|
35
39
|
methods: {
|
|
36
40
|
setValue(value: number): any;
|
|
37
41
|
getValue(): number | undefined;
|
|
38
42
|
setRange(min: number, max: number): any;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
43
|
+
setStep(step: ProgressOptions['step']): any;
|
|
44
|
+
randomize(): any;
|
|
45
|
+
pause(): any;
|
|
46
|
+
resume(): any;
|
|
42
47
|
setPreset(preset: ProgressOptions['preset']): any;
|
|
43
48
|
setSize(width?: number | string, height?: number | string): any;
|
|
44
49
|
setColors(colors: string[]): any;
|
|
@@ -49,7 +54,14 @@ export interface ProgressCapsuleComponent {
|
|
|
49
54
|
setLabel(label: string): any;
|
|
50
55
|
setValueSuffix(suffix: string): any;
|
|
51
56
|
setShowValue(show: boolean): any;
|
|
57
|
+
setDirection(direction: ProgressOptions['direction']): any;
|
|
58
|
+
setPrecision(precision: number): any;
|
|
59
|
+
setFormatValue(formatter: ProgressOptions['formatValue'] | null): any;
|
|
52
60
|
setQuality(quality: ProgressOptions['quality']): any;
|
|
61
|
+
setRenderScale(value: number): any;
|
|
62
|
+
setPaused(value: boolean): any;
|
|
63
|
+
setStatic(value: boolean): any;
|
|
64
|
+
setFps(value: number): any;
|
|
53
65
|
getController(): any;
|
|
54
66
|
};
|
|
55
67
|
}
|
|
@@ -67,12 +79,16 @@ export interface ColorBackgroundComponent {
|
|
|
67
79
|
setSeed(seed: number): any;
|
|
68
80
|
setSpeed(speed: number): any;
|
|
69
81
|
setQuality(quality: string): any;
|
|
82
|
+
setRenderScale(value: number): any;
|
|
70
83
|
setOpacity(value: number): any;
|
|
71
84
|
setFallbackColor(value: boolean | string): any;
|
|
72
85
|
setMouseColor(value: boolean): any;
|
|
73
86
|
randomize(): any;
|
|
74
87
|
pause(): any;
|
|
75
88
|
resume(): any;
|
|
89
|
+
setPaused(value: boolean): any;
|
|
90
|
+
setStatic(value: boolean): any;
|
|
91
|
+
setFps(value: number): any;
|
|
76
92
|
getController(): any;
|
|
77
93
|
};
|
|
78
94
|
}
|