@crvouga/mockingbird-service-livekit 1.6.0 → 1.6.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.
- package/CHANGELOG.md +9 -1
- package/dist/{chunk-ZKDZROW5.js → chunk-5FLDCYLG.js} +2 -2
- package/dist/{chunk-I2AJCCT7.js → chunk-KW4C4G6B.js} +89 -10
- package/dist/chunk-KW4C4G6B.js.map +7 -0
- package/dist/cli.js +2 -2
- package/dist/index.js +1 -1
- package/dist/server.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-I2AJCCT7.js.map +0 -7
- /package/dist/{chunk-ZKDZROW5.js.map → chunk-5FLDCYLG.js.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
# Changelog — @crvouga/mockingbird-service-livekit
|
|
2
2
|
|
|
3
|
-
## 1.6.
|
|
3
|
+
## 1.6.1 (2026-09-30)
|
|
4
|
+
|
|
5
|
+
### Fixes and improvements
|
|
6
|
+
|
|
7
|
+
- keep admin buttons pressed until the action finishes ([0aabfcb](https://github.com/crvouga/mockingbird/commit/0aabfcb5f392aa51e193f9c3f817d5877d92bc6a))
|
|
8
|
+
- size admin select fields like the text inputs beside them ([0fb3ef2](https://github.com/crvouga/mockingbird/commit/0fb3ef2ddbf43376c93a2ae6d87c6c9bf890dafc))
|
|
9
|
+
- keep admin section tabs wired when boot is renamed ([4eda25e](https://github.com/crvouga/mockingbird/commit/4eda25eacd59da048d196f7cc8369d7a02b47bfc))
|
|
10
|
+
|
|
11
|
+
## 1.6.0 (2026-09-29)
|
|
4
12
|
|
|
5
13
|
### Features
|
|
6
14
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createRuntime
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KW4C4G6B.js";
|
|
4
4
|
|
|
5
5
|
// ../../adapters/node/dist/cli.js
|
|
6
6
|
import { readFile } from "node:fs/promises";
|
|
@@ -331,4 +331,4 @@ export {
|
|
|
331
331
|
createServer2 as createServer,
|
|
332
332
|
serveTarget
|
|
333
333
|
};
|
|
334
|
-
//# sourceMappingURL=chunk-
|
|
334
|
+
//# sourceMappingURL=chunk-5FLDCYLG.js.map
|
|
@@ -1932,6 +1932,50 @@ function bootAdmin(config) {
|
|
|
1932
1932
|
if (render)
|
|
1933
1933
|
await render();
|
|
1934
1934
|
}
|
|
1935
|
+
const delay = (ms) => new Promise((resolve) => {
|
|
1936
|
+
window.setTimeout(resolve, ms);
|
|
1937
|
+
});
|
|
1938
|
+
const confirmAction = async (button, pending, done, work) => {
|
|
1939
|
+
if (button.dataset.pending === "1")
|
|
1940
|
+
return;
|
|
1941
|
+
const label = button.textContent ?? "";
|
|
1942
|
+
const width = button.offsetWidth;
|
|
1943
|
+
button.dataset.pending = "1";
|
|
1944
|
+
button.classList.add("pressed");
|
|
1945
|
+
button.setAttribute("aria-busy", "true");
|
|
1946
|
+
button.style.minWidth = `${width}px`;
|
|
1947
|
+
button.textContent = pending;
|
|
1948
|
+
try {
|
|
1949
|
+
await work();
|
|
1950
|
+
button.textContent = done;
|
|
1951
|
+
await delay(1e3);
|
|
1952
|
+
} catch (error2) {
|
|
1953
|
+
showError(error2);
|
|
1954
|
+
} finally {
|
|
1955
|
+
button.textContent = label;
|
|
1956
|
+
button.style.minWidth = "";
|
|
1957
|
+
button.classList.remove("pressed");
|
|
1958
|
+
button.removeAttribute("aria-busy");
|
|
1959
|
+
delete button.dataset.pending;
|
|
1960
|
+
}
|
|
1961
|
+
};
|
|
1962
|
+
document.addEventListener("click", (event) => {
|
|
1963
|
+
const target = event.target;
|
|
1964
|
+
if (!(target instanceof Element))
|
|
1965
|
+
return;
|
|
1966
|
+
const button = target.closest("button");
|
|
1967
|
+
if (!(button instanceof HTMLButtonElement) || button.dataset.pending === "1")
|
|
1968
|
+
return;
|
|
1969
|
+
button.classList.add("pressed");
|
|
1970
|
+
const token = String(Date.now());
|
|
1971
|
+
button.dataset.press = token;
|
|
1972
|
+
window.setTimeout(() => {
|
|
1973
|
+
if (button.dataset.press !== token || button.dataset.pending === "1")
|
|
1974
|
+
return;
|
|
1975
|
+
button.classList.remove("pressed");
|
|
1976
|
+
delete button.dataset.press;
|
|
1977
|
+
}, 450);
|
|
1978
|
+
});
|
|
1935
1979
|
el("namespace", HTMLSelectElement).addEventListener("change", () => {
|
|
1936
1980
|
state.namespace = el("namespace", HTMLSelectElement).value;
|
|
1937
1981
|
refresh().catch(showError);
|
|
@@ -1942,7 +1986,7 @@ function bootAdmin(config) {
|
|
|
1942
1986
|
refresh().catch(showError);
|
|
1943
1987
|
});
|
|
1944
1988
|
el("refresh", HTMLButtonElement).addEventListener("click", () => {
|
|
1945
|
-
refresh().catch(showError);
|
|
1989
|
+
confirmAction(el("refresh", HTMLButtonElement), "Refreshing...", "Updated", () => refresh()).catch(showError);
|
|
1946
1990
|
});
|
|
1947
1991
|
el("collections", HTMLElement).addEventListener("click", (event) => {
|
|
1948
1992
|
const target = event.target;
|
|
@@ -2065,10 +2109,10 @@ function bootAdmin(config) {
|
|
|
2065
2109
|
}).then(() => renderFaults()).catch(showError);
|
|
2066
2110
|
});
|
|
2067
2111
|
el("fault-clear", HTMLButtonElement).addEventListener("click", () => {
|
|
2068
|
-
api("DELETE", "/faults").then(() => renderFaults()).catch(showError);
|
|
2112
|
+
confirmAction(el("fault-clear", HTMLButtonElement), "Clearing...", "Cleared", () => api("DELETE", "/faults").then(() => renderFaults())).catch(showError);
|
|
2069
2113
|
});
|
|
2070
2114
|
el("journal-clear", HTMLButtonElement).addEventListener("click", () => {
|
|
2071
|
-
api("DELETE", "/requests").then(() => renderJournal()).catch(showError);
|
|
2115
|
+
confirmAction(el("journal-clear", HTMLButtonElement), "Clearing...", "Cleared", () => api("DELETE", "/requests").then(() => renderJournal())).catch(showError);
|
|
2072
2116
|
});
|
|
2073
2117
|
el("route-list", HTMLElement).addEventListener("click", (event) => {
|
|
2074
2118
|
const target = event.target;
|
|
@@ -2183,9 +2227,13 @@ function bootAdmin(config) {
|
|
|
2183
2227
|
var clientPrelude = [isRecord2, mountAdminBrand, startAdminBrand, faultPresetList, bootAdmin].map((fn) => fn.toString()).join("\n");
|
|
2184
2228
|
var adminClientSource = (config) => {
|
|
2185
2229
|
const payload = JSON.stringify(config).replace(/</g, "\\u003c");
|
|
2230
|
+
const entry = bootAdmin.name;
|
|
2231
|
+
if (!/^[A-Za-z_$][\w$]*$/.test(entry)) {
|
|
2232
|
+
throw new Error("admin client cannot call its boot function");
|
|
2233
|
+
}
|
|
2186
2234
|
return `<script>
|
|
2187
2235
|
${clientPrelude}
|
|
2188
|
-
|
|
2236
|
+
${entry}(${payload});
|
|
2189
2237
|
</script>`;
|
|
2190
2238
|
};
|
|
2191
2239
|
|
|
@@ -2399,9 +2447,24 @@ var renderAdminDocument = (service) => {
|
|
|
2399
2447
|
.controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
|
|
2400
2448
|
label.field { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--faint); }
|
|
2401
2449
|
label.field input, label.field select, .controls input[type="password"] {
|
|
2402
|
-
background: var(--bg-inset); border: 1px solid var(--line); border-radius: 8px;
|
|
2403
|
-
padding: 7px 8px; min-height: 36px;
|
|
2404
|
-
}
|
|
2450
|
+
background-color: var(--bg-inset); border: 1px solid var(--line); border-radius: 8px;
|
|
2451
|
+
padding: 7px 8px; min-height: 36px; line-height: 1.2;
|
|
2452
|
+
}
|
|
2453
|
+
/* A native menu ignores min-height, so Preset rendered about half as tall as
|
|
2454
|
+
the text fields in the same form. Paint it like those fields. */
|
|
2455
|
+
label.field select {
|
|
2456
|
+
-webkit-appearance: none; appearance: none;
|
|
2457
|
+
padding-right: 28px;
|
|
2458
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%2371717a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M2.5 4.5 6 8l3.5-3.5'/%3E%3C/svg%3E");
|
|
2459
|
+
background-repeat: no-repeat; background-position: right 10px center; background-size: 12px 12px;
|
|
2460
|
+
}
|
|
2461
|
+
.stack > .field > input,
|
|
2462
|
+
.stack > .field > select,
|
|
2463
|
+
.stack > .field > textarea,
|
|
2464
|
+
dialog .field > input,
|
|
2465
|
+
dialog .field > select,
|
|
2466
|
+
dialog .field > textarea { width: 100%; }
|
|
2467
|
+
.icon-btn, .btn, .btn-primary, .btn-quiet, .btn-danger, nav.side button { cursor: pointer; }
|
|
2405
2468
|
.icon-btn, .btn, .btn-primary, .btn-quiet, .btn-danger {
|
|
2406
2469
|
border-radius: 9px; min-height: 36px; padding: 0 12px; border: 1px solid var(--line);
|
|
2407
2470
|
background: var(--bg-elev);
|
|
@@ -2409,6 +2472,14 @@ var renderAdminDocument = (service) => {
|
|
|
2409
2472
|
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
|
|
2410
2473
|
.btn-quiet { background: transparent; }
|
|
2411
2474
|
.btn-danger { color: var(--err); }
|
|
2475
|
+
/* Held after mouseup. Clearing an empty journal changes nothing on screen,
|
|
2476
|
+
so the press itself has to stay visible. */
|
|
2477
|
+
.icon-btn:active, .btn:active, .btn-quiet:active, .btn-danger:active, nav.side button:active,
|
|
2478
|
+
.icon-btn.pressed, .btn.pressed, .btn-quiet.pressed, .btn-danger.pressed, nav.side button.pressed {
|
|
2479
|
+
background: var(--bg-inset); border-color: var(--line-strong); color: var(--ink);
|
|
2480
|
+
}
|
|
2481
|
+
.btn-danger:active, .btn-danger.pressed { background: var(--err-soft); color: var(--err); }
|
|
2482
|
+
.btn-primary:active, .btn-primary.pressed { filter: brightness(0.88); color: var(--accent-ink); }
|
|
2412
2483
|
/* minmax(0, 1fr): a 1fr column will not shrink below its content, so a long
|
|
2413
2484
|
record or the full nav row would widen the page past the viewport. */
|
|
2414
2485
|
.layout {
|
|
@@ -2497,8 +2568,16 @@ var renderAdminDocument = (service) => {
|
|
|
2497
2568
|
input, select, textarea { font-size: 16px; }
|
|
2498
2569
|
.brand, .vendor, .controls { width: 100%; }
|
|
2499
2570
|
label.field, label.field select, label.field input { flex: 1; min-width: 0; }
|
|
2500
|
-
|
|
2571
|
+
/* The layout fills the screen. A single-column grid stretches every auto
|
|
2572
|
+
row, so the tab bar grew with the leftover height and the buttons floated
|
|
2573
|
+
in the middle of it. The bar stays one row; the page below takes the rest. */
|
|
2574
|
+
.layout {
|
|
2575
|
+
grid-template-columns: minmax(0, 1fr);
|
|
2576
|
+
grid-template-rows: auto minmax(0, 1fr);
|
|
2577
|
+
align-content: start;
|
|
2578
|
+
}
|
|
2501
2579
|
nav.side {
|
|
2580
|
+
align-self: start; height: auto;
|
|
2502
2581
|
flex-direction: row; align-items: center; overflow-x: auto; min-width: 0;
|
|
2503
2582
|
border-right: 0; border-bottom: 1px solid var(--line);
|
|
2504
2583
|
padding: 8px;
|
|
@@ -3596,7 +3675,7 @@ var stateAdminRoutes = (routes) => {
|
|
|
3596
3675
|
};
|
|
3597
3676
|
|
|
3598
3677
|
// ../core/dist/version.js
|
|
3599
|
-
var PACKAGE_VERSION = true ? "1.6.
|
|
3678
|
+
var PACKAGE_VERSION = true ? "1.6.1" : UNRELEASED_VERSION;
|
|
3600
3679
|
|
|
3601
3680
|
// ../core/dist/signing.js
|
|
3602
3681
|
var encoder = new TextEncoder();
|
|
@@ -5175,4 +5254,4 @@ export {
|
|
|
5175
5254
|
LIVEKIT_NAMESPACE,
|
|
5176
5255
|
LiveKitAPI
|
|
5177
5256
|
};
|
|
5178
|
-
//# sourceMappingURL=chunk-
|
|
5257
|
+
//# sourceMappingURL=chunk-KW4C4G6B.js.map
|