@sypnia/ui 0.1.0 → 0.2.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.
@@ -1,4 +1,4 @@
1
- import { isPlainVisit, copyText, searchEntries, highlight } from '../chunk-O5ZNXHSV.js';
1
+ import { isPlainVisit, copyText, searchEntries, highlight, snippet } from '../chunk-P7RZ7TCP.js';
2
2
  import { attachSplit, cullFireflies } from '../chunk-AXIJDECU.js';
3
3
 
4
4
  // src/dom/docs-elements.ts
@@ -8,73 +8,61 @@ var save = (k, v, store = globalThis.localStorage) => {
8
8
  } catch {
9
9
  }
10
10
  };
11
- var load = (k, store = globalThis.localStorage) => {
12
- try {
13
- return store?.getItem(k) ?? null;
14
- } catch {
15
- return null;
16
- }
17
- };
18
- var norm = (p) => decodeURI(p).replace(/\/$/, "") || "/";
19
- function markCurrentPage(nav, path = location.pathname) {
20
- const here = norm(path);
21
- let current = null;
22
- for (const a of nav.querySelectorAll(".sy-snav a[href]")) {
23
- const on = norm(new URL(a.href, location.href).pathname) === here;
24
- if (on) {
25
- a.setAttribute("aria-current", "page");
26
- current = a;
27
- } else a.removeAttribute("aria-current");
28
- }
29
- const sec = current?.closest("details");
30
- if (sec && !sec.open) sec.open = true;
31
- return current;
32
- }
33
11
  var docs = () => document.querySelector("sy-docs");
34
- var routed = () => !!document.querySelector('meta[name="astro-view-transitions-enabled"]');
12
+ var saveNavScroll = () => {
13
+ const side = document.querySelector(".sy-dside");
14
+ if (side) save("sy-dside-y", String(side.scrollTop), globalThis.sessionStorage);
15
+ };
35
16
  if (typeof document !== "undefined" && !globalThis.__syDocsWired) {
36
17
  globalThis.__syDocsWired = true;
18
+ let back = 0;
37
19
  document.addEventListener("click", (e) => {
38
- if (routed()) return;
39
20
  const a = e.target.closest?.("a[href]");
40
21
  if (!a || !isPlainVisit(e, a)) return;
22
+ saveNavScroll();
23
+ if (a.closest(".sy-dside")) save("sy-dside-from", new URL(a.href, location.href).pathname.replace(/\/$/, "") || "/", globalThis.sessionStorage);
41
24
  docs()?.showSkeleton(a.dataset.nextSkeleton);
42
25
  docs()?.closeNav();
26
+ clearTimeout(back);
27
+ back = setTimeout(() => docs()?.hideSkeleton(), 8e3);
43
28
  });
44
- document.addEventListener("astro:before-preparation", (e) => {
45
- const source = e.sourceElement;
46
- const a = source?.closest?.("a");
47
- docs()?.showSkeleton(a?.dataset.nextSkeleton);
48
- docs()?.closeNav();
29
+ document.addEventListener("click", (e) => {
30
+ const a = e.target.closest?.("[data-set-lang]");
31
+ if (a?.dataset.setLang) save("sy-lang", a.dataset.setLang);
49
32
  });
50
- let fromSide = false;
51
- document.addEventListener("pointerdown", (e) => {
52
- fromSide = !!e.target.closest?.(".sy-dside");
53
- }, true);
54
- document.addEventListener("astro:after-swap", () => {
55
- const side = document.querySelector(".sy-dside");
56
- if (!side) return;
57
- const current = markCurrentPage(side);
58
- const moved = !fromSide;
59
- fromSide = false;
60
- if (current && moved) {
61
- const r = current.getBoundingClientRect(), b = side.getBoundingClientRect();
62
- if (r.top < b.top || r.bottom > b.bottom) current.scrollIntoView({ block: "nearest" });
63
- }
33
+ addEventListener("pagehide", saveNavScroll);
34
+ let idle = 0;
35
+ document.addEventListener("scroll", (e) => {
36
+ if (!e.target.classList?.contains("sy-dside")) return;
37
+ clearTimeout(idle);
38
+ idle = setTimeout(saveNavScroll, 150);
39
+ }, { capture: true, passive: true });
40
+ addEventListener("pageshow", () => {
41
+ clearTimeout(back);
42
+ docs()?.hideSkeleton();
64
43
  });
65
- addEventListener("pageshow", () => docs()?.hideSkeleton());
66
- document.addEventListener("toggle", (e) => {
67
- const d = e.target;
68
- if (!(d instanceof HTMLDetailsElement) || !d.classList.contains("sy-snav__sec")) return;
69
- const key = d.dataset.key;
44
+ const remember = (key, open) => {
70
45
  if (!key) return;
71
46
  try {
72
- const open = JSON.parse(localStorage.getItem("sy-snav") ?? "{}");
73
- open[key] = d.open;
74
- localStorage.setItem("sy-snav", JSON.stringify(open));
47
+ const all = JSON.parse(localStorage.getItem("sy-snav") ?? "{}");
48
+ all[key] = open;
49
+ localStorage.setItem("sy-snav", JSON.stringify(all));
75
50
  } catch {
76
51
  }
52
+ };
53
+ document.addEventListener("toggle", (e) => {
54
+ const d = e.target;
55
+ if (d instanceof HTMLDetailsElement && d.classList.contains("sy-snav__sec")) remember(d.dataset.key, d.open);
77
56
  }, true);
57
+ document.addEventListener("click", (e) => {
58
+ const b = e.target.closest?.("[data-snav-toggle]");
59
+ const li = b?.closest(".sy-snav__sec--link");
60
+ if (!b || !li) return;
61
+ const open = !li.hasAttribute("data-open");
62
+ li.toggleAttribute("data-open", open);
63
+ b.setAttribute("aria-expanded", String(open));
64
+ remember(li.dataset.key, open);
65
+ });
78
66
  matchMedia("(min-width: 60rem)").addEventListener("change", (m) => {
79
67
  if (m.matches) docs()?.closeNav();
80
68
  });
@@ -97,10 +85,20 @@ var SyDocs = class extends HTMLElement {
97
85
  save("sy-nav", hidden ? "hidden" : "");
98
86
  this.querySelectorAll("[data-nav-fold]").forEach((b) => b.setAttribute("aria-expanded", String(!hidden)));
99
87
  } else if (t.closest("[data-surface-toggle]")) {
100
- const root = document.documentElement;
101
- const now = root.dataset.surface ?? (matchMedia("(prefers-color-scheme: light)").matches ? "paper" : "night");
102
- root.dataset.surface = now === "night" ? "paper" : "night";
103
- save("sy-surface", root.dataset.surface);
88
+ const root = document.documentElement, system = matchMedia("(prefers-color-scheme: light)").matches ? "paper" : "night";
89
+ const next = (root.dataset.surface ?? system) === "night" ? "paper" : "night";
90
+ if (next === system) {
91
+ delete root.dataset.surface;
92
+ try {
93
+ localStorage.removeItem("sy-surface");
94
+ } catch {
95
+ }
96
+ } else {
97
+ root.dataset.surface = next;
98
+ save("sy-surface", next);
99
+ }
100
+ const meta = document.querySelector("meta[data-sy-theme-color]");
101
+ if (meta) meta.content = meta.dataset[next] ?? meta.content;
104
102
  }
105
103
  });
106
104
  this.addEventListener("keydown", (e) => {
@@ -111,24 +109,15 @@ var SyDocs = class extends HTMLElement {
111
109
  });
112
110
  const fold = document.documentElement.dataset.nav === "hidden";
113
111
  this.querySelectorAll("[data-nav-fold]").forEach((b) => b.setAttribute("aria-expanded", String(!fold)));
114
- const side = this.querySelector(".sy-dside");
115
- if (side && !side.dataset.restored) {
116
- side.dataset.restored = "";
117
- const y = Number(load("sy-dside-y", globalThis.sessionStorage));
118
- if (y) side.scrollTop = y;
119
- const current = side.querySelector('[aria-current="page"]');
120
- if (current) {
121
- const r = current.getBoundingClientRect(), s = side.getBoundingClientRect();
122
- if (r.top < s.top || r.bottom > s.bottom) current.scrollIntoView({ block: "nearest" });
123
- }
124
- addEventListener("pagehide", () => save("sy-dside-y", String(side.scrollTop), globalThis.sessionStorage));
125
- }
126
112
  }
127
113
  openNav() {
128
114
  const side = this.querySelector(".sy-dside");
129
115
  if (!side) return;
130
116
  side.toggleAttribute("data-open", true);
131
117
  this.querySelector(".sy-dscrim")?.toggleAttribute("data-open", true);
118
+ this.querySelectorAll(".sy-dhead, .sy-dmain").forEach((el) => {
119
+ el.inert = true;
120
+ });
132
121
  this.querySelector("[data-nav-open]")?.setAttribute("aria-expanded", "true");
133
122
  this.#lastFocus = document.activeElement;
134
123
  side.querySelector("[data-nav-close]")?.focus();
@@ -138,6 +127,9 @@ var SyDocs = class extends HTMLElement {
138
127
  if (!side?.hasAttribute("data-open")) return;
139
128
  side.removeAttribute("data-open");
140
129
  this.querySelector(".sy-dscrim")?.removeAttribute("data-open");
130
+ this.querySelectorAll(".sy-dhead, .sy-dmain").forEach((el) => {
131
+ el.inert = false;
132
+ });
141
133
  this.querySelector("[data-nav-open]")?.setAttribute("aria-expanded", "false");
142
134
  if (returnFocus) this.#lastFocus?.focus?.();
143
135
  }
@@ -189,8 +181,21 @@ var SyToc = class extends HTMLElement {
189
181
  this.#io = null;
190
182
  }
191
183
  };
184
+ var indexes = /* @__PURE__ */ new Map();
185
+ var fetchIndex = (src) => {
186
+ let p = indexes.get(src);
187
+ if (!p) {
188
+ p = fetch(src).then((r) => r.json()).catch(() => {
189
+ indexes.delete(src);
190
+ return [];
191
+ });
192
+ indexes.set(src, p);
193
+ }
194
+ return p;
195
+ };
192
196
  var SySearch = class extends HTMLElement {
193
197
  #entries = null;
198
+ #start = [];
194
199
  #hits = [];
195
200
  #sel = 0;
196
201
  #wired = false;
@@ -203,11 +208,25 @@ var SySearch = class extends HTMLElement {
203
208
  const dialog = this.dialog, input = this.querySelector("input[type=search]"), list = this.querySelector("[data-results]");
204
209
  if (!dialog || !input || !list) return;
205
210
  const first = () => document.querySelector("sy-search") === this;
211
+ try {
212
+ this.#start = JSON.parse(this.querySelector("script[data-start]")?.textContent ?? "[]");
213
+ } catch {
214
+ this.#start = [];
215
+ }
216
+ const mine = (b) => {
217
+ const want = b.dataset.searchOpen;
218
+ return want ? want === this.id : first();
219
+ };
220
+ document.addEventListener("pointerover", (e) => {
221
+ const b = e.target.closest?.("[data-search-open]");
222
+ const src = this.getAttribute("index");
223
+ if (b && src && mine(b)) void fetchIndex(src);
224
+ }, { passive: true });
225
+ this.#run("");
206
226
  document.addEventListener("click", (e) => {
207
227
  const b = e.target.closest?.("[data-search-open]");
208
228
  if (!b) return;
209
- const want = b.dataset.searchOpen;
210
- if (want ? want === this.id : first()) {
229
+ if (mine(b)) {
211
230
  e.preventDefault();
212
231
  this.open();
213
232
  }
@@ -248,7 +267,7 @@ var SySearch = class extends HTMLElement {
248
267
  if (!this.#entries) {
249
268
  try {
250
269
  const src = this.getAttribute("index");
251
- this.#entries = src ? await (await fetch(src)).json() : JSON.parse(this.querySelector('script[type="application/json"]')?.textContent ?? "[]");
270
+ this.#entries = src ? await fetchIndex(src) : JSON.parse(this.querySelector("script[data-entries]")?.textContent ?? "[]");
252
271
  } catch {
253
272
  this.#entries = [];
254
273
  }
@@ -262,10 +281,10 @@ var SySearch = class extends HTMLElement {
262
281
  #run(q) {
263
282
  const list = this.querySelector("[data-results]"), empty = this.querySelector("[data-empty]"), hint = this.querySelector("[data-hint]");
264
283
  if (!list) return;
265
- this.#hits = searchEntries(this.#entries ?? [], q);
266
- this.#sel = 0;
267
284
  const has = q.trim().length > 0;
268
- if (hint) hint.hidden = has;
285
+ this.#hits = has ? searchEntries(this.#entries ?? [], q) : this.#start.map((e) => ({ ...e, score: 0 }));
286
+ this.#sel = 0;
287
+ if (hint) hint.hidden = has || this.#start.length > 0;
269
288
  if (empty) {
270
289
  empty.hidden = !has || this.#hits.length > 0;
271
290
  const title = empty.querySelector("[data-empty-title]");
@@ -280,7 +299,7 @@ var SySearch = class extends HTMLElement {
280
299
  for (const [g, hits] of groups) {
281
300
  if (g) html += `<li class="sy-dsearch__group" role="presentation">${highlight(g, "")}</li>`;
282
301
  for (const h of hits) {
283
- html += `<li role="presentation"><a class="sy-hit" role="option" id="${this.id || "sy-search"}-o${i}" aria-selected="${i === 0}" href="${h.url.replace(/"/g, "&quot;")}"><b>${highlight(h.title, q)}</b>${h.text ? `<span>${highlight(h.text, q)}</span>` : ""}</a></li>`;
302
+ html += `<li role="presentation"><a class="sy-hit" role="option" id="${this.id || "sy-search"}-o${i}" aria-selected="${i === 0}" href="${h.url.replace(/"/g, "&quot;")}"><b>${highlight(h.title, q)}</b>${h.text ? `<span>${highlight(snippet(h.text, q), q)}</span>` : ""}</a></li>`;
284
303
  i++;
285
304
  }
286
305
  }
@@ -42,10 +42,12 @@ declare const terms: (q: string) => string[];
42
42
  declare function searchEntries(entries: SearchEntry[], query: string, limit?: number): SearchHit[];
43
43
  /** The text as HTML with the typed words in <mark>, matched without regard to case or accents. */
44
44
  declare function highlight(text: string, query: string): string;
45
+ /** A long text cut to about `size` characters around the first typed word, with «…» where it was cut. */
46
+ declare function snippet(text: string, query: string, size?: number): string;
45
47
 
46
48
  /** Is this click a plain visit to another page of the same site, that we may announce with a skeleton? */
47
49
  declare function isPlainVisit(e: MouseEvent, a: HTMLAnchorElement, here?: Location): boolean;
48
50
 
49
51
  declare function cullFireflies(field: HTMLElement, pad?: number): () => void;
50
52
 
51
- export { type SearchEntry, type SearchHit, type SplitOptions, attachSplit, clampSize, copyText, cullFireflies, fold, highlight, isPlainVisit, searchEntries, sizeForKey, terms };
53
+ export { type SearchEntry, type SearchHit, type SplitOptions, attachSplit, clampSize, copyText, cullFireflies, fold, highlight, isPlainVisit, searchEntries, sizeForKey, snippet, terms };
package/dist/dom/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { copyText, fold, highlight, isPlainVisit, searchEntries, terms } from '../chunk-O5ZNXHSV.js';
1
+ export { copyText, fold, highlight, isPlainVisit, searchEntries, snippet, terms } from '../chunk-P7RZ7TCP.js';
2
2
  export { attachSplit, clampSize, cullFireflies, sizeForKey } from '../chunk-AXIJDECU.js';
@@ -231,6 +231,7 @@ declare const strings: {
231
231
  readonly resize: "Resize";
232
232
  readonly onThisPage: "On this page";
233
233
  readonly docsNav: "Documentation";
234
+ readonly pagesIn: "Pages in {section}";
234
235
  readonly openNav: "Open the navigation";
235
236
  readonly closeNav: "Close the navigation";
236
237
  readonly hideNav: "Hide the navigation";
@@ -550,6 +551,7 @@ declare const strings: {
550
551
  readonly resize: "Cambiar tamaño";
551
552
  readonly onThisPage: "En esta página";
552
553
  readonly docsNav: "Documentación";
554
+ readonly pagesIn: "Páginas de {section}";
553
555
  readonly openNav: "Abrir la navegación";
554
556
  readonly closeNav: "Cerrar la navegación";
555
557
  readonly hideNav: "Ocultar la navegación";
@@ -1 +1 @@
1
- export { formatters, strings, translate } from '../chunk-6X3IJPUY.js';
1
+ export { formatters, strings, translate } from '../chunk-PGPCLRLZ.js';
@@ -0,0 +1,25 @@
1
+ import * as react from 'react';
2
+
3
+ interface QueryEditorProps {
4
+ value: string;
5
+ onChange: (value: string) => void;
6
+ /** Ctrl/⌘ + Enter: runs the selection when there is one, otherwise the whole text. */
7
+ onRun?: (text: string) => void;
8
+ /** Tables and their columns, offered as the person types: `{ orders: ['id', 'total'] }`. */
9
+ schema?: Record<string, string[]>;
10
+ placeholder?: string;
11
+ /** Its name for screen readers. */
12
+ label: string;
13
+ /** Visible lines before it scrolls; it grows with its container when the container is taller. */
14
+ rows?: number;
15
+ readOnly?: boolean;
16
+ className?: string;
17
+ }
18
+ /**
19
+ * The full SQL editor of a database console (CodeMirror 6): PostgreSQL highlighting, completion of tables and columns,
20
+ * undo history, and Ctrl/⌘ + Enter to run the selection or the whole text. Heavier than CodeEditor, so it has its own
21
+ * entry (`@sypnia/ui/react/code-editor`): load it lazily, and show `CodeEditorSkeleton` while it arrives.
22
+ */
23
+ declare function QueryEditor({ value, onChange, onRun, schema, placeholder, label, rows, readOnly, className }: QueryEditorProps): react.JSX.Element;
24
+
25
+ export { QueryEditor, type QueryEditorProps };
@@ -0,0 +1,89 @@
1
+ import { cx } from '../chunk-UM27QNJ7.js';
2
+ import '../chunk-PGPCLRLZ.js';
3
+ import { useRef, useEffect } from 'react';
4
+ import { EditorState } from '@codemirror/state';
5
+ import { EditorView, lineNumbers, highlightActiveLine, placeholder, keymap } from '@codemirror/view';
6
+ import { history, defaultKeymap, historyKeymap } from '@codemirror/commands';
7
+ import { sql, PostgreSQL } from '@codemirror/lang-sql';
8
+ import { autocompletion } from '@codemirror/autocomplete';
9
+ import { HighlightStyle, syntaxHighlighting } from '@codemirror/language';
10
+ import { tags } from '@lezer/highlight';
11
+ import { jsx } from 'react/jsx-runtime';
12
+
13
+ var highlight = HighlightStyle.define([
14
+ { tag: tags.keyword, class: "sy-tok-keyword" },
15
+ { tag: [tags.string, tags.special(tags.string)], class: "sy-tok-string" },
16
+ { tag: [tags.number, tags.bool, tags.null], class: "sy-tok-number" },
17
+ { tag: tags.comment, class: "sy-tok-comment" },
18
+ { tag: [tags.typeName, tags.function(tags.variableName)], class: "sy-tok-type" },
19
+ { tag: tags.operator, class: "sy-tok-operator" }
20
+ ]);
21
+ var theme = EditorView.theme({
22
+ "&": { flex: "1", minHeight: "0", background: "transparent", color: "var(--fg)" },
23
+ "&.cm-focused": { outline: "none" },
24
+ ".cm-scroller": { fontFamily: "var(--font-machine)", lineHeight: "var(--_lh)", overflow: "auto" },
25
+ ".cm-content": { padding: "0.6rem 0", caretColor: "var(--fg)" },
26
+ ".cm-line": { padding: "0 0.75rem" },
27
+ ".cm-cursor, .cm-dropCursor": { borderLeftColor: "var(--fg)", borderLeftWidth: "2px" },
28
+ ".cm-gutters": { background: "color-mix(in oklab, var(--bg-inset) 70%, var(--bg))", borderRight: "1px solid var(--line)", color: "var(--fg-muted)" },
29
+ ".cm-lineNumbers .cm-gutterElement": { padding: "0 0.6rem 0 0.75rem", minWidth: "2ch" },
30
+ ".cm-activeLine, .cm-activeLineGutter": { background: "color-mix(in oklab, var(--fg) 5%, transparent)" },
31
+ "&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { background: "var(--mark)" },
32
+ ".cm-placeholder": { color: "var(--fg-muted)" },
33
+ ".cm-tooltip": { background: "var(--bg-raised)", color: "var(--fg)", border: "1px solid var(--line)", borderRadius: "var(--r-2)", boxShadow: "var(--shadow-2)", overflow: "hidden" },
34
+ ".cm-tooltip-autocomplete > ul": { fontFamily: "var(--font-machine)", maxHeight: "14rem" },
35
+ ".cm-tooltip-autocomplete > ul > li": { padding: "0.2rem 0.6rem" },
36
+ ".cm-tooltip-autocomplete > ul > li[aria-selected]": { background: "var(--bg-inset)", color: "var(--fg)" },
37
+ ".cm-completionDetail": { color: "var(--fg-muted)", marginLeft: "0.5rem" }
38
+ });
39
+ function QueryEditor({ value, onChange, onRun, schema = {}, placeholder: placeholder$1, label, rows = 10, readOnly, className }) {
40
+ const host = useRef(null);
41
+ const view = useRef(null);
42
+ const run = useRef(onRun);
43
+ run.current = onRun;
44
+ const change = useRef(onChange);
45
+ change.current = onChange;
46
+ const schemaKey = JSON.stringify(schema);
47
+ useEffect(() => {
48
+ const runKey = (v) => {
49
+ if (!run.current) return false;
50
+ const sel = v.state.selection.main;
51
+ run.current(sel.empty ? v.state.doc.toString() : v.state.sliceDoc(sel.from, sel.to));
52
+ return true;
53
+ };
54
+ view.current = new EditorView({
55
+ parent: host.current,
56
+ state: EditorState.create({
57
+ doc: value,
58
+ extensions: [
59
+ lineNumbers(),
60
+ highlightActiveLine(),
61
+ history(),
62
+ theme,
63
+ syntaxHighlighting(highlight),
64
+ sql({ dialect: PostgreSQL, schema, upperCaseKeywords: false }),
65
+ autocompletion(),
66
+ placeholder(placeholder$1 ?? ""),
67
+ EditorView.contentAttributes.of({ "aria-label": label, "aria-multiline": "true" }),
68
+ EditorView.lineWrapping,
69
+ EditorState.readOnly.of(!!readOnly),
70
+ keymap.of([{ key: "Mod-Enter", run: runKey }, ...defaultKeymap, ...historyKeymap]),
71
+ EditorView.updateListener.of((u) => {
72
+ if (u.docChanged) change.current(u.state.doc.toString());
73
+ })
74
+ ]
75
+ })
76
+ });
77
+ return () => {
78
+ view.current?.destroy();
79
+ view.current = null;
80
+ };
81
+ }, [schemaKey, readOnly, label, placeholder$1]);
82
+ useEffect(() => {
83
+ const v = view.current;
84
+ if (v && v.state.doc.toString() !== value) v.dispatch({ changes: { from: 0, to: v.state.doc.length, insert: value } });
85
+ }, [value]);
86
+ return /* @__PURE__ */ jsx("div", { ref: host, className: cx("sy-query-editor", className), style: { "--rows": rows } });
87
+ }
88
+
89
+ export { QueryEditor };
@@ -1221,10 +1221,12 @@ declare function Tabs({ items, selected, onChange, label }: {
1221
1221
  }): react.JSX.Element;
1222
1222
  /** Two to four modes, all visible, one chosen. */
1223
1223
  declare function SegmentedControl<T extends string>({ options, value, onChange, label }: {
1224
+ /** `disabled` keeps a mode in sight that cannot be chosen yet («Sypnia Mail · Soon»): say why in its label or next to it. */
1224
1225
  options: {
1225
1226
  value: T;
1226
1227
  label: ReactNode;
1227
1228
  icon?: IconName;
1229
+ disabled?: boolean;
1228
1230
  }[];
1229
1231
  value: T;
1230
1232
  onChange: (v: T) => void;
@@ -3343,6 +3345,10 @@ declare function Rating({ value, onChange, max, label, readOnly }: {
3343
3345
  declare function CodeEditorSkeleton({ rows }: {
3344
3346
  rows?: number;
3345
3347
  }): react.JSX.Element;
3348
+ /** The QueryEditor while its code arrives (it loads lazily): the same box at the same height, with lines of skeleton. */
3349
+ declare function QueryEditorSkeleton({ rows }: {
3350
+ rows?: number;
3351
+ }): react.JSX.Element;
3346
3352
  declare function KeyValueEditorSkeleton({ rows }: {
3347
3353
  rows?: number;
3348
3354
  }): react.JSX.Element;
@@ -4452,4 +4458,4 @@ declare function EntityDiagramSkeleton({ tables, columns }: {
4452
4458
  columns?: number;
4453
4459
  }): react.JSX.Element;
4454
4460
 
4455
- export { Accordion, type AccordionItem, AccordionSkeleton, ActionCard, ActionCardSkeleton, Actions, type Activity, ActivityFeed, ActivityFeedSkeleton, Alert, AlertDialog, type AlertProps, AnchorNav, Announcement, ApiKeyField, AppShell, type AppShellProps, AppShellSkeleton, AreaChart, AspectRatio, AuthLayout, type AuthLayoutProps, AuthLayoutSkeleton, Autocomplete, type AutosaveState, AutosaveStatus, Avatar, AvatarGroup, AvatarGroupSkeleton, AvatarSkeleton, AvatarUpload, BackButton, BackToTop, Badge, type BadgeProps, BadgeSkeleton, Banner, BarChart, type BarChartProps, Breadcrumb, BreadcrumbSkeleton, BulkActionBar, type BulkActionBarProps, Button, ButtonGroup, type ButtonProps, type ButtonVariant, Bytes, Calendar, CalendarHeatmap, CalendarHeatmapSkeleton, type CalendarProps, CallToAction, Callout, CalloutSkeleton, Card, CardGrid, CardGridSkeleton, CardSkeleton, type CaseEdge, CaseMap, CaseMapSkeleton, CaseNode, CellEditor, Center, Character, type CharacterName, type CharacterProps, ChartFrame, type ChartFrameProps, ChartSkeleton, ChartTooltip, Checkbox, CheckboxCard, type CheckboxCardProps, CheckboxCardSkeleton, CheckboxGroup, type CheckboxGroupProps, CheckboxGroupSkeleton, CheckboxSkeleton, Checklist, type ChecklistItem, ChecklistSkeleton, Chip, ChipSkeleton, CloseButton, CodeBlock, type CodeBlockProps, CodeBlockSkeleton, CodeDiff, CodeDiffSkeleton, CodeEditor, type CodeEditorProps, CodeEditorSkeleton, CodeInput, Collapsible, type CollapsibleProps, ColorPicker, ColorSwatchPicker, type Column, ColumnPicker, type ColumnPickerProps, Columns, type ColumnsProps, Combobox, type ComboboxProps, type Command, CommandPalette, type CompareRow, CompareTable, CompareTableSkeleton, type CompareValue, ConfirmDialog, type ConfirmDialogProps, Container, ContextMenu, type ControlProps, type ControlSize, CopyButton, CopyField, CopyFieldSkeleton, CopyableText, CopyableTextSkeleton, Count, CountSkeleton, Countdown, type Country, CronInput, Currency, CurrencyInput, CursorPagination, DataCards, DataCardsSkeleton, type DataColumn, type DataField, type DataFilters, DataList, DataListSkeleton, type DataOption, type DataSort, DataTable, type DataTableProps, DataTableSkeleton, DatePicker, type DatePickerProps, type DateRange, DateRangePicker, type DateRangePickerProps, DateTimePicker, type DateTimePickerProps, Delta, DeltaSkeleton, DensitySwitch, type Description, DescriptionList, DescriptionListSkeleton, DiagramSkeleton, Dialog, type DialogProps, type DiffLine, Disclosure, DisclosureSkeleton, Dismissable, Divider, DownloadButton, Drawer, Duration, DurationInput, type DurationUnit, EditableText, EditableTextSkeleton, EmailInput, EmptyState, type EmptyStateProps, type Entity, type EntityColumn, EntityDiagram, EntityDiagramSkeleton, EnvironmentSwitcher, ErrorSummary, Faq, type Feature, FeatureGrid, FeatureGridSkeleton, type FeatureItem, FeatureList, FeatureListSkeleton, Field, FieldError, type FieldProps, FieldSkeleton, Fieldset, Figure, FigureSkeleton, FileDrop, type FileDropProps, type FileEntry, FileInput, FileTree, FileTreeSkeleton, FilterBar, type FilterBarProps, FilterChip, type FilterChipProps, type FilterField, Fireflies, type FirefliesProps, FlameGraph, FlameGraphSkeleton, FlowDiagram, type FlowEdge, type FlowNode, FocusScope, Form, FormActions, FormGrid, type FormProblem, type FormProps, FormRow, FormRowSkeleton, FormSection, FormSectionSkeleton, FormSkeleton, type FormState, type Frame, Funnel, type Gap, Gauge, GaugeSkeleton, Grid, type GridProps, Hash, HashSkeleton, Heading, Health, HealthSkeleton, type HealthState, Heatmap, Hero, type HeroProps, Hint, Histogram, HorizontalBar, Hotkey, HoverCard, HoverCardSkeleton, HttpMethod, Icon, IconButton, type IconButtonProps, type IconName, type IconProps, Identity, IdentitySkeleton, Image, ImageSkeleton, ImageUpload, ImageUploadSkeleton, InlineCode, InlineEdit, type InlineEditProps, InlineEditSkeleton, Input, InputGroup, type InputProps, JsonEditor, JsonViewer, JsonViewerSkeleton, Kbd, KeyValue, KeyValueEditor, KeyValueEditorSkeleton, type KeyValueRow, KeyValueSkeleton, Label, LanguageSwitch, Layer, Ledger, Legend, Lightbox, type LightboxImage, LineChart, type LineChartProps, Link, LinkButton, LinkCard, LinkCardSkeleton, type LinkRenderProps, List, ListItem, type ListItemProps, ListItemSkeleton, ListSkeleton, LiveIndicator, LiveRegion, LoadMore, LocaleScope, type LogLevel, type LogLine, LogViewer, LogViewerSkeleton, Logo, Mark, Menu, MenuButton, MenuGroup, MenuItem, MenuSeparator, MenuSkeleton, Meter, MeterSkeleton, MobileNav, MonthPicker, MoreSheet, MultiSelect, type MultiSelectProps, NativeSelect, type NativeSelectProps, NavGroup, NavItem, NewCard, NotFound, Notice, NotificationBell, type NotificationEntry, NotificationList, NotificationListSkeleton, Number, NumberInput, type NumberInputProps, OfflineNotice, type Option, OrgSwitcher, OtpInput, type OtpInputProps, Page, PageHeader, PageHeaderSkeleton, PageSizeSelect, PageSkeleton, Pagination, type PaginationProps, PaginationSkeleton, Panel, PanelSkeleton, PartToWhole, PartToWholeSkeleton, PasswordInput, PercentInput, Percentiles, Phone, PhoneInput, type Placement, PlanCard, type PlanCardProps, PlanCardSkeleton, Popconfirm, Popover, Portal, Positioner, Presence, type PricingPlan, PricingTable, PricingTableSkeleton, type Product, ProductGrid, type ProductItem, type ProductLink, ProductMark, ProductSwitch, Progress, ProgressSkeleton, type ProgressStep, ProgressSteps, ProgressStepsSkeleton, ProjectSwitcher, PromptDialog, type PromptDialogProps, Quote, QuoteSkeleton, Radio, RadioCards, type RadioCardsProps, RadioCardsSkeleton, RadioGroup, type RadioGroupProps, RadioGroupSkeleton, RangeSlider, type RangeSliderProps, Rating, type Region, RegionSelect, type Release, Releases, type RenderLink, RovingFocus, Row, type RowAction, RowActions, type RowActionsProps, type RowKey, type RowProps, RowsChartSkeleton, SaveBar, SavingIndicator, Says, Scatter, type ScatterPoint, type SchemaColumn, SchemaViewer, SchemaViewerSkeleton, ScrollArea, type ScrollAreaProps, ScrollLock, SearchInput, Section, type SectionProps, SectionSkeleton, SegmentedControl, Select, type SelectProps, SequenceDiagram, type SequenceMessage, type Series, Sheet, Shortcut, ShortcutSkeleton, Show, Sidebar, SidebarSection, SiteFooter, type SiteFooterProps, SiteHeader, type SiteHeaderProps, type SiteLink, Skeleton, SkeletonCard, SkeletonTable, SkeletonText, SkipLink, Slider, type SliderProps, SlugInput, type SlugInputProps, Snippet, SnippetSkeleton, SortMenu, SortMenuSkeleton, type SortOption, Spacer, type Span, SparkBar, Sparkline, SparklineSkeleton, Split, SplitButton, type SplitButtonProps, type SplitProps, SqlEditor, Stack, StackedArea, Stage, Stat, StatGroup, StatGroupSkeleton, StatSkeleton, Status, StatusCode, StatusSkeleton, Stepper, StepperSkeleton, Sticky, SurfaceSwitch, Switch, SwitchSkeleton, type SwitcherOption, SwitcherSkeleton, SypniaProvider, type TabItem, Table, type TableProps, TableSkeleton, TableToolbar, type TableToolbarProps, Tabs, TabsSkeleton, Tag, TagInput, type TagInputProps, TagSkeleton, Terminal, type TerminalLine, TerminalSkeleton, Text, type TextProps, TextSkeleton, Textarea, type TextareaProps, Thumbnail, ThumbnailSkeleton, Time, TimePicker, type TimePickerProps, TimeSkeleton, Timeline, type TimelineItem, TimelineSkeleton, TimezoneSelect, type ToastOptions, Toaster, ToggleButton, ToggleGroup, type ToggleItem, type Tone, Toolbar, ToolbarGroup, type ToolbarProps, ToolbarSeparator, ToolbarSkeleton, ToolbarSpacer, Tooltip, TopBar, Tour, type TourStep, Tree, type TreeNode, TreeSkeleton, Truncate, UptimeBar, UptimeBarSkeleton, type UptimeState, UrlInput, UsageBar, UsageBarSkeleton, type UseCase, UserMenu, ValueSkeleton, type VerticalTab, VerticalTabs, VerticalTabsSkeleton, VisuallyHidden, Waterfall, Wizard, type WizardStep, announce, bins, cx, describeCron, diffLines, downloadCsv, fileNodes, hotkeyParts, layers, modKey, niceTicks, pageWindow, place, seriesStyle, slugify, toCsv, toast, useChartWidth, useControl, useDismissable, useField, useFormState, useHotkey, useKeys, useMediaQuery, useScrollLock, useSypnia, useValue };
4461
+ export { Accordion, type AccordionItem, AccordionSkeleton, ActionCard, ActionCardSkeleton, Actions, type Activity, ActivityFeed, ActivityFeedSkeleton, Alert, AlertDialog, type AlertProps, AnchorNav, Announcement, ApiKeyField, AppShell, type AppShellProps, AppShellSkeleton, AreaChart, AspectRatio, AuthLayout, type AuthLayoutProps, AuthLayoutSkeleton, Autocomplete, type AutosaveState, AutosaveStatus, Avatar, AvatarGroup, AvatarGroupSkeleton, AvatarSkeleton, AvatarUpload, BackButton, BackToTop, Badge, type BadgeProps, BadgeSkeleton, Banner, BarChart, type BarChartProps, Breadcrumb, BreadcrumbSkeleton, BulkActionBar, type BulkActionBarProps, Button, ButtonGroup, type ButtonProps, type ButtonVariant, Bytes, Calendar, CalendarHeatmap, CalendarHeatmapSkeleton, type CalendarProps, CallToAction, Callout, CalloutSkeleton, Card, CardGrid, CardGridSkeleton, CardSkeleton, type CaseEdge, CaseMap, CaseMapSkeleton, CaseNode, CellEditor, Center, Character, type CharacterName, type CharacterProps, ChartFrame, type ChartFrameProps, ChartSkeleton, ChartTooltip, Checkbox, CheckboxCard, type CheckboxCardProps, CheckboxCardSkeleton, CheckboxGroup, type CheckboxGroupProps, CheckboxGroupSkeleton, CheckboxSkeleton, Checklist, type ChecklistItem, ChecklistSkeleton, Chip, ChipSkeleton, CloseButton, CodeBlock, type CodeBlockProps, CodeBlockSkeleton, CodeDiff, CodeDiffSkeleton, CodeEditor, type CodeEditorProps, CodeEditorSkeleton, CodeInput, Collapsible, type CollapsibleProps, ColorPicker, ColorSwatchPicker, type Column, ColumnPicker, type ColumnPickerProps, Columns, type ColumnsProps, Combobox, type ComboboxProps, type Command, CommandPalette, type CompareRow, CompareTable, CompareTableSkeleton, type CompareValue, ConfirmDialog, type ConfirmDialogProps, Container, ContextMenu, type ControlProps, type ControlSize, CopyButton, CopyField, CopyFieldSkeleton, CopyableText, CopyableTextSkeleton, Count, CountSkeleton, Countdown, type Country, CronInput, Currency, CurrencyInput, CursorPagination, DataCards, DataCardsSkeleton, type DataColumn, type DataField, type DataFilters, DataList, DataListSkeleton, type DataOption, type DataSort, DataTable, type DataTableProps, DataTableSkeleton, DatePicker, type DatePickerProps, type DateRange, DateRangePicker, type DateRangePickerProps, DateTimePicker, type DateTimePickerProps, Delta, DeltaSkeleton, DensitySwitch, type Description, DescriptionList, DescriptionListSkeleton, DiagramSkeleton, Dialog, type DialogProps, type DiffLine, Disclosure, DisclosureSkeleton, Dismissable, Divider, DownloadButton, Drawer, Duration, DurationInput, type DurationUnit, EditableText, EditableTextSkeleton, EmailInput, EmptyState, type EmptyStateProps, type Entity, type EntityColumn, EntityDiagram, EntityDiagramSkeleton, EnvironmentSwitcher, ErrorSummary, Faq, type Feature, FeatureGrid, FeatureGridSkeleton, type FeatureItem, FeatureList, FeatureListSkeleton, Field, FieldError, type FieldProps, FieldSkeleton, Fieldset, Figure, FigureSkeleton, FileDrop, type FileDropProps, type FileEntry, FileInput, FileTree, FileTreeSkeleton, FilterBar, type FilterBarProps, FilterChip, type FilterChipProps, type FilterField, Fireflies, type FirefliesProps, FlameGraph, FlameGraphSkeleton, FlowDiagram, type FlowEdge, type FlowNode, FocusScope, Form, FormActions, FormGrid, type FormProblem, type FormProps, FormRow, FormRowSkeleton, FormSection, FormSectionSkeleton, FormSkeleton, type FormState, type Frame, Funnel, type Gap, Gauge, GaugeSkeleton, Grid, type GridProps, Hash, HashSkeleton, Heading, Health, HealthSkeleton, type HealthState, Heatmap, Hero, type HeroProps, Hint, Histogram, HorizontalBar, Hotkey, HoverCard, HoverCardSkeleton, HttpMethod, Icon, IconButton, type IconButtonProps, type IconName, type IconProps, Identity, IdentitySkeleton, Image, ImageSkeleton, ImageUpload, ImageUploadSkeleton, InlineCode, InlineEdit, type InlineEditProps, InlineEditSkeleton, Input, InputGroup, type InputProps, JsonEditor, JsonViewer, JsonViewerSkeleton, Kbd, KeyValue, KeyValueEditor, KeyValueEditorSkeleton, type KeyValueRow, KeyValueSkeleton, Label, LanguageSwitch, Layer, Ledger, Legend, Lightbox, type LightboxImage, LineChart, type LineChartProps, Link, LinkButton, LinkCard, LinkCardSkeleton, type LinkRenderProps, List, ListItem, type ListItemProps, ListItemSkeleton, ListSkeleton, LiveIndicator, LiveRegion, LoadMore, LocaleScope, type LogLevel, type LogLine, LogViewer, LogViewerSkeleton, Logo, Mark, Menu, MenuButton, MenuGroup, MenuItem, MenuSeparator, MenuSkeleton, Meter, MeterSkeleton, MobileNav, MonthPicker, MoreSheet, MultiSelect, type MultiSelectProps, NativeSelect, type NativeSelectProps, NavGroup, NavItem, NewCard, NotFound, Notice, NotificationBell, type NotificationEntry, NotificationList, NotificationListSkeleton, Number, NumberInput, type NumberInputProps, OfflineNotice, type Option, OrgSwitcher, OtpInput, type OtpInputProps, Page, PageHeader, PageHeaderSkeleton, PageSizeSelect, PageSkeleton, Pagination, type PaginationProps, PaginationSkeleton, Panel, PanelSkeleton, PartToWhole, PartToWholeSkeleton, PasswordInput, PercentInput, Percentiles, Phone, PhoneInput, type Placement, PlanCard, type PlanCardProps, PlanCardSkeleton, Popconfirm, Popover, Portal, Positioner, Presence, type PricingPlan, PricingTable, PricingTableSkeleton, type Product, ProductGrid, type ProductItem, type ProductLink, ProductMark, ProductSwitch, Progress, ProgressSkeleton, type ProgressStep, ProgressSteps, ProgressStepsSkeleton, ProjectSwitcher, PromptDialog, type PromptDialogProps, QueryEditorSkeleton, Quote, QuoteSkeleton, Radio, RadioCards, type RadioCardsProps, RadioCardsSkeleton, RadioGroup, type RadioGroupProps, RadioGroupSkeleton, RangeSlider, type RangeSliderProps, Rating, type Region, RegionSelect, type Release, Releases, type RenderLink, RovingFocus, Row, type RowAction, RowActions, type RowActionsProps, type RowKey, type RowProps, RowsChartSkeleton, SaveBar, SavingIndicator, Says, Scatter, type ScatterPoint, type SchemaColumn, SchemaViewer, SchemaViewerSkeleton, ScrollArea, type ScrollAreaProps, ScrollLock, SearchInput, Section, type SectionProps, SectionSkeleton, SegmentedControl, Select, type SelectProps, SequenceDiagram, type SequenceMessage, type Series, Sheet, Shortcut, ShortcutSkeleton, Show, Sidebar, SidebarSection, SiteFooter, type SiteFooterProps, SiteHeader, type SiteHeaderProps, type SiteLink, Skeleton, SkeletonCard, SkeletonTable, SkeletonText, SkipLink, Slider, type SliderProps, SlugInput, type SlugInputProps, Snippet, SnippetSkeleton, SortMenu, SortMenuSkeleton, type SortOption, Spacer, type Span, SparkBar, Sparkline, SparklineSkeleton, Split, SplitButton, type SplitButtonProps, type SplitProps, SqlEditor, Stack, StackedArea, Stage, Stat, StatGroup, StatGroupSkeleton, StatSkeleton, Status, StatusCode, StatusSkeleton, Stepper, StepperSkeleton, Sticky, SurfaceSwitch, Switch, SwitchSkeleton, type SwitcherOption, SwitcherSkeleton, SypniaProvider, type TabItem, Table, type TableProps, TableSkeleton, TableToolbar, type TableToolbarProps, Tabs, TabsSkeleton, Tag, TagInput, type TagInputProps, TagSkeleton, Terminal, type TerminalLine, TerminalSkeleton, Text, type TextProps, TextSkeleton, Textarea, type TextareaProps, Thumbnail, ThumbnailSkeleton, Time, TimePicker, type TimePickerProps, TimeSkeleton, Timeline, type TimelineItem, TimelineSkeleton, TimezoneSelect, type ToastOptions, Toaster, ToggleButton, ToggleGroup, type ToggleItem, type Tone, Toolbar, ToolbarGroup, type ToolbarProps, ToolbarSeparator, ToolbarSkeleton, ToolbarSpacer, Tooltip, TopBar, Tour, type TourStep, Tree, type TreeNode, TreeSkeleton, Truncate, UptimeBar, UptimeBarSkeleton, type UptimeState, UrlInput, UsageBar, UsageBarSkeleton, type UseCase, UserMenu, ValueSkeleton, type VerticalTab, VerticalTabs, VerticalTabsSkeleton, VisuallyHidden, Waterfall, Wizard, type WizardStep, announce, bins, cx, describeCron, diffLines, downloadCsv, fileNodes, hotkeyParts, layers, modKey, niceTicks, pageWindow, place, seriesStyle, slugify, toCsv, toast, useChartWidth, useControl, useDismissable, useField, useFormState, useHotkey, useKeys, useMediaQuery, useScrollLock, useSypnia, useValue };