@crvouga/mockingbird-service-edamam 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-64ZMTOQQ.js → chunk-6LNDHRUX.js} +2 -2
- package/dist/{chunk-WAL6RI7F.js → chunk-JJTHVJWR.js} +89 -10
- package/dist/chunk-JJTHVJWR.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-WAL6RI7F.js.map +0 -7
- /package/dist/{chunk-64ZMTOQQ.js.map → chunk-6LNDHRUX.js.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
# Changelog — @crvouga/mockingbird-service-edamam
|
|
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-JJTHVJWR.js";
|
|
4
4
|
|
|
5
5
|
// ../../adapters/node/dist/cli.js
|
|
6
6
|
import { readFile } from "node:fs/promises";
|
|
@@ -356,4 +356,4 @@ export {
|
|
|
356
356
|
createServer2 as createServer,
|
|
357
357
|
serveTarget
|
|
358
358
|
};
|
|
359
|
-
//# sourceMappingURL=chunk-
|
|
359
|
+
//# sourceMappingURL=chunk-6LNDHRUX.js.map
|
|
@@ -2297,6 +2297,50 @@ function bootAdmin(config) {
|
|
|
2297
2297
|
if (render)
|
|
2298
2298
|
await render();
|
|
2299
2299
|
}
|
|
2300
|
+
const delay = (ms) => new Promise((resolve) => {
|
|
2301
|
+
window.setTimeout(resolve, ms);
|
|
2302
|
+
});
|
|
2303
|
+
const confirmAction = async (button, pending, done, work) => {
|
|
2304
|
+
if (button.dataset.pending === "1")
|
|
2305
|
+
return;
|
|
2306
|
+
const label = button.textContent ?? "";
|
|
2307
|
+
const width = button.offsetWidth;
|
|
2308
|
+
button.dataset.pending = "1";
|
|
2309
|
+
button.classList.add("pressed");
|
|
2310
|
+
button.setAttribute("aria-busy", "true");
|
|
2311
|
+
button.style.minWidth = `${width}px`;
|
|
2312
|
+
button.textContent = pending;
|
|
2313
|
+
try {
|
|
2314
|
+
await work();
|
|
2315
|
+
button.textContent = done;
|
|
2316
|
+
await delay(1e3);
|
|
2317
|
+
} catch (error) {
|
|
2318
|
+
showError(error);
|
|
2319
|
+
} finally {
|
|
2320
|
+
button.textContent = label;
|
|
2321
|
+
button.style.minWidth = "";
|
|
2322
|
+
button.classList.remove("pressed");
|
|
2323
|
+
button.removeAttribute("aria-busy");
|
|
2324
|
+
delete button.dataset.pending;
|
|
2325
|
+
}
|
|
2326
|
+
};
|
|
2327
|
+
document.addEventListener("click", (event) => {
|
|
2328
|
+
const target = event.target;
|
|
2329
|
+
if (!(target instanceof Element))
|
|
2330
|
+
return;
|
|
2331
|
+
const button = target.closest("button");
|
|
2332
|
+
if (!(button instanceof HTMLButtonElement) || button.dataset.pending === "1")
|
|
2333
|
+
return;
|
|
2334
|
+
button.classList.add("pressed");
|
|
2335
|
+
const token = String(Date.now());
|
|
2336
|
+
button.dataset.press = token;
|
|
2337
|
+
window.setTimeout(() => {
|
|
2338
|
+
if (button.dataset.press !== token || button.dataset.pending === "1")
|
|
2339
|
+
return;
|
|
2340
|
+
button.classList.remove("pressed");
|
|
2341
|
+
delete button.dataset.press;
|
|
2342
|
+
}, 450);
|
|
2343
|
+
});
|
|
2300
2344
|
el("namespace", HTMLSelectElement).addEventListener("change", () => {
|
|
2301
2345
|
state.namespace = el("namespace", HTMLSelectElement).value;
|
|
2302
2346
|
refresh().catch(showError);
|
|
@@ -2307,7 +2351,7 @@ function bootAdmin(config) {
|
|
|
2307
2351
|
refresh().catch(showError);
|
|
2308
2352
|
});
|
|
2309
2353
|
el("refresh", HTMLButtonElement).addEventListener("click", () => {
|
|
2310
|
-
refresh().catch(showError);
|
|
2354
|
+
confirmAction(el("refresh", HTMLButtonElement), "Refreshing...", "Updated", () => refresh()).catch(showError);
|
|
2311
2355
|
});
|
|
2312
2356
|
el("collections", HTMLElement).addEventListener("click", (event) => {
|
|
2313
2357
|
const target = event.target;
|
|
@@ -2430,10 +2474,10 @@ function bootAdmin(config) {
|
|
|
2430
2474
|
}).then(() => renderFaults()).catch(showError);
|
|
2431
2475
|
});
|
|
2432
2476
|
el("fault-clear", HTMLButtonElement).addEventListener("click", () => {
|
|
2433
|
-
api("DELETE", "/faults").then(() => renderFaults()).catch(showError);
|
|
2477
|
+
confirmAction(el("fault-clear", HTMLButtonElement), "Clearing...", "Cleared", () => api("DELETE", "/faults").then(() => renderFaults())).catch(showError);
|
|
2434
2478
|
});
|
|
2435
2479
|
el("journal-clear", HTMLButtonElement).addEventListener("click", () => {
|
|
2436
|
-
api("DELETE", "/requests").then(() => renderJournal()).catch(showError);
|
|
2480
|
+
confirmAction(el("journal-clear", HTMLButtonElement), "Clearing...", "Cleared", () => api("DELETE", "/requests").then(() => renderJournal())).catch(showError);
|
|
2437
2481
|
});
|
|
2438
2482
|
el("route-list", HTMLElement).addEventListener("click", (event) => {
|
|
2439
2483
|
const target = event.target;
|
|
@@ -2548,9 +2592,13 @@ function bootAdmin(config) {
|
|
|
2548
2592
|
var clientPrelude = [isRecord2, mountAdminBrand, startAdminBrand, faultPresetList, bootAdmin].map((fn) => fn.toString()).join("\n");
|
|
2549
2593
|
var adminClientSource = (config) => {
|
|
2550
2594
|
const payload = JSON.stringify(config).replace(/</g, "\\u003c");
|
|
2595
|
+
const entry = bootAdmin.name;
|
|
2596
|
+
if (!/^[A-Za-z_$][\w$]*$/.test(entry)) {
|
|
2597
|
+
throw new Error("admin client cannot call its boot function");
|
|
2598
|
+
}
|
|
2551
2599
|
return `<script>
|
|
2552
2600
|
${clientPrelude}
|
|
2553
|
-
|
|
2601
|
+
${entry}(${payload});
|
|
2554
2602
|
</script>`;
|
|
2555
2603
|
};
|
|
2556
2604
|
|
|
@@ -2764,9 +2812,24 @@ var renderAdminDocument = (service) => {
|
|
|
2764
2812
|
.controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
|
|
2765
2813
|
label.field { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--faint); }
|
|
2766
2814
|
label.field input, label.field select, .controls input[type="password"] {
|
|
2767
|
-
background: var(--bg-inset); border: 1px solid var(--line); border-radius: 8px;
|
|
2768
|
-
padding: 7px 8px; min-height: 36px;
|
|
2769
|
-
}
|
|
2815
|
+
background-color: var(--bg-inset); border: 1px solid var(--line); border-radius: 8px;
|
|
2816
|
+
padding: 7px 8px; min-height: 36px; line-height: 1.2;
|
|
2817
|
+
}
|
|
2818
|
+
/* A native menu ignores min-height, so Preset rendered about half as tall as
|
|
2819
|
+
the text fields in the same form. Paint it like those fields. */
|
|
2820
|
+
label.field select {
|
|
2821
|
+
-webkit-appearance: none; appearance: none;
|
|
2822
|
+
padding-right: 28px;
|
|
2823
|
+
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");
|
|
2824
|
+
background-repeat: no-repeat; background-position: right 10px center; background-size: 12px 12px;
|
|
2825
|
+
}
|
|
2826
|
+
.stack > .field > input,
|
|
2827
|
+
.stack > .field > select,
|
|
2828
|
+
.stack > .field > textarea,
|
|
2829
|
+
dialog .field > input,
|
|
2830
|
+
dialog .field > select,
|
|
2831
|
+
dialog .field > textarea { width: 100%; }
|
|
2832
|
+
.icon-btn, .btn, .btn-primary, .btn-quiet, .btn-danger, nav.side button { cursor: pointer; }
|
|
2770
2833
|
.icon-btn, .btn, .btn-primary, .btn-quiet, .btn-danger {
|
|
2771
2834
|
border-radius: 9px; min-height: 36px; padding: 0 12px; border: 1px solid var(--line);
|
|
2772
2835
|
background: var(--bg-elev);
|
|
@@ -2774,6 +2837,14 @@ var renderAdminDocument = (service) => {
|
|
|
2774
2837
|
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
|
|
2775
2838
|
.btn-quiet { background: transparent; }
|
|
2776
2839
|
.btn-danger { color: var(--err); }
|
|
2840
|
+
/* Held after mouseup. Clearing an empty journal changes nothing on screen,
|
|
2841
|
+
so the press itself has to stay visible. */
|
|
2842
|
+
.icon-btn:active, .btn:active, .btn-quiet:active, .btn-danger:active, nav.side button:active,
|
|
2843
|
+
.icon-btn.pressed, .btn.pressed, .btn-quiet.pressed, .btn-danger.pressed, nav.side button.pressed {
|
|
2844
|
+
background: var(--bg-inset); border-color: var(--line-strong); color: var(--ink);
|
|
2845
|
+
}
|
|
2846
|
+
.btn-danger:active, .btn-danger.pressed { background: var(--err-soft); color: var(--err); }
|
|
2847
|
+
.btn-primary:active, .btn-primary.pressed { filter: brightness(0.88); color: var(--accent-ink); }
|
|
2777
2848
|
/* minmax(0, 1fr): a 1fr column will not shrink below its content, so a long
|
|
2778
2849
|
record or the full nav row would widen the page past the viewport. */
|
|
2779
2850
|
.layout {
|
|
@@ -2862,8 +2933,16 @@ var renderAdminDocument = (service) => {
|
|
|
2862
2933
|
input, select, textarea { font-size: 16px; }
|
|
2863
2934
|
.brand, .vendor, .controls { width: 100%; }
|
|
2864
2935
|
label.field, label.field select, label.field input { flex: 1; min-width: 0; }
|
|
2865
|
-
|
|
2936
|
+
/* The layout fills the screen. A single-column grid stretches every auto
|
|
2937
|
+
row, so the tab bar grew with the leftover height and the buttons floated
|
|
2938
|
+
in the middle of it. The bar stays one row; the page below takes the rest. */
|
|
2939
|
+
.layout {
|
|
2940
|
+
grid-template-columns: minmax(0, 1fr);
|
|
2941
|
+
grid-template-rows: auto minmax(0, 1fr);
|
|
2942
|
+
align-content: start;
|
|
2943
|
+
}
|
|
2866
2944
|
nav.side {
|
|
2945
|
+
align-self: start; height: auto;
|
|
2867
2946
|
flex-direction: row; align-items: center; overflow-x: auto; min-width: 0;
|
|
2868
2947
|
border-right: 0; border-bottom: 1px solid var(--line);
|
|
2869
2948
|
padding: 8px;
|
|
@@ -3731,7 +3810,7 @@ var stateAdminRoutes = (routes) => {
|
|
|
3731
3810
|
};
|
|
3732
3811
|
|
|
3733
3812
|
// ../core/dist/version.js
|
|
3734
|
-
var PACKAGE_VERSION = true ? "1.6.
|
|
3813
|
+
var PACKAGE_VERSION = true ? "1.6.1" : UNRELEASED_VERSION;
|
|
3735
3814
|
|
|
3736
3815
|
// ../core/dist/signing.js
|
|
3737
3816
|
var encoder = new TextEncoder();
|
|
@@ -5748,4 +5827,4 @@ export {
|
|
|
5748
5827
|
appIdCredential,
|
|
5749
5828
|
EdamamAPI
|
|
5750
5829
|
};
|
|
5751
|
-
//# sourceMappingURL=chunk-
|
|
5830
|
+
//# sourceMappingURL=chunk-JJTHVJWR.js.map
|