dsh-ds-balance 3.2.0 → 3.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -96,7 +96,7 @@ The ring itself is "what is going on right now", five states you can tell apart
96
96
  | Arc length | The balance as a share of that currency's **warning threshold**, capped at a full circle |
97
97
  | Colour | State only (normal / low / critical), never the amount; the **critical threshold only sets the colour** and takes no part in drawing the ring |
98
98
  | The mark in the middle | **+** means not connected yet; go configure; **cross** means no usable number here — it could not be read, or it was read but the account cannot be used |
99
- | Hover text | The **amount** when the number is trustworthy, that state's own line otherwise; collapsed and expanded say the same sentence |
99
+ | Hover text | The **amount** when the number is trustworthy, that state's own line otherwise; collapsed and expanded say the same sentence, and anywhere on the button shows it |
100
100
  | The source bracket | To the right of the popover title: which credential this number came from — a head-and-tail mask such as `sk-cf08d*****3b84`, or the signed-in account's name |
101
101
  | Data freshness | The "how long ago" in the popover, counted from the moment the data arrived |
102
102
  | Manual refresh | Cooldown applies; the cooldown restarts when the refresh finishes, and the seconds on the popover are the real ones left |
package/README_zh.md CHANGED
@@ -96,7 +96,7 @@
96
96
  | 弧长 | 余额占该币种**预警线**的比例,满格封顶一整圈 |
97
97
  | 颜色 | 只表示状态(正常 / 偏低 / 告急),与金额大小无关;**告急线只决定颜色**,不参与画环 |
98
98
  | 中心记号 | **+** 是还没接入,去配置;**叉**是这里没有可用的数字 —— 读不到,或者读到了但账户不能用 |
99
- | 悬停提示 | 数字可信时显示**金额**,其余情况显示这个状态自己的话;收起态与展开态说的是同一句 |
99
+ | 悬停提示 | 数字可信时显示**金额**,其余情况显示这个状态自己的话;收起态与展开态说的是同一句,且停在按钮的任意位置都会显示 |
100
100
  | 来源括号 | 浮层标题右侧:这份数字用的是**哪一份凭据** —— 首尾片段掩码如 `sk-cf08d*****3b84`,或已登录账号的名字 |
101
101
  | 数据新鲜度 | 浮层里的「多久之前」,从收到数据的时刻算起 |
102
102
  | 手动刷新 | 带冷却,冷却从刷完那一刻重新计时,浮层上的秒数就是真实剩余 |
package/lib/client.js CHANGED
@@ -2148,6 +2148,7 @@ function BalancePopover(props) {
2148
2148
  type: "button",
2149
2149
  className: BalancePopover_default.refresh,
2150
2150
  "aria-label": refreshLabel,
2151
+ "aria-busy": refreshing || void 0,
2151
2152
  disabled: refreshing || cooling,
2152
2153
  "data-refreshing": refreshing || void 0,
2153
2154
  "data-cooling": cooling || void 0,
@@ -2188,8 +2189,7 @@ function PercentRing({
2188
2189
  state,
2189
2190
  marker = null,
2190
2191
  ratio = 1,
2191
- size = 18,
2192
- title
2192
+ size = 18
2193
2193
  }) {
2194
2194
  const clamped = Number.isFinite(ratio) ? Math.min(1, Math.max(0, ratio)) : 1;
2195
2195
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
@@ -2203,7 +2203,6 @@ function PercentRing({
2203
2203
  "aria-hidden": "true",
2204
2204
  focusable: "false",
2205
2205
  children: [
2206
- title === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("title", { children: title }),
2207
2206
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("circle", { className: PercentRing_default.track, cx: CENTER, cy: CENTER, r: RADIUS }),
2208
2207
  state === "ongoing" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("g", { className: PercentRing_default.spin, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
2209
2208
  "circle",
@@ -2556,14 +2555,14 @@ function SidebarBalance({
2556
2555
  state: ring.state,
2557
2556
  marker: ring.marker,
2558
2557
  ratio: ringRatio,
2559
- size: 24,
2560
- title: hoverText ?? void 0
2558
+ size: 24
2561
2559
  }
2562
2560
  )
2563
2561
  }
2564
2562
  );
2563
+ const hoverableTrigger = hoverText === null ? trigger : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_dsh_client_ui_primitives5.Tooltip, { label: hoverText, side: "right", delayMs: 500, disabled: open, children: trigger });
2565
2564
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { ref: rootRef, className: SidebarBalance_default.root, "data-mode": wide ? "wide" : "rail", tabIndex: -1, children: [
2566
- wide && hoverText !== null ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_dsh_client_ui_primitives5.Tooltip, { label: hoverText, side: "right", delayMs: 500, disabled: open, children: trigger }) : trigger,
2565
+ hoverableTrigger,
2567
2566
  open ? (0, import_react_dom.createPortal)(
2568
2567
  /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
2569
2568
  BalancePopover,
@@ -2862,7 +2861,7 @@ function apply(ctx) {
2862
2861
  );
2863
2862
  });
2864
2863
  }
2865
- var __dsbCss = "/* src/client/settings/AccountAvatar.module.css */\n.AccountAvatar_avatar {\n box-sizing: border-box;\n flex: none;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n border-radius: 50%;\n corner-shape: round;\n overflow: hidden;\n background: var(--dsw-alias-bg-skeleton);\n}\n.AccountAvatar_image {\n display: block;\n width: 100%;\n height: 100%;\n border-radius: 50%;\n corner-shape: round;\n object-fit: cover;\n}\n\n/* src/client/settings/fields.module.css */\n.fields_group {\n display: flex;\n flex-direction: column;\n width: 100%;\n min-width: 0;\n padding: 12px 0 0;\n}\n.fields_groupHead {\n position: relative;\n display: flex;\n align-items: center;\n height: calc(24px + var(--dsh-content-font-delta, 0px));\n min-width: 0;\n color: var(--dsw-alias-label-tertiary);\n transition: color 100ms ease;\n cursor: pointer;\n}\n.fields_groupHead:hover {\n color: var(--dsw-alias-label-secondary);\n}\n.fields_groupLeading {\n position: relative;\n flex: none;\n width: calc(16px + var(--dsh-content-font-delta, 0px));\n height: calc(16px + var(--dsh-content-font-delta, 0px));\n display: inline-flex;\n align-items: center;\n justify-content: center;\n margin-right: 6px;\n}\n.fields_groupLeading svg {\n width: calc(14px + var(--dsh-content-font-delta, 0px));\n height: calc(14px + var(--dsh-content-font-delta, 0px));\n}\n.fields_groupIcon {\n display: inline-flex;\n opacity: 1;\n transition: opacity 100ms ease;\n}\n.fields_groupChevronClosed,\n.fields_groupChevronOpen {\n position: absolute;\n inset: 0;\n margin: auto;\n opacity: 0;\n pointer-events: none;\n transition: opacity 100ms ease;\n}\n.fields_groupHead[aria-expanded=false]:hover .fields_groupChevronClosed,\n.fields_groupHead[aria-expanded=false]:focus-visible .fields_groupChevronClosed,\n.fields_groupHead[aria-expanded=true]:hover .fields_groupChevronOpen,\n.fields_groupHead[aria-expanded=true]:focus-visible .fields_groupChevronOpen {\n opacity: 1;\n}\n.fields_groupHead:hover .fields_groupIcon,\n.fields_groupHead:focus-visible .fields_groupIcon {\n opacity: 0;\n}\n.fields_groupTitle {\n flex: none;\n font-size: var(--dsh-content-font-size-secondary, 13px);\n line-height: calc(24px + var(--dsh-content-font-delta, 0px));\n color: inherit;\n}\n@media (prefers-reduced-motion: reduce) {\n .fields_groupHead {\n transition: none;\n }\n .fields_groupIcon,\n .fields_groupChevronClosed,\n .fields_groupChevronOpen {\n transition: none;\n }\n}\n.fields_groupLast {\n padding-bottom: 12px;\n}\n.fields_groupNote {\n margin: 4px 0 0;\n font-size: 12px;\n line-height: 1.5;\n color: var(--dsw-alias-label-tertiary);\n}\n.fields_fields {\n display: flex;\n flex-direction: column;\n}\n.fields_fields > * + * {\n border-top: 0.5px solid var(--dsw-alias-border-l2);\n}\n.fields_details {\n border-top: 0.5px solid var(--dsw-alias-border-l2);\n margin-top: 12px;\n padding-top: 12px;\n}\n.fields_detailsBody {\n padding-top: 10px;\n}\n.fields_source {\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 12px 0;\n}\n.fields_sourceHead {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n.fields_dot {\n box-sizing: border-box;\n display: inline-block;\n flex: none;\n width: 8px;\n height: 8px;\n border-radius: 50%;\n corner-shape: round;\n}\n.fields_dotOk {\n background: var(--dsw-alias-state-success-primary);\n}\n.fields_dotMissing {\n background: var(--dsw-alias-state-error-primary);\n}\n.fields_sourceName {\n flex: none;\n font-size: 13px;\n font-weight: 500;\n line-height: 1.5;\n color: var(--dsw-alias-label-primary);\n}\n.fields_sourceSlot {\n flex: 1 1 auto;\n min-width: 0;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: 6px;\n}\n.fields_sourceIdentity,\n.fields_sourceLiveText {\n min-width: 0;\n font-size: 12px;\n line-height: 1.5;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n color: var(--dsw-alias-label-tertiary);\n}\n.fields_sourceIdentityMono {\n font-family:\n ui-monospace,\n SFMono-Regular,\n Menlo,\n Consolas,\n monospace;\n}\n.fields_sourceLive {\n flex: 0 1 auto;\n min-width: 0;\n display: inline-flex;\n align-items: center;\n gap: 4px;\n}\n.fields_sourceLiveIcon {\n flex: none;\n}\n.fields_sourceDetail {\n margin: 0;\n font-size: 12px;\n line-height: 1.5;\n color: var(--dsw-alias-label-secondary);\n}\n.fields_field {\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 12px 0;\n}\n.fields_row {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 12px 0;\n}\n.fields_rowText {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 4px;\n padding-right: 48px;\n}\n.fields_rowTitleLine {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n.fields_rowTitle {\n flex: 1;\n min-width: 0;\n font-size: 13px;\n font-weight: 500;\n line-height: 1.5;\n color: var(--dsw-alias-label-primary);\n}\n.fields_head {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n.fields_label {\n flex: 1;\n min-width: 0;\n font-size: 13px;\n font-weight: 500;\n line-height: 1.5;\n color: var(--dsw-alias-label-primary);\n}\n.fields_badges {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n}\n.fields_reset {\n border: none;\n background: none;\n padding: 0;\n font: inherit;\n font-size: 12px;\n line-height: 1.5;\n color: var(--dsw-alias-label-secondary);\n cursor: pointer;\n}\n.fields_reset:hover:not(:disabled) {\n color: var(--dsw-alias-label-primary);\n}\n.fields_reset:disabled {\n cursor: default;\n}\n.fields_inputStatic,\n.fields_inputStatic:hover {\n pointer-events: none;\n}\n.fields_inputStatic input,\n.fields_inputStatic input:hover,\n.fields_inputStatic input:focus,\n.fields_inputStatic input:focus-visible,\n.fields_inputStatic input:active {\n border-color: var(--dsw-alias-border-l4);\n background: var(--dsw-alias-bg-layer-3);\n outline: none;\n box-shadow: none;\n cursor: default;\n}\n.fields_inputInvalid input {\n border: 1px solid var(--dsw-alias-state-error-primary);\n}\n.fields_inputInvalid input:focus-visible {\n border-color: var(--dsw-alias-brand-primary);\n}\n.fields_inputWithAction {\n position: relative;\n display: flex;\n align-items: center;\n}\n.fields_inputWithAction .fields_input,\n.fields_inputWithAction .fields_inputInvalid {\n padding-right: 38px;\n}\n.fields_reveal {\n position: absolute;\n right: 4px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 26px;\n height: 26px;\n padding: 0;\n border: none;\n border-radius: 50%;\n corner-shape: round;\n background: transparent;\n color: var(--dsw-alias-label-tertiary);\n cursor: pointer;\n}\n.fields_reveal:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover);\n color: var(--dsw-alias-label-secondary);\n}\n.fields_revealOn {\n color: var(--dsw-alias-label-primary);\n}\n.fields_reveal:disabled {\n cursor: default;\n opacity: 0.4;\n}\n.fields_selectorAnchor {\n flex: none;\n}\n.fields_selector {\n display: inline-flex;\n align-items: center;\n gap: 12px;\n flex: none;\n max-width: 100%;\n height: 36px;\n padding: 0 14px;\n border: none;\n border-radius: var(--dsw-radius-md);\n background: var(--dsw-alias-bg-module-platform);\n font: inherit;\n font-size: 14px;\n line-height: 22px;\n color: var(--dsw-alias-label-primary);\n text-align: left;\n cursor: pointer;\n}\n.fields_selector:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n.fields_selector:disabled {\n color: var(--dsw-alias-label-tertiary);\n cursor: default;\n}\n.fields_selectorChevron {\n flex: none;\n}\n.fields_hint {\n margin: 0;\n font-size: 12px;\n line-height: 1.5;\n color: var(--dsw-alias-label-tertiary);\n}\n.fields_pairNote {\n display: flex;\n align-items: center;\n gap: 6px;\n margin: 0;\n font-size: 12px;\n line-height: 1.5;\n color: var(--dsw-alias-state-warn-primary);\n}\n.fields_pairNote::before {\n content: \"\";\n flex: none;\n width: 5px;\n height: 5px;\n border-radius: 50%;\n corner-shape: round;\n background: currentColor;\n}\n.fields_invalid {\n margin: 0;\n font-size: 12px;\n line-height: 1.5;\n color: var(--dsw-alias-state-error-primary);\n}\n.fields_actions {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n/* src/client/settings/BalanceSettingsCard.module.css */\n.BalanceSettingsCard_form {\n display: flex;\n flex-direction: column;\n}\n.BalanceSettingsCard_readOnly {\n margin: 0 0 12px;\n font-size: 12px;\n line-height: 1.5;\n color: var(--dsw-alias-label-tertiary);\n}\n.BalanceSettingsCard_footer {\n display: flex;\n align-items: center;\n gap: 8px;\n padding-top: 16px;\n}\n.BalanceSettingsCard_save {\n appearance: none;\n border: 1px solid transparent;\n border-radius: var(--dsw-radius-md);\n padding: 5px 14px;\n font: inherit;\n font-size: 13px;\n line-height: 1.5;\n cursor: pointer;\n background: var(--dsw-alias-label-primary);\n color: var(--dsw-alias-bg-layer-3);\n}\n.BalanceSettingsCard_save:disabled {\n opacity: 0.4;\n cursor: default;\n}\n.BalanceSettingsCard_save:focus-visible {\n outline: var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color);\n outline-offset: 1px;\n}\n.BalanceSettingsCard_failed {\n flex: 1;\n min-width: 0;\n margin: 0;\n font-size: 12px;\n line-height: 1.5;\n color: var(--dsw-alias-state-error-primary);\n}\n.BalanceSettingsCard_notice {\n flex: 1;\n min-width: 0;\n margin: 0;\n font-size: 12px;\n line-height: 1.5;\n color: var(--dsw-alias-label-tertiary);\n}\n\n/* src/client/sidebar/BalancePopover.module.css */\nsection.BalancePopover_panel {\n position: fixed;\n position-anchor: --dsb-balance-anchor;\n bottom: calc(anchor(top) + 8px);\n left: clamp(12px, anchor(left), calc(100vw - 12px - min(440px, calc(100vw - 24px))));\n max-height: calc(100dvh - 12px - max(12px, var(--dsh-frame-overlay-top, 12px))) !important;\n position-try-fallbacks: --dsb-balance-window;\n display: flex;\n flex-direction: column;\n isolation: isolate;\n z-index: 1100;\n box-sizing: border-box;\n width: max-content !important;\n height: auto !important;\n min-width: min(300px, calc(100vw - 24px));\n max-width: min(440px, calc(100vw - 24px)) !important;\n padding: 16px !important;\n margin: 0;\n border: 0;\n border-radius: var(--dsw-radius-lg) !important;\n --dsw-elevation-stroke-color: var(--dsw-alias-border-l1);\n box-shadow: var(--dsw-elevation-prominent);\n font-size: 12px;\n line-height: 18px;\n color: var(--dsw-alias-label-secondary);\n cursor: default;\n}\n.BalancePopover_body {\n min-height: 0;\n overflow-y: auto;\n overscroll-behavior: contain;\n}\n@position-try --dsb-balance-window {\n position-area: none;\n top: max(12px, var(--dsh-frame-overlay-top, 12px));\n bottom: 12px;\n max-height: none;\n align-self: safe start;\n justify-self: safe end;\n}\n.BalancePopover_panel::before {\n position: absolute;\n z-index: -1;\n inset: 0;\n border-radius: inherit;\n background: var(--dsw-specific-menu);\n backdrop-filter: var(--dsw-menu-backdrop-filter);\n content: \"\";\n pointer-events: none;\n}\n.BalancePopover_title {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 16px;\n margin-bottom: 8px;\n color: var(--dsw-alias-label-primary);\n font-weight: 500;\n}\n.BalancePopover_titleMain {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n min-width: 0;\n}\n.BalancePopover_titleLabel {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n min-width: 0;\n cursor: pointer;\n color: inherit;\n text-decoration: underline;\n text-underline-offset: 2px;\n}\n.BalancePopover_titleLabel:hover,\n.BalancePopover_titleLabel:visited {\n color: inherit;\n}\n.BalancePopover_sourceLabel {\n flex: 0 1 auto;\n min-width: 0;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n color: var(--dsw-alias-label-tertiary);\n font-weight: 400;\n}\n.BalancePopover_titleLabel svg {\n flex: none;\n width: 14px;\n height: auto;\n}\n.BalancePopover_iconButton {\n position: relative;\n flex: none;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n margin-block: -5px;\n border: none;\n border-radius: var(--dsw-radius-sm);\n padding: 0;\n background: transparent;\n cursor: pointer;\n color: var(--dsw-alias-label-secondary);\n}\n.BalancePopover_iconButton:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n.BalancePopover_iconButton:focus-visible {\n outline: var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color);\n outline-offset: -2px;\n}\n.BalancePopover_titleRule {\n margin-bottom: 10px;\n border-top: 0.5px solid var(--dsw-alias-border-l2);\n}\n.BalancePopover_details {\n display: grid;\n grid-template-columns: minmax(76px, auto) minmax(0, 1fr);\n gap: 6px 16px;\n margin: 0;\n color: var(--dsw-alias-label-tertiary);\n}\n.BalancePopover_details dt,\n.BalancePopover_details dd {\n min-width: 0;\n margin: 0;\n}\n.BalancePopover_details dd {\n color: var(--dsw-alias-label-secondary);\n font-variant-numeric: tabular-nums;\n text-align: right;\n}\n.BalancePopover_notice {\n margin-top: 12px;\n}\n.BalancePopover_noticeText {\n margin: 0 0 8px;\n color: var(--dsw-alias-label-tertiary);\n}\n.BalancePopover_noticeActions {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 8px;\n}\n.BalancePopover_footer {\n display: flex;\n align-items: center;\n gap: 8px;\n margin-top: 12px;\n}\n.BalancePopover_updated {\n flex: none;\n color: var(--dsw-alias-label-tertiary);\n}\n.BalancePopover_status {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n text-align: right;\n color: var(--dsw-alias-label-tertiary);\n}\n.BalancePopover_refresh {\n display: inline-flex;\n flex: none;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n padding: 0;\n border: none;\n border-radius: var(--dsw-radius-sm);\n background: transparent;\n color: var(--dsw-alias-label-tertiary);\n cursor: pointer;\n}\n.BalancePopover_refresh:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover);\n color: var(--dsw-alias-label-secondary);\n}\n.BalancePopover_refresh:focus-visible {\n outline: var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color);\n outline-offset: -2px;\n}\n.BalancePopover_refresh:disabled {\n opacity: 0.4;\n cursor: default;\n}\n.BalancePopover_refresh[data-cooling] {\n color: var(--dsw-alias-label-caption);\n}\n.BalancePopover_refresh[data-refreshing] svg {\n animation: BalancePopover_balance-refresh-spin 900ms linear infinite;\n}\n@keyframes BalancePopover_balance-refresh-spin {\n to {\n transform: rotate(360deg);\n }\n}\n@media (prefers-reduced-motion: reduce) {\n .BalancePopover_refresh[data-refreshing] svg {\n animation-duration: 2400ms;\n }\n}\n\n/* src/client/sidebar/PercentRing.module.css */\n.PercentRing_ring {\n display: block;\n flex: none;\n color: var(--dsw-alias-label-tertiary);\n}\n.PercentRing_ring[data-state=done] {\n color: var(--dsw-alias-state-success-primary);\n}\n.PercentRing_ring[data-state=warning] {\n color: var(--dsw-alias-state-warn-primary);\n}\n.PercentRing_ring[data-state=error] {\n color: var(--dsw-alias-state-error-primary);\n}\n.PercentRing_ring[data-state=idle] {\n color: var(--dsw-alias-state-idle-primary);\n}\n.PercentRing_track {\n fill: none;\n stroke: var(--dsw-alias-border-l3);\n stroke-width: 1;\n}\n.PercentRing_fill {\n fill: none;\n stroke: currentColor;\n stroke-width: 1;\n stroke-linecap: round;\n}\n.PercentRing_marker {\n fill: none;\n stroke: currentColor;\n stroke-width: 1;\n stroke-linecap: round;\n}\n.PercentRing_spin {\n transform-origin: center;\n animation: PercentRing_dsb-ring-spin 1.5s linear infinite;\n}\n@keyframes PercentRing_dsb-ring-spin {\n to {\n transform: rotate(360deg);\n }\n}\n@media (prefers-reduced-motion: reduce) {\n .PercentRing_spin {\n animation: none;\n }\n}\n\n/* src/client/sidebar/SidebarBalance.module.css */\n.SidebarBalance_root {\n position: relative;\n display: flex;\n min-width: 0;\n anchor-name: --dsb-balance-anchor;\n}\n.SidebarBalance_root[data-mode=wide] {\n flex: none;\n margin: 4px 2px 0;\n}\n.SidebarBalance_root[data-mode=rail] {\n flex: none;\n margin: 8px 0 0;\n}\n.SidebarBalance_trigger {\n display: flex;\n align-items: center;\n box-sizing: border-box;\n border: none;\n background: transparent;\n color: var(--dsw-alias-label-primary);\n font-family: inherit;\n font-size: 14px;\n line-height: 22px;\n cursor: pointer;\n overflow: hidden;\n}\n.SidebarBalance_trigger:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n.SidebarBalance_trigger:focus-visible {\n outline: var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color);\n outline-offset: -2px;\n}\n.SidebarBalance_root[data-mode=wide] .SidebarBalance_trigger {\n flex: none;\n gap: 8px;\n width: 100%;\n height: 44px;\n padding: 6px;\n border-radius: var(--dsw-radius-md);\n}\n.SidebarBalance_root[data-mode=rail] .SidebarBalance_trigger {\n flex: none;\n justify-content: center;\n width: 36px;\n height: 36px;\n padding: 0;\n border-radius: var(--dsw-radius-md);\n}\n.SidebarBalance_icon {\n display: inline-flex;\n flex: none;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n}\n.SidebarBalance_label {\n flex: 0 1 auto;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.SidebarBalance_marker {\n display: inline-flex;\n flex: none;\n align-items: center;\n justify-content: center;\n color: var(--dsw-alias-label-tertiary);\n position: relative;\n top: 1.63px;\n}\n\n/* src/client/sidebar/footer-stack.module.css */\ndiv:has(> [data-slot=\"sidebar.footer.action\"]) {\n flex-direction: column;\n}\n";
2864
+ var __dsbCss = "/* src/client/settings/AccountAvatar.module.css */\n.AccountAvatar_avatar {\n box-sizing: border-box;\n flex: none;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n border-radius: 50%;\n corner-shape: round;\n overflow: hidden;\n background: var(--dsw-alias-bg-skeleton);\n}\n.AccountAvatar_image {\n display: block;\n width: 100%;\n height: 100%;\n border-radius: 50%;\n corner-shape: round;\n object-fit: cover;\n}\n\n/* src/client/settings/fields.module.css */\n.fields_group {\n display: flex;\n flex-direction: column;\n width: 100%;\n min-width: 0;\n padding: 12px 0 0;\n}\n.fields_groupHead {\n position: relative;\n display: flex;\n align-items: center;\n height: calc(24px + var(--dsh-content-font-delta, 0px));\n min-width: 0;\n color: var(--dsw-alias-label-tertiary);\n transition: color 100ms ease;\n cursor: pointer;\n}\n.fields_groupHead:hover {\n color: var(--dsw-alias-label-secondary);\n}\n.fields_groupLeading {\n position: relative;\n flex: none;\n width: calc(16px + var(--dsh-content-font-delta, 0px));\n height: calc(16px + var(--dsh-content-font-delta, 0px));\n display: inline-flex;\n align-items: center;\n justify-content: center;\n margin-right: 6px;\n}\n.fields_groupLeading svg {\n width: calc(14px + var(--dsh-content-font-delta, 0px));\n height: calc(14px + var(--dsh-content-font-delta, 0px));\n}\n.fields_groupIcon {\n display: inline-flex;\n opacity: 1;\n transition: opacity 100ms ease;\n}\n.fields_groupChevronClosed,\n.fields_groupChevronOpen {\n position: absolute;\n inset: 0;\n margin: auto;\n opacity: 0;\n pointer-events: none;\n transition: opacity 100ms ease;\n}\n.fields_groupHead[aria-expanded=false]:hover .fields_groupChevronClosed,\n.fields_groupHead[aria-expanded=false]:focus-visible .fields_groupChevronClosed,\n.fields_groupHead[aria-expanded=true]:hover .fields_groupChevronOpen,\n.fields_groupHead[aria-expanded=true]:focus-visible .fields_groupChevronOpen {\n opacity: 1;\n}\n.fields_groupHead:hover .fields_groupIcon,\n.fields_groupHead:focus-visible .fields_groupIcon {\n opacity: 0;\n}\n.fields_groupTitle {\n flex: none;\n font-size: var(--dsh-content-font-size-secondary, 13px);\n line-height: calc(24px + var(--dsh-content-font-delta, 0px));\n color: inherit;\n}\n@media (prefers-reduced-motion: reduce) {\n .fields_groupHead {\n transition: none;\n }\n .fields_groupIcon,\n .fields_groupChevronClosed,\n .fields_groupChevronOpen {\n transition: none;\n }\n}\n.fields_groupLast {\n padding-bottom: 12px;\n}\n.fields_groupNote {\n margin: 4px 0 0;\n font-size: 12px;\n line-height: 1.5;\n color: var(--dsw-alias-label-tertiary);\n}\n.fields_fields {\n display: flex;\n flex-direction: column;\n}\n.fields_fields > * + * {\n border-top: 0.5px solid var(--dsw-alias-border-l2);\n}\n.fields_details {\n border-top: 0.5px solid var(--dsw-alias-border-l2);\n margin-top: 12px;\n padding-top: 12px;\n}\n.fields_detailsBody {\n padding-top: 10px;\n}\n.fields_source {\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 12px 0;\n}\n.fields_sourceHead {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n.fields_dot {\n box-sizing: border-box;\n display: inline-block;\n flex: none;\n width: 8px;\n height: 8px;\n border-radius: 50%;\n corner-shape: round;\n}\n.fields_dotOk {\n background: var(--dsw-alias-state-success-primary);\n}\n.fields_dotMissing {\n background: var(--dsw-alias-state-error-primary);\n}\n.fields_sourceName {\n flex: none;\n font-size: 13px;\n font-weight: 500;\n line-height: 1.5;\n color: var(--dsw-alias-label-primary);\n}\n.fields_sourceSlot {\n flex: 1 1 auto;\n min-width: 0;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: 6px;\n}\n.fields_sourceIdentity,\n.fields_sourceLiveText {\n min-width: 0;\n font-size: 12px;\n line-height: 1.5;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n color: var(--dsw-alias-label-tertiary);\n}\n.fields_sourceIdentityMono {\n font-family:\n ui-monospace,\n SFMono-Regular,\n Menlo,\n Consolas,\n monospace;\n}\n.fields_sourceLive {\n flex: 0 1 auto;\n min-width: 0;\n display: inline-flex;\n align-items: center;\n gap: 4px;\n}\n.fields_sourceLiveIcon {\n flex: none;\n}\n.fields_sourceDetail {\n margin: 0;\n font-size: 12px;\n line-height: 1.5;\n color: var(--dsw-alias-label-secondary);\n}\n.fields_field {\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 12px 0;\n}\n.fields_row {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 12px 0;\n}\n.fields_rowText {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 4px;\n padding-right: 48px;\n}\n.fields_rowTitleLine {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n.fields_rowTitle {\n flex: 1;\n min-width: 0;\n font-size: 13px;\n font-weight: 500;\n line-height: 1.5;\n color: var(--dsw-alias-label-primary);\n}\n.fields_head {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n.fields_label {\n flex: 1;\n min-width: 0;\n font-size: 13px;\n font-weight: 500;\n line-height: 1.5;\n color: var(--dsw-alias-label-primary);\n}\n.fields_badges {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n}\n.fields_reset {\n border: none;\n background: none;\n padding: 0;\n font: inherit;\n font-size: 12px;\n line-height: 1.5;\n color: var(--dsw-alias-label-secondary);\n cursor: pointer;\n}\n.fields_reset:hover:not(:disabled) {\n color: var(--dsw-alias-label-primary);\n}\n.fields_reset:disabled {\n cursor: default;\n}\n.fields_inputStatic,\n.fields_inputStatic:hover {\n pointer-events: none;\n}\n.fields_inputStatic input,\n.fields_inputStatic input:hover,\n.fields_inputStatic input:focus,\n.fields_inputStatic input:focus-visible,\n.fields_inputStatic input:active {\n border-color: var(--dsw-alias-border-l4);\n background: var(--dsw-alias-bg-layer-3);\n outline: none;\n box-shadow: none;\n cursor: default;\n}\n.fields_inputInvalid input {\n border: 1px solid var(--dsw-alias-state-error-primary);\n}\n.fields_inputInvalid input:focus-visible {\n border-color: var(--dsw-alias-brand-primary);\n}\n.fields_inputWithAction {\n position: relative;\n display: flex;\n align-items: center;\n}\n.fields_inputWithAction .fields_input,\n.fields_inputWithAction .fields_inputInvalid {\n padding-right: 38px;\n}\n.fields_reveal {\n position: absolute;\n right: 4px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 26px;\n height: 26px;\n padding: 0;\n border: none;\n border-radius: 50%;\n corner-shape: round;\n background: transparent;\n color: var(--dsw-alias-label-tertiary);\n cursor: pointer;\n}\n.fields_reveal:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover);\n color: var(--dsw-alias-label-secondary);\n}\n.fields_revealOn {\n color: var(--dsw-alias-label-primary);\n}\n.fields_reveal:disabled {\n cursor: default;\n opacity: 0.4;\n}\n.fields_selectorAnchor {\n flex: none;\n}\n.fields_selector {\n display: inline-flex;\n align-items: center;\n gap: 12px;\n flex: none;\n max-width: 100%;\n height: 36px;\n padding: 0 14px;\n border: none;\n border-radius: var(--dsw-radius-md);\n background: var(--dsw-alias-bg-module-platform);\n font: inherit;\n font-size: 14px;\n line-height: 22px;\n color: var(--dsw-alias-label-primary);\n text-align: left;\n cursor: pointer;\n}\n.fields_selector:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n.fields_selector:disabled {\n color: var(--dsw-alias-label-tertiary);\n cursor: default;\n}\n.fields_selectorChevron {\n flex: none;\n}\n.fields_hint {\n margin: 0;\n font-size: 12px;\n line-height: 1.5;\n color: var(--dsw-alias-label-tertiary);\n}\n.fields_pairNote {\n display: flex;\n align-items: center;\n gap: 6px;\n margin: 0;\n font-size: 12px;\n line-height: 1.5;\n color: var(--dsw-alias-state-warn-primary);\n}\n.fields_pairNote::before {\n content: \"\";\n flex: none;\n width: 5px;\n height: 5px;\n border-radius: 50%;\n corner-shape: round;\n background: currentColor;\n}\n.fields_invalid {\n margin: 0;\n font-size: 12px;\n line-height: 1.5;\n color: var(--dsw-alias-state-error-primary);\n}\n.fields_actions {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n/* src/client/settings/BalanceSettingsCard.module.css */\n.BalanceSettingsCard_form {\n display: flex;\n flex-direction: column;\n}\n.BalanceSettingsCard_readOnly {\n margin: 0 0 12px;\n font-size: 12px;\n line-height: 1.5;\n color: var(--dsw-alias-label-tertiary);\n}\n.BalanceSettingsCard_footer {\n display: flex;\n align-items: center;\n gap: 8px;\n padding-top: 16px;\n}\n.BalanceSettingsCard_save {\n appearance: none;\n border: 1px solid transparent;\n border-radius: var(--dsw-radius-md);\n padding: 5px 14px;\n font: inherit;\n font-size: 13px;\n line-height: 1.5;\n cursor: pointer;\n background: var(--dsw-alias-label-primary);\n color: var(--dsw-alias-bg-layer-3);\n}\n.BalanceSettingsCard_save:disabled {\n opacity: 0.4;\n cursor: default;\n}\n.BalanceSettingsCard_save:focus-visible {\n outline: var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color);\n outline-offset: 1px;\n}\n.BalanceSettingsCard_failed {\n flex: 1;\n min-width: 0;\n margin: 0;\n font-size: 12px;\n line-height: 1.5;\n color: var(--dsw-alias-state-error-primary);\n}\n.BalanceSettingsCard_notice {\n flex: 1;\n min-width: 0;\n margin: 0;\n font-size: 12px;\n line-height: 1.5;\n color: var(--dsw-alias-label-tertiary);\n}\n\n/* src/client/sidebar/BalancePopover.module.css */\nsection.BalancePopover_panel {\n position: fixed;\n position-anchor: --dsb-balance-anchor;\n bottom: calc(anchor(top) + 8px);\n left: clamp(12px, anchor(left), calc(100vw - 12px - min(440px, calc(100vw - 24px))));\n max-height: calc(100dvh - 12px - max(12px, var(--dsh-frame-overlay-top, 12px))) !important;\n position-try-fallbacks: --dsb-balance-window;\n display: flex;\n flex-direction: column;\n isolation: isolate;\n z-index: 1100;\n box-sizing: border-box;\n width: max-content !important;\n height: auto !important;\n min-width: min(300px, calc(100vw - 24px));\n max-width: min(440px, calc(100vw - 24px)) !important;\n padding: 11px 16px 16px !important;\n margin: 0;\n border: 0;\n border-radius: var(--dsw-radius-lg) !important;\n --dsw-elevation-stroke-color: var(--dsw-alias-border-l1);\n box-shadow: var(--dsw-elevation-prominent);\n font-size: 12px;\n line-height: 18px;\n color: var(--dsw-alias-label-secondary);\n cursor: default;\n}\n.BalancePopover_body {\n min-height: 0;\n overflow-y: auto;\n overscroll-behavior: contain;\n}\n@position-try --dsb-balance-window {\n position-area: none;\n top: max(12px, var(--dsh-frame-overlay-top, 12px));\n bottom: 12px;\n max-height: none;\n align-self: safe start;\n justify-self: safe end;\n}\n.BalancePopover_panel::before {\n position: absolute;\n z-index: -1;\n inset: 0;\n border-radius: inherit;\n background: var(--dsw-specific-menu);\n backdrop-filter: var(--dsw-menu-backdrop-filter);\n content: \"\";\n pointer-events: none;\n}\n.BalancePopover_title {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 16px;\n margin-bottom: 3px;\n color: var(--dsw-alias-label-primary);\n font-weight: 500;\n}\n.BalancePopover_titleMain {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n min-width: 0;\n}\n.BalancePopover_titleLabel {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n min-width: 0;\n cursor: pointer;\n color: inherit;\n text-decoration: underline;\n text-underline-offset: 2px;\n}\n.BalancePopover_titleLabel:hover,\n.BalancePopover_titleLabel:visited {\n color: inherit;\n}\n.BalancePopover_sourceLabel {\n flex: 0 1 auto;\n min-width: 0;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n color: var(--dsw-alias-label-tertiary);\n font-weight: 400;\n}\n.BalancePopover_titleLabel svg {\n flex: none;\n width: 14px;\n height: auto;\n}\n.BalancePopover_iconButton {\n position: relative;\n flex: none;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n border: none;\n border-radius: var(--dsw-radius-sm);\n padding: 0;\n background: transparent;\n cursor: pointer;\n color: var(--dsw-alias-label-secondary);\n}\n.BalancePopover_iconButton:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n.BalancePopover_iconButton:focus-visible {\n outline: var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color);\n outline-offset: -2px;\n}\n.BalancePopover_titleRule {\n margin-bottom: 10px;\n border-top: 0.5px solid var(--dsw-alias-border-l2);\n}\n.BalancePopover_details {\n display: grid;\n grid-template-columns: minmax(76px, auto) minmax(0, 1fr);\n gap: 6px 16px;\n margin: 0;\n color: var(--dsw-alias-label-tertiary);\n}\n.BalancePopover_details dt,\n.BalancePopover_details dd {\n min-width: 0;\n margin: 0;\n}\n.BalancePopover_details dd {\n color: var(--dsw-alias-label-secondary);\n font-variant-numeric: tabular-nums;\n text-align: right;\n}\n.BalancePopover_notice {\n margin-top: 12px;\n}\n.BalancePopover_noticeText {\n margin: 0 0 8px;\n color: var(--dsw-alias-label-tertiary);\n}\n.BalancePopover_noticeActions {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 8px;\n}\n.BalancePopover_footer {\n display: flex;\n align-items: center;\n gap: 8px;\n margin-top: 12px;\n}\n.BalancePopover_updated {\n flex: none;\n color: var(--dsw-alias-label-tertiary);\n}\n.BalancePopover_status {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n text-align: right;\n color: var(--dsw-alias-label-tertiary);\n}\n.BalancePopover_refresh {\n display: inline-flex;\n flex: none;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n padding: 0;\n border: none;\n border-radius: var(--dsw-radius-sm);\n background: transparent;\n color: var(--dsw-alias-label-secondary);\n cursor: pointer;\n}\n.BalancePopover_refresh:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n.BalancePopover_refresh:focus-visible {\n outline: var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color);\n outline-offset: -2px;\n}\n.BalancePopover_refresh:disabled {\n opacity: 0.4;\n cursor: default;\n}\n.BalancePopover_refresh[data-cooling] {\n color: var(--dsw-alias-label-caption);\n}\n.BalancePopover_refresh[data-refreshing] svg {\n animation: BalancePopover_balance-refresh-spin 900ms linear infinite;\n}\n@keyframes BalancePopover_balance-refresh-spin {\n to {\n transform: rotate(360deg);\n }\n}\n@media (prefers-reduced-motion: reduce) {\n .BalancePopover_refresh[data-refreshing] svg {\n animation-duration: 2400ms;\n }\n}\n\n/* src/client/sidebar/PercentRing.module.css */\n.PercentRing_ring {\n display: block;\n flex: none;\n color: var(--dsw-alias-label-tertiary);\n}\n.PercentRing_ring[data-state=done] {\n color: var(--dsw-alias-state-success-primary);\n}\n.PercentRing_ring[data-state=warning] {\n color: var(--dsw-alias-state-warn-primary);\n}\n.PercentRing_ring[data-state=error] {\n color: var(--dsw-alias-state-error-primary);\n}\n.PercentRing_ring[data-state=idle] {\n color: var(--dsw-alias-state-idle-primary);\n}\n.PercentRing_track {\n fill: none;\n stroke: var(--dsw-alias-border-l3);\n stroke-width: 1;\n}\n.PercentRing_fill {\n fill: none;\n stroke: currentColor;\n stroke-width: 1;\n stroke-linecap: round;\n}\n.PercentRing_marker {\n fill: none;\n stroke: currentColor;\n stroke-width: 1;\n stroke-linecap: round;\n}\n.PercentRing_spin {\n transform-origin: center;\n animation: PercentRing_dsb-ring-spin 1.5s linear infinite;\n}\n@keyframes PercentRing_dsb-ring-spin {\n to {\n transform: rotate(360deg);\n }\n}\n@media (prefers-reduced-motion: reduce) {\n .PercentRing_spin {\n animation: none;\n }\n}\n\n/* src/client/sidebar/SidebarBalance.module.css */\n.SidebarBalance_root {\n position: relative;\n display: flex;\n min-width: 0;\n anchor-name: --dsb-balance-anchor;\n}\n.SidebarBalance_root[data-mode=wide] {\n flex: none;\n margin: 4px 2px 0;\n}\n.SidebarBalance_root[data-mode=rail] {\n flex: none;\n margin: 8px 0 0;\n}\n.SidebarBalance_trigger {\n display: flex;\n align-items: center;\n box-sizing: border-box;\n border: none;\n background: transparent;\n color: var(--dsw-alias-label-primary);\n font-family: inherit;\n font-size: 14px;\n line-height: 22px;\n cursor: pointer;\n overflow: hidden;\n}\n.SidebarBalance_trigger:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n.SidebarBalance_trigger:focus-visible {\n outline: var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color);\n outline-offset: -2px;\n}\n.SidebarBalance_root[data-mode=wide] .SidebarBalance_trigger {\n flex: none;\n gap: 8px;\n width: 100%;\n height: 44px;\n padding: 6px;\n border-radius: var(--dsw-radius-md);\n}\n.SidebarBalance_root[data-mode=rail] .SidebarBalance_trigger {\n flex: none;\n justify-content: center;\n width: 36px;\n height: 36px;\n padding: 0;\n border-radius: var(--dsw-radius-md);\n}\n.SidebarBalance_icon {\n display: inline-flex;\n flex: none;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n}\n.SidebarBalance_label {\n flex: 0 1 auto;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.SidebarBalance_marker {\n display: inline-flex;\n flex: none;\n align-items: center;\n justify-content: center;\n color: var(--dsw-alias-label-tertiary);\n position: relative;\n top: 1.63px;\n}\n\n/* src/client/sidebar/footer-stack.module.css */\ndiv:has(> [data-slot=\"sidebar.footer.action\"]) {\n flex-direction: column;\n}\n";
2866
2865
  var __dsbTagId = "dsh-ds-balance/client.css";
2867
2866
  if (typeof document !== 'undefined' && document.querySelector('style[data-plugin-css="' + __dsbTagId + '"]') === null) {
2868
2867
  var __dsbTag = document.createElement('style');
@@ -36,10 +36,10 @@ export type AppIcon = ComponentType<IconProps>;
36
36
  * 仪表盘(`IconGaugeOutlineRegular`)语义偏「量程」,不选。
37
37
  */
38
38
  export declare const GROUP_ICONS: {
39
- readonly connection: (props: IconProps) => import("react").JSX.Element;
39
+ readonly connection: (props: IconProps) => React.JSX.Element;
40
40
  readonly display: typeof CurrencyOutlineIcon;
41
- readonly thresholds: (props: IconProps) => import("react").JSX.Element;
42
- readonly refresh: (props: IconProps) => import("react").JSX.Element;
41
+ readonly thresholds: (props: IconProps) => React.JSX.Element;
42
+ readonly refresh: (props: IconProps) => React.JSX.Element;
43
43
  };
44
44
  /** 分组键,与 `BalanceSettingsCard` 的分组顺序一致。 */
45
45
  export type GroupIconKey = keyof typeof GROUP_ICONS;
@@ -57,8 +57,8 @@ export type GroupIconKey = keyof typeof GROUP_ICONS;
57
57
  * 引官方符号前先在声明下限那一档确认它存在 —— 这条规则就是这么生效的。
58
58
  */
59
59
  export declare const RESULT_ICONS: {
60
- readonly ok: (props: IconProps) => import("react").JSX.Element;
61
- readonly fail: (props: IconProps) => import("react").JSX.Element;
60
+ readonly ok: (props: IconProps) => React.JSX.Element;
61
+ readonly fail: (props: IconProps) => React.JSX.Element;
62
62
  };
63
63
  /**
64
64
  * 分组折叠头的两个箭头。
@@ -71,8 +71,8 @@ export declare const RESULT_ICONS: {
71
71
  * 的唯一出处,`fields.tsx` 只该消费它。
72
72
  */
73
73
  export declare const HEADER_CHEVRONS: {
74
- readonly closed: (props: IconProps) => import("react").JSX.Element;
75
- readonly open: (props: IconProps) => import("react").JSX.Element;
74
+ readonly closed: (props: IconProps) => React.JSX.Element;
75
+ readonly open: (props: IconProps) => React.JSX.Element;
76
76
  };
77
77
  /**
78
78
  * 选择器 pill 右端的 chevron。
@@ -87,6 +87,6 @@ export declare const SELECTOR_ICON: AppIcon;
87
87
  * 可以照引);`refresh` 与分组头的刷新同源。
88
88
  */
89
89
  export declare const POPOVER_ICONS: {
90
- readonly plugins: (props: IconProps) => import("react").JSX.Element;
91
- readonly refresh: (props: IconProps) => import("react").JSX.Element;
90
+ readonly plugins: (props: IconProps) => React.JSX.Element;
91
+ readonly refresh: (props: IconProps) => React.JSX.Element;
92
92
  };
@@ -38,12 +38,14 @@ export interface PercentRingProps {
38
38
  ratio?: number;
39
39
  /** 渲染边长(px),默认 18。 */
40
40
  size?: number;
41
- /** 可选的原生悬停提示,由 SVG 的 <title> 子元素承载。 */
42
- title?: string;
43
41
  }
44
42
  /**
45
43
  * 渲染状态圆环。
46
- * @param props - 状态、边长与可选提示。
44
+ *
45
+ * **不带悬停提示**:提示挂在外面那条触发按钮上(`SidebarBalance` 的官方 `Tooltip`),
46
+ * 锚是整条按钮的命中区而不是这个 24px 图形 —— 环若自己挂 SVG 原生 `<title>`,
47
+ * 按钮边缘那圈有悬浮灰底却没有提示,同一块悬浮区内圈外圈不一致。
48
+ * @param props - 状态、记号、弧长比例与边长。
47
49
  * @returns 圆环 svg;自身 aria-hidden,语义名由调用方的 aria-label 提供。
48
50
  */
49
- export declare function PercentRing({ state, marker, ratio, size, title, }: PercentRingProps): JSX.Element;
51
+ export declare function PercentRing({ state, marker, ratio, size, }: PercentRingProps): JSX.Element;
@@ -128,8 +128,10 @@ export declare function familyOf(situation: Situation): SituationFamily;
128
128
  * 3. 收起态还多一个「DeepSeek 余额状态 」前缀,同一个处境两态文字不同。
129
129
  *
130
130
  * 收敛到一个返回值之后,两态**不可能**再分叉 —— 这是结构保证,不是靠两处对齐。
131
- * 交付通道仍分两条(收起态走 SVG 原生 `<title>`、展开态走官方 `Tooltip` 原语),
132
- * 但那是「怎么显示」的差别,与「说什么」无关。
131
+ * 交付通道也只有一条(两态都挂官方 `Tooltip` 原语、锚是整条触发按钮):
132
+ * 文案一致还不够,**命中区**也得一致 —— 收起态从前挂 24px 的 SVG 原生 `<title>`,
133
+ * 而原生 title 的命中面就是那个 `<svg>`,于是按钮边缘那圈有悬浮灰底却不弹。
134
+ * 见 [决策记录](../../../.agents/notes/2026-11-14-hover-hit-area-is-the-button.md)。
133
135
  * @param shown - 实际展示的那条余额;`null` 表示没有数字。
134
136
  * @param stateText - 处境的文案;`null` 表示这个处境没什么要说的(数字可信)。
135
137
  * @returns 悬停要显示的那一句;`null` 表示两态都不挂悬停。
package/lib/version.d.ts CHANGED
@@ -8,5 +8,5 @@
8
8
  /** 线上 schema 版本。响应里逐条回传,消费方据此判断兼容性。 */
9
9
  export declare const SCHEMA_VERSION = 1;
10
10
  /** 插件版本。与 `package.json` 的 `version` 一致(有测试兜底)。 */
11
- export declare const PLUGIN_VERSION = "3.2.0";
11
+ export declare const PLUGIN_VERSION = "3.2.2";
12
12
  //# sourceMappingURL=version.d.ts.map
package/lib/version.js CHANGED
@@ -8,5 +8,5 @@
8
8
  /** 线上 schema 版本。响应里逐条回传,消费方据此判断兼容性。 */
9
9
  export const SCHEMA_VERSION = 1;
10
10
  /** 插件版本。与 `package.json` 的 `version` 一致(有测试兜底)。 */
11
- export const PLUGIN_VERSION = '3.2.0';
11
+ export const PLUGIN_VERSION = '3.2.2';
12
12
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-ds-balance",
3
- "version": "3.2.0",
3
+ "version": "3.2.2",
4
4
  "icon": "./icon.svg",
5
5
  "description": "DSH plugin: shows the DeepSeek account balance at the bottom of the sidebar, with a configuration card on the Plugins page.",
6
6
  "keywords": [
@@ -47,7 +47,7 @@
47
47
  "LICENSE"
48
48
  ],
49
49
  "engines": {
50
- "dsh": "^0.1.7-rc.1 || ^0.2.0-rc.1 || ^0.2.1-rc.1 || ^0.2.2-rc.1",
50
+ "dsh": "^0.2.2-rc.1",
51
51
  "node": ">=20"
52
52
  },
53
53
  "dsh": {
@@ -74,38 +74,38 @@
74
74
  "check:declaration": "node scripts/check-declaration.mjs"
75
75
  },
76
76
  "peerDependencies": {
77
- "@deepseek-ai/cordis": "^4.0.3",
78
- "@deepseek-ai/dsh-client-connection": "^0.1.7-rc.1 || ^0.2.0-rc.1 || ^0.2.1-rc.1 || ^0.2.2-rc.1",
79
- "@deepseek-ai/dsh-client-locale": "^0.1.7-rc.1 || ^0.2.0-rc.1 || ^0.2.1-rc.1 || ^0.2.2-rc.1",
80
- "@deepseek-ai/dsh-client-ui-primitives": "^0.1.7-rc.1 || ^0.2.0-rc.1 || ^0.2.1-rc.1 || ^0.2.2-rc.1",
81
- "@deepseek-ai/dsh-client-ui-settings": "^0.1.7-rc.1 || ^0.2.0-rc.1 || ^0.2.1-rc.1 || ^0.2.2-rc.1",
82
- "@deepseek-ai/dsh-client-ui-slots": "^0.1.7-rc.1 || ^0.2.0-rc.1 || ^0.2.1-rc.1 || ^0.2.2-rc.1",
83
- "@deepseek-ai/dsh-credentials": "^0.1.7-rc.1 || ^0.2.0-rc.1 || ^0.2.1-rc.1 || ^0.2.2-rc.1",
84
- "@deepseek-ai/dsh-deepseek-account-platform": "^0.1.7-rc.1 || ^0.2.0-rc.1 || ^0.2.1-rc.1 || ^0.2.2-rc.1",
85
- "@deepseek-ai/dsh-home-paths": "^0.1.7-rc.1 || ^0.2.0-rc.1 || ^0.2.1-rc.1 || ^0.2.2-rc.1",
86
- "@deepseek-ai/dsh-settings": "^0.1.7-rc.1 || ^0.2.0-rc.1 || ^0.2.1-rc.1 || ^0.2.2-rc.1",
87
- "@deepseek-ai/dsh-storage-domain": "^0.1.7-rc.1 || ^0.2.0-rc.1 || ^0.2.1-rc.1 || ^0.2.2-rc.1",
88
- "@deepseek-ai/schemastery": "^3.18.5",
77
+ "@deepseek-ai/cordis": "^4.1.0",
78
+ "@deepseek-ai/dsh-client-connection": "^0.2.2-rc.1",
79
+ "@deepseek-ai/dsh-client-locale": "^0.2.2-rc.1",
80
+ "@deepseek-ai/dsh-client-ui-primitives": "^0.2.2-rc.1",
81
+ "@deepseek-ai/dsh-client-ui-settings": "^0.2.2-rc.1",
82
+ "@deepseek-ai/dsh-client-ui-slots": "^0.2.2-rc.1",
83
+ "@deepseek-ai/dsh-credentials": "^0.2.2-rc.1",
84
+ "@deepseek-ai/dsh-deepseek-account-platform": "^0.2.2-rc.1",
85
+ "@deepseek-ai/dsh-home-paths": "^0.2.2-rc.1",
86
+ "@deepseek-ai/dsh-settings": "^0.2.2-rc.1",
87
+ "@deepseek-ai/dsh-storage-domain": "^0.2.2-rc.1",
88
+ "@deepseek-ai/schemastery": "^3.19.0",
89
89
  "react": "^18.3.1",
90
90
  "react-dom": "^18.3.1"
91
91
  },
92
92
  "devDependencies": {
93
- "@deepseek-ai/cordis": "^4.0.3",
93
+ "@deepseek-ai/cordis": "^4.1.0",
94
94
  "@deepseek-ai/cordis-plugin-loader": "^1.0.4",
95
- "@deepseek-ai/dsh-client-connection": "^0.1.7-rc.1 || ^0.2.0-rc.1 || ^0.2.1-rc.1 || ^0.2.2-rc.1",
96
- "@deepseek-ai/dsh-client-locale": "^0.1.7-rc.1 || ^0.2.0-rc.1 || ^0.2.1-rc.1 || ^0.2.2-rc.1",
97
- "@deepseek-ai/dsh-client-ui-plugin-manager": "^0.1.7-rc.1 || ^0.2.0-rc.1 || ^0.2.1-rc.1 || ^0.2.2-rc.1",
98
- "@deepseek-ai/dsh-client-ui-primitives": "^0.1.7-rc.1 || ^0.2.0-rc.1 || ^0.2.1-rc.1 || ^0.2.2-rc.1",
99
- "@deepseek-ai/dsh-client-ui-renderer": "^0.1.7-rc.1 || ^0.2.0-rc.1 || ^0.2.1-rc.1 || ^0.2.2-rc.1",
100
- "@deepseek-ai/dsh-client-ui-settings": "^0.1.7-rc.1 || ^0.2.0-rc.1 || ^0.2.1-rc.1 || ^0.2.2-rc.1",
101
- "@deepseek-ai/dsh-client-ui-sidebar": "^0.1.7-rc.1 || ^0.2.0-rc.1 || ^0.2.1-rc.1 || ^0.2.2-rc.1",
102
- "@deepseek-ai/dsh-client-ui-slots": "^0.1.7-rc.1 || ^0.2.0-rc.1 || ^0.2.1-rc.1 || ^0.2.2-rc.1",
103
- "@deepseek-ai/dsh-credentials": "^0.1.7-rc.1 || ^0.2.0-rc.1 || ^0.2.1-rc.1 || ^0.2.2-rc.1",
104
- "@deepseek-ai/dsh-deepseek-account-platform": "^0.1.7-rc.1 || ^0.2.0-rc.1 || ^0.2.1-rc.1 || ^0.2.2-rc.1",
105
- "@deepseek-ai/dsh-home-paths": "^0.1.7-rc.1 || ^0.2.0-rc.1 || ^0.2.1-rc.1 || ^0.2.2-rc.1",
106
- "@deepseek-ai/dsh-settings": "^0.1.7-rc.1 || ^0.2.0-rc.1 || ^0.2.1-rc.1 || ^0.2.2-rc.1",
107
- "@deepseek-ai/dsh-storage-domain": "^0.1.7-rc.1 || ^0.2.0-rc.1 || ^0.2.1-rc.1 || ^0.2.2-rc.1",
108
- "@deepseek-ai/schemastery": "^3.18.5",
95
+ "@deepseek-ai/dsh-client-connection": "^0.2.2-rc.1",
96
+ "@deepseek-ai/dsh-client-locale": "^0.2.2-rc.1",
97
+ "@deepseek-ai/dsh-client-ui-plugin-manager": "^0.2.2-rc.1",
98
+ "@deepseek-ai/dsh-client-ui-primitives": "^0.2.2-rc.1",
99
+ "@deepseek-ai/dsh-client-ui-renderer": "^0.2.2-rc.1",
100
+ "@deepseek-ai/dsh-client-ui-settings": "^0.2.2-rc.1",
101
+ "@deepseek-ai/dsh-client-ui-sidebar": "^0.2.2-rc.1",
102
+ "@deepseek-ai/dsh-client-ui-slots": "^0.2.2-rc.1",
103
+ "@deepseek-ai/dsh-credentials": "^0.2.2-rc.1",
104
+ "@deepseek-ai/dsh-deepseek-account-platform": "^0.2.2-rc.1",
105
+ "@deepseek-ai/dsh-home-paths": "^0.2.2-rc.1",
106
+ "@deepseek-ai/dsh-settings": "^0.2.2-rc.1",
107
+ "@deepseek-ai/dsh-storage-domain": "^0.2.2-rc.1",
108
+ "@deepseek-ai/schemastery": "^3.19.0",
109
109
  "@eslint/js": "^10.0.1",
110
110
  "@types/node": "^20.0.0",
111
111
  "@types/react": "~18.3.1",
@@ -120,9 +120,10 @@
120
120
  "react-dom": "^18.3.1",
121
121
  "typescript": "^5.4.0",
122
122
  "typescript-eslint": "^8.70.1",
123
- "vitest": "^4.1.11"
123
+ "vitest": "^4.1.11",
124
+ "yaml": "^2.9.1"
124
125
  },
125
126
  "dependencies": {
126
- "zod": "4.4.3"
127
+ "zod": "4.6.6"
127
128
  }
128
129
  }