/** @format */

import {
  defineConfig,
  presetAttributify,
  presetIcons,
  presetTypography,
  presetUno,
  presetWebFonts,
  presetWind,
  transformerDirectives,
  transformerVariantGroup,
} from 'unocss'

// @unocss-include

export default defineConfig({
  shortcuts: [
    ['w-1200-auto', 'w-1200px mx-auto'],
  ],
  rules: [
    [
      /^view-transition-([\w-]+)$/,
      ([, name]) => ({ 'view-transition-name': name }),
    ],
    ['ls-2', { 'letter-spacing': '2px' }],
  ],
  theme: {
    colors: {
      primary: '#9B6CFF',
    },
    breakpoints: {
      sm: '640px', // 小屏幕
      md: '768px', // 中等屏幕
      lg: '1024px', // 大屏幕
      xl: '1280px', // 超大屏幕
    },
  },
  presets: [
    presetUno(),
    presetWind(),
    presetAttributify(),
    presetIcons({
      scale: 1.2,
    }),
    presetTypography(),
  ],
  transformers: [transformerDirectives(), transformerVariantGroup()],
})
