combo-ui-vue 0.1.0
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/dist/index.d.mts +564 -0
- package/dist/index.mjs +2693 -0
- package/package.json +46 -0
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,564 @@
|
|
|
1
|
+
import { App, DeepReadonly, Ref } from "vue";
|
|
2
|
+
|
|
3
|
+
//#region src/types.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Types for @combo-ux/vanilla
|
|
6
|
+
*/
|
|
7
|
+
interface BorderValue {
|
|
8
|
+
style: string;
|
|
9
|
+
width: number;
|
|
10
|
+
unit: string;
|
|
11
|
+
color: string;
|
|
12
|
+
}
|
|
13
|
+
interface BorderRadiusValue {
|
|
14
|
+
linked: boolean;
|
|
15
|
+
unit: string;
|
|
16
|
+
tl: number;
|
|
17
|
+
tr: number;
|
|
18
|
+
br: number;
|
|
19
|
+
bl: number;
|
|
20
|
+
}
|
|
21
|
+
interface PaddingValue {
|
|
22
|
+
linkedV: boolean;
|
|
23
|
+
linkedH: boolean;
|
|
24
|
+
unit: string;
|
|
25
|
+
top: number;
|
|
26
|
+
right: number;
|
|
27
|
+
bottom: number;
|
|
28
|
+
left: number;
|
|
29
|
+
}
|
|
30
|
+
interface UnitNumber {
|
|
31
|
+
value: number;
|
|
32
|
+
unit: string;
|
|
33
|
+
}
|
|
34
|
+
interface ShadowValue {
|
|
35
|
+
enabled: boolean;
|
|
36
|
+
offsetX: number;
|
|
37
|
+
offsetY: number;
|
|
38
|
+
blur: number;
|
|
39
|
+
spread: number;
|
|
40
|
+
color: string;
|
|
41
|
+
}
|
|
42
|
+
interface ComponentShadows {
|
|
43
|
+
offset?: ShadowValue;
|
|
44
|
+
inset?: ShadowValue;
|
|
45
|
+
insetHighlight?: ShadowValue;
|
|
46
|
+
}
|
|
47
|
+
type Position = 'top-left' | 'top-center' | 'top-right' | 'center-left' | 'center-center' | 'center-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
|
|
48
|
+
interface ButtonVariant {
|
|
49
|
+
name: string;
|
|
50
|
+
background: string;
|
|
51
|
+
color: string;
|
|
52
|
+
border: BorderValue;
|
|
53
|
+
borderRadius: BorderRadiusValue;
|
|
54
|
+
padding: PaddingValue;
|
|
55
|
+
fontFamily?: string;
|
|
56
|
+
fontSize?: UnitNumber;
|
|
57
|
+
fontWeight?: string;
|
|
58
|
+
fontStyle?: string;
|
|
59
|
+
letterSpacing?: UnitNumber | string;
|
|
60
|
+
hoverBackground?: string;
|
|
61
|
+
hoverColor?: string;
|
|
62
|
+
hoverBorder?: BorderValue | string;
|
|
63
|
+
activeBackground?: string;
|
|
64
|
+
activeColor?: string;
|
|
65
|
+
activeBorder?: BorderValue | string;
|
|
66
|
+
focusColor?: string;
|
|
67
|
+
focusOffset?: UnitNumber | number;
|
|
68
|
+
showFocus?: boolean;
|
|
69
|
+
disabledBackground?: string;
|
|
70
|
+
disabledColor?: string;
|
|
71
|
+
disabledBorder?: BorderValue | string;
|
|
72
|
+
disabledOpacity?: number;
|
|
73
|
+
showDisabled?: boolean;
|
|
74
|
+
shadows?: ComponentShadows;
|
|
75
|
+
dark?: Partial<Omit<ButtonVariant, 'dark'>> & {
|
|
76
|
+
shadowColor?: string;
|
|
77
|
+
shadowInsetColor?: string;
|
|
78
|
+
shadowInsetHighlightColor?: string;
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
interface ButtonComponentData {
|
|
82
|
+
variants: ButtonVariant[];
|
|
83
|
+
selectedVariantIndex: number;
|
|
84
|
+
}
|
|
85
|
+
interface TypographyGlobalConfig {
|
|
86
|
+
fontFamily?: string;
|
|
87
|
+
color?: string;
|
|
88
|
+
backgroundColor?: string;
|
|
89
|
+
dark?: {
|
|
90
|
+
color?: string;
|
|
91
|
+
backgroundColor?: string;
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
interface TypographyVariant {
|
|
95
|
+
id: string;
|
|
96
|
+
name: string;
|
|
97
|
+
isFixed?: boolean;
|
|
98
|
+
fontFamily?: string | null;
|
|
99
|
+
fontStyle?: string;
|
|
100
|
+
fontWeight?: string;
|
|
101
|
+
fontSize?: UnitNumber;
|
|
102
|
+
letterSpacing?: UnitNumber;
|
|
103
|
+
lineHeight?: UnitNumber;
|
|
104
|
+
textTransform?: string;
|
|
105
|
+
textDecoration?: string;
|
|
106
|
+
color?: string | null;
|
|
107
|
+
dark?: {
|
|
108
|
+
color?: string | null;
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
interface TypographyData {
|
|
112
|
+
globalConfig?: TypographyGlobalConfig;
|
|
113
|
+
variants?: TypographyVariant[];
|
|
114
|
+
selectedVariantIndex?: number;
|
|
115
|
+
}
|
|
116
|
+
interface FormsGlobalConfig {
|
|
117
|
+
fontFamily?: string;
|
|
118
|
+
color?: string;
|
|
119
|
+
background?: string;
|
|
120
|
+
border?: BorderValue;
|
|
121
|
+
borderRadius?: BorderRadiusValue;
|
|
122
|
+
padding?: PaddingValue;
|
|
123
|
+
fontSize?: UnitNumber;
|
|
124
|
+
fieldHeight?: number;
|
|
125
|
+
showLabel?: boolean;
|
|
126
|
+
labelColor?: string;
|
|
127
|
+
labelFontSize?: UnitNumber;
|
|
128
|
+
labelFontWeight?: string;
|
|
129
|
+
labelMarginBottom?: number;
|
|
130
|
+
showPlaceholder?: boolean;
|
|
131
|
+
placeholderColor?: string;
|
|
132
|
+
focusOutlineColor?: string;
|
|
133
|
+
focusOutlineWidth?: number;
|
|
134
|
+
errorBorderColor?: string;
|
|
135
|
+
errorColor?: string;
|
|
136
|
+
errorFontSize?: UnitNumber;
|
|
137
|
+
errorMarginTop?: number;
|
|
138
|
+
disabledOpacity?: number;
|
|
139
|
+
disabledColor?: string;
|
|
140
|
+
disabledBackground?: string;
|
|
141
|
+
disabledBorderColor?: string;
|
|
142
|
+
checkRadioColor?: string;
|
|
143
|
+
checkRadioSize?: number;
|
|
144
|
+
optionColor?: string;
|
|
145
|
+
optionFontFamily?: string | null;
|
|
146
|
+
optionFontSize?: UnitNumber;
|
|
147
|
+
optionFontWeight?: string;
|
|
148
|
+
optionSpacingHorizontal?: UnitNumber;
|
|
149
|
+
optionSpacingVertical?: UnitNumber;
|
|
150
|
+
optionOrientation?: 'horizontal' | 'vertical';
|
|
151
|
+
dropzoneBackground?: string;
|
|
152
|
+
dropzoneColor?: string;
|
|
153
|
+
dropzoneBorder?: BorderValue;
|
|
154
|
+
dropzoneBorderRadius?: BorderRadiusValue;
|
|
155
|
+
dark?: {
|
|
156
|
+
color?: string;
|
|
157
|
+
background?: string;
|
|
158
|
+
borderColor?: string;
|
|
159
|
+
labelColor?: string;
|
|
160
|
+
placeholderColor?: string;
|
|
161
|
+
focusOutlineColor?: string;
|
|
162
|
+
errorBorderColor?: string;
|
|
163
|
+
errorColor?: string;
|
|
164
|
+
disabledColor?: string;
|
|
165
|
+
disabledBackground?: string;
|
|
166
|
+
disabledBorderColor?: string;
|
|
167
|
+
checkRadioColor?: string;
|
|
168
|
+
checkRadioSize?: number;
|
|
169
|
+
optionColor?: string;
|
|
170
|
+
optionSpacingHorizontal?: UnitNumber;
|
|
171
|
+
optionSpacingVertical?: UnitNumber;
|
|
172
|
+
dropzoneBackground?: string;
|
|
173
|
+
dropzoneColor?: string;
|
|
174
|
+
dropzoneBorderColor?: string;
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
interface FormsVariant {
|
|
178
|
+
id: string;
|
|
179
|
+
name: string;
|
|
180
|
+
type: 'input' | 'select' | 'radio' | 'checkbox' | 'slider' | 'textarea' | 'file';
|
|
181
|
+
isFixed?: boolean;
|
|
182
|
+
}
|
|
183
|
+
interface FormsData {
|
|
184
|
+
globalConfig?: FormsGlobalConfig;
|
|
185
|
+
variants?: FormsVariant[];
|
|
186
|
+
selectedVariantIndex?: number;
|
|
187
|
+
currentState?: string;
|
|
188
|
+
}
|
|
189
|
+
interface CardVariant {
|
|
190
|
+
name: string;
|
|
191
|
+
background: string;
|
|
192
|
+
color: string;
|
|
193
|
+
border: BorderValue;
|
|
194
|
+
borderRadius: BorderRadiusValue;
|
|
195
|
+
padding: PaddingValue;
|
|
196
|
+
fontFamily?: string | null;
|
|
197
|
+
fontSize?: UnitNumber;
|
|
198
|
+
fontStyle?: string;
|
|
199
|
+
fontWeight?: string;
|
|
200
|
+
letterSpacing?: UnitNumber;
|
|
201
|
+
textAlign?: string;
|
|
202
|
+
headerBackground: string;
|
|
203
|
+
headerColor: string;
|
|
204
|
+
headerPadding: PaddingValue;
|
|
205
|
+
headerBorderBottom: BorderValue;
|
|
206
|
+
headerFontFamily?: string | null;
|
|
207
|
+
headerFontStyle?: string;
|
|
208
|
+
headerFontWeight?: string;
|
|
209
|
+
headerFontSize?: UnitNumber;
|
|
210
|
+
headerLetterSpacing?: UnitNumber;
|
|
211
|
+
headerTextAlign?: string;
|
|
212
|
+
shadows?: ComponentShadows;
|
|
213
|
+
dark?: Partial<Omit<CardVariant, 'dark'>> & {
|
|
214
|
+
borderColor?: string;
|
|
215
|
+
headerBorderBottomColor?: string;
|
|
216
|
+
shadowColor?: string;
|
|
217
|
+
shadowInsetColor?: string;
|
|
218
|
+
shadowInsetHighlightColor?: string;
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
interface CardComponentData {
|
|
222
|
+
variants: CardVariant[];
|
|
223
|
+
selectedVariantIndex: number;
|
|
224
|
+
}
|
|
225
|
+
interface AlertVariant {
|
|
226
|
+
name: string;
|
|
227
|
+
background: string;
|
|
228
|
+
color: string;
|
|
229
|
+
border: BorderValue;
|
|
230
|
+
borderRadius: BorderRadiusValue;
|
|
231
|
+
padding: PaddingValue;
|
|
232
|
+
fontFamily?: string | null;
|
|
233
|
+
fontSize: UnitNumber;
|
|
234
|
+
fontStyle: string;
|
|
235
|
+
fontWeight: string;
|
|
236
|
+
letterSpacing?: UnitNumber;
|
|
237
|
+
textAlign: string;
|
|
238
|
+
headerBackground: string;
|
|
239
|
+
headerColor: string;
|
|
240
|
+
headerPadding: PaddingValue;
|
|
241
|
+
headerBorderBottom: BorderValue;
|
|
242
|
+
headerFontFamily?: string | null;
|
|
243
|
+
headerFontStyle: string;
|
|
244
|
+
headerFontWeight: string;
|
|
245
|
+
headerFontSize: UnitNumber;
|
|
246
|
+
headerLetterSpacing: UnitNumber;
|
|
247
|
+
headerTextAlign: string;
|
|
248
|
+
showClose: boolean;
|
|
249
|
+
autoDismiss: number;
|
|
250
|
+
closeSize: UnitNumber;
|
|
251
|
+
closeColor: string;
|
|
252
|
+
closeHoverColor: string;
|
|
253
|
+
closeActiveColor: string;
|
|
254
|
+
maxWidth: UnitNumber;
|
|
255
|
+
offset: UnitNumber;
|
|
256
|
+
position: Position;
|
|
257
|
+
shadows?: ComponentShadows;
|
|
258
|
+
dark?: Partial<Omit<AlertVariant, 'dark'>> & {
|
|
259
|
+
borderColor?: string;
|
|
260
|
+
headerBorderBottomColor?: string;
|
|
261
|
+
closeColor?: string;
|
|
262
|
+
closeHoverColor?: string;
|
|
263
|
+
closeActiveColor?: string;
|
|
264
|
+
shadowColor?: string;
|
|
265
|
+
shadowInsetColor?: string;
|
|
266
|
+
shadowInsetHighlightColor?: string;
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
interface AlertComponentData {
|
|
270
|
+
variants: AlertVariant[];
|
|
271
|
+
selectedVariantIndex: number;
|
|
272
|
+
}
|
|
273
|
+
interface AvatarVariant {
|
|
274
|
+
name: string;
|
|
275
|
+
background: string;
|
|
276
|
+
color: string;
|
|
277
|
+
border: BorderValue;
|
|
278
|
+
borderRadius: BorderRadiusValue;
|
|
279
|
+
padding: PaddingValue;
|
|
280
|
+
fontFamily?: string | null;
|
|
281
|
+
fontSize: UnitNumber;
|
|
282
|
+
fontStyle: string;
|
|
283
|
+
fontWeight: string;
|
|
284
|
+
letterSpacing: UnitNumber;
|
|
285
|
+
shadows?: ComponentShadows;
|
|
286
|
+
dark?: Partial<Omit<AvatarVariant, 'dark'>> & {
|
|
287
|
+
borderColor?: string;
|
|
288
|
+
shadowColor?: string;
|
|
289
|
+
shadowInsetColor?: string;
|
|
290
|
+
shadowInsetHighlightColor?: string;
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
interface AvatarComponentData {
|
|
294
|
+
variants: AvatarVariant[];
|
|
295
|
+
selectedVariantIndex: number;
|
|
296
|
+
}
|
|
297
|
+
interface BadgeVariant {
|
|
298
|
+
name: string;
|
|
299
|
+
background: string;
|
|
300
|
+
color: string;
|
|
301
|
+
border: BorderValue;
|
|
302
|
+
borderRadius: BorderRadiusValue;
|
|
303
|
+
padding: PaddingValue;
|
|
304
|
+
fontFamily?: string | null;
|
|
305
|
+
fontSize: UnitNumber;
|
|
306
|
+
fontStyle: string;
|
|
307
|
+
fontWeight: string;
|
|
308
|
+
letterSpacing: UnitNumber;
|
|
309
|
+
shadows?: ComponentShadows;
|
|
310
|
+
dark?: Partial<Omit<BadgeVariant, 'dark'>> & {
|
|
311
|
+
borderColor?: string;
|
|
312
|
+
shadowColor?: string;
|
|
313
|
+
shadowInsetColor?: string;
|
|
314
|
+
shadowInsetHighlightColor?: string;
|
|
315
|
+
};
|
|
316
|
+
}
|
|
317
|
+
interface BadgeComponentData {
|
|
318
|
+
variants: BadgeVariant[];
|
|
319
|
+
selectedVariantIndex: number;
|
|
320
|
+
}
|
|
321
|
+
interface ChipVariant {
|
|
322
|
+
name: string;
|
|
323
|
+
background: string;
|
|
324
|
+
color: string;
|
|
325
|
+
border: BorderValue;
|
|
326
|
+
borderRadius: BorderRadiusValue;
|
|
327
|
+
padding: PaddingValue;
|
|
328
|
+
fontFamily?: string | null;
|
|
329
|
+
fontSize: UnitNumber;
|
|
330
|
+
fontStyle: string;
|
|
331
|
+
fontWeight: string;
|
|
332
|
+
letterSpacing?: UnitNumber;
|
|
333
|
+
closeSize: UnitNumber;
|
|
334
|
+
closeColor: string;
|
|
335
|
+
closeHoverColor: string;
|
|
336
|
+
closeActiveColor: string;
|
|
337
|
+
shadows?: ComponentShadows;
|
|
338
|
+
dark?: Partial<Omit<ChipVariant, 'dark'>> & {
|
|
339
|
+
borderColor?: string;
|
|
340
|
+
closeColor?: string;
|
|
341
|
+
closeHoverColor?: string;
|
|
342
|
+
closeActiveColor?: string;
|
|
343
|
+
shadowColor?: string;
|
|
344
|
+
shadowInsetColor?: string;
|
|
345
|
+
shadowInsetHighlightColor?: string;
|
|
346
|
+
};
|
|
347
|
+
}
|
|
348
|
+
interface ChipComponentData {
|
|
349
|
+
variants: ChipVariant[];
|
|
350
|
+
selectedVariantIndex: number;
|
|
351
|
+
}
|
|
352
|
+
type SpinnerType = 'ring' | 'pulse' | 'dots' | 'bars' | 'dual';
|
|
353
|
+
interface SpinnerVariant {
|
|
354
|
+
name: string;
|
|
355
|
+
type: SpinnerType;
|
|
356
|
+
color: string;
|
|
357
|
+
trackColor: string;
|
|
358
|
+
border: BorderValue;
|
|
359
|
+
size: UnitNumber;
|
|
360
|
+
speed: number;
|
|
361
|
+
dark: {
|
|
362
|
+
color: string;
|
|
363
|
+
trackColor: string;
|
|
364
|
+
borderColor: string;
|
|
365
|
+
};
|
|
366
|
+
}
|
|
367
|
+
interface SpinnerComponentData {
|
|
368
|
+
variants: SpinnerVariant[];
|
|
369
|
+
selectedVariantIndex: number;
|
|
370
|
+
}
|
|
371
|
+
type ProgressType = 'default' | 'striped' | 'animated';
|
|
372
|
+
interface ProgressVariant {
|
|
373
|
+
name: string;
|
|
374
|
+
background: string;
|
|
375
|
+
border: BorderValue;
|
|
376
|
+
type: ProgressType;
|
|
377
|
+
trackColor: string;
|
|
378
|
+
fillColor: string;
|
|
379
|
+
stripeColor: string;
|
|
380
|
+
height: UnitNumber;
|
|
381
|
+
borderRadius: BorderRadiusValue;
|
|
382
|
+
speed: number;
|
|
383
|
+
showLabel: boolean;
|
|
384
|
+
labelColor: string;
|
|
385
|
+
fontFamily?: string | null;
|
|
386
|
+
labelFontSize: UnitNumber;
|
|
387
|
+
fontStyle: string;
|
|
388
|
+
fontWeight: string;
|
|
389
|
+
shadows?: ComponentShadows;
|
|
390
|
+
dark?: Partial<Omit<ProgressVariant, 'dark'>> & {
|
|
391
|
+
borderColor?: string;
|
|
392
|
+
trackColor?: string;
|
|
393
|
+
fillColor?: string;
|
|
394
|
+
stripeColor?: string;
|
|
395
|
+
labelColor?: string;
|
|
396
|
+
shadowColor?: string;
|
|
397
|
+
shadowInsetColor?: string;
|
|
398
|
+
shadowInsetHighlightColor?: string;
|
|
399
|
+
};
|
|
400
|
+
}
|
|
401
|
+
interface ProgressComponentData {
|
|
402
|
+
variants: ProgressVariant[];
|
|
403
|
+
selectedVariantIndex: number;
|
|
404
|
+
}
|
|
405
|
+
interface ThemeData {
|
|
406
|
+
name: string;
|
|
407
|
+
version: string;
|
|
408
|
+
typography?: TypographyData;
|
|
409
|
+
forms?: FormsData;
|
|
410
|
+
buttons?: ButtonComponentData;
|
|
411
|
+
cards?: CardComponentData;
|
|
412
|
+
alerts?: AlertComponentData;
|
|
413
|
+
avatars?: AvatarComponentData;
|
|
414
|
+
badges?: BadgeComponentData;
|
|
415
|
+
chips?: ChipComponentData;
|
|
416
|
+
progress?: ProgressComponentData;
|
|
417
|
+
spinners?: SpinnerComponentData;
|
|
418
|
+
}
|
|
419
|
+
type DarkModeSetting = 'auto' | 'light' | 'dark';
|
|
420
|
+
interface ThemeSyncOptions {
|
|
421
|
+
/** WebSocket server URL */
|
|
422
|
+
url: string;
|
|
423
|
+
/** Auto-reconnect on disconnect (default: true) */
|
|
424
|
+
reconnect?: boolean;
|
|
425
|
+
/** Reconnection interval in ms (default: 3000) */
|
|
426
|
+
reconnectInterval?: number;
|
|
427
|
+
/** Max reconnection attempts (default: 10) */
|
|
428
|
+
maxReconnectAttempts?: number;
|
|
429
|
+
/** Callback when connected */
|
|
430
|
+
onConnect?: () => void;
|
|
431
|
+
/** Callback when disconnected */
|
|
432
|
+
onDisconnect?: () => void;
|
|
433
|
+
/** Callback on error */
|
|
434
|
+
onError?: (error: Error) => void;
|
|
435
|
+
/** Callback when theme is updated */
|
|
436
|
+
onThemeUpdate?: (theme: ThemeData) => void;
|
|
437
|
+
}
|
|
438
|
+
interface ComboUXOptions {
|
|
439
|
+
/** Theme data object or URL to JSON file */
|
|
440
|
+
theme: ThemeData | string;
|
|
441
|
+
/** Dark mode setting: 'auto' (follows system), 'light', or 'dark' */
|
|
442
|
+
darkMode?: DarkModeSetting;
|
|
443
|
+
/** Persist dark mode preference in localStorage */
|
|
444
|
+
persistDarkMode?: boolean;
|
|
445
|
+
/** Key for localStorage persistence */
|
|
446
|
+
darkModeStorageKey?: string;
|
|
447
|
+
/** WebSocket options for real-time theme sync, or URL string, or false to disable */
|
|
448
|
+
ws?: string | ThemeSyncOptions | false;
|
|
449
|
+
}
|
|
450
|
+
interface ThemeButtonOptions {
|
|
451
|
+
position?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
|
|
452
|
+
icon?: string;
|
|
453
|
+
onClick?: () => void;
|
|
454
|
+
}
|
|
455
|
+
interface DarkToggleOptions {
|
|
456
|
+
iconLight?: string;
|
|
457
|
+
iconDark?: string;
|
|
458
|
+
}
|
|
459
|
+
interface ControlsOptions {
|
|
460
|
+
position?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
|
|
461
|
+
theme?: Omit<ThemeButtonOptions, 'position'>;
|
|
462
|
+
darkToggle?: DarkToggleOptions;
|
|
463
|
+
}
|
|
464
|
+
type DarkModeChangeCallback = (isDark: boolean) => void;
|
|
465
|
+
type ThemeLoadCallback = (theme: ThemeData) => void;
|
|
466
|
+
//#endregion
|
|
467
|
+
//#region src/combo-ux.d.ts
|
|
468
|
+
declare class ComboUX {
|
|
469
|
+
private options;
|
|
470
|
+
private darkMode;
|
|
471
|
+
private cssInjector;
|
|
472
|
+
private themeLoader;
|
|
473
|
+
private themeSync;
|
|
474
|
+
private currentTheme;
|
|
475
|
+
constructor(options: ComboUXOptions);
|
|
476
|
+
/**
|
|
477
|
+
* Initialize the library (must be called manually or via composable)
|
|
478
|
+
*/
|
|
479
|
+
init(): Promise<void>;
|
|
480
|
+
/**
|
|
481
|
+
* Inject base styles with theme colors
|
|
482
|
+
*/
|
|
483
|
+
private injectBaseStylesFromTheme;
|
|
484
|
+
/**
|
|
485
|
+
* Load theme from URL or object
|
|
486
|
+
*/
|
|
487
|
+
loadTheme(theme: ThemeData | string): Promise<void>;
|
|
488
|
+
/**
|
|
489
|
+
* Apply theme by generating and injecting CSS
|
|
490
|
+
*/
|
|
491
|
+
private applyTheme;
|
|
492
|
+
/**
|
|
493
|
+
* Update theme (for real-time updates via websockets)
|
|
494
|
+
*/
|
|
495
|
+
updateTheme(theme: ThemeData): void;
|
|
496
|
+
/**
|
|
497
|
+
* Update a specific button variant
|
|
498
|
+
*/
|
|
499
|
+
updateButtonVariant(variantName: string, updates: Partial<ButtonVariant>): void;
|
|
500
|
+
/** Check if dark mode is active */
|
|
501
|
+
get isDark(): boolean;
|
|
502
|
+
/** Set dark mode */
|
|
503
|
+
setDarkMode(value: boolean | 'auto'): void;
|
|
504
|
+
/** Toggle dark mode */
|
|
505
|
+
toggleDarkMode(): void;
|
|
506
|
+
/** Register callback for dark mode changes */
|
|
507
|
+
onDarkModeChange(callback: DarkModeChangeCallback): () => void;
|
|
508
|
+
/** Check if WebSocket is connected */
|
|
509
|
+
get isSyncConnected(): boolean;
|
|
510
|
+
/** Connect to WebSocket server */
|
|
511
|
+
connectSync(): void;
|
|
512
|
+
/** Disconnect from WebSocket server */
|
|
513
|
+
disconnectSync(): void;
|
|
514
|
+
/** Register callback for sync connection */
|
|
515
|
+
onSyncConnect(callback: () => void): () => void;
|
|
516
|
+
/** Register callback for sync disconnection */
|
|
517
|
+
onSyncDisconnect(callback: () => void): () => void;
|
|
518
|
+
/** Register callback for sync errors */
|
|
519
|
+
onSyncError(callback: (error: Error) => void): () => void;
|
|
520
|
+
/** Register callback for theme updates from sync */
|
|
521
|
+
onSyncThemeUpdate(callback: (theme: ThemeData) => void): () => void;
|
|
522
|
+
/** Register callback for theme load events */
|
|
523
|
+
onThemeLoad(callback: ThemeLoadCallback): () => void;
|
|
524
|
+
/** Destroy instance and clean up */
|
|
525
|
+
destroy(): void;
|
|
526
|
+
}
|
|
527
|
+
//#endregion
|
|
528
|
+
//#region src/composables/useComboUX.d.ts
|
|
529
|
+
interface UseComboUXReturn {
|
|
530
|
+
isInitialized: DeepReadonly<Ref<boolean>>;
|
|
531
|
+
isDark: DeepReadonly<Ref<boolean>>;
|
|
532
|
+
instance: ComboUX | null;
|
|
533
|
+
toggleDarkMode: () => void;
|
|
534
|
+
setDarkMode: (value: boolean | 'auto') => void;
|
|
535
|
+
updateTheme: (theme: ThemeData) => void;
|
|
536
|
+
}
|
|
537
|
+
/**
|
|
538
|
+
* Initialize ComboUX with options
|
|
539
|
+
* Should be called once in your app entry point
|
|
540
|
+
*/
|
|
541
|
+
declare function initComboUX(options: ComboUXOptions): Promise<ComboUX>;
|
|
542
|
+
/**
|
|
543
|
+
* Get the current ComboUX instance
|
|
544
|
+
*/
|
|
545
|
+
declare function getComboUX(): ComboUX | null;
|
|
546
|
+
/**
|
|
547
|
+
* Vue composable to use ComboUX in components
|
|
548
|
+
*/
|
|
549
|
+
declare function useComboUX(): UseComboUXReturn;
|
|
550
|
+
/**
|
|
551
|
+
* Destroy the ComboUX instance
|
|
552
|
+
*/
|
|
553
|
+
declare function destroyComboUX(): void;
|
|
554
|
+
//#endregion
|
|
555
|
+
//#region src/index.d.ts
|
|
556
|
+
interface ComboUXPluginOptions extends ComboUXOptions {
|
|
557
|
+
/** Auto initialize on install */
|
|
558
|
+
autoInit?: boolean;
|
|
559
|
+
}
|
|
560
|
+
declare const ComboUXPlugin: {
|
|
561
|
+
install(app: App<any>, options: ComboUXPluginOptions): Promise<void>;
|
|
562
|
+
};
|
|
563
|
+
//#endregion
|
|
564
|
+
export { AlertComponentData, AlertVariant, AvatarComponentData, AvatarVariant, BadgeComponentData, BadgeVariant, BorderRadiusValue, BorderValue, ButtonComponentData, ButtonVariant, CardComponentData, CardVariant, ChipComponentData, ChipVariant, ComboUX, type ComboUXOptions, ComboUXPlugin, ComboUXPlugin as default, ComboUXPluginOptions, ComponentShadows, ControlsOptions, DarkModeChangeCallback, DarkModeSetting, DarkToggleOptions, FormsData, FormsGlobalConfig, FormsVariant, PaddingValue, Position, ProgressComponentData, ProgressType, ProgressVariant, ShadowValue, SpinnerComponentData, SpinnerType, SpinnerVariant, ThemeButtonOptions, type ThemeData, ThemeLoadCallback, ThemeSyncOptions, TypographyData, TypographyGlobalConfig, TypographyVariant, UnitNumber, type UseComboUXReturn, destroyComboUX, getComboUX, initComboUX, useComboUX };
|