1
- import { theme } from '@tutorialkit/astro' ;
2
- import transformerDirectives from '@unocss/transformer-directives' ;
1
+ import { unoCSSConfig } from '@tutorialkit/astro' ;
3
2
import { globSync , convertPathToPattern } from 'fast-glob' ;
4
3
import fs from 'node:fs/promises' ;
5
4
import { basename , dirname , join } from 'node:path' ;
6
- import { defineConfig , presetIcons , presetUno } from 'unocss' ;
5
+ import { defineConfig , presetIcons , presetUno , transformerDirectives } from 'unocss' ;
7
6
8
7
const iconPaths = globSync ( './icons/languages/*.svg' ) ;
9
8
@@ -21,29 +20,14 @@ const customIconCollection = iconPaths.reduce(
21
20
) ;
22
21
23
22
export default defineConfig ( {
24
- theme ,
23
+ ... unoCSSConfig ,
25
24
content : {
26
25
inline : globSync (
27
26
`${ convertPathToPattern ( join ( require . resolve ( '@tutorialkit/components-react' ) , '..' ) ) } /**/*.js` ,
28
27
) . map ( ( filePath ) => {
29
28
return ( ) => fs . readFile ( filePath , { encoding : 'utf8' } ) ;
30
29
} ) ,
31
30
} ,
32
- rules : [
33
- [ 'scrollbar-transparent' , { 'scrollbar-color' : '#0000004d transparent' } ] ,
34
- [ 'nav-box-shadow' , { 'box-shadow' : '0 2px 4px -1px rgba(0, 0, 0, 0.1)' } ] ,
35
- [ 'transition-background' , { 'transition-property' : 'background' } ] ,
36
- ] ,
37
- shortcuts : {
38
- 'panel-container' : 'grid grid-rows-[min-content_1fr] h-full' ,
39
- 'panel-header' :
40
- 'flex items-center px-4 py-2 bg-tk-elements-panel-header-backgroundColor min-h-[38px] overflow-x-hidden' ,
41
- 'panel-tabs-header' : 'flex bg-tk-elements-panel-header-backgroundColor h-[38px]' ,
42
- 'panel-title' : 'flex items-center gap-1.5 text-tk-elements-panel-header-textColor' ,
43
- 'panel-icon' : 'text-tk-elements-panel-header-iconColor' ,
44
- 'panel-button' :
45
- 'flex items-center gap-1.5 whitespace-nowrap rounded-md text-sm bg-tk-elements-panel-headerButton-backgroundColor hover:bg-tk-elements-panel-headerButton-backgroundColorHover text-tk-elements-panel-headerButton-textColor hover:text-tk-elements-panel-headerButton-textColorHover' ,
46
- } ,
47
31
transformers : [ transformerDirectives ( ) ] ,
48
32
presets : [
49
33
presetUno ( {
0 commit comments