@crvouga/mockingbird-service-edamam 1.6.0 → 1.7.0

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 CHANGED
@@ -1,6 +1,24 @@
1
1
  # Changelog — @crvouga/mockingbird-service-edamam
2
2
 
3
- ## 1.6.0 (2026-09-30)
3
+ ## 1.7.0 (2026-10-01)
4
+
5
+ ### Features
6
+
7
+ - record SQL timelines and serve the admin explorer ([8ced17a](https://github.com/crvouga/mockingbird/commit/8ced17ac398e386ef4e9d7e01fc7744c34b95d07))
8
+
9
+ ### Dependencies
10
+
11
+ - `@crvouga/mockingbird-service-sqlite`
12
+
13
+ ## 1.6.1 (2026-09-30)
14
+
15
+ ### Fixes and improvements
16
+
17
+ - keep admin buttons pressed until the action finishes ([0aabfcb](https://github.com/crvouga/mockingbird/commit/0aabfcb5f392aa51e193f9c3f817d5877d92bc6a))
18
+ - size admin select fields like the text inputs beside them ([0fb3ef2](https://github.com/crvouga/mockingbird/commit/0fb3ef2ddbf43376c93a2ae6d87c6c9bf890dafc))
19
+ - keep admin section tabs wired when boot is renamed ([4eda25e](https://github.com/crvouga/mockingbird/commit/4eda25eacd59da048d196f7cc8369d7a02b47bfc))
20
+
21
+ ## 1.6.0 (2026-09-29)
4
22
 
5
23
  ### Features
6
24
 
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createRuntime
3
- } from "./chunk-WAL6RI7F.js";
3
+ } from "./chunk-T5KB3LZL.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-64ZMTOQQ.js.map
359
+ //# sourceMappingURL=chunk-DY2FJKJG.js.map
@@ -1857,6 +1857,167 @@ function faultPresetList(value) {
1857
1857
  })
1858
1858
  };
1859
1859
  }
1860
+ function mountSqlExplorer(root, api) {
1861
+ const cell = (value) => {
1862
+ if (value === null || value === void 0)
1863
+ return "";
1864
+ if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
1865
+ return String(value);
1866
+ }
1867
+ return JSON.stringify(value) ?? "";
1868
+ };
1869
+ root.replaceChildren();
1870
+ const layout = document.createElement("div");
1871
+ layout.className = "sql-layout";
1872
+ const tables = document.createElement("div");
1873
+ tables.className = "sql-tables";
1874
+ const stack = document.createElement("div");
1875
+ stack.className = "stack";
1876
+ const banner = document.createElement("p");
1877
+ banner.className = "banner";
1878
+ const grid = document.createElement("div");
1879
+ const input = document.createElement("textarea");
1880
+ input.className = "sql-input";
1881
+ input.spellcheck = false;
1882
+ input.placeholder = "SELECT * FROM ...";
1883
+ const actions = document.createElement("div");
1884
+ actions.className = "row-actions";
1885
+ const run = document.createElement("button");
1886
+ run.type = "button";
1887
+ run.textContent = "Run";
1888
+ actions.append(run);
1889
+ const result = document.createElement("pre");
1890
+ stack.append(banner, grid, input, actions, result);
1891
+ layout.append(tables, stack);
1892
+ root.append(layout);
1893
+ const showError = (error) => {
1894
+ banner.textContent = error instanceof Error ? error.message : String(error);
1895
+ banner.classList.add("show");
1896
+ };
1897
+ const clearError = () => {
1898
+ banner.textContent = "";
1899
+ banner.classList.remove("show");
1900
+ };
1901
+ const renderGrid = (columns, rows) => {
1902
+ grid.replaceChildren();
1903
+ if (columns.length === 0) {
1904
+ const empty = document.createElement("p");
1905
+ empty.className = "empty";
1906
+ empty.textContent = "No rows.";
1907
+ grid.append(empty);
1908
+ return;
1909
+ }
1910
+ const table = document.createElement("table");
1911
+ const head = document.createElement("thead");
1912
+ const headRow = document.createElement("tr");
1913
+ for (const column of columns) {
1914
+ const th = document.createElement("th");
1915
+ th.textContent = column;
1916
+ headRow.append(th);
1917
+ }
1918
+ head.append(headRow);
1919
+ const body = document.createElement("tbody");
1920
+ for (const row of rows) {
1921
+ const tr = document.createElement("tr");
1922
+ for (const column of columns) {
1923
+ const td = document.createElement("td");
1924
+ td.dataset.label = column;
1925
+ td.textContent = cell(row[column]);
1926
+ tr.append(td);
1927
+ }
1928
+ body.append(tr);
1929
+ }
1930
+ table.append(head, body);
1931
+ grid.append(table);
1932
+ };
1933
+ const rowsOf = (value) => {
1934
+ if (!isRecord2(value) || !Array.isArray(value.rows))
1935
+ return [];
1936
+ return value.rows.flatMap((row) => isRecord2(row) ? [row] : []);
1937
+ };
1938
+ const columnsOf = (value, rows) => {
1939
+ if (isRecord2(value) && Array.isArray(value.columns)) {
1940
+ const named = value.columns.flatMap((column) => typeof column === "string" ? [column] : []);
1941
+ if (named.length > 0)
1942
+ return named;
1943
+ }
1944
+ const first = rows[0];
1945
+ return first === void 0 ? [] : Object.keys(first);
1946
+ };
1947
+ let selected = "";
1948
+ const loadPage = async (schema, name) => {
1949
+ selected = `${schema}.${name}`;
1950
+ const page = await api.get(`/sql/tables/${encodeURIComponent(schema)}/${encodeURIComponent(name)}?limit=50`);
1951
+ const rows = rowsOf(page);
1952
+ renderGrid(columnsOf(page, rows), rows);
1953
+ const total = isRecord2(page) && typeof page.total === "number" ? page.total : rows.length;
1954
+ result.textContent = `${selected} \xB7 ${total} rows`;
1955
+ for (const button of tables.querySelectorAll("button")) {
1956
+ if (!(button instanceof HTMLButtonElement))
1957
+ continue;
1958
+ button.setAttribute("aria-current", button.dataset.schema === schema && button.dataset.table === name ? "true" : "false");
1959
+ }
1960
+ };
1961
+ const loadTables = async () => {
1962
+ const payload = await api.get("/sql/tables");
1963
+ const listed = isRecord2(payload) && Array.isArray(payload.tables) ? payload.tables : [];
1964
+ tables.replaceChildren();
1965
+ if (listed.length === 0) {
1966
+ const empty = document.createElement("p");
1967
+ empty.className = "empty";
1968
+ empty.textContent = "No tables.";
1969
+ tables.append(empty);
1970
+ return;
1971
+ }
1972
+ for (const item of listed) {
1973
+ if (!isRecord2(item) || typeof item.schema !== "string" || typeof item.name !== "string")
1974
+ continue;
1975
+ const button = document.createElement("button");
1976
+ button.type = "button";
1977
+ button.dataset.schema = item.schema;
1978
+ button.dataset.table = item.name;
1979
+ button.textContent = `${item.schema}.${item.name}`;
1980
+ tables.append(button);
1981
+ }
1982
+ };
1983
+ tables.addEventListener("click", (event) => {
1984
+ const target = event.target;
1985
+ if (!(target instanceof Element))
1986
+ return;
1987
+ const button = target.closest("button");
1988
+ if (!(button instanceof HTMLButtonElement))
1989
+ return;
1990
+ const schema = button.dataset.schema;
1991
+ const name = button.dataset.table;
1992
+ if (schema === void 0 || name === void 0)
1993
+ return;
1994
+ clearError();
1995
+ loadPage(schema, name).catch(showError);
1996
+ });
1997
+ run.addEventListener("click", () => {
1998
+ const sql = input.value.trim();
1999
+ if (sql === "") {
2000
+ showError(new Error("Enter a statement"));
2001
+ return;
2002
+ }
2003
+ clearError();
2004
+ api.send("POST", "/sql/query", { sql }).then((payload) => {
2005
+ const rows = rowsOf(payload);
2006
+ renderGrid(columnsOf(payload, rows), rows);
2007
+ const count = isRecord2(payload) && typeof payload.rowCount === "number" ? payload.rowCount : rows.length;
2008
+ const truncated = isRecord2(payload) && payload.truncated === true ? " (truncated)" : "";
2009
+ result.textContent = `${count} rows${truncated}`;
2010
+ }).catch(showError);
2011
+ });
2012
+ const namespace = document.getElementById("namespace");
2013
+ if (namespace) {
2014
+ namespace.addEventListener("change", () => {
2015
+ clearError();
2016
+ loadTables().catch(showError);
2017
+ });
2018
+ }
2019
+ loadTables().catch(showError);
2020
+ }
1860
2021
  function bootAdmin(config) {
1861
2022
  const fieldKinds = ["string", "number", "boolean", "null", "object", "array", "unknown"];
1862
2023
  const sources = ["declared", "inferred", "mixed"];
@@ -2297,6 +2458,50 @@ function bootAdmin(config) {
2297
2458
  if (render)
2298
2459
  await render();
2299
2460
  }
2461
+ const delay = (ms) => new Promise((resolve) => {
2462
+ window.setTimeout(resolve, ms);
2463
+ });
2464
+ const confirmAction = async (button, pending, done, work) => {
2465
+ if (button.dataset.pending === "1")
2466
+ return;
2467
+ const label = button.textContent ?? "";
2468
+ const width = button.offsetWidth;
2469
+ button.dataset.pending = "1";
2470
+ button.classList.add("pressed");
2471
+ button.setAttribute("aria-busy", "true");
2472
+ button.style.minWidth = `${width}px`;
2473
+ button.textContent = pending;
2474
+ try {
2475
+ await work();
2476
+ button.textContent = done;
2477
+ await delay(1e3);
2478
+ } catch (error) {
2479
+ showError(error);
2480
+ } finally {
2481
+ button.textContent = label;
2482
+ button.style.minWidth = "";
2483
+ button.classList.remove("pressed");
2484
+ button.removeAttribute("aria-busy");
2485
+ delete button.dataset.pending;
2486
+ }
2487
+ };
2488
+ document.addEventListener("click", (event) => {
2489
+ const target = event.target;
2490
+ if (!(target instanceof Element))
2491
+ return;
2492
+ const button = target.closest("button");
2493
+ if (!(button instanceof HTMLButtonElement) || button.dataset.pending === "1")
2494
+ return;
2495
+ button.classList.add("pressed");
2496
+ const token = String(Date.now());
2497
+ button.dataset.press = token;
2498
+ window.setTimeout(() => {
2499
+ if (button.dataset.press !== token || button.dataset.pending === "1")
2500
+ return;
2501
+ button.classList.remove("pressed");
2502
+ delete button.dataset.press;
2503
+ }, 450);
2504
+ });
2300
2505
  el("namespace", HTMLSelectElement).addEventListener("change", () => {
2301
2506
  state.namespace = el("namespace", HTMLSelectElement).value;
2302
2507
  refresh().catch(showError);
@@ -2307,7 +2512,7 @@ function bootAdmin(config) {
2307
2512
  refresh().catch(showError);
2308
2513
  });
2309
2514
  el("refresh", HTMLButtonElement).addEventListener("click", () => {
2310
- refresh().catch(showError);
2515
+ confirmAction(el("refresh", HTMLButtonElement), "Refreshing...", "Updated", () => refresh()).catch(showError);
2311
2516
  });
2312
2517
  el("collections", HTMLElement).addEventListener("click", (event) => {
2313
2518
  const target = event.target;
@@ -2430,10 +2635,10 @@ function bootAdmin(config) {
2430
2635
  }).then(() => renderFaults()).catch(showError);
2431
2636
  });
2432
2637
  el("fault-clear", HTMLButtonElement).addEventListener("click", () => {
2433
- api("DELETE", "/faults").then(() => renderFaults()).catch(showError);
2638
+ confirmAction(el("fault-clear", HTMLButtonElement), "Clearing...", "Cleared", () => api("DELETE", "/faults").then(() => renderFaults())).catch(showError);
2434
2639
  });
2435
2640
  el("journal-clear", HTMLButtonElement).addEventListener("click", () => {
2436
- api("DELETE", "/requests").then(() => renderJournal()).catch(showError);
2641
+ confirmAction(el("journal-clear", HTMLButtonElement), "Clearing...", "Cleared", () => api("DELETE", "/requests").then(() => renderJournal())).catch(showError);
2437
2642
  });
2438
2643
  el("route-list", HTMLElement).addEventListener("click", (event) => {
2439
2644
  const target = event.target;
@@ -2489,6 +2694,22 @@ function bootAdmin(config) {
2489
2694
  panel.script = value.script;
2490
2695
  return panel;
2491
2696
  };
2697
+ const decodeExtension = (value) => {
2698
+ if (!isRecord2(value))
2699
+ return void 0;
2700
+ if (value.kind === "sql") {
2701
+ return {
2702
+ kind: "sql",
2703
+ id: typeof value.id === "string" && value.id !== "" ? value.id : "sql",
2704
+ title: typeof value.title === "string" && value.title !== "" ? value.title : "SQL",
2705
+ description: typeof value.description === "string" ? value.description : "Browse tables and run queries."
2706
+ };
2707
+ }
2708
+ if (value.kind !== "panel")
2709
+ return void 0;
2710
+ const panel = decodePanel(value);
2711
+ return panel === void 0 ? void 0 : { kind: "panel", ...panel };
2712
+ };
2492
2713
  const mountPanels = (panels) => {
2493
2714
  const nav = el("nav", HTMLElement);
2494
2715
  const views = el("views", HTMLElement);
@@ -2542,15 +2763,57 @@ function bootAdmin(config) {
2542
2763
  return decoded === void 0 ? [] : [decoded];
2543
2764
  });
2544
2765
  mountPanels(panels);
2766
+ const extensions = requireList(isRecord2(manifest) ? manifest.extensions : void 0, "Extensions").flatMap((extension) => {
2767
+ const decoded = decodeExtension(extension);
2768
+ return decoded === void 0 ? [] : [decoded];
2769
+ });
2770
+ const extensionPanels = extensions.flatMap((extension) => extension.kind === "panel" ? [extension] : []);
2771
+ mountPanels(extensionPanels);
2772
+ for (const extension of extensions) {
2773
+ if (extension.kind !== "sql")
2774
+ continue;
2775
+ const nav = el("nav", HTMLElement);
2776
+ const views = el("views", HTMLElement);
2777
+ const button = document.createElement("button");
2778
+ button.type = "button";
2779
+ button.dataset.view = extension.id;
2780
+ button.textContent = extension.title;
2781
+ nav.append(button);
2782
+ const section = document.createElement("section");
2783
+ section.className = "view";
2784
+ section.id = `view-${extension.id}`;
2785
+ section.hidden = true;
2786
+ const title = document.createElement("h2");
2787
+ title.textContent = extension.title;
2788
+ const lede = document.createElement("p");
2789
+ lede.className = "lede";
2790
+ lede.textContent = extension.description;
2791
+ const body = document.createElement("div");
2792
+ body.className = "panel-body";
2793
+ section.append(title, lede, body);
2794
+ views.append(section);
2795
+ mountSqlExplorer(body, panelApi);
2796
+ }
2545
2797
  return refresh();
2546
2798
  }).catch(showError);
2547
2799
  }
2548
- var clientPrelude = [isRecord2, mountAdminBrand, startAdminBrand, faultPresetList, bootAdmin].map((fn) => fn.toString()).join("\n");
2800
+ var clientPrelude = [
2801
+ isRecord2,
2802
+ mountAdminBrand,
2803
+ startAdminBrand,
2804
+ faultPresetList,
2805
+ mountSqlExplorer,
2806
+ bootAdmin
2807
+ ].map((fn) => fn.toString()).join("\n");
2549
2808
  var adminClientSource = (config) => {
2550
2809
  const payload = JSON.stringify(config).replace(/</g, "\\u003c");
2810
+ const entry = bootAdmin.name;
2811
+ if (!/^[A-Za-z_$][\w$]*$/.test(entry)) {
2812
+ throw new Error("admin client cannot call its boot function");
2813
+ }
2551
2814
  return `<script>
2552
2815
  ${clientPrelude}
2553
- bootAdmin(${payload});
2816
+ ${entry}(${payload});
2554
2817
  </script>`;
2555
2818
  };
2556
2819
 
@@ -2591,19 +2854,33 @@ var STANDARD_ADMIN_ROUTES = [
2591
2854
  "GET /ui/manifest"
2592
2855
  ];
2593
2856
  var PANEL_ID = /^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$/;
2857
+ var RESERVED_VIEWS = /* @__PURE__ */ new Set(["overview", "state", "clock", "faults", "journal", "routes"]);
2858
+ var checkPanel = (panel, seen, label) => {
2859
+ if (!PANEL_ID.test(panel.id)) {
2860
+ throw new RangeError(`${label} id must match ${PANEL_ID}: ${JSON.stringify(panel.id)}`);
2861
+ }
2862
+ if (RESERVED_VIEWS.has(panel.id)) {
2863
+ throw new RangeError(`${label} id ${panel.id} is reserved by the admin shell`);
2864
+ }
2865
+ if (seen.has(panel.id))
2866
+ throw new RangeError(`duplicate admin view id ${panel.id}`);
2867
+ seen.add(panel.id);
2868
+ if (panel.title.trim() === "")
2869
+ throw new RangeError(`${label} ${panel.id} needs a title`);
2870
+ };
2594
2871
  var assertAdminUi = (ui) => {
2595
- if (!ui?.panels)
2872
+ if (!ui)
2596
2873
  return;
2597
2874
  const seen = /* @__PURE__ */ new Set();
2598
- for (const panel of ui.panels) {
2599
- if (!PANEL_ID.test(panel.id)) {
2600
- throw new RangeError(`admin panel id must match ${PANEL_ID}: ${JSON.stringify(panel.id)}`);
2875
+ for (const panel of ui.panels ?? [])
2876
+ checkPanel(panel, seen, "admin panel");
2877
+ for (const extension of ui.extensions ?? []) {
2878
+ if (extension.kind === "panel") {
2879
+ checkPanel(extension, seen, "admin extension");
2880
+ continue;
2601
2881
  }
2602
- if (seen.has(panel.id))
2603
- throw new RangeError(`duplicate admin panel id ${panel.id}`);
2604
- seen.add(panel.id);
2605
- if (panel.title.trim() === "")
2606
- throw new RangeError(`admin panel ${panel.id} needs a title`);
2882
+ const id = extension.id ?? "sql";
2883
+ checkPanel({ id, title: extension.title ?? "SQL" }, seen, "admin extension");
2607
2884
  }
2608
2885
  };
2609
2886
 
@@ -2764,9 +3041,24 @@ var renderAdminDocument = (service) => {
2764
3041
  .controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
2765
3042
  label.field { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--faint); }
2766
3043
  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
- }
3044
+ background-color: var(--bg-inset); border: 1px solid var(--line); border-radius: 8px;
3045
+ padding: 7px 8px; min-height: 36px; line-height: 1.2;
3046
+ }
3047
+ /* A native menu ignores min-height, so Preset rendered about half as tall as
3048
+ the text fields in the same form. Paint it like those fields. */
3049
+ label.field select {
3050
+ -webkit-appearance: none; appearance: none;
3051
+ padding-right: 28px;
3052
+ 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");
3053
+ background-repeat: no-repeat; background-position: right 10px center; background-size: 12px 12px;
3054
+ }
3055
+ .stack > .field > input,
3056
+ .stack > .field > select,
3057
+ .stack > .field > textarea,
3058
+ dialog .field > input,
3059
+ dialog .field > select,
3060
+ dialog .field > textarea { width: 100%; }
3061
+ .icon-btn, .btn, .btn-primary, .btn-quiet, .btn-danger, nav.side button { cursor: pointer; }
2770
3062
  .icon-btn, .btn, .btn-primary, .btn-quiet, .btn-danger {
2771
3063
  border-radius: 9px; min-height: 36px; padding: 0 12px; border: 1px solid var(--line);
2772
3064
  background: var(--bg-elev);
@@ -2774,6 +3066,14 @@ var renderAdminDocument = (service) => {
2774
3066
  .btn-primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
2775
3067
  .btn-quiet { background: transparent; }
2776
3068
  .btn-danger { color: var(--err); }
3069
+ /* Held after mouseup. Clearing an empty journal changes nothing on screen,
3070
+ so the press itself has to stay visible. */
3071
+ .icon-btn:active, .btn:active, .btn-quiet:active, .btn-danger:active, nav.side button:active,
3072
+ .icon-btn.pressed, .btn.pressed, .btn-quiet.pressed, .btn-danger.pressed, nav.side button.pressed {
3073
+ background: var(--bg-inset); border-color: var(--line-strong); color: var(--ink);
3074
+ }
3075
+ .btn-danger:active, .btn-danger.pressed { background: var(--err-soft); color: var(--err); }
3076
+ .btn-primary:active, .btn-primary.pressed { filter: brightness(0.88); color: var(--accent-ink); }
2777
3077
  /* minmax(0, 1fr): a 1fr column will not shrink below its content, so a long
2778
3078
  record or the full nav row would widen the page past the viewport. */
2779
3079
  .layout {
@@ -2814,6 +3114,12 @@ var renderAdminDocument = (service) => {
2814
3114
  border-radius: 999px; padding: 4px 8px;
2815
3115
  }
2816
3116
  .chip i { color: var(--faint); font-style: normal; }
3117
+ .sql-layout {
3118
+ display: grid; grid-template-columns: minmax(10rem, 16rem) minmax(0, 1fr); gap: 16px;
3119
+ }
3120
+ .sql-tables { display: flex; flex-direction: column; gap: 4px; max-height: 28rem; overflow: auto; }
3121
+ .sql-tables button { text-align: left; }
3122
+ .sql-input { font-family: var(--mono); min-height: 7rem; width: 100%; }
2817
3123
  table { width: 100%; border-collapse: collapse; font-size: 14px; }
2818
3124
  th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
2819
3125
  th { color: var(--faint); font-weight: 600; font-size: 12px; }
@@ -2862,14 +3168,22 @@ var renderAdminDocument = (service) => {
2862
3168
  input, select, textarea { font-size: 16px; }
2863
3169
  .brand, .vendor, .controls { width: 100%; }
2864
3170
  label.field, label.field select, label.field input { flex: 1; min-width: 0; }
2865
- .layout { grid-template-columns: minmax(0, 1fr); }
3171
+ /* The layout fills the screen. A single-column grid stretches every auto
3172
+ row, so the tab bar grew with the leftover height and the buttons floated
3173
+ in the middle of it. The bar stays one row; the page below takes the rest. */
3174
+ .layout {
3175
+ grid-template-columns: minmax(0, 1fr);
3176
+ grid-template-rows: auto minmax(0, 1fr);
3177
+ align-content: start;
3178
+ }
2866
3179
  nav.side {
3180
+ align-self: start; height: auto;
2867
3181
  flex-direction: row; align-items: center; overflow-x: auto; min-width: 0;
2868
3182
  border-right: 0; border-bottom: 1px solid var(--line);
2869
3183
  padding: 8px;
2870
3184
  }
2871
3185
  nav.side button { white-space: nowrap; flex: none; }
2872
- .split { grid-template-columns: minmax(0, 1fr); }
3186
+ .split, .sql-layout { grid-template-columns: minmax(0, 1fr); }
2873
3187
  main { padding: 14px; }
2874
3188
  table, thead, tbody, tr, th, td { display: block; }
2875
3189
  thead { display: none; }
@@ -3040,6 +3354,24 @@ var json2 = (body) => new Response(JSON.stringify(body), {
3040
3354
  status: 200,
3041
3355
  headers: { "content-type": "application/json; charset=utf-8" }
3042
3356
  });
3357
+ var describeExtension = (extension) => {
3358
+ if (extension.kind === "sql") {
3359
+ return {
3360
+ kind: "sql",
3361
+ id: extension.id ?? "sql",
3362
+ title: extension.title ?? "SQL",
3363
+ ...extension.description !== void 0 ? { description: extension.description } : {}
3364
+ };
3365
+ }
3366
+ return {
3367
+ kind: "panel",
3368
+ id: extension.id,
3369
+ title: extension.title,
3370
+ ...extension.description !== void 0 ? { description: extension.description } : {},
3371
+ html: extension.html,
3372
+ ...extension.script !== void 0 ? { script: extension.script } : {}
3373
+ };
3374
+ };
3043
3375
  var adminUiRoutes = (service, ui) => {
3044
3376
  const shell = () => renderAdminDocument(service);
3045
3377
  const document3 = () => ui?.render ? ui.render({ service, defaultHtml: shell }) : shell();
@@ -3054,7 +3386,8 @@ var adminUiRoutes = (service, ui) => {
3054
3386
  ...panel.description !== void 0 ? { description: panel.description } : {},
3055
3387
  html: panel.html,
3056
3388
  ...panel.script !== void 0 ? { script: panel.script } : {}
3057
- }))
3389
+ })),
3390
+ extensions: (ui?.extensions ?? []).map(describeExtension)
3058
3391
  })
3059
3392
  };
3060
3393
  };
@@ -3731,7 +4064,7 @@ var stateAdminRoutes = (routes) => {
3731
4064
  };
3732
4065
 
3733
4066
  // ../core/dist/version.js
3734
- var PACKAGE_VERSION = true ? "1.6.0" : UNRELEASED_VERSION;
4067
+ var PACKAGE_VERSION = true ? "1.7.0" : UNRELEASED_VERSION;
3735
4068
 
3736
4069
  // ../core/dist/signing.js
3737
4070
  var encoder = new TextEncoder();
@@ -5748,4 +6081,4 @@ export {
5748
6081
  appIdCredential,
5749
6082
  EdamamAPI
5750
6083
  };
5751
- //# sourceMappingURL=chunk-WAL6RI7F.js.map
6084
+ //# sourceMappingURL=chunk-T5KB3LZL.js.map