@loopstack/loopstack-studio 0.30.0 → 0.31.1

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.
@@ -1,78 +0,0 @@
1
- import { Badge } from "../../components/ui/badge.js";
2
- import { c } from "react/compiler-runtime";
3
- import { jsx, jsxs } from "react/jsx-runtime";
4
- import { Link } from "react-router-dom";
5
- function RunItem(a) {
6
- let o = c(27), { run: s, router: l } = a, u;
7
- o[0] === Symbol.for("react.memo_cache_sentinel") ? (u = {
8
- completed: "bg-green-50 text-green-900 border-green-200",
9
- failed: "bg-destructive/10 text-destructive border-destructive/20",
10
- canceled: "bg-orange-50 text-orange-900 border-orange-200",
11
- running: "bg-blue-50 text-blue-900 border-blue-200",
12
- paused: "bg-yellow-50 text-yellow-900 border-yellow-200",
13
- pending: "bg-muted text-muted-foreground border-border"
14
- }, o[0] = u) : u = o[0];
15
- let d = u[s.status] || "bg-muted text-muted-foreground border-border", f;
16
- o[1] !== l || o[2] !== s.id ? (f = l.getWorkflow(s.id), o[1] = l, o[2] = s.id, o[3] = f) : f = o[3];
17
- let p = s.id, m = s.run ?? s.index ?? "?", h = s.title ? `(${s.title})` : "", g;
18
- o[4] !== m || o[5] !== h ? (g = /* @__PURE__ */ jsxs("h3", {
19
- className: "text-foreground group-hover:text-primary truncate font-semibold transition-colors",
20
- children: [
21
- "Run #",
22
- m,
23
- " ",
24
- h
25
- ]
26
- }), o[4] = m, o[5] = h, o[6] = g) : g = o[6];
27
- let _ = `rounded-full border px-2 py-1 text-xs whitespace-nowrap ${d}`, v;
28
- o[7] !== s.status || o[8] !== _ ? (v = /* @__PURE__ */ jsx(Badge, {
29
- className: _,
30
- children: s.status
31
- }), o[7] = s.status, o[8] = _, o[9] = v) : v = o[9];
32
- let y;
33
- o[10] === s.updatedAt ? y = o[11] : (y = new Date(s.updatedAt).toLocaleString(), o[10] = s.updatedAt, o[11] = y);
34
- let b;
35
- o[12] === y ? b = o[13] : (b = /* @__PURE__ */ jsx("span", {
36
- className: "text-muted-foreground text-xs",
37
- children: y
38
- }), o[12] = y, o[13] = b);
39
- let x;
40
- o[14] !== b || o[15] !== v ? (x = /* @__PURE__ */ jsxs("div", {
41
- className: "mt-2 flex flex-wrap items-center gap-2",
42
- children: [v, b]
43
- }), o[14] = b, o[15] = v, o[16] = x) : x = o[16];
44
- let S;
45
- o[17] !== x || o[18] !== g ? (S = /* @__PURE__ */ jsxs("div", {
46
- className: "min-w-0 flex-1 pr-2",
47
- children: [g, x]
48
- }), o[17] = x, o[18] = g, o[19] = S) : S = o[19];
49
- let C;
50
- o[20] === Symbol.for("react.memo_cache_sentinel") ? (C = /* @__PURE__ */ jsx("div", {
51
- className: "ml-3 opacity-0 transition-opacity group-hover:opacity-100",
52
- children: /* @__PURE__ */ jsx("svg", {
53
- className: "text-muted-foreground h-4 w-4",
54
- fill: "none",
55
- stroke: "currentColor",
56
- viewBox: "0 0 24 24",
57
- children: /* @__PURE__ */ jsx("path", {
58
- strokeLinecap: "round",
59
- strokeLinejoin: "round",
60
- strokeWidth: 2,
61
- d: "M9 5l7 7-7 7"
62
- })
63
- })
64
- }), o[20] = C) : C = o[20];
65
- let w;
66
- o[21] === S ? w = o[22] : (w = /* @__PURE__ */ jsxs("div", {
67
- className: "flex min-w-0 items-start justify-between",
68
- children: [S, C]
69
- }), o[21] = S, o[22] = w);
70
- let T;
71
- return o[23] !== s.id || o[24] !== w || o[25] !== f ? (T = /* @__PURE__ */ jsx(Link, {
72
- to: f,
73
- className: "bg-card border-border hover:border-primary/50 group block w-full overflow-hidden rounded-lg border p-4 transition-all duration-200 hover:shadow-md",
74
- children: w
75
- }, p), o[23] = s.id, o[24] = w, o[25] = f, o[26] = T) : T = o[26], T;
76
- }
77
- var RunItem_default = RunItem;
78
- export { RunItem_default as default };
@@ -1,32 +0,0 @@
1
- import { ScrollArea } from "../../components/ui/scroll-area.js";
2
- import RunItem_default from "./RunItem.js";
3
- import { c } from "react/compiler-runtime";
4
- import { jsx } from "react/jsx-runtime";
5
- function RunsList(i) {
6
- let a = c(11), { type: o, runs: s, router: l, emptyMessage: u } = i;
7
- if (s.length === 0) {
8
- let e;
9
- return a[0] === u ? e = a[1] : (e = /* @__PURE__ */ jsx("p", {
10
- className: "text-muted-foreground",
11
- children: u
12
- }), a[0] = u, a[1] = e), e;
13
- }
14
- let d;
15
- if (a[2] !== l || a[3] !== s || a[4] !== o) {
16
- let e;
17
- a[6] !== l || a[7] !== o ? (e = (e) => /* @__PURE__ */ jsx(RunItem_default, {
18
- run: e,
19
- router: l
20
- }, `${o}-${e.id}`), a[6] = l, a[7] = o, a[8] = e) : e = a[8], d = s.map(e), a[2] = l, a[3] = s, a[4] = o, a[5] = d;
21
- } else d = a[5];
22
- let f;
23
- return a[9] === d ? f = a[10] : (f = /* @__PURE__ */ jsx(ScrollArea, {
24
- className: "h-75 w-full",
25
- children: /* @__PURE__ */ jsx("div", {
26
- className: "space-y-2 pr-2",
27
- children: d
28
- })
29
- }), a[9] = d, a[10] = f), f;
30
- }
31
- var RunList_default = RunsList;
32
- export { RunList_default as default };
@@ -1,16 +0,0 @@
1
- import { getDashboardStatsCacheKey } from "./query-keys.js";
2
- import { useApiClient } from "./useApi.js";
3
- import { c } from "react/compiler-runtime";
4
- import { useQuery } from "@tanstack/react-query";
5
- function useDashboardStats() {
6
- let i = c(7), { envKey: a, api: o } = useApiClient(), s;
7
- i[0] === a ? s = i[1] : (s = getDashboardStatsCacheKey(a), i[0] = a, i[1] = s);
8
- let l;
9
- i[2] === o ? l = i[3] : (l = () => o.dashboard.getStats(), i[2] = o, i[3] = l);
10
- let u;
11
- return i[4] !== s || i[5] !== l ? (u = {
12
- queryKey: s,
13
- queryFn: l
14
- }, i[4] = s, i[5] = l, i[6] = u) : u = i[6], useQuery(u);
15
- }
16
- export { useDashboardStats };