@iasiv5/dsh-quota-watch 0.1.4 → 0.1.6

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
@@ -966,6 +966,15 @@ function mountQuotaCard({
966
966
  container.hidden = !showCard && !showRail;
967
967
  if (showRail) container.dataset.dshQuotaWatchSidebarCollapsed = "";
968
968
  else delete container.dataset.dshQuotaWatchSidebarCollapsed;
969
+ card.style.display = showCard ? "" : "none";
970
+ railTrigger.style.display = showRail ? "inline-flex" : "none";
971
+ if (showRail) {
972
+ container.style.height = SURFACE_SIZE + "px";
973
+ container.style.flex = "0 0 auto";
974
+ } else {
975
+ container.style.height = "";
976
+ container.style.flex = "";
977
+ }
969
978
  };
970
979
  const footResizeObserver = typeof win.ResizeObserver === "function" ? new win.ResizeObserver(() => {
971
980
  syncCardVisibility();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iasiv5/dsh-quota-watch",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
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
@@ -922,6 +922,19 @@ export function mountQuotaCard({
922
922
  container.hidden = !showCard && !showRail
923
923
  if (showRail) container.dataset.dshQuotaWatchSidebarCollapsed = ''
924
924
  else delete container.dataset.dshQuotaWatchSidebarCollapsed
925
+ // The card ↔ rail swap is driven by INLINE styles (know-how 017's lesson),
926
+ // AND the collapsed rail gets an explicit 38px box: CDP layout-chain dump
927
+ // showed the 0.2.0 framework flex-collapsing unknown foot children to 0px
928
+ // height, so the gauge must opt out of the flex squeeze to be visible.
929
+ card.style.display = showCard ? '' : 'none'
930
+ railTrigger.style.display = showRail ? 'inline-flex' : 'none'
931
+ if (showRail) {
932
+ container.style.height = SURFACE_SIZE + 'px'
933
+ container.style.flex = '0 0 auto'
934
+ } else {
935
+ container.style.height = ''
936
+ container.style.flex = ''
937
+ }
925
938
  }
926
939
  const footResizeObserver = typeof win.ResizeObserver === 'function'
927
940
  ? new win.ResizeObserver(() => { syncCardVisibility() })