refactor: migrate to common eslint+prettier configs (#4168)

* refactor: migrate to common eslint+prettier configs

* fix: prettier frontend

* feat: config changes

* fix: lint issues

* fix: lint

* fix: type imports

* fix: cyclical import issue

* fix: lockfile

* fix: missing dep

* fix: switch to tabs

* fix: continue switch to tabs

* fix: rustfmt parity

* fix: moderation lint issue

* fix: lint issues

* fix: ui intl

* fix: lint issues

* Revert "fix: rustfmt parity"

This reverts commit cb99d2376c321d813d4b7fc7e2a213bb30a54711.

* feat: revert last rs
This commit is contained in:
Cal H.
2025-08-14 21:48:38 +01:00
committed by GitHub
parent 82697278dc
commit 2aabcf36ee
702 changed files with 101360 additions and 102020 deletions

View File

@@ -1,8 +0,0 @@
module.exports = {
root: true,
extends: ['custom/library'],
ignorePatterns: ['**/*.scss', '**/*.svg', 'node_modules/', 'dist/', '**/*.gltf'],
env: {
node: true,
},
}

View File

@@ -2,210 +2,210 @@ import fs from 'fs'
import path from 'path'
function toPascalCase(str: string): string {
return str
.split(/[-_.]/)
.filter((part) => part.length > 0)
.map((word) => {
if (/^\d/.test(word)) {
return word.charAt(0).toUpperCase() + word.slice(1)
}
return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()
})
.join('')
return str
.split(/[-_.]/)
.filter((part) => part.length > 0)
.map((word) => {
if (/^\d/.test(word)) {
return word.charAt(0).toUpperCase() + word.slice(1)
}
return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()
})
.join('')
}
function generateIconExports(): { imports: string; exports: string } {
const packageRoot = path.resolve(__dirname, '..')
const iconsDir = path.join(packageRoot, 'icons')
const packageRoot = path.resolve(__dirname, '..')
const iconsDir = path.join(packageRoot, 'icons')
if (!fs.existsSync(iconsDir)) {
throw new Error(`Icons directory not found: ${iconsDir}`)
}
if (!fs.existsSync(iconsDir)) {
throw new Error(`Icons directory not found: ${iconsDir}`)
}
const files = fs
.readdirSync(iconsDir)
.filter((file) => file.endsWith('.svg'))
.sort()
const files = fs
.readdirSync(iconsDir)
.filter((file) => file.endsWith('.svg'))
.sort()
let imports = ''
let exports = ''
let imports = ''
let exports = ''
files.forEach((file) => {
const baseName = path.basename(file, '.svg')
let pascalName = toPascalCase(baseName)
files.forEach((file) => {
const baseName = path.basename(file, '.svg')
let pascalName = toPascalCase(baseName)
if (pascalName === '') {
pascalName = 'Unknown'
}
if (pascalName === '') {
pascalName = 'Unknown'
}
if (!pascalName.endsWith('Icon')) {
pascalName += 'Icon'
}
if (!pascalName.endsWith('Icon')) {
pascalName += 'Icon'
}
const privateName = `_${pascalName}`
const privateName = `_${pascalName}`
imports += `import ${privateName} from './icons/${file}?component'\n`
exports += `export const ${pascalName} = ${privateName}\n`
})
imports += `import ${privateName} from './icons/${file}?component'\n`
exports += `export const ${pascalName} = ${privateName}\n`
})
return { imports, exports }
return { imports, exports }
}
function runTests(): void {
console.log('🧪 Running conversion tests...\n')
console.log('🧪 Running conversion tests...\n')
const testCases: Array<{ input: string; expected: string }> = [
{ input: 'align-left', expected: 'AlignLeftIcon' },
{ input: 'arrow-big-up-dash', expected: 'ArrowBigUpDashIcon' },
{ input: 'check-check', expected: 'CheckCheckIcon' },
{ input: 'chevron-left', expected: 'ChevronLeftIcon' },
{ input: 'file-archive', expected: 'FileArchiveIcon' },
{ input: 'heart-handshake', expected: 'HeartHandshakeIcon' },
{ input: 'monitor-smartphone', expected: 'MonitorSmartphoneIcon' },
{ input: 'x-circle', expected: 'XCircleIcon' },
{ input: 'rotate-ccw', expected: 'RotateCcwIcon' },
{ input: 'bell-ring', expected: 'BellRingIcon' },
{ input: 'more-horizontal', expected: 'MoreHorizontalIcon' },
{ input: 'list_bulleted', expected: 'ListBulletedIcon' },
{ input: 'test.name', expected: 'TestNameIcon' },
{ input: 'test-name_final.icon', expected: 'TestNameFinalIcon' },
]
const testCases: Array<{ input: string; expected: string }> = [
{ input: 'align-left', expected: 'AlignLeftIcon' },
{ input: 'arrow-big-up-dash', expected: 'ArrowBigUpDashIcon' },
{ input: 'check-check', expected: 'CheckCheckIcon' },
{ input: 'chevron-left', expected: 'ChevronLeftIcon' },
{ input: 'file-archive', expected: 'FileArchiveIcon' },
{ input: 'heart-handshake', expected: 'HeartHandshakeIcon' },
{ input: 'monitor-smartphone', expected: 'MonitorSmartphoneIcon' },
{ input: 'x-circle', expected: 'XCircleIcon' },
{ input: 'rotate-ccw', expected: 'RotateCcwIcon' },
{ input: 'bell-ring', expected: 'BellRingIcon' },
{ input: 'more-horizontal', expected: 'MoreHorizontalIcon' },
{ input: 'list_bulleted', expected: 'ListBulletedIcon' },
{ input: 'test.name', expected: 'TestNameIcon' },
{ input: 'test-name_final.icon', expected: 'TestNameFinalIcon' },
]
let passed = 0
let failed = 0
let passed = 0
let failed = 0
testCases.forEach(({ input, expected }) => {
const result = toPascalCase(input) + (toPascalCase(input).endsWith('Icon') ? '' : 'Icon')
const success = result === expected
testCases.forEach(({ input, expected }) => {
const result = toPascalCase(input) + (toPascalCase(input).endsWith('Icon') ? '' : 'Icon')
const success = result === expected
if (success) {
console.log(`${input}${result}`)
passed++
} else {
console.log(`${input}${result} (expected: ${expected})`)
failed++
}
})
if (success) {
console.log(`${input}${result}`)
passed++
} else {
console.log(`${input}${result} (expected: ${expected})`)
failed++
}
})
console.log(`\n📊 Test Results: ${passed} passed, ${failed} failed`)
console.log(`\n📊 Test Results: ${passed} passed, ${failed} failed`)
if (failed > 0) {
process.exit(1)
}
if (failed > 0) {
process.exit(1)
}
}
function generateFiles(): void {
try {
console.log('🔄 Generating icon exports...')
try {
console.log('🔄 Generating icon exports...')
const { imports, exports } = generateIconExports()
const output = `// Auto-generated icon imports and exports
const { imports, exports } = generateIconExports()
const output = `// Auto-generated icon imports and exports
// Do not edit this file manually - run 'pnpm run fix' to regenerate
${imports}
${exports}`
const packageRoot = path.resolve(__dirname, '..')
const outputPath = path.join(packageRoot, 'generated-icons.ts')
fs.writeFileSync(outputPath, output)
const packageRoot = path.resolve(__dirname, '..')
const outputPath = path.join(packageRoot, 'generated-icons.ts')
fs.writeFileSync(outputPath, output)
console.log(`✅ Generated icon exports to: ${outputPath}`)
console.log(
`📦 Generated ${imports.split('\n').filter((line) => line.trim()).length} icon imports/exports`,
)
} catch (error) {
console.error('❌ Error generating icons:', error)
process.exit(1)
}
console.log(`✅ Generated icon exports to: ${outputPath}`)
console.log(
`📦 Generated ${imports.split('\n').filter((line) => line.trim()).length} icon imports/exports`,
)
} catch (error) {
console.error('❌ Error generating icons:', error)
process.exit(1)
}
}
function main(): void {
const args = process.argv.slice(2)
const args = process.argv.slice(2)
if (args.includes('--test')) {
runTests()
} else if (args.includes('--validate')) {
validateIconConsistency()
} else {
generateFiles()
}
if (args.includes('--test')) {
runTests()
} else if (args.includes('--validate')) {
validateIconConsistency()
} else {
generateFiles()
}
}
main()
function getExpectedIconExports(iconsDir: string): string[] {
if (!fs.existsSync(iconsDir)) {
return []
}
if (!fs.existsSync(iconsDir)) {
return []
}
return fs
.readdirSync(iconsDir)
.filter((file) => file.endsWith('.svg'))
.map((file) => {
const baseName = path.basename(file, '.svg')
let pascalName = toPascalCase(baseName)
return fs
.readdirSync(iconsDir)
.filter((file) => file.endsWith('.svg'))
.map((file) => {
const baseName = path.basename(file, '.svg')
let pascalName = toPascalCase(baseName)
if (pascalName === '') {
pascalName = 'Unknown'
}
if (pascalName === '') {
pascalName = 'Unknown'
}
if (!pascalName.endsWith('Icon')) {
pascalName += 'Icon'
}
if (!pascalName.endsWith('Icon')) {
pascalName += 'Icon'
}
return pascalName
})
.sort()
return pascalName
})
.sort()
}
function getActualIconExports(indexFile: string): string[] {
if (!fs.existsSync(indexFile)) {
return []
}
if (!fs.existsSync(indexFile)) {
return []
}
const content = fs.readFileSync(indexFile, 'utf8')
const exportMatches = content.match(/export const (\w+Icon) = _\w+Icon/g) || []
const content = fs.readFileSync(indexFile, 'utf8')
const exportMatches = content.match(/export const (\w+Icon) = _\w+Icon/g) || []
return exportMatches
.map((match) => {
const result = match.match(/export const (\w+Icon)/)
return result ? result[1] : ''
})
.filter((name) => name.endsWith('Icon'))
.sort()
return exportMatches
.map((match) => {
const result = match.match(/export const (\w+Icon)/)
return result ? result[1] : ''
})
.filter((name) => name.endsWith('Icon'))
.sort()
}
function validateIconConsistency(): void {
try {
console.log('🔍 Validating icon consistency...')
try {
console.log('🔍 Validating icon consistency...')
const packageRoot = path.resolve(__dirname, '..')
const iconsDir = path.join(packageRoot, 'icons')
const declarationFile = path.join(packageRoot, 'generated-icons.ts')
const packageRoot = path.resolve(__dirname, '..')
const iconsDir = path.join(packageRoot, 'icons')
const declarationFile = path.join(packageRoot, 'generated-icons.ts')
const expectedExports = getExpectedIconExports(iconsDir)
const actualExports = getActualIconExports(declarationFile)
const expectedExports = getExpectedIconExports(iconsDir)
const actualExports = getActualIconExports(declarationFile)
const missingExports = expectedExports.filter((name) => !actualExports.includes(name))
const extraExports = actualExports.filter((name) => !expectedExports.includes(name))
const missingExports = expectedExports.filter((name) => !actualExports.includes(name))
const extraExports = actualExports.filter((name) => !expectedExports.includes(name))
if (missingExports.length > 0) {
console.error(`❌ Missing icon exports: ${missingExports.join(', ')}`)
console.error("Run 'pnpm run fix' to generate them.")
process.exit(1)
}
if (missingExports.length > 0) {
console.error(`❌ Missing icon exports: ${missingExports.join(', ')}`)
console.error("Run 'pnpm run fix' to generate them.")
process.exit(1)
}
if (extraExports.length > 0) {
console.error(
`❌ Extra icon exports (no corresponding SVG files): ${extraExports.join(', ')}`,
)
console.error("Run 'pnpm run fix' to clean them up.")
process.exit(1)
}
if (extraExports.length > 0) {
console.error(
`❌ Extra icon exports (no corresponding SVG files): ${extraExports.join(', ')}`,
)
console.error("Run 'pnpm run fix' to clean them up.")
process.exit(1)
}
console.log('✅ Icon exports are consistent with SVG files')
} catch (error) {
console.error('❌ Error validating icons:', error)
process.exit(1)
}
console.log('✅ Icon exports are consistent with SVG files')
} catch (error) {
console.error('❌ Error validating icons:', error)
process.exit(1)
}
}

View File

@@ -0,0 +1,2 @@
import config from '@modrinth/tooling-config/eslint/nuxt.mjs'
export default config

View File

@@ -8,26 +8,26 @@ import _ArrowBigUpDashIcon from './icons/arrow-big-up-dash.svg?component'
import _AsteriskIcon from './icons/asterisk.svg?component'
import _BadgeCheckIcon from './icons/badge-check.svg?component'
import _BanIcon from './icons/ban.svg?component'
import _BellRingIcon from './icons/bell-ring.svg?component'
import _BellIcon from './icons/bell.svg?component'
import _BellRingIcon from './icons/bell-ring.svg?component'
import _BlocksIcon from './icons/blocks.svg?component'
import _BoldIcon from './icons/bold.svg?component'
import _BookIcon from './icons/book.svg?component'
import _BookOpenIcon from './icons/book-open.svg?component'
import _BookTextIcon from './icons/book-text.svg?component'
import _BookIcon from './icons/book.svg?component'
import _BookmarkIcon from './icons/bookmark.svg?component'
import _BotIcon from './icons/bot.svg?component'
import _BoxImportIcon from './icons/box-import.svg?component'
import _BoxIcon from './icons/box.svg?component'
import _BoxImportIcon from './icons/box-import.svg?component'
import _BracesIcon from './icons/braces.svg?component'
import _BrushCleaningIcon from './icons/brush-cleaning.svg?component'
import _CalendarIcon from './icons/calendar.svg?component'
import _CardIcon from './icons/card.svg?component'
import _ChangeSkinIcon from './icons/change-skin.svg?component'
import _ChartIcon from './icons/chart.svg?component'
import _CheckIcon from './icons/check.svg?component'
import _CheckCheckIcon from './icons/check-check.svg?component'
import _CheckCircleIcon from './icons/check-circle.svg?component'
import _CheckIcon from './icons/check.svg?component'
import _ChevronLeftIcon from './icons/chevron-left.svg?component'
import _ChevronRightIcon from './icons/chevron-right.svg?component'
import _ClearIcon from './icons/clear.svg?component'
@@ -56,13 +56,13 @@ import _EditIcon from './icons/edit.svg?component'
import _EllipsisVerticalIcon from './icons/ellipsis-vertical.svg?component'
import _ExpandIcon from './icons/expand.svg?component'
import _ExternalIcon from './icons/external.svg?component'
import _EyeOffIcon from './icons/eye-off.svg?component'
import _EyeIcon from './icons/eye.svg?component'
import _EyeOffIcon from './icons/eye-off.svg?component'
import _FileIcon from './icons/file.svg?component'
import _FileArchiveIcon from './icons/file-archive.svg?component'
import _FileTextIcon from './icons/file-text.svg?component'
import _FileIcon from './icons/file.svg?component'
import _FilterXIcon from './icons/filter-x.svg?component'
import _FilterIcon from './icons/filter.svg?component'
import _FilterXIcon from './icons/filter-x.svg?component'
import _FolderArchiveIcon from './icons/folder-archive.svg?component'
import _FolderOpenIcon from './icons/folder-open.svg?component'
import _FolderSearchIcon from './icons/folder-search.svg?component'
@@ -79,8 +79,8 @@ import _HashIcon from './icons/hash.svg?component'
import _Heading1Icon from './icons/heading-1.svg?component'
import _Heading2Icon from './icons/heading-2.svg?component'
import _Heading3Icon from './icons/heading-3.svg?component'
import _HeartHandshakeIcon from './icons/heart-handshake.svg?component'
import _HeartIcon from './icons/heart.svg?component'
import _HeartHandshakeIcon from './icons/heart-handshake.svg?component'
import _HistoryIcon from './icons/history.svg?component'
import _HomeIcon from './icons/home.svg?component'
import _ImageIcon from './icons/image.svg?component'
@@ -96,13 +96,13 @@ import _LeftArrowIcon from './icons/left-arrow.svg?component'
import _LibraryIcon from './icons/library.svg?component'
import _LightBulbIcon from './icons/light-bulb.svg?component'
import _LinkIcon from './icons/link.svg?component'
import _ListIcon from './icons/list.svg?component'
import _ListBulletedIcon from './icons/list-bulleted.svg?component'
import _ListEndIcon from './icons/list-end.svg?component'
import _ListOrderedIcon from './icons/list-ordered.svg?component'
import _ListIcon from './icons/list.svg?component'
import _LoaderIcon from './icons/loader.svg?component'
import _LockOpenIcon from './icons/lock-open.svg?component'
import _LockIcon from './icons/lock.svg?component'
import _LockOpenIcon from './icons/lock-open.svg?component'
import _LogInIcon from './icons/log-in.svg?component'
import _LogOutIcon from './icons/log-out.svg?component'
import _MailIcon from './icons/mail.svg?component'
@@ -113,8 +113,8 @@ import _MessageIcon from './icons/message.svg?component'
import _MicrophoneIcon from './icons/microphone.svg?component'
import _MinimizeIcon from './icons/minimize.svg?component'
import _MinusIcon from './icons/minus.svg?component'
import _MonitorSmartphoneIcon from './icons/monitor-smartphone.svg?component'
import _MonitorIcon from './icons/monitor.svg?component'
import _MonitorSmartphoneIcon from './icons/monitor-smartphone.svg?component'
import _MoonIcon from './icons/moon.svg?component'
import _MoreHorizontalIcon from './icons/more-horizontal.svg?component'
import _MoreVerticalIcon from './icons/more-vertical.svg?component'
@@ -123,16 +123,16 @@ import _NoSignalIcon from './icons/no-signal.svg?component'
import _NotepadTextIcon from './icons/notepad-text.svg?component'
import _OmorphiaIcon from './icons/omorphia.svg?component'
import _OrganizationIcon from './icons/organization.svg?component'
import _PackageIcon from './icons/package.svg?component'
import _PackageClosedIcon from './icons/package-closed.svg?component'
import _PackageOpenIcon from './icons/package-open.svg?component'
import _PackageIcon from './icons/package.svg?component'
import _PaintbrushIcon from './icons/paintbrush.svg?component'
import _PickaxeIcon from './icons/pickaxe.svg?component'
import _PlayIcon from './icons/play.svg?component'
import _PlugIcon from './icons/plug.svg?component'
import _PlusIcon from './icons/plus.svg?component'
import _RadioButtonCheckedIcon from './icons/radio-button-checked.svg?component'
import _RadioButtonIcon from './icons/radio-button.svg?component'
import _RadioButtonCheckedIcon from './icons/radio-button-checked.svg?component'
import _ReceiptTextIcon from './icons/receipt-text.svg?component'
import _RedoIcon from './icons/redo.svg?component'
import _ReplyIcon from './icons/reply.svg?component'
@@ -147,8 +147,8 @@ import _ScaleIcon from './icons/scale.svg?component'
import _ScanEyeIcon from './icons/scan-eye.svg?component'
import _SearchIcon from './icons/search.svg?component'
import _SendIcon from './icons/send.svg?component'
import _ServerPlusIcon from './icons/server-plus.svg?component'
import _ServerIcon from './icons/server.svg?component'
import _ServerPlusIcon from './icons/server-plus.svg?component'
import _SettingsIcon from './icons/settings.svg?component'
import _ShareIcon from './icons/share.svg?component'
import _ShieldIcon from './icons/shield.svg?component'
@@ -177,23 +177,23 @@ import _TrashIcon from './icons/trash.svg?component'
import _TriangleAlertIcon from './icons/triangle-alert.svg?component'
import _UnderlineIcon from './icons/underline.svg?component'
import _UndoIcon from './icons/undo.svg?component'
import _UnknownDonationIcon from './icons/unknown-donation.svg?component'
import _UnknownIcon from './icons/unknown.svg?component'
import _UnknownDonationIcon from './icons/unknown-donation.svg?component'
import _UnlinkIcon from './icons/unlink.svg?component'
import _UnplugIcon from './icons/unplug.svg?component'
import _UpdatedIcon from './icons/updated.svg?component'
import _UploadIcon from './icons/upload.svg?component'
import _UserIcon from './icons/user.svg?component'
import _UserPlusIcon from './icons/user-plus.svg?component'
import _UserXIcon from './icons/user-x.svg?component'
import _UserIcon from './icons/user.svg?component'
import _UsersIcon from './icons/users.svg?component'
import _VersionIcon from './icons/version.svg?component'
import _WikiIcon from './icons/wiki.svg?component'
import _WindowIcon from './icons/window.svg?component'
import _WorldIcon from './icons/world.svg?component'
import _WrenchIcon from './icons/wrench.svg?component'
import _XCircleIcon from './icons/x-circle.svg?component'
import _XIcon from './icons/x.svg?component'
import _XCircleIcon from './icons/x-circle.svg?component'
import _ZoomInIcon from './icons/zoom-in.svg?component'
import _ZoomOutIcon from './icons/zoom-out.svg?component'

View File

@@ -1,16 +1,16 @@
declare module '*.svg?component' {
import type { FunctionalComponent, SVGAttributes } from 'vue'
import type { FunctionalComponent, SVGAttributes } from 'vue'
const src: FunctionalComponent<SVGAttributes>
export default src
const src: FunctionalComponent<SVGAttributes>
export default src
}
declare module '*.webp' {
const src: string
export default src
const src: string
export default src
}
declare module '*?url' {
const src: string
export default src
const src: string
export default src
}

View File

@@ -8,9 +8,9 @@
import './omorphia.scss'
import _FourOhFourNotFound from './branding/404.svg?component'
// Branding
import _ModrinthIcon from './branding/logo.svg?component'
import _FourOhFourNotFound from './branding/404.svg?component'
import _ModrinthPlusIcon from './branding/modrinth-plus.svg?component'
import _AngryRinthbot from './branding/rinthbot/angry.webp'
import _AnnoyedRinthbot from './branding/rinthbot/annoyed.webp'
@@ -22,14 +22,6 @@ import _SleepingRinthbot from './branding/rinthbot/sleeping.webp'
import _SobbingRinthbot from './branding/rinthbot/sobbing.webp'
import _ThinkingRinthbot from './branding/rinthbot/thinking.webp'
import _WavingRinthbot from './branding/rinthbot/waving.webp'
// External Icons
import _SSODiscordIcon from './external/sso/discord.svg?component'
import _SSOGitHubIcon from './external/sso/github.svg?component'
import _SSOGitLabIcon from './external/sso/gitlab.svg?component'
import _SSOGoogleIcon from './external/sso/google.svg?component'
import _SSOMicrosoftIcon from './external/sso/microsoft.svg?component'
import _SSOSteamIcon from './external/sso/steam.svg?component'
import _AppleIcon from './external/apple.svg?component'
import _BlueskyIcon from './external/bluesky.svg?component'
import _BuyMeACoffeeIcon from './external/bmac.svg?component'
@@ -42,6 +34,13 @@ import _OpenCollectiveIcon from './external/opencollective.svg?component'
import _PatreonIcon from './external/patreon.svg?component'
import _PayPalIcon from './external/paypal.svg?component'
import _RedditIcon from './external/reddit.svg?component'
// External Icons
import _SSODiscordIcon from './external/sso/discord.svg?component'
import _SSOGitHubIcon from './external/sso/github.svg?component'
import _SSOGitLabIcon from './external/sso/gitlab.svg?component'
import _SSOGoogleIcon from './external/sso/google.svg?component'
import _SSOMicrosoftIcon from './external/sso/microsoft.svg?component'
import _SSOSteamIcon from './external/sso/steam.svg?component'
import _TumblrIcon from './external/tumblr.svg?component'
import _TwitterIcon from './external/twitter.svg?component'
import _WindowsIcon from './external/windows.svg?component'
@@ -84,7 +83,6 @@ export const WindowsIcon = _WindowsIcon
export const YouTubeIcon = _YouTubeIcon
// Skin Models
export * from './generated-icons'
export { default as ClassicPlayerModel } from './models/classic-player.gltf?url'
export { default as SlimPlayerModel } from './models/slim-player.gltf?url'
export * from './generated-icons'

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,21 +1,19 @@
{
"name": "@modrinth/assets",
"version": "0.0.0",
"private": true,
"main": "./index.ts",
"types": "./index.ts",
"scripts": {
"lint": "pnpm run icons:validate && eslint . && prettier --check .",
"fix": "pnpm run icons:generate && eslint . --fix && prettier --write .",
"icons:test": "jiti build/generate-exports.ts --test",
"icons:validate": "jiti build/generate-exports.ts --validate",
"icons:generate": "jiti build/generate-exports.ts"
},
"devDependencies": {
"eslint": "^8.57.0",
"eslint-config-custom": "workspace:*",
"jiti": "^2.4.2",
"tsconfig": "workspace:*",
"vue": "^3.5.13"
}
"name": "@modrinth/assets",
"version": "0.0.0",
"private": true,
"main": "./index.ts",
"types": "./index.ts",
"scripts": {
"lint": "pnpm run icons:validate && eslint . && prettier --check .",
"fix": "pnpm run icons:generate && eslint . --fix && prettier --write .",
"icons:test": "jiti build/generate-exports.ts --test",
"icons:validate": "jiti build/generate-exports.ts --validate",
"icons:generate": "jiti build/generate-exports.ts"
},
"devDependencies": {
"@modrinth/tooling-config": "workspace:*",
"jiti": "^2.4.2",
"vue": "^3.5.13"
}
}

View File

@@ -1,6 +1,6 @@
button:focus-visible,
a:focus-visible,
[tabindex='0']:focus-visible {
outline: 0.25rem solid #ea80ff;
border-radius: 0.25rem;
outline: 0.25rem solid #ea80ff;
border-radius: 0.25rem;
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,45 +1,45 @@
// Use border box on everything to preserve everyone's sanity
* {
box-sizing: border-box;
box-sizing: border-box;
}
body {
// Defaults
background-color: var(--color-bg);
color: var(--color-base);
--font-standard: Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Oxygen, Ubuntu, Roboto,
Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
--mono-font: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
font-family: var(--font-standard);
font-size: 16px;
font-weight: var(--font-weight-regular);
margin: 0;
padding: 0;
// Defaults
background-color: var(--color-bg);
color: var(--color-base);
--font-standard: Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Oxygen, Ubuntu, Roboto,
Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
--mono-font: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
font-family: var(--font-standard);
font-size: 16px;
font-weight: var(--font-weight-regular);
margin: 0;
padding: 0;
// Font Sizes
--font-size-xxs: 0.625rem; //10px
--font-size-xs: 0.75rem; //12px
--font-size-sm: 0.875rem; //14px
--font-size-nm: 1rem; //16px
--font-size-md: 1.125rem; //18px
--font-size-lg: 1.25rem; //20px
--font-size-xl: 1.5rem; //24px
--font-size-2xl: 2rem; //32px
--font-size-3xl: 3rem; //48px
// Font Sizes
--font-size-xxs: 0.625rem; //10px
--font-size-xs: 0.75rem; //12px
--font-size-sm: 0.875rem; //14px
--font-size-nm: 1rem; //16px
--font-size-md: 1.125rem; //18px
--font-size-lg: 1.25rem; //20px
--font-size-xl: 1.5rem; //24px
--font-size-2xl: 2rem; //32px
--font-size-3xl: 3rem; //48px
// Font Weights
--font-weight-regular: 400;
--font-weight-medium: 500;
--font-weight-bold: 700;
--font-weight-extrabold: 800;
// Font Weights
--font-weight-regular: 400;
--font-weight-medium: 500;
--font-weight-bold: 700;
--font-weight-extrabold: 800;
--font-weight-text: var(--font-weight-medium);
--font-weight-heading: var(--font-weight-extrabold);
--font-weight-title: var(--font-weight-extrabold);
--font-weight-text: var(--font-weight-medium);
--font-weight-heading: var(--font-weight-extrabold);
--font-weight-title: var(--font-weight-extrabold);
}
a.uncolored {
color: inherit;
color: inherit;
}
input[type='text'],
@@ -49,189 +49,189 @@ input[type='password'],
textarea,
.input-text-inherit,
.cm-content {
border-radius: var(--radius-md);
box-sizing: border-box;
// safari iOS rounds inputs by default
// set the appearance to none to prevent this
appearance: none !important;
background: var(--color-button-bg);
color: var(--color-base);
padding: 0.5rem 1rem;
font-weight: var(--font-weight-medium);
transition: box-shadow 0.1s ease-in-out;
min-height: 36px;
box-shadow:
var(--shadow-inset-sm),
0 0 0 0 transparent;
border: none;
outline: none;
border-radius: var(--radius-md);
box-sizing: border-box;
// safari iOS rounds inputs by default
// set the appearance to none to prevent this
appearance: none !important;
background: var(--color-button-bg);
color: var(--color-base);
padding: 0.5rem 1rem;
font-weight: var(--font-weight-medium);
transition: box-shadow 0.1s ease-in-out;
min-height: 36px;
box-shadow:
var(--shadow-inset-sm),
0 0 0 0 transparent;
border: none;
outline: none;
&:focus,
&:focus-visible {
box-shadow:
inset 0 0 0 transparent,
0 0 0 0.25rem var(--color-brand-shadow);
color: var(--color-contrast);
outline: none;
}
&:focus,
&:focus-visible {
box-shadow:
inset 0 0 0 transparent,
0 0 0 0.25rem var(--color-brand-shadow);
color: var(--color-contrast);
outline: none;
}
&:disabled,
&[disabled] {
opacity: 0.6;
pointer-events: none;
cursor: not-allowed;
}
&:disabled,
&[disabled] {
opacity: 0.6;
pointer-events: none;
cursor: not-allowed;
}
&:focus::placeholder {
opacity: 0.8;
}
&:focus::placeholder {
opacity: 0.8;
}
&::placeholder {
color: var(--color-base);
opacity: 0.6;
}
&::placeholder {
color: var(--color-base);
opacity: 0.6;
}
}
.cm-content {
white-space: pre-wrap !important;
white-space: pre-wrap !important;
}
input[type='number'] {
&::-webkit-inner-spin-button,
&::-webkit-outer-spin-button {
-webkit-appearance: none;
margin: 0;
}
&::-webkit-inner-spin-button,
&::-webkit-outer-spin-button {
-webkit-appearance: none;
margin: 0;
}
}
.dropdown-input {
display: flex;
flex-direction: row;
gap: 1px;
.animated-dropdown {
width: unset;
display: flex;
flex-direction: row;
gap: 1px;
.animated-dropdown {
width: unset;
.selected {
border-radius: var(--radius-md) 0 0 var(--radius-md);
.selected {
border-radius: var(--radius-md) 0 0 var(--radius-md);
&.render-down {
border-radius: var(--radius-md) 0 0 0;
}
&.render-down {
border-radius: var(--radius-md) 0 0 0;
}
&.render-up {
border-radius: 0 0 0 var(--radius-md);
}
}
}
&.render-up {
border-radius: 0 0 0 var(--radius-md);
}
}
}
input {
border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
input {
border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
}
.iconified-input {
align-items: center;
display: inline-flex;
position: relative;
align-items: center;
display: inline-flex;
position: relative;
input {
padding: 0 0.5rem 0 2.5rem;
width: 100%;
}
input {
padding: 0 0.5rem 0 2.5rem;
width: 100%;
}
&:focus-within svg {
opacity: 1;
color: var(--color-contrast);
}
&:focus-within svg {
opacity: 1;
color: var(--color-contrast);
}
svg {
position: absolute;
left: 0.75rem;
height: 1.25rem;
width: 1.25rem;
z-index: 1;
svg {
position: absolute;
left: 0.75rem;
height: 1.25rem;
width: 1.25rem;
z-index: 1;
color: var(--color-base);
opacity: 0.6;
}
color: var(--color-base);
opacity: 0.6;
}
.r-btn {
@extend .transparent, .icon-only;
.r-btn {
@extend .transparent, .icon-only;
position: absolute;
right: 0.125rem;
z-index: 1;
position: absolute;
right: 0.125rem;
z-index: 1;
svg {
position: relative;
left: 0;
}
}
svg {
position: relative;
left: 0;
}
}
}
svg {
height: 1em;
width: 1em;
height: 1em;
width: 1em;
}
.chart {
svg {
height: 100%;
width: 100%;
}
svg {
height: 100%;
width: 100%;
}
}
.button-animation {
transition:
opacity 0.5s ease-in-out,
filter 0.2s ease-in-out,
transform 0.05s ease-in-out,
outline 0.2s ease-in-out;
transition:
opacity 0.5s ease-in-out,
filter 0.2s ease-in-out,
transform 0.05s ease-in-out,
outline 0.2s ease-in-out;
&:active:not(&:disabled) {
transform: scale(0.95);
}
&:active:not(&:disabled) {
transform: scale(0.95);
}
}
input,
button {
&:disabled {
cursor: not-allowed !important;
}
&:disabled {
cursor: not-allowed !important;
}
}
@media (prefers-reduced-motion) {
.button-animation,
button {
transform: none !important;
}
.button-animation,
button {
transform: none !important;
}
}
input,
button {
&:disabled {
cursor: not-allowed !important;
}
&:disabled {
cursor: not-allowed !important;
}
}
@media (prefers-reduced-motion) {
.button-animation,
button {
transform: none !important;
}
.button-animation,
button {
transform: none !important;
}
}
h1 {
color: var(--color-contrast);
color: var(--color-contrast);
}
h2 {
margin-top: 0;
margin-bottom: 1rem;
color: var(--color-contrast);
margin-top: 0;
margin-bottom: 1rem;
color: var(--color-contrast);
}
h3 {
margin-block: var(--gap-md) var(--gap-md);
color: var(--color-contrast);
margin-block: var(--gap-md) var(--gap-md);
color: var(--color-contrast);
}

View File

@@ -1,10 +1,10 @@
.hljs,
.hljs-subst {
color: #444;
color: #444;
}
.hljs-comment {
color: #888888;
color: #888888;
}
.hljs-keyword,
@@ -13,8 +13,8 @@
.hljs-meta-keyword,
.hljs-doctag,
.hljs-name {
color: #f58300;
font-weight: bold;
color: #f58300;
font-weight: bold;
}
.hljs-type,
@@ -25,13 +25,13 @@
.hljs-quote,
.hljs-template-tag,
.hljs-deletion {
color: var(--color-brand);
color: var(--color-brand);
}
.hljs-title,
.hljs-section {
color: #008888;
font-weight: bold;
color: #008888;
font-weight: bold;
}
.hljs-regexp,
@@ -41,49 +41,49 @@
.hljs-link,
.hljs-selector-attr,
.hljs-selector-pseudo {
color: #bc6060;
color: #bc6060;
}
.hljs-literal {
color: #78a960;
color: #78a960;
}
.hljs-built_in,
.hljs-bullet,
.hljs-code,
.hljs-addition {
color: #f58300;
color: #f58300;
}
.hljs-meta {
color: #1f7199;
color: #1f7199;
}
.hljs-meta-string {
color: #4d99bf;
color: #4d99bf;
}
.hljs-emphasis {
font-style: italic;
font-style: italic;
}
.hljs-strong {
font-weight: bold;
font-weight: bold;
}
pre {
background-color: #222222;
padding: 1em 1em 1em 1em;
border-width: 5px;
border-radius: 2em;
border-color: var(--color-button-bg);
overflow-x: hidden;
background-color: #222222;
padding: 1em 1em 1em 1em;
border-width: 5px;
border-radius: 2em;
border-color: var(--color-button-bg);
overflow-x: hidden;
code {
line-height: 100%;
padding: 0.2em;
letter-spacing: -0.05em;
word-break: normal;
font-family: monospace;
}
code {
line-height: 100%;
padding: 0.2em;
letter-spacing: -0.05em;
word-break: normal;
font-family: monospace;
}
}

View File

@@ -1,45 +1,45 @@
@font-face {
font-family: inter;
font-style: normal;
font-weight: 400;
font-display: swap;
src:
url('https://cdn-raw.modrinth.com/fonts/inter/Inter-Regular.woff2?v=3.19') format('woff2'),
url('https://cdn-raw.modrinth.com/fonts/inter/Inter-Regular.woff?v=3.19') format('woff');
font-family: inter;
font-style: normal;
font-weight: 400;
font-display: swap;
src:
url('https://cdn-raw.modrinth.com/fonts/inter/Inter-Regular.woff2?v=3.19') format('woff2'),
url('https://cdn-raw.modrinth.com/fonts/inter/Inter-Regular.woff?v=3.19') format('woff');
}
@font-face {
font-family: inter;
font-style: normal;
font-weight: 500;
font-display: swap;
src:
url('https://cdn-raw.modrinth.com/fonts/inter/Inter-Medium.woff2?v=3.19') format('woff2'),
url('https://cdn-raw.modrinth.com/fonts/inter/Inter-Medium.woff?v=3.19') format('woff');
font-family: inter;
font-style: normal;
font-weight: 500;
font-display: swap;
src:
url('https://cdn-raw.modrinth.com/fonts/inter/Inter-Medium.woff2?v=3.19') format('woff2'),
url('https://cdn-raw.modrinth.com/fonts/inter/Inter-Medium.woff?v=3.19') format('woff');
}
@font-face {
font-family: inter;
font-style: normal;
font-weight: 600;
font-display: swap;
src:
url('https://cdn-raw.modrinth.com/fonts/inter/Inter-SemiBold.woff2?v=3.19') format('woff2'),
url('https://cdn-raw.modrinth.com/fonts/inter/Inter-SemiBold.woff?v=3.19') format('woff');
font-family: inter;
font-style: normal;
font-weight: 600;
font-display: swap;
src:
url('https://cdn-raw.modrinth.com/fonts/inter/Inter-SemiBold.woff2?v=3.19') format('woff2'),
url('https://cdn-raw.modrinth.com/fonts/inter/Inter-SemiBold.woff?v=3.19') format('woff');
}
@font-face {
font-family: inter;
font-style: normal;
font-weight: 700;
font-display: swap;
src:
url('https://cdn-raw.modrinth.com/fonts/inter/Inter-Bold.woff2?v=3.19') format('woff2'),
url('https://cdn-raw.modrinth.com/fonts/inter/Inter-Bold.woff?v=3.19') format('woff');
font-family: inter;
font-style: normal;
font-weight: 700;
font-display: swap;
src:
url('https://cdn-raw.modrinth.com/fonts/inter/Inter-Bold.woff2?v=3.19') format('woff2'),
url('https://cdn-raw.modrinth.com/fonts/inter/Inter-Bold.woff?v=3.19') format('woff');
}
@font-face {
font-family: inter;
font-style: normal;
font-weight: 800;
font-display: swap;
src:
url('https://cdn-raw.modrinth.com/fonts/inter/Inter-ExtraBold.woff2?v=3.19') format('woff2'),
url('https://cdn-raw.modrinth.com/fonts/inter/Inter-ExtraBold.woff?v=3.19') format('woff');
font-family: inter;
font-style: normal;
font-weight: 800;
font-display: swap;
src:
url('https://cdn-raw.modrinth.com/fonts/inter/Inter-ExtraBold.woff2?v=3.19') format('woff2'),
url('https://cdn-raw.modrinth.com/fonts/inter/Inter-ExtraBold.woff?v=3.19') format('woff');
}

View File

@@ -9,8 +9,8 @@
*/
html {
line-height: 1.15; /* 1 */
-webkit-text-size-adjust: 100%; /* 2 */
line-height: 1.15; /* 1 */
-webkit-text-size-adjust: 100%; /* 2 */
}
/* Sections
@@ -21,7 +21,7 @@ html {
*/
body {
margin: 0;
margin: 0;
}
/**
@@ -29,7 +29,7 @@ body {
*/
main {
display: block;
display: block;
}
/**
@@ -38,8 +38,8 @@ main {
*/
h1 {
font-size: 2em;
margin: 0.67em 0;
font-size: 2em;
margin: 0.67em 0;
}
/* Grouping content
@@ -51,9 +51,9 @@ h1 {
*/
hr {
box-sizing: content-box; /* 1 */
height: 0; /* 1 */
overflow: visible; /* 2 */
box-sizing: content-box; /* 1 */
height: 0; /* 1 */
overflow: visible; /* 2 */
}
/**
@@ -62,8 +62,8 @@ hr {
*/
pre {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}
/* Text-level semantics
@@ -74,7 +74,7 @@ pre {
*/
a {
background-color: transparent;
background-color: transparent;
}
/**
@@ -83,9 +83,9 @@ a {
*/
abbr[title] {
border-bottom: none; /* 1 */
text-decoration: underline; /* 2 */
text-decoration: underline dotted; /* 2 */
border-bottom: none; /* 1 */
text-decoration: underline; /* 2 */
text-decoration: underline dotted; /* 2 */
}
/**
@@ -94,7 +94,7 @@ abbr[title] {
b,
strong {
font-weight: bolder;
font-weight: bolder;
}
/**
@@ -105,8 +105,8 @@ strong {
code,
kbd,
samp {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}
/**
@@ -114,7 +114,7 @@ samp {
*/
small {
font-size: 80%;
font-size: 80%;
}
/**
@@ -124,18 +124,18 @@ small {
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
bottom: -0.25em;
}
sup {
top: -0.5em;
top: -0.5em;
}
/* Embedded content
@@ -146,7 +146,7 @@ sup {
*/
img {
border-style: none;
border-style: none;
}
/* Forms
@@ -162,10 +162,10 @@ input,
optgroup,
select,
textarea {
font-family: inherit; /* 1 */
font-size: 100%; /* 1 */
line-height: 1.15; /* 1 */
margin: 0; /* 2 */
font-family: inherit; /* 1 */
font-size: 100%; /* 1 */
line-height: 1.15; /* 1 */
margin: 0; /* 2 */
}
/**
@@ -175,8 +175,8 @@ textarea {
button,
input {
/* 1 */
overflow: visible;
/* 1 */
overflow: visible;
}
/**
@@ -186,8 +186,8 @@ input {
button,
select {
/* 1 */
text-transform: none;
/* 1 */
text-transform: none;
}
/**
@@ -198,7 +198,7 @@ button,
[type='button'],
[type='reset'],
[type='submit'] {
-webkit-appearance: button;
-webkit-appearance: button;
}
/**
@@ -209,8 +209,8 @@ button::-moz-focus-inner,
[type='button']::-moz-focus-inner,
[type='reset']::-moz-focus-inner,
[type='submit']::-moz-focus-inner {
border-style: none;
padding: 0;
border-style: none;
padding: 0;
}
/**
@@ -221,7 +221,7 @@ button:-moz-focusring,
[type='button']:-moz-focusring,
[type='reset']:-moz-focusring,
[type='submit']:-moz-focusring {
outline: 1px dotted ButtonText;
outline: 1px dotted ButtonText;
}
/**
@@ -229,7 +229,7 @@ button:-moz-focusring,
*/
fieldset {
padding: 0.35em 0.75em 0.625em;
padding: 0.35em 0.75em 0.625em;
}
/**
@@ -240,12 +240,12 @@ fieldset {
*/
legend {
box-sizing: border-box; /* 1 */
color: inherit; /* 2 */
display: table; /* 1 */
max-width: 100%; /* 1 */
padding: 0; /* 3 */
white-space: normal; /* 1 */
box-sizing: border-box; /* 1 */
color: inherit; /* 2 */
display: table; /* 1 */
max-width: 100%; /* 1 */
padding: 0; /* 3 */
white-space: normal; /* 1 */
}
/**
@@ -253,7 +253,7 @@ legend {
*/
progress {
vertical-align: baseline;
vertical-align: baseline;
}
/**
@@ -261,7 +261,7 @@ progress {
*/
textarea {
overflow: auto;
overflow: auto;
}
/**
@@ -271,8 +271,8 @@ textarea {
[type='checkbox'],
[type='radio'] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
}
/**
@@ -281,7 +281,7 @@ textarea {
[type='number']::-webkit-inner-spin-button,
[type='number']::-webkit-outer-spin-button {
height: auto;
height: auto;
}
/**
@@ -290,8 +290,8 @@ textarea {
*/
[type='search'] {
-webkit-appearance: textfield; /* 1 */
outline-offset: -2px; /* 2 */
-webkit-appearance: textfield; /* 1 */
outline-offset: -2px; /* 2 */
}
/**
@@ -299,7 +299,7 @@ textarea {
*/
[type='search']::-webkit-search-decoration {
-webkit-appearance: none;
-webkit-appearance: none;
}
/**
@@ -308,8 +308,8 @@ textarea {
*/
::-webkit-file-upload-button {
-webkit-appearance: button; /* 1 */
font: inherit; /* 2 */
-webkit-appearance: button; /* 1 */
font: inherit; /* 2 */
}
/* Interactive
@@ -320,7 +320,7 @@ textarea {
*/
details {
display: block;
display: block;
}
/*
@@ -328,7 +328,7 @@ details {
*/
summary {
display: list-item;
display: list-item;
}
/* Misc
@@ -339,7 +339,7 @@ summary {
*/
template {
display: none;
display: none;
}
/**
@@ -347,5 +347,5 @@ template {
*/
[hidden] {
display: none;
display: none;
}

View File

@@ -1,292 +1,292 @@
.light-properties {
--color-bg: #e5e7eb;
--color-raised-bg: #ffffff;
--color-super-raised-bg: #e9e9e9;
--color-button-bg: hsl(220, 13%, 91%);
--color-button-border: rgba(161, 161, 161, 0.35);
--color-scrollbar: #96a2b0;
--color-bg: #e5e7eb;
--color-raised-bg: #ffffff;
--color-super-raised-bg: #e9e9e9;
--color-button-bg: hsl(220, 13%, 91%);
--color-button-border: rgba(161, 161, 161, 0.35);
--color-scrollbar: #96a2b0;
--color-divider: #babfc5;
--color-divider-dark: #c8cdd3;
--color-divider: #babfc5;
--color-divider-dark: #c8cdd3;
--color-base: hsl(221, 39%, 11%);
--color-secondary: #6b7280;
--color-contrast: #1a202c;
--color-accent-contrast: #ffffff;
--color-base: hsl(221, 39%, 11%);
--color-secondary: #6b7280;
--color-contrast: #1a202c;
--color-accent-contrast: #ffffff;
--color-red: #cb2245;
--color-orange: #e08325;
--color-green: #00af5c;
--color-blue: #1f68c0;
--color-purple: #8e32f3;
--color-gray: #595b61;
--color-red: #cb2245;
--color-orange: #e08325;
--color-green: #00af5c;
--color-blue: #1f68c0;
--color-purple: #8e32f3;
--color-gray: #595b61;
--color-red-highlight: rgba(203, 34, 69, 0.25);
--color-orange-highlight: rgba(224, 131, 37, 0.25);
--color-green-highlight: rgba(0, 175, 92, 0.25);
--color-blue-highlight: rgba(31, 104, 192, 0.25);
--color-purple-highlight: rgba(142, 50, 243, 0.25);
--color-gray-highlight: rgba(89, 91, 97, 0.25);
--color-red-highlight: rgba(203, 34, 69, 0.25);
--color-orange-highlight: rgba(224, 131, 37, 0.25);
--color-green-highlight: rgba(0, 175, 92, 0.25);
--color-blue-highlight: rgba(31, 104, 192, 0.25);
--color-purple-highlight: rgba(142, 50, 243, 0.25);
--color-gray-highlight: rgba(89, 91, 97, 0.25);
--color-red-bg: rgba(203, 34, 69, 0.1);
--color-orange-bg: rgba(224, 131, 37, 0.1);
--color-green-bg: rgba(0, 175, 92, 0.1);
--color-blue-bg: rgba(31, 104, 192, 0.1);
--color-purple-bg: rgba(142, 50, 243, 0.1);
--color-red-bg: rgba(203, 34, 69, 0.1);
--color-orange-bg: rgba(224, 131, 37, 0.1);
--color-green-bg: rgba(0, 175, 92, 0.1);
--color-blue-bg: rgba(31, 104, 192, 0.1);
--color-purple-bg: rgba(142, 50, 243, 0.1);
--color-brand: var(--color-green);
--color-brand-highlight: var(--color-green-highlight);
--color-brand-shadow: rgba(0, 175, 92, 0.7);
--color-brand: var(--color-green);
--color-brand-highlight: var(--color-green-highlight);
--color-brand-shadow: rgba(0, 175, 92, 0.7);
--shadow-inset-lg: inset 0px -2px 2px hsla(221, 39%, 91%, 0.1);
--shadow-inset: inset 0px -2px 2px hsla(221, 39%, 91%, 0.05);
--shadow-inset-sm: inset 0px -1px 2px hsla(221, 39%, 91%, 0.15);
--shadow-inset-lg: inset 0px -2px 2px hsla(221, 39%, 91%, 0.1);
--shadow-inset: inset 0px -2px 2px hsla(221, 39%, 91%, 0.05);
--shadow-inset-sm: inset 0px -1px 2px hsla(221, 39%, 91%, 0.15);
--shadow-raised-lg: 0px 2px 4px hsla(221, 39%, 11%, 0.2);
--shadow-raised: 0.3px 0.5px 0.6px hsl(var(--shadow-color) / 0.15),
1px 2px 2.2px -1.7px hsl(var(--shadow-color) / 0.12),
4.4px 8.8px 9.7px -3.4px hsl(var(--shadow-color) / 0.09);
--shadow-floating: hsla(0, 0%, 0%, 0) 0px 0px 0px 0px, hsla(0, 0%, 0%, 0) 0px 0px 0px 0px,
hsla(0, 0%, 0%, 0.1) 0px 4px 6px -1px, hsla(0, 0%, 0%, 0.1) 0px 2px 4px -1px;
--shadow-raised-lg: 0px 2px 4px hsla(221, 39%, 11%, 0.2);
--shadow-raised: 0.3px 0.5px 0.6px hsl(var(--shadow-color) / 0.15),
1px 2px 2.2px -1.7px hsl(var(--shadow-color) / 0.12),
4.4px 8.8px 9.7px -3.4px hsl(var(--shadow-color) / 0.09);
--shadow-floating: hsla(0, 0%, 0%, 0) 0px 0px 0px 0px, hsla(0, 0%, 0%, 0) 0px 0px 0px 0px,
hsla(0, 0%, 0%, 0.1) 0px 4px 6px -1px, hsla(0, 0%, 0%, 0.1) 0px 2px 4px -1px;
--shadow-card: rgba(50, 50, 100, 0.1) 0px 2px 4px 0px;
--shadow-card: rgba(50, 50, 100, 0.1) 0px 2px 4px 0px;
--brand-gradient-bg: linear-gradient(
0deg,
rgba(68, 182, 138, 0.175) 0%,
rgba(58, 250, 112, 0.125) 100%
);
--brand-gradient-strong-bg: linear-gradient(
270deg,
rgba(68, 182, 138, 0.175) 0%,
rgba(36, 225, 91, 0.12) 100%
);
--brand-gradient-button: rgba(255, 255, 255, 0.5);
--brand-gradient-border: rgba(32, 64, 32, 0.15);
--brand-gradient-fade-out-color: linear-gradient(to bottom, rgba(213, 235, 224, 0), #d0ece0 70%);
--brand-gradient-bg: linear-gradient(
0deg,
rgba(68, 182, 138, 0.175) 0%,
rgba(58, 250, 112, 0.125) 100%
);
--brand-gradient-strong-bg: linear-gradient(
270deg,
rgba(68, 182, 138, 0.175) 0%,
rgba(36, 225, 91, 0.12) 100%
);
--brand-gradient-button: rgba(255, 255, 255, 0.5);
--brand-gradient-border: rgba(32, 64, 32, 0.15);
--brand-gradient-fade-out-color: linear-gradient(to bottom, rgba(213, 235, 224, 0), #d0ece0 70%);
--color-button-bg-selected: var(--color-brand);
--color-button-text-selected: var(--color-accent-contrast);
--color-button-bg-selected: var(--color-brand);
--color-button-text-selected: var(--color-accent-contrast);
--color-gradient-button-bg: linear-gradient(180deg, #f8f9fa 0%, #dce0e6 100%);
--color-gradient-button-bg: linear-gradient(180deg, #f8f9fa 0%, #dce0e6 100%);
--loading-bar-gradient: linear-gradient(to right, var(--color-brand) 0%, #00af5c 100%);
--loading-bar-gradient: linear-gradient(to right, var(--color-brand) 0%, #00af5c 100%);
--color-platform-fabric: #8a7b71;
--color-platform-quilt: #8b61b4;
--color-platform-forge: #5b6197;
--color-platform-neoforge: #dc895c;
--color-platform-liteloader: #4c90de;
--color-platform-bukkit: #e78362;
--color-platform-bungeecord: #c69e39;
--color-platform-folia: #6aa54f;
--color-platform-paper: #e67e7e;
--color-platform-purpur: #7763a3;
--color-platform-spigot: #cd7a21;
--color-platform-velocity: #4b98b0;
--color-platform-waterfall: #5f83cb;
--color-platform-sponge: #c49528;
--color-platform-ornithe: #6097ca;
--color-platform-bta-babric: #5ba938;
--color-platform-legacy-fabric: #6879f6;
--color-platform-nilloader: #dd5088;
--color-platform-fabric: #8a7b71;
--color-platform-quilt: #8b61b4;
--color-platform-forge: #5b6197;
--color-platform-neoforge: #dc895c;
--color-platform-liteloader: #4c90de;
--color-platform-bukkit: #e78362;
--color-platform-bungeecord: #c69e39;
--color-platform-folia: #6aa54f;
--color-platform-paper: #e67e7e;
--color-platform-purpur: #7763a3;
--color-platform-spigot: #cd7a21;
--color-platform-velocity: #4b98b0;
--color-platform-waterfall: #5f83cb;
--color-platform-sponge: #c49528;
--color-platform-ornithe: #6097ca;
--color-platform-bta-babric: #5ba938;
--color-platform-legacy-fabric: #6879f6;
--color-platform-nilloader: #dd5088;
--hover-brightness: 0.9;
--hover-brightness: 0.9;
}
html {
@extend .light-properties;
--dark-color-base: #b0bac5;
--dark-color-contrast: #ecf9fb;
@extend .light-properties;
--dark-color-base: #b0bac5;
--dark-color-contrast: #ecf9fb;
--gap-xs: 0.25rem;
--gap-sm: 0.5rem;
--gap-md: 0.75rem;
--gap-lg: 1rem;
--gap-xl: 1.5rem;
--gap-xs: 0.25rem;
--gap-sm: 0.5rem;
--gap-md: 0.75rem;
--gap-lg: 1rem;
--gap-xl: 1.5rem;
--radius-xs: 0.25rem;
--radius-sm: 0.5rem;
--radius-md: 0.75rem;
--radius-lg: 1rem;
--radius-xl: 1.25rem;
--radius-max: 999999999px;
--radius-xs: 0.25rem;
--radius-sm: 0.5rem;
--radius-md: 0.75rem;
--radius-lg: 1rem;
--radius-xl: 1.25rem;
--radius-max: 999999999px;
--color-tooltip-text: var(--dark-color-contrast);
--color-tooltip-bg: #000;
--color-tooltip-text: var(--dark-color-contrast);
--color-tooltip-bg: #000;
--color-ad: rgba(125, 75, 162, 0.2);
--color-ad-raised: rgba(190, 140, 243, 0.5);
--color-ad-contrast: black;
--color-ad-highlight: var(--color-purple);
--color-ad: rgba(125, 75, 162, 0.2);
--color-ad-raised: rgba(190, 140, 243, 0.5);
--color-ad-contrast: black;
--color-ad-highlight: var(--color-purple);
}
.light-mode,
.light {
@extend .light-properties;
@extend .light-properties;
}
.dark-mode,
.dark,
:root[data-theme='dark'] {
--color-bg: #16181c;
--color-raised-bg: #26292f;
--color-super-raised-bg: #40434a;
--color-button-bg: hsl(222, 13%, 30%);
--color-button-border: rgba(193, 190, 209, 0.12);
--color-scrollbar: var(--color-button-bg);
--color-bg: #16181c;
--color-raised-bg: #26292f;
--color-super-raised-bg: #40434a;
--color-button-bg: hsl(222, 13%, 30%);
--color-button-border: rgba(193, 190, 209, 0.12);
--color-scrollbar: var(--color-button-bg);
--color-divider: var(--color-button-bg);
--color-divider-dark: #646c75;
--color-divider: var(--color-button-bg);
--color-divider-dark: #646c75;
--color-base: var(--dark-color-base);
--color-secondary: #96a2b0;
--color-contrast: var(--dark-color-contrast);
--color-accent-contrast: #000000;
--color-base: var(--dark-color-base);
--color-secondary: #96a2b0;
--color-contrast: var(--dark-color-contrast);
--color-accent-contrast: #000000;
--color-red: #ff496e;
--color-orange: #ffa347;
--color-green: #1bd96a;
--color-blue: #4f9cff;
--color-purple: #c78aff;
--color-gray: #9fa4b3;
--color-red: #ff496e;
--color-orange: #ffa347;
--color-green: #1bd96a;
--color-blue: #4f9cff;
--color-purple: #c78aff;
--color-gray: #9fa4b3;
--color-red-highlight: rgba(255, 73, 110, 0.25);
--color-orange-highlight: rgba(255, 163, 71, 0.25);
--color-green-highlight: rgba(27, 217, 106, 0.25);
--color-blue-highlight: rgba(79, 156, 255, 0.25);
--color-purple-highlight: rgba(199, 138, 255, 0.25);
--color-gray-highlight: rgba(159, 164, 179, 0.25);
--color-red-highlight: rgba(255, 73, 110, 0.25);
--color-orange-highlight: rgba(255, 163, 71, 0.25);
--color-green-highlight: rgba(27, 217, 106, 0.25);
--color-blue-highlight: rgba(79, 156, 255, 0.25);
--color-purple-highlight: rgba(199, 138, 255, 0.25);
--color-gray-highlight: rgba(159, 164, 179, 0.25);
--color-red-bg: rgba(255, 73, 110, 0.2);
--color-orange-bg: rgba(255, 163, 71, 0.2);
--color-green-bg: rgba(27, 217, 106, 0.2);
--color-blue-bg: rgba(79, 156, 255, 0.2);
--color-purple-bg: rgba(199, 138, 255, 0.2);
--color-red-bg: rgba(255, 73, 110, 0.2);
--color-orange-bg: rgba(255, 163, 71, 0.2);
--color-green-bg: rgba(27, 217, 106, 0.2);
--color-blue-bg: rgba(79, 156, 255, 0.2);
--color-purple-bg: rgba(199, 138, 255, 0.2);
--color-brand: var(--color-green);
--color-brand-highlight: rgba(27, 217, 106, 0.25);
--color-brand-shadow: rgba(27, 217, 106, 0.7);
--color-brand: var(--color-green);
--color-brand-highlight: rgba(27, 217, 106, 0.25);
--color-brand-shadow: rgba(27, 217, 106, 0.7);
--shadow-inset-lg: inset 0px -2px 2px hsla(221, 39%, 11%, 0.1);
--shadow-inset: inset 0px -2px 2px hsla(221, 39%, 11%, 0.05);
--shadow-inset-sm: inset 0px -1px 1px hsla(221, 39%, 11%, 0.25);
--shadow-inset-lg: inset 0px -2px 2px hsla(221, 39%, 11%, 0.1);
--shadow-inset: inset 0px -2px 2px hsla(221, 39%, 11%, 0.05);
--shadow-inset-sm: inset 0px -1px 1px hsla(221, 39%, 11%, 0.25);
--shadow-raised-lg: 0px 2px 4px hsla(221, 39%, 11%, 0.2);
--shadow-raised: 0px -2px 4px hsla(221, 39%, 11%, 0.1);
--shadow-floating: hsla(0, 0%, 0%, 0) 0px 0px 0px 0px, hsla(0, 0%, 0%, 0) 0px 0px 0px 0px,
hsla(0, 0%, 0%, 0.1) 0px 4px 6px -1px, rgba(0, 0, 0, 0.06) 0px 2px 4px -1px;
--shadow-raised-lg: 0px 2px 4px hsla(221, 39%, 11%, 0.2);
--shadow-raised: 0px -2px 4px hsla(221, 39%, 11%, 0.1);
--shadow-floating: hsla(0, 0%, 0%, 0) 0px 0px 0px 0px, hsla(0, 0%, 0%, 0) 0px 0px 0px 0px,
hsla(0, 0%, 0%, 0.1) 0px 4px 6px -1px, rgba(0, 0, 0, 0.06) 0px 2px 4px -1px;
--shadow-card: rgba(0, 0, 0, 0.25) 0px 2px 4px 0px;
--shadow-card: rgba(0, 0, 0, 0.25) 0px 2px 4px 0px;
--brand-gradient-bg: linear-gradient(0deg, rgba(14, 35, 19, 0.2) 0%, rgba(55, 137, 73, 0.1) 100%);
--brand-gradient-strong-bg: linear-gradient(270deg, #09110d 10%, #131f17 100%);
--brand-gradient-button: rgba(255, 255, 255, 0.08);
--brand-gradient-border: rgba(155, 255, 160, 0.08);
--brand-gradient-fade-out-color: linear-gradient(to bottom, rgba(24, 30, 31, 0), #171d1e 80%);
--brand-gradient-bg: linear-gradient(0deg, rgba(14, 35, 19, 0.2) 0%, rgba(55, 137, 73, 0.1) 100%);
--brand-gradient-strong-bg: linear-gradient(270deg, #09110d 10%, #131f17 100%);
--brand-gradient-button: rgba(255, 255, 255, 0.08);
--brand-gradient-border: rgba(155, 255, 160, 0.08);
--brand-gradient-fade-out-color: linear-gradient(to bottom, rgba(24, 30, 31, 0), #171d1e 80%);
--color-button-bg-selected: var(--color-brand-highlight);
--color-button-text-selected: var(--color-brand);
--color-button-bg-selected: var(--color-brand-highlight);
--color-button-text-selected: var(--color-brand);
--color-gradient-button-bg: linear-gradient(180deg, #3a3d47 0%, #33363d 100%);
--color-gradient-button-bg: linear-gradient(180deg, #3a3d47 0%, #33363d 100%);
--loading-bar-gradient: linear-gradient(to right, var(--color-brand) 0%, #1ffa9a 100%);
--loading-bar-gradient: linear-gradient(to right, var(--color-brand) 0%, #1ffa9a 100%);
--color-platform-fabric: #dbb69b;
--color-platform-quilt: #c796f9;
--color-platform-forge: #959eef;
--color-platform-neoforge: #f99e6b;
--color-platform-liteloader: #7ab0ee;
--color-platform-bukkit: #f6af7b;
--color-platform-bungeecord: #d2c080;
--color-platform-folia: #a5e388;
--color-platform-paper: #eeaaaa;
--color-platform-purpur: #c3abf7;
--color-platform-spigot: #f1cc84;
--color-platform-velocity: #83d5ef;
--color-platform-waterfall: #78a4fb;
--color-platform-sponge: #f9e580;
--color-platform-ornithe: #87c7ff;
--color-platform-bta-babric: #72cc4a;
--color-platform-legacy-fabric: #6879f6;
--color-platform-nilloader: #f45e9a;
--color-platform-fabric: #dbb69b;
--color-platform-quilt: #c796f9;
--color-platform-forge: #959eef;
--color-platform-neoforge: #f99e6b;
--color-platform-liteloader: #7ab0ee;
--color-platform-bukkit: #f6af7b;
--color-platform-bungeecord: #d2c080;
--color-platform-folia: #a5e388;
--color-platform-paper: #eeaaaa;
--color-platform-purpur: #c3abf7;
--color-platform-spigot: #f1cc84;
--color-platform-velocity: #83d5ef;
--color-platform-waterfall: #78a4fb;
--color-platform-sponge: #f9e580;
--color-platform-ornithe: #87c7ff;
--color-platform-bta-babric: #72cc4a;
--color-platform-legacy-fabric: #6879f6;
--color-platform-nilloader: #f45e9a;
--hover-brightness: 1.25;
--hover-brightness: 1.25;
--experimental-color-button-bg: #33363d;
--experimental-color-button-bg: #33363d;
}
.oled-mode {
@extend .dark-mode;
--color-bg: #000000;
--color-raised-bg: #101013;
--color-button-bg: #222329;
@extend .dark-mode;
--color-bg: #000000;
--color-raised-bg: #101013;
--color-button-bg: #222329;
--color-ad: #0d1828;
--color-ad: #0d1828;
--brand-gradient-bg: linear-gradient(
0deg,
rgba(22, 66, 51, 0.15) 0%,
rgba(55, 137, 73, 0.1) 100%
);
--brand-gradient-strong-bg: linear-gradient(
270deg,
rgba(9, 18, 14, 0.6) 10%,
rgba(19, 31, 23, 0.5) 100%
);
--brand-gradient-bg: linear-gradient(
0deg,
rgba(22, 66, 51, 0.15) 0%,
rgba(55, 137, 73, 0.1) 100%
);
--brand-gradient-strong-bg: linear-gradient(
270deg,
rgba(9, 18, 14, 0.6) 10%,
rgba(19, 31, 23, 0.5) 100%
);
--color-gradient-button-bg: linear-gradient(180deg, #1b1b20 0%, #25262b 100%);
--color-gradient-button-bg: linear-gradient(180deg, #1b1b20 0%, #25262b 100%);
}
.retro-mode {
--brand-gradient-strong-bg: #3a3b38;
--brand-gradient-strong-bg: #3a3b38;
}
.experimental-styles-within {
--color-link: var(--color-blue) !important;
--color-link-hover: var(--color-blue) !important; // DEPRECATED, use filters in future
--color-link-active: var(--color-blue) !important; // DEPRECATED, use filters in future
--color-link: var(--color-blue) !important;
--color-link-hover: var(--color-blue) !important; // DEPRECATED, use filters in future
--color-link-active: var(--color-blue) !important; // DEPRECATED, use filters in future
}
.light-experiments {
--color-bg: #ebebeb;
--color-raised-bg: #ffffff;
--color-button-bg: #f5f5f5;
--color-base: #2c2e31;
--color-secondary: #484d54;
--color-accent-contrast: #ffffff;
--color-bg: #ebebeb;
--color-raised-bg: #ffffff;
--color-button-bg: #f5f5f5;
--color-base: #2c2e31;
--color-secondary: #484d54;
--color-accent-contrast: #ffffff;
}
.light-mode,
.light {
.experimental-styles-within,
&.experimental-styles-within {
@extend .light-experiments;
}
.experimental-styles-within,
&.experimental-styles-within {
@extend .light-experiments;
}
}
.experimental-styles-within {
.light-mode,
.light {
@extend .light-experiments;
}
.light-mode,
.light {
@extend .light-experiments;
}
}
.dark-experiments {
--color-button-bg: var(--experimental-color-button-bg);
--color-button-bg: var(--experimental-color-button-bg);
}
.dark-mode:not(.oled-mode),
.dark:not(.oled-mode) {
.experimental-styles-within,
&.experimental-styles-within {
@extend .dark-experiments;
}
.experimental-styles-within,
&.experimental-styles-within {
@extend .dark-experiments;
}
}
.experimental-styles-within {
.dark-mode:not(.oled-mode),
.dark:not(.oled-mode) {
@extend .dark-experiments;
}
.dark-mode:not(.oled-mode),
.dark:not(.oled-mode) {
@extend .dark-experiments;
}
}

View File

@@ -1,5 +1,3 @@
{
"extends": "tsconfig/base.json",
"include": [".", "icons.d.ts", ".eslintrc.js"],
"exclude": ["dist", "build", "node_modules"]
"extends": "@modrinth/tooling-config/typescript/vue.json"
}