forked from npmx-dev/npmx.dev
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuno.config.ts
More file actions
172 lines (158 loc) · 6.55 KB
/
uno.config.ts
File metadata and controls
172 lines (158 loc) · 6.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
import {
defineConfig,
presetIcons,
presetWind4,
transformerDirectives,
transformerVariantGroup,
} from 'unocss'
import type { Theme } from '@unocss/preset-wind4/theme'
const customIcons = {
tangled:
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 25"><path fill="currentColor" d="M16.346 24.11c-.785-.007-1.384-.235-2.034-.632-.932-.49-1.643-1.314-2.152-2.222-.808 1.003-1.888 1.611-3.097 1.955-.515.15-1.416.301-2.911-.24-2.154-.724-3.723-2.965-3.545-5.25-.033-.946.313-1.875.802-2.674-1.305-.7-2.37-1.876-2.777-3.318-.248-.79-.237-1.64-.146-2.452.327-1.916 1.764-3.582 3.615-4.182.738-1.683 2.35-2.938 4.176-3.193a5.54 5.54 0 0 1 3.528.7C13.351.89 16.043.383 18.1 1.436c1.568.75 2.69 2.312 2.962 4.015 1.492.598 2.749 1.817 3.242 3.365.33.958.34 2.013.127 2.997-.382 1.536-1.465 2.842-2.868 3.557.003.273.901 2.243.751 3.73-.033 1.858-1.211 3.62-2.846 4.475-.954.557-2.085.546-3.12.535m-4.47-5.35c1.322-.148 2.19-1.3 2.862-2.339.319-.473.562-1.002.803-1.506.314.287.58.828 1.075.957.522.163 1.133.03 1.453-.443.611-1.14.31-2.517-.046-3.699-.22-.679-.507-1.375-1.054-1.856.116-.823-.372-1.66-1.065-2.09-.592.47-1.491.468-2.061-.037-1.093 1.115-2.095 1.078-3.063.195-.217-.199-.632 1.212-2.088.413-.837.7-1.485 1.375-2.06 2.346-.559 1.046-1.143 1.976-1.194 3.113-.024.664.495 1.36 1.198 1.306.703.063 1.182-.63 1.714-.917.08.928.169 1.924.482 2.829.36 1.171 1.627 1.916 2.825 1.745zm.687-3.498c-.644-.394-.334-1.25-.36-1.871.064-.75.115-1.538.453-2.221.356-.487 1.226-.3 1.265.326-.026.628-.314 1.254-.28 1.905-.075.544.054 1.155-.186 1.653-.198.275-.6.355-.892.208m-2.81-.358c-.605-.329-.413-1.156-.508-1.73.08-.666.014-1.51.571-1.978.545-.38 1.287.271 1.03.869-.276.755-.096 1.58-.09 2.346a.712.712 0 0 1-1.002.493"/></svg>',
}
export default defineConfig({
presets: [
presetWind4(),
presetIcons({
scale: 1.2,
collections: {
custom: customIcons,
},
}),
],
transformers: [transformerDirectives(), transformerVariantGroup()],
theme: {
font: {
mono: "'Geist Mono', monospace",
sans: "'Geist', system-ui, -apple-system, sans-serif",
},
colors: {
// Minimal black & white palette with subtle grays
bg: {
DEFAULT: '#0a0a0a',
subtle: '#111111',
muted: '#1a1a1a',
elevated: '#222222',
},
fg: {
DEFAULT: '#fafafa',
muted: '#a1a1a1',
subtle: '#8A8A8A',
},
border: {
DEFAULT: '#262626',
subtle: '#1f1f1f',
hover: '#404040',
},
accent: {
DEFAULT: '#ffffff',
muted: '#e5e5e5',
},
// Syntax highlighting colors (inspired by GitHub Dark)
syntax: {
fn: '#b392f0', // function/command - purple
str: '#9ecbff', // string/argument - light blue
kw: '#f97583', // keyword - red/pink
comment: '#6a737d', // comment - gray
},
// Playground provider brand colors
provider: {
stackblitz: '#1389FD',
codesandbox: '#FFCC00',
codepen: '#47CF73',
replit: '#F26207',
gitpod: '#FFAE33',
vue: '#4FC08D',
nuxt: '#00DC82',
vite: '#646CFF',
jsfiddle: '#0084FF',
},
},
animation: {
keyframes: {
'skeleton-pulse': '{0%, 100% { opacity: 0.4 } 50% { opacity: 0.7 }}',
'fade-in': '{from { opacity: 0 } to { opacity: 1 }}',
'slide-up':
'{from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: translateY(0) }}',
'scale-in':
'{from { opacity: 0; transform: scale(0.95) } to { opacity: 1; transform: scale(1) }}',
},
durations: {
'skeleton-pulse': '2s',
'fade-in': '0.3s',
'slide-up': '0.4s',
'scale-in': '0.2s',
},
timingFns: {
'skeleton-pulse': 'ease-in-out',
'fade-in': 'ease-out',
'slide-up': 'cubic-bezier(0.22, 1, 0.36, 1)',
'scale-in': 'cubic-bezier(0.22, 1, 0.36, 1)',
},
counts: {
'skeleton-pulse': 'infinite',
},
},
} satisfies Theme,
shortcuts: [
// Layout
['container', 'max-w-4xl mx-auto px-4 sm:px-6'],
// Focus states - subtle but accessible
['focus-ring', 'outline-none focus-visible:(ring-2 ring-fg/20 ring-offset-2 ring-offset-bg)'],
// Buttons
[
'btn',
'inline-flex items-center justify-center px-4 py-2 font-mono text-sm border border-border rounded-md bg-transparent text-fg transition-all duration-200 hover:(bg-fg hover:text-bg border-fg) focus-ring active:scale-98 disabled:(opacity-40 cursor-not-allowed hover:bg-transparent hover:text-fg)',
],
[
'btn-ghost',
'inline-flex items-center justify-center px-3 py-1.5 font-mono text-sm text-fg-muted bg-transparent transition-all duration-200 hover:text-fg focus-ring',
],
// Links
[
'link',
'text-fg underline-offset-4 decoration-border hover:(decoration-fg underline) transition-colors duration-200 focus-ring',
],
['link-subtle', 'text-fg-muted hover:text-fg transition-colors duration-200 focus-ring'],
// Cards
['card', 'bg-bg-subtle border border-border rounded-lg p-4 sm:p-6 transition-all duration-200'],
['card-interactive', 'card hover:(border-border-hover bg-bg-muted) cursor-pointer'],
// Form elements
[
'input-base',
'w-full bg-bg-subtle border border-border rounded-md px-4 py-3 font-mono text-sm text-fg placeholder:text-fg-subtle transition-all duration-200 focus:(border-fg/40 outline-none ring-1 ring-fg/10)',
],
// Tags/badges
[
'tag',
'inline-flex items-center px-2 py-0.5 text-xs font-mono text-fg-muted bg-bg-muted border border-border rounded transition-colors duration-200 hover:(text-fg border-border-hover)',
],
// Code blocks
[
'code-block',
'bg-bg-muted border border-border rounded-md p-4 font-mono text-sm overflow-x-auto',
],
// Skeleton loading
['skeleton', 'bg-bg-elevated rounded animate-skeleton-pulse'],
// Subtle divider
['divider', 'border-t border-border'],
// Section spacing
['section', 'py-8 sm:py-12'],
],
rules: [
// Custom scale for active states
['scale-98', { transform: 'scale(0.98)' }],
// Subtle text gradient for headings
[
'text-gradient',
{
'background': 'linear-gradient(to right, #fafafa, #a1a1a1)',
'-webkit-background-clip': 'text',
'-webkit-text-fill-color': 'transparent',
'background-clip': 'text',
},
],
// Ensures elements start in initial state during delay
['animate-fill-both', { 'animation-fill-mode': 'both' }],
],
})