dsh-plugin-zotero 0.6.5 → 0.6.6
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/client/client.js +17 -6
- package/package.json +1 -1
package/client/client.js
CHANGED
|
@@ -2217,7 +2217,7 @@ const THEME_CSS = `
|
|
|
2217
2217
|
text-overflow: ellipsis;
|
|
2218
2218
|
white-space: nowrap;
|
|
2219
2219
|
}
|
|
2220
|
-
/*
|
|
2220
|
+
/* 页面级刷新按钮进行中:只转图标,文字与宽度都保持不变。SVG 默认绕左上角转,center 必须显式写。 */
|
|
2221
2221
|
.dsh-zp-refresh-spin {
|
|
2222
2222
|
transform-origin: center;
|
|
2223
2223
|
animation: dsh-zp-refresh-rotate 900ms linear infinite;
|
|
@@ -32086,7 +32086,8 @@ function ZoomIcon({ kind }) {
|
|
|
32086
32086
|
/**
|
|
32087
32087
|
* 页面级刷新按钮的循环箭头。
|
|
32088
32088
|
*
|
|
32089
|
-
* 进行中靠全局 `.dsh-zp-refresh-spin`
|
|
32089
|
+
* 进行中靠全局 `.dsh-zp-refresh-spin` 转起来,文字不再换成「正在刷新…」——
|
|
32090
|
+
* 按钮窄了放不下长文案,进度改由图标旋转 + 禁用态 + `title`/`aria-label` 表达。
|
|
32090
32091
|
* 防重复点击靠的是 `disabled` 与 `ZoteroItemPane` 里的请求序号。
|
|
32091
32092
|
*/
|
|
32092
32093
|
function RefreshIcon({ spinning }) {
|
|
@@ -32178,7 +32179,10 @@ function DocumentView({ t, detail, source, annotations, viewerRef, onReady, onIn
|
|
|
32178
32179
|
...refreshButtonStyle,
|
|
32179
32180
|
cursor: "default"
|
|
32180
32181
|
} : refreshButtonStyle,
|
|
32181
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(RefreshIcon, { spinning: refreshing }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
32182
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(RefreshIcon, { spinning: refreshing }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
32183
|
+
style: refreshLabelStyle,
|
|
32184
|
+
children: t("action.refresh")
|
|
32185
|
+
})]
|
|
32182
32186
|
}),
|
|
32183
32187
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
32184
32188
|
type: "button",
|
|
@@ -32319,9 +32323,11 @@ const toolButtonStyle = {
|
|
|
32319
32323
|
/**
|
|
32320
32324
|
* 页面级刷新:紧挨 `Zotero` 按钮左边(中间隔 4,与缩放组之间隔 GROUP_GAP)。
|
|
32321
32325
|
*
|
|
32322
|
-
*
|
|
32323
|
-
*
|
|
32326
|
+
* 宽度从 106 收到 64(约 -40%):因为文案恒定「刷新」两字,进行中按钮不变宽,
|
|
32327
|
+
* 工具条里的页码与标题不会左右跳。`minWidth` 只定下限,中文取 64,英文
|
|
32328
|
+
* 「Refresh」按内容自然撑宽一点,不会挤到换行或溢出。
|
|
32324
32329
|
*/
|
|
32330
|
+
const REFRESH_BUTTON_MIN_WIDTH = 64;
|
|
32325
32331
|
const refreshButtonStyle = {
|
|
32326
32332
|
...SOFT_BUTTON_STYLE,
|
|
32327
32333
|
flexShrink: 0,
|
|
@@ -32329,7 +32335,7 @@ const refreshButtonStyle = {
|
|
|
32329
32335
|
alignItems: "center",
|
|
32330
32336
|
justifyContent: "center",
|
|
32331
32337
|
gap: 4,
|
|
32332
|
-
|
|
32338
|
+
minWidth: REFRESH_BUTTON_MIN_WIDTH,
|
|
32333
32339
|
height: 22,
|
|
32334
32340
|
padding: "0 5px",
|
|
32335
32341
|
marginLeft: GROUP_GAP,
|
|
@@ -32339,6 +32345,11 @@ const refreshButtonStyle = {
|
|
|
32339
32345
|
cursor: "pointer",
|
|
32340
32346
|
whiteSpace: "nowrap"
|
|
32341
32347
|
};
|
|
32348
|
+
/** 文案不许被 flex 压窄后换行;按钮宽度只按内容撑,不靠截断。 */
|
|
32349
|
+
const refreshLabelStyle = {
|
|
32350
|
+
flexShrink: 0,
|
|
32351
|
+
whiteSpace: "nowrap"
|
|
32352
|
+
};
|
|
32342
32353
|
//#endregion
|
|
32343
32354
|
//#region src/client/ItemDetail.tsx
|
|
32344
32355
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-plugin-zotero",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.6",
|
|
4
4
|
"description": "Map your Zotero library into DSH: let AI operate Zotero for you and help you read papers. Browse collections and tags in the sidebar, read PDFs with highlights in place, and cite excerpts, annotations, notes or whole items into the chat. The model works from the source text for reviews, comparisons and data extraction, and can also search and organize the library, import papers and attach translations back to items; first use needs the Zotero MCP plugin and the local API enabled.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dsh",
|