@cassius0924/dsh-usage-dashboard 0.9.0 → 0.9.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/lib/client.js +9 -8
- package/lib/client.js.map +2 -2
- package/lib/types/client/dom.d.ts +11 -5
- package/lib/types/client/styles.d.ts +1 -1
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -1248,10 +1248,8 @@ function getShellFrame(node) {
|
|
|
1248
1248
|
return overlay?.parentElement ?? null;
|
|
1249
1249
|
}
|
|
1250
1250
|
function getComposerElement(frame) {
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
}
|
|
1254
|
-
return slotElement(frame, "conversation.composer.dock", "ancestor");
|
|
1251
|
+
const root = frame ?? document.documentElement;
|
|
1252
|
+
return slotElement(root, "conversation.composer", "ancestor") ?? slotElement(root, "conversation.composer.dock", "ancestor");
|
|
1255
1253
|
}
|
|
1256
1254
|
function getComposerInputElement(frame) {
|
|
1257
1255
|
const root = frame ?? document.documentElement;
|
|
@@ -3185,7 +3183,7 @@ function BalanceDashboard(props) {
|
|
|
3185
3183
|
] }, i)) }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "dq-empty", children: t("cache.empty") })
|
|
3186
3184
|
] })
|
|
3187
3185
|
] }),
|
|
3188
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "dq-footer", children: "@cassius0924/dsh-usage-dashboard v0.9.
|
|
3186
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { className: "dq-footer", children: "@cassius0924/dsh-usage-dashboard v0.9.2" })
|
|
3189
3187
|
] });
|
|
3190
3188
|
}
|
|
3191
3189
|
|
|
@@ -3479,7 +3477,10 @@ function SessionCostPill({ sessionId }) {
|
|
|
3479
3477
|
|
|
3480
3478
|
// src/client/styles.ts
|
|
3481
3479
|
var css = `
|
|
3482
|
-
|
|
3480
|
+
/* The widget is injected into the host's overlay layer (z-index:20), which is a
|
|
3481
|
+
stacking context \u2014 its own z-index only orders it among that layer's children.
|
|
3482
|
+
1 = above the host's in-layer content, never above a modal. */
|
|
3483
|
+
.dsh-quota-root{-webkit-text-size-adjust:100%;text-size-adjust:100%;position:absolute;right:16px;bottom:16px;z-index:1;pointer-events:auto;opacity:1;visibility:visible;font-family:var(--dsw-font-family,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei","Helvetica Neue",Helvetica,Arial,sans-serif);font-size:13px;line-height:1.45;font-variant-numeric:tabular-nums;color:var(--dsw-alias-label-primary,#1f2328);--dq-text-success:#1a7f37;--dq-text-success:color-mix(in oklab,var(--dsw-alias-state-success-primary,#2da44e) 52%,var(--dsw-alias-label-primary,#1f2328) 48%);--dq-text-warn:#9a6700;--dq-text-warn:color-mix(in oklab,var(--dsw-alias-state-warn-primary,#bf8700) 52%,var(--dsw-alias-label-primary,#1f2328) 48%);transition:left .28s cubic-bezier(.22,1,.36,1),top .28s cubic-bezier(.22,1,.36,1),opacity .16s ease-out,visibility 0s linear}
|
|
3483
3484
|
.dsh-quota-root.dsh-quota-root--hidden{opacity:0;visibility:hidden;pointer-events:none;transition:opacity .14s ease-out,visibility 0s linear .14s}
|
|
3484
3485
|
.dsh-quota-root.dsh-quota-dragging{transition:none}
|
|
3485
3486
|
.dsh-quota-card,.dsh-quota-card *{box-sizing:border-box}
|
|
@@ -4109,8 +4110,8 @@ function getBounds(node) {
|
|
|
4109
4110
|
if (headerRect !== null && headerRect.bottom > top && headerRect.bottom < bottom - MIN_REGION_HEIGHT) {
|
|
4110
4111
|
top = headerRect.bottom;
|
|
4111
4112
|
}
|
|
4112
|
-
const composerRect =
|
|
4113
|
-
if (composerRect !== null && composerRect.top < bottom && composerRect.top > top +
|
|
4113
|
+
const composerRect = getComposerElement(frame)?.getBoundingClientRect() ?? null;
|
|
4114
|
+
if (composerRect !== null && composerRect.top < bottom && composerRect.top > top + (bottom - top) / 2) {
|
|
4114
4115
|
bottom = composerRect.top;
|
|
4115
4116
|
}
|
|
4116
4117
|
return { left, top, right, bottom };
|