@hachej/boring-workspace 0.1.13 → 0.1.16

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.
Files changed (34) hide show
  1. package/README.md +270 -42
  2. package/dist/CommandPalette-NOEOVkN2.js +5714 -0
  3. package/dist/{FileTree-BVfqs3rR.js → FileTree-Dl-qUAB0.js} +9 -9
  4. package/dist/MarkdownEditor-yc6mFsnI.js +533 -0
  5. package/dist/{WorkspaceLoadingState-BjZGQLS_.js → WorkspaceLoadingState-CSZfENWe.js} +145 -124
  6. package/dist/agent-tool-DEtfQPVB.d.ts +100 -0
  7. package/dist/app-front.d.ts +79 -67
  8. package/dist/app-front.js +253 -241
  9. package/dist/app-server.d.ts +17 -12
  10. package/dist/app-server.js +80 -10
  11. package/dist/{bootstrapServer-BRUqUpVW.d.ts → bootstrapServer-BreQ9QBc.d.ts} +8 -2
  12. package/dist/server.d.ts +10 -32
  13. package/dist/server.js +22 -127
  14. package/dist/shared.d.ts +1 -2
  15. package/dist/testing.d.ts +0 -63
  16. package/dist/testing.js +2248 -2401
  17. package/dist/workspace.css +1616 -974
  18. package/dist/workspace.d.ts +111 -450
  19. package/dist/workspace.js +417 -1635
  20. package/docs/INTERFACES.md +2 -2
  21. package/docs/PLUGIN_STRUCTURE.md +1 -1
  22. package/docs/plans/ASK_USER_QUESTIONS_PLUGIN_SPEC.md +131 -263
  23. package/docs/plans/GENERIC_EXPLORER_PLUGIN_PLAN.md +29 -27
  24. package/docs/plans/MACRO_PLUGIN_GENERIC_HELPERS_AUDIT.md +12 -12
  25. package/docs/plans/PANE_TO_AGENT_CHAT_ACTIONS_SPEC.md +366 -0
  26. package/docs/plans/README.md +2 -0
  27. package/docs/plans/archive/PLUGIN_MODEL.md +14 -14
  28. package/docs/plans/archive/SRC_FOLDER_REORG_PLAN.md +2 -3
  29. package/docs/plans/archive/WORKSPACE_V2_PLAN.md +1 -1
  30. package/package.json +3 -6
  31. package/dist/CommandPalette-Dme9em28.js +0 -5506
  32. package/dist/MarkdownEditor-CcCDF65H.js +0 -502
  33. package/dist/agent-tool-NvxKfist.d.ts +0 -28
  34. package/dist/explorer-DtLUnuah.d.ts +0 -129
package/dist/workspace.js CHANGED
@@ -1,48 +1,48 @@
1
- var $e = Object.defineProperty;
2
- var Ke = (e, t, r) => t in e ? $e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
- var ne = (e, t, r) => Ke(e, typeof t != "symbol" ? t + "" : t, r);
4
- import { d as ae, u as ke, p as Ve, P as je, a as Ge, b as Qe, D as He } from "./CommandPalette-Dme9em28.js";
5
- import { A as yr, C as br, c as vr, e as Nr, f as Sr, F as Cr, g as Tr, M as Pr, h as kr, i as Er, j as wr, k as Ir, l as Mr, R as Dr, S as Rr, m as Or, n as Fr, T as Lr, W as zr, o as qr, q as _r, r as Br, s as Ar, t as $r, v as Kr, w as Vr, x as jr, y as Gr, z as Qr, B as Hr, E as Wr, G as Ur, H as Xr, I as Jr, J as Yr, K as Zr, L as ea, N as ta, O as ra, Q as aa, U as na, V as la, X as oa, Y as sa, Z as ca, _ as ia, $ as ua, a0 as da, a1 as pa, a2 as fa, a3 as ma, a4 as ga, a5 as ha, a6 as xa, a7 as ya, a8 as ba, a9 as va, aa as Na, ab as Sa, ac as Ca, ad as Ta, ae as Pa, af as ka, ag as Ea, ah as wa } from "./CommandPalette-Dme9em28.js";
6
- import { jsxs as h, jsx as a, Fragment as We } from "react/jsx-runtime";
7
- import { useSyncExternalStore as Ue, useState as V, useEffect as Y, useRef as I, useCallback as v, useReducer as Xe, useMemo as ee, Suspense as Je, Component as Ye } from "react";
8
- import { SearchIcon as Ze, XIcon as pe, FilterIcon as et, ChevronDownIcon as Ee, ChevronRightIcon as we, Database as tt, BarChart3 as fe, MenuIcon as rt, PanelLeftOpenIcon as at, PanelLeftCloseIcon as nt, PinIcon as lt } from "lucide-react";
9
- import { EmptyState as Ie, Toolbar as ot, Popover as me, PopoverTrigger as ge, PopoverContent as he, Input as Me, Button as J, Spinner as st, ChipButton as ct, Chip as it, Sheet as ut, SheetContent as dt, SheetHeader as pt, SheetTitle as ft, SheetDescription as mt, Kbd as le, ErrorState as gt, IconButton as De } from "@hachej/boring-ui-kit";
10
- import { Toaster as Ma, dismissToast as Da, toast as Ra } from "@hachej/boring-ui-kit";
11
- import { c as H } from "./utils-B6yFEsav.js";
12
- import { d as Re } from "./panel-DnvDNQac.js";
13
- import { C as Fa, T as La, W as za, b as qa } from "./WorkspaceLoadingState-BjZGQLS_.js";
14
- import { C as Ba, c as Aa } from "./CodeEditor-DQqOn4xz.js";
15
- import { FileTree as Ka } from "./FileTree-BVfqs3rR.js";
16
- import { MarkdownEditor as ja } from "./MarkdownEditor-CcCDF65H.js";
17
- function re(e, t) {
18
- const { pluginId: r, ...n } = e;
19
- return t ? { ...n, pluginId: t } : n;
20
- }
21
- function xe(e, t) {
22
- const r = [];
1
+ var X = Object.defineProperty;
2
+ var q = (e, a, t) => a in e ? X(e, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[a] = t;
3
+ var R = (e, a, t) => q(e, typeof a != "symbol" ? a + "" : a, t);
4
+ import { d as G, u as K, a as Q, b as Y, D as Z } from "./CommandPalette-NOEOVkN2.js";
5
+ import { A as $e, C as He, c as Ue, e as Ae, f as Je, F as Ve, g as Xe, M as qe, h as Ge, P as Qe, i as Ye, j as Ze, k as et, l as tt, R as at, S as nt, m as rt, n as st, T as ot, U as it, W as lt, o as ct, p as dt, q as ut, r as pt, s as mt, t as ft, v as ht, w as gt, x as bt, y as yt, z as vt, B as xt, E as Pt, G as St, H as Ct, I as kt, J as wt, K as Nt, L as Ot, N as Et, O as Tt, Q as Rt, V as It, X as Mt, Y as Lt, Z as Bt, _ as Ft, $ as Wt, a0 as Dt, a1 as zt, a2 as jt, a3 as Kt, a4 as _t, a5 as $t, a6 as Ht, a7 as Ut, a8 as At, a9 as Jt, aa as Vt, ab as Xt, ac as qt, ad as Gt, ae as Qt, af as Yt, ag as Zt, ah as ea, ai as ta, aj as aa } from "./CommandPalette-NOEOVkN2.js";
6
+ import { c as N } from "./utils-B6yFEsav.js";
7
+ import { C as ra, T as sa, W as oa, b as ia } from "./WorkspaceLoadingState-CSZfENWe.js";
8
+ import { jsxs as b, jsx as r, Fragment as ee } from "react/jsx-runtime";
9
+ import { Button as k, Sheet as te, SheetContent as ae, SheetHeader as ne, SheetTitle as re, SheetDescription as se, EmptyState as oe, Kbd as I, ErrorState as ie, IconButton as M } from "@hachej/boring-ui-kit";
10
+ import { Toaster as ca, dismissToast as da, toast as ua } from "@hachej/boring-ui-kit";
11
+ import { useSyncExternalStore as le, useState as O, useEffect as P, useRef as w, useCallback as y, useMemo as C, Suspense as ce, Component as de } from "react";
12
+ import { C as ma, c as fa } from "./CodeEditor-DQqOn4xz.js";
13
+ import { FileTree as ga } from "./FileTree-Dl-qUAB0.js";
14
+ import { MarkdownEditor as ya } from "./MarkdownEditor-yc6mFsnI.js";
15
+ import { MenuIcon as ue, PanelLeftOpenIcon as pe, PanelLeftCloseIcon as me, PinIcon as fe, CheckIcon as he, CopyIcon as ge } from "lucide-react";
16
+ import { d as xa } from "./panel-DnvDNQac.js";
17
+ function S(e, a) {
18
+ const { pluginId: t, ...n } = e;
19
+ return a ? { ...n, pluginId: a } : n;
20
+ }
21
+ function W(e, a) {
22
+ const t = [];
23
23
  for (const n of e.panels ?? [])
24
- r.push(re({ type: "panel", panel: n }, t));
24
+ t.push(S({ type: "panel", panel: n }, a));
25
25
  for (const n of e.commands ?? [])
26
- r.push(re({ type: "command", command: n }, t));
26
+ t.push(S({ type: "command", command: n }, a));
27
27
  for (const n of e.catalogs ?? [])
28
- r.push(re({ type: "catalog", catalog: n }, t));
28
+ t.push(S({ type: "catalog", catalog: n }, a));
29
29
  for (const n of e.agentTools ?? [])
30
- r.push(
31
- re({ type: "agent-tool", id: n.name, tool: n }, t)
30
+ t.push(
31
+ S({ type: "agent-tool", id: n.name, tool: n }, a)
32
32
  );
33
33
  for (const n of e.outputs ?? [])
34
- r.push(re(n, t));
35
- return r;
34
+ t.push(S(n, a));
35
+ return t;
36
36
  }
37
- function ht(e) {
38
- return e.map((r) => r == null ? void 0 : r.trim()).filter((r) => !!r).join(`
37
+ function be(e) {
38
+ return e.map((t) => t == null ? void 0 : t.trim()).filter((t) => !!t).join(`
39
39
 
40
40
  `) || void 0;
41
41
  }
42
- function tr(e) {
43
- const t = e.adoptOutputs !== !1, r = e.plugins.flatMap(
44
- (l) => xe(l, t ? void 0 : l.id)
45
- ), n = xe(
42
+ function Me(e) {
43
+ const a = e.adoptOutputs !== !1, t = e.plugins.flatMap(
44
+ (o) => W(o, a ? void 0 : o.id)
45
+ ), n = W(
46
46
  {
47
47
  id: e.id,
48
48
  panels: e.panels,
@@ -53,1475 +53,256 @@ function tr(e) {
53
53
  },
54
54
  void 0
55
55
  );
56
- return ae({
56
+ return G({
57
57
  id: e.id,
58
58
  label: e.label,
59
- systemPrompt: ht([
60
- ...e.plugins.map((l) => l.systemPrompt),
59
+ systemPrompt: be([
60
+ ...e.plugins.map((o) => o.systemPrompt),
61
61
  e.systemPrompt
62
62
  ]),
63
- outputs: [...r, ...n]
63
+ outputs: [...t, ...n]
64
64
  });
65
65
  }
66
- function rr() {
67
- const e = ke();
68
- return Ue(e.subscribe, e.getSnapshot);
66
+ function Le() {
67
+ const e = K();
68
+ return le(e.subscribe, e.getSnapshot);
69
69
  }
70
- function ye(e) {
70
+ function D(e) {
71
71
  return typeof window > "u" ? !1 : window.innerWidth < e;
72
72
  }
73
- function be(e = 1024) {
74
- const [t, r] = V(() => ye(e));
75
- return Y(() => {
73
+ function z(e = 1024) {
74
+ const [a, t] = O(() => D(e));
75
+ return P(() => {
76
76
  const n = () => {
77
- r(ye(e));
77
+ t(D(e));
78
78
  };
79
79
  return n(), window.addEventListener("resize", n), () => {
80
80
  window.removeEventListener("resize", n);
81
81
  };
82
- }, [e]), t;
82
+ }, [e]), a;
83
83
  }
84
- function xt({
84
+ function ye({
85
85
  isNarrowViewport: e,
86
- isCollapsed: t,
87
- setCollapsed: r
86
+ isCollapsed: a,
87
+ setCollapsed: t
88
88
  }) {
89
- const n = I(t), l = I(!1), o = I(null);
90
- return Y(() => {
91
- n.current = t;
92
- }, [t]), Y(() => {
93
- const d = o.current, c = d !== !0 && e, s = d === !0 && !e;
94
- if (o.current = e, e && c && !n.current) {
95
- l.current = !0, r(!0);
89
+ const n = w(a), o = w(!1), l = w(null);
90
+ return P(() => {
91
+ n.current = a;
92
+ }, [a]), P(() => {
93
+ const g = l.current, d = g !== !0 && e, i = g === !0 && !e;
94
+ if (l.current = e, e && d && !n.current) {
95
+ o.current = !0, t(!0);
96
96
  return;
97
97
  }
98
- s && l.current && (l.current = !1, r(!1));
99
- }, [e, r]), v(() => {
100
- l.current = !1;
98
+ i && o.current && (o.current = !1, t(!1));
99
+ }, [e, t]), y(() => {
100
+ o.current = !1;
101
101
  }, []);
102
102
  }
103
- function ar(e) {
104
- const [t, r] = V([]), n = I(t);
105
- n.current = t, Y(() => {
103
+ function Be(e) {
104
+ const [a, t] = O([]), n = w(a);
105
+ n.current = a, P(() => {
106
106
  if (!e) {
107
- r([]);
107
+ t([]);
108
108
  return;
109
109
  }
110
- function s() {
110
+ function i() {
111
111
  try {
112
- const u = e.toJSON(), x = [];
112
+ const u = e.toJSON(), f = [];
113
113
  if (u && typeof u == "object" && "panels" in u) {
114
- const C = u;
115
- if (C.panels)
116
- for (const [, y] of Object.entries(C.panels))
117
- y.id && x.push({
118
- id: y.id,
119
- component: y.contentComponent ?? y.id,
120
- params: y.params
114
+ const h = u;
115
+ if (h.panels)
116
+ for (const [, m] of Object.entries(h.panels))
117
+ m.id && f.push({
118
+ id: m.id,
119
+ component: m.contentComponent ?? m.id,
120
+ params: m.params
121
121
  });
122
122
  }
123
- const g = n.current;
124
- (g.length !== x.length || g.some((C, y) => {
125
- var P;
126
- return C.id !== ((P = x[y]) == null ? void 0 : P.id);
127
- })) && r(x);
123
+ const s = n.current;
124
+ (s.length !== f.length || s.some((h, m) => {
125
+ var v;
126
+ return h.id !== ((v = f[m]) == null ? void 0 : v.id);
127
+ })) && t(f);
128
128
  } catch {
129
129
  }
130
130
  }
131
- s();
132
- const i = setInterval(s, 500);
133
- return () => clearInterval(i);
131
+ i();
132
+ const c = setInterval(i, 500);
133
+ return () => clearInterval(c);
134
134
  }, [e]);
135
- const l = v(
136
- (s) => {
135
+ const o = y(
136
+ (i) => {
137
137
  e == null || e.addPanel("artifacts", {
138
- id: s.id,
139
- component: s.component,
140
- params: s.params
138
+ id: i.id,
139
+ component: i.component,
140
+ params: i.params
141
141
  });
142
142
  },
143
143
  [e]
144
- ), o = v(
145
- (s) => {
146
- e == null || e.removePanel(s);
144
+ ), l = y(
145
+ (i) => {
146
+ e == null || e.removePanel(i);
147
147
  },
148
148
  [e]
149
- ), d = v(
150
- (s) => {
151
- e == null || e.activatePanel(s);
149
+ ), g = y(
150
+ (i) => {
151
+ e == null || e.activatePanel(i);
152
152
  },
153
153
  [e]
154
- ), c = v(
155
- (s) => n.current.some((i) => i.id === s),
154
+ ), d = y(
155
+ (i) => n.current.some((c) => c.id === i),
156
156
  []
157
157
  );
158
- return { panels: t, open: l, close: o, activate: d, isOpen: c };
159
- }
160
- function nr(e, t = {}) {
161
- const r = t.toolPanelMap ?? {}, n = v(
162
- (o) => r[o],
163
- [r]
164
- );
165
- return { openForTool: v(
166
- (o, d) => {
167
- const c = r[o];
168
- if (!c) return;
169
- const s = `artifact-${d.path}`;
170
- e.isOpen(s) ? e.activate(s) : e.open({ id: s, component: c, params: d });
171
- },
172
- [r, e]
173
- ), resolvePanel: n };
174
- }
175
- const ce = { items: [], total: 0, hasMore: !1, loading: !1 };
176
- function yt(e, t) {
177
- switch (t.type) {
178
- case "setPendingQuery":
179
- return { ...e, pendingQuery: t.query };
180
- case "applyQuery":
181
- return {
182
- ...e,
183
- query: t.query,
184
- pendingQuery: t.query,
185
- topItems: [],
186
- topTotal: 0,
187
- topHasMore: !1,
188
- topOffset: 0,
189
- expanded: {},
190
- groups: {}
191
- };
192
- case "setFilters":
193
- return {
194
- ...e,
195
- filters: t.filters,
196
- topItems: [],
197
- topTotal: 0,
198
- topHasMore: !1,
199
- topOffset: 0,
200
- expanded: {},
201
- groups: {}
202
- };
203
- case "expandGroup":
204
- return { ...e, expanded: { ...e.expanded, [t.value]: !0 } };
205
- case "collapseGroup":
206
- return { ...e, expanded: { ...e.expanded, [t.value]: !1 } };
207
- case "topResolved":
208
- return {
209
- ...e,
210
- topItems: t.append ? [...e.topItems, ...t.items] : t.items,
211
- topTotal: t.total,
212
- topHasMore: t.hasMore,
213
- topOffset: t.offset + t.items.length
214
- };
215
- case "groupResolved": {
216
- const r = e.groups[t.value] ?? ce;
217
- return {
218
- ...e,
219
- groups: {
220
- ...e.groups,
221
- [t.value]: {
222
- items: t.append ? [...r.items, ...t.items] : t.items,
223
- total: t.total,
224
- hasMore: t.hasMore,
225
- loading: !1
226
- }
227
- }
228
- };
229
- }
230
- case "groupLoading": {
231
- const r = e.groups[t.value] ?? ce;
232
- return {
233
- ...e,
234
- groups: { ...e.groups, [t.value]: { ...r, loading: t.loading } }
235
- };
236
- }
237
- case "facetsResolved":
238
- return { ...e, facets: t.facets };
239
- case "loading":
240
- return { ...e, loading: t.loading };
241
- }
242
- }
243
- const bt = {
244
- query: "",
245
- pendingQuery: "",
246
- filters: {},
247
- topItems: [],
248
- topTotal: 0,
249
- topHasMore: !1,
250
- topOffset: 0,
251
- expanded: {},
252
- groups: {},
253
- facets: null,
254
- loading: !1
255
- };
256
- function oe(e) {
257
- return e instanceof DOMException && e.name === "AbortError";
258
- }
259
- function vt(e) {
260
- const {
261
- adapter: t,
262
- facets: r,
263
- groupBy: n,
264
- pageSize: l = 50,
265
- debounceMs: o = 200,
266
- query: d
267
- } = e, c = d !== void 0, [s, i] = Xe(yt, bt), u = I(s);
268
- u.current = s;
269
- const x = I(t);
270
- x.current = t;
271
- const g = I({ pageSize: l, groupBy: n, hasFacets: !!(r != null && r.length) });
272
- g.current = { pageSize: l, groupBy: n, hasFacets: !!(r != null && r.length) };
273
- const m = I(null), C = I(/* @__PURE__ */ new Map()), y = I(null), P = I(null), O = I(!0), j = v(
274
- async (p) => {
275
- var R;
276
- (R = m.current) == null || R.abort();
277
- const N = new AbortController();
278
- m.current = N, i({ type: "loading", loading: !0 });
279
- const b = {
280
- query: p.query,
281
- filters: p.filters,
282
- offset: p.offset,
283
- limit: g.current.pageSize,
284
- signal: N.signal
285
- };
286
- try {
287
- const E = await x.current.search(b);
288
- if (!O.current || N.signal.aborted) return;
289
- i({
290
- type: "topResolved",
291
- items: E.items,
292
- total: E.total,
293
- hasMore: E.hasMore,
294
- offset: p.offset,
295
- append: p.append
296
- });
297
- } catch (E) {
298
- if (oe(E)) return;
299
- console.error("DataExplorer: search failed", E);
300
- } finally {
301
- O.current && m.current === N && i({ type: "loading", loading: !1 });
302
- }
303
- },
304
- []
305
- ), F = v(
306
- async (p) => {
307
- var E;
308
- const N = g.current.groupBy;
309
- if (!N) return;
310
- (E = C.current.get(p.groupValue)) == null || E.abort();
311
- const b = new AbortController();
312
- C.current.set(p.groupValue, b), i({ type: "groupLoading", value: p.groupValue, loading: !0 });
313
- const R = {
314
- query: p.query,
315
- filters: p.filters,
316
- group: { key: N, value: p.groupValue },
317
- offset: p.offset,
318
- limit: g.current.pageSize,
319
- signal: b.signal
320
- };
321
- try {
322
- const X = await x.current.search(R);
323
- if (!O.current || b.signal.aborted) return;
324
- i({
325
- type: "groupResolved",
326
- value: p.groupValue,
327
- items: X.items,
328
- total: X.total,
329
- hasMore: X.hasMore,
330
- append: p.append
331
- });
332
- } catch (X) {
333
- if (oe(X)) return;
334
- console.error("DataExplorer: group search failed", X), O.current && i({ type: "groupLoading", value: p.groupValue, loading: !1 });
335
- }
336
- },
337
- []
338
- ), _ = v(async (p) => {
339
- var R;
340
- if (!g.current.hasFacets) return;
341
- const N = x.current.fetchFacets;
342
- if (!N) return;
343
- (R = y.current) == null || R.abort();
344
- const b = new AbortController();
345
- y.current = b;
346
- try {
347
- const E = await N({ filters: p, signal: b.signal });
348
- if (!O.current || b.signal.aborted) return;
349
- i({ type: "facetsResolved", facets: E });
350
- } catch (E) {
351
- if (oe(E)) return;
352
- console.error("DataExplorer: fetchFacets failed", E);
353
- }
354
- }, []), S = v(
355
- (p, N) => {
356
- j({ query: p, filters: N, offset: 0, append: !1 }), _(N);
357
- },
358
- [j, _]
359
- ), z = I(c);
360
- z.current = c;
361
- const k = v(
362
- (p) => {
363
- z.current || (i({ type: "setPendingQuery", query: p }), P.current && clearTimeout(P.current), P.current = setTimeout(() => {
364
- i({ type: "applyQuery", query: p }), S(p, u.current.filters);
365
- }, o));
366
- },
367
- [o, S]
368
- ), L = v(
369
- (p, N) => {
370
- const b = u.current.filters[p] ?? [], R = b.includes(N) ? b.filter((X) => X !== N) : [...b, N], E = { ...u.current.filters };
371
- R.length ? E[p] = R : delete E[p], i({ type: "setFilters", filters: E }), S(u.current.query, E);
372
- },
373
- [S]
374
- ), B = v(() => {
375
- i({ type: "setFilters", filters: {} }), S(u.current.query, {});
376
- }, [S]), T = v(
377
- (p) => {
378
- var b;
379
- const N = (((b = u.current.groups[p]) == null ? void 0 : b.items.length) ?? 0) > 0;
380
- i({ type: "expandGroup", value: p }), N || F({
381
- groupValue: p,
382
- query: u.current.query,
383
- filters: u.current.filters,
384
- offset: 0,
385
- append: !1
386
- });
387
- },
388
- [F]
389
- ), G = v((p) => {
390
- i({ type: "collapseGroup", value: p });
391
- }, []), D = v(() => {
392
- const p = u.current;
393
- p.topHasMore && j({
394
- query: p.query,
395
- filters: p.filters,
396
- offset: p.topOffset,
397
- append: !0
398
- });
399
- }, [j]), Q = v(
400
- (p) => {
401
- const N = u.current, b = N.groups[p];
402
- b != null && b.hasMore && F({
403
- groupValue: p,
404
- query: N.query,
405
- filters: N.filters,
406
- offset: b.items.length,
407
- append: !0
408
- });
409
- },
410
- [F]
411
- );
412
- Y(() => {
413
- O.current = !0;
414
- const p = z.current ? d ?? "" : "";
415
- return p && i({ type: "applyQuery", query: p }), S(p, {}), () => {
416
- var N, b;
417
- O.current = !1, P.current && clearTimeout(P.current), (N = m.current) == null || N.abort(), (b = y.current) == null || b.abort();
418
- for (const R of C.current.values()) R.abort();
419
- C.current.clear();
420
- };
421
- }, []);
422
- const U = I(d);
423
- Y(() => {
424
- if (!c || U.current === d) return;
425
- U.current = d;
426
- const p = d ?? "";
427
- i({ type: "applyQuery", query: p }), S(p, u.current.filters);
428
- }, [c, d, S]);
429
- const te = v(
430
- (p) => s.groups[p] ?? ce,
431
- [s.groups]
432
- ), Z = v(
433
- (p) => !!s.expanded[p],
434
- [s.expanded]
435
- );
436
- return {
437
- query: s.pendingQuery,
438
- filters: s.filters,
439
- facets: s.facets,
440
- topItems: s.topItems,
441
- topTotal: s.topTotal,
442
- topHasMore: s.topHasMore,
443
- loading: s.loading,
444
- getGroup: te,
445
- isExpanded: Z,
446
- setQuery: k,
447
- toggleFilter: L,
448
- clearFilters: B,
449
- expandGroup: T,
450
- collapseGroup: G,
451
- loadMoreTop: D,
452
- loadMoreGroup: Q
453
- };
454
- }
455
- function ie({
456
- adapter: e,
457
- facets: t,
458
- groupBy: r,
459
- onActivate: n,
460
- getDragPayload: l,
461
- emptyState: o = "No results",
462
- searchPlaceholder: d = "Search…",
463
- searchable: c = !0,
464
- query: s,
465
- onQueryChange: i,
466
- pageSize: u,
467
- debounceMs: x,
468
- className: g
469
- }) {
470
- const m = vt({
471
- adapter: e,
472
- facets: t,
473
- groupBy: r,
474
- pageSize: u,
475
- debounceMs: x,
476
- query: s
477
- }), C = s !== void 0, y = c && (!C || !!i), P = C && i ? i : m.setQuery, O = (s ?? m.query ?? "").length > 0, j = Object.values(m.filters).some((k) => k.length > 0), F = !!r && !O && !j, _ = Object.values(m.filters).reduce((k, L) => k + L.length, 0), S = ee(() => {
478
- var T, G;
479
- if (!F || !r) return [];
480
- const k = t == null ? void 0 : t.find((D) => D.key === r), B = [...((T = m.facets) == null ? void 0 : T[r]) ?? []];
481
- if ((G = k == null ? void 0 : k.order) != null && G.length) {
482
- const D = (Q) => {
483
- const U = k.order.indexOf(Q);
484
- return U === -1 ? Number.MAX_SAFE_INTEGER : U;
485
- };
486
- B.sort((Q, U) => D(Q.value) - D(U.value));
487
- }
488
- return B.map((D) => ({
489
- value: D.value,
490
- count: D.count,
491
- label: k != null && k.formatValue ? k.formatValue(D.value) : D.value
492
- }));
493
- }, [F, r, t, m.facets]), z = !m.loading && !F && m.topItems.length === 0 && m.query.length === 0 && !j;
494
- return /* @__PURE__ */ h("div", { className: H("flex h-full flex-col", g), "data-slot": "data-explorer", children: [
495
- y || t != null && t.length ? /* @__PURE__ */ a(
496
- Nt,
497
- {
498
- searchable: y,
499
- searchPlaceholder: d,
500
- query: m.query,
501
- onQueryChange: P,
502
- facetConfigs: t,
503
- facets: m.facets,
504
- filters: m.filters,
505
- filterCount: _,
506
- onToggleFilter: m.toggleFilter,
507
- onClearFilters: m.clearFilters,
508
- total: F ? null : m.topTotal
509
- }
510
- ) : null,
511
- /* @__PURE__ */ a("div", { className: "flex-1 overflow-y-auto", "data-slot": "data-explorer-list", children: z ? /* @__PURE__ */ a("div", { className: "flex h-full items-center justify-center px-4 py-8", children: /* @__PURE__ */ a(Ie, { className: "min-h-0 border-0", description: o }) }) : F ? /* @__PURE__ */ a(
512
- Tt,
513
- {
514
- entries: S,
515
- isExpanded: m.isExpanded,
516
- getGroup: m.getGroup,
517
- onExpand: m.expandGroup,
518
- onCollapse: m.collapseGroup,
519
- onLoadMoreGroup: m.loadMoreGroup,
520
- onActivate: n,
521
- getDragPayload: l
522
- }
523
- ) : /* @__PURE__ */ a(
524
- Ct,
525
- {
526
- items: m.topItems,
527
- hasMore: m.topHasMore,
528
- loading: m.loading,
529
- onLoadMore: m.loadMoreTop,
530
- onActivate: n,
531
- getDragPayload: l
532
- }
533
- ) })
534
- ] });
535
- }
536
- function Nt({
537
- searchable: e,
538
- searchPlaceholder: t,
539
- query: r,
540
- onQueryChange: n,
541
- facetConfigs: l,
542
- facets: o,
543
- filters: d,
544
- filterCount: c,
545
- onToggleFilter: s,
546
- onClearFilters: i,
547
- total: u
548
- }) {
549
- return /* @__PURE__ */ h(ot, { className: "border-b border-border/60 px-2 py-1.5", children: [
550
- u != null ? /* @__PURE__ */ a("span", { className: "px-1 font-mono text-[10.5px] uppercase tracking-[0.05em] text-muted-foreground/80", children: u.toLocaleString() }) : null,
551
- /* @__PURE__ */ a("div", { className: "flex-1" }),
552
- e ? /* @__PURE__ */ h(me, { children: [
553
- /* @__PURE__ */ h(
554
- ge,
555
- {
556
- "aria-label": "Search",
557
- className: H(
558
- "inline-flex h-7 items-center gap-1 rounded-sm px-1.5 text-[11px] text-muted-foreground transition-colors hover:bg-muted/60 hover:text-foreground",
559
- r.length > 0 && "bg-muted text-foreground"
560
- ),
561
- children: [
562
- /* @__PURE__ */ a(Ze, { size: 12 }),
563
- r.length > 0 ? /* @__PURE__ */ a("span", { className: "max-w-20 truncate text-[11px]", children: r }) : null
564
- ]
565
- }
566
- ),
567
- /* @__PURE__ */ h(he, { side: "right", align: "start", sideOffset: 8, className: "w-64 p-3", children: [
568
- /* @__PURE__ */ a(
569
- Me,
570
- {
571
- "aria-label": "Search",
572
- autoFocus: !0,
573
- placeholder: t,
574
- value: r,
575
- onChange: (x) => n(x.target.value),
576
- className: "h-8 rounded-sm text-[12.5px]"
577
- }
578
- ),
579
- r.length > 0 ? /* @__PURE__ */ h(J, { type: "button", variant: "ghost", size: "xs", onClick: () => n(""), className: "mt-2 gap-1 text-[11px] text-muted-foreground hover:text-foreground", children: [
580
- /* @__PURE__ */ a(pe, { size: 11 }),
581
- " Clear search"
582
- ] }) : null
583
- ] })
584
- ] }) : null,
585
- l != null && l.length ? /* @__PURE__ */ h(me, { children: [
586
- /* @__PURE__ */ h(
587
- ge,
588
- {
589
- "aria-label": "Filters",
590
- className: H(
591
- "inline-flex h-7 items-center gap-1 rounded-sm px-1.5 text-[11px] text-muted-foreground transition-colors hover:bg-muted/60 hover:text-foreground",
592
- c > 0 && "bg-muted text-foreground"
593
- ),
594
- children: [
595
- /* @__PURE__ */ a(et, { size: 12 }),
596
- c > 0 ? /* @__PURE__ */ a("span", { className: "font-mono text-[10px]", children: c }) : null
597
- ]
598
- }
599
- ),
600
- /* @__PURE__ */ h(
601
- he,
602
- {
603
- side: "right",
604
- align: "start",
605
- sideOffset: 8,
606
- className: "w-64 space-y-3 p-3 text-[12px]",
607
- children: [
608
- l.map((x) => /* @__PURE__ */ a(
609
- St,
610
- {
611
- config: x,
612
- values: (o == null ? void 0 : o[x.key]) ?? [],
613
- selected: d[x.key] ?? [],
614
- onToggle: s
615
- },
616
- x.key
617
- )),
618
- c > 0 ? /* @__PURE__ */ h(J, { type: "button", variant: "ghost", size: "xs", onClick: i, className: "gap-1 text-[11px] text-muted-foreground hover:text-foreground", children: [
619
- /* @__PURE__ */ a(pe, { size: 11 }),
620
- " Clear all"
621
- ] }) : null
622
- ]
623
- }
624
- )
625
- ] }) : null
626
- ] });
627
- }
628
- function St({
629
- config: e,
630
- values: t,
631
- selected: r,
632
- onToggle: n
633
- }) {
634
- if (!t.length) return null;
635
- const l = e.order ? [...t].sort((o, d) => {
636
- const c = e.order.indexOf(o.value), s = e.order.indexOf(d.value);
637
- return (c === -1 ? 999 : c) - (s === -1 ? 999 : s);
638
- }) : t;
639
- return /* @__PURE__ */ h("div", { className: "space-y-1.5", children: [
640
- /* @__PURE__ */ a("div", { className: "font-mono text-[10px] uppercase tracking-[0.06em] text-muted-foreground", children: e.label }),
641
- /* @__PURE__ */ a("div", { className: "flex flex-wrap gap-1", children: l.map((o) => {
642
- const d = r.includes(o.value), c = e.formatValue ? e.formatValue(o.value) : o.value;
643
- return /* @__PURE__ */ h(
644
- ct,
645
- {
646
- type: "button",
647
- selected: d,
648
- onClick: () => n(e.key, o.value),
649
- className: "gap-1 rounded-sm text-[11px]",
650
- children: [
651
- c,
652
- /* @__PURE__ */ a("span", { className: "font-mono text-[10px] text-muted-foreground/80", children: o.count.toLocaleString() })
653
- ]
654
- },
655
- o.value
656
- );
657
- }) })
658
- ] });
659
- }
660
- function Ct({
661
- items: e,
662
- hasMore: t,
663
- loading: r,
664
- onLoadMore: n,
665
- onActivate: l,
666
- getDragPayload: o
667
- }) {
668
- return /* @__PURE__ */ h("ul", { className: "flex flex-col px-1 py-1", children: [
669
- e.map((d) => /* @__PURE__ */ a(
670
- Oe,
671
- {
672
- row: d,
673
- onActivate: l,
674
- getDragPayload: o
675
- },
676
- d.id
677
- )),
678
- t ? /* @__PURE__ */ a("li", { className: "px-3 py-2", children: /* @__PURE__ */ a(J, { type: "button", variant: "ghost", size: "xs", onClick: n, disabled: r, className: "w-full justify-start text-[11px] text-muted-foreground hover:text-foreground", children: r ? "Loading…" : "Load more" }) }) : null
679
- ] });
680
- }
681
- function Tt({
682
- entries: e,
683
- isExpanded: t,
684
- getGroup: r,
685
- onExpand: n,
686
- onCollapse: l,
687
- onLoadMoreGroup: o,
688
- onActivate: d,
689
- getDragPayload: c
690
- }) {
691
- return /* @__PURE__ */ a("ul", { className: "flex flex-col py-1", children: e.map((s) => {
692
- const i = t(s.value), u = r(s.value);
693
- return /* @__PURE__ */ h("li", { children: [
694
- /* @__PURE__ */ h(
695
- J,
696
- {
697
- type: "button",
698
- variant: "ghost",
699
- size: "sm",
700
- "aria-expanded": i,
701
- onClick: () => i ? l(s.value) : n(s.value),
702
- className: "group mx-1 h-auto w-[calc(100%-0.5rem)] justify-start gap-1.5 px-1.5 py-1 text-left hover:bg-muted/40",
703
- children: [
704
- i ? /* @__PURE__ */ a(Ee, { size: 11, className: "text-muted-foreground/80" }) : /* @__PURE__ */ a(we, { size: 11, className: "text-muted-foreground/80" }),
705
- /* @__PURE__ */ a("span", { className: "text-[12.5px] font-medium text-foreground", children: s.label }),
706
- /* @__PURE__ */ a("span", { className: "ml-auto font-mono text-[10.5px] text-muted-foreground/80", children: s.count.toLocaleString() })
707
- ]
708
- }
709
- ),
710
- i ? /* @__PURE__ */ h("ul", { className: "flex flex-col", children: [
711
- u.items.map((x) => /* @__PURE__ */ a(
712
- Oe,
713
- {
714
- row: x,
715
- indent: !0,
716
- onActivate: d,
717
- getDragPayload: c
718
- },
719
- x.id
720
- )),
721
- u.loading && u.items.length === 0 ? /* @__PURE__ */ h("li", { className: "flex items-center gap-1.5 pl-7 pr-3 py-1.5 text-[11px] text-muted-foreground/80", children: [
722
- /* @__PURE__ */ a(st, { className: "size-3" }),
723
- "Loading…"
724
- ] }) : null,
725
- u.hasMore ? /* @__PURE__ */ a("li", { className: "pl-7 pr-3 py-1", children: /* @__PURE__ */ a(J, { type: "button", variant: "ghost", size: "xs", onClick: () => o(s.value), disabled: u.loading, className: "text-[11px] text-muted-foreground hover:text-foreground", children: u.loading ? "Loading…" : "Load more" }) }) : null
726
- ] }) : null
727
- ] }, s.value);
728
- }) });
729
- }
730
- function Oe({
731
- row: e,
732
- indent: t,
733
- onActivate: r,
734
- getDragPayload: n
735
- }) {
736
- var i;
737
- const l = !!r, o = n == null ? void 0 : n(e);
738
- return /* @__PURE__ */ h(
739
- "li",
740
- {
741
- ...l ? { role: "button", tabIndex: 0, onClick: () => r == null ? void 0 : r(e), onKeyDown: (u) => {
742
- l && (u.key === "Enter" || u.key === " ") && (u.preventDefault(), r == null || r(e));
743
- } } : {},
744
- ...!!o ? { draggable: !0, onDragStart: (u) => {
745
- o && (u.dataTransfer.setData(o.mimeType, o.value), u.dataTransfer.setData("text/plain", o.value), u.dataTransfer.effectAllowed = "copy");
746
- } } : {},
747
- className: H(
748
- "group mx-1 flex items-start gap-2 rounded-md px-1.5 py-1",
749
- "transition-colors duration-120 ease-[cubic-bezier(0.22,1,0.36,1)]",
750
- l && "cursor-pointer hover:bg-foreground/5",
751
- t && "pl-7"
752
- ),
753
- title: e.title,
754
- children: [
755
- e.leading ? /* @__PURE__ */ a(ve, { badge: e.leading }) : null,
756
- /* @__PURE__ */ h("span", { className: "flex min-w-0 flex-1 flex-col", children: [
757
- /* @__PURE__ */ a("span", { className: "truncate text-[12.5px] font-medium leading-tight text-foreground", children: e.title }),
758
- e.subtitle ? /* @__PURE__ */ a("span", { className: "truncate text-[11.5px] leading-snug text-muted-foreground/85", children: e.subtitle }) : null
759
- ] }),
760
- (i = e.trailing) != null && i.length ? /* @__PURE__ */ a("span", { className: "flex shrink-0 items-center gap-1", children: e.trailing.map((u, x) => /* @__PURE__ */ a(ve, { badge: u }, x)) }) : null,
761
- e.meta ? /* @__PURE__ */ a("span", { className: "shrink-0 self-center font-mono text-[10.5px] text-muted-foreground/80", children: e.meta }) : null
762
- ]
763
- }
764
- );
158
+ return { panels: a, open: o, close: l, activate: g, isOpen: d };
765
159
  }
766
- function ve({ badge: e }) {
767
- return /* @__PURE__ */ a(
768
- it,
769
- {
770
- "aria-hidden": "true",
771
- title: e.tooltip,
772
- className: "mt-[1px] h-[16px] min-w-[24px] rounded-[3px] border-0 bg-muted/60 px-1 font-mono text-[9.5px] uppercase tracking-[0.06em] text-muted-foreground group-hover:text-foreground",
773
- children: e.code
774
- }
160
+ function Fe(e, a = {}) {
161
+ const t = a.toolPanelMap ?? {}, n = y(
162
+ (l) => t[l],
163
+ [t]
775
164
  );
776
- }
777
- const lr = "explorer";
778
- function Pt(e) {
779
- return e.mode ? e.mode : e.sectionedAdapter ? "sectioned" : e.groupBy ? "grouped" : "flat";
780
- }
781
- function kt(e) {
782
- const t = Pt(e);
783
- if (t === "sectioned") {
784
- if (!e.sectionedAdapter)
785
- throw new Error(`explorer "${e.id}" requires sectionedAdapter for sectioned mode`);
786
- return {
787
- mode: t,
788
- sectionedAdapter: e.sectionedAdapter,
789
- onActivate: e.onActivate,
790
- getDragPayload: e.getDragPayload,
791
- emptyState: e.emptyState,
792
- searchPlaceholder: e.searchPlaceholder,
793
- searchable: e.searchable,
794
- query: e.query,
795
- pageSize: e.pageSize,
796
- className: e.className
797
- };
798
- }
799
- if (!e.adapter)
800
- throw new Error(`explorer "${e.id}" requires adapter for ${t} mode`);
801
- if (t === "grouped" && !e.groupBy)
802
- throw new Error(`explorer "${e.id}" requires groupBy for grouped mode`);
803
- return {
804
- mode: t,
805
- adapter: e.adapter,
806
- facets: e.facets,
807
- groupBy: t === "grouped" ? e.groupBy : void 0,
808
- onActivate: e.onActivate,
809
- getDragPayload: e.getDragPayload,
810
- emptyState: e.emptyState,
811
- searchPlaceholder: e.searchPlaceholder,
812
- searchable: e.searchable,
813
- query: e.query,
814
- pageSize: e.pageSize,
815
- debounceMs: e.debounceMs,
816
- className: e.className
817
- };
818
- }
819
- function Ne(e) {
820
- if (e.mode === "sectioned") {
821
- const {
822
- sectionedAdapter: l,
823
- mode: o,
824
- adapter: d,
825
- facets: c,
826
- groupBy: s,
827
- ...i
828
- } = e;
829
- return /* @__PURE__ */ a(wt, { adapter: l, ...i });
830
- }
831
- const { mode: t, sectionedAdapter: r, ...n } = e;
832
- return /* @__PURE__ */ a(ie, { ...n });
833
- }
834
- function Et(e) {
835
- const t = [], r = e.label ?? "Explorer", n = kt(e), l = e.source ?? "app";
836
- function o({ params: c, className: s }) {
837
- return /* @__PURE__ */ a(
838
- Ne,
839
- {
840
- ...n,
841
- query: (c == null ? void 0 : c.searchQuery) ?? (c == null ? void 0 : c.query) ?? n.query,
842
- className: s ?? n.className ?? "h-full"
843
- }
844
- );
845
- }
846
- function d({ className: c }) {
847
- return /* @__PURE__ */ a(Ne, { ...n, className: c ?? n.className ?? "h-full" });
848
- }
849
- if (e.leftTab !== !1) {
850
- const c = e.leftTab ?? {};
851
- t.push({
852
- type: "left-tab",
853
- id: c.id ?? e.id,
854
- title: c.title ?? c.label ?? r,
855
- icon: c.icon,
856
- component: o,
857
- source: l,
858
- chromeless: !0
859
- });
860
- }
861
- if (e.panel) {
862
- const c = Re({
863
- id: e.panel.id ?? `${e.id}-panel`,
864
- title: e.panel.title ?? e.panel.label ?? r,
865
- icon: e.panel.icon,
866
- component: d,
867
- placement: "center",
868
- source: l
869
- });
870
- t.push({ type: "panel", panel: c });
871
- }
872
- if (e.catalog) {
873
- if (!e.adapter)
874
- throw new Error(`explorer "${e.id}" catalog requires a flat/grouped adapter`);
875
- const c = {
876
- id: e.catalog.id ?? e.id,
877
- label: e.catalog.label ?? r,
878
- adapter: e.adapter,
879
- onSelect: e.catalog.onSelect ?? e.onActivate ?? (() => {
880
- })
881
- };
882
- t.push({ type: "catalog", catalog: c });
883
- }
884
- return t;
885
- }
886
- function or(e) {
887
- return ae({
888
- id: e.pluginId ?? e.id,
889
- label: e.label ?? "Explorer",
890
- outputs: Et(e)
891
- });
892
- }
893
- function se(e) {
894
- return e instanceof DOMException && e.name === "AbortError";
895
- }
896
- function wt({
897
- adapter: e,
898
- onActivate: t,
899
- getDragPayload: r,
900
- emptyState: n = "No results",
901
- searchPlaceholder: l = "Search…",
902
- searchable: o = !0,
903
- query: d,
904
- pageSize: c = 50,
905
- className: s
906
- }) {
907
- const i = d !== void 0, [u, x] = V(d ?? ""), [g, m] = V([]), [C, y] = V({}), [P, O] = V({}), [j, F] = V({}), [_, S] = V(!1), [z, k] = V({}), [L, B] = V({}), [T, G] = V({}), [D, Q] = V({}), U = I(null), te = I(/* @__PURE__ */ new Map()), Z = d ?? u, p = I(C);
908
- p.current = C;
909
- const N = I(L);
910
- N.current = L;
911
- const b = v(
912
- async (f, M, w) => {
913
- var $;
914
- ($ = te.current.get(f)) == null || $.abort();
915
- const A = new AbortController();
916
- te.current.set(f, A), k((K) => ({ ...K, [f]: !0 }));
917
- try {
918
- const K = T[f] ?? {}, q = await e.searchSection(f, {
919
- query: Z,
920
- globalFilters: {},
921
- filters: K,
922
- limit: c,
923
- offset: M,
924
- signal: A.signal
925
- });
926
- if (A.signal.aborted) return;
927
- y((W) => ({
928
- ...W,
929
- [f]: w ? [...W[f] ?? [], ...q.items] : q.items
930
- })), O((W) => ({ ...W, [f]: q.total })), F((W) => ({ ...W, [f]: q.hasMore }));
931
- } catch (K) {
932
- se(K) || console.error("Explorer: section search failed", K);
933
- } finally {
934
- te.current.get(f) === A && k((K) => ({ ...K, [f]: !1 }));
935
- }
936
- },
937
- [e, Z, c, T]
938
- ), R = v(
939
- async (f) => {
940
- if (e.fetchSectionFacets)
941
- try {
942
- const M = await e.fetchSectionFacets(f, {
943
- query: Z,
944
- globalFilters: {},
945
- filters: T[f] ?? {}
946
- });
947
- Q((w) => ({ ...w, [f]: M }));
948
- } catch (M) {
949
- se(M) || console.error("Explorer: section facets failed", M);
950
- }
951
- },
952
- [e, Z, T]
953
- ), E = I(b), X = I(R);
954
- E.current = b, X.current = R, Y(() => {
955
- var M;
956
- (M = U.current) == null || M.abort();
957
- const f = new AbortController();
958
- return U.current = f, S(!0), e.sections({ query: Z, globalFilters: {}, signal: f.signal }).then((w) => {
959
- if (f.signal.aborted) return;
960
- m(w);
961
- const A = {};
962
- for (const $ of w) A[$.id] = !!$.defaultExpanded;
963
- B(A), y({}), F({}), O({});
964
- for (const $ of w)
965
- $.defaultExpanded && (X.current($.id), E.current($.id, 0, !1));
966
- }).catch((w) => {
967
- se(w) || console.error("Explorer: sections failed", w);
968
- }).finally(() => {
969
- U.current === f && S(!1);
970
- }), () => f.abort();
971
- }, [e, Z]);
972
- const qe = v(
973
- (f) => {
974
- B((M) => {
975
- const w = !M[f];
976
- return w && !(f in p.current) && (R(f), b(f, 0, !1)), { ...M, [f]: w };
977
- });
978
- },
979
- [R, b]
980
- ), _e = v(
981
- (f, M, w) => {
982
- G((A) => {
983
- const $ = A[f] ?? {}, K = $[M] ?? [], q = K.includes(w) ? K.filter((Ae) => Ae !== w) : [...K, w], W = { ...$ };
984
- return q.length ? W[M] = q : delete W[M], { ...A, [f]: W };
985
- }), y((A) => ({ ...A, [f]: [] }));
165
+ return { openForTool: y(
166
+ (l, g) => {
167
+ const d = t[l];
168
+ if (!d) return;
169
+ const i = `artifact-${g.path}`;
170
+ e.isOpen(i) ? e.activate(i) : e.open({ id: i, component: d, params: g });
986
171
  },
987
- []
988
- );
989
- Y(() => {
990
- for (const f of Object.keys(T))
991
- N.current[f] && (R(f), b(f, 0, !1));
992
- }, [T, R, b]);
993
- const Be = !_ && g.length === 0;
994
- return /* @__PURE__ */ h("div", { className: H("flex h-full flex-col", s), "data-slot": "sectioned-explorer", children: [
995
- o && !i ? /* @__PURE__ */ a("div", { className: "border-b border-border/60 px-2 py-1.5", children: /* @__PURE__ */ a(
996
- Me,
997
- {
998
- "aria-label": "Search",
999
- placeholder: l,
1000
- value: u,
1001
- onChange: (f) => x(f.target.value),
1002
- className: "h-7 rounded-sm border-transparent bg-muted/40 px-2 text-[12.5px] shadow-none focus-visible:bg-background focus-visible:ring-1"
1003
- }
1004
- ) }) : null,
1005
- /* @__PURE__ */ a("div", { className: "flex-1 overflow-y-auto", "data-slot": "sectioned-explorer-list", children: Be ? /* @__PURE__ */ a("div", { className: "flex h-full items-center justify-center px-4 py-8 text-[12px] text-muted-foreground", children: n }) : /* @__PURE__ */ a("ul", { className: "flex flex-col py-1", children: g.map((f) => {
1006
- const M = !!L[f.id], w = C[f.id] ?? [], A = Object.fromEntries(
1007
- (f.filters ?? []).map((q) => [q.key, q.values ?? []])
1008
- ), $ = D[f.id] ?? A, K = T[f.id] ?? {};
1009
- return /* @__PURE__ */ h("li", { children: [
1010
- /* @__PURE__ */ h(
1011
- "button",
1012
- {
1013
- type: "button",
1014
- "aria-expanded": M,
1015
- onClick: () => qe(f.id),
1016
- className: H(
1017
- "group mx-1 flex w-[calc(100%-0.5rem)] items-center gap-1.5 rounded-md px-1.5 py-1 text-left",
1018
- "transition-colors duration-120 ease-[cubic-bezier(0.22,1,0.36,1)] hover:bg-muted/40"
1019
- ),
1020
- children: [
1021
- M ? /* @__PURE__ */ a(Ee, { size: 11 }) : /* @__PURE__ */ a(we, { size: 11 }),
1022
- /* @__PURE__ */ a("span", { className: "min-w-0 flex-1 truncate text-[12.5px] font-medium text-foreground", children: f.title }),
1023
- /* @__PURE__ */ a("span", { className: "font-mono text-[10.5px] text-muted-foreground/80", children: (P[f.id] ?? f.count ?? 0).toLocaleString() })
1024
- ]
1025
- }
1026
- ),
1027
- M ? /* @__PURE__ */ h("div", { children: [
1028
- /* @__PURE__ */ a(
1029
- It,
1030
- {
1031
- configs: f.filters ?? [],
1032
- facets: $,
1033
- selected: K,
1034
- onToggle: (q, W) => _e(f.id, q, W)
1035
- }
1036
- ),
1037
- /* @__PURE__ */ h("ul", { className: "flex flex-col", children: [
1038
- w.map((q) => /* @__PURE__ */ a(
1039
- Mt,
1040
- {
1041
- row: q,
1042
- indent: !0,
1043
- onActivate: t,
1044
- getDragPayload: r
1045
- },
1046
- q.id
1047
- )),
1048
- z[f.id] && w.length === 0 ? /* @__PURE__ */ a("li", { className: "py-1.5 pl-7 pr-3 text-[11px] text-muted-foreground/80", children: "Loading…" }) : null,
1049
- j[f.id] ? /* @__PURE__ */ a("li", { className: "py-1 pl-7 pr-3", children: /* @__PURE__ */ a(
1050
- "button",
1051
- {
1052
- type: "button",
1053
- onClick: () => b(f.id, w.length, !0),
1054
- disabled: z[f.id],
1055
- className: "text-[11px] text-muted-foreground hover:text-foreground disabled:opacity-60",
1056
- children: z[f.id] ? "Loading…" : "Load more"
1057
- }
1058
- ) }) : null
1059
- ] })
1060
- ] }) : null
1061
- ] }, f.id);
1062
- }) }) })
1063
- ] });
1064
- }
1065
- function It({
1066
- configs: e,
1067
- facets: t,
1068
- selected: r,
1069
- onToggle: n
1070
- }) {
1071
- return e.length ? /* @__PURE__ */ a("div", { className: "space-y-1 px-7 py-1", children: e.map((l) => {
1072
- const o = t[l.key] ?? l.values ?? [];
1073
- return o.length ? /* @__PURE__ */ a("div", { className: "flex flex-wrap gap-1", children: o.map((d) => {
1074
- var i;
1075
- const c = ((i = r[l.key]) == null ? void 0 : i.includes(d.value)) ?? !1, s = l.formatValue ? l.formatValue(d.value) : d.value;
1076
- return /* @__PURE__ */ h(
1077
- "button",
1078
- {
1079
- type: "button",
1080
- onClick: () => n(l.key, d.value),
1081
- className: H(
1082
- "rounded border px-1.5 py-0.5 text-[10.5px] transition-colors",
1083
- c ? "border-foreground/30 bg-foreground/10 text-foreground" : "border-border/70 text-muted-foreground hover:text-foreground"
1084
- ),
1085
- children: [
1086
- s,
1087
- /* @__PURE__ */ a("span", { className: "ml-1 font-mono opacity-70", children: d.count })
1088
- ]
1089
- },
1090
- d.value
1091
- );
1092
- }) }, l.key) : null;
1093
- }) }) : null;
1094
- }
1095
- function Mt({
1096
- row: e,
1097
- indent: t,
1098
- onActivate: r,
1099
- getDragPayload: n
1100
- }) {
1101
- var s;
1102
- const l = !!r, o = n == null ? void 0 : n(e);
1103
- return /* @__PURE__ */ h(
1104
- "li",
1105
- {
1106
- ...l ? { role: "button", tabIndex: 0, onClick: () => r == null ? void 0 : r(e), onKeyDown: (i) => {
1107
- l && (i.key === "Enter" || i.key === " ") && (i.preventDefault(), r == null || r(e));
1108
- } } : {},
1109
- ...o ? { draggable: !0, onDragStart: (i) => {
1110
- o && (i.dataTransfer.setData(o.mimeType, o.value), i.dataTransfer.setData("text/plain", o.value), i.dataTransfer.effectAllowed = "copy");
1111
- } } : {},
1112
- className: H(
1113
- "group mx-1 flex items-start gap-2 rounded-md px-1.5 py-1",
1114
- "transition-colors duration-120 ease-[cubic-bezier(0.22,1,0.36,1)]",
1115
- l && "cursor-pointer hover:bg-foreground/5",
1116
- t && "pl-7"
1117
- ),
1118
- title: e.title,
1119
- children: [
1120
- e.leading ? /* @__PURE__ */ a(Se, { badge: e.leading }) : null,
1121
- /* @__PURE__ */ h("span", { className: "flex min-w-0 flex-1 flex-col", children: [
1122
- /* @__PURE__ */ a("span", { className: "truncate text-[12.5px] font-medium leading-tight text-foreground", children: e.title }),
1123
- e.subtitle ? /* @__PURE__ */ a("span", { className: "truncate text-[11.5px] leading-snug text-muted-foreground/85", children: e.subtitle }) : null
1124
- ] }),
1125
- (s = e.trailing) != null && s.length ? /* @__PURE__ */ a("span", { className: "flex shrink-0 items-center gap-1", children: e.trailing.map((i, u) => /* @__PURE__ */ a(Se, { badge: i }, u)) }) : null,
1126
- e.meta ? /* @__PURE__ */ a("span", { className: "shrink-0 self-center font-mono text-[10.5px] text-muted-foreground/80", children: e.meta }) : null
1127
- ]
1128
- }
1129
- );
1130
- }
1131
- function Se({ badge: e }) {
1132
- return /* @__PURE__ */ a(
1133
- "span",
1134
- {
1135
- "aria-hidden": "true",
1136
- title: e.tooltip,
1137
- className: "mt-[1px] inline-flex h-[16px] min-w-[24px] shrink-0 items-center justify-center rounded-[3px] bg-muted/60 px-1 font-mono text-[9.5px] font-medium uppercase tracking-[0.06em] text-muted-foreground group-hover:text-foreground",
1138
- children: e.code
1139
- }
1140
- );
1141
- }
1142
- const ue = "data-catalog", sr = "query_data_catalog", de = "data-catalog.open-row";
1143
- function Dt(e) {
1144
- let t = 2166136261;
1145
- for (let r = 0; r < e.length; r++)
1146
- t ^= e.charCodeAt(r), t = Math.imul(t, 16777619);
1147
- return (t >>> 0).toString(36);
1148
- }
1149
- function Ce(e) {
1150
- return e.trim().replace(/[^a-zA-Z0-9_-]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 32) || "row";
1151
- }
1152
- function Rt(e, t = "data") {
1153
- const r = Dt(e), n = Ce(e), l = Ce(t), o = `${n}-${r}`, d = Math.max(0, 64 - o.length - 1), c = l.slice(0, d);
1154
- return c ? `${c}-${o}` : o.slice(0, 64);
1155
- }
1156
- function Fe(e, t) {
1157
- const r = {
1158
- ...t.params ?? {},
1159
- // Keep routing keys authoritative even when callers pass extra params.
1160
- row: e,
1161
- catalogId: t.catalogId,
1162
- ...t.title ? { title: t.title } : {}
1163
- };
1164
- Ve({
1165
- kind: "openSurface",
1166
- params: {
1167
- kind: t.surfaceKind ?? de,
1168
- target: e.id,
1169
- meta: r
1170
- }
1171
- });
1172
- }
1173
- function Ot(e) {
1174
- return (t) => Fe(t, e);
1175
- }
1176
- function Ft(e) {
1177
- if (!e || typeof e != "object") return !1;
1178
- const t = e;
1179
- return typeof t.id == "string" && typeof t.title == "string";
1180
- }
1181
- function Te(e, t) {
1182
- const r = e[t];
1183
- return typeof r == "string" && r.length > 0 ? r : void 0;
1184
- }
1185
- function Lt(e) {
1186
- const t = e.surfaceKind ?? de, r = e.panelIdPrefix ?? e.id;
1187
- return {
1188
- id: e.surfaceResolverId ?? `${e.id}-row`,
1189
- source: e.source,
1190
- resolve(n) {
1191
- if (n.kind !== t) return;
1192
- const l = n.meta ?? {}, o = Te(l, "catalogId");
1193
- if (o && o !== e.catalogId) return;
1194
- const d = Ft(l.row) ? l.row : void 0, {
1195
- catalogId: c,
1196
- row: s,
1197
- title: i,
1198
- ...u
1199
- } = l;
1200
- return {
1201
- id: Rt(n.target, r),
1202
- component: e.visualizationPanelId,
1203
- title: Te(l, "title") ?? (d == null ? void 0 : d.title) ?? e.visualizationTitle,
1204
- params: {
1205
- ...u,
1206
- ...d ? { row: d } : { query: n.target }
1207
- },
1208
- score: 0
1209
- };
1210
- }
1211
- };
1212
- }
1213
- function zt(e) {
1214
- if (!e || typeof e != "object") return;
1215
- const t = e;
1216
- if (!(typeof t.id != "string" || typeof t.title != "string"))
1217
- return t;
1218
- }
1219
- function Le(e) {
1220
- if (e) {
1221
- if ("searchQuery" in e && typeof e.searchQuery == "string")
1222
- return e.searchQuery;
1223
- if ("query" in e && typeof e.query == "string") return e.query;
1224
- }
1225
- }
1226
- function qt(e) {
1227
- const t = Le(e);
1228
- return { query: t, controlled: t !== void 0 };
1229
- }
1230
- function _t(e, t) {
1231
- const r = zt(e == null ? void 0 : e.row), n = Le(e) ?? (r == null ? void 0 : r.id);
1232
- return {
1233
- row: r,
1234
- query: n,
1235
- controlled: n !== void 0,
1236
- title: (r == null ? void 0 : r.title) ?? t
1237
- };
1238
- }
1239
- function Bt(e) {
1240
- return ee(() => qt(e), [e]);
1241
- }
1242
- function At(e, t) {
1243
- return ee(
1244
- () => _t(e, t),
1245
172
  [t, e]
1246
- );
1247
- }
1248
- function cr(e) {
1249
- const { catalogId: t, surfaceKind: r, title: n, params: l } = e;
1250
- return v(
1251
- (o) => Fe(o, { catalogId: t, surfaceKind: r, title: n, params: l }),
1252
- [t, r, n, l]
1253
- );
1254
- }
1255
- function ze(e) {
1256
- const t = e.id ?? ue, r = e.label ?? "Data", n = e.catalogId ?? t, l = e.catalogLabel ?? r, o = e.leftTabId ?? `${t}-tab`, d = e.leftTabTitle ?? r, c = e.visualizationPanelId ?? `${t}-visualization`, s = e.visualizationTitle ?? `${r} View`, i = e.surfaceKind ?? de, u = e.source ?? "app", x = e.includeVisualizationPanel ?? !0, g = e.includeLeftTab ?? !0, m = e.includeCatalog ?? !0, C = e.includeSurfaceResolver ?? (x && !e.onSelect), y = e.emptyState ?? "No data found", P = e.searchPlaceholder ?? `Search ${r.toLowerCase()}...`, O = e.onSelect ?? (x ? Ot({
1257
- catalogId: n,
1258
- surfaceKind: i
1259
- }) : () => {
1260
- });
1261
- function j({ params: S, className: z }) {
1262
- const { query: k, controlled: L } = Bt(S), B = S == null ? void 0 : S.bridge, T = (G) => O(G, { params: S, bridge: B });
1263
- return /* @__PURE__ */ a(
1264
- ie,
1265
- {
1266
- adapter: e.adapter,
1267
- facets: e.facets,
1268
- groupBy: e.groupBy,
1269
- onActivate: T,
1270
- getDragPayload: e.getDragPayload,
1271
- emptyState: y,
1272
- searchPlaceholder: P,
1273
- query: L ? k : void 0,
1274
- searchable: !L,
1275
- pageSize: e.pageSize,
1276
- debounceMs: e.debounceMs,
1277
- className: z ?? "h-full"
1278
- }
1279
- );
1280
- }
1281
- function F({
1282
- params: S,
1283
- api: z,
1284
- className: k
1285
- }) {
1286
- const { row: L, query: B, controlled: T, title: G } = At(
1287
- S,
1288
- s
1289
- ), D = (Q) => O(Q, {});
1290
- return /* @__PURE__ */ h(
1291
- je,
1292
- {
1293
- title: G,
1294
- icon: e.visualizationIcon ?? fe,
1295
- panelApi: z,
1296
- className: k,
1297
- children: [
1298
- L ? /* @__PURE__ */ h("div", { className: "border-b border-border/60 px-3 py-2", children: [
1299
- /* @__PURE__ */ a("div", { className: "truncate text-sm font-medium text-foreground", children: L.title }),
1300
- /* @__PURE__ */ a("div", { className: "truncate text-xs text-muted-foreground", children: L.subtitle ?? L.id })
1301
- ] }) : null,
1302
- /* @__PURE__ */ a(
1303
- ie,
1304
- {
1305
- adapter: e.adapter,
1306
- facets: e.facets,
1307
- groupBy: e.groupBy,
1308
- onActivate: D,
1309
- getDragPayload: e.getDragPayload,
1310
- emptyState: y,
1311
- searchPlaceholder: P,
1312
- query: T ? B : void 0,
1313
- searchable: !T,
1314
- pageSize: e.pageSize,
1315
- debounceMs: e.debounceMs,
1316
- className: "h-full"
1317
- }
1318
- )
1319
- ]
1320
- }
1321
- );
1322
- }
1323
- const _ = [];
1324
- if (g && _.push({
1325
- type: "left-tab",
1326
- id: o,
1327
- title: d,
1328
- icon: e.leftTabIcon ?? tt,
1329
- component: j,
1330
- source: u,
1331
- chromeless: !0
1332
- }), x) {
1333
- const S = Re({
1334
- id: c,
1335
- title: s,
1336
- icon: e.visualizationIcon ?? fe,
1337
- component: e.visualizationComponent ?? F,
1338
- placement: "center",
1339
- source: u
1340
- });
1341
- _.push({
1342
- type: "panel",
1343
- panel: S
1344
- });
1345
- }
1346
- if (m) {
1347
- const S = {
1348
- id: n,
1349
- label: l,
1350
- adapter: e.adapter,
1351
- onSelect: (z) => O(z, {})
1352
- };
1353
- _.push({ type: "catalog", catalog: S });
1354
- }
1355
- return C && _.push({
1356
- type: "surface-resolver",
1357
- resolver: Lt({
1358
- id: t,
1359
- catalogId: n,
1360
- visualizationPanelId: c,
1361
- visualizationTitle: s,
1362
- panelIdPrefix: t,
1363
- surfaceKind: i,
1364
- surfaceResolverId: e.surfaceResolverId,
1365
- source: u
1366
- })
1367
- }), _;
1368
- }
1369
- function ir(e) {
1370
- const t = e.pluginId ?? e.id ?? ue;
1371
- return ae({
1372
- id: t,
1373
- label: e.label ?? "Data Catalog",
1374
- outputs: ze(e)
1375
- });
1376
- }
1377
- function ur(e, t) {
1378
- return ae({
1379
- ...e,
1380
- outputs: [...e.outputs ?? [], ...ze(t)]
1381
- });
1382
- }
1383
- function dr(e) {
1384
- return {
1385
- id: e.catalogId ?? e.id ?? ue,
1386
- label: e.catalogLabel ?? e.label ?? "Data",
1387
- adapter: e.adapter,
1388
- onSelect: (t) => {
1389
- var r;
1390
- return (r = e.onSelect) == null ? void 0 : r.call(e, t, {});
1391
- }
1392
- };
173
+ ), resolvePanel: n };
1393
174
  }
1394
- const $t = 768, Kt = 1024;
1395
- function Vt(e) {
175
+ const ve = 768, xe = 1024;
176
+ function Pe(e) {
1396
177
  return {
1397
178
  ...e,
1398
- groups: e.groups.filter((t) => t.id !== "sidebar")
179
+ groups: e.groups.filter((a) => a.id !== "sidebar")
1399
180
  };
1400
181
  }
1401
- function jt({
182
+ function Se({
1402
183
  layout: e,
1403
- className: t
184
+ className: a
1404
185
  }) {
1405
186
  var B;
1406
- const r = ke(), n = Ge(), l = Qe(), o = be($t), d = be(Kt), c = d && !o, s = ee(
1407
- () => e.groups.find((T) => T.id === "sidebar" && T.panel),
187
+ const t = K(), n = Q(), o = Y(), l = z(ve), g = z(xe), d = g && !l, i = C(
188
+ () => e.groups.find((x) => x.id === "sidebar" && x.panel),
1408
189
  [e]
1409
- ), i = s == null ? void 0 : s.panel, u = !!i, x = xt({
1410
- isNarrowViewport: u && d,
190
+ ), c = i == null ? void 0 : i.panel, u = !!c, f = ye({
191
+ isNarrowViewport: u && g,
1411
192
  isCollapsed: n.collapsed,
1412
- setCollapsed: (T) => l({ collapsed: T })
1413
- }), [g, m] = V(!1);
1414
- Y(() => {
1415
- (!u || !o && !c) && m(!1);
1416
- }, [u, o, c]);
1417
- const C = u && (o || c && n.collapsed), y = u && !o && (!c || !n.collapsed), P = ee(
1418
- () => y ? e : Vt(e),
1419
- [y, e]
1420
- ), O = ee(() => {
1421
- const T = y ? "inline-sidebar" : "overlay-sidebar", G = P.groups.map((D) => {
1422
- let Q = "";
193
+ setCollapsed: (x) => o({ collapsed: x })
194
+ }), [s, p] = O(!1);
195
+ P(() => {
196
+ (!u || !l && !d) && p(!1);
197
+ }, [u, l, d]);
198
+ const h = u && (l || d && n.collapsed), m = u && !l && (!d || !n.collapsed), v = C(
199
+ () => m ? e : Pe(e),
200
+ [m, e]
201
+ ), _ = C(() => {
202
+ const x = m ? "inline-sidebar" : "overlay-sidebar", F = v.groups.map((E) => {
203
+ let T = "";
1423
204
  try {
1424
- Q = JSON.stringify(D.params ?? null);
205
+ T = JSON.stringify(E.params ?? null);
1425
206
  } catch {
1426
- Q = "unserializable";
207
+ T = "unserializable";
1427
208
  }
1428
- return `${D.id}:${D.panel ?? ""}:${Q}`;
209
+ return `${E.id}:${E.panel ?? ""}:${T}`;
1429
210
  }).join(",");
1430
- return `${P.version}:${T}:${G}`;
1431
- }, [P, y]), j = ee(() => r.getComponents(), [r]), F = i ? j[i] : null, _ = i ? ((B = r.get(i)) == null ? void 0 : B.title) ?? "Sidebar" : "Sidebar", S = v(() => {
1432
- m(!0);
1433
- }, []), z = v(() => {
1434
- x(), l({ collapsed: !1 }), m(!1);
1435
- }, [x, l]), k = v(() => {
1436
- x(), l({ collapsed: !0 }), m(!1);
1437
- }, [x, l]), L = v(
1438
- (T) => {
1439
- T.target.closest("[role='treeitem']") && m(!1);
211
+ return `${v.version}:${x}:${F}`;
212
+ }, [v, m]), $ = C(() => t.getComponents(), [t]), L = c ? $[c] : null, H = c ? ((B = t.get(c)) == null ? void 0 : B.title) ?? "Sidebar" : "Sidebar", U = y(() => {
213
+ p(!0);
214
+ }, []), A = y(() => {
215
+ f(), o({ collapsed: !1 }), p(!1);
216
+ }, [f, o]), J = y(() => {
217
+ f(), o({ collapsed: !0 }), p(!1);
218
+ }, [f, o]), V = y(
219
+ (x) => {
220
+ x.target.closest("[role='treeitem']") && p(!1);
1440
221
  },
1441
222
  []
1442
223
  );
1443
- return /* @__PURE__ */ h("div", { className: "relative h-full w-full", children: [
1444
- c && u && n.collapsed && /* @__PURE__ */ a(
224
+ return /* @__PURE__ */ b("div", { className: "relative h-full w-full", children: [
225
+ d && u && n.collapsed && /* @__PURE__ */ r(
1445
226
  "div",
1446
227
  {
1447
228
  className: "pointer-events-none absolute inset-y-0 left-0 z-20 w-10 border-r border-border bg-background/95",
1448
229
  "aria-hidden": "true"
1449
230
  }
1450
231
  ),
1451
- C && /* @__PURE__ */ a(
232
+ h && /* @__PURE__ */ r(
1452
233
  "div",
1453
234
  {
1454
- className: H(
235
+ className: N(
1455
236
  "absolute z-30",
1456
- o ? "left-2 top-2" : "left-1 top-2"
237
+ l ? "left-2 top-2" : "left-1 top-2"
1457
238
  ),
1458
- children: /* @__PURE__ */ a(
1459
- J,
239
+ children: /* @__PURE__ */ r(
240
+ k,
1460
241
  {
1461
242
  type: "button",
1462
243
  variant: "outline",
1463
244
  size: "icon-sm",
1464
- onClick: S,
1465
- "aria-label": o ? "Open sidebar menu" : "Open collapsed sidebar",
1466
- children: o ? /* @__PURE__ */ a(rt, { className: "h-4 w-4" }) : /* @__PURE__ */ a(at, { className: "h-4 w-4" })
245
+ onClick: U,
246
+ "aria-label": l ? "Open sidebar menu" : "Open collapsed sidebar",
247
+ children: l ? /* @__PURE__ */ r(ue, { className: "h-4 w-4" }) : /* @__PURE__ */ r(pe, { className: "h-4 w-4" })
1467
248
  }
1468
249
  )
1469
250
  }
1470
251
  ),
1471
- c && u && !n.collapsed && /* @__PURE__ */ a("div", { className: "absolute left-2 top-2 z-30", children: /* @__PURE__ */ a(
1472
- J,
252
+ d && u && !n.collapsed && /* @__PURE__ */ r("div", { className: "absolute left-2 top-2 z-30", children: /* @__PURE__ */ r(
253
+ k,
1473
254
  {
1474
255
  type: "button",
1475
256
  variant: "outline",
1476
257
  size: "icon-sm",
1477
- onClick: k,
258
+ onClick: J,
1478
259
  "aria-label": "Collapse sidebar",
1479
- children: /* @__PURE__ */ a(nt, { className: "h-4 w-4" })
260
+ children: /* @__PURE__ */ r(me, { className: "h-4 w-4" })
1480
261
  }
1481
262
  ) }),
1482
- /* @__PURE__ */ a(
1483
- He,
263
+ /* @__PURE__ */ r(
264
+ Z,
1484
265
  {
1485
- layout: P,
1486
- className: H(
1487
- t,
1488
- c && u && n.collapsed && "pl-10"
266
+ layout: v,
267
+ className: N(
268
+ a,
269
+ d && u && n.collapsed && "pl-10"
1489
270
  )
1490
271
  },
1491
- O
272
+ _
1492
273
  ),
1493
- C && /* @__PURE__ */ a(ut, { open: g, onOpenChange: m, children: /* @__PURE__ */ h(
1494
- dt,
274
+ h && /* @__PURE__ */ r(te, { open: s, onOpenChange: p, children: /* @__PURE__ */ b(
275
+ ae,
1495
276
  {
1496
277
  side: "left",
1497
278
  className: "w-[85vw] max-w-sm p-0",
1498
279
  children: [
1499
- /* @__PURE__ */ h(pt, { className: "flex flex-row items-center justify-between border-b border-border px-4 py-3", children: [
1500
- /* @__PURE__ */ h("div", { children: [
1501
- /* @__PURE__ */ a(ft, { children: _ }),
1502
- /* @__PURE__ */ a(mt, { className: "sr-only", children: "Responsive sidebar panel" })
280
+ /* @__PURE__ */ b(ne, { className: "flex flex-row items-center justify-between border-b border-border px-4 py-3", children: [
281
+ /* @__PURE__ */ b("div", { children: [
282
+ /* @__PURE__ */ r(re, { children: H }),
283
+ /* @__PURE__ */ r(se, { className: "sr-only", children: "Responsive sidebar panel" })
1503
284
  ] }),
1504
- c && /* @__PURE__ */ h(
1505
- J,
285
+ d && /* @__PURE__ */ b(
286
+ k,
1506
287
  {
1507
288
  type: "button",
1508
289
  variant: "outline",
1509
290
  size: "sm",
1510
- onClick: z,
291
+ onClick: A,
1511
292
  "aria-label": "Pin sidebar open",
1512
293
  children: [
1513
- /* @__PURE__ */ a(lt, { className: "h-4 w-4" }),
294
+ /* @__PURE__ */ r(fe, { className: "h-4 w-4" }),
1514
295
  "Pin"
1515
296
  ]
1516
297
  }
1517
298
  )
1518
299
  ] }),
1519
- /* @__PURE__ */ a(
300
+ /* @__PURE__ */ r(
1520
301
  "div",
1521
302
  {
1522
303
  className: "h-full min-h-0 overflow-auto",
1523
- onClickCapture: L,
1524
- children: F ? /* @__PURE__ */ a(Je, { fallback: /* @__PURE__ */ a(Pe, {}), children: /* @__PURE__ */ a(F, {}) }) : /* @__PURE__ */ a(Pe, {})
304
+ onClickCapture: V,
305
+ children: L ? /* @__PURE__ */ r(ce, { fallback: /* @__PURE__ */ r(j, {}), children: /* @__PURE__ */ r(L, {}) }) : /* @__PURE__ */ r(j, {})
1525
306
  }
1526
307
  )
1527
308
  ]
@@ -1529,15 +310,15 @@ function jt({
1529
310
  ) })
1530
311
  ] });
1531
312
  }
1532
- function Pe() {
1533
- return /* @__PURE__ */ a("div", { className: "flex h-full min-h-[240px] items-center justify-center text-sm text-muted-foreground", children: "Loading sidebar..." });
313
+ function j() {
314
+ return /* @__PURE__ */ r("div", { className: "flex h-full min-h-[240px] items-center justify-center text-sm text-muted-foreground", children: "Loading sidebar..." });
1534
315
  }
1535
- function Gt(e = {}) {
1536
- const { sidebar: t = "filetree", center: r = "empty", right: n } = e, l = [
316
+ function Ce(e = {}) {
317
+ const { sidebar: a = "filetree", center: t = "empty", right: n } = e, o = [
1537
318
  {
1538
319
  id: "sidebar",
1539
320
  position: "left",
1540
- panel: t,
321
+ panel: a,
1541
322
  locked: !0,
1542
323
  collapsible: !0,
1543
324
  collapsedWidth: 40,
@@ -1546,142 +327,142 @@ function Gt(e = {}) {
1546
327
  {
1547
328
  id: "center",
1548
329
  position: "center",
1549
- panel: r,
330
+ panel: t,
1550
331
  dynamic: !0,
1551
332
  placeholder: "empty",
1552
333
  constraints: { minWidth: 300 }
1553
334
  }
1554
335
  ];
1555
- return n && l.push({
336
+ return n && o.push({
1556
337
  id: "right",
1557
338
  position: "right",
1558
339
  panel: n,
1559
340
  hideHeader: !0,
1560
341
  constraints: { minWidth: 250 }
1561
- }), { version: "2.0", groups: l };
342
+ }), { version: "2.0", groups: o };
1562
343
  }
1563
- function pr(e) {
1564
- return /* @__PURE__ */ a(jt, { layout: Gt(e), className: e.className });
344
+ function We(e) {
345
+ return /* @__PURE__ */ r(Se, { layout: Ce(e), className: e.className });
1565
346
  }
1566
- function fr({ className: e, onOpenFile: t }) {
1567
- return /* @__PURE__ */ a(
1568
- Ie,
347
+ function De({ className: e, onOpenFile: a }) {
348
+ return /* @__PURE__ */ r(
349
+ oe,
1569
350
  {
1570
- className: H("h-full border-0 text-muted-foreground", e),
351
+ className: N("h-full border-0 text-muted-foreground", e),
1571
352
  title: "No file open",
1572
353
  description: "Open a file to get started",
1573
- actions: t ? /* @__PURE__ */ a(J, { type: "button", variant: "outline", onClick: t, children: "Open file" }) : null,
1574
- children: /* @__PURE__ */ h("div", { className: "space-y-2 text-sm", children: [
1575
- /* @__PURE__ */ h("div", { className: "flex items-center gap-3", children: [
1576
- /* @__PURE__ */ a(le, { children: "⌘P" }),
1577
- /* @__PURE__ */ a("span", { children: "Open file" })
354
+ actions: a ? /* @__PURE__ */ r(k, { type: "button", variant: "outline", onClick: a, children: "Open file" }) : null,
355
+ children: /* @__PURE__ */ b("div", { className: "space-y-2 text-sm", children: [
356
+ /* @__PURE__ */ b("div", { className: "flex items-center gap-3", children: [
357
+ /* @__PURE__ */ r(I, { children: "⌘P" }),
358
+ /* @__PURE__ */ r("span", { children: "Open file" })
1578
359
  ] }),
1579
- /* @__PURE__ */ h("div", { className: "flex items-center gap-3", children: [
1580
- /* @__PURE__ */ a(le, { children: "⌘⇧P" }),
1581
- /* @__PURE__ */ a("span", { children: "Command palette" })
360
+ /* @__PURE__ */ b("div", { className: "flex items-center gap-3", children: [
361
+ /* @__PURE__ */ r(I, { children: "⌘⇧P" }),
362
+ /* @__PURE__ */ r("span", { children: "Command palette" })
1582
363
  ] }),
1583
- /* @__PURE__ */ h("div", { className: "flex items-center gap-3", children: [
1584
- /* @__PURE__ */ a(le, { children: "⌘B" }),
1585
- /* @__PURE__ */ a("span", { children: "Toggle sidebar" })
364
+ /* @__PURE__ */ b("div", { className: "flex items-center gap-3", children: [
365
+ /* @__PURE__ */ r(I, { children: "⌘B" }),
366
+ /* @__PURE__ */ r("span", { children: "Toggle sidebar" })
1586
367
  ] })
1587
368
  ] })
1588
369
  }
1589
370
  );
1590
371
  }
1591
- class mr extends Ye {
372
+ class ze extends de {
1592
373
  constructor() {
1593
374
  super(...arguments);
1594
- ne(this, "state", { hasError: !1, error: null });
1595
- ne(this, "handleRetry", () => {
375
+ R(this, "state", { hasError: !1, error: null });
376
+ R(this, "handleRetry", () => {
1596
377
  this.setState({ hasError: !1, error: null });
1597
378
  });
1598
379
  }
1599
- static getDerivedStateFromError(r) {
1600
- return { hasError: !0, error: r };
380
+ static getDerivedStateFromError(t) {
381
+ return { hasError: !0, error: t };
1601
382
  }
1602
- componentDidCatch(r, n) {
1603
- const { panelId: l, onError: o } = this.props;
1604
- console.error(`[PanelErrorBoundary] Panel "${l}" crashed:`, r, n.componentStack), o == null || o({
1605
- panelId: l,
1606
- error: r.message,
383
+ componentDidCatch(t, n) {
384
+ const { panelId: o, onError: l } = this.props;
385
+ console.error(`[PanelErrorBoundary] Panel "${o}" crashed:`, t, n.componentStack), l == null || l({
386
+ panelId: o,
387
+ error: t.message,
1607
388
  stack: n.componentStack ?? void 0
1608
389
  });
1609
390
  }
1610
391
  render() {
1611
- var r;
1612
- return this.state.hasError ? /* @__PURE__ */ a("div", { className: "flex h-full items-center justify-center p-6", children: /* @__PURE__ */ a(
1613
- gt,
392
+ var t;
393
+ return this.state.hasError ? /* @__PURE__ */ r("div", { className: "flex h-full items-center justify-center p-6", children: /* @__PURE__ */ r(
394
+ ie,
1614
395
  {
1615
396
  className: "w-full max-w-md",
1616
397
  title: "Something went wrong",
1617
- description: /* @__PURE__ */ h(We, { children: [
398
+ description: /* @__PURE__ */ b(ee, { children: [
1618
399
  "Panel ",
1619
- /* @__PURE__ */ a("code", { className: "rounded bg-muted px-1 py-0.5 text-xs", children: this.props.panelId }),
400
+ /* @__PURE__ */ r("code", { className: "rounded bg-muted px-1 py-0.5 text-xs", children: this.props.panelId }),
1620
401
  " ",
1621
402
  "encountered an error."
1622
403
  ] }),
1623
- details: (r = this.state.error) == null ? void 0 : r.message,
1624
- actions: /* @__PURE__ */ a(J, { type: "button", variant: "outline", onClick: this.handleRetry, children: "Retry" })
404
+ details: (t = this.state.error) == null ? void 0 : t.message,
405
+ actions: /* @__PURE__ */ r(k, { type: "button", variant: "outline", onClick: this.handleRetry, children: "Retry" })
1625
406
  }
1626
407
  ) }) : this.props.children;
1627
408
  }
1628
409
  }
1629
- function gr({
410
+ function je({
1630
411
  sessions: e,
1631
- activeId: t,
1632
- onSwitch: r,
412
+ activeId: a,
413
+ onSwitch: t,
1633
414
  onCreate: n,
1634
- onDelete: l,
1635
- className: o
415
+ onDelete: o,
416
+ className: l
1636
417
  }) {
1637
- const [d, c] = V(null), s = I({}), i = ee(() => e.map((g) => g.id), [e]);
1638
- Y(() => {
1639
- if (i.length === 0) {
1640
- c(null);
418
+ const [g, d] = O(null), i = w({}), c = C(() => e.map((s) => s.id), [e]);
419
+ P(() => {
420
+ if (c.length === 0) {
421
+ d(null);
1641
422
  return;
1642
423
  }
1643
- c((g) => g && i.includes(g) ? g : t && i.includes(t) ? t : i[0] ?? null);
1644
- }, [i, t]);
1645
- const u = v((g) => {
1646
- var m;
1647
- c(g), (m = s.current[g]) == null || m.focus();
1648
- }, []), x = v(
1649
- (g, m) => {
1650
- if (g.target !== g.currentTarget) return;
1651
- if (g.key === "Enter" || g.key === " ") {
1652
- g.preventDefault(), r == null || r(m);
424
+ d((s) => s && c.includes(s) ? s : a && c.includes(a) ? a : c[0] ?? null);
425
+ }, [c, a]);
426
+ const u = y((s) => {
427
+ var p;
428
+ d(s), (p = i.current[s]) == null || p.focus();
429
+ }, []), f = y(
430
+ (s, p) => {
431
+ if (s.target !== s.currentTarget) return;
432
+ if (s.key === "Enter" || s.key === " ") {
433
+ s.preventDefault(), t == null || t(p);
1653
434
  return;
1654
435
  }
1655
- const C = i.indexOf(m);
1656
- if (C < 0) return;
1657
- let y = C;
1658
- if (g.key === "ArrowDown")
1659
- y = Math.min(C + 1, i.length - 1);
1660
- else if (g.key === "ArrowUp")
1661
- y = Math.max(C - 1, 0);
1662
- else if (g.key === "Home")
1663
- y = 0;
1664
- else if (g.key === "End")
1665
- y = i.length - 1;
436
+ const h = c.indexOf(p);
437
+ if (h < 0) return;
438
+ let m = h;
439
+ if (s.key === "ArrowDown")
440
+ m = Math.min(h + 1, c.length - 1);
441
+ else if (s.key === "ArrowUp")
442
+ m = Math.max(h - 1, 0);
443
+ else if (s.key === "Home")
444
+ m = 0;
445
+ else if (s.key === "End")
446
+ m = c.length - 1;
1666
447
  else
1667
448
  return;
1668
- g.preventDefault();
1669
- const P = i[y];
1670
- P && u(P);
449
+ s.preventDefault();
450
+ const v = c[m];
451
+ v && u(v);
1671
452
  },
1672
- [u, r, i]
453
+ [u, t, c]
1673
454
  );
1674
- return /* @__PURE__ */ h(
455
+ return /* @__PURE__ */ b(
1675
456
  "div",
1676
457
  {
1677
458
  "data-boring-workspace-part": "session-list",
1678
- className: H("flex h-full flex-col", o),
459
+ className: N("flex h-full flex-col", l),
1679
460
  role: "navigation",
1680
461
  "aria-label": "Sessions",
1681
462
  children: [
1682
- /* @__PURE__ */ h("div", { className: "flex items-center justify-between border-b border-border px-3 py-2", children: [
1683
- /* @__PURE__ */ a("span", { className: "text-xs font-medium text-muted-foreground uppercase tracking-wider", children: "Sessions" }),
1684
- n && /* @__PURE__ */ a(De, { type: "button", variant: "ghost", size: "icon-xs", onClick: n, "aria-label": "New session", children: /* @__PURE__ */ a(
463
+ /* @__PURE__ */ b("div", { className: "flex items-center justify-between border-b border-border px-3 py-2", children: [
464
+ /* @__PURE__ */ r("span", { className: "text-xs font-medium text-muted-foreground uppercase tracking-wider", children: "Sessions" }),
465
+ n && /* @__PURE__ */ r(M, { type: "button", variant: "ghost", size: "icon-xs", onClick: n, "aria-label": "New session", children: /* @__PURE__ */ r(
1685
466
  "svg",
1686
467
  {
1687
468
  width: "16",
@@ -1691,83 +472,105 @@ function gr({
1691
472
  stroke: "currentColor",
1692
473
  strokeWidth: "1.5",
1693
474
  strokeLinecap: "round",
1694
- children: /* @__PURE__ */ a("path", { d: "M8 3v10M3 8h10" })
475
+ children: /* @__PURE__ */ r("path", { d: "M8 3v10M3 8h10" })
1695
476
  }
1696
477
  ) })
1697
478
  ] }),
1698
- /* @__PURE__ */ h("div", { className: "flex-1 overflow-y-auto", role: "list", "aria-label": "Session list", children: [
1699
- e.length === 0 && /* @__PURE__ */ a("div", { className: "px-3 py-6 text-center text-sm text-muted-foreground", children: "No sessions" }),
1700
- e.map((g) => /* @__PURE__ */ a(
1701
- Qt,
479
+ /* @__PURE__ */ b("div", { className: "flex-1 overflow-y-auto", role: "list", "aria-label": "Session list", children: [
480
+ e.length === 0 && /* @__PURE__ */ r("div", { className: "px-3 py-6 text-center text-sm text-muted-foreground", children: "No sessions" }),
481
+ e.map((s) => /* @__PURE__ */ r(
482
+ ke,
1702
483
  {
1703
- session: g,
1704
- isActive: g.id === t,
1705
- isFocused: g.id === d,
1706
- onSwitch: r,
1707
- onDelete: l,
1708
- onFocus: () => c(g.id),
1709
- onKeyDown: x,
1710
- rowRef: (m) => {
1711
- s.current[g.id] = m;
484
+ session: s,
485
+ isActive: s.id === a,
486
+ isFocused: s.id === g,
487
+ onSwitch: t,
488
+ onDelete: o,
489
+ onFocus: () => d(s.id),
490
+ onKeyDown: f,
491
+ rowRef: (p) => {
492
+ i.current[s.id] = p;
1712
493
  }
1713
494
  },
1714
- g.id
495
+ s.id
1715
496
  ))
1716
497
  ] })
1717
498
  ]
1718
499
  }
1719
500
  );
1720
501
  }
1721
- function Qt({
502
+ function ke({
1722
503
  session: e,
1723
- isActive: t,
1724
- isFocused: r,
504
+ isActive: a,
505
+ isFocused: t,
1725
506
  onSwitch: n,
1726
- onDelete: l,
1727
- onFocus: o,
1728
- onKeyDown: d,
1729
- rowRef: c
507
+ onDelete: o,
508
+ onFocus: l,
509
+ onKeyDown: g,
510
+ rowRef: d
1730
511
  }) {
1731
- return /* @__PURE__ */ h(
512
+ const [i, c] = O(!1), u = y((f) => {
513
+ var p, h;
514
+ f.stopPropagation();
515
+ const s = (h = (p = navigator.clipboard) == null ? void 0 : p.writeText) == null ? void 0 : h.bind(navigator.clipboard);
516
+ s && s(e.id).then(() => {
517
+ c(!0), window.setTimeout(() => c(!1), 1200);
518
+ });
519
+ }, [e.id]);
520
+ return /* @__PURE__ */ b(
1732
521
  "div",
1733
522
  {
1734
- ref: c,
523
+ ref: d,
1735
524
  role: "listitem",
1736
525
  "data-boring-workspace-part": "session-row",
1737
- "data-boring-state": t ? "selected" : void 0,
1738
- "data-focused": r ? "true" : "false",
1739
- className: H(
526
+ "data-boring-state": a ? "selected" : void 0,
527
+ "data-focused": t ? "true" : "false",
528
+ className: N(
1740
529
  "group flex items-center gap-2 border-b border-border px-3 py-2 text-sm cursor-pointer transition-colors",
1741
530
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1",
1742
- t ? "bg-accent text-accent-foreground" : "text-foreground hover:bg-accent/50"
531
+ a ? "bg-accent text-accent-foreground" : "text-foreground hover:bg-accent/50"
1743
532
  ),
1744
533
  onClick: () => n == null ? void 0 : n(e.id),
1745
- onFocus: o,
1746
- onKeyDown: (s) => d(s, e.id),
1747
- tabIndex: r ? 0 : -1,
1748
- "aria-current": t ? "true" : void 0,
534
+ onFocus: l,
535
+ onKeyDown: (f) => g(f, e.id),
536
+ tabIndex: t ? 0 : -1,
537
+ "aria-current": a ? "true" : void 0,
1749
538
  children: [
1750
- /* @__PURE__ */ a("span", { className: "flex-1 truncate", children: e.title }),
1751
- t && /* @__PURE__ */ a(
539
+ /* @__PURE__ */ r("span", { className: "flex-1 truncate", children: e.title }),
540
+ /* @__PURE__ */ r(
541
+ M,
542
+ {
543
+ type: "button",
544
+ variant: "ghost",
545
+ size: "icon-xs",
546
+ className: "shrink-0 text-muted-foreground opacity-0 hover:text-foreground focus-visible:opacity-100 group-hover:opacity-100 group-data-[focused=true]:opacity-100",
547
+ onClick: u,
548
+ tabIndex: t ? 0 : -1,
549
+ "aria-label": `Copy Pi session id for ${e.title}`,
550
+ title: "Copy Pi session id",
551
+ children: i ? /* @__PURE__ */ r(he, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ r(ge, { className: "h-3.5 w-3.5" })
552
+ }
553
+ ),
554
+ a && /* @__PURE__ */ r(
1752
555
  "span",
1753
556
  {
1754
557
  className: "h-1.5 w-1.5 shrink-0 rounded-full bg-primary",
1755
558
  "aria-label": "Active"
1756
559
  }
1757
560
  ),
1758
- l && /* @__PURE__ */ a(
1759
- De,
561
+ o && /* @__PURE__ */ r(
562
+ M,
1760
563
  {
1761
564
  type: "button",
1762
565
  variant: "ghost",
1763
566
  size: "icon-xs",
1764
567
  className: "shrink-0 text-muted-foreground opacity-0 hover:text-destructive focus-visible:opacity-100 group-hover:opacity-100 group-data-[focused=true]:opacity-100",
1765
- onClick: (s) => {
1766
- s.stopPropagation(), l(e.id);
568
+ onClick: (f) => {
569
+ f.stopPropagation(), o(e.id);
1767
570
  },
1768
- tabIndex: r ? 0 : -1,
571
+ tabIndex: t ? 0 : -1,
1769
572
  "aria-label": `Delete ${e.title}`,
1770
- children: /* @__PURE__ */ a(
573
+ children: /* @__PURE__ */ r(
1771
574
  "svg",
1772
575
  {
1773
576
  width: "14",
@@ -1777,7 +580,7 @@ function Qt({
1777
580
  stroke: "currentColor",
1778
581
  strokeWidth: "1.5",
1779
582
  strokeLinecap: "round",
1780
- children: /* @__PURE__ */ a("path", { d: "M3.5 3.5l7 7M10.5 3.5l-7 7" })
583
+ children: /* @__PURE__ */ r("path", { d: "M3.5 3.5l7 7M10.5 3.5l-7 7" })
1781
584
  }
1782
585
  )
1783
586
  }
@@ -1787,124 +590,103 @@ function Qt({
1787
590
  );
1788
591
  }
1789
592
  export {
1790
- yr as ArtifactSurfacePane,
1791
- br as CatalogRegistry,
1792
- Fa as ChatLayout,
1793
- Ba as CodeEditor,
1794
- vr as CodeEditorPane,
1795
- Nr as CommandPalette,
1796
- Sr as CommandRegistry,
1797
- sr as DATA_CATALOG_DEFAULT_TOOL_NAME,
1798
- ue as DATA_CATALOG_PLUGIN_ID,
1799
- de as DATA_CATALOG_ROW_SURFACE_KIND,
1800
- ie as DataExplorer,
1801
- He as DockviewShell,
1802
- lr as EXPLORER_PLUGIN_ID,
1803
- fr as EmptyPane,
1804
- Ne as ExplorerView,
1805
- Ka as FileTree,
1806
- Cr as FileTreePane,
1807
- Tr as FileTreeView,
1808
- pr as IdeLayout,
1809
- Pr as MAX_PANELS,
1810
- ja as MarkdownEditor,
1811
- kr as MarkdownEditorPane,
1812
- mr as PanelErrorBoundary,
1813
- Er as PanelRegistry,
1814
- wr as PluginError,
1815
- Ir as PluginErrorBoundary,
1816
- Mr as PluginErrorProvider,
1817
- Dr as RegistryProvider,
1818
- jt as ResponsiveDockviewShell,
1819
- Rr as SessionBrowser,
1820
- gr as SessionList,
1821
- Or as SurfaceResolverRegistry,
1822
- Fr as SurfaceShell,
1823
- Lr as ThemeProvider,
1824
- Ma as Toaster,
1825
- La as TopBar,
1826
- zr as WORKSPACE_OPEN_PATH_SURFACE_KIND,
1827
- qr as WorkbenchLeftPane,
1828
- za as WorkspaceLoadingState,
1829
- _r as WorkspaceProvider,
1830
- Br as agentMeta,
1831
- ur as appendDataCatalogOutputs,
1832
- Ar as bindStore,
1833
- $r as bootstrap,
1834
- qa as buildChatLayout,
1835
- Gt as buildIdeLayout,
1836
- Kr as closePanelSchema,
1837
- H as cn,
1838
- tr as composePlugins,
1839
- Vr as createBridge,
1840
- jr as createBridgeClient,
1841
- dr as createDataCatalogCatalog,
1842
- Ot as createDataCatalogOpenHandler,
1843
- ze as createDataCatalogOutputs,
1844
- ir as createDataCatalogPlugin,
1845
- Lt as createDataCatalogSurfaceResolver,
1846
- Et as createExplorerOutputs,
1847
- or as createExplorerPlugin,
1848
- Aa as createShadcnTheme,
1849
- Gr as createWorkspaceStore,
1850
- Rt as dataCatalogPanelInstanceId,
1851
- ae as defineFrontPlugin,
1852
- Re as definePanel,
1853
- Da as dismissToast,
1854
- Qr as emitAgentData,
1855
- Hr as emitFilesystemAgentFileChange,
1856
- Wr as events,
1857
- Ur as expandToFileSchema,
1858
- Xr as filesystemEvents,
1859
- Jr as filesystemPlugin,
1860
- Yr as formatShortcut,
1861
- Zr as getFileIcon,
1862
- ea as navigateToLineSchema,
1863
- ta as notificationSchema,
1864
- ra as onFilesystemChanged,
1865
- Fe as openDataCatalogVisualization,
1866
- aa as openFileSchema,
1867
- na as openPanelSchema,
1868
- Ve as postUiCommand,
1869
- zt as readDataCatalogRow,
1870
- qt as resolveDataCatalogControlledQuery,
1871
- Le as resolveDataCatalogQuery,
1872
- _t as resolveDataCatalogVisualizationState,
1873
- Ra as toast,
1874
- la as useActiveFile,
1875
- oa as useActivePanel,
1876
- rr as useActivePanels,
1877
- ar as useArtifactPanels,
1878
- nr as useArtifactRouting,
1879
- sa as useAutoOpenAgentFiles,
1880
- ca as useCatalogRegistry,
1881
- ia as useCatalogs,
1882
- ua as useCommandRegistry,
1883
- da as useCommands,
1884
- cr as useDataCatalogOpenVisualization,
1885
- Bt as useDataCatalogQuery,
1886
- At as useDataCatalogVisualizationState,
1887
- pa as useDirtyFiles,
1888
- fa as useDockviewApi,
1889
- ma as useEditorLifecycle,
1890
- ga as useEvent,
1891
- vt as useExplorerState,
1892
- ha as useHydrationComplete,
1893
- xa as useKeyboardShortcuts,
1894
- ya as useOpenPanels,
1895
- ba as usePluginErrors,
1896
- ke as useRegistry,
1897
- va as useResetLayout,
1898
- xt as useResponsiveSidebarCollapse,
1899
- Qe as useSetSidebar,
1900
- Ge as useSidebarState,
1901
- Na as useSurfaceResolverRegistry,
1902
- Sa as useTheme,
1903
- Ca as useThemePreference,
1904
- be as useViewportBreakpoint,
1905
- Ta as useWorkspaceBridge,
1906
- Pa as useWorkspaceChatPanel,
1907
- ka as useWorkspaceContext,
1908
- Ea as useWorkspaceContextOptional,
1909
- wa as userMeta
593
+ $e as ArtifactSurfacePane,
594
+ He as CatalogRegistry,
595
+ ra as ChatLayout,
596
+ ma as CodeEditor,
597
+ Ue as CodeEditorPane,
598
+ Ae as CommandPalette,
599
+ Je as CommandRegistry,
600
+ Z as DockviewShell,
601
+ De as EmptyPane,
602
+ ga as FileTree,
603
+ Ve as FileTreePane,
604
+ Xe as FileTreeView,
605
+ We as IdeLayout,
606
+ qe as MAX_PANELS,
607
+ ya as MarkdownEditor,
608
+ Ge as MarkdownEditorPane,
609
+ Qe as PanelChrome,
610
+ ze as PanelErrorBoundary,
611
+ Ye as PanelRegistry,
612
+ Ze as PluginError,
613
+ et as PluginErrorBoundary,
614
+ tt as PluginErrorProvider,
615
+ at as RegistryProvider,
616
+ Se as ResponsiveDockviewShell,
617
+ nt as SessionBrowser,
618
+ je as SessionList,
619
+ rt as SurfaceResolverRegistry,
620
+ st as SurfaceShell,
621
+ ot as ThemeProvider,
622
+ ca as Toaster,
623
+ sa as TopBar,
624
+ it as UI_COMMAND_EVENT,
625
+ lt as WORKSPACE_OPEN_PATH_SURFACE_KIND,
626
+ ct as WorkbenchLeftPane,
627
+ oa as WorkspaceLoadingState,
628
+ dt as WorkspaceProvider,
629
+ ut as agentMeta,
630
+ pt as bindStore,
631
+ mt as bootstrap,
632
+ ia as buildChatLayout,
633
+ Ce as buildIdeLayout,
634
+ ft as closePanelSchema,
635
+ N as cn,
636
+ Me as composePlugins,
637
+ ht as createBridge,
638
+ gt as createBridgeClient,
639
+ fa as createShadcnTheme,
640
+ bt as createWorkspaceStore,
641
+ G as defineFrontPlugin,
642
+ xa as definePanel,
643
+ da as dismissToast,
644
+ yt as emitAgentData,
645
+ vt as emitFilesystemAgentFileChange,
646
+ xt as events,
647
+ Pt as expandToFileSchema,
648
+ St as filesystemEvents,
649
+ Ct as filesystemPlugin,
650
+ kt as formatShortcut,
651
+ wt as getFileIcon,
652
+ Nt as navigateToLineSchema,
653
+ Ot as notificationSchema,
654
+ Et as onFilesystemChanged,
655
+ Tt as openFileSchema,
656
+ Rt as openPanelSchema,
657
+ It as postUiCommand,
658
+ ua as toast,
659
+ Mt as useActiveFile,
660
+ Lt as useActivePanel,
661
+ Le as useActivePanels,
662
+ Be as useArtifactPanels,
663
+ Fe as useArtifactRouting,
664
+ Bt as useAutoOpenAgentFiles,
665
+ Ft as useCatalogRegistry,
666
+ Wt as useCatalogs,
667
+ Dt as useCommandRegistry,
668
+ zt as useCommands,
669
+ jt as useDirtyFiles,
670
+ Kt as useDockviewApi,
671
+ _t as useEditorLifecycle,
672
+ $t as useEvent,
673
+ Ht as useHydrationComplete,
674
+ Ut as useKeyboardShortcuts,
675
+ At as useOpenPanels,
676
+ Jt as usePluginErrors,
677
+ K as useRegistry,
678
+ Vt as useResetLayout,
679
+ ye as useResponsiveSidebarCollapse,
680
+ Y as useSetSidebar,
681
+ Q as useSidebarState,
682
+ Xt as useSurfaceResolverRegistry,
683
+ qt as useTheme,
684
+ Gt as useThemePreference,
685
+ z as useViewportBreakpoint,
686
+ Qt as useWorkspaceAttention,
687
+ Yt as useWorkspaceBridge,
688
+ Zt as useWorkspaceChatPanel,
689
+ ea as useWorkspaceContext,
690
+ ta as useWorkspaceContextOptional,
691
+ aa as userMeta
1910
692
  };