@floegence/floe-webapp-core 0.35.58 → 0.36.0

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 (55) hide show
  1. package/dist/components/deck/DeckCell.js +47 -50
  2. package/dist/components/deck/DeckContextMenu.d.ts +22 -0
  3. package/dist/components/deck/DeckContextMenu.js +73 -0
  4. package/dist/components/deck/DeckGrid.js +147 -104
  5. package/dist/components/deck/DeckTopBar.js +74 -96
  6. package/dist/components/deck/WidgetFrame.d.ts +7 -1
  7. package/dist/components/deck/WidgetFrame.js +60 -52
  8. package/dist/components/deck/index.d.ts +1 -0
  9. package/dist/components/ui/InfiniteCanvas.d.ts +2 -0
  10. package/dist/components/ui/InfiniteCanvas.js +43 -37
  11. package/dist/components/workbench/WorkbenchCanvas.d.ts +28 -0
  12. package/dist/components/workbench/WorkbenchCanvas.js +79 -0
  13. package/dist/components/workbench/WorkbenchContextMenu.d.ts +24 -0
  14. package/dist/components/workbench/WorkbenchContextMenu.js +44 -0
  15. package/dist/components/workbench/WorkbenchFilterBar.d.ts +16 -0
  16. package/dist/components/workbench/WorkbenchFilterBar.js +266 -0
  17. package/dist/components/workbench/WorkbenchHud.d.ts +6 -0
  18. package/dist/components/workbench/WorkbenchHud.js +17 -0
  19. package/dist/components/workbench/WorkbenchLockButton.d.ts +6 -0
  20. package/dist/components/workbench/WorkbenchLockButton.js +49 -0
  21. package/dist/components/workbench/WorkbenchOverlay.d.ts +18 -0
  22. package/dist/components/workbench/WorkbenchOverlay.js +107 -0
  23. package/dist/components/workbench/WorkbenchSurface.d.ts +21 -0
  24. package/dist/components/workbench/WorkbenchSurface.js +183 -0
  25. package/dist/components/workbench/WorkbenchWidget.d.ts +25 -0
  26. package/dist/components/workbench/WorkbenchWidget.js +183 -0
  27. package/dist/components/workbench/index.d.ts +7 -0
  28. package/dist/components/workbench/types.d.ts +39 -0
  29. package/dist/components/workbench/types.js +25 -0
  30. package/dist/components/workbench/useWorkbenchModel.d.ts +70 -0
  31. package/dist/components/workbench/useWorkbenchModel.js +259 -0
  32. package/dist/components/workbench/widgets/CodeEditorWidget.d.ts +1 -0
  33. package/dist/components/workbench/widgets/CodeEditorWidget.js +144 -0
  34. package/dist/components/workbench/widgets/FileBrowserWidget.d.ts +1 -0
  35. package/dist/components/workbench/widgets/FileBrowserWidget.js +142 -0
  36. package/dist/components/workbench/widgets/LogViewerWidget.d.ts +1 -0
  37. package/dist/components/workbench/widgets/LogViewerWidget.js +86 -0
  38. package/dist/components/workbench/widgets/SystemMonitorWidget.d.ts +1 -0
  39. package/dist/components/workbench/widgets/SystemMonitorWidget.js +122 -0
  40. package/dist/components/workbench/widgets/TerminalWidget.d.ts +1 -0
  41. package/dist/components/workbench/widgets/TerminalWidget.js +70 -0
  42. package/dist/components/workbench/widgets/widgetRegistry.d.ts +13 -0
  43. package/dist/components/workbench/widgets/widgetRegistry.js +50 -0
  44. package/dist/components/workbench/workbenchHelpers.d.ts +22 -0
  45. package/dist/components/workbench/workbenchHelpers.js +176 -0
  46. package/dist/deck.js +14 -12
  47. package/dist/full.js +381 -379
  48. package/dist/hooks/useDeckDrag.js +15 -15
  49. package/dist/styles.css +1 -1
  50. package/dist/tailwind.css +1 -0
  51. package/dist/ui.css +4 -0
  52. package/dist/workbench.css +1220 -0
  53. package/dist/workbench.d.ts +1 -0
  54. package/dist/workbench.js +22 -0
  55. package/package.json +5 -1
@@ -4,8 +4,8 @@ import { applyDragDelta as U } from "../utils/gridLayout.js";
4
4
  import { getGridConfigFromElement as N } from "../components/deck/DeckGrid.js";
5
5
  import { startHotInteraction as O } from "../utils/hotInteraction.js";
6
6
  function Z() {
7
- const p = B();
8
- let c = null, m = 0, f = 0, L = 0, g = 0, l = 0, P = 0, I = 0, A = 0, a = null, v = null, F = null, w = null, n = null, T = null, H = 0, k = 0, y = null;
7
+ const h = B();
8
+ let c = null, p = 0, m = 0, L = 0, f = 0, l = 0, P = 0, I = 0, A = 0, a = null, v = null, F = null, w = null, n = null, T = null, H = 0, k = 0, y = null;
9
9
  const C = (t) => {
10
10
  if (!t) {
11
11
  w?.(), w = null;
@@ -17,14 +17,14 @@ function Z() {
17
17
  lockUserSelect: !0
18
18
  });
19
19
  }, M = () => {
20
- c !== null && (a !== null && typeof cancelAnimationFrame < "u" && (cancelAnimationFrame(a), a = null), c = null, v = null, F = null, n = null, T = null, y = null, C(!1), p.endDrag(!0));
20
+ c !== null && (a !== null && typeof cancelAnimationFrame < "u" && (cancelAnimationFrame(a), a = null), c = null, v = null, F = null, n = null, T = null, y = null, C(!1), h.endDrag(!0));
21
21
  }, Y = () => {
22
22
  if (!n) return;
23
23
  const t = T ?? n.getBoundingClientRect(), e = 48, d = 24, s = l - t.top, o = t.bottom - l;
24
24
  let r = 0;
25
25
  if (s < e ? r = -Math.ceil((e - s) / e * d) : o < e && (r = Math.ceil((e - o) / e * d)), r === 0) return;
26
- const i = n.scrollTop, h = Math.max(0, Math.min(i + r, n.scrollHeight - n.clientHeight));
27
- h !== i && (n.scrollTop = h);
26
+ const i = n.scrollTop, g = Math.max(0, Math.min(i + r, n.scrollHeight - n.clientHeight));
27
+ g !== i && (n.scrollTop = g);
28
28
  }, R = () => {
29
29
  if (a !== null || typeof requestAnimationFrame > "u") return;
30
30
  const t = () => {
@@ -44,23 +44,23 @@ function Z() {
44
44
  if (!r) return;
45
45
  const i = o.closest(".deck-grid");
46
46
  if (!i) return;
47
- t.preventDefault(), t.stopPropagation(), c = t.pointerId, m = t.clientX, f = t.clientY, g = m, l = f, P = m, I = f, v = r, F = o, n = i, T = i.getBoundingClientRect(), L = i.scrollTop, A = L, C(!0);
48
- const u = p.activeLayout()?.widgets.find((b) => b.id === r);
47
+ t.preventDefault(), t.stopPropagation(), c = t.pointerId, p = t.clientX, m = t.clientY, f = p, l = m, P = p, I = m, v = r, F = o, n = i, T = i.getBoundingClientRect(), L = i.scrollTop, A = L, C(!0);
48
+ const u = h.activeLayout()?.widgets.find((b) => b.id === r);
49
49
  y = u ? { ...u.position } : null;
50
50
  const E = window.getComputedStyle(i);
51
- H = parseFloat(E.paddingLeft) || 0, k = parseFloat(E.paddingRight) || 0, p.startDrag(r, m, f), o.setPointerCapture(t.pointerId), R();
51
+ H = parseFloat(E.paddingLeft) || 0, k = parseFloat(E.paddingRight) || 0, h.startDrag(r, p, m), o.setPointerCapture(t.pointerId), R();
52
52
  }, x = (t) => {
53
- c !== t.pointerId || !v || (g = t.clientX, l = t.clientY, typeof requestAnimationFrame > "u" && X());
53
+ c !== t.pointerId || !v || (f = t.clientX, l = t.clientY, typeof requestAnimationFrame > "u" && X());
54
54
  }, X = () => {
55
55
  if (!v || !n || !y) return;
56
56
  Y();
57
57
  const t = n.scrollTop;
58
- if (g === P && l === I && t === A) return;
59
- P = g, I = l, A = t;
60
- const e = g - m, d = l - f + (t - L), { cols: s, rowHeight: o, gap: r } = N(n), i = n.clientWidth - H - k, h = r * (s - 1), u = (i - h) / s;
58
+ if (f === P && l === I && t === A) return;
59
+ P = f, I = l, A = t;
60
+ const e = f - p, d = l - m + (t - L), { cols: s, rowHeight: o, gap: r } = N(n), i = n.clientWidth - H - k, g = r * (s - 1), u = (i - g) / s;
61
61
  if (!Number.isFinite(u) || u <= 0) return;
62
62
  const E = o + r, b = Math.round(e / u), W = Math.round(d / E), q = U(y, b, W, s);
63
- p.updateDrag(q, { x: e, y: d });
63
+ h.updateDrag(q, { x: e, y: d });
64
64
  }, D = (t) => {
65
65
  if (c === t.pointerId) {
66
66
  try {
@@ -71,9 +71,9 @@ function Z() {
71
71
  }
72
72
  };
73
73
  G(() => {
74
- p.editMode() && (typeof document > "u" || (document.addEventListener("pointerdown", S, !0), document.addEventListener("pointermove", x, !0), document.addEventListener("pointerup", D, !0), document.addEventListener("pointercancel", D, !0), z(() => {
74
+ typeof document > "u" || (document.addEventListener("pointerdown", S, !0), document.addEventListener("pointermove", x, !0), document.addEventListener("pointerup", D, !0), document.addEventListener("pointercancel", D, !0), z(() => {
75
75
  M(), document.removeEventListener("pointerdown", S, !0), document.removeEventListener("pointermove", x, !0), document.removeEventListener("pointerup", D, !0), document.removeEventListener("pointercancel", D, !0);
76
- })));
76
+ }));
77
77
  });
78
78
  }
79
79
  export {