@duxweb/dvha-core 0.1.14 → 0.1.16

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.
@@ -0,0 +1,288 @@
1
+ export declare const themeColor: {
2
+ slate: {
3
+ 50: string;
4
+ 100: string;
5
+ 200: string;
6
+ 300: string;
7
+ 400: string;
8
+ 500: string;
9
+ 600: string;
10
+ 700: string;
11
+ 800: string;
12
+ 900: string;
13
+ 950: string;
14
+ };
15
+ gray: {
16
+ 50: string;
17
+ 100: string;
18
+ 200: string;
19
+ 300: string;
20
+ 400: string;
21
+ 500: string;
22
+ 600: string;
23
+ 700: string;
24
+ 800: string;
25
+ 900: string;
26
+ 950: string;
27
+ };
28
+ zinc: {
29
+ 50: string;
30
+ 100: string;
31
+ 200: string;
32
+ 300: string;
33
+ 400: string;
34
+ 500: string;
35
+ 600: string;
36
+ 700: string;
37
+ 800: string;
38
+ 900: string;
39
+ 950: string;
40
+ };
41
+ neutral: {
42
+ 50: string;
43
+ 100: string;
44
+ 200: string;
45
+ 300: string;
46
+ 400: string;
47
+ 500: string;
48
+ 600: string;
49
+ 700: string;
50
+ 800: string;
51
+ 900: string;
52
+ 950: string;
53
+ };
54
+ stone: {
55
+ 50: string;
56
+ 100: string;
57
+ 200: string;
58
+ 300: string;
59
+ 400: string;
60
+ 500: string;
61
+ 600: string;
62
+ 700: string;
63
+ 800: string;
64
+ 900: string;
65
+ 950: string;
66
+ };
67
+ red: {
68
+ 50: string;
69
+ 100: string;
70
+ 200: string;
71
+ 300: string;
72
+ 400: string;
73
+ 500: string;
74
+ 600: string;
75
+ 700: string;
76
+ 800: string;
77
+ 900: string;
78
+ 950: string;
79
+ };
80
+ orange: {
81
+ 50: string;
82
+ 100: string;
83
+ 200: string;
84
+ 300: string;
85
+ 400: string;
86
+ 500: string;
87
+ 600: string;
88
+ 700: string;
89
+ 800: string;
90
+ 900: string;
91
+ 950: string;
92
+ };
93
+ amber: {
94
+ 50: string;
95
+ 100: string;
96
+ 200: string;
97
+ 300: string;
98
+ 400: string;
99
+ 500: string;
100
+ 600: string;
101
+ 700: string;
102
+ 800: string;
103
+ 900: string;
104
+ 950: string;
105
+ };
106
+ yellow: {
107
+ 50: string;
108
+ 100: string;
109
+ 200: string;
110
+ 300: string;
111
+ 400: string;
112
+ 500: string;
113
+ 600: string;
114
+ 700: string;
115
+ 800: string;
116
+ 900: string;
117
+ 950: string;
118
+ };
119
+ lime: {
120
+ 50: string;
121
+ 100: string;
122
+ 200: string;
123
+ 300: string;
124
+ 400: string;
125
+ 500: string;
126
+ 600: string;
127
+ 700: string;
128
+ 800: string;
129
+ 900: string;
130
+ 950: string;
131
+ };
132
+ green: {
133
+ 50: string;
134
+ 100: string;
135
+ 200: string;
136
+ 300: string;
137
+ 400: string;
138
+ 500: string;
139
+ 600: string;
140
+ 700: string;
141
+ 800: string;
142
+ 900: string;
143
+ 950: string;
144
+ };
145
+ emerald: {
146
+ 50: string;
147
+ 100: string;
148
+ 200: string;
149
+ 300: string;
150
+ 400: string;
151
+ 500: string;
152
+ 600: string;
153
+ 700: string;
154
+ 800: string;
155
+ 900: string;
156
+ 950: string;
157
+ };
158
+ teal: {
159
+ 50: string;
160
+ 100: string;
161
+ 200: string;
162
+ 300: string;
163
+ 400: string;
164
+ 500: string;
165
+ 600: string;
166
+ 700: string;
167
+ 800: string;
168
+ 900: string;
169
+ 950: string;
170
+ };
171
+ cyan: {
172
+ 50: string;
173
+ 100: string;
174
+ 200: string;
175
+ 300: string;
176
+ 400: string;
177
+ 500: string;
178
+ 600: string;
179
+ 700: string;
180
+ 800: string;
181
+ 900: string;
182
+ 950: string;
183
+ };
184
+ sky: {
185
+ 50: string;
186
+ 100: string;
187
+ 200: string;
188
+ 300: string;
189
+ 400: string;
190
+ 500: string;
191
+ 600: string;
192
+ 700: string;
193
+ 800: string;
194
+ 900: string;
195
+ 950: string;
196
+ };
197
+ blue: {
198
+ 50: string;
199
+ 100: string;
200
+ 200: string;
201
+ 300: string;
202
+ 400: string;
203
+ 500: string;
204
+ 600: string;
205
+ 700: string;
206
+ 800: string;
207
+ 900: string;
208
+ 950: string;
209
+ };
210
+ indigo: {
211
+ 50: string;
212
+ 100: string;
213
+ 200: string;
214
+ 300: string;
215
+ 400: string;
216
+ 500: string;
217
+ 600: string;
218
+ 700: string;
219
+ 800: string;
220
+ 900: string;
221
+ 950: string;
222
+ };
223
+ violet: {
224
+ 50: string;
225
+ 100: string;
226
+ 200: string;
227
+ 300: string;
228
+ 400: string;
229
+ 500: string;
230
+ 600: string;
231
+ 700: string;
232
+ 800: string;
233
+ 900: string;
234
+ 950: string;
235
+ };
236
+ purple: {
237
+ 50: string;
238
+ 100: string;
239
+ 200: string;
240
+ 300: string;
241
+ 400: string;
242
+ 500: string;
243
+ 600: string;
244
+ 700: string;
245
+ 800: string;
246
+ 900: string;
247
+ 950: string;
248
+ };
249
+ fuchsia: {
250
+ 50: string;
251
+ 100: string;
252
+ 200: string;
253
+ 300: string;
254
+ 400: string;
255
+ 500: string;
256
+ 600: string;
257
+ 700: string;
258
+ 800: string;
259
+ 900: string;
260
+ 950: string;
261
+ };
262
+ pink: {
263
+ 50: string;
264
+ 100: string;
265
+ 200: string;
266
+ 300: string;
267
+ 400: string;
268
+ 500: string;
269
+ 600: string;
270
+ 700: string;
271
+ 800: string;
272
+ 900: string;
273
+ 950: string;
274
+ };
275
+ rose: {
276
+ 50: string;
277
+ 100: string;
278
+ 200: string;
279
+ 300: string;
280
+ 400: string;
281
+ 500: string;
282
+ 600: string;
283
+ 700: string;
284
+ 800: string;
285
+ 900: string;
286
+ 950: string;
287
+ };
288
+ };
@@ -0,0 +1,18 @@
1
+ interface IUseTreeProps {
2
+ path?: string;
3
+ params?: Record<string, any>;
4
+ treeOptions?: {
5
+ valueKey?: string;
6
+ parentKey?: string;
7
+ sortKey?: string;
8
+ childrenKey?: string;
9
+ };
10
+ converTree?: boolean;
11
+ providerName?: string;
12
+ }
13
+ export declare function useTree(props: IUseTreeProps): {
14
+ options: import("vue").ComputedRef<any>;
15
+ loading: import("vue").ComputedRef<boolean>;
16
+ expanded: import("vue").ComputedRef<unknown[]>;
17
+ };
18
+ export {};
@@ -3,3 +3,4 @@ export * from './route';
3
3
  export * from './tab';
4
4
  export * from './manage';
5
5
  export * from './i18n';
6
+ export * from './theme';
@@ -0,0 +1,104 @@
1
+ import { ThemeColorName, ThemeColorType } from '../hooks';
2
+ import { Ref } from 'vue';
3
+ export interface ThemeState {
4
+ primary: ThemeColorName;
5
+ info: ThemeColorName;
6
+ success: ThemeColorName;
7
+ warning: ThemeColorName;
8
+ error: ThemeColorName;
9
+ gray: ThemeColorName;
10
+ }
11
+ export declare function useThemeStore(manageName?: string): import("pinia").Store<`theme-${string}`, Pick<{
12
+ mode: Ref<"light" | "dark" | "auto", "light" | "dark" | "auto">;
13
+ setMode: (newMode: "light" | "dark" | "auto") => void;
14
+ theme: Ref<{
15
+ primary: ThemeColorName;
16
+ info: ThemeColorName;
17
+ success: ThemeColorName;
18
+ warning: ThemeColorName;
19
+ error: ThemeColorName;
20
+ gray: ThemeColorName;
21
+ }, ThemeState | {
22
+ primary: ThemeColorName;
23
+ info: ThemeColorName;
24
+ success: ThemeColorName;
25
+ warning: ThemeColorName;
26
+ error: ThemeColorName;
27
+ gray: ThemeColorName;
28
+ }>;
29
+ cssInit: Ref<boolean, boolean>;
30
+ setCssInit: () => void;
31
+ setThemeColor: (type: ThemeColorType, colorName: ThemeColorName) => void;
32
+ setThemeColors: (colors: Partial<ThemeState>) => void;
33
+ resetTheme: () => void;
34
+ getTheme: () => {
35
+ primary: ThemeColorName;
36
+ info: ThemeColorName;
37
+ success: ThemeColorName;
38
+ warning: ThemeColorName;
39
+ error: ThemeColorName;
40
+ gray: ThemeColorName;
41
+ };
42
+ }, "theme" | "mode" | "cssInit">, Pick<{
43
+ mode: Ref<"light" | "dark" | "auto", "light" | "dark" | "auto">;
44
+ setMode: (newMode: "light" | "dark" | "auto") => void;
45
+ theme: Ref<{
46
+ primary: ThemeColorName;
47
+ info: ThemeColorName;
48
+ success: ThemeColorName;
49
+ warning: ThemeColorName;
50
+ error: ThemeColorName;
51
+ gray: ThemeColorName;
52
+ }, ThemeState | {
53
+ primary: ThemeColorName;
54
+ info: ThemeColorName;
55
+ success: ThemeColorName;
56
+ warning: ThemeColorName;
57
+ error: ThemeColorName;
58
+ gray: ThemeColorName;
59
+ }>;
60
+ cssInit: Ref<boolean, boolean>;
61
+ setCssInit: () => void;
62
+ setThemeColor: (type: ThemeColorType, colorName: ThemeColorName) => void;
63
+ setThemeColors: (colors: Partial<ThemeState>) => void;
64
+ resetTheme: () => void;
65
+ getTheme: () => {
66
+ primary: ThemeColorName;
67
+ info: ThemeColorName;
68
+ success: ThemeColorName;
69
+ warning: ThemeColorName;
70
+ error: ThemeColorName;
71
+ gray: ThemeColorName;
72
+ };
73
+ }, never>, Pick<{
74
+ mode: Ref<"light" | "dark" | "auto", "light" | "dark" | "auto">;
75
+ setMode: (newMode: "light" | "dark" | "auto") => void;
76
+ theme: Ref<{
77
+ primary: ThemeColorName;
78
+ info: ThemeColorName;
79
+ success: ThemeColorName;
80
+ warning: ThemeColorName;
81
+ error: ThemeColorName;
82
+ gray: ThemeColorName;
83
+ }, ThemeState | {
84
+ primary: ThemeColorName;
85
+ info: ThemeColorName;
86
+ success: ThemeColorName;
87
+ warning: ThemeColorName;
88
+ error: ThemeColorName;
89
+ gray: ThemeColorName;
90
+ }>;
91
+ cssInit: Ref<boolean, boolean>;
92
+ setCssInit: () => void;
93
+ setThemeColor: (type: ThemeColorType, colorName: ThemeColorName) => void;
94
+ setThemeColors: (colors: Partial<ThemeState>) => void;
95
+ resetTheme: () => void;
96
+ getTheme: () => {
97
+ primary: ThemeColorName;
98
+ info: ThemeColorName;
99
+ success: ThemeColorName;
100
+ warning: ThemeColorName;
101
+ error: ThemeColorName;
102
+ gray: ThemeColorName;
103
+ };
104
+ }, "setMode" | "setCssInit" | "setThemeColor" | "setThemeColors" | "resetTheme" | "getTheme">>;
@@ -1,8 +1,10 @@
1
+ import type { ThemeConfig } from '../hooks';
1
2
  export interface IConfigTheme {
2
3
  logo?: string;
3
4
  darkLogo?: string;
4
5
  banner?: string;
5
6
  darkBanner?: string;
7
+ config?: ThemeConfig;
6
8
  }
7
9
  export interface ITheme {
8
10
  logo?: string;
@@ -1 +1,2 @@
1
1
  export * from './tree';
2
+ export * from './theme';
@@ -0,0 +1,52 @@
1
+ export declare const themePreset: (themeColor: Record<string, any>) => {
2
+ colors: Record<string, Record<string, string>>;
3
+ classes: {
4
+ text: {
5
+ color: string;
6
+ };
7
+ 'text-dimmed': {
8
+ color: string;
9
+ };
10
+ 'text-muted': {
11
+ color: string;
12
+ };
13
+ 'text-toned': {
14
+ color: string;
15
+ };
16
+ 'text-highlighted': {
17
+ color: string;
18
+ };
19
+ 'text-inverted': {
20
+ color: string;
21
+ };
22
+ bg: {
23
+ 'background-color': string;
24
+ };
25
+ 'bg-muted': {
26
+ 'background-color': string;
27
+ };
28
+ 'bg-elevated': {
29
+ 'background-color': string;
30
+ };
31
+ 'bg-accented': {
32
+ 'background-color': string;
33
+ };
34
+ 'bg-inverted': {
35
+ 'background-color': string;
36
+ };
37
+ border: {
38
+ 'border-color': string;
39
+ };
40
+ 'border-muted': {
41
+ 'border-color': string;
42
+ };
43
+ 'border-accented': {
44
+ 'border-color': string;
45
+ };
46
+ 'border-inverted': {
47
+ 'border-color': string;
48
+ };
49
+ };
50
+ rules: object[];
51
+ utilities: Record<string, Record<string, string>>;
52
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@duxweb/dvha-core",
3
3
  "type": "module",
4
- "version": "0.1.14",
4
+ "version": "0.1.16",
5
5
  "author": "DuxWeb",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -43,6 +43,7 @@
43
43
  "@vueuse/integrations": "^13.0.0",
44
44
  "axios": "^1.9.0",
45
45
  "clsx": "^2.1.1",
46
+ "colorizr": "^3.0.8",
46
47
  "json-2-csv": "^5.5.9",
47
48
  "lodash-es": "^4.17.21",
48
49
  "petite-vue-i18n": "^11.1.4",