pi-web-ui 0.27.0 → 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/README.zh-CN.md +1 -1
- package/dist/server/agent-service.js +595 -106
- package/dist/server/index.js +14 -6
- package/dist/server/terminals.js +307 -39
- package/package.json +1 -1
- package/themes/light.css +76 -7
- package/web/dist/assets/index-BnDkdKFN.css +41 -0
- package/web/dist/assets/index-CgNeNC6a.js +129 -0
- package/web/dist/index.html +2 -2
- package/web/dist/assets/index-BG-7esPW.css +0 -41
- package/web/dist/assets/index-Bau95_Bc.js +0 -129
package/README.md
CHANGED
|
@@ -190,7 +190,7 @@ Any CSS file dropped into your **data-dir themes folder** shows up in the theme
|
|
|
190
190
|
|
|
191
191
|
Easiest way to write one: copy `themes/light.css` (or the bundled dark `web/src/styles.css` from the source repo) and change the `:root` colors plus any hardcoded values — the file must be **self-contained**. Notes:
|
|
192
192
|
|
|
193
|
-
- The **
|
|
193
|
+
- The **terminal follows the theme** — set the `--term-*` variables (terminal ANSI palette + `--term-bg`) in your `:root` and both the xterm canvas and its padded container adapt automatically (see the defaults in `styles.css` and the light values in `themes/light.css`).
|
|
194
194
|
- Syntax-highlight colors (`highlight.js`'s `github-dark.css` is bundled) must be overridden in your theme file or code will be unreadable — see the `.hljs` overrides at the bottom of `themes/light.css` for the pattern.
|
|
195
195
|
- Theme ids must match `^[A-Za-z0-9_-]+$` (no dots/slashes — path-traversal guard on the server).
|
|
196
196
|
|
|
@@ -204,7 +204,7 @@ Want your theme shipped to everyone? Open a pull request at [github.com/xing-shu
|
|
|
204
204
|
4. If you only changed colors in `styles.css` and want the bundled light theme updated too, regenerate it with `node make-light-theme.mjs`.
|
|
205
205
|
5. Commit (`git add themes/<id>.css`) and open the PR. The `themes/` folder is already in the npm package `files` whitelist, so once merged and released, `npm i -g pi-web-ui` will ship your theme to everyone.
|
|
206
206
|
|
|
207
|
-
Rules for merged themes: the file must be a single self-contained CSS file, be a full standalone theme (no imports of the base `styles.css`),
|
|
207
|
+
Rules for merged themes: the file must be a single self-contained CSS file, be a full standalone theme (no imports of the base `styles.css`), set the `--term-*` variables for a readable terminal, and override `.hljs` syntax colors for readable code.
|
|
208
208
|
|
|
209
209
|
## Security
|
|
210
210
|
|
package/README.zh-CN.md
CHANGED
|
@@ -185,7 +185,7 @@ pi-web-ui server unquiesce # 解除排空,恢复接收新工
|
|
|
185
185
|
|
|
186
186
|
最容易的写法:复制 `themes/light.css`(或源码仓库里内置的深色 `web/src/styles.css`),改 `:root` 颜色和必要的硬编码值即可 —— 文件必须**自包含**。注意:
|
|
187
187
|
|
|
188
|
-
-
|
|
188
|
+
- **终端跟随主题** —— 在你的 `:root` 里设置 `--term-*` 变量(终端 ANSI 配色 + `--term-bg`),xterm 画布和它的内边距容器都会自动适配(默认值见 `styles.css`,亮色值见 `themes/light.css`)。
|
|
189
189
|
- 代码高亮色(打包自带 `highlight.js` 的 `github-dark.css`)必须在你的主题文件里覆盖,否则代码会看不清 —— 参照 `themes/light.css` 末尾的 `.hljs` 覆盖写法。
|
|
190
190
|
- 主题 id 必须匹配 `^[A-Za-z0-9_-]+$`(不能有点和斜杠 —— 服务端有路径穿越防护)。
|
|
191
191
|
|