@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.
- package/dist/components/deck/DeckCell.js +47 -50
- package/dist/components/deck/DeckContextMenu.d.ts +22 -0
- package/dist/components/deck/DeckContextMenu.js +73 -0
- package/dist/components/deck/DeckGrid.js +147 -104
- package/dist/components/deck/DeckTopBar.js +74 -96
- package/dist/components/deck/WidgetFrame.d.ts +7 -1
- package/dist/components/deck/WidgetFrame.js +60 -52
- package/dist/components/deck/index.d.ts +1 -0
- package/dist/components/ui/InfiniteCanvas.d.ts +2 -0
- package/dist/components/ui/InfiniteCanvas.js +43 -37
- package/dist/components/workbench/WorkbenchCanvas.d.ts +28 -0
- package/dist/components/workbench/WorkbenchCanvas.js +79 -0
- package/dist/components/workbench/WorkbenchContextMenu.d.ts +24 -0
- package/dist/components/workbench/WorkbenchContextMenu.js +44 -0
- package/dist/components/workbench/WorkbenchFilterBar.d.ts +16 -0
- package/dist/components/workbench/WorkbenchFilterBar.js +266 -0
- package/dist/components/workbench/WorkbenchHud.d.ts +6 -0
- package/dist/components/workbench/WorkbenchHud.js +17 -0
- package/dist/components/workbench/WorkbenchLockButton.d.ts +6 -0
- package/dist/components/workbench/WorkbenchLockButton.js +49 -0
- package/dist/components/workbench/WorkbenchOverlay.d.ts +18 -0
- package/dist/components/workbench/WorkbenchOverlay.js +107 -0
- package/dist/components/workbench/WorkbenchSurface.d.ts +21 -0
- package/dist/components/workbench/WorkbenchSurface.js +183 -0
- package/dist/components/workbench/WorkbenchWidget.d.ts +25 -0
- package/dist/components/workbench/WorkbenchWidget.js +183 -0
- package/dist/components/workbench/index.d.ts +7 -0
- package/dist/components/workbench/types.d.ts +39 -0
- package/dist/components/workbench/types.js +25 -0
- package/dist/components/workbench/useWorkbenchModel.d.ts +70 -0
- package/dist/components/workbench/useWorkbenchModel.js +259 -0
- package/dist/components/workbench/widgets/CodeEditorWidget.d.ts +1 -0
- package/dist/components/workbench/widgets/CodeEditorWidget.js +144 -0
- package/dist/components/workbench/widgets/FileBrowserWidget.d.ts +1 -0
- package/dist/components/workbench/widgets/FileBrowserWidget.js +142 -0
- package/dist/components/workbench/widgets/LogViewerWidget.d.ts +1 -0
- package/dist/components/workbench/widgets/LogViewerWidget.js +86 -0
- package/dist/components/workbench/widgets/SystemMonitorWidget.d.ts +1 -0
- package/dist/components/workbench/widgets/SystemMonitorWidget.js +122 -0
- package/dist/components/workbench/widgets/TerminalWidget.d.ts +1 -0
- package/dist/components/workbench/widgets/TerminalWidget.js +70 -0
- package/dist/components/workbench/widgets/widgetRegistry.d.ts +13 -0
- package/dist/components/workbench/widgets/widgetRegistry.js +50 -0
- package/dist/components/workbench/workbenchHelpers.d.ts +22 -0
- package/dist/components/workbench/workbenchHelpers.js +176 -0
- package/dist/deck.js +14 -12
- package/dist/full.js +381 -379
- package/dist/hooks/useDeckDrag.js +15 -15
- package/dist/styles.css +1 -1
- package/dist/tailwind.css +1 -0
- package/dist/ui.css +4 -0
- package/dist/workbench.css +1220 -0
- package/dist/workbench.d.ts +1 -0
- package/dist/workbench.js +22 -0
- 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
|
|
8
|
-
let c = 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),
|
|
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,
|
|
27
|
-
|
|
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,
|
|
48
|
-
const u =
|
|
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,
|
|
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 || (
|
|
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 (
|
|
59
|
-
P =
|
|
60
|
-
const e =
|
|
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
|
-
|
|
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
|
-
|
|
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 {
|