@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
|
@@ -2,7 +2,7 @@ import { jsx as d, jsxs as y } from "react/jsx-runtime";
|
|
|
2
2
|
import { useRef as C, useMemo as I, useEffect as M, useCallback as k, createContext as E, useContext as J } from "react";
|
|
3
3
|
import { Tree as K } from "react-arborist";
|
|
4
4
|
import { FolderOpenIcon as U, FolderIcon as V, ChevronRightIcon as X, Loader2Icon as Y } from "lucide-react";
|
|
5
|
-
import {
|
|
5
|
+
import { _ as Z } from "./WorkspaceProvider-Bp1Sm40K.js";
|
|
6
6
|
import { EmptyState as G, Input as H } from "@hachej/boring-ui-kit";
|
|
7
7
|
import { c as g } from "./utils-B6yFEsav.js";
|
|
8
8
|
import { createDragDropManager as Q } from "dnd-core";
|
|
@@ -15,10 +15,10 @@ function et() {
|
|
|
15
15
|
typeof window > "u" ? void 0 : window
|
|
16
16
|
)), r[D];
|
|
17
17
|
}
|
|
18
|
-
const
|
|
18
|
+
const W = /* @__PURE__ */ new Set(), j = E({
|
|
19
19
|
onContextMenu: void 0,
|
|
20
20
|
editing: null,
|
|
21
|
-
pendingPaths:
|
|
21
|
+
pendingPaths: W,
|
|
22
22
|
onSubmitEdit: void 0,
|
|
23
23
|
onCancelEdit: void 0
|
|
24
24
|
});
|
|
@@ -95,7 +95,7 @@ function ot(r, u) {
|
|
|
95
95
|
return l(r);
|
|
96
96
|
}
|
|
97
97
|
function it({ node: r, style: u, dragHandle: s }) {
|
|
98
|
-
const { onContextMenu: l, editing: e, pendingPaths: a, onSubmitEdit: n, onCancelEdit: t } = J(
|
|
98
|
+
const { onContextMenu: l, editing: e, pendingPaths: a, onSubmitEdit: n, onCancelEdit: t } = J(j), i = r.data, m = i.kind === "dir", h = (e == null ? void 0 : e.path) === i.path, w = a.has(i.path), F = m ? r.isOpen ? U : V : Z(i.name || "untitled");
|
|
99
99
|
return /* @__PURE__ */ y(
|
|
100
100
|
"div",
|
|
101
101
|
{
|
|
@@ -216,7 +216,7 @@ function ht({
|
|
|
216
216
|
cancelAnimationFrame(c), cancelAnimationFrame(o);
|
|
217
217
|
};
|
|
218
218
|
}, [r, f, a]);
|
|
219
|
-
const
|
|
219
|
+
const O = I(
|
|
220
220
|
() => u || void 0,
|
|
221
221
|
[u]
|
|
222
222
|
), R = k(
|
|
@@ -224,14 +224,14 @@ function ht({
|
|
|
224
224
|
o.data.kind === "file" && (t == null || t(o.data.path));
|
|
225
225
|
},
|
|
226
226
|
[t]
|
|
227
|
-
),
|
|
227
|
+
), _ = k(
|
|
228
228
|
(o) => {
|
|
229
229
|
var p;
|
|
230
230
|
const c = (p = b.current) == null ? void 0 : p.get(o);
|
|
231
231
|
c && (c.isOpen ? i == null || i(c.data.path) : m == null || m(c.data.path));
|
|
232
232
|
},
|
|
233
233
|
[i, m]
|
|
234
|
-
),
|
|
234
|
+
), q = k(
|
|
235
235
|
(o) => {
|
|
236
236
|
if (!A) return;
|
|
237
237
|
const c = !o.parentNode || o.parentNode.isRoot, p = c ? "." : o.parentNode.data.path;
|
|
@@ -243,7 +243,7 @@ function ht({
|
|
|
243
243
|
}
|
|
244
244
|
},
|
|
245
245
|
[A]
|
|
246
|
-
),
|
|
246
|
+
), z = k(
|
|
247
247
|
(o) => {
|
|
248
248
|
if (!o.parentNode || o.parentNode.isRoot) return !1;
|
|
249
249
|
if (o.parentNode.data.kind !== "dir") return !0;
|
|
@@ -252,14 +252,14 @@ function ht({
|
|
|
252
252
|
return !1;
|
|
253
253
|
},
|
|
254
254
|
[]
|
|
255
|
-
),
|
|
255
|
+
), B = k(
|
|
256
256
|
(o, c) => o.data.name.toLowerCase().includes(c.toLowerCase()),
|
|
257
257
|
[]
|
|
258
|
-
),
|
|
258
|
+
), S = I(
|
|
259
259
|
() => ({
|
|
260
260
|
onContextMenu: h,
|
|
261
261
|
editing: e ?? null,
|
|
262
|
-
pendingPaths: n ??
|
|
262
|
+
pendingPaths: n ?? W,
|
|
263
263
|
onSubmitEdit: w,
|
|
264
264
|
onCancelEdit: F
|
|
265
265
|
}),
|
|
@@ -284,7 +284,7 @@ function ht({
|
|
|
284
284
|
title: "No matching files",
|
|
285
285
|
description: s != null && s.trim() ? `No files match “${s.trim()}”.` : "No files match the current filter."
|
|
286
286
|
}
|
|
287
|
-
) }) : /* @__PURE__ */ d(
|
|
287
|
+
) }) : /* @__PURE__ */ d(j.Provider, { value: S, children: /* @__PURE__ */ d("div", { "data-boring-workspace-part": "file-tree", className: g("file-tree", P), children: /* @__PURE__ */ d(
|
|
288
288
|
K,
|
|
289
289
|
{
|
|
290
290
|
ref: b,
|
|
@@ -296,13 +296,13 @@ function ht({
|
|
|
296
296
|
height: l,
|
|
297
297
|
rowHeight: 26,
|
|
298
298
|
indent: 14,
|
|
299
|
-
selection:
|
|
299
|
+
selection: O,
|
|
300
300
|
searchTerm: s ?? "",
|
|
301
|
-
searchMatch:
|
|
301
|
+
searchMatch: B,
|
|
302
302
|
onActivate: R,
|
|
303
|
-
onToggle:
|
|
304
|
-
onMove:
|
|
305
|
-
disableDrop:
|
|
303
|
+
onToggle: _,
|
|
304
|
+
onMove: q,
|
|
305
|
+
disableDrop: z,
|
|
306
306
|
disableEdit: !0,
|
|
307
307
|
dndManager: et(),
|
|
308
308
|
children: it
|
|
@@ -15,7 +15,7 @@ import { TableHeader as pt } from "@tiptap/extension-table-header";
|
|
|
15
15
|
import { TableCell as mt } from "@tiptap/extension-table-cell";
|
|
16
16
|
import ht from "@tiptap/extension-image";
|
|
17
17
|
import { c as E } from "./utils-B6yFEsav.js";
|
|
18
|
-
import {
|
|
18
|
+
import { a8 as O, aA as V, p as wt } from "./WorkspaceProvider-Bp1Sm40K.js";
|
|
19
19
|
import { uploadFile as kt } from "@hachej/boring-agent/front";
|
|
20
20
|
import bt from "@tiptap/extension-code-block-lowlight";
|
|
21
21
|
import { createLowlight as vt, common as It } from "lowlight";
|