dsh-maoying 0.1.9 → 0.1.10

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/base.css CHANGED
@@ -573,7 +573,7 @@ html[data-dsh-maoying-active]:not([data-dsh-mnemon-active]):not([data-dsh-taskbo
573
573
  .myt-fsCard { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid var(--dsw-alias-border-l2); border-radius: 12px; background: var(--dsw-alias-bg-layer-3); }
574
574
  .myt-fsTitle { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--dsw-alias-label-primary); overflow-wrap: anywhere; }
575
575
  .myt-fsMeta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 11px; color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums; }
576
- .myt-fsNotes { font-size: 11px; line-height: 16px; color: var(--dsw-alias-label-tertiary); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
576
+ .myt-fsNotes { font-size: 11px; line-height: 16px; color: var(--dsw-alias-label-tertiary); overflow-wrap: anywhere; }
577
577
  .myt-fsActions { display: flex; flex-wrap: wrap; gap: 6px; }
578
578
  .myt-fsActions .myt-btn { padding: 2px 8px; font-size: 11px; line-height: 16px; }
579
579
 
package/lib/client.js CHANGED
@@ -712,6 +712,18 @@ window.__ModuleLoader__.load({
712
712
  ic(open ? "IconChevronDownOutlineRegular" : "IconChevronRightOutlineRegular", 14))),
713
713
  open ? h("pre", { className: "myt-outlineBody" }, body) : null);
714
714
  }
715
+ // 抽屉/弹层专用 Portal:面板容器挂在宿主会话中栏里,中栏的 transform/
716
+ // overflow 会把 position:fixed 劫持成相对自身并连同裁剪——抽屉渲染了也
717
+ // 看不见(桌面端「点了没反应」实测病灶)。挂 document.body 后 fixed 恒
718
+ // 等于视口、z-index 直接对齐文档层。老宿主无 createPortal 退回原地渲染。
719
+ function MaskPortal(props) {
720
+ var node = h("div", props);
721
+ if (ReactDOMClient && typeof ReactDOMClient.createPortal === "function" && typeof document !== "undefined" && document.body) {
722
+ return ReactDOMClient.createPortal(node, document.body);
723
+ }
724
+ return node;
725
+ }
726
+
715
727
  function ChaptersTab(props) {
716
728
  var snap = props.snap;
717
729
  var reload = props.reload;
@@ -814,7 +826,7 @@ window.__ModuleLoader__.load({
814
826
  h("td", null, h("div", { className: "myt-summaryCell myt-muted" }, orDash(ch.summary))));
815
827
  }))))
816
828
  : (chapters.length ? h(Empty, { text: "该状态下没有章节" }) : h(Empty, { text: "chapters/ 目录还没有章节文件" })),
817
- openFile ? h("div", {
829
+ openFile ? h(MaskPortal, {
818
830
  className: "myt-drawerMask",
819
831
  onMouseDown: function (e) { if (e.target === e.currentTarget) setOpenFile(null); },
820
832
  },
@@ -878,7 +890,7 @@ window.__ModuleLoader__.load({
878
890
  c.personality ? h("div", { className: "myt-charLine" }, h("span", { className: "myt-charLabel" }, "性格 "), truncate(c.personality, 60)) : null,
879
891
  c.motivation ? h("div", { className: "myt-charLine" }, h("span", { className: "myt-charLabel" }, "动机 "), truncate(c.motivation, 60)) : null);
880
892
  })) : h(Empty, { text: "characters/ 目录还没有角色卡" }),
881
- modal ? h("div", {
893
+ modal ? h(MaskPortal, {
882
894
  className: "myt-modalMask",
883
895
  onMouseDown: function (e) { if (e.target === e.currentTarget) setModalFile(null); },
884
896
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-maoying",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "description": "毛颖 — DSH 网文创作辅助插件:主编 + 五帮手编排(大纲/写手/审校/设定/考据),novel/ 结构化文件为数据库",
5
5
  "type": "module",
6
6
  "license": "MIT",