dsh-task-ledger 0.2.1 → 0.2.3
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/README.en.md +107 -0
- package/README.md +58 -49
- package/dist/client.js +1128 -182
- package/dist/client.js.map +1 -1
- package/package.json +2 -2
- package/skill/README.en.md +131 -0
- package/skill/README.md +87 -113
- package/skill/SKILL.md +2 -2
- package/skill/package.json +1 -1
- package/skill/scripts/bin/ledger-darwin-amd64 +0 -0
- package/skill/scripts/progress +9 -2
- package/README.zh-CN.md +0 -98
package/dist/client.js
CHANGED
|
@@ -46,10 +46,10 @@ window.__ModuleLoader__.load({
|
|
|
46
46
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
47
47
|
let react_dom = require("react-dom");
|
|
48
48
|
react_dom = __toESM(react_dom, 1);
|
|
49
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
49
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/design/tokens-css.generated.js
|
|
50
50
|
const TOKENS_CSS_TEMPLATE = "\n/* ── 文字(宿主 label 四档 + 反色面用字)────────────────────────────── */\nbody{\n --dshpc-fg:var(--dsw-alias-label-primary,#1f2328);\n --dshpc-fg-2:var(--dsw-alias-label-secondary,#5c6370);\n --dshpc-fg-3:var(--dsw-alias-label-tertiary,#767d87);\n --dshpc-fg-4:var(--dsw-alias-label-caption,#9aa1ab);\n --dshpc-fg-dim:var(--dsw-alias-label-dimmed,#b9bfc7);\n /* 反色面上的字(实心钮 / 角标):暗色下是 bluish-1000,故用 -foreground 而非 -inverted */\n --dshpc-fg-inverse:var(--dsw-alias-label-primary-foreground,#fff);\n\n /* ── 面(宿主 bg-layer 三档 + 下沉轨道底)──────────────────────────── */\n --dshpc-surface-1:var(--dsw-alias-bg-layer-1,#fff);\n --dshpc-surface-2:var(--dsw-alias-bg-layer-2,#fff);\n --dshpc-surface-3:var(--dsw-alias-bg-layer-3,#fff);\n /* 「选中亮片」的底盘色(配 --dshpc-shadow-raised 用) */\n --dshpc-surface-raised:var(--dsw-alias-bg-layer-1,#fff);\n /* 轨道 / 下沉底(官方分段控件轨道用的就是这条) */\n --dshpc-surface-sunken:var(--dsw-alias-interactive-bg-hover,rgba(38,49,72,.06));\n /* 整页 / 编辑器底(bg-base) */\n --dshpc-surface-base:var(--dsw-alias-bg-base,#fff);\n /* 自绘浮层 / 菜单卡的不透明底(= base;不要用半透明的 specific-menu) */\n --dshpc-surface-menu:var(--dshpc-surface-base);\n /* markdown 代码块面 / 字体(会话镜像里用到) */\n --dshpc-code-surface:var(--dsw-alias-markdown-code-block,rgba(128,128,128,.10));\n --dshpc-code-font:var(--dsw-font-markdown-code-block-small,12px/18px var(--ds-font-family-code,monospace));\n /* 警告文字色(宿主 state-warn-label) */\n --dshpc-warning-label:var(--dsw-alias-state-warn-label,#f5a623);\n /* 固定中性实面(自绘浮层、深色主题下必须自己变的那几个)——只有它需要暗色覆盖 */\n --dshpc-solid:var(--dsw-static-neutral-00,#fff);\n --dshpc-on-solid:var(--dsw-alias-label-primary,#1f2328);\n /* 交付文件卡那种「浅底盘 + hover 加深」两拍 */\n --dshpc-plate:var(--dsw-static-neutral-50,#fafafa);\n --dshpc-plate-hover:var(--dsw-static-neutral-100,#f5f5f5);\n /* ⚠️ 这些**固定中性面一律用 rgba 字面量**(2026-10-19 真机教训):不要写成\n 「rgba 回退行 + 嵌 --dsw-static-* 的 color-mix 行」两条同名声明——自定义属性**后者恒胜**,\n 哪怕它的值在宿主里算不出来(static 变量 invalid)⇒ 整条 token 作废、rgba 兜底一起被废,\n 0.2.6 里 Segmented 轨道全透明就是这么来的。要跟宿主主题联动的面用 alias token(那些实测有效)。 */\n --dshpc-icon-plate:rgba(255,255,255,.5);\n /* 表头底:浅色主题**偏深**,且必须**比斑马纹(--dshpc-plate)再深一档**——\n 两者不能撞色(用户 2026-10-02:表头跟斑马纹一模一样)。 */\n --dshpc-head-bg:var(--dsw-static-neutral-100,#f5f5f5);\n /* 表格底 / 行 hover(2026-10-30 用户二次定案:表头与通栏**互换**底色):\n 表头默认底 = 通栏原来那层灰(--dshpc-surface-sunken,跟着宿主交互面走);\n 通栏默认底 = 表头原来那色(亮 #f6f8fa / 暗 #151b23,参考图实测,与深色段同源);\n 行 hover 是「一层极淡的黑」≈1.5%(用户:再浅一半,要特别淡)。 */\n --dshpc-table-head-bg:var(--dshpc-surface-sunken);\n --dshpc-table-banner-bg:#f6f8fa;\n --dshpc-table-row-hover:rgba(15,15,15,.015);\n /* 图标小底板(产出物):浅色下要**看得见**(原先取 plate ⇒ 在白底上等于没有);hover 加倍。 */\n --dshpc-chip-bg:rgba(15,15,15,.07);\n --dshpc-chip-bg-hover:rgba(15,15,15,.14);\n /* 展开行:**带透明度的蓝**——不是灰、也不是纯色,透出卡片底色,一眼看出「这是展开的」\n (用户 2026-10-02:灰色跟斑马纹分不出来)。内容区再淡一档,形成「行深 / 内容浅」的区隔。 */\n --dshpc-open-bg:rgba(37,99,235,.10);\n --dshpc-open-bg-soft:rgba(37,99,235,.05);\n --dshpc-card-hover:rgba(37,99,235,.07);\n\n /* ── 描边四档(宿主真值:l1 4% / l2 10% / l3 12% / l4 16%)────────── */\n --dshpc-border-faint:var(--dsw-alias-border-l1,#0000000a);\n --dshpc-border:var(--dsw-alias-border-l2,#0000001a);\n --dshpc-border-strong:var(--dsw-alias-border-l3,#0000001f);\n --dshpc-border-heavy:var(--dsw-alias-border-l4,#00000029);\n\n /* ── 品牌 / 语义色 ────────────────────────────────────────────────── */\n /* 品牌「面」色:明色近黑、暗色近白(官方 Switch 选中态即此),**不是蓝色** */\n --dshpc-accent:var(--dsw-alias-brand-primary,#0f1115);\n /* 蓝色:强调 / 选中 / 焦点,一律走这条 */\n --dshpc-business:var(--dsw-alias-state-business-primary,#3b5bdb);\n --dshpc-success:var(--dsw-alias-state-success-primary,#22c55e);\n /* ⚠️ 是 state-warn(不是 state-warning,后者宿主无此定义) */\n --dshpc-warning:var(--dsw-alias-state-warn-primary,#f59e0b);\n --dshpc-danger:var(--dsw-alias-state-error-primary,#ec1313);\n --dshpc-link:var(--dsw-alias-link,#3b5bdb);\n /* 语义色**实面**上的字(角标 / 实心提示):宿主红绿黄三色都是中调 ⇒ 白字两个主题都可读,\n 故这是一条与主题无关的常量;不要拿 --dshpc-fg-inverse 顶——它在暗色下是近黑,压在红底上看不清。 */\n --dshpc-on-signal:#fff;\n /* 黄底上的字:黄色是中高明度,白字看不清 ⇒ 固定深色(与主题无关)。 */\n --dshpc-on-warning:#1f2328;\n /* 告警严重度的圆点底色(2026-11-03 从 feedback.css 收到这里)。\n 与主题无关的一组常量:这几个色要在任意底色上都认得出来,所以**不跟宿主 state 色走**\n (宿主 state-warn-primary 偏亮,压白 ✕ 看不清)。语义色改动请只改这里。 */\n --dshpc-sev-info:#2563eb;\n --dshpc-sev-success:#16a34a;\n --dshpc-sev-warning:#d97706;\n --dshpc-sev-error:#dc2626;\n\n /* ── 实心按钮的 hover / active 派生态(2026-10-19 用户点名)─────────────────\n 原实现是 :hover 直接压 opacity .9:黑底压 10% 几乎看不出来,用户原话「完全感觉不到颜色变了」。\n ⇒ 改成对底色做**明确的混色**(压 22% / 34%),不用 opacity:\n · 亮色主题:黑底(--dshpc-accent)掺白提亮;红 / 绿 / 黄 / 蓝底掺黑压深;\n · 暗色主题:反过来(暗底掺白、亮底掺黑)。\n 混色对象是**固定中性色字面量**(#fff / #000),不依赖宿主 static-neutral 是否存在;\n 旧内核不认 color-mix 时整条声明作废 ⇒ 回落各档原色(可接受:仍可点,只是没有 hover 反馈)。 */\n --dshpc-accent-hover:color-mix(in srgb,var(--dshpc-accent) 78%,#ffffff);\n --dshpc-accent-active:color-mix(in srgb,var(--dshpc-accent) 64%,#ffffff);\n --dshpc-danger-hover:color-mix(in srgb,var(--dshpc-danger) 78%,#000000);\n --dshpc-danger-active:color-mix(in srgb,var(--dshpc-danger) 64%,#000000);\n --dshpc-success-hover:color-mix(in srgb,var(--dshpc-success) 78%,#000000);\n --dshpc-success-active:color-mix(in srgb,var(--dshpc-success) 64%,#000000);\n --dshpc-warning-hover:color-mix(in srgb,var(--dshpc-warning) 78%,#000000);\n --dshpc-warning-active:color-mix(in srgb,var(--dshpc-warning) 64%,#000000);\n --dshpc-business-hover:color-mix(in srgb,var(--dshpc-business) 78%,#000000);\n --dshpc-business-active:color-mix(in srgb,var(--dshpc-business) 64%,#000000);\n /* 语义色**浅底**:状态色系的「一块底色」——执行记录页每条流水账的块底就是它\n (用户 2026-10-04:正常态给同色系很浅的透明底、失败用红底透出来)。\n 用 「color-mix」 现算而不写死 rgba:状态色本身跟随宿主 alias,主题一换自动成立。\n ⚠️ **深色下要更淡**:用户 2026-10-04「深色风格的绿色和红色好像都有点深」⇒ dark 段\n 把这四条压到 5%(更贴近面板底、存在感更弱);浅色段维持 8%。两端各自给值,不共用一条曲线。\n 命名收在 tokens.ts 单点(本仓硬规矩:业务文件不许自造 --dshpc-*)。 */\n --dshpc-success-soft:color-mix(in srgb,var(--dshpc-success) 8%,transparent);\n --dshpc-warning-soft:color-mix(in srgb,var(--dshpc-warning) 8%,transparent);\n --dshpc-danger-soft:color-mix(in srgb,var(--dshpc-danger) 8%,transparent);\n --dshpc-business-soft:color-mix(in srgb,var(--dshpc-business) 8%,transparent);\n\n /* ── 扩展语义色(2026-10-29 用户拍板:分类 / 图表常用色八支)──────────────\n 宿主无对应 alias ⇒ 写死 hex(不跟随宿主换肤);实心面字色统一走 --dshpc-on-signal(白),\n 因八支明度都低于黄 / 青柠,白字两主题均 ≥4.5:1 可读。每条自带 hover/active/soft 派生;\n 暗色段只覆盖派生(base 写死、两主题同值)。 */\n --dshpc-purple:#9333ea;\n --dshpc-purple-hover:color-mix(in srgb,var(--dshpc-purple) 78%,#000000);\n --dshpc-purple-active:color-mix(in srgb,var(--dshpc-purple) 64%,#000000);\n --dshpc-purple-soft:color-mix(in srgb,var(--dshpc-purple) 8%,transparent);\n --dshpc-pink:#db2777;\n --dshpc-pink-hover:color-mix(in srgb,var(--dshpc-pink) 78%,#000000);\n --dshpc-pink-active:color-mix(in srgb,var(--dshpc-pink) 64%,#000000);\n --dshpc-pink-soft:color-mix(in srgb,var(--dshpc-pink) 8%,transparent);\n --dshpc-cyan:#0e7490;\n --dshpc-cyan-hover:color-mix(in srgb,var(--dshpc-cyan) 78%,#000000);\n --dshpc-cyan-active:color-mix(in srgb,var(--dshpc-cyan) 64%,#000000);\n --dshpc-cyan-soft:color-mix(in srgb,var(--dshpc-cyan) 8%,transparent);\n --dshpc-teal:#0f766e;\n --dshpc-teal-hover:color-mix(in srgb,var(--dshpc-teal) 78%,#000000);\n --dshpc-teal-active:color-mix(in srgb,var(--dshpc-teal) 64%,#000000);\n --dshpc-teal-soft:color-mix(in srgb,var(--dshpc-teal) 8%,transparent);\n --dshpc-orange:#c2410c;\n --dshpc-orange-hover:color-mix(in srgb,var(--dshpc-orange) 78%,#000000);\n --dshpc-orange-active:color-mix(in srgb,var(--dshpc-orange) 64%,#000000);\n --dshpc-orange-soft:color-mix(in srgb,var(--dshpc-orange) 8%,transparent);\n --dshpc-indigo:#4f46e5;\n --dshpc-indigo-hover:color-mix(in srgb,var(--dshpc-indigo) 78%,#000000);\n --dshpc-indigo-active:color-mix(in srgb,var(--dshpc-indigo) 64%,#000000);\n --dshpc-indigo-soft:color-mix(in srgb,var(--dshpc-indigo) 8%,transparent);\n --dshpc-rose:#e11d48;\n --dshpc-rose-hover:color-mix(in srgb,var(--dshpc-rose) 78%,#000000);\n --dshpc-rose-active:color-mix(in srgb,var(--dshpc-rose) 64%,#000000);\n --dshpc-rose-soft:color-mix(in srgb,var(--dshpc-rose) 8%,transparent);\n --dshpc-slate:#475569;\n --dshpc-slate-hover:color-mix(in srgb,var(--dshpc-slate) 78%,#000000);\n --dshpc-slate-active:color-mix(in srgb,var(--dshpc-slate) 64%,#000000);\n --dshpc-slate-soft:color-mix(in srgb,var(--dshpc-slate) 8%,transparent);\n\n /* ⚠️ 2026-10-18 用户拍板:宿主 alias 的 hover(暗色白 8% / 亮色 6%)**太弱**,\n 「移上去要仔细看才看得出来」⇒ 不再委托宿主 hover 别名,改为自掺中性色并加重:\n 亮色掺黑 10%、暗色掺白 14%(active 再加一档)。按钮 / 分段轨道 / 各类 hover 底同时受益。\n ⚠️ 必须保留 rgba 兜底行在前(本文件惯例,见 icon-plate 注释):掺的是**固定中性色**\n (neutral-900=#0f0f0f / neutral-00=#fff),预计算无损;旧内核不认 color-mix 时走兜底,\n 否则整条 background:var(--seg-track) 作废 ⇒ 分段轨道透明(真踩过:预览站轨道消失)。 */\n --dshpc-hover:rgba(15,15,15,.10);\n --dshpc-active:rgba(15,15,15,.18);\n /* 分段控件轨道底:专用 token(rgba 字面量、不借 --dshpc-hover 中转)——\n 2026-10-19 教训:变量链中间任何一环 invalid ⇒ background 整条作废、轨道全透明。\n 亮色:黑 7%(比 hover 的 10% 淡一档,选中白片才跳得出)。 */\n --dshpc-seg-track:rgba(15,15,15,.07);\n --dshpc-mask:var(--dsw-alias-bg-mask-1,#0000003d);\n /* 弹窗锁定态给**自绘控件**的降透明度档(2026-11-05)。放在 token 里是为了让消费方\n 在自己元素上写 --dshpc-lock-dim: 1 就能退出这条效果,不用 !important 打架。 */\n --dshpc-lock-dim:.5;\n /* 「选中面」(2026-10-06,任务日程页首创)= 当前底色**朝更深掺 12% 文字色**:\n 浅色主题下文字色是黑 ⇒ 选中面比常态底色**深一档**。深色分支见 body[data-ds-dark-theme](朝背景色掺)。\n 语义:标记「正在看的东西」,比常态明显、又不许盖住内容(不许用半透明叠状态色)。 */\n --dshpc-selected-bg:color-mix(in srgb,var(--dshpc-surface-1) 88%,var(--dshpc-fg));\n /* ListRow 选中面(2026-11-07 用户定):slate 的**极浅蓝灰**,不用上面那条通用「选中面」。\n 通用值亮色是掺文字色的中性灰、暗色是两个深色面互掺 ⇒ 深色下选中行发黑(用户实测)。\n 这里从 --dshpc-slate 派生半透明浅色:亮色 14% 叠白 ≈ #e5e7ea,比常态 tone-sunken\n 深一档才看得出「选中」;暗色浓度见 body[data-ds-dark-theme] 段。 */\n --dshpc-listrow-selected-bg:color-mix(in srgb,var(--dshpc-slate) 14%,transparent);\n /* ListRow hover(2026-11-07 用户:原来取 --dshpc-active 太夸张,「有一点变化就行」):\n 常态 tone-sunken 是 6% 蓝灰叠白 ≈ #f0f1f3,这里只加深到 9% 中性黑 ≈ #e8e8e8,\n 能看出移上去了,又不会把整行内容和文字对比度一起改掉。暗色档见 body[data-ds-dark-theme]。 */\n --dshpc-listrow-hover-bg:rgba(15,15,15,.09);\n /* 任务日程页本月格默认底(2026-10-06 → 续2):浅色下给**淡蓝**(business 8% 透白底)——\n 参照用户参考稿里未选中日程块 / Tuesday 列的那种蓝、再浅一点点;\n 相邻月补位格仍走 --dshpc-surface-2(更灰),不受影响。\n 深色段维持 #23262e(用户:深色 UI 已差不多,不动)。 */\n --dshpc-cal-cell-bg:color-mix(in srgb,var(--dshpc-business) 8%,var(--dshpc-surface-1));\n /* 任务日程页「点开某天」展开的面板底(2026-10-06 续):浅色下**无限接近白、只带一丁点灰**\n (neutral-50 = #fafafa)——面板里装半透明执行记录列表,底再深整片就发糊发灰;\n 深色段沿用原 selected-bg 暗值,保持不动。 */\n --dshpc-cal-panel-bg:var(--dsw-static-neutral-50,#fafafa);\n /* 任务日程页本月格 hover 底(浅色段,2026-10-06 续3):不再走灰色通用交互底——\n 鼠标移上去应是「更亮一点点的蓝」(与深色段同语义:hover = 提亮的蓝,不是灰下去)。\n 浓度**介于**表头蓝(14%)与未选中格蓝(8%)之间、略偏表头一侧:business 12% 透白底\n (比表头浅一点、比未选中格深一点)。 */\n --dshpc-cal-cell-hover:color-mix(in srgb,var(--dshpc-business) 12%,var(--dshpc-surface-1));\n\n /* ── 投影 / 焦点 ──────────────────────────────────────────────────── */\n --dshpc-shadow-1:var(--dsw-elevation-soft,0 4px 16px 0 #00000008);\n /* 亮片自带的浮起感(选中态用;与 --dshpc-surface-raised 配对) */\n --dshpc-shadow-raised:var(--dsw-elevation-soft,0 4px 16px 0 #00000008);\n --dshpc-shadow-2:var(--dsw-shadow-lv3,0 12px 32px 0 #00000014);\n /* 键盘焦点环。⚠️ 不用宿主 --dsw-focus-ring-color:它默认值是 transparent(兜底不生效、会隐身) */\n --dshpc-focus:var(--dsw-alias-state-business-primary,#3b5bdb);\n\n /* ── 圆角(宿主真值 4 / 8 / 12 / 16 / 20 / 28)─────────────────────── */\n --dshpc-radius-xs:var(--dsw-radius-xs,4px);\n --dshpc-radius-sm:var(--dsw-radius-sm,8px);\n --dshpc-radius-md:var(--dsw-radius-md,12px);\n --dshpc-radius-lg:var(--dsw-radius-lg,16px);\n --dshpc-radius-xl:var(--dsw-radius-xl,20px);\n --dshpc-radius-panel:var(--dsw-radius-panel,28px);\n /* 全圆(胶囊标签):宿主的 radius 档最大只有 28px,撑不满 24px 高的 chip */\n --dshpc-radius-pill:999px;\n\n /* ── 间距四拍(只许用这四档,不许出现 5 / 7 / 9px)────────────────── */\n --dshpc-space-1:4px;\n --dshpc-space-2:8px;\n --dshpc-space-3:12px;\n --dshpc-space-4:16px;\n\n /* ── 控件高度:离散三档(控件用 size=\"sm|md|lg\" 选;调用点不许自定义高度,\n 真不够用才允许在调用点本地覆盖 --dshpc-control-h-*,属例外而非常态)── */\n --dshpc-control-h-sm:24px;\n --dshpc-control-h-md:28px;\n --dshpc-control-h-lg:32px;\n\n /* ── 字号 / 行高:直绑宿主字号族(宿主真值 11 / 12 / 13 / 14 / 16)───── */\n --dshpc-font-xs:var(--dsw-font-xxxs-11-font-size,11px);\n --dshpc-font-sm:var(--dsw-font-xxs-12-font-size,12px);\n --dshpc-font-md:var(--dsw-font-xs-13-font-size,13px);\n --dshpc-font-lg:var(--dsw-font-s-14-font-size,14px);\n --dshpc-font-xl:var(--dsw-font-base-16-font-size,16px);\n --dshpc-line-xs:var(--dsw-font-xxxs-11-line-height,14px);\n --dshpc-line-sm:var(--dsw-font-xxs-12-line-height,18px);\n --dshpc-line-md:var(--dsw-font-xs-13-line-height,20px);\n --dshpc-line-lg:var(--dsw-font-s-14-line-height,22px);\n --dshpc-line-xl:var(--dsw-font-base-16-line-height,24px);\n --dshpc-font-mono:var(--ds-font-family-code,monospace);\n\n /* ── 细滚动条的让位值(线宽不能放 token,见文件末尾的注释)──────────\n 1px→2px 只改这一行;它用在普通元素上,var() 能正常解析。 */\n --dshpc-scroll-inset:1px;\n\n /* ── 层级阶梯(业务文件不许再写裸 z-index)───────────────────────── */\n /* 页面级预览分栏 → 抽屉(新建/编辑)→ 弹窗/确认框 → 浮层菜单 → 浮层提示 */\n /* **整条阶梯都必须低于官方浮点 1000 档**(2026-11-06 用户拍板):官方原语\n Modal / ImageLightbox 是 z-index 1000(body portal),Menu / Toast 是 1100。\n 我们只是宿主里的一个页面 ⇒ 宿主浮点恒在我们之上;以后弹窗里再开官方模态/预览,\n 不必逐个场景「临时让位」(此前 1070 压住官方原图预览就是这么踩出来的)。 */\n /* 内容层吸顶(天标签 / 表头这类「跟着滚但压住同层内容」的元素):只压同层兄弟,\n 必须低于下面所有浮层档 —— 所以它不是「开新浮层档」,而是内容层内部的排序位。 */\n --dshpc-z-sticky:10;\n --dshpc-z-dock:900;\n --dshpc-z-drawer:920;\n --dshpc-z-modal:940;\n /* 收起后的耳朵:必须高于弹窗遮罩,否则弹窗一开就点不到它(2026-11-04 用户真机)。\n 只给耳朵用,页面级分栏本体仍是布局成员,不跟着抬高。 */\n --dshpc-z-ear:950;\n --dshpc-z-menu:960;\n --dshpc-z-tip:970;\n /* 语义别名(2026-11-03 面板皮肤统一):业务文件只许用这两个说「我要一层浮层」,\n 不再各自写浮层字面量。\n panel = 浮层面板本体(picker 弹窗、锚定面板);\n popmenu = 叠在面板之上的菜单(▾ 选层、Picker 下拉)与其透明遮罩。 */\n --dshpc-z-panel:var(--dshpc-z-menu);\n --dshpc-z-popmenu:var(--dshpc-z-tip);\n\n /* ── 动效 ─────────────────────────────────────────────────────────── */\n --dshpc-dur:var(--ds-transition-duration,.2s);\n --dshpc-dur-fast:var(--ds-transition-duration-fast,.12s);\n --dshpc-ease:var(--ds-ease-in-out,cubic-bezier(.4,0,.2,1));\n /* 运行中状态的脉动时长(2026-10-06 统一前后两端:任务配置里的绿呼吸 → 蓝、放慢;\n 执行记录里的蓝闪 → 放慢一点。两者用同一个值,动画形状本就一致)。 */\n --dshpc-dur-run:500ms;\n}\n\n/* ── 明暗差异的**唯一**落点 ──────────────────────────────────────────────\n 判据 = body[data-ds-dark-theme](宿主 0.2.0-rc.2 源码核实:启动脚本 toggleAttribute 写入,\n 唯一明暗判据;插件禁止用 prefers-color-scheme —— 它跟的是系统、不是用户在宿主里的选择)。\n 下面只放 alias 表达不了的「固定中性面」;颜色若能靠 alias 自动跟随,一律不要写在这里。 */\nbody[data-ds-dark-theme]{\n /* 深色段的蓝**刻意不跟随宿主 alias**(唯一例外):宿主暗色 alias 给的是 #60a5fa 一档的高亮蓝,\n 实心面(Chip / Button info / 日期选中格)压白字会发糊 —— 用户 2026-10-29 实测反馈。\n ⇒ 深色下改定向浅色状态的蓝(#3b5bdb)靠,只在明度上抬一点点,保证它在暗底上仍看得见:\n #4c6bd8 对白字 ≈4.8:1(原亮蓝只有 ~2.3:1),对日历格底 ≈3.2:1 仍过 UI 件的 3:1 线。\n 代价:宿主换品牌色时深色不再自动跟着变,需要这里手动同步。 */\n --dshpc-business:#4c6bd8;\n --dshpc-solid:var(--dsw-static-neutral-900,#0f0f0f);\n --dshpc-on-solid:var(--dsw-static-neutral-00,#fff);\n /* 实心按钮 hover / active(暗色版):黑底(浅色主题的近黑 → 暗色下的近白)掺黑压深;\n 红 / 绿 / 黄 / 蓝掺白提亮。与亮色段方向相反,保证两种主题下「一眼看出变了」。 */\n --dshpc-accent-hover:color-mix(in srgb,var(--dshpc-accent) 80%,#000000);\n --dshpc-accent-active:color-mix(in srgb,var(--dshpc-accent) 66%,#000000);\n --dshpc-danger-hover:color-mix(in srgb,var(--dshpc-danger) 78%,#ffffff);\n --dshpc-danger-active:color-mix(in srgb,var(--dshpc-danger) 64%,#ffffff);\n --dshpc-success-hover:color-mix(in srgb,var(--dshpc-success) 78%,#ffffff);\n --dshpc-success-active:color-mix(in srgb,var(--dshpc-success) 64%,#ffffff);\n --dshpc-warning-hover:color-mix(in srgb,var(--dshpc-warning) 78%,#ffffff);\n --dshpc-warning-active:color-mix(in srgb,var(--dshpc-warning) 64%,#ffffff);\n /* 同上:掺白比例从 22% / 36% 收到 12% / 22% —— 底色已变深,照旧比例提亮会在 hover 瞬间\n 把白字对比打回 ~3:1(正是用户嫌糊的那一档);收窄后 hover 仍可感知、字仍清晰。 */\n --dshpc-business-hover:color-mix(in srgb,var(--dshpc-business) 88%,#ffffff);\n --dshpc-business-active:color-mix(in srgb,var(--dshpc-business) 78%,#ffffff);\n /* 暗色 hover 掺白 14% / active 24%(对齐上面 2026-10-18 的加重拍板)。rgba 兜底行同上。 */\n --dshpc-hover:rgba(255,255,255,.14);\n --dshpc-active:rgba(255,255,255,.24);\n /* 分段轨道(暗色版):白 10%——比 hover 淡一档,选中亮片才跳得出。 */\n --dshpc-seg-track:rgba(255,255,255,.10);\n --dshpc-plate:var(--dsw-static-neutral-850,#212123);\n --dshpc-plate-hover:var(--dsw-static-neutral-800,#292929);\n --dshpc-icon-plate:rgba(255,255,255,.05);\n /* 暗色主题**反过来**:表头要比卡片面**亮**、比斑马纹再**浅一档**(用户:纯黑背景没法看)。 */\n --dshpc-head-bg:var(--dshpc-surface-2);\n /* 表格(2026-10-30 用户二次定案:与通栏互换底色):通栏底取表头原来那色 #151b23\n (亮色段对应 #f6f8fa);表头默认底沿用亮色段定义的 --dshpc-surface-sunken,不在暗色段重写;\n 行 hover 是「一层极淡的白」≈3% —— 暗底上用黑会越悬越暗,看不出「浅灰」反馈。 */\n --dshpc-table-banner-bg:#151b23;\n --dshpc-table-row-hover:rgba(255,255,255,.03);\n /* 暗色底板**微亮**;hover **更亮**(原先 hover 取 plate-hover 反而更淡 ⇒ 鼠标移上去就没了)。 */\n --dshpc-chip-bg:rgba(255,255,255,.08);\n --dshpc-chip-bg-hover:rgba(255,255,255,.16);\n /* 暗色下蓝色要更亮、透明度略高才压得住深底。 */\n --dshpc-open-bg:rgba(96,165,250,.18);\n --dshpc-open-bg-soft:rgba(96,165,250,.08);\n --dshpc-card-hover:rgba(96,165,250,.13);\n /* 语义色**浅底**(深色版):用户嫌深色的绿 / 红「有点深」⇒ 压到 **5%**(浅色段是 8%),\n 更贴近面板底色、存在感更弱;块底与状态色竖条仍同源(竖条是实色,不受这条影响)。 */\n --dshpc-success-soft:color-mix(in srgb,var(--dshpc-success) 5%,transparent);\n --dshpc-warning-soft:color-mix(in srgb,var(--dshpc-warning) 5%,transparent);\n --dshpc-danger-soft:color-mix(in srgb,var(--dshpc-danger) 5%,transparent);\n --dshpc-business-soft:color-mix(in srgb,var(--dshpc-business) 5%,transparent);\n /* 扩展色深色派生:底色写死、hover 掺白 12%/22%(同 business,防白字发糊),soft 5%。 */\n --dshpc-purple-hover:color-mix(in srgb,var(--dshpc-purple) 88%,#ffffff);\n --dshpc-purple-active:color-mix(in srgb,var(--dshpc-purple) 78%,#ffffff);\n --dshpc-purple-soft:color-mix(in srgb,var(--dshpc-purple) 5%,transparent);\n --dshpc-pink-hover:color-mix(in srgb,var(--dshpc-pink) 88%,#ffffff);\n --dshpc-pink-active:color-mix(in srgb,var(--dshpc-pink) 78%,#ffffff);\n --dshpc-pink-soft:color-mix(in srgb,var(--dshpc-pink) 5%,transparent);\n --dshpc-cyan-hover:color-mix(in srgb,var(--dshpc-cyan) 88%,#ffffff);\n --dshpc-cyan-active:color-mix(in srgb,var(--dshpc-cyan) 78%,#ffffff);\n --dshpc-cyan-soft:color-mix(in srgb,var(--dshpc-cyan) 5%,transparent);\n --dshpc-teal-hover:color-mix(in srgb,var(--dshpc-teal) 88%,#ffffff);\n --dshpc-teal-active:color-mix(in srgb,var(--dshpc-teal) 78%,#ffffff);\n --dshpc-teal-soft:color-mix(in srgb,var(--dshpc-teal) 5%,transparent);\n --dshpc-orange-hover:color-mix(in srgb,var(--dshpc-orange) 88%,#ffffff);\n --dshpc-orange-active:color-mix(in srgb,var(--dshpc-orange) 78%,#ffffff);\n --dshpc-orange-soft:color-mix(in srgb,var(--dshpc-orange) 5%,transparent);\n --dshpc-indigo-hover:color-mix(in srgb,var(--dshpc-indigo) 88%,#ffffff);\n --dshpc-indigo-active:color-mix(in srgb,var(--dshpc-indigo) 78%,#ffffff);\n --dshpc-indigo-soft:color-mix(in srgb,var(--dshpc-indigo) 5%,transparent);\n --dshpc-rose-hover:color-mix(in srgb,var(--dshpc-rose) 88%,#ffffff);\n --dshpc-rose-active:color-mix(in srgb,var(--dshpc-rose) 78%,#ffffff);\n --dshpc-rose-soft:color-mix(in srgb,var(--dshpc-rose) 5%,transparent);\n --dshpc-slate-hover:color-mix(in srgb,var(--dshpc-slate) 88%,#ffffff);\n --dshpc-slate-active:color-mix(in srgb,var(--dshpc-slate) 78%,#ffffff);\n --dshpc-slate-soft:color-mix(in srgb,var(--dshpc-slate) 5%,transparent);\n /* 「选中面」(深色版,2026-10-06):掺 **~40% 背景色**(--dshpc-surface-base)⇒ 无限接近页面背景的黑、\n 只比背景略深一点点(用户:深色下展开区压着任务透明绿会发灰,底色要尽量贴近背景才不显灰)。\n ⚠️ 深色下不能掺文字色 —— 那是白,会变亮,选中反而比本月日期浅。 */\n --dshpc-selected-bg:color-mix(in srgb,var(--dshpc-surface-1) 60%,var(--dshpc-surface-base));\n /* ListRow 选中面(暗色版):slate 掺到 26% —— 深底上泛蓝灰,绝不退回接近背景的黑。\n slate 是中明度蓝灰,暗底上要比亮色掺得更浓才看得出(亮色 14% / 暗色 26%)。 */\n --dshpc-listrow-selected-bg:color-mix(in srgb,var(--dshpc-slate) 26%,transparent);\n /* 暗色 hover:常态 6% 白 → 10% 白,只提亮一点点(原来是 active 的 24% 白,太跳)。 */\n --dshpc-listrow-hover-bg:rgba(255,255,255,.10);\n /* 任务日程页本月格的默认底(深色版,2026-10-06):深的、带点灰蓝的暗色(用户给的参考图 ≈ #23262e),\n 比原来的卡片面更沉、更偏蓝灰;选中格仍走 --dshpc-selected-bg(更暗一档),层级不变。 */\n --dshpc-cal-cell-bg:#23262e;\n /* 任务日程页本月格 hover 底(深色段,2026-10-06):原先走 --dshpc-hover(宿主浅色叠加)在深底上显得\n 「灰发亮」,不好看 ⇒ 换成更贴底的蓝调微亮(与 open-bg-soft 同族),hover 时不刺眼、又有反馈。 */\n --dshpc-cal-cell-hover:rgba(96,165,250,.12);\n /* 任务日程页展开面板底(深色段,2026-10-06 续):与原 selected-bg 暗值一致,深色 UI 不动 */\n --dshpc-cal-panel-bg:color-mix(in srgb,var(--dshpc-surface-1) 60%,var(--dshpc-surface-base));\n}\n\n/* ── 细滚动条 + 离边 1px:全库唯一真源 ─────────────────────────────────\n 放在 tokens 域(ensureComponentStyles 每次必注册、且排在所有控件域之前):\n 任何组件只要给滚动容器挂 .dshpc-scroll-thin 就生效,不必另行注入 panel 域。\n 改线宽 / 让位 / 圆角 / 颜色只改这一处;别在别的 CSS 里再抄一份。\n\n 只用 ::-webkit-scrollbar:一旦写 scrollbar-width,Chrome 会切到规范化滚动条、\n 忽略这里的宽度(2026-11-06 实测:留着 scrollbar-width:thin 时宽度回到 ~10px)。\n 2026-11-06 用户口径:1px 太细 ⇒ 线宽起步 2px、thumb 上下端圆角;现行值见下面三行。\n\n 让位(滚动条与容器可见边缘隔 1px)也由这个类负责:原生滚动条画在 padding box 之外、\n border 之内,只有 border 能把它推离边缘(加 padding 无效)。挂类即自动让位,\n 容器不必自己再写透明边框。方向档(CSS 没有 :scrollable,推不出滚动方向,须显式声明):\n .dshpc-scroll-thin 竖滚(默认):右让位\n .dshpc-scroll-thin--x 横滚:底让位,且不叠右\n .dshpc-scroll-thin--both 双向:右 + 底都让位\n --x / --both 必须与基类同挂(线宽规则只认基类)。\n\n 挂 .dshpc-panel 的容器本身已有实色边框 ⇒ :not(.dshpc-panel) 跳过让位:滚动条贴那条\n 实色线即算让位,无条件叠透明边框会把实色右边框覆盖成透明。\n CodeMirror 的 .cm-scroller 由官方生成、挂不上类 ⇒ 后代选择器一并命中线宽与让位;\n 它只让右不让底:给底会改 scroller 高度,CodeMirror 的测量循环会多算一条横滚条。\n 外层若自己不滚(如 CodeViewer),把 --dshpc-scroll-inset-right 设 0px 关掉自身让位,\n 免得外层与 .cm-scroller 两层各 1px 叠成 2px。 */\n/* ⚠️ 下面三行的线宽 / 圆角**必须是字面量**:WebKit 的 ::-webkit-scrollbar 系列伪元素\n 不解析 var(),带变量的声明会被静默丢弃 ⇒ 宽度整条作废、退回默认值。2026-11-06 把\n width:2px 改成 var(--dshpc-scroll-w) 后真机当场打回(用户发现),故线宽不放 token。\n 改线宽只改这一块的三处数字(三处必须同值);让位仍走 --dshpc-scroll-inset。 */\n.dshpc-scroll-thin::-webkit-scrollbar,\n.dshpc-scroll-thin .cm-scroller::-webkit-scrollbar{width:3px;height:3px}\n.dshpc-scroll-thin::-webkit-scrollbar-thumb,\n.dshpc-scroll-thin .cm-scroller::-webkit-scrollbar-thumb{background:var(--dshpc-border-heavy);border-radius:3px}\n.dshpc-scroll-thin::-webkit-scrollbar-track,\n.dshpc-scroll-thin .cm-scroller::-webkit-scrollbar-track{background:transparent}\n.dshpc-scroll-thin:not(.dshpc-panel){border-right:var(--dshpc-scroll-inset-right,var(--dshpc-scroll-inset)) solid transparent}\n.dshpc-scroll-thin--x:not(.dshpc-panel){border-right:0;border-bottom:var(--dshpc-scroll-inset) solid transparent}\n.dshpc-scroll-thin--both:not(.dshpc-panel){border-bottom:var(--dshpc-scroll-inset) solid transparent}\n.dshpc-scroll-thin .cm-scroller{border-right:var(--dshpc-scroll-inset) solid transparent}\n";
|
|
51
51
|
//#endregion
|
|
52
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
52
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/design/style-kit.js
|
|
53
53
|
/** 全生态统一的 CSS 变量前缀。 */
|
|
54
54
|
const CSS_PREFIX = "dshpc";
|
|
55
55
|
/** token 域固定名:变量定义必须先于消费它的规则出现。 */
|
|
@@ -120,7 +120,7 @@ window.__ModuleLoader__.load({
|
|
|
120
120
|
};
|
|
121
121
|
}
|
|
122
122
|
//#endregion
|
|
123
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
123
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/infra/css.js
|
|
124
124
|
/**
|
|
125
125
|
* 当前插件的样式设施。
|
|
126
126
|
*
|
|
@@ -161,10 +161,10 @@ window.__ModuleLoader__.load({
|
|
|
161
161
|
kit.applyStyle(domain, css);
|
|
162
162
|
}
|
|
163
163
|
//#endregion
|
|
164
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
164
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/display/marquee-css.generated.js
|
|
165
165
|
const MARQUEE_CSS = "/* 跑马灯(MarqueeText):双层——外层只裁剪,内层才 transform 滚动;非 hover 内层自带省略号。\n 2026-10-20:本文件原是杂烩「select.css」(下拉 / 日历 / 时分的皮肤都装过),随着那些控件\n 一个个删完,最后只剩跑马灯,故按本包「一个 css 服务一个对象」的格局改名归档。\n 同批清掉的还有零引用的省略号类 .dshpc-ellipsis —— 本包三个用到截断的地方都没采纳它。 */\n.dshpc-mq{display:block;overflow:hidden;white-space:nowrap;}\n.dshpc-mq .dshpc-mq-in{display:inline-block;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis;vertical-align:top;}\n/* ⚠️ 跑法(用户 2026-10-03 拍板):**跑一遍、停在尾字**(播放 1 次 + forwards),不来回弹、不无限跑。\n 滚距 = 精确溢出量 ⇒ 停下时最后一个字正好贴右缘,**不会跑进黑块**(黑块是旧手写版把\n 内层盒子裁了、按「半截文本」平移导致的)。鼠标移开 ⇒ :hover 失效 ⇒ 自动复位回省略号态。 */\n.dshpc-mq-run:hover .dshpc-mq-in{max-width:none;overflow:visible;animation:dshpc-mq-scroll var(--dshpc-mq-dur,6s) linear .4s 1 forwards;}\n@keyframes dshpc-mq-scroll{from{transform:translateX(0)}to{transform:translateX(var(--dshpc-mq-dist,-40px))}}\n/* 溢出渐影(用户 2026-10-24 拍板「左右稍微有点渐影」;官方口径 = dsh-client-ui-primitives@0.2.1-rc.2\n PathLabel.module.css:13-15:mask-image 线性渐隐 + 28px 随官方)。⚠️ 只在 **hover 滚动态** 加:\n 静态态(三个点)不要渐影(用户 2026-10-24 二次拍板),hover 滚动时两端渐影——左缘柔化被裁的文字头。 */\n/* token-ok:遮罩模板色(纯黑 = 完全不透明),不是主题色;换主题也不该变。 */\n.dshpc-mq-run:hover{mask-image:linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 28px), transparent);}\n";
|
|
166
166
|
//#endregion
|
|
167
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
167
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/display/MarqueeText.js
|
|
168
168
|
/**
|
|
169
169
|
* 跑马灯文本 —— **全站唯一实现**(L2,P6 从 editor-fields 迁入 ui)
|
|
170
170
|
*
|
|
@@ -216,43 +216,43 @@ window.__ModuleLoader__.load({
|
|
|
216
216
|
}, props.text));
|
|
217
217
|
}
|
|
218
218
|
//#endregion
|
|
219
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
219
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/inputs/segmented-css.generated.js
|
|
220
220
|
const SEGMENTED_CSS = "\n/* ── 分段控件 P2 ─────────────────────────────────────────────────────\n 结构照兄弟项目 dsh-task-dispatch-table 的 Segmented 皮肤(item 无边框、hover 只提亮文字),\n 前缀 / 变量名换成本仓口径。用户额外要的两处(兄弟没有):weekday 方块间隔(现为 2px);段内中性计数 __count。\n ⚠️ 2026-10-19 两次误判均已澄清:① 「宿主只认单行 CSS」——假,多行一直正常;\n ② 「宿主吃掉 token 块之后第一条规则」——也假,真因是 tokens 模板字符串结尾多了一个反斜杠,\n 注入文本里留下字面反引号,把紧随其后的那条规则的选择器污染掉了(见 dsh-host.md §9)。\n 样式照常多行书写,不必压行;也不需要任何「牺牲规则」。 */\n/* 外观只有一套(2026-10-26):原 variant 的 default / inset 两档在 CSS 里只差 1px 内距,\n 且 default 比文档承诺矮 2px,却让下游以为「有得选」而反复对图 ⇒ 整轴删除。\n padding 3px 是尺寸契约的一部分:item 高度 = 控制高 − 6px,加起来正好 24 / 28 / 32。 */\n/* 选中片配色收在两条局部变量里(--seg-thumb 底 / --seg-on 字):默认走主题亮片,\n tone 档与自定义 {bg, fg} 都只改这两条(后者由组件内联写根节点,内联恒胜)。 */\n.dshpc-seg{display:inline-flex;align-items:center;gap:2px;padding:3px;border-radius:var(--dshpc-radius-md);--seg-thumb:var(--dshpc-surface-raised);--seg-on:var(--dshpc-fg);background:var(--dshpc-seg-track);}\n.dshpc-seg__item{appearance:none;display:inline-flex;align-items:center;gap:4px;box-sizing:border-box;height:calc(var(--dshpc-control-h-sm) - 6px);padding:0 12px;border:0;border-radius:var(--dshpc-radius-sm);background:transparent;color:var(--dshpc-fg-2);font-family:inherit;font-size:var(--dshpc-font-xs);font-weight:500;white-space:nowrap;cursor:pointer;flex:none;transition:color var(--dshpc-dur-fast) var(--dshpc-ease),background-color var(--dshpc-dur-fast) var(--dshpc-ease),box-shadow var(--dshpc-dur-fast) var(--dshpc-ease);}\n.dshpc-seg--md .dshpc-seg__item{height:calc(var(--dshpc-control-h-md) - 6px);}\n.dshpc-seg--lg .dshpc-seg__item{height:calc(var(--dshpc-control-h-lg) - 6px);}\n/* 段内图标(前置):与 Button 同口径 —— inline-flex 吃掉行高基线,svg 按块级。 */\n.dshpc-seg__icon{display:inline-flex;align-items:center;justify-content:center;flex:none;line-height:0;}\n.dshpc-seg__icon svg{display:block;margin:0;}\n/* 只有图标(无文字 / 计数 / 角标):段必须是正方形 ⇒ 宽 = 段高、左右内距归零、内容居中;\n 否则基础规则的 0 12px 会把它拉成长方形。放在三档之后:同名特异性下后写者胜。 */\n.dshpc-seg__item--icon-only{width:calc(var(--dshpc-control-h-sm) - 6px);padding:0;justify-content:center;}\n.dshpc-seg--md .dshpc-seg__item--icon-only{width:calc(var(--dshpc-control-h-md) - 6px);}\n.dshpc-seg--lg .dshpc-seg__item--icon-only{width:calc(var(--dshpc-control-h-lg) - 6px);}\n/* 多选(2026-11-07 用户):每段最小宽 = 该档段高 ⇒ 最窄也是正方形,绝不会出现比高还窄的竖条;\n 文案更长时由内容自然撑宽成横向长方形。三档各跟自己的控制高,不写死 px。\n weekday / icon-only 那种固定 width 若小于段高,同样被 min-width 顶到正方形。 */\n.dshpc-seg--multiple .dshpc-seg__item{min-width:calc(var(--dshpc-control-h-sm) - 6px);}\n.dshpc-seg--multiple.dshpc-seg--md .dshpc-seg__item{min-width:calc(var(--dshpc-control-h-md) - 6px);}\n.dshpc-seg--multiple.dshpc-seg--lg .dshpc-seg__item{min-width:calc(var(--dshpc-control-h-lg) - 6px);}\n.dshpc-seg__item:hover:not([aria-pressed='true']):not(:disabled){color:var(--dshpc-fg);}\n.dshpc-seg__item[aria-pressed='true']{background:var(--seg-thumb);box-shadow:var(--dshpc-shadow-raised);color:var(--seg-on);font-weight:600;}\n.dshpc-seg__item:focus-visible{outline:2px solid var(--dshpc-focus);outline-offset:-2px;}\n.dshpc-seg__item:disabled{cursor:default;opacity:.4;}\n/* 段内角标(如「异常」的数量):语义色实面 + 反白字,0 由组件侧不渲染。必须是正圆(用户 2026-10-03)。 */\n.dshpc-seg__badge{display:inline-flex;align-items:center;justify-content:center;flex:none;width:16px;height:16px;padding:0;overflow:hidden;border-radius:50%;background:var(--dshpc-danger);color:var(--dshpc-on-signal);font-size:10px;line-height:16px;font-weight:500;font-variant-numeric:tabular-nums;}\n/* 段内中性计数(如筛选条「全部 11」):纯文字、无底无边(对齐 task-ledger .dtl-seg__num 拍板口径);0 由组件侧不渲染。 */\n.dshpc-seg__count{display:inline;flex:none;margin-left:3px;padding:0;border:0;border-radius:0;background:none;color:var(--dshpc-fg-3);font-size:10px;line-height:1;font-weight:400;font-variant-numeric:tabular-nums;}\n/* 选中段(彩色实面)里的计数:必须跟着 --seg-on 走再压暗一档(72% 白 ≈ 「比正文稍灰」)。\n 不许用 --dshpc-fg-3:它跟主题走,暗色下是深灰 ⇒ 蓝底上几乎看不见(2026-10-29 用户截图「My todos 4」)。 */\n.dshpc-seg__item[aria-pressed='true'] .dshpc-seg__count{color:color-mix(in srgb,var(--seg-on) 72%,transparent);}\n/* block:撑满父宽(表单行用),各段等分 */\n.dshpc-seg--block{display:flex;width:100%;}\n.dshpc-seg--block .dshpc-seg__item{flex:1 1 auto;justify-content:center;}\n/* weekday:星期多选方块。基础插件的特殊化定制(用户 2026-10-01:原 WeekdayPicker 即「蓝底 + 近似方形」):\n 每格正方形(宽 = 段高)、选中品牌蓝反白字、**无外描边**(2026-10-18 重申)、\n 方块之间间距 gap:2px(2026-10-20 用户定稿:方块改小后 6px 显得太宽。10-18 曾从 2px 放宽到 6px,\n 两次都是用户拍板 —— 别自作主张改回去)。 */\n.dshpc-seg--weekday{--seg-track:var(--dshpc-seg-track);gap:2px;border:0;padding:3px;background:var(--seg-track);}\n.dshpc-seg--weekday .dshpc-seg__item{width:calc(var(--dshpc-control-h-lg) - 8px);padding:0;justify-content:center;}\n/* 蓝底反白:字色必须是常量白(--dshpc-on-signal)。2026-10-29 用户实测:暗色主题下这里曾用\n --dshpc-fg-inverse,而它跟随宿主 label-primary-foreground,暗色下是近黑 ⇒ 蓝底黑字看不清。 */\n.dshpc-seg--weekday{--seg-thumb:var(--dshpc-business);--seg-on:var(--dshpc-on-signal);}\n\n/* ── tone(2026-10-29 用户):选中片传内置基础色名,底 / 字由核心给,深浅两主题各自成立。\n 放在 weekday 之后:同名变量后写者胜,tone 与 className=\"dshpc-seg--weekday\" 同给时以 tone 为准。\n 黄底按 Chip / Button 同源口径用 on-warning(中高明度,白字看不清)。 */\n.dshpc-seg--tone-business{--seg-thumb:var(--dshpc-business);--seg-on:var(--dshpc-on-signal);}\n.dshpc-seg--tone-success{--seg-thumb:var(--dshpc-success);--seg-on:var(--dshpc-on-signal);}\n.dshpc-seg--tone-warning{--seg-thumb:var(--dshpc-warning);--seg-on:var(--dshpc-on-warning);}\n.dshpc-seg--tone-danger{--seg-thumb:var(--dshpc-danger);--seg-on:var(--dshpc-on-signal);}\n.dshpc-seg--tone-purple{--seg-thumb:var(--dshpc-purple);--seg-on:var(--dshpc-on-signal);}\n.dshpc-seg--tone-pink{--seg-thumb:var(--dshpc-pink);--seg-on:var(--dshpc-on-signal);}\n.dshpc-seg--tone-cyan{--seg-thumb:var(--dshpc-cyan);--seg-on:var(--dshpc-on-signal);}\n.dshpc-seg--tone-teal{--seg-thumb:var(--dshpc-teal);--seg-on:var(--dshpc-on-signal);}\n.dshpc-seg--tone-orange{--seg-thumb:var(--dshpc-orange);--seg-on:var(--dshpc-on-signal);}\n.dshpc-seg--tone-indigo{--seg-thumb:var(--dshpc-indigo);--seg-on:var(--dshpc-on-signal);}\n.dshpc-seg--tone-rose{--seg-thumb:var(--dshpc-rose);--seg-on:var(--dshpc-on-signal);}\n.dshpc-seg--tone-slate{--seg-thumb:var(--dshpc-slate);--seg-on:var(--dshpc-on-signal);}\n\n/* ── 单选滑动块(2026-10-26 用户:点选后选中底应「滑过去」,不是旧段消失、新段直接亮)。\n 结构 = 一块绝对定位的共用底 + 各段透明;位置/尺寸由组件量出后内联,这里只管外观与过渡。\n --slide 只在单选挂上:多选(如星期)每段各自着色,没有唯一滑块可滑,保持原样。 */\n.dshpc-seg--slide{position:relative;}\n.dshpc-seg--slide .dshpc-seg__item{position:relative;z-index:1;}\n.dshpc-seg--slide .dshpc-seg__item[aria-pressed='true']{background:transparent;box-shadow:none;}\n.dshpc-seg__thumb{position:absolute;z-index:0;border-radius:var(--dshpc-radius-sm);background:var(--seg-thumb);box-shadow:var(--dshpc-shadow-raised);pointer-events:none;transition:left var(--dshpc-dur) var(--dshpc-ease),top var(--dshpc-dur) var(--dshpc-ease),width var(--dshpc-dur) var(--dshpc-ease),height var(--dshpc-dur) var(--dshpc-ease);}\n\n/* ── bordered 外框(2026-10-20 用户要的第二种模式):**只在最外面套一圈 1px 描边**,\n 里面一概不动 —— 选中片的填充色 / 阴影 / 文字色全部保持原样(weekday 的蓝面照旧),\n 这里不写任何针对 __item 的规则。\n 总高必须与无框版逐像素一致:border 1px×2 由 padding 各让 1px 抵消(3 → 2);\n weekday 自己声明的 3px 在文件更后面,靠双类选择器压回 2px。 */\n.dshpc-seg--bordered{border:1px solid var(--dshpc-border);padding:2px;}\n.dshpc-seg--bordered.dshpc-seg--weekday{padding:2px;}\n\n@media (prefers-reduced-motion: reduce){.dshpc-seg__item{transition:none;}.dshpc-seg__thumb{transition:none;}}\n";
|
|
221
221
|
//#endregion
|
|
222
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
222
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/actions/button-css.generated.js
|
|
223
223
|
const BUTTON_CSS = "\n/* ── 按钮 / 图标钮 P2 ───────────────────────────────────────────────────\n 与 Segmented 同一条高度纪律:--dshpc-control-h-sm(24) / -md(28) / -lg(32),\n 有边框的 variant 用 1px 真边框 + 内部 padding 补回,**有边 / 无边同高**。\n\n 三条受控轴(2026-10-19 重写,对齐主流 UI 框架的分类口径):\n · variant —— 外观档 = 形态 + 语义色,共 10 档:\n primary / secondary / outline / ghost / danger / success / warning / info /\n danger-outline(红字描边)/ link(行内链接)\n · size —— sm / md / lg\n · block —— 撑满父宽\n 每一档**只填 5 个局部变量**(--btn-bg / -fg / -border / -bg-hover / -bg-active),\n 结构与交互只有上面这一份;任何档位都不许再写一遍 display/height/padding。\n 自定义颜色(Button 的 color 参数)同样只覆盖这 5 个变量(token 覆盖,不是新皮肤)。\n\n ⚠️ hover 不再用 opacity 压一层(用户 2026-10-19:「黑色和红色的按钮移上去变化太小,\n 完全感觉不到颜色变了」)⇒ 走 --dshpc-*-hover / -active 的明确混色,见 tokens-css.ts。 */\n.dshpc-btn{--btn-bg:transparent;--btn-fg:var(--dshpc-fg);--btn-border:transparent;--btn-pad:12px;\n --btn-bg-hover:var(--dshpc-hover);--btn-bg-active:var(--dshpc-active);--btn-fg-hover:var(--btn-fg);\n appearance:none;display:inline-flex;align-items:center;justify-content:center;gap:6px;\n box-sizing:border-box;border:1px solid var(--btn-border);border-radius:var(--dshpc-radius-md);\n background-color:var(--btn-bg);color:var(--btn-fg);font-family:inherit;font-weight:500;white-space:nowrap;cursor:pointer;\n transition:background-color var(--dshpc-dur-fast) var(--dshpc-ease),border-color var(--dshpc-dur-fast) var(--dshpc-ease),color var(--dshpc-dur-fast) var(--dshpc-ease),box-shadow var(--dshpc-dur-fast) var(--dshpc-ease),transform var(--dshpc-dur-fast) var(--dshpc-ease);}\n.dshpc-btn--sm{--btn-pad:10px;height:var(--dshpc-control-h-sm);padding:0 var(--btn-pad);font-size:var(--dshpc-font-sm);line-height:1;}\n.dshpc-btn--md{--btn-pad:12px;height:var(--dshpc-control-h-md);padding:0 var(--btn-pad);font-size:var(--dshpc-font-md);line-height:1;}\n.dshpc-btn--lg{--btn-pad:14px;height:var(--dshpc-control-h-lg);padding:0 var(--btn-pad);font-size:var(--dshpc-font-md);line-height:1;}\n/* block:撑满父宽(表单底栏 / 抽屉底部的主操作) */\n.dshpc-btn--block{display:flex;width:100%;}\n/* block + 前置图标 ⇒ 文字视觉居中(2026-10-19 用户点名):\n 内容组 [图标 + 间距 + 文字] 整体在盒内居中时,**文字**的中心会被图标推右半格。\n 把右内边距补上「图标宽 + 间距」,可用盒随之左移同量 ⇒ 文字落回视觉中心,图标贴左侧。\n 图标宽按 1.2em 估(官方图标 14/16px vs 字号 12/13px),em 随字号档自动缩放。 */\n.dshpc-btn--block.dshpc-btn--icon-start{padding-right:calc(var(--btn-pad) + 1.2em + 6px);}\n/* 图标比同档文字小一号(用户 2026-11-02):容器吃掉 0.875em,内联 SVG 一律跟随 1em,\n 不再由调用方的 size={16} 说了算 —— 全站按钮图标尺寸只由这一处决定。 */\n.dshpc-btn__icon,.dshpc-btn__icon-end{display:inline-flex;align-items:center;justify-content:center;flex:none;line-height:0;font-size:.875em;}\n.dshpc-btn__icon svg,.dshpc-btn__icon-end svg{display:block;margin:0;width:1em;height:1em;}\n/* maxWidth 包 MarqueeText 时:标签作为 flex 子项必须能收缩到内容以下,否则省略号 / 跑马灯测不准 */\n.dshpc-btn .dshpc-btn__label{min-width:0;}\n/* loading:不换 DOM 结构,只在文案前插一枚 Loader(size=xs,12px)。\n 环的画法与动画统一在 controls/loader.css(本文件不再维护第二份 SVG 弧 / keyframes)。 */\n\n/* 交互态:颜色变化写在变量上 ⇒ 所有档位一次生效,且变化幅度由 token 决定(够明显) */\n.dshpc-btn:hover:not(:disabled){background-color:var(--btn-bg-hover);color:var(--btn-fg-hover);}\n.dshpc-btn:active:not(:disabled){background-color:var(--btn-bg-active);transform:translateY(1px);}\n.dshpc-btn:focus-visible{outline:2px solid var(--dshpc-focus);outline-offset:2px;}\n.dshpc-btn:disabled{cursor:default;opacity:.5;}\n/* dense:尺寸档 / 高度一律不变,只把图标放大一档、内距收紧(描边细的文件类型图标用)。\n 只覆盖局部变量与图标字号,不另写一套皮肤;必须写在尺寸档与图标规则之后才压得过默认值。 */\n.dshpc-btn--dense{--btn-pad:6px;}\n.dshpc-btn--dense .dshpc-btn__icon,.dshpc-btn--dense .dshpc-btn__icon-end{font-size:1.25em;}\n\n.dshpc-btn--primary{--btn-bg:var(--dshpc-accent);--btn-fg:var(--dshpc-fg-inverse);\n --btn-bg-hover:var(--dshpc-accent-hover);--btn-bg-active:var(--dshpc-accent-active);}\n/* secondary:中性实心(灰面),用于「取消 / 次要」这类与主操作并排的按钮 */\n.dshpc-btn--secondary{--btn-bg:var(--dshpc-hover);--btn-fg:var(--dshpc-fg);\n --btn-bg-hover:var(--dshpc-active);--btn-bg-active:var(--dshpc-active);}\n.dshpc-btn--outline{--btn-bg:var(--dshpc-surface-1);--btn-border:var(--dshpc-border-strong);\n --btn-bg-hover:var(--dshpc-hover);--btn-bg-active:var(--dshpc-active);}\n.dshpc-btn--ghost{--btn-fg:var(--dshpc-fg-2);--btn-fg-hover:var(--dshpc-fg);\n --btn-bg-hover:var(--dshpc-hover);--btn-bg-active:var(--dshpc-active);}\n.dshpc-btn--danger{--btn-bg:var(--dshpc-danger);--btn-fg:var(--dshpc-on-signal);\n --btn-bg-hover:var(--dshpc-danger-hover);--btn-bg-active:var(--dshpc-danger-active);}\n.dshpc-btn--success{--btn-bg:var(--dshpc-success);--btn-fg:var(--dshpc-on-signal);\n --btn-bg-hover:var(--dshpc-success-hover);--btn-bg-active:var(--dshpc-success-active);}\n.dshpc-btn--warning{--btn-bg:var(--dshpc-warning);--btn-fg:var(--dshpc-on-warning);\n --btn-bg-hover:var(--dshpc-warning-hover);--btn-bg-active:var(--dshpc-warning-active);}\n.dshpc-btn--info{--btn-bg:var(--dshpc-business);--btn-fg:var(--dshpc-on-signal);\n --btn-bg-hover:var(--dshpc-business-hover);--btn-bg-active:var(--dshpc-business-active);}\n/* 扩展八色实心(2026-10-29):白字两主题均 ≥4.5:1;hover/active 走各自 token 派生。 */\n.dshpc-btn--purple{--btn-bg:var(--dshpc-purple);--btn-fg:var(--dshpc-on-signal);\n --btn-bg-hover:var(--dshpc-purple-hover);--btn-bg-active:var(--dshpc-purple-active);}\n.dshpc-btn--pink{--btn-bg:var(--dshpc-pink);--btn-fg:var(--dshpc-on-signal);\n --btn-bg-hover:var(--dshpc-pink-hover);--btn-bg-active:var(--dshpc-pink-active);}\n.dshpc-btn--cyan{--btn-bg:var(--dshpc-cyan);--btn-fg:var(--dshpc-on-signal);\n --btn-bg-hover:var(--dshpc-cyan-hover);--btn-bg-active:var(--dshpc-cyan-active);}\n.dshpc-btn--teal{--btn-bg:var(--dshpc-teal);--btn-fg:var(--dshpc-on-signal);\n --btn-bg-hover:var(--dshpc-teal-hover);--btn-bg-active:var(--dshpc-teal-active);}\n.dshpc-btn--orange{--btn-bg:var(--dshpc-orange);--btn-fg:var(--dshpc-on-signal);\n --btn-bg-hover:var(--dshpc-orange-hover);--btn-bg-active:var(--dshpc-orange-active);}\n.dshpc-btn--indigo{--btn-bg:var(--dshpc-indigo);--btn-fg:var(--dshpc-on-signal);\n --btn-bg-hover:var(--dshpc-indigo-hover);--btn-bg-active:var(--dshpc-indigo-active);}\n.dshpc-btn--rose{--btn-bg:var(--dshpc-rose);--btn-fg:var(--dshpc-on-signal);\n --btn-bg-hover:var(--dshpc-rose-hover);--btn-bg-active:var(--dshpc-rose-active);}\n.dshpc-btn--slate{--btn-bg:var(--dshpc-slate);--btn-fg:var(--dshpc-on-signal);\n --btn-bg-hover:var(--dshpc-slate-hover);--btn-bg-active:var(--dshpc-slate-active);}\n/* danger-outline:红字描边(破坏性次要操作,如卡片上的「删除」)。\n ⚠️ 旧修饰类 danger-ink 保留为别名(消费方可能还在挂),两者同一套皮肤。 */\n.dshpc-btn--danger-outline,.dshpc-btn--danger-ink{--btn-border:var(--dshpc-danger);--btn-fg:var(--dshpc-danger);\n --btn-fg-hover:var(--dshpc-danger);--btn-bg-hover:var(--dshpc-danger-soft);--btn-bg-active:var(--dshpc-danger-soft);}\n/* link:行内文字链接型(会话 / 产出文件名),无底无边、品牌蓝、hover 下划线 */\n.dshpc-btn--link{--btn-fg:var(--dshpc-link);--btn-fg-hover:var(--dshpc-link);\n --btn-bg-hover:transparent;--btn-bg-active:transparent;\n height:auto;padding:0;border:0;background:none;font-weight:400;text-align:left;}\n.dshpc-btn--link:hover:not(:disabled){text-decoration:underline;}\n\n/* 图标钮:纯图标,方形;尺寸档的宽高与同档文字按钮等高、圆角统一吃 md(与 .dshpc-btn 同款,2026-10-28 拍板)\n 底色 / 图标色全走局部变量:默认**无底色**,消费方可传 color(图标色)/ background(底色)覆盖(用户 2026-11-02)。 */\n.dshpc-iconbtn{--icb-bg:transparent;--icb-bg-hover:var(--dshpc-hover);--icb-fg:var(--dshpc-fg-2);--icb-fg-hover:var(--dshpc-fg);\n appearance:none;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;padding:0;\n border:1px solid var(--icb-border,transparent);border-radius:var(--dshpc-radius-md);\n background:var(--icb-bg);color:var(--icb-fg);\n font-family:inherit;cursor:pointer;flex:none;\n transition:background-color var(--dshpc-dur-fast) var(--dshpc-ease),border-color var(--dshpc-dur-fast) var(--dshpc-ease),color var(--dshpc-dur-fast) var(--dshpc-ease),opacity var(--dshpc-dur-fast) var(--dshpc-ease);}\n.dshpc-iconbtn--sm{width:var(--dshpc-control-h-sm);height:var(--dshpc-control-h-sm);font-size:var(--dshpc-font-sm);}\n.dshpc-iconbtn--md{width:var(--dshpc-control-h-md);height:var(--dshpc-control-h-md);font-size:var(--dshpc-font-md);}\n.dshpc-iconbtn--lg{width:var(--dshpc-control-h-lg);height:var(--dshpc-control-h-lg);font-size:var(--dshpc-font-md);}\n/* 图标与文字按钮同口径:SVG 一律跟随 1em(比 16px 档小一号)。\n ⚠️ flex:none 是硬约束:svg 是按钮的直接 flex item,默认 flex-shrink:1 会被按钮内距\n 挤成 10px 窄条;那是布局收缩,不是层叠优先级 —— 改 width、加 !important 都救不回来,\n 而 height 在交叉轴不受影响,于是图标被压扁变形。后代选择器兼容官方图标外的 wrapper。 */\n.dshpc-iconbtn svg{display:block;width:1em;height:1em;flex:none;}\n/* dense:只放大图标的 em 值,正方形宽高与高度档都不动;\n 1.25em 相对按钮字号 12/13 ⇒ 15/16.25px,与 .dshpc-btn--dense 一致。 */\n.dshpc-iconbtn.dshpc-iconbtn--dense svg{width:1.25em;height:1.25em;}\n.dshpc-iconbtn--outline{--icb-bg:var(--dshpc-surface-1);--icb-border:var(--dshpc-border);}\n.dshpc-iconbtn--danger{--icb-fg:var(--dshpc-danger);--icb-bg-hover:var(--dshpc-danger-soft);--icb-fg-hover:var(--dshpc-danger);}\n.dshpc-iconbtn:hover:not(:disabled){background:var(--icb-bg-hover);color:var(--icb-fg-hover);}\n.dshpc-iconbtn:focus-visible{outline:2px solid var(--dshpc-focus);outline-offset:2px;}\n.dshpc-iconbtn:disabled{cursor:default;opacity:.4;}\n\n/* ── 行式文件按钮(图标 + 文件名)P2:**全站唯一实现**(2026-10-04 收编)──────────\n 用途:「产出物 / 附件」那种**一行一个文件**的清单项(基础信息右栏产出物清单、附件区、\n 执行记录页的展开区)。平时透明、**鼠标移上去才出浅底**(沿用用户 2026-10-03 定的观感)。\n 两个形态修饰类:\n --block 撑满父宽(清单里一项一行)\n --inline 内容宽(跟在文字后头,如附件行)\n 收编原因:这份皮肤此前只写在 task-list.tsx 的 TASK_LIST_CSS 里(旧名 .dshpc-info-out),\n 执行记录页展开区要用同一种观感 ⇒ 上提基础层,避免再出现「各写一份外观」(同名不同皮的坑刚踩过)。 */\n.dshpc-filechip{appearance:none;-webkit-appearance:none;border:0;border-radius:var(--dshpc-radius-xs);\n background:transparent;color:var(--dshpc-fg);font:inherit;text-align:left;cursor:pointer;min-width:0;\n transition:background-color var(--dshpc-dur) var(--dshpc-ease);}\n.dshpc-filechip:hover:not(:disabled){background:var(--dshpc-chip-bg);}\n.dshpc-filechip:focus-visible{outline:2px solid var(--dshpc-focus);outline-offset:1px;}\n.dshpc-filechip:disabled{cursor:default;background:transparent;color:var(--dshpc-fg-3);}\n.dshpc-filechip--block{display:flex;align-items:center;gap:6px;width:100%;box-sizing:border-box;\n padding:4px 6px;font-size:var(--dshpc-font-xs);}\n.dshpc-filechip--inline{display:inline-flex;align-items:center;gap:4px;padding:2px 6px;font-size:var(--dshpc-font-sm);}\n\n@media (prefers-reduced-motion: reduce){.dshpc-btn,.dshpc-iconbtn,.dshpc-filechip{transition:none;}}\n";
|
|
224
224
|
//#endregion
|
|
225
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
225
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/inputs/field-css.generated.js
|
|
226
226
|
const FIELD_CSS = "\n/* ── 字段 + 问号提示(hint 参数内置) ──────────────────────────────────── */\n/* 控件 + FieldHint 同一行;hint 版由组件自己包,调用方只传 hint 字符串。\n 铺满型控件(input/textarea)进包后改吃 flex 弹性,让位给问号。 */\n.dshpc-fieldwrap{display:flex;align-items:center;gap:6px;min-width:0;max-width:100%;}\n.dshpc-fieldwrap--inline{display:inline-flex;}\n.dshpc-fieldwrap > .dshpc-input,.dshpc-fieldwrap > .dshpc-textarea,.dshpc-fieldwrap > .dshpc-iwrap{flex:1 1 auto;width:auto;min-width:0;}\n/* 多行输入:问号钉在**右下角**(2026-10-20 用户:不要垂直居中),文本区底部留出它的位置。\n ⚠️ 这一档必须把 textarea 的宽度还回去(上面那条 flex 让位规则会把它缩窄)。 */\n.dshpc-fieldwrap--block{position:relative;display:block;}\n.dshpc-fieldwrap--block > .dshpc-textarea{width:100%;padding-bottom:24px;}\n.dshpc-fieldwrap--block > .dshpc-hint{position:absolute;right:8px;bottom:6px;}\n\n/* ── 输入类 P3 ────────────────────────────────────────────────────────── */\n/* 默认铺满容器(width:100%,与 .dshpc-textarea 同口径):input 原生按 size 属性取内在宽,\n 不铺满 ⇒ 调用方套定宽壳时会「右边空一截、看着没贴右」(2026-10-20 用户抓的 bug)。\n 要定宽由调用方在外面套壳控制(如 192px 搜索槽)。 */\n.dshpc-input{display:block;width:100%;box-sizing:border-box;border:1px solid var(--dshpc-border-heavy);border-radius:var(--dshpc-radius-md);\n background:var(--dshpc-surface-1);color:var(--dshpc-fg);font-family:inherit;outline:none;\n transition:border-color var(--dshpc-dur-fast) var(--dshpc-ease),box-shadow var(--dshpc-dur-fast) var(--dshpc-ease);}\n.dshpc-input--sm{height:var(--dshpc-control-h-sm);padding:0 8px;font-size:var(--dshpc-font-sm);line-height:var(--dshpc-line-sm);}\n.dshpc-input--md{height:var(--dshpc-control-h-md);padding:0 10px;font-size:var(--dshpc-font-md);line-height:var(--dshpc-line-md);}\n.dshpc-input--lg{height:var(--dshpc-control-h-lg);padding:0 12px;font-size:var(--dshpc-font-md);line-height:var(--dshpc-line-md);}\n.dshpc-input::placeholder{color:var(--dshpc-fg-3);}\n/* type=\"search\":原生清除钮(::-webkit-search-cancel-button)整个隐掉,换组件自己挂的 plain IconButton\n —— 原生那个各子系统长相不一、还不吃 token(2026-10-28 用户:不好看,要数字框加减号那种)。 */\n.dshpc-iwrap .dshpc-input::-webkit-search-cancel-button{display:none;}\n.dshpc-input:focus{border-color:var(--dshpc-focus);box-shadow:0 0 0 1px var(--dshpc-focus);}\n.dshpc-input--error{border-color:var(--dshpc-danger);}\n.dshpc-input:disabled{cursor:default;opacity:.5;}\n\n/* 左侧图标槽(Input 的 icon 参数):图标绝对定位压在输入框的左内边距上,\n 输入框自己的边框 / 焦点圈 / 描红一律不动。图标不吃点击(pointer-events:none)⇒ 点在图标上照样聚焦。\n 左内边距 = 左偏 8 + 图标宽(sm 14 / md·lg 16,见 fieldMetricsOf)+ 间距 4。 */\n.dshpc-iwrap{position:relative;display:block;width:100%;min-width:0;}\n.dshpc-iwrap__icon{position:absolute;left:8px;top:50%;transform:translateY(-50%);display:inline-flex;pointer-events:none;color:var(--dshpc-fg-2);}\n.dshpc-iwrap--sm > .dshpc-input{padding-left:26px;}\n.dshpc-iwrap--md > .dshpc-input,.dshpc-iwrap--lg > .dshpc-input{padding-left:28px;}\n/* 禁用时图标跟输入框一起变淡(输入框自己已有 opacity:.5,图标不在它里面,得单独跟一下)。 */\n.dshpc-iwrap:has(> .dshpc-input:disabled) > .dshpc-iwrap__icon{opacity:.5;}\n\n/* 搜索框的清空钮(Field.ts 在「有焦点 + 有内容」时才挂出来):**并进框里**,与数字框的 − / +\n 同形态 —— 整段同高、左直右圆、hover 底色铺满这一格(2026-10-28 用户:不要一颗悬在右边的小按钮)。\n 向内让 1px,免得底色压住输入框自己的边框。 */\n.dshpc-iwrap__clear.dshpc-iconbtn{position:absolute;right:1px;top:1px;bottom:1px;height:auto;width:auto;aspect-ratio:1;\n border-radius:0 var(--dshpc-radius-md) var(--dshpc-radius-md) 0;font-size:var(--dshpc-font-md);}\n/* height:auto 必须:iconbtn--md/lg 的固定 height 会让 absolute 的 bottom 被忽略\n (top:1 + 固定高 ⇒ 整钮错位 1px,× 显得没居中,2026-10-28 用户截图抓的)。 */\n/* 文字让开这一段(宽度 = 控件高 - 2,故按档位补)。 */\n.dshpc-iwrap--clear > .dshpc-input{padding-right:calc(var(--dshpc-control-h-md) + 3px);}\n.dshpc-iwrap--clear.dshpc-iwrap--sm > .dshpc-input{padding-right:calc(var(--dshpc-control-h-sm) + 3px);}\n.dshpc-iwrap--clear.dshpc-iwrap--lg > .dshpc-input{padding-right:calc(var(--dshpc-control-h-lg) + 3px);}\n\n.dshpc-pfx{display:inline-flex;align-items:center;box-sizing:border-box;overflow:hidden;\n border:1px solid var(--dshpc-border-heavy);border-radius:var(--dshpc-radius-md);background:var(--dshpc-surface-1);color:var(--dshpc-fg);}\n.dshpc-pfx--sm{height:var(--dshpc-control-h-sm);}\n.dshpc-pfx--md{height:var(--dshpc-control-h-md);}\n.dshpc-pfx--lg{height:var(--dshpc-control-h-lg);}\n/* md / lg 档字号跟档走(与同档下拉同字号):此前写死 sm(12px),同排下拉是 13px ⇒ 显得「input 字小」。 */\n.dshpc-pfx--md .dshpc-pfx__label,.dshpc-pfx--lg .dshpc-pfx__label{font-size:var(--dshpc-font-md);line-height:var(--dshpc-line-md);}\n.dshpc-pfx--md .dshpc-pfx__input,.dshpc-pfx--lg .dshpc-pfx__input{font-size:var(--dshpc-font-md);line-height:var(--dshpc-line-md);}\n.dshpc-pfx--error{border-color:var(--dshpc-danger);}\n.dshpc-pfx:focus-within{border-color:var(--dshpc-focus);box-shadow:0 0 0 1px var(--dshpc-focus);}\n.dshpc-pfx__label{padding:0 8px;color:var(--dshpc-fg-2);font-size:var(--dshpc-font-sm);line-height:var(--dshpc-line-sm);white-space:nowrap;border-right:1px solid var(--dshpc-border);}\n.dshpc-pfx__input{flex:1 1 auto;min-width:0;height:100%;padding:0 8px;border:0;background:transparent;color:var(--dshpc-fg);\n font-family:inherit;font-size:var(--dshpc-font-sm);line-height:var(--dshpc-line-sm);outline:none;}\n.dshpc-pfx__input::placeholder{color:var(--dshpc-fg-3);}\n\n.dshpc-num{display:inline-flex;align-items:center;justify-content:space-between;box-sizing:border-box;overflow:hidden;\n border:1px solid var(--dshpc-border-heavy);border-radius:var(--dshpc-radius-md);background:var(--dshpc-surface-1);color:var(--dshpc-fg);}\n/* 中段:数字 + 后缀成组居中;容器被消费端拉宽时吃掉全部余量,两端 − / + 因此钉死在左右边缘。 */\n.dshpc-num__mid{display:flex;align-items:center;justify-content:center;flex:1 1 auto;min-width:0;}\n.dshpc-num--sm{height:var(--dshpc-control-h-sm);}\n.dshpc-num--md{height:var(--dshpc-control-h-md);}\n.dshpc-num--lg{height:var(--dshpc-control-h-lg);}\n.dshpc-num--md .dshpc-num__input,.dshpc-num--lg .dshpc-num__input{font-size:var(--dshpc-font-md);line-height:var(--dshpc-line-md);}\n.dshpc-num--md .dshpc-num__suffix,.dshpc-num--lg .dshpc-num__suffix{font-size:var(--dshpc-font-md);}\n.dshpc-num--disabled{opacity:.5;}\n/* 焦点态与 Input 同款(2026-10-20 用户:数字框里点进去没有蓝框):内层 input 无边框,\n 焦点状态画在整个步进控件外框上。 */\n.dshpc-num:focus-within{border-color:var(--dshpc-focus);box-shadow:0 0 0 1px var(--dshpc-focus);}\n.dshpc-num__input{width:36px;height:100%;padding:0 2px;border:0;background:transparent;color:var(--dshpc-fg);\n font-family:inherit;font-size:var(--dshpc-font-sm);line-height:var(--dshpc-line-sm);text-align:center;outline:none;}\n.dshpc-num__suffix{padding:0 6px;color:var(--dshpc-fg-2);font-size:var(--dshpc-font-sm);white-space:nowrap;}\n.dshpc-num .dshpc-iconbtn{border-radius:0;color:var(--dshpc-fg-2);flex:none;}\n\n/* 官方 Switch 包装统一:选中 = success 绿。\n (合并原先 task-editor-css / task-list 两处就地覆盖;选择器带包装类 + role,特异性高于官方。) */\n.dshpc-switch button[role='switch'][aria-checked='true']{background:var(--dshpc-success);}\n\n/* 多行文本输入(提示词等,P3):**边框 / 圆角 / 底 / 焦点态与 Input 同一套口径**(用户 2026-10-20:\n 「多行输入应该和 input 的边儿是一个道理,包括圆角在内,都是一个东西」)。\n ⚠️ 旧意图「卡内无边框、视觉重心在整张卡上」已作废 —— 现在它就是一只带框的多行输入框。\n (从 task-editor-css 的 .dshpc-ed-prompt 上提而来;业务文件不再自写 textarea 皮肤。) */\n.dshpc-textarea{display:block;width:100%;box-sizing:border-box;min-height:132px;padding:8px 12px;\n border:1px solid var(--dshpc-border-heavy);border-radius:var(--dshpc-radius-md);outline:none;\n background:var(--dshpc-surface-1);color:var(--dshpc-fg);font-family:inherit;font-size:var(--dshpc-font-lg);line-height:1.6;resize:vertical;\n transition:border-color var(--dshpc-dur-fast) var(--dshpc-ease),box-shadow var(--dshpc-dur-fast) var(--dshpc-ease);}\n.dshpc-textarea::placeholder{color:var(--dshpc-fg-3);}\n.dshpc-textarea:focus{border-color:var(--dshpc-focus);box-shadow:0 0 0 1px var(--dshpc-focus);}\n/* 校验不通过:与 Input 一致,走边框描红(旧版是 box-shadow 描红盒,与 Input 不同口径) */\n.dshpc-textarea--error{border-color:var(--dshpc-danger);}\n.dshpc-textarea:disabled{cursor:default;opacity:.5;}\n@media (prefers-reduced-motion: reduce){.dshpc-textarea{transition:none;}}\n\n/* 拖拽分隔条(编辑分栏 / 预览 dock 共用,U20 #3):6px 命中区,col-resize,不画线,hover/按下浮出浅带。\n 具体 z-index 由 .dshpc-ed-resizer / .dshpc-sv-resizer 各自补。 */\n.dshpc-resizer{position:absolute;top:0;bottom:0;left:0;width:6px;cursor:col-resize;background:0 0;touch-action:none;user-select:none;}\n.dshpc-resizer:hover,.dshpc-resizer:active{background:var(--dshpc-hover);}\n\n@media (prefers-reduced-motion: reduce){.dshpc-input,.dshpc-pfx{transition:none;}}\n";
|
|
227
227
|
//#endregion
|
|
228
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
228
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/feedback/loader-css.generated.js
|
|
229
229
|
const LOADER_CSS = "/* ── Loader:统一的加载动画图标(无背景 / 无定位 / 颜色跟随 currentColor)────────\n 形态 × 尺寸两轴正交:形态管几何与动画;尺寸档只改 width / height,几何按\n viewBox=\"0 0 24 24\" 等比缩放 —— 一套几何吃五档,12px 时描边即 1.5px、48px 时 6px,\n 视觉重量一致,不用逐个尺寸换算 calc。\n\n 边界:本控件**只管图标本身**。背景 / 圆角 / 内距 / 阴影 / 定位(fixed、居中、漂浮)\n 一律归调用方 —— 套 Chip、套 Card,或自己包一个 div。 */\n\n.dshpc-loader { display: inline-block; flex: none; vertical-align: middle; line-height: 0; color: inherit; }\n\n.dshpc-loader--xs { width: 12px; height: 12px; }\n.dshpc-loader--sm { width: 16px; height: 16px; }\n.dshpc-loader--md { width: 24px; height: 24px; }\n.dshpc-loader--lg { width: 32px; height: 32px; }\n.dshpc-loader--xl { width: 48px; height: 48px; }\n\n/* 形态一 ring:开口弧整体旋转。必须走 SVG 矢量弧 —— 次像素边框画圆在 12px 下会被\n 抗锯齿拉毛、看着像圆角方(2026-10-20 真机实测,曾被误判成 border-radius 被覆盖)。 */\n.dshpc-loader--ring { animation: dshpc-loader-rotate .8s linear infinite; }\n@keyframes dshpc-loader-rotate { to { transform: rotate(360deg) } }\n\n/* 形态二 blocks:三个方块依次脉动放大。\n transform-box: fill-box 是 SVG 子元素做 CSS transform 的必要条件 —— 否则 origin\n 落在 viewBox 原点,节点会绕着左上角飞出去。 */\n.dshpc-loader__node { transform-box: fill-box; transform-origin: center; }\n.dshpc-loader--blocks .dshpc-loader__node { animation: dshpc-loader-blink 1.2s ease-in-out infinite; }\n.dshpc-loader__node:nth-child(2) { animation-delay: .15s; }\n.dshpc-loader__node:nth-child(3) { animation-delay: .3s; }\n@keyframes dshpc-loader-blink {\n 0%, 80%, 100% { opacity: .25; transform: scale(.8) }\n 40% { opacity: 1; transform: scale(1) }\n}\n\n/* 降低动效:停在「全部可见、实体大小」,而不是停在动画中途的半透明小点。 */\n@media (prefers-reduced-motion: reduce) {\n .dshpc-loader--ring { animation: none; }\n .dshpc-loader__node { animation: none; opacity: 1; transform: none; }\n}\n";
|
|
230
230
|
//#endregion
|
|
231
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
231
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/layout/quick-toolbar-css.generated.js
|
|
232
232
|
const QUICK_TOOLBAR_CSS = "/* 快捷工具栏:右侧悬浮的一列独立圆钮。\n 横向 left / right 与 bottom、按钮直径、纵向间距由组件按 props 实时写入 style;\n 这里只放与位置无关的皮肤。 */\n.dshpc-quick-toolbar{\n position:fixed;\n z-index:var(--dshpc-z-dock);\n display:flex;\n flex-direction:column;\n align-items:center;\n}\n/* 出现 / 消失:挂载即淡入,退场先播 fade-out(组件延迟卸载,见 QuickToolbar.ts)。 */\n@keyframes dshpc-quick-toolbar-in{\n from{opacity:0;transform:translateY(6px) scale(.9);}\n to{opacity:1;transform:none;}\n}\n@keyframes dshpc-quick-toolbar-out{\n from{opacity:1;transform:none;}\n to{opacity:0;transform:translateY(6px) scale(.9);}\n}\n.dshpc-quick-toolbar__item{\n display:inline-flex;\n align-items:center;\n justify-content:center;\n padding:0;\n margin:0;\n box-sizing:border-box;\n border:1px solid var(--dshpc-border);\n border-radius:50%;\n /* 自定义底色 / 字色只写这两个变量(见 QuickToolbar.ts),hover/active 才能跟着混色。 */\n background:var(--dshpc-quick-toolbar-bg, var(--dshpc-solid));\n color:var(--dshpc-quick-toolbar-fg, var(--dshpc-on-solid));\n box-shadow:var(--dshpc-shadow-2);\n cursor:pointer;\n animation:dshpc-quick-toolbar-in var(--dshpc-dur) var(--dshpc-ease);\n transition:background-color var(--dshpc-dur-fast) var(--dshpc-ease),\n color var(--dshpc-dur-fast) var(--dshpc-ease),\n transform var(--dshpc-dur-fast) var(--dshpc-ease);\n font-size:var(--dshpc-font-lg);\n}\n/* 圆钮里的图标走核心 1em 基线(button.css:112):调用方不必、也不该再传 size 放大。 */\n.dshpc-quick-toolbar__item svg{display:block;width:1em;height:1em;flex:none;}\n/* 退场期保留占位,避免同列其他按钮瞬时跳位。 */\n.dshpc-quick-toolbar__item.is-leaving{\n animation:dshpc-quick-toolbar-out var(--dshpc-dur) var(--dshpc-ease) forwards;\n pointer-events:none;\n}\n/* 变色与核心 Button 实心档同一套:按 --dshpc-fg 混出 hover / active 底色(自定义 color 也跟随)。 */\n.dshpc-quick-toolbar__item:hover{\n background:color-mix(in srgb, var(--dshpc-quick-toolbar-bg, var(--dshpc-solid)) 82%, var(--dshpc-fg));\n}\n.dshpc-quick-toolbar__item:active{\n background:color-mix(in srgb, var(--dshpc-quick-toolbar-bg, var(--dshpc-solid)) 70%, var(--dshpc-fg));\n transform:scale(.94);\n}\n.dshpc-quick-toolbar__item:focus-visible{outline:2px solid var(--dshpc-focus);outline-offset:2px;}\n@media (prefers-reduced-motion: reduce){\n .dshpc-quick-toolbar__item{transition:none;transform:none;animation:none;}\n .dshpc-quick-toolbar__item.is-leaving{animation:none;opacity:0;}\n}\n";
|
|
233
233
|
//#endregion
|
|
234
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
234
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/display/hint-css.generated.js
|
|
235
235
|
const HINT_CSS = "\n/* ── 问号提示 P4(用户 2026-10-18:对齐真实插件 HelpButton——**带圈的问号图标**)──\n 本体 14px 细圈 + 圈内 ?,颜色 fg-3、hover 只提亮不加底(与 dshpc-ed-help 同规矩)。\n 气泡不在本文件:2026-10-19 用户拍板「问号必须用官方 Tooltip 那一个」⇒ 气泡由注入的\n 官方组件渲染(src/ui/tooltip.ts),这里只管问号图标本身。 */\n.dshpc-hint{display:inline-flex;align-items:center;justify-content:center;flex:none;\n box-sizing:border-box;width:14px;height:14px;padding:0;border:1px solid currentColor;border-radius:50%;background:transparent;\n color:var(--dshpc-fg-3);font-family:inherit;font-size:8px;font-weight:600;line-height:12px;cursor:help;vertical-align:middle;\n transition:color var(--dshpc-dur-fast) var(--dshpc-ease);}\n.dshpc-hint:hover,.dshpc-hint:focus-visible{color:var(--dshpc-fg);background:0 0;}\n.dshpc-hint:focus-visible{outline:2px solid var(--dshpc-focus);outline-offset:1px;}\n";
|
|
236
236
|
//#endregion
|
|
237
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
237
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/layout/split-group-css.generated.js
|
|
238
238
|
const SPLIT_GROUP_CSS = "\n/* ── 拼接外壳 SplitGroup ──────────────────────────────────────────────\n 职责只有一条:把两个控件在外观上焊成一体(外框 / 圆角 / 中间 1px 分隔 / 整体聚焦圈)。\n 它**不持状态、不出联动回调** —— 选中与联动全走内件自己的 value / onChange\n (用户 2026-10-28 拍板:外壳不必知道右边那个下拉管什么)。\n\n ⚠️ 与内件类名有意耦合:内件是 Picker / Segmented 时由下面几条规则把它们自己的\n 边框 / 底色 / 圆角交出来,由外壳统一画。内件改名或改结构要同步改这里,\n 否则会出现双边框、双底色。\n\n 高度不写死:内件自己按 size 档(sm 24 / md 28 / lg 32)撑开,外壳跟着长。\n 两格要等高,就给内件传**同一个 size**。万一两格 size 不一致,外壳内件用 align-items:center\n 居中(不会顶对齐露白,用户 2026-10-28 截图反馈「本月偏上」后的处理);**别用 height:100%**,\n 它会覆盖三档高度(与 --lg/--sm 同特异性且注入更晚)。\n\n 左格统一灰底(用户 2026-10-28 拍板):滑块保留自己的灰轨,左格下拉把底色换成\n surface-sunken;右格保持原样。层次感 = 左格是「档位/范围」,右格是「值」。 */\n .dshpc-split{display:inline-flex;align-items:stretch;max-width:100%;overflow:hidden;border:1px solid var(--dshpc-border-heavy);border-radius:var(--dshpc-radius-md);background:var(--dshpc-surface-1);}\n /* 两格宽度都由内容给;容器再窄也让内件自己省略,不让外壳被撑破 */\n .dshpc-split > *{min-width:0;max-width:100%;}\n /* 分隔:相邻兄弟的左描边,不额外插 DOM,hover / focus 时也不会断 */\n .dshpc-split > * + *{box-sizing:border-box;border-left:1px solid var(--dshpc-border);}\n /* 整体聚焦:只在**下拉展开**时画一整圈(判据是内件的 aria-expanded,不是 :focus-within)。\n 2026-11-02 用户定稿:滑块那格是「选中」不是「输入聚焦」,鼠标点它不该让整框常亮;\n 而且选取值后焦点会留在按钮上,用 :focus-within 会一直亮着。 */\n .dshpc-split:has(.dshpc-picker__trigger[aria-expanded='true']){border-color:var(--dshpc-focus);box-shadow:0 0 0 1px var(--dshpc-focus);}\n /* Picker:去掉自身外框与底色;display 改成 flex,消掉 inline-block 行盒带来的基线间隙。\n 注意**不能用 height:100%**:它会和 .dshpc-picker__trigger--lg / --sm 同特异性(都是两个类),\n 且 split-group.css 在 picker.css 之后注入,会把三档高度全吃掉(md/lg 看起来一样大)。\n 改用 align-items:center —— 同 size 时两格自然等高的同时文字垂直居中;万一两格 size 不一致,\n 较矮的格也只是居中、不会顶对齐露白。 */\n .dshpc-split .dshpc-picker{display:flex;align-items:center;}\n .dshpc-split .dshpc-picker__trigger{border:0;border-radius:0;background:transparent;}\n .dshpc-split .dshpc-picker__trigger:focus-visible{outline:0;}\n /* 左格下拉:灰底(滑块的灰轨是它自己的 --dshpc-seg-track,不在这里覆盖) */\n .dshpc-split > :first-child .dshpc-picker__trigger{background:var(--dshpc-surface-sunken);}\n /* Segmented:只去外圆角与描边,灰轨保留;padding 保持 3px 不动 —— 它是高度契约的一部分\n (3 + item + 3 = control-h)。bordered 那档去掉描边、把让给描边的 1px 还回 padding,\n 否则会比右边矮 2px。 */\n .dshpc-split .dshpc-seg{border-radius:0;border:0;}\n .dshpc-split .dshpc-seg--bordered{padding:3px;}\n";
|
|
239
239
|
//#endregion
|
|
240
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
240
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/inputs/input-group-css.generated.js
|
|
241
241
|
const INPUT_GROUP_CSS = "\n/* ── 组合输入框 InputGroup ─────────────────────────────────────────────\n 输入框 + 后置按钮(一枚或多枚)+ 可选前置标题,焊成一体。\n 与 SplitGroup 同一套外观口径:外框 / 圆角 / 相邻 1px 分隔 / 整体聚焦圈都由外壳画,\n 内件(.dshpc-input / .dshpc-btn / .dshpc-iconbtn)把自己的边框、圆角、外圈交出来。\n\n 高度默认吃 --dshpc-control-h-*(sm 24 / md 28 / lg 32);调用方要自定义就在根节点\n 内联 height,这里让内件 height:100% 跟上 —— 内件档位高度只有 0,1,0,被本文件的\n 0,2,0 压掉,不会出现「外壳变高了、里面的框还是 32」。\n (⚠️ 别改成不写 height:100% 只靠 stretch:input 有确定高度时 flex 不会拉伸它。) */\n/* min-width:输入格是 flex:1,没有它时 inline-flex 按占位文字宽收得很窄(搜索框 + 按钮的典型用法会难看)。\n 要更宽 / 更窄由调用方在外面套壳或给 className,不许在这里写死 max-width。 */\n.dshpc-igroup{display:inline-flex;align-items:stretch;min-width:200px;max-width:100%;box-sizing:border-box;overflow:hidden;\n border:1px solid var(--dshpc-border-heavy);border-radius:var(--dshpc-radius-md);background:var(--dshpc-surface-1);}\n.dshpc-igroup--sm{height:var(--dshpc-control-h-sm);}\n.dshpc-igroup--md{height:var(--dshpc-control-h-md);}\n.dshpc-igroup--lg{height:var(--dshpc-control-h-lg);}\n.dshpc-igroup--error{border-color:var(--dshpc-danger);}\n/* 整体聚焦:内件自己的焦点圈交出来,由外壳画一整圈(各画各的会变成格内半圈) */\n.dshpc-igroup:focus-within{border-color:var(--dshpc-focus);box-shadow:0 0 0 1px var(--dshpc-focus);}\n\n/* 前置标题:与输入框同格,灰底区分(与 SplitGroup 左格同一口径) */\n.dshpc-igroup__label{display:inline-flex;align-items:center;flex:none;padding:0 8px;white-space:nowrap;\n background:var(--dshpc-surface-sunken);color:var(--dshpc-fg-2);\n font-size:var(--dshpc-font-sm);line-height:var(--dshpc-line-sm);}\n.dshpc-igroup--md .dshpc-igroup__label,.dshpc-igroup--lg .dshpc-igroup__label{font-size:var(--dshpc-font-md);line-height:var(--dshpc-line-md);}\n\n/* 输入格:交出边框 / 圆角 / 底色 / 焦点圈;宽度交给 flex(原生 width:100% 会和 flex-basis 打架) */\n.dshpc-igroup > .dshpc-input{flex:1 1 auto;width:auto;min-width:0;height:100%;border:0;border-radius:0;background:transparent;}\n.dshpc-igroup > .dshpc-input:focus{box-shadow:none;}\n\n/* 按钮格:交出边框与圆角;实心底色保留(右侧「确定」该有重量)。\n 纯图标钮本身是固定宽的方块,这里改成按高度撑出的正方形,自定义高度时才不会变成竖长条。 */\n.dshpc-igroup > .dshpc-btn,.dshpc-igroup > .dshpc-iconbtn{flex:none;height:100%;border-radius:0;}\n.dshpc-igroup > .dshpc-iconbtn{width:auto;aspect-ratio:1;}\n.dshpc-igroup > .dshpc-btn{border:0;}\n\n/* 分隔线:相邻兄弟的左描边,不额外插 DOM。后两条是给「清过边框」的格子补回来的,\n 必须写成 0,2,0 且写在上面的 border:0 之后 —— 否则被 border:0 压掉,格子之间没分隔。 */\n.dshpc-igroup > * + *{box-sizing:border-box;border-left:1px solid var(--dshpc-border);}\n.dshpc-igroup > * + .dshpc-input{box-sizing:border-box;border-left:1px solid var(--dshpc-border);}\n.dshpc-igroup > * + .dshpc-btn{box-sizing:border-box;border-left:1px solid var(--dshpc-border);}\n";
|
|
242
242
|
//#endregion
|
|
243
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
243
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/display/table-css.generated.js
|
|
244
244
|
const TABLE_BASE_CSS = "/* ── 表格基础层(结构 + 交互 + 空态)─────────────────────────────────────\n 外观分档 = 分组件 + 分文件:本文件只放所有外观共用的部分;\n 表头底色、分隔线、悬浮 / 选中色由皮肤文件负责(table-plain.css 是第一档)。\n 皮肤选择器一律挂在 .dshpc-table--<skin> 下,与基础层不同名 —— 注入顺序不影响胜负\n (test/css-contract.test.mjs 禁止跨常量同名选择器)。\n 圆角裁剪 / 横向滚动归调用方容器,本层不设 overflow;也不做表头吸顶:\n 分组表头是多行,统一 top:0 会在滚动时互相盖住(要吸顶请在外层容器处理)。 */\n\n.dshpc-table{--dshpc-table-pad-x:var(--dshpc-space-3);--dshpc-table-head-h:44px;--dshpc-table-row-h:48px;\n width:100%;table-layout:fixed;border-collapse:separate;border-spacing:0;box-sizing:border-box;\n color:var(--dshpc-fg);font-size:var(--dshpc-font-md);line-height:var(--dshpc-line-md);}\n\n/* 密度三档:只改行高与水平内距,配色与分隔线归皮肤。compact / comfortable 各一行,\n 新增档位在此追加;列级 padding 走内联 style 覆盖(不在这里再开一套变量)。\n 默认水平内距 12px(space-3)—— 参考稿的色块间距,16px 偏松。 */\n.dshpc-table--density-compact{--dshpc-table-pad-x:var(--dshpc-space-2);--dshpc-table-head-h:36px;--dshpc-table-row-h:36px;}\n.dshpc-table--density-comfortable{--dshpc-table-pad-x:var(--dshpc-space-4);--dshpc-table-head-h:52px;--dshpc-table-row-h:60px;}\n\n.dshpc-table__head-cell,.dshpc-table__cell{box-sizing:border-box;padding:var(--dshpc-space-1) var(--dshpc-table-pad-x);\n text-align:left;vertical-align:middle;font-weight:400;}\n\n/* 表头 44 / 数据行 48 是 default 档(参考稿密度);height 在 table-cell 上是最小高,\n 多行内容会自动把行撑高,不会被截断。 */\n.dshpc-table__head-cell{height:var(--dshpc-table-head-h);font-size:var(--dshpc-font-sm);font-weight:600;color:var(--dshpc-fg-2);}\n.dshpc-table__head-cell--group{text-align:center;}\n.dshpc-table__cell{height:var(--dshpc-table-row-h);}\n\n.dshpc-table__head-cell--center,.dshpc-table__cell--center{text-align:center;}\n.dshpc-table__head-cell--right,.dshpc-table__cell--right{text-align:right;}\n\n.dshpc-table__row{transition:background-color var(--dshpc-dur-fast) var(--dshpc-ease);}\n/* 只有传了 onRowClick 的行才是可点的(数据属性由组件按此打)。 */\n.dshpc-table__row[data-interactive='true']{cursor:pointer;}\n.dshpc-table__row:focus-visible{outline:2px solid var(--dshpc-focus);outline-offset:-2px;}\n\n/* 斑马纹是通用能力(表级 striped 开关),放在基础层:底色取 token,各档皮肤不必各自实现。\n 选择器刻意只到 3 个类级别(表级 + 行 + :nth-child);皮肤层的行态规则带 __body 上下文\n + 属性选择器,必然是 4 级 ⇒ 与注入顺序无关地压过它。\n 2026-10-30 真机事故:这里曾写满 4 级(多了一个 __body),与选中的 4 级相同 ⇒ 基础层\n 比皮肤后注入,偶数行永远被斑马纹盖住(「单数行能选中、双数行点了没反应」)。 */\n.dshpc-table--striped .dshpc-table__row:nth-child(even){background:var(--dshpc-plate);}\n\n/* 分组通栏:一个表格里放多个板块(工作区 A / 工作区 B)时,每组先来一行横跨全部列的大标题,\n 然后才是这一组自己的表头与数据行。结构 + 底色归基础层(只用 token,各档皮肤共同成立);\n 通栏底走 --dshpc-table-banner-bg(与表头互换的那一档,2026-10-30 用户定);\n 通栏与组表头之间画一条线(用户 2026-10-30:那之间也要有 border);\n 组与组之间用通栏顶线隔开,第一组顶部不画(外框已经在那儿,画了就成双线)。 */\n.dshpc-table__group-cell{height:var(--dshpc-table-head-h);padding:var(--dshpc-space-1) var(--dshpc-table-pad-x);\n box-sizing:border-box;background:var(--dshpc-table-banner-bg);border-top:1px solid var(--dshpc-border);\n border-bottom:1px solid var(--dshpc-border);\n text-align:left;vertical-align:middle;font-size:var(--dshpc-font-sm);font-weight:600;color:var(--dshpc-fg);}\n.dshpc-table__group-body:first-of-type .dshpc-table__group-cell{border-top:0;}\n\n/* 通栏标题的固定标签(短竖线)与排版由 SectionHead 自带(4px 圆头),本层不再画。 */\n\n.dshpc-table__empty{height:80px;padding:0 var(--dshpc-space-4);text-align:center;\n color:var(--dshpc-fg-3);font-size:var(--dshpc-font-sm);}\n\n/* 加载态行(加载更多 / 没有更多 / 整表加载):单元格自身不画边框(底部状态行的顶线由皮肤补),内容居中;\n 整表加载默认占位 160px(可由 loadingHeight 覆盖),底部那行只占一行高。 */\n.dshpc-table__state-cell{padding:0;border:0;text-align:center;vertical-align:middle;}\n.dshpc-table__state{display:flex;align-items:center;justify-content:center;\n gap:var(--dshpc-space-2);min-height:40px;padding:var(--dshpc-space-1) var(--dshpc-table-pad-x);\n box-sizing:border-box;color:var(--dshpc-fg-3);font-size:var(--dshpc-font-sm);}\n.dshpc-table__state--full{flex-direction:column;min-height:160px;gap:var(--dshpc-space-3);font-size:var(--dshpc-font-sm);}\n.dshpc-table__state-text{line-height:1;}\n/* 底部哨兵:零高、无边框、无内容,只给 IntersectionObserver 一个落点。 */\n.dshpc-table__sentinel>td{height:0;padding:0;border:0;line-height:0;}\n\n/* 内建分页的外壳:表格在上、分页条在下,间距走 space-3(分页条自己管左右对齐)。 */\n.dshpc-table-frame{display:flex;flex-direction:column;gap:var(--dshpc-space-3);}\n";
|
|
245
245
|
//#endregion
|
|
246
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
246
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/display/table-plain-css.generated.js
|
|
247
247
|
const TABLE_PLAIN_CSS = "/* ── 外观一 · Plain(第一个样式:白卡片上的轻量表格)─────────────────────\n 特征:外框 + 灰底表头(含下边线,双行分组表头也清楚)、竖向分隔线、\n 数据行只保留极淡底线(不画重横线)、行悬浮淡蓝、选中行淡蓝底 + 左侧 3px 蓝竖条。\n 选择器全部挂在 .dshpc-table--plain 下,和基础层不同名(注入顺序无关)。\n 竖分隔线按列声明(格子上的 data-divider),不用相邻兄弟选择器 —— 后者会让每行首格\n 永远没有左线(用户 2026-10-30 真机看到的 Name 左侧缺线),且单元格跨列后会画错位置。\n 后续外观照此另建:table-grid.css / table-zebra.css,各自一个组件、各自 import 自己那份。 */\n\n/* 外框四态:all 四边 / x 只有左右 / y 只有上下 / none 全不要。\n 组件总会按 borders 属性和上对应 class,故这里不存在「无 class 的裸表」。\n 「不要左右两条边」就是 borders='y'。 */\n.dshpc-table--plain.dshpc-table--borders-all{border:1px solid var(--dshpc-border);}\n.dshpc-table--plain.dshpc-table--borders-x{border-left:1px solid var(--dshpc-border);\n border-right:1px solid var(--dshpc-border);}\n.dshpc-table--plain.dshpc-table--borders-y{border-top:1px solid var(--dshpc-border);\n border-bottom:1px solid var(--dshpc-border);}\n.dshpc-table--plain.dshpc-table--borders-none{border:0;}\n\n/* 表头:中性灰底 + 下边线。底色走 --dshpc-table-head-bg(= --dshpc-surface-sunken,\n 与通栏那层灰同源;2026-10-30 用户二次定案:表头 / 通栏互换底色);下边线兜住分组表头的第二层。 */\n.dshpc-table--plain .dshpc-table__head-cell{\n background:var(--dshpc-table-head-bg);\n border-bottom:1px solid var(--dshpc-border);\n}\n.dshpc-table--plain .dshpc-table__head-cell--group{color:var(--dshpc-fg-3);}\n\n/* 表头多色:列级 headerTone 打到 data-header-tone,浅底 + 同色文字。\n 色值全部来自 token(soft 底 / 实色字),暗色主题自动跟随,不写死任何 hex。\n 这组规则比上方灰底规则多一个属性选择器,必然覆盖默认灰底。 */\n.dshpc-table--plain .dshpc-table__head-cell[data-header-tone='business']{background:var(--dshpc-business-soft);color:var(--dshpc-business);}\n.dshpc-table--plain .dshpc-table__head-cell[data-header-tone='success']{background:var(--dshpc-success-soft);color:var(--dshpc-success);}\n.dshpc-table--plain .dshpc-table__head-cell[data-header-tone='warning']{background:var(--dshpc-warning-soft);color:var(--dshpc-warning);}\n.dshpc-table--plain .dshpc-table__head-cell[data-header-tone='danger']{background:var(--dshpc-danger-soft);color:var(--dshpc-danger);}\n.dshpc-table--plain .dshpc-table__head-cell[data-header-tone='purple']{background:var(--dshpc-purple-soft);color:var(--dshpc-purple);}\n.dshpc-table--plain .dshpc-table__head-cell[data-header-tone='pink']{background:var(--dshpc-pink-soft);color:var(--dshpc-pink);}\n.dshpc-table--plain .dshpc-table__head-cell[data-header-tone='cyan']{background:var(--dshpc-cyan-soft);color:var(--dshpc-cyan);}\n.dshpc-table--plain .dshpc-table__head-cell[data-header-tone='teal']{background:var(--dshpc-teal-soft);color:var(--dshpc-teal);}\n.dshpc-table--plain .dshpc-table__head-cell[data-header-tone='orange']{background:var(--dshpc-orange-soft);color:var(--dshpc-orange);}\n.dshpc-table--plain .dshpc-table__head-cell[data-header-tone='indigo']{background:var(--dshpc-indigo-soft);color:var(--dshpc-indigo);}\n.dshpc-table--plain .dshpc-table__head-cell[data-header-tone='rose']{background:var(--dshpc-rose-soft);color:var(--dshpc-rose);}\n.dshpc-table--plain .dshpc-table__head-cell[data-header-tone='slate']{background:var(--dshpc-slate-soft);color:var(--dshpc-slate);}\n\n/* 竖分隔线:按列声明,**默认不画**。组件只给 divider: true 的列打 data-divider='left',\n 首列恒不画(那是外框的位置)。默认表格 = 只有横线、没有一条竖线;\n 要「列间有线」就给对应列 divider:true。 */\n.dshpc-table--plain .dshpc-table__head-cell[data-divider='left'],\n.dshpc-table--plain .dshpc-table__cell[data-divider='left']{border-left:1px solid var(--dshpc-border);}\n\n/* 数据行之间的极淡底线:只帮眼睛「分行」,不回到粗横线表格的老样子。 */\n.dshpc-table--plain .dshpc-table__row + .dshpc-table__row .dshpc-table__cell{\n border-top:1px solid var(--dshpc-border-faint);\n}\n\n/* 底部状态行(加载更多 / 到底):整行通栏,与上方数据行之间补一条实线。\n 只补顶线:左右两条不由这一格重复画 —— borders=all / x 时表级外框已经兜住;\n borders=y / none 本来就没有左右边。整表加载占位行不加(表头已有下边线,再加就成双线)。 */\n.dshpc-table--plain .dshpc-table__state-row--footer .dshpc-table__state-cell{\n border-top:1px solid var(--dshpc-border);\n}\n\n/* 没有左右外框时(borders=y)底部状态行下面那条表底线也去掉:\n 状态行只留上方一条实线,否则图标 / 文案下方还多一条孤线(2026-10-31 用户定)。\n borders=none 本来就没有底边,无需在此重复。 */\n.dshpc-table--plain.dshpc-table--borders-y.dshpc-table--foot-no-bottom{border-bottom:0;}\n\n/* 行悬浮:只在可点行上给反馈,静态表格不误导用户以为能点。\n 底色是极淡中性灰(--dshpc-table-row-hover:亮色一层淡黑 ≈1.5%,暗色一层淡白 ≈3%)——\n 2026-10-30 用户:hover 要特别淡的灰、不要淡蓝(第二次又要求再浅一半)。带 __body 上下文是为了压过基础层的斑马纹(见 table.css)。 */\n.dshpc-table--plain .dshpc-table__body .dshpc-table__row[data-interactive='true']:hover{background:var(--dshpc-table-row-hover);}\n\n/* 选中行:淡蓝底 + 左侧蓝竖条。用背景渐变画条,避免 tr 上伪元素 / 定位的兼容问题;\n 两条选择器同一份声明:悬浮态(多一个属性 + 伪类)不会盖掉选中态。\n 底色用 business-soft(比悬浮再明确一档但仍是浅色),条本身才是「选中」的信号。\n 特异性 4 级,高于基础层的斑马纹(3 级)⇒ 偶数行也能正常选中。 */\n.dshpc-table--plain .dshpc-table__body .dshpc-table__row[data-selected='true'],\n.dshpc-table--plain .dshpc-table__body .dshpc-table__row[data-selected='true'][data-interactive='true']:hover{\n background:linear-gradient(to right,var(--dshpc-business) 3px,var(--dshpc-business-soft) 3px);\n}\n";
|
|
248
248
|
//#endregion
|
|
249
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
249
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/navigation/pagination-css.generated.js
|
|
250
250
|
const PAGINATION_CSS = "/* ── 分页(‹ Previous 1 2 3 … 36 Next ›)────────────────────────────────────\n 当前页 = 蓝色圆角方块 + 白字(实心面的字必须走 --dshpc-on-signal,不许用主题反色);\n 其余页码是纯文字按钮,悬浮只给极淡中性底。对齐由 --left / --center / --right 三个修饰决定,\n 组件默认 right。颜色全部走 token,明暗自动跟随宿主。 */\n\n.dshpc-pagination{display:flex;align-items:center;gap:var(--dshpc-space-2);flex-wrap:wrap;\n font-size:var(--dshpc-font-sm);line-height:1;color:var(--dshpc-fg-2);}\n\n.dshpc-pagination--left{justify-content:flex-start;}\n.dshpc-pagination--center{justify-content:center;}\n.dshpc-pagination--right{justify-content:flex-end;}\n\n.dshpc-pagination__total{color:var(--dshpc-fg-3);margin-inline-end:var(--dshpc-space-1);}\n\n.dshpc-pagination__pages{display:flex;align-items:center;gap:2px;}\n\n/* 页码 / 上下页 = 核心 Button(当前页 info 实心蓝、其余 ghost),箭头 = 全站唯一 Chevron。\n 这里只补尺寸与间距,不重画按钮皮肤;两级选择器压过 .dshpc-btn--md 的内距。 */\n.dshpc-pagination .dshpc-pagination__page{padding:0 6px;min-width:28px;}\n.dshpc-pagination .dshpc-pagination__nav{padding:0 var(--dshpc-space-2);}\n\n.dshpc-pagination__ellipsis{display:inline-flex;align-items:center;justify-content:center;\n min-width:28px;height:28px;color:var(--dshpc-fg-3);}\n\n.dshpc-pagination__simple{min-width:64px;text-align:center;font-variant-numeric:tabular-nums;\n color:var(--dshpc-fg);}\n\n/* 简洁模式只留箭头:文字标签隐藏,箭头仍然可见(无障碍名还在 aria-label 上)。 */\n.dshpc-pagination--simple .dshpc-pagination__text{display:none;}\n\n/* 每页条数下拉 = 核心 Picker(箭头是全站唯一的 Chevron):只收窄不参与伸缩。 */\n.dshpc-pagination__size{flex:none;}\n";
|
|
251
251
|
//#endregion
|
|
252
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
252
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/display/section-head-css.generated.js
|
|
253
253
|
const SECTION_HEAD_CSS = "/* 分区标题行:标签(可选,画出来的短竖线)/ icon + 标题 + 右侧控件。 */\n.dshpc-section-head{display:flex;align-items:center;gap:var(--dshpc-space-2);\n margin-bottom:var(--dshpc-space-3);}\n.dshpc-section-head--flush{margin-bottom:0;}\n\n.dshpc-section-head__bar{flex:none;width:4px;height:1em;border-radius:999px;\n font-size:var(--dshpc-font-lg);background:var(--dshpc-fg-2);}\n\n.dshpc-section-head__icon{display:inline-flex;align-items:center;flex:none;\n line-height:var(--dshpc-line-lg);color:var(--dshpc-fg-3);}\n\n.dshpc-section-head__title{font-size:var(--dshpc-font-lg);line-height:var(--dshpc-line-lg);\n font-weight:600;color:var(--dshpc-fg);flex:none;}\n\n.dshpc-section-head__right{flex:1;display:flex;align-items:center;\n justify-content:flex-end;gap:var(--dshpc-space-2);min-width:0;}\n";
|
|
254
254
|
//#endregion
|
|
255
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
255
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/feedback/Loader.js
|
|
256
256
|
/**
|
|
257
257
|
* Loader —— 统一的加载动画图标(UI 基础层 · 反馈族)。
|
|
258
258
|
*
|
|
@@ -335,13 +335,13 @@ window.__ModuleLoader__.load({
|
|
|
335
335
|
}, variant === "ring" ? ringNode() : blockNodes());
|
|
336
336
|
}
|
|
337
337
|
//#endregion
|
|
338
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
338
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/infra/overlay-css.generated.js
|
|
339
339
|
const OVERLAY_CSS = "/* 浮层公共骨架:遮罩 + 头部。Modal(居中)/ SideSheet(侧边)/ 选文件弹窗(锚定)共用这一份,\n 各家各自 registerStyle 同一份(幂等),谁也不许再抄一份遮罩。\n 关闭钮的皮肤在 panel.css(.dshpc-panel__close,旧类名作别名),不在这里再写一份。 */\n\n/* 遮罩 = 宿主遮罩变量 --dsw-alias-bg-mask-1(与官方 Modal / 兄弟项目 --tdt-mask 同一条真值,用户 2026-10-20)。 */\n/* 右边界让位页面级分栏(PanelDock 发布的 --dshpc-page-inset-right,用户 2026-10-22):\n 分栏不被压暗、照常可点;浮层在这块**剩下**的区域里排版,就像整页被推出去一样。 */\n.dshpc-overlay{\n position:fixed;inset:0 var(--dshpc-page-inset-right,0px) 0 0;\n background:var(--dshpc-mask);\n}\n/* 锁定态:禁用手势挂在遮罩上(面板外那一圈也要一致)。 */\n.dshpc-overlay[data-dshpc-locked]{cursor:not-allowed}\n/* 锁定时的透明点击层:吃指针、不改任何外观(变灰由各控件自己的 :disabled 负责)。\n 全透明是刻意的 —— 盖一层灰会让人以为界面坏了。 */\n.dshpc-lock-catcher{position:absolute;inset:0;z-index:1;cursor:not-allowed}\n/* 锁定态:消费方自绘的原生表单元素也「看起来禁用」。\n 整条选择器包在 :where() 里 = 特异性 0 —— 消费方任意一条自己的规则都能盖回来,我们只当默认值。\n 只写 opacity / cursor 两个属性;不想被灰就在自己元素上写 --dshpc-lock-dim: 1。\n 解锁 = 规则不再匹配,不存在「还原」,也就不会冲掉别人写的样式。 */\n:where(.dshpc-locked button:not(:disabled),.dshpc-locked input:not(:disabled),.dshpc-locked select:not(:disabled),.dshpc-locked textarea:not(:disabled)){\n opacity:var(--dshpc-lock-dim);cursor:not-allowed;\n}\n/* 居中档(Modal):z 走 modal 档。 */\n.dshpc-overlay--center{\n display:flex;align-items:center;justify-content:center;\n z-index:var(--dshpc-z-modal);\n}\n/* 侧边档(SideSheet):面板 absolute 贴边,不需要 flex 居中;z 走 drawer 档(低于 modal)。 */\n.dshpc-overlay--side{z-index:var(--dshpc-z-drawer)}\n/* 锚定档(选文件弹窗):遮罩照旧压暗 + 点外部关闭,面板自己 fixed 贴锚点,这里不做布局。 */\n.dshpc-overlay--plain{z-index:var(--dshpc-z-panel)}\n\n/* 头部四槽:左图标 / 标题组 / 弹性间隔 / 右侧动作区 + 关闭钮。\n 上下内距必须相等(18/12 会让标题离面板顶远、离分隔线近,用户 2026-11-02)。 */\n.dshpc-overlay-head{\n display:flex;align-items:center;gap:8px;padding:18px;\n border-bottom:1px solid var(--dshpc-border);flex-wrap:wrap;\n}\n.dshpc-overlay-head__heading{display:flex;align-items:center;gap:8px;min-width:0;flex:0 1 auto}\n/* 调用方整块自定义的标题区:占满左侧可用宽度、可换行(不是标题文字,别套标题字号)。 */\n.dshpc-overlay-head__heading--custom{flex:1 1 auto;flex-wrap:wrap}\n/* 图标尺寸只认核心 1em 基线(button.css:112):这里不写死 16px 放大,调用方传的 size 也一并接管。 */\n.dshpc-overlay-head__lead{flex:none;display:inline-flex;align-items:center;justify-content:center;font-size:var(--dshpc-font-lg);line-height:1}\n.dshpc-overlay-head__lead svg{display:block;width:1em;height:1em;flex:none;}\n/* 标题组:第一行 = 标题 + 右侧小块(徽标紧跟标题),第二行 = 副标题。 */\n.dshpc-overlay-head__titlegroup{display:flex;flex-direction:column;gap:2px;min-width:0;flex:0 1 auto}\n.dshpc-overlay-head__titlerow{display:flex;align-items:center;gap:8px;min-width:0}\n.dshpc-overlay-head__title{font-size:var(--dshpc-font-lg);font-weight:600;line-height:1.4;min-width:0}\n/* 标题下副标题行(兄弟项目 .dsh-tdt-sv-sid:等宽字体、caption 色、可换行)。 */\n.dshpc-overlay-head__sid{font-family:var(--ds-font-family-code,monospace);font-size:var(--dshpc-font-xs);color:var(--dshpc-fg-3);word-break:break-all}\n.dshpc-overlay-head__extra{flex:none;display:inline-flex;align-items:center}\n.dshpc-overlay-head__spacer{flex:1 1 auto;min-width:8px}\n.dshpc-overlay-head__actions{flex:none;display:flex;align-items:center;gap:8px}\n";
|
|
340
340
|
//#endregion
|
|
341
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
341
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/infra/panel-css.generated.js
|
|
342
342
|
const PANEL_CSS = "/* 浮层面板皮肤(2026-11-03 用户定:皮肤统一,只改样式不动交互)。\n *\n * 这份文件是**所有「浮起来的框」的皮肤真源**。定位(fixed / absolute、贴谁、怎么翻转、多大的\n * 层序)留在各自控件里,这里只管表面四件:底色 / 描边宽 / 圆角 / 阴影。\n * ⚠️ 组件 CSS 里不许再写这四个字面值 —— 想改外观就改这里,别在消费方另起一套。\n *\n * 三档(差异只在这三段定义,别处分叉):\n * --modal 居中模态(Modal / ConfirmModal / AlertModal 家族)\n * --popover 贴锚点的浮层面板(pickWorkspaceFile 选文件弹窗、DateTimePicker 弹层)\n * --menu 下拉菜单(文件浏览器 ▾ 选层、Picker 下拉)\n *\n * 不并入三档的:PanelDock 与 SideSheet 是**贴边家族**(side-panel.css 的\n * .dshpc-side-surface,surface-base、无外描边)—— 2026-11-02 拍板「两者皮肤一模一样」,\n * 一个是布局成员、一个是贴边抽屉,都不是浮层。\n */\n.dshpc-panel{\n background:var(--dshpc-panel-bg);color:var(--dshpc-fg);\n border:var(--dshpc-panel-bw) solid var(--dshpc-border);\n border-radius:var(--dshpc-panel-radius);box-shadow:var(--dshpc-panel-shadow);\n}\n.dshpc-panel--modal{\n --dshpc-panel-bg:var(--dshpc-surface-1);\n --dshpc-panel-bw:3px;\n --dshpc-panel-radius:var(--dshpc-radius-xl);\n --dshpc-panel-shadow:var(--dshpc-shadow-2);\n overflow:hidden;\n}\n.dshpc-panel--popover{\n --dshpc-panel-bg:var(--dshpc-surface-1);\n --dshpc-panel-bw:1px;\n --dshpc-panel-radius:var(--dshpc-radius-lg);\n --dshpc-panel-shadow:var(--dshpc-shadow-2);\n overflow:hidden;\n /* 与 menu 同口径的加重描边;日期弹层与选文件弹窗共用这一档(2026-11-06)。 */\n border-color:var(--dshpc-border-heavy);\n}\n.dshpc-panel--menu{\n /* 菜单底与模态同一层(用户 2026-11-03:别用页面底色,暗色下看着全黑)。 */\n --dshpc-panel-bg:var(--dshpc-surface-1);\n --dshpc-panel-bw:1px;\n /* 圆角与 popover 档统一成 lg(2026-11-06 用户:下拉框也改成 16)。 */\n --dshpc-panel-radius:var(--dshpc-radius-lg);\n --dshpc-panel-shadow:var(--dshpc-shadow-1);\n /* 下拉菜单同样加重描边;modal 的 3px 边框不动。 */\n border-color:var(--dshpc-border-heavy);\n}\n\n/* 浮层唯一的关闭钮(20×20 方角图标位)。\n 旧类名 .dshpc-overlay-head__close 保留为别名:消费方写在旧类名上的覆盖仍生效。 */\n.dshpc-panel__close,.dshpc-overlay-head__close{\n display:inline-flex;align-items:center;justify-content:center;flex:none;\n width:20px;height:20px;padding:0;border:none;border-radius:var(--dshpc-radius-sm);\n background:transparent;color:var(--dshpc-fg-3);font-family:inherit;font-size:13px;line-height:1;cursor:pointer;\n transition:background-color var(--dshpc-dur-fast) var(--dshpc-ease),color var(--dshpc-dur-fast) var(--dshpc-ease);\n}\n.dshpc-panel__close:hover,.dshpc-overlay-head__close:hover{background:var(--dshpc-hover);color:var(--dshpc-fg)}\n.dshpc-panel__close:focus-visible,.dshpc-overlay-head__close:focus-visible{outline:2px solid var(--dshpc-focus);outline-offset:1px}\n\n/* .dshpc-scroll-thin(细滚动条)的唯一定义已移到 design/tokens.css 的 tokens 域:\n 那里全局必在、挂类即生效。这里不再写第二份。 */\n";
|
|
343
343
|
//#endregion
|
|
344
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
344
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/infra/panel.js
|
|
345
345
|
/**
|
|
346
346
|
* 浮层面板公共件(2026-11-03):`PanelSurface` = 皮肤载体,`PanelClose` = 唯一那枚关闭钮。
|
|
347
347
|
*
|
|
@@ -376,7 +376,7 @@ window.__ModuleLoader__.load({
|
|
|
376
376
|
}, props.icon ?? "✕");
|
|
377
377
|
}
|
|
378
378
|
//#endregion
|
|
379
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
379
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/infra/overlay.js
|
|
380
380
|
/**
|
|
381
381
|
* 浮层公共件 —— Modal 与 SideSheet 共用,**别各写一份**。
|
|
382
382
|
*
|
|
@@ -460,7 +460,7 @@ window.__ModuleLoader__.load({
|
|
|
460
460
|
}));
|
|
461
461
|
}
|
|
462
462
|
//#endregion
|
|
463
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
463
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/infra/thenable.js
|
|
464
464
|
/** 返回值是不是 thenable。Button 的自动 loading 与命令式弹窗的收尾共用这一份判定。 */
|
|
465
465
|
function isThenable(value) {
|
|
466
466
|
if (value === null || value === void 0) return false;
|
|
@@ -475,7 +475,7 @@ window.__ModuleLoader__.load({
|
|
|
475
475
|
return value !== false;
|
|
476
476
|
}
|
|
477
477
|
//#endregion
|
|
478
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
478
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/actions/Button.js
|
|
479
479
|
/**
|
|
480
480
|
* 按钮 / 图标钮 —— **全站唯一实现**(L2 组件皮肤,P2)
|
|
481
481
|
*
|
|
@@ -575,7 +575,7 @@ window.__ModuleLoader__.load({
|
|
|
575
575
|
* @param props 见 {@link ButtonProps}。
|
|
576
576
|
* @returns 按钮元素。
|
|
577
577
|
*/
|
|
578
|
-
function Button$
|
|
578
|
+
function Button$4(props) {
|
|
579
579
|
ensureComponentStyles("button", BUTTON_CSS);
|
|
580
580
|
const { variant = "outline", size = "lg", icon, iconRight, color, loading: loadingProp = false, loadingText = true, block = false, dense = false, width, minWidth, maxWidth, className, style, children, onClick, onBusyChange, ...rest } = props;
|
|
581
581
|
const btnRef = (0, react$1.useRef)(null);
|
|
@@ -682,7 +682,7 @@ window.__ModuleLoader__.load({
|
|
|
682
682
|
return (0, react$1.createElement)("button", attrs, loading ? (0, react$1.createElement)(Loader$2, { size: "xs" }) : icon);
|
|
683
683
|
}
|
|
684
684
|
//#endregion
|
|
685
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
685
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/utils/i18n.js
|
|
686
686
|
/**
|
|
687
687
|
* utils 自带的最小多语言。
|
|
688
688
|
*
|
|
@@ -906,6 +906,28 @@ window.__ModuleLoader__.load({
|
|
|
906
906
|
askInterrupted: "已中断",
|
|
907
907
|
askInterruptedDetail: "本轮已中断,未提交回答",
|
|
908
908
|
askWaiting: "等待回答",
|
|
909
|
+
askPanelPrev: "上一题",
|
|
910
|
+
askPanelNext: "下一题",
|
|
911
|
+
askPanelMinimize: "收起问题卡片",
|
|
912
|
+
askPanelMaximize: "展开问题卡片",
|
|
913
|
+
askPanelClose: "收起问题面板,可从工具调用重新打开",
|
|
914
|
+
askPanelCancel: "放弃整组问题",
|
|
915
|
+
askPanelExpand: "展开",
|
|
916
|
+
askPanelCollapse: "收起",
|
|
917
|
+
askPanelRecommended: "推荐",
|
|
918
|
+
askPanelCustomPlaceholder: "输入你的答案",
|
|
919
|
+
askPanelSkip: "跳过",
|
|
920
|
+
askPanelSubmit: "提交",
|
|
921
|
+
askPanelSubmitting: "提交中…",
|
|
922
|
+
askPanelErrorUnanswered: "请选择一个选项或填写自定义答案。",
|
|
923
|
+
askPanelErrorIncomplete: "请先完成这道问题。",
|
|
924
|
+
askPanelErrorUnavailable: "当前无法提交,请稍候再试。",
|
|
925
|
+
askPanelContinued: "已继续工作,仍可回答",
|
|
926
|
+
askPanelCountdown: "{seconds} 秒后继续工作",
|
|
927
|
+
askPanelWaitPaused: "已暂停 · 剩余 {seconds} 秒",
|
|
928
|
+
replyLabel: "问题与回答",
|
|
929
|
+
replySkipped: "已跳过",
|
|
930
|
+
replyAnswerLabel: "回答:",
|
|
909
931
|
detailState: "状态",
|
|
910
932
|
detailGoalEmpty: "没有目标",
|
|
911
933
|
detailGoalDisarmed: "等待继续",
|
|
@@ -1205,6 +1227,11 @@ window.__ModuleLoader__.load({
|
|
|
1205
1227
|
deliverExpandAria: "展开全部 {count} 个交付文件",
|
|
1206
1228
|
deliverCollapseAria: "收起交付文件列表",
|
|
1207
1229
|
composerPlaceholder: "继续说点什么…",
|
|
1230
|
+
approvalWaiting: "等待审批",
|
|
1231
|
+
approvalDetailAria: "审批详情",
|
|
1232
|
+
approvalEscalation: "工具 {toolName} 请求越权执行",
|
|
1233
|
+
approvalReject: "拒绝",
|
|
1234
|
+
approvalAllowOnce: "允许一次",
|
|
1208
1235
|
dtPlaceholder: "请选择日期时间",
|
|
1209
1236
|
dtStart: "开始",
|
|
1210
1237
|
dtEnd: "结束",
|
|
@@ -1447,6 +1474,28 @@ window.__ModuleLoader__.load({
|
|
|
1447
1474
|
askInterrupted: "interrupted",
|
|
1448
1475
|
askInterruptedDetail: "This question set was interrupted before answers were submitted.",
|
|
1449
1476
|
askWaiting: "waiting",
|
|
1477
|
+
askPanelPrev: "Previous question",
|
|
1478
|
+
askPanelNext: "Next question",
|
|
1479
|
+
askPanelMinimize: "Collapse question card",
|
|
1480
|
+
askPanelMaximize: "Expand question card",
|
|
1481
|
+
askPanelClose: "Close the panel — reopen it from the tool call",
|
|
1482
|
+
askPanelCancel: "Dismiss all questions",
|
|
1483
|
+
askPanelExpand: "Expand",
|
|
1484
|
+
askPanelCollapse: "Collapse",
|
|
1485
|
+
askPanelRecommended: "Recommended",
|
|
1486
|
+
askPanelCustomPlaceholder: "Type your answer",
|
|
1487
|
+
askPanelSkip: "Skip",
|
|
1488
|
+
askPanelSubmit: "Submit",
|
|
1489
|
+
askPanelSubmitting: "Submitting…",
|
|
1490
|
+
askPanelErrorUnanswered: "Choose an option or type a custom answer.",
|
|
1491
|
+
askPanelErrorIncomplete: "Finish this question first.",
|
|
1492
|
+
askPanelErrorUnavailable: "Cannot submit right now; try again shortly.",
|
|
1493
|
+
askPanelContinued: "continued; still answerable",
|
|
1494
|
+
askPanelCountdown: "continues in {seconds}s",
|
|
1495
|
+
askPanelWaitPaused: "paused · {seconds}s left",
|
|
1496
|
+
replyLabel: "Questions and answers",
|
|
1497
|
+
replySkipped: "Skipped",
|
|
1498
|
+
replyAnswerLabel: "Answer: ",
|
|
1450
1499
|
detailState: "Status",
|
|
1451
1500
|
detailGoalEmpty: "No goal",
|
|
1452
1501
|
detailGoalDisarmed: "Awaiting continuation",
|
|
@@ -1746,6 +1795,11 @@ window.__ModuleLoader__.load({
|
|
|
1746
1795
|
deliverExpandAria: "Expand all {count} delivered files",
|
|
1747
1796
|
deliverCollapseAria: "Collapse the delivered-files list",
|
|
1748
1797
|
composerPlaceholder: "Say something to continue…",
|
|
1798
|
+
approvalWaiting: "Waiting for approval",
|
|
1799
|
+
approvalDetailAria: "Approval details",
|
|
1800
|
+
approvalEscalation: "Tool {toolName} requests privileged execution",
|
|
1801
|
+
approvalReject: "Reject",
|
|
1802
|
+
approvalAllowOnce: "Allow once",
|
|
1749
1803
|
dtPlaceholder: "Date & time",
|
|
1750
1804
|
dtStart: "Start",
|
|
1751
1805
|
dtEnd: "End",
|
|
@@ -1798,13 +1852,13 @@ window.__ModuleLoader__.load({
|
|
|
1798
1852
|
});
|
|
1799
1853
|
}
|
|
1800
1854
|
//#endregion
|
|
1801
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
1855
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/feedback/feedback-css.generated.js
|
|
1802
1856
|
const FEEDBACK_CSS = "/* 遮罩与头部在 overlay.css,表面(底色/描边/圆角/阴影)在 panel.css 的 --modal 档,\n 这里只剩**家族布局与尺寸**。三者各管一段,别再把皮肤抄回来。 */\n.dshpc-modal{\n display:flex;flex-direction:column;box-sizing:border-box;\n}\n/* body = 唯一滚动容器:内距与滚动都归它(滚动条贴面板右缘,不被内距挤进来);\n 内容按流排,不设 height:100%、不自己开滚动条。\n 细滚动条与 1px 让位由 .dshpc-scroll-thin 统一给(口径见 style.md §滚动条让位)。 */\n.dshpc-modal__body{flex:1 1 auto;min-height:0;overflow:auto;padding:17px 18px}\n\n/* 底栏与头部同一口径(2026-11-02 用户):上下内距相等、内容垂直居中、默认带一条分隔线。\n 线可由消费方关掉(Modal 的 footerDivider=false)—— 确认框家族本来就没有线(与头部一致)。 */\n.dshpc-modal .dshpc-modal__foot{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:18px;border-top:1px solid var(--dshpc-border)}\n.dshpc-modal .dshpc-modal__foot--bare{border-top:none}\n/* 底栏左侧的过程提示:吃掉按钮之外的剩余宽,超长交给 FlipText 省略 / hover 跑马灯。 */\n.dshpc-modal .dshpc-modal__notice{flex:1 1 auto;min-width:0;font-size:var(--dshpc-font-sm);line-height:var(--dshpc-line-sm);color:var(--dshpc-fg-3)}\n/* 自绘 toast 的样式在 2026-11-03 删除:Toast 早已改走宿主 toast()(Toast.ts 的 showNative),\n .dshpc-toast* 这几个类没有任何消费者,留着只是死样式(还带着裸 z-index 与裸阴影)。 */\n.dshpc-error__retry{\n margin-top:8px;color:var(--dshpc-link);cursor:pointer;background:none;border:none;padding:0;\n}\n/* 原生弹窗演示:经宿主 Modal 的 contentClassName 注入,证明宿主内容区尺寸可经类名自定义。 */\n.dshpc-native-demo-content{max-width:520px}\n/* 头部信号图标(AlertModal 按 severity 注入):自含配色,色值在 tokens.css 的 --dshpc-sev-*。 */\n.dshpc-alert-sev{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:50%;font-size:12px;color:var(--dshpc-on-signal);flex:none}\n.dshpc-alert-sev--info{background:var(--dshpc-sev-info)}\n.dshpc-alert-sev--success{background:var(--dshpc-sev-success)}\n.dshpc-alert-sev--warning{background:var(--dshpc-sev-warning)}\n.dshpc-alert-sev--error{background:var(--dshpc-sev-error)}\n/* 小确认框家族(sm):严格抄兄弟项目 renderConfirm 的 dialogStyle(task-list.tsx:456)——\n 360px 宽 / 18px 内距 / 头部无分隔线 / 说明文字 fg-2 / 底部按钮右对齐。 */\n.dshpc-modal--sm{padding:18px}\n.dshpc-modal--sm .dshpc-overlay-head{padding:0 0 8px;border-bottom:none}\n.dshpc-modal--sm .dshpc-modal__body{padding:0 0 14px;overflow:visible;font-size:var(--dshpc-font-sm);color:var(--dshpc-fg-2);line-height:var(--dshpc-line-sm)}\n.dshpc-modal--sm .dshpc-modal__foot{padding:0;border-top:none}\n/* 锁定态(locked):只给透明点击层做定位锚点,**不压任何遮罩** —— 盖灰会让人以为界面坏了;\n 变灰是各控件自己 :disabled 的事(Button / Input / Picker … 本来就有那套样式)。 */\n.dshpc-modal--locked{position:relative}\n";
|
|
1803
1857
|
//#endregion
|
|
1804
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
1858
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/display/flip-css.generated.js
|
|
1805
1859
|
const FLIP_CSS = "/* 翻牌文本(FlipText):一个单行窗口 + 两层同格叠放,换字时旧的上移出、新的从下进。\n 溢出(三点省略 + hover 跑马灯)不在这里做 —— 交给 MarqueeText,本文件只管裁剪与切换动效。\n 叠放用 grid 同格而不是绝对定位:容器高度天然等于一行,不用测量、也不依赖 lh 单位。 */\n.dshpc-flip{--dshpc-flip-dur:260ms;--dshpc-flip-ease:cubic-bezier(.22,.61,.36,1);display:grid;min-width:0;overflow:hidden}\n.dshpc-flip__item{grid-area:1/1;min-width:0}\n.dshpc-flip__in{animation:dshpc-flip-in var(--dshpc-flip-dur) var(--dshpc-flip-ease) both}\n.dshpc-flip__out{animation:dshpc-flip-out var(--dshpc-flip-dur) var(--dshpc-flip-ease) both}\n@keyframes dshpc-flip-in{from{transform:translateY(100%);opacity:0}to{transform:translateY(0);opacity:1}}\n@keyframes dshpc-flip-out{from{transform:translateY(0);opacity:1}to{transform:translateY(-100%);opacity:0}}\n/* 前庭敏感 / 低性能设备关掉位移动画:换字仍在,只是不再翻。\n 旧帧没有动画可播,必须自己隐形 —— 两层同格叠放,留着就重影。 */\n@media (prefers-reduced-motion:reduce){\n .dshpc-flip__in,.dshpc-flip__out{animation:none}\n .dshpc-flip__out{opacity:0}\n}\n/* 扫光(sweep):常驻循环,停在原地的提示也看得出在动。开关默认关,弹窗 / 抽屉底栏默认开。\n 光必须只落在字上:盖一层半透明光带的话,notice 是 flex:1 撑开的宽容器,右侧大片空白\n 里会出现一条白光在扫。故把光做成文字自己的 background + background-clip:text 裁到字形;\n 基色取 currentColor ⇒ 调用方换字色也跟着走,不需要知道文字宽度。 */\n.dshpc-flip--sweep .dshpc-mq-in{\n background-image:linear-gradient(105deg,currentColor 0,currentColor 47%,color-mix(in srgb,var(--dshpc-on-signal) 70%,currentColor) 50%,currentColor 53%,currentColor 100%);\n background-size:300% 100%;background-repeat:no-repeat;\n background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;\n animation:dshpc-flip-sweep 1.5s linear infinite;\n}\n/* 1.5s 一轮:前 40% 扫完,其余停在视野外休息 —— 一直扫会晃眼,间歇才像「还在干活」。 */\n@keyframes dshpc-flip-sweep{0%{background-position:100% 0}40%,100%{background-position:0 0}}\n@media (prefers-reduced-motion:reduce){\n .dshpc-flip--sweep .dshpc-mq-in{animation:none;background-image:none;-webkit-text-fill-color:currentColor}\n}\n";
|
|
1806
1860
|
//#endregion
|
|
1807
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
1861
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/display/FlipText.js
|
|
1808
1862
|
/**
|
|
1809
1863
|
* 翻牌文本 —— 一行文字,换字时旧的上移出、新的从下进(机场翻牌那种)。
|
|
1810
1864
|
*
|
|
@@ -1867,7 +1921,7 @@ window.__ModuleLoader__.load({
|
|
|
1867
1921
|
}, (0, react$1.createElement)(MarqueeText, { text: slot.curr })));
|
|
1868
1922
|
}
|
|
1869
1923
|
//#endregion
|
|
1870
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
1924
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/feedback/Modal.js
|
|
1871
1925
|
/**
|
|
1872
1926
|
* 模态弹窗(自绘 overlay,**不用 react-dom 的 portal**,避免多一个必需依赖)。
|
|
1873
1927
|
*
|
|
@@ -1930,7 +1984,7 @@ window.__ModuleLoader__.load({
|
|
|
1930
1984
|
}), props.footer), locked ? (0, react$1.createElement)(OverlayLockCatcher) : null)));
|
|
1931
1985
|
}
|
|
1932
1986
|
//#endregion
|
|
1933
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
1987
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/feedback/ConfirmModal.js
|
|
1934
1988
|
/**
|
|
1935
1989
|
* 确认框(语义层,基于 Modal):双按钮(取消 outline + 确认语义档)、无 ✕;无标题时整条头部消失。
|
|
1936
1990
|
* 样式封闭:按钮只暴露语义档(tone → variant),不透传任意 className/style。
|
|
@@ -1959,14 +2013,14 @@ window.__ModuleLoader__.load({
|
|
|
1959
2013
|
display: "flex",
|
|
1960
2014
|
gap: "8px",
|
|
1961
2015
|
justifyContent: "flex-end"
|
|
1962
|
-
} }, (0, react$1.createElement)(Button$
|
|
2016
|
+
} }, (0, react$1.createElement)(Button$4, {
|
|
1963
2017
|
variant: "outline",
|
|
1964
2018
|
width: props.cancelWidth,
|
|
1965
2019
|
loadingText: props.loadingText,
|
|
1966
2020
|
loading: props.cancelLoading === true,
|
|
1967
2021
|
onBusyChange: setCancelBusy,
|
|
1968
2022
|
onClick: () => props.onCancel?.()
|
|
1969
|
-
}, props.cancelText ?? tt("cancel")), (0, react$1.createElement)(Button$
|
|
2023
|
+
}, props.cancelText ?? tt("cancel")), (0, react$1.createElement)(Button$4, {
|
|
1970
2024
|
variant: confirmVariant,
|
|
1971
2025
|
width: props.confirmWidth,
|
|
1972
2026
|
loadingText: props.loadingText,
|
|
@@ -1977,7 +2031,7 @@ window.__ModuleLoader__.load({
|
|
|
1977
2031
|
}, props.message ?? null);
|
|
1978
2032
|
}
|
|
1979
2033
|
//#endregion
|
|
1980
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
2034
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/feedback/modal-host.js
|
|
1981
2035
|
let hostRoot = null;
|
|
1982
2036
|
let hostContainer = null;
|
|
1983
2037
|
let entries = [];
|
|
@@ -2074,7 +2128,7 @@ window.__ModuleLoader__.load({
|
|
|
2074
2128
|
});
|
|
2075
2129
|
}
|
|
2076
2130
|
//#endregion
|
|
2077
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
2131
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/official.js
|
|
2078
2132
|
/**
|
|
2079
2133
|
* L1 adapter —— 全仓**唯一** import 官方 primitives 平台模块的文件。
|
|
2080
2134
|
*
|
|
@@ -2143,13 +2197,13 @@ window.__ModuleLoader__.load({
|
|
|
2143
2197
|
display: "flex",
|
|
2144
2198
|
justifyContent: "flex-end",
|
|
2145
2199
|
gap: "8px"
|
|
2146
|
-
} }, (0, react$1.createElement)(Button$
|
|
2200
|
+
} }, (0, react$1.createElement)(Button$4, {
|
|
2147
2201
|
variant: "outline",
|
|
2148
2202
|
onClick: () => {
|
|
2149
2203
|
close();
|
|
2150
2204
|
resolve(false);
|
|
2151
2205
|
}
|
|
2152
|
-
}, opts.cancelText ?? t$2("cancel")), (0, react$1.createElement)(Button$
|
|
2206
|
+
}, opts.cancelText ?? t$2("cancel")), (0, react$1.createElement)(Button$4, {
|
|
2153
2207
|
variant: opts.danger === true ? "danger" : "primary",
|
|
2154
2208
|
onClick: () => {
|
|
2155
2209
|
close();
|
|
@@ -2171,7 +2225,7 @@ window.__ModuleLoader__.load({
|
|
|
2171
2225
|
footer: (0, react$1.createElement)("div", { style: {
|
|
2172
2226
|
display: "flex",
|
|
2173
2227
|
justifyContent: "flex-end"
|
|
2174
|
-
} }, (0, react$1.createElement)(Button$
|
|
2228
|
+
} }, (0, react$1.createElement)(Button$4, {
|
|
2175
2229
|
variant: "primary",
|
|
2176
2230
|
onClick: () => {
|
|
2177
2231
|
close();
|
|
@@ -2185,7 +2239,7 @@ window.__ModuleLoader__.load({
|
|
|
2185
2239
|
alert: hostAlert
|
|
2186
2240
|
});
|
|
2187
2241
|
//#endregion
|
|
2188
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
2242
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/infra/host-data.js
|
|
2189
2243
|
/** 模型目录的 observable store(useSyncExternalStore 直接消费)。 */
|
|
2190
2244
|
var ModelCatalogStore = class {
|
|
2191
2245
|
constructor() {
|
|
@@ -2365,7 +2419,7 @@ window.__ModuleLoader__.load({
|
|
|
2365
2419
|
loadModelCatalog(modelsPath);
|
|
2366
2420
|
}
|
|
2367
2421
|
//#endregion
|
|
2368
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
2422
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/infra/locale.js
|
|
2369
2423
|
/** 返回当前语言,并在宿主语言切换(`<html lang>` 变化)时触发重渲。 */
|
|
2370
2424
|
function useLocale() {
|
|
2371
2425
|
const [locale, setLocaleState] = (0, react$1.useState)(getLocale);
|
|
@@ -2384,7 +2438,7 @@ window.__ModuleLoader__.load({
|
|
|
2384
2438
|
return locale;
|
|
2385
2439
|
}
|
|
2386
2440
|
//#endregion
|
|
2387
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
2441
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/utils/path.js
|
|
2388
2442
|
/**
|
|
2389
2443
|
* 纯路径方法 —— 只做字符串切分 / 拼接,不碰宿主、不依赖 React / DOM。
|
|
2390
2444
|
*
|
|
@@ -2423,7 +2477,7 @@ window.__ModuleLoader__.load({
|
|
|
2423
2477
|
return dir === "" ? name : `${dir}/${name}`;
|
|
2424
2478
|
}
|
|
2425
2479
|
//#endregion
|
|
2426
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
2480
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/explorer/types.js
|
|
2427
2481
|
/** HTML 静态预览的扩展名(与官方 htmlBodyDefinition 同款)。 */
|
|
2428
2482
|
const HTML_KINDS = ["html", "htm"];
|
|
2429
2483
|
/**
|
|
@@ -2725,10 +2779,10 @@ window.__ModuleLoader__.load({
|
|
|
2725
2779
|
return best;
|
|
2726
2780
|
}
|
|
2727
2781
|
//#endregion
|
|
2728
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
2782
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/explorer/explorer-css.generated.js
|
|
2729
2783
|
const EXPLORER_CSS = "/* 工作区文件浏览器(dshpc-fb-*)。\n *\n * 度量真源 = 兄弟项目 dsh-task-dispatch-table 的 src/client/archive-session-css.ts\n * (.dsh-tdt-sv-* 全族)。**逐条照抄,不许自己估**:padding / gap / 圆角 / 字号 / 行高 /\n * 边框色 / 悬停色 / 透明度动画 / 溢出策略,一一对应,改这里之前先去那边对原文。\n * 前缀与变量名换成本仓口径(--tdt-* → --dshpc-*),数值不换。\n * **例外**:容器级内距(__bar / __title / __tree / __body)2026-11-03 起改成四周一致\n * 的 token 档(space-2 / space-3)——用户反馈兄弟那套「左右比上下宽」在这两处窗口里不对称。\n * 行级内距(__row / __row-note / __banner)仍是兄弟数值,未动。\n *\n * 控件:能核心就核心(面包屑 = Button ghost、行尾 = Button outline、展开 / 图标 = IconButton、\n * 分段 = Segmented、文字 = MarqueeText)。核心控件自带的 padding / 高度 / 皮肤在本文件里\n * **按兄弟数值覆盖**(选择器带 .dshpc-fb 前缀提高特异性,确保盖得住控件默认值)。\n */\n/* 背景不在这里画:dock 由 .dshpc-side-surface、选文件弹窗由 .dshpc-panel 提供。\n 自己再刷一层 surface-base 会把面板档位(modal 同色的 surface-1)盖掉 —— 弹窗就显得发黑。 */\n.dshpc-fb{\n position:relative;display:flex;flex-direction:column;height:100%;min-height:0;\n background:transparent;color:var(--dshpc-fg);\n}\n\n/* 第一排:▾ 选层 + 面包屑 + 动作(兄弟 .dsh-tdt-sv-crumbbar)\n ⚠️ 不能 overflow:hidden —— 下拉浮层挂在它下面,裁了就看不见。 */\n.dshpc-fb__bar{\n position:relative;flex:none;display:flex;align-items:center;gap:2px;\n /* 四周内距一致(用户 2026-11-03:原来 4/10,左右比上下宽,看着不对称)——下文 __title / __tree / __body 同口径。 */\n padding:var(--dshpc-space-2);border-bottom:1px solid var(--dshpc-border);white-space:nowrap;\n}\n.dshpc-fb__menu-wrap{position:relative;flex:none;display:inline-flex}\n.dshpc-fb__crumbs{position:relative;flex:1;min-width:0;display:flex;align-items:center;gap:2px;overflow:hidden}\n.dshpc-fb__crumbs-measure{\n position:absolute;top:0;left:0;display:inline-flex;align-items:center;gap:2px;\n visibility:hidden;pointer-events:none;white-space:nowrap;\n}\n\n/* 面包屑:核心 ghost 钮,但皮肤与尺寸取兄弟 .dsh-tdt-sv-crumb(高由内容决定,不锁控制高)。 */\n.dshpc-fb .dshpc-fb__crumb{\n appearance:none;background:0 0;border:none;height:auto;\n padding:2px 4px;border-radius:var(--dshpc-radius-sm);\n font:inherit;font-size:var(--dshpc-font-sm);line-height:var(--dshpc-line-sm);\n color:var(--dshpc-fg-2);cursor:pointer;\n display:inline-flex;align-items:center;min-width:0;overflow:hidden;text-overflow:ellipsis;\n}\n.dshpc-fb .dshpc-fb__crumb:hover{background:var(--dshpc-hover);color:var(--dshpc-fg)}\n.dshpc-fb .dshpc-fb__crumb:disabled{color:var(--dshpc-fg-2);cursor:default}\n.dshpc-fb .dshpc-fb__crumb--current{cursor:default;color:var(--dshpc-fg);font-weight:600;min-width:0}\n.dshpc-fb .dshpc-fb__crumb--current:hover{background:0 0}\n.dshpc-fb__crumb-mq{flex:1 1 auto;min-width:0}\n.dshpc-fb__crumb-sep{flex:none;color:var(--dshpc-fg-3)}\n\n/* 越界(outside-workspace)第一排:只读完整路径(兄弟 .dsh-tdt-sv-crumbbar-plain-inner)。 */\n.dshpc-fb__bar-plain{\n font-family:var(--dshpc-font-mono,ui-monospace,SFMono-Regular,Menlo,Consolas,monospace);\n font-size:var(--dshpc-font-sm);line-height:var(--dshpc-line-sm);color:var(--dshpc-fg-2);\n white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:default;user-select:none;\n}\n.dshpc-fb__actions{flex:none;display:flex;align-items:center;gap:4px}\n/* 选择器头部「选当前文件 / 当前文件夹」钮:与 ✕ 并排,不被面包屑挤扁。\n 「选当前目录」= 核心 Button outline(sm 档):尺寸与皮肤全归核心,这里只留布局。\n ⚠️ 别再往这里写 height / padding 覆盖 —— 域按登记顺序拼接,核心 .dshpc-btn--sm 谁先谁后\n 取决于渲染次序,覆盖会时灵时不灵(2026-11-03 前就是这么写的)。 */\n.dshpc-fb__pick{flex:none}\n\n/* ▾ 选层浮层。\n 层序:遮罩必须高于 picker 面板(--dshpc-z-panel),否则菜单开着点面板不算「点外部」;\n 菜单再压在遮罩之上,所以是 popmenu 一档 +1。表皮来自 panel.css 的 menu 档。 */\n.dshpc-fb__crumbs-backdrop{position:fixed;inset:0;z-index:var(--dshpc-z-popmenu);background:transparent}\n.dshpc-fb__crumbs-menu{\n position:absolute;top:calc(100% + 4px);left:0;z-index:calc(var(--dshpc-z-popmenu) + 1);\n min-width:160px;max-height:240px;overflow:auto;padding:4px;display:flex;flex-direction:column;\n}\n.dshpc-fb__menu-item{\n appearance:none;background:0 0;border:none;text-align:left;font:inherit;\n font-size:var(--dshpc-font-sm);line-height:var(--dshpc-line-md);\n padding:4px 8px;border-radius:var(--dshpc-radius-sm);color:var(--dshpc-fg);cursor:pointer;\n max-width:280px;display:flex;align-items:center;gap:2px;\n overflow:hidden;text-overflow:ellipsis;white-space:nowrap;\n}\n.dshpc-fb__menu-item:hover{background:var(--dshpc-hover)}\n.dshpc-fb__menu-empty{\n font-size:var(--dshpc-font-sm);line-height:var(--dshpc-line-md);padding:4px 8px;color:var(--dshpc-fg-3);\n}\n.dshpc-fb__menu-icon{flex:none;display:inline-flex}\n.dshpc-fb__menu-chev{flex:none;color:var(--dshpc-fg-3);margin-right:1px}\n.dshpc-fb__menu-chev-slot{flex:none;width:11px;height:11px;margin-right:1px}\n.dshpc-fb__menu-label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n\n/* 第二排(仅预览态):文件名 + 工具(兄弟 .dsh-tdt-sv-titlebar / -preview-title-inner)。 */\n.dshpc-fb__title{\n flex:none;display:flex;align-items:center;gap:8px;\n padding:var(--dshpc-space-2);border-bottom:1px solid var(--dshpc-border);\n}\n.dshpc-fb__title-inner{\n font-family:var(--dshpc-font-mono,ui-monospace,SFMono-Regular,Menlo,Consolas,monospace);\n font-size:var(--dshpc-font-sm);line-height:var(--dshpc-line-sm);color:var(--dshpc-fg);\n white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:default;\n}\n\n/* 主体(兄弟 .dsh-tdt-sv-preview-body / -hint / -preview-err)\n 下面三个滚动容器只挂 .dshpc-scroll-thin:细滚动条与 1px 让位都由那个类统一给,\n 这里不再写透明边框(口径见 style.md §滚动条让位)。 */\n.dshpc-fb__body{flex:1;min-height:0;overflow-x:hidden;overflow-y:auto;padding:var(--dshpc-space-3)}\n.dshpc-fb__note{font-size:var(--dshpc-font-sm);color:var(--dshpc-fg-2);text-align:center;padding:12px 0}\n.dshpc-fb__err{\n display:flex;flex-direction:column;align-items:flex-start;gap:10px;\n font-size:var(--dshpc-font-sm);line-height:1.6;color:var(--dshpc-fg-2);padding:8px 0;\n}\n\n/* 目录树(兄弟 .dsh-tdt-sv-tree*) */\n.dshpc-fb__tree{flex:1;min-height:0;overflow:auto;padding:var(--dshpc-space-2)}\n.dshpc-fb__row{\n display:flex;align-items:center;gap:8px;padding:6px 8px;\n border-radius:var(--dshpc-radius-sm);cursor:pointer;user-select:none;\n}\n.dshpc-fb__row:hover{background:var(--dshpc-hover)}\n.dshpc-fb__row:focus-visible{outline:2px solid var(--dshpc-focus);outline-offset:-2px}\n.dshpc-fb__row-icon{flex:none;display:inline-flex;color:var(--dshpc-fg-2);font-size:var(--dshpc-font-lg)}\n/* 文件行图标走核心 1em 基线(button.css:112):不再由调用方 size={18} 说了算。 */\n.dshpc-fb__row-icon svg{display:block;width:1em;height:1em;flex:none;}\n.dshpc-fb__row-name{\n flex:1;min-width:0;font-size:var(--dshpc-font-md);line-height:var(--dshpc-line-md);color:var(--dshpc-fg);\n overflow:hidden;text-overflow:ellipsis;white-space:nowrap;\n}\n\n/* 展开开关:核心 IconButton,命中位 20×20 + 展开时转 90°(兄弟 .dsh-tdt-sv-tree-toggle{,-open})。 */\n.dshpc-fb .dshpc-fb__row-toggle{\n appearance:none;background:0 0;border:none;flex:none;\n width:20px;height:20px;padding:0;margin:0;border-radius:var(--dshpc-radius-sm);\n color:var(--dshpc-fg-2);cursor:pointer;\n display:inline-flex;align-items:center;justify-content:center;\n transition:transform var(--dshpc-dur-fast) var(--dshpc-ease),background var(--dshpc-dur-fast) var(--dshpc-ease);\n}\n.dshpc-fb .dshpc-fb__row-toggle--open{transform:rotate(90deg)}\n\n/* 行尾「进入 / 选择」:按钮**皮肤完全交给核心 Button**(2026-11-03:原来这里又写了一遍描边/内距/\n 字号,等于自己手搓了一颗,跟别处的按钮长得不一样)。本仓只保留布局与「悬停才现身」:\n 平时隐身但占位(opacity 而非 display)⇒ 出现时不顶动行内布局。 */\n.dshpc-fb .dshpc-fb__row-act{\n flex:none;margin-left:auto;\n opacity:0;pointer-events:none;\n transition:opacity var(--dshpc-dur-fast) var(--dshpc-ease);\n}\n.dshpc-fb__row:hover .dshpc-fb__row-act,.dshpc-fb .dshpc-fb__row-act:focus-visible{opacity:1;pointer-events:auto}\n\n.dshpc-fb__row-children{\n margin-left:9px;padding-left:7px;border-left:1px solid var(--dshpc-border);\n display:flex;flex-direction:column;\n}\n.dshpc-fb__row-note{flex:none;padding:8px 10px;font-size:var(--dshpc-font-sm);color:var(--dshpc-fg-3)}\n.dshpc-fb__row-err{padding:4px 8px 4px 36px;font-size:var(--dshpc-font-sm);color:var(--dshpc-danger)}\n\n/* 预览体内部容器(仅本仓预览组件用;兄弟对应 preview-fill / preview-body-code 一类)。\n 必须 border-box:渲染态 inline 加了 padding:12px 14px,content-box 下 width:100%+padding\n 会溢出父层 28px(父 .dshpc-fb 无 overflow 裁切)→ 恒多一条横滚条;border-box 把 padding\n 算进 100%,从根消除该溢出。 */\n.dshpc-fb__text{flex:1;min-height:0;overflow:auto;width:100%;box-sizing:border-box}\n.dshpc-fb__banner{padding:6px 10px;background:var(--dshpc-open-bg);color:var(--dshpc-fg-2);font-size:var(--dshpc-font-sm)}\n.dshpc-fb__more{display:flex;justify-content:center;padding:10px}\n.dshpc-fb__image{max-width:100%;border-radius:var(--dshpc-radius-sm);border:1px solid var(--dshpc-border)}\n/* iframe 的外壳(兄弟 .dsh-tdt-sv-preview-fill):iframe 必须包在这一层里才拿得到高度——\n 裸挂 iframe 时替换元素的自动最小尺寸会让高度算不出来(表现为预览区整片空白、像没反应)。 */\n.dshpc-fb__fill{flex:1;min-height:0;display:flex;overflow:hidden;padding:0}\n.dshpc-fb__frame{flex:1;min-height:0;width:100%;height:100%;border:none;background:var(--dshpc-surface-1)}\n\n";
|
|
2730
2784
|
//#endregion
|
|
2731
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
2785
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/explorer/preview/BytesPreview.js
|
|
2732
2786
|
function BytesPreview(props) {
|
|
2733
2787
|
ensureComponentStyles("explorer", EXPLORER_CSS);
|
|
2734
2788
|
const tt = props.translate ?? t$2;
|
|
@@ -2780,7 +2834,7 @@ window.__ModuleLoader__.load({
|
|
|
2780
2834
|
}));
|
|
2781
2835
|
}
|
|
2782
2836
|
//#endregion
|
|
2783
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
2837
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/display/code-viewer-css.generated.js
|
|
2784
2838
|
const CODE_VIEWER_CSS = "/* CodeViewer(只读 CodeMirror 查看器)样式。类名固定 dshpc-cv*;颜色吃 --dshpc-* token,\n 深色由 design 的 token 深色段自动生效(不写死颜色值)。 */\n/* flex:1 1 auto + min-width:0:调用方常把它放进 display:flex 的容器里(TextPreview),\n 不写会在主轴按内容宽排 —— 短文本时 __copy(absolute 相对本层)落在文字右端而不是面板右缘。 */\n.dshpc-cv{position:relative;display:flex;flex-direction:column;flex:1 1 auto;min-width:0;height:100%;min-height:0;}\n/* 复制钮复用核心 IconButton(variant=outline / size=md):盒型、描边、圆角(已统一 md)、底色、hover\n 与图标尺寸全由核心提供 —— 图标跟随 .dshpc-iconbtn svg 的 1em,这里不再单独放大(写死 16px 曾让它显大)。\n 本文件只管「绝对定位 + 默认隐藏、hover/聚焦才显」(overlay 浮在编辑器右上角)。 */\n.dshpc-cv__copy{position:absolute;top:6px;right:6px;z-index:5;opacity:0;}\n.dshpc-cv:hover .dshpc-cv__copy,.dshpc-cv__copy:focus-visible{opacity:1;}\n/* 外层只把 .dshpc-scroll-thin 传给官方生成的 .cm-scroller(线宽 + 右让位都由 tokens.css\n 的后代规则给),自己 overflow:hidden 不滚 ⇒ 关掉自身让位,否则两层各 1px 会叠成 2px。\n scroller 只让右不让底:给底会改 scroller 高度,CodeMirror 的测量循环会多算一条横滚条。 */\n.dshpc-cv__editor{flex:1 1 auto;min-height:0;overflow:hidden;--dshpc-scroll-inset-right:0px;}\n.dshpc-cv__editor .cm-editor{height:100%;}\n.dshpc-cv__editor .cm-scroller{overflow:auto}\n\n";
|
|
2785
2839
|
//#endregion
|
|
2786
2840
|
//#region ../../node_modules/.pnpm/@babel+runtime@8.0.8/node_modules/@babel/runtime/helpers/extends.js
|
|
@@ -48168,7 +48222,7 @@ window.__ModuleLoader__.load({
|
|
|
48168
48222
|
const stex = mkStex(false);
|
|
48169
48223
|
mkStex(true);
|
|
48170
48224
|
//#endregion
|
|
48171
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
48225
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/display/code-viewer-lang.js
|
|
48172
48226
|
/**
|
|
48173
48227
|
* 源码态语法高亮:扩展名 → CodeMirror 语言映射。
|
|
48174
48228
|
*
|
|
@@ -48321,7 +48375,7 @@ window.__ModuleLoader__.load({
|
|
|
48321
48375
|
}
|
|
48322
48376
|
}
|
|
48323
48377
|
//#endregion
|
|
48324
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
48378
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/display/code-viewer-theme.js
|
|
48325
48379
|
const CURSOR_FALLBACK_DARK = "#abb2bf";
|
|
48326
48380
|
const CURSOR_FALLBACK_LIGHT = "#383a42";
|
|
48327
48381
|
const cmSurfaceTheme = EditorView.theme({
|
|
@@ -48362,7 +48416,7 @@ window.__ModuleLoader__.load({
|
|
|
48362
48416
|
return [cmSurfaceTheme, cmSurfaceTint(dark)];
|
|
48363
48417
|
}
|
|
48364
48418
|
//#endregion
|
|
48365
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
48419
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/infra/code-mirror-surface.js
|
|
48366
48420
|
/**
|
|
48367
48421
|
* CodeMirror 共用底座 —— 只读 CodeViewer 与可编辑 CodeEditor 共用这一份渲染。
|
|
48368
48422
|
*
|
|
@@ -48445,7 +48499,7 @@ window.__ModuleLoader__.load({
|
|
|
48445
48499
|
}));
|
|
48446
48500
|
}
|
|
48447
48501
|
//#endregion
|
|
48448
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
48502
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/display/CodeViewer.js
|
|
48449
48503
|
/**
|
|
48450
48504
|
* CodeViewer —— 只读源码查看器(替代官方 Shiki CodeBlock),DSH 共享底座版。
|
|
48451
48505
|
*
|
|
@@ -48495,7 +48549,7 @@ window.__ModuleLoader__.load({
|
|
|
48495
48549
|
});
|
|
48496
48550
|
}
|
|
48497
48551
|
//#endregion
|
|
48498
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
48552
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/utils/number.js
|
|
48499
48553
|
/**
|
|
48500
48554
|
* 字节数 → 人话(`12 KB` / `3.4 MB`)。
|
|
48501
48555
|
* 0 与负数 ⇒ `—`(不显示「0 B」这种假精确)。
|
|
@@ -48518,7 +48572,7 @@ window.__ModuleLoader__.load({
|
|
|
48518
48572
|
return `${value >= 10 ? String(Math.round(value)) : value.toFixed(1)} ${units[unit]}`;
|
|
48519
48573
|
}
|
|
48520
48574
|
//#endregion
|
|
48521
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
48575
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/explorer/preview/md-labels.js
|
|
48522
48576
|
function markdownLabels() {
|
|
48523
48577
|
return {
|
|
48524
48578
|
code: {
|
|
@@ -48534,7 +48588,7 @@ window.__ModuleLoader__.load({
|
|
|
48534
48588
|
};
|
|
48535
48589
|
}
|
|
48536
48590
|
//#endregion
|
|
48537
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
48591
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/explorer/preview/TextPreview.js
|
|
48538
48592
|
/** 定位到行时最多自动续翻的页数(远处行号不值得为它打一整圈往返;用户仍可手动「加载更多」)。 */
|
|
48539
48593
|
const FOCUS_MAX_PAGES = 10;
|
|
48540
48594
|
function TextPreview(props) {
|
|
@@ -48627,7 +48681,7 @@ window.__ModuleLoader__.load({
|
|
|
48627
48681
|
path: props.path,
|
|
48628
48682
|
t: tt,
|
|
48629
48683
|
focusLine: props.focusLine
|
|
48630
|
-
})), nextOffset !== null && props.maxBytes === void 0 ? (0, react$1.createElement)("div", { className: "dshpc-fb__more" }, (0, react$1.createElement)(Button$
|
|
48684
|
+
})), nextOffset !== null && props.maxBytes === void 0 ? (0, react$1.createElement)("div", { className: "dshpc-fb__more" }, (0, react$1.createElement)(Button$4, {
|
|
48631
48685
|
variant: "outline",
|
|
48632
48686
|
size: "sm",
|
|
48633
48687
|
loading,
|
|
@@ -48635,7 +48689,7 @@ window.__ModuleLoader__.load({
|
|
|
48635
48689
|
}, tt("previewLoadMore"))) : null);
|
|
48636
48690
|
}
|
|
48637
48691
|
//#endregion
|
|
48638
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
48692
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/explorer/preview/HtmlPreview.js
|
|
48639
48693
|
/** 官方 CSP 原文(documentpreview lib/client.js 同款,不多开不少关)。 */
|
|
48640
48694
|
const HTML_CSP = "default-src 'none'; script-src 'none'; style-src 'unsafe-inline'; img-src data:; font-src data:; media-src data:";
|
|
48641
48695
|
/** 禁用标签(官方清单)。 */
|
|
@@ -48739,7 +48793,7 @@ window.__ModuleLoader__.load({
|
|
|
48739
48793
|
}));
|
|
48740
48794
|
}
|
|
48741
48795
|
//#endregion
|
|
48742
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
48796
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/explorer/preview/OfficePreview.js
|
|
48743
48797
|
function OfficePreview(props) {
|
|
48744
48798
|
ensureComponentStyles("explorer", EXPLORER_CSS);
|
|
48745
48799
|
const tt = props.translate ?? t$2;
|
|
@@ -48789,7 +48843,7 @@ window.__ModuleLoader__.load({
|
|
|
48789
48843
|
});
|
|
48790
48844
|
}
|
|
48791
48845
|
//#endregion
|
|
48792
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
48846
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/explorer/preview/index.js
|
|
48793
48847
|
function FilePreview(props) {
|
|
48794
48848
|
ensureControls();
|
|
48795
48849
|
const tt = props.translate ?? t$2;
|
|
@@ -48829,7 +48883,7 @@ window.__ModuleLoader__.load({
|
|
|
48829
48883
|
return null;
|
|
48830
48884
|
}
|
|
48831
48885
|
//#endregion
|
|
48832
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
48886
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/explorer/crumbs-menu.js
|
|
48833
48887
|
/**
|
|
48834
48888
|
* ▾ 选层下拉的**条目构造**(picker 与 dock 共用同一段代码,差别只在入参 —— 源实现用户 2026-09-29
|
|
48835
48889
|
* 点名提炼,严禁两处各写一份)。
|
|
@@ -48928,7 +48982,7 @@ window.__ModuleLoader__.load({
|
|
|
48928
48982
|
return out;
|
|
48929
48983
|
}
|
|
48930
48984
|
//#endregion
|
|
48931
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
48985
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/explorer/crumb-nav.js
|
|
48932
48986
|
/**
|
|
48933
48987
|
* 文件浏览器的第一排:▾ 选层 + 面包屑 + 右侧动作(选择 / ✕)。
|
|
48934
48988
|
*
|
|
@@ -48940,7 +48994,7 @@ window.__ModuleLoader__.load({
|
|
|
48940
48994
|
*/
|
|
48941
48995
|
/** 一段面包屑(核心 ghost 钮:无底无边;度量条与可见态必须逐字同构)。 */
|
|
48942
48996
|
function crumbButton(label, onClick, current = false) {
|
|
48943
|
-
return (0, react$1.createElement)(Button$
|
|
48997
|
+
return (0, react$1.createElement)(Button$4, {
|
|
48944
48998
|
variant: "ghost",
|
|
48945
48999
|
size: "sm",
|
|
48946
49000
|
className: `dshpc-fb__crumb${current ? " dshpc-fb__crumb--current" : ""}`,
|
|
@@ -49011,7 +49065,7 @@ window.__ModuleLoader__.load({
|
|
|
49011
49065
|
}), actions(pickNow, tt, onClose));
|
|
49012
49066
|
}
|
|
49013
49067
|
//#endregion
|
|
49014
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
49068
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/explorer/landing.js
|
|
49015
49069
|
/**
|
|
49016
49070
|
* 落地页主体(picker 刚打开、还没进任何目录时的那张表):上面一排根层(「根目录」或盘符),
|
|
49017
49071
|
* 下面全部工作区。行 = 进去,行尾钮 = 直接选这个目录。
|
|
@@ -49030,7 +49084,7 @@ window.__ModuleLoader__.load({
|
|
|
49030
49084
|
onKeyDown: (event) => {
|
|
49031
49085
|
if (event.key === "Enter" || event.key === " ") onOpen(target);
|
|
49032
49086
|
}
|
|
49033
|
-
}, (0, react$1.createElement)("span", { className: "dshpc-fb__row-icon" }, (0, react$1.createElement)(official_exports.IconFolderCloseRegular, null)), (0, react$1.createElement)("span", { className: "dshpc-fb__row-name" }, label), pickable ? (0, react$1.createElement)(Button$
|
|
49087
|
+
}, (0, react$1.createElement)("span", { className: "dshpc-fb__row-icon" }, (0, react$1.createElement)(official_exports.IconFolderCloseRegular, null)), (0, react$1.createElement)("span", { className: "dshpc-fb__row-name" }, label), pickable ? (0, react$1.createElement)(Button$4, {
|
|
49034
49088
|
variant: "outline",
|
|
49035
49089
|
size: "sm",
|
|
49036
49090
|
className: "dshpc-fb__row-act",
|
|
@@ -49043,7 +49097,7 @@ window.__ModuleLoader__.load({
|
|
|
49043
49097
|
return (0, react$1.createElement)("div", { className: "dshpc-fb__tree dshpc-scroll-thin dshpc-scroll-thin--both" }, roots.map((root) => row(`root:${root.path}`, root.label, root.path)), anchors.filter((item) => item.path !== void 0 && item.path !== "").map((item) => row(`ws:${item.title}`, item.title, item.path)));
|
|
49044
49098
|
}
|
|
49045
49099
|
//#endregion
|
|
49046
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
49100
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/infra/tooltip.js
|
|
49047
49101
|
let renderer;
|
|
49048
49102
|
/** 注入官方 Tooltip(插件启动时调一次;传 undefined 撤销,回到自绘降级)。 */
|
|
49049
49103
|
function setTooltipRenderer(fn) {
|
|
@@ -49054,7 +49108,7 @@ window.__ModuleLoader__.load({
|
|
|
49054
49108
|
return renderer;
|
|
49055
49109
|
}
|
|
49056
49110
|
//#endregion
|
|
49057
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
49111
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/inputs/Segmented.js
|
|
49058
49112
|
/**
|
|
49059
49113
|
* 角标 / 计数要不要显示,返回要显示的文本。
|
|
49060
49114
|
* 数字 ≤0 是「没东西可数」的老口径;字符串(`'1K'` / `'99+'`)由调用方决定,原样显示,空串不显示。
|
|
@@ -49176,7 +49230,7 @@ window.__ModuleLoader__.load({
|
|
|
49176
49230
|
})]);
|
|
49177
49231
|
}
|
|
49178
49232
|
//#endregion
|
|
49179
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
49233
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/explorer/preview-title-bar.js
|
|
49180
49234
|
/**
|
|
49181
49235
|
* 预览态的第二排:文件名 + 渲染⇄源码切换 / 复制路径 / 刷新。
|
|
49182
49236
|
*
|
|
@@ -49220,7 +49274,7 @@ window.__ModuleLoader__.load({
|
|
|
49220
49274
|
})));
|
|
49221
49275
|
}
|
|
49222
49276
|
//#endregion
|
|
49223
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
49277
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/explorer/FileBrowser.js
|
|
49224
49278
|
/**
|
|
49225
49279
|
* 「根」在 POSIX 上的落点 `/`。Windows 没有这一个根 —— 根层是盘符清单,由宿主 `op:'roots'` 给出
|
|
49226
49280
|
* (见下面 `roots` 状态),本常量只在 POSIX / 探不到盘符时用。
|
|
@@ -49566,7 +49620,7 @@ window.__ModuleLoader__.load({
|
|
|
49566
49620
|
onKeyDown: (event) => {
|
|
49567
49621
|
if (event.key === "Enter" || event.key === " ") pick();
|
|
49568
49622
|
}
|
|
49569
|
-
}, (0, react$1.createElement)("span", { className: "dshpc-fb__row-icon" }, (0, react$1.createElement)(official_exports.FileTypeIcon, { path: childPath })), (0, react$1.createElement)("span", { className: "dshpc-fb__row-name" }, entry.name), picker && props.onPick !== void 0 ? (0, react$1.createElement)(Button$
|
|
49623
|
+
}, (0, react$1.createElement)("span", { className: "dshpc-fb__row-icon" }, (0, react$1.createElement)(official_exports.FileTypeIcon, { path: childPath })), (0, react$1.createElement)("span", { className: "dshpc-fb__row-name" }, entry.name), picker && props.onPick !== void 0 ? (0, react$1.createElement)(Button$4, {
|
|
49570
49624
|
variant: "outline",
|
|
49571
49625
|
size: "sm",
|
|
49572
49626
|
className: "dshpc-fb__row-act",
|
|
@@ -49609,13 +49663,13 @@ window.__ModuleLoader__.load({
|
|
|
49609
49663
|
event.stopPropagation();
|
|
49610
49664
|
toggleDir(childPath);
|
|
49611
49665
|
}
|
|
49612
|
-
}), (0, react$1.createElement)("span", { className: "dshpc-fb__row-name" }, entry.name), picker ? dirPickable ? (0, react$1.createElement)(Button$
|
|
49666
|
+
}), (0, react$1.createElement)("span", { className: "dshpc-fb__row-name" }, entry.name), picker ? dirPickable ? (0, react$1.createElement)(Button$4, {
|
|
49613
49667
|
variant: "outline",
|
|
49614
49668
|
size: "sm",
|
|
49615
49669
|
className: "dshpc-fb__row-act",
|
|
49616
49670
|
"aria-label": tt("explorerPickDirAria"),
|
|
49617
49671
|
onClick: actThisDir
|
|
49618
|
-
}, tt("explorerPickDir")) : null : (0, react$1.createElement)(Button$
|
|
49672
|
+
}, tt("explorerPickDir")) : null : (0, react$1.createElement)(Button$4, {
|
|
49619
49673
|
variant: "outline",
|
|
49620
49674
|
size: "sm",
|
|
49621
49675
|
className: "dshpc-fb__row-act",
|
|
@@ -49664,7 +49718,7 @@ window.__ModuleLoader__.load({
|
|
|
49664
49718
|
onPickWorkspace: switchWorkspace,
|
|
49665
49719
|
onLoadDir: loadDir
|
|
49666
49720
|
});
|
|
49667
|
-
const pickNow = picker && props.onPick !== void 0 && !landing && dirPickable && dir !== "" ? (0, react$1.createElement)(Button$
|
|
49721
|
+
const pickNow = picker && props.onPick !== void 0 && !landing && dirPickable && dir !== "" ? (0, react$1.createElement)(Button$4, {
|
|
49668
49722
|
variant: "outline",
|
|
49669
49723
|
size: "sm",
|
|
49670
49724
|
className: "dshpc-fb__pick",
|
|
@@ -49731,7 +49785,7 @@ window.__ModuleLoader__.load({
|
|
|
49731
49785
|
}, nav, titleBar, body);
|
|
49732
49786
|
}
|
|
49733
49787
|
//#endregion
|
|
49734
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
49788
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/layout/resizer.js
|
|
49735
49789
|
/** 开始一次拖拽调宽(监听 window 的 pointermove / pointerup,松手自动清理)。 */
|
|
49736
49790
|
function startResizeLayoutWidth(opts) {
|
|
49737
49791
|
opts.startEvent.preventDefault?.();
|
|
@@ -49770,7 +49824,7 @@ window.__ModuleLoader__.load({
|
|
|
49770
49824
|
window.addEventListener("pointerup", onUp);
|
|
49771
49825
|
}
|
|
49772
49826
|
//#endregion
|
|
49773
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
49827
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/layout/panel-dock-logic.js
|
|
49774
49828
|
/**
|
|
49775
49829
|
* 停靠面板的状态逻辑(纯函数,零 React / 零 DOM)。
|
|
49776
49830
|
*
|
|
@@ -49901,13 +49955,13 @@ window.__ModuleLoader__.load({
|
|
|
49901
49955
|
}, 0);
|
|
49902
49956
|
}
|
|
49903
49957
|
//#endregion
|
|
49904
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
49958
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/layout/panel-dock-css.generated.js
|
|
49905
49959
|
const PANEL_DOCK_CSS = "/* 停靠栏 = **布局成员**,不是浮层:它占宽度、把主区真正挤窄(兄弟项目 2026-09-28:\n 「分栏压过来,不是盖上去」)。所以调用方必须把它放进自己的 flex 根里。\n 皮肤(头部 / 拖拽条 / 关闭钮 / 背景阴影)在 side-panel.css,与 SideSheet 共用。 */\n.dshpc-dock{display:flex;flex:0 0 auto;align-self:stretch;min-width:0}\n/* dock 不再替主区让缝(原 --dshpc-dock-gap 的 1px margin 已删,用户 2026-11-02):\n 滚动条与容器边缘的 1px 统一由滚动容器自己的透明边框提供(见 style.md §滚动条让位),\n 主区容器带了让位,滚动条与这条分隔线之间自然还是 1px。别再往这里加 margin。 */\n\n/* 自动加的宿主行(openFilePreview 加 / 关闭即摘):消费方那行不必自己写 flex。\n 只让「第一个非预览子项」当主区伸展,其余直接子项不动(页脚条、工具条不误伤);\n display 不在这里写死 —— 本来就是 grid 等布局的元素保持原样,由 TS 侧按计算值补 flex。 */\n.dshpc-dock-host{min-width:0;min-height:0}\n.dshpc-dock-host>:not([data-dshpc-file-preview]){min-width:0}\n.dshpc-dock-host>:first-child:not([data-dshpc-file-preview]){flex:1 1 auto}\n\n/* 单栏**占位**:sticky + 视口高让它在页面滚动时保持可见,同时仍然占宽度。\n ⚠️ **本条刻意不设 z-index**:布局成员一旦带正 z-index,就会无条件压过宿主 portal 到 body 的\n 弹窗(兄弟项目 2026-10-05 真机事故「侧边栏盖住宿主设置弹窗」)。层序交给 DOM 顺序裁决。\n 外观来自 .dshpc-side-surface(side-panel.css),这里只管怎么占位与朝哪边描边。 */\n.dshpc-dock__panel{\n position:sticky;top:0;align-self:stretch;\n /* 高度默认视口高(整页场景);嵌在定高容器里时由调用方给 --dshpc-dock-h(如 420px / 100%)。 */\n height:var(--dshpc-dock-h,100vh);max-height:var(--dshpc-dock-h,100vh);\n border-left:1px solid var(--dshpc-border);\n}\n/* 收起的出场:宽度收到 0、透明淡出;落定后组件才真正摘掉这一栏(JS 延时 220ms 配合)。 */\n.dshpc-dock__panel--closing{\n width:0!important;min-width:0!important;opacity:0;border-left-width:0;\n transition:width .2s var(--dshpc-ease),opacity .2s var(--dshpc-ease),border-left-width .2s var(--dshpc-ease);\n}\n\n/* 拖动期:① <iframe>(PDF / HTML 预览)是独立文档,会吞掉父文档的 pointermove,\n 向右拖进 iframe 就卡死 —— 整片让出指针事件;② contain 把重排隔离在栏内,\n 否则每帧改宽度都会牵动整页重排(兄弟项目 2026-10-04 真机「挪很久才动一下」)。 */\n.dshpc-dock.dshpc-dock--resizing iframe{pointer-events:none}\n.dshpc-dock.dshpc-dock--resizing .dshpc-dock__panel{contain:layout paint;will-change:width}\n\n/* 收起钮:**待在面板自己的框里**(用户 2026-10-28 三轮:占面板内部空间,不伸到外面去)。\n left:0 从内侧贴着分隔线 —— 贴线的一边不描边(线是面板自己的 border-left),页签与线不重合。\n 20×44(用户 2026-10-28 四轮定尺寸);实色底(--dshpc-plate,明暗各有实值),hover 亮一档。\n padding-right:2px 是**视觉居中**:右侧是圆角,箭头往直线那边挪 1px(用户 2026-10-28 四轮)。 */\n.dshpc-dock__collapse{\n position:absolute;left:0;top:50%;transform:translateY(-50%);\n z-index:8;display:inline-flex;align-items:center;justify-content:center;\n width:20px;height:44px;padding:0 2px 0 0;\n border-top:1px solid var(--dshpc-border);\n border-bottom:1px solid var(--dshpc-border);\n border-right:1px solid var(--dshpc-border);\n border-left:none;\n border-radius:0 var(--dshpc-radius-sm) var(--dshpc-radius-sm) 0;\n background:var(--dshpc-plate);color:var(--dshpc-fg-3);\n font-family:inherit;font-size:var(--dshpc-font-lg);line-height:1;cursor:pointer;\n transition:background-color var(--dshpc-dur-fast) var(--dshpc-ease),color var(--dshpc-dur-fast) var(--dshpc-ease);\n}\n.dshpc-dock__collapse:hover{background:var(--dshpc-plate-hover);color:var(--dshpc-fg)}\n.dshpc-dock__collapse:focus-visible{outline:2px solid var(--dshpc-focus);outline-offset:1px}\n\n/* 收起后的浮动耳朵:**fixed 贴右缘、垂直居中、独立于分栏**(用户 2026-10-28 定稿:\n 小页签挂中间、里面放面板图标、不显示文字,箭头与收起钮反向)。多个按收起顺序纵向堆叠。\n z 走 ear 档(高于弹窗遮罩,2026-11-04):面板在弹窗下面时,耳朵仍是唯一能点到的入口。\n DOM 上 portal 到 body(PanelDock.ts),否则会被弹窗的 stacking context 关在里面。\n ⚠️ 这一列**全页唯一**(id = dshpc-dock-ears,由 PanelDock 懒创建、各实例共用):\n 每个 dock 各建一个的话,容器全部落在 top:50% ⇒ 两个 dock 收起时耳朵重叠\n (兄弟项目 2026-11-06 真机:文件预览 + 编辑任务)。堆叠交给这里的 flex,别再按实例定位。 */\n.dshpc-dock__ears{\n position:fixed;top:50%;right:0;transform:translateY(-50%);\n z-index:var(--dshpc-z-ear,950);\n display:flex;flex-direction:column;gap:8px;align-items:flex-end;\n pointer-events:none;\n}\n.dshpc-dock__ear{\n pointer-events:auto;display:inline-flex;align-items:center;justify-content:center;\n /* 与收起钮**同尺寸**(20×44,用户 2026-10-28 四轮):上/下/左描边,贴右缘的一侧不描。\n 实色底(--dshpc-plate),不用透明色 —— 透明底下透出东西很难看。\n padding-left:2px 是**视觉居中**:左侧是圆角,箭头往直线(右缘)那边挪 1px。 */\n width:20px;height:44px;box-sizing:border-box;padding:0 0 0 2px;\n border-top:1px solid var(--dshpc-border);\n border-bottom:1px solid var(--dshpc-border);\n border-left:1px solid var(--dshpc-border);\n border-right:none;\n border-radius:var(--dshpc-radius-sm) 0 0 var(--dshpc-radius-sm);\n background:var(--dshpc-plate);color:var(--dshpc-fg-2);\n cursor:pointer;font-family:inherit;line-height:1;\n animation:dshpc-ear-in .2s var(--dshpc-ease);\n transition:background-color var(--dshpc-dur-fast) var(--dshpc-ease),color var(--dshpc-dur-fast) var(--dshpc-ease);\n}\n/* 入场:从右缘外滑进来,别「突然出现」(用户 2026-10-28)。 */\n@keyframes dshpc-ear-in{from{opacity:0;transform:translateX(14px)}}\n.dshpc-dock__ear:hover{background:var(--dshpc-plate-hover);color:var(--dshpc-fg)}\n.dshpc-dock__ear:focus-visible{outline:2px solid var(--dshpc-focus);outline-offset:1px}\n/* 与收起钮的箭头同一个 token(--dshpc-font-lg):收进去前后箭头一模一样大(用户 2026-10-28)。\n 不再写死 16px —— 箭头 / 图标尺寸一律跟核心字号档。 */\n.dshpc-dock__ear-arrow{font-size:var(--dshpc-font-lg);color:var(--dshpc-fg-3)}\n.dshpc-dock__ear:hover .dshpc-dock__ear-arrow{color:var(--dshpc-fg)}\n/* 动效礼貌:系统声明减少动效时全部关掉,收起退化为瞬时、功能不受影响。 */\n@media (prefers-reduced-motion:reduce){\n .dshpc-dock__panel{animation:none}\n .dshpc-dock__panel--closing{transition:none}\n .dshpc-dock__ear{animation:none}\n}\n";
|
|
49906
49960
|
//#endregion
|
|
49907
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
49961
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/infra/side-panel-css.generated.js
|
|
49908
49962
|
const SIDE_PANEL_CSS = "/* 侧边面板的公共皮肤 —— PanelDock(占宽分栏)与 SideSheet(覆盖抽屉)共用这一份。\n *\n * 分界:**皮肤在这里,定位各自写**。两者唯一的形态差异就是「怎么占位」——\n * PanelDock 用 sticky 占宽挤窄主区(panel-dock.css),SideSheet 用 absolute 盖在页面上(side-sheet.css)。\n *\n * 类名沿用 dshpc-dock__* 前缀:那是既有公开面(文档与消费方都在用),\n * 这里只搬文件不改名;新增的中性类是 .dshpc-side-surface(外观基类)。 */\n\n/* 入场:宽度从 0 长出来(keyframes 只写 from,终点取内联 / 状态宽度)。两边共用。 */\n@keyframes dshpc-side-in{from{width:0;opacity:0;overflow:hidden}}\n\n/* 外观基类:背景 / 文字色 / 阴影 / 纵向 flex。**不含** position、高度、边框方向、动画触发。 */\n.dshpc-side-surface{\n box-sizing:border-box;\n display:flex;flex-direction:column;flex:0 0 auto;min-width:0;\n background:var(--dshpc-surface-base);color:var(--dshpc-fg);\n box-shadow:var(--dshpc-shadow-2);\n transition:border-color var(--dshpc-dur-fast) var(--dshpc-ease);\n animation:dshpc-side-in .22s var(--dshpc-ease);\n}\n\n/* 头部:右侧 34px = 8(边距) + 20(关钮) + 6(呼吸):给绝对定位的关钮留位,标题/extra 不从它底下钻。 */\n.dshpc-dock__head{\n flex:none;display:flex;align-items:center;gap:8px;\n padding:10px 34px 10px 14px;\n border-bottom:1px solid var(--dshpc-border-faint);\n}\n/* 图标位 / 标题右侧的内容位:消费方传 ReactNode,可塞多个;库只负责排布,不抢宽度。 */\n.dshpc-dock__lead{display:inline-flex;align-items:center;gap:6px;flex:none;color:var(--dshpc-fg-2)}\n.dshpc-dock__extra{display:inline-flex;align-items:center;gap:6px;flex:none;margin-left:auto}\n/* 自定义头部:整行归调用方 —— 不加内边距/边框/背景,也不给关钮留内联空间(关钮是绝对定位的)。 */\n.dshpc-dock__head--custom{display:block;padding:0;border-bottom:none}\n.dshpc-dock__title{\n flex:1 1 auto;min-width:0;\n overflow:hidden;text-overflow:ellipsis;white-space:nowrap;\n font-size:var(--dshpc-font-md);font-weight:600;\n}\n/* 关闭钮:20×20 方角图标位(与 Modal 的关闭钮同规格,不借 Picker 触发器皮肤)。 */\n.dshpc-dock__close{\n display:inline-flex;align-items:center;justify-content:center;flex:none;\n width:20px;height:20px;padding:0;border:none;border-radius:var(--dshpc-radius-sm);\n background:transparent;color:var(--dshpc-fg-3);\n font-family:inherit;font-size:13px;line-height:1;cursor:pointer;\n transition:background-color var(--dshpc-dur-fast) var(--dshpc-ease),color var(--dshpc-dur-fast) var(--dshpc-ease);\n}\n.dshpc-dock__close:hover{background:var(--dshpc-hover);color:var(--dshpc-fg)}\n.dshpc-dock__close:focus-visible{outline:2px solid var(--dshpc-focus);outline-offset:1px}\n/* 头部关钮:绝对定位(top 10 / right 8),锚点是面板本身 —— 正文滚动它不跟滚。 */\n.dshpc-dock__close--abs{position:absolute;top:10px;right:8px;z-index:8}\n/* 浮动关钮:无头部面板用,略收一点边距。 */\n.dshpc-dock__close--floating{\n position:absolute;top:6px;right:6px;z-index:8;\n background:var(--dshpc-surface-menu);border:1px solid var(--dshpc-border-faint);\n}\n\n/* 内容区自己滚(面板高度锁死,内容不设内部滚动就会把页面撑高)。\n 细滚动条与 1px 让位由 .dshpc-scroll-thin 统一给(口径见 style.md §滚动条让位)。 */\n.dshpc-dock__body{flex:1 1 auto;min-height:0;overflow:auto}\n\n\n/* 拖拽条:6px 命中区,**自己不画任何线**(贴在朝内那一侧,镜像由各自的定位文件做)。\n hover / 拖动时把面板自己的边框染成蓝 —— 蓝线只准改原线,不准在旁边再加一条。\n z-index 7 必须高于面板内容里的浮层(复制钮一类),否则命中区会被内容盖住。 */\n.dshpc-dock__resizer{\n position:absolute;left:0;top:0;bottom:0;width:6px;\n z-index:7;cursor:col-resize;background:transparent;\n}\n.dshpc-side-surface:has(> .dshpc-dock__resizer:hover),\n.dshpc-side-surface--resizing{\n /* 原线保留「上下渐隐」工作区指示条质感:把面板自己的那条边框换成同款渐变。\n 面板四边里只有朝内一侧有宽度,所以渐变只落在那一侧。 */\n border-image:linear-gradient(180deg,transparent,var(--dshpc-business) 30% 70%,transparent) 1;\n}\n/* 拖动期:① <iframe>(PDF / HTML 预览)是独立文档,会吞掉父文档的 pointermove ——\n 让出指针事件;② contain 把重排隔离在面板内,否则每帧改宽都会牵动整页重排。 */\n.dshpc-side-surface--resizing{contain:layout paint;will-change:width}\n.dshpc-side-surface--resizing iframe{pointer-events:none}\n\n/* 动效礼貌:系统声明减少动效时退化为瞬时(功能不受影响)。 */\n@media (prefers-reduced-motion:reduce){\n .dshpc-side-surface{animation:none}\n}\n";
|
|
49909
49963
|
//#endregion
|
|
49910
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
49964
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/layout/PanelDock.js
|
|
49911
49965
|
/**
|
|
49912
49966
|
* 停靠面板(PanelDock)—— 可停靠的右侧分栏容器。
|
|
49913
49967
|
*
|
|
@@ -50239,7 +50293,7 @@ window.__ModuleLoader__.load({
|
|
|
50239
50293
|
}, "›"), renderHeader(pane), headerCloseOf(pane), floatingCloseOf(pane), (0, react$1.createElement)("div", { className: "dshpc-dock__body dshpc-scroll-thin" }, pane.children ?? null))), earHost === null ? null : (0, react_dom.createPortal)(ears, earHost));
|
|
50240
50294
|
}
|
|
50241
50295
|
//#endregion
|
|
50242
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
50296
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/explorer/fs-face.js
|
|
50243
50297
|
/**
|
|
50244
50298
|
* client 侧的**只读文件面**:fetch 宿主 `serveFsRoute` 挂的那条路由(`src/host/fs-route.ts`)。
|
|
50245
50299
|
*
|
|
@@ -50397,7 +50451,7 @@ window.__ModuleLoader__.load({
|
|
|
50397
50451
|
};
|
|
50398
50452
|
}
|
|
50399
50453
|
//#endregion
|
|
50400
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
50454
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/explorer/open.js
|
|
50401
50455
|
/**
|
|
50402
50456
|
* 入参路径解析成**绝对路径**(`''` = 虚拟根)。用户 2026-11-03 定:绝对/相对都收。
|
|
50403
50457
|
*
|
|
@@ -50685,7 +50739,7 @@ window.__ModuleLoader__.load({
|
|
|
50685
50739
|
});
|
|
50686
50740
|
}
|
|
50687
50741
|
//#endregion
|
|
50688
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
50742
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/inputs/picker-logic.js
|
|
50689
50743
|
/** 两种输入归一成 groups:给了 `options` 就当成一个无标题的组。 */
|
|
50690
50744
|
function toGroups(groups, options) {
|
|
50691
50745
|
if (groups !== void 0 && groups.length > 0) return groups;
|
|
@@ -52949,7 +53003,7 @@ window.__ModuleLoader__.load({
|
|
|
52949
53003
|
]);
|
|
52950
53004
|
}
|
|
52951
53005
|
//#endregion
|
|
52952
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
53006
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/infra/chevron.js
|
|
52953
53007
|
/**
|
|
52954
53008
|
* 全站唯一的箭头:**自绘 chevron**(就是下拉框右侧那颗)。
|
|
52955
53009
|
*
|
|
@@ -52988,7 +53042,7 @@ window.__ModuleLoader__.load({
|
|
|
52988
53042
|
}));
|
|
52989
53043
|
}
|
|
52990
53044
|
//#endregion
|
|
52991
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
53045
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/display/FieldHint.js
|
|
52992
53046
|
/**
|
|
52993
53047
|
* 问号提示 —— **全站唯一实现、独立组件**(L2,P4)
|
|
52994
53048
|
*
|
|
@@ -53022,10 +53076,10 @@ window.__ModuleLoader__.load({
|
|
|
53022
53076
|
});
|
|
53023
53077
|
}
|
|
53024
53078
|
//#endregion
|
|
53025
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
53079
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/inputs/picker-css.generated.js
|
|
53026
53080
|
const PICKER_CSS = "\n/* 控件占位宽度由根盒吃:width / minWidth / maxWidth 内联在 .dshpc-picker 上。\n 根盒是 inline-block,只给定内层触发器时 shrink-to-fit 会按选中文字的 max-content 撑宽根盒,\n 含百分比的 clamp 在固有尺寸阶段又解不出来 ⇒ 长模型名让控件右侧留白、同排控件被挤(2026-11-10 真机)。\n 根盒定宽后百分比相对父 flex 行解析,超长文字只由 __label 的省略号接住,控件不再跟着内容跳。 */\n.dshpc-picker{position:relative;display:inline-block;max-width:100%;min-width:0;font-size:13px;line-height:20px}\n/* cascade 外层行之前没有布局:两个 inline-block 按基线排 ⇒ 供应商框下沉、两框之间只剩 HTML 空白看着连体。\n 这里只给默认值,:where() 特异性 0,消费方 rowClassName 的任意规则都能盖回来。 */\n:where(.dshpc-picker__cascade){display:flex;align-items:center;gap:8px}\n/* 触发器铺满根盒;hint 态多一层 fieldwrap,那层也铺满、按钮吃剩余宽度给问号让位。\n 尺寸只由根盒持有:默认下限(PICKER_DEFAULT_MIN_WIDTH)与调用方三轴都在根盒的内联 style 里,\n trigger 一条 min/max 都不能有 —— 否则 width:96 会被 trigger 的 120 下限顶到 120,\n 向右溢出盖住邻格(2026-11-11 用户截图:年份下拉溢出 24px 压到月份滑轨)。 */\n.dshpc-picker > .dshpc-picker__trigger{width:100%;box-sizing:border-box}\n.dshpc-picker > .dshpc-fieldwrap{display:flex;width:100%;box-sizing:border-box}\n.dshpc-picker .dshpc-fieldwrap > .dshpc-picker__trigger{flex:1 1 auto;width:auto;min-width:0}\n.dshpc-picker__trigger{\n display:inline-flex;align-items:center;justify-content:space-between;gap:6px;\n min-width:0;height:28px;padding:0 8px;\n color:var(--dshpc-fg);background:var(--dshpc-surface-1);\n border:1px solid var(--dshpc-border-heavy);border-radius:var(--dshpc-radius-md);cursor:pointer;\n}\n.dshpc-picker__trigger:disabled{color:var(--dshpc-fg-dim);cursor:not-allowed;opacity:.7}\n/* 聚焦(键盘或点击选中)时与全站一致的蓝色描边;菜单打开后焦点会进去,触发器自然失去焦点。 */\n.dshpc-picker__trigger:focus-visible{outline:2px solid var(--dshpc-focus);outline-offset:1px}\n/* 文字默认靠左(吃掉剩余宽度),不给 space-between 把短文案推到中间的机会;\n 确实要居中就显式传 align=\"center\"。 */\n.dshpc-picker__label{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left}\n.dshpc-picker__trigger--center .dshpc-picker__label{text-align:center}\n.dshpc-picker__caret{flex:none;color:var(--dshpc-fg-3)}\n.dshpc-picker__icon{display:inline-flex;flex:none;color:var(--dshpc-fg-2)}\n.dshpc-picker__option-icon{display:inline-flex;flex:none;color:var(--dshpc-fg-2)}\n/* 下拉面板只留定位 / 裁切 / 字号:底色·描边·圆角·阴影来自 panel.css 的 menu 档。 */\n.dshpc-picker__menu{\n z-index:var(--dshpc-z-popmenu);max-height:280px;overflow:hidden;\n display:flex;flex-direction:column;\n /* 菜单经 FloatingPortal 挂到 body,脱离 .dshpc-picker,须显式字号,否则继承 body 的大字号 */\n font-size:13px;line-height:20px;\n}\n/* 固定头部(提示 + 搜索框),不随列表滚(2026-11-06 用户)。 */\n.dshpc-picker__head{flex:none;padding:4px 4px 0}\n/* 滚动在内层:列表贴满面板内容区,1px 让位由 .dshpc-scroll-thin 统一给\n (不留缝就贴死在边框内壁上,2026-11-06 用户反馈)。上下角溢出由面板 overflow:hidden 裁掉。 */\n.dshpc-picker__list{flex:1 1 auto;min-height:0;overflow-y:auto;padding:0 4px 4px}\n/* 尺寸档(与 Field 的 sm/md/lg 对应)。 */\n.dshpc-picker__trigger--sm{height:24px;font-size:12px}\n.dshpc-picker__trigger--lg{height:32px}\n/* ── 菜单内部:全部收进 .dshpc-picker__menu 作用域(不要退回裸单类)─────────────\n 每个消费插件都把 core 内联进自己的产物,同一页上可能同时挂着**旧版 core** 的同一批\n dshpc-* 规则(v0.35.15 的选项是 4px 圆角、提示条是通栏 0 圆角)。旧规则与本文件同为\n 单类选择器(0,1,0),谁后挂载谁赢 —— 2026-11-10 用户真机:选中行 / 悬停行 / 黄色提示块\n 三处圆角全退回旧值,而搜索框(旧版碰巧同值)看着正常。\n 收进菜单祖先(0,2,0)后,无论新旧 CSS 谁先注入,当前版本都赢。\n 根治是类名跨版本隔离(已知未完成项);在那之前,这层作用域不是可选修饰。 */\n\n/* 键盘游标所在项(无 hover 也要看得见)。 */\n.dshpc-picker__menu .dshpc-picker__option[data-active='true']{background:var(--dshpc-surface-sunken);outline:1px solid var(--dshpc-border)}\n.dshpc-picker__menu .dshpc-picker__option--clear{color:var(--dshpc-fg-3)}\n.dshpc-picker__menu .dshpc-picker__search{\n width:100%;height:28px;margin-bottom:4px;padding:0 8px;box-sizing:border-box;\n color:var(--dshpc-fg);background:var(--dshpc-surface-sunken);\n border:1px solid var(--dshpc-border-heavy);border-radius:var(--dshpc-radius-md);outline:none;\n}\n.dshpc-picker__menu .dshpc-picker__search::placeholder{color:var(--dshpc-fg-3)}\n.dshpc-picker__menu .dshpc-picker__group-label{\n padding:6px 8px 2px;color:var(--dshpc-fg-3);font-size:11px;\n}\n/* 圆角只跟全站「框 / 行」那一档走:--dshpc-radius-md。\n 真源是 Surface(surface.css:4-5「容器档 = --dshpc-radius-md,与 Button / Input 同档」),ListRow 的行\n 圆角也是从 Surface 继承的 —— 所以这里不能自己挑 xs/sm 之类更小的档。2026-11-10 用户真机截图:\n 搜索框(md)与被选中的蓝行(xs)圆角明显不齐,同在一个面板里像两套控件。\n 大圆角仍然只归外层菜单(panel.css 的 menu 档 + overflow:hidden)。 */\n.dshpc-picker__menu .dshpc-picker__option{\n display:flex;align-items:center;gap:6px;padding:6px 8px;border-radius:var(--dshpc-radius-md);cursor:pointer;\n color:var(--dshpc-fg);white-space:nowrap;\n}\n/* 行与行之间隔 1px(用户 2026-11-10 指名:只要 1px,不要间距四拍里的 4px —— 四档是排版用的,\n 这种「把两条底色分开一点」的细分缝是用户点名的值,按原样写)。 */\n.dshpc-picker__menu .dshpc-picker__option + .dshpc-picker__option{margin-top:1px}\n/* hover / 选中直接借 ListRow 的两条 token —— 同一个「行」语义,与列表条目对齐。\n 选中不染文字色:蓝字是「链接」语义,行选中只换底(list-row.css:44-47 的口径)。\n 2026-11-10 用户:原来蓝底蓝字 + 亮一点的灰,和 ListRow 完全不是一套。 */\n.dshpc-picker__menu .dshpc-picker__option:hover{background:var(--dshpc-listrow-hover-bg)}\n.dshpc-picker__menu .dshpc-picker__option--active{background:var(--dshpc-listrow-selected-bg);color:var(--dshpc-fg)}\n.dshpc-picker__menu .dshpc-picker__option--disabled{color:var(--dshpc-fg-dim);cursor:not-allowed}\n/* 选项文字吃掉剩余宽度:超长省略号(配合 MarqueeText hover 跑马灯),不撑宽菜单。 */\n.dshpc-picker__menu .dshpc-picker__option-label{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n.dshpc-picker__menu .dshpc-picker__tick{width:12px;color:var(--dshpc-business)}\n.dshpc-picker__menu .dshpc-picker__empty{padding:8px;color:var(--dshpc-fg-3);text-align:center}\n/* 提示条(候选不完整 / 已到上限)与列表行同一套「块」:md 圆角 + 行内距,左右对齐搜索框与选项\n (不再靠负 margin 伸到菜单内壁),只是配色换成提示黄。2026-11-10 用户:那条通栏太难看了,\n 要做成下面选中行那种框、用提示色。 */\n.dshpc-picker__menu .dshpc-picker__degraded{\n padding:6px 8px;margin:0 0 4px;border-radius:var(--dshpc-radius-md);\n color:var(--dshpc-warning-label);background:color-mix(in srgb,var(--dshpc-warning) 12%,transparent);\n font-size:11px;\n}\n.dshpc-picker__menu .dshpc-picker__row{display:flex;align-items:center;gap:8px}\n/* 「显示更多」跟在最后一条后面、长得像多一条选项(2026-11-06 用户:翻到底发现不全才会找它)。\n 圆角同样走 md:它视觉上就是列表里多出来的一行,档位与选项一致,别再单独挑一个。 */\n.dshpc-picker__menu .dshpc-picker__more{\n display:block;width:100%;margin-top:1px;padding:6px 8px;\n color:var(--dshpc-business);background:none;\n border:0;border-radius:var(--dshpc-radius-md);cursor:pointer;\n font-size:12px;line-height:20px;text-align:center;\n}\n.dshpc-picker__menu .dshpc-picker__more:hover{background:var(--dshpc-surface-sunken)}\n";
|
|
53027
53081
|
//#endregion
|
|
53028
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
53082
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/inputs/Picker.js
|
|
53029
53083
|
/**
|
|
53030
53084
|
* 通用选择器:单选 / 多选 / 上限 / 搜索 / 分组 / 空态 / 降级。
|
|
53031
53085
|
*
|
|
@@ -53233,19 +53287,19 @@ window.__ModuleLoader__.load({
|
|
|
53233
53287
|
return Array.isArray(v) ? [...v] : [v];
|
|
53234
53288
|
}
|
|
53235
53289
|
//#endregion
|
|
53236
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
53290
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/utils/date.js
|
|
53237
53291
|
/** 两位补零:`9` → `09`(数字 / 纯数字字符串都收)。 */
|
|
53238
53292
|
function pad2$1(value) {
|
|
53239
53293
|
return String(value).padStart(2, "0");
|
|
53240
53294
|
}
|
|
53241
53295
|
//#endregion
|
|
53242
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
53296
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/display/card-css.generated.js
|
|
53243
53297
|
const CARD_CSS = "\n/* ── Card / StripCard:Surface 外框 + 头部契约 + 色条 ─────────────────────\n 外框(底 / 边框 / 圆角)来自 .dshpc-surface(src/ui/surface.css):\n 本文件**不再写 border / border-radius**,圆角契约因此只有一个定义点(容器档 = 12)。\n 内距不在根节点:根节点 padding:0,__body(头部区)与 __panel(展开区)各自承担 ——\n 两块区域因此彼此独立,hover 只可能落在头部区,展开区不会被波及。\n 这里只管三件 Surface 不该知道的事:色条几何、头部布局、两块区域的内距。\n\n 色条几何默认值都可被 props 覆盖(Card.ts 写对应的 CSS 变量):\n --card-bar-size 条子粗细\n --card-bar-inset 条子距卡片边缘的距离(= 贴边那一侧的内距)\n --card-bar-gap 条子距内容的距离(= body 的 gap)\n --card-bar-length 上下方位时的条长(100% = 跟内容同宽)\n 这些变量只在本文件消费(3 份文件一起引时,跨文件引用别处的变量会静默失效),\n 所以默认值必须写在这里,而不是令牌或别的皮肤里。 */\n.dshpc-card{\n --card-accent:var(--dshpc-business);\n --card-accent-soft:var(--dshpc-business-soft);\n --card-bar-size:6px;\n --card-bar-inset:12px;\n --card-bar-gap:12px;\n --card-bar-length:100%;\n /* 内距四根轴是唯一真源:根节点自己不留 padding,__body 与 __panel 都只读这四根轴。\n 这样 __body 就是「上面那一整块」,hover 铺色边到边,连原本那圈外圈一起变。\n --card-pad-all 只是四轴的组合值,消费端 style.padding 由 Card.ts 摊成四根轴后自动派生。 */\n --card-pad-t:14px;--card-pad-r:14px;--card-pad-b:14px;--card-pad-l:14px;\n --card-pad-all:var(--card-pad-t) var(--card-pad-r) var(--card-pad-b) var(--card-pad-l);\n padding:0;\n /* 头部区背景铺满根节点内容盒,由根节点统一裁成外框圆角;__body 自己不写圆角裸值。 */\n overflow:hidden;\n}\n/* 档位 → token(照 records-timeline 的 tone 模式:一个变量切档,不写 5 套规则;浅底与色条同源)。 */\n.dshpc-card--success{--card-accent:var(--dshpc-success);--card-accent-soft:var(--dshpc-success-soft)}\n.dshpc-card--warning{--card-accent:var(--dshpc-warning);--card-accent-soft:var(--dshpc-warning-soft)}\n.dshpc-card--danger{--card-accent:var(--dshpc-danger);--card-accent-soft:var(--dshpc-danger-soft)}\n/* neutral 浅底借 chip 底(兄弟项目 mute 档同款:明暗都成立)。 */\n.dshpc-card--neutral{--card-accent:var(--dshpc-fg-4);--card-accent-soft:var(--dshpc-chip-bg)}\n/* 扩展八色(2026-10-29):色条 + 浅底同源,软底走各自 -soft。 */\n.dshpc-card--purple{--card-accent:var(--dshpc-purple);--card-accent-soft:var(--dshpc-purple-soft)}\n.dshpc-card--pink{--card-accent:var(--dshpc-pink);--card-accent-soft:var(--dshpc-pink-soft)}\n.dshpc-card--cyan{--card-accent:var(--dshpc-cyan);--card-accent-soft:var(--dshpc-cyan-soft)}\n.dshpc-card--teal{--card-accent:var(--dshpc-teal);--card-accent-soft:var(--dshpc-teal-soft)}\n.dshpc-card--orange{--card-accent:var(--dshpc-orange);--card-accent-soft:var(--dshpc-orange-soft)}\n.dshpc-card--indigo{--card-accent:var(--dshpc-indigo);--card-accent-soft:var(--dshpc-indigo-soft)}\n.dshpc-card--rose{--card-accent:var(--dshpc-rose);--card-accent-soft:var(--dshpc-rose-soft)}\n.dshpc-card--slate{--card-accent:var(--dshpc-slate);--card-accent-soft:var(--dshpc-slate-soft)}\n\n/* body = 色条 + 头部,也是「上面那一整块」:它自己承担内距并铺满根节点内容盒,\n 是 head 作用域下唯一的 hover 目标。圆角由根节点 overflow 裁切 ⇒ hover 色不露方角。\n --card-pad-all 由四根轴派生;消费端 style.padding 覆盖四轴后,头部区与展开区同步对齐。\n 方向跟着条子贴的边切 ⇒ 四个方位只是「换一个方向的 flex 项」,不用各写一套定位。 */\n.dshpc-card__body{\n display:flex;gap:var(--card-bar-gap);min-width:0;\n padding:var(--card-pad-all);\n background:transparent;\n}\n.dshpc-card--bar-top .dshpc-card__body,\n.dshpc-card--bar-bottom .dshpc-card__body{flex-direction:column}\n/* 展开态不特殊处理内距:头部区上下留白始终对称,色条上下才不会一长一短。\n 两块之间的间隔就是 __body 的 padding-bottom,属于头部区、跟着一起变色;\n __panel 紧接其后,不在中间留一条不变色的带子,也不画分隔线。 */\n\n/* 头部一行 = 主内容 + 右侧槽,**整体垂直居中**:调用方在 action 里裸放一个元素\n (按钮 / 文字 / 图标)不用自己套容器居中;一行两行、右边怎么放由调用方在框内自定。 */\n.dshpc-card__head{display:flex;align-items:center;gap:8px;min-width:0}\n.dshpc-card--bar-left .dshpc-card__head,\n.dshpc-card--bar-right .dshpc-card__head{flex:1 1 auto}\n.dshpc-card__main{flex:1;min-width:0}\n.dshpc-card__side{display:flex;align-items:center;gap:6px;flex:none}\n\n/* 色条:左/右 = 竖向条(高度跟内容,最小一行);上/下 = 横向条(长度默认跟内容同宽)。\n 右/下方位靠 order 排到头部之后,DOM 顺序始终不变。 */\n.dshpc-card__bar{flex:none;background:var(--card-accent);border-radius:var(--dshpc-radius-xs)}\n.dshpc-card--bar-left .dshpc-card__bar,\n.dshpc-card--bar-right .dshpc-card__bar{width:var(--card-bar-size);align-self:stretch;min-height:var(--dshpc-line-md)}\n.dshpc-card--bar-top .dshpc-card__bar,\n.dshpc-card--bar-bottom .dshpc-card__bar{width:var(--card-bar-length);height:var(--card-bar-size);align-self:flex-start}\n.dshpc-card--bar-right .dshpc-card__bar,\n.dshpc-card--bar-bottom .dshpc-card__bar{order:1}\n\n/* ── 外观一 · StripCard:同色系浅底 + 1px 不可见占位边框 + 方角 + 4px 通高方角色条贴左缘 ──\n 底色 / 方角 / 占位边框由 Surface 的三条修饰类提供(Card.ts 按 kind 传),此处只管内距与条子。 */\n.dshpc-card.dshpc-card--strip{\n --card-bar-size:4px;--card-bar-inset:0;\n --card-pad-t:12px;--card-pad-r:12px;--card-pad-b:12px;--card-pad-l:20px;\n /* 底色改走 Surface 的 --surface-bg 变量(surface.css:7-8 契约):不能写 background 属性,\n 否则透明档要覆盖时会被属性层打架(兄弟项目曾用 background-image 渐变绕过)。 */\n --surface-bg:var(--card-accent-soft,transparent);\n}\n/* 左内边距 20px = 16 留白 + 4 条宽 ⇒ 内容从色条右缘起算;色条绝对定位通高,跟着内容高度自适应。\n 定位基准是根节点的 position:relative(Surface 提供),top:0 / bottom:0 因此是整卡通高:\n 展开后色条仍一路贯穿到展开区底部,不随 head 分区被裁短(2026-11-08 拍板)。\n 特异性 0,3,0:压过上面 .dshpc-card--bar-left .dshpc-card__bar 的宽度规则,与注入顺序无关。 */\n.dshpc-card.dshpc-card--strip .dshpc-card__bar{position:absolute;left:0;top:0;bottom:0;width:4px;align-self:auto}\n\n/* ── 外观二 · Card:色条贴边那一侧的内距 = 条子距边缘的距离 ──\n 四方位只改对应那根 --card-pad-* 变量,__body 与 __panel 同时跟着对齐。 */\n.dshpc-card--bar-left{--card-pad-l:var(--card-bar-inset)}\n.dshpc-card--bar-right{--card-pad-r:var(--card-bar-inset)}\n.dshpc-card--bar-top{--card-pad-t:var(--card-bar-inset)}\n.dshpc-card--bar-bottom{--card-pad-b:var(--card-bar-inset)}\n\n/* ── 外观轴(2026-11-07):底色开关 + hover 作用域 ───────────────────────────\n 两块区域各自独立:根节点只铺一层常态底(--surface-bg);__body 是「上面那一整块」,\n __panel 是它的兄弟节点,不铺任何背景、不参与 hover。\n hoverScope(默认 head):\n head —— 只有 __body 铺 --dshpc-card-hover,边到边(内距圈 + 圆角都在这一块上);\n 展开态也不改内距,上下两圈留白同属这一块、一起变色,色条上下才对称;\n 鼠标落在 __panel 时 :hover 根本不成立 ⇒ 整卡不触发,下面永远是常态。\n card —— 根节点改 --surface-bg,整卡含展开区一起变色,由消费端显式选。\n ⚠️ 绝不用「给展开区铺一层底色去盖住根节点」:半透明 token 叠两层会更深(真踩过)。 */\n.dshpc-card.dshpc-card--no-fill{--surface-bg:transparent}\n/* 开关打开即声明「上面那一块可交互」:手势跟着变,展开区还原成默认光标。 */\n.dshpc-card.dshpc-card--hoverable{cursor:pointer}\n.dshpc-card.dshpc-card--hover-head .dshpc-card__panel{cursor:auto}\n/* 可点卡片的键盘焦点环:点击层 head = __body、card = 根节点,两者共用这一条。\n outline 画在盒内(offset 负值):根节点 overflow:hidden 会裁掉 __body 外侧那一圈。 */\n.dshpc-card__hit:focus-visible{outline:2px solid var(--dshpc-focus);outline-offset:-2px}\n/* 顺序即优先级:strip 浅底 / no-fill 透明(0,2,0) → card:hover(0,3,0,最高)。 */\n.dshpc-card.dshpc-card--hover-head .dshpc-card__body:hover{background:var(--dshpc-card-hover)}\n.dshpc-card.dshpc-card--hover-card:hover{--surface-bg:var(--dshpc-card-hover)}\n\n.dshpc-card__toggle{\n display:inline-flex;align-items:center;justify-content:center;\n width:24px;height:24px;padding:0;background:none;border:none;border-radius:var(--dshpc-radius-sm);\n color:var(--dshpc-fg-3);cursor:pointer;\n}\n.dshpc-card__toggle:hover{background:var(--dshpc-surface-sunken);color:var(--dshpc-fg)}\n/* 箭头是 svg(Chevron),不是字形 ⇒ 不要 font-size;inline-flex 免掉 svg 的基线留白。 */\n.dshpc-card__caret{display:inline-flex;transition:transform .15s ease}\n.dshpc-card__caret.is-open{transform:rotate(180deg)}\n/* 展开区只负责「把展开内容放在头部区下面」:自己承担左右 / 底部内距,补上卡片底部留白。\n margin-top 与 padding-top 双双归 0 ⇒ 两块之间的间隔只有 __body 的 padding-bottom,\n 属于头部区、跟着 hover 一起变色;消费端自绘的线因此能贴住这块色的下沿,中间不夹不变色的带子。\n 左右 / 底部内距读同一组四轴变量 ⇒ 与头部区同源,不会左贴边、右留白。\n 核心不画任何分隔线:需要线由消费端在 panel 内容里自绘(有时要、有时不要,消费端自己决定)。 */\n.dshpc-card__panel{\n margin:0 var(--card-pad-r) 0 var(--card-pad-l);\n padding:0 0 var(--card-pad-b);\n}\n";
|
|
53244
53298
|
//#endregion
|
|
53245
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
53299
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/display/surface-css.generated.js
|
|
53246
53300
|
const SURFACE_CSS = "\n/* ── Surface · 纯框容器 ───────────────────────────────────────────────────\n 只回答「一块面长什么样」:底 / 边 / 圆角 / 内距,四根轴,零业务语义。\n 它是**圆角契约的唯一真源**:容器档 = --dshpc-radius-md(12),与 Button / Input 同档,\n 外框永远不小于里面的控件 —— 杜绝「卡片 8 < 按钮 12」这类倒挂(2026-11-01)。\n\n 所有轴都用**变量**表达,修饰类只改这些变量、不改属性:\n 消费方(Card、下游插件)自己写规则时,无论两份 CSS 谁先注入,胜负都不依赖顺序。\n\n tone plain(默认 surface-1) / raised / sunken / subtle\n border 默认 1px 实线;faint 更淡;none 透明(保留 1px 占位,不跳高);\n dashed 虚线(占位框用,线色仍是 border token)\n radius 默认 md;none / sm / lg\n padding 默认由调用方选档;none / sm(8) / md(12) / lg(16)\n 基类不带内距:容器要自己算四边内距时(如 Card 的色条贴边),不传 pad 档即可,不需要覆盖。 */\n.dshpc-surface{\n position:relative;box-sizing:border-box;color:var(--dshpc-fg);font:inherit;text-align:left;\n --surface-bg:var(--dshpc-surface-1);\n --surface-border:var(--dshpc-border);\n --surface-border-style:solid;\n --surface-radius:var(--dshpc-radius-md);\n --surface-pad:0;\n border:1px var(--surface-border-style) var(--surface-border);\n border-radius:var(--surface-radius);\n background:var(--surface-bg);\n padding:var(--surface-pad);\n}\n.dshpc-surface--tone-raised{--surface-bg:var(--dshpc-surface-raised)}\n.dshpc-surface--tone-sunken{--surface-bg:var(--dshpc-surface-sunken)}\n.dshpc-surface--tone-subtle{--surface-bg:var(--dshpc-chip-bg)}\n.dshpc-surface--border-faint{--surface-border:var(--dshpc-border-faint)}\n.dshpc-surface--border-none{--surface-border:transparent}\n.dshpc-surface--border-dashed{--surface-border-style:dashed}\n.dshpc-surface--radius-none{--surface-radius:0}\n.dshpc-surface--radius-sm{--surface-radius:var(--dshpc-radius-sm)}\n.dshpc-surface--radius-lg{--surface-radius:var(--dshpc-radius-lg)}\n.dshpc-surface--pad-none{--surface-pad:0}\n.dshpc-surface--pad-sm{--surface-pad:var(--dshpc-space-2)}\n.dshpc-surface--pad-md{--surface-pad:var(--dshpc-space-3)}\n.dshpc-surface--pad-lg{--surface-pad:var(--dshpc-space-4)}\n";
|
|
53247
53301
|
//#endregion
|
|
53248
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
53302
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/display/Surface.js
|
|
53249
53303
|
/**
|
|
53250
53304
|
* 拼 Surface 的类名。独立导出是给组合类容器(Card)用的:
|
|
53251
53305
|
* 容器要把 Surface 当外框、又不想吃它的内距时,传 `padding: null` 即可。
|
|
@@ -53280,7 +53334,7 @@ window.__ModuleLoader__.load({
|
|
|
53280
53334
|
}, props.children ?? null);
|
|
53281
53335
|
}
|
|
53282
53336
|
//#endregion
|
|
53283
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
53337
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/display/Card.js
|
|
53284
53338
|
/** 色条档位(映射到 design 的 token,不新增 token;也接受任意 CSS 颜色值)。 */
|
|
53285
53339
|
const CARD_ACCENTS = [
|
|
53286
53340
|
"business",
|
|
@@ -53443,10 +53497,10 @@ window.__ModuleLoader__.load({
|
|
|
53443
53497
|
return CardShell("bordered", props);
|
|
53444
53498
|
}
|
|
53445
53499
|
//#endregion
|
|
53446
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
53500
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/display/chip-css.generated.js
|
|
53447
53501
|
const CHIP_CSS = "\n/* 三条局部变量承载配色:neutral 走旧灰面;语义档换底字配对(2026-10-20 用户要多色多尺寸标签)。 */\n.dshpc-chip{--chip-bg:var(--dshpc-chip-bg);--chip-fg:var(--dshpc-fg);--chip-bg-hover:var(--dshpc-chip-bg-hover);\n display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:1px 8px;\n box-sizing:border-box;border-radius:var(--dshpc-radius-pill,999px);border:none;\n background:var(--chip-bg);color:var(--chip-fg);\n font-family:inherit;font-size:11px;line-height:18px;margin:0;\n /* 2026-10-18:chip 是 flex 行里的常用项,禁止被压缩换行(预览站出现过文字竖排、互相叠压的挤压)。 */\n white-space:nowrap;flex:none;\n appearance:none;-webkit-appearance:none;\n}\n/* md 档:卡片元信息行等稍大场景;sm 即旧版默认,逐像素不动。 */\n.dshpc-chip--md{padding:2px 10px;font-size:12px;line-height:20px;}\n/* xs 档:标题后缀等极紧凑场景(2026-10-20 用户要更小标签);16px 高、font 10。 */\n.dshpc-chip--xs{padding:0 6px;font-size:10px;line-height:16px;}\n/* 语义色实心档:底 / 字 / hover 配对与 Button 同源(黄底中高明度 ⇒ 字用 --dshpc-on-warning)。 */\n.dshpc-chip--business{--chip-bg:var(--dshpc-business);--chip-fg:var(--dshpc-on-signal);--chip-bg-hover:var(--dshpc-business-hover);}\n.dshpc-chip--success{--chip-bg:var(--dshpc-success);--chip-fg:var(--dshpc-on-signal);--chip-bg-hover:var(--dshpc-success-hover);}\n.dshpc-chip--warning{--chip-bg:var(--dshpc-warning);--chip-fg:var(--dshpc-on-warning);--chip-bg-hover:var(--dshpc-warning-hover);}\n.dshpc-chip--danger{--chip-bg:var(--dshpc-danger);--chip-fg:var(--dshpc-on-signal);--chip-bg-hover:var(--dshpc-danger-hover);}\n/* 扩展八色(2026-10-29):实心面字色统一白(on-signal),明度均低于黄 / 青柠,白字两主题可读。 */\n.dshpc-chip--purple{--chip-bg:var(--dshpc-purple);--chip-fg:var(--dshpc-on-signal);--chip-bg-hover:var(--dshpc-purple-hover);}\n.dshpc-chip--pink{--chip-bg:var(--dshpc-pink);--chip-fg:var(--dshpc-on-signal);--chip-bg-hover:var(--dshpc-pink-hover);}\n.dshpc-chip--cyan{--chip-bg:var(--dshpc-cyan);--chip-fg:var(--dshpc-on-signal);--chip-bg-hover:var(--dshpc-cyan-hover);}\n.dshpc-chip--teal{--chip-bg:var(--dshpc-teal);--chip-fg:var(--dshpc-on-signal);--chip-bg-hover:var(--dshpc-teal-hover);}\n.dshpc-chip--orange{--chip-bg:var(--dshpc-orange);--chip-fg:var(--dshpc-on-signal);--chip-bg-hover:var(--dshpc-orange-hover);}\n.dshpc-chip--indigo{--chip-bg:var(--dshpc-indigo);--chip-fg:var(--dshpc-on-signal);--chip-bg-hover:var(--dshpc-indigo-hover);}\n.dshpc-chip--rose{--chip-bg:var(--dshpc-rose);--chip-fg:var(--dshpc-on-signal);--chip-bg-hover:var(--dshpc-rose-hover);}\n.dshpc-chip--slate{--chip-bg:var(--dshpc-slate);--chip-fg:var(--dshpc-on-signal);--chip-bg-hover:var(--dshpc-slate-hover);}\n/* 可点态:button 渲染(见 Chip.ts),光标 + hover 加深。 */\n.dshpc-chip--clickable{cursor:pointer;transition:background-color var(--dshpc-dur-fast) var(--dshpc-ease);}\n.dshpc-chip--clickable:hover:not(:disabled){background:var(--chip-bg-hover)}\n.dshpc-chip:focus-visible{outline:2px solid var(--dshpc-focus);outline-offset:1px}\n/* 禁用态字色从 --chip-fg 派生(45% ≈ 旧 fg-3 的弱化观感),不许直接用 --dshpc-fg-3:\n 它跟主题走,暗色下是深灰 ⇒ 语义色实心标签(蓝 / 红底)上几乎看不见(与 Segmented 计数 2026-10-29 同类)。 */\n.dshpc-chip:disabled{cursor:default;color:color-mix(in srgb,var(--chip-fg) 45%,transparent)}\n/* maxWidth 包 MarqueeText 时:标签作为 flex 子项必须能收缩到内容以下,否则省略号 / 跑马灯测不准 */\n.dshpc-chip .dshpc-chip__label{min-width:0;}\n@media (prefers-reduced-motion: reduce){.dshpc-chip{transition:none}}\n";
|
|
53448
53502
|
//#endregion
|
|
53449
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
53503
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/display/Chip.js
|
|
53450
53504
|
/** 小标签(neutral 用现成的 `--dshpc-chip-bg`;传 `onClick` 才是可点的)。 */
|
|
53451
53505
|
function Chip(props) {
|
|
53452
53506
|
ensureComponentStyles("chip", CHIP_CSS);
|
|
@@ -53470,10 +53524,10 @@ window.__ModuleLoader__.load({
|
|
|
53470
53524
|
}) : children ?? null);
|
|
53471
53525
|
}
|
|
53472
53526
|
//#endregion
|
|
53473
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
53527
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/display/list-row-css.generated.js
|
|
53474
53528
|
const LIST_ROW_CSS = "/* ── ListRow · 一行一条的列表条目 ───────────────────────────────────────────\n 外框(底 / 边 / 圆角 / 内距)全部由 Surface 提供:组件调 surfaceClass 拿\n dshpc-surface + tone-sunken + border-none,本文件不写 background / border / border-radius。\n 所有轴只改 --surface-* 变量:无论 Surface 与本皮肤谁先注入,胜负都不依赖顺序\n (surface.css:7-8 的既定契约)。本文件只管「行」独有的:默认字号、高度、两槽布局、行级 hover、选中态。 */\n\n/* 双类选择器压过 .dshpc-surface 基类,避免注入顺序影响变量覆盖。 */\n.dshpc-surface.dshpc-listrow{\n /* 四边等距(8px,与 Surface 的 pad-sm 同档):不写「上下 0 / 左右 12」那种横宽纵窄的值。 */\n --surface-pad:var(--dshpc-space-2);\n /* 具体控件自带默认字号:只有 Surface 这种纯容器才用 font:inherit,行内容不能继承宿主默认 16px。\n 与 Table(table.css:11) / Input md(field.css:22) 同口径;调用方仍可用内联 style 覆盖。 */\n font-size:var(--dshpc-font-md);line-height:var(--dshpc-line-md);\n display:flex;align-items:center;gap:var(--dshpc-space-2);\n min-height:var(--dshpc-control-h-md);width:100%;\n transition:background-color var(--dshpc-dur-fast) var(--dshpc-ease);\n}\n/* 两个槽都自带垂直居中:__main 曾是普通块级流,调用方把主内容包成 inline-flex 的 span\n 会按基线排、下方多出 descender 空隙 ⇒ 左边偏上、右边居中(2026-11-08 兄弟项目真机反馈)。\n 这里补 display:flex + align-items:center,与 __actions 对称;主内容怎么横排仍归调用方。\n 子项补 min-width:0,MarqueeText 这类可截断内容在 flex 里才不会被自身内容撑破。 */\n.dshpc-listrow__main{flex:1 1 auto;min-width:0;display:flex;align-items:center;}\n.dshpc-listrow__main>*{min-width:0;}\n.dshpc-listrow__actions{flex:none;display:flex;align-items:center;gap:4px;}\n\n/* 整行可点:光标 + 键盘焦点环(与 Button / Chip 同口径)。 */\n.dshpc-listrow--interactive{cursor:pointer;}\n.dshpc-listrow--interactive:focus-visible{outline:2px solid var(--dshpc-focus);outline-offset:1px;}\n\n/* 三态各只换一个 --surface-bg:\n 常态 tone-sunken(淡底,由 surface.css 给,此处不重写)\n hover --dshpc-listrow-hover-bg = 比常态只深一点点的中性灰(双主题各自定义)\n selected --dshpc-listrow-selected-bg = slate 极浅蓝灰(双主题各自定义)\n ⚠️ hover 别用 --dshpc-active(亮黑 18% / 暗白 24%):相对常态 6% 一下跳太多,\n 整行连同内容的对比度都被改掉,太夸张(2026-11-07 用户反馈)。\n ⚠️ 亮色也别用 --dshpc-plate-hover:它是 #f5f5f5 实色,常态 tone-sunken ≈ #f0f1f3,\n 白底上几乎同色甚至更白 ⇒ 移上去看不出变化(真踩过,见 tokens.css:153)。\n ⚠️ 选中别用通用 --dshpc-selected-bg:暗色它是两个深色面互掺 ⇒ 选中行发黑(用户反馈)。\n 双类 + :hover 压得过单类 tone-sunken,不需要 !important。 */\n.dshpc-surface.dshpc-listrow--hoverable:not(.dshpc-listrow--selected):hover{\n --surface-bg:var(--dshpc-listrow-hover-bg);\n}\n\n/* 选中只换一个背景色:slate 极浅蓝灰,不描边、不渐变、不竖条;状态仍由调用方管。 */\n.dshpc-surface.dshpc-listrow--selected{\n --surface-bg:var(--dshpc-listrow-selected-bg);\n}\n\n@media (prefers-reduced-motion: reduce){.dshpc-listrow{transition:none}}\n";
|
|
53475
53529
|
//#endregion
|
|
53476
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
53530
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/display/ListRow.js
|
|
53477
53531
|
/**
|
|
53478
53532
|
* 一行一条的列表条目:常态带底、整行可点、右侧挂一组小操作。
|
|
53479
53533
|
*
|
|
@@ -53533,7 +53587,7 @@ window.__ModuleLoader__.load({
|
|
|
53533
53587
|
}, actions));
|
|
53534
53588
|
}
|
|
53535
53589
|
//#endregion
|
|
53536
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
53590
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/navigation/pagination-logic.js
|
|
53537
53591
|
/**
|
|
53538
53592
|
* 分页纯逻辑:总页数、页码夹取、省略号窗口、当前页可见区间。
|
|
53539
53593
|
*
|
|
@@ -53597,7 +53651,7 @@ window.__ModuleLoader__.load({
|
|
|
53597
53651
|
return items;
|
|
53598
53652
|
}
|
|
53599
53653
|
//#endregion
|
|
53600
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
53654
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/navigation/Pagination.js
|
|
53601
53655
|
/**
|
|
53602
53656
|
* 分页(`‹ Previous 1 [2] 3 … 36 Next ›`)。
|
|
53603
53657
|
*
|
|
@@ -53636,7 +53690,7 @@ window.__ModuleLoader__.load({
|
|
|
53636
53690
|
total
|
|
53637
53691
|
});
|
|
53638
53692
|
})();
|
|
53639
|
-
const pageButton = (n) => (0, react$1.createElement)(Button$
|
|
53693
|
+
const pageButton = (n) => (0, react$1.createElement)(Button$4, {
|
|
53640
53694
|
key: n,
|
|
53641
53695
|
variant: n === page ? "info" : "ghost",
|
|
53642
53696
|
size: "md",
|
|
@@ -53649,7 +53703,7 @@ window.__ModuleLoader__.load({
|
|
|
53649
53703
|
const navButton = (direction) => {
|
|
53650
53704
|
const isPrev = direction === "prev";
|
|
53651
53705
|
const label = isPrev ? tt("paginationPrev") : tt("paginationNext");
|
|
53652
|
-
return (0, react$1.createElement)(Button$
|
|
53706
|
+
return (0, react$1.createElement)(Button$4, {
|
|
53653
53707
|
variant: "ghost",
|
|
53654
53708
|
size: "md",
|
|
53655
53709
|
className: "dshpc-pagination__nav",
|
|
@@ -53699,7 +53753,7 @@ window.__ModuleLoader__.load({
|
|
|
53699
53753
|
}, totalNode === null ? null : (0, react$1.createElement)("span", { className: "dshpc-pagination__total" }, totalNode), (0, react$1.createElement)("div", { className: "dshpc-pagination__pages" }, navButton("prev"), ...middle, navButton("next")), sizeNode);
|
|
53700
53754
|
}
|
|
53701
53755
|
//#endregion
|
|
53702
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
53756
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/display/SectionHead.js
|
|
53703
53757
|
/**
|
|
53704
53758
|
* 模块标题行(UI 基础层):**标签(可选,画出来的短竖线)/ icon(可选)+ 标题 + 右侧控件**。
|
|
53705
53759
|
*
|
|
@@ -53748,7 +53802,7 @@ window.__ModuleLoader__.load({
|
|
|
53748
53802
|
}), props.icon === void 0 ? null : (0, react$1.createElement)("span", { className: "dshpc-section-head__icon" }, props.icon), (0, react$1.createElement)("span", { className: "dshpc-section-head__title" }, props.title), props.right === void 0 ? null : (0, react$1.createElement)("div", { className: "dshpc-section-head__right" }, props.right));
|
|
53749
53803
|
}
|
|
53750
53804
|
//#endregion
|
|
53751
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
53805
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/display/table-logic.js
|
|
53752
53806
|
/**
|
|
53753
53807
|
* 单元格值是不是「对象写法」(跨列 / 跨行 / 对齐)。
|
|
53754
53808
|
*
|
|
@@ -53819,7 +53873,7 @@ window.__ModuleLoader__.load({
|
|
|
53819
53873
|
return rows;
|
|
53820
53874
|
}
|
|
53821
53875
|
//#endregion
|
|
53822
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
53876
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/display/table-shared.js
|
|
53823
53877
|
function widthOf(width) {
|
|
53824
53878
|
if (width === void 0) return void 0;
|
|
53825
53879
|
return typeof width === "number" ? `${width}px` : width;
|
|
@@ -54038,7 +54092,7 @@ window.__ModuleLoader__.load({
|
|
|
54038
54092
|
}))), groups.length > 0 ? null : (0, react$1.createElement)("thead", { className: "dshpc-table__head" }, ...headRows.map((cells, level) => headRowOf(cells, level))), ...body);
|
|
54039
54093
|
}
|
|
54040
54094
|
//#endregion
|
|
54041
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
54095
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/display/Table.js
|
|
54042
54096
|
/**
|
|
54043
54097
|
* 底部哨兵的滚动监听:哨兵进入视口(提前 200px)就调一次 `onLoadMore`。
|
|
54044
54098
|
* `enabled` 由调用方决定(分页 / 分组模式下关掉);正在加载或已到底时 `blockedRef` 挡住重复触发。
|
|
@@ -55076,7 +55130,7 @@ window.__ModuleLoader__.load({
|
|
|
55076
55130
|
}));
|
|
55077
55131
|
});
|
|
55078
55132
|
//#endregion
|
|
55079
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
55133
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/feedback/toast-host.js
|
|
55080
55134
|
/** 全局注册表键:Symbol.for 跨 bundle 副本天然共享同一个符号。 */
|
|
55081
55135
|
const TOAST_HOST_KEY = Symbol.for("dsh-plugin-core/toast-host");
|
|
55082
55136
|
/** 全局单例:已注册则直接返回(不触发 create),否则建一个并注册。 */
|
|
@@ -55089,7 +55143,7 @@ window.__ModuleLoader__.load({
|
|
|
55089
55143
|
return created;
|
|
55090
55144
|
}
|
|
55091
55145
|
//#endregion
|
|
55092
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
55146
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/feedback/Toast.js
|
|
55093
55147
|
const DEFAULT_MS = 2600;
|
|
55094
55148
|
const ROOT_ID = "dshpc-toast-root";
|
|
55095
55149
|
function currentTheme() {
|
|
@@ -55217,7 +55271,7 @@ window.__ModuleLoader__.load({
|
|
|
55217
55271
|
flexShrink: 0
|
|
55218
55272
|
} }, ...actions.slice(0, 2).map((a) => {
|
|
55219
55273
|
const successSurface = payload.variant === "success";
|
|
55220
|
-
return (0, react$1.createElement)(Button$
|
|
55274
|
+
return (0, react$1.createElement)(Button$4, {
|
|
55221
55275
|
variant: successSurface ? "secondary" : a.variant ?? "info",
|
|
55222
55276
|
...successSurface ? { color: "var(--dshpc-surface-2)" } : {},
|
|
55223
55277
|
size: "md",
|
|
@@ -55294,7 +55348,7 @@ window.__ModuleLoader__.load({
|
|
|
55294
55348
|
});
|
|
55295
55349
|
}
|
|
55296
55350
|
//#endregion
|
|
55297
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
55351
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/layout/SplitGroup.js
|
|
55298
55352
|
/**
|
|
55299
55353
|
* 拼接外壳 —— 两个控件在外观上焊成一体(L2 组件皮肤,P1)
|
|
55300
55354
|
*
|
|
@@ -55328,7 +55382,7 @@ window.__ModuleLoader__.load({
|
|
|
55328
55382
|
}, props.children);
|
|
55329
55383
|
}
|
|
55330
55384
|
//#endregion
|
|
55331
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
55385
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/inputs/Field.js
|
|
55332
55386
|
/**
|
|
55333
55387
|
* 输入类控件 —— **全站唯一实现**(L2 组件皮肤,P3)
|
|
55334
55388
|
*
|
|
@@ -55357,8 +55411,9 @@ window.__ModuleLoader__.load({
|
|
|
55357
55411
|
const locked = useOverlayLocked();
|
|
55358
55412
|
const off = disabled === true || locked;
|
|
55359
55413
|
const [focused, setFocused] = (0, react$1.useState)(false);
|
|
55414
|
+
const [hovered, setHovered] = (0, react$1.useState)(false);
|
|
55360
55415
|
const search = type === "search";
|
|
55361
|
-
const showClear = search && value !== "" && focused && !off;
|
|
55416
|
+
const showClear = search && value !== "" && (focused || hovered) && !off;
|
|
55362
55417
|
const input = (0, react$1.createElement)("input", {
|
|
55363
55418
|
ref: props.inputRef,
|
|
55364
55419
|
type: type ?? "text",
|
|
@@ -55382,7 +55437,15 @@ window.__ModuleLoader__.load({
|
|
|
55382
55437
|
});
|
|
55383
55438
|
const hasIcon = icon !== void 0 && icon !== null;
|
|
55384
55439
|
if (!hasIcon && !search) return withHint(input, props.hint);
|
|
55385
|
-
return withHint((0, react$1.createElement)("span", {
|
|
55440
|
+
return withHint((0, react$1.createElement)("span", {
|
|
55441
|
+
className: `dshpc-iwrap dshpc-iwrap${sizeClass(size)}${showClear ? " dshpc-iwrap--clear" : ""}`,
|
|
55442
|
+
onMouseEnter: () => {
|
|
55443
|
+
setHovered(true);
|
|
55444
|
+
},
|
|
55445
|
+
onMouseLeave: () => {
|
|
55446
|
+
setHovered(false);
|
|
55447
|
+
}
|
|
55448
|
+
}, hasIcon ? (0, react$1.createElement)("span", { className: "dshpc-iwrap__icon" }, icon) : null, input, showClear ? (0, react$1.createElement)(IconButton$1, {
|
|
55386
55449
|
className: "dshpc-iwrap__clear",
|
|
55387
55450
|
variant: "plain",
|
|
55388
55451
|
size,
|
|
@@ -55397,7 +55460,7 @@ window.__ModuleLoader__.load({
|
|
|
55397
55460
|
}) : null), props.hint);
|
|
55398
55461
|
}
|
|
55399
55462
|
//#endregion
|
|
55400
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
55463
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/inputs/InputGroup.js
|
|
55401
55464
|
/**
|
|
55402
55465
|
* 组合输入框 —— 输入框 + 后置按钮组(+ 可选前置标题)焊成一体(L2 组件皮肤,P3)
|
|
55403
55466
|
*
|
|
@@ -55489,7 +55552,7 @@ window.__ModuleLoader__.load({
|
|
|
55489
55552
|
label: action.ariaLabel ?? t$2("inputAction"),
|
|
55490
55553
|
disabled: off,
|
|
55491
55554
|
onClick: run
|
|
55492
|
-
}) : (0, react$1.createElement)(Button$
|
|
55555
|
+
}) : (0, react$1.createElement)(Button$4, {
|
|
55493
55556
|
key: `action-${String(i)}`,
|
|
55494
55557
|
variant: action.variant ?? "info",
|
|
55495
55558
|
size,
|
|
@@ -55513,7 +55576,7 @@ window.__ModuleLoader__.load({
|
|
|
55513
55576
|
}, nodes), props.hint);
|
|
55514
55577
|
}
|
|
55515
55578
|
//#endregion
|
|
55516
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
55579
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/inputs/Textarea.js
|
|
55517
55580
|
/**
|
|
55518
55581
|
* 多行文本输入(P3 输入类家族唯一实现;皮肤见 controls-css.ts 的 `.dshpc-textarea`)。
|
|
55519
55582
|
*
|
|
@@ -55574,7 +55637,7 @@ window.__ModuleLoader__.load({
|
|
|
55574
55637
|
return true;
|
|
55575
55638
|
}
|
|
55576
55639
|
//#endregion
|
|
55577
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
55640
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/layout/QuickToolbar.js
|
|
55578
55641
|
/**
|
|
55579
55642
|
* 快捷工具栏(UI 基础层):**右侧悬浮的一列圆钮**,内置「回到顶部」,并可挂自定义按钮。
|
|
55580
55643
|
*
|
|
@@ -56884,15 +56947,17 @@ window.__ModuleLoader__.load({
|
|
|
56884
56947
|
return String(n);
|
|
56885
56948
|
}
|
|
56886
56949
|
//#endregion
|
|
56887
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
56888
|
-
/** 官方注入 style 标签的 data-plugin-css 包前缀(chat 主视图 + ui-tool / ui-skill 工具卡 + ui-deliverables
|
|
56950
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/session/official-classes.js
|
|
56951
|
+
/** 官方注入 style 标签的 data-plugin-css 包前缀(chat 主视图 + ui-tool / ui-skill 工具卡 + ui-deliverables + ui-approval 审批卡)。 */
|
|
56889
56952
|
const CSS_PKG_PREFIXES = [
|
|
56890
56953
|
"@deepseek-ai/dsh-client-ui-chat/",
|
|
56891
56954
|
"@deepseek-ai/dsh-client-ui-tool/",
|
|
56892
56955
|
"@deepseek-ai/dsh-client-ui-skill/",
|
|
56893
56956
|
"@deepseek-ai/dsh-client-ui-attachment/",
|
|
56894
56957
|
"@deepseek-ai/dsh-client-ui-deliverables/",
|
|
56895
|
-
"@deepseek-ai/dsh-client-ui-sidebar-documentpreview/"
|
|
56958
|
+
"@deepseek-ai/dsh-client-ui-sidebar-documentpreview/",
|
|
56959
|
+
"@deepseek-ai/dsh-client-ui-approval/",
|
|
56960
|
+
"@deepseek-ai/dsh-client-ui-user-questions/"
|
|
56896
56961
|
];
|
|
56897
56962
|
/**
|
|
56898
56963
|
* 解析一段官方 CSS module 文本,抽出 {语义名 → 真实类名}。
|
|
@@ -56977,7 +57042,7 @@ window.__ModuleLoader__.load({
|
|
|
56977
57042
|
return discoverOfficialClasses().get(module)?.get(semantic) ?? null;
|
|
56978
57043
|
}
|
|
56979
57044
|
//#endregion
|
|
56980
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
57045
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/session/mirror/ChatNodeSeat.js
|
|
56981
57046
|
/**
|
|
56982
57047
|
* 官方 TURN_PROCESS_INDEPENDENT_KINDS(lib/client.js:1525):这些 kind 永远不进过程折叠区。
|
|
56983
57048
|
*/
|
|
@@ -56989,7 +57054,9 @@ window.__ModuleLoader__.load({
|
|
|
56989
57054
|
"turn-process",
|
|
56990
57055
|
"turn-error",
|
|
56991
57056
|
"turn-max-tokens",
|
|
56992
|
-
"turn-tail"
|
|
57057
|
+
"turn-tail",
|
|
57058
|
+
"answered-user-question",
|
|
57059
|
+
"question-reply"
|
|
56993
57060
|
]);
|
|
56994
57061
|
/**
|
|
56995
57062
|
* 读过程席位快照。宿主 API 形态变了也只降级成「不折叠」,不让整个弹窗白屏。
|
|
@@ -57066,7 +57133,7 @@ window.__ModuleLoader__.load({
|
|
|
57066
57133
|
}, inner);
|
|
57067
57134
|
}
|
|
57068
57135
|
//#endregion
|
|
57069
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
57136
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/session/mirror/process-groups.js
|
|
57070
57137
|
/** 官方 INDEPENDENT(process-groups.js:10565;注意与 ChatNodeSeat 的清单不同)。 */
|
|
57071
57138
|
const INDEPENDENT = /* @__PURE__ */ new Set([
|
|
57072
57139
|
"user",
|
|
@@ -57075,8 +57142,24 @@ window.__ModuleLoader__.load({
|
|
|
57075
57142
|
"model-retry",
|
|
57076
57143
|
"turn-error",
|
|
57077
57144
|
"turn-max-tokens",
|
|
57078
|
-
"turn-tail"
|
|
57145
|
+
"turn-tail",
|
|
57146
|
+
"answered-user-question",
|
|
57147
|
+
"question-reply"
|
|
57079
57148
|
]);
|
|
57149
|
+
/** 宿主默认呈现模式(ui-chat lib/client.js:14814 `DEFAULT_TRANSCRIPT_VIEW_MODE = "detailed"`)。 */
|
|
57150
|
+
const DEFAULT_TRANSCRIPT_VIEW_MODE = "detailed";
|
|
57151
|
+
/**
|
|
57152
|
+
* 官方 `stepGrouping` → 要不要分组(ChatGroupSeat 的 `grouped`)。
|
|
57153
|
+
* compact / standard = `collapsed`(恒分组);detailed = `history`(轮次开着时不分组、条目平铺);
|
|
57154
|
+
* verbose = `none`(从不分组)。
|
|
57155
|
+
* @param mode - 呈现模式。
|
|
57156
|
+
* @param live - 该组所属 turn 是否还开着。
|
|
57157
|
+
*/
|
|
57158
|
+
function groupedOf(mode, live) {
|
|
57159
|
+
if (mode === "verbose") return false;
|
|
57160
|
+
if (mode === "detailed") return !live;
|
|
57161
|
+
return true;
|
|
57162
|
+
}
|
|
57080
57163
|
/** 节点所属 turn(官方 turnOf,process-groups.js:10574)。 */
|
|
57081
57164
|
function turnOfNode(node) {
|
|
57082
57165
|
const location = node.location;
|
|
@@ -57170,7 +57253,7 @@ window.__ModuleLoader__.load({
|
|
|
57170
57253
|
* @param readNode - keyed 节点读取。
|
|
57171
57254
|
* @param isTurnClosed - turn 是否已闭合(官方 turns.get(turn).status === 'closed')。
|
|
57172
57255
|
*/
|
|
57173
|
-
function buildProcessGroups(order, readNode, isTurnClosed) {
|
|
57256
|
+
function buildProcessGroups(order, readNode, isTurnClosed, mode = DEFAULT_TRANSCRIPT_VIEW_MODE) {
|
|
57174
57257
|
const entries = [];
|
|
57175
57258
|
const groups = /* @__PURE__ */ new Map();
|
|
57176
57259
|
let pending = [];
|
|
@@ -57180,6 +57263,7 @@ window.__ModuleLoader__.load({
|
|
|
57180
57263
|
if (first === void 0) return;
|
|
57181
57264
|
const turn = currentTurn;
|
|
57182
57265
|
const ended = closed || turn !== void 0 && isTurnClosed(turn);
|
|
57266
|
+
const live = turn !== void 0 && !isTurnClosed(turn);
|
|
57183
57267
|
const members = pending;
|
|
57184
57268
|
const nodes = members.map((member) => readNode(member.key)).filter((node) => node !== void 0);
|
|
57185
57269
|
const groupKey = JSON.stringify([
|
|
@@ -57193,6 +57277,8 @@ window.__ModuleLoader__.load({
|
|
|
57193
57277
|
data: {
|
|
57194
57278
|
turn: turn ?? -1,
|
|
57195
57279
|
closed: ended,
|
|
57280
|
+
live,
|
|
57281
|
+
grouped: groupedOf(mode, live),
|
|
57196
57282
|
summary: { counts: processActivity(nodes) }
|
|
57197
57283
|
}
|
|
57198
57284
|
});
|
|
@@ -57280,7 +57366,7 @@ window.__ModuleLoader__.load({
|
|
|
57280
57366
|
return summary.counts.length > 3 ? t("stepProcessMore", { title }) : title;
|
|
57281
57367
|
}
|
|
57282
57368
|
//#endregion
|
|
57283
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
57369
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/session/mirror/ChatGroupSeat.js
|
|
57284
57370
|
/** 官方 PROCESS_ICONS(lib/client.js:2187-2201);工具行图标同源(edit/write=铅笔、generic=sparkle)。 */
|
|
57285
57371
|
const PROCESS_ICONS = {
|
|
57286
57372
|
thinking: official_exports.IconThinkOutlineRegular,
|
|
@@ -57320,7 +57406,7 @@ window.__ModuleLoader__.load({
|
|
|
57320
57406
|
const spec = presentation?.spec ?? void 0;
|
|
57321
57407
|
const location = firstNode?.location;
|
|
57322
57408
|
const reason = location?.kind === "turn" || location?.kind === "step" ? location.turn?.end?.data?.reason?.kind : void 0;
|
|
57323
|
-
const alwaysOpen = presentation?.turnClosed === false || presentation?.hasInterleavedInput === true || reason === "aborted" || reason === "interrupted" || reason === "error";
|
|
57409
|
+
const alwaysOpen = presentation?.turnClosed === false || group.data.live === true || presentation?.hasInterleavedInput === true || reason === "aborted" || reason === "interrupted" || reason === "error";
|
|
57324
57410
|
const storedAnswerStep = openState.get(group.data.turn);
|
|
57325
57411
|
const outerHidden = foldCompleted && presentation?.turnClosed === true && spec !== void 0 && !alwaysOpen && storedAnswerStep !== (spec.answerStep ?? 0);
|
|
57326
57412
|
(0, react$1.useEffect)(() => {
|
|
@@ -57406,10 +57492,10 @@ window.__ModuleLoader__.load({
|
|
|
57406
57492
|
})))));
|
|
57407
57493
|
}
|
|
57408
57494
|
//#endregion
|
|
57409
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
57410
|
-
const SESSION_CSS = "/* 会话预览(SessionViewModal)自绘样式:只装本包自己的组件(暂存输入区 / fork / 探针等)\n + 两个稳定钩子类(dshpc-sv-frame / dshpc-sv-scroll)。\n 已删:ChangedFiles 卡与 FileDiff 的全部自绘规则(2026-10-24)——官方 ChangedFiles /\n FileDiff 模块类由 officialClass() 运行时发现并挂在元素上,本包不再有一行兜底。\n ⚠️ 2026-10-23 起不再有官方类兜底:镜像官方组件的元素一律挂官方 CSS-module 类名\n (officialClass() 运行时发现,取不到 = 空类、裸结构不白屏)——本包只跑 DSH 宿主、官方样式必在场,\n 自绘一一对应是死代码。要改官方观感走 token 覆盖 / 双类名钩子(见 ChatView.ts 头注),别在这加兜底。\n 类名固定 dshpc-sv-*;颜色一律走 --dshpc-* token(明暗自适应)。\n 外壳(遮罩 / 面板 / 头部 / 关闭钮)= 核心 Modal(size lg)。 */\n/* 会话区 = 普通纵向流:不设高度、不自己滚(滚动与内距归核心 Modal body,用户 2026-10-22 口径)。 */\n.dshpc-sv{display:flex;flex-direction:column;min-width:0;gap:10px}\n\n/* 正文两端插槽:只给布局(宽度不被内容撑破),背景 / 边框 / 圆角 / 阴影归调用方自己。\n 不传时不渲染元素 ⇒ 不会多出一个 10px gap。\n 顶端槽**自带固定下边距**:相邻项自己的 margin 各不相同(turn-trigger / 用户气泡 / 提示条),\n 靠它算间距会漂;这里一条规则定死,要调只动这一个值。\n 底端槽在 TurnTailNodeView 的 tailSlot 里,上下间距由该 root 的 gap 负责。 */\n.dshpc-sv-body-header,.dshpc-sv-body-footer{min-width:0}\n\n.dshpc-sv-body-header{margin-bottom:var(--dshpc-space-3)}\n\n/* 官方样式未命中时的可见探针(挂在头部副标题行,不占正文)。 */\n.dshpc-sv-probe{font-size:var(--dshpc-font-xs);color:var(--dshpc-warning)}\n\n/* 头部归档标识(官方归档图标 + 「已归档」)。 */\n.dshpc-sv-archived{display:inline-flex;align-items:center;gap:4px;font-size:var(--dshpc-font-xs);font-weight:400;color:var(--dshpc-fg-3)}\n\n/* 内距与滚动全部让给核心 Modal body ⇒ 这里把官方 ChatView.frame / scroll 的内距、\n overflow、高度一律归零(双类名 0,2,0 压过 CSS module,不靠注入顺序)。\n ⚠️ 必须同时把 flex 收掉:官方 scroll 是 flex:1(basis=0),在**自动高**的容器里会把\n 会话区压成 0 高 —— 这正是「内容自管高度」的老毛病,别再放回来。 */\n.dshpc-sv-frame.dshpc-sv-frame{padding-top:0;padding-bottom:0;}\n\n/* 官方组件拿 --dsw-alias-bg-base 做 sticky 遮挡底(思考行展开头等),取值是宿主 app\n 全局基底色,与弹窗面板底不同层 ⇒ 会话区内改指向弹窗面板底(背景保留、颜色贴合)。 */\n.dshpc-sv-frame.dshpc-sv-frame{--dsw-alias-bg-base:var(--dshpc-surface-1);}\n\n.dshpc-sv-scroll.dshpc-sv-scroll{padding:0;overflow:visible;height:auto;max-height:none;flex:none;}\n\n/* 会话区保底:高度由内容决定(撑开由 Modal body 滚)。 */\n.dshpc-sv-chat{flex:none;min-height:0;}\n\n\n.dshpc-sv-assistant{align-self:stretch;font-size:var(--dshpc-font-lg);line-height:1.7;word-break:break-word;}\n\n.dshpc-sv-image{align-self:flex-start;font-size:var(--dshpc-font-sm);color:var(--dshpc-fg-3);border:1px dashed var(--dshpc-border);border-radius:var(--dshpc-radius-sm);padding:4px 10px;}\n\n/* 工具卡根(SessionViewModal legacy 兜底渲染直接用;正常 keyed 路径一律挂官方 ToolRow 类)。 */\n.dshpc-sv-tool{flex-direction:column;display:flex;}\n\n.dshpc-sv-notice{align-self:center;font-size:var(--dshpc-font-sm);color:var(--dshpc-fg-3);padding:2px 8px;}\n\n\n.dshpc-sv-forkerr{margin:0;font-size:var(--dshpc-font-lg);line-height:var(--dshpc-line-lg);color:var(--dshpc-danger);word-break:break-word;}\n\n.dshpc-sv-forktext{margin:0;font-size:var(--dshpc-font-sm);line-height:var(--dshpc-line-sm);color:var(--dshpc-fg-2);}\n\n/* ── 暂存输入区(期4:打字 → 确定 → fork 带话跳官方视图)── */\n.dshpc-sv-composer{flex:1;display:flex;align-items:flex-end;gap:8px;flex-wrap:wrap;}\n\n.dshpc-sv-composer textarea{flex:1;min-width:0;resize:none;font:inherit;font-size:var(--dshpc-font-lg);line-height:var(--dshpc-line-lg);color:var(--dshpc-fg);background:var(--dshpc-surface-2);border:1px solid var(--dshpc-border);border-radius:var(--dshpc-radius-md);padding:8px 12px;min-height:40px;max-height:120px;}\n\n.dshpc-sv-composer textarea:focus-visible{outline:2px solid var(--dshpc-focus);outline-offset:-1px;}\n\n.dshpc-sv-composer-hint{flex:none;font-size:var(--dshpc-font-xs);color:var(--dshpc-fg-3);padding-bottom:10px;white-space:nowrap;}";
|
|
57495
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/session/session-css.generated.js
|
|
57496
|
+
const SESSION_CSS = "/* 会话预览(SessionViewModal)自绘样式:只装本包自己的组件(暂存输入区 / fork / 探针等)\n + 两个稳定钩子类(dshpc-sv-frame / dshpc-sv-scroll)。\n 已删:ChangedFiles 卡与 FileDiff 的全部自绘规则(2026-10-24)——官方 ChangedFiles /\n FileDiff 模块类由 officialClass() 运行时发现并挂在元素上,本包不再有一行兜底。\n ⚠️ 2026-10-23 起不再有官方类兜底:镜像官方组件的元素一律挂官方 CSS-module 类名\n (officialClass() 运行时发现,取不到 = 空类、裸结构不白屏)——本包只跑 DSH 宿主、官方样式必在场,\n 自绘一一对应是死代码。要改官方观感走 token 覆盖 / 双类名钩子(见 ChatView.ts 头注),别在这加兜底。\n 类名固定 dshpc-sv-*;颜色一律走 --dshpc-* token(明暗自适应)。\n 外壳(遮罩 / 面板 / 头部 / 关闭钮)= 核心 Modal(size lg)。 */\n/* 会话区 = 普通纵向流:不设高度、不自己滚(滚动与内距归核心 Modal body,用户 2026-10-22 口径)。 */\n.dshpc-sv{display:flex;flex-direction:column;min-width:0;gap:10px}\n\n/* 正文两端插槽:只给布局(宽度不被内容撑破),背景 / 边框 / 圆角 / 阴影归调用方自己。\n 不传时不渲染元素 ⇒ 不会多出一个 10px gap。\n 顶端槽**自带固定下边距**:相邻项自己的 margin 各不相同(turn-trigger / 用户气泡 / 提示条),\n 靠它算间距会漂;这里一条规则定死,要调只动这一个值。\n 底端槽在 TurnTailNodeView 的 tailSlot 里,上下间距由该 root 的 gap 负责。 */\n.dshpc-sv-body-header,.dshpc-sv-body-footer{min-width:0}\n\n.dshpc-sv-body-header{margin-bottom:var(--dshpc-space-3)}\n\n/* 官方样式未命中时的可见探针(挂在头部副标题行,不占正文)。 */\n.dshpc-sv-probe{font-size:var(--dshpc-font-xs);color:var(--dshpc-warning)}\n\n/* 头部归档标识(官方归档图标 + 「已归档」)。 */\n.dshpc-sv-archived{display:inline-flex;align-items:center;gap:4px;font-size:var(--dshpc-font-xs);font-weight:400;color:var(--dshpc-fg-3)}\n\n/* 内距与滚动全部让给核心 Modal body ⇒ 这里把官方 ChatView.frame / scroll 的内距、\n overflow、高度一律归零(双类名 0,2,0 压过 CSS module,不靠注入顺序)。\n ⚠️ 必须同时把 flex 收掉:官方 scroll 是 flex:1(basis=0),在**自动高**的容器里会把\n 会话区压成 0 高 —— 这正是「内容自管高度」的老毛病,别再放回来。 */\n.dshpc-sv-frame.dshpc-sv-frame{padding-top:0;padding-bottom:0;}\n\n/* 官方组件拿 --dsw-alias-bg-base 做 sticky 遮挡底(思考行展开头等),取值是宿主 app\n 全局基底色,与弹窗面板底不同层 ⇒ 会话区内改指向弹窗面板底(背景保留、颜色贴合)。 */\n.dshpc-sv-frame.dshpc-sv-frame{--dsw-alias-bg-base:var(--dshpc-surface-1);}\n\n.dshpc-sv-scroll.dshpc-sv-scroll{padding:0;overflow:visible;height:auto;max-height:none;flex:none;}\n\n/* 会话区保底:高度由内容决定(撑开由 Modal body 滚)。 */\n.dshpc-sv-chat{flex:none;min-height:0;}\n\n\n.dshpc-sv-assistant{align-self:stretch;font-size:var(--dshpc-font-lg);line-height:1.7;word-break:break-word;}\n\n.dshpc-sv-image{align-self:flex-start;font-size:var(--dshpc-font-sm);color:var(--dshpc-fg-3);border:1px dashed var(--dshpc-border);border-radius:var(--dshpc-radius-sm);padding:4px 10px;}\n\n/* 工具卡根(SessionViewModal legacy 兜底渲染直接用;正常 keyed 路径一律挂官方 ToolRow 类)。 */\n.dshpc-sv-tool{flex-direction:column;display:flex;}\n\n.dshpc-sv-notice{align-self:center;font-size:var(--dshpc-font-sm);color:var(--dshpc-fg-3);padding:2px 8px;}\n\n\n.dshpc-sv-forkerr{margin:0;font-size:var(--dshpc-font-lg);line-height:var(--dshpc-line-lg);color:var(--dshpc-danger);word-break:break-word;}\n\n.dshpc-sv-forktext{margin:0;font-size:var(--dshpc-font-sm);line-height:var(--dshpc-line-sm);color:var(--dshpc-fg-2);}\n\n/* ── 暂存输入区(期4:打字 → 确定 → fork 带话跳官方视图)── */\n.dshpc-sv-composer{flex:1;display:flex;align-items:flex-end;gap:8px;flex-wrap:wrap;}\n\n.dshpc-sv-composer textarea{flex:1;min-width:0;resize:none;font:inherit;font-size:var(--dshpc-font-lg);line-height:var(--dshpc-line-lg);color:var(--dshpc-fg);background:var(--dshpc-surface-2);border:1px solid var(--dshpc-border);border-radius:var(--dshpc-radius-md);padding:8px 12px;min-height:40px;max-height:120px;}\n\n.dshpc-sv-composer textarea:focus-visible{outline:2px solid var(--dshpc-focus);outline-offset:-1px;}\n\n.dshpc-sv-composer-hint{flex:none;font-size:var(--dshpc-font-xs);color:var(--dshpc-fg-3);padding-bottom:10px;white-space:nowrap;}\n/* 弹窗底栏纵向栈:审批卡 + 暂存输入框(Modal footer 本身是横向 flex,两块必须叠起来)。 */\n.dshpc-sv-foot{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:8px;}\n\n/* 审批卡外壳(官方 ui-approval 的 ApprovalPanel):类名全挂官方 module,这里只补官方会话 body\n (ui-conversation 0.2.2-rc.1 的 .body / .embeddedBody)才有的两个布局变量——弹窗里没有那层,\n 缺了官方 padding / max-width 整条声明失效。用户口径「和官方一模一样」= 卡片占满、不额外缩进,\n 故 content-width 给 100%(官方 920 上限会把 1120 宽的弹窗夹窄),clearance 取 -16px 抵消官方\n calc(var(--dsh-composer-side-clearance) + 16px) 那 16px —— 弹窗的留白由 Modal footer 自己出。 */\n/* 卡片四周留白对齐:弹窗底栏内距 18px = 卡片左右留白;下方 = 18 - |margin-bottom| + 官方 root 的 12px,\n 取 -12px 时下方同为 18px(与左右等距)。想更贴底部就把 -12px 调大(下限 -18px = 官方那 12px)。 */\n.dshpc-sv-approval{--dsh-chat-content-width:100%;--dsh-composer-side-clearance:-16px;--dsh-composer-text-max-height:336px;flex:none;display:flex;flex-direction:column;margin-bottom:-12px;}\n\n/* 题目面板外壳(官方 ui-user-questions 的 QuestionComposer):同上,类名全挂官方 module,\n 这里只补会话 body 才有的布局变量。官方 .frame 的 padding 是 6px calc(clearance+16px) 10px ⇒\n clearance 取 -16px 后左右归零、上下各 6/10px;下方再收回 10px,与左右留白同宽(18px)。 */\n.dshpc-sv-question{--dsh-chat-content-width:100%;--dsh-composer-side-clearance:-16px;flex:none;display:flex;flex-direction:column;margin-bottom:-10px;}\n";
|
|
57411
57497
|
//#endregion
|
|
57412
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
57498
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/session/mirror/ChatView.js
|
|
57413
57499
|
/** 会话区骨架:frame > root > scroll > column(类名一律取官方 ChatView.module.css,取不到 = 空类)。
|
|
57414
57500
|
*
|
|
57415
57501
|
* `dshpc-sv-frame` / `dshpc-sv-scroll` = 本包**稳定钩子类**(不走 officialClass 发现,官方类命中时也照样挂):
|
|
@@ -57452,7 +57538,7 @@ window.__ModuleLoader__.load({
|
|
|
57452
57538
|
rows.push((0, react$1.createElement)(ChatGroupSeatMirror, {
|
|
57453
57539
|
key: entry.key,
|
|
57454
57540
|
group,
|
|
57455
|
-
grouped: true,
|
|
57541
|
+
grouped: group.data.grouped ?? true,
|
|
57456
57542
|
store,
|
|
57457
57543
|
openState,
|
|
57458
57544
|
onSetOpen,
|
|
@@ -57511,7 +57597,7 @@ window.__ModuleLoader__.load({
|
|
|
57511
57597
|
}, props.label));
|
|
57512
57598
|
}
|
|
57513
57599
|
//#endregion
|
|
57514
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
57600
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/session/mirror/MessageImage.js
|
|
57515
57601
|
/** 官方 singleFit(client.js:2168-2184):长边 240px,显示比夹在 [0.25, 4],且不放大超过原图。 */
|
|
57516
57602
|
function singleFit(dimensions) {
|
|
57517
57603
|
const natural = dimensions.width / dimensions.height;
|
|
@@ -57622,7 +57708,7 @@ window.__ModuleLoader__.load({
|
|
|
57622
57708
|
})));
|
|
57623
57709
|
}
|
|
57624
57710
|
//#endregion
|
|
57625
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
57711
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/session/mirror/AskCard.js
|
|
57626
57712
|
const isRecord$3 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
57627
57713
|
function parseJson(text) {
|
|
57628
57714
|
try {
|
|
@@ -57752,7 +57838,7 @@ window.__ModuleLoader__.load({
|
|
|
57752
57838
|
}));
|
|
57753
57839
|
}
|
|
57754
57840
|
//#endregion
|
|
57755
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
57841
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/session/mirror/detail-i18n.js
|
|
57756
57842
|
const DETAIL_KEYS = {
|
|
57757
57843
|
"detail.agent.reply": "detailAgentReply",
|
|
57758
57844
|
"detail.agents.count": "detailAgentsCount",
|
|
@@ -57906,7 +57992,7 @@ window.__ModuleLoader__.load({
|
|
|
57906
57992
|
return mapped === void 0 ? key : params === void 0 ? t(mapped) : t(mapped, params);
|
|
57907
57993
|
}
|
|
57908
57994
|
//#endregion
|
|
57909
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
57995
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/session/mirror/control-details.js
|
|
57910
57996
|
const isRecord$2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
57911
57997
|
const arg = (args, key) => typeof args[key] === "string" ? args[key] : "";
|
|
57912
57998
|
function detailJson$1(text) {
|
|
@@ -58661,7 +58747,7 @@ window.__ModuleLoader__.load({
|
|
|
58661
58747
|
}
|
|
58662
58748
|
}
|
|
58663
58749
|
//#endregion
|
|
58664
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
58750
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/session/mirror/ToolDetails.js
|
|
58665
58751
|
const isRecord$1 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
58666
58752
|
const nonempty = (value) => typeof value === "string" && value.trim() !== "";
|
|
58667
58753
|
const count = (value) => typeof value === "number" && Number.isSafeInteger(value) && value >= 0;
|
|
@@ -58940,7 +59026,7 @@ window.__ModuleLoader__.load({
|
|
|
58940
59026
|
})))) : null);
|
|
58941
59027
|
}
|
|
58942
59028
|
//#endregion
|
|
58943
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
59029
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/session/mirror/GenericCommandCard.js
|
|
58944
59030
|
/** 官方 TOOL_VARIANTS(tool client.js:83-100,cordis_* 一并保留)。 */
|
|
58945
59031
|
const TOOL_VARIANTS = {
|
|
58946
59032
|
bash: "bash",
|
|
@@ -59947,7 +60033,7 @@ window.__ModuleLoader__.load({
|
|
|
59947
60033
|
}));
|
|
59948
60034
|
}
|
|
59949
60035
|
//#endregion
|
|
59950
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
60036
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/session/mirror/CommandCard.js
|
|
59951
60037
|
/** 官方 GenericCommandCard 模块类(宿主必注入;缺席 = 空串,裸结构不白屏,不写自绘兜底)。 */
|
|
59952
60038
|
const gcc = (semantic) => officialClass("GenericCommandCard", semantic) ?? "";
|
|
59953
60039
|
/** 官方 stateOf:未决 = running;outcome.kind==='error' = error;否则 ok。 */
|
|
@@ -59999,7 +60085,7 @@ window.__ModuleLoader__.load({
|
|
|
59999
60085
|
}));
|
|
60000
60086
|
}
|
|
60001
60087
|
//#endregion
|
|
60002
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
60088
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/session/mirror/message-chrome.js
|
|
60003
60089
|
/**
|
|
60004
60090
|
* 官方 formatRunDuration(0.2.x,lib/client.js:5067-5095):整秒;≥1 分带分;≥1 小时带小时。
|
|
60005
60091
|
* 单位是独立片段(`duration.hourUnit` / `minuteUnit` / `secondUnit`),不是一条带占位的模板。
|
|
@@ -60127,9 +60213,9 @@ window.__ModuleLoader__.load({
|
|
|
60127
60213
|
return `99.${"9".repeat(distinguishingPlaces - 1)}${10 - roundedLoss}`;
|
|
60128
60214
|
}
|
|
60129
60215
|
//#endregion
|
|
60130
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
60216
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/session/mirror/MessageIconActions.js
|
|
60131
60217
|
/** 官方「已复制」复位时间。 */
|
|
60132
|
-
const COPIED_RESET_MS = 1e3;
|
|
60218
|
+
const COPIED_RESET_MS$1 = 1e3;
|
|
60133
60219
|
/** 消息操作行(复制 / 分支 / 用量 / 时钟)。 */
|
|
60134
60220
|
function MessageIconActionsMirror(props) {
|
|
60135
60221
|
const { text, time, clock, onBranch, branchUnavailable = false, className, extraActions, usageAction, t } = props;
|
|
@@ -60149,7 +60235,7 @@ window.__ModuleLoader__.load({
|
|
|
60149
60235
|
setCopied(true);
|
|
60150
60236
|
timerRef.current = setTimeout(() => {
|
|
60151
60237
|
setCopied(false);
|
|
60152
|
-
}, COPIED_RESET_MS);
|
|
60238
|
+
}, COPIED_RESET_MS$1);
|
|
60153
60239
|
});
|
|
60154
60240
|
};
|
|
60155
60241
|
const clockClass = (clock === "end" ? officialClass("MessageIconActions", "timeEnd") : officialClass("MessageIconActions", "timeStart")) ?? "";
|
|
@@ -60186,7 +60272,7 @@ window.__ModuleLoader__.load({
|
|
|
60186
60272
|
}, t("branchUnavailableLabel")), clock === "end" ? (0, react$1.createElement)("span", { className: officialClass("MessageIconActions", "endInfo") ?? "" }, usageAction, clockEl) : usageAction);
|
|
60187
60273
|
}
|
|
60188
60274
|
//#endregion
|
|
60189
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
60275
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/session/mirror/MessageItem.js
|
|
60190
60276
|
/** 助手正文:官方 DOM = AssistantMarkdown.root > body > MarkdownText(chat lib/client.js:8370-8378)。
|
|
60191
60277
|
* root 定 14px/24px,body 定 flex-column + 块间 gap 16px(宽表格规则也挂在 body 上)。
|
|
60192
60278
|
* U11:fileMentions 词表就位时行内 code 文件引用渲成可点链接(官方语义:resolve 不出保持惰性 code)。 */
|
|
@@ -60369,7 +60455,7 @@ window.__ModuleLoader__.load({
|
|
|
60369
60455
|
}), (0, react$1.createElement)("div", { className: officialClass("MessageItem", "turnErrorCopy") ?? "" }, (0, react$1.createElement)("span", { className: officialClass("MessageItem", "maxTokensTitle") ?? "" }, t("maxTokensTitle")), (0, react$1.createElement)("span", { className: officialClass("MessageItem", "turnErrorMessage") ?? "" }, t("maxTokensHint"))));
|
|
60370
60456
|
}
|
|
60371
60457
|
//#endregion
|
|
60372
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
60458
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/session/mirror/BashRow.js
|
|
60373
60459
|
/** 官方 BASH_ICON(tool client.js:2469):终端图标 14px。 */
|
|
60374
60460
|
const BASH_ICON = (0, react$1.createElement)(official_exports.IconApiOutlineRegular, { size: 14 });
|
|
60375
60461
|
const firstLine$3 = (text) => {
|
|
@@ -60477,7 +60563,719 @@ window.__ModuleLoader__.load({
|
|
|
60477
60563
|
}, outputText)) : null)) : void 0);
|
|
60478
60564
|
}
|
|
60479
60565
|
//#endregion
|
|
60480
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
60566
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/session/mirror/ApprovalPanel.js
|
|
60567
|
+
const cls$2 = (semantic) => officialClass("ApprovalPanel", semantic) ?? "";
|
|
60568
|
+
/** 官方 headline:请求方本地化文案优先,否则退「工具 X 请求越权执行」,再否则用审计 reason。 */
|
|
60569
|
+
function headline(approval, t) {
|
|
60570
|
+
const shown = approval.displayReason;
|
|
60571
|
+
if (shown !== void 0) {
|
|
60572
|
+
const text = shown[getLocale()] ?? shown.en;
|
|
60573
|
+
if (typeof text === "string" && text !== "") return text;
|
|
60574
|
+
}
|
|
60575
|
+
return approval.reason ?? t("approvalEscalation", { toolName: approval.toolName });
|
|
60576
|
+
}
|
|
60577
|
+
/** 官方 ApprovalCommand(ui-chat lib/client.js:151-172):callId → tool-call 起始节点的 args.command。 */
|
|
60578
|
+
function approvalCommand(order, read, callId) {
|
|
60579
|
+
if (callId === void 0) return void 0;
|
|
60580
|
+
for (const key of order) {
|
|
60581
|
+
const node = read(key);
|
|
60582
|
+
if (node === void 0 || node.kind !== "tool-call") continue;
|
|
60583
|
+
const root = node.data?.root;
|
|
60584
|
+
if (typeof root !== "object" || root === null) continue;
|
|
60585
|
+
const call = root;
|
|
60586
|
+
if (call.callId !== callId || call.phase !== "start" || typeof call.argsRaw !== "string") continue;
|
|
60587
|
+
try {
|
|
60588
|
+
const args = JSON.parse(call.argsRaw);
|
|
60589
|
+
const command = typeof args === "object" && args !== null ? args.command : void 0;
|
|
60590
|
+
return typeof command === "string" ? command : void 0;
|
|
60591
|
+
} catch {
|
|
60592
|
+
return;
|
|
60593
|
+
}
|
|
60594
|
+
}
|
|
60595
|
+
}
|
|
60596
|
+
/**
|
|
60597
|
+
* 待审批卡(官方 ApprovalPanel)。作答直接调 `pendingInteraction.answer()`——官方两个按钮的同一调用,
|
|
60598
|
+
* 答完官方 publish 会让 pendingInteraction 变空 ⇒ 卡自行消失。
|
|
60599
|
+
* shortcut: 未移植官方 root 上的 Enter/Esc 快捷键(要求焦点在卡内),需要键盘作答时补。
|
|
60600
|
+
*/
|
|
60601
|
+
function ApprovalPanelMirror(props) {
|
|
60602
|
+
const { approval, command, t } = props;
|
|
60603
|
+
const [answered, setAnswered] = (0, react$1.useState)(false);
|
|
60604
|
+
const waiting = (0, react$1.useRef)(false);
|
|
60605
|
+
const answer = (outcome) => {
|
|
60606
|
+
if (waiting.current || !approval.answerable) return;
|
|
60607
|
+
waiting.current = true;
|
|
60608
|
+
setAnswered(true);
|
|
60609
|
+
approval.answer(outcome).catch(() => {
|
|
60610
|
+
waiting.current = false;
|
|
60611
|
+
setAnswered(false);
|
|
60612
|
+
});
|
|
60613
|
+
};
|
|
60614
|
+
return (0, react$1.createElement)("div", {
|
|
60615
|
+
className: cls$2("root"),
|
|
60616
|
+
"data-approval-key": approval.key,
|
|
60617
|
+
"aria-busy": answered
|
|
60618
|
+
}, (0, react$1.createElement)("div", { className: cls$2("card") }, (0, react$1.createElement)("div", { className: cls$2("strip") }, (0, react$1.createElement)(official_exports.StateDot, { state: answered ? "ongoing" : "warning" }), t("approvalWaiting")), (0, react$1.createElement)("div", {
|
|
60619
|
+
className: cls$2("body"),
|
|
60620
|
+
"data-approval-scroll": "",
|
|
60621
|
+
tabIndex: 0,
|
|
60622
|
+
role: "group",
|
|
60623
|
+
"aria-label": t("approvalDetailAria")
|
|
60624
|
+
}, (0, react$1.createElement)("div", { className: cls$2("headline") }, headline(approval, t)), command === void 0 ? null : (0, react$1.createElement)("div", { className: cls$2("command") }, command)), (0, react$1.createElement)("div", { className: cls$2("actionRow") }, (0, react$1.createElement)(official_exports.Button, {
|
|
60625
|
+
variant: "outline",
|
|
60626
|
+
className: cls$2("reject"),
|
|
60627
|
+
disabled: answered,
|
|
60628
|
+
onClick: () => {
|
|
60629
|
+
answer("rejected");
|
|
60630
|
+
}
|
|
60631
|
+
}, t("approvalReject")), (0, react$1.createElement)(official_exports.Button, {
|
|
60632
|
+
variant: "primary",
|
|
60633
|
+
disabled: answered,
|
|
60634
|
+
onClick: () => {
|
|
60635
|
+
answer("allowed-once");
|
|
60636
|
+
}
|
|
60637
|
+
}, t("approvalAllowOnce")))));
|
|
60638
|
+
}
|
|
60639
|
+
//#endregion
|
|
60640
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/session/pending-questions.js
|
|
60641
|
+
/**
|
|
60642
|
+
* 从 chat 快照直接读「还没结算的 ask_user_question 调用」——投影缺席或暂时为空时的等价来源。
|
|
60643
|
+
* 官方 tool 卡就是这么判 pending 的(`model.state === 'running'`,ui-tool lib/client.js:2369),
|
|
60644
|
+
* 问题与选项都记在调用参数里,所以卡片能连选项一起画。
|
|
60645
|
+
* @param order - chat 快照的节点键顺序。
|
|
60646
|
+
* @param read - 按 key 读节点。
|
|
60647
|
+
* @returns 最后一组未结算的提问;没有则 null。
|
|
60648
|
+
*/
|
|
60649
|
+
function pendingQuestionsFromNodes(order, read) {
|
|
60650
|
+
const started = /* @__PURE__ */ new Map();
|
|
60651
|
+
const ended = /* @__PURE__ */ new Set();
|
|
60652
|
+
for (const key of order) {
|
|
60653
|
+
const node = read(key);
|
|
60654
|
+
if (node === void 0 || node.kind !== "tool-call") continue;
|
|
60655
|
+
const root = node.data?.root;
|
|
60656
|
+
if (typeof root !== "object" || root === null) continue;
|
|
60657
|
+
const call = root;
|
|
60658
|
+
if (typeof call.callId !== "string" || call.callId === "") continue;
|
|
60659
|
+
if (call.phase === "end") {
|
|
60660
|
+
ended.add(call.callId);
|
|
60661
|
+
continue;
|
|
60662
|
+
}
|
|
60663
|
+
if (call.phase !== "start" || call.name !== "ask_user_question" || typeof call.argsRaw !== "string") continue;
|
|
60664
|
+
started.set(call.callId, { argsRaw: call.argsRaw });
|
|
60665
|
+
}
|
|
60666
|
+
let pending = null;
|
|
60667
|
+
for (const [callId, { argsRaw }] of started) {
|
|
60668
|
+
if (ended.has(callId)) continue;
|
|
60669
|
+
const questions = questionsOf(argsRaw);
|
|
60670
|
+
if (questions === null) continue;
|
|
60671
|
+
pending = {
|
|
60672
|
+
callId,
|
|
60673
|
+
state: "open",
|
|
60674
|
+
questions
|
|
60675
|
+
};
|
|
60676
|
+
}
|
|
60677
|
+
return pending;
|
|
60678
|
+
}
|
|
60679
|
+
/** 官方 toolArgumentsSchema 的子集:questions[].options[] 用 `multi_select` 拼法(dsh-user-questions :113-129)。 */
|
|
60680
|
+
function questionsOf(argsRaw) {
|
|
60681
|
+
let parsed;
|
|
60682
|
+
try {
|
|
60683
|
+
parsed = JSON.parse(argsRaw);
|
|
60684
|
+
} catch {
|
|
60685
|
+
return null;
|
|
60686
|
+
}
|
|
60687
|
+
if (typeof parsed !== "object" || parsed === null) return null;
|
|
60688
|
+
const raw = parsed.questions;
|
|
60689
|
+
if (!Array.isArray(raw) || raw.length === 0) return null;
|
|
60690
|
+
const items = [];
|
|
60691
|
+
for (const entry of raw) {
|
|
60692
|
+
if (typeof entry !== "object" || entry === null) continue;
|
|
60693
|
+
const q = entry;
|
|
60694
|
+
if (typeof q.id !== "string" || typeof q.question !== "string") continue;
|
|
60695
|
+
const options = Array.isArray(q.options) ? q.options.flatMap((option) => {
|
|
60696
|
+
if (typeof option !== "object" || option === null) return [];
|
|
60697
|
+
const o = option;
|
|
60698
|
+
return typeof o.label === "string" ? [{
|
|
60699
|
+
label: o.label,
|
|
60700
|
+
...typeof o.description === "string" ? { description: o.description } : {}
|
|
60701
|
+
}] : [];
|
|
60702
|
+
}) : void 0;
|
|
60703
|
+
items.push({
|
|
60704
|
+
id: q.id,
|
|
60705
|
+
question: q.question,
|
|
60706
|
+
...typeof q.header === "string" ? { header: q.header } : {},
|
|
60707
|
+
...typeof q.detail === "string" ? { detail: q.detail } : {},
|
|
60708
|
+
...options === void 0 || options.length === 0 ? {} : { options },
|
|
60709
|
+
...q.multi_select === true || q.multiSelect === true ? { multiSelect: true } : {}
|
|
60710
|
+
});
|
|
60711
|
+
}
|
|
60712
|
+
return items.length === 0 ? null : items;
|
|
60713
|
+
}
|
|
60714
|
+
/**
|
|
60715
|
+
* 订阅该会话当前待答的一组问题(官方一次只展示一组:`ahead of any other pending question`)。
|
|
60716
|
+
* 能力缺席(宿主没注册该投影)返回 null ⇒ 不画题卡。
|
|
60717
|
+
* @param projections - `session.projections`(与 inbox 同一入口)。
|
|
60718
|
+
*/
|
|
60719
|
+
function openPendingQuestions(projections) {
|
|
60720
|
+
const face = projections?.faceOf?.("userQuestions");
|
|
60721
|
+
if (face === void 0 || face === null || typeof face.getSnapshot !== "function" || typeof face.subscribe !== "function") return null;
|
|
60722
|
+
let raw;
|
|
60723
|
+
let mapped = null;
|
|
60724
|
+
let primed = false;
|
|
60725
|
+
const read = () => {
|
|
60726
|
+
let next;
|
|
60727
|
+
try {
|
|
60728
|
+
next = face.getSnapshot();
|
|
60729
|
+
} catch {
|
|
60730
|
+
return null;
|
|
60731
|
+
}
|
|
60732
|
+
if (primed && next === raw) return mapped;
|
|
60733
|
+
primed = true;
|
|
60734
|
+
raw = next;
|
|
60735
|
+
mapped = firstActive(next);
|
|
60736
|
+
return mapped;
|
|
60737
|
+
};
|
|
60738
|
+
return {
|
|
60739
|
+
getSnapshot: read,
|
|
60740
|
+
subscribe: (onChange) => face.subscribe(onChange)
|
|
60741
|
+
};
|
|
60742
|
+
}
|
|
60743
|
+
/** 形状校验后取第一条 active(官方的 active 行必须 questions 非空、callId 非空)。 */
|
|
60744
|
+
/** 形状不符只提示一次(避免每次 publish 刷屏)。 */
|
|
60745
|
+
let shapeWarned = false;
|
|
60746
|
+
function firstActive(view) {
|
|
60747
|
+
if (typeof view !== "object" || view === null) return null;
|
|
60748
|
+
const record = view;
|
|
60749
|
+
const active = Array.isArray(record.active) ? record.active : typeof record.questions === "object" && record.questions !== null ? record.questions.active : void 0;
|
|
60750
|
+
if (!Array.isArray(active)) {
|
|
60751
|
+
if (!shapeWarned) {
|
|
60752
|
+
shapeWarned = true;
|
|
60753
|
+
console.info(`[dsh-plugin-core:session] userQuestions 快照形状未识别,键=[${Object.keys(record).join(",")}]`);
|
|
60754
|
+
}
|
|
60755
|
+
return null;
|
|
60756
|
+
}
|
|
60757
|
+
for (const row of active) {
|
|
60758
|
+
const parsed = questionSet(row);
|
|
60759
|
+
if (parsed !== null) return parsed;
|
|
60760
|
+
}
|
|
60761
|
+
return null;
|
|
60762
|
+
}
|
|
60763
|
+
/**
|
|
60764
|
+
* 官方 `QuestionComposer.parseRecommendedLabel`:把选项标签里的「(推荐) / (recommended)」尾缀
|
|
60765
|
+
* 拆出来做徽标,作答值仍用原标签。
|
|
60766
|
+
* @param label - 选项原始标签。
|
|
60767
|
+
* @returns 展示用标签 + 是否推荐。
|
|
60768
|
+
*/
|
|
60769
|
+
function parseRecommendedLabel(label) {
|
|
60770
|
+
const suffix = /\s*(?:\((?:recommended|推荐)\)|((?:recommended|推荐)))\s*$/i;
|
|
60771
|
+
return suffix.test(label) ? {
|
|
60772
|
+
label: label.replace(suffix, ""),
|
|
60773
|
+
recommended: true
|
|
60774
|
+
} : {
|
|
60775
|
+
label,
|
|
60776
|
+
recommended: false
|
|
60777
|
+
};
|
|
60778
|
+
}
|
|
60779
|
+
/**
|
|
60780
|
+
* 官方 `recommendedOptions`:单选取「标记了推荐的第一项」,多选取全部推荐项(隐式草稿)。
|
|
60781
|
+
* @param question - 一道题。
|
|
60782
|
+
* @returns 该题默认勾选的标签。
|
|
60783
|
+
*/
|
|
60784
|
+
function recommendedOptions(question) {
|
|
60785
|
+
const labels = (question.options ?? []).map((option) => option.label);
|
|
60786
|
+
return (question.multiSelect === true ? labels : labels.slice(0, 1)).filter((label) => parseRecommendedLabel(label).recommended);
|
|
60787
|
+
}
|
|
60788
|
+
/**
|
|
60789
|
+
* 由活体载体推出面板的作答入参。**作答与关闭钮是两件事**:两种 `dismissal` 官方都给关闭钮,
|
|
60790
|
+
* 只是语义不同 —— `hide`(有 callId)= 收起面板、可从工具调用重开;`cancel`(无 callId)= 放弃整组问题。
|
|
60791
|
+
* 所以这里永远给 `answer`,`dismiss` 只要载体有就给,语义交给 `dismissal` 区分。
|
|
60792
|
+
* @param live - 活体载体;undefined = 载体缺席 ⇒ 返回空对象,面板走只读。
|
|
60793
|
+
*/
|
|
60794
|
+
function questionPanelWiring(live) {
|
|
60795
|
+
if (live === void 0) return {};
|
|
60796
|
+
return {
|
|
60797
|
+
answer: async (answers) => {
|
|
60798
|
+
await live.answer({ answers });
|
|
60799
|
+
},
|
|
60800
|
+
subscribeCard: live.subscribe,
|
|
60801
|
+
readCard: live.snapshot,
|
|
60802
|
+
dismissal: live.dismissal,
|
|
60803
|
+
...live.dismiss === void 0 ? {} : { dismiss: () => live.dismiss?.() }
|
|
60804
|
+
};
|
|
60805
|
+
}
|
|
60806
|
+
/**
|
|
60807
|
+
* 订阅某个会话此刻的题卡活体(`uiSession.sessionStatus.pendingInteraction`,kind = 'question')。
|
|
60808
|
+
* 能力缺席(没有 uiSession / 宿主没装题面板外壳包)返回 null ⇒ 题卡退回只读投影渲染。
|
|
60809
|
+
* @param uiSession - 宿主 client 服务 `uiSession`。
|
|
60810
|
+
* @param sessionId - 预览中的会话 id。
|
|
60811
|
+
*/
|
|
60812
|
+
function openLiveQuestion(uiSession, sessionId) {
|
|
60813
|
+
const status = uiSession?.sessionStatus;
|
|
60814
|
+
if (status === void 0 || typeof status.getSnapshot !== "function" || typeof status.subscribe !== "function") return null;
|
|
60815
|
+
const read = () => {
|
|
60816
|
+
try {
|
|
60817
|
+
return questionFace(status.getSnapshot().get(sessionId)?.pendingInteraction);
|
|
60818
|
+
} catch {
|
|
60819
|
+
return;
|
|
60820
|
+
}
|
|
60821
|
+
};
|
|
60822
|
+
return {
|
|
60823
|
+
getSnapshot: read,
|
|
60824
|
+
subscribe: (onChange) => status.subscribe(onChange)
|
|
60825
|
+
};
|
|
60826
|
+
}
|
|
60827
|
+
/** 只认题卡域(`kind === 'question'`)且真能作答的载体;计划审阅走自己的呈现,这里不当题卡。 */
|
|
60828
|
+
function questionFace(value) {
|
|
60829
|
+
if (typeof value !== "object" || value === null) return void 0;
|
|
60830
|
+
const record = value;
|
|
60831
|
+
if (record.kind !== "question") return void 0;
|
|
60832
|
+
if (typeof record.key !== "string" || !Array.isArray(record.questions) || record.questions.length === 0) return void 0;
|
|
60833
|
+
if (typeof record.answer !== "function" || typeof record.snapshot !== "function") return void 0;
|
|
60834
|
+
return value;
|
|
60835
|
+
}
|
|
60836
|
+
function questionSet(row) {
|
|
60837
|
+
if (typeof row !== "object" || row === null) return null;
|
|
60838
|
+
const record = row;
|
|
60839
|
+
if (typeof record.callId !== "string" || record.callId === "") return null;
|
|
60840
|
+
const state = record.state === "continued" ? "continued" : record.state === "open" ? "open" : void 0;
|
|
60841
|
+
if (state === void 0 || !Array.isArray(record.questions) || record.questions.length === 0) return null;
|
|
60842
|
+
const questions = [];
|
|
60843
|
+
for (const item of record.questions) {
|
|
60844
|
+
if (typeof item !== "object" || item === null) return null;
|
|
60845
|
+
const q = item;
|
|
60846
|
+
if (typeof q.id !== "string" || typeof q.question !== "string") return null;
|
|
60847
|
+
const options = Array.isArray(q.options) ? q.options.flatMap((option) => {
|
|
60848
|
+
if (typeof option !== "object" || option === null) return [];
|
|
60849
|
+
const o = option;
|
|
60850
|
+
return typeof o.label === "string" ? [{
|
|
60851
|
+
label: o.label,
|
|
60852
|
+
...typeof o.description === "string" ? { description: o.description } : {}
|
|
60853
|
+
}] : [];
|
|
60854
|
+
}) : void 0;
|
|
60855
|
+
questions.push({
|
|
60856
|
+
id: q.id,
|
|
60857
|
+
question: q.question,
|
|
60858
|
+
...typeof q.header === "string" ? { header: q.header } : {},
|
|
60859
|
+
...typeof q.detail === "string" ? { detail: q.detail } : {},
|
|
60860
|
+
...options === void 0 || options.length === 0 ? {} : { options },
|
|
60861
|
+
...q.multiSelect === true ? { multiSelect: true } : {}
|
|
60862
|
+
});
|
|
60863
|
+
}
|
|
60864
|
+
return {
|
|
60865
|
+
callId: record.callId,
|
|
60866
|
+
state,
|
|
60867
|
+
questions
|
|
60868
|
+
};
|
|
60869
|
+
}
|
|
60870
|
+
//#endregion
|
|
60871
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/session/mirror/QuestionPanel.js
|
|
60872
|
+
const cls$1 = (...names) => names.filter((name) => typeof name === "string" && name !== "").join(" ");
|
|
60873
|
+
/** 取一个官方题面板类名;官方样式未注入时留空(不写死哈希,也不自绘顶替)。 */
|
|
60874
|
+
const c$1 = (semantic) => officialClass("QuestionComposer", semantic) ?? "";
|
|
60875
|
+
const EMPTY_COPIES = /* @__PURE__ */ new Set();
|
|
60876
|
+
/**
|
|
60877
|
+
* 待答题目面板(官方 QuestionComposer 的 1:1 复刻)。
|
|
60878
|
+
* @param props - 题目批次、载体态与作答通道。
|
|
60879
|
+
*/
|
|
60880
|
+
function QuestionPanel(props) {
|
|
60881
|
+
const { panelKey, questions, answer, dismiss, dismissal = "hide", subscribeCard, t } = props;
|
|
60882
|
+
const [index, setIndex] = (0, react$1.useState)(0);
|
|
60883
|
+
const [drafts, setDrafts] = (0, react$1.useState)(() => questions.map((question) => {
|
|
60884
|
+
return {
|
|
60885
|
+
selected: recommendedOptions(question),
|
|
60886
|
+
custom: "",
|
|
60887
|
+
skipped: false
|
|
60888
|
+
};
|
|
60889
|
+
}));
|
|
60890
|
+
const [busy, setBusy] = (0, react$1.useState)(false);
|
|
60891
|
+
const [error, setError] = (0, react$1.useState)(null);
|
|
60892
|
+
const [minimized, setMinimized] = (0, react$1.useState)(false);
|
|
60893
|
+
const [expanded, setExpanded] = (0, react$1.useState)({
|
|
60894
|
+
index: 0,
|
|
60895
|
+
copies: /* @__PURE__ */ new Set()
|
|
60896
|
+
});
|
|
60897
|
+
const [, force] = (0, react$1.useReducer)((n) => n + 1, 0);
|
|
60898
|
+
(0, react$1.useEffect)(() => {
|
|
60899
|
+
if (subscribeCard === void 0) return void 0;
|
|
60900
|
+
return subscribeCard(() => {
|
|
60901
|
+
force();
|
|
60902
|
+
});
|
|
60903
|
+
}, [subscribeCard]);
|
|
60904
|
+
const card = props.readCard?.() ?? props.card;
|
|
60905
|
+
const interactive = answer !== void 0;
|
|
60906
|
+
const state = card?.state ?? "open";
|
|
60907
|
+
const current = questions[Math.min(index, questions.length - 1)];
|
|
60908
|
+
const draft = drafts[Math.min(index, drafts.length - 1)];
|
|
60909
|
+
const hasOptions = (current.options?.length ?? 0) > 0;
|
|
60910
|
+
const copies = expanded.index === index ? expanded.copies : EMPTY_COPIES;
|
|
60911
|
+
const labelOf = (0, react$1.useMemo)(() => ({
|
|
60912
|
+
expand: t("askPanelExpand"),
|
|
60913
|
+
collapse: t("askPanelCollapse"),
|
|
60914
|
+
prev: t("askPanelPrev"),
|
|
60915
|
+
next: t("askPanelNext"),
|
|
60916
|
+
minimize: t("askPanelMinimize"),
|
|
60917
|
+
maximize: t("askPanelMaximize"),
|
|
60918
|
+
hide: t(dismissal === "hide" ? "askPanelClose" : "askPanelCancel")
|
|
60919
|
+
}), [t, dismissal]);
|
|
60920
|
+
const toggleCopy = (copy) => {
|
|
60921
|
+
const next = new Set(copies);
|
|
60922
|
+
if (!next.delete(copy)) next.add(copy);
|
|
60923
|
+
setExpanded({
|
|
60924
|
+
index,
|
|
60925
|
+
copies: next
|
|
60926
|
+
});
|
|
60927
|
+
};
|
|
60928
|
+
const updateDraft = (update, nextIndex = index) => {
|
|
60929
|
+
setDrafts((previous) => previous.map((item, at) => at === index ? update(item) : item));
|
|
60930
|
+
if (nextIndex !== index) {
|
|
60931
|
+
setIndex(nextIndex);
|
|
60932
|
+
setExpanded({
|
|
60933
|
+
index: nextIndex,
|
|
60934
|
+
copies: EMPTY_COPIES
|
|
60935
|
+
});
|
|
60936
|
+
}
|
|
60937
|
+
setError(null);
|
|
60938
|
+
};
|
|
60939
|
+
const choose = (label) => {
|
|
60940
|
+
updateDraft((value) => {
|
|
60941
|
+
if (current.multiSelect === true) {
|
|
60942
|
+
const selected = value.selected.includes(label) ? value.selected.filter((item) => item !== label) : [...value.selected, label];
|
|
60943
|
+
return {
|
|
60944
|
+
...value,
|
|
60945
|
+
selected,
|
|
60946
|
+
skipped: false
|
|
60947
|
+
};
|
|
60948
|
+
}
|
|
60949
|
+
return {
|
|
60950
|
+
selected: [label],
|
|
60951
|
+
custom: "",
|
|
60952
|
+
skipped: false
|
|
60953
|
+
};
|
|
60954
|
+
}, current.multiSelect !== true && index < questions.length - 1 ? index + 1 : index);
|
|
60955
|
+
};
|
|
60956
|
+
const answers = (values) => questions.map((question, at) => {
|
|
60957
|
+
const value = values[at];
|
|
60958
|
+
if (value.skipped) return {
|
|
60959
|
+
id: question.id,
|
|
60960
|
+
selected: []
|
|
60961
|
+
};
|
|
60962
|
+
const custom = value.custom.trim();
|
|
60963
|
+
return {
|
|
60964
|
+
id: question.id,
|
|
60965
|
+
selected: custom === "" || question.multiSelect === true ? value.selected : [],
|
|
60966
|
+
...custom === "" ? {} : { custom }
|
|
60967
|
+
};
|
|
60968
|
+
});
|
|
60969
|
+
const submit = (values) => {
|
|
60970
|
+
const missing = values.findIndex((value) => value.selected.length === 0 && value.custom.trim() === "" && !value.skipped);
|
|
60971
|
+
if (missing >= 0) {
|
|
60972
|
+
setIndex(missing);
|
|
60973
|
+
setExpanded({
|
|
60974
|
+
index: missing,
|
|
60975
|
+
copies: EMPTY_COPIES
|
|
60976
|
+
});
|
|
60977
|
+
setError({ key: "incomplete" });
|
|
60978
|
+
return;
|
|
60979
|
+
}
|
|
60980
|
+
if (answer === void 0) return;
|
|
60981
|
+
setBusy(true);
|
|
60982
|
+
setError(null);
|
|
60983
|
+
answer(answers(values)).catch((cause) => {
|
|
60984
|
+
setBusy(false);
|
|
60985
|
+
setError({ text: cause instanceof Error ? cause.message : String(cause) });
|
|
60986
|
+
});
|
|
60987
|
+
};
|
|
60988
|
+
const answered = (value) => value.selected.length > 0 || value.custom.trim() !== "";
|
|
60989
|
+
const continueFlow = () => {
|
|
60990
|
+
if (!answered(draft)) {
|
|
60991
|
+
setError({ key: "unanswered" });
|
|
60992
|
+
return;
|
|
60993
|
+
}
|
|
60994
|
+
if (index < questions.length - 1) {
|
|
60995
|
+
setIndex(index + 1);
|
|
60996
|
+
setExpanded({
|
|
60997
|
+
index: index + 1,
|
|
60998
|
+
copies: EMPTY_COPIES
|
|
60999
|
+
});
|
|
61000
|
+
setError(null);
|
|
61001
|
+
return;
|
|
61002
|
+
}
|
|
61003
|
+
submit(drafts);
|
|
61004
|
+
};
|
|
61005
|
+
const skipQuestion = () => {
|
|
61006
|
+
const next = drafts.map((value, at) => at === index ? {
|
|
61007
|
+
selected: [],
|
|
61008
|
+
custom: "",
|
|
61009
|
+
skipped: true
|
|
61010
|
+
} : value);
|
|
61011
|
+
setDrafts(next);
|
|
61012
|
+
setError(null);
|
|
61013
|
+
if (index < questions.length - 1) {
|
|
61014
|
+
setIndex(index + 1);
|
|
61015
|
+
setExpanded({
|
|
61016
|
+
index: index + 1,
|
|
61017
|
+
copies: EMPTY_COPIES
|
|
61018
|
+
});
|
|
61019
|
+
return;
|
|
61020
|
+
}
|
|
61021
|
+
submit(next);
|
|
61022
|
+
};
|
|
61023
|
+
const dismissFlow = () => {
|
|
61024
|
+
if (dismiss === void 0) return;
|
|
61025
|
+
if (dismissal === "hide") {
|
|
61026
|
+
dismiss();
|
|
61027
|
+
return;
|
|
61028
|
+
}
|
|
61029
|
+
if ((card?.channel ?? "none") === "none") {
|
|
61030
|
+
setError({ key: "unavailable" });
|
|
61031
|
+
return;
|
|
61032
|
+
}
|
|
61033
|
+
setBusy(true);
|
|
61034
|
+
setError(null);
|
|
61035
|
+
const outcome = dismiss();
|
|
61036
|
+
if (outcome !== void 0 && typeof outcome.catch === "function") outcome.catch((cause) => {
|
|
61037
|
+
setBusy(false);
|
|
61038
|
+
setError({ text: cause instanceof Error ? cause.message : String(cause) });
|
|
61039
|
+
});
|
|
61040
|
+
};
|
|
61041
|
+
const customField = (variant) => (0, react$1.createElement)("div", { className: cls$1(c$1("field"), variant === "inline" ? c$1("customInline") : c$1("customBlock")) }, (0, react$1.createElement)("div", {
|
|
61042
|
+
"aria-hidden": true,
|
|
61043
|
+
className: c$1("fieldMirror")
|
|
61044
|
+
}, `${draft.custom}\n`), (0, react$1.createElement)("textarea", {
|
|
61045
|
+
className: c$1("fieldInput"),
|
|
61046
|
+
value: draft.custom,
|
|
61047
|
+
rows: 1,
|
|
61048
|
+
disabled: !interactive || busy,
|
|
61049
|
+
placeholder: t("askPanelCustomPlaceholder"),
|
|
61050
|
+
onChange: (event) => {
|
|
61051
|
+
const value = event.target.value;
|
|
61052
|
+
updateDraft((draftValue) => ({
|
|
61053
|
+
...draftValue,
|
|
61054
|
+
selected: current.multiSelect === true ? draftValue.selected : [],
|
|
61055
|
+
custom: value,
|
|
61056
|
+
skipped: false
|
|
61057
|
+
}));
|
|
61058
|
+
},
|
|
61059
|
+
onKeyDown: (event) => {
|
|
61060
|
+
if (event.key !== "Enter" || event.shiftKey) return;
|
|
61061
|
+
event.preventDefault();
|
|
61062
|
+
continueFlow();
|
|
61063
|
+
}
|
|
61064
|
+
}));
|
|
61065
|
+
const countdown = card?.countdown;
|
|
61066
|
+
const feedback = error === null ? null : "key" in error ? t(error.key === "incomplete" ? "askPanelErrorIncomplete" : error.key === "unanswered" ? "askPanelErrorUnanswered" : "askPanelErrorUnavailable") : error.text;
|
|
61067
|
+
return (0, react$1.createElement)("div", {
|
|
61068
|
+
className: c$1("frame"),
|
|
61069
|
+
"data-question-key": panelKey
|
|
61070
|
+
}, (0, react$1.createElement)("section", { className: cls$1(c$1("card"), minimized && c$1("cardMinimized")) }, (0, react$1.createElement)("header", { className: c$1("header") }, current.header === void 0 && !minimized ? null : (0, react$1.createElement)("div", { className: c$1("headingBlock") }, current.header === void 0 ? null : (0, react$1.createElement)("div", { className: c$1("eyebrow") }, current.header), minimized ? (0, react$1.createElement)("h2", { className: c$1("title") }, current.question) : null), (0, react$1.createElement)("div", { className: c$1("headerActions") }, state === "continued" ? (0, react$1.createElement)("span", { className: c$1("waitStatus") }, t("askPanelContinued")) : countdown === void 0 ? null : (0, react$1.createElement)("span", { className: c$1("waitStatus") }, countdown.running ? t("askPanelCountdown", { seconds: Math.ceil(countdown.remainingMs / 1e3) }) : t("askPanelWaitPaused", { seconds: Math.ceil(countdown.remainingMs / 1e3) })), (0, react$1.createElement)("button", {
|
|
61071
|
+
type: "button",
|
|
61072
|
+
className: c$1("iconButton"),
|
|
61073
|
+
"aria-label": minimized ? labelOf.maximize : labelOf.minimize,
|
|
61074
|
+
title: minimized ? labelOf.maximize : labelOf.minimize,
|
|
61075
|
+
"aria-expanded": !minimized,
|
|
61076
|
+
disabled: busy,
|
|
61077
|
+
onClick: () => {
|
|
61078
|
+
setMinimized((value) => !value);
|
|
61079
|
+
}
|
|
61080
|
+
}, minimized ? (0, react$1.createElement)(official_exports.IconChevronUpOutlineRegular) : (0, react$1.createElement)(official_exports.IconChevronDownOutlineRegular)), dismiss === void 0 ? null : (0, react$1.createElement)("button", {
|
|
61081
|
+
type: "button",
|
|
61082
|
+
className: c$1("iconButton"),
|
|
61083
|
+
"aria-label": labelOf.hide,
|
|
61084
|
+
title: labelOf.hide,
|
|
61085
|
+
disabled: busy,
|
|
61086
|
+
onClick: dismissFlow
|
|
61087
|
+
}, (0, react$1.createElement)(official_exports.IconCloseOutlineRegular)))), minimized ? null : (0, react$1.createElement)("div", {
|
|
61088
|
+
className: c$1("body"),
|
|
61089
|
+
"data-question-scroll": ""
|
|
61090
|
+
}, (0, react$1.createElement)("div", {
|
|
61091
|
+
className: cls$1(c$1("questionTitle")),
|
|
61092
|
+
...copies.has("question") ? { "data-expanded": "" } : {}
|
|
61093
|
+
}, (0, react$1.createElement)("h2", { className: cls$1(c$1("title"), c$1("titlePreview")) }, current.question), (0, react$1.createElement)("button", {
|
|
61094
|
+
type: "button",
|
|
61095
|
+
className: cls$1(c$1("iconButton"), c$1("copyToggle"), c$1("questionToggle")),
|
|
61096
|
+
"aria-label": copies.has("question") ? labelOf.collapse : labelOf.expand,
|
|
61097
|
+
"aria-expanded": copies.has("question"),
|
|
61098
|
+
onClick: () => {
|
|
61099
|
+
toggleCopy("question");
|
|
61100
|
+
}
|
|
61101
|
+
}, copies.has("question") ? (0, react$1.createElement)(official_exports.IconChevronUpOutlineRegular) : (0, react$1.createElement)(official_exports.IconChevronDownOutlineRegular))), current.detail === void 0 ? null : (0, react$1.createElement)("div", { className: c$1("detail") }, (0, react$1.createElement)(official_exports.MarkdownText, {
|
|
61102
|
+
text: current.detail,
|
|
61103
|
+
labels: markdownLabels()
|
|
61104
|
+
})), (0, react$1.createElement)("div", {
|
|
61105
|
+
className: c$1("options"),
|
|
61106
|
+
role: current.multiSelect === true ? "group" : "radiogroup"
|
|
61107
|
+
}, (current.options ?? []).map((option, optionIndex) => {
|
|
61108
|
+
const selected = draft.selected.includes(option.label);
|
|
61109
|
+
const display = parseRecommendedLabel(option.label);
|
|
61110
|
+
const description = option.description !== void 0 && option.description.trim() !== "" ? option.description : void 0;
|
|
61111
|
+
const key = `${String(optionIndex)}`;
|
|
61112
|
+
const isExpanded = copies.has(key);
|
|
61113
|
+
return (0, react$1.createElement)("div", {
|
|
61114
|
+
key: `${option.label}-${key}`,
|
|
61115
|
+
className: cls$1(c$1("optionRow"), !interactive || busy ? false : c$1("optionRowInteractive"), selected && current.multiSelect !== true ? c$1("optionSelected") : false),
|
|
61116
|
+
"data-option-row": "",
|
|
61117
|
+
...isExpanded ? { "data-expanded": "" } : {}
|
|
61118
|
+
}, (0, react$1.createElement)("button", {
|
|
61119
|
+
type: "button",
|
|
61120
|
+
className: c$1("option"),
|
|
61121
|
+
role: current.multiSelect === true ? "checkbox" : "radio",
|
|
61122
|
+
"aria-checked": selected,
|
|
61123
|
+
"aria-label": display.label,
|
|
61124
|
+
disabled: !interactive || busy,
|
|
61125
|
+
onClick: () => {
|
|
61126
|
+
choose(option.label);
|
|
61127
|
+
}
|
|
61128
|
+
}, current.multiSelect === true ? (0, react$1.createElement)("span", {
|
|
61129
|
+
className: cls$1(c$1("checkbox"), selected && c$1("checkboxChecked")),
|
|
61130
|
+
"aria-hidden": true
|
|
61131
|
+
}, selected ? (0, react$1.createElement)(official_exports.IconCheckOutlineRegular, { size: 12 }) : null) : (0, react$1.createElement)("span", { className: c$1("number") }, optionIndex + 1), (0, react$1.createElement)("span", { className: c$1("optionCopy") }, (0, react$1.createElement)("span", {
|
|
61132
|
+
className: c$1("optionLine"),
|
|
61133
|
+
"data-option-line": ""
|
|
61134
|
+
}, (0, react$1.createElement)("span", { className: c$1("optionLabel") }, display.label), display.recommended ? (0, react$1.createElement)("span", { className: c$1("badge") }, t("askPanelRecommended")) : null), description === void 0 ? null : (0, react$1.createElement)("span", {
|
|
61135
|
+
className: c$1("description"),
|
|
61136
|
+
"data-option-description": ""
|
|
61137
|
+
}, description))), description === void 0 ? null : (0, react$1.createElement)("button", {
|
|
61138
|
+
type: "button",
|
|
61139
|
+
className: cls$1(c$1("iconButton"), c$1("copyToggle"), c$1("descriptionToggle")),
|
|
61140
|
+
"aria-label": isExpanded ? labelOf.collapse : labelOf.expand,
|
|
61141
|
+
"aria-expanded": isExpanded,
|
|
61142
|
+
onClick: () => {
|
|
61143
|
+
toggleCopy(key);
|
|
61144
|
+
}
|
|
61145
|
+
}, isExpanded ? (0, react$1.createElement)(official_exports.IconChevronUpOutlineRegular) : (0, react$1.createElement)(official_exports.IconChevronDownOutlineRegular)));
|
|
61146
|
+
}), hasOptions ? (0, react$1.createElement)("div", { className: cls$1(c$1("customRow"), draft.custom !== "" && c$1("customRowActive")) }, current.multiSelect === true ? (0, react$1.createElement)("span", {
|
|
61147
|
+
className: cls$1(c$1("checkbox"), draft.custom !== "" && c$1("checkboxChecked")),
|
|
61148
|
+
"aria-hidden": true
|
|
61149
|
+
}, draft.custom !== "" ? (0, react$1.createElement)(official_exports.IconCheckOutlineRegular, { size: 12 }) : null) : (0, react$1.createElement)("span", {
|
|
61150
|
+
className: c$1("number"),
|
|
61151
|
+
"aria-hidden": true
|
|
61152
|
+
}, (0, react$1.createElement)(official_exports.IconEditOutlineRegular, { size: 12 })), customField("inline")) : customField("block"))), minimized ? null : (0, react$1.createElement)("footer", { className: c$1("footer") }, (0, react$1.createElement)("div", { className: c$1("pager") }, (0, react$1.createElement)("button", {
|
|
61153
|
+
type: "button",
|
|
61154
|
+
className: c$1("iconButton"),
|
|
61155
|
+
"aria-label": labelOf.prev,
|
|
61156
|
+
disabled: index === 0 || busy,
|
|
61157
|
+
onClick: () => {
|
|
61158
|
+
setIndex(index - 1);
|
|
61159
|
+
setExpanded({
|
|
61160
|
+
index: index - 1,
|
|
61161
|
+
copies: EMPTY_COPIES
|
|
61162
|
+
});
|
|
61163
|
+
setError(null);
|
|
61164
|
+
}
|
|
61165
|
+
}, (0, react$1.createElement)(official_exports.IconChevronLeftOutlineRegular)), (0, react$1.createElement)("span", { className: c$1("progress") }, `${String(index + 1)} / ${String(questions.length)}`), (0, react$1.createElement)("button", {
|
|
61166
|
+
type: "button",
|
|
61167
|
+
className: c$1("iconButton"),
|
|
61168
|
+
"aria-label": labelOf.next,
|
|
61169
|
+
disabled: index === questions.length - 1 || busy,
|
|
61170
|
+
onClick: () => {
|
|
61171
|
+
setIndex(index + 1);
|
|
61172
|
+
setExpanded({
|
|
61173
|
+
index: index + 1,
|
|
61174
|
+
copies: EMPTY_COPIES
|
|
61175
|
+
});
|
|
61176
|
+
setError(null);
|
|
61177
|
+
}
|
|
61178
|
+
}, (0, react$1.createElement)(official_exports.IconChevronRightOutlineRegular))), (0, react$1.createElement)("div", {
|
|
61179
|
+
className: c$1("feedback"),
|
|
61180
|
+
role: "status"
|
|
61181
|
+
}, feedback), interactive ? (0, react$1.createElement)("div", { className: c$1("footerActions") }, (0, react$1.createElement)(official_exports.Button, {
|
|
61182
|
+
variant: "outline",
|
|
61183
|
+
disabled: busy,
|
|
61184
|
+
onClick: skipQuestion
|
|
61185
|
+
}, t("askPanelSkip")), (0, react$1.createElement)(official_exports.Button, {
|
|
61186
|
+
variant: "primary",
|
|
61187
|
+
disabled: busy || !answered(draft),
|
|
61188
|
+
onClick: continueFlow
|
|
61189
|
+
}, busy ? t("askPanelSubmitting") : index === questions.length - 1 ? t("askPanelSubmit") : t("askPanelNext"))) : null)));
|
|
61190
|
+
}
|
|
61191
|
+
//#endregion
|
|
61192
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/session/mirror/QuestionReply.js
|
|
61193
|
+
/** 官方「已复制」复位时间(与 MessageIconActions 一致)。 */
|
|
61194
|
+
const COPIED_RESET_MS = 1e3;
|
|
61195
|
+
const c = (semantic) => officialClass("QuestionReplyView", semantic) ?? "";
|
|
61196
|
+
/**
|
|
61197
|
+
* 官方 `replyAnswerValues`:某题的作答值 = 选中项按原顺序 + 非空自定义文本。
|
|
61198
|
+
* @param data - 一条 reply 节点数据。
|
|
61199
|
+
* @param id - 题目 id。
|
|
61200
|
+
* @returns 展示用的作答值,空数组表示这题被跳过。
|
|
61201
|
+
*/
|
|
61202
|
+
function replyAnswerValues(data, id) {
|
|
61203
|
+
const answer = (data.answers ?? []).find((item) => item.id === id);
|
|
61204
|
+
const custom = answer?.custom?.trim() ?? "";
|
|
61205
|
+
return [...answer?.selected ?? [], ...custom === "" ? [] : [custom]];
|
|
61206
|
+
}
|
|
61207
|
+
/**
|
|
61208
|
+
* 官方 `replyClipboardText`:每题「题(组标题 — 题干)+ 作答」一段,题面读不出来时退回原话。
|
|
61209
|
+
* @param data - 一条 reply 节点数据。
|
|
61210
|
+
* @param t - 翻译函数。
|
|
61211
|
+
* @returns 可复制的纯文本。
|
|
61212
|
+
*/
|
|
61213
|
+
function replyClipboardText(data, t) {
|
|
61214
|
+
const questions = data.questions ?? [];
|
|
61215
|
+
if (questions.length === 0) return data.text ?? "";
|
|
61216
|
+
return questions.map((question) => {
|
|
61217
|
+
const values = replyAnswerValues(data, question.id);
|
|
61218
|
+
return `${question.header !== void 0 && question.header !== question.question ? `${question.header} — ${question.question}` : question.question}\n${values.length === 0 ? t("replySkipped") : `${t("replyAnswerLabel")}${values.join(", ")}`}`;
|
|
61219
|
+
}).join("\n\n");
|
|
61220
|
+
}
|
|
61221
|
+
function clockOf(time) {
|
|
61222
|
+
const at = time instanceof Date ? time.getTime() : typeof time === "number" ? time : void 0;
|
|
61223
|
+
if (at === void 0 || !Number.isFinite(at)) return null;
|
|
61224
|
+
try {
|
|
61225
|
+
return new Intl.DateTimeFormat(void 0, {
|
|
61226
|
+
hour: "2-digit",
|
|
61227
|
+
minute: "2-digit",
|
|
61228
|
+
hour12: false
|
|
61229
|
+
}).format(at);
|
|
61230
|
+
} catch {
|
|
61231
|
+
return null;
|
|
61232
|
+
}
|
|
61233
|
+
}
|
|
61234
|
+
/**
|
|
61235
|
+
* 已作答/已跳过的一批题(官方 `QuestionReplyBubble`):右对齐气泡,题在上、答案在下,带时间与复制。
|
|
61236
|
+
* @param props - 节点数据与翻译函数。
|
|
61237
|
+
*/
|
|
61238
|
+
function QuestionReplyBubble(props) {
|
|
61239
|
+
const { data, t } = props;
|
|
61240
|
+
const [copied, setCopied] = (0, react$1.useState)(false);
|
|
61241
|
+
const timerRef = (0, react$1.useRef)(void 0);
|
|
61242
|
+
(0, react$1.useEffect)(() => () => {
|
|
61243
|
+
if (timerRef.current !== void 0) clearTimeout(timerRef.current);
|
|
61244
|
+
}, []);
|
|
61245
|
+
const label = copied ? t("copiedLabel") : t("copyLabel");
|
|
61246
|
+
const questions = data.questions ?? [];
|
|
61247
|
+
const clock = clockOf(data.time);
|
|
61248
|
+
return (0, react$1.createElement)("div", {
|
|
61249
|
+
className: c("row"),
|
|
61250
|
+
"data-question-reply": data.callId,
|
|
61251
|
+
"data-reply-outcome": data.outcome,
|
|
61252
|
+
role: "group",
|
|
61253
|
+
"aria-label": t("replyLabel")
|
|
61254
|
+
}, (0, react$1.createElement)("div", { className: c("bubbleWidth") }, (0, react$1.createElement)(official_exports.UserMessageBubble, { className: c("bubble") }, questions.length === 0 ? (0, react$1.createElement)("p", { className: c("text") }, data.text ?? "") : (0, react$1.createElement)("dl", { className: c("details") }, questions.map((question) => {
|
|
61255
|
+
const values = replyAnswerValues(data, question.id);
|
|
61256
|
+
const headed = question.header !== void 0 && question.header !== question.question;
|
|
61257
|
+
return (0, react$1.createElement)("div", { key: question.id }, (0, react$1.createElement)("dt", { className: c("question") }, headed ? (0, react$1.createElement)("span", { className: c("header") }, question.header) : null, (0, react$1.createElement)("span", null, question.question)), (0, react$1.createElement)("dd", { className: c("answer") }, values.length === 0 ? t("replySkipped") : values.join(", ")));
|
|
61258
|
+
})))), (0, react$1.createElement)("div", { className: c("actions") }, clock === null ? null : (0, react$1.createElement)("span", { className: c("time") }, clock), (0, react$1.createElement)(official_exports.Tooltip, {
|
|
61259
|
+
label,
|
|
61260
|
+
side: "bottom"
|
|
61261
|
+
}, (0, react$1.createElement)("button", {
|
|
61262
|
+
type: "button",
|
|
61263
|
+
className: c("action"),
|
|
61264
|
+
"aria-label": label,
|
|
61265
|
+
onClick: () => {
|
|
61266
|
+
if (copied) return;
|
|
61267
|
+
(0, official_exports.writeClipboard)(replyClipboardText(data, t)).then((ok) => {
|
|
61268
|
+
if (!ok) return;
|
|
61269
|
+
setCopied(true);
|
|
61270
|
+
timerRef.current = setTimeout(() => {
|
|
61271
|
+
setCopied(false);
|
|
61272
|
+
}, COPIED_RESET_MS);
|
|
61273
|
+
});
|
|
61274
|
+
}
|
|
61275
|
+
}, copied ? (0, react$1.createElement)(official_exports.IconCheckOutlineRegular) : (0, react$1.createElement)(official_exports.IconCopyOutlineRegular)))));
|
|
61276
|
+
}
|
|
61277
|
+
//#endregion
|
|
61278
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/session/mirror/SkillRow.js
|
|
60481
61279
|
const cls = (semantic) => officialClass("SkillRow", semantic) ?? "";
|
|
60482
61280
|
const firstLine$2 = (text) => {
|
|
60483
61281
|
const nl = text.indexOf("\n");
|
|
@@ -60547,7 +61345,7 @@ window.__ModuleLoader__.load({
|
|
|
60547
61345
|
}, output))) : null);
|
|
60548
61346
|
}
|
|
60549
61347
|
//#endregion
|
|
60550
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
61348
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/session/mirror/ContextBody.js
|
|
60551
61349
|
/** 官方 ContextBody 模块类(宿主必注入;缺席 = 空串,裸结构不白屏)。 */
|
|
60552
61350
|
const C$2 = (semantic) => officialClass("ContextBody", semantic) ?? "";
|
|
60553
61351
|
/** 官方 MAX_CHARS / MAX_ENTRIES(lib/client.js:5196/5198)。 */
|
|
@@ -60873,7 +61671,7 @@ window.__ModuleLoader__.load({
|
|
|
60873
61671
|
}
|
|
60874
61672
|
}
|
|
60875
61673
|
//#endregion
|
|
60876
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
61674
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/session/mirror/ContextInjectionRow.js
|
|
60877
61675
|
/** 官方 ContextInjectionRow 的标题与汇总口径(纯函数)。 */
|
|
60878
61676
|
function contextRowFacts(content, producerRole, t) {
|
|
60879
61677
|
const toolBlocks = content.length > 0 && content.every((block) => {
|
|
@@ -60943,7 +61741,7 @@ window.__ModuleLoader__.load({
|
|
|
60943
61741
|
});
|
|
60944
61742
|
}
|
|
60945
61743
|
//#endregion
|
|
60946
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
61744
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/session/mirror/ReasoningRow.js
|
|
60947
61745
|
/** 官方 firstLine(lib/client.js:6140 区):首行。 */
|
|
60948
61746
|
function firstLine$1(text) {
|
|
60949
61747
|
const newline = text.indexOf("\n");
|
|
@@ -60984,21 +61782,22 @@ window.__ModuleLoader__.load({
|
|
|
60984
61782
|
function ReasoningRowMirror(props) {
|
|
60985
61783
|
const { text: rawText, running = false, preview: settledPreview = true, t } = props;
|
|
60986
61784
|
const [open, setOpen] = (0, react$1.useState)(false);
|
|
61785
|
+
const expanded = open || running;
|
|
60987
61786
|
const text = (0, react$1.useMemo)(() => reasoningText(rawText), [rawText]);
|
|
60988
61787
|
if (text !== rawText && text.trim() === "") return null;
|
|
60989
61788
|
const summary = (running ? latestCompletedParagraphFirstLine(text) : firstLine$1(text)).split("**").join("");
|
|
60990
|
-
const preview = !
|
|
61789
|
+
const preview = !expanded && summary !== "" && (running || settledPreview);
|
|
60991
61790
|
return (0, react$1.createElement)("div", {
|
|
60992
61791
|
className: officialClass("ReasoningRow", "root") ?? "",
|
|
60993
61792
|
"data-variant": "think",
|
|
60994
61793
|
"data-state": running ? "running" : "ok",
|
|
60995
|
-
"data-expanded":
|
|
61794
|
+
"data-expanded": expanded || void 0,
|
|
60996
61795
|
"data-preview": preview || void 0
|
|
60997
61796
|
}, running ? (0, react$1.createElement)("span", { className: officialClass("accessibility", "visuallyHidden") ?? "" }, t("reasoningRunning")) : null, (0, react$1.createElement)(official_exports.DisclosureRow, {
|
|
60998
61797
|
icon: (0, react$1.createElement)(official_exports.IconThinkOutlineRegular, { size: 14 }),
|
|
60999
61798
|
title: t("thinkLabel"),
|
|
61000
61799
|
running,
|
|
61001
|
-
open,
|
|
61800
|
+
open: expanded,
|
|
61002
61801
|
expandable: true,
|
|
61003
61802
|
expandOnRowClick: true,
|
|
61004
61803
|
onToggle: () => {
|
|
@@ -61015,7 +61814,7 @@ window.__ModuleLoader__.load({
|
|
|
61015
61814
|
className: officialClass("ReasoningRow", "summary") ?? "",
|
|
61016
61815
|
"data-streaming": running || void 0
|
|
61017
61816
|
}, (0, react$1.createElement)("span", { className: officialClass("ReasoningRow", "summaryText") ?? "" }, (0, react$1.createElement)(official_exports.TextShimmer, null, summary)))),
|
|
61018
|
-
children:
|
|
61817
|
+
children: expanded ? (0, react$1.createElement)("div", { className: officialClass("ReasoningRow", "thinkBody") ?? "" }, (0, react$1.createElement)(official_exports.MarkdownText, {
|
|
61019
61818
|
text,
|
|
61020
61819
|
streaming: running,
|
|
61021
61820
|
labels: markdownLabels(),
|
|
@@ -61024,7 +61823,7 @@ window.__ModuleLoader__.load({
|
|
|
61024
61823
|
}));
|
|
61025
61824
|
}
|
|
61026
61825
|
//#endregion
|
|
61027
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
61826
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/session/mirror/RunningStatus.js
|
|
61028
61827
|
/** 官方 LIVE_RUN_CLOCK_INTERVAL_MS(lib/client.js:979)。 */
|
|
61029
61828
|
const LIVE_RUN_CLOCK_INTERVAL_MS = 1e3;
|
|
61030
61829
|
/** 官方静态兜底 SVG 的鲸尾路径(lib/client.js:6340 REST_PATH,16×16)。 */
|
|
@@ -61082,7 +61881,7 @@ window.__ModuleLoader__.load({
|
|
|
61082
61881
|
}, label)));
|
|
61083
61882
|
}
|
|
61084
61883
|
//#endregion
|
|
61085
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
61884
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/session/mirror/TurnProcessNodeView.js
|
|
61086
61885
|
/** Turn 过程行:折叠时只有 label + 箭头;点开由外层 seat 把过程节点放出来。 */
|
|
61087
61886
|
function TurnProcessNodeViewMirror(props) {
|
|
61088
61887
|
const { turn, turnProcess, t } = props;
|
|
@@ -61120,7 +61919,7 @@ window.__ModuleLoader__.load({
|
|
|
61120
61919
|
}, part.text))), canCollapse ? (0, react$1.createElement)(official_exports.IconChevronDownOutlineRegular, { className: officialClass("TurnProcessNodeView", "chevron") ?? "" }) : null));
|
|
61121
61920
|
}
|
|
61122
61921
|
//#endregion
|
|
61123
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
61922
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/session/mirror/StatDialog.js
|
|
61124
61923
|
const PANEL_MARGIN = 12;
|
|
61125
61924
|
const PANEL_GAP = 8;
|
|
61126
61925
|
/**
|
|
@@ -61176,7 +61975,7 @@ window.__ModuleLoader__.load({
|
|
|
61176
61975
|
};
|
|
61177
61976
|
}
|
|
61178
61977
|
//#endregion
|
|
61179
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
61978
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/session/mirror/TurnUsagePanel.js
|
|
61180
61979
|
/** 本轮用量 pill + 明细弹层。 */
|
|
61181
61980
|
function TurnUsagePanelMirror(props) {
|
|
61182
61981
|
const { usage, t } = props;
|
|
@@ -61210,7 +62009,7 @@ window.__ModuleLoader__.load({
|
|
|
61210
62009
|
}, routes === "" ? null : (0, react$1.createElement)(react$1.Fragment, null, (0, react$1.createElement)("dt", null, t("turnUsageModel")), (0, react$1.createElement)("dd", { className: officialClass("stat-dialog", "route") ?? "" }, routes)), cacheHit === null ? null : (0, react$1.createElement)(react$1.Fragment, null, (0, react$1.createElement)("dt", null, t("turnUsageCacheHit")), (0, react$1.createElement)("dd", null, `${cacheHit}%`)), (0, react$1.createElement)("dt", null, t("turnUsageInput")), (0, react$1.createElement)("dd", null, formatExactCount(usage.uncachedInputTokens, t)), usage.cacheReadTokens === void 0 ? null : (0, react$1.createElement)(react$1.Fragment, null, (0, react$1.createElement)("dt", null, t("turnUsageCacheRead")), (0, react$1.createElement)("dd", null, formatExactCount(usage.cacheReadTokens, t))), usage.cacheWriteTokens === void 0 ? null : (0, react$1.createElement)(react$1.Fragment, null, (0, react$1.createElement)("dt", null, t("turnUsageCacheWrite")), (0, react$1.createElement)("dd", null, formatExactCount(usage.cacheWriteTokens, t))), (0, react$1.createElement)("dt", null, t("turnUsageOutput")), (0, react$1.createElement)("dd", null, formatExactCount(usage.outputTokens, t), usage.reasoningTokens === void 0 ? null : (0, react$1.createElement)("span", { className: officialClass("stat-dialog", "reasoning") ?? "" }, t("turnUsageReasoning", { tokens: formatExactCount(usage.reasoningTokens, t) }))))), document.body) : null);
|
|
61211
62010
|
}
|
|
61212
62011
|
//#endregion
|
|
61213
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
62012
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/session/mirror/TurnTailNodeView.js
|
|
61214
62013
|
/** 官方 hasAssistantReplyContent。 */
|
|
61215
62014
|
function hasAssistantReplyContent(blocks) {
|
|
61216
62015
|
return blocks.some((block) => {
|
|
@@ -61294,7 +62093,7 @@ window.__ModuleLoader__.load({
|
|
|
61294
62093
|
}));
|
|
61295
62094
|
}
|
|
61296
62095
|
//#endregion
|
|
61297
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
62096
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/session/mirror/TurnTriggerNodeView.js
|
|
61298
62097
|
/** 官方 TRIGGER_ICONS(lib/client.js:7122-7131)。 */
|
|
61299
62098
|
const TRIGGER_ICONS = {
|
|
61300
62099
|
request: official_exports.IconContextInjectionOutlineRegular,
|
|
@@ -61407,7 +62206,7 @@ window.__ModuleLoader__.load({
|
|
|
61407
62206
|
return runs.length === 0 ? [t("sessionEmpty")] : runs;
|
|
61408
62207
|
}
|
|
61409
62208
|
//#endregion
|
|
61410
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
62209
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/session/mirror/Deliverables.js
|
|
61411
62210
|
const basename = (path) => path.slice(Math.max(path.lastIndexOf("/"), path.lastIndexOf("\\")) + 1);
|
|
61412
62211
|
/** 交付路径的所在目录;无分隔符(纯文件名)⇒ undefined,不出「在文件夹中显示」。 */
|
|
61413
62212
|
function parentOf(path) {
|
|
@@ -61558,7 +62357,7 @@ window.__ModuleLoader__.load({
|
|
|
61558
62357
|
}, (0, react$1.createElement)("span", null, t(expanded ? "deliverCollapse" : "deliverAll", { count: files.length })), expanded ? (0, react$1.createElement)(official_exports.IconChevronUpOutlineRegular, {}) : (0, react$1.createElement)(official_exports.IconChevronDownOutlineRegular, {})) : null);
|
|
61559
62358
|
}
|
|
61560
62359
|
//#endregion
|
|
61561
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
62360
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/utils/string.js
|
|
61562
62361
|
/**
|
|
61563
62362
|
* 路径取末段(文件名显示用)。`/` 与 `\` 都认。
|
|
61564
62363
|
*
|
|
@@ -61572,7 +62371,7 @@ window.__ModuleLoader__.load({
|
|
|
61572
62371
|
return cut < 0 ? trimmed : trimmed.slice(cut + 1);
|
|
61573
62372
|
}
|
|
61574
62373
|
//#endregion
|
|
61575
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
62374
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/session/changes.js
|
|
61576
62375
|
/** 官方 changesSummaryUrl(client.js:90-96):文档相对路由。 */
|
|
61577
62376
|
function changesSummaryUrl(sessionId, seq) {
|
|
61578
62377
|
return `api/changes.summary?${new URLSearchParams({
|
|
@@ -61714,7 +62513,7 @@ window.__ModuleLoader__.load({
|
|
|
61714
62513
|
return isInt(seq) ? seq : null;
|
|
61715
62514
|
}
|
|
61716
62515
|
//#endregion
|
|
61717
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
62516
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/session/mirror/ChangedFileDiff.js
|
|
61718
62517
|
/** 官方 ChangedFiles / FileDiff 模块类(ui-deliverables;取不到 = 空类,不白屏)。 */
|
|
61719
62518
|
const C$1 = (semantic) => officialClass("ChangedFiles", semantic) ?? "";
|
|
61720
62519
|
const D = (semantic) => officialClass("FileDiff", semantic) ?? "";
|
|
@@ -61894,7 +62693,7 @@ window.__ModuleLoader__.load({
|
|
|
61894
62693
|
})), body);
|
|
61895
62694
|
}
|
|
61896
62695
|
//#endregion
|
|
61897
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
62696
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/session/mirror/ChangedFilesCard.js
|
|
61898
62697
|
/** 官方 ChangedFiles 模块类(ui-deliverables;取不到 = 空类,不白屏)。 */
|
|
61899
62698
|
const C = (semantic) => officialClass("ChangedFiles", semantic) ?? "";
|
|
61900
62699
|
/** 会话级缓存:同一 (sessionId, seq) 只拉一次(官方 ChangesSummaryStore 同语义)。 */
|
|
@@ -62027,7 +62826,7 @@ window.__ModuleLoader__.load({
|
|
|
62027
62826
|
}, header, list, toggle);
|
|
62028
62827
|
}
|
|
62029
62828
|
//#endregion
|
|
62030
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
62829
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/session/pending-inputs.js
|
|
62031
62830
|
/** 官方 observedInputs:durable user 节点 source.rpcId(本地回显被持久节点取代的判据)。 */
|
|
62032
62831
|
function observedRpcIds(order, readNode) {
|
|
62033
62832
|
const ids = /* @__PURE__ */ new Set();
|
|
@@ -62227,15 +63026,24 @@ window.__ModuleLoader__.load({
|
|
|
62227
63026
|
};
|
|
62228
63027
|
}
|
|
62229
63028
|
//#endregion
|
|
62230
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
63029
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/session/SessionViewModal.js
|
|
62231
63030
|
/** 稳定的空序列(避免默认值每次新建数组)。 */
|
|
62232
63031
|
const EMPTY_ORDER = [];
|
|
62233
63032
|
/** SSR / 数据面未接线时的归档态:如实按未归档,不编造。 */
|
|
62234
63033
|
const NOT_ARCHIVED = () => false;
|
|
62235
63034
|
/** SSR / 宿主未注册 inbox 投影时按能力缺席,不编造等待期消息。 */
|
|
62236
63035
|
const NO_INBOX = () => void 0;
|
|
63036
|
+
/** 两处「等用户表态」卡缺席时的稳定空值:不编造待审批 / 待回答。 */
|
|
63037
|
+
const NO_APPROVAL = () => void 0;
|
|
63038
|
+
const NO_QUESTIONS = () => null;
|
|
63039
|
+
const NO_LIVE_QUESTION = () => void 0;
|
|
63040
|
+
const NO_CARD_SUBSCRIBE = () => () => {};
|
|
62237
63041
|
/** 官方样式缺失告警只打一次(避免每次渲染刷屏)。 */
|
|
62238
63042
|
let officialWarned = false;
|
|
63043
|
+
/** 题面板「只能看不能点」的原因只报一次(否则每次渲染刷屏)。 */
|
|
63044
|
+
let questionReadOnlyWarned = false;
|
|
63045
|
+
/** 尾部节点读数只报一次:定位「作答气泡没出来 / 思考行不收不展」用,一次讲清现场。 */
|
|
63046
|
+
let tailKindsWarned = false;
|
|
62239
63047
|
/** JSON 安全序列化(循环引用 / 特殊值不抛)。 */
|
|
62240
63048
|
function safeJson(value) {
|
|
62241
63049
|
try {
|
|
@@ -62393,7 +63201,7 @@ window.__ModuleLoader__.load({
|
|
|
62393
63201
|
* @param groupPart - 过程分组侧('response' | 'reasoning')。
|
|
62394
63202
|
* @returns 节点视图;null = 决策 28 过滤的噪音 kind。
|
|
62395
63203
|
*/
|
|
62396
|
-
function renderKeyedNode(node, turnProcess, t, onBranchAt, fileOpen, groupPart, deliverFiles, lastTailTurn, changesSeq, sessionId, onOpenReview, tailFacts, loadImage, footerSlot, footerKey) {
|
|
63204
|
+
function renderKeyedNode(node, turnProcess, t, onBranchAt, fileOpen, groupPart, deliverFiles, lastTailTurn, changesSeq, sessionId, onOpenReview, tailFacts, loadImage, footerSlot, footerKey, sessionRunning, liveKey) {
|
|
62397
63205
|
switch (node.kind) {
|
|
62398
63206
|
case "turn-trigger": return (0, react$1.createElement)(TurnTriggerNodeViewMirror, {
|
|
62399
63207
|
data: node.data,
|
|
@@ -62432,7 +63240,7 @@ window.__ModuleLoader__.load({
|
|
|
62432
63240
|
case "assistant-step": {
|
|
62433
63241
|
const nodeData = dataOf(node);
|
|
62434
63242
|
const blocks = blocksOf(nodeData.blocks) ?? [];
|
|
62435
|
-
const streaming = nodeData.status === "running";
|
|
63243
|
+
const streaming = nodeData.status === "running" || sessionRunning === true && liveKey !== void 0 && node.key === liveKey;
|
|
62436
63244
|
const interrupted = nodeData.status === "interrupted";
|
|
62437
63245
|
const contentBlocks = blocks.filter((block) => block.kind !== "tool-call");
|
|
62438
63246
|
if (!(streaming || interrupted || blocks.some((block) => block.kind !== "tool-call"))) return null;
|
|
@@ -62474,6 +63282,14 @@ window.__ModuleLoader__.load({
|
|
|
62474
63282
|
t
|
|
62475
63283
|
});
|
|
62476
63284
|
}
|
|
63285
|
+
case "answered-user-question":
|
|
63286
|
+
case "question-reply": {
|
|
63287
|
+
const data = dataOf(node);
|
|
63288
|
+
return data === void 0 ? null : (0, react$1.createElement)(QuestionReplyBubble, {
|
|
63289
|
+
data,
|
|
63290
|
+
t
|
|
63291
|
+
});
|
|
63292
|
+
}
|
|
62477
63293
|
case "turn-error": return (0, react$1.createElement)(TurnErrorItemMirror, {
|
|
62478
63294
|
node: dataOf(node),
|
|
62479
63295
|
t
|
|
@@ -62889,6 +63705,18 @@ window.__ModuleLoader__.load({
|
|
|
62889
63705
|
const inboxSub = (0, react$1.useMemo)(() => (onChange) => view.inbox.subscribe(onChange), [view]);
|
|
62890
63706
|
const inboxGet = (0, react$1.useMemo)(() => () => view.inbox.getSnapshot(), [view]);
|
|
62891
63707
|
const inboxSnap = (0, react$1.useSyncExternalStore)(inboxSub, inboxGet, NO_INBOX);
|
|
63708
|
+
const approvalFace = view.pendingApproval;
|
|
63709
|
+
const approvalSub = (0, react$1.useMemo)(() => approvalFace === null ? NO_CARD_SUBSCRIBE : (onChange) => approvalFace.subscribe(onChange), [approvalFace]);
|
|
63710
|
+
const approvalGet = (0, react$1.useMemo)(() => approvalFace === null ? NO_APPROVAL : () => approvalFace.getSnapshot(), [approvalFace]);
|
|
63711
|
+
const pendingApproval = (0, react$1.useSyncExternalStore)(approvalSub, approvalGet, NO_APPROVAL);
|
|
63712
|
+
const questionFace = view.pendingQuestions;
|
|
63713
|
+
const questionSub = (0, react$1.useMemo)(() => questionFace === null ? NO_CARD_SUBSCRIBE : (onChange) => questionFace.subscribe(onChange), [questionFace]);
|
|
63714
|
+
const questionGet = (0, react$1.useMemo)(() => questionFace === null ? NO_QUESTIONS : () => questionFace.getSnapshot(), [questionFace]);
|
|
63715
|
+
const pendingQuestions = (0, react$1.useSyncExternalStore)(questionSub, questionGet, NO_QUESTIONS);
|
|
63716
|
+
const liveQuestionFace = view.pendingQuestion;
|
|
63717
|
+
const liveSub = (0, react$1.useMemo)(() => liveQuestionFace === null ? NO_CARD_SUBSCRIBE : (onChange) => liveQuestionFace.subscribe(onChange), [liveQuestionFace]);
|
|
63718
|
+
const liveGet = (0, react$1.useMemo)(() => liveQuestionFace === null ? NO_LIVE_QUESTION : () => liveQuestionFace.getSnapshot(), [liveQuestionFace]);
|
|
63719
|
+
const liveQuestion = (0, react$1.useSyncExternalStore)(liveSub, liveGet, NO_LIVE_QUESTION);
|
|
62892
63720
|
const [openTurns, setOpenTurns] = (0, react$1.useState)(() => /* @__PURE__ */ new Map());
|
|
62893
63721
|
const onSetOpen = (0, react$1.useCallback)((turn, answerStep, open) => {
|
|
62894
63722
|
setOpenTurns((prev) => {
|
|
@@ -63109,9 +63937,11 @@ window.__ModuleLoader__.load({
|
|
|
63109
63937
|
return best ?? void 0;
|
|
63110
63938
|
}, [turns]);
|
|
63111
63939
|
const diagChatRef = (0, react$1.useRef)(void 0);
|
|
63940
|
+
const diagCardRef = (0, react$1.useRef)(void 0);
|
|
63112
63941
|
(0, react$1.useEffect)(() => {
|
|
63113
|
-
if (diagChatRef.current === chat) return;
|
|
63942
|
+
if (diagChatRef.current === chat && diagCardRef.current === pendingApproval) return;
|
|
63114
63943
|
diagChatRef.current = chat;
|
|
63944
|
+
diagCardRef.current = pendingApproval;
|
|
63115
63945
|
const turnsMap = turns;
|
|
63116
63946
|
const face = turnsMap === void 0 ? void 0 : turnsMap.get(lastTailTurn) ?? turnsMap.get(String(lastTailTurn));
|
|
63117
63947
|
const deliverables = face === void 0 ? void 0 : turnDeliverablesValue(face, "deliverables");
|
|
@@ -63147,7 +63977,11 @@ window.__ModuleLoader__.load({
|
|
|
63147
63977
|
deliverFiles: deliverFiles.length,
|
|
63148
63978
|
onOpenFile: onOpenFile !== void 0,
|
|
63149
63979
|
mentionCount: mentionPaths === void 0 ? "no-fileOpen" : mentionPaths.length,
|
|
63150
|
-
mentionSample: mentionPaths === void 0 ? [] : mentionPaths.slice(0, 6)
|
|
63980
|
+
mentionSample: mentionPaths === void 0 ? [] : mentionPaths.slice(0, 6),
|
|
63981
|
+
approvalWired: view.pendingApproval !== null,
|
|
63982
|
+
approvalNow: pendingApproval === void 0 ? "none" : pendingApproval.key,
|
|
63983
|
+
questionsWired: view.pendingQuestions !== null,
|
|
63984
|
+
questionsNow: pendingQuestions === null ? "none" : pendingQuestions.callId
|
|
63151
63985
|
});
|
|
63152
63986
|
console.log("[preview] turnsDetail", turnsDetail);
|
|
63153
63987
|
}, [
|
|
@@ -63159,7 +63993,10 @@ window.__ModuleLoader__.load({
|
|
|
63159
63993
|
deliverFiles,
|
|
63160
63994
|
onOpenFile,
|
|
63161
63995
|
fileOpen,
|
|
63162
|
-
store
|
|
63996
|
+
store,
|
|
63997
|
+
view,
|
|
63998
|
+
pendingApproval,
|
|
63999
|
+
pendingQuestions
|
|
63163
64000
|
]);
|
|
63164
64001
|
const tailFacts = (0, react$1.useMemo)(() => keyed && store !== void 0 ? buildTurnTailFacts({
|
|
63165
64002
|
order,
|
|
@@ -63191,7 +64028,7 @@ window.__ModuleLoader__.load({
|
|
|
63191
64028
|
key: "bodyFooter",
|
|
63192
64029
|
className: "dshpc-sv-body-footer"
|
|
63193
64030
|
}, props.bodyFooter);
|
|
63194
|
-
const renderNode = (0, react$1.useCallback)((node, turnProcess, groupPart) => renderKeyedNode(node, turnProcess, tt, onBranchAt, fileOpen, groupPart, deliverFiles, lastTailTurn, lastTailChangesSeq, sessionId, props.onOpenReview, tailFacts, props.view.loadImage, bodyFooterRow, footerAnchorKey), [
|
|
64031
|
+
const renderNode = (0, react$1.useCallback)((node, turnProcess, groupPart) => renderKeyedNode(node, turnProcess, tt, onBranchAt, fileOpen, groupPart, deliverFiles, lastTailTurn, lastTailChangesSeq, sessionId, props.onOpenReview, tailFacts, props.view.loadImage, bodyFooterRow, footerAnchorKey, sessionSnap?.running === true, order[order.length - 1]), [
|
|
63195
64032
|
tt,
|
|
63196
64033
|
onBranchAt,
|
|
63197
64034
|
fileOpen,
|
|
@@ -63203,14 +64040,18 @@ window.__ModuleLoader__.load({
|
|
|
63203
64040
|
tailFacts,
|
|
63204
64041
|
props.view.loadImage,
|
|
63205
64042
|
bodyFooterRow,
|
|
63206
|
-
footerAnchorKey
|
|
64043
|
+
footerAnchorKey,
|
|
64044
|
+
sessionSnap?.running,
|
|
64045
|
+
order
|
|
63207
64046
|
]);
|
|
63208
64047
|
const isTurnClosed = (0, react$1.useCallback)((turn) => (turns?.get(turn) ?? turns?.get(String(turn)))?.status !== "open", [turns]);
|
|
63209
|
-
const
|
|
64048
|
+
const presentationMode = props.presentationMode ?? "detailed";
|
|
64049
|
+
const groupedView = (0, react$1.useMemo)(() => keyed ? buildProcessGroups(order, (key) => store?.get(key), isTurnClosed, presentationMode) : void 0, [
|
|
63210
64050
|
keyed,
|
|
63211
64051
|
order,
|
|
63212
64052
|
store,
|
|
63213
|
-
isTurnClosed
|
|
64053
|
+
isTurnClosed,
|
|
64054
|
+
presentationMode
|
|
63214
64055
|
]);
|
|
63215
64056
|
const runningStartTime = (0, react$1.useMemo)(() => {
|
|
63216
64057
|
if (!keyed || store === void 0) return void 0;
|
|
@@ -63240,6 +64081,20 @@ window.__ModuleLoader__.load({
|
|
|
63240
64081
|
console.info(`[dsh-plugin-core:session] 官方 ui-chat 模块数=${officialCount};类名样例 frame=${officialClass("ChatView", "frame")} flowItem=${officialClass("ChatView", "flowItem")} trigger=${officialClass("TurnTriggerNodeView", "root")} turnProcess=${officialClass("TurnProcessNodeView", "root")} tail=${officialClass("TurnTailNodeView", "root")}`);
|
|
63241
64082
|
if (officialCount === 0) console.warn("[dsh-plugin-core:session] 未发现官方 ui-chat 样式模块 ⇒ 弹窗观感退回自绘样式(功能不受影响)");
|
|
63242
64083
|
}
|
|
64084
|
+
if (keyed && store !== void 0 && !tailKindsWarned) {
|
|
64085
|
+
tailKindsWarned = true;
|
|
64086
|
+
const counts = /* @__PURE__ */ new Map();
|
|
64087
|
+
for (const key of order) {
|
|
64088
|
+
const kind = store.get(key)?.kind ?? "?";
|
|
64089
|
+
counts.set(kind, (counts.get(kind) ?? 0) + 1);
|
|
64090
|
+
}
|
|
64091
|
+
const tail = order.slice(-4).map((key) => {
|
|
64092
|
+
const node = store.get(key);
|
|
64093
|
+
const data = node?.data;
|
|
64094
|
+
return node === void 0 ? "?" : `${node.kind}${data?.status === void 0 ? "" : `(${data.status})`}`;
|
|
64095
|
+
});
|
|
64096
|
+
console.info(`[dsh-plugin-core:session] 会话 running=${sessionSnap?.running === true};末 4 个=${tail.join(" | ")};全流=${[...counts].map(([kind, count]) => `${kind}×${count}`).join(" ")}`);
|
|
64097
|
+
}
|
|
63243
64098
|
const openState = sessionSnap?.openState;
|
|
63244
64099
|
const showLoadOlder = sessionSnap?.hasMore !== false;
|
|
63245
64100
|
const runningRow = sessionSnap?.running !== true ? null : (0, react$1.createElement)(RunningStatusMirror, {
|
|
@@ -63275,7 +64130,7 @@ window.__ModuleLoader__.load({
|
|
|
63275
64130
|
const flowChildren = Array.isArray(body) ? body : [body];
|
|
63276
64131
|
const customHeader = props.header !== void 0;
|
|
63277
64132
|
const archivedBadge = isArchived ? (0, react$1.createElement)("span", { className: "dshpc-sv-archived" }, (0, react$1.createElement)(official_exports.IconArchiveOutlineRegular, { size: 12 }), tt("sessionArchived")) : void 0;
|
|
63278
|
-
const continueAction = showContinue ? (0, react$1.createElement)(Button$
|
|
64133
|
+
const continueAction = showContinue ? (0, react$1.createElement)(Button$4, {
|
|
63279
64134
|
variant: "outline",
|
|
63280
64135
|
size: "sm",
|
|
63281
64136
|
disabled: forking,
|
|
@@ -63291,6 +64146,49 @@ window.__ModuleLoader__.load({
|
|
|
63291
64146
|
}
|
|
63292
64147
|
}, tt("continueBranch")) : void 0;
|
|
63293
64148
|
const headActions = continueAction === void 0 && props.headerActions === void 0 && !(customHeader && archivedBadge !== void 0) ? void 0 : (0, react$1.createElement)(react$1.Fragment, null, customHeader ? archivedBadge : null, props.headerActions, continueAction);
|
|
64149
|
+
const pendingQuestionsView = (0, react$1.useMemo)(() => pendingQuestions ?? pendingQuestionsFromNodes(order, (key) => store?.get(key)), [
|
|
64150
|
+
pendingQuestions,
|
|
64151
|
+
order,
|
|
64152
|
+
store
|
|
64153
|
+
]);
|
|
64154
|
+
const questionItems = liveQuestion !== void 0 ? liveQuestion.questions : pendingQuestionsView === null ? null : pendingQuestionsView.questions;
|
|
64155
|
+
const revealPendingQuestion = view.revealPendingQuestion;
|
|
64156
|
+
const questionCallId = pendingQuestionsView?.callId;
|
|
64157
|
+
const questionState = pendingQuestionsView?.state;
|
|
64158
|
+
const revealedQuestionRef = (0, react$1.useRef)(null);
|
|
64159
|
+
const dismissedQuestionRef = (0, react$1.useRef)(null);
|
|
64160
|
+
(0, react$1.useEffect)(() => {
|
|
64161
|
+
if (liveQuestion !== void 0 || questionCallId === void 0) return;
|
|
64162
|
+
if (dismissedQuestionRef.current === questionCallId || revealedQuestionRef.current === questionCallId) return;
|
|
64163
|
+
revealedQuestionRef.current = questionCallId;
|
|
64164
|
+
if (revealPendingQuestion?.(questionCallId) === true || questionReadOnlyWarned) return;
|
|
64165
|
+
questionReadOnlyWarned = true;
|
|
64166
|
+
console.info(`[dsh-plugin-core:session] 题面板只读(无活体载体):preview=${pendingQuestions === null ? "chat 快照" : "userQuestions 投影"},state=${questionState ?? "—"};官方那边这张卡已经不在(refresh / 后台委托 / 宿主动过),任何客户端都没有可作答通道`);
|
|
64167
|
+
}, [
|
|
64168
|
+
liveQuestion,
|
|
64169
|
+
revealPendingQuestion,
|
|
64170
|
+
questionCallId,
|
|
64171
|
+
pendingQuestions,
|
|
64172
|
+
questionState
|
|
64173
|
+
]);
|
|
64174
|
+
const questionWiring = liveQuestion === void 0 ? null : questionPanelWiring(liveQuestion);
|
|
64175
|
+
const questionDismissed = liveQuestion === void 0 && questionCallId !== void 0 && dismissedQuestionRef.current === questionCallId;
|
|
64176
|
+
const questionRow = questionItems === null || questionDismissed ? null : (0, react$1.createElement)("div", { className: "dshpc-sv-question" }, (0, react$1.createElement)(QuestionPanel, {
|
|
64177
|
+
panelKey: liveQuestion !== void 0 ? liveQuestion.key : questionCallId,
|
|
64178
|
+
questions: questionItems,
|
|
64179
|
+
...questionWiring ?? { card: { state: questionState ?? "open" } },
|
|
64180
|
+
...questionWiring?.dismiss === void 0 || questionCallId === void 0 ? {} : { dismiss: () => {
|
|
64181
|
+
dismissedQuestionRef.current = questionCallId;
|
|
64182
|
+
return questionWiring.dismiss?.();
|
|
64183
|
+
} },
|
|
64184
|
+
t: tt
|
|
64185
|
+
}));
|
|
64186
|
+
const approvalRow = pendingApproval === void 0 ? null : (0, react$1.createElement)("div", { className: "dshpc-sv-approval" }, (0, react$1.createElement)(ApprovalPanelMirror, {
|
|
64187
|
+
approval: pendingApproval,
|
|
64188
|
+
command: approvalCommand(order, (key) => store?.get(key), pendingApproval.callId),
|
|
64189
|
+
t: tt
|
|
64190
|
+
}));
|
|
64191
|
+
const hasCard = questionRow !== null || approvalRow !== null;
|
|
63294
64192
|
return (0, react$1.createElement)(react$1.Fragment, null, (0, react$1.createElement)(Modal, {
|
|
63295
64193
|
size: "lg",
|
|
63296
64194
|
header: props.header,
|
|
@@ -63300,7 +64198,8 @@ window.__ModuleLoader__.load({
|
|
|
63300
64198
|
headerActions: headActions,
|
|
63301
64199
|
onClose,
|
|
63302
64200
|
translate: tt,
|
|
63303
|
-
|
|
64201
|
+
footerDivider: !hasCard,
|
|
64202
|
+
footer: onContinue === void 0 && !hasCard ? void 0 : (0, react$1.createElement)("div", { className: "dshpc-sv-foot" }, questionRow, approvalRow, onContinue === void 0 || pendingApproval !== void 0 ? null : (0, react$1.createElement)("div", { className: "dshpc-sv-composer" }, (0, react$1.createElement)("textarea", {
|
|
63304
64203
|
value: draft,
|
|
63305
64204
|
placeholder: tt("composerPlaceholder"),
|
|
63306
64205
|
disabled: sending,
|
|
@@ -63313,12 +64212,12 @@ window.__ModuleLoader__.load({
|
|
|
63313
64212
|
onSend();
|
|
63314
64213
|
}
|
|
63315
64214
|
}
|
|
63316
|
-
}), (0, react$1.createElement)(Button$
|
|
64215
|
+
}), (0, react$1.createElement)(Button$4, {
|
|
63317
64216
|
variant: "primary",
|
|
63318
64217
|
size: "sm",
|
|
63319
64218
|
disabled: sending || draft.trim() === "",
|
|
63320
64219
|
onClick: onSend
|
|
63321
|
-
}, sending ? tt("forkWorking") : tt("confirm")), (0, react$1.createElement)("span", { className: "dshpc-sv-composer-hint" }, "⌘/Ctrl + ↵"), sendErr !== null ? (0, react$1.createElement)("div", { className: "dshpc-sv-forkerr" }, sendErr) : null)
|
|
64220
|
+
}, sending ? tt("forkWorking") : tt("confirm")), (0, react$1.createElement)("span", { className: "dshpc-sv-composer-hint" }, "⌘/Ctrl + ↵"), sendErr !== null ? (0, react$1.createElement)("div", { className: "dshpc-sv-forkerr" }, sendErr) : null))
|
|
63322
64221
|
}, (0, react$1.createElement)("div", {
|
|
63323
64222
|
className: "dshpc-sv",
|
|
63324
64223
|
ref: flowRef
|
|
@@ -63329,7 +64228,7 @@ window.__ModuleLoader__.load({
|
|
|
63329
64228
|
},
|
|
63330
64229
|
title: tt("forkConfirmTitle"),
|
|
63331
64230
|
translate: tt,
|
|
63332
|
-
footer: [(0, react$1.createElement)(Button$
|
|
64231
|
+
footer: [(0, react$1.createElement)(Button$4, {
|
|
63333
64232
|
key: "cancel",
|
|
63334
64233
|
variant: "outline",
|
|
63335
64234
|
className: modalActionClass,
|
|
@@ -63337,7 +64236,7 @@ window.__ModuleLoader__.load({
|
|
|
63337
64236
|
onClick: () => {
|
|
63338
64237
|
setForkTarget(null);
|
|
63339
64238
|
}
|
|
63340
|
-
}, tt("cancel")), (0, react$1.createElement)(Button$
|
|
64239
|
+
}, tt("cancel")), (0, react$1.createElement)(Button$4, {
|
|
63341
64240
|
key: "accept",
|
|
63342
64241
|
variant: "primary",
|
|
63343
64242
|
className: modalActionClass,
|
|
@@ -63347,7 +64246,7 @@ window.__ModuleLoader__.load({
|
|
|
63347
64246
|
}, (0, react$1.createElement)("p", { className: "dshpc-sv-forktext" }, tt("forkConfirmText")), canFork ? null : (0, react$1.createElement)("p", { className: "dshpc-sv-forkerr" }, tt("forkUnavailable")), forkErr !== null ? (0, react$1.createElement)("p", { className: "dshpc-sv-forkerr" }, tt("forkFailed", { error: forkErr })) : null));
|
|
63348
64247
|
}
|
|
63349
64248
|
//#endregion
|
|
63350
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
64249
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/session/open-review.js
|
|
63351
64250
|
/**
|
|
63352
64251
|
* 在右侧分栏打开某次改动的 diff(`ChangedFilesCard` → `onOpenReview` 的落点)。
|
|
63353
64252
|
*
|
|
@@ -63374,7 +64273,37 @@ window.__ModuleLoader__.load({
|
|
|
63374
64273
|
return handle;
|
|
63375
64274
|
}
|
|
63376
64275
|
//#endregion
|
|
63377
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
64276
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/session/pending-approval.js
|
|
64277
|
+
/**
|
|
64278
|
+
* 订阅某个会话的待审批请求。能力缺席(没有 uiSession / 没 active 快照面)返回 null ⇒ 弹窗不画卡。
|
|
64279
|
+
* @param uiSession - 宿主 client 服务 `uiSession`。
|
|
64280
|
+
* @param sessionId - 预览中的会话 id。
|
|
64281
|
+
*/
|
|
64282
|
+
function openPendingApproval(uiSession, sessionId) {
|
|
64283
|
+
const status = uiSession?.sessionStatus;
|
|
64284
|
+
if (status === void 0 || typeof status.getSnapshot !== "function" || typeof status.subscribe !== "function") return null;
|
|
64285
|
+
const read = () => {
|
|
64286
|
+
try {
|
|
64287
|
+
return approvalFace(status.getSnapshot().get(sessionId)?.pendingInteraction);
|
|
64288
|
+
} catch {
|
|
64289
|
+
return;
|
|
64290
|
+
}
|
|
64291
|
+
};
|
|
64292
|
+
return {
|
|
64293
|
+
getSnapshot: read,
|
|
64294
|
+
subscribe: (onChange) => status.subscribe(onChange)
|
|
64295
|
+
};
|
|
64296
|
+
}
|
|
64297
|
+
/** 只认 `kind === 'approval'` 且真能作答的域值(别的 pending-interaction 域一律当没有)。 */
|
|
64298
|
+
function approvalFace(value) {
|
|
64299
|
+
if (typeof value !== "object" || value === null) return void 0;
|
|
64300
|
+
const record = value;
|
|
64301
|
+
if (record.kind !== "approval" || typeof record.key !== "string" || typeof record.toolName !== "string") return void 0;
|
|
64302
|
+
if (typeof record.answer !== "function") return void 0;
|
|
64303
|
+
return value;
|
|
64304
|
+
}
|
|
64305
|
+
//#endregion
|
|
64306
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/adv/session/open-session-view.js
|
|
63378
64307
|
/** 默认 retain source(写进宿主 retainedBy;调用方可覆盖成自己的插件名)。 */
|
|
63379
64308
|
const DEFAULT_RETAIN_SOURCE = "dsh-plugin-core";
|
|
63380
64309
|
/** 投影面缺席时的稳定空快照:能力缺席按 undefined 呈现,不编造数据。 */
|
|
@@ -63384,7 +64313,7 @@ window.__ModuleLoader__.load({
|
|
|
63384
64313
|
subscribe: () => NOOP_DISPOSE
|
|
63385
64314
|
};
|
|
63386
64315
|
/** 打开只读视图:物化 binding → 探测拉尾页 → 建 chat target。会话不可解析时返回 null。 */
|
|
63387
|
-
function openSessionView(sessions, uiConversation, id, retainSource = DEFAULT_RETAIN_SOURCE) {
|
|
64316
|
+
function openSessionView(sessions, uiConversation, id, retainSource = DEFAULT_RETAIN_SOURCE, uiSession, questionPanels) {
|
|
63388
64317
|
const log = (level, msg, extra) => {
|
|
63389
64318
|
if (level === "warn") console.warn(`[dsh-plugin-core:session] ${msg}`, extra ?? "");
|
|
63390
64319
|
else console.info(`[dsh-plugin-core:session] ${msg}`);
|
|
@@ -63431,7 +64360,8 @@ window.__ModuleLoader__.load({
|
|
|
63431
64360
|
return null;
|
|
63432
64361
|
}
|
|
63433
64362
|
const session = binding.session;
|
|
63434
|
-
const
|
|
64363
|
+
const projections = session.projections;
|
|
64364
|
+
const inbox = projections?.faceOf?.("inbox") ?? EMPTY_INBOX_FACE;
|
|
63435
64365
|
try {
|
|
63436
64366
|
const opened = session.open?.();
|
|
63437
64367
|
if (opened !== void 0 && typeof opened.catch === "function") opened.catch((err) => log("warn", `session.open(${id}) 失败(仅影响历史加载,不阻断弹窗)`, err));
|
|
@@ -63456,10 +64386,26 @@ window.__ModuleLoader__.load({
|
|
|
63456
64386
|
const imageUrl = uiConversation.imageUrl;
|
|
63457
64387
|
const peekImageUrl = uiConversation.peekImageUrl;
|
|
63458
64388
|
const loadImage = imageUrl === void 0 ? void 0 : Object.assign((attachment) => imageUrl.call(uiConversation, id, attachment), { peek: (attachment) => peekImageUrl?.call(uiConversation, id, attachment) });
|
|
64389
|
+
const pendingApproval = openPendingApproval(uiSession, id);
|
|
64390
|
+
const pendingQuestion = openLiveQuestion(uiSession, id);
|
|
64391
|
+
const pendingQuestions = openPendingQuestions(projections);
|
|
64392
|
+
const revealPendingQuestion = questionPanels === void 0 ? null : (callId) => {
|
|
64393
|
+
try {
|
|
64394
|
+
return questionPanels.reveal(id, callId) === true;
|
|
64395
|
+
} catch (err) {
|
|
64396
|
+
log("warn", `userQuestionPanels.reveal(${id}, ${callId}) 抛错`, err);
|
|
64397
|
+
return false;
|
|
64398
|
+
}
|
|
64399
|
+
};
|
|
64400
|
+
if (pendingQuestions === null) log("warn", projections === void 0 ? `题卡未接线:session.projections 不存在(会话 ${id})` : `题卡未接线:projections 存在但 faceOf('userQuestions') 不可用(会话 ${id})`);
|
|
63459
64401
|
return {
|
|
63460
64402
|
target,
|
|
63461
64403
|
session,
|
|
63462
64404
|
inbox,
|
|
64405
|
+
pendingApproval,
|
|
64406
|
+
pendingQuestion,
|
|
64407
|
+
pendingQuestions,
|
|
64408
|
+
revealPendingQuestion,
|
|
63463
64409
|
...loadImage === void 0 ? {} : { loadImage },
|
|
63464
64410
|
dispose: releaseRef,
|
|
63465
64411
|
loadOlder() {
|
|
@@ -64827,7 +65773,7 @@ body[data-ds-dark-theme]{
|
|
|
64827
65773
|
* 宽度三件(width/minWidth/maxWidth)核心已支持:给 maxWidth + 纯文字 ⇒ 核心自动省略号 +
|
|
64828
65774
|
* hover 跑马灯,本层原样透传,别再自己写截断。 */
|
|
64829
65775
|
function Button(props) {
|
|
64830
|
-
return (0, react$1.createElement)(Button$
|
|
65776
|
+
return (0, react$1.createElement)(Button$4, {
|
|
64831
65777
|
variant: props.variant,
|
|
64832
65778
|
size: props.size ?? "md",
|
|
64833
65779
|
icon: props.icon,
|
|
@@ -67453,7 +68399,7 @@ body[data-ds-dark-theme]{
|
|
|
67453
68399
|
}, ...slots.map(labelOf)))), partial);
|
|
67454
68400
|
}
|
|
67455
68401
|
//#endregion
|
|
67456
|
-
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.
|
|
68402
|
+
//#region ../../node_modules/.pnpm/dsh-plugin-core@0.35.25_@babel+runtime@8.0.8_@codemirror+autocomplete@6.20.4_@codemirro_1f9230727110a5d3dbadb356da9e7701/node_modules/dsh-plugin-core/dist/ui/inputs/CodeEditor.js
|
|
67457
68403
|
/**
|
|
67458
68404
|
* CodeEditor —— 可编辑的 CodeMirror 控件(录入类)。
|
|
67459
68405
|
*
|
|
@@ -68909,7 +69855,7 @@ body[data-ds-dark-theme]{
|
|
|
68909
69855
|
variant: "outline",
|
|
68910
69856
|
size: "md",
|
|
68911
69857
|
onClick: onBack
|
|
68912
|
-
}, `← ${t("backToConversation")}`), (0, react$1.createElement)("div", { style: titleStyle }, t("panelTitle"), (0, react$1.createElement)("span", { style: buildTagStyle }, `v0.2.
|
|
69858
|
+
}, `← ${t("backToConversation")}`), (0, react$1.createElement)("div", { style: titleStyle }, t("panelTitle"), (0, react$1.createElement)("span", { style: buildTagStyle }, `v0.2.3 261112-072722-538`))), (0, react$1.createElement)("div", { style: {
|
|
68913
69859
|
display: "flex",
|
|
68914
69860
|
alignItems: "center",
|
|
68915
69861
|
gap: "var(--dtl-space-3)"
|
|
@@ -69095,7 +70041,7 @@ body[data-ds-dark-theme]{
|
|
|
69095
70041
|
}, props.label), props.overridden ? (0, react$1.createElement)(Chip, {
|
|
69096
70042
|
tone: "neutral",
|
|
69097
70043
|
size: "xs"
|
|
69098
|
-
}, props.overriddenLabel) : null, props.overridden ? (0, react$1.createElement)(Button$
|
|
70044
|
+
}, props.overriddenLabel) : null, props.overridden ? (0, react$1.createElement)(Button$4, {
|
|
69099
70045
|
variant: "link",
|
|
69100
70046
|
size: "sm",
|
|
69101
70047
|
disabled: props.disabled,
|
|
@@ -69103,7 +70049,7 @@ body[data-ds-dark-theme]{
|
|
|
69103
70049
|
}, props.resetLabel) : null), props.control, (0, react$1.createElement)("p", { className: "dtl-config__hint" }, props.hint));
|
|
69104
70050
|
}
|
|
69105
70051
|
/** 一个小外链按钮(图标 + 文案,核心 Button)。 */
|
|
69106
|
-
const linkButton = (label, url) => (0, react$1.createElement)(Button$
|
|
70052
|
+
const linkButton = (label, url) => (0, react$1.createElement)(Button$4, {
|
|
69107
70053
|
size: "lg",
|
|
69108
70054
|
variant: "outline",
|
|
69109
70055
|
icon: (0, react$1.createElement)(_deepseek_ai_dsh_client_ui_primitives.IconLinkOutlineRegular, { size: 16 }),
|
|
@@ -69177,7 +70123,7 @@ body[data-ds-dark-theme]{
|
|
|
69177
70123
|
if (picked !== mode) props.edit(ENTRY_MODE_FIELD, picked);
|
|
69178
70124
|
}
|
|
69179
70125
|
})
|
|
69180
|
-
})), (0, react$1.createElement)("div", { className: "dtl-config__row" }, (0, react$1.createElement)(Button$
|
|
70126
|
+
})), (0, react$1.createElement)("div", { className: "dtl-config__row" }, (0, react$1.createElement)(Button$4, {
|
|
69181
70127
|
variant: "primary",
|
|
69182
70128
|
size: "lg",
|
|
69183
70129
|
disabled: !state.dirty || state.invalid || state.saving,
|