@binblink/wasmnest-plugin-sdk-desktop 0.0.0-stage → 0.0.2
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 +307 -2
- package/README_en.md +284 -0
- package/bin/cli.js +602 -0
- package/bin/manifest-gen.js +458 -0
- package/bin/manifest-validate.js +494 -0
- package/bin/permission-vocabulary.json +5 -0
- package/bin/plugin-watch.js +331 -0
- package/bin/wasm-hash.js +124 -0
- package/dev-shell/README.md +122 -0
- package/dev-shell/index.html +12 -0
- package/dev-shell/package.json +28 -0
- package/dev-shell/pnpm-workspace.yaml +9 -0
- package/dev-shell/postcss.config.js +6 -0
- package/dev-shell/src/App.vue +90 -0
- package/dev-shell/src/components/LogPanel.vue +90 -0
- package/dev-shell/src/loader.ts +104 -0
- package/dev-shell/src/locale.ts +29 -0
- package/dev-shell/src/locales.ts +50 -0
- package/dev-shell/src/main.ts +46 -0
- package/dev-shell/src/mock/app-env.ts +102 -0
- package/dev-shell/src/mock/commands.ts +54 -0
- package/dev-shell/src/mock/domain-context.ts +46 -0
- package/dev-shell/src/mock/events.ts +16 -0
- package/dev-shell/src/mock/file-transfer.ts +512 -0
- package/dev-shell/src/mock/tauri-ipc.ts +109 -0
- package/dev-shell/src/registry.ts +90 -0
- package/dev-shell/src/shell/components/AppMountSlot.vue +241 -0
- package/dev-shell/src/shell/components/ShellIcon.vue +141 -0
- package/dev-shell/src/shell/components/ShellStatusBar.vue +87 -0
- package/dev-shell/src/shell/components/ShellToolbar.vue +287 -0
- package/dev-shell/src/shell/mount/appSession.ts +45 -0
- package/dev-shell/src/shell/mount/devAppMount.ts +80 -0
- package/dev-shell/src/shell/types.ts +121 -0
- package/dev-shell/src/styles/dev.css +27 -0
- package/dev-shell/src/styles/shell.css +752 -0
- package/dev-shell/src/styles/style.css +1178 -0
- package/dev-shell/src/theme.ts +140 -0
- package/dev-shell/src/vite-env.d.ts +24 -0
- package/dev-shell/tailwind.config.js +98 -0
- package/dev-shell/vite.config.ts +174 -0
- package/dist/index.d.ts +150 -0
- package/dist/index.js +238 -0
- package/dist/types.d.ts +632 -0
- package/dist/types.js +0 -0
- package/dist/vite-plugin.d.ts +25 -0
- package/dist/vite-plugin.js +80 -0
- package/go/.gitignore +5 -0
- package/go/README.md +80 -0
- package/go/gen/wasmnest/api-call/host-api-call/empty.s +3 -0
- package/go/gen/wasmnest/api-call/host-api-call/host-api-call.wasm.go +13 -0
- package/go/gen/wasmnest/api-call/host-api-call/host-api-call.wit.go +34 -0
- package/go/gen/wasmnest/app/host-app/empty.s +3 -0
- package/go/gen/wasmnest/app/host-app/host-app.wasm.go +29 -0
- package/go/gen/wasmnest/app/host-app/host-app.wit.go +108 -0
- package/go/gen/wasmnest/auth-center/host-auth-center/abi.go +14 -0
- package/go/gen/wasmnest/auth-center/host-auth-center/empty.s +3 -0
- package/go/gen/wasmnest/auth-center/host-auth-center/host-auth-center.wasm.go +49 -0
- package/go/gen/wasmnest/auth-center/host-auth-center/host-auth-center.wit.go +225 -0
- package/go/gen/wasmnest/clipboard/host-clipboard/abi.go +14 -0
- package/go/gen/wasmnest/clipboard/host-clipboard/empty.s +3 -0
- package/go/gen/wasmnest/clipboard/host-clipboard/host-clipboard.wasm.go +17 -0
- package/go/gen/wasmnest/clipboard/host-clipboard/host-clipboard.wit.go +68 -0
- package/go/gen/wasmnest/connection-registry/host-connection-registry/empty.s +3 -0
- package/go/gen/wasmnest/connection-registry/host-connection-registry/host-connection-registry.wasm.go +13 -0
- package/go/gen/wasmnest/connection-registry/host-connection-registry/host-connection-registry.wit.go +50 -0
- package/go/gen/wasmnest/crypto/host-crypto/abi.go +18 -0
- package/go/gen/wasmnest/crypto/host-crypto/empty.s +3 -0
- package/go/gen/wasmnest/crypto/host-crypto/host-crypto.wasm.go +37 -0
- package/go/gen/wasmnest/crypto/host-crypto/host-crypto.wit.go +139 -0
- package/go/gen/wasmnest/fs-desktop/host-fs-desktop/abi.go +14 -0
- package/go/gen/wasmnest/fs-desktop/host-fs-desktop/empty.s +3 -0
- package/go/gen/wasmnest/fs-desktop/host-fs-desktop/host-fs-desktop.wasm.go +21 -0
- package/go/gen/wasmnest/fs-desktop/host-fs-desktop/host-fs-desktop.wit.go +62 -0
- package/go/gen/wasmnest/http/host-http/abi.go +14 -0
- package/go/gen/wasmnest/http/host-http/empty.s +3 -0
- package/go/gen/wasmnest/http/host-http/host-http.wasm.go +13 -0
- package/go/gen/wasmnest/http/host-http/host-http.wit.go +40 -0
- package/go/gen/wasmnest/http-endpoint/host-http-endpoint/empty.s +3 -0
- package/go/gen/wasmnest/http-endpoint/host-http-endpoint/host-http-endpoint.wasm.go +17 -0
- package/go/gen/wasmnest/http-endpoint/host-http-endpoint/host-http-endpoint.wit.go +69 -0
- package/go/gen/wasmnest/mdns/host-mdns/empty.s +3 -0
- package/go/gen/wasmnest/mdns/host-mdns/host-mdns.wasm.go +29 -0
- package/go/gen/wasmnest/mdns/host-mdns/host-mdns.wit.go +101 -0
- package/go/gen/wasmnest/notify/host-notify/empty.s +3 -0
- package/go/gen/wasmnest/notify/host-notify/host-notify.wasm.go +13 -0
- package/go/gen/wasmnest/notify/host-notify/host-notify.wit.go +64 -0
- package/go/gen/wasmnest/peer/host-peer/abi.go +14 -0
- package/go/gen/wasmnest/peer/host-peer/empty.s +3 -0
- package/go/gen/wasmnest/peer/host-peer/host-peer.wasm.go +85 -0
- package/go/gen/wasmnest/peer/host-peer/host-peer.wit.go +357 -0
- package/go/gen/wasmnest/platform-desktop/host-platform-desktop/empty.s +3 -0
- package/go/gen/wasmnest/platform-desktop/host-platform-desktop/host-platform-desktop.wasm.go +21 -0
- package/go/gen/wasmnest/platform-desktop/host-platform-desktop/host-platform-desktop.wit.go +70 -0
- package/go/gen/wasmnest/plugin/abi-form/abi-form.exports.go +11 -0
- package/go/gen/wasmnest/plugin/abi-form/abi-form.wasm.go +13 -0
- package/go/gen/wasmnest/plugin/abi-form/abi-form.wit.go +7 -0
- package/go/gen/wasmnest/plugin/abi-form/empty.s +3 -0
- package/go/gen/wasmnest/plugin/command/command.exports.go +11 -0
- package/go/gen/wasmnest/plugin/command/command.wasm.go +19 -0
- package/go/gen/wasmnest/plugin/command/command.wit.go +6 -0
- package/go/gen/wasmnest/plugin/command/empty.s +3 -0
- package/go/gen/wasmnest/plugin/events/empty.s +3 -0
- package/go/gen/wasmnest/plugin/events/events.exports.go +52 -0
- package/go/gen/wasmnest/plugin/events/events.wasm.go +74 -0
- package/go/gen/wasmnest/plugin/events/events.wit.go +195 -0
- package/go/gen/wasmnest/plugin/host-bus/empty.s +3 -0
- package/go/gen/wasmnest/plugin/host-bus/host-bus.wasm.go +29 -0
- package/go/gen/wasmnest/plugin/host-bus/host-bus.wit.go +94 -0
- package/go/gen/wasmnest/plugin/host-config/abi.go +14 -0
- package/go/gen/wasmnest/plugin/host-config/empty.s +3 -0
- package/go/gen/wasmnest/plugin/host-config/host-config.wasm.go +13 -0
- package/go/gen/wasmnest/plugin/host-config/host-config.wit.go +21 -0
- package/go/gen/wasmnest/plugin/host-events/empty.s +3 -0
- package/go/gen/wasmnest/plugin/host-events/host-events.wasm.go +9 -0
- package/go/gen/wasmnest/plugin/host-events/host-events.wit.go +27 -0
- package/go/gen/wasmnest/plugin/host-fs/abi.go +14 -0
- package/go/gen/wasmnest/plugin/host-fs/empty.s +3 -0
- package/go/gen/wasmnest/plugin/host-fs/host-fs.wasm.go +33 -0
- package/go/gen/wasmnest/plugin/host-fs/host-fs.wit.go +86 -0
- package/go/gen/wasmnest/plugin/host-log/empty.s +3 -0
- package/go/gen/wasmnest/plugin/host-log/host-log.wasm.go +25 -0
- package/go/gen/wasmnest/plugin/host-log/host-log.wit.go +65 -0
- package/go/gen/wasmnest/plugin/host-metrics/empty.s +3 -0
- package/go/gen/wasmnest/plugin/host-metrics/host-metrics.wasm.go +13 -0
- package/go/gen/wasmnest/plugin/host-metrics/host-metrics.wit.go +34 -0
- package/go/gen/wasmnest/plugin/host-platform/empty.s +3 -0
- package/go/gen/wasmnest/plugin/host-platform/host-platform.wasm.go +21 -0
- package/go/gen/wasmnest/plugin/host-platform/host-platform.wit.go +85 -0
- package/go/gen/wasmnest/plugin/host-plugin-database/abi.go +14 -0
- package/go/gen/wasmnest/plugin/host-plugin-database/empty.s +3 -0
- package/go/gen/wasmnest/plugin/host-plugin-database/host-plugin-database.wasm.go +29 -0
- package/go/gen/wasmnest/plugin/host-plugin-database/host-plugin-database.wit.go +70 -0
- package/go/gen/wasmnest/plugin/host-storage/abi.go +14 -0
- package/go/gen/wasmnest/plugin/host-storage/empty.s +3 -0
- package/go/gen/wasmnest/plugin/host-storage/host-storage.wasm.go +21 -0
- package/go/gen/wasmnest/plugin/host-storage/host-storage.wit.go +44 -0
- package/go/gen/wasmnest/plugin/host-worker/empty.s +3 -0
- package/go/gen/wasmnest/plugin/host-worker/host-worker.wasm.go +17 -0
- package/go/gen/wasmnest/plugin/host-worker/host-worker.wit.go +50 -0
- package/go/gen/wasmnest/plugin/lifecycle/empty.s +3 -0
- package/go/gen/wasmnest/plugin/lifecycle/lifecycle.exports.go +32 -0
- package/go/gen/wasmnest/plugin/lifecycle/lifecycle.wasm.go +41 -0
- package/go/gen/wasmnest/plugin/lifecycle/lifecycle.wit.go +9 -0
- package/go/gen/wasmnest/plugin/manifest/empty.s +3 -0
- package/go/gen/wasmnest/plugin/manifest/manifest.exports.go +11 -0
- package/go/gen/wasmnest/plugin/manifest/manifest.wasm.go +13 -0
- package/go/gen/wasmnest/plugin/manifest/manifest.wit.go +6 -0
- package/go/gen/wasmnest/plugin/plugin/plugin.wit.go +4 -0
- package/go/gen/wasmnest/process/host-process/empty.s +3 -0
- package/go/gen/wasmnest/process/host-process/host-process.wasm.go +21 -0
- package/go/gen/wasmnest/process/host-process/host-process.wit.go +56 -0
- package/go/gen/wasmnest/pty/host-pty/abi.go +14 -0
- package/go/gen/wasmnest/pty/host-pty/empty.s +3 -0
- package/go/gen/wasmnest/pty/host-pty/host-pty.wasm.go +33 -0
- package/go/gen/wasmnest/pty/host-pty/host-pty.wit.go +164 -0
- package/go/gen/wasmnest/task/host-task/abi.go +14 -0
- package/go/gen/wasmnest/task/host-task/empty.s +3 -0
- package/go/gen/wasmnest/task/host-task/host-task.wasm.go +29 -0
- package/go/gen/wasmnest/task/host-task/host-task.wit.go +110 -0
- package/go/gen/wasmnest/timer/host-timer/empty.s +3 -0
- package/go/gen/wasmnest/timer/host-timer/host-timer.wasm.go +13 -0
- package/go/gen/wasmnest/timer/host-timer/host-timer.wit.go +25 -0
- package/go/gen/wasmnest/ws/host-websocket/empty.s +3 -0
- package/go/gen/wasmnest/ws/host-websocket/host-websocket.wasm.go +29 -0
- package/go/gen/wasmnest/ws/host-websocket/host-websocket.wit.go +109 -0
- package/go/gen/wasmnest/ws-server/host-websocket-server/empty.s +3 -0
- package/go/gen/wasmnest/ws-server/host-websocket-server/host-websocket-server.wasm.go +49 -0
- package/go/gen/wasmnest/ws-server/host-websocket-server/host-websocket-server.wit.go +220 -0
- package/go/go.mod +14 -0
- package/go/go.sum +2 -0
- package/go/sdk/dispatch.go +49 -0
- package/go/sdk/dispatch_test.go +81 -0
- package/go/sdk/entry_native.go +13 -0
- package/go/sdk/entry_wasip2.go +188 -0
- package/go/sdk/host_http_wasip2.go +42 -0
- package/go/sdk/host_wasip2.go +251 -0
- package/go/sdk/plugin.go +103 -0
- package/go/testplugin/index.js +1 -0
- package/go/testplugin/main.go +67 -0
- package/go/testplugin/plugin.json +24 -0
- package/go/tools/assemble-wit.mjs +152 -0
- package/go/tools/gen-bindings.mjs +51 -0
- package/go/wit/core.wit +273 -0
- package/go/wit/deps/api-call/cap-api-call.wit +20 -0
- package/go/wit/deps/app/cap-app.wit +54 -0
- package/go/wit/deps/auth-center/cap-auth-center.wit +124 -0
- package/go/wit/deps/clipboard/clipboard.wit +48 -0
- package/go/wit/deps/clocks/monotonic-clock.wit +45 -0
- package/go/wit/deps/clocks/wall-clock.wit +42 -0
- package/go/wit/deps/clocks/world.wit +6 -0
- package/go/wit/deps/connection-registry/cap-connection-registry.wit +40 -0
- package/go/wit/deps/crypto/cap-crypto.wit +68 -0
- package/go/wit/deps/filesystem/preopens.wit +8 -0
- package/go/wit/deps/filesystem/types.wit +634 -0
- package/go/wit/deps/filesystem/world.wit +6 -0
- package/go/wit/deps/fs-desktop/cap-fs-desktop.wit +29 -0
- package/go/wit/deps/http/http.wit +28 -0
- package/go/wit/deps/http-endpoint/cap-http.wit +44 -0
- package/go/wit/deps/io/error.wit +34 -0
- package/go/wit/deps/io/poll.wit +41 -0
- package/go/wit/deps/io/streams.wit +262 -0
- package/go/wit/deps/io/world.wit +6 -0
- package/go/wit/deps/mdns/mdns.wit +45 -0
- package/go/wit/deps/notify/notify.wit +51 -0
- package/go/wit/deps/peer/peer.wit +126 -0
- package/go/wit/deps/platform-desktop/cap-platform-desktop.wit +38 -0
- package/go/wit/deps/process/cap-process.wit +25 -0
- package/go/wit/deps/pty/pty.wit +80 -0
- package/go/wit/deps/random/insecure-seed.wit +25 -0
- package/go/wit/deps/random/insecure.wit +22 -0
- package/go/wit/deps/random/random.wit +26 -0
- package/go/wit/deps/random/world.wit +7 -0
- package/go/wit/deps/sockets/instance-network.wit +9 -0
- package/go/wit/deps/sockets/ip-name-lookup.wit +51 -0
- package/go/wit/deps/sockets/network.wit +145 -0
- package/go/wit/deps/sockets/tcp-create-socket.wit +27 -0
- package/go/wit/deps/sockets/tcp.wit +353 -0
- package/go/wit/deps/sockets/udp-create-socket.wit +27 -0
- package/go/wit/deps/sockets/udp.wit +266 -0
- package/go/wit/deps/sockets/world.wit +11 -0
- package/go/wit/deps/task/cap-task.wit +56 -0
- package/go/wit/deps/timer/cap-timer.wit +14 -0
- package/go/wit/deps/wasi-cli/command.wit +7 -0
- package/go/wit/deps/wasi-cli/environment.wit +18 -0
- package/go/wit/deps/wasi-cli/exit.wit +4 -0
- package/go/wit/deps/wasi-cli/imports.wit +20 -0
- package/go/wit/deps/wasi-cli/run.wit +4 -0
- package/go/wit/deps/wasi-cli/stdio.wit +17 -0
- package/go/wit/deps/wasi-cli/terminal.wit +49 -0
- package/go/wit/deps/ws/ws.wit +50 -0
- package/go/wit/deps/ws-server/cap-ws.wit +99 -0
- package/go/wit/go-plugin.wit +28 -0
- package/go/wit/plugin-face.wit +355 -0
- package/go/wit/wasmnest.wit +25 -0
- package/package.json +100 -3
- package/src/config.ts +49 -0
- package/src/global-dialog.ts +169 -0
- package/src/index.ts +88 -0
- package/src/runtime.ts +54 -0
- package/src/types.ts +681 -0
- package/src/ui/AppUpdateSection.d.ts +44 -0
- package/src/ui/AppUpdateSection.vue +253 -0
- package/src/ui/MarkdownEditor.vue +520 -0
- package/src/ui/NumberField.d.ts +49 -0
- package/src/ui/NumberField.vue +390 -0
- package/src/ui/PluginGlobalDialog.vue +401 -0
- package/src/ui/Select.d.ts +36 -0
- package/src/ui/Select.vue +220 -0
- package/src/ui/TerminalInputRail.vue +184 -0
- package/src/ui/apply-select-position.ts +65 -0
- package/src/ui/markdown-editor-syntax.ts +234 -0
- package/src/ui/markdown-editor.d.ts +36 -0
- package/src/ui/plugin-global-dialog.d.ts +12 -0
- package/src/ui/select-position.ts +79 -0
- package/src/ui/terminal-input-rail.d.ts +30 -0
- package/src/ui/zoom-compensation.d.ts +9 -0
- package/src/ui/zoom-compensation.ts +52 -0
- package/src/update.ts +123 -0
- package/src/vite-plugin.ts +124 -0
- package/template/README.md +39 -0
- package/template/package.json +23 -0
- package/template/plugin.json +14 -0
- package/template/rust/Cargo.toml +21 -0
- package/template/rust/src/lib.rs +39 -0
- package/template/src/env.d.ts +24 -0
- package/template/src/index.ts +37 -0
- package/template/tsconfig.json +17 -0
- package/template/vite.config.ts +21 -0
- package/tools/componentize/Cargo.lock +299 -0
- package/tools/componentize/Cargo.toml +18 -0
- package/tools/componentize/src/main.rs +197 -0
|
@@ -0,0 +1,1178 @@
|
|
|
1
|
+
@tailwind base;
|
|
2
|
+
@tailwind components;
|
|
3
|
+
@tailwind utilities;
|
|
4
|
+
|
|
5
|
+
/* ==================== Platform Scales ==================== */
|
|
6
|
+
|
|
7
|
+
/*
|
|
8
|
+
* Linux 桌面端默认 UI 缩放 1.15(font-size: 115% 放大 rem 间距/控件 + --ui-scale
|
|
9
|
+
* 放大 px token 字号),修正 WebKitGTK 下 Web 默认 16px 字号偏小的观感。
|
|
10
|
+
* 为什么不用 zoom:CSS zoom 会把 xterm.js 鼠标 hit-test(getBoundingClientRect 含
|
|
11
|
+
* zoom)与字符测量(OffscreenCanvas measureText 无视 zoom)放进不同坐标系,导致
|
|
12
|
+
* opencode 等 TUI 鼠标高亮错位(issue 06)。font-size + --ui-scale 等效放大 rem/px
|
|
13
|
+
* 却不破坏坐标。
|
|
14
|
+
* 仅 Linux 生效:macOS 2x Retina 与 Windows DPI-aware 天然更大,不需要额外缩放。
|
|
15
|
+
* main.ts 中 initPlatform() 完成后向 <html> 加 platform-linux class(只在 isLinux 时)。
|
|
16
|
+
* --ui-scale 此处是 JS 生效前的 CSS 默认(splash 期),useFontSize 就绪后覆盖一致。
|
|
17
|
+
* 用户仍可用 Ctrl+= / Ctrl+- 手动微调(index.html 已去掉 maximum-scale 限制)。
|
|
18
|
+
*/
|
|
19
|
+
html.platform-linux {
|
|
20
|
+
font-size: 115%;
|
|
21
|
+
--ui-scale: 1.15;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/* ==================== Design Tokens ==================== */
|
|
25
|
+
|
|
26
|
+
/*
|
|
27
|
+
* 色板机制:亮度(light/dark/system)由 :root.dark 切换;色板(warm/cool...)由
|
|
28
|
+
* :root[data-palette='xxx'] 切换(useTheme 设置)。默认色板 warm(暖调工作台)。
|
|
29
|
+
* 新增色板 = 加一组 [data-palette='xxx'] 变量覆盖 + 设置页选项,无需改其他代码。
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
/* 浅色模式 · 默认色板 warm(暖调工作台)
|
|
33
|
+
`.theme-base` 与 `:root` 共用这一份基础档:设置页「默认主题」的预览块挂这个类,
|
|
34
|
+
以免它继承当前主题(<html data-theme>)的 token——否则「默认」那张预览会长成
|
|
35
|
+
当前主题的样子,用户看不见默认长什么样。 */
|
|
36
|
+
:root,
|
|
37
|
+
.theme-base {
|
|
38
|
+
color-scheme: light;
|
|
39
|
+
|
|
40
|
+
/* 基础排版:拉丁字形在前、CJK 字形在后(逐字回退)——不写 CJK 家族时,
|
|
41
|
+
Linux 的 system-ui 落到 DejaVu/Liberation,中文由 fontconfig 兜底,
|
|
42
|
+
不同发行版会换脸(同一界面两种字形)。显式列出三平台常见的 CJK 无衬线体,
|
|
43
|
+
命中的第一项即用,观感在三端一致。 */
|
|
44
|
+
font-family:
|
|
45
|
+
'Segoe UI',
|
|
46
|
+
-apple-system,
|
|
47
|
+
BlinkMacSystemFont,
|
|
48
|
+
'SF Pro Display',
|
|
49
|
+
Inter,
|
|
50
|
+
system-ui,
|
|
51
|
+
'PingFang SC',
|
|
52
|
+
'Hiragino Sans GB',
|
|
53
|
+
'Microsoft YaHei',
|
|
54
|
+
'Noto Sans CJK SC',
|
|
55
|
+
'Source Han Sans SC',
|
|
56
|
+
sans-serif;
|
|
57
|
+
line-height: 1.5;
|
|
58
|
+
font-weight: 400;
|
|
59
|
+
font-synthesis: none;
|
|
60
|
+
text-rendering: optimizeLegibility;
|
|
61
|
+
-webkit-font-smoothing: antialiased;
|
|
62
|
+
-moz-osx-font-smoothing: grayscale;
|
|
63
|
+
|
|
64
|
+
/* 安全区域变量 */
|
|
65
|
+
--safe-area-inset-top: env(safe-area-inset-top, 0px);
|
|
66
|
+
--safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);
|
|
67
|
+
--safe-area-inset-left: env(safe-area-inset-left, 0px);
|
|
68
|
+
--safe-area-inset-right: env(safe-area-inset-right, 0px);
|
|
69
|
+
--safe-area-top: env(safe-area-inset-top, 0px);
|
|
70
|
+
--safe-area-bottom: env(safe-area-inset-bottom, 0px);
|
|
71
|
+
--keyboard-height: 0px;
|
|
72
|
+
--keyboard-visible: 0;
|
|
73
|
+
|
|
74
|
+
/* 界面文字缩放比例(由 useFontSize composable 动态更新,1 = "正常"档位,12px 基准) */
|
|
75
|
+
--ui-scale: 1;
|
|
76
|
+
|
|
77
|
+
/* 等宽族(技术值 / 权限位 / 端口路径):shell.css 的 .shell-pill / .shell-kv /
|
|
78
|
+
.shell-rec 以 var(--font-mono) 取用,宿主侧单一来源(此前各处各写一串回退) */
|
|
79
|
+
--font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Courier New', monospace;
|
|
80
|
+
|
|
81
|
+
/* 动态字体大小:各档以"正常"档位实际像素为基准,随 --ui-scale 等比缩放 */
|
|
82
|
+
--font-size-xs: calc(10px * var(--ui-scale));
|
|
83
|
+
--font-size-sm: calc(11px * var(--ui-scale));
|
|
84
|
+
--font-size-base: calc(12px * var(--ui-scale));
|
|
85
|
+
--font-size-lg: calc(14px * var(--ui-scale));
|
|
86
|
+
--font-size-xl: calc(16px * var(--ui-scale));
|
|
87
|
+
|
|
88
|
+
/* Backgrounds */
|
|
89
|
+
--bg-page: #f5f4f0;
|
|
90
|
+
--bg-sidebar: #efede7;
|
|
91
|
+
--bg-card: #fdfcfa;
|
|
92
|
+
--bg-hover: #e7e4dc;
|
|
93
|
+
--bg-input: #fdfcfa;
|
|
94
|
+
|
|
95
|
+
/* 透明度阶梯(surface ladder,2026-10-20 用户裁决)
|
|
96
|
+
原则:越像「浮在内容上的壳层」越透,越像「承载阅读与决策的内容面」越实。
|
|
97
|
+
- --bg-veil:内容卡片 / 工具栏(背后只有壁纸)。92% 足以透出壁纸色相,
|
|
98
|
+
又不吃掉 --text-tertiary 的对比度余量(6 套色板 × 明暗两档、壁纸最亮区域
|
|
99
|
+
实测最低 4.77:1)。
|
|
100
|
+
- --bg-glass:浮层(通知 / 快捷设置 / 右键菜单,背后是任意应用内容)。
|
|
101
|
+
96% 不是保守:面板里 11px 的 tertiary 文字在「纯黑 / 纯白」两种极端内容上
|
|
102
|
+
仍要 ≥4.5:1(同口径实测最低 4.61:1;降到 92% 只剩 4.09:1);
|
|
103
|
+
玻璃感交给 blur,不靠继续降透明度。
|
|
104
|
+
- 决策弹窗(授权 / 退出确认)与授权列表保持实心:那里优先逐字可读,不做氛围。
|
|
105
|
+
两个表面 token 引用 --bg-card,深浅主题 / 各色板自动跟随,无需在 :root.dark 重定义。 */
|
|
106
|
+
--bg-veil: color-mix(in srgb, var(--bg-card) 92%, transparent);
|
|
107
|
+
--bg-glass: color-mix(in srgb, var(--bg-card) 96%, transparent);
|
|
108
|
+
--ui-glass-blur: 18px;
|
|
109
|
+
--ui-glass-saturate: 115%;
|
|
110
|
+
|
|
111
|
+
/* Text
|
|
112
|
+
对比度阶梯(对 page / card / sidebar 三个面取最差值,WCAG AA 4.5:1 为下限):
|
|
113
|
+
primary ≈14:1 · secondary ≈6:1 · tertiary ≈4.5:1。
|
|
114
|
+
之前 tertiary 只有 2.1–2.3:1(浅色)/ 2.6–3.2:1(深色)——它承载的是设置项说明、
|
|
115
|
+
分区计数、面板副标题这类 11px 正文,属于「读得出的内容」而非装饰,
|
|
116
|
+
低于 AA 在暖色板下几乎不可读;secondary 在 --bg-sidebar 上也只到 3.9:1。 */
|
|
117
|
+
--text-primary: #26231b;
|
|
118
|
+
--text-secondary: #5e584c;
|
|
119
|
+
--text-tertiary: #736b58;
|
|
120
|
+
|
|
121
|
+
/* Border */
|
|
122
|
+
--border: #e4e1d8;
|
|
123
|
+
--border-strong: #d6d2c4;
|
|
124
|
+
--border-input: #d6d2c4;
|
|
125
|
+
|
|
126
|
+
/* Brand Colors(强调色只用于主按钮/选中态/链接) */
|
|
127
|
+
--color-primary: #1d1a14;
|
|
128
|
+
--color-primary-hover: #0f0d09;
|
|
129
|
+
--color-primary-light: #efede5;
|
|
130
|
+
--color-primary-contrast: #fdfcfa;
|
|
131
|
+
--color-success: #22c55e;
|
|
132
|
+
--color-success-light: rgba(34, 197, 94, 0.14);
|
|
133
|
+
--color-warning: #f59e0b;
|
|
134
|
+
--color-warning-light: rgba(245, 158, 11, 0.16);
|
|
135
|
+
--color-danger: #ef4444;
|
|
136
|
+
--color-danger-light: rgba(239, 68, 68, 0.12);
|
|
137
|
+
--color-info: #2563eb;
|
|
138
|
+
--color-info-light: rgba(37, 99, 235, 0.12);
|
|
139
|
+
|
|
140
|
+
/* 状态色「文字」档(*-ink):只用于 tinted 底上的文字(chip / callout / 记录行标记)
|
|
141
|
+
与图标井里的字形。
|
|
142
|
+
--color-success/warning/danger 是**非文字**色(状态点 / 左侧状态条 / 实心按钮,
|
|
143
|
+
门槛 3:1);把它们直接当 11px 徽标文字用会掉到 1.9:1(浅色主题下绿 1.97、
|
|
144
|
+
琥珀 1.86、成功色 1.97),低于 WCAG AA 4.5:1。ink 取值 = 对各自 *-light 底、
|
|
145
|
+
card、page 三面取最差仍 ≥4.5 的最近色(深浅主题各一套,深色不能沿用浅色值——
|
|
146
|
+
同一色相在深底上需要更高的亮度才够对比)。 */
|
|
147
|
+
--color-success-ink: #166534;
|
|
148
|
+
--color-warning-ink: #92400e;
|
|
149
|
+
--color-danger-ink: #b91c1c;
|
|
150
|
+
--color-info-ink: #1d4ed8;
|
|
151
|
+
|
|
152
|
+
/* Radius */
|
|
153
|
+
--radius-card: 10px;
|
|
154
|
+
--radius-button: 8px;
|
|
155
|
+
--radius-input: 8px;
|
|
156
|
+
--radius-tag: 6px;
|
|
157
|
+
--radius-nav: 8px;
|
|
158
|
+
/* 壳(设备壳 / 主屏+卡片)新增圆角 token:3+ 组件复用才升级为 token
|
|
159
|
+
(frontend-styles promote-at-3 规则,.scratch/2026-10-08-desktop-shell-redesign/spec-c.md §4)
|
|
160
|
+
--radius-app-icon:应用图标 squircle 圆角(主屏图标网格 / 列表行图标 / 卡片头部 / 启动屏图标)
|
|
161
|
+
--radius-sheet:大圆角面(多任务 / 通知 / 命令面板 / 全局弹窗) */
|
|
162
|
+
--radius-app-icon: 28%;
|
|
163
|
+
--radius-sheet: 16px;
|
|
164
|
+
/* 壳顶部工具栏高度(导航与窗口控制所在行,通知面板以此为锚点定位) */
|
|
165
|
+
--toolbar-h: 44px;
|
|
166
|
+
|
|
167
|
+
/* 壳壁纸:token 派生渐变(color-mix 自既有语义 token,零新 hex,双主题自动适配)。
|
|
168
|
+
三层结构(自后向前):基底斜向渐变定色相 → 左上 / 右上两处「光源」径向渐变
|
|
169
|
+
(纯透明边缘,模拟光从画面外打进来)→ 壳叠加的 --wall-dim 遮罩(护文字对比度)。
|
|
170
|
+
只有一层线性渐变的壁纸在任何主题下都是同一条色带子,画面平且没有重心。
|
|
171
|
+
浓度按主题分档:同一组百分比在深色底上混出的亮度远高于浅色底(深色主题下
|
|
172
|
+
40% 的信息蓝会糊成一块墨绿),深色档在 :root.dark 里单独降档。 */
|
|
173
|
+
--wall-aurora: radial-gradient(
|
|
174
|
+
120% 85% at 6% -14%,
|
|
175
|
+
color-mix(in srgb, var(--color-info) 30%, transparent) 0%,
|
|
176
|
+
transparent 56%
|
|
177
|
+
),
|
|
178
|
+
radial-gradient(
|
|
179
|
+
95% 75% at 98% 4%,
|
|
180
|
+
color-mix(in srgb, var(--color-success) 22%, transparent) 0%,
|
|
181
|
+
transparent 58%
|
|
182
|
+
),
|
|
183
|
+
linear-gradient(
|
|
184
|
+
158deg,
|
|
185
|
+
color-mix(in srgb, var(--color-info) 18%, var(--bg-page)) 0%,
|
|
186
|
+
color-mix(in srgb, var(--color-success) 13%, var(--bg-page)) 52%,
|
|
187
|
+
var(--bg-page) 100%
|
|
188
|
+
);
|
|
189
|
+
--wall-dune: radial-gradient(
|
|
190
|
+
120% 85% at 8% -14%,
|
|
191
|
+
color-mix(in srgb, var(--color-warning) 34%, transparent) 0%,
|
|
192
|
+
transparent 56%
|
|
193
|
+
),
|
|
194
|
+
radial-gradient(
|
|
195
|
+
95% 75% at 98% 6%,
|
|
196
|
+
color-mix(in srgb, var(--color-primary) 16%, transparent) 0%,
|
|
197
|
+
transparent 60%
|
|
198
|
+
),
|
|
199
|
+
linear-gradient(
|
|
200
|
+
158deg,
|
|
201
|
+
color-mix(in srgb, var(--color-warning) 17%, var(--bg-page)) 0%,
|
|
202
|
+
color-mix(in srgb, var(--color-primary) 8%, var(--bg-page)) 55%,
|
|
203
|
+
var(--bg-page) 100%
|
|
204
|
+
);
|
|
205
|
+
--wall-reef: radial-gradient(
|
|
206
|
+
120% 85% at 6% -14%,
|
|
207
|
+
color-mix(in srgb, var(--color-info) 32%, transparent) 0%,
|
|
208
|
+
transparent 56%
|
|
209
|
+
),
|
|
210
|
+
radial-gradient(
|
|
211
|
+
95% 75% at 98% 6%,
|
|
212
|
+
color-mix(in srgb, var(--color-primary) 18%, transparent) 0%,
|
|
213
|
+
transparent 60%
|
|
214
|
+
),
|
|
215
|
+
linear-gradient(
|
|
216
|
+
158deg,
|
|
217
|
+
color-mix(in srgb, var(--color-info) 14%, var(--bg-page)) 0%,
|
|
218
|
+
color-mix(in srgb, var(--color-primary) 10%, var(--bg-page)) 60%,
|
|
219
|
+
var(--bg-page) 100%
|
|
220
|
+
);
|
|
221
|
+
|
|
222
|
+
/* Shadow(卡片无阴影,最多 hover 微阴影) */
|
|
223
|
+
--shadow-card: 0 1px 2px rgba(38, 35, 27, 0.04);
|
|
224
|
+
--shadow-card-hover: 0 4px 16px rgba(38, 35, 27, 0.08);
|
|
225
|
+
--shadow-input-focus: 0 0 0 3px rgba(29, 26, 20, 0.08);
|
|
226
|
+
|
|
227
|
+
/* Layout */
|
|
228
|
+
--sidebar-width: 240px;
|
|
229
|
+
--header-height: 48px;
|
|
230
|
+
--page-padding-x: 24px;
|
|
231
|
+
--page-padding-y: 24px;
|
|
232
|
+
|
|
233
|
+
/* Typography
|
|
234
|
+
--font-size-h1/h2 是「显示级」字号(系统页标题 / 主屏分区标题):与正文 13px 拉开
|
|
235
|
+
1.4× 以上的层级差,标题才有分量——全部字号在同一档位附近会让界面看起来扁平。 */
|
|
236
|
+
--font-size-title: calc(14px * var(--ui-scale));
|
|
237
|
+
--font-size-card-title: calc(14px * var(--ui-scale));
|
|
238
|
+
--font-size-body: calc(13px * var(--ui-scale));
|
|
239
|
+
--font-size-label: calc(12px * var(--ui-scale));
|
|
240
|
+
--font-size-tag: calc(11px * var(--ui-scale));
|
|
241
|
+
--font-size-h1: calc(19px * var(--ui-scale));
|
|
242
|
+
--font-size-h2: calc(15px * var(--ui-scale));
|
|
243
|
+
|
|
244
|
+
/* 交互动效:壳与挂载面共用同一组节奏(时长按距离 / 复杂度分档,缓动统一减速到达)。
|
|
245
|
+
组件 scoped 样式里不再各写一份 0.15s/0.2s —— 见 ui-ux-pro-max ux 域
|
|
246
|
+
Duration Timing:用共享 token,别把同一组数字抄进每个过渡。
|
|
247
|
+
曲线取「强减速」档(Emil Kowalski 动效技能 animate / AUDIT.md):入场用
|
|
248
|
+
cubic-bezier(0.23, 1, 0.32, 1) 而不是内置 ease-out —— 内置曲线前段太软,
|
|
249
|
+
用户盯着看的那一下会显得迟滞。退场仍保留加速曲线(ui-ux-pro-max Easing:
|
|
250
|
+
到达减速、离开加速)。 */
|
|
251
|
+
--motion-duration-fast: 130ms;
|
|
252
|
+
--motion-duration-base: 200ms;
|
|
253
|
+
--motion-duration-slow: 320ms;
|
|
254
|
+
--motion-ease: cubic-bezier(0.23, 1, 0.32, 1);
|
|
255
|
+
--motion-ease-in: cubic-bezier(0.4, 0, 1, 1);
|
|
256
|
+
|
|
257
|
+
/* 键盘焦点环(所有自绘控件共用):实色 2px + 2px 间隙,任何底色上都可辨 */
|
|
258
|
+
--focus-ring-color: var(--color-info);
|
|
259
|
+
--focus-ring-width: 2px;
|
|
260
|
+
--focus-ring-offset: 2px;
|
|
261
|
+
|
|
262
|
+
/* 选中态分两套,都不用黑色描边:
|
|
263
|
+
· 背景壁纸选择(预览类,唯一保留勾章):表面抬一档选中色阶 + 黑底白勾
|
|
264
|
+
· 其余选择(分段档位 / 快捷磁贴 / 多任务信息条 / 授权档位):黑底白字
|
|
265
|
+
选中填充用固定近黑 + 固定反白,不随明暗主题反转——用户裁决「选中背景为黑色、
|
|
266
|
+
不是白色」,深色主题下也不能翻成白底(2026-10-20)。 */
|
|
267
|
+
--selection-solid: #1d1a14;
|
|
268
|
+
--selection-solid-ink: #fdfcfa;
|
|
269
|
+
--selection-halo: color-mix(in srgb, var(--text-primary) 22%, transparent);
|
|
270
|
+
--selection-tint: color-mix(in srgb, var(--selection-solid) 8%, var(--bg-card));
|
|
271
|
+
|
|
272
|
+
/* Component Sizes */
|
|
273
|
+
--input-height: 36px;
|
|
274
|
+
--button-height: 32px;
|
|
275
|
+
--tag-height: 24px;
|
|
276
|
+
--nav-item-height: 40px;
|
|
277
|
+
--action-button-size: 32px;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
/* 深色模式 · 默认色板 warm
|
|
281
|
+
深色预览块也走这份基础档:`:root.dark .theme-base` 让默认主题的预览跟着壳的明暗走
|
|
282
|
+
(比让 JS 给预览块另挂一个 dark 类更稳——<html> 上的 dark 类是明暗的唯一真源)。 */
|
|
283
|
+
:root.dark,
|
|
284
|
+
:root.dark .theme-base {
|
|
285
|
+
color-scheme: dark;
|
|
286
|
+
|
|
287
|
+
--bg-page: #15130f;
|
|
288
|
+
--bg-sidebar: #191712;
|
|
289
|
+
--bg-card: #1d1a15;
|
|
290
|
+
--bg-hover: #2a261e;
|
|
291
|
+
--bg-input: #1d1a15;
|
|
292
|
+
--text-primary: #ece8dc;
|
|
293
|
+
--text-secondary: #aaa393;
|
|
294
|
+
--text-tertiary: #948c79;
|
|
295
|
+
--border: #2e2a22;
|
|
296
|
+
--border-strong: #3c372b;
|
|
297
|
+
--border-input: #3c372b;
|
|
298
|
+
--color-primary: #ece8dc;
|
|
299
|
+
--color-primary-hover: #f5f2ea;
|
|
300
|
+
--color-primary-light: rgba(236, 232, 220, 0.12);
|
|
301
|
+
--color-primary-contrast: #15130f;
|
|
302
|
+
--color-success-light: rgba(34, 197, 94, 0.15);
|
|
303
|
+
--color-warning-light: rgba(245, 158, 11, 0.15);
|
|
304
|
+
--color-danger-light: rgba(239, 68, 68, 0.15);
|
|
305
|
+
--color-info: #60a5fa;
|
|
306
|
+
--color-info-light: rgba(96, 165, 250, 0.14);
|
|
307
|
+
/* 状态色文字档(深色):同一色相在深底上要更亮才够 4.5:1(见浅色档注释) */
|
|
308
|
+
--color-success-ink: #4ade80;
|
|
309
|
+
--color-warning-ink: #fbbf24;
|
|
310
|
+
--color-danger-ink: #f87171;
|
|
311
|
+
--color-info-ink: #93c5fd;
|
|
312
|
+
--shadow-card: 0 1px 2px rgba(0, 0, 0, 0.2);
|
|
313
|
+
--shadow-card-hover: 0 4px 16px rgba(0, 0, 0, 0.35);
|
|
314
|
+
--shadow-input-focus: 0 0 0 3px rgba(236, 232, 220, 0.12);
|
|
315
|
+
|
|
316
|
+
/* 深色档壁纸:同一套构图,浓度整体降一档(浅色语义色在深底上混合后的亮度
|
|
317
|
+
远高于浅色主题,照搬浅色百分比会糊成一块高饱和墨色)。 */
|
|
318
|
+
--wall-aurora: radial-gradient(
|
|
319
|
+
120% 85% at 6% -14%,
|
|
320
|
+
color-mix(in srgb, var(--color-info) 24%, transparent) 0%,
|
|
321
|
+
transparent 56%
|
|
322
|
+
),
|
|
323
|
+
radial-gradient(
|
|
324
|
+
95% 75% at 98% 4%,
|
|
325
|
+
color-mix(in srgb, var(--color-success) 12%, transparent) 0%,
|
|
326
|
+
transparent 58%
|
|
327
|
+
),
|
|
328
|
+
linear-gradient(
|
|
329
|
+
158deg,
|
|
330
|
+
color-mix(in srgb, var(--color-info) 10%, var(--bg-page)) 0%,
|
|
331
|
+
color-mix(in srgb, var(--color-success) 5%, var(--bg-page)) 52%,
|
|
332
|
+
var(--bg-page) 100%
|
|
333
|
+
);
|
|
334
|
+
--wall-dune: radial-gradient(
|
|
335
|
+
120% 85% at 8% -14%,
|
|
336
|
+
color-mix(in srgb, var(--color-warning) 26%, transparent) 0%,
|
|
337
|
+
transparent 56%
|
|
338
|
+
),
|
|
339
|
+
radial-gradient(
|
|
340
|
+
95% 75% at 98% 6%,
|
|
341
|
+
color-mix(in srgb, var(--color-primary) 10%, transparent) 0%,
|
|
342
|
+
transparent 60%
|
|
343
|
+
),
|
|
344
|
+
linear-gradient(
|
|
345
|
+
158deg,
|
|
346
|
+
color-mix(in srgb, var(--color-warning) 11%, var(--bg-page)) 0%,
|
|
347
|
+
color-mix(in srgb, var(--color-primary) 5%, var(--bg-page)) 55%,
|
|
348
|
+
var(--bg-page) 100%
|
|
349
|
+
);
|
|
350
|
+
--wall-reef: radial-gradient(
|
|
351
|
+
120% 85% at 6% -14%,
|
|
352
|
+
color-mix(in srgb, var(--color-info) 26%, transparent) 0%,
|
|
353
|
+
transparent 56%
|
|
354
|
+
),
|
|
355
|
+
radial-gradient(
|
|
356
|
+
95% 75% at 98% 6%,
|
|
357
|
+
color-mix(in srgb, var(--color-primary) 11%, transparent) 0%,
|
|
358
|
+
transparent 60%
|
|
359
|
+
),
|
|
360
|
+
linear-gradient(
|
|
361
|
+
158deg,
|
|
362
|
+
color-mix(in srgb, var(--color-info) 8%, var(--bg-page)) 0%,
|
|
363
|
+
color-mix(in srgb, var(--color-primary) 6%, var(--bg-page)) 60%,
|
|
364
|
+
var(--bg-page) 100%
|
|
365
|
+
);
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
/* 默认档的中性化:主题专属的三枚 token(环境光 / 图标外框 / 图标投影)不属于默认档,
|
|
369
|
+
显式归零——否则它们会从当前主题的 <html> 继承下来,默认预览就带上了别人的语汇。 */
|
|
370
|
+
.theme-base {
|
|
371
|
+
--theme-ambient: none;
|
|
372
|
+
--theme-icon-shadow: none;
|
|
373
|
+
--theme-icon-radius: var(--radius-app-icon);
|
|
374
|
+
/* 玻璃材质 token 也归零:默认预览不挂 data-theme,若这些值从当前主题
|
|
375
|
+
继承下来,任何引用它们的预览规则都会偷偷长成玻璃。 */
|
|
376
|
+
--theme-glass-tint: var(--bg-card);
|
|
377
|
+
--theme-glass-fill-top: var(--bg-card);
|
|
378
|
+
--theme-glass-fill-bottom: var(--bg-card);
|
|
379
|
+
--theme-glass-control: var(--bg-card);
|
|
380
|
+
--theme-glass-control-hover: var(--bg-card);
|
|
381
|
+
--theme-glass-rim-hi: transparent;
|
|
382
|
+
--theme-glass-rim-lo: transparent;
|
|
383
|
+
--theme-glass-inner: transparent;
|
|
384
|
+
--theme-glass-edge: var(--border);
|
|
385
|
+
--theme-glass-sheen: transparent;
|
|
386
|
+
--theme-glass-caustic: transparent;
|
|
387
|
+
--theme-glass-glow: transparent;
|
|
388
|
+
--theme-glass-blur: 0px;
|
|
389
|
+
--theme-glass-sat: 100%;
|
|
390
|
+
--theme-glass-brightness: 1;
|
|
391
|
+
--theme-glass-grain: none;
|
|
392
|
+
--theme-glass-grain-opacity: 0;
|
|
393
|
+
--theme-glass-selected: var(--bg-card);
|
|
394
|
+
--theme-glass-radius-card: var(--radius-card);
|
|
395
|
+
--theme-glass-radius-control: var(--radius-button);
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
/* ==================== 色板:cool(冷灰调) ==================== */
|
|
399
|
+
/* 新增色板 = 在此加一组 [data-palette='xxx'] 变量覆盖 + 设置页调色台选项 */
|
|
400
|
+
|
|
401
|
+
:root[data-palette='cool'] {
|
|
402
|
+
--bg-page: #f3f5f7;
|
|
403
|
+
--bg-sidebar: #eceef2;
|
|
404
|
+
--bg-card: #fbfcfd;
|
|
405
|
+
--bg-hover: #e4e8ee;
|
|
406
|
+
--bg-input: #fbfcfd;
|
|
407
|
+
|
|
408
|
+
--text-primary: #1f2937;
|
|
409
|
+
--text-secondary: #545964;
|
|
410
|
+
--text-tertiary: #646c7b;
|
|
411
|
+
|
|
412
|
+
--border: #e2e6ec;
|
|
413
|
+
--border-strong: #c9d1dc;
|
|
414
|
+
--border-input: #c9d1dc;
|
|
415
|
+
|
|
416
|
+
--color-primary: #2563eb;
|
|
417
|
+
--color-primary-hover: #1d4ed8;
|
|
418
|
+
--color-primary-light: rgba(37, 99, 235, 0.1);
|
|
419
|
+
--color-primary-contrast: #ffffff;
|
|
420
|
+
|
|
421
|
+
--shadow-card: 0 1px 2px rgba(31, 41, 55, 0.04);
|
|
422
|
+
--shadow-card-hover: 0 4px 16px rgba(31, 41, 55, 0.08);
|
|
423
|
+
--shadow-input-focus: 0 0 0 3px rgba(37, 99, 235, 0.12);
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
:root.dark[data-palette='cool'] {
|
|
427
|
+
--bg-page: #0f172a;
|
|
428
|
+
--bg-sidebar: #131c2e;
|
|
429
|
+
--bg-card: #1a2438;
|
|
430
|
+
--bg-hover: #26334d;
|
|
431
|
+
--bg-input: #1a2438;
|
|
432
|
+
|
|
433
|
+
--text-primary: #e2e8f0;
|
|
434
|
+
--text-secondary: #a8b4c5;
|
|
435
|
+
--text-tertiary: #8f9cae;
|
|
436
|
+
|
|
437
|
+
--border: #283548;
|
|
438
|
+
--border-strong: #3b4a63;
|
|
439
|
+
--border-input: #3b4a63;
|
|
440
|
+
|
|
441
|
+
--color-primary: #93c5fd;
|
|
442
|
+
--color-primary-hover: #bfdbfe;
|
|
443
|
+
--color-primary-light: rgba(147, 197, 253, 0.12);
|
|
444
|
+
--color-primary-contrast: #0f172a;
|
|
445
|
+
|
|
446
|
+
--shadow-card: 0 1px 2px rgba(0, 0, 0, 0.25);
|
|
447
|
+
--shadow-card-hover: 0 4px 16px rgba(0, 0, 0, 0.4);
|
|
448
|
+
--shadow-input-focus: 0 0 0 3px rgba(147, 197, 253, 0.15);
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
/* 默认色板 warm 已直接写入 :root / :root.dark,无需重复块 */
|
|
452
|
+
|
|
453
|
+
/* ==================== 色板:forest(森野绿 · 自然沉稳) ==================== */
|
|
454
|
+
/* 注意:色板变量组与 dev-shell 的 styles/style.css 镜像同步(改色需双端同改) */
|
|
455
|
+
|
|
456
|
+
:root[data-palette='forest'] {
|
|
457
|
+
--bg-page: #f6f5ef;
|
|
458
|
+
--bg-sidebar: #efeee6;
|
|
459
|
+
--bg-card: #fdfcf7;
|
|
460
|
+
--bg-hover: #e8e6db;
|
|
461
|
+
--bg-input: #fdfcf7;
|
|
462
|
+
|
|
463
|
+
--text-primary: #23281f;
|
|
464
|
+
--text-secondary: #565a51;
|
|
465
|
+
--text-tertiary: #6a6e5f;
|
|
466
|
+
|
|
467
|
+
--border: #e2e1d6;
|
|
468
|
+
--border-strong: #cfd0c0;
|
|
469
|
+
--border-input: #cfd0c0;
|
|
470
|
+
|
|
471
|
+
--color-primary: #3e6b4f;
|
|
472
|
+
--color-primary-hover: #32583f;
|
|
473
|
+
--color-primary-light: rgba(62, 107, 79, 0.1);
|
|
474
|
+
--color-primary-contrast: #fdfcf7;
|
|
475
|
+
|
|
476
|
+
--shadow-card: 0 1px 2px rgba(35, 40, 31, 0.04);
|
|
477
|
+
--shadow-card-hover: 0 4px 16px rgba(35, 40, 31, 0.08);
|
|
478
|
+
--shadow-input-focus: 0 0 0 3px rgba(62, 107, 79, 0.12);
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
:root.dark[data-palette='forest'] {
|
|
482
|
+
--bg-page: #101713;
|
|
483
|
+
--bg-sidebar: #141d18;
|
|
484
|
+
--bg-card: #1a241f;
|
|
485
|
+
--bg-hover: #243128;
|
|
486
|
+
--bg-input: #1a241f;
|
|
487
|
+
|
|
488
|
+
--text-primary: #e6ede4;
|
|
489
|
+
--text-secondary: #a3b0a9;
|
|
490
|
+
--text-tertiary: #899890;
|
|
491
|
+
|
|
492
|
+
--border: #27332c;
|
|
493
|
+
--border-strong: #37463d;
|
|
494
|
+
--border-input: #37463d;
|
|
495
|
+
|
|
496
|
+
--color-primary: #86c49b;
|
|
497
|
+
--color-primary-hover: #a3d6b4;
|
|
498
|
+
--color-primary-light: rgba(134, 196, 155, 0.12);
|
|
499
|
+
--color-primary-contrast: #101713;
|
|
500
|
+
|
|
501
|
+
--shadow-card: 0 1px 2px rgba(0, 0, 0, 0.25);
|
|
502
|
+
--shadow-card-hover: 0 4px 16px rgba(0, 0, 0, 0.4);
|
|
503
|
+
--shadow-input-focus: 0 0 0 3px rgba(134, 196, 155, 0.15);
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
/* ==================== 色板:ocean(海洋青 · 清爽通透) ==================== */
|
|
507
|
+
|
|
508
|
+
:root[data-palette='ocean'] {
|
|
509
|
+
--bg-page: #f2f7f9;
|
|
510
|
+
--bg-sidebar: #e9f0f4;
|
|
511
|
+
--bg-card: #fafcfd;
|
|
512
|
+
--bg-hover: #dfeaef;
|
|
513
|
+
--bg-input: #fafcfd;
|
|
514
|
+
|
|
515
|
+
--text-primary: #1b2b33;
|
|
516
|
+
--text-secondary: #4b5c65;
|
|
517
|
+
--text-tertiary: #5b707b;
|
|
518
|
+
|
|
519
|
+
--border: #dde6eb;
|
|
520
|
+
--border-strong: #c4d3db;
|
|
521
|
+
--border-input: #c4d3db;
|
|
522
|
+
|
|
523
|
+
--color-primary: #0e7490;
|
|
524
|
+
--color-primary-hover: #0b5e75;
|
|
525
|
+
--color-primary-light: rgba(14, 116, 144, 0.1);
|
|
526
|
+
--color-primary-contrast: #ffffff;
|
|
527
|
+
|
|
528
|
+
--shadow-card: 0 1px 2px rgba(27, 43, 51, 0.04);
|
|
529
|
+
--shadow-card-hover: 0 4px 16px rgba(27, 43, 51, 0.08);
|
|
530
|
+
--shadow-input-focus: 0 0 0 3px rgba(14, 116, 144, 0.12);
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
:root.dark[data-palette='ocean'] {
|
|
534
|
+
--bg-page: #0b1620;
|
|
535
|
+
--bg-sidebar: #0f1d29;
|
|
536
|
+
--bg-card: #152430;
|
|
537
|
+
--bg-hover: #1e303f;
|
|
538
|
+
--bg-input: #152430;
|
|
539
|
+
|
|
540
|
+
--text-primary: #e2eef4;
|
|
541
|
+
--text-secondary: #9ab0bc;
|
|
542
|
+
--text-tertiary: #8198a7;
|
|
543
|
+
|
|
544
|
+
--border: #1f323f;
|
|
545
|
+
--border-strong: #2e4556;
|
|
546
|
+
--border-input: #2e4556;
|
|
547
|
+
|
|
548
|
+
--color-primary: #5fd0e8;
|
|
549
|
+
--color-primary-hover: #8adff0;
|
|
550
|
+
--color-primary-light: rgba(95, 208, 232, 0.12);
|
|
551
|
+
--color-primary-contrast: #0b1620;
|
|
552
|
+
|
|
553
|
+
--shadow-card: 0 1px 2px rgba(0, 0, 0, 0.25);
|
|
554
|
+
--shadow-card-hover: 0 4px 16px rgba(0, 0, 0, 0.4);
|
|
555
|
+
--shadow-input-focus: 0 0 0 3px rgba(95, 208, 232, 0.15);
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
/* ==================== 色板:sunset(落日晚霞 · 温暖活力) ==================== */
|
|
559
|
+
|
|
560
|
+
:root[data-palette='sunset'] {
|
|
561
|
+
--bg-page: #fbf5ef;
|
|
562
|
+
--bg-sidebar: #f6ece2;
|
|
563
|
+
--bg-card: #fefaf5;
|
|
564
|
+
--bg-hover: #f0e2d4;
|
|
565
|
+
--bg-input: #fefaf5;
|
|
566
|
+
|
|
567
|
+
--text-primary: #33281f;
|
|
568
|
+
--text-secondary: #66564a;
|
|
569
|
+
--text-tertiary: #7d6854;
|
|
570
|
+
|
|
571
|
+
--border: #ede2d6;
|
|
572
|
+
--border-strong: #dfcbb8;
|
|
573
|
+
--border-input: #dfcbb8;
|
|
574
|
+
|
|
575
|
+
--color-primary: #d9532a;
|
|
576
|
+
--color-primary-hover: #bc4520;
|
|
577
|
+
--color-primary-light: rgba(217, 83, 42, 0.1);
|
|
578
|
+
--color-primary-contrast: #fefaf5;
|
|
579
|
+
|
|
580
|
+
--shadow-card: 0 1px 2px rgba(51, 40, 31, 0.04);
|
|
581
|
+
--shadow-card-hover: 0 4px 16px rgba(51, 40, 31, 0.08);
|
|
582
|
+
--shadow-input-focus: 0 0 0 3px rgba(217, 83, 42, 0.12);
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
:root.dark[data-palette='sunset'] {
|
|
586
|
+
--bg-page: #1b1210;
|
|
587
|
+
--bg-sidebar: #211613;
|
|
588
|
+
--bg-card: #2a1d18;
|
|
589
|
+
--bg-hover: #382722;
|
|
590
|
+
--bg-input: #2a1d18;
|
|
591
|
+
|
|
592
|
+
--text-primary: #f5e9e2;
|
|
593
|
+
--text-secondary: #bba49a;
|
|
594
|
+
--text-tertiary: #a68c80;
|
|
595
|
+
|
|
596
|
+
--border: #3a2b26;
|
|
597
|
+
--border-strong: #4e3a32;
|
|
598
|
+
--border-input: #4e3a32;
|
|
599
|
+
|
|
600
|
+
--color-primary: #f5a383;
|
|
601
|
+
--color-primary-hover: #f8bba2;
|
|
602
|
+
--color-primary-light: rgba(245, 163, 131, 0.12);
|
|
603
|
+
--color-primary-contrast: #1b1210;
|
|
604
|
+
|
|
605
|
+
--shadow-card: 0 1px 2px rgba(0, 0, 0, 0.25);
|
|
606
|
+
--shadow-card-hover: 0 4px 16px rgba(0, 0, 0, 0.4);
|
|
607
|
+
--shadow-input-focus: 0 0 0 3px rgba(245, 163, 131, 0.15);
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
/* ==================== 色板:violet(星空紫 · 静谧优雅) ==================== */
|
|
611
|
+
|
|
612
|
+
:root[data-palette='violet'] {
|
|
613
|
+
--bg-page: #f7f5fb;
|
|
614
|
+
--bg-sidebar: #f0edf7;
|
|
615
|
+
--bg-card: #fcfbfe;
|
|
616
|
+
--bg-hover: #e9e4f4;
|
|
617
|
+
--bg-input: #fcfbfe;
|
|
618
|
+
|
|
619
|
+
--text-primary: #2a2533;
|
|
620
|
+
--text-secondary: #5c5768;
|
|
621
|
+
--text-tertiary: #726788;
|
|
622
|
+
|
|
623
|
+
--border: #e5e0ee;
|
|
624
|
+
--border-strong: #d3cce2;
|
|
625
|
+
--border-input: #d3cce2;
|
|
626
|
+
|
|
627
|
+
--color-primary: #6d4fc6;
|
|
628
|
+
--color-primary-hover: #5b3fae;
|
|
629
|
+
--color-primary-light: rgba(109, 79, 198, 0.1);
|
|
630
|
+
--color-primary-contrast: #fcfbfe;
|
|
631
|
+
|
|
632
|
+
--shadow-card: 0 1px 2px rgba(42, 37, 51, 0.04);
|
|
633
|
+
--shadow-card-hover: 0 4px 16px rgba(42, 37, 51, 0.08);
|
|
634
|
+
--shadow-input-focus: 0 0 0 3px rgba(109, 79, 198, 0.12);
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
:root.dark[data-palette='violet'] {
|
|
638
|
+
--bg-page: #141020;
|
|
639
|
+
--bg-sidebar: #19132a;
|
|
640
|
+
--bg-card: #201936;
|
|
641
|
+
--bg-hover: #2c2247;
|
|
642
|
+
--bg-input: #201936;
|
|
643
|
+
|
|
644
|
+
--text-primary: #ece8f6;
|
|
645
|
+
--text-secondary: #aba0c5;
|
|
646
|
+
--text-tertiary: #928aa8;
|
|
647
|
+
|
|
648
|
+
--border: #2e2647;
|
|
649
|
+
--border-strong: #3e3560;
|
|
650
|
+
--border-input: #3e3560;
|
|
651
|
+
|
|
652
|
+
--color-primary: #b9a6f7;
|
|
653
|
+
--color-primary-hover: #cdbffa;
|
|
654
|
+
--color-primary-light: rgba(185, 166, 247, 0.12);
|
|
655
|
+
--color-primary-contrast: #141020;
|
|
656
|
+
|
|
657
|
+
--shadow-card: 0 1px 2px rgba(0, 0, 0, 0.25);
|
|
658
|
+
--shadow-card-hover: 0 4px 16px rgba(0, 0, 0, 0.4);
|
|
659
|
+
--shadow-input-focus: 0 0 0 3px rgba(185, 166, 247, 0.15);
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
/* ==================== 桌面端字体大小 ==================== */
|
|
663
|
+
|
|
664
|
+
.desktop-ui {
|
|
665
|
+
font-size: var(--font-size-base);
|
|
666
|
+
line-height: 1.5;
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
.desktop-ui h1,
|
|
670
|
+
.desktop-ui .title-xl {
|
|
671
|
+
font-size: var(--font-size-xl);
|
|
672
|
+
font-weight: 600;
|
|
673
|
+
line-height: 1.3;
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
.desktop-ui h2,
|
|
677
|
+
.desktop-ui .title-lg {
|
|
678
|
+
font-size: var(--font-size-lg);
|
|
679
|
+
font-weight: 600;
|
|
680
|
+
line-height: 1.4;
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
/* ==================== 移动端字体大小 ==================== */
|
|
684
|
+
|
|
685
|
+
.mobile-ui {
|
|
686
|
+
font-size: var(--font-size-base);
|
|
687
|
+
line-height: 1.5;
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
.mobile-ui h1,
|
|
691
|
+
.mobile-ui .title-xl {
|
|
692
|
+
font-size: var(--font-size-xl);
|
|
693
|
+
font-weight: 600;
|
|
694
|
+
line-height: 1.3;
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
.mobile-ui h2,
|
|
698
|
+
.mobile-ui .title-lg {
|
|
699
|
+
font-size: var(--font-size-lg);
|
|
700
|
+
font-weight: 600;
|
|
701
|
+
line-height: 1.4;
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
.mobile-ui button,
|
|
705
|
+
.mobile-ui .btn {
|
|
706
|
+
font-size: var(--font-size-base);
|
|
707
|
+
font-weight: 500;
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
.mobile-ui input,
|
|
711
|
+
.mobile-ui textarea,
|
|
712
|
+
.mobile-ui select {
|
|
713
|
+
font-size: var(--font-size-base);
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
.mobile-ui .card-desc,
|
|
717
|
+
.mobile-ui .item-desc {
|
|
718
|
+
font-size: var(--font-size-sm);
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
/* ==================== 通用样式 ==================== */
|
|
722
|
+
|
|
723
|
+
body {
|
|
724
|
+
margin: 0;
|
|
725
|
+
min-width: 320px;
|
|
726
|
+
min-height: 100vh;
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
/* 移动端安全区域 */
|
|
730
|
+
.mobile-app {
|
|
731
|
+
min-height: 100vh;
|
|
732
|
+
min-height: 100dvh;
|
|
733
|
+
transition: padding-top 0.25s cubic-bezier(0.4, 0, 0.2, 1);
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
.mobile-nav-safe {
|
|
737
|
+
padding-bottom: var(--safe-area-bottom, 0px);
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
.mobile-header-safe {
|
|
741
|
+
padding-top: var(--safe-area-top, 0px);
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
.mobile-input-bar {
|
|
745
|
+
margin-bottom: env(keyboard-inset-bottom, 0px);
|
|
746
|
+
transition: margin-bottom 0.25s cubic-bezier(0.4, 0, 0.2, 1);
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
/* ==================== Desktop UI 全局交互 ==================== */
|
|
750
|
+
|
|
751
|
+
.desktop-ui .shadow-card {
|
|
752
|
+
transition: box-shadow 200ms ease;
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
.desktop-ui .shadow-card:hover {
|
|
756
|
+
box-shadow: var(--shadow-card-hover);
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
.desktop-ui input:focus,
|
|
760
|
+
.desktop-ui select:focus {
|
|
761
|
+
border-color: var(--color-primary);
|
|
762
|
+
box-shadow: var(--shadow-input-focus);
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
/* 只过渡真正会变的属性:`transition: all` 会把 width/height 等布局属性也纳入
|
|
766
|
+
过渡(按钮文字变化时整页重排),并且无法被合成器单独优化。 */
|
|
767
|
+
.desktop-ui button,
|
|
768
|
+
.desktop-ui a {
|
|
769
|
+
transition:
|
|
770
|
+
background-color var(--motion-duration-base) var(--motion-ease),
|
|
771
|
+
border-color var(--motion-duration-base) var(--motion-ease),
|
|
772
|
+
color var(--motion-duration-base) var(--motion-ease),
|
|
773
|
+
box-shadow var(--motion-duration-base) var(--motion-ease),
|
|
774
|
+
opacity var(--motion-duration-base) var(--motion-ease),
|
|
775
|
+
transform var(--motion-duration-base) var(--motion-ease);
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
/* ==================== Scrollbar ==================== */
|
|
779
|
+
|
|
780
|
+
::-webkit-scrollbar {
|
|
781
|
+
width: 8px;
|
|
782
|
+
height: 8px;
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
::-webkit-scrollbar-track {
|
|
786
|
+
background: var(--bg-hover);
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
::-webkit-scrollbar-thumb {
|
|
790
|
+
background: var(--text-tertiary);
|
|
791
|
+
border-radius: 4px;
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
::-webkit-scrollbar-thumb:hover {
|
|
795
|
+
background: var(--text-secondary);
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
/* ==================== Terminal ==================== */
|
|
799
|
+
|
|
800
|
+
.terminal-output {
|
|
801
|
+
font-family: theme('fontFamily.mono');
|
|
802
|
+
white-space: pre-wrap;
|
|
803
|
+
word-break: break-word;
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
/* ==================== Warm Workbench 通用样式 ==================== */
|
|
807
|
+
|
|
808
|
+
/* 页面工具栏页头:48px,左标题右操作,底部 1px 实线 */
|
|
809
|
+
.wb-toolbar {
|
|
810
|
+
height: var(--header-height);
|
|
811
|
+
padding: 0 20px;
|
|
812
|
+
display: flex;
|
|
813
|
+
align-items: center;
|
|
814
|
+
justify-content: space-between;
|
|
815
|
+
border-bottom: 1px solid var(--border);
|
|
816
|
+
background: var(--bg-card);
|
|
817
|
+
flex-shrink: 0;
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
/* 小号 section 标题(ENABLED · 2 等):sentence case,靠字号/颜色分层,不靠全大写 */
|
|
821
|
+
.wb-section-title {
|
|
822
|
+
font-size: calc(11px * var(--ui-scale));
|
|
823
|
+
font-weight: 500;
|
|
824
|
+
letter-spacing: 0.01em;
|
|
825
|
+
color: var(--text-secondary);
|
|
826
|
+
margin-bottom: 8px;
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
/* 侧边栏分组标签(Navigation / Plugins / Status):sentence case;技术 token 才保留大写 */
|
|
830
|
+
.wb-sidebar-section {
|
|
831
|
+
font-size: calc(11px * var(--ui-scale));
|
|
832
|
+
font-weight: 500;
|
|
833
|
+
letter-spacing: 0;
|
|
834
|
+
color: var(--text-tertiary);
|
|
835
|
+
white-space: nowrap;
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
/* 次要操作按钮(ghost) */
|
|
839
|
+
.wb-btn-ghost {
|
|
840
|
+
height: 28px;
|
|
841
|
+
padding: 0 12px;
|
|
842
|
+
font-size: calc(12px * var(--ui-scale));
|
|
843
|
+
font-weight: 500;
|
|
844
|
+
border-radius: 6px;
|
|
845
|
+
border: 1px solid var(--border);
|
|
846
|
+
color: var(--text-primary);
|
|
847
|
+
display: inline-flex;
|
|
848
|
+
align-items: center;
|
|
849
|
+
gap: 6px;
|
|
850
|
+
transition:
|
|
851
|
+
background 150ms ease,
|
|
852
|
+
opacity 150ms ease;
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
.wb-btn-ghost:hover {
|
|
856
|
+
background: var(--bg-hover);
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
.wb-btn-ghost:disabled {
|
|
860
|
+
opacity: 0.5;
|
|
861
|
+
cursor: not-allowed;
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
/* 主操作按钮(近黑/近白实底) */
|
|
865
|
+
.wb-btn-primary {
|
|
866
|
+
height: 28px;
|
|
867
|
+
padding: 0 14px;
|
|
868
|
+
font-size: calc(12px * var(--ui-scale));
|
|
869
|
+
font-weight: 500;
|
|
870
|
+
border-radius: 6px;
|
|
871
|
+
background: var(--color-primary);
|
|
872
|
+
color: var(--color-primary-contrast);
|
|
873
|
+
display: inline-flex;
|
|
874
|
+
align-items: center;
|
|
875
|
+
gap: 6px;
|
|
876
|
+
transition: opacity 150ms ease;
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
.wb-btn-primary:hover {
|
|
880
|
+
opacity: 0.9;
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
.wb-btn-primary:disabled {
|
|
884
|
+
opacity: 0.5;
|
|
885
|
+
cursor: not-allowed;
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
/* 技术值(端口/地址/路径/命令)等宽字 */
|
|
889
|
+
.wb-mono {
|
|
890
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Courier New', monospace;
|
|
891
|
+
font-size: calc(12.5px * var(--ui-scale));
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
/* ==================== 全局动画总开关 ==================== */
|
|
895
|
+
/* 设置页「动画效果」关闭时 <html> 带 anim-disabled,瞬时禁用所有过渡/动画
|
|
896
|
+
(含组件 scoped 样式与 .desktop-ui 全局交互),仅保留布局无位移跳动。
|
|
897
|
+
优先级 !important 覆盖一切 transition/animation 设定。 */
|
|
898
|
+
html.anim-disabled *,
|
|
899
|
+
html.anim-disabled *::before,
|
|
900
|
+
html.anim-disabled *::after {
|
|
901
|
+
animation-duration: 0.001ms !important;
|
|
902
|
+
animation-delay: 0ms !important;
|
|
903
|
+
animation-iteration-count: 1 !important;
|
|
904
|
+
transition-duration: 0.001ms !important;
|
|
905
|
+
transition-delay: 0ms !important;
|
|
906
|
+
scroll-behavior: auto !important;
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
/* ==================== Animation ==================== */
|
|
910
|
+
|
|
911
|
+
@keyframes pulse-slow {
|
|
912
|
+
0%,
|
|
913
|
+
100% {
|
|
914
|
+
opacity: 1;
|
|
915
|
+
}
|
|
916
|
+
50% {
|
|
917
|
+
opacity: 0.5;
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
.animate-pulse-slow {
|
|
922
|
+
animation: pulse-slow 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
|
|
923
|
+
}
|
|
924
|
+
|
|
925
|
+
/* ==================== 页面过渡动效(全端单一事实源) ====================
|
|
926
|
+
* 宿主路由 + 四个 wasm 应用的「整视图 / 分区切换」共用这一套,三条硬约定:
|
|
927
|
+
* 1. transition 名字恒为 `page`(不得再出现 ah-page / ft-page / page-fade /
|
|
928
|
+
* view-slide / tab-fade 等各自为政的页面级过渡);
|
|
929
|
+
* 2. 过渡容器必须带 `page-swap`(定位上下文,见下);
|
|
930
|
+
* 3. 效果由 <html data-page-fx> 选择,唯一切换点是
|
|
931
|
+
* `src/utils/pageTransition.ts` 的 PAGE_TRANSITION_EFFECT(代码级,无设置项)。
|
|
932
|
+
*
|
|
933
|
+
* 为什么是「两层重叠交叉」而不是 `mode="out-in"`:out-in 先播完出场、再挂载入场,
|
|
934
|
+
* 两者之间存在一帧以上「容器里什么都没有」的窗口,露出的是 --bg-page —— 五套暗色
|
|
935
|
+
* 主题下它分别是 #15130f / #0f172a / #101713 / #0b1620 / #1b1210,全是近黑,
|
|
936
|
+
* 于是切页表现为「黑屏 + 闪烁」(历史上同一机制还在插件视图上触发过永久白屏)。
|
|
937
|
+
* 现在出场层 `position: absolute` 脱离文档流、新元素从第一帧就占位,两层同屏叠加,
|
|
938
|
+
* 容器永不断层。
|
|
939
|
+
*/
|
|
940
|
+
|
|
941
|
+
/* 动效 token:所有页面过渡的时长 / 缓动 / 幅度只从这里取,不允许把同一组数字
|
|
942
|
+
抄进各组件的 scoped 样式(参考:ui-ux-pro-max ux 域 Animation·Duration Timing
|
|
943
|
+
—— use shared motion tokens,而非 one duration copied to every transition)。 */
|
|
944
|
+
:root {
|
|
945
|
+
--motion-page-duration-in: 220ms;
|
|
946
|
+
--motion-page-duration-out: 160ms;
|
|
947
|
+
/* 与 --motion-ease 同一档强减速曲线:页面入场是最常被注视的动效,
|
|
948
|
+
缓动强度不能比壳内小组件弱。 */
|
|
949
|
+
--motion-page-ease: cubic-bezier(0.23, 1, 0.32, 1);
|
|
950
|
+
--motion-page-shift: 10px;
|
|
951
|
+
--motion-page-scale: 0.985;
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
/*
|
|
955
|
+
* 过渡容器(`.page-swap`):出场的绝对定位层以它为定位上下文。
|
|
956
|
+
* `--page-swap-pad-*` 是内边距补偿——绝对定位按 padding box 解析,容器有内边距时
|
|
957
|
+
* 出场层会整体偏移(横向滑走),用负偏移抵消回 content box,与入场层严丝合缝。
|
|
958
|
+
* 两个变量同时充当「内边距真值」与「补偿量」,同一处声明,不会漂移。
|
|
959
|
+
*/
|
|
960
|
+
.page-swap {
|
|
961
|
+
position: relative;
|
|
962
|
+
--page-swap-pad-x: 0px;
|
|
963
|
+
--page-swap-pad-y: 0px;
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
/* 带内边距的过渡容器(替代原先散落的 Tailwind p-*,保证补偿量与内边距同源)。
|
|
967
|
+
等价 Tailwind `px-6 py-5`;新增带内边距的过渡容器时按需加一档,别把裸 px-* / py-*
|
|
968
|
+
写回容器上——那样补偿量与内边距就变成两个来源。 */
|
|
969
|
+
.page-swap-pad-lg {
|
|
970
|
+
--page-swap-pad-x: 1.5rem;
|
|
971
|
+
--page-swap-pad-y: 1.25rem;
|
|
972
|
+
padding: var(--page-swap-pad-y) var(--page-swap-pad-x);
|
|
973
|
+
}
|
|
974
|
+
|
|
975
|
+
.page-enter-active,
|
|
976
|
+
.page-leave-active {
|
|
977
|
+
transition:
|
|
978
|
+
opacity var(--motion-page-duration-in) var(--motion-page-ease),
|
|
979
|
+
transform var(--motion-page-duration-in) var(--motion-page-ease);
|
|
980
|
+
will-change: opacity, transform;
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
.page-leave-active {
|
|
984
|
+
/* 出场层脱离文档流 → 新元素立即占位,容器无空帧。top/left 用减法写法抵消
|
|
985
|
+
内边距(CSS Values-4 的 `calc(-1 * var())` 乘法要 Chromium 111+ 才支持,
|
|
986
|
+
WebView2/WKWebView 老内核会在解析期整条丢弃,见 2026-10-04 OCR D-02);
|
|
987
|
+
width 扣掉两侧内边距;**不写 bottom、不设 height** —— 高度保持自然值,
|
|
988
|
+
否则长内容会被容器可视高度拉伸变形。
|
|
989
|
+
pointer-events: none:重叠过渡期间点按落在正在淡出的旧页上会重复触发
|
|
990
|
+
切页/双击(D-04)——160ms 里旧页只是残影,不该再接事件。 */
|
|
991
|
+
position: absolute;
|
|
992
|
+
top: calc(0px - var(--page-swap-pad-y));
|
|
993
|
+
left: calc(0px - var(--page-swap-pad-x));
|
|
994
|
+
/* width 同样不用乘法(老内核整条丢弃):扣两次即可 */
|
|
995
|
+
width: calc(100% - var(--page-swap-pad-x) - var(--page-swap-pad-x));
|
|
996
|
+
/* 高度上限 = 容器可视高:出场层是旧页的残影,长表单/长会话淡出时若保持自然
|
|
997
|
+
高度会画出容器可视区(被 main{overflow:hidden} 裁掉的部分仍参与绘制,
|
|
998
|
+
短内容时则露底下入场页;见 2026-10-04 OCR D-05)。max-height 只截超长,
|
|
999
|
+
不强制拉满——短内容仍是自然高度。 */
|
|
1000
|
+
max-height: 100%;
|
|
1001
|
+
overflow: hidden;
|
|
1002
|
+
transition-duration: var(--motion-page-duration-out);
|
|
1003
|
+
/* 绝对定位层本就绘制在静态流内容之上,显式写出 z-index:将来入场元素自带定位 /
|
|
1004
|
+
z-index 时次序不会翻转(旧页压在新页下面 = 新页纹丝不动,读不出交叉淡入)。 */
|
|
1005
|
+
z-index: 1;
|
|
1006
|
+
pointer-events: none;
|
|
1007
|
+
}
|
|
1008
|
+
|
|
1009
|
+
/* 效果变体:入场起点 / 出场终点。无 data-page-fx(首帧、JS 未生效)默认 slide-up。 */
|
|
1010
|
+
.page-enter-from,
|
|
1011
|
+
html[data-page-fx='slide-up'] .page-enter-from {
|
|
1012
|
+
opacity: 0;
|
|
1013
|
+
transform: translateY(var(--motion-page-shift));
|
|
1014
|
+
}
|
|
1015
|
+
.page-leave-to,
|
|
1016
|
+
html[data-page-fx='slide-up'] .page-leave-to {
|
|
1017
|
+
opacity: 0;
|
|
1018
|
+
transform: translateY(calc(0px - var(--motion-page-shift) / 2));
|
|
1019
|
+
}
|
|
1020
|
+
|
|
1021
|
+
/* fade:纯透明度交叉,无位移 */
|
|
1022
|
+
html[data-page-fx='fade'] .page-enter-from,
|
|
1023
|
+
html[data-page-fx='fade'] .page-leave-to {
|
|
1024
|
+
transform: none;
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
/* slide-left:横向推移(前进 / 后退的方向感) */
|
|
1028
|
+
html[data-page-fx='slide-left'] .page-enter-from {
|
|
1029
|
+
opacity: 0;
|
|
1030
|
+
transform: translateX(var(--motion-page-shift));
|
|
1031
|
+
}
|
|
1032
|
+
html[data-page-fx='slide-left'] .page-leave-to {
|
|
1033
|
+
opacity: 0;
|
|
1034
|
+
transform: translateX(calc(0px - var(--motion-page-shift) / 2));
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
/* zoom:轻微缩放,transform-origin 默认居中 */
|
|
1038
|
+
html[data-page-fx='zoom'] .page-enter-from {
|
|
1039
|
+
opacity: 0;
|
|
1040
|
+
transform: scale(var(--motion-page-scale));
|
|
1041
|
+
}
|
|
1042
|
+
html[data-page-fx='zoom'] .page-leave-to {
|
|
1043
|
+
opacity: 0;
|
|
1044
|
+
transform: scale(var(--motion-page-scale));
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
/* 减弱动态:过渡压到近乎瞬时后,入场起点若仍是 opacity:0,容器仍会闪一帧全透明
|
|
1048
|
+
(近黑背景一闪)——故连起点/终点一并强制为完全可见、无位移。 */
|
|
1049
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1050
|
+
.page-enter-active,
|
|
1051
|
+
.page-leave-active {
|
|
1052
|
+
transition-duration: 0.01ms !important;
|
|
1053
|
+
}
|
|
1054
|
+
.page-enter-from,
|
|
1055
|
+
.page-leave-to {
|
|
1056
|
+
opacity: 1 !important;
|
|
1057
|
+
transform: none !important;
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
/* 数据卡片交错淡入动画 */
|
|
1062
|
+
@keyframes fade-slide-up {
|
|
1063
|
+
from {
|
|
1064
|
+
opacity: 0;
|
|
1065
|
+
transform: translateY(12px);
|
|
1066
|
+
}
|
|
1067
|
+
to {
|
|
1068
|
+
opacity: 1;
|
|
1069
|
+
transform: translateY(0);
|
|
1070
|
+
}
|
|
1071
|
+
}
|
|
1072
|
+
|
|
1073
|
+
.animate-fade-slide-up {
|
|
1074
|
+
animation: fade-slide-up 0.3s ease both;
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
/* ==================== Toast 等级配色(vue-sonner richColors 变量覆盖) ====================
|
|
1078
|
+
* 覆盖 sonner 默认 HSL 色板,改用主题语义 token:
|
|
1079
|
+
* 成功绿 --color-success / 警告黄 --color-warning / 错误红 --color-danger / 信息蓝 --color-info
|
|
1080
|
+
* (info 用独立蓝而非 --color-primary:默认主题主色是中性近黑,会呈现黑白观感)。
|
|
1081
|
+
* 背景取 -light 淡色、边框用 color-mix 淡化语义色、浅色模式文字加深 35% 保证对比度;
|
|
1082
|
+
* 深色模式文字直接用亮色语义色。default/loading 类通知保持卡片统一风格。 */
|
|
1083
|
+
[data-sonner-toaster][data-sonner-theme='light'] {
|
|
1084
|
+
--success-bg: var(--color-success-light) !important;
|
|
1085
|
+
--success-border: color-mix(in srgb, var(--color-success) 35%, transparent) !important;
|
|
1086
|
+
--success-text: color-mix(in srgb, var(--color-success) 65%, black) !important;
|
|
1087
|
+
|
|
1088
|
+
--warning-bg: var(--color-warning-light) !important;
|
|
1089
|
+
--warning-border: color-mix(in srgb, var(--color-warning) 35%, transparent) !important;
|
|
1090
|
+
--warning-text: color-mix(in srgb, var(--color-warning) 65%, black) !important;
|
|
1091
|
+
|
|
1092
|
+
--error-bg: var(--color-danger-light) !important;
|
|
1093
|
+
--error-border: color-mix(in srgb, var(--color-danger) 35%, transparent) !important;
|
|
1094
|
+
--error-text: color-mix(in srgb, var(--color-danger) 65%, black) !important;
|
|
1095
|
+
|
|
1096
|
+
--info-bg: var(--color-info-light) !important;
|
|
1097
|
+
--info-border: color-mix(in srgb, var(--color-info) 30%, transparent) !important;
|
|
1098
|
+
--info-text: color-mix(in srgb, var(--color-info) 65%, black) !important;
|
|
1099
|
+
}
|
|
1100
|
+
|
|
1101
|
+
[data-sonner-toaster][data-sonner-theme='dark'] {
|
|
1102
|
+
--success-bg: var(--color-success-light) !important;
|
|
1103
|
+
--success-border: color-mix(in srgb, var(--color-success) 25%, transparent) !important;
|
|
1104
|
+
--success-text: var(--color-success) !important;
|
|
1105
|
+
|
|
1106
|
+
--warning-bg: var(--color-warning-light) !important;
|
|
1107
|
+
--warning-border: color-mix(in srgb, var(--color-warning) 25%, transparent) !important;
|
|
1108
|
+
--warning-text: var(--color-warning) !important;
|
|
1109
|
+
|
|
1110
|
+
--error-bg: var(--color-danger-light) !important;
|
|
1111
|
+
--error-border: color-mix(in srgb, var(--color-danger) 25%, transparent) !important;
|
|
1112
|
+
--error-text: var(--color-danger) !important;
|
|
1113
|
+
|
|
1114
|
+
--info-bg: var(--color-info-light) !important;
|
|
1115
|
+
--info-border: color-mix(in srgb, var(--color-info) 20%, transparent) !important;
|
|
1116
|
+
--info-text: var(--color-info) !important;
|
|
1117
|
+
}
|
|
1118
|
+
|
|
1119
|
+
/* default/loading 类通知:卡片统一风格,随主题 token(bg-card / border / text)联动 */
|
|
1120
|
+
[data-sonner-toaster] {
|
|
1121
|
+
--normal-bg: var(--bg-card) !important;
|
|
1122
|
+
--normal-border: var(--border) !important;
|
|
1123
|
+
--normal-text: var(--text-primary) !important;
|
|
1124
|
+
--normal-bg-hover: var(--bg-hover) !important;
|
|
1125
|
+
--normal-border-hover: var(--border-strong) !important;
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
/* 覆盖 vue-sonner 自带的 prefers-reduced-motion 禁用规则:保留 toast 的淡入淡出
|
|
1129
|
+
(可见性反馈是必要的),但去掉位移动画与 height 等布局属性过渡,时长压到
|
|
1130
|
+
200ms —— 减弱动态是「更轻」,不是「照旧播」。 */
|
|
1131
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1132
|
+
[data-sonner-toast],
|
|
1133
|
+
[data-sonner-toast] > * {
|
|
1134
|
+
transition: opacity 200ms !important;
|
|
1135
|
+
}
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1138
|
+
/* ==================== Window Resize Handles ==================== */
|
|
1139
|
+
|
|
1140
|
+
/*
|
|
1141
|
+
* 无边框窗口的边缘 resize 热区(App.vue 中 data-tauri-resize-handle 元素的样式)。
|
|
1142
|
+
* 仅在桌面端渲染(template 中 v-if="isDesktop");移动端窗口不可 resize 无需此规则。
|
|
1143
|
+
* 视觉完全透明,仅靠 pointer-events: auto 接住边缘鼠标事件。
|
|
1144
|
+
*/
|
|
1145
|
+
.resize-handle {
|
|
1146
|
+
position: fixed;
|
|
1147
|
+
background: transparent;
|
|
1148
|
+
pointer-events: auto;
|
|
1149
|
+
z-index: 9999;
|
|
1150
|
+
}
|
|
1151
|
+
|
|
1152
|
+
.resize-top {
|
|
1153
|
+
top: 0;
|
|
1154
|
+
left: 0;
|
|
1155
|
+
right: 0;
|
|
1156
|
+
height: 6px;
|
|
1157
|
+
}
|
|
1158
|
+
|
|
1159
|
+
.resize-bottom {
|
|
1160
|
+
bottom: 0;
|
|
1161
|
+
left: 0;
|
|
1162
|
+
right: 0;
|
|
1163
|
+
height: 6px;
|
|
1164
|
+
}
|
|
1165
|
+
|
|
1166
|
+
.resize-left {
|
|
1167
|
+
top: 0;
|
|
1168
|
+
bottom: 0;
|
|
1169
|
+
left: 0;
|
|
1170
|
+
width: 6px;
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1173
|
+
.resize-right {
|
|
1174
|
+
top: 0;
|
|
1175
|
+
bottom: 0;
|
|
1176
|
+
right: 0;
|
|
1177
|
+
width: 6px;
|
|
1178
|
+
}
|