@iasiv5/dsh-quota-watch 0.1.7 → 0.1.9

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 CHANGED
@@ -276,7 +276,7 @@ var FLOAT_STYLE_TEXT = `
276
276
  .dqw-label { font-size: 11px; font-weight: 600; width: 52px; flex: none; }
277
277
  .dqw-label[data-action="refresh"] { cursor: pointer; border-radius: 4px; }
278
278
  .dqw-label[data-action="refresh"]:hover { opacity: .75; }
279
- .dqw-bar { display: block; flex: 1; height: 4px; overflow: hidden; border-radius: 4px; background: var(--dsw-alias-bg-tertiary, rgba(128,128,128,.2)); }
279
+ .dqw-bar { display: block; flex: 0 0 auto; width: 120px; height: 4px; overflow: hidden; border-radius: 4px; background: var(--dsw-alias-bg-tertiary, rgba(128,128,128,.2)); }
280
280
  .dqw-bar-fill { display: block; height: 100%; border-radius: inherit; background: var(--dsw-alias-button-primary-fill, #5b8def); }
281
281
  .dqw-bar-fill.warn { background: var(--dsw-alias-label-warning, #d29922); }
282
282
  .dqw-bar-fill.danger { background: var(--dsw-alias-label-danger, #c93c3c); }
@@ -485,7 +485,7 @@ function mountQuotaCard({
485
485
  surface.hidden = dataHidden;
486
486
  floatHost.hidden = dataHidden;
487
487
  };
488
- doc.documentElement.append(floatHost);
488
+ doc.body.append(floatHost);
489
489
  const applyFloatGeometry = () => {
490
490
  const viewWidth = win.innerWidth ?? 1024;
491
491
  const viewHeight = win.innerHeight ?? 768;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iasiv5/dsh-quota-watch",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "description": "DSH Web sidebar monitor for GLM Coding Plan quotas and GitHub Copilot credits",
5
5
  "type": "module",
6
6
  "main": "./src/host.mjs",
package/src/client.mjs CHANGED
@@ -155,7 +155,7 @@ const FLOAT_STYLE_TEXT = `
155
155
  .dqw-label { font-size: 11px; font-weight: 600; width: 52px; flex: none; }
156
156
  .dqw-label[data-action="refresh"] { cursor: pointer; border-radius: 4px; }
157
157
  .dqw-label[data-action="refresh"]:hover { opacity: .75; }
158
- .dqw-bar { display: block; flex: 1; height: 4px; overflow: hidden; border-radius: 4px; background: var(--dsw-alias-bg-tertiary, rgba(128,128,128,.2)); }
158
+ .dqw-bar { display: block; flex: 0 0 auto; width: 120px; height: 4px; overflow: hidden; border-radius: 4px; background: var(--dsw-alias-bg-tertiary, rgba(128,128,128,.2)); }
159
159
  .dqw-bar-fill { display: block; height: 100%; border-radius: inherit; background: var(--dsw-alias-button-primary-fill, #5b8def); }
160
160
  .dqw-bar-fill.warn { background: var(--dsw-alias-label-warning, #d29922); }
161
161
  .dqw-bar-fill.danger { background: var(--dsw-alias-label-danger, #c93c3c); }
@@ -422,7 +422,12 @@ export function mountQuotaCard({
422
422
  surface.hidden = dataHidden
423
423
  floatHost.hidden = dataHidden
424
424
  }
425
- doc.documentElement.append(floatHost)
425
+ // Mount under <body>, NOT <html>: the DSH theme tokens (--dsw-alias-*) are
426
+ // defined on <body>, and a sibling of <body> never inherits them — mounting
427
+ // on documentElement silently stranded the float shell on hardcoded dark
428
+ // fallbacks (broke the light theme). <body> is also transform-free, so
429
+ // position:fixed stays viewport-anchored.
430
+ doc.body.append(floatHost)
426
431
  const applyFloatGeometry = () => {
427
432
  const viewWidth = win.innerWidth ?? 1024
428
433
  const viewHeight = win.innerHeight ?? 768