feat(stage-*,workspace): added Nunito for default English font, ChillRoundM for CJK font

Close #1317, #1393
This commit is contained in:
Neko Ayaka
2026-04-02 18:31:53 +08:00
parent da2ba67fc6
commit 3b76bab2fc
11 changed files with 67 additions and 30 deletions
+10 -4
View File
@@ -48,6 +48,7 @@ export function presetStoryMockHover(): PresetOrFactoryAwaitable {
return {
matcher,
selector: (s) => {
// eslint-disable-next-line e18e/prefer-static-regex
return `${s}, ${s.replace(/:hover$/, '')}._hover`
},
}
@@ -86,7 +87,7 @@ export function presetWebFontsFonts(provider: 'fontsource' | 'none'): Record<str
subsets: ['latin', 'japanese'],
},
'cuteen': {
name: 'Sniglet',
name: provider === 'fontsource' ? 'Nunito' : 'Nunito Variable',
provider,
},
'jura': {
@@ -170,6 +171,7 @@ export function sharedUnoConfig() {
pipeline: {
include: [
// the default
// eslint-disable-next-line e18e/prefer-static-regex
/\.(vue|svelte|[jt]sx|mdx?|astro|elm|php|phtml|html)($|\?)/,
// include js/ts files
'(components|src)/**/*.{js,ts,vue}', // THIS CAN INCLUDE node_modules
@@ -177,12 +179,15 @@ export function sharedUnoConfig() {
'**/ui/**/*.{vue,js,ts}', // THIS TOO
],
exclude: [
// eslint-disable-next-line e18e/prefer-static-regex
/\/node_modules\//, // DO NOT SCAN THE BLACK HOLE
],
},
},
rules: [
// eslint-disable-next-line e18e/prefer-static-regex
[/^mask-\[(.*)\]$/, ([, suffix]) => ({ '-webkit-mask-image': suffix.replace(/_/g, ' ') })],
// eslint-disable-next-line e18e/prefer-static-regex
[/^bg-dotted-\[(.*)\]$/, ([, color], { theme }) => {
const parsedColor = parseColor(color, theme)
// Util usage: https://github.com/unocss/unocss/blob/f57ef6ae50006a92f444738e50f3601c0d1121f2/packages-presets/preset-mini/src/_utils/utilities.ts#L186
@@ -191,15 +196,16 @@ export function sharedUnoConfig() {
'--un-background-opacity': parsedColor?.cssColor?.alpha ?? parsedColor?.alpha ?? 1,
}
}],
// eslint-disable-next-line e18e/prefer-static-regex
[/drag-region/, () => ({ 'app-region': 'drag' })],
],
theme: {
fontFamily: {
'sans': `"DM Sans Variant", "DM Sans", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";`,
'sans-rounded': `"Comfortaa Variable", "Comfortaa", "DM Sans", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";`,
'cute': `"Sniglet", "Kiwi Maru", "Comfortaa Variable", "Comfortaa", "xiaolai", "DM Sans Variant", "DM Sans", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";`,
'cuteen': `"Sniglet", "Kiwi Maru", "Comfortaa Variable", "Comfortaa", "xiaolai", "DM Sans Variant", "DM Sans", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";`,
'cutejp': `"Sniglet", "Kiwi Maru", "Comfortaa Variable", "Comfortaa", "xiaolai", "DM Sans Variant", "DM Sans", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";`,
'cute': `"Nunito Variable", "ChillRoundM", "Kiwi Maru", "Comfortaa Variable", "Comfortaa", "DM Sans Variant", "DM Sans", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";`,
'cuteen': `"Nunito Variable", "ChillRoundM", "Kiwi Maru", "Comfortaa Variable", "Comfortaa", "DM Sans Variant", "DM Sans", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";`,
'cutejp': `"Nunito Variable", "ChillRoundM", "Kiwi Maru", "Comfortaa Variable", "Comfortaa", "DM Sans Variant", "DM Sans", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";`,
},
/**
* https://github.com/unocss/unocss/blob/1031312057a3bea1082b7d938eb2ad640f57613a/packages-presets/preset-wind4/src/theme/animate.ts