@hachej/boring-workspace 0.1.54 → 0.1.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{FileTree-CfJoRiTm.js → FileTree-ChkSU4gL.js} +17 -17
- package/dist/{MarkdownEditor-DrPDGy9F.js → MarkdownEditor-BlYGosmH.js} +1 -1
- package/dist/{WorkspaceLoadingState-Bqsn2JEc.js → WorkspaceLoadingState-BYTO4wdt.js} +249 -225
- package/dist/{WorkspaceProvider-CrOT4ab7.js → WorkspaceProvider-Bp1Sm40K.js} +3359 -3237
- package/dist/app-front.d.ts +20 -0
- package/dist/app-front.js +539 -527
- package/dist/app-server.d.ts +39 -8
- package/dist/app-server.js +1248 -22
- package/dist/bridge-client.d.ts +68 -0
- package/dist/bridge-client.js +370 -0
- package/dist/plugin.d.ts +3 -1
- package/dist/runtimeEnv-XVFZ1OkV.d.ts +353 -0
- package/dist/server.d.ts +236 -8
- package/dist/server.js +1349 -25
- package/dist/shared.d.ts +2 -1
- package/dist/shared.js +30 -0
- package/dist/testing.js +1 -1
- package/dist/{ui-bridge-LeBuZqfA.d.ts → ui-bridge-BbuUZ5iC.d.ts} +6 -1
- package/dist/workspace-bridge-rpc-A98RA5o6.d.ts +124 -0
- package/dist/workspace.css +35 -0
- package/dist/workspace.d.ts +68 -2
- package/dist/workspace.js +196 -185
- package/docs/PLUGIN_SYSTEM.md +57 -0
- package/package.json +8 -4
- package/dist/createInMemoryBridge-siFWq_R_.d.ts +0 -198
package/dist/workspace.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
var
|
|
2
|
-
var X = (e, t, a) => t in e ?
|
|
1
|
+
var G = Object.defineProperty;
|
|
2
|
+
var X = (e, t, a) => t in e ? G(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a;
|
|
3
3
|
var T = (e, t, a) => X(e, typeof t != "symbol" ? t + "" : t, a);
|
|
4
|
-
import { u as
|
|
5
|
-
import { A as
|
|
4
|
+
import { u as _, p as Q, a as Y, b as Z, D as ee } from "./WorkspaceProvider-Bp1Sm40K.js";
|
|
5
|
+
import { A as Ve, C as Je, c as Ge, d as Xe, e as Qe, f as Ye, F as Ze, g as et, M as tt, h as at, P as rt, i as nt, j as st, k as ot, l as it, R as lt, S as ct, m as dt, n as ut, T as pt, U as mt, W as ft, o as ht, q as gt, r as bt, s as yt, t as vt, v as St, w as kt, x as xt, y as Pt, z as wt, B as Ct, E as Et, G as Nt, H as Rt, I as Tt, J as Ot, K as It, L as Ft, N as Wt, O as Lt, Q as Bt, V as Mt, X as Kt, Y as _t, Z as Dt, _ as At, $ as $t, a0 as jt, a1 as zt, a2 as Ht, a3 as Ut, a4 as qt, a5 as Vt, a6 as Jt, a7 as Gt, a8 as Xt, a9 as Qt, aa as Yt, ab as Zt, ac as ea, ad as ta, ae as aa, af as ra, ag as na, ah as sa, ai as oa, aj as ia, ak as la, al as ca, am as da, an as ua, ao as pa, ap as ma, aq as fa, ar as ha, as as ga, at as ba, au as ya, av as va, aw as Sa, ax as ka, ay as xa, az as Pa, aA as wa, aB as Ca, aC as Ea, aD as Na, aE as Ra, aF as Ta } from "./WorkspaceProvider-Bp1Sm40K.js";
|
|
6
6
|
import { c as C } from "./utils-B6yFEsav.js";
|
|
7
|
-
import { C as
|
|
7
|
+
import { C as Ia, T as Fa, W as Wa, b as La } from "./WorkspaceLoadingState-BYTO4wdt.js";
|
|
8
8
|
import { jsx as r, jsxs as g, Fragment as te } from "react/jsx-runtime";
|
|
9
|
-
import { Button as P, Sheet as ae, SheetContent as re, SheetHeader as ne, SheetTitle as se, SheetDescription as oe, EmptyState as ie, Kbd as
|
|
10
|
-
import { Toaster as
|
|
11
|
-
import { useSyncExternalStore as
|
|
12
|
-
import { FileTree as
|
|
13
|
-
import { MarkdownEditor as
|
|
14
|
-
import { MenuIcon as ue, PanelLeftOpenIcon as pe, PanelLeftCloseIcon as
|
|
15
|
-
import { d as
|
|
16
|
-
function
|
|
17
|
-
const e =
|
|
18
|
-
return
|
|
9
|
+
import { Button as P, Sheet as ae, SheetContent as re, SheetHeader as ne, SheetTitle as se, SheetDescription as oe, EmptyState as ie, Kbd as O, ErrorState as le, IconButton as I } from "@hachej/boring-ui-kit";
|
|
10
|
+
import { Toaster as Ma, dismissToast as Ka, toast as _a } from "@hachej/boring-ui-kit";
|
|
11
|
+
import { useSyncExternalStore as D, useState as E, useEffect as k, useRef as w, useCallback as b, useMemo as x, Suspense as ce, Component as de } from "react";
|
|
12
|
+
import { FileTree as Aa } from "./FileTree-ChkSU4gL.js";
|
|
13
|
+
import { MarkdownEditor as ja } from "./MarkdownEditor-BlYGosmH.js";
|
|
14
|
+
import { MenuIcon as ue, PanelLeftOpenIcon as pe, PanelLeftCloseIcon as me, PinIcon as fe, CheckIcon as he, CopyIcon as ge } from "lucide-react";
|
|
15
|
+
import { d as Ha } from "./panel-DnvDNQac.js";
|
|
16
|
+
function Me() {
|
|
17
|
+
const e = _();
|
|
18
|
+
return D(e.subscribe, e.getSnapshot);
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function A(e) {
|
|
21
21
|
switch (e.kind) {
|
|
22
22
|
case "openFile":
|
|
23
23
|
return { kind: "openFile", params: { path: e.path, ...e.mode ? { mode: e.mode } : {} } };
|
|
@@ -38,12 +38,12 @@ function j(e) {
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
function be(e) {
|
|
41
|
-
return `boring-workspace-command:${encodeURIComponent(JSON.stringify(
|
|
41
|
+
return `boring-workspace-command:${encodeURIComponent(JSON.stringify(A(e)))}`;
|
|
42
42
|
}
|
|
43
43
|
function ye(e) {
|
|
44
44
|
return e.button === 0 && !e.metaKey && !e.ctrlKey && !e.altKey && !e.shiftKey;
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function Ke({ to: e, children: t, className: a, title: n, href: i, onClick: o }) {
|
|
47
47
|
return /* @__PURE__ */ r(
|
|
48
48
|
"a",
|
|
49
49
|
{
|
|
@@ -51,7 +51,7 @@ function De({ to: e, children: t, className: a, title: n, href: i, onClick: o })
|
|
|
51
51
|
className: a,
|
|
52
52
|
title: n,
|
|
53
53
|
onClick: (u) => {
|
|
54
|
-
o == null || o(u), !(u.defaultPrevented || !ye(u)) && (u.preventDefault(), Q(
|
|
54
|
+
o == null || o(u), !(u.defaultPrevented || !ye(u)) && (u.preventDefault(), Q(A(e)));
|
|
55
55
|
},
|
|
56
56
|
children: t
|
|
57
57
|
}
|
|
@@ -60,7 +60,7 @@ function De({ to: e, children: t, className: a, title: n, href: i, onClick: o })
|
|
|
60
60
|
function ve(e, t) {
|
|
61
61
|
return e ? `${e.replace(/\/$/, "")}${t}` : t;
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function Se() {
|
|
64
64
|
if (typeof window > "u") return;
|
|
65
65
|
const e = window.location.pathname.match(/^\/workspace\/([^/?#]+)/);
|
|
66
66
|
if (e != null && e[1])
|
|
@@ -70,10 +70,10 @@ function xe() {
|
|
|
70
70
|
return e[1];
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
async function
|
|
73
|
+
async function _e(e) {
|
|
74
74
|
const t = new URLSearchParams({ path: e.path });
|
|
75
75
|
e.recordSet && t.set("recordSet", e.recordSet), e.offset !== void 0 && t.set("offset", String(e.offset)), e.limit !== void 0 && t.set("limit", String(e.limit)), e.q && t.set("q", e.q);
|
|
76
|
-
const a = { ...e.headers ?? {} }, n = e.workspaceId ??
|
|
76
|
+
const a = { ...e.headers ?? {} }, n = e.workspaceId ?? Se();
|
|
77
77
|
n && !Object.keys(a).some((o) => o.toLowerCase() === "x-boring-workspace-id") && (a["x-boring-workspace-id"] = n);
|
|
78
78
|
const i = await fetch(ve(e.apiBaseUrl, `/api/v1/files/records?${t}`), {
|
|
79
79
|
method: "GET",
|
|
@@ -87,8 +87,8 @@ async function Ke(e) {
|
|
|
87
87
|
function B(e) {
|
|
88
88
|
return typeof window > "u" ? !1 : window.innerWidth < e;
|
|
89
89
|
}
|
|
90
|
-
function
|
|
91
|
-
const [t, a] =
|
|
90
|
+
function M(e = 1024) {
|
|
91
|
+
const [t, a] = E(() => B(e));
|
|
92
92
|
return k(() => {
|
|
93
93
|
const n = () => {
|
|
94
94
|
a(B(e));
|
|
@@ -103,7 +103,7 @@ function ke({
|
|
|
103
103
|
isCollapsed: t,
|
|
104
104
|
setCollapsed: a
|
|
105
105
|
}) {
|
|
106
|
-
const n =
|
|
106
|
+
const n = w(t), i = w(!1), o = w(null);
|
|
107
107
|
return k(() => {
|
|
108
108
|
n.current = t;
|
|
109
109
|
}, [t]), k(() => {
|
|
@@ -117,8 +117,8 @@ function ke({
|
|
|
117
117
|
i.current = !1;
|
|
118
118
|
}, []);
|
|
119
119
|
}
|
|
120
|
-
function
|
|
121
|
-
const [t, a] =
|
|
120
|
+
function De(e) {
|
|
121
|
+
const [t, a] = E([]), n = w(t);
|
|
122
122
|
n.current = t, k(() => {
|
|
123
123
|
if (!e) {
|
|
124
124
|
a([]);
|
|
@@ -126,22 +126,22 @@ function $e(e) {
|
|
|
126
126
|
}
|
|
127
127
|
function l() {
|
|
128
128
|
try {
|
|
129
|
-
const p = e.toJSON(),
|
|
129
|
+
const p = e.toJSON(), f = [];
|
|
130
130
|
if (p && typeof p == "object" && "panels" in p) {
|
|
131
131
|
const y = p;
|
|
132
132
|
if (y.panels)
|
|
133
|
-
for (const [,
|
|
134
|
-
|
|
135
|
-
id:
|
|
136
|
-
component:
|
|
137
|
-
params:
|
|
133
|
+
for (const [, m] of Object.entries(y.panels))
|
|
134
|
+
m.id && f.push({
|
|
135
|
+
id: m.id,
|
|
136
|
+
component: m.contentComponent ?? m.id,
|
|
137
|
+
params: m.params
|
|
138
138
|
});
|
|
139
139
|
}
|
|
140
140
|
const s = n.current;
|
|
141
|
-
(s.length !==
|
|
141
|
+
(s.length !== f.length || s.some((y, m) => {
|
|
142
142
|
var v;
|
|
143
|
-
return y.id !== ((v = m
|
|
144
|
-
})) && a(
|
|
143
|
+
return y.id !== ((v = f[m]) == null ? void 0 : v.id);
|
|
144
|
+
})) && a(f);
|
|
145
145
|
} catch {
|
|
146
146
|
}
|
|
147
147
|
}
|
|
@@ -174,7 +174,7 @@ function $e(e) {
|
|
|
174
174
|
);
|
|
175
175
|
return { panels: t, open: i, close: o, activate: u, isOpen: d };
|
|
176
176
|
}
|
|
177
|
-
function
|
|
177
|
+
function Ae(e, t = {}) {
|
|
178
178
|
const a = t.toolPanelMap ?? {}, n = b(
|
|
179
179
|
(o) => a[o],
|
|
180
180
|
[a]
|
|
@@ -189,8 +189,8 @@ function je(e, t = {}) {
|
|
|
189
189
|
[a, e]
|
|
190
190
|
), resolvePanel: n };
|
|
191
191
|
}
|
|
192
|
-
const
|
|
193
|
-
function
|
|
192
|
+
const xe = 768, Pe = 1024;
|
|
193
|
+
function we(e) {
|
|
194
194
|
return {
|
|
195
195
|
...e,
|
|
196
196
|
groups: e.groups.filter((t) => t.id !== "sidebar")
|
|
@@ -200,45 +200,45 @@ function Ce({
|
|
|
200
200
|
layout: e,
|
|
201
201
|
className: t
|
|
202
202
|
}) {
|
|
203
|
-
var
|
|
204
|
-
const a =
|
|
205
|
-
() => e.groups.find((
|
|
203
|
+
var W;
|
|
204
|
+
const a = _(), n = Y(), i = Z(), o = M(xe), u = M(Pe), d = u && !o, l = x(
|
|
205
|
+
() => e.groups.find((S) => S.id === "sidebar" && S.panel),
|
|
206
206
|
[e]
|
|
207
|
-
), c = l == null ? void 0 : l.panel, p = !!c,
|
|
207
|
+
), c = l == null ? void 0 : l.panel, p = !!c, f = ke({
|
|
208
208
|
isNarrowViewport: p && u,
|
|
209
209
|
isCollapsed: n.collapsed,
|
|
210
|
-
setCollapsed: (
|
|
211
|
-
}), [s, h] =
|
|
210
|
+
setCollapsed: (S) => i({ collapsed: S })
|
|
211
|
+
}), [s, h] = E(!1);
|
|
212
212
|
k(() => {
|
|
213
213
|
(!p || !o && !d) && h(!1);
|
|
214
214
|
}, [p, o, d]);
|
|
215
|
-
const y = p && (o || d && n.collapsed),
|
|
216
|
-
() =>
|
|
217
|
-
[
|
|
218
|
-
),
|
|
219
|
-
const
|
|
215
|
+
const y = p && (o || d && n.collapsed), m = p && !o && (!d || !n.collapsed), v = x(
|
|
216
|
+
() => m ? e : we(e),
|
|
217
|
+
[m, e]
|
|
218
|
+
), $ = x(() => {
|
|
219
|
+
const S = m ? "inline-sidebar" : "overlay-sidebar", L = v.groups.map((N) => {
|
|
220
220
|
let R = "";
|
|
221
221
|
try {
|
|
222
|
-
R = JSON.stringify(
|
|
222
|
+
R = JSON.stringify(N.params ?? null);
|
|
223
223
|
} catch {
|
|
224
224
|
R = "unserializable";
|
|
225
225
|
}
|
|
226
|
-
return `${
|
|
226
|
+
return `${N.id}:${N.panel ?? ""}:${R}`;
|
|
227
227
|
}).join(",");
|
|
228
|
-
return `${v.version}:${
|
|
229
|
-
}, [v,
|
|
228
|
+
return `${v.version}:${S}:${L}`;
|
|
229
|
+
}, [v, m]), j = D(
|
|
230
230
|
a.subscribe,
|
|
231
231
|
a.getSnapshot,
|
|
232
232
|
a.getSnapshot
|
|
233
|
-
),
|
|
233
|
+
), z = x(() => a.getComponents(), [a, j]), F = c ? z[c] : null, H = c ? ((W = a.get(c)) == null ? void 0 : W.title) ?? "Sidebar" : "Sidebar", U = b(() => {
|
|
234
234
|
h(!0);
|
|
235
|
-
}, []),
|
|
236
|
-
|
|
237
|
-
}, [
|
|
238
|
-
|
|
239
|
-
}, [
|
|
240
|
-
(
|
|
241
|
-
|
|
235
|
+
}, []), q = b(() => {
|
|
236
|
+
f(), i({ collapsed: !1 }), h(!1);
|
|
237
|
+
}, [f, i]), V = b(() => {
|
|
238
|
+
f(), i({ collapsed: !0 }), h(!1);
|
|
239
|
+
}, [f, i]), J = b(
|
|
240
|
+
(S) => {
|
|
241
|
+
S.target.closest("[role='treeitem']") && h(!1);
|
|
242
242
|
},
|
|
243
243
|
[]
|
|
244
244
|
);
|
|
@@ -263,7 +263,7 @@ function Ce({
|
|
|
263
263
|
type: "button",
|
|
264
264
|
variant: "outline",
|
|
265
265
|
size: "icon-sm",
|
|
266
|
-
onClick:
|
|
266
|
+
onClick: U,
|
|
267
267
|
"aria-label": o ? "Open sidebar menu" : "Open collapsed sidebar",
|
|
268
268
|
children: o ? /* @__PURE__ */ r(ue, { className: "h-4 w-4" }) : /* @__PURE__ */ r(pe, { className: "h-4 w-4" })
|
|
269
269
|
}
|
|
@@ -276,9 +276,9 @@ function Ce({
|
|
|
276
276
|
type: "button",
|
|
277
277
|
variant: "outline",
|
|
278
278
|
size: "icon-sm",
|
|
279
|
-
onClick:
|
|
279
|
+
onClick: V,
|
|
280
280
|
"aria-label": "Collapse sidebar",
|
|
281
|
-
children: /* @__PURE__ */ r(
|
|
281
|
+
children: /* @__PURE__ */ r(me, { className: "h-4 w-4" })
|
|
282
282
|
}
|
|
283
283
|
) }),
|
|
284
284
|
/* @__PURE__ */ r(
|
|
@@ -290,7 +290,7 @@ function Ce({
|
|
|
290
290
|
d && p && n.collapsed && "pl-10"
|
|
291
291
|
)
|
|
292
292
|
},
|
|
293
|
-
|
|
293
|
+
$
|
|
294
294
|
),
|
|
295
295
|
y && /* @__PURE__ */ r(ae, { open: s, onOpenChange: h, children: /* @__PURE__ */ g(
|
|
296
296
|
re,
|
|
@@ -300,7 +300,7 @@ function Ce({
|
|
|
300
300
|
children: [
|
|
301
301
|
/* @__PURE__ */ g(ne, { className: "flex flex-row items-center justify-between border-b border-border px-4 py-3", children: [
|
|
302
302
|
/* @__PURE__ */ g("div", { children: [
|
|
303
|
-
/* @__PURE__ */ r(se, { children:
|
|
303
|
+
/* @__PURE__ */ r(se, { children: H }),
|
|
304
304
|
/* @__PURE__ */ r(oe, { className: "sr-only", children: "Responsive sidebar panel" })
|
|
305
305
|
] }),
|
|
306
306
|
d && /* @__PURE__ */ g(
|
|
@@ -309,10 +309,10 @@ function Ce({
|
|
|
309
309
|
type: "button",
|
|
310
310
|
variant: "outline",
|
|
311
311
|
size: "sm",
|
|
312
|
-
onClick:
|
|
312
|
+
onClick: q,
|
|
313
313
|
"aria-label": "Pin sidebar open",
|
|
314
314
|
children: [
|
|
315
|
-
/* @__PURE__ */ r(
|
|
315
|
+
/* @__PURE__ */ r(fe, { className: "h-4 w-4" }),
|
|
316
316
|
"Pin"
|
|
317
317
|
]
|
|
318
318
|
}
|
|
@@ -322,8 +322,8 @@ function Ce({
|
|
|
322
322
|
"div",
|
|
323
323
|
{
|
|
324
324
|
className: "h-full min-h-0 overflow-auto",
|
|
325
|
-
onClickCapture:
|
|
326
|
-
children: F ? /* @__PURE__ */ r(ce, { fallback: /* @__PURE__ */ r(
|
|
325
|
+
onClickCapture: J,
|
|
326
|
+
children: F ? /* @__PURE__ */ r(ce, { fallback: /* @__PURE__ */ r(K, {}), children: /* @__PURE__ */ r(F, {}) }) : /* @__PURE__ */ r(K, {})
|
|
327
327
|
}
|
|
328
328
|
)
|
|
329
329
|
]
|
|
@@ -331,10 +331,10 @@ function Ce({
|
|
|
331
331
|
) })
|
|
332
332
|
] });
|
|
333
333
|
}
|
|
334
|
-
function
|
|
334
|
+
function K() {
|
|
335
335
|
return /* @__PURE__ */ r("div", { className: "flex h-full min-h-[240px] items-center justify-center text-sm text-muted-foreground", children: "Loading sidebar..." });
|
|
336
336
|
}
|
|
337
|
-
function
|
|
337
|
+
function Ee(e = {}) {
|
|
338
338
|
const { sidebar: t = "filetree", center: a = "empty", right: n } = e, i = [
|
|
339
339
|
{
|
|
340
340
|
id: "sidebar",
|
|
@@ -362,10 +362,10 @@ function Ne(e = {}) {
|
|
|
362
362
|
constraints: { minWidth: 250 }
|
|
363
363
|
}), { version: "2.0", groups: i };
|
|
364
364
|
}
|
|
365
|
-
function
|
|
366
|
-
return /* @__PURE__ */ r(Ce, { layout:
|
|
365
|
+
function $e(e) {
|
|
366
|
+
return /* @__PURE__ */ r(Ce, { layout: Ee(e), className: e.className });
|
|
367
367
|
}
|
|
368
|
-
function
|
|
368
|
+
function je({ className: e, onOpenFile: t }) {
|
|
369
369
|
return /* @__PURE__ */ r(
|
|
370
370
|
ie,
|
|
371
371
|
{
|
|
@@ -375,22 +375,22 @@ function He({ className: e, onOpenFile: t }) {
|
|
|
375
375
|
actions: t ? /* @__PURE__ */ r(P, { type: "button", variant: "outline", onClick: t, children: "Open file" }) : null,
|
|
376
376
|
children: /* @__PURE__ */ g("div", { className: "space-y-2 text-sm", children: [
|
|
377
377
|
/* @__PURE__ */ g("div", { className: "flex items-center gap-3", children: [
|
|
378
|
-
/* @__PURE__ */ r(
|
|
378
|
+
/* @__PURE__ */ r(O, { children: "⌘P" }),
|
|
379
379
|
/* @__PURE__ */ r("span", { children: "Open file" })
|
|
380
380
|
] }),
|
|
381
381
|
/* @__PURE__ */ g("div", { className: "flex items-center gap-3", children: [
|
|
382
|
-
/* @__PURE__ */ r(
|
|
382
|
+
/* @__PURE__ */ r(O, { children: "⌘⇧P" }),
|
|
383
383
|
/* @__PURE__ */ r("span", { children: "Command palette" })
|
|
384
384
|
] }),
|
|
385
385
|
/* @__PURE__ */ g("div", { className: "flex items-center gap-3", children: [
|
|
386
|
-
/* @__PURE__ */ r(
|
|
386
|
+
/* @__PURE__ */ r(O, { children: "⌘B" }),
|
|
387
387
|
/* @__PURE__ */ r("span", { children: "Toggle sidebar" })
|
|
388
388
|
] })
|
|
389
389
|
] })
|
|
390
390
|
}
|
|
391
391
|
);
|
|
392
392
|
}
|
|
393
|
-
class
|
|
393
|
+
class ze extends de {
|
|
394
394
|
constructor() {
|
|
395
395
|
super(...arguments);
|
|
396
396
|
T(this, "state", { hasError: !1, error: null });
|
|
@@ -428,7 +428,7 @@ class Ue extends de {
|
|
|
428
428
|
) }) : this.props.children;
|
|
429
429
|
}
|
|
430
430
|
}
|
|
431
|
-
function
|
|
431
|
+
function He({
|
|
432
432
|
sessions: e,
|
|
433
433
|
activeId: t,
|
|
434
434
|
onSwitch: a,
|
|
@@ -436,7 +436,7 @@ function _e({
|
|
|
436
436
|
onDelete: i,
|
|
437
437
|
className: o
|
|
438
438
|
}) {
|
|
439
|
-
const [u, d] =
|
|
439
|
+
const [u, d] = E(null), l = w({}), c = x(() => e.map((s) => s.id), [e]);
|
|
440
440
|
k(() => {
|
|
441
441
|
if (c.length === 0) {
|
|
442
442
|
d(null);
|
|
@@ -447,7 +447,7 @@ function _e({
|
|
|
447
447
|
const p = b((s) => {
|
|
448
448
|
var h;
|
|
449
449
|
d(s), (h = l.current[s]) == null || h.focus();
|
|
450
|
-
}, []),
|
|
450
|
+
}, []), f = b(
|
|
451
451
|
(s, h) => {
|
|
452
452
|
if (s.target !== s.currentTarget) return;
|
|
453
453
|
if (s.key === "Enter" || s.key === " ") {
|
|
@@ -456,19 +456,19 @@ function _e({
|
|
|
456
456
|
}
|
|
457
457
|
const y = c.indexOf(h);
|
|
458
458
|
if (y < 0) return;
|
|
459
|
-
let
|
|
459
|
+
let m = y;
|
|
460
460
|
if (s.key === "ArrowDown")
|
|
461
|
-
|
|
461
|
+
m = Math.min(y + 1, c.length - 1);
|
|
462
462
|
else if (s.key === "ArrowUp")
|
|
463
|
-
|
|
463
|
+
m = Math.max(y - 1, 0);
|
|
464
464
|
else if (s.key === "Home")
|
|
465
|
-
|
|
465
|
+
m = 0;
|
|
466
466
|
else if (s.key === "End")
|
|
467
|
-
|
|
467
|
+
m = c.length - 1;
|
|
468
468
|
else
|
|
469
469
|
return;
|
|
470
470
|
s.preventDefault();
|
|
471
|
-
const v = c[
|
|
471
|
+
const v = c[m];
|
|
472
472
|
v && p(v);
|
|
473
473
|
},
|
|
474
474
|
[p, a, c]
|
|
@@ -483,7 +483,7 @@ function _e({
|
|
|
483
483
|
children: [
|
|
484
484
|
/* @__PURE__ */ g("div", { className: "flex items-center justify-between border-b border-border px-3 py-2", children: [
|
|
485
485
|
/* @__PURE__ */ r("span", { className: "text-xs font-medium text-muted-foreground uppercase tracking-wider", children: "Sessions" }),
|
|
486
|
-
n && /* @__PURE__ */ r(
|
|
486
|
+
n && /* @__PURE__ */ r(I, { type: "button", variant: "ghost", size: "icon-xs", onClick: n, "aria-label": "New session", children: /* @__PURE__ */ r(
|
|
487
487
|
"svg",
|
|
488
488
|
{
|
|
489
489
|
width: "16",
|
|
@@ -508,7 +508,7 @@ function _e({
|
|
|
508
508
|
onSwitch: a,
|
|
509
509
|
onDelete: i,
|
|
510
510
|
onFocus: () => d(s.id),
|
|
511
|
-
onKeyDown:
|
|
511
|
+
onKeyDown: f,
|
|
512
512
|
rowRef: (h) => {
|
|
513
513
|
l.current[s.id] = h;
|
|
514
514
|
}
|
|
@@ -520,7 +520,7 @@ function _e({
|
|
|
520
520
|
}
|
|
521
521
|
);
|
|
522
522
|
}
|
|
523
|
-
async function
|
|
523
|
+
async function Ne(e) {
|
|
524
524
|
var a, n;
|
|
525
525
|
if (typeof navigator < "u" && ((a = navigator.clipboard) != null && a.writeText))
|
|
526
526
|
try {
|
|
@@ -548,8 +548,8 @@ function Re({
|
|
|
548
548
|
onKeyDown: u,
|
|
549
549
|
rowRef: d
|
|
550
550
|
}) {
|
|
551
|
-
const [l, c] =
|
|
552
|
-
|
|
551
|
+
const [l, c] = E(!1), p = b((f) => {
|
|
552
|
+
f.stopPropagation(), Ne(e.id).then((s) => {
|
|
553
553
|
s && (c(!0), window.setTimeout(() => c(!1), 1200));
|
|
554
554
|
});
|
|
555
555
|
}, [e.id]);
|
|
@@ -568,13 +568,13 @@ function Re({
|
|
|
568
568
|
),
|
|
569
569
|
onClick: () => n == null ? void 0 : n(e.id),
|
|
570
570
|
onFocus: o,
|
|
571
|
-
onKeyDown: (
|
|
571
|
+
onKeyDown: (f) => u(f, e.id),
|
|
572
572
|
tabIndex: a ? 0 : -1,
|
|
573
573
|
"aria-current": t ? "true" : void 0,
|
|
574
574
|
children: [
|
|
575
575
|
/* @__PURE__ */ r("span", { className: "flex-1 truncate", children: e.title }),
|
|
576
576
|
/* @__PURE__ */ r(
|
|
577
|
-
|
|
577
|
+
I,
|
|
578
578
|
{
|
|
579
579
|
type: "button",
|
|
580
580
|
variant: "ghost",
|
|
@@ -595,14 +595,14 @@ function Re({
|
|
|
595
595
|
}
|
|
596
596
|
),
|
|
597
597
|
i && /* @__PURE__ */ r(
|
|
598
|
-
|
|
598
|
+
I,
|
|
599
599
|
{
|
|
600
600
|
type: "button",
|
|
601
601
|
variant: "ghost",
|
|
602
602
|
size: "icon-xs",
|
|
603
603
|
className: "hidden shrink-0 text-muted-foreground hover:text-destructive group-hover:inline-flex group-data-[focused=true]:inline-flex",
|
|
604
|
-
onClick: (
|
|
605
|
-
|
|
604
|
+
onClick: (f) => {
|
|
605
|
+
f.stopPropagation(), i(e.id);
|
|
606
606
|
},
|
|
607
607
|
tabIndex: a ? 0 : -1,
|
|
608
608
|
"aria-label": `Delete ${e.title}`,
|
|
@@ -626,24 +626,24 @@ function Re({
|
|
|
626
626
|
);
|
|
627
627
|
}
|
|
628
628
|
export {
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
629
|
+
Ve as ArtifactSurfacePane,
|
|
630
|
+
Je as CatalogRegistry,
|
|
631
|
+
Ia as ChatLayout,
|
|
632
|
+
Ge as CodeEditor,
|
|
633
633
|
Xe as CodeEditorPane,
|
|
634
634
|
Qe as CommandPalette,
|
|
635
635
|
Ye as CommandRegistry,
|
|
636
636
|
ee as DockviewShell,
|
|
637
|
-
|
|
638
|
-
|
|
637
|
+
je as EmptyPane,
|
|
638
|
+
Aa as FileTree,
|
|
639
639
|
Ze as FileTreePane,
|
|
640
640
|
et as FileTreeView,
|
|
641
|
-
|
|
641
|
+
$e as IdeLayout,
|
|
642
642
|
tt as MAX_PANELS,
|
|
643
|
-
|
|
643
|
+
ja as MarkdownEditor,
|
|
644
644
|
at as MarkdownEditorPane,
|
|
645
645
|
rt as PanelChrome,
|
|
646
|
-
|
|
646
|
+
ze as PanelErrorBoundary,
|
|
647
647
|
nt as PanelRegistry,
|
|
648
648
|
st as PluginError,
|
|
649
649
|
ot as PluginErrorBoundary,
|
|
@@ -651,90 +651,101 @@ export {
|
|
|
651
651
|
lt as RegistryProvider,
|
|
652
652
|
Ce as ResponsiveDockviewShell,
|
|
653
653
|
ct as SessionBrowser,
|
|
654
|
-
|
|
654
|
+
He as SessionList,
|
|
655
655
|
dt as SurfaceResolverRegistry,
|
|
656
656
|
ut as SurfaceShell,
|
|
657
657
|
pt as ThemeProvider,
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
ht as
|
|
663
|
-
gt as
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
wt as
|
|
658
|
+
Ma as Toaster,
|
|
659
|
+
Fa as TopBar,
|
|
660
|
+
mt as UI_COMMAND_EVENT,
|
|
661
|
+
ft as WORKSPACE_ATTENTION_ACTION_EVENT,
|
|
662
|
+
ht as WORKSPACE_COMPOSER_STOP_EVENT,
|
|
663
|
+
gt as WORKSPACE_COMPOSER_STOP_REASONS,
|
|
664
|
+
bt as WORKSPACE_OPEN_PATH_SURFACE_KIND,
|
|
665
|
+
yt as WORKSPACE_SURFACE_OPEN_SKIPPED_EVENT,
|
|
666
|
+
vt as WorkbenchLeftPane,
|
|
667
|
+
St as WorkspaceFilesProvider,
|
|
668
|
+
Ke as WorkspaceLink,
|
|
669
|
+
Wa as WorkspaceLoadingState,
|
|
670
|
+
kt as WorkspaceProvider,
|
|
671
|
+
xt as agentMeta,
|
|
672
|
+
Pt as bindStore,
|
|
673
|
+
wt as bootstrap,
|
|
674
|
+
La as buildChatLayout,
|
|
675
|
+
Ct as buildFullPagePanelHref,
|
|
676
|
+
Ee as buildIdeLayout,
|
|
677
|
+
Et as closePanelSchema,
|
|
674
678
|
C as cn,
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
679
|
+
Nt as createBridge,
|
|
680
|
+
Rt as createBridgeClient,
|
|
681
|
+
Tt as createShadcnTheme,
|
|
682
|
+
Ot as createWorkspaceStore,
|
|
683
|
+
Ha as definePanel,
|
|
684
|
+
Ka as dismissToast,
|
|
685
|
+
It as emitAgentData,
|
|
686
|
+
Ft as emitFilesystemAgentFileChange,
|
|
687
|
+
Wt as emitWorkspaceAttentionAction,
|
|
688
|
+
Lt as emitWorkspaceComposerStop,
|
|
689
|
+
Bt as events,
|
|
690
|
+
Mt as expandToFileSchema,
|
|
691
|
+
Kt as filesystemEvents,
|
|
692
|
+
_t as filesystemPlugin,
|
|
693
|
+
Dt as formatShortcut,
|
|
694
|
+
At as getFileIcon,
|
|
695
|
+
$t as isWorkspaceComposerStopDetail,
|
|
696
|
+
jt as isWorkspaceComposerStopReason,
|
|
697
|
+
zt as navigateToLineSchema,
|
|
698
|
+
Ht as notificationSchema,
|
|
699
|
+
Ut as onFilesystemChanged,
|
|
700
|
+
qt as openFileSchema,
|
|
701
|
+
Vt as openPanelSchema,
|
|
694
702
|
Q as postUiCommand,
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
703
|
+
_e as readFileRecords,
|
|
704
|
+
_a as toast,
|
|
705
|
+
Jt as useActiveFile,
|
|
706
|
+
Gt as useActivePanel,
|
|
707
|
+
Me as useActivePanels,
|
|
708
|
+
Xt as useApiBaseUrl,
|
|
709
|
+
De as useArtifactPanels,
|
|
710
|
+
Ae as useArtifactRouting,
|
|
711
|
+
Qt as useAutoOpenAgentFiles,
|
|
712
|
+
Yt as useCatalogRegistry,
|
|
713
|
+
Zt as useCatalogs,
|
|
714
|
+
ea as useCommandRegistry,
|
|
715
|
+
ta as useCommands,
|
|
716
|
+
aa as useDirtyFiles,
|
|
717
|
+
ra as useDockviewApi,
|
|
718
|
+
na as useEditorLifecycle,
|
|
719
|
+
sa as useEvent,
|
|
720
|
+
oa as useFilePane,
|
|
721
|
+
ia as useFullPagePanelHref,
|
|
722
|
+
la as useHasWorkspaceFilesProvider,
|
|
723
|
+
ca as useHydrationComplete,
|
|
724
|
+
da as useIsFullPagePanel,
|
|
725
|
+
ua as useKeyboardShortcuts,
|
|
726
|
+
pa as useOpenPanels,
|
|
727
|
+
ma as usePanelRenderMode,
|
|
728
|
+
fa as usePluginErrors,
|
|
729
|
+
_ as useRegistry,
|
|
730
|
+
ha as useResetLayout,
|
|
723
731
|
ke as useResponsiveSidebarCollapse,
|
|
724
732
|
Z as useSetSidebar,
|
|
725
733
|
Y as useSidebarState,
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
734
|
+
ga as useSurfaceResolverRegistry,
|
|
735
|
+
ba as useTheme,
|
|
736
|
+
ya as useThemePreference,
|
|
737
|
+
M as useViewportBreakpoint,
|
|
738
|
+
va as useWorkspaceAttention,
|
|
739
|
+
Sa as useWorkspaceBridge,
|
|
740
|
+
ka as useWorkspaceChatPanel,
|
|
741
|
+
xa as useWorkspaceContext,
|
|
742
|
+
Pa as useWorkspaceContextOptional,
|
|
743
|
+
wa as useWorkspaceRequestId,
|
|
744
|
+
Ca as userMeta,
|
|
745
|
+
Ea as workspaceAttentionSessionBadgeForBlocker,
|
|
746
|
+
Na as workspaceComposerStopAppliesToSession,
|
|
747
|
+
Ra as workspaceComposerStopTargetSessionId,
|
|
748
|
+
Ta as workspaceEvents,
|
|
749
|
+
A as workspaceLinkCommand,
|
|
739
750
|
be as workspaceLinkHref
|
|
740
751
|
};
|