@crvouga/mockingbird-service-google-calendar 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-google-calendar
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-ABVGQK6B.js";
3
+ } from "./chunk-PTK5HWQN.js";
4
4
 
5
5
  // ../../adapters/node/dist/cli.js
6
6
  import { readFile } from "node:fs/promises";
@@ -361,4 +361,4 @@ export {
361
361
  createServer2 as createServer,
362
362
  serveTarget
363
363
  };
364
- //# sourceMappingURL=chunk-UFHN47JF.js.map
364
+ //# sourceMappingURL=chunk-FJRK3DQ5.js.map
@@ -1883,6 +1883,167 @@ function faultPresetList(value) {
1883
1883
  })
1884
1884
  };
1885
1885
  }
1886
+ function mountSqlExplorer(root, api) {
1887
+ const cell = (value) => {
1888
+ if (value === null || value === void 0)
1889
+ return "";
1890
+ if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
1891
+ return String(value);
1892
+ }
1893
+ return JSON.stringify(value) ?? "";
1894
+ };
1895
+ root.replaceChildren();
1896
+ const layout = document.createElement("div");
1897
+ layout.className = "sql-layout";
1898
+ const tables = document.createElement("div");
1899
+ tables.className = "sql-tables";
1900
+ const stack = document.createElement("div");
1901
+ stack.className = "stack";
1902
+ const banner = document.createElement("p");
1903
+ banner.className = "banner";
1904
+ const grid = document.createElement("div");
1905
+ const input = document.createElement("textarea");
1906
+ input.className = "sql-input";
1907
+ input.spellcheck = false;
1908
+ input.placeholder = "SELECT * FROM ...";
1909
+ const actions = document.createElement("div");
1910
+ actions.className = "row-actions";
1911
+ const run = document.createElement("button");
1912
+ run.type = "button";
1913
+ run.textContent = "Run";
1914
+ actions.append(run);
1915
+ const result = document.createElement("pre");
1916
+ stack.append(banner, grid, input, actions, result);
1917
+ layout.append(tables, stack);
1918
+ root.append(layout);
1919
+ const showError = (error) => {
1920
+ banner.textContent = error instanceof Error ? error.message : String(error);
1921
+ banner.classList.add("show");
1922
+ };
1923
+ const clearError = () => {
1924
+ banner.textContent = "";
1925
+ banner.classList.remove("show");
1926
+ };
1927
+ const renderGrid = (columns, rows) => {
1928
+ grid.replaceChildren();
1929
+ if (columns.length === 0) {
1930
+ const empty = document.createElement("p");
1931
+ empty.className = "empty";
1932
+ empty.textContent = "No rows.";
1933
+ grid.append(empty);
1934
+ return;
1935
+ }
1936
+ const table = document.createElement("table");
1937
+ const head = document.createElement("thead");
1938
+ const headRow = document.createElement("tr");
1939
+ for (const column of columns) {
1940
+ const th = document.createElement("th");
1941
+ th.textContent = column;
1942
+ headRow.append(th);
1943
+ }
1944
+ head.append(headRow);
1945
+ const body = document.createElement("tbody");
1946
+ for (const row of rows) {
1947
+ const tr = document.createElement("tr");
1948
+ for (const column of columns) {
1949
+ const td = document.createElement("td");
1950
+ td.dataset.label = column;
1951
+ td.textContent = cell(row[column]);
1952
+ tr.append(td);
1953
+ }
1954
+ body.append(tr);
1955
+ }
1956
+ table.append(head, body);
1957
+ grid.append(table);
1958
+ };
1959
+ const rowsOf = (value) => {
1960
+ if (!isRecord2(value) || !Array.isArray(value.rows))
1961
+ return [];
1962
+ return value.rows.flatMap((row) => isRecord2(row) ? [row] : []);
1963
+ };
1964
+ const columnsOf = (value, rows) => {
1965
+ if (isRecord2(value) && Array.isArray(value.columns)) {
1966
+ const named = value.columns.flatMap((column) => typeof column === "string" ? [column] : []);
1967
+ if (named.length > 0)
1968
+ return named;
1969
+ }
1970
+ const first = rows[0];
1971
+ return first === void 0 ? [] : Object.keys(first);
1972
+ };
1973
+ let selected = "";
1974
+ const loadPage = async (schema, name) => {
1975
+ selected = `${schema}.${name}`;
1976
+ const page = await api.get(`/sql/tables/${encodeURIComponent(schema)}/${encodeURIComponent(name)}?limit=50`);
1977
+ const rows = rowsOf(page);
1978
+ renderGrid(columnsOf(page, rows), rows);
1979
+ const total = isRecord2(page) && typeof page.total === "number" ? page.total : rows.length;
1980
+ result.textContent = `${selected} \xB7 ${total} rows`;
1981
+ for (const button of tables.querySelectorAll("button")) {
1982
+ if (!(button instanceof HTMLButtonElement))
1983
+ continue;
1984
+ button.setAttribute("aria-current", button.dataset.schema === schema && button.dataset.table === name ? "true" : "false");
1985
+ }
1986
+ };
1987
+ const loadTables = async () => {
1988
+ const payload = await api.get("/sql/tables");
1989
+ const listed = isRecord2(payload) && Array.isArray(payload.tables) ? payload.tables : [];
1990
+ tables.replaceChildren();
1991
+ if (listed.length === 0) {
1992
+ const empty = document.createElement("p");
1993
+ empty.className = "empty";
1994
+ empty.textContent = "No tables.";
1995
+ tables.append(empty);
1996
+ return;
1997
+ }
1998
+ for (const item of listed) {
1999
+ if (!isRecord2(item) || typeof item.schema !== "string" || typeof item.name !== "string")
2000
+ continue;
2001
+ const button = document.createElement("button");
2002
+ button.type = "button";
2003
+ button.dataset.schema = item.schema;
2004
+ button.dataset.table = item.name;
2005
+ button.textContent = `${item.schema}.${item.name}`;
2006
+ tables.append(button);
2007
+ }
2008
+ };
2009
+ tables.addEventListener("click", (event) => {
2010
+ const target = event.target;
2011
+ if (!(target instanceof Element))
2012
+ return;
2013
+ const button = target.closest("button");
2014
+ if (!(button instanceof HTMLButtonElement))
2015
+ return;
2016
+ const schema = button.dataset.schema;
2017
+ const name = button.dataset.table;
2018
+ if (schema === void 0 || name === void 0)
2019
+ return;
2020
+ clearError();
2021
+ loadPage(schema, name).catch(showError);
2022
+ });
2023
+ run.addEventListener("click", () => {
2024
+ const sql = input.value.trim();
2025
+ if (sql === "") {
2026
+ showError(new Error("Enter a statement"));
2027
+ return;
2028
+ }
2029
+ clearError();
2030
+ api.send("POST", "/sql/query", { sql }).then((payload) => {
2031
+ const rows = rowsOf(payload);
2032
+ renderGrid(columnsOf(payload, rows), rows);
2033
+ const count = isRecord2(payload) && typeof payload.rowCount === "number" ? payload.rowCount : rows.length;
2034
+ const truncated = isRecord2(payload) && payload.truncated === true ? " (truncated)" : "";
2035
+ result.textContent = `${count} rows${truncated}`;
2036
+ }).catch(showError);
2037
+ });
2038
+ const namespace = document.getElementById("namespace");
2039
+ if (namespace) {
2040
+ namespace.addEventListener("change", () => {
2041
+ clearError();
2042
+ loadTables().catch(showError);
2043
+ });
2044
+ }
2045
+ loadTables().catch(showError);
2046
+ }
1886
2047
  function bootAdmin(config) {
1887
2048
  const fieldKinds = ["string", "number", "boolean", "null", "object", "array", "unknown"];
1888
2049
  const sources = ["declared", "inferred", "mixed"];
@@ -2323,6 +2484,50 @@ function bootAdmin(config) {
2323
2484
  if (render)
2324
2485
  await render();
2325
2486
  }
2487
+ const delay = (ms) => new Promise((resolve) => {
2488
+ window.setTimeout(resolve, ms);
2489
+ });
2490
+ const confirmAction = async (button, pending, done, work) => {
2491
+ if (button.dataset.pending === "1")
2492
+ return;
2493
+ const label = button.textContent ?? "";
2494
+ const width = button.offsetWidth;
2495
+ button.dataset.pending = "1";
2496
+ button.classList.add("pressed");
2497
+ button.setAttribute("aria-busy", "true");
2498
+ button.style.minWidth = `${width}px`;
2499
+ button.textContent = pending;
2500
+ try {
2501
+ await work();
2502
+ button.textContent = done;
2503
+ await delay(1e3);
2504
+ } catch (error) {
2505
+ showError(error);
2506
+ } finally {
2507
+ button.textContent = label;
2508
+ button.style.minWidth = "";
2509
+ button.classList.remove("pressed");
2510
+ button.removeAttribute("aria-busy");
2511
+ delete button.dataset.pending;
2512
+ }
2513
+ };
2514
+ document.addEventListener("click", (event) => {
2515
+ const target = event.target;
2516
+ if (!(target instanceof Element))
2517
+ return;
2518
+ const button = target.closest("button");
2519
+ if (!(button instanceof HTMLButtonElement) || button.dataset.pending === "1")
2520
+ return;
2521
+ button.classList.add("pressed");
2522
+ const token = String(Date.now());
2523
+ button.dataset.press = token;
2524
+ window.setTimeout(() => {
2525
+ if (button.dataset.press !== token || button.dataset.pending === "1")
2526
+ return;
2527
+ button.classList.remove("pressed");
2528
+ delete button.dataset.press;
2529
+ }, 450);
2530
+ });
2326
2531
  el("namespace", HTMLSelectElement).addEventListener("change", () => {
2327
2532
  state.namespace = el("namespace", HTMLSelectElement).value;
2328
2533
  refresh().catch(showError);
@@ -2333,7 +2538,7 @@ function bootAdmin(config) {
2333
2538
  refresh().catch(showError);
2334
2539
  });
2335
2540
  el("refresh", HTMLButtonElement).addEventListener("click", () => {
2336
- refresh().catch(showError);
2541
+ confirmAction(el("refresh", HTMLButtonElement), "Refreshing...", "Updated", () => refresh()).catch(showError);
2337
2542
  });
2338
2543
  el("collections", HTMLElement).addEventListener("click", (event) => {
2339
2544
  const target = event.target;
@@ -2456,10 +2661,10 @@ function bootAdmin(config) {
2456
2661
  }).then(() => renderFaults()).catch(showError);
2457
2662
  });
2458
2663
  el("fault-clear", HTMLButtonElement).addEventListener("click", () => {
2459
- api("DELETE", "/faults").then(() => renderFaults()).catch(showError);
2664
+ confirmAction(el("fault-clear", HTMLButtonElement), "Clearing...", "Cleared", () => api("DELETE", "/faults").then(() => renderFaults())).catch(showError);
2460
2665
  });
2461
2666
  el("journal-clear", HTMLButtonElement).addEventListener("click", () => {
2462
- api("DELETE", "/requests").then(() => renderJournal()).catch(showError);
2667
+ confirmAction(el("journal-clear", HTMLButtonElement), "Clearing...", "Cleared", () => api("DELETE", "/requests").then(() => renderJournal())).catch(showError);
2463
2668
  });
2464
2669
  el("route-list", HTMLElement).addEventListener("click", (event) => {
2465
2670
  const target = event.target;
@@ -2515,6 +2720,22 @@ function bootAdmin(config) {
2515
2720
  panel.script = value.script;
2516
2721
  return panel;
2517
2722
  };
2723
+ const decodeExtension = (value) => {
2724
+ if (!isRecord2(value))
2725
+ return void 0;
2726
+ if (value.kind === "sql") {
2727
+ return {
2728
+ kind: "sql",
2729
+ id: typeof value.id === "string" && value.id !== "" ? value.id : "sql",
2730
+ title: typeof value.title === "string" && value.title !== "" ? value.title : "SQL",
2731
+ description: typeof value.description === "string" ? value.description : "Browse tables and run queries."
2732
+ };
2733
+ }
2734
+ if (value.kind !== "panel")
2735
+ return void 0;
2736
+ const panel = decodePanel(value);
2737
+ return panel === void 0 ? void 0 : { kind: "panel", ...panel };
2738
+ };
2518
2739
  const mountPanels = (panels) => {
2519
2740
  const nav = el("nav", HTMLElement);
2520
2741
  const views = el("views", HTMLElement);
@@ -2568,15 +2789,57 @@ function bootAdmin(config) {
2568
2789
  return decoded === void 0 ? [] : [decoded];
2569
2790
  });
2570
2791
  mountPanels(panels);
2792
+ const extensions = requireList(isRecord2(manifest) ? manifest.extensions : void 0, "Extensions").flatMap((extension) => {
2793
+ const decoded = decodeExtension(extension);
2794
+ return decoded === void 0 ? [] : [decoded];
2795
+ });
2796
+ const extensionPanels = extensions.flatMap((extension) => extension.kind === "panel" ? [extension] : []);
2797
+ mountPanels(extensionPanels);
2798
+ for (const extension of extensions) {
2799
+ if (extension.kind !== "sql")
2800
+ continue;
2801
+ const nav = el("nav", HTMLElement);
2802
+ const views = el("views", HTMLElement);
2803
+ const button = document.createElement("button");
2804
+ button.type = "button";
2805
+ button.dataset.view = extension.id;
2806
+ button.textContent = extension.title;
2807
+ nav.append(button);
2808
+ const section = document.createElement("section");
2809
+ section.className = "view";
2810
+ section.id = `view-${extension.id}`;
2811
+ section.hidden = true;
2812
+ const title = document.createElement("h2");
2813
+ title.textContent = extension.title;
2814
+ const lede = document.createElement("p");
2815
+ lede.className = "lede";
2816
+ lede.textContent = extension.description;
2817
+ const body = document.createElement("div");
2818
+ body.className = "panel-body";
2819
+ section.append(title, lede, body);
2820
+ views.append(section);
2821
+ mountSqlExplorer(body, panelApi);
2822
+ }
2571
2823
  return refresh();
2572
2824
  }).catch(showError);
2573
2825
  }
2574
- var clientPrelude = [isRecord2, mountAdminBrand, startAdminBrand, faultPresetList, bootAdmin].map((fn) => fn.toString()).join("\n");
2826
+ var clientPrelude = [
2827
+ isRecord2,
2828
+ mountAdminBrand,
2829
+ startAdminBrand,
2830
+ faultPresetList,
2831
+ mountSqlExplorer,
2832
+ bootAdmin
2833
+ ].map((fn) => fn.toString()).join("\n");
2575
2834
  var adminClientSource = (config) => {
2576
2835
  const payload = JSON.stringify(config).replace(/</g, "\\u003c");
2836
+ const entry = bootAdmin.name;
2837
+ if (!/^[A-Za-z_$][\w$]*$/.test(entry)) {
2838
+ throw new Error("admin client cannot call its boot function");
2839
+ }
2577
2840
  return `<script>
2578
2841
  ${clientPrelude}
2579
- bootAdmin(${payload});
2842
+ ${entry}(${payload});
2580
2843
  </script>`;
2581
2844
  };
2582
2845
 
@@ -2617,19 +2880,33 @@ var STANDARD_ADMIN_ROUTES = [
2617
2880
  "GET /ui/manifest"
2618
2881
  ];
2619
2882
  var PANEL_ID = /^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$/;
2883
+ var RESERVED_VIEWS = /* @__PURE__ */ new Set(["overview", "state", "clock", "faults", "journal", "routes"]);
2884
+ var checkPanel = (panel, seen, label) => {
2885
+ if (!PANEL_ID.test(panel.id)) {
2886
+ throw new RangeError(`${label} id must match ${PANEL_ID}: ${JSON.stringify(panel.id)}`);
2887
+ }
2888
+ if (RESERVED_VIEWS.has(panel.id)) {
2889
+ throw new RangeError(`${label} id ${panel.id} is reserved by the admin shell`);
2890
+ }
2891
+ if (seen.has(panel.id))
2892
+ throw new RangeError(`duplicate admin view id ${panel.id}`);
2893
+ seen.add(panel.id);
2894
+ if (panel.title.trim() === "")
2895
+ throw new RangeError(`${label} ${panel.id} needs a title`);
2896
+ };
2620
2897
  var assertAdminUi = (ui) => {
2621
- if (!ui?.panels)
2898
+ if (!ui)
2622
2899
  return;
2623
2900
  const seen = /* @__PURE__ */ new Set();
2624
- for (const panel of ui.panels) {
2625
- if (!PANEL_ID.test(panel.id)) {
2626
- throw new RangeError(`admin panel id must match ${PANEL_ID}: ${JSON.stringify(panel.id)}`);
2901
+ for (const panel of ui.panels ?? [])
2902
+ checkPanel(panel, seen, "admin panel");
2903
+ for (const extension of ui.extensions ?? []) {
2904
+ if (extension.kind === "panel") {
2905
+ checkPanel(extension, seen, "admin extension");
2906
+ continue;
2627
2907
  }
2628
- if (seen.has(panel.id))
2629
- throw new RangeError(`duplicate admin panel id ${panel.id}`);
2630
- seen.add(panel.id);
2631
- if (panel.title.trim() === "")
2632
- throw new RangeError(`admin panel ${panel.id} needs a title`);
2908
+ const id = extension.id ?? "sql";
2909
+ checkPanel({ id, title: extension.title ?? "SQL" }, seen, "admin extension");
2633
2910
  }
2634
2911
  };
2635
2912
 
@@ -2790,9 +3067,24 @@ var renderAdminDocument = (service) => {
2790
3067
  .controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
2791
3068
  label.field { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--faint); }
2792
3069
  label.field input, label.field select, .controls input[type="password"] {
2793
- background: var(--bg-inset); border: 1px solid var(--line); border-radius: 8px;
2794
- padding: 7px 8px; min-height: 36px;
2795
- }
3070
+ background-color: var(--bg-inset); border: 1px solid var(--line); border-radius: 8px;
3071
+ padding: 7px 8px; min-height: 36px; line-height: 1.2;
3072
+ }
3073
+ /* A native menu ignores min-height, so Preset rendered about half as tall as
3074
+ the text fields in the same form. Paint it like those fields. */
3075
+ label.field select {
3076
+ -webkit-appearance: none; appearance: none;
3077
+ padding-right: 28px;
3078
+ 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");
3079
+ background-repeat: no-repeat; background-position: right 10px center; background-size: 12px 12px;
3080
+ }
3081
+ .stack > .field > input,
3082
+ .stack > .field > select,
3083
+ .stack > .field > textarea,
3084
+ dialog .field > input,
3085
+ dialog .field > select,
3086
+ dialog .field > textarea { width: 100%; }
3087
+ .icon-btn, .btn, .btn-primary, .btn-quiet, .btn-danger, nav.side button { cursor: pointer; }
2796
3088
  .icon-btn, .btn, .btn-primary, .btn-quiet, .btn-danger {
2797
3089
  border-radius: 9px; min-height: 36px; padding: 0 12px; border: 1px solid var(--line);
2798
3090
  background: var(--bg-elev);
@@ -2800,6 +3092,14 @@ var renderAdminDocument = (service) => {
2800
3092
  .btn-primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
2801
3093
  .btn-quiet { background: transparent; }
2802
3094
  .btn-danger { color: var(--err); }
3095
+ /* Held after mouseup. Clearing an empty journal changes nothing on screen,
3096
+ so the press itself has to stay visible. */
3097
+ .icon-btn:active, .btn:active, .btn-quiet:active, .btn-danger:active, nav.side button:active,
3098
+ .icon-btn.pressed, .btn.pressed, .btn-quiet.pressed, .btn-danger.pressed, nav.side button.pressed {
3099
+ background: var(--bg-inset); border-color: var(--line-strong); color: var(--ink);
3100
+ }
3101
+ .btn-danger:active, .btn-danger.pressed { background: var(--err-soft); color: var(--err); }
3102
+ .btn-primary:active, .btn-primary.pressed { filter: brightness(0.88); color: var(--accent-ink); }
2803
3103
  /* minmax(0, 1fr): a 1fr column will not shrink below its content, so a long
2804
3104
  record or the full nav row would widen the page past the viewport. */
2805
3105
  .layout {
@@ -2840,6 +3140,12 @@ var renderAdminDocument = (service) => {
2840
3140
  border-radius: 999px; padding: 4px 8px;
2841
3141
  }
2842
3142
  .chip i { color: var(--faint); font-style: normal; }
3143
+ .sql-layout {
3144
+ display: grid; grid-template-columns: minmax(10rem, 16rem) minmax(0, 1fr); gap: 16px;
3145
+ }
3146
+ .sql-tables { display: flex; flex-direction: column; gap: 4px; max-height: 28rem; overflow: auto; }
3147
+ .sql-tables button { text-align: left; }
3148
+ .sql-input { font-family: var(--mono); min-height: 7rem; width: 100%; }
2843
3149
  table { width: 100%; border-collapse: collapse; font-size: 14px; }
2844
3150
  th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
2845
3151
  th { color: var(--faint); font-weight: 600; font-size: 12px; }
@@ -2888,14 +3194,22 @@ var renderAdminDocument = (service) => {
2888
3194
  input, select, textarea { font-size: 16px; }
2889
3195
  .brand, .vendor, .controls { width: 100%; }
2890
3196
  label.field, label.field select, label.field input { flex: 1; min-width: 0; }
2891
- .layout { grid-template-columns: minmax(0, 1fr); }
3197
+ /* The layout fills the screen. A single-column grid stretches every auto
3198
+ row, so the tab bar grew with the leftover height and the buttons floated
3199
+ in the middle of it. The bar stays one row; the page below takes the rest. */
3200
+ .layout {
3201
+ grid-template-columns: minmax(0, 1fr);
3202
+ grid-template-rows: auto minmax(0, 1fr);
3203
+ align-content: start;
3204
+ }
2892
3205
  nav.side {
3206
+ align-self: start; height: auto;
2893
3207
  flex-direction: row; align-items: center; overflow-x: auto; min-width: 0;
2894
3208
  border-right: 0; border-bottom: 1px solid var(--line);
2895
3209
  padding: 8px;
2896
3210
  }
2897
3211
  nav.side button { white-space: nowrap; flex: none; }
2898
- .split { grid-template-columns: minmax(0, 1fr); }
3212
+ .split, .sql-layout { grid-template-columns: minmax(0, 1fr); }
2899
3213
  main { padding: 14px; }
2900
3214
  table, thead, tbody, tr, th, td { display: block; }
2901
3215
  thead { display: none; }
@@ -3066,6 +3380,24 @@ var json2 = (body) => new Response(JSON.stringify(body), {
3066
3380
  status: 200,
3067
3381
  headers: { "content-type": "application/json; charset=utf-8" }
3068
3382
  });
3383
+ var describeExtension = (extension) => {
3384
+ if (extension.kind === "sql") {
3385
+ return {
3386
+ kind: "sql",
3387
+ id: extension.id ?? "sql",
3388
+ title: extension.title ?? "SQL",
3389
+ ...extension.description !== void 0 ? { description: extension.description } : {}
3390
+ };
3391
+ }
3392
+ return {
3393
+ kind: "panel",
3394
+ id: extension.id,
3395
+ title: extension.title,
3396
+ ...extension.description !== void 0 ? { description: extension.description } : {},
3397
+ html: extension.html,
3398
+ ...extension.script !== void 0 ? { script: extension.script } : {}
3399
+ };
3400
+ };
3069
3401
  var adminUiRoutes = (service, ui) => {
3070
3402
  const shell = () => renderAdminDocument(service);
3071
3403
  const document3 = () => ui?.render ? ui.render({ service, defaultHtml: shell }) : shell();
@@ -3080,7 +3412,8 @@ var adminUiRoutes = (service, ui) => {
3080
3412
  ...panel.description !== void 0 ? { description: panel.description } : {},
3081
3413
  html: panel.html,
3082
3414
  ...panel.script !== void 0 ? { script: panel.script } : {}
3083
- }))
3415
+ })),
3416
+ extensions: (ui?.extensions ?? []).map(describeExtension)
3084
3417
  })
3085
3418
  };
3086
3419
  };
@@ -3757,7 +4090,7 @@ var stateAdminRoutes = (routes) => {
3757
4090
  };
3758
4091
 
3759
4092
  // ../core/dist/version.js
3760
- var PACKAGE_VERSION = true ? "1.6.0" : UNRELEASED_VERSION;
4093
+ var PACKAGE_VERSION = true ? "1.7.0" : UNRELEASED_VERSION;
3761
4094
 
3762
4095
  // ../core/dist/signing.js
3763
4096
  var encoder = new TextEncoder();
@@ -5842,4 +6175,4 @@ export {
5842
6175
  emailFromCode,
5843
6176
  GoogleCalendarAPI
5844
6177
  };
5845
- //# sourceMappingURL=chunk-ABVGQK6B.js.map
6178
+ //# sourceMappingURL=chunk-PTK5HWQN.js.map