@directus/themes 0.0.2 → 0.0.3

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,463 @@
1
+ import type { DeepPartial } from '@directus/types';
2
+ import type { Theme } from './schema.js';
3
+ declare const _default: import("vue").DefineComponent<{
4
+ darkMode: {
5
+ type: import("vue").PropType<boolean>;
6
+ required: true;
7
+ };
8
+ themeLight: {
9
+ type: import("vue").PropType<string | null>;
10
+ required: true;
11
+ default: string;
12
+ };
13
+ themeLightOverrides: {
14
+ type: import("vue").PropType<{
15
+ foreground?: string;
16
+ foregroundSubdued?: string;
17
+ foregroundAccent?: string;
18
+ background?: string;
19
+ primary?: string;
20
+ primaryBackground?: string;
21
+ primarySubdued?: string;
22
+ primaryAccent?: string;
23
+ secondary?: string;
24
+ secondaryBackground?: string;
25
+ secondarySubdued?: string;
26
+ secondaryAccent?: string;
27
+ success?: string;
28
+ successBackground?: string;
29
+ successSubdued?: string;
30
+ successAccent?: string;
31
+ warning?: string;
32
+ warningBackground?: string;
33
+ warningSubdued?: string;
34
+ warningAccent?: string;
35
+ danger?: string;
36
+ dangerBackground?: string;
37
+ dangerSubdued?: string;
38
+ dangerAccent?: string;
39
+ fontFamilyDisplay?: string;
40
+ fontFamilySansSerif?: string;
41
+ fontFamilySerif?: string;
42
+ fontFamilyMonospace?: string;
43
+ navigation?: {
44
+ background?: string;
45
+ project?: {
46
+ foreground?: string;
47
+ background?: string;
48
+ };
49
+ modules?: {
50
+ background?: string;
51
+ button?: {
52
+ foreground?: string;
53
+ background?: string;
54
+ foregroundHover?: string;
55
+ foregroundActive?: string;
56
+ backgroundHover?: string;
57
+ backgroundActive?: string;
58
+ };
59
+ };
60
+ list?: {
61
+ foreground?: string;
62
+ background?: string;
63
+ foregroundHover?: string;
64
+ foregroundActive?: string;
65
+ backgroundHover?: string;
66
+ backgroundActive?: string;
67
+ icon?: {
68
+ foreground?: string;
69
+ foregroundHover?: string;
70
+ foregroundActive?: string;
71
+ };
72
+ };
73
+ };
74
+ header?: {
75
+ background?: string;
76
+ headline?: {
77
+ foreground?: string;
78
+ };
79
+ title?: {
80
+ foreground?: string;
81
+ fontFamily?: string;
82
+ };
83
+ };
84
+ form?: {
85
+ field?: {
86
+ label?: {
87
+ foreground?: string;
88
+ };
89
+ input?: {
90
+ foreground?: string;
91
+ foregroundSubdued?: string;
92
+ background?: string;
93
+ };
94
+ };
95
+ };
96
+ sidebar?: {
97
+ foreground?: string;
98
+ background?: string;
99
+ section?: {
100
+ toggle?: {
101
+ foreground?: string;
102
+ background?: string;
103
+ foregroundHover?: string;
104
+ foregroundActive?: string;
105
+ backgroundHover?: string;
106
+ backgroundActive?: string;
107
+ icon?: {
108
+ foreground?: string;
109
+ foregroundHover?: string;
110
+ foregroundActive?: string;
111
+ };
112
+ };
113
+ };
114
+ };
115
+ }>;
116
+ required: true;
117
+ default: () => {};
118
+ };
119
+ themeDark: {
120
+ type: import("vue").PropType<string | null>;
121
+ required: true;
122
+ default: string;
123
+ };
124
+ themeDarkOverrides: {
125
+ type: import("vue").PropType<{
126
+ foreground?: string;
127
+ foregroundSubdued?: string;
128
+ foregroundAccent?: string;
129
+ background?: string;
130
+ primary?: string;
131
+ primaryBackground?: string;
132
+ primarySubdued?: string;
133
+ primaryAccent?: string;
134
+ secondary?: string;
135
+ secondaryBackground?: string;
136
+ secondarySubdued?: string;
137
+ secondaryAccent?: string;
138
+ success?: string;
139
+ successBackground?: string;
140
+ successSubdued?: string;
141
+ successAccent?: string;
142
+ warning?: string;
143
+ warningBackground?: string;
144
+ warningSubdued?: string;
145
+ warningAccent?: string;
146
+ danger?: string;
147
+ dangerBackground?: string;
148
+ dangerSubdued?: string;
149
+ dangerAccent?: string;
150
+ fontFamilyDisplay?: string;
151
+ fontFamilySansSerif?: string;
152
+ fontFamilySerif?: string;
153
+ fontFamilyMonospace?: string;
154
+ navigation?: {
155
+ background?: string;
156
+ project?: {
157
+ foreground?: string;
158
+ background?: string;
159
+ };
160
+ modules?: {
161
+ background?: string;
162
+ button?: {
163
+ foreground?: string;
164
+ background?: string;
165
+ foregroundHover?: string;
166
+ foregroundActive?: string;
167
+ backgroundHover?: string;
168
+ backgroundActive?: string;
169
+ };
170
+ };
171
+ list?: {
172
+ foreground?: string;
173
+ background?: string;
174
+ foregroundHover?: string;
175
+ foregroundActive?: string;
176
+ backgroundHover?: string;
177
+ backgroundActive?: string;
178
+ icon?: {
179
+ foreground?: string;
180
+ foregroundHover?: string;
181
+ foregroundActive?: string;
182
+ };
183
+ };
184
+ };
185
+ header?: {
186
+ background?: string;
187
+ headline?: {
188
+ foreground?: string;
189
+ };
190
+ title?: {
191
+ foreground?: string;
192
+ fontFamily?: string;
193
+ };
194
+ };
195
+ form?: {
196
+ field?: {
197
+ label?: {
198
+ foreground?: string;
199
+ };
200
+ input?: {
201
+ foreground?: string;
202
+ foregroundSubdued?: string;
203
+ background?: string;
204
+ };
205
+ };
206
+ };
207
+ sidebar?: {
208
+ foreground?: string;
209
+ background?: string;
210
+ section?: {
211
+ toggle?: {
212
+ foreground?: string;
213
+ background?: string;
214
+ foregroundHover?: string;
215
+ foregroundActive?: string;
216
+ backgroundHover?: string;
217
+ backgroundActive?: string;
218
+ icon?: {
219
+ foreground?: string;
220
+ foregroundHover?: string;
221
+ foregroundActive?: string;
222
+ };
223
+ };
224
+ };
225
+ };
226
+ }>;
227
+ required: true;
228
+ default: () => {};
229
+ };
230
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
231
+ darkMode: {
232
+ type: import("vue").PropType<boolean>;
233
+ required: true;
234
+ };
235
+ themeLight: {
236
+ type: import("vue").PropType<string | null>;
237
+ required: true;
238
+ default: string;
239
+ };
240
+ themeLightOverrides: {
241
+ type: import("vue").PropType<{
242
+ foreground?: string;
243
+ foregroundSubdued?: string;
244
+ foregroundAccent?: string;
245
+ background?: string;
246
+ primary?: string;
247
+ primaryBackground?: string;
248
+ primarySubdued?: string;
249
+ primaryAccent?: string;
250
+ secondary?: string;
251
+ secondaryBackground?: string;
252
+ secondarySubdued?: string;
253
+ secondaryAccent?: string;
254
+ success?: string;
255
+ successBackground?: string;
256
+ successSubdued?: string;
257
+ successAccent?: string;
258
+ warning?: string;
259
+ warningBackground?: string;
260
+ warningSubdued?: string;
261
+ warningAccent?: string;
262
+ danger?: string;
263
+ dangerBackground?: string;
264
+ dangerSubdued?: string;
265
+ dangerAccent?: string;
266
+ fontFamilyDisplay?: string;
267
+ fontFamilySansSerif?: string;
268
+ fontFamilySerif?: string;
269
+ fontFamilyMonospace?: string;
270
+ navigation?: {
271
+ background?: string;
272
+ project?: {
273
+ foreground?: string;
274
+ background?: string;
275
+ };
276
+ modules?: {
277
+ background?: string;
278
+ button?: {
279
+ foreground?: string;
280
+ background?: string;
281
+ foregroundHover?: string;
282
+ foregroundActive?: string;
283
+ backgroundHover?: string;
284
+ backgroundActive?: string;
285
+ };
286
+ };
287
+ list?: {
288
+ foreground?: string;
289
+ background?: string;
290
+ foregroundHover?: string;
291
+ foregroundActive?: string;
292
+ backgroundHover?: string;
293
+ backgroundActive?: string;
294
+ icon?: {
295
+ foreground?: string;
296
+ foregroundHover?: string;
297
+ foregroundActive?: string;
298
+ };
299
+ };
300
+ };
301
+ header?: {
302
+ background?: string;
303
+ headline?: {
304
+ foreground?: string;
305
+ };
306
+ title?: {
307
+ foreground?: string;
308
+ fontFamily?: string;
309
+ };
310
+ };
311
+ form?: {
312
+ field?: {
313
+ label?: {
314
+ foreground?: string;
315
+ };
316
+ input?: {
317
+ foreground?: string;
318
+ foregroundSubdued?: string;
319
+ background?: string;
320
+ };
321
+ };
322
+ };
323
+ sidebar?: {
324
+ foreground?: string;
325
+ background?: string;
326
+ section?: {
327
+ toggle?: {
328
+ foreground?: string;
329
+ background?: string;
330
+ foregroundHover?: string;
331
+ foregroundActive?: string;
332
+ backgroundHover?: string;
333
+ backgroundActive?: string;
334
+ icon?: {
335
+ foreground?: string;
336
+ foregroundHover?: string;
337
+ foregroundActive?: string;
338
+ };
339
+ };
340
+ };
341
+ };
342
+ }>;
343
+ required: true;
344
+ default: () => {};
345
+ };
346
+ themeDark: {
347
+ type: import("vue").PropType<string | null>;
348
+ required: true;
349
+ default: string;
350
+ };
351
+ themeDarkOverrides: {
352
+ type: import("vue").PropType<{
353
+ foreground?: string;
354
+ foregroundSubdued?: string;
355
+ foregroundAccent?: string;
356
+ background?: string;
357
+ primary?: string;
358
+ primaryBackground?: string;
359
+ primarySubdued?: string;
360
+ primaryAccent?: string;
361
+ secondary?: string;
362
+ secondaryBackground?: string;
363
+ secondarySubdued?: string;
364
+ secondaryAccent?: string;
365
+ success?: string;
366
+ successBackground?: string;
367
+ successSubdued?: string;
368
+ successAccent?: string;
369
+ warning?: string;
370
+ warningBackground?: string;
371
+ warningSubdued?: string;
372
+ warningAccent?: string;
373
+ danger?: string;
374
+ dangerBackground?: string;
375
+ dangerSubdued?: string;
376
+ dangerAccent?: string;
377
+ fontFamilyDisplay?: string;
378
+ fontFamilySansSerif?: string;
379
+ fontFamilySerif?: string;
380
+ fontFamilyMonospace?: string;
381
+ navigation?: {
382
+ background?: string;
383
+ project?: {
384
+ foreground?: string;
385
+ background?: string;
386
+ };
387
+ modules?: {
388
+ background?: string;
389
+ button?: {
390
+ foreground?: string;
391
+ background?: string;
392
+ foregroundHover?: string;
393
+ foregroundActive?: string;
394
+ backgroundHover?: string;
395
+ backgroundActive?: string;
396
+ };
397
+ };
398
+ list?: {
399
+ foreground?: string;
400
+ background?: string;
401
+ foregroundHover?: string;
402
+ foregroundActive?: string;
403
+ backgroundHover?: string;
404
+ backgroundActive?: string;
405
+ icon?: {
406
+ foreground?: string;
407
+ foregroundHover?: string;
408
+ foregroundActive?: string;
409
+ };
410
+ };
411
+ };
412
+ header?: {
413
+ background?: string;
414
+ headline?: {
415
+ foreground?: string;
416
+ };
417
+ title?: {
418
+ foreground?: string;
419
+ fontFamily?: string;
420
+ };
421
+ };
422
+ form?: {
423
+ field?: {
424
+ label?: {
425
+ foreground?: string;
426
+ };
427
+ input?: {
428
+ foreground?: string;
429
+ foregroundSubdued?: string;
430
+ background?: string;
431
+ };
432
+ };
433
+ };
434
+ sidebar?: {
435
+ foreground?: string;
436
+ background?: string;
437
+ section?: {
438
+ toggle?: {
439
+ foreground?: string;
440
+ background?: string;
441
+ foregroundHover?: string;
442
+ foregroundActive?: string;
443
+ backgroundHover?: string;
444
+ backgroundActive?: string;
445
+ icon?: {
446
+ foreground?: string;
447
+ foregroundHover?: string;
448
+ foregroundActive?: string;
449
+ };
450
+ };
451
+ };
452
+ };
453
+ }>;
454
+ required: true;
455
+ default: () => {};
456
+ };
457
+ }>>, {
458
+ themeLight: string | null;
459
+ themeLightOverrides: DeepPartial<Theme['rules']>;
460
+ themeDark: string | null;
461
+ themeDarkOverrides: DeepPartial<Theme['rules']>;
462
+ }, {}>;
463
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import type { Theme } from '../schema.js';
2
+ export declare const theme: Theme;
@@ -0,0 +1,2 @@
1
+ import type { Theme } from '../schema.js';
2
+ export declare const theme: Theme;
@@ -0,0 +1,6 @@
1
+ import type { MaybeRef } from 'vue';
2
+ import type { Theme } from './schema.js';
3
+ export declare const useFonts: (rules: MaybeRef<Theme>) => {
4
+ fonts: import("vue").ComputedRef<string[]>;
5
+ googleFonts: import("vue").ComputedRef<string[]>;
6
+ };
@@ -0,0 +1,111 @@
1
+ import type { DeepPartial } from '@directus/types';
2
+ import type { MaybeRef } from 'vue';
3
+ import type { Theme } from './schema.js';
4
+ export declare const useTheme: (darkMode: MaybeRef<boolean>, themeLight: MaybeRef<string | null>, themeDark: MaybeRef<string | null>, themeLightOverrides: MaybeRef<DeepPartial<Theme['rules']>>, themeDarkOverrides: MaybeRef<DeepPartial<Theme['rules']>>) => {
5
+ theme: import("vue").ComputedRef<{
6
+ name: string;
7
+ appearance: "light" | "dark";
8
+ rules: {
9
+ foreground: string;
10
+ foregroundSubdued: string;
11
+ foregroundAccent: string;
12
+ background: string;
13
+ primary: string;
14
+ primaryBackground: string;
15
+ primarySubdued: string;
16
+ primaryAccent: string;
17
+ secondary: string;
18
+ secondaryBackground: string;
19
+ secondarySubdued: string;
20
+ secondaryAccent: string;
21
+ success: string;
22
+ successBackground: string;
23
+ successSubdued: string;
24
+ successAccent: string;
25
+ warning: string;
26
+ warningBackground: string;
27
+ warningSubdued: string;
28
+ warningAccent: string;
29
+ danger: string;
30
+ dangerBackground: string;
31
+ dangerSubdued: string;
32
+ dangerAccent: string;
33
+ fontFamilyDisplay: string;
34
+ fontFamilySansSerif: string;
35
+ fontFamilySerif: string;
36
+ fontFamilyMonospace: string;
37
+ navigation: {
38
+ background: string;
39
+ project: {
40
+ foreground: string;
41
+ background: string;
42
+ };
43
+ modules: {
44
+ background: string;
45
+ button: {
46
+ foreground: string;
47
+ background: string;
48
+ foregroundHover: string;
49
+ foregroundActive: string;
50
+ backgroundHover: string;
51
+ backgroundActive: string;
52
+ };
53
+ };
54
+ list: {
55
+ foreground: string;
56
+ background: string;
57
+ foregroundHover: string;
58
+ foregroundActive: string;
59
+ backgroundHover: string;
60
+ backgroundActive: string;
61
+ icon: {
62
+ foreground: string;
63
+ foregroundHover: string;
64
+ foregroundActive: string;
65
+ };
66
+ };
67
+ };
68
+ header: {
69
+ background: string;
70
+ headline: {
71
+ foreground: string;
72
+ };
73
+ title: {
74
+ foreground: string;
75
+ fontFamily: string;
76
+ };
77
+ };
78
+ form: {
79
+ field: {
80
+ label: {
81
+ foreground: string;
82
+ };
83
+ input: {
84
+ foreground: string;
85
+ foregroundSubdued: string;
86
+ background: string;
87
+ };
88
+ };
89
+ };
90
+ sidebar: {
91
+ foreground: string;
92
+ background: string;
93
+ section: {
94
+ toggle: {
95
+ foreground: string;
96
+ background: string;
97
+ foregroundHover: string;
98
+ foregroundActive: string;
99
+ backgroundHover: string;
100
+ backgroundActive: string;
101
+ icon: {
102
+ foreground: string;
103
+ foregroundHover: string;
104
+ foregroundActive: string;
105
+ };
106
+ };
107
+ };
108
+ };
109
+ };
110
+ }>;
111
+ };
package/package.json CHANGED
@@ -1,9 +1,8 @@
1
1
  {
2
2
  "name": "@directus/themes",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "Themes for Directus",
5
5
  "homepage": "https://directus.io",
6
- "sideEffects": false,
7
6
  "repository": {
8
7
  "type": "git",
9
8
  "url": "https://github.com/directus/directus.git",
@@ -12,6 +11,7 @@
12
11
  "funding": "https://github.com/directus/directus?sponsor=1",
13
12
  "license": "MIT",
14
13
  "author": "Rijk van Zanten <rijkvanzanten@me.com>",
14
+ "sideEffects": false,
15
15
  "type": "module",
16
16
  "exports": {
17
17
  ".": "./dist/index.js",
@@ -21,22 +21,30 @@
21
21
  "files": [
22
22
  "dist"
23
23
  ],
24
+ "dependencies": {
25
+ "@sinclair/typebox": "0.31.17",
26
+ "@unhead/vue": "1.1.30",
27
+ "decamelize": "6.0.0",
28
+ "flat": "6.0.1",
29
+ "lodash-es": "4.17.21"
30
+ },
24
31
  "devDependencies": {
25
- "@vitest/coverage-c8": "0.31.1",
26
- "tsup": "6.7.0",
27
- "typescript": "5.0.4",
28
- "vitest": "0.31.1",
29
- "@directus/tsconfig": "1.0.0"
32
+ "@types/lodash-es": "4.17.9",
33
+ "@vitejs/plugin-vue": "4.4.0",
34
+ "rollup-plugin-node-externals": "6.1.2",
35
+ "typescript": "5.2.2",
36
+ "vite": "4.4.11",
37
+ "vite-plugin-dts": "3.6.0",
38
+ "@directus/tsconfig": "1.0.1",
39
+ "@directus/types": "11.0.1"
30
40
  },
31
- "dependencies": {
32
- "@sinclair/typebox": "0.28.13",
33
- "defu": "6.1.2",
34
- "pinia": "2.1.1",
41
+ "peerDependencies": {
42
+ "pinia": "2.1.7",
35
43
  "vue": "3.3.4"
36
44
  },
37
45
  "scripts": {
38
- "build": "tsup src/index.ts --format=esm --dts",
39
- "dev": "tsup src/index.ts --format=esm --dts --watch",
40
- "test": "vitest --watch=false"
46
+ "build": "vite build && npm run generate-json-schema",
47
+ "dev": "vite build --watch",
48
+ "generate-json-schema": "node generate-json-schema.js"
41
49
  }
42
50
  }