@seastudio/sdk 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +108 -0
- package/bin/seastudio.js +3 -0
- package/dist/chunk-4ITOR5QE.js +901 -0
- package/dist/chunk-5QAINQWV.js +94 -0
- package/dist/chunk-6USQFZRH.js +291 -0
- package/dist/chunk-AGBZJGTY.cjs +1311 -0
- package/dist/chunk-ANWOL7SM.js +566 -0
- package/dist/chunk-BWG45ZWF.cjs +305 -0
- package/dist/chunk-CVF4QHS6.cjs +436 -0
- package/dist/chunk-DDVRUPMZ.js +1293 -0
- package/dist/chunk-DSOSHJH2.js +643 -0
- package/dist/chunk-FLATZQA2.js +174 -0
- package/dist/chunk-HJJTBVKQ.cjs +909 -0
- package/dist/chunk-ISI2OLPI.cjs +179 -0
- package/dist/chunk-MYURVLGP.cjs +165 -0
- package/dist/chunk-N33Y5NY7.cjs +105 -0
- package/dist/chunk-QD4KISXM.js +160 -0
- package/dist/chunk-SNGU4SHO.cjs +654 -0
- package/dist/chunk-TFOJLA2F.cjs +588 -0
- package/dist/chunk-Z7LV7DCO.js +429 -0
- package/dist/develop-tool/cli/index.cjs +1138 -0
- package/dist/develop-tool/cli/index.d.cts +1 -0
- package/dist/develop-tool/cli/index.d.ts +1 -0
- package/dist/develop-tool/cli/index.js +1127 -0
- package/dist/index.cjs +370 -0
- package/dist/index.d.cts +11 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +9 -0
- package/dist/mcp/core/index.cjs +90 -0
- package/dist/mcp/core/index.d.cts +124 -0
- package/dist/mcp/core/index.d.ts +124 -0
- package/dist/mcp/core/index.js +1 -0
- package/dist/mcp/index.cjs +317 -0
- package/dist/mcp/index.d.cts +123 -0
- package/dist/mcp/index.d.ts +123 -0
- package/dist/mcp/index.js +8 -0
- package/dist/mcp/plugin-editor/index.cjs +47 -0
- package/dist/mcp/plugin-editor/index.d.cts +98 -0
- package/dist/mcp/plugin-editor/index.d.ts +98 -0
- package/dist/mcp/plugin-editor/index.js +2 -0
- package/dist/mcp/plugin-excel/index.cjs +31 -0
- package/dist/mcp/plugin-excel/index.d.cts +86 -0
- package/dist/mcp/plugin-excel/index.d.ts +86 -0
- package/dist/mcp/plugin-excel/index.js +2 -0
- package/dist/mcp/plugin-preview/index.cjs +23 -0
- package/dist/mcp/plugin-preview/index.d.cts +109 -0
- package/dist/mcp/plugin-preview/index.d.ts +109 -0
- package/dist/mcp/plugin-preview/index.js +2 -0
- package/dist/mcp/plugin-seaflow/index.cjs +35 -0
- package/dist/mcp/plugin-seaflow/index.d.cts +318 -0
- package/dist/mcp/plugin-seaflow/index.d.ts +318 -0
- package/dist/mcp/plugin-seaflow/index.js +2 -0
- package/dist/mcp/seastudio/index.cjs +75 -0
- package/dist/mcp/seastudio/index.d.cts +341 -0
- package/dist/mcp/seastudio/index.d.ts +341 -0
- package/dist/mcp/seastudio/index.js +2 -0
- package/dist/tools-LMW67LIY.js +2 -0
- package/dist/tools-TU7PBMDO.cjs +23 -0
- package/dist/types-Clgf5gBf.d.cts +107 -0
- package/dist/types-Clgf5gBf.d.ts +107 -0
- package/dist/ui/index.cjs +58 -0
- package/dist/ui/index.d.cts +142 -0
- package/dist/ui/index.d.ts +142 -0
- package/dist/ui/index.js +1 -0
- package/package.json +115 -0
- package/src/develop-tool/templates/plugin/README.md.tmpl +36 -0
- package/src/develop-tool/templates/plugin/frontend/index.html.tmpl +12 -0
- package/src/develop-tool/templates/plugin/frontend/package.json.tmpl +30 -0
- package/src/develop-tool/templates/plugin/frontend/postcss.config.js +6 -0
- package/src/develop-tool/templates/plugin/frontend/src/App.css +43 -0
- package/src/develop-tool/templates/plugin/frontend/src/App.tsx.tmpl +43 -0
- package/src/develop-tool/templates/plugin/frontend/src/main.tsx +10 -0
- package/src/develop-tool/templates/plugin/frontend/src/vite-env.d.ts +1 -0
- package/src/develop-tool/templates/plugin/frontend/tsconfig.json +20 -0
- package/src/develop-tool/templates/plugin/frontend/vite.config.ts +12 -0
- package/src/develop-tool/templates/plugin/seastudio.config.json.tmpl +14 -0
- package/src/ui/cosmos.css +407 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# {{pluginName}}
|
|
2
|
+
|
|
3
|
+
SeaStudio 第三方插件
|
|
4
|
+
|
|
5
|
+
## 开发
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
cd frontend
|
|
9
|
+
npm install
|
|
10
|
+
npm run dev
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## 构建
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
cd frontend
|
|
17
|
+
npm run build
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## 打包
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
seastudio pack
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
打包后会生成 `{{protocolHost}}.seaplugin` 文件。
|
|
27
|
+
|
|
28
|
+
## 安装
|
|
29
|
+
|
|
30
|
+
1. 打开 SeaStudio
|
|
31
|
+
2. 设置 → 插件管理 → 添加插件
|
|
32
|
+
3. 选择 `.seaplugin` 文件
|
|
33
|
+
|
|
34
|
+
## 许可证
|
|
35
|
+
|
|
36
|
+
MIT
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="zh-CN">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>{{pluginName}}</title>
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
<div id="root"></div>
|
|
10
|
+
<script type="module" src="/src/main.tsx"></script>
|
|
11
|
+
</body>
|
|
12
|
+
</html>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{pluginId}}-frontend",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "vite",
|
|
8
|
+
"build": "tsc && vite build",
|
|
9
|
+
"preview": "vite preview",
|
|
10
|
+
"pack": "cd .. && npx seastudio pack"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"react": "^19.0.0",
|
|
14
|
+
"react-dom": "^19.0.0",
|
|
15
|
+
"lucide-react": "^0.400.0",
|
|
16
|
+
"@seastudio/sdk": "^3.0.0"
|
|
17
|
+
},
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"@tailwindcss/postcss": "^4.0.0",
|
|
20
|
+
"@tailwindcss/vite": "^4.0.0",
|
|
21
|
+
"@types/react": "^19.0.0",
|
|
22
|
+
"@types/react-dom": "^19.0.0",
|
|
23
|
+
"@vitejs/plugin-react": "^4.3.0",
|
|
24
|
+
"autoprefixer": "^10.4.0",
|
|
25
|
+
"postcss": "^8.5.0",
|
|
26
|
+
"tailwindcss": "^4.0.0",
|
|
27
|
+
"typescript": "^5.4.0",
|
|
28
|
+
"vite": "^6.0.0"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
@import 'tailwindcss';
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
--background: 20 14% 4%;
|
|
5
|
+
--foreground: 0 0% 95%;
|
|
6
|
+
--muted: 0 0% 15%;
|
|
7
|
+
--muted-foreground: 0 0% 64%;
|
|
8
|
+
--border: 0 0% 14%;
|
|
9
|
+
--primary: 0 0% 98%;
|
|
10
|
+
--primary-foreground: 0 0% 9%;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
* {
|
|
14
|
+
margin: 0;
|
|
15
|
+
padding: 0;
|
|
16
|
+
box-sizing: border-box;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
body {
|
|
20
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
21
|
+
background-color: hsl(var(--background));
|
|
22
|
+
color: hsl(var(--foreground));
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.bg-background {
|
|
26
|
+
background-color: hsl(var(--background));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.text-foreground {
|
|
30
|
+
color: hsl(var(--foreground));
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.bg-muted\/50 {
|
|
34
|
+
background-color: hsl(var(--muted) / 0.5);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.text-muted-foreground {
|
|
38
|
+
color: hsl(var(--muted-foreground));
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.border-border {
|
|
42
|
+
border-color: hsl(var(--border));
|
|
43
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { useState, useEffect } from 'react';
|
|
2
|
+
import { callHostTool } from '@seastudio/sdk';
|
|
3
|
+
|
|
4
|
+
function App() {
|
|
5
|
+
const [projectPath, setProjectPath] = useState<string>('');
|
|
6
|
+
const [loading, setLoading] = useState(true);
|
|
7
|
+
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
callHostTool('seastudio-project_get_path', {})
|
|
10
|
+
.then((result) => {
|
|
11
|
+
if (result.content?.[0]?.text) {
|
|
12
|
+
const data = JSON.parse(result.content[0].text);
|
|
13
|
+
setProjectPath(data.path || '');
|
|
14
|
+
}
|
|
15
|
+
})
|
|
16
|
+
.catch(console.error)
|
|
17
|
+
.finally(() => setLoading(false));
|
|
18
|
+
}, []);
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<div className="min-h-screen bg-background text-foreground p-6">
|
|
22
|
+
<h1 className="text-2xl font-bold mb-4">{{pluginName}}</h1>
|
|
23
|
+
|
|
24
|
+
<div className="space-y-4">
|
|
25
|
+
<div className="p-4 rounded-lg bg-muted/50 border border-border">
|
|
26
|
+
<h2 className="text-sm font-medium text-muted-foreground mb-2">当前项目</h2>
|
|
27
|
+
<p className="text-sm">
|
|
28
|
+
{loading ? '加载中...' : projectPath || '未打开项目'}
|
|
29
|
+
</p>
|
|
30
|
+
</div>
|
|
31
|
+
|
|
32
|
+
<div className="p-4 rounded-lg bg-muted/50 border border-border">
|
|
33
|
+
<h2 className="text-sm font-medium text-muted-foreground mb-2">开始开发</h2>
|
|
34
|
+
<p className="text-sm text-muted-foreground">
|
|
35
|
+
编辑此文件 (src/App.tsx) 开始构建你的插件。
|
|
36
|
+
</p>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export default App;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/// <reference types="vite/client" />
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"useDefineForClassFields": true,
|
|
5
|
+
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
|
6
|
+
"module": "ESNext",
|
|
7
|
+
"skipLibCheck": true,
|
|
8
|
+
"moduleResolution": "bundler",
|
|
9
|
+
"allowImportingTsExtensions": true,
|
|
10
|
+
"resolveJsonModule": true,
|
|
11
|
+
"isolatedModules": true,
|
|
12
|
+
"noEmit": true,
|
|
13
|
+
"jsx": "react-jsx",
|
|
14
|
+
"strict": true,
|
|
15
|
+
"noUnusedLocals": true,
|
|
16
|
+
"noUnusedParameters": true,
|
|
17
|
+
"noFallthroughCasesInSwitch": true
|
|
18
|
+
},
|
|
19
|
+
"include": ["src"]
|
|
20
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { defineConfig } from 'vite';
|
|
2
|
+
import react from '@vitejs/plugin-react';
|
|
3
|
+
import tailwindcss from '@tailwindcss/vite';
|
|
4
|
+
|
|
5
|
+
export default defineConfig({
|
|
6
|
+
plugins: [react(), tailwindcss()],
|
|
7
|
+
base: './',
|
|
8
|
+
build: {
|
|
9
|
+
outDir: 'dist',
|
|
10
|
+
emptyOutDir: true,
|
|
11
|
+
},
|
|
12
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "plugin",
|
|
3
|
+
"id": "{{pluginId}}",
|
|
4
|
+
"name": "{{pluginName}}",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"category": "{{category}}",
|
|
7
|
+
"protocolHost": "{{protocolHost}}",
|
|
8
|
+
"frontendDir": "frontend",
|
|
9
|
+
"tab": {
|
|
10
|
+
"id": "{{protocolHost}}",
|
|
11
|
+
"title": "{{pluginName}}"
|
|
12
|
+
},
|
|
13
|
+
"mcpTools": []
|
|
14
|
+
}
|
|
@@ -0,0 +1,407 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SeaStudio Cosmos Design System
|
|
3
|
+
*
|
|
4
|
+
* 统一的 UI 风格定义,供所有 Agent 和 Plugin 前端使用。
|
|
5
|
+
*
|
|
6
|
+
* 使用方式:
|
|
7
|
+
* 1. 在项目中导入: @import "@seastudio/sdk/styles/cosmos.css";
|
|
8
|
+
* 2. 或在 JS 中导入: import "@seastudio/sdk/styles/cosmos.css";
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
@import "tailwindcss";
|
|
12
|
+
|
|
13
|
+
@theme {
|
|
14
|
+
--color-border: hsl(var(--border));
|
|
15
|
+
--color-input: hsl(var(--input));
|
|
16
|
+
--color-ring: hsl(var(--ring));
|
|
17
|
+
--color-background: hsl(var(--background));
|
|
18
|
+
--color-foreground: hsl(var(--foreground));
|
|
19
|
+
--color-primary: hsl(var(--primary));
|
|
20
|
+
--color-primary-foreground: hsl(var(--primary-foreground));
|
|
21
|
+
--color-secondary: hsl(var(--secondary));
|
|
22
|
+
--color-secondary-foreground: hsl(var(--secondary-foreground));
|
|
23
|
+
--color-destructive: hsl(var(--destructive));
|
|
24
|
+
--color-destructive-foreground: hsl(var(--destructive-foreground));
|
|
25
|
+
--color-muted: hsl(var(--muted));
|
|
26
|
+
--color-muted-foreground: hsl(var(--muted-foreground));
|
|
27
|
+
--color-accent: hsl(var(--accent));
|
|
28
|
+
--color-accent-foreground: hsl(var(--accent-foreground));
|
|
29
|
+
--color-popover: hsl(var(--popover));
|
|
30
|
+
--color-popover-foreground: hsl(var(--popover-foreground));
|
|
31
|
+
--color-card: hsl(var(--card));
|
|
32
|
+
--color-card-foreground: hsl(var(--card-foreground));
|
|
33
|
+
|
|
34
|
+
/* Cosmos Typography Scale - 1.25 倍率体系(基准 14px)*/
|
|
35
|
+
--font-size-xs: 0.75rem; /* 12px - caption */
|
|
36
|
+
--font-size-sm: 0.875rem; /* 14px - body(基准)*/
|
|
37
|
+
--font-size-base: 1rem; /* 16px - default */
|
|
38
|
+
--font-size-lg: 1.125rem; /* 18px - subheading */
|
|
39
|
+
--font-size-xl: 1.375rem; /* 22px - heading */
|
|
40
|
+
--font-size-2xl: 1.75rem; /* 28px - display */
|
|
41
|
+
--font-size-3xl: 2.125rem; /* 34px - hero */
|
|
42
|
+
|
|
43
|
+
/* Cosmos Radius System */
|
|
44
|
+
--radius-sm: 4px;
|
|
45
|
+
--radius-md: 6px;
|
|
46
|
+
--radius-lg: 8px;
|
|
47
|
+
--radius: 6px;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* ========================================
|
|
51
|
+
Light Mode (Default)
|
|
52
|
+
======================================== */
|
|
53
|
+
:root {
|
|
54
|
+
--background: 48 100% 98%;
|
|
55
|
+
--foreground: 240 10% 15%;
|
|
56
|
+
--card: 0 0% 100%;
|
|
57
|
+
--card-foreground: 240 10% 15%;
|
|
58
|
+
--popover: 0 0% 100%;
|
|
59
|
+
--popover-foreground: 240 10% 15%;
|
|
60
|
+
--primary: 165 80% 45%;
|
|
61
|
+
--primary-foreground: 0 0% 100%;
|
|
62
|
+
--secondary: 48 95% 75%;
|
|
63
|
+
--secondary-foreground: 240 10% 15%;
|
|
64
|
+
--muted: 48 30% 95%;
|
|
65
|
+
--muted-foreground: 240 5% 50%;
|
|
66
|
+
--accent: 330 85% 60%;
|
|
67
|
+
--accent-foreground: 0 0% 100%;
|
|
68
|
+
--destructive: 0 85% 55%;
|
|
69
|
+
--destructive-foreground: 0 0% 100%;
|
|
70
|
+
--border: 240 15% 90%;
|
|
71
|
+
--input: 240 15% 92%;
|
|
72
|
+
--ring: 165 80% 45%;
|
|
73
|
+
--radius: 0.25rem;
|
|
74
|
+
|
|
75
|
+
/* Cyber theme accents */
|
|
76
|
+
--cyber-teal: 165 80% 45%;
|
|
77
|
+
--cyber-pink: 330 85% 60%;
|
|
78
|
+
--cyber-yellow: 48 95% 75%;
|
|
79
|
+
--cyber-orange: 25 95% 60%;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/* ========================================
|
|
83
|
+
Dark Mode - Infinity Kernel Cosmos Edition
|
|
84
|
+
"Zero distractions. Just pure creation."
|
|
85
|
+
======================================== */
|
|
86
|
+
.dark {
|
|
87
|
+
/* Base colors - Final Cut Pro 人体工程学标准 */
|
|
88
|
+
--background: 0 0% 11%; /* #1C1C1E 深灰背景(macOS Dark Mode)*/
|
|
89
|
+
--foreground: 0 0% 96%; /* #F5F5F5 接近白(对比度 15.8:1)*/
|
|
90
|
+
--card: 0 0% 13%; /* #212123 卡片背景 */
|
|
91
|
+
--card-foreground: 0 0% 96%;
|
|
92
|
+
--popover: 0 0% 15%; /* #262628 弹出层 */
|
|
93
|
+
--popover-foreground: 0 0% 96%;
|
|
94
|
+
|
|
95
|
+
/* Primary - 高亮强调(接近白)*/
|
|
96
|
+
--primary: 0 0% 96%;
|
|
97
|
+
--primary-foreground: 0 0% 11%;
|
|
98
|
+
--secondary: 0 0% 15%;
|
|
99
|
+
--secondary-foreground: 0 0% 96%;
|
|
100
|
+
--muted: 0 0% 35%; /* #595959 中灰 */
|
|
101
|
+
--muted-foreground: 0 0% 65%; /* #A6A6A6 次要文本 */
|
|
102
|
+
|
|
103
|
+
/* Accent - 中强调 */
|
|
104
|
+
--accent: 0 0% 85%; /* #D9D9D9 亮灰 */
|
|
105
|
+
--accent-foreground: 0 0% 11%;
|
|
106
|
+
--destructive: 0 0% 70%;
|
|
107
|
+
--destructive-foreground: 0 0% 96%;
|
|
108
|
+
|
|
109
|
+
--border: 0 0% 18%; /* #2E2E30 可见边框 */
|
|
110
|
+
--input: 0 0% 13%;
|
|
111
|
+
--ring: 0 0% 96%;
|
|
112
|
+
|
|
113
|
+
/* Cosmos 灰度调色板 - Final Cut Pro 优化版本 */
|
|
114
|
+
--cosmos-black: 0 0% 11%; /* #1C1C1E 深灰(背景)*/
|
|
115
|
+
--cosmos-gray-900: 0 0% 13%; /* #212123 极深 */
|
|
116
|
+
--cosmos-gray-800: 0 0% 18%; /* #2E2E30 深 */
|
|
117
|
+
--cosmos-gray-700: 0 0% 28%; /* #474747 中深 */
|
|
118
|
+
--cosmos-gray-600: 0 0% 40%; /* #666666 中 */
|
|
119
|
+
--cosmos-gray-500: 0 0% 50%; /* #808080 标准中灰 */
|
|
120
|
+
--cosmos-gray-400: 0 0% 65%; /* #A6A6A6 中浅 */
|
|
121
|
+
--cosmos-gray-300: 0 0% 75%; /* #BFBFBF 浅 */
|
|
122
|
+
--cosmos-gray-200: 0 0% 85%; /* #D9D9D9 极浅 */
|
|
123
|
+
--cosmos-gray-100: 0 0% 92%; /* #EBEBEB 最浅 */
|
|
124
|
+
--cosmos-white: 0 0% 96%; /* #F5F5F5 接近白 */
|
|
125
|
+
|
|
126
|
+
/* Solarized Dark 配色 - 用于代码高亮和语法着色 */
|
|
127
|
+
--solarized-base03: 0 0% 8%; /* #141414 纯黑灰背景 */
|
|
128
|
+
--solarized-base02: 0 0% 12%; /* #1F1F1F 深灰背景 */
|
|
129
|
+
--solarized-base01: 194 25% 45%; /* #586e75 注释/次要 */
|
|
130
|
+
--solarized-base00: 195 23% 51%; /* #657b83 正文 */
|
|
131
|
+
--solarized-base0: 186 13% 59%; /* #839496 正文强调 */
|
|
132
|
+
--solarized-base1: 180 9% 63%; /* #93a1a1 次要强调 */
|
|
133
|
+
--solarized-base2: 92 10% 92%; /* #eee8d5 亮色背景 */
|
|
134
|
+
--solarized-base3: 44 11% 93%; /* #fdf6e3 亮色背景 */
|
|
135
|
+
--solarized-yellow: 45 100% 35%; /* #b58900 */
|
|
136
|
+
--solarized-orange: 18 80% 44%; /* #cb4b16 */
|
|
137
|
+
--solarized-red: 1 71% 52%; /* #dc322f */
|
|
138
|
+
--solarized-magenta: 331 64% 52%; /* #d33682 */
|
|
139
|
+
--solarized-violet: 237 45% 77%; /* #6c71c4 */
|
|
140
|
+
--solarized-blue: 205 82% 66%; /* #268bd2 */
|
|
141
|
+
--solarized-cyan: 175 74% 63%; /* #2aa198 */
|
|
142
|
+
--solarized-green: 68 85% 45%; /* #859900 */
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/* Auto dark mode based on system preference */
|
|
146
|
+
@media (prefers-color-scheme: dark) {
|
|
147
|
+
:root {
|
|
148
|
+
--background: 0 0% 11%;
|
|
149
|
+
--foreground: 0 0% 96%;
|
|
150
|
+
--card: 0 0% 13%;
|
|
151
|
+
--card-foreground: 0 0% 96%;
|
|
152
|
+
--popover: 0 0% 15%;
|
|
153
|
+
--popover-foreground: 0 0% 96%;
|
|
154
|
+
--primary: 0 0% 96%;
|
|
155
|
+
--primary-foreground: 0 0% 11%;
|
|
156
|
+
--secondary: 0 0% 15%;
|
|
157
|
+
--secondary-foreground: 0 0% 96%;
|
|
158
|
+
--muted: 0 0% 35%;
|
|
159
|
+
--muted-foreground: 0 0% 65%;
|
|
160
|
+
--accent: 0 0% 85%;
|
|
161
|
+
--accent-foreground: 0 0% 11%;
|
|
162
|
+
--destructive: 0 0% 70%;
|
|
163
|
+
--destructive-foreground: 0 0% 96%;
|
|
164
|
+
--border: 0 0% 18%;
|
|
165
|
+
--input: 0 0% 13%;
|
|
166
|
+
--ring: 0 0% 96%;
|
|
167
|
+
|
|
168
|
+
/* Cosmos grayscale palette */
|
|
169
|
+
--cosmos-black: 0 0% 11%;
|
|
170
|
+
--cosmos-gray-900: 0 0% 13%;
|
|
171
|
+
--cosmos-gray-800: 0 0% 18%;
|
|
172
|
+
--cosmos-gray-700: 0 0% 28%;
|
|
173
|
+
--cosmos-gray-600: 0 0% 40%;
|
|
174
|
+
--cosmos-gray-500: 0 0% 50%;
|
|
175
|
+
--cosmos-gray-400: 0 0% 65%;
|
|
176
|
+
--cosmos-gray-300: 0 0% 75%;
|
|
177
|
+
--cosmos-gray-200: 0 0% 85%;
|
|
178
|
+
--cosmos-gray-100: 0 0% 92%;
|
|
179
|
+
--cosmos-white: 0 0% 96%;
|
|
180
|
+
|
|
181
|
+
/* Solarized Dark */
|
|
182
|
+
--solarized-base03: 0 0% 8%;
|
|
183
|
+
--solarized-base02: 0 0% 12%;
|
|
184
|
+
--solarized-base01: 194 25% 45%;
|
|
185
|
+
--solarized-base00: 195 23% 51%;
|
|
186
|
+
--solarized-base0: 186 13% 59%;
|
|
187
|
+
--solarized-base1: 180 9% 63%;
|
|
188
|
+
--solarized-base2: 92 10% 92%;
|
|
189
|
+
--solarized-base3: 44 11% 93%;
|
|
190
|
+
--solarized-yellow: 45 100% 35%;
|
|
191
|
+
--solarized-orange: 18 80% 44%;
|
|
192
|
+
--solarized-red: 1 71% 52%;
|
|
193
|
+
--solarized-magenta: 331 64% 52%;
|
|
194
|
+
--solarized-violet: 237 45% 77%;
|
|
195
|
+
--solarized-blue: 205 82% 66%;
|
|
196
|
+
--solarized-cyan: 175 74% 63%;
|
|
197
|
+
--solarized-green: 68 85% 45%;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/* ========================================
|
|
202
|
+
Base Styles
|
|
203
|
+
======================================== */
|
|
204
|
+
* {
|
|
205
|
+
border-color: hsl(var(--border));
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
body {
|
|
209
|
+
margin: 0;
|
|
210
|
+
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
|
|
211
|
+
font-size: var(--font-size-sm);
|
|
212
|
+
line-height: 1.6;
|
|
213
|
+
background-color: hsl(var(--background));
|
|
214
|
+
color: hsl(var(--foreground));
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/* ========================================
|
|
218
|
+
Scrollbar - Vesper Style
|
|
219
|
+
======================================== */
|
|
220
|
+
* {
|
|
221
|
+
scrollbar-width: thin;
|
|
222
|
+
scrollbar-color: hsl(var(--border) / 0.9) transparent;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
::-webkit-scrollbar {
|
|
226
|
+
width: 8px;
|
|
227
|
+
height: 8px;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
::-webkit-scrollbar-track {
|
|
231
|
+
background: transparent;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
::-webkit-scrollbar-thumb {
|
|
235
|
+
background: hsl(var(--border) / 0.9);
|
|
236
|
+
border-radius: 9999px;
|
|
237
|
+
border: 2px solid transparent;
|
|
238
|
+
background-clip: padding-box;
|
|
239
|
+
transition: all 0.2s ease;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
::-webkit-scrollbar-thumb:hover {
|
|
243
|
+
background: hsl(var(--foreground) / 0.24);
|
|
244
|
+
background-clip: padding-box;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
::-webkit-scrollbar-corner {
|
|
248
|
+
background: transparent;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/* ========================================
|
|
252
|
+
Text Selection
|
|
253
|
+
======================================== */
|
|
254
|
+
body,
|
|
255
|
+
p,
|
|
256
|
+
pre,
|
|
257
|
+
code,
|
|
258
|
+
span,
|
|
259
|
+
div {
|
|
260
|
+
user-select: text;
|
|
261
|
+
-webkit-user-select: text;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
button,
|
|
265
|
+
.select-none {
|
|
266
|
+
user-select: none;
|
|
267
|
+
-webkit-user-select: none;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.select-text,
|
|
271
|
+
.select-text * {
|
|
272
|
+
user-select: text !important;
|
|
273
|
+
-webkit-user-select: text !important;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/* ========================================
|
|
277
|
+
Animations
|
|
278
|
+
======================================== */
|
|
279
|
+
@keyframes cosmosFadeIn {
|
|
280
|
+
from { opacity: 0; }
|
|
281
|
+
to { opacity: 1; }
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
@keyframes cosmosPulse {
|
|
285
|
+
0%, 100% { opacity: 1; }
|
|
286
|
+
50% { opacity: 0.7; }
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
@keyframes progress-indeterminate {
|
|
290
|
+
0% { transform: translateX(-100%); }
|
|
291
|
+
100% { transform: translateX(300%); }
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
.animate-fade-in {
|
|
295
|
+
animation: cosmosFadeIn 0.4s ease-out forwards;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.animate-pulse {
|
|
299
|
+
animation: cosmosPulse 2s ease-in-out infinite;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.animate-progress-indeterminate {
|
|
303
|
+
animation: progress-indeterminate 1.5s ease-in-out infinite;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
/* ========================================
|
|
307
|
+
Interaction Utilities
|
|
308
|
+
======================================== */
|
|
309
|
+
.cosmos-hover {
|
|
310
|
+
transition: opacity 0.3s ease;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.cosmos-hover:hover {
|
|
314
|
+
opacity: 0.8;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
.cosmos-button {
|
|
318
|
+
transition: opacity 0.2s ease;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
.cosmos-button:hover {
|
|
322
|
+
opacity: 0.85;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
.cosmos-button:active {
|
|
326
|
+
opacity: 0.7;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
/* ========================================
|
|
330
|
+
Code Highlighting - Cosmos Grayscale
|
|
331
|
+
======================================== */
|
|
332
|
+
.hljs {
|
|
333
|
+
background: transparent !important;
|
|
334
|
+
color: hsl(var(--cosmos-gray-200)) !important;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
.hljs-keyword,
|
|
338
|
+
.hljs-selector-tag,
|
|
339
|
+
.hljs-built_in,
|
|
340
|
+
.hljs-section {
|
|
341
|
+
color: hsl(var(--cosmos-white)) !important;
|
|
342
|
+
font-weight: 600;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
.hljs-string,
|
|
346
|
+
.hljs-template-variable {
|
|
347
|
+
color: hsl(var(--cosmos-gray-200)) !important;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.hljs-title,
|
|
351
|
+
.hljs-name,
|
|
352
|
+
.hljs-function {
|
|
353
|
+
color: hsl(var(--cosmos-gray-100)) !important;
|
|
354
|
+
font-weight: 500;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
.hljs-type,
|
|
358
|
+
.hljs-class .hljs-title,
|
|
359
|
+
.hljs-builtin-name {
|
|
360
|
+
color: hsl(var(--cosmos-gray-100)) !important;
|
|
361
|
+
font-weight: 500;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
.hljs-comment,
|
|
365
|
+
.hljs-quote,
|
|
366
|
+
.hljs-meta {
|
|
367
|
+
color: hsl(var(--cosmos-gray-600)) !important;
|
|
368
|
+
font-style: italic;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
.hljs-number,
|
|
372
|
+
.hljs-literal,
|
|
373
|
+
.hljs-regexp {
|
|
374
|
+
color: hsl(var(--cosmos-gray-300)) !important;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
.hljs-variable,
|
|
378
|
+
.hljs-symbol,
|
|
379
|
+
.hljs-bullet {
|
|
380
|
+
color: hsl(var(--cosmos-gray-400)) !important;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
.hljs-attribute,
|
|
384
|
+
.hljs-attr,
|
|
385
|
+
.hljs-property {
|
|
386
|
+
color: hsl(var(--cosmos-gray-300)) !important;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
.hljs-tag,
|
|
390
|
+
.hljs-operator {
|
|
391
|
+
color: hsl(var(--cosmos-gray-400)) !important;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
.hljs-link {
|
|
395
|
+
color: hsl(var(--cosmos-gray-100)) !important;
|
|
396
|
+
text-decoration: underline;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
.hljs-addition {
|
|
400
|
+
color: hsl(var(--cosmos-gray-100)) !important;
|
|
401
|
+
background-color: hsl(var(--cosmos-gray-800) / 0.3);
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
.hljs-deletion {
|
|
405
|
+
color: hsl(var(--cosmos-gray-400)) !important;
|
|
406
|
+
background-color: hsl(var(--cosmos-gray-900) / 0.5);
|
|
407
|
+
}
|