dsh-md-plus 0.4.3 → 0.4.4
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 +5 -1
- package/lib/client.js +6 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
# 更新日志
|
|
2
2
|
|
|
3
|
-
## 0.4.
|
|
3
|
+
## 0.4.4 —— 未发布
|
|
4
|
+
|
|
5
|
+
- 修复表格折叠按钮在低阈值和展开/收起后漂移、消失的问题:补齐表格折叠高度规则、重置滚动位置,并给按钮阴影留出空间。
|
|
6
|
+
|
|
7
|
+
## 0.4.3 —— 2026-10-30
|
|
4
8
|
|
|
5
9
|
- 修复补高亮语言映射:`hbs` / `jade` / `tscn` / `tres` 分别使用 handlebars / pug / gdresource 语法着色。
|
|
6
10
|
- 修复 Mermaid 12.1 在占位标签兜底路径下的图种识别:补充 `radar-beta`、`treemap-beta`、`venn-beta`、`ishikawa-beta`、`wardley-beta`、`cynefin-beta`、`treeView-beta`、`flowchart-elk` 等,并去掉无效裸关键字的误判。
|
package/lib/client.js
CHANGED
|
@@ -451,7 +451,7 @@ window.__ModuleLoader__.load({
|
|
|
451
451
|
// 用 clip 而不是 hidden:hidden 会建立隐形滚动容器,鼠标在折叠内容上滚轮会被它吞掉。
|
|
452
452
|
"." + FOLD_CLASS + "[" + FOLD_ATTR + '="on"]{max-height:var(--md-plus-fold-max-height);overflow:clip}',
|
|
453
453
|
"." + FOLD_BTN_CLASS + "{display:block;white-space:nowrap;margin:8px auto 0;padding:4px 12px;border:1px solid var(--dsw-alias-border-secondary,rgb(127 127 127 / 22%));border-radius:999px;background:var(--dsw-alias-bg-base,#fff);color:var(--dsw-alias-label-primary);font:12px/18px var(--dsw-font-family-sans,system-ui,sans-serif);cursor:pointer;box-shadow:0 2px 8px rgb(0 0 0 / 12%);z-index:2}",
|
|
454
|
-
"." + FOLD_CLASS + "[" + FOLD_ATTR + '="on"] .' + FOLD_BTN_CLASS + "{position:absolute;left:50%;bottom:
|
|
454
|
+
"." + FOLD_CLASS + "[" + FOLD_ATTR + '="on"] .' + FOLD_BTN_CLASS + "{position:absolute;left:50%;bottom:12px;transform:translateX(-50%);margin:0}",
|
|
455
455
|
// ── 图片点击放大 ────────────────────────────────────────────────
|
|
456
456
|
'[class*="_markdown_"] img{cursor:zoom-in}',
|
|
457
457
|
"." + IMG_MODAL_CLASS + "{position:fixed;inset:0;z-index:2147483000;display:flex;align-items:center;justify-content:center;padding:calc(var(--dsh-windows-titlebar-height,0px) + 16px) 24px 24px;background:rgb(0 0 0 / 72%)}",
|
|
@@ -529,7 +529,9 @@ window.__ModuleLoader__.load({
|
|
|
529
529
|
TABLE + ".md-table-wide > table{width:100%;max-width:none;min-width:max-content}",
|
|
530
530
|
// 折叠态保留横向滚动,但纵向必须 clip;横向滚动容器只有在
|
|
531
531
|
// overscroll-behavior:auto 时才会把纵向滚轮交还给页面。
|
|
532
|
-
|
|
532
|
+
// 这里同时写明 min/max-height:基础表格规则的 max-height 特异性更高,不补会压过设置值;
|
|
533
|
+
// 最小高度保证极低阈值下「展开」按钮仍完整可见。
|
|
534
|
+
TABLE + "." + FOLD_CLASS + "[" + FOLD_ATTR + '="on"]{min-height:48px;max-height:var(--md-plus-fold-max-height);overflow-x:auto;overflow-y:clip}'
|
|
533
535
|
].join("\n");
|
|
534
536
|
var scripts = /* @__PURE__ */ new Map();
|
|
535
537
|
var pending = /* @__PURE__ */ new Set();
|
|
@@ -1100,6 +1102,7 @@ window.__ModuleLoader__.load({
|
|
|
1100
1102
|
target.setAttribute(FOLD_ATTR, "on");
|
|
1101
1103
|
target.classList.add(FOLD_CLASS);
|
|
1102
1104
|
target.style.setProperty("--md-plus-fold-max-height", limit + "px");
|
|
1105
|
+
if (target.hasAttribute(TABLE_DONE_ATTR)) target.scrollTop = 0;
|
|
1103
1106
|
var button = document.createElement("button");
|
|
1104
1107
|
button.type = "button";
|
|
1105
1108
|
button.className = FOLD_BTN_CLASS;
|
|
@@ -1116,6 +1119,7 @@ window.__ModuleLoader__.load({
|
|
|
1116
1119
|
button.addEventListener("click", () => {
|
|
1117
1120
|
var folded = target.getAttribute(FOLD_ATTR) === "on";
|
|
1118
1121
|
target.setAttribute(FOLD_ATTR, folded ? "off" : "on");
|
|
1122
|
+
if (target.hasAttribute(TABLE_DONE_ATTR)) target.scrollTop = 0;
|
|
1119
1123
|
button.textContent = folded ? t("foldClose") : t("foldOpen");
|
|
1120
1124
|
button.setAttribute("aria-expanded", folded ? "true" : "false");
|
|
1121
1125
|
sync?.();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-md-plus",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.4",
|
|
4
4
|
"description": "Markdown display enhancements for DeepSeek Harness Web: code block restyle, syntax highlighting for languages DSH does not ship, and built-in mermaid diagrams.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|