@5even7/dlc-ui 0.2.10 → 0.2.12
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 +50 -42
- package/LICENSE +21 -21
- package/README.md +257 -257
- package/dist/capsule.cjs +298 -71
- package/dist/capsule.mjs +828 -604
- package/dist/color.cjs +330 -83
- package/dist/color.mjs +880 -632
- package/dist/index.cjs +982 -255
- package/dist/index.mjs +2708 -1987
- package/dist/index.umd.js +982 -255
- package/dist/index.umd.min.js +1 -1
- package/dist/progress.cjs +616 -173
- package/dist/progress.mjs +1827 -1386
- package/dist/vue2.cjs +1126 -268
- package/dist/vue2.mjs +2897 -2067
- package/dist/vue3.cjs +1126 -268
- package/dist/vue3.mjs +2897 -2067
- package/package.json +122 -121
- package/styles/base.css +32 -32
- package/styles/capsule.css +2 -0
- package/styles/color.css +18 -18
- package/styles/progress.css +55 -50
- package/types/capsule.d.ts +15 -13
- package/types/color.d.ts +15 -13
- package/types/index.d.ts +216 -127
- package/types/progress.d.ts +16 -14
- package/types/vue3.d.ts +38 -22
package/types/index.d.ts
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
export type Quality = 'auto' | 'low' | 'medium' | 'high';
|
|
2
|
-
export type
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
edgeStyle: 'flow' | 'tide';
|
|
25
|
-
colors: ColorTuple;
|
|
26
|
-
}
|
|
27
|
-
|
|
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
|
+
|
|
17
|
+
export interface ProgressPreset {
|
|
18
|
+
id: string;
|
|
19
|
+
code: string;
|
|
20
|
+
name: string;
|
|
21
|
+
group: 'progress';
|
|
22
|
+
subtitle?: string;
|
|
23
|
+
initialProgress: number;
|
|
24
|
+
edgeStyle: 'flow' | 'tide';
|
|
25
|
+
colors: ColorTuple;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
28
|
export interface Copy {
|
|
29
29
|
brandName: string;
|
|
30
30
|
valueSuffix: string;
|
|
@@ -35,7 +35,7 @@ export interface Copy {
|
|
|
35
35
|
export interface CapsuleOptions {
|
|
36
36
|
preset?: string;
|
|
37
37
|
width?: number | string;
|
|
38
|
-
height?: number | string;
|
|
38
|
+
height?: number | string;
|
|
39
39
|
colors?: string[];
|
|
40
40
|
seed?: number;
|
|
41
41
|
speed?: number;
|
|
@@ -46,22 +46,33 @@ export interface CapsuleOptions {
|
|
|
46
46
|
mouseColor?: boolean;
|
|
47
47
|
renderer?: 'auto' | 'webgl2' | 'canvas2d';
|
|
48
48
|
quality?: Quality;
|
|
49
|
+
renderScale?: number;
|
|
50
|
+
powerPreference?: PowerPreference;
|
|
51
|
+
fps?: number;
|
|
52
|
+
paused?: boolean;
|
|
53
|
+
static?: boolean;
|
|
49
54
|
respectReducedMotion?: boolean;
|
|
50
55
|
cssVars?: Record<string, string>;
|
|
51
56
|
[key: string]: unknown;
|
|
52
57
|
}
|
|
53
|
-
|
|
58
|
+
|
|
54
59
|
export interface ProgressOptions {
|
|
55
60
|
preset?: string;
|
|
56
|
-
width?: number | string;
|
|
57
|
-
height?: number | string;
|
|
58
|
-
value?: number;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
+
width?: number | string;
|
|
62
|
+
height?: number | string;
|
|
63
|
+
value?: number;
|
|
64
|
+
modelValue?: number;
|
|
65
|
+
min?: number;
|
|
66
|
+
max?: number;
|
|
67
|
+
step?: number | 'any';
|
|
61
68
|
draggable?: boolean;
|
|
69
|
+
keyboard?: boolean;
|
|
62
70
|
disabled?: boolean;
|
|
63
71
|
readonly?: boolean;
|
|
64
72
|
valueSuffix?: string;
|
|
73
|
+
precision?: number;
|
|
74
|
+
formatValue?: (value: number, context: { min: number; max: number; suffix: string }) => string;
|
|
75
|
+
direction?: 'ltr' | 'rtl';
|
|
65
76
|
edgeStyle?: 'flow' | 'tide';
|
|
66
77
|
colors?: string[];
|
|
67
78
|
textRatio?: number;
|
|
@@ -71,51 +82,72 @@ export interface ProgressOptions {
|
|
|
71
82
|
showValue?: boolean;
|
|
72
83
|
renderer?: 'auto' | 'webgl2' | 'canvas2d';
|
|
73
84
|
quality?: Quality;
|
|
85
|
+
renderScale?: number;
|
|
86
|
+
powerPreference?: PowerPreference;
|
|
87
|
+
fps?: number;
|
|
88
|
+
paused?: boolean;
|
|
89
|
+
static?: boolean;
|
|
74
90
|
respectReducedMotion?: boolean;
|
|
75
91
|
cssVars?: Record<string, string>;
|
|
76
92
|
[key: string]: unknown;
|
|
77
93
|
}
|
|
78
|
-
|
|
94
|
+
|
|
79
95
|
export interface ColorBackgroundOptions {
|
|
80
96
|
preset?: string;
|
|
81
|
-
colors?: string[];
|
|
82
|
-
seed?: number;
|
|
83
|
-
speed?: number;
|
|
84
|
-
renderer?: 'auto' | 'webgl2' | 'canvas2d';
|
|
85
|
-
quality?: Quality;
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
export interface
|
|
99
|
-
|
|
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;
|
|
100
121
|
canvas: HTMLCanvasElement;
|
|
101
122
|
preset: CapsulePreset;
|
|
102
123
|
setPreset(ref: string): this;
|
|
103
124
|
setColors(colors: string[]): this;
|
|
104
125
|
setSeed(seed: number): this;
|
|
105
126
|
setSpeed(speed: number): this;
|
|
127
|
+
setMouseColor(value: boolean): this;
|
|
106
128
|
setText(content: string | Node | Node[]): this;
|
|
107
129
|
setColorContent(content: string | Node | Node[]): this;
|
|
108
130
|
setTextRatio(ratio: number): this;
|
|
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,19 +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;
|
|
171
|
+
setShowValue(show: boolean): this;
|
|
135
172
|
setSize(width?: number | string, height?: number | string): this;
|
|
136
173
|
randomize(): this;
|
|
137
174
|
pause(): this;
|
|
138
|
-
resume(): this;
|
|
139
|
-
setQuality(quality: Quality): this;
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
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;
|
|
148
202
|
setPreset(ref: string): this;
|
|
149
203
|
setColors(colors: string[]): this;
|
|
150
204
|
setSeed(seed: number): this;
|
|
@@ -152,69 +206,104 @@ export interface ColorBackgroundController extends Emitter {
|
|
|
152
206
|
setFallbackColor(value: boolean | string): this;
|
|
153
207
|
setMouseColor(value: boolean): this;
|
|
154
208
|
setQuality(quality: Quality): this;
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
export declare
|
|
175
|
-
|
|
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
|
+
|
|
176
252
|
export declare const PRESETS: CapsulePreset[];
|
|
177
253
|
export declare const PROGRESS_PRESETS: ProgressPreset[];
|
|
178
254
|
export declare const ALL_PRESETS: Array<CapsulePreset | ProgressPreset>;
|
|
179
255
|
export declare function getPreset(kind: 'capsule' | 'progress', ref: string): CapsulePreset | ProgressPreset;
|
|
180
|
-
|
|
256
|
+
|
|
181
257
|
export declare const DEFAULTS: {
|
|
182
|
-
capsule: Required<Pick<CapsuleOptions, 'width' | 'height' | 'quality' | 'respectReducedMotion' | 'mouseColor' | 'renderer' | 'textRatio'>>;
|
|
183
|
-
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'>>;
|
|
184
260
|
};
|
|
185
|
-
|
|
186
|
-
export declare const COPY: Copy;
|
|
187
|
-
export declare function parseSize(value: number | string): string;
|
|
188
|
-
export declare const QUALITY_TIERS: Record<'low' | 'medium' | 'high', { dpr: number }>;
|
|
189
|
-
export declare function dprCapFor(quality: Quality): number;
|
|
190
|
-
export declare function
|
|
191
|
-
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;
|
|
192
269
|
export declare function hexToRgb01(hex: string): [number, number, number];
|
|
193
270
|
export declare function hexToRgba(hex: string, alpha?: number): string;
|
|
194
271
|
export declare function normalizeColor(color: string): string | null;
|
|
195
272
|
export declare function validateColors(colors: unknown): boolean;
|
|
196
|
-
|
|
197
|
-
export declare class CosmicRenderer {
|
|
198
|
-
constructor(canvas: HTMLCanvasElement, preset: CapsulePreset, options?: {
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
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
|
}
|