Repository navigation
Expand file tree
/
Copy pathtailwind.config.ts
More file actions
334 lines (332 loc) · 11.6 KB
/
Copy pathtailwind.config.ts
File metadata and controls
334 lines (332 loc) · 11.6 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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
import type { Config } from 'tailwindcss'
export default {
// Nesting-aware dark variant: `dark:` utilities apply inside a `.dark` subtree
// UNLESS they sit inside a nested `.light` island. The landing page pins
// itself light (a `.light` wrapper) while the visitor's `<html>` may carry
// `.dark`; without this exclusion, `dark:` utilities on emcn components (e.g.
// the `primary` chip's `dark:bg-white`) would leak through and render
// white-on-white. `:where()` keeps specificity equal to base utilities so the
// normal (non-island) dark-mode cascade is unchanged.
darkMode: ['variant', '&:where(.dark, .dark *):not(:where(.light, .light *))'],
content: [
'./pages/**/*.{js,ts,jsx,tsx,mdx}',
'./components/**/*.{js,ts,jsx,tsx,mdx}',
'./app/**/*.{js,ts,jsx,tsx,mdx}',
/**
* `lib/content/mdx.tsx` styles rendered blog/library markdown, so it emits
* classes like any component does. Without this glob Tailwind only
* generates the ones that happen to appear in a scanned file too, and a
* class unique to this directory silently resolves to nothing.
*/
'./lib/**/*.{js,ts,jsx,tsx,mdx}',
/**
* Block definitions and their shared helpers emit classes too — most
* importantly `blocks/icon-color.ts`, whose `getTileIconColorClass` returns
* the only bare `text-black` candidate in the app. Scanned files spell it
* exclusively as `dark:text-black` or `text-black/75`, which compile to
* different selectors, so leaving this directory out meant `.text-black`
* was never generated at all and every light-background brand tile
* inherited the ambient (near-white) color instead.
*/
'./blocks/**/*.{js,ts,jsx,tsx}',
'./ee/**/*.{js,ts,jsx,tsx}',
'./content/**/*.{js,ts,jsx,tsx}',
'../../packages/emcn/src/**/*.{js,ts,jsx,tsx}',
'../../packages/workflow-renderer/src/**/*.{js,ts,jsx,tsx}',
'!./app/node_modules/**',
'!**/node_modules/**',
// Tests are not production styling sources. Keeping them out also avoids
// Tailwind's watcher trying to stat a stale path while a test is replaced.
'!./**/*.test.{js,ts,jsx,tsx,mdx}',
'!./**/*.spec.{js,ts,jsx,tsx,mdx}',
],
theme: {
extend: {
fontFamily: {
season: ['var(--font-season)'],
body: [
'ui-sans-serif',
'-apple-system',
'system-ui',
'Segoe UI',
'Helvetica',
'Apple Color Emoji',
'Arial',
'sans-serif',
'Segoe UI Emoji',
'Segoe UI Symbol',
],
mono: [
'var(--font-martian-mono, ui-monospace)',
'SFMono-Regular',
'Menlo',
'Monaco',
'Consolas',
'"Liberation Mono"',
'"Courier New"',
'monospace',
],
},
fontSize: {
micro: '10px',
xs: '11px',
caption: '12px',
small: '13px',
base: '15px',
md: '16px',
},
spacing: {
'4.5': '18px',
/**
* Hairline scale key. Overriding `spacing` rather than `width`/`height`
* keeps every derived scale in agreement — a `w-px` line and the
* `-right-px` offset that positions it resolve to the same value, which
* a width-only override desynchronizes by half a device pixel.
*/
px: 'var(--border-width)',
},
borderWidth: {
DEFAULT: 'var(--border-width)',
},
colors: {
background: 'hsl(var(--background))',
foreground: 'hsl(var(--foreground))',
card: {
DEFAULT: 'hsl(var(--card))',
foreground: 'hsl(var(--card-foreground))',
},
popover: {
DEFAULT: 'hsl(var(--popover))',
foreground: 'hsl(var(--popover-foreground))',
},
primary: {
DEFAULT: 'hsl(var(--primary))',
foreground: 'hsl(var(--primary-foreground))',
},
secondary: {
DEFAULT: 'hsl(var(--secondary))',
foreground: 'hsl(var(--secondary-foreground))',
},
muted: {
DEFAULT: 'hsl(var(--muted))',
foreground: 'hsl(var(--muted-foreground))',
},
accent: {
DEFAULT: 'hsl(var(--accent))',
foreground: 'hsl(var(--accent-foreground))',
},
destructive: {
DEFAULT: 'hsl(var(--destructive))',
foreground: 'hsl(var(--destructive-foreground))',
},
/**
* Neutral border colors are plain hex, not the HSL triplets the shadcn
* keys below use — `hsl(var(--border))` would be invalid CSS and get
* dropped, leaving the utility to fall through to the `*` border-color
* rule in globals by accident.
*/
border: 'var(--border)',
input: 'hsl(var(--input))',
ring: 'hsl(var(--ring))',
chart: {
'1': 'hsl(var(--chart-1))',
'2': 'hsl(var(--chart-2))',
'3': 'hsl(var(--chart-3))',
'4': 'hsl(var(--chart-4))',
'5': 'hsl(var(--chart-5))',
},
gray: {
50: '#fafafa',
100: '#f5f5f5',
200: '#e5e5e5',
300: '#d4d4d4',
400: '#a3a3a3',
500: '#737373',
600: '#525252',
700: '#404040',
800: '#262626',
900: '#171717',
950: '#0a0a0a',
},
},
borderRadius: {
xs: '2px',
sm: 'calc(var(--radius) - 4px)',
md: 'calc(var(--radius) - 2px)',
lg: 'var(--radius)',
},
boxShadow: {
subtle: 'var(--shadow-subtle)',
medium: 'var(--shadow-medium)',
overlay: 'var(--shadow-overlay)',
kbd: 'var(--shadow-kbd)',
'kbd-sm': 'var(--shadow-kbd-sm)',
card: 'var(--shadow-card)',
ambient: 'var(--shadow-ambient)',
},
dropShadow: {},
maxWidth: {
/**
* The home/chat reading column. The heading, input, suggested actions,
* transcript, and its skeleton must all share one value or the footer
* input visibly misaligns with the messages above it — so they read this
* key rather than repeating a literal.
*/
chat: '44rem',
},
transitionProperty: {
width: 'width',
left: 'left',
padding: 'padding',
},
keyframes: {
'caret-blink': {
'0%,70%,100%': {
opacity: '1',
},
'20%,50%': {
opacity: '0',
},
},
'slide-left': {
'0%': {
transform: 'translateX(0)',
},
'100%': {
transform: 'translateX(-50%)',
},
},
'slide-right': {
'0%': {
transform: 'translateX(-50%)',
},
'100%': {
transform: 'translateX(0)',
},
},
/* One period of the running block's hatch (26px horizontal). Shifting by
exactly one period is what makes the loop seamless.
A transform, not `background-position`: shifting the position makes the
browser re-rasterize the gradient every frame at a new subpixel offset,
so each hard edge antialiases differently frame to frame and the gaps
visibly shimmer. A transform rasterizes once and slides the layer. */
'running-hatch-scroll': {
from: {
transform: 'translateX(-26px)',
},
to: {
transform: 'translateX(0)',
},
},
'dash-animation': {
from: {
strokeDashoffset: '0',
},
to: {
strokeDashoffset: '-24',
},
},
'placeholder-pulse': {
'0%, 100%': {
opacity: '0.5',
},
'50%': {
opacity: '0.8',
},
},
'ring-pulse': {
'0%, 100%': {
'box-shadow': '0 0 0 1.5px var(--border-success)',
},
'50%': {
'box-shadow': '0 0 0 4px var(--border-success)',
},
},
'stream-fade-in': {
from: { opacity: '0' },
to: { opacity: '1' },
},
'slide-in-right': {
from: { transform: 'translateX(40px)' },
to: { transform: 'translateX(0)' },
},
'slide-in-bottom': {
from: { opacity: '0', transform: 'translateY(20px)' },
to: { opacity: '1', transform: 'translateY(0)' },
},
'collapsible-down': {
from: { height: '0' },
to: { height: 'var(--radix-collapsible-content-height)' },
},
'collapsible-up': {
from: { height: 'var(--radix-collapsible-content-height)' },
to: { height: '0' },
},
'hero-stage-fade': {
from: { opacity: '0' },
to: { opacity: '1' },
},
'hero-cursor-press': {
'0%, 100%': { transform: 'scale(1)' },
'45%': { transform: 'scale(0.8)' },
},
'hero-modal-in': {
from: { opacity: '0', transform: 'translateY(10px) scale(0.97)' },
to: { opacity: '1', transform: 'translateY(0) scale(1)' },
},
'hero-kb-content-morph': {
from: { opacity: '0' },
to: { opacity: '1' },
},
'hero-file-drop': {
from: { opacity: '0', transform: 'translateY(-44px) scale(0.96)' },
'60%': { opacity: '1' },
to: { opacity: '1', transform: 'translateY(0) scale(1)' },
},
'hero-node-pop': {
from: { opacity: '0', transform: 'scale(0)' },
to: { opacity: '1', transform: 'scale(1)' },
},
'hero-graph-pulse': {
'0%, 100%': { transform: 'scale(1)' },
'50%': { transform: 'scale(1.22)' },
},
'hero-edge-draw': {
to: { strokeDashoffset: '0' },
},
},
animation: {
'caret-blink': 'caret-blink 1.25s ease-out infinite',
'slide-left': 'slide-left 80s linear infinite',
'slide-right': 'slide-right 80s linear infinite',
'running-hatch-scroll': 'running-hatch-scroll 900ms linear infinite',
'dash-animation': 'dash-animation 1.5s linear infinite',
'placeholder-pulse': 'placeholder-pulse 1.5s ease-in-out infinite',
'ring-pulse': 'ring-pulse 1.5s ease-in-out infinite',
'stream-fade-in': 'stream-fade-in 300ms ease-out forwards',
'stream-fade-in-delayed': 'stream-fade-in 300ms ease-out 1.5s forwards',
'slide-in-right': 'slide-in-right 350ms ease-out forwards',
'slide-in-bottom': 'slide-in-bottom 400ms cubic-bezier(0.16, 1, 0.3, 1)',
'collapsible-down': 'collapsible-down 300ms cubic-bezier(0.4, 0, 0.2, 1)',
'collapsible-up': 'collapsible-up 300ms cubic-bezier(0.4, 0, 0.2, 1)',
'hero-stage-fade': 'hero-stage-fade 420ms cubic-bezier(0.23, 1, 0.32, 1) both',
'hero-cursor-press': 'hero-cursor-press 340ms cubic-bezier(0.23, 1, 0.32, 1)',
'hero-modal-in': 'hero-modal-in 320ms cubic-bezier(0.16, 1, 0.3, 1) both',
'hero-kb-content-morph':
'hero-kb-content-morph 420ms cubic-bezier(0.22, 1, 0.36, 1) 260ms forwards',
'hero-file-drop': 'hero-file-drop 480ms cubic-bezier(0.16, 1, 0.3, 1) forwards',
'hero-node-pop': 'hero-node-pop 440ms cubic-bezier(0.16, 1, 0.3, 1) forwards',
'hero-edge-draw': 'hero-edge-draw 520ms ease-out forwards',
},
},
},
plugins: [
require('tailwindcss-animate'),
require('@tailwindcss/typography'),
require('tailwindcss/plugin')(
({ addVariant }: { addVariant: (name: string, definition: string) => void }) => {
addVariant('hover-hover', '@media (hover: hover) and (pointer: fine) { &:hover }')
}
),
],
} satisfies Config