Repository navigation
Releases
v2.2.0
Dark newsprint + a specificity fix, from PR #2.
dsh plugin --profile web add https://github.com/2754LM/dsh-theme-newsprint/releases/latest/download/dsh-theme-newsprint.tgz
暗色:warm brown-black #1a1815(不是 #000、也不是蓝黑),暖白墨 #ece7dd,提亮海蓝 #5aa9d6(6.8:1)。所有色档保持 r>=g>=b,整条链仍是暖调。
特异性修复:亮档 token 加 :not([data-ds-dark-theme]),暗档用 [data-ds-dark-theme] 提到 (0,2,1),压过 DSH 自己的 (0,1,1)。这之前亮色 token 在暗色下会赢(特异性打平 + 插件 <style> 追加在 DSH 样式之后),现在不会了。
v2.1.0
Palette rework: the cold greys are gone.
dsh plugin --profile web add https://github.com/2754LM/dsh-theme-newsprint/releases/latest/download/dsh-theme-newsprint.tgz
- eight-step warm paper ramp replaces the flat greys (#dadada, #e8e7e7, #c5c5c5, #bababa)
- code panels, header strips, chips and active rows now sit on distinct steps
- primary button hover is warm #3f2d22, not purple #36284e
- label-tertiary now passes AA (4.6:1); the inverted label-primary-dimmed is fixed
- success/warn/error desaturated to a printing-ink register
v2.0.3
Prebuilt tarball, so dsh plugin add installs it without a source checkout:
dsh plugin --profile web add https://github.com/2754LM/dsh-theme-newsprint/releases/latest/download/dsh-theme-newsprint.tgz
Changes in 2.0.3:
- README(.en) documents the manifest actually shipped (dsh.bundle.patch + dsh.client)
- screenshots.json declares the preview from the repo
- dropped assets/preview-dark.png: the plugin ships no dark scheme
报纸衬线 · Newsprint Serif v2.0.2
报纸衬线 · Newsprint Serif v2.0.2
DSH 主题插件:把 Typora newsprint 的报纸排版气质搬进 DSH Web GUI。
亮色是暖白纸张 + 衬线正文 + 报纸笔画;暗色交给 DSH 官方中性黑。
- 亮色 — 暖白纸张
#f3f2ee,墨色正文#1f0909,全篇只有一个海蓝强调色#065588 - 暗色 — 不写,切到暗色时由 DSH 官方
[data-ds-dark-theme]流程接管 - 正文 — Georgia → PT Serif → 思源宋体 → 宋体
安装
# 钉在这个版本(推荐 —— main 是移动靶)
dsh plugin --profile web add github:2754LM/dsh-theme-newsprint#v2.0.2
# 或跟随 main HEAD
dsh plugin --profile web add github:2754LM/dsh-theme-newsprint然后重启 dsh web。装完默认启用,不需要再点任何开关。
停用:在 ~/.dsh/profiles/web/cordis.patch.yml 写入
- id: newsprint
disabled: true加载器会热重载。装上但停用时,DSH 整页看起来跟官方主题一模一样,没有任何排版泄露。
前置条件
- 装了
dshCLI,且有webprofile - 机器上有 pnpm(dsh 会 shell 出去调它)
- 能访问
codeload.github.com(中国大陆建议配 GitHub 加速线路) - 首次安装必须重启:client bundle 在启动时合成,没有热路径
形态
cordis 埋点插件(dsh.bundle + dsh.client),不依赖 @deepseek-ai/dsh-client-ui-theme,
不调 ctx.theme.register()。apply() 只做一件事:往 <head> 注入一个
<style id="dsh-theme-newsprint-styles">,fiber dispose 时移除 class 和 <style>。
好处是抗 DSH client 拓扑变更:dsh-client-runtime 被拆成两个 controller 那次(0.1.5-rc.2),
所有走 ctx.theme 的主题插件都翻车了,本插件只往 DOM 注 CSS,免疫。
本版修复的两个致命缺陷
lib/client.js 的这两处问题都会让整个合并后的 client bundle 解析失败,连带把其它所有
客户端插件一起拖下水(浏览器表现为
failed to import loader entry (@deepseek-ai/dsh-client-ui-renderer): ... loaded without registering):
-
悬空
+——THEME_CSS用+拼接时,注释夹在操作数之间且后面没有操作数。
ASI 不会在二元操作符之后触发,解析器一路吃到下一个const,抛Unexpected token 'const'。
现改为数组join("\n"),表达式中不存在二元操作符,注释插在任何位置都不会再破坏语法。 -
裸 ESM
export——dsh-client-modules不把插件 bundle 当 ES 模块加载,而是当 classic
script 求值,其唯一职责是调用window.__ModuleLoader__.load({ id, factory }),其中 factory
是一个惰性 CJS 闭包(require) => module.exports。在该上下文里顶层export是语法错误
(Unexpected token 'export')。现按官方 client half 的形态包好工厂包装,以
exports.apply = apply; return module.exports;收尾。
两处修复由一个 node:vm 套件验证(桩 __ModuleLoader__、物化 factory、以最小 DOM 调用
apply(ctx)、断言 <style> 与 scope class 出现、95 个 token 齐全、二次 apply 幂等、disposer
清理干净):16/16 通过。
已知事项
- 尚未收录进 awesome-dsh-plugin,
所以 dshmarket 的「主题」tab 里搜不到,只能用上面的github:语法安装 - 未发布到 npm,
dsh plugin add dsh-theme-newsprint(按包名)不可用 assets/preview-dark.png是占位图(本插件不写暗档)