@hachej/boring-workspace 0.1.54 → 0.1.55

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.
@@ -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 { O as Z } from "./WorkspaceProvider-CrOT4ab7.js";
5
+ import { _ as Z } from "./WorkspaceProvider-DF90RUdU.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 O = /* @__PURE__ */ new Set(), W = E({
18
+ const W = /* @__PURE__ */ new Set(), j = E({
19
19
  onContextMenu: void 0,
20
20
  editing: null,
21
- pendingPaths: O,
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(W), 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");
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 j = I(
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
- ), q = k(
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
- ), z = k(
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
- ), B = k(
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
- ), S = k(
255
+ ), B = k(
256
256
  (o, c) => o.data.name.toLowerCase().includes(c.toLowerCase()),
257
257
  []
258
- ), _ = I(
258
+ ), S = I(
259
259
  () => ({
260
260
  onContextMenu: h,
261
261
  editing: e ?? null,
262
- pendingPaths: n ?? O,
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(W.Provider, { value: _, children: /* @__PURE__ */ d("div", { "data-boring-workspace-part": "file-tree", className: g("file-tree", P), children: /* @__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: j,
299
+ selection: O,
300
300
  searchTerm: s ?? "",
301
- searchMatch: S,
301
+ searchMatch: B,
302
302
  onActivate: R,
303
- onToggle: q,
304
- onMove: z,
305
- disableDrop: B,
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 { a0 as O, as as V, p as wt } from "./WorkspaceProvider-CrOT4ab7.js";
18
+ import { a8 as O, aA as V, p as wt } from "./WorkspaceProvider-DF90RUdU.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";