@dennisrongo/dsh-weather 0.3.0 → 0.3.1

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.
Files changed (3) hide show
  1. package/README.md +5 -0
  2. package/lib/client.js +29 -11
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # dsh-weather
2
2
 
3
+ [![npm](https://img.shields.io/npm/v/@dennisrongo/dsh-weather)](https://www.npmjs.com/package/@dennisrongo/dsh-weather)
4
+
5
+ **npm:** [`@dennisrongo/dsh-weather`](https://www.npmjs.com/package/@dennisrongo/dsh-weather) ·
6
+ **source:** [dennisrongo/dsh-plugins](https://github.com/dennisrongo/dsh-plugins/tree/main/plugins/dsh-weather)
7
+
3
8
  Weather bar for the [DeepSeek Harness](https://github.com/deepseek-ai/dsh) web UI — current conditions, a short hourly outlook, humidity and wind, pinned to the bottom-center of the page.
4
9
 
5
10
  - **Data:** [Open-Meteo](https://open-meteo.com) (free, no API key) via the browser.
package/lib/client.js CHANGED
@@ -205,19 +205,36 @@ var BAR_STYLES = `
205
205
  border: 1px solid var(--dsw-alias-border-l2, rgba(255,255,255,0.12));
206
206
  background: var(--dsw-specific-sidebar-fill, #1b1b1c);
207
207
  color: var(--dsw-alias-label-secondary, #cfd3d6);
208
- font: 400 12px/1.4 var(--dsw-font-family, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif);
208
+ font: 400 13px/1.4 var(--dsw-font-family, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif);
209
209
  font-variant-numeric: tabular-nums;
210
210
  box-shadow: var(--dsw-shadow-lv3, 0 0 1px rgba(0,0,0,0.2), 0 8px 24px rgba(0,0,0,0.12));
211
211
  cursor: default;
212
212
  user-select: none;
213
213
  white-space: nowrap;
214
+ /* DSH Desktop on Windows overlays a 36px window-drag strip at the top of the
215
+ viewport (#dsh-desktop-windows-drag-region: -webkit-app-region: drag,
216
+ z-index 2147483644, pointer-events: none) that the compositor resolves
217
+ BEFORE hit-testing. no-drag here is belt-and-braces only \u2014 the desktop
218
+ preload already grants every button no-drag !important and the bar was
219
+ still unclickable, so a covered element's no-drag does not punch a hole
220
+ in an overlapping drag element (the same failure dsh-mission-control
221
+ documented for its stage bar). The real fix is the layout rule below,
222
+ which drops the bar clear of the strip. In a plain browser all of this
223
+ is inert. */
224
+ -webkit-app-region: no-drag;
225
+ }
226
+ body.dsh-desktop-windows-titlebar-layout .dshwx {
227
+ /* Clear the desktop drag strip: 36px strip + the usual 8px gap. The body
228
+ class is added by DSH Desktop's preload on Windows only, so the browser
229
+ and non-Windows builds keep top: 8px. */
230
+ top: 44px;
214
231
  }
215
232
  body[data-ds-dark-theme] .dshwx { box-shadow: 0 0 0 1px rgba(0,0,0,0.5), 0 8px 24px rgba(0,0,0,0.5); }
216
233
  .dshwx[hidden] { display: none; }
217
- .dshwx-icon { font-size: 15px; }
234
+ .dshwx-icon { font-size: 16px; }
218
235
  .dshwx-temp {
219
236
  color: var(--dsw-alias-label-primary, #f9fafb);
220
- font-weight: 600; font-size: 13px;
237
+ font-weight: 600; font-size: 14px;
221
238
  font-family: inherit; font-variant-numeric: tabular-nums;
222
239
  border: 0; background: transparent; padding: 1px 4px; margin: 0 -2px;
223
240
  border-radius: 6px; cursor: pointer; line-height: inherit;
@@ -230,20 +247,20 @@ body[data-ds-dark-theme] .dshwx { box-shadow: 0 0 0 1px rgba(0,0,0,0.5), 0 8px 2
230
247
  max-width: 160px; overflow: hidden; text-overflow: ellipsis;
231
248
  }
232
249
  .dshwx-sep { width: 1px; height: 14px; background: var(--dsw-alias-border-l2, rgba(255,255,255,0.12)); flex: none; }
233
- .dshwx-meta { color: var(--dsw-alias-label-caption, #81858c); font-size: 11px; }
250
+ .dshwx-meta { color: var(--dsw-alias-label-caption, #81858c); font-size: 12px; }
234
251
  .dshwx-hours { display: flex; gap: 8px; align-items: center; }
235
- .dshwx-hour { display: flex; align-items: center; gap: 3px; color: var(--dsw-alias-label-caption, #81858c); font-size: 11px; }
252
+ .dshwx-hour { display: flex; align-items: center; gap: 3px; color: var(--dsw-alias-label-caption, #81858c); font-size: 12px; }
236
253
  .dshwx-hour b { color: var(--dsw-alias-label-secondary, #cfd3d6); font-weight: 500; }
237
254
  .dshwx-refresh {
238
255
  border: 0; background: transparent; cursor: pointer;
239
256
  color: var(--dsw-alias-label-caption, #81858c);
240
- font-size: 12px; padding: 2px; border-radius: 50%;
257
+ font-size: 14px; padding: 2px; border-radius: 50%;
241
258
  display: grid; place-items: center;
242
259
  }
243
260
  .dshwx-refresh:hover { color: var(--dsw-alias-label-primary, #f9fafb); background: var(--dsw-alias-interactive-bg-hover, rgba(255,255,255,0.08)); }
244
261
  .dshwx-refresh.busy { animation: dshwx-spin 0.9s linear infinite; }
245
262
  @keyframes dshwx-spin { to { transform: rotate(360deg); } }
246
- .dshwx-error { color: var(--dsw-alias-state-error-primary, #ef4444); font-size: 11.5px; }
263
+ .dshwx-error { color: var(--dsw-alias-state-error-primary, #ef4444); font-size: 12px; }
247
264
  /* --- Responsive tiers ---------------------------------------------------
248
265
  The bar is a single nowrap pill, so narrow screens shed detail rather than
249
266
  wrap. Each tier also drops the separator that preceded the hidden group,
@@ -262,11 +279,11 @@ body[data-ds-dark-theme] .dshwx { box-shadow: 0 0 0 1px rgba(0,0,0,0.5), 0 8px 2
262
279
  gap: 7px;
263
280
  padding: 4px 10px;
264
281
  max-width: calc(100vw - 16px);
265
- font-size: 11.5px;
282
+ font-size: 12px;
266
283
  }
267
284
  .dshwx-where { max-width: 92px; }
268
285
  .dshwx-icon { font-size: 14px; }
269
- .dshwx-temp { font-size: 12.5px; padding: 5px 7px; margin: -4px -3px; }
286
+ .dshwx-temp { font-size: 13px; padding: 5px 7px; margin: -4px -3px; }
270
287
  .dshwx-refresh { padding: 7px; margin: -5px; }
271
288
  }
272
289
 
@@ -342,7 +359,7 @@ function WeatherBar() {
342
359
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dshwx", "aria-live": "polite", children: [
343
360
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "dshwx-icon", children: "\u26A0\uFE0F" }),
344
361
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "dshwx-error", title: state.error, children: "Weather unavailable" }),
345
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { className: `dshwx-refresh${busy ? " busy" : ""}`, title: "Retry", onClick: reload, children: "\u27F3" })
362
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { className: `dshwx-refresh${busy ? " busy" : ""}`, "data-dsh-no-drag": "", title: "Retry", onClick: reload, children: "\u27F3" })
346
363
  ] });
347
364
  }
348
365
  const { icon, label } = describeCode(state.now.weatherCode, state.now.isDay);
@@ -355,6 +372,7 @@ function WeatherBar() {
355
372
  {
356
373
  type: "button",
357
374
  className: "dshwx-temp",
375
+ "data-dsh-no-drag": "",
358
376
  onClick: toggleUnit,
359
377
  title: `Switch to \xB0${other}`,
360
378
  "aria-label": `Temperature ${fmtTemp(state.now.temperatureC, unit)}. Switch to degrees ${other === "F" ? "Fahrenheit" : "Celsius"}.`,
@@ -384,7 +402,7 @@ function WeatherBar() {
384
402
  Math.round(state.now.windKph),
385
403
  "km/h"
386
404
  ] }),
387
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { className: `dshwx-refresh${busy ? " busy" : ""}`, title: "Refresh weather", onClick: reload, children: "\u27F3" })
405
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { className: `dshwx-refresh${busy ? " busy" : ""}`, "data-dsh-no-drag": "", title: "Refresh weather", onClick: reload, children: "\u27F3" })
388
406
  ] });
389
407
  }
390
408
  function apply(ctx) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dennisrongo/dsh-weather",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Weather bar for DeepSeek Harness (dsh) — current conditions at the bottom of the web UI via Open-Meteo, rendered into shell.overlay",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -29,7 +29,7 @@
29
29
  "postbuild": "node build/postbuild.mjs",
30
30
  "deploy": "node build/postbuild.mjs",
31
31
  "typecheck": "tsc --noEmit",
32
- "test": "node test/smoke.mjs"
32
+ "test": "node build/build.mjs && node test/smoke.mjs"
33
33
  },
34
34
  "dsh": {
35
35
  "bundle": {