skillhub/web/tailwind.config.ts
XiaoSeS 5842a02288 feat: support Unicode characters in skill slugs (#196)
* fix: increase nginx upload limit and filter Chrome DevTools logs

- Add client_max_body_size 100M to nginx config to allow large skill package uploads
- Silently handle Chrome DevTools .well-known requests to reduce log noise

Fixes #193

* feat(domain): add Unicode slug support with emoji validation

- Update SLUG_PATTERN to support Unicode letters (\p{L}), numbers (\p{N}), and symbols (\p{So})
- Add UPPERCASE_PATTERN to maintain lowercase-only validation
- Modify slugify() to preserve Unicode characters instead of replacing with hyphens
- Add 8 new test cases covering Chinese, Japanese, Korean, emoji, and mixed Unicode slugs
- Maintain backward compatibility with existing ASCII slug validation
- All 16 tests passing

Implements Phase 1 of unicode-slug-support-v1.0-prd.md

* feat(web): add URL encoding for Unicode slugs and improve monospace font support

- Encode skill slugs in all navigation URLs using encodeURIComponent
- Encode slugs in API client methods for proper HTTP request handling
- Update share button to generate properly encoded URLs
- Extend monospace font stack with system fonts for better Unicode support
- All frontend tests pass (506 tests)

Related to Unicode slug support PRD phase 2 and 3

* feat(web): regenerate API types for Unicode slug support

- Update OpenAPI schema types after backend slug validator changes
- Reflects new Unicode-aware slug pattern validation

* remove
2026-03-31 10:17:34 +08:00

109 lines
3.4 KiB
TypeScript

import type { Config } from 'tailwindcss'
const config: Config = {
darkMode: ['class'],
content: ['./index.html', './src/**/*.{ts,tsx}'],
theme: {
extend: {
fontFamily: {
display: ['Inter', 'system-ui', 'sans-serif'],
heading: ['Inter', 'system-ui', 'sans-serif'],
sans: ['Inter', '-apple-system', 'BlinkMacSystemFont', 'Segoe UI', 'Roboto', 'sans-serif'],
mono: [
'JetBrains Mono',
'SF Mono',
'Monaco',
'Inconsolata',
'Fira Mono',
'Droid Sans Mono',
'Source Code Pro',
'ui-monospace',
'SFMono-Regular',
'Menlo',
'Consolas',
'Liberation Mono',
'monospace'
],
},
borderRadius: {
lg: 'var(--radius)',
md: 'calc(var(--radius) - 2px)',
sm: 'calc(var(--radius) - 4px)',
xl: 'calc(var(--radius) + 4px)',
'2xl': 'calc(var(--radius) + 8px)',
},
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))',
},
border: 'hsl(var(--border))',
input: 'hsl(var(--input))',
ring: 'hsl(var(--ring))',
},
boxShadow: {
glow: '0 0 20px -5px hsl(var(--primary) / 0.3)',
'glow-lg': '0 0 40px -10px hsl(var(--primary) / 0.25)',
'card': '0 4px 24px -4px hsl(0 0% 0% / 0.15)',
'card-hover': '0 20px 40px -12px hsl(var(--primary) / 0.1), 0 8px 16px -8px hsl(0 0% 0% / 0.2)',
},
animation: {
'fade-up': 'fade-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) both',
'fade-in': 'fade-in 0.5s ease both',
'slide-in-right': 'slide-in-right 0.5s cubic-bezier(0.16, 1, 0.3, 1) both',
'shimmer': 'shimmer 1.8s ease-in-out infinite',
'float': 'float 6s ease-in-out infinite',
},
keyframes: {
'fade-up': {
from: { opacity: '0', transform: 'translateY(20px)' },
to: { opacity: '1', transform: 'translateY(0)' },
},
'fade-in': {
from: { opacity: '0' },
to: { opacity: '1' },
},
'slide-in-right': {
from: { opacity: '0', transform: 'translateX(16px)' },
to: { opacity: '1', transform: 'translateX(0)' },
},
shimmer: {
'0%': { backgroundPosition: '-200% 0' },
'100%': { backgroundPosition: '200% 0' },
},
float: {
'0%, 100%': { transform: 'translateY(0)' },
'50%': { transform: 'translateY(-8px)' },
},
},
},
},
plugins: [],
}
export default config