dsh-conversation-navigator 0.2.1 → 0.2.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/lib/client.js +27 -25
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -1008,7 +1008,7 @@ window.__ModuleLoader__.load({
|
|
|
1008
1008
|
}
|
|
1009
1009
|
function renderItem(item, staggerMs) {
|
|
1010
1010
|
const useSnippet = filtering && hit(item.search);
|
|
1011
|
-
const preview = useSnippet ? snippetNodes(item.search, kw,
|
|
1011
|
+
const preview = useSnippet ? snippetNodes(item.search, kw, 5, 60) : item.preview;
|
|
1012
1012
|
const hasPreview = preview !== null && preview !== "" && (!Array.isArray(preview) || preview.length > 0);
|
|
1013
1013
|
return React.createElement("button", {
|
|
1014
1014
|
key: item.key,
|
|
@@ -1031,7 +1031,7 @@ window.__ModuleLoader__.load({
|
|
|
1031
1031
|
const headSearch = g.items.length > 0 ? g.items[0].search : null;
|
|
1032
1032
|
const headFull = g.headIsUser && g.items.length > 0 ? g.items[0].full : null;
|
|
1033
1033
|
const useSnippet = filtering && hit(headSearch);
|
|
1034
|
-
const sub = useSnippet ? snippetNodes(headSearch, kw,
|
|
1034
|
+
const sub = useSnippet ? snippetNodes(headSearch, kw, 5, 55) : g.subtitle;
|
|
1035
1035
|
const hasSub = sub !== "" && (!Array.isArray(sub) || sub.length > 0);
|
|
1036
1036
|
/* 标题策略:
|
|
1037
1037
|
显示轮次: 轮次行 = 加粗「第 N 轮」; 压缩等非轮次行 = 加粗类型标签, 视作轮次同级
|
|
@@ -1215,30 +1215,32 @@ window.__ModuleLoader__.load({
|
|
|
1215
1215
|
onChange: (e) => setFilter(e.target.value),
|
|
1216
1216
|
})
|
|
1217
1217
|
: null,
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1218
|
+
searchOpen
|
|
1219
|
+
? null
|
|
1220
|
+
: React.createElement(Tooltip, {
|
|
1221
|
+
label: snap.docked ? "解除停靠(拖动头部定位)" : "停靠回右侧",
|
|
1222
|
+
side: "bottom",
|
|
1223
|
+
delayMs: 500,
|
|
1224
|
+
},
|
|
1225
|
+
React.createElement("span", null,
|
|
1226
|
+
React.createElement(Button, {
|
|
1227
|
+
variant: snap.docked ? "primary" : "ghost",
|
|
1228
|
+
size: "sm",
|
|
1229
|
+
icon: React.createElement(PinIcon),
|
|
1230
|
+
"aria-pressed": snap.docked,
|
|
1231
|
+
onClick: () => {
|
|
1232
|
+
if (snap.docked) {
|
|
1233
|
+
const el = panelEl;
|
|
1234
|
+
const r = el !== null ? el.getBoundingClientRect() : null;
|
|
1235
|
+
setState({ docked: false, userPos: r !== null ? { left: Math.round(r.left), top: Math.round(r.top) } : null });
|
|
1236
|
+
} else {
|
|
1237
|
+
setState({ docked: true });
|
|
1238
|
+
}
|
|
1239
|
+
persistUi();
|
|
1240
|
+
},
|
|
1241
|
+
}),
|
|
1242
|
+
),
|
|
1240
1243
|
),
|
|
1241
|
-
),
|
|
1242
1244
|
React.createElement("span", { className: "cnvnav-count" }, (filtering ? groupNodes.length + " / " : "") + String(count) + " 条"),
|
|
1243
1245
|
React.createElement(Tooltip, {
|
|
1244
1246
|
label: "收起面板",
|