@floegence/floe-webapp-core 0.1.13 → 0.1.15
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/context/DeckContext.d.ts +6 -0
- package/dist/context/WidgetStateContext.d.ts +47 -0
- package/dist/context/index.d.ts +1 -0
- package/dist/index.js +178 -173
- package/dist/index10.js +2 -2
- package/dist/index11.js +50 -38
- package/dist/index12.js +1 -1
- package/dist/index13.js +3 -3
- package/dist/index14.js +2 -2
- package/dist/index15.js +2 -2
- package/dist/index16.js +2 -2
- package/dist/index17.js +2 -2
- package/dist/index18.js +2 -2
- package/dist/index19.js +1 -1
- package/dist/index2.js +3 -3
- package/dist/index20.js +1 -1
- package/dist/index21.js +2 -2
- package/dist/index22.js +2 -2
- package/dist/index23.js +2 -2
- package/dist/index24.js +1 -1
- package/dist/index25.js +2 -2
- package/dist/index26.js +1 -1
- package/dist/index27.js +1 -1
- package/dist/index28.js +10 -10
- package/dist/index29.js +1 -1
- package/dist/index3.js +1 -1
- package/dist/index30.js +1 -1
- package/dist/index37.js +1 -1
- package/dist/index39.js +1 -1
- package/dist/index4.js +1 -1
- package/dist/index40.js +1 -1
- package/dist/index41.js +1 -1
- package/dist/index42.js +1 -1
- package/dist/index43.js +1 -1
- package/dist/index44.js +1 -1
- package/dist/index5.js +1 -1
- package/dist/index50.js +1 -1
- package/dist/index52.js +2 -2
- package/dist/index53.js +1 -1
- package/dist/index54.js +1 -1
- package/dist/index56.js +92 -79
- package/dist/index57.js +38 -13
- package/dist/index58.js +13 -10
- package/dist/index59.js +10 -16
- package/dist/index6.js +1 -1
- package/dist/index60.js +16 -10
- package/dist/index61.js +10 -8
- package/dist/index62.js +8 -58
- package/dist/index63.js +58 -5
- package/dist/index64.js +5 -3
- package/dist/index65.js +3 -45
- package/dist/index66.js +42 -23
- package/dist/index67.js +24 -30
- package/dist/index68.js +31 -90
- package/dist/index69.js +91 -22
- package/dist/index7.js +1 -1
- package/dist/index70.js +19 -43
- package/dist/index71.js +45 -13
- package/dist/index72.js +14 -35
- package/dist/index73.js +33 -62
- package/dist/index74.js +61 -81
- package/dist/index75.js +84 -14
- package/dist/index76.js +12 -2261
- package/dist/index77.js +2262 -6
- package/dist/index78.js +10 -0
- package/dist/index8.js +2 -2
- package/dist/index9.js +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index73.js
CHANGED
|
@@ -1,67 +1,38 @@
|
|
|
1
|
-
import { template as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
var
|
|
5
|
-
function
|
|
6
|
-
const [l, o] = u(Math.random() * 100), [i, a] = u(Math.random() * 100), [m, h] = u(Math.random() * 1e3), [C, b] = u(Math.random() * 500);
|
|
7
|
-
let c;
|
|
8
|
-
p(() => {
|
|
9
|
-
t.isEditMode || (c = window.setInterval(() => {
|
|
10
|
-
o((e) => Math.max(0, Math.min(100, e + (Math.random() - 0.5) * 10))), a((e) => Math.max(0, Math.min(100, e + (Math.random() - 0.5) * 5))), h(Math.random() * 1e3), b(Math.random() * 500);
|
|
11
|
-
}, 2e3));
|
|
12
|
-
}), w(() => {
|
|
13
|
-
c && clearInterval(c);
|
|
14
|
-
});
|
|
15
|
-
const g = (e, n) => e >= n.danger ? "text-destructive" : e >= n.warning ? "text-yellow-500" : "text-green-500";
|
|
1
|
+
import { template as i, insert as r, effect as n, className as o, createComponent as a } from "solid-js/web";
|
|
2
|
+
import { cn as d } from "./index64.js";
|
|
3
|
+
import { Files as c, Search as f, Settings as u, Terminal as x } from "./index31.js";
|
|
4
|
+
var m = /* @__PURE__ */ i('<div><div class="p-3 text-sm text-muted-foreground">Sidebar content for: '), h = /* @__PURE__ */ i('<div><div class="h-full flex flex-col items-center justify-center text-muted-foreground"><span class=text-xs>Files Widget</span><span class="text-xs text-muted-foreground/60">Connect to file explorer'), p = /* @__PURE__ */ i('<div><div class="h-full flex flex-col items-center justify-center text-muted-foreground"><span class=text-xs>Search Widget</span><span class="text-xs text-muted-foreground/60">Connect to search'), g = /* @__PURE__ */ i('<div><div class="h-full flex flex-col items-center justify-center text-muted-foreground"><span class=text-xs>Settings Widget</span><span class="text-xs text-muted-foreground/60">Connect to settings'), v = /* @__PURE__ */ i('<div><div class="h-full flex flex-col items-center justify-center text-muted-foreground"><span class=text-xs>Showcase Widget</span><span class="text-xs text-muted-foreground/60">Connect to showcase');
|
|
5
|
+
function S(s) {
|
|
16
6
|
return (() => {
|
|
17
|
-
var e =
|
|
18
|
-
return r(
|
|
19
|
-
label: "CPU",
|
|
20
|
-
get value() {
|
|
21
|
-
return l().toFixed(1);
|
|
22
|
-
},
|
|
23
|
-
unit: "%",
|
|
24
|
-
get colorClass() {
|
|
25
|
-
return g(l(), {
|
|
26
|
-
warning: 60,
|
|
27
|
-
danger: 80
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
}), null), r(n, s(d, {
|
|
31
|
-
label: "Memory",
|
|
32
|
-
get value() {
|
|
33
|
-
return i().toFixed(1);
|
|
34
|
-
},
|
|
35
|
-
unit: "%",
|
|
36
|
-
get colorClass() {
|
|
37
|
-
return g(i(), {
|
|
38
|
-
warning: 70,
|
|
39
|
-
danger: 90
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
}), null), r(n, s(d, {
|
|
43
|
-
label: "Network In",
|
|
44
|
-
get value() {
|
|
45
|
-
return m().toFixed(0);
|
|
46
|
-
},
|
|
47
|
-
unit: "KB/s",
|
|
48
|
-
colorClass: "text-blue-500"
|
|
49
|
-
}), null), r(n, s(d, {
|
|
50
|
-
label: "Network Out",
|
|
51
|
-
get value() {
|
|
52
|
-
return C().toFixed(0);
|
|
53
|
-
},
|
|
54
|
-
unit: "KB/s",
|
|
55
|
-
colorClass: "text-purple-500"
|
|
56
|
-
}), null), f(() => M(e, v("h-full p-3", t.isEditMode && "pointer-events-none"))), e;
|
|
57
|
-
})();
|
|
58
|
-
}
|
|
59
|
-
function d(t) {
|
|
60
|
-
return (() => {
|
|
61
|
-
var l = $(), o = l.firstChild, i = o.nextSibling, a = i.firstChild, m = a.nextSibling;
|
|
62
|
-
return r(o, () => t.label), r(a, () => t.value), r(m, () => t.unit), f(() => M(a, v("text-lg font-semibold tabular-nums", t.colorClass))), l;
|
|
7
|
+
var e = m(), t = e.firstChild;
|
|
8
|
+
return t.firstChild, r(t, () => s.widgetId, null), n(() => o(e, d("h-full overflow-auto", s.isEditMode && "pointer-events-none"))), e;
|
|
63
9
|
})();
|
|
64
10
|
}
|
|
11
|
+
const b = (s) => (() => {
|
|
12
|
+
var e = h(), t = e.firstChild, l = t.firstChild;
|
|
13
|
+
return r(t, a(c, {
|
|
14
|
+
class: "w-8 h-8 mb-2"
|
|
15
|
+
}), l), n(() => o(e, d("h-full", s.isEditMode && "pointer-events-none"))), e;
|
|
16
|
+
})(), w = (s) => (() => {
|
|
17
|
+
var e = p(), t = e.firstChild, l = t.firstChild;
|
|
18
|
+
return r(t, a(f, {
|
|
19
|
+
class: "w-8 h-8 mb-2"
|
|
20
|
+
}), l), n(() => o(e, d("h-full", s.isEditMode && "pointer-events-none"))), e;
|
|
21
|
+
})(), W = (s) => (() => {
|
|
22
|
+
var e = g(), t = e.firstChild, l = t.firstChild;
|
|
23
|
+
return r(t, a(u, {
|
|
24
|
+
class: "w-8 h-8 mb-2"
|
|
25
|
+
}), l), n(() => o(e, d("h-full", s.isEditMode && "pointer-events-none"))), e;
|
|
26
|
+
})(), E = (s) => (() => {
|
|
27
|
+
var e = v(), t = e.firstChild, l = t.firstChild;
|
|
28
|
+
return r(t, a(x, {
|
|
29
|
+
class: "w-8 h-8 mb-2"
|
|
30
|
+
}), l), n(() => o(e, d("h-full", s.isEditMode && "pointer-events-none"))), e;
|
|
31
|
+
})();
|
|
65
32
|
export {
|
|
66
|
-
|
|
33
|
+
b as FilesSidebarWidget,
|
|
34
|
+
w as SearchSidebarWidget,
|
|
35
|
+
W as SettingsSidebarWidget,
|
|
36
|
+
E as ShowcaseSidebarWidget,
|
|
37
|
+
S as SidebarWidget
|
|
67
38
|
};
|
package/dist/index74.js
CHANGED
|
@@ -1,87 +1,67 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { createSignal as
|
|
3
|
-
import { cn as
|
|
4
|
-
var
|
|
5
|
-
function
|
|
6
|
-
const [
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
type: "input",
|
|
17
|
-
content: "$ "
|
|
18
|
-
}]), [f, c] = y("");
|
|
19
|
-
let r, i = 4;
|
|
20
|
-
const w = (l) => {
|
|
21
|
-
l.preventDefault();
|
|
22
|
-
const e = f().trim();
|
|
23
|
-
if (!e) return;
|
|
24
|
-
const n = [{
|
|
25
|
-
id: i++,
|
|
26
|
-
type: "input",
|
|
27
|
-
content: `$ ${e}`
|
|
28
|
-
}];
|
|
29
|
-
if (e === "help")
|
|
30
|
-
n.push({
|
|
31
|
-
id: i++,
|
|
32
|
-
type: "output",
|
|
33
|
-
content: "Available commands: help, clear, date, echo <text>"
|
|
34
|
-
});
|
|
35
|
-
else if (e === "clear") {
|
|
36
|
-
d([{
|
|
37
|
-
id: i++,
|
|
38
|
-
type: "input",
|
|
39
|
-
content: "$ "
|
|
40
|
-
}]), c("");
|
|
41
|
-
return;
|
|
42
|
-
} else e === "date" ? n.push({
|
|
43
|
-
id: i++,
|
|
44
|
-
type: "output",
|
|
45
|
-
content: (/* @__PURE__ */ new Date()).toString()
|
|
46
|
-
}) : e.startsWith("echo ") ? n.push({
|
|
47
|
-
id: i++,
|
|
48
|
-
type: "output",
|
|
49
|
-
content: e.slice(5)
|
|
50
|
-
}) : n.push({
|
|
51
|
-
id: i++,
|
|
52
|
-
type: "error",
|
|
53
|
-
content: `Command not found: ${e}`
|
|
54
|
-
});
|
|
55
|
-
n.push({
|
|
56
|
-
id: i++,
|
|
57
|
-
type: "input",
|
|
58
|
-
content: "$ "
|
|
59
|
-
}), d((a) => [...a.slice(0, -1), ...n]), c("");
|
|
60
|
-
}, C = () => {
|
|
61
|
-
r == null || r.focus();
|
|
62
|
-
};
|
|
1
|
+
import { template as x, insert as r, createComponent as s, effect as f, className as M } from "solid-js/web";
|
|
2
|
+
import { createSignal as u, onMount as p, onCleanup as w } from "solid-js";
|
|
3
|
+
import { cn as v } from "./index64.js";
|
|
4
|
+
var _ = /* @__PURE__ */ x('<div><div class="grid grid-cols-2 gap-3 h-full">'), $ = /* @__PURE__ */ x('<div class="bg-muted/30 rounded-md p-2 flex flex-col justify-center"><div class="text-xs text-muted-foreground mb-1"></div><div class="flex items-baseline gap-1"><span></span><span class="text-xs text-muted-foreground">');
|
|
5
|
+
function N(t) {
|
|
6
|
+
const [l, o] = u(Math.random() * 100), [i, a] = u(Math.random() * 100), [m, h] = u(Math.random() * 1e3), [C, b] = u(Math.random() * 500);
|
|
7
|
+
let c;
|
|
8
|
+
p(() => {
|
|
9
|
+
t.isEditMode || (c = window.setInterval(() => {
|
|
10
|
+
o((e) => Math.max(0, Math.min(100, e + (Math.random() - 0.5) * 10))), a((e) => Math.max(0, Math.min(100, e + (Math.random() - 0.5) * 5))), h(Math.random() * 1e3), b(Math.random() * 500);
|
|
11
|
+
}, 2e3));
|
|
12
|
+
}), w(() => {
|
|
13
|
+
c && clearInterval(c);
|
|
14
|
+
});
|
|
15
|
+
const g = (e, n) => e >= n.danger ? "text-destructive" : e >= n.warning ? "text-yellow-500" : "text-green-500";
|
|
63
16
|
return (() => {
|
|
64
|
-
var
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
17
|
+
var e = _(), n = e.firstChild;
|
|
18
|
+
return r(n, s(d, {
|
|
19
|
+
label: "CPU",
|
|
20
|
+
get value() {
|
|
21
|
+
return l().toFixed(1);
|
|
68
22
|
},
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
return
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
23
|
+
unit: "%",
|
|
24
|
+
get colorClass() {
|
|
25
|
+
return g(l(), {
|
|
26
|
+
warning: 60,
|
|
27
|
+
danger: 80
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
}), null), r(n, s(d, {
|
|
31
|
+
label: "Memory",
|
|
32
|
+
get value() {
|
|
33
|
+
return i().toFixed(1);
|
|
34
|
+
},
|
|
35
|
+
unit: "%",
|
|
36
|
+
get colorClass() {
|
|
37
|
+
return g(i(), {
|
|
38
|
+
warning: 70,
|
|
39
|
+
danger: 90
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
}), null), r(n, s(d, {
|
|
43
|
+
label: "Network In",
|
|
44
|
+
get value() {
|
|
45
|
+
return m().toFixed(0);
|
|
46
|
+
},
|
|
47
|
+
unit: "KB/s",
|
|
48
|
+
colorClass: "text-blue-500"
|
|
49
|
+
}), null), r(n, s(d, {
|
|
50
|
+
label: "Network Out",
|
|
51
|
+
get value() {
|
|
52
|
+
return C().toFixed(0);
|
|
53
|
+
},
|
|
54
|
+
unit: "KB/s",
|
|
55
|
+
colorClass: "text-purple-500"
|
|
56
|
+
}), null), f(() => M(e, v("h-full p-3", t.isEditMode && "pointer-events-none"))), e;
|
|
57
|
+
})();
|
|
58
|
+
}
|
|
59
|
+
function d(t) {
|
|
60
|
+
return (() => {
|
|
61
|
+
var l = $(), o = l.firstChild, i = o.nextSibling, a = i.firstChild, m = a.nextSibling;
|
|
62
|
+
return r(o, () => t.label), r(a, () => t.value), r(m, () => t.unit), f(() => M(a, v("text-lg font-semibold tabular-nums", t.colorClass))), l;
|
|
82
63
|
})();
|
|
83
64
|
}
|
|
84
|
-
E(["click", "input"]);
|
|
85
65
|
export {
|
|
86
|
-
|
|
66
|
+
N as MetricsWidget
|
|
87
67
|
};
|
package/dist/index75.js
CHANGED
|
@@ -1,17 +1,87 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { delegateEvents as E, template as b, insert as $, createComponent as S, effect as u, className as x, use as T } from "solid-js/web";
|
|
2
|
+
import { createSignal as y, For as k } from "solid-js";
|
|
3
|
+
import { cn as g } from "./index64.js";
|
|
4
|
+
var z = /* @__PURE__ */ b('<div><div class="flex-1 overflow-y-auto p-2"><div class="flex items-center"><span class=text-green-400>$ </span><form class=flex-1><input type=text class="w-full bg-transparent outline-none text-zinc-100">'), I = /* @__PURE__ */ b("<div>");
|
|
5
|
+
function F(p) {
|
|
6
|
+
const [_, d] = y([{
|
|
7
|
+
id: 1,
|
|
8
|
+
type: "output",
|
|
9
|
+
content: "Welcome to Floe Terminal"
|
|
10
|
+
}, {
|
|
11
|
+
id: 2,
|
|
12
|
+
type: "output",
|
|
13
|
+
content: 'Type "help" for available commands'
|
|
14
|
+
}, {
|
|
15
|
+
id: 3,
|
|
16
|
+
type: "input",
|
|
17
|
+
content: "$ "
|
|
18
|
+
}]), [f, c] = y("");
|
|
19
|
+
let r, i = 4;
|
|
20
|
+
const w = (l) => {
|
|
21
|
+
l.preventDefault();
|
|
22
|
+
const e = f().trim();
|
|
23
|
+
if (!e) return;
|
|
24
|
+
const n = [{
|
|
25
|
+
id: i++,
|
|
26
|
+
type: "input",
|
|
27
|
+
content: `$ ${e}`
|
|
28
|
+
}];
|
|
29
|
+
if (e === "help")
|
|
30
|
+
n.push({
|
|
31
|
+
id: i++,
|
|
32
|
+
type: "output",
|
|
33
|
+
content: "Available commands: help, clear, date, echo <text>"
|
|
34
|
+
});
|
|
35
|
+
else if (e === "clear") {
|
|
36
|
+
d([{
|
|
37
|
+
id: i++,
|
|
38
|
+
type: "input",
|
|
39
|
+
content: "$ "
|
|
40
|
+
}]), c("");
|
|
41
|
+
return;
|
|
42
|
+
} else e === "date" ? n.push({
|
|
43
|
+
id: i++,
|
|
44
|
+
type: "output",
|
|
45
|
+
content: (/* @__PURE__ */ new Date()).toString()
|
|
46
|
+
}) : e.startsWith("echo ") ? n.push({
|
|
47
|
+
id: i++,
|
|
48
|
+
type: "output",
|
|
49
|
+
content: e.slice(5)
|
|
50
|
+
}) : n.push({
|
|
51
|
+
id: i++,
|
|
52
|
+
type: "error",
|
|
53
|
+
content: `Command not found: ${e}`
|
|
54
|
+
});
|
|
55
|
+
n.push({
|
|
56
|
+
id: i++,
|
|
57
|
+
type: "input",
|
|
58
|
+
content: "$ "
|
|
59
|
+
}), d((a) => [...a.slice(0, -1), ...n]), c("");
|
|
60
|
+
}, C = () => {
|
|
61
|
+
r == null || r.focus();
|
|
62
|
+
};
|
|
63
|
+
return (() => {
|
|
64
|
+
var l = z(), e = l.firstChild, n = e.firstChild, a = n.firstChild, m = a.nextSibling, s = m.firstChild;
|
|
65
|
+
l.$$click = C, $(e, S(k, {
|
|
66
|
+
get each() {
|
|
67
|
+
return _().slice(0, -1);
|
|
68
|
+
},
|
|
69
|
+
children: (t) => (() => {
|
|
70
|
+
var o = I();
|
|
71
|
+
return $(o, () => t.content), u(() => x(o, g("whitespace-pre-wrap break-all", t.type === "error" && "text-red-400", t.type === "input" && "text-green-400"))), o;
|
|
72
|
+
})()
|
|
73
|
+
}), n), m.addEventListener("submit", w), s.$$input = (t) => c(t.currentTarget.value);
|
|
74
|
+
var v = r;
|
|
75
|
+
return typeof v == "function" ? T(v, s) : r = s, u((t) => {
|
|
76
|
+
var o = g("h-full bg-zinc-900 text-zinc-100 font-mono text-xs overflow-hidden flex flex-col", p.isEditMode && "pointer-events-none"), h = p.isEditMode;
|
|
77
|
+
return o !== t.e && x(l, t.e = o), h !== t.t && (s.disabled = t.t = h), t;
|
|
78
|
+
}, {
|
|
79
|
+
e: void 0,
|
|
80
|
+
t: void 0
|
|
81
|
+
}), u(() => s.value = f()), l;
|
|
82
|
+
})();
|
|
13
83
|
}
|
|
84
|
+
E(["click", "input"]);
|
|
14
85
|
export {
|
|
15
|
-
|
|
16
|
-
i as default
|
|
86
|
+
F as TerminalWidget
|
|
17
87
|
};
|