dsh-fishpai 1.0.4 → 1.1.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/CHANGELOG.md +14 -0
- package/NOTICE.md +3 -4
- package/README.md +11 -20
- package/lib/client.js +28 -111
- package/package.json +10 -9
- package/plugin/vendor/themes.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,20 @@ All notable changes to this project are documented in this file.
|
|
|
10
10
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
11
11
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
12
12
|
|
|
13
|
+
## [1.1.0] - 2026-10-09
|
|
14
|
+
|
|
15
|
+
### 变更
|
|
16
|
+
|
|
17
|
+
- 客户端挂载改为只走 DSH **官方右侧栏**:标签页与引导列表经 `sidebarRightTabs.register` 加两个 `sidebar.right.pane.tab` 槽位注册,打开走 `sidebarRight.openTab`。此前与之并存的 `dsh-better-sidebar` 回退通道移除。
|
|
18
|
+
- 宿主依赖下限抬到 `>=0.2.0-rc.2 <0.3.0-0`:`peerDependencies` 的七个 `@deepseek-ai/dsh-*` 包与新增的 `engines.dsh` 一条同口径。此前声明的下限是 0.1.5-rc.2。
|
|
19
|
+
- 内置图标名改用宿主当前导出的拼写(`*Regular` 字重后缀),去掉两代拼写的对照表:下限抬高后只需服务一条线;某个名字取不到时仍降级成纯文字。
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
|
|
23
|
+
- The client now mounts only through the DSH **official right sidebar**: the tab and the guide entry are registered via `sidebarRightTabs.register` plus the two `sidebar.right.pane.tab` slots, and opening goes through `sidebarRight.openTab`. The parallel `dsh-better-sidebar` fallback channel that previously accompanied it is removed.
|
|
24
|
+
- Raised the host floor to `>=0.2.0-rc.2 <0.3.0-0`, applied uniformly to the seven `@deepseek-ai/dsh-*` packages in `peerDependencies` and to a new `engines.dsh` entry. The previous floor was 0.1.5-rc.2.
|
|
25
|
+
- Built-in icon names now use the host's current export spelling (the `*Regular` weight suffix), dropping the two-generation alias table; with the floor raised there is only one line to serve. A name that cannot be resolved still degrades to plain text.
|
|
26
|
+
|
|
13
27
|
## [1.0.4] - 2026-10-04
|
|
14
28
|
|
|
15
29
|
### 新增
|
package/NOTICE.md
CHANGED
|
@@ -10,15 +10,14 @@
|
|
|
10
10
|
| 上游仓库 | https://github.com/ye4wzp/mopai-markdown |
|
|
11
11
|
| 上游作者 | [@ye4wzp](https://github.com/ye4wzp) |
|
|
12
12
|
| 许可 | MIT |
|
|
13
|
-
| 本仓库 fork 自 | `main
|
|
14
|
-
| 上游原样保留位置 | `legacy-site/`(去掉 `screenshots/`,其余原样:`index.html`、`css/`、`js/`、`docs/`、`DESIGN.md`、`README*.md`、`tests/` 等) |
|
|
13
|
+
| 本仓库 fork 自 | `main` @ `c91487abfc5848f5b78e9fcec3b62d58033c61dc`(2026-08-19) |
|
|
15
14
|
|
|
16
15
|
鱼排直接复用了上游两项核心资产,均为 MIT:
|
|
17
16
|
|
|
18
17
|
1. **主题定义** —— 上游 `js/themes.js` 复制为本仓库 `plugin/vendor/themes.js`(换行符归一为 LF;
|
|
19
18
|
另外**有意删除了两套主题**:「金融时报(ft)」与「Medium」——前者靠整页异色底立身、公众号文章不要
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
整页底色,后者与「纽约时报」只剩字号与字体栈的差别)。上游原版 `js/themes.js` 的 blob SHA 为
|
|
20
|
+
`dfa0ea47287fb16969aabe75163f9049c10c82e8`,需要逐字节比对时按此锚点取上游文件核对。
|
|
22
21
|
2. **渲染管线设计** —— 「先渲染 HTML,再给每个标签内联主题样式」「复制到公众号时把代码块内
|
|
23
22
|
span 的计算样式内联」「h4–h6 套 h3 样式」「外链转文末参考资料」等行为与验收标准。
|
|
24
23
|
|
package/README.md
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
<img src="https://raw.githubusercontent.com/OMSociety/dsh-fishpai/main/docs/logo.png" alt="鱼排 FishPai" width="190">
|
|
3
|
-
<h1
|
|
3
|
+
<h1>鱼排编辑器 FishPai</h1>
|
|
4
4
|
<p>公众号排版工作台,长在 DeepSeek Harness 的右侧栏里。</p>
|
|
5
5
|
<p>人在侧栏改字、加批注与占位;模型用<strong>块级 diff</strong> 看懂你改了什么、想要什么;成品仍由你复制粘贴进公众号编辑器。</p>
|
|
6
6
|
|
|
7
7
|
<p>
|
|
8
|
-
<a href="https://
|
|
9
|
-
<a href="https://github.com/deepseek-ai/dsh"><img src="https://img.shields.io/badge/DSH-%3E%3D0.
|
|
8
|
+
<a href="https://www.npmjs.com/package/dsh-fishpai"><img src="https://img.shields.io/npm/v/dsh-fishpai?color=4f6ef7&label=version" alt="Version"></a>
|
|
9
|
+
<a href="https://github.com/deepseek-ai/dsh"><img src="https://img.shields.io/badge/DSH-%3E%3D0.2.0--rc.2_%3C0.3.0--0-4f6ef7" alt="DSH"></a>
|
|
10
10
|
<a href="LICENSE"><img src="https://img.shields.io/github/license/OMSociety/dsh-fishpai?color=4f6ef7" alt="License"></a>
|
|
11
11
|
<a href="https://github.com/OMSociety/dsh-fishpai/stargazers"><img src="https://img.shields.io/github/stars/OMSociety/dsh-fishpai?color=4f6ef7" alt="Stars"></a>
|
|
12
12
|
<a href="https://github.com/OMSociety/dsh-fishpai/issues"><img src="https://img.shields.io/github/issues/OMSociety/dsh-fishpai?color=4f6ef7" alt="Issues"></a>
|
|
13
13
|
</p>
|
|
14
14
|
|
|
15
|
-
<a href="#这是什么">这是什么</a> • <a href="#核心特性">核心特性</a> • <a href="#效果">效果</a> • <a href="
|
|
15
|
+
<a href="#这是什么">这是什么</a> • <a href="#核心特性">核心特性</a> • <a href="#效果">效果</a> • <a href="#安装方式">安装方式</a> • <a href="#模型工具">模型工具</a> • <a href="#面板快捷键">面板快捷键</a> • <a href="#开发">开发</a> • <a href="#许可证与作者">许可证与作者</a>
|
|
16
16
|
</div>
|
|
17
17
|
|
|
18
18
|
## 这是什么
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
**鱼排编辑器**把 Markdown 排成**内联样式 HTML**:整段粘进微信公众号编辑器就得到成品排版。
|
|
21
21
|
|
|
22
22
|
它同时是一个**人在回路里的改稿台**——面板与模型看的是同一篇文档,谁改了什么一目了然。
|
|
23
23
|
|
|
@@ -53,25 +53,17 @@
|
|
|
53
53
|
|
|
54
54
|
同一份 HTML 用「导出 HTML」存成文件、在浏览器里打开,看到的就是面板右侧那个样子。
|
|
55
55
|
|
|
56
|
-
##
|
|
56
|
+
## 安装方式
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
**从 npm 安装**
|
|
59
59
|
|
|
60
60
|
```powershell
|
|
61
|
-
#
|
|
62
|
-
dsh plugin --profile
|
|
63
|
-
# 2) 重新启动 dsh web
|
|
61
|
+
# 先停掉正在运行的 DSH(运行中的服务会锁住依赖,装完再起)
|
|
62
|
+
dsh plugin --profile <profile> add "dsh-fishpai"
|
|
64
63
|
```
|
|
65
64
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
```powershell
|
|
69
|
-
git clone https://github.com/OMSociety/dsh-fishpai D:\WorkSpace\dsh-fishpai
|
|
70
|
-
dsh plugin --profile web add "github:OMSociety/dsh-fishpai"
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
> 装好后**刷新一下浏览器页面**,右侧栏就会多出「鱼排编辑器」入口(官方右侧栏的 `+` 菜单 / 引导页里也能找到)——只重启宿主不够,客户端产物是页面加载时取的。
|
|
74
|
-
> 本插件零运行时依赖,不受 `minimumReleaseAge` 影响;客户端产物 `lib/client.js` 已入库,不需要本地构建。
|
|
65
|
+
> 装好后**刷新一下浏览器页面**,「鱼排编辑器」从右侧栏的引导页打开——只重启宿主不够,客户端产物是页面加载时取的;入口与布局按会话记忆,新会话第一次要点一次(模型调 `fishpai_open` 时也会自动打开)。
|
|
66
|
+
> 本插件零运行时依赖,不受 `minimumReleaseAge` 影响。
|
|
75
67
|
|
|
76
68
|
**装完怎么用**
|
|
77
69
|
|
|
@@ -142,7 +134,6 @@ plugin/vendor/ 上游 themes.js + markdown-it 14.1.0 + highlight.js 11.
|
|
|
142
134
|
client/ 客户端源码(TSX → esbuild 打成 lib/client.js)
|
|
143
135
|
lib/client.js 客户端 bundle(入库;dsh plugin add 不做构建)
|
|
144
136
|
skills/fishpai/ 鱼排技能:教模型怎么选主题、怎么按块改稿
|
|
145
|
-
legacy-site/ 上游 SPA 原样留存,便于复核渲染一致性
|
|
146
137
|
test/ golden、站点对照、块/diff/批注/补丁、宿主红线、微信兼容层、主题规格、图标双版本对照、bundle 形态、快捷键、真实 Cordis 挂载、客户端 store 时序
|
|
147
138
|
```
|
|
148
139
|
|
package/lib/client.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 自动生成,请勿手改 —— 源码在 client/,用 `npm run build` 重新生成。
|
|
3
|
-
* 改完记得把本文件一起提交:`dsh plugin add
|
|
3
|
+
* 改完记得把本文件一起提交:`dsh plugin add dsh-fishpai` 只安装、不构建。
|
|
4
4
|
*/
|
|
5
5
|
window.__ModuleLoader__.load({
|
|
6
6
|
id: "dsh-fishpai",
|
|
@@ -1002,43 +1002,18 @@ window.__ModuleLoader__.load({
|
|
|
1002
1002
|
}
|
|
1003
1003
|
|
|
1004
1004
|
// client/icon-names.ts
|
|
1005
|
-
var ICON_EXPORT_ALIASES = {
|
|
1006
|
-
// 主题图标(THEME_GLYPH 引用的就是这些稳定名)
|
|
1007
|
-
IconAgentPresetOutline16: ["IconAgentPresetOutlineRegular", "IconAgentPresetOutline16"],
|
|
1008
|
-
IconBranchOutline16: ["IconBranchOutlineRegular", "IconBranchOutline16"],
|
|
1009
|
-
IconBrowseOutline16: ["IconBrowseOutlineRegular", "IconBrowseOutline16"],
|
|
1010
|
-
IconCodeOutline16: ["IconCodeOutlineRegular", "IconCodeOutline16"],
|
|
1011
|
-
IconDarkOutline16: ["IconDarkOutlineRegular", "IconDarkOutline16"],
|
|
1012
|
-
IconEditOutline16: ["IconEditOutlineRegular", "IconEditOutline16"],
|
|
1013
|
-
IconEnhanceOutline16: ["IconEnhanceOutlineRegular", "IconEnhanceOutline16"],
|
|
1014
|
-
IconLightOutline16: ["IconLightOutlineRegular", "IconLightOutline16"],
|
|
1015
|
-
IconListPenOutline16: ["IconListPenOutlineRegular", "IconListPenOutline16"],
|
|
1016
|
-
IconPersonalizationOutline16: ["IconPersonalizationOutlineRegular", "IconPersonalizationOutline16"],
|
|
1017
|
-
IconSparkle16: ["IconSparkleRegular", "IconSparkle16"],
|
|
1018
|
-
IconThinkOutline16: ["IconThinkOutlineRegular", "IconThinkOutline16"],
|
|
1019
|
-
// 面板控件(下拉箭头 / 选中勾)
|
|
1020
|
-
IconChevronDownOutline14: ["IconChevronDownOutlineRegular", "IconChevronDownOutline14"],
|
|
1021
|
-
IconCheckOutline14: ["IconCheckOutlineRegular", "IconCheckOutline14"]
|
|
1022
|
-
};
|
|
1023
|
-
function iconExportCandidates(stable) {
|
|
1024
|
-
const aliases = ICON_EXPORT_ALIASES[stable];
|
|
1025
|
-
return aliases ? [aliases[0], aliases[1]] : [stable];
|
|
1026
|
-
}
|
|
1027
1005
|
function isIconComponent(value) {
|
|
1028
1006
|
if (typeof value === "function") return true;
|
|
1029
1007
|
return !!value && typeof value === "object" && !!value.$$typeof;
|
|
1030
1008
|
}
|
|
1031
|
-
function resolveIconExport(primitives,
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
continue;
|
|
1038
|
-
}
|
|
1039
|
-
if (isIconComponent(value)) return value;
|
|
1009
|
+
function resolveIconExport(primitives, name2) {
|
|
1010
|
+
let value;
|
|
1011
|
+
try {
|
|
1012
|
+
value = primitives ? primitives[name2] : void 0;
|
|
1013
|
+
} catch {
|
|
1014
|
+
return null;
|
|
1040
1015
|
}
|
|
1041
|
-
return null;
|
|
1016
|
+
return isIconComponent(value) ? value : null;
|
|
1042
1017
|
}
|
|
1043
1018
|
|
|
1044
1019
|
// client/icons.tsx
|
|
@@ -1056,21 +1031,6 @@ window.__ModuleLoader__.load({
|
|
|
1056
1031
|
if (!Icon) return null;
|
|
1057
1032
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { size: props.size ?? fallbackSize, className: props.className });
|
|
1058
1033
|
}
|
|
1059
|
-
function FishGlyph({ size = 16, className }) {
|
|
1060
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", { width: size, height: size, viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", className, children: [
|
|
1061
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1062
|
-
"path",
|
|
1063
|
-
{
|
|
1064
|
-
d: "M2.1 8C3.2 5.6 5.4 4.1 8.2 4.1C10.1 4.1 11.5 5 12.4 6.2L14.6 4.4L13.3 8L14.6 11.6L12.4 9.8C11.5 11 10.1 11.9 8.2 11.9C5.4 11.9 3.2 10.4 2.1 8Z",
|
|
1065
|
-
stroke: "currentColor",
|
|
1066
|
-
strokeWidth: "0.89",
|
|
1067
|
-
strokeLinejoin: "round",
|
|
1068
|
-
strokeLinecap: "round"
|
|
1069
|
-
}
|
|
1070
|
-
),
|
|
1071
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { cx: "4.9", cy: "7.2", r: "0.72", fill: "currentColor" })
|
|
1072
|
-
] });
|
|
1073
|
-
}
|
|
1074
1034
|
function FishMark({ size = 16, className }) {
|
|
1075
1035
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", { width: size, height: size, viewBox: "0 0 36 36", fill: "none", "aria-hidden": "true", className, children: [
|
|
1076
1036
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("linearGradient", { id: "dsh-fishpai-mark", x1: "7", y1: "10", x2: "29", y2: "26", gradientUnits: "userSpaceOnUse", children: [
|
|
@@ -1093,41 +1053,41 @@ window.__ModuleLoader__.load({
|
|
|
1093
1053
|
] });
|
|
1094
1054
|
}
|
|
1095
1055
|
var THEME_GLYPH = {
|
|
1096
|
-
default: "
|
|
1056
|
+
default: "IconListPenOutlineRegular",
|
|
1097
1057
|
// 排版:默认公众号就是给微信做的那套
|
|
1098
|
-
elegant: "
|
|
1058
|
+
elegant: "IconSparkleRegular",
|
|
1099
1059
|
// 优雅简约
|
|
1100
|
-
deep_read: "
|
|
1060
|
+
deep_read: "IconThinkOutlineRegular",
|
|
1101
1061
|
// 深度阅读
|
|
1102
|
-
nyt: "
|
|
1062
|
+
nyt: "IconBrowseOutlineRegular",
|
|
1103
1063
|
// 纽约时报(版面)
|
|
1104
|
-
apple: "
|
|
1064
|
+
apple: "IconLightOutlineRegular",
|
|
1105
1065
|
// Apple 极简(明亮、留白)
|
|
1106
|
-
claude: "
|
|
1066
|
+
claude: "IconAgentPresetOutlineRegular",
|
|
1107
1067
|
// Claude(对话助手)
|
|
1108
|
-
sspai: "
|
|
1068
|
+
sspai: "IconPersonalizationOutlineRegular",
|
|
1109
1069
|
// 少数派(个性)
|
|
1110
|
-
bamboo: "
|
|
1070
|
+
bamboo: "IconBranchOutlineRegular",
|
|
1111
1071
|
// 竹林(枝叶)
|
|
1112
|
-
tech: "
|
|
1072
|
+
tech: "IconCodeOutlineRegular",
|
|
1113
1073
|
// 技术风格(代码)
|
|
1114
|
-
dark_night: "
|
|
1074
|
+
dark_night: "IconDarkOutlineRegular",
|
|
1115
1075
|
// 暗夜模式
|
|
1116
|
-
gradient: "
|
|
1076
|
+
gradient: "IconEnhanceOutlineRegular",
|
|
1117
1077
|
// 渐变彩虹(增色)
|
|
1118
1078
|
// 「自定义主题」:工作目录里那**一套**模型生成的主题,图标固定这一个。
|
|
1119
|
-
//
|
|
1079
|
+
// 为什么不让模型挑:图标名是客户端这半的事,宿主那半的校验器看不到候选名单——
|
|
1120
1080
|
// 让模型选就得在宿主再抄一份、跟着 DSH 升级维护,抄漏一个的后果是"图标静默消失且不报错"。
|
|
1121
|
-
custom: "
|
|
1081
|
+
custom: "IconEditOutlineRegular"
|
|
1122
1082
|
};
|
|
1123
1083
|
function ThemeGlyph({ themeKey, size = 16, className }) {
|
|
1124
1084
|
return builtin(THEME_GLYPH[themeKey] || "", { size, className }, 16);
|
|
1125
1085
|
}
|
|
1126
1086
|
function CaretGlyph({ size = 14, className }) {
|
|
1127
|
-
return builtin("
|
|
1087
|
+
return builtin("IconChevronDownOutlineRegular", { size, className }, 14) ?? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className, children: "▾" });
|
|
1128
1088
|
}
|
|
1129
1089
|
function TickGlyph({ size = 14, className }) {
|
|
1130
|
-
return builtin("
|
|
1090
|
+
return builtin("IconCheckOutlineRegular", { size, className }, 14) ?? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className, children: "✓" });
|
|
1131
1091
|
}
|
|
1132
1092
|
|
|
1133
1093
|
// client/panel.tsx
|
|
@@ -1237,7 +1197,7 @@ window.__ModuleLoader__.load({
|
|
|
1237
1197
|
}
|
|
1238
1198
|
function BlankMark() {
|
|
1239
1199
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "fp-blank-mark", children: [
|
|
1240
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "fp-blank-glyph", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1200
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "fp-blank-glyph", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(FishMark, { size: 15 }) }),
|
|
1241
1201
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { children: "鱼排编辑器" })
|
|
1242
1202
|
] });
|
|
1243
1203
|
}
|
|
@@ -2446,7 +2406,8 @@ window.__ModuleLoader__.load({
|
|
|
2446
2406
|
border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-2);
|
|
2447
2407
|
}
|
|
2448
2408
|
.fp-blank-mark{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--dsw-alias-label-primary)}
|
|
2449
|
-
/*
|
|
2409
|
+
/* 品牌标:鱼形图标放在一块小方瓦里。标自带渐变(与侧边栏、插件列表磁贴同一份图),
|
|
2410
|
+
方瓦的底色与描边只用令牌,深浅色通吃 */
|
|
2450
2411
|
.fp-blank-glyph{
|
|
2451
2412
|
width:26px;height:26px;border-radius:8px;display:flex;align-items:center;justify-content:center;
|
|
2452
2413
|
background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l2);
|
|
@@ -2536,7 +2497,6 @@ window.__ModuleLoader__.load({
|
|
|
2536
2497
|
var inject = ["slots", "sessions"];
|
|
2537
2498
|
var TAB_ID = "dsh-fishpai";
|
|
2538
2499
|
var TAB_KIND = "fishpai";
|
|
2539
|
-
var FALLBACK_TAB_ID = `${TAB_ID}:editor`;
|
|
2540
2500
|
var POLL_MS = 3e3;
|
|
2541
2501
|
function pick(injected, key) {
|
|
2542
2502
|
if (!injected) return void 0;
|
|
@@ -2606,11 +2566,9 @@ window.__ModuleLoader__.load({
|
|
|
2606
2566
|
);
|
|
2607
2567
|
}
|
|
2608
2568
|
let openOfficial = null;
|
|
2609
|
-
let openFallback = null;
|
|
2610
2569
|
const openPanel = () => {
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
open();
|
|
2570
|
+
if (!openOfficial) throw new Error("官方右侧栏尚未就绪");
|
|
2571
|
+
openOfficial();
|
|
2614
2572
|
};
|
|
2615
2573
|
const openIfRequested = (sessionId, docKey) => {
|
|
2616
2574
|
try {
|
|
@@ -2624,8 +2582,6 @@ window.__ModuleLoader__.load({
|
|
|
2624
2582
|
});
|
|
2625
2583
|
return true;
|
|
2626
2584
|
};
|
|
2627
|
-
let officialReady = false;
|
|
2628
|
-
let disposeFallbackTab = null;
|
|
2629
2585
|
let seatHandle = null;
|
|
2630
2586
|
try {
|
|
2631
2587
|
seatHandle = ctx.inject(["sidebarRightTabs", "sidebarRight"], (injected) => {
|
|
@@ -2678,15 +2634,6 @@ window.__ModuleLoader__.load({
|
|
|
2678
2634
|
if (sidebarRight && typeof sidebarRight.openTab === "function") {
|
|
2679
2635
|
openOfficial = () => sidebarRight.openTab(TAB_KIND);
|
|
2680
2636
|
}
|
|
2681
|
-
officialReady = true;
|
|
2682
|
-
if (disposeFallbackTab) {
|
|
2683
|
-
try {
|
|
2684
|
-
disposeFallbackTab();
|
|
2685
|
-
} catch {
|
|
2686
|
-
}
|
|
2687
|
-
disposeFallbackTab = null;
|
|
2688
|
-
openFallback = null;
|
|
2689
|
-
}
|
|
2690
2637
|
const dispose = () => {
|
|
2691
2638
|
for (const off of disposers.reverse()) {
|
|
2692
2639
|
try {
|
|
@@ -2694,7 +2641,6 @@ window.__ModuleLoader__.load({
|
|
|
2694
2641
|
} catch {
|
|
2695
2642
|
}
|
|
2696
2643
|
}
|
|
2697
|
-
officialReady = false;
|
|
2698
2644
|
openOfficial = null;
|
|
2699
2645
|
getMountedSession = null;
|
|
2700
2646
|
};
|
|
@@ -2703,33 +2649,6 @@ window.__ModuleLoader__.load({
|
|
|
2703
2649
|
} catch (error) {
|
|
2704
2650
|
console.warn("[dsh-fishpai] 官方右侧栏席位注入失败:", error);
|
|
2705
2651
|
}
|
|
2706
|
-
let fallbackHandle = null;
|
|
2707
|
-
try {
|
|
2708
|
-
fallbackHandle = ctx.inject(["betterSidebar"], (injected) => {
|
|
2709
|
-
if (officialReady) return;
|
|
2710
|
-
const bs = pick(injected, "betterSidebar");
|
|
2711
|
-
if (!bs || typeof bs.registerTab !== "function") return;
|
|
2712
|
-
const off = bs.registerTab({
|
|
2713
|
-
id: FALLBACK_TAB_ID,
|
|
2714
|
-
title: () => "鱼排编辑器",
|
|
2715
|
-
// better-sidebar 的 TabDescriptor 支持 icon(它把它转交给原生右侧栏的引导页)
|
|
2716
|
-
icon: (size) => React2.createElement(FishMark, { size: size || 16 }),
|
|
2717
|
-
order: 40,
|
|
2718
|
-
single: true,
|
|
2719
|
-
component: (props) => React2.createElement(PanelHost, props)
|
|
2720
|
-
});
|
|
2721
|
-
openFallback = () => bs.openTab({ type: FALLBACK_TAB_ID });
|
|
2722
|
-
disposeFallbackTab = () => {
|
|
2723
|
-
try {
|
|
2724
|
-
off();
|
|
2725
|
-
} catch {
|
|
2726
|
-
}
|
|
2727
|
-
};
|
|
2728
|
-
return off;
|
|
2729
|
-
});
|
|
2730
|
-
} catch (error) {
|
|
2731
|
-
console.warn("[dsh-fishpai] better-sidebar 回退注入失败:", error);
|
|
2732
|
-
}
|
|
2733
2652
|
ctx.effect(() => {
|
|
2734
2653
|
let stopped = false;
|
|
2735
2654
|
let warned = false;
|
|
@@ -2778,8 +2697,6 @@ window.__ModuleLoader__.load({
|
|
|
2778
2697
|
stopped = true;
|
|
2779
2698
|
clearInterval(timer);
|
|
2780
2699
|
seatHandle?.dispose?.();
|
|
2781
|
-
fallbackHandle?.dispose?.();
|
|
2782
|
-
disposeFallbackTab?.();
|
|
2783
2700
|
for (const store of stores.values()) store.dispose();
|
|
2784
2701
|
stores.clear();
|
|
2785
2702
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-fishpai",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "DeepSeek Harness plugin: 鱼排 FishPai — a WeChat Official Account typesetting workbench in the DSH right sidebar, with block-level diffs and annotations a model can read. Rendering core derived from the MIT mopai-markdown.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -43,13 +43,13 @@
|
|
|
43
43
|
"LICENSE"
|
|
44
44
|
],
|
|
45
45
|
"peerDependencies": {
|
|
46
|
-
"@deepseek-ai/dsh-client-ui-primitives": ">=0.
|
|
47
|
-
"@deepseek-ai/dsh-client-ui-sidebar-right": ">=0.
|
|
48
|
-
"@deepseek-ai/dsh-client-ui-renderer": ">=0.
|
|
49
|
-
"@deepseek-ai/dsh-host-webserver": ">=0.
|
|
50
|
-
"@deepseek-ai/dsh-session": ">=0.
|
|
51
|
-
"@deepseek-ai/dsh-skill": ">=0.
|
|
52
|
-
"@deepseek-ai/dsh-tools": ">=0.
|
|
46
|
+
"@deepseek-ai/dsh-client-ui-primitives": ">=0.2.0-rc.2 <0.3.0-0",
|
|
47
|
+
"@deepseek-ai/dsh-client-ui-sidebar-right": ">=0.2.0-rc.2 <0.3.0-0",
|
|
48
|
+
"@deepseek-ai/dsh-client-ui-renderer": ">=0.2.0-rc.2 <0.3.0-0",
|
|
49
|
+
"@deepseek-ai/dsh-host-webserver": ">=0.2.0-rc.2 <0.3.0-0",
|
|
50
|
+
"@deepseek-ai/dsh-session": ">=0.2.0-rc.2 <0.3.0-0",
|
|
51
|
+
"@deepseek-ai/dsh-skill": ">=0.2.0-rc.2 <0.3.0-0",
|
|
52
|
+
"@deepseek-ai/dsh-tools": ">=0.2.0-rc.2 <0.3.0-0"
|
|
53
53
|
},
|
|
54
54
|
"dsh": {
|
|
55
55
|
"bundle": {
|
|
@@ -60,7 +60,8 @@
|
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
62
|
"engines": {
|
|
63
|
-
"node": ">=20"
|
|
63
|
+
"node": ">=20",
|
|
64
|
+
"dsh": ">=0.2.0-rc.2 <0.3.0-0"
|
|
64
65
|
},
|
|
65
66
|
"scripts": {
|
|
66
67
|
"build": "node scripts/build-client.mjs",
|
package/plugin/vendor/themes.js
CHANGED
|
@@ -149,7 +149,7 @@ const themes = {
|
|
|
149
149
|
// · ft 的特点就是整页粉橙异色底(background: #fff1e5),而公众号文章不适合整页底色;
|
|
150
150
|
// 去掉底之后它与相邻的衬线主题几乎一样,没有单独存在的价值。
|
|
151
151
|
// · medium 与 nyt 的差别只剩字号与字体栈,实际观感重合。
|
|
152
|
-
// 上游原版 themes.js
|
|
152
|
+
// 上游原版 themes.js 的逐字节比对锚点见 NOTICE.md。
|
|
153
153
|
|
|
154
154
|
// ─── 现代数字系列 ─────────────────────
|
|
155
155
|
apple: {
|