@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.
Files changed (271) hide show
  1. package/README.md +307 -2
  2. package/README_en.md +284 -0
  3. package/bin/cli.js +602 -0
  4. package/bin/manifest-gen.js +458 -0
  5. package/bin/manifest-validate.js +494 -0
  6. package/bin/permission-vocabulary.json +5 -0
  7. package/bin/plugin-watch.js +331 -0
  8. package/bin/wasm-hash.js +124 -0
  9. package/dev-shell/README.md +122 -0
  10. package/dev-shell/index.html +12 -0
  11. package/dev-shell/package.json +28 -0
  12. package/dev-shell/pnpm-workspace.yaml +9 -0
  13. package/dev-shell/postcss.config.js +6 -0
  14. package/dev-shell/src/App.vue +90 -0
  15. package/dev-shell/src/components/LogPanel.vue +90 -0
  16. package/dev-shell/src/loader.ts +104 -0
  17. package/dev-shell/src/locale.ts +29 -0
  18. package/dev-shell/src/locales.ts +50 -0
  19. package/dev-shell/src/main.ts +46 -0
  20. package/dev-shell/src/mock/app-env.ts +102 -0
  21. package/dev-shell/src/mock/commands.ts +54 -0
  22. package/dev-shell/src/mock/domain-context.ts +46 -0
  23. package/dev-shell/src/mock/events.ts +16 -0
  24. package/dev-shell/src/mock/file-transfer.ts +512 -0
  25. package/dev-shell/src/mock/tauri-ipc.ts +109 -0
  26. package/dev-shell/src/registry.ts +90 -0
  27. package/dev-shell/src/shell/components/AppMountSlot.vue +241 -0
  28. package/dev-shell/src/shell/components/ShellIcon.vue +141 -0
  29. package/dev-shell/src/shell/components/ShellStatusBar.vue +87 -0
  30. package/dev-shell/src/shell/components/ShellToolbar.vue +287 -0
  31. package/dev-shell/src/shell/mount/appSession.ts +45 -0
  32. package/dev-shell/src/shell/mount/devAppMount.ts +80 -0
  33. package/dev-shell/src/shell/types.ts +121 -0
  34. package/dev-shell/src/styles/dev.css +27 -0
  35. package/dev-shell/src/styles/shell.css +752 -0
  36. package/dev-shell/src/styles/style.css +1178 -0
  37. package/dev-shell/src/theme.ts +140 -0
  38. package/dev-shell/src/vite-env.d.ts +24 -0
  39. package/dev-shell/tailwind.config.js +98 -0
  40. package/dev-shell/vite.config.ts +174 -0
  41. package/dist/index.d.ts +150 -0
  42. package/dist/index.js +238 -0
  43. package/dist/types.d.ts +632 -0
  44. package/dist/types.js +0 -0
  45. package/dist/vite-plugin.d.ts +25 -0
  46. package/dist/vite-plugin.js +80 -0
  47. package/go/.gitignore +5 -0
  48. package/go/README.md +80 -0
  49. package/go/gen/wasmnest/api-call/host-api-call/empty.s +3 -0
  50. package/go/gen/wasmnest/api-call/host-api-call/host-api-call.wasm.go +13 -0
  51. package/go/gen/wasmnest/api-call/host-api-call/host-api-call.wit.go +34 -0
  52. package/go/gen/wasmnest/app/host-app/empty.s +3 -0
  53. package/go/gen/wasmnest/app/host-app/host-app.wasm.go +29 -0
  54. package/go/gen/wasmnest/app/host-app/host-app.wit.go +108 -0
  55. package/go/gen/wasmnest/auth-center/host-auth-center/abi.go +14 -0
  56. package/go/gen/wasmnest/auth-center/host-auth-center/empty.s +3 -0
  57. package/go/gen/wasmnest/auth-center/host-auth-center/host-auth-center.wasm.go +49 -0
  58. package/go/gen/wasmnest/auth-center/host-auth-center/host-auth-center.wit.go +225 -0
  59. package/go/gen/wasmnest/clipboard/host-clipboard/abi.go +14 -0
  60. package/go/gen/wasmnest/clipboard/host-clipboard/empty.s +3 -0
  61. package/go/gen/wasmnest/clipboard/host-clipboard/host-clipboard.wasm.go +17 -0
  62. package/go/gen/wasmnest/clipboard/host-clipboard/host-clipboard.wit.go +68 -0
  63. package/go/gen/wasmnest/connection-registry/host-connection-registry/empty.s +3 -0
  64. package/go/gen/wasmnest/connection-registry/host-connection-registry/host-connection-registry.wasm.go +13 -0
  65. package/go/gen/wasmnest/connection-registry/host-connection-registry/host-connection-registry.wit.go +50 -0
  66. package/go/gen/wasmnest/crypto/host-crypto/abi.go +18 -0
  67. package/go/gen/wasmnest/crypto/host-crypto/empty.s +3 -0
  68. package/go/gen/wasmnest/crypto/host-crypto/host-crypto.wasm.go +37 -0
  69. package/go/gen/wasmnest/crypto/host-crypto/host-crypto.wit.go +139 -0
  70. package/go/gen/wasmnest/fs-desktop/host-fs-desktop/abi.go +14 -0
  71. package/go/gen/wasmnest/fs-desktop/host-fs-desktop/empty.s +3 -0
  72. package/go/gen/wasmnest/fs-desktop/host-fs-desktop/host-fs-desktop.wasm.go +21 -0
  73. package/go/gen/wasmnest/fs-desktop/host-fs-desktop/host-fs-desktop.wit.go +62 -0
  74. package/go/gen/wasmnest/http/host-http/abi.go +14 -0
  75. package/go/gen/wasmnest/http/host-http/empty.s +3 -0
  76. package/go/gen/wasmnest/http/host-http/host-http.wasm.go +13 -0
  77. package/go/gen/wasmnest/http/host-http/host-http.wit.go +40 -0
  78. package/go/gen/wasmnest/http-endpoint/host-http-endpoint/empty.s +3 -0
  79. package/go/gen/wasmnest/http-endpoint/host-http-endpoint/host-http-endpoint.wasm.go +17 -0
  80. package/go/gen/wasmnest/http-endpoint/host-http-endpoint/host-http-endpoint.wit.go +69 -0
  81. package/go/gen/wasmnest/mdns/host-mdns/empty.s +3 -0
  82. package/go/gen/wasmnest/mdns/host-mdns/host-mdns.wasm.go +29 -0
  83. package/go/gen/wasmnest/mdns/host-mdns/host-mdns.wit.go +101 -0
  84. package/go/gen/wasmnest/notify/host-notify/empty.s +3 -0
  85. package/go/gen/wasmnest/notify/host-notify/host-notify.wasm.go +13 -0
  86. package/go/gen/wasmnest/notify/host-notify/host-notify.wit.go +64 -0
  87. package/go/gen/wasmnest/peer/host-peer/abi.go +14 -0
  88. package/go/gen/wasmnest/peer/host-peer/empty.s +3 -0
  89. package/go/gen/wasmnest/peer/host-peer/host-peer.wasm.go +85 -0
  90. package/go/gen/wasmnest/peer/host-peer/host-peer.wit.go +357 -0
  91. package/go/gen/wasmnest/platform-desktop/host-platform-desktop/empty.s +3 -0
  92. package/go/gen/wasmnest/platform-desktop/host-platform-desktop/host-platform-desktop.wasm.go +21 -0
  93. package/go/gen/wasmnest/platform-desktop/host-platform-desktop/host-platform-desktop.wit.go +70 -0
  94. package/go/gen/wasmnest/plugin/abi-form/abi-form.exports.go +11 -0
  95. package/go/gen/wasmnest/plugin/abi-form/abi-form.wasm.go +13 -0
  96. package/go/gen/wasmnest/plugin/abi-form/abi-form.wit.go +7 -0
  97. package/go/gen/wasmnest/plugin/abi-form/empty.s +3 -0
  98. package/go/gen/wasmnest/plugin/command/command.exports.go +11 -0
  99. package/go/gen/wasmnest/plugin/command/command.wasm.go +19 -0
  100. package/go/gen/wasmnest/plugin/command/command.wit.go +6 -0
  101. package/go/gen/wasmnest/plugin/command/empty.s +3 -0
  102. package/go/gen/wasmnest/plugin/events/empty.s +3 -0
  103. package/go/gen/wasmnest/plugin/events/events.exports.go +52 -0
  104. package/go/gen/wasmnest/plugin/events/events.wasm.go +74 -0
  105. package/go/gen/wasmnest/plugin/events/events.wit.go +195 -0
  106. package/go/gen/wasmnest/plugin/host-bus/empty.s +3 -0
  107. package/go/gen/wasmnest/plugin/host-bus/host-bus.wasm.go +29 -0
  108. package/go/gen/wasmnest/plugin/host-bus/host-bus.wit.go +94 -0
  109. package/go/gen/wasmnest/plugin/host-config/abi.go +14 -0
  110. package/go/gen/wasmnest/plugin/host-config/empty.s +3 -0
  111. package/go/gen/wasmnest/plugin/host-config/host-config.wasm.go +13 -0
  112. package/go/gen/wasmnest/plugin/host-config/host-config.wit.go +21 -0
  113. package/go/gen/wasmnest/plugin/host-events/empty.s +3 -0
  114. package/go/gen/wasmnest/plugin/host-events/host-events.wasm.go +9 -0
  115. package/go/gen/wasmnest/plugin/host-events/host-events.wit.go +27 -0
  116. package/go/gen/wasmnest/plugin/host-fs/abi.go +14 -0
  117. package/go/gen/wasmnest/plugin/host-fs/empty.s +3 -0
  118. package/go/gen/wasmnest/plugin/host-fs/host-fs.wasm.go +33 -0
  119. package/go/gen/wasmnest/plugin/host-fs/host-fs.wit.go +86 -0
  120. package/go/gen/wasmnest/plugin/host-log/empty.s +3 -0
  121. package/go/gen/wasmnest/plugin/host-log/host-log.wasm.go +25 -0
  122. package/go/gen/wasmnest/plugin/host-log/host-log.wit.go +65 -0
  123. package/go/gen/wasmnest/plugin/host-metrics/empty.s +3 -0
  124. package/go/gen/wasmnest/plugin/host-metrics/host-metrics.wasm.go +13 -0
  125. package/go/gen/wasmnest/plugin/host-metrics/host-metrics.wit.go +34 -0
  126. package/go/gen/wasmnest/plugin/host-platform/empty.s +3 -0
  127. package/go/gen/wasmnest/plugin/host-platform/host-platform.wasm.go +21 -0
  128. package/go/gen/wasmnest/plugin/host-platform/host-platform.wit.go +85 -0
  129. package/go/gen/wasmnest/plugin/host-plugin-database/abi.go +14 -0
  130. package/go/gen/wasmnest/plugin/host-plugin-database/empty.s +3 -0
  131. package/go/gen/wasmnest/plugin/host-plugin-database/host-plugin-database.wasm.go +29 -0
  132. package/go/gen/wasmnest/plugin/host-plugin-database/host-plugin-database.wit.go +70 -0
  133. package/go/gen/wasmnest/plugin/host-storage/abi.go +14 -0
  134. package/go/gen/wasmnest/plugin/host-storage/empty.s +3 -0
  135. package/go/gen/wasmnest/plugin/host-storage/host-storage.wasm.go +21 -0
  136. package/go/gen/wasmnest/plugin/host-storage/host-storage.wit.go +44 -0
  137. package/go/gen/wasmnest/plugin/host-worker/empty.s +3 -0
  138. package/go/gen/wasmnest/plugin/host-worker/host-worker.wasm.go +17 -0
  139. package/go/gen/wasmnest/plugin/host-worker/host-worker.wit.go +50 -0
  140. package/go/gen/wasmnest/plugin/lifecycle/empty.s +3 -0
  141. package/go/gen/wasmnest/plugin/lifecycle/lifecycle.exports.go +32 -0
  142. package/go/gen/wasmnest/plugin/lifecycle/lifecycle.wasm.go +41 -0
  143. package/go/gen/wasmnest/plugin/lifecycle/lifecycle.wit.go +9 -0
  144. package/go/gen/wasmnest/plugin/manifest/empty.s +3 -0
  145. package/go/gen/wasmnest/plugin/manifest/manifest.exports.go +11 -0
  146. package/go/gen/wasmnest/plugin/manifest/manifest.wasm.go +13 -0
  147. package/go/gen/wasmnest/plugin/manifest/manifest.wit.go +6 -0
  148. package/go/gen/wasmnest/plugin/plugin/plugin.wit.go +4 -0
  149. package/go/gen/wasmnest/process/host-process/empty.s +3 -0
  150. package/go/gen/wasmnest/process/host-process/host-process.wasm.go +21 -0
  151. package/go/gen/wasmnest/process/host-process/host-process.wit.go +56 -0
  152. package/go/gen/wasmnest/pty/host-pty/abi.go +14 -0
  153. package/go/gen/wasmnest/pty/host-pty/empty.s +3 -0
  154. package/go/gen/wasmnest/pty/host-pty/host-pty.wasm.go +33 -0
  155. package/go/gen/wasmnest/pty/host-pty/host-pty.wit.go +164 -0
  156. package/go/gen/wasmnest/task/host-task/abi.go +14 -0
  157. package/go/gen/wasmnest/task/host-task/empty.s +3 -0
  158. package/go/gen/wasmnest/task/host-task/host-task.wasm.go +29 -0
  159. package/go/gen/wasmnest/task/host-task/host-task.wit.go +110 -0
  160. package/go/gen/wasmnest/timer/host-timer/empty.s +3 -0
  161. package/go/gen/wasmnest/timer/host-timer/host-timer.wasm.go +13 -0
  162. package/go/gen/wasmnest/timer/host-timer/host-timer.wit.go +25 -0
  163. package/go/gen/wasmnest/ws/host-websocket/empty.s +3 -0
  164. package/go/gen/wasmnest/ws/host-websocket/host-websocket.wasm.go +29 -0
  165. package/go/gen/wasmnest/ws/host-websocket/host-websocket.wit.go +109 -0
  166. package/go/gen/wasmnest/ws-server/host-websocket-server/empty.s +3 -0
  167. package/go/gen/wasmnest/ws-server/host-websocket-server/host-websocket-server.wasm.go +49 -0
  168. package/go/gen/wasmnest/ws-server/host-websocket-server/host-websocket-server.wit.go +220 -0
  169. package/go/go.mod +14 -0
  170. package/go/go.sum +2 -0
  171. package/go/sdk/dispatch.go +49 -0
  172. package/go/sdk/dispatch_test.go +81 -0
  173. package/go/sdk/entry_native.go +13 -0
  174. package/go/sdk/entry_wasip2.go +188 -0
  175. package/go/sdk/host_http_wasip2.go +42 -0
  176. package/go/sdk/host_wasip2.go +251 -0
  177. package/go/sdk/plugin.go +103 -0
  178. package/go/testplugin/index.js +1 -0
  179. package/go/testplugin/main.go +67 -0
  180. package/go/testplugin/plugin.json +24 -0
  181. package/go/tools/assemble-wit.mjs +152 -0
  182. package/go/tools/gen-bindings.mjs +51 -0
  183. package/go/wit/core.wit +273 -0
  184. package/go/wit/deps/api-call/cap-api-call.wit +20 -0
  185. package/go/wit/deps/app/cap-app.wit +54 -0
  186. package/go/wit/deps/auth-center/cap-auth-center.wit +124 -0
  187. package/go/wit/deps/clipboard/clipboard.wit +48 -0
  188. package/go/wit/deps/clocks/monotonic-clock.wit +45 -0
  189. package/go/wit/deps/clocks/wall-clock.wit +42 -0
  190. package/go/wit/deps/clocks/world.wit +6 -0
  191. package/go/wit/deps/connection-registry/cap-connection-registry.wit +40 -0
  192. package/go/wit/deps/crypto/cap-crypto.wit +68 -0
  193. package/go/wit/deps/filesystem/preopens.wit +8 -0
  194. package/go/wit/deps/filesystem/types.wit +634 -0
  195. package/go/wit/deps/filesystem/world.wit +6 -0
  196. package/go/wit/deps/fs-desktop/cap-fs-desktop.wit +29 -0
  197. package/go/wit/deps/http/http.wit +28 -0
  198. package/go/wit/deps/http-endpoint/cap-http.wit +44 -0
  199. package/go/wit/deps/io/error.wit +34 -0
  200. package/go/wit/deps/io/poll.wit +41 -0
  201. package/go/wit/deps/io/streams.wit +262 -0
  202. package/go/wit/deps/io/world.wit +6 -0
  203. package/go/wit/deps/mdns/mdns.wit +45 -0
  204. package/go/wit/deps/notify/notify.wit +51 -0
  205. package/go/wit/deps/peer/peer.wit +126 -0
  206. package/go/wit/deps/platform-desktop/cap-platform-desktop.wit +38 -0
  207. package/go/wit/deps/process/cap-process.wit +25 -0
  208. package/go/wit/deps/pty/pty.wit +80 -0
  209. package/go/wit/deps/random/insecure-seed.wit +25 -0
  210. package/go/wit/deps/random/insecure.wit +22 -0
  211. package/go/wit/deps/random/random.wit +26 -0
  212. package/go/wit/deps/random/world.wit +7 -0
  213. package/go/wit/deps/sockets/instance-network.wit +9 -0
  214. package/go/wit/deps/sockets/ip-name-lookup.wit +51 -0
  215. package/go/wit/deps/sockets/network.wit +145 -0
  216. package/go/wit/deps/sockets/tcp-create-socket.wit +27 -0
  217. package/go/wit/deps/sockets/tcp.wit +353 -0
  218. package/go/wit/deps/sockets/udp-create-socket.wit +27 -0
  219. package/go/wit/deps/sockets/udp.wit +266 -0
  220. package/go/wit/deps/sockets/world.wit +11 -0
  221. package/go/wit/deps/task/cap-task.wit +56 -0
  222. package/go/wit/deps/timer/cap-timer.wit +14 -0
  223. package/go/wit/deps/wasi-cli/command.wit +7 -0
  224. package/go/wit/deps/wasi-cli/environment.wit +18 -0
  225. package/go/wit/deps/wasi-cli/exit.wit +4 -0
  226. package/go/wit/deps/wasi-cli/imports.wit +20 -0
  227. package/go/wit/deps/wasi-cli/run.wit +4 -0
  228. package/go/wit/deps/wasi-cli/stdio.wit +17 -0
  229. package/go/wit/deps/wasi-cli/terminal.wit +49 -0
  230. package/go/wit/deps/ws/ws.wit +50 -0
  231. package/go/wit/deps/ws-server/cap-ws.wit +99 -0
  232. package/go/wit/go-plugin.wit +28 -0
  233. package/go/wit/plugin-face.wit +355 -0
  234. package/go/wit/wasmnest.wit +25 -0
  235. package/package.json +100 -3
  236. package/src/config.ts +49 -0
  237. package/src/global-dialog.ts +169 -0
  238. package/src/index.ts +88 -0
  239. package/src/runtime.ts +54 -0
  240. package/src/types.ts +681 -0
  241. package/src/ui/AppUpdateSection.d.ts +44 -0
  242. package/src/ui/AppUpdateSection.vue +253 -0
  243. package/src/ui/MarkdownEditor.vue +520 -0
  244. package/src/ui/NumberField.d.ts +49 -0
  245. package/src/ui/NumberField.vue +390 -0
  246. package/src/ui/PluginGlobalDialog.vue +401 -0
  247. package/src/ui/Select.d.ts +36 -0
  248. package/src/ui/Select.vue +220 -0
  249. package/src/ui/TerminalInputRail.vue +184 -0
  250. package/src/ui/apply-select-position.ts +65 -0
  251. package/src/ui/markdown-editor-syntax.ts +234 -0
  252. package/src/ui/markdown-editor.d.ts +36 -0
  253. package/src/ui/plugin-global-dialog.d.ts +12 -0
  254. package/src/ui/select-position.ts +79 -0
  255. package/src/ui/terminal-input-rail.d.ts +30 -0
  256. package/src/ui/zoom-compensation.d.ts +9 -0
  257. package/src/ui/zoom-compensation.ts +52 -0
  258. package/src/update.ts +123 -0
  259. package/src/vite-plugin.ts +124 -0
  260. package/template/README.md +39 -0
  261. package/template/package.json +23 -0
  262. package/template/plugin.json +14 -0
  263. package/template/rust/Cargo.toml +21 -0
  264. package/template/rust/src/lib.rs +39 -0
  265. package/template/src/env.d.ts +24 -0
  266. package/template/src/index.ts +37 -0
  267. package/template/tsconfig.json +17 -0
  268. package/template/vite.config.ts +21 -0
  269. package/tools/componentize/Cargo.lock +299 -0
  270. package/tools/componentize/Cargo.toml +18 -0
  271. package/tools/componentize/src/main.rs +197 -0
@@ -0,0 +1,752 @@
1
+ /**
2
+ * 设备壳共享样式(src/shell/** 全组件可用)
3
+ *
4
+ * 设计真源:`.scratch/2026-10-08-desktop-shell-redesign/shell-preview-c.html`
5
+ * 铁律(frontend-styles token-bound):颜色 / 圆角 / 阴影全部走 style.css token
6
+ * 或 color-mix 自 token 派生;零新增 hex、零新字体族。
7
+ *
8
+ * 跨组件复用才放这里(3+ 组件);单组件私有样式放 scoped。
9
+ */
10
+ /* ==================== 壳根容器 ====================
11
+ 固定视口高度 + 纵向 flex:全屏面(系统页 / 应用挂载槽)自己成为滚动容器,
12
+ 页头与 tab 条不再随内容滚走。2026-10-17 实机验证 P2-10 的根因就在这里——
13
+ `.sys-body` 早已是 `overflow-y: auto`,但父链没有确定高度,滚的是整页,
14
+ 系统页 tab 一滚就够不着。
15
+
16
+ 壳文本默认不可选中(P2-12):一次误拖就把主屏整片文字染成蓝底,且跨页面
17
+ 导航后高亮仍在。应用挂载槽内部自己恢复可选(AppMountSlot 的
18
+ `user-select: text`),业务内容不受影响。 */
19
+ .shell-root {
20
+ display: flex;
21
+ flex-direction: column;
22
+ height: 100vh;
23
+ overflow: hidden;
24
+ user-select: none;
25
+ }
26
+
27
+ /* ==================== 键盘焦点环(壳内所有自绘控件统一形态) ====================
28
+ 壳里的按钮 / 图块 / 分段项 / 卡片都是 div、span 或裸 button,没有浏览器默认外观,
29
+ 此前只有 .shell-sw 一处画了焦点环 —— 键盘 Tab 走一遍主屏与工具栏,焦点位置
30
+ 完全看不出来(WCAG 2.4.7 可见焦点:键盘可达的每个控件都必须有可见指示)。
31
+ 这里统一收口:`:focus-visible` 只在键盘路径触发(鼠标点击不出现),
32
+ 2px 实色 + 2px 间隙;色取各色板 info(对 6 套色板的浅/深底都 ≥ 3:1)。
33
+ 控件自己已定义 outline 的(.shell-sw 把环画在 track 上)保持自身声明。 */
34
+ .shell-root :is(button, a, [tabindex], input, select, textarea, summary):focus-visible {
35
+ outline: var(--focus-ring-width) solid var(--focus-ring-color);
36
+ outline-offset: var(--focus-ring-offset);
37
+ }
38
+
39
+ /* ==================== 图标图块(系统页图标 / 应用图标 / 多任务系统卡共用) ====================
40
+ 这个类此前**只**定义在 ShellAppTile 的 scoped 样式里,而 scoped 样式不外泄:
41
+ ShellCardScreen(系统页页头 34px)/ ShellHome(系统网格 52px)/ ShellTaskSwitcher
42
+ (多任务系统卡 96px)里的 `.glyph-box` 因此没有任何样式——span 退化成行内元素,
43
+ 图标按文字基线排布(整体偏下、水平不居中,大尺寸时像溢出/被裁),这就是用户反馈的
44
+ 「系统页图标显示不全」。基规则上移到壳共享样式(4 个组件复用),尺寸仍由调用方用
45
+ 内联 width/height 决定;`ShellAppTile` 只保留「应用自带图标」的裁剪规则。 */
46
+ .glyph-box {
47
+ display: flex;
48
+ align-items: center;
49
+ justify-content: center;
50
+ flex-shrink: 0;
51
+ border-radius: var(--radius-app-icon);
52
+ transition:
53
+ transform var(--motion-duration-base) var(--motion-ease),
54
+ box-shadow var(--motion-duration-base) var(--motion-ease);
55
+ }
56
+
57
+ /* ==================== 应用图标底色(tone 档:color-mix 自语义 token,双主题自动适配) ==================== */
58
+ .tone-primary {
59
+ background: color-mix(in srgb, var(--color-primary) 14%, var(--bg-card));
60
+ color: var(--color-primary);
61
+ border: 1px solid color-mix(in srgb, var(--color-primary) 22%, transparent);
62
+ }
63
+ .tone-info {
64
+ background: var(--color-info-light);
65
+ color: var(--color-info-ink);
66
+ border: 1px solid color-mix(in srgb, var(--color-info) 25%, transparent);
67
+ }
68
+ .tone-success {
69
+ background: var(--color-success-light);
70
+ color: var(--color-success-ink);
71
+ border: 1px solid color-mix(in srgb, var(--color-success) 25%, transparent);
72
+ }
73
+ .tone-warning {
74
+ background: var(--color-warning-light);
75
+ color: var(--color-warning-ink);
76
+ border: 1px solid color-mix(in srgb, var(--color-warning) 28%, transparent);
77
+ }
78
+ .tone-mix {
79
+ background: color-mix(in srgb, var(--color-info) 10%, var(--color-success-light));
80
+ color: color-mix(in srgb, var(--color-info) 55%, var(--color-success));
81
+ border: 1px solid color-mix(in srgb, var(--color-info) 22%, transparent);
82
+ }
83
+ :root.dark .tone-primary {
84
+ color: var(--text-primary);
85
+ }
86
+ .tone-system {
87
+ background: var(--bg-card);
88
+ color: var(--text-primary);
89
+ border: 1px solid var(--border);
90
+ }
91
+
92
+ /* ==================== 状态点 ==================== */
93
+ .sdot {
94
+ display: inline-block;
95
+ width: 7px;
96
+ height: 7px;
97
+ border-radius: 50%;
98
+ flex-shrink: 0;
99
+ }
100
+ .sdot.running {
101
+ background: var(--color-success);
102
+ }
103
+ .sdot.degraded {
104
+ background: var(--color-warning);
105
+ }
106
+ /* dormant / approval / error 不再画点(审批用 ! 徽标,错误由 chip / 详情呈现);
107
+ 状态点只表示「有正在运行的应用会话」。 */
108
+
109
+ /* ==================== chip(状态徽标) ==================== */
110
+ .shell-chip {
111
+ display: inline-flex;
112
+ align-items: center;
113
+ gap: 4px;
114
+ font-size: calc(11px * var(--ui-scale));
115
+ padding: 2px 8px;
116
+ border-radius: var(--radius-tag);
117
+ background: var(--color-primary-light);
118
+ color: var(--text-secondary);
119
+ white-space: nowrap;
120
+ flex-shrink: 0;
121
+ line-height: 1.4;
122
+ }
123
+ .shell-chip.ok {
124
+ background: var(--color-success-light);
125
+ color: var(--color-success-ink);
126
+ }
127
+ .shell-chip.warn {
128
+ background: var(--color-warning-light);
129
+ color: var(--color-warning-ink);
130
+ }
131
+ .shell-chip.danger {
132
+ background: var(--color-danger-light);
133
+ color: var(--color-danger-ink);
134
+ }
135
+ .shell-chip.info {
136
+ background: var(--color-info-light);
137
+ color: var(--color-info-ink);
138
+ }
139
+
140
+ /* ==================== pill(权限位等技术标识) ==================== */
141
+ .shell-pill {
142
+ font-family: var(--font-mono);
143
+ font-size: calc(11px * var(--ui-scale));
144
+ padding: 2px 7px;
145
+ border-radius: var(--radius-tag);
146
+ background: var(--bg-sidebar);
147
+ border: 1px solid var(--border);
148
+ color: var(--text-secondary);
149
+ white-space: nowrap;
150
+ }
151
+ .shell-pill.risk {
152
+ background: var(--color-danger-light);
153
+ border-color: transparent;
154
+ color: var(--color-danger-ink);
155
+ }
156
+
157
+ /* ==================== 开关(原生 checkbox + token 外观,键盘可达) ====================
158
+ 「开」用色板主色,不用成功绿:这是个通用开关(深浅色 / 自启 / 防休眠 / 链路加密),
159
+ 不是「操作成功」的结果态——绿色留给真正表达成功与健康度的 chip / 状态点,
160
+ 否则整页开关都在喊「成功」,语义被稀释。
161
+ 尺寸 34×20:滑块 16px、行程 14px,指针与触控板都够用。 */
162
+ .shell-sw {
163
+ position: relative;
164
+ width: 34px;
165
+ height: 20px;
166
+ flex-shrink: 0;
167
+ display: inline-block;
168
+ }
169
+ .shell-sw input {
170
+ position: absolute;
171
+ inset: 0;
172
+ opacity: 0;
173
+ margin: 0;
174
+ cursor: pointer;
175
+ }
176
+ .shell-sw .track {
177
+ position: absolute;
178
+ inset: 0;
179
+ border-radius: 10px;
180
+ background: var(--border-strong);
181
+ transition: background-color var(--motion-duration-fast) var(--motion-ease);
182
+ pointer-events: none;
183
+ }
184
+ .shell-sw .knob {
185
+ position: absolute;
186
+ top: 2px;
187
+ left: 2px;
188
+ width: 16px;
189
+ height: 16px;
190
+ border-radius: 50%;
191
+ background: var(--bg-card);
192
+ /* 轻投影让旋钮「浮」在轨道上(材质深度),色自 text-primary 派生,双主题自适应 */
193
+ box-shadow: 0 1px 2px color-mix(in srgb, var(--text-primary) 28%, transparent);
194
+ transition: transform var(--motion-duration-base) var(--motion-ease);
195
+ pointer-events: none;
196
+ }
197
+ .shell-sw input:checked ~ .track {
198
+ background: var(--color-primary);
199
+ }
200
+ .shell-sw input:checked ~ .knob {
201
+ transform: translateX(14px);
202
+ }
203
+ .shell-sw input:focus-visible ~ .track {
204
+ outline: var(--focus-ring-width) solid var(--focus-ring-color);
205
+ outline-offset: var(--focus-ring-offset);
206
+ }
207
+ .shell-sw.risk input:checked ~ .track {
208
+ background: var(--color-danger);
209
+ }
210
+ .shell-sw input:disabled ~ .track,
211
+ .shell-sw input:disabled ~ .knob {
212
+ opacity: 0.5;
213
+ }
214
+
215
+ /* ==================== 分段控件 ==================== */
216
+ .shell-seg {
217
+ display: inline-flex;
218
+ gap: 2px;
219
+ padding: 2px;
220
+ background: var(--bg-sidebar);
221
+ border: 1px solid var(--border);
222
+ border-radius: var(--radius-button);
223
+ }
224
+ .shell-seg button {
225
+ min-width: 62px;
226
+ height: 24px;
227
+ padding: 0 10px;
228
+ border-radius: 6px;
229
+ font-size: calc(11px * var(--ui-scale));
230
+ color: var(--text-tertiary);
231
+ white-space: nowrap;
232
+ transition:
233
+ background-color var(--motion-duration-fast) var(--motion-ease),
234
+ color var(--motion-duration-fast) var(--motion-ease);
235
+ }
236
+ /* 悬停 = 文字升一档 + 面色轻染(只染未选中项;选中项是实色药丸,不再叠底) */
237
+ .shell-seg button:hover:not(.on) {
238
+ background: color-mix(in srgb, var(--text-primary) 7%, transparent);
239
+ color: var(--text-primary);
240
+ }
241
+ /* 选中用固定黑底 + 反白文字:不用白色药丸,也不加勾章,不随明暗主题反转
242
+ (2026-10-20 用户裁决:除背景壁纸选择外,选中背景统一为黑色)。 */
243
+ .shell-seg button.on {
244
+ background: var(--selection-solid);
245
+ color: var(--selection-solid-ink);
246
+ font-weight: 500;
247
+ }
248
+ .shell-seg button.on.risky {
249
+ background: var(--color-danger-light);
250
+ color: var(--color-danger-ink);
251
+ box-shadow: none;
252
+ }
253
+
254
+ /* ==================== 分组卡面(无卡头的裸面板) ====================
255
+ 与 `.shell-card` 同一档「内容面」,差别只在标题:`.shell-card` 的标题在卡内
256
+ (ShellCard 组件);`.shell-panel` 没有卡头,供不需要分组标题的整块面板用。
257
+ 设置页分组 2026-11-09 起统一走 ShellCard(图标 + 卡内标题),不再用「卡外
258
+ 平铺标题 + `.shell-panel`」这套写法——同一页两种头型是用户点名的不一致。
259
+ `overflow: hidden` 让 `divide-y` 行分隔线跟随圆角裁切(10px 硬编码圆角正是裁不齐
260
+ 的根源之一,圆角统一走 `--radius-card`)。 */
261
+ .shell-panel {
262
+ background: var(--bg-card);
263
+ border: 1px solid var(--border);
264
+ border-radius: var(--radius-card);
265
+ overflow: hidden;
266
+ }
267
+
268
+ /* ==================== 文本框(壳内设置项输入) ====================
269
+ 壳里唯一的文本输入控件:原生 `input[type=number]` 的步进器不可 token 化、
270
+ 属禁止的系统原生 UI,数字输入用 `type=text` + `inputmode=numeric` + 这个类。
271
+ 颜色全走 token(`--bg-input` / `--border-input` / `--radius-input`),
272
+ 玻璃主题的 `--bg-input` 已是 84% 半透明体色,无需额外规则。 */
273
+ .shell-input {
274
+ height: 28px;
275
+ padding: 0 10px;
276
+ border-radius: var(--radius-input);
277
+ background: var(--bg-input);
278
+ border: 1px solid var(--border-input);
279
+ color: var(--text-primary);
280
+ font-size: calc(12.5px * var(--ui-scale));
281
+ outline: none;
282
+ transition: border-color var(--motion-duration-fast) var(--motion-ease);
283
+ }
284
+ .shell-input:focus {
285
+ border-color: var(--color-primary);
286
+ }
287
+ .shell-input:disabled {
288
+ opacity: 0.5;
289
+ cursor: not-allowed;
290
+ }
291
+
292
+ /* ==================== 按钮(壳内 mini / ghost / danger 形态) ==================== */
293
+ .shell-btn {
294
+ height: 28px;
295
+ padding: 0 12px;
296
+ border-radius: var(--radius-button);
297
+ background: var(--color-primary);
298
+ color: var(--color-primary-contrast);
299
+ font-size: calc(12px * var(--ui-scale));
300
+ font-weight: 500;
301
+ display: inline-flex;
302
+ align-items: center;
303
+ justify-content: center;
304
+ gap: 6px;
305
+ white-space: nowrap;
306
+ flex-shrink: 0;
307
+ transition:
308
+ background-color var(--motion-duration-fast) var(--motion-ease),
309
+ filter var(--motion-duration-fast) var(--motion-ease),
310
+ transform var(--motion-duration-fast) var(--motion-ease);
311
+ }
312
+ .shell-btn:hover {
313
+ background: var(--color-primary-hover);
314
+ }
315
+ /* 按压反馈:1px 下沉(按下即回弹,不带布局位移——只动 transform) */
316
+ .shell-btn:active {
317
+ transform: translateY(1px);
318
+ }
319
+ .shell-btn:disabled {
320
+ opacity: 0.45;
321
+ cursor: not-allowed;
322
+ transform: none;
323
+ }
324
+ .shell-btn.ghost {
325
+ background: var(--bg-card);
326
+ color: var(--text-primary);
327
+ border: 1px solid var(--border-strong);
328
+ }
329
+ .shell-btn.ghost:hover {
330
+ background: var(--bg-hover);
331
+ }
332
+ .shell-btn.danger-outline {
333
+ background: var(--bg-card);
334
+ color: var(--color-danger-ink);
335
+ border: 1px solid color-mix(in srgb, var(--color-danger) 40%, transparent);
336
+ }
337
+ .shell-btn.danger-outline:hover {
338
+ background: var(--color-danger-light);
339
+ }
340
+ .shell-btn.danger-fill {
341
+ background: var(--color-danger);
342
+ color: var(--color-primary-contrast);
343
+ }
344
+ .shell-btn.danger-fill:hover {
345
+ filter: brightness(0.92);
346
+ }
347
+ .shell-mini {
348
+ height: 24px;
349
+ padding: 0 10px;
350
+ border-radius: var(--radius-button);
351
+ font-size: calc(11px * var(--ui-scale));
352
+ border: 1px solid var(--border-strong);
353
+ color: var(--text-secondary);
354
+ background: var(--bg-card);
355
+ flex-shrink: 0;
356
+ display: inline-flex;
357
+ align-items: center;
358
+ justify-content: center;
359
+ gap: 5px;
360
+ white-space: nowrap;
361
+ transition:
362
+ background-color var(--motion-duration-fast) var(--motion-ease),
363
+ color var(--motion-duration-fast) var(--motion-ease),
364
+ transform var(--motion-duration-fast) var(--motion-ease);
365
+ }
366
+ .shell-mini:hover {
367
+ background: var(--bg-hover);
368
+ color: var(--text-primary);
369
+ }
370
+ /* 按压反馈:只缩视觉、不改布局(与 .shell-btn 的 1px 下沉同一档即时反馈) */
371
+ .shell-mini:active {
372
+ transform: scale(0.97);
373
+ }
374
+ .shell-mini:disabled:active {
375
+ transform: none;
376
+ }
377
+ .shell-mini.danger {
378
+ color: var(--color-danger-ink);
379
+ border-color: color-mix(in srgb, var(--color-danger) 35%, transparent);
380
+ }
381
+ .shell-mini.danger:hover {
382
+ background: var(--color-danger-light);
383
+ }
384
+ .shell-mini:disabled {
385
+ opacity: 0.45;
386
+ cursor: not-allowed;
387
+ }
388
+
389
+ /* ==================== 提示块 ==================== */
390
+ .shell-callout {
391
+ display: flex;
392
+ align-items: flex-start;
393
+ gap: 8px;
394
+ padding: 9px 11px;
395
+ font-size: calc(11px * var(--ui-scale));
396
+ line-height: 1.55;
397
+ border-radius: var(--radius-button);
398
+ }
399
+ .shell-callout svg {
400
+ margin-top: 1px;
401
+ flex-shrink: 0;
402
+ }
403
+ .shell-callout.warn {
404
+ background: var(--color-warning-light);
405
+ color: var(--color-warning-ink);
406
+ border: 1px solid color-mix(in srgb, var(--color-warning) 30%, transparent);
407
+ }
408
+ .shell-callout.danger {
409
+ background: var(--color-danger-light);
410
+ color: var(--color-danger-ink);
411
+ border: 1px solid color-mix(in srgb, var(--color-danger) 30%, transparent);
412
+ }
413
+
414
+ /* ==================== 行控件行(label 左 / 控件右) ====================
415
+ 设置卡内「一行一设置项」的骨架(SysSettingsView / SysAppearanceView /
416
+ SysShortcutsView 三处消费,达 3+ 门槛上提;2026-10-28)。 */
417
+ .row-sw {
418
+ display: flex;
419
+ align-items: center;
420
+ gap: 12px;
421
+ padding: 9px 2px;
422
+ }
423
+ .row-sw + .row-sw {
424
+ border-top: 1px solid var(--border);
425
+ }
426
+ .row-sw .lb {
427
+ flex: 1;
428
+ min-width: 0;
429
+ }
430
+ .row-sw .lb b {
431
+ display: block;
432
+ font-size: calc(12.5px * var(--ui-scale));
433
+ font-weight: 600;
434
+ letter-spacing: -0.005em;
435
+ color: var(--text-primary);
436
+ }
437
+
438
+ /* ==================== kv / 记录行 ==================== */
439
+ .shell-kv {
440
+ display: flex;
441
+ align-items: baseline;
442
+ justify-content: space-between;
443
+ gap: 10px;
444
+ font-size: calc(12px * var(--ui-scale));
445
+ padding: 3px 0;
446
+ }
447
+ .shell-kv b {
448
+ font-weight: 500;
449
+ flex-shrink: 0;
450
+ }
451
+ .shell-kv span {
452
+ color: var(--text-secondary);
453
+ text-align: right;
454
+ min-width: 0;
455
+ overflow: hidden;
456
+ text-overflow: ellipsis;
457
+ white-space: nowrap;
458
+ font-family: var(--font-mono);
459
+ font-size: calc(11px * var(--ui-scale));
460
+ }
461
+ .shell-rec {
462
+ display: flex;
463
+ align-items: center;
464
+ gap: 8px;
465
+ padding: 7px 9px;
466
+ border-radius: var(--radius-button);
467
+ background: var(--bg-sidebar);
468
+ border: 1px solid var(--border);
469
+ }
470
+ .shell-rec + .shell-rec {
471
+ margin-top: 5px;
472
+ }
473
+ .shell-rec .tg {
474
+ font-family: var(--font-mono);
475
+ font-size: calc(11px * var(--ui-scale));
476
+ flex: 1;
477
+ min-width: 0;
478
+ overflow: hidden;
479
+ text-overflow: ellipsis;
480
+ white-space: nowrap;
481
+ }
482
+ .shell-rec.deny {
483
+ border-color: color-mix(in srgb, var(--color-danger) 35%, transparent);
484
+ }
485
+ .shell-rec.deny .tg {
486
+ color: var(--color-danger-ink);
487
+ }
488
+
489
+ /* ==================== 壳壁纸(token 派生渐变 + 可调遮罩,spec-c §5) ====================
490
+ 壁纸挂在壳根(ShellHost 的 .shell-root)上,主屏 / 系统页 / 应用面共用同一背景;
491
+ 宿主页面不铺自己的不透明底色,背景切换才不会「只在主屏生效」。
492
+ 遮罩不是一层平铺色:自上而下由 --wall-dim 的 40% 加深到 130%(封顶 100%),
493
+ 上方保持壁纸本色(光源在这里),下方压住亮度给图标名字与计数兜对比度。
494
+ 遮罩只在壁纸存在时叠加(无壁纸 → 不叠,直接透出 --bg-page)。 */
495
+ .shell-wall {
496
+ background-color: var(--bg-page);
497
+ background-image:
498
+ linear-gradient(
499
+ color-mix(in srgb, var(--bg-page) calc(var(--wall-dim, 0.3) * 40%), transparent) 0%,
500
+ color-mix(in srgb, var(--bg-page) min(100%, calc(var(--wall-dim, 0.3) * 130%)), transparent)
501
+ 100%
502
+ ),
503
+ radial-gradient(
504
+ 115% 90% at 50% 38%,
505
+ transparent 42%,
506
+ color-mix(in srgb, var(--bg-page) 55%, transparent) 100%
507
+ ),
508
+ var(--wall-active);
509
+ background-attachment: scroll, scroll, scroll;
510
+ }
511
+ .shell-wall.wall-aurora {
512
+ --wall-active: var(--wall-aurora);
513
+ }
514
+ .shell-wall.wall-dune {
515
+ --wall-active: var(--wall-dune);
516
+ }
517
+ .shell-wall.wall-reef {
518
+ --wall-active: var(--wall-reef);
519
+ }
520
+ /* 自定义图片:URL 由 ShellHost 以 --wall-custom 内联变量传入(存文件名而非绝对
521
+ 路径,数据目录搬迁后仍可解析)。cover 让 16:9 / 竖图都铺满整屏不变形;
522
+ 回落 --wall-aurora 覆盖「偏好是 custom 但 URL 还没解析完」的一帧。 */
523
+ .shell-wall.wall-custom {
524
+ --wall-active: var(--wall-custom, var(--wall-aurora));
525
+ background-size: cover;
526
+ background-position: center;
527
+ }
528
+ /* 设置页壁纸预览色块(无遮罩层,直出渐变) */
529
+ .wall-swatch.wall-aurora {
530
+ background-image: var(--wall-aurora);
531
+ }
532
+ .wall-swatch.wall-dune {
533
+ background-image: var(--wall-dune);
534
+ }
535
+ .wall-swatch.wall-reef {
536
+ background-image: var(--wall-reef);
537
+ }
538
+
539
+ /* ==================== 浮层玻璃(通知 / 快捷设置 / 右键菜单) ====================
540
+ 只给「浮在内容上」的面用:背后是应用界面或主屏图块,blur 才有可模糊的细节。
541
+ 表面色取 --bg-glass(96%):透明度不是玻璃感的来源,模糊才是;
542
+ 继续降到 92% 时,面板里 11px 的 tertiary 文字在背后纯黑 / 纯白内容上最低
543
+ 会掉到 4.09:1(6 套色板 × 明暗两档,低于 AA 4.5:1),所以底色留在这个下限。
544
+ 不用 @supports 分支:不支持 backdrop-filter 的 WebView 会忽略模糊声明,
545
+ 96% 的近实底仍能压住下层内容(不透明回退)。 */
546
+ .shell-glass {
547
+ background: var(--bg-glass);
548
+ -webkit-backdrop-filter: blur(var(--ui-glass-blur)) saturate(var(--ui-glass-saturate));
549
+ backdrop-filter: blur(var(--ui-glass-blur)) saturate(var(--ui-glass-saturate));
550
+ }
551
+
552
+ /* 系统「降低透明度」偏好:去掉模糊并回到实心卡面。WebKitGTK 当前不支持该查询时
553
+ 整块被忽略;支持时按用户偏好回退,不靠透明度传递层级。 */
554
+ @media (prefers-reduced-transparency: reduce) {
555
+ .shell-glass {
556
+ background: var(--bg-card);
557
+ -webkit-backdrop-filter: none;
558
+ backdrop-filter: none;
559
+ }
560
+ }
561
+
562
+ /* ==================== 悬浮导航(回主屏 / 多任务胶囊,Liquid Glass) ====================
563
+ 与移动端 ShellFloatingNav 同款材质(blur 26px + saturate 200% + 斜向高光面 +
564
+ 内缘折射),色值全部走桌面主题 token(--bg-card / --text-primary),随主题与
565
+ 明暗档联动。它是悬浮**控件**不是阅读面板:只有图标没有文字,底色取 72%——
566
+ 比浮层面板(--bg-glass 96%)更透才是「液体」;图标笔画对合成底色仍 ≥3:1
567
+ (非文本对比下限),边界由 1px 亮边 + 内缘高光承担,不靠底色。
568
+ 不用 @supports 分支做模糊本身(同 .shell-glass 口径),但底色必须在
569
+ 完全不支持 backdrop-filter 时回实心——72% 无模糊压不住下层内容。 */
570
+ .shell-floatnav {
571
+ position: fixed;
572
+ left: 0;
573
+ top: 0;
574
+ /* 宿主弹层(多任务 44 / 面板 45 / 弹窗 50 / 右键 60 / 启动 100)都在之上:
575
+ 弹层打开时由遮罩自然盖住;工具栏(30)/ 状态栏(20)在之下 */
576
+ z-index: 40;
577
+ display: flex;
578
+ align-items: center;
579
+ gap: 10px;
580
+ padding: 5px;
581
+ border-radius: 999px;
582
+ border: 1px solid color-mix(in srgb, var(--text-primary) 16%, transparent);
583
+ background: color-mix(in srgb, var(--bg-card) 72%, transparent);
584
+ -webkit-backdrop-filter: blur(26px) saturate(200%);
585
+ backdrop-filter: blur(26px) saturate(200%);
586
+ box-shadow:
587
+ 0 10px 28px rgba(0, 0, 0, 0.28),
588
+ 0 1px 3px rgba(0, 0, 0, 0.18),
589
+ inset 0 1px 0 color-mix(in srgb, var(--text-primary) 22%, transparent),
590
+ inset 0 -1px 0 rgba(0, 0, 0, 0.22);
591
+ opacity: 0;
592
+ touch-action: none;
593
+ user-select: none;
594
+ cursor: grab;
595
+ transition:
596
+ opacity var(--motion-duration-fast) var(--motion-ease),
597
+ box-shadow var(--motion-duration-fast) var(--motion-ease);
598
+ animation: shell-floatnav-in var(--motion-duration-base) var(--motion-ease);
599
+ }
600
+ /* 斜向高光面:液体玻璃的「光从左上来」读感(pointer-events 关掉,纯视觉层) */
601
+ .shell-floatnav::before {
602
+ content: '';
603
+ position: absolute;
604
+ inset: 1px;
605
+ border-radius: inherit;
606
+ background: linear-gradient(
607
+ 155deg,
608
+ color-mix(in srgb, var(--text-primary) 13%, transparent) 0%,
609
+ color-mix(in srgb, var(--text-primary) 4%, transparent) 42%,
610
+ transparent 72%
611
+ );
612
+ pointer-events: none;
613
+ }
614
+ .shell-floatnav.is-ready {
615
+ opacity: 1;
616
+ }
617
+ .shell-floatnav:not(.is-ready) {
618
+ /* 尺寸未量到前不接收点击:避免首帧位置未定时被误触 */
619
+ pointer-events: none;
620
+ }
621
+ .shell-floatnav.is-dragging {
622
+ cursor: grabbing;
623
+ box-shadow:
624
+ 0 18px 42px rgba(0, 0, 0, 0.34),
625
+ 0 3px 8px rgba(0, 0, 0, 0.22),
626
+ inset 0 1px 0 color-mix(in srgb, var(--text-primary) 28%, transparent),
627
+ inset 0 -1px 0 rgba(0, 0, 0, 0.26);
628
+ }
629
+ .shell-floatnav:focus-visible {
630
+ outline: 2px solid var(--color-primary);
631
+ outline-offset: 3px;
632
+ }
633
+ .shell-floatnav-btn {
634
+ position: relative;
635
+ z-index: 1;
636
+ display: flex;
637
+ align-items: center;
638
+ justify-content: center;
639
+ /* 横向略宽于正方形:胶囊因此读作「拉长的按钮」而不是两个圆点 */
640
+ width: 42px;
641
+ height: 34px;
642
+ border-radius: 999px;
643
+ color: var(--text-primary);
644
+ transition:
645
+ background-color var(--motion-duration-fast) var(--motion-ease),
646
+ transform var(--motion-duration-fast) var(--motion-ease);
647
+ }
648
+ .shell-floatnav-btn:hover {
649
+ background: color-mix(in srgb, var(--text-primary) 12%, transparent);
650
+ }
651
+ .shell-floatnav-btn:active {
652
+ background: color-mix(in srgb, var(--color-primary) 22%, transparent);
653
+ /* 只缩放图标按钮的视觉,不改胶囊位置(transform 由外层承担) */
654
+ transform: scale(0.94);
655
+ }
656
+ /* 无可返回目标(已在主屏且无覆层):置灰但保留占位——胶囊宽度不随面态跳,
657
+ 也不给「能点」的假象;悬停 / 按压反馈一并撤掉 */
658
+ .shell-floatnav-btn:disabled,
659
+ .shell-floatnav-btn:disabled:hover,
660
+ .shell-floatnav-btn:disabled:active {
661
+ color: color-mix(in srgb, var(--text-primary) 34%, transparent);
662
+ background: none;
663
+ transform: none;
664
+ cursor: default;
665
+ }
666
+ .shell-floatnav-divider {
667
+ position: relative;
668
+ z-index: 1;
669
+ width: 1px;
670
+ height: 16px;
671
+ background: color-mix(in srgb, var(--text-primary) 24%, transparent);
672
+ }
673
+ @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
674
+ .shell-floatnav {
675
+ background: var(--bg-card);
676
+ }
677
+ }
678
+ @media (prefers-reduced-transparency: reduce) {
679
+ .shell-floatnav {
680
+ background: var(--bg-card);
681
+ -webkit-backdrop-filter: none;
682
+ backdrop-filter: none;
683
+ }
684
+ }
685
+ @keyframes shell-floatnav-in {
686
+ from {
687
+ opacity: 0;
688
+ }
689
+ to {
690
+ opacity: 1;
691
+ }
692
+ }
693
+
694
+ /* ==================== 屏幕切换动效(减速到达,只动 transform/opacity,spec-c §1) ==================== */
695
+ .screen-entering {
696
+ animation: shell-scr-in var(--motion-duration-base) var(--motion-ease);
697
+ }
698
+ @keyframes shell-scr-in {
699
+ from {
700
+ opacity: 0;
701
+ transform: scale(0.97) translateY(6px);
702
+ }
703
+ to {
704
+ opacity: 1;
705
+ transform: none;
706
+ }
707
+ }
708
+
709
+ /* ==================== 弹窗进入动效 ==================== */
710
+ .shell-dlg-in {
711
+ animation: shell-dlg-in var(--motion-duration-base) var(--motion-ease);
712
+ }
713
+ @keyframes shell-dlg-in {
714
+ from {
715
+ opacity: 0;
716
+ transform: scale(0.96) translateY(10px);
717
+ }
718
+ to {
719
+ opacity: 1;
720
+ transform: none;
721
+ }
722
+ }
723
+
724
+ /* ==================== 覆层淡入 ==================== */
725
+ .shell-fade-in {
726
+ animation: shell-fade-in var(--motion-duration-fast) var(--motion-ease);
727
+ }
728
+ @keyframes shell-fade-in {
729
+ from {
730
+ opacity: 0;
731
+ }
732
+ to {
733
+ opacity: 1;
734
+ }
735
+ }
736
+
737
+ /* ==================== 系统级「减弱动态」降级 ====================
738
+ 与 style.css 的页面过渡降级同一条口径,但覆盖壳内所有自绘动效(系统页入场 /
739
+ 图块交错 / 面板缩放 / 图块悬停抬升)。用 0.01ms 而不是 `animation: none`:
740
+ 带 `both` 填充模式的入场动画若被整条移除,元素会停在 `from`(透明度 0)——
741
+ 内容消失比动效更糟。动效只是被压成瞬时,终态一定到位。 */
742
+ @media (prefers-reduced-motion: reduce) {
743
+ .shell-root *,
744
+ .shell-root *::before,
745
+ .shell-root *::after {
746
+ animation-duration: 0.01ms !important;
747
+ animation-delay: 0ms !important;
748
+ animation-iteration-count: 1 !important;
749
+ transition-duration: 0.01ms !important;
750
+ transition-delay: 0ms !important;
751
+ }
752
+ }