@crvouga/mockingbird-service-flex 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-flex
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
 
@@ -1925,6 +1925,167 @@ function faultPresetList(value) {
1925
1925
  })
1926
1926
  };
1927
1927
  }
1928
+ function mountSqlExplorer(root, api) {
1929
+ const cell = (value) => {
1930
+ if (value === null || value === void 0)
1931
+ return "";
1932
+ if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
1933
+ return String(value);
1934
+ }
1935
+ return JSON.stringify(value) ?? "";
1936
+ };
1937
+ root.replaceChildren();
1938
+ const layout2 = document.createElement("div");
1939
+ layout2.className = "sql-layout";
1940
+ const tables = document.createElement("div");
1941
+ tables.className = "sql-tables";
1942
+ const stack = document.createElement("div");
1943
+ stack.className = "stack";
1944
+ const banner = document.createElement("p");
1945
+ banner.className = "banner";
1946
+ const grid = document.createElement("div");
1947
+ const input = document.createElement("textarea");
1948
+ input.className = "sql-input";
1949
+ input.spellcheck = false;
1950
+ input.placeholder = "SELECT * FROM ...";
1951
+ const actions = document.createElement("div");
1952
+ actions.className = "row-actions";
1953
+ const run = document.createElement("button");
1954
+ run.type = "button";
1955
+ run.textContent = "Run";
1956
+ actions.append(run);
1957
+ const result = document.createElement("pre");
1958
+ stack.append(banner, grid, input, actions, result);
1959
+ layout2.append(tables, stack);
1960
+ root.append(layout2);
1961
+ const showError = (error2) => {
1962
+ banner.textContent = error2 instanceof Error ? error2.message : String(error2);
1963
+ banner.classList.add("show");
1964
+ };
1965
+ const clearError = () => {
1966
+ banner.textContent = "";
1967
+ banner.classList.remove("show");
1968
+ };
1969
+ const renderGrid = (columns, rows) => {
1970
+ grid.replaceChildren();
1971
+ if (columns.length === 0) {
1972
+ const empty = document.createElement("p");
1973
+ empty.className = "empty";
1974
+ empty.textContent = "No rows.";
1975
+ grid.append(empty);
1976
+ return;
1977
+ }
1978
+ const table = document.createElement("table");
1979
+ const head = document.createElement("thead");
1980
+ const headRow = document.createElement("tr");
1981
+ for (const column of columns) {
1982
+ const th = document.createElement("th");
1983
+ th.textContent = column;
1984
+ headRow.append(th);
1985
+ }
1986
+ head.append(headRow);
1987
+ const body = document.createElement("tbody");
1988
+ for (const row of rows) {
1989
+ const tr = document.createElement("tr");
1990
+ for (const column of columns) {
1991
+ const td = document.createElement("td");
1992
+ td.dataset.label = column;
1993
+ td.textContent = cell(row[column]);
1994
+ tr.append(td);
1995
+ }
1996
+ body.append(tr);
1997
+ }
1998
+ table.append(head, body);
1999
+ grid.append(table);
2000
+ };
2001
+ const rowsOf = (value) => {
2002
+ if (!isRecord2(value) || !Array.isArray(value.rows))
2003
+ return [];
2004
+ return value.rows.flatMap((row) => isRecord2(row) ? [row] : []);
2005
+ };
2006
+ const columnsOf = (value, rows) => {
2007
+ if (isRecord2(value) && Array.isArray(value.columns)) {
2008
+ const named = value.columns.flatMap((column) => typeof column === "string" ? [column] : []);
2009
+ if (named.length > 0)
2010
+ return named;
2011
+ }
2012
+ const first = rows[0];
2013
+ return first === void 0 ? [] : Object.keys(first);
2014
+ };
2015
+ let selected = "";
2016
+ const loadPage = async (schema, name) => {
2017
+ selected = `${schema}.${name}`;
2018
+ const page = await api.get(`/sql/tables/${encodeURIComponent(schema)}/${encodeURIComponent(name)}?limit=50`);
2019
+ const rows = rowsOf(page);
2020
+ renderGrid(columnsOf(page, rows), rows);
2021
+ const total = isRecord2(page) && typeof page.total === "number" ? page.total : rows.length;
2022
+ result.textContent = `${selected} \xB7 ${total} rows`;
2023
+ for (const button of tables.querySelectorAll("button")) {
2024
+ if (!(button instanceof HTMLButtonElement))
2025
+ continue;
2026
+ button.setAttribute("aria-current", button.dataset.schema === schema && button.dataset.table === name ? "true" : "false");
2027
+ }
2028
+ };
2029
+ const loadTables = async () => {
2030
+ const payload = await api.get("/sql/tables");
2031
+ const listed = isRecord2(payload) && Array.isArray(payload.tables) ? payload.tables : [];
2032
+ tables.replaceChildren();
2033
+ if (listed.length === 0) {
2034
+ const empty = document.createElement("p");
2035
+ empty.className = "empty";
2036
+ empty.textContent = "No tables.";
2037
+ tables.append(empty);
2038
+ return;
2039
+ }
2040
+ for (const item of listed) {
2041
+ if (!isRecord2(item) || typeof item.schema !== "string" || typeof item.name !== "string")
2042
+ continue;
2043
+ const button = document.createElement("button");
2044
+ button.type = "button";
2045
+ button.dataset.schema = item.schema;
2046
+ button.dataset.table = item.name;
2047
+ button.textContent = `${item.schema}.${item.name}`;
2048
+ tables.append(button);
2049
+ }
2050
+ };
2051
+ tables.addEventListener("click", (event) => {
2052
+ const target = event.target;
2053
+ if (!(target instanceof Element))
2054
+ return;
2055
+ const button = target.closest("button");
2056
+ if (!(button instanceof HTMLButtonElement))
2057
+ return;
2058
+ const schema = button.dataset.schema;
2059
+ const name = button.dataset.table;
2060
+ if (schema === void 0 || name === void 0)
2061
+ return;
2062
+ clearError();
2063
+ loadPage(schema, name).catch(showError);
2064
+ });
2065
+ run.addEventListener("click", () => {
2066
+ const sql = input.value.trim();
2067
+ if (sql === "") {
2068
+ showError(new Error("Enter a statement"));
2069
+ return;
2070
+ }
2071
+ clearError();
2072
+ api.send("POST", "/sql/query", { sql }).then((payload) => {
2073
+ const rows = rowsOf(payload);
2074
+ renderGrid(columnsOf(payload, rows), rows);
2075
+ const count = isRecord2(payload) && typeof payload.rowCount === "number" ? payload.rowCount : rows.length;
2076
+ const truncated = isRecord2(payload) && payload.truncated === true ? " (truncated)" : "";
2077
+ result.textContent = `${count} rows${truncated}`;
2078
+ }).catch(showError);
2079
+ });
2080
+ const namespace = document.getElementById("namespace");
2081
+ if (namespace) {
2082
+ namespace.addEventListener("change", () => {
2083
+ clearError();
2084
+ loadTables().catch(showError);
2085
+ });
2086
+ }
2087
+ loadTables().catch(showError);
2088
+ }
1928
2089
  function bootAdmin(config) {
1929
2090
  const fieldKinds = ["string", "number", "boolean", "null", "object", "array", "unknown"];
1930
2091
  const sources = ["declared", "inferred", "mixed"];
@@ -2365,6 +2526,50 @@ function bootAdmin(config) {
2365
2526
  if (render)
2366
2527
  await render();
2367
2528
  }
2529
+ const delay = (ms) => new Promise((resolve) => {
2530
+ window.setTimeout(resolve, ms);
2531
+ });
2532
+ const confirmAction = async (button, pending, done, work) => {
2533
+ if (button.dataset.pending === "1")
2534
+ return;
2535
+ const label = button.textContent ?? "";
2536
+ const width = button.offsetWidth;
2537
+ button.dataset.pending = "1";
2538
+ button.classList.add("pressed");
2539
+ button.setAttribute("aria-busy", "true");
2540
+ button.style.minWidth = `${width}px`;
2541
+ button.textContent = pending;
2542
+ try {
2543
+ await work();
2544
+ button.textContent = done;
2545
+ await delay(1e3);
2546
+ } catch (error2) {
2547
+ showError(error2);
2548
+ } finally {
2549
+ button.textContent = label;
2550
+ button.style.minWidth = "";
2551
+ button.classList.remove("pressed");
2552
+ button.removeAttribute("aria-busy");
2553
+ delete button.dataset.pending;
2554
+ }
2555
+ };
2556
+ document.addEventListener("click", (event) => {
2557
+ const target = event.target;
2558
+ if (!(target instanceof Element))
2559
+ return;
2560
+ const button = target.closest("button");
2561
+ if (!(button instanceof HTMLButtonElement) || button.dataset.pending === "1")
2562
+ return;
2563
+ button.classList.add("pressed");
2564
+ const token = String(Date.now());
2565
+ button.dataset.press = token;
2566
+ window.setTimeout(() => {
2567
+ if (button.dataset.press !== token || button.dataset.pending === "1")
2568
+ return;
2569
+ button.classList.remove("pressed");
2570
+ delete button.dataset.press;
2571
+ }, 450);
2572
+ });
2368
2573
  el("namespace", HTMLSelectElement).addEventListener("change", () => {
2369
2574
  state.namespace = el("namespace", HTMLSelectElement).value;
2370
2575
  refresh().catch(showError);
@@ -2375,7 +2580,7 @@ function bootAdmin(config) {
2375
2580
  refresh().catch(showError);
2376
2581
  });
2377
2582
  el("refresh", HTMLButtonElement).addEventListener("click", () => {
2378
- refresh().catch(showError);
2583
+ confirmAction(el("refresh", HTMLButtonElement), "Refreshing...", "Updated", () => refresh()).catch(showError);
2379
2584
  });
2380
2585
  el("collections", HTMLElement).addEventListener("click", (event) => {
2381
2586
  const target = event.target;
@@ -2498,10 +2703,10 @@ function bootAdmin(config) {
2498
2703
  }).then(() => renderFaults()).catch(showError);
2499
2704
  });
2500
2705
  el("fault-clear", HTMLButtonElement).addEventListener("click", () => {
2501
- api("DELETE", "/faults").then(() => renderFaults()).catch(showError);
2706
+ confirmAction(el("fault-clear", HTMLButtonElement), "Clearing...", "Cleared", () => api("DELETE", "/faults").then(() => renderFaults())).catch(showError);
2502
2707
  });
2503
2708
  el("journal-clear", HTMLButtonElement).addEventListener("click", () => {
2504
- api("DELETE", "/requests").then(() => renderJournal()).catch(showError);
2709
+ confirmAction(el("journal-clear", HTMLButtonElement), "Clearing...", "Cleared", () => api("DELETE", "/requests").then(() => renderJournal())).catch(showError);
2505
2710
  });
2506
2711
  el("route-list", HTMLElement).addEventListener("click", (event) => {
2507
2712
  const target = event.target;
@@ -2557,6 +2762,22 @@ function bootAdmin(config) {
2557
2762
  panel.script = value.script;
2558
2763
  return panel;
2559
2764
  };
2765
+ const decodeExtension = (value) => {
2766
+ if (!isRecord2(value))
2767
+ return void 0;
2768
+ if (value.kind === "sql") {
2769
+ return {
2770
+ kind: "sql",
2771
+ id: typeof value.id === "string" && value.id !== "" ? value.id : "sql",
2772
+ title: typeof value.title === "string" && value.title !== "" ? value.title : "SQL",
2773
+ description: typeof value.description === "string" ? value.description : "Browse tables and run queries."
2774
+ };
2775
+ }
2776
+ if (value.kind !== "panel")
2777
+ return void 0;
2778
+ const panel = decodePanel(value);
2779
+ return panel === void 0 ? void 0 : { kind: "panel", ...panel };
2780
+ };
2560
2781
  const mountPanels = (panels) => {
2561
2782
  const nav = el("nav", HTMLElement);
2562
2783
  const views = el("views", HTMLElement);
@@ -2610,15 +2831,57 @@ function bootAdmin(config) {
2610
2831
  return decoded === void 0 ? [] : [decoded];
2611
2832
  });
2612
2833
  mountPanels(panels);
2834
+ const extensions = requireList(isRecord2(manifest) ? manifest.extensions : void 0, "Extensions").flatMap((extension) => {
2835
+ const decoded = decodeExtension(extension);
2836
+ return decoded === void 0 ? [] : [decoded];
2837
+ });
2838
+ const extensionPanels = extensions.flatMap((extension) => extension.kind === "panel" ? [extension] : []);
2839
+ mountPanels(extensionPanels);
2840
+ for (const extension of extensions) {
2841
+ if (extension.kind !== "sql")
2842
+ continue;
2843
+ const nav = el("nav", HTMLElement);
2844
+ const views = el("views", HTMLElement);
2845
+ const button = document.createElement("button");
2846
+ button.type = "button";
2847
+ button.dataset.view = extension.id;
2848
+ button.textContent = extension.title;
2849
+ nav.append(button);
2850
+ const section = document.createElement("section");
2851
+ section.className = "view";
2852
+ section.id = `view-${extension.id}`;
2853
+ section.hidden = true;
2854
+ const title = document.createElement("h2");
2855
+ title.textContent = extension.title;
2856
+ const lede = document.createElement("p");
2857
+ lede.className = "lede";
2858
+ lede.textContent = extension.description;
2859
+ const body = document.createElement("div");
2860
+ body.className = "panel-body";
2861
+ section.append(title, lede, body);
2862
+ views.append(section);
2863
+ mountSqlExplorer(body, panelApi);
2864
+ }
2613
2865
  return refresh();
2614
2866
  }).catch(showError);
2615
2867
  }
2616
- var clientPrelude = [isRecord2, mountAdminBrand, startAdminBrand, faultPresetList, bootAdmin].map((fn) => fn.toString()).join("\n");
2868
+ var clientPrelude = [
2869
+ isRecord2,
2870
+ mountAdminBrand,
2871
+ startAdminBrand,
2872
+ faultPresetList,
2873
+ mountSqlExplorer,
2874
+ bootAdmin
2875
+ ].map((fn) => fn.toString()).join("\n");
2617
2876
  var adminClientSource = (config) => {
2618
2877
  const payload = JSON.stringify(config).replace(/</g, "\\u003c");
2878
+ const entry = bootAdmin.name;
2879
+ if (!/^[A-Za-z_$][\w$]*$/.test(entry)) {
2880
+ throw new Error("admin client cannot call its boot function");
2881
+ }
2619
2882
  return `<script>
2620
2883
  ${clientPrelude}
2621
- bootAdmin(${payload});
2884
+ ${entry}(${payload});
2622
2885
  </script>`;
2623
2886
  };
2624
2887
 
@@ -2659,19 +2922,33 @@ var STANDARD_ADMIN_ROUTES = [
2659
2922
  "GET /ui/manifest"
2660
2923
  ];
2661
2924
  var PANEL_ID = /^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$/;
2925
+ var RESERVED_VIEWS = /* @__PURE__ */ new Set(["overview", "state", "clock", "faults", "journal", "routes"]);
2926
+ var checkPanel = (panel, seen, label) => {
2927
+ if (!PANEL_ID.test(panel.id)) {
2928
+ throw new RangeError(`${label} id must match ${PANEL_ID}: ${JSON.stringify(panel.id)}`);
2929
+ }
2930
+ if (RESERVED_VIEWS.has(panel.id)) {
2931
+ throw new RangeError(`${label} id ${panel.id} is reserved by the admin shell`);
2932
+ }
2933
+ if (seen.has(panel.id))
2934
+ throw new RangeError(`duplicate admin view id ${panel.id}`);
2935
+ seen.add(panel.id);
2936
+ if (panel.title.trim() === "")
2937
+ throw new RangeError(`${label} ${panel.id} needs a title`);
2938
+ };
2662
2939
  var assertAdminUi = (ui) => {
2663
- if (!ui?.panels)
2940
+ if (!ui)
2664
2941
  return;
2665
2942
  const seen = /* @__PURE__ */ new Set();
2666
- for (const panel of ui.panels) {
2667
- if (!PANEL_ID.test(panel.id)) {
2668
- throw new RangeError(`admin panel id must match ${PANEL_ID}: ${JSON.stringify(panel.id)}`);
2943
+ for (const panel of ui.panels ?? [])
2944
+ checkPanel(panel, seen, "admin panel");
2945
+ for (const extension of ui.extensions ?? []) {
2946
+ if (extension.kind === "panel") {
2947
+ checkPanel(extension, seen, "admin extension");
2948
+ continue;
2669
2949
  }
2670
- if (seen.has(panel.id))
2671
- throw new RangeError(`duplicate admin panel id ${panel.id}`);
2672
- seen.add(panel.id);
2673
- if (panel.title.trim() === "")
2674
- throw new RangeError(`admin panel ${panel.id} needs a title`);
2950
+ const id = extension.id ?? "sql";
2951
+ checkPanel({ id, title: extension.title ?? "SQL" }, seen, "admin extension");
2675
2952
  }
2676
2953
  };
2677
2954
 
@@ -2832,9 +3109,24 @@ var renderAdminDocument = (service) => {
2832
3109
  .controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
2833
3110
  label.field { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--faint); }
2834
3111
  label.field input, label.field select, .controls input[type="password"] {
2835
- background: var(--bg-inset); border: 1px solid var(--line); border-radius: 8px;
2836
- padding: 7px 8px; min-height: 36px;
2837
- }
3112
+ background-color: var(--bg-inset); border: 1px solid var(--line); border-radius: 8px;
3113
+ padding: 7px 8px; min-height: 36px; line-height: 1.2;
3114
+ }
3115
+ /* A native menu ignores min-height, so Preset rendered about half as tall as
3116
+ the text fields in the same form. Paint it like those fields. */
3117
+ label.field select {
3118
+ -webkit-appearance: none; appearance: none;
3119
+ padding-right: 28px;
3120
+ 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");
3121
+ background-repeat: no-repeat; background-position: right 10px center; background-size: 12px 12px;
3122
+ }
3123
+ .stack > .field > input,
3124
+ .stack > .field > select,
3125
+ .stack > .field > textarea,
3126
+ dialog .field > input,
3127
+ dialog .field > select,
3128
+ dialog .field > textarea { width: 100%; }
3129
+ .icon-btn, .btn, .btn-primary, .btn-quiet, .btn-danger, nav.side button { cursor: pointer; }
2838
3130
  .icon-btn, .btn, .btn-primary, .btn-quiet, .btn-danger {
2839
3131
  border-radius: 9px; min-height: 36px; padding: 0 12px; border: 1px solid var(--line);
2840
3132
  background: var(--bg-elev);
@@ -2842,6 +3134,14 @@ var renderAdminDocument = (service) => {
2842
3134
  .btn-primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
2843
3135
  .btn-quiet { background: transparent; }
2844
3136
  .btn-danger { color: var(--err); }
3137
+ /* Held after mouseup. Clearing an empty journal changes nothing on screen,
3138
+ so the press itself has to stay visible. */
3139
+ .icon-btn:active, .btn:active, .btn-quiet:active, .btn-danger:active, nav.side button:active,
3140
+ .icon-btn.pressed, .btn.pressed, .btn-quiet.pressed, .btn-danger.pressed, nav.side button.pressed {
3141
+ background: var(--bg-inset); border-color: var(--line-strong); color: var(--ink);
3142
+ }
3143
+ .btn-danger:active, .btn-danger.pressed { background: var(--err-soft); color: var(--err); }
3144
+ .btn-primary:active, .btn-primary.pressed { filter: brightness(0.88); color: var(--accent-ink); }
2845
3145
  /* minmax(0, 1fr): a 1fr column will not shrink below its content, so a long
2846
3146
  record or the full nav row would widen the page past the viewport. */
2847
3147
  .layout {
@@ -2882,6 +3182,12 @@ var renderAdminDocument = (service) => {
2882
3182
  border-radius: 999px; padding: 4px 8px;
2883
3183
  }
2884
3184
  .chip i { color: var(--faint); font-style: normal; }
3185
+ .sql-layout {
3186
+ display: grid; grid-template-columns: minmax(10rem, 16rem) minmax(0, 1fr); gap: 16px;
3187
+ }
3188
+ .sql-tables { display: flex; flex-direction: column; gap: 4px; max-height: 28rem; overflow: auto; }
3189
+ .sql-tables button { text-align: left; }
3190
+ .sql-input { font-family: var(--mono); min-height: 7rem; width: 100%; }
2885
3191
  table { width: 100%; border-collapse: collapse; font-size: 14px; }
2886
3192
  th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
2887
3193
  th { color: var(--faint); font-weight: 600; font-size: 12px; }
@@ -2930,14 +3236,22 @@ var renderAdminDocument = (service) => {
2930
3236
  input, select, textarea { font-size: 16px; }
2931
3237
  .brand, .vendor, .controls { width: 100%; }
2932
3238
  label.field, label.field select, label.field input { flex: 1; min-width: 0; }
2933
- .layout { grid-template-columns: minmax(0, 1fr); }
3239
+ /* The layout fills the screen. A single-column grid stretches every auto
3240
+ row, so the tab bar grew with the leftover height and the buttons floated
3241
+ in the middle of it. The bar stays one row; the page below takes the rest. */
3242
+ .layout {
3243
+ grid-template-columns: minmax(0, 1fr);
3244
+ grid-template-rows: auto minmax(0, 1fr);
3245
+ align-content: start;
3246
+ }
2934
3247
  nav.side {
3248
+ align-self: start; height: auto;
2935
3249
  flex-direction: row; align-items: center; overflow-x: auto; min-width: 0;
2936
3250
  border-right: 0; border-bottom: 1px solid var(--line);
2937
3251
  padding: 8px;
2938
3252
  }
2939
3253
  nav.side button { white-space: nowrap; flex: none; }
2940
- .split { grid-template-columns: minmax(0, 1fr); }
3254
+ .split, .sql-layout { grid-template-columns: minmax(0, 1fr); }
2941
3255
  main { padding: 14px; }
2942
3256
  table, thead, tbody, tr, th, td { display: block; }
2943
3257
  thead { display: none; }
@@ -3108,6 +3422,24 @@ var json2 = (body) => new Response(JSON.stringify(body), {
3108
3422
  status: 200,
3109
3423
  headers: { "content-type": "application/json; charset=utf-8" }
3110
3424
  });
3425
+ var describeExtension = (extension) => {
3426
+ if (extension.kind === "sql") {
3427
+ return {
3428
+ kind: "sql",
3429
+ id: extension.id ?? "sql",
3430
+ title: extension.title ?? "SQL",
3431
+ ...extension.description !== void 0 ? { description: extension.description } : {}
3432
+ };
3433
+ }
3434
+ return {
3435
+ kind: "panel",
3436
+ id: extension.id,
3437
+ title: extension.title,
3438
+ ...extension.description !== void 0 ? { description: extension.description } : {},
3439
+ html: extension.html,
3440
+ ...extension.script !== void 0 ? { script: extension.script } : {}
3441
+ };
3442
+ };
3111
3443
  var adminUiRoutes = (service, ui) => {
3112
3444
  const shell = () => renderAdminDocument(service);
3113
3445
  const document3 = () => ui?.render ? ui.render({ service, defaultHtml: shell }) : shell();
@@ -3122,7 +3454,8 @@ var adminUiRoutes = (service, ui) => {
3122
3454
  ...panel.description !== void 0 ? { description: panel.description } : {},
3123
3455
  html: panel.html,
3124
3456
  ...panel.script !== void 0 ? { script: panel.script } : {}
3125
- }))
3457
+ })),
3458
+ extensions: (ui?.extensions ?? []).map(describeExtension)
3126
3459
  })
3127
3460
  };
3128
3461
  };
@@ -3799,7 +4132,7 @@ var stateAdminRoutes = (routes) => {
3799
4132
  };
3800
4133
 
3801
4134
  // ../core/dist/version.js
3802
- var PACKAGE_VERSION = true ? "1.6.0" : UNRELEASED_VERSION;
4135
+ var PACKAGE_VERSION = true ? "1.7.0" : UNRELEASED_VERSION;
3803
4136
 
3804
4137
  // ../core/dist/signing.js
3805
4138
  var encoder = new TextEncoder();
@@ -6931,4 +7264,4 @@ export {
6931
7264
  FlexAPI,
6932
7265
  isNextActionType
6933
7266
  };
6934
- //# sourceMappingURL=chunk-O3RZRWN7.js.map
7267
+ //# sourceMappingURL=chunk-56LAVEQL.js.map