@crvouga/mockingbird-service-odx 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-odx
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
 
@@ -1626,6 +1626,167 @@ function faultPresetList(value) {
1626
1626
  })
1627
1627
  };
1628
1628
  }
1629
+ function mountSqlExplorer(root, api) {
1630
+ const cell = (value) => {
1631
+ if (value === null || value === void 0)
1632
+ return "";
1633
+ if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
1634
+ return String(value);
1635
+ }
1636
+ return JSON.stringify(value) ?? "";
1637
+ };
1638
+ root.replaceChildren();
1639
+ const layout = document.createElement("div");
1640
+ layout.className = "sql-layout";
1641
+ const tables = document.createElement("div");
1642
+ tables.className = "sql-tables";
1643
+ const stack = document.createElement("div");
1644
+ stack.className = "stack";
1645
+ const banner = document.createElement("p");
1646
+ banner.className = "banner";
1647
+ const grid = document.createElement("div");
1648
+ const input = document.createElement("textarea");
1649
+ input.className = "sql-input";
1650
+ input.spellcheck = false;
1651
+ input.placeholder = "SELECT * FROM ...";
1652
+ const actions = document.createElement("div");
1653
+ actions.className = "row-actions";
1654
+ const run = document.createElement("button");
1655
+ run.type = "button";
1656
+ run.textContent = "Run";
1657
+ actions.append(run);
1658
+ const result = document.createElement("pre");
1659
+ stack.append(banner, grid, input, actions, result);
1660
+ layout.append(tables, stack);
1661
+ root.append(layout);
1662
+ const showError = (error) => {
1663
+ banner.textContent = error instanceof Error ? error.message : String(error);
1664
+ banner.classList.add("show");
1665
+ };
1666
+ const clearError = () => {
1667
+ banner.textContent = "";
1668
+ banner.classList.remove("show");
1669
+ };
1670
+ const renderGrid = (columns, rows) => {
1671
+ grid.replaceChildren();
1672
+ if (columns.length === 0) {
1673
+ const empty = document.createElement("p");
1674
+ empty.className = "empty";
1675
+ empty.textContent = "No rows.";
1676
+ grid.append(empty);
1677
+ return;
1678
+ }
1679
+ const table = document.createElement("table");
1680
+ const head = document.createElement("thead");
1681
+ const headRow = document.createElement("tr");
1682
+ for (const column of columns) {
1683
+ const th = document.createElement("th");
1684
+ th.textContent = column;
1685
+ headRow.append(th);
1686
+ }
1687
+ head.append(headRow);
1688
+ const body = document.createElement("tbody");
1689
+ for (const row of rows) {
1690
+ const tr = document.createElement("tr");
1691
+ for (const column of columns) {
1692
+ const td = document.createElement("td");
1693
+ td.dataset.label = column;
1694
+ td.textContent = cell(row[column]);
1695
+ tr.append(td);
1696
+ }
1697
+ body.append(tr);
1698
+ }
1699
+ table.append(head, body);
1700
+ grid.append(table);
1701
+ };
1702
+ const rowsOf = (value) => {
1703
+ if (!isRecord2(value) || !Array.isArray(value.rows))
1704
+ return [];
1705
+ return value.rows.flatMap((row) => isRecord2(row) ? [row] : []);
1706
+ };
1707
+ const columnsOf = (value, rows) => {
1708
+ if (isRecord2(value) && Array.isArray(value.columns)) {
1709
+ const named = value.columns.flatMap((column) => typeof column === "string" ? [column] : []);
1710
+ if (named.length > 0)
1711
+ return named;
1712
+ }
1713
+ const first = rows[0];
1714
+ return first === void 0 ? [] : Object.keys(first);
1715
+ };
1716
+ let selected = "";
1717
+ const loadPage = async (schema, name) => {
1718
+ selected = `${schema}.${name}`;
1719
+ const page = await api.get(`/sql/tables/${encodeURIComponent(schema)}/${encodeURIComponent(name)}?limit=50`);
1720
+ const rows = rowsOf(page);
1721
+ renderGrid(columnsOf(page, rows), rows);
1722
+ const total = isRecord2(page) && typeof page.total === "number" ? page.total : rows.length;
1723
+ result.textContent = `${selected} \xB7 ${total} rows`;
1724
+ for (const button of tables.querySelectorAll("button")) {
1725
+ if (!(button instanceof HTMLButtonElement))
1726
+ continue;
1727
+ button.setAttribute("aria-current", button.dataset.schema === schema && button.dataset.table === name ? "true" : "false");
1728
+ }
1729
+ };
1730
+ const loadTables = async () => {
1731
+ const payload = await api.get("/sql/tables");
1732
+ const listed = isRecord2(payload) && Array.isArray(payload.tables) ? payload.tables : [];
1733
+ tables.replaceChildren();
1734
+ if (listed.length === 0) {
1735
+ const empty = document.createElement("p");
1736
+ empty.className = "empty";
1737
+ empty.textContent = "No tables.";
1738
+ tables.append(empty);
1739
+ return;
1740
+ }
1741
+ for (const item of listed) {
1742
+ if (!isRecord2(item) || typeof item.schema !== "string" || typeof item.name !== "string")
1743
+ continue;
1744
+ const button = document.createElement("button");
1745
+ button.type = "button";
1746
+ button.dataset.schema = item.schema;
1747
+ button.dataset.table = item.name;
1748
+ button.textContent = `${item.schema}.${item.name}`;
1749
+ tables.append(button);
1750
+ }
1751
+ };
1752
+ tables.addEventListener("click", (event) => {
1753
+ const target = event.target;
1754
+ if (!(target instanceof Element))
1755
+ return;
1756
+ const button = target.closest("button");
1757
+ if (!(button instanceof HTMLButtonElement))
1758
+ return;
1759
+ const schema = button.dataset.schema;
1760
+ const name = button.dataset.table;
1761
+ if (schema === void 0 || name === void 0)
1762
+ return;
1763
+ clearError();
1764
+ loadPage(schema, name).catch(showError);
1765
+ });
1766
+ run.addEventListener("click", () => {
1767
+ const sql = input.value.trim();
1768
+ if (sql === "") {
1769
+ showError(new Error("Enter a statement"));
1770
+ return;
1771
+ }
1772
+ clearError();
1773
+ api.send("POST", "/sql/query", { sql }).then((payload) => {
1774
+ const rows = rowsOf(payload);
1775
+ renderGrid(columnsOf(payload, rows), rows);
1776
+ const count = isRecord2(payload) && typeof payload.rowCount === "number" ? payload.rowCount : rows.length;
1777
+ const truncated = isRecord2(payload) && payload.truncated === true ? " (truncated)" : "";
1778
+ result.textContent = `${count} rows${truncated}`;
1779
+ }).catch(showError);
1780
+ });
1781
+ const namespace = document.getElementById("namespace");
1782
+ if (namespace) {
1783
+ namespace.addEventListener("change", () => {
1784
+ clearError();
1785
+ loadTables().catch(showError);
1786
+ });
1787
+ }
1788
+ loadTables().catch(showError);
1789
+ }
1629
1790
  function bootAdmin(config) {
1630
1791
  const fieldKinds = ["string", "number", "boolean", "null", "object", "array", "unknown"];
1631
1792
  const sources = ["declared", "inferred", "mixed"];
@@ -2066,6 +2227,50 @@ function bootAdmin(config) {
2066
2227
  if (render)
2067
2228
  await render();
2068
2229
  }
2230
+ const delay = (ms) => new Promise((resolve) => {
2231
+ window.setTimeout(resolve, ms);
2232
+ });
2233
+ const confirmAction = async (button, pending, done, work) => {
2234
+ if (button.dataset.pending === "1")
2235
+ return;
2236
+ const label = button.textContent ?? "";
2237
+ const width = button.offsetWidth;
2238
+ button.dataset.pending = "1";
2239
+ button.classList.add("pressed");
2240
+ button.setAttribute("aria-busy", "true");
2241
+ button.style.minWidth = `${width}px`;
2242
+ button.textContent = pending;
2243
+ try {
2244
+ await work();
2245
+ button.textContent = done;
2246
+ await delay(1e3);
2247
+ } catch (error) {
2248
+ showError(error);
2249
+ } finally {
2250
+ button.textContent = label;
2251
+ button.style.minWidth = "";
2252
+ button.classList.remove("pressed");
2253
+ button.removeAttribute("aria-busy");
2254
+ delete button.dataset.pending;
2255
+ }
2256
+ };
2257
+ document.addEventListener("click", (event) => {
2258
+ const target = event.target;
2259
+ if (!(target instanceof Element))
2260
+ return;
2261
+ const button = target.closest("button");
2262
+ if (!(button instanceof HTMLButtonElement) || button.dataset.pending === "1")
2263
+ return;
2264
+ button.classList.add("pressed");
2265
+ const token = String(Date.now());
2266
+ button.dataset.press = token;
2267
+ window.setTimeout(() => {
2268
+ if (button.dataset.press !== token || button.dataset.pending === "1")
2269
+ return;
2270
+ button.classList.remove("pressed");
2271
+ delete button.dataset.press;
2272
+ }, 450);
2273
+ });
2069
2274
  el("namespace", HTMLSelectElement).addEventListener("change", () => {
2070
2275
  state.namespace = el("namespace", HTMLSelectElement).value;
2071
2276
  refresh().catch(showError);
@@ -2076,7 +2281,7 @@ function bootAdmin(config) {
2076
2281
  refresh().catch(showError);
2077
2282
  });
2078
2283
  el("refresh", HTMLButtonElement).addEventListener("click", () => {
2079
- refresh().catch(showError);
2284
+ confirmAction(el("refresh", HTMLButtonElement), "Refreshing...", "Updated", () => refresh()).catch(showError);
2080
2285
  });
2081
2286
  el("collections", HTMLElement).addEventListener("click", (event) => {
2082
2287
  const target = event.target;
@@ -2199,10 +2404,10 @@ function bootAdmin(config) {
2199
2404
  }).then(() => renderFaults()).catch(showError);
2200
2405
  });
2201
2406
  el("fault-clear", HTMLButtonElement).addEventListener("click", () => {
2202
- api("DELETE", "/faults").then(() => renderFaults()).catch(showError);
2407
+ confirmAction(el("fault-clear", HTMLButtonElement), "Clearing...", "Cleared", () => api("DELETE", "/faults").then(() => renderFaults())).catch(showError);
2203
2408
  });
2204
2409
  el("journal-clear", HTMLButtonElement).addEventListener("click", () => {
2205
- api("DELETE", "/requests").then(() => renderJournal()).catch(showError);
2410
+ confirmAction(el("journal-clear", HTMLButtonElement), "Clearing...", "Cleared", () => api("DELETE", "/requests").then(() => renderJournal())).catch(showError);
2206
2411
  });
2207
2412
  el("route-list", HTMLElement).addEventListener("click", (event) => {
2208
2413
  const target = event.target;
@@ -2258,6 +2463,22 @@ function bootAdmin(config) {
2258
2463
  panel.script = value.script;
2259
2464
  return panel;
2260
2465
  };
2466
+ const decodeExtension = (value) => {
2467
+ if (!isRecord2(value))
2468
+ return void 0;
2469
+ if (value.kind === "sql") {
2470
+ return {
2471
+ kind: "sql",
2472
+ id: typeof value.id === "string" && value.id !== "" ? value.id : "sql",
2473
+ title: typeof value.title === "string" && value.title !== "" ? value.title : "SQL",
2474
+ description: typeof value.description === "string" ? value.description : "Browse tables and run queries."
2475
+ };
2476
+ }
2477
+ if (value.kind !== "panel")
2478
+ return void 0;
2479
+ const panel = decodePanel(value);
2480
+ return panel === void 0 ? void 0 : { kind: "panel", ...panel };
2481
+ };
2261
2482
  const mountPanels = (panels) => {
2262
2483
  const nav = el("nav", HTMLElement);
2263
2484
  const views = el("views", HTMLElement);
@@ -2311,15 +2532,57 @@ function bootAdmin(config) {
2311
2532
  return decoded === void 0 ? [] : [decoded];
2312
2533
  });
2313
2534
  mountPanels(panels);
2535
+ const extensions = requireList(isRecord2(manifest) ? manifest.extensions : void 0, "Extensions").flatMap((extension) => {
2536
+ const decoded = decodeExtension(extension);
2537
+ return decoded === void 0 ? [] : [decoded];
2538
+ });
2539
+ const extensionPanels = extensions.flatMap((extension) => extension.kind === "panel" ? [extension] : []);
2540
+ mountPanels(extensionPanels);
2541
+ for (const extension of extensions) {
2542
+ if (extension.kind !== "sql")
2543
+ continue;
2544
+ const nav = el("nav", HTMLElement);
2545
+ const views = el("views", HTMLElement);
2546
+ const button = document.createElement("button");
2547
+ button.type = "button";
2548
+ button.dataset.view = extension.id;
2549
+ button.textContent = extension.title;
2550
+ nav.append(button);
2551
+ const section = document.createElement("section");
2552
+ section.className = "view";
2553
+ section.id = `view-${extension.id}`;
2554
+ section.hidden = true;
2555
+ const title = document.createElement("h2");
2556
+ title.textContent = extension.title;
2557
+ const lede = document.createElement("p");
2558
+ lede.className = "lede";
2559
+ lede.textContent = extension.description;
2560
+ const body = document.createElement("div");
2561
+ body.className = "panel-body";
2562
+ section.append(title, lede, body);
2563
+ views.append(section);
2564
+ mountSqlExplorer(body, panelApi);
2565
+ }
2314
2566
  return refresh();
2315
2567
  }).catch(showError);
2316
2568
  }
2317
- var clientPrelude = [isRecord2, mountAdminBrand, startAdminBrand, faultPresetList, bootAdmin].map((fn) => fn.toString()).join("\n");
2569
+ var clientPrelude = [
2570
+ isRecord2,
2571
+ mountAdminBrand,
2572
+ startAdminBrand,
2573
+ faultPresetList,
2574
+ mountSqlExplorer,
2575
+ bootAdmin
2576
+ ].map((fn) => fn.toString()).join("\n");
2318
2577
  var adminClientSource = (config) => {
2319
2578
  const payload = JSON.stringify(config).replace(/</g, "\\u003c");
2579
+ const entry = bootAdmin.name;
2580
+ if (!/^[A-Za-z_$][\w$]*$/.test(entry)) {
2581
+ throw new Error("admin client cannot call its boot function");
2582
+ }
2320
2583
  return `<script>
2321
2584
  ${clientPrelude}
2322
- bootAdmin(${payload});
2585
+ ${entry}(${payload});
2323
2586
  </script>`;
2324
2587
  };
2325
2588
 
@@ -2360,19 +2623,33 @@ var STANDARD_ADMIN_ROUTES = [
2360
2623
  "GET /ui/manifest"
2361
2624
  ];
2362
2625
  var PANEL_ID = /^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$/;
2626
+ var RESERVED_VIEWS = /* @__PURE__ */ new Set(["overview", "state", "clock", "faults", "journal", "routes"]);
2627
+ var checkPanel = (panel, seen, label) => {
2628
+ if (!PANEL_ID.test(panel.id)) {
2629
+ throw new RangeError(`${label} id must match ${PANEL_ID}: ${JSON.stringify(panel.id)}`);
2630
+ }
2631
+ if (RESERVED_VIEWS.has(panel.id)) {
2632
+ throw new RangeError(`${label} id ${panel.id} is reserved by the admin shell`);
2633
+ }
2634
+ if (seen.has(panel.id))
2635
+ throw new RangeError(`duplicate admin view id ${panel.id}`);
2636
+ seen.add(panel.id);
2637
+ if (panel.title.trim() === "")
2638
+ throw new RangeError(`${label} ${panel.id} needs a title`);
2639
+ };
2363
2640
  var assertAdminUi = (ui) => {
2364
- if (!ui?.panels)
2641
+ if (!ui)
2365
2642
  return;
2366
2643
  const seen = /* @__PURE__ */ new Set();
2367
- for (const panel of ui.panels) {
2368
- if (!PANEL_ID.test(panel.id)) {
2369
- throw new RangeError(`admin panel id must match ${PANEL_ID}: ${JSON.stringify(panel.id)}`);
2644
+ for (const panel of ui.panels ?? [])
2645
+ checkPanel(panel, seen, "admin panel");
2646
+ for (const extension of ui.extensions ?? []) {
2647
+ if (extension.kind === "panel") {
2648
+ checkPanel(extension, seen, "admin extension");
2649
+ continue;
2370
2650
  }
2371
- if (seen.has(panel.id))
2372
- throw new RangeError(`duplicate admin panel id ${panel.id}`);
2373
- seen.add(panel.id);
2374
- if (panel.title.trim() === "")
2375
- throw new RangeError(`admin panel ${panel.id} needs a title`);
2651
+ const id = extension.id ?? "sql";
2652
+ checkPanel({ id, title: extension.title ?? "SQL" }, seen, "admin extension");
2376
2653
  }
2377
2654
  };
2378
2655
 
@@ -2533,9 +2810,24 @@ var renderAdminDocument = (service) => {
2533
2810
  .controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
2534
2811
  label.field { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--faint); }
2535
2812
  label.field input, label.field select, .controls input[type="password"] {
2536
- background: var(--bg-inset); border: 1px solid var(--line); border-radius: 8px;
2537
- padding: 7px 8px; min-height: 36px;
2538
- }
2813
+ background-color: var(--bg-inset); border: 1px solid var(--line); border-radius: 8px;
2814
+ padding: 7px 8px; min-height: 36px; line-height: 1.2;
2815
+ }
2816
+ /* A native menu ignores min-height, so Preset rendered about half as tall as
2817
+ the text fields in the same form. Paint it like those fields. */
2818
+ label.field select {
2819
+ -webkit-appearance: none; appearance: none;
2820
+ padding-right: 28px;
2821
+ 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");
2822
+ background-repeat: no-repeat; background-position: right 10px center; background-size: 12px 12px;
2823
+ }
2824
+ .stack > .field > input,
2825
+ .stack > .field > select,
2826
+ .stack > .field > textarea,
2827
+ dialog .field > input,
2828
+ dialog .field > select,
2829
+ dialog .field > textarea { width: 100%; }
2830
+ .icon-btn, .btn, .btn-primary, .btn-quiet, .btn-danger, nav.side button { cursor: pointer; }
2539
2831
  .icon-btn, .btn, .btn-primary, .btn-quiet, .btn-danger {
2540
2832
  border-radius: 9px; min-height: 36px; padding: 0 12px; border: 1px solid var(--line);
2541
2833
  background: var(--bg-elev);
@@ -2543,6 +2835,14 @@ var renderAdminDocument = (service) => {
2543
2835
  .btn-primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
2544
2836
  .btn-quiet { background: transparent; }
2545
2837
  .btn-danger { color: var(--err); }
2838
+ /* Held after mouseup. Clearing an empty journal changes nothing on screen,
2839
+ so the press itself has to stay visible. */
2840
+ .icon-btn:active, .btn:active, .btn-quiet:active, .btn-danger:active, nav.side button:active,
2841
+ .icon-btn.pressed, .btn.pressed, .btn-quiet.pressed, .btn-danger.pressed, nav.side button.pressed {
2842
+ background: var(--bg-inset); border-color: var(--line-strong); color: var(--ink);
2843
+ }
2844
+ .btn-danger:active, .btn-danger.pressed { background: var(--err-soft); color: var(--err); }
2845
+ .btn-primary:active, .btn-primary.pressed { filter: brightness(0.88); color: var(--accent-ink); }
2546
2846
  /* minmax(0, 1fr): a 1fr column will not shrink below its content, so a long
2547
2847
  record or the full nav row would widen the page past the viewport. */
2548
2848
  .layout {
@@ -2583,6 +2883,12 @@ var renderAdminDocument = (service) => {
2583
2883
  border-radius: 999px; padding: 4px 8px;
2584
2884
  }
2585
2885
  .chip i { color: var(--faint); font-style: normal; }
2886
+ .sql-layout {
2887
+ display: grid; grid-template-columns: minmax(10rem, 16rem) minmax(0, 1fr); gap: 16px;
2888
+ }
2889
+ .sql-tables { display: flex; flex-direction: column; gap: 4px; max-height: 28rem; overflow: auto; }
2890
+ .sql-tables button { text-align: left; }
2891
+ .sql-input { font-family: var(--mono); min-height: 7rem; width: 100%; }
2586
2892
  table { width: 100%; border-collapse: collapse; font-size: 14px; }
2587
2893
  th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
2588
2894
  th { color: var(--faint); font-weight: 600; font-size: 12px; }
@@ -2631,14 +2937,22 @@ var renderAdminDocument = (service) => {
2631
2937
  input, select, textarea { font-size: 16px; }
2632
2938
  .brand, .vendor, .controls { width: 100%; }
2633
2939
  label.field, label.field select, label.field input { flex: 1; min-width: 0; }
2634
- .layout { grid-template-columns: minmax(0, 1fr); }
2940
+ /* The layout fills the screen. A single-column grid stretches every auto
2941
+ row, so the tab bar grew with the leftover height and the buttons floated
2942
+ in the middle of it. The bar stays one row; the page below takes the rest. */
2943
+ .layout {
2944
+ grid-template-columns: minmax(0, 1fr);
2945
+ grid-template-rows: auto minmax(0, 1fr);
2946
+ align-content: start;
2947
+ }
2635
2948
  nav.side {
2949
+ align-self: start; height: auto;
2636
2950
  flex-direction: row; align-items: center; overflow-x: auto; min-width: 0;
2637
2951
  border-right: 0; border-bottom: 1px solid var(--line);
2638
2952
  padding: 8px;
2639
2953
  }
2640
2954
  nav.side button { white-space: nowrap; flex: none; }
2641
- .split { grid-template-columns: minmax(0, 1fr); }
2955
+ .split, .sql-layout { grid-template-columns: minmax(0, 1fr); }
2642
2956
  main { padding: 14px; }
2643
2957
  table, thead, tbody, tr, th, td { display: block; }
2644
2958
  thead { display: none; }
@@ -2809,6 +3123,24 @@ var json2 = (body) => new Response(JSON.stringify(body), {
2809
3123
  status: 200,
2810
3124
  headers: { "content-type": "application/json; charset=utf-8" }
2811
3125
  });
3126
+ var describeExtension = (extension) => {
3127
+ if (extension.kind === "sql") {
3128
+ return {
3129
+ kind: "sql",
3130
+ id: extension.id ?? "sql",
3131
+ title: extension.title ?? "SQL",
3132
+ ...extension.description !== void 0 ? { description: extension.description } : {}
3133
+ };
3134
+ }
3135
+ return {
3136
+ kind: "panel",
3137
+ id: extension.id,
3138
+ title: extension.title,
3139
+ ...extension.description !== void 0 ? { description: extension.description } : {},
3140
+ html: extension.html,
3141
+ ...extension.script !== void 0 ? { script: extension.script } : {}
3142
+ };
3143
+ };
2812
3144
  var adminUiRoutes = (service, ui) => {
2813
3145
  const shell = () => renderAdminDocument(service);
2814
3146
  const document3 = () => ui?.render ? ui.render({ service, defaultHtml: shell }) : shell();
@@ -2823,7 +3155,8 @@ var adminUiRoutes = (service, ui) => {
2823
3155
  ...panel.description !== void 0 ? { description: panel.description } : {},
2824
3156
  html: panel.html,
2825
3157
  ...panel.script !== void 0 ? { script: panel.script } : {}
2826
- }))
3158
+ })),
3159
+ extensions: (ui?.extensions ?? []).map(describeExtension)
2827
3160
  })
2828
3161
  };
2829
3162
  };
@@ -3426,7 +3759,7 @@ var stateAdminRoutes = (routes) => {
3426
3759
  };
3427
3760
 
3428
3761
  // ../core/dist/version.js
3429
- var PACKAGE_VERSION = true ? "1.6.0" : UNRELEASED_VERSION;
3762
+ var PACKAGE_VERSION = true ? "1.7.0" : UNRELEASED_VERSION;
3430
3763
 
3431
3764
  // ../core/dist/signing.js
3432
3765
  var encoder = new TextEncoder();
@@ -5462,4 +5795,4 @@ export {
5462
5795
  apiKeyCredential,
5463
5796
  OdxAPI
5464
5797
  };
5465
- //# sourceMappingURL=chunk-JQSFQSCJ.js.map
5798
+ //# sourceMappingURL=chunk-BCUAAJT4.js.map