kiosko 0.2.10 → 0.2.11
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 +2 -1
- package/cli.js +18 -10
- package/package.json +1 -1
- package/screen-thread.js +5 -5
- package/sdk.js +2 -2
- package/web/assets/app.js +22 -22
- package/web/assets/styles.css +1 -1
package/README.md
CHANGED
|
@@ -205,7 +205,7 @@ can run in PowerShell.
|
|
|
205
205
|
silently, with the tasks "start when I sign in" and "add `kiosko` to PATH":
|
|
206
206
|
|
|
207
207
|
```powershell
|
|
208
|
-
.\Kiosko-Setup-0.2.
|
|
208
|
+
.\Kiosko-Setup-0.2.11-x64.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /TASKS=service,path
|
|
209
209
|
```
|
|
210
210
|
|
|
211
211
|
Open a new terminal afterwards so `kiosko` is on the `PATH` (or use
|
|
@@ -427,6 +427,7 @@ Some official plugins are **optional**: they don't come with Kiosko, and the
|
|
|
427
427
|
| [logs](https://github.com/kiosko-lcd/kiosko-plugin-logs) | live logs: journald, log files, Docker, macOS, Windows, Kubernetes and Loki; errors as they happen, repeats folded, secrets masked |
|
|
428
428
|
| [hazards](https://github.com/kiosko-lcd/kiosko-plugin-hazards) | official warnings (NWS, tsunami.gov, CWA, AEMET, Meteoalarm, GDACS) as full-screen alerts on every panel; informational, not a substitute for official alerts |
|
|
429
429
|
| [batteries](https://github.com/kiosko-lcd/kiosko-plugin-batteries) | the battery of your Bluetooth headphones, mouse, keyboard, controller, laptop and phone, with a warning before one runs out (UPower/BlueZ, Windows, macOS, KDE Connect) |
|
|
430
|
+
| [switchbot](https://github.com/kiosko-lcd/kiosko-plugin-switchbot) | SwitchBot thermometers, door and presence sensors heard straight from the computer's Bluetooth (no hub, account or Home Assistant), with an alert for a door left open (Linux) |
|
|
430
431
|
|
|
431
432
|
Every official widget, painted with its sample data: run `kiosko gallery`
|
|
432
433
|
(published to GitHub Pages by the `Gallery` workflow, together with the
|
package/cli.js
CHANGED
|
@@ -219,7 +219,7 @@ function toJsonSchema(f) {
|
|
|
219
219
|
case "list":
|
|
220
220
|
return { ...base3, type: "array", items: toJsonSchema(f.item), maxItems: f.max, ...f.filter ? { "x-ui": { ...ui, widget: "filter", choices: f.item.kind === "string" ? f.item.choices : void 0 }, "x-filter": true } : {} };
|
|
221
221
|
case "map":
|
|
222
|
-
return { ...base3, type: "object", additionalProperties: { type: "string" } };
|
|
222
|
+
return { ...base3, type: "object", additionalProperties: { type: "string" }, ...f.keyChoices ? { "x-ui": { ...ui, keyChoices: f.keyChoices } } : {} };
|
|
223
223
|
case "object":
|
|
224
224
|
return { ...base3, type: "object", properties: Object.fromEntries(Object.entries(f.props).map(([k, sub]) => [k, toJsonSchema(sub)])) };
|
|
225
225
|
}
|
|
@@ -1385,7 +1385,7 @@ var CATEGORIES = [
|
|
|
1385
1385
|
];
|
|
1386
1386
|
var ALERT_LEVELS = ["info", "warn", "critical"];
|
|
1387
1387
|
var PAD_KEYS = ["up", "down", "left", "right", "a", "b", "x", "y", "l", "r", "start", "select"];
|
|
1388
|
-
var SDK_VERSION = "0.2.
|
|
1388
|
+
var SDK_VERSION = "0.2.11";
|
|
1389
1389
|
function defineWidget(w) {
|
|
1390
1390
|
return w;
|
|
1391
1391
|
}
|
|
@@ -2195,7 +2195,8 @@ function configSchema(plugins) {
|
|
|
2195
2195
|
id: { type: "string", description: "The name the screen had when it was added (it may be renamed on the screen's setup page); shown until the screen says its own." },
|
|
2196
2196
|
key: { type: "string", pattern: "^[0-9a-f]{64}$", description: "The pairing key (64 hex digits), set by pairing in the editor. Empty: not paired yet.", "x-secret": true },
|
|
2197
2197
|
host: { type: "string", description: "Address to use instead of finding it by mDNS (another subnet, a network without multicast).", "x-risk": "network" },
|
|
2198
|
-
port: { type: "integer", minimum: 1, maximum: 65535, default: 7428 }
|
|
2198
|
+
port: { type: "integer", minimum: 1, maximum: 65535, default: 7428 },
|
|
2199
|
+
brightness: { type: "integer", minimum: 0, maximum: 100, description: "Backlight brightness, 0-100 (perceived; 0 = off), pushed to the screen on every connection. Screen firmware 0.1.2 or later; older ones ignore it. Empty: the screen keeps its own (70 % unless set on its setup page)." }
|
|
2199
2200
|
}
|
|
2200
2201
|
},
|
|
2201
2202
|
{
|
|
@@ -5534,6 +5535,9 @@ function browser() {
|
|
|
5534
5535
|
|
|
5535
5536
|
// packages/core/src/remote/device.ts
|
|
5536
5537
|
var ROTATIONS = [0, 90, 180, 270];
|
|
5538
|
+
function brightnessOf(v) {
|
|
5539
|
+
return typeof v === "number" && Number.isFinite(v) ? Math.min(100, Math.max(0, Math.round(v))) : null;
|
|
5540
|
+
}
|
|
5537
5541
|
var RemoteDevice = class {
|
|
5538
5542
|
status;
|
|
5539
5543
|
cfg;
|
|
@@ -5575,7 +5579,7 @@ var RemoteDevice = class {
|
|
|
5575
5579
|
code: "connecting",
|
|
5576
5580
|
framesSent: 0,
|
|
5577
5581
|
lastSentAt: null,
|
|
5578
|
-
remote: { online: false, id: cfg.id ?? cfg.uid, host: cfg.host ?? null, fw: "", model: "", w: 0, h: 0, rot: this.rotate, fps: 0, rttMs: null, decodeMs: null, lastFrameAt: null, dropped: 0, since: null }
|
|
5582
|
+
remote: { online: false, id: cfg.id ?? cfg.uid, host: cfg.host ?? null, fw: "", model: "", w: 0, h: 0, rot: this.rotate, fps: 0, rttMs: null, decodeMs: null, lastFrameAt: null, dropped: 0, since: null, tempC: null, bright: null }
|
|
5579
5583
|
};
|
|
5580
5584
|
this.mdns.retain();
|
|
5581
5585
|
this.mdns.on("found", this.onFound);
|
|
@@ -5721,7 +5725,8 @@ var RemoteDevice = class {
|
|
|
5721
5725
|
if (st.type !== T.STATE) throw new Error("the screen did not say its state");
|
|
5722
5726
|
this.applyState(st.json());
|
|
5723
5727
|
const extra = this.deps.settings?.() ?? {};
|
|
5724
|
-
|
|
5728
|
+
const bright = brightnessOf(this.cfg.brightness);
|
|
5729
|
+
sendSealed(wire, session2, T.SET, { rot: this.rotate, ...extra, ...bright !== null ? { bright } : {} });
|
|
5725
5730
|
this.rotDirty = false;
|
|
5726
5731
|
this.ledDirty = !!this.led;
|
|
5727
5732
|
this.fresh = !!this.latest;
|
|
@@ -5802,6 +5807,8 @@ var RemoteDevice = class {
|
|
|
5802
5807
|
if (typeof j.fw === "string") r.fw = j.fw;
|
|
5803
5808
|
if (typeof j.w === "number") r.w = j.w;
|
|
5804
5809
|
if (typeof j.h === "number") r.h = j.h;
|
|
5810
|
+
if (typeof j.tempC === "number" && Number.isFinite(j.tempC)) r.tempC = j.tempC;
|
|
5811
|
+
if (typeof j.bright === "number" && Number.isFinite(j.bright)) r.bright = j.bright;
|
|
5805
5812
|
}
|
|
5806
5813
|
/**
|
|
5807
5814
|
* Runs `fn` while this driver stands aside: its session is closed and it
|
|
@@ -9386,7 +9393,7 @@ var image = defineWidget({
|
|
|
9386
9393
|
var src_default = definePlugin({
|
|
9387
9394
|
id: "core",
|
|
9388
9395
|
name: { en: "Essentials", es: "B\xE1sicos", de: "Grundlagen", "zh-Hant": "\u57FA\u672C\u5DE5\u5177", "zh-Hans": "\u57FA\u7840\u7EC4\u4EF6" },
|
|
9389
|
-
version: "0.2.
|
|
9396
|
+
version: "0.2.11",
|
|
9390
9397
|
languages: ["en", "es", "de", "zh-Hant", "zh-Hans"],
|
|
9391
9398
|
sdk: "^0.2.0",
|
|
9392
9399
|
// The picture widget reads the image (or folder, or URL) you give it.
|
|
@@ -9482,7 +9489,7 @@ var module2 = defineWidget({
|
|
|
9482
9489
|
var src_default2 = definePlugin({
|
|
9483
9490
|
id: "legacy",
|
|
9484
9491
|
name: { en: "aimonitor compatibility", es: "Compatibilidad aimonitor", de: "aimonitor-Kompatibilit\xE4t", "zh-Hant": "aimonitor \u76F8\u5BB9\u6027", "zh-Hans": "aimonitor \u517C\u5BB9" },
|
|
9485
|
-
version: "0.2.
|
|
9492
|
+
version: "0.2.11",
|
|
9486
9493
|
languages: ["en", "es", "de", "zh-Hant", "zh-Hans"],
|
|
9487
9494
|
sdk: "^0.2.0",
|
|
9488
9495
|
// Runs the aimonitor modules you point it at, and reads their folder.
|
|
@@ -9496,7 +9503,7 @@ var src_default2 = definePlugin({
|
|
|
9496
9503
|
|
|
9497
9504
|
// packages/server/src/official.ts
|
|
9498
9505
|
var BUNDLED_PLUGIN_IDS = ["agents", "cats", "system", "vitals", "usage", "weather", "calendar", "news", "mirror", "gitlab", "github", "calls", "timesheet", "llm", "gpu", "homeassistant"];
|
|
9499
|
-
var OPTIONAL_PLUGIN_IDS = ["doom", "video", "fractals", "gaming", "logs", "hazards", "batteries"];
|
|
9506
|
+
var OPTIONAL_PLUGIN_IDS = ["doom", "video", "fractals", "gaming", "logs", "hazards", "batteries", "switchbot"];
|
|
9500
9507
|
var OFFICIAL_PLUGINS = [
|
|
9501
9508
|
...BUNDLED_PLUGIN_IDS.map((id) => ({ id, npm: `kiosko-plugin-${id}`, bundled: true })),
|
|
9502
9509
|
...OPTIONAL_PLUGIN_IDS.map((id) => ({ id, npm: `kiosko-plugin-${id}`, bundled: false }))
|
|
@@ -10339,7 +10346,8 @@ function remoteApi(ctx) {
|
|
|
10339
10346
|
if (s) {
|
|
10340
10347
|
const keepHost = s.device.driver === "remote" ? s.device.host : void 0;
|
|
10341
10348
|
const keepPort = s.device.driver === "remote" ? s.device.port : void 0;
|
|
10342
|
-
s.device
|
|
10349
|
+
const keepBright = s.device.driver === "remote" ? s.device.brightness : void 0;
|
|
10350
|
+
s.device = { driver: "remote", uid: info.uid, id: info.id, key: hex2, ...keepHost ? { host: keepHost } : {}, ...keepPort ? { port: keepPort } : {}, ...keepBright !== void 0 ? { brightness: keepBright } : {} };
|
|
10343
10351
|
} else {
|
|
10344
10352
|
s = remoteScreen(ctx.runtime.registry, info, hex2, ctx.runtime.config.locale === "auto" ? "en" : ctx.runtime.config.locale);
|
|
10345
10353
|
cfg.screens.push(s);
|
|
@@ -12668,7 +12676,7 @@ function starterConfig(registry2, o = {}) {
|
|
|
12668
12676
|
}
|
|
12669
12677
|
|
|
12670
12678
|
// packages/server/src/cli.ts
|
|
12671
|
-
var VERSION = "0.2.
|
|
12679
|
+
var VERSION = "0.2.11";
|
|
12672
12680
|
var USAGE2 = `Kiosko ${VERSION}: a widget mosaic for USB LCD panels
|
|
12673
12681
|
|
|
12674
12682
|
kiosko start [--port 7420] [--host 127.0.0.1] [--config file] [--open] [--demo]
|
package/package.json
CHANGED
package/screen-thread.js
CHANGED
|
@@ -116,7 +116,7 @@ import { homedir as homedir2, platform } from "node:os";
|
|
|
116
116
|
|
|
117
117
|
// packages/sdk/src/plugin.ts
|
|
118
118
|
var PAD_KEYS = ["up", "down", "left", "right", "a", "b", "x", "y", "l", "r", "start", "select"];
|
|
119
|
-
var SDK_VERSION = "0.2.
|
|
119
|
+
var SDK_VERSION = "0.2.11";
|
|
120
120
|
function defineWidget(w) {
|
|
121
121
|
return w;
|
|
122
122
|
}
|
|
@@ -329,7 +329,7 @@ function toJsonSchema(f) {
|
|
|
329
329
|
case "list":
|
|
330
330
|
return { ...base2, type: "array", items: toJsonSchema(f.item), maxItems: f.max, ...f.filter ? { "x-ui": { ...ui, widget: "filter", choices: f.item.kind === "string" ? f.item.choices : void 0 }, "x-filter": true } : {} };
|
|
331
331
|
case "map":
|
|
332
|
-
return { ...base2, type: "object", additionalProperties: { type: "string" } };
|
|
332
|
+
return { ...base2, type: "object", additionalProperties: { type: "string" }, ...f.keyChoices ? { "x-ui": { ...ui, keyChoices: f.keyChoices } } : {} };
|
|
333
333
|
case "object":
|
|
334
334
|
return { ...base2, type: "object", properties: Object.fromEntries(Object.entries(f.props).map(([k, sub]) => [k, toJsonSchema(sub)])) };
|
|
335
335
|
}
|
|
@@ -4202,7 +4202,7 @@ var image = defineWidget({
|
|
|
4202
4202
|
var src_default = definePlugin({
|
|
4203
4203
|
id: "core",
|
|
4204
4204
|
name: { en: "Essentials", es: "B\xE1sicos", de: "Grundlagen", "zh-Hant": "\u57FA\u672C\u5DE5\u5177", "zh-Hans": "\u57FA\u7840\u7EC4\u4EF6" },
|
|
4205
|
-
version: "0.2.
|
|
4205
|
+
version: "0.2.11",
|
|
4206
4206
|
languages: ["en", "es", "de", "zh-Hant", "zh-Hans"],
|
|
4207
4207
|
sdk: "^0.2.0",
|
|
4208
4208
|
// The picture widget reads the image (or folder, or URL) you give it.
|
|
@@ -4298,7 +4298,7 @@ var module2 = defineWidget({
|
|
|
4298
4298
|
var src_default2 = definePlugin({
|
|
4299
4299
|
id: "legacy",
|
|
4300
4300
|
name: { en: "aimonitor compatibility", es: "Compatibilidad aimonitor", de: "aimonitor-Kompatibilit\xE4t", "zh-Hant": "aimonitor \u76F8\u5BB9\u6027", "zh-Hans": "aimonitor \u517C\u5BB9" },
|
|
4301
|
-
version: "0.2.
|
|
4301
|
+
version: "0.2.11",
|
|
4302
4302
|
languages: ["en", "es", "de", "zh-Hant", "zh-Hans"],
|
|
4303
4303
|
sdk: "^0.2.0",
|
|
4304
4304
|
// Runs the aimonitor modules you point it at, and reads their folder.
|
|
@@ -4312,7 +4312,7 @@ var src_default2 = definePlugin({
|
|
|
4312
4312
|
|
|
4313
4313
|
// packages/server/src/official.ts
|
|
4314
4314
|
var BUNDLED_PLUGIN_IDS = ["agents", "cats", "system", "vitals", "usage", "weather", "calendar", "news", "mirror", "gitlab", "github", "calls", "timesheet", "llm", "gpu", "homeassistant"];
|
|
4315
|
-
var OPTIONAL_PLUGIN_IDS = ["doom", "video", "fractals", "gaming", "logs", "hazards", "batteries"];
|
|
4315
|
+
var OPTIONAL_PLUGIN_IDS = ["doom", "video", "fractals", "gaming", "logs", "hazards", "batteries", "switchbot"];
|
|
4316
4316
|
var OFFICIAL_PLUGINS = [
|
|
4317
4317
|
...BUNDLED_PLUGIN_IDS.map((id) => ({ id, npm: `kiosko-plugin-${id}`, bundled: true })),
|
|
4318
4318
|
...OPTIONAL_PLUGIN_IDS.map((id) => ({ id, npm: `kiosko-plugin-${id}`, bundled: false }))
|
package/sdk.js
CHANGED
|
@@ -14,7 +14,7 @@ var CATEGORIES = [
|
|
|
14
14
|
];
|
|
15
15
|
var ALERT_LEVELS = ["info", "warn", "critical"];
|
|
16
16
|
var PAD_KEYS = ["up", "down", "left", "right", "a", "b", "x", "y", "l", "r", "start", "select"];
|
|
17
|
-
var SDK_VERSION = "0.2.
|
|
17
|
+
var SDK_VERSION = "0.2.11";
|
|
18
18
|
function defineWidget(w) {
|
|
19
19
|
return w;
|
|
20
20
|
}
|
|
@@ -244,7 +244,7 @@ function toJsonSchema(f) {
|
|
|
244
244
|
case "list":
|
|
245
245
|
return { ...base2, type: "array", items: toJsonSchema(f.item), maxItems: f.max, ...f.filter ? { "x-ui": { ...ui, widget: "filter", choices: f.item.kind === "string" ? f.item.choices : void 0 }, "x-filter": true } : {} };
|
|
246
246
|
case "map":
|
|
247
|
-
return { ...base2, type: "object", additionalProperties: { type: "string" } };
|
|
247
|
+
return { ...base2, type: "object", additionalProperties: { type: "string" }, ...f.keyChoices ? { "x-ui": { ...ui, keyChoices: f.keyChoices } } : {} };
|
|
248
248
|
case "object":
|
|
249
249
|
return { ...base2, type: "object", properties: Object.fromEntries(Object.entries(f.props).map(([k, sub]) => [k, toJsonSchema(sub)])) };
|
|
250
250
|
}
|