@hachej/boring-workspace 0.1.59 → 0.1.61
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-ChkSU4gL.js → FileTree-zGmxifl_.js} +11 -11
- package/dist/{MarkdownEditor-BlYGosmH.js → MarkdownEditor-BykEKKxv.js} +222 -206
- package/dist/{WorkspaceLoadingState-BYTO4wdt.js → WorkspaceLoadingState-Dfnk7JjR.js} +425 -335
- package/dist/WorkspaceProvider-kf-pjz6V.js +8530 -0
- package/dist/app-front.d.ts +141 -37
- package/dist/app-front.js +2037 -891
- package/dist/boring-workspace.css +1 -1
- package/dist/events.d.ts +2 -2
- package/dist/plugin.d.ts +27 -33
- package/dist/plugin.js +15 -13
- package/dist/shared.d.ts +1 -1
- package/dist/{surface-DmIalUmP.d.ts → surface-CDklwi48.d.ts} +34 -6
- package/dist/testing.d.ts +4 -4
- package/dist/testing.js +20 -21
- package/dist/workspace.css +488 -138
- package/dist/workspace.d.ts +207 -33
- package/dist/workspace.js +259 -255
- package/docs/INTERFACES.md +2 -2
- package/docs/README.md +3 -3
- package/package.json +4 -4
- package/dist/WorkspaceProvider-Bp1Sm40K.js +0 -8004
- package/dist/panel-DnvDNQac.js +0 -6
|
@@ -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 { a2 as Z } from "./WorkspaceProvider-kf-pjz6V.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";
|
|
@@ -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
|
+
), q = 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
|
+
), z = 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
|
+
), B = 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,10 +252,10 @@ function ht({
|
|
|
252
252
|
return !1;
|
|
253
253
|
},
|
|
254
254
|
[]
|
|
255
|
-
),
|
|
255
|
+
), S = k(
|
|
256
256
|
(o, c) => o.data.name.toLowerCase().includes(c.toLowerCase()),
|
|
257
257
|
[]
|
|
258
|
-
),
|
|
258
|
+
), _ = I(
|
|
259
259
|
() => ({
|
|
260
260
|
onContextMenu: h,
|
|
261
261
|
editing: e ?? null,
|
|
@@ -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(j.Provider, { value:
|
|
287
|
+
) }) : /* @__PURE__ */ d(j.Provider, { value: _, 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,
|
|
@@ -298,11 +298,11 @@ function ht({
|
|
|
298
298
|
indent: 14,
|
|
299
299
|
selection: O,
|
|
300
300
|
searchTerm: s ?? "",
|
|
301
|
-
searchMatch:
|
|
301
|
+
searchMatch: S,
|
|
302
302
|
onActivate: R,
|
|
303
|
-
onToggle:
|
|
304
|
-
onMove:
|
|
305
|
-
disableDrop:
|
|
303
|
+
onToggle: q,
|
|
304
|
+
onMove: z,
|
|
305
|
+
disableDrop: B,
|
|
306
306
|
disableEdit: !0,
|
|
307
307
|
dndManager: et(),
|
|
308
308
|
children: it
|