@loopstack/loopstack-studio 0.21.0-rc.0 → 0.21.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/LoadingCentered.js +28 -0
- package/dist/components/data-table/DataList.js +102 -102
- package/dist/components/data-table/DataTable.js +3 -3
- package/dist/components/dynamic-form/fields/RadioField.js +3 -3
- package/dist/components/dynamic-form/fields/SliderField.js +13 -13
- package/dist/components/dynamic-form/fields/SwitchField.js +1 -1
- package/dist/components/dynamic-form/fields/TextareaField.js +4 -4
- package/dist/components/index.js +45 -0
- package/dist/components/messages/CompletionMessagePaper.js +110 -0
- package/dist/components/snackbars/ErrorSnackbar.js +1 -1
- package/dist/components/ui/DiscordLogo.js +31 -0
- package/dist/components/ui/GoogleLogo.js +44 -0
- package/dist/components/ui/accordion.js +64 -0
- package/dist/components/ui/alert-dialog.js +91 -82
- package/dist/components/ui/alert.js +50 -0
- package/dist/components/ui/avatar.js +42 -0
- package/dist/components/ui/badge.js +1 -1
- package/dist/components/ui/breadcrumb.js +76 -56
- package/dist/components/ui/card.js +79 -19
- package/dist/components/ui/dialog.js +89 -47
- package/dist/components/ui/drawer.js +122 -0
- package/dist/components/ui/dropdown-menu.js +190 -0
- package/dist/components/ui/popover.js +47 -0
- package/dist/components/ui/scroll-area.js +50 -0
- package/dist/components/ui/select.js +115 -82
- package/dist/components/ui/separator.js +20 -0
- package/dist/components/ui/sheet.js +87 -57
- package/dist/components/ui/sidebar.js +557 -0
- package/dist/components/ui/skeleton.js +16 -0
- package/dist/components/ui/table.js +85 -61
- package/dist/features/health/LocalHealthCheck.js +1 -1
- package/dist/features/workspaces/Workspaces.js +1 -1
- package/dist/features/workspaces/components/CreateWorkspace.js +4 -4
- package/dist/features/workspaces/components/ExecutionTimeline.js +1 -1
- package/dist/features/workspaces/components/PipelineForm.js +2 -2
- package/dist/hooks/useApi.js +1 -1
- package/dist/index.d.ts +751 -9
- package/dist/index.js +47 -1
- package/dist/loopstack-studio.css +1 -1
- package/dist/node_modules/katex/dist/katex.js +717 -861
- package/dist/node_modules/vaul/dist/index.js +912 -0
- package/dist/pages/WorkspacePage.js +1 -1
- package/package.json +16 -16
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { cn } from "../lib/utils.js";
|
|
2
|
+
import { c } from "react/compiler-runtime";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
5
|
+
import { Loader2 } from "lucide-react";
|
|
6
|
+
var LoadingCentered_default = (i) => {
|
|
7
|
+
let o = c(16), s, l, u, d, f;
|
|
8
|
+
o[0] === i ? (s = o[1], l = o[2], u = o[3], d = o[4], f = o[5]) : ({loading: u, size: d, children: f, className: s, ...l} = i, o[0] = i, o[1] = s, o[2] = l, o[3] = u, o[4] = d, o[5] = f);
|
|
9
|
+
let p = u === void 0 ? !1 : u, m = d === void 0 ? 24 : d, h = f === void 0 ? null : f;
|
|
10
|
+
if (p) {
|
|
11
|
+
let r;
|
|
12
|
+
o[6] === s ? r = o[7] : (r = cn("flex items-center justify-center", s), o[6] = s, o[7] = r);
|
|
13
|
+
let i;
|
|
14
|
+
o[8] === m ? i = o[9] : (i = /* @__PURE__ */ jsx(Loader2, {
|
|
15
|
+
className: "animate-spin",
|
|
16
|
+
size: m
|
|
17
|
+
}), o[8] = m, o[9] = i);
|
|
18
|
+
let a;
|
|
19
|
+
return o[10] !== l || o[11] !== r || o[12] !== i ? (a = /* @__PURE__ */ jsx("div", {
|
|
20
|
+
className: r,
|
|
21
|
+
...l,
|
|
22
|
+
children: i
|
|
23
|
+
}), o[10] = l, o[11] = r, o[12] = i, o[13] = a) : a = o[13], a;
|
|
24
|
+
}
|
|
25
|
+
let g;
|
|
26
|
+
return o[14] === h ? g = o[15] : (g = /* @__PURE__ */ jsx(Fragment, { children: h }), o[14] = h, o[15] = g), g;
|
|
27
|
+
};
|
|
28
|
+
export { LoadingCentered_default as default };
|
|
@@ -1,133 +1,133 @@
|
|
|
1
1
|
import { Button } from "../ui/button.js";
|
|
2
|
+
import { Card, CardContent } from "../ui/card.js";
|
|
3
|
+
import { Checkbox } from "../ui/checkbox.js";
|
|
2
4
|
import ConfirmDialog_default from "./ConfirmDialog.js";
|
|
3
5
|
import DataTableBatchAction_default from "./DataTableBatchAction.js";
|
|
4
6
|
import DataTableFilters_default from "./DataTableFilters.js";
|
|
5
7
|
import DataTablePagination_default from "./DataTablePagination.js";
|
|
6
8
|
import DataTableToolbar_default from "./DataTableToolbar.js";
|
|
7
|
-
import { Card, CardContent } from "../ui/card.js";
|
|
8
|
-
import { Checkbox } from "../ui/checkbox.js";
|
|
9
9
|
import { c } from "react/compiler-runtime";
|
|
10
10
|
import { useState } from "react";
|
|
11
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
12
|
import { Loader2, Trash2 } from "lucide-react";
|
|
13
13
|
function DataList(he) {
|
|
14
|
-
let r = c(89), { data: i, totalItems:
|
|
15
|
-
r[0] ===
|
|
16
|
-
let
|
|
17
|
-
r[2] ===
|
|
18
|
-
let
|
|
19
|
-
r[4] === m ?
|
|
20
|
-
let
|
|
21
|
-
r[6] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
22
|
-
let [
|
|
23
|
-
r[7] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
14
|
+
let r = c(89), { data: i, totalItems: a, loading: ge, error: o, page: _e, pageSize: ve, onPageChange: ye, onPageSizeChange: be, searchTerm: xe, onSearchChange: s, filters: l, filterConfig: u, onFiltersChange: d, onRowClick: f, onNew: p, enableBatchActions: Se, batchActions: m, onBatchDelete: h, rowActions: Ce, itemRenderer: we, newButtonLabel: Te } = he, Ee = ge === void 0 ? !1 : ge, g;
|
|
15
|
+
r[0] === l ? g = r[1] : (g = l === void 0 ? {} : l, r[0] = l, r[1] = g);
|
|
16
|
+
let _ = g, v;
|
|
17
|
+
r[2] === u ? v = r[3] : (v = u === void 0 ? {} : u, r[2] = u, r[3] = v);
|
|
18
|
+
let y = v, b = Se === void 0 ? !0 : Se, x;
|
|
19
|
+
r[4] === m ? x = r[5] : (x = m === void 0 ? [] : m, r[4] = m, r[5] = x);
|
|
20
|
+
let De = x, Oe = Ce === void 0 ? [] : Ce, S;
|
|
21
|
+
r[6] === Symbol.for("react.memo_cache_sentinel") ? (S = [], r[6] = S) : S = r[6];
|
|
22
|
+
let [C, w] = useState(S), [T, ke] = useState(!1), E;
|
|
23
|
+
r[7] === Symbol.for("react.memo_cache_sentinel") ? (E = {
|
|
24
24
|
isOpen: !1,
|
|
25
25
|
type: "single"
|
|
26
|
-
}, r[7] =
|
|
27
|
-
let [
|
|
28
|
-
r[8] !== i || r[9] !==
|
|
29
|
-
|
|
30
|
-
}, r[8] = i, r[9] =
|
|
31
|
-
let
|
|
32
|
-
r[11] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
33
|
-
|
|
34
|
-
}, r[11] =
|
|
35
|
-
let
|
|
36
|
-
r[12] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
37
|
-
let
|
|
38
|
-
r[13] ===
|
|
39
|
-
|
|
26
|
+
}, r[7] = E) : E = r[7];
|
|
27
|
+
let [D, O] = useState(E), k;
|
|
28
|
+
r[8] !== i || r[9] !== C.length ? (k = () => {
|
|
29
|
+
C.length === i.length ? w([]) : w(i.map(_temp));
|
|
30
|
+
}, r[8] = i, r[9] = C.length, r[10] = k) : k = r[10];
|
|
31
|
+
let Ae = k, A;
|
|
32
|
+
r[11] === Symbol.for("react.memo_cache_sentinel") ? (A = (e) => {
|
|
33
|
+
w((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
|
|
34
|
+
}, r[11] = A) : A = r[11];
|
|
35
|
+
let je = A, j;
|
|
36
|
+
r[12] === Symbol.for("react.memo_cache_sentinel") ? (j = () => w([]), r[12] = j) : j = r[12];
|
|
37
|
+
let Me = j, M;
|
|
38
|
+
r[13] === O ? M = r[14] : (M = () => {
|
|
39
|
+
O({
|
|
40
40
|
isOpen: !0,
|
|
41
41
|
type: "batch"
|
|
42
42
|
});
|
|
43
|
-
}, r[13] =
|
|
44
|
-
let
|
|
45
|
-
r[15] !==
|
|
46
|
-
|
|
43
|
+
}, r[13] = O, r[14] = M);
|
|
44
|
+
let N = M, P;
|
|
45
|
+
r[15] !== D.itemId || r[16] !== D.type || r[17] !== h || r[18] !== C || r[19] !== O ? (P = async () => {
|
|
46
|
+
D.type === "single" && D.itemId || D.type === "batch" && (await h?.(C), Me()), O({
|
|
47
47
|
isOpen: !1,
|
|
48
48
|
type: "single"
|
|
49
49
|
});
|
|
50
|
-
}, r[15] =
|
|
51
|
-
let
|
|
52
|
-
r[21] !==
|
|
50
|
+
}, r[15] = D.itemId, r[16] = D.type, r[17] = h, r[18] = C, r[19] = O, r[20] = P) : P = r[20];
|
|
51
|
+
let F = P, I;
|
|
52
|
+
r[21] !== N || r[22] !== h ? (I = h ? [{
|
|
53
53
|
id: "delete",
|
|
54
54
|
label: "Delete Selected",
|
|
55
55
|
icon: /* @__PURE__ */ jsx(Trash2, { className: "mr-2 h-4 w-4" }),
|
|
56
56
|
variant: "destructive",
|
|
57
|
-
action:
|
|
58
|
-
}] : [], r[21] =
|
|
59
|
-
let
|
|
60
|
-
r[24] !==
|
|
61
|
-
let
|
|
62
|
-
r[27] !==
|
|
63
|
-
e.id === "delete" ?
|
|
64
|
-
}, r[27] =
|
|
57
|
+
action: N
|
|
58
|
+
}] : [], r[21] = N, r[22] = h, r[23] = I) : I = r[23];
|
|
59
|
+
let L;
|
|
60
|
+
r[24] !== De || r[25] !== I ? (L = [...I, ...De], r[24] = De, r[25] = I, r[26] = L) : L = r[26];
|
|
61
|
+
let R = L, z;
|
|
62
|
+
r[27] !== N || r[28] !== C ? (z = (e) => {
|
|
63
|
+
e.id === "delete" ? N() : (e.action(C), Me());
|
|
64
|
+
}, r[27] = N, r[28] = C, r[29] = z) : z = r[29];
|
|
65
65
|
let Ne = z, B;
|
|
66
|
-
r[30] ===
|
|
67
|
-
let Pe = B.length, Fe = [...[], ...
|
|
68
|
-
r[32] ===
|
|
69
|
-
let Le = !!
|
|
70
|
-
r[34] !== ze || r[35] !==
|
|
66
|
+
r[30] === _ ? B = r[31] : (B = Object.values(_).filter(Boolean), r[30] = _, r[31] = B);
|
|
67
|
+
let Pe = B.length, Fe = [...[], ...Oe], Ie = Fe.length > 0, V;
|
|
68
|
+
r[32] === T ? V = r[33] : (V = () => ke(!T), r[32] = T, r[33] = V);
|
|
69
|
+
let Le = !!d && Object.keys(y).length > 0, Re = !!s, ze = C.length === i.length && i.length > 0, H;
|
|
70
|
+
r[34] !== ze || r[35] !== Ae ? (H = /* @__PURE__ */ jsxs("div", {
|
|
71
71
|
className: "text-sm text-gray-400",
|
|
72
72
|
children: [/* @__PURE__ */ jsx(Checkbox, {
|
|
73
73
|
checked: ze,
|
|
74
|
-
onCheckedChange:
|
|
74
|
+
onCheckedChange: Ae,
|
|
75
75
|
"aria-label": "Select all rows",
|
|
76
76
|
className: "mr-4"
|
|
77
77
|
}), "Select All"]
|
|
78
|
-
}), r[34] = ze, r[35] =
|
|
78
|
+
}), r[34] = ze, r[35] = Ae, r[36] = H) : H = r[36];
|
|
79
79
|
let U;
|
|
80
|
-
r[37] !==
|
|
81
|
-
selectedCount:
|
|
82
|
-
batchActions:
|
|
80
|
+
r[37] !== R || r[38] !== b || r[39] !== Ne || r[40] !== C.length ? (U = b && /* @__PURE__ */ jsx(DataTableBatchAction_default, {
|
|
81
|
+
selectedCount: C.length,
|
|
82
|
+
batchActions: R,
|
|
83
83
|
onBatchAction: Ne
|
|
84
|
-
}), r[37] =
|
|
84
|
+
}), r[37] = R, r[38] = b, r[39] = Ne, r[40] = C.length, r[41] = U) : U = r[41];
|
|
85
85
|
let W;
|
|
86
|
-
r[42] !==
|
|
87
|
-
filters:
|
|
88
|
-
filterConfig:
|
|
89
|
-
onFiltersChange:
|
|
90
|
-
isOpen:
|
|
91
|
-
}), r[42] =
|
|
86
|
+
r[42] !== y || r[43] !== _ || r[44] !== T || r[45] !== d ? (W = /* @__PURE__ */ jsx(DataTableFilters_default, {
|
|
87
|
+
filters: _,
|
|
88
|
+
filterConfig: y,
|
|
89
|
+
onFiltersChange: d,
|
|
90
|
+
isOpen: T
|
|
91
|
+
}), r[42] = y, r[43] = _, r[44] = T, r[45] = d, r[46] = W) : W = r[46];
|
|
92
92
|
let G;
|
|
93
93
|
r[47] !== U || r[48] !== W ? (G = /* @__PURE__ */ jsxs("div", { children: [U, W] }), r[47] = U, r[48] = W, r[49] = G) : G = r[49];
|
|
94
94
|
let K;
|
|
95
|
-
r[50] !== Pe || r[51] !==
|
|
96
|
-
searchTerm:
|
|
97
|
-
onSearchChange:
|
|
95
|
+
r[50] !== Pe || r[51] !== T || r[52] !== Te || r[53] !== p || r[54] !== s || r[55] !== xe || r[56] !== V || r[57] !== Le || r[58] !== Re || r[59] !== H || r[60] !== G ? (K = /* @__PURE__ */ jsxs(DataTableToolbar_default, {
|
|
96
|
+
searchTerm: xe,
|
|
97
|
+
onSearchChange: s,
|
|
98
98
|
onFilterToggle: V,
|
|
99
|
-
onNew:
|
|
99
|
+
onNew: p,
|
|
100
100
|
filterCount: Pe,
|
|
101
|
-
isFilterOpen:
|
|
102
|
-
newButtonLabel:
|
|
101
|
+
isFilterOpen: T,
|
|
102
|
+
newButtonLabel: Te,
|
|
103
103
|
showFilter: Le,
|
|
104
104
|
showSearch: Re,
|
|
105
105
|
children: [H, G]
|
|
106
|
-
}), r[50] = Pe, r[51] =
|
|
106
|
+
}), r[50] = Pe, r[51] = T, r[52] = Te, r[53] = p, r[54] = s, r[55] = xe, r[56] = V, r[57] = Le, r[58] = Re, r[59] = H, r[60] = G, r[61] = K) : K = r[61];
|
|
107
107
|
let q;
|
|
108
|
-
r[62] ===
|
|
108
|
+
r[62] === o ? q = r[63] : (q = o && /* @__PURE__ */ jsx(Card, {
|
|
109
109
|
className: "border-destructive/50 bg-destructive/5",
|
|
110
110
|
children: /* @__PURE__ */ jsx(CardContent, {
|
|
111
111
|
className: "p-4",
|
|
112
112
|
children: /* @__PURE__ */ jsxs("p", {
|
|
113
113
|
className: "text-destructive font-medium",
|
|
114
|
-
children: ["Error: ",
|
|
114
|
+
children: ["Error: ", o.message]
|
|
115
115
|
})
|
|
116
116
|
})
|
|
117
|
-
}), r[62] =
|
|
118
|
-
let Be =
|
|
117
|
+
}), r[62] = o, r[63] = q);
|
|
118
|
+
let Be = Ee ? /* @__PURE__ */ jsx("div", {
|
|
119
119
|
className: "flex items-center justify-center py-8",
|
|
120
120
|
children: /* @__PURE__ */ jsx(Loader2, { className: "h-8 w-8 animate-spin" })
|
|
121
|
-
}) : /* @__PURE__ */ jsx("div", { children: i.length === 0 ? /* @__PURE__ */ jsx("span", { children: "No items found" }) : i.map((
|
|
121
|
+
}) : /* @__PURE__ */ jsx("div", { children: i.length === 0 ? /* @__PURE__ */ jsx("span", { children: "No items found" }) : i.map((n, me) => /* @__PURE__ */ jsxs("div", {
|
|
122
122
|
className: "flex items-center",
|
|
123
123
|
children: [
|
|
124
|
-
|
|
124
|
+
b && /* @__PURE__ */ jsx("div", {
|
|
125
125
|
className: "flex items-center justify-center pr-4",
|
|
126
126
|
onClick: _temp2,
|
|
127
127
|
children: /* @__PURE__ */ jsx(Checkbox, {
|
|
128
|
-
checked:
|
|
129
|
-
onCheckedChange: () =>
|
|
130
|
-
"aria-label": `Select row ${
|
|
128
|
+
checked: C.includes(n.id),
|
|
129
|
+
onCheckedChange: () => je(n.id),
|
|
130
|
+
"aria-label": `Select row ${n.id}`
|
|
131
131
|
})
|
|
132
132
|
}),
|
|
133
133
|
/* @__PURE__ */ jsx(Card, {
|
|
@@ -137,53 +137,53 @@ function DataList(he) {
|
|
|
137
137
|
children: /* @__PURE__ */ jsx("div", {
|
|
138
138
|
className: "flex items-center justify-between",
|
|
139
139
|
children: /* @__PURE__ */ jsx("div", {
|
|
140
|
-
className: `flex-1 ${
|
|
141
|
-
onClick:
|
|
142
|
-
children: /* @__PURE__ */ jsx("div", { children: we && we(
|
|
140
|
+
className: `flex-1 ${f ? "cursor-pointer" : ""} ${C.includes(n.id) ? "bg-muted/50" : ""}`,
|
|
141
|
+
onClick: f ? () => f(n) : void 0,
|
|
142
|
+
children: /* @__PURE__ */ jsx("div", { children: we && we(n) })
|
|
143
143
|
})
|
|
144
144
|
})
|
|
145
145
|
})
|
|
146
|
-
},
|
|
146
|
+
}, n.id),
|
|
147
147
|
Ie && /* @__PURE__ */ jsx("div", {
|
|
148
148
|
className: "flex items-center justify-center",
|
|
149
149
|
onClick: _temp3,
|
|
150
150
|
children: /* @__PURE__ */ jsx("div", {
|
|
151
151
|
className: "flex items-center justify-center gap-1",
|
|
152
|
-
children: Fe.map((
|
|
153
|
-
variant:
|
|
152
|
+
children: Fe.map((t) => !t.condition || t.condition(n) ? /* @__PURE__ */ jsx(Button, {
|
|
153
|
+
variant: t.variant || "ghost",
|
|
154
154
|
size: "sm",
|
|
155
|
-
onClick: () => void
|
|
156
|
-
disabled:
|
|
157
|
-
title:
|
|
158
|
-
className:
|
|
159
|
-
children:
|
|
160
|
-
},
|
|
155
|
+
onClick: () => void t.action(n),
|
|
156
|
+
disabled: t.disabled?.(n),
|
|
157
|
+
title: t.label,
|
|
158
|
+
className: t.className,
|
|
159
|
+
children: t.icon
|
|
160
|
+
}, t.id) : null)
|
|
161
161
|
})
|
|
162
162
|
})
|
|
163
163
|
]
|
|
164
|
-
}, `data-list-item-${
|
|
164
|
+
}, `data-list-item-${me}`)) }), J;
|
|
165
165
|
r[64] === Be ? J = r[65] : (J = /* @__PURE__ */ jsx("div", {
|
|
166
166
|
className: "space-y-2",
|
|
167
167
|
children: Be
|
|
168
168
|
}), r[64] = Be, r[65] = J);
|
|
169
169
|
let Y;
|
|
170
|
-
r[66] !==
|
|
171
|
-
page:
|
|
172
|
-
pageSize:
|
|
173
|
-
totalItems:
|
|
174
|
-
onPageChange:
|
|
175
|
-
onPageSizeChange:
|
|
176
|
-
}), r[66] =
|
|
170
|
+
r[66] !== ye || r[67] !== be || r[68] !== _e || r[69] !== ve || r[70] !== a ? (Y = /* @__PURE__ */ jsx(DataTablePagination_default, {
|
|
171
|
+
page: _e,
|
|
172
|
+
pageSize: ve,
|
|
173
|
+
totalItems: a,
|
|
174
|
+
onPageChange: ye,
|
|
175
|
+
onPageSizeChange: be
|
|
176
|
+
}), r[66] = ye, r[67] = be, r[68] = _e, r[69] = ve, r[70] = a, r[71] = Y) : Y = r[71];
|
|
177
177
|
let X;
|
|
178
|
-
r[72] !==
|
|
179
|
-
...
|
|
178
|
+
r[72] !== D || r[73] !== O ? (X = (e) => O({
|
|
179
|
+
...D,
|
|
180
180
|
isOpen: e
|
|
181
|
-
}), r[72] =
|
|
182
|
-
let Ve =
|
|
183
|
-
r[75] ===
|
|
181
|
+
}), r[72] = D, r[73] = O, r[74] = X) : X = r[74];
|
|
182
|
+
let Ve = D.type === "single" ? "Delete Item" : "Delete Items", He = D.type === "single" ? "Are you sure you want to delete this item? This action cannot be undone." : `Are you sure you want to delete ${C.length} items? This action cannot be undone.`, Z;
|
|
183
|
+
r[75] === F ? Z = r[76] : (Z = () => void F(), r[75] = F, r[76] = Z);
|
|
184
184
|
let Q;
|
|
185
|
-
r[77] !==
|
|
186
|
-
isOpen:
|
|
185
|
+
r[77] !== D.isOpen || r[78] !== X || r[79] !== Ve || r[80] !== He || r[81] !== Z ? (Q = /* @__PURE__ */ jsx(ConfirmDialog_default, {
|
|
186
|
+
isOpen: D.isOpen,
|
|
187
187
|
onOpenChange: X,
|
|
188
188
|
title: Ve,
|
|
189
189
|
description: He,
|
|
@@ -191,7 +191,7 @@ function DataList(he) {
|
|
|
191
191
|
confirmText: "Delete",
|
|
192
192
|
cancelText: "Cancel",
|
|
193
193
|
variant: "destructive"
|
|
194
|
-
}), r[77] =
|
|
194
|
+
}), r[77] = D.isOpen, r[78] = X, r[79] = Ve, r[80] = He, r[81] = Z, r[82] = Q) : Q = r[82];
|
|
195
195
|
let $;
|
|
196
196
|
return r[83] !== K || r[84] !== q || r[85] !== J || r[86] !== Y || r[87] !== Q ? ($ = /* @__PURE__ */ jsxs("div", {
|
|
197
197
|
className: "space-y-4",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Button } from "../ui/button.js";
|
|
2
|
+
import { Card, CardContent } from "../ui/card.js";
|
|
3
|
+
import { Checkbox } from "../ui/checkbox.js";
|
|
4
|
+
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "../ui/table.js";
|
|
2
5
|
import ConfirmDialog_default from "./ConfirmDialog.js";
|
|
3
6
|
import DataTableBatchAction_default from "./DataTableBatchAction.js";
|
|
4
7
|
import DataTableFilters_default from "./DataTableFilters.js";
|
|
5
8
|
import DataTablePagination_default from "./DataTablePagination.js";
|
|
6
9
|
import DataTableToolbar_default from "./DataTableToolbar.js";
|
|
7
|
-
import { Card, CardContent } from "../ui/card.js";
|
|
8
|
-
import { Checkbox } from "../ui/checkbox.js";
|
|
9
|
-
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "../ui/table.js";
|
|
10
10
|
import { c } from "react/compiler-runtime";
|
|
11
11
|
import { useState } from "react";
|
|
12
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { cn } from "../../../lib/utils.js";
|
|
2
2
|
import { Label } from "../../ui/label.js";
|
|
3
|
+
import { RadioGroup, RadioGroupItem } from "../../ui/radio-group.js";
|
|
3
4
|
import { useFieldConfig } from "../hooks/useFieldConfig.js";
|
|
4
5
|
import { BaseFieldWrapper } from "./BaseFieldWrapper.js";
|
|
5
|
-
import { RadioGroup, RadioGroupItem } from "../../ui/radio-group.js";
|
|
6
6
|
import { c } from "react/compiler-runtime";
|
|
7
7
|
import React from "react";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -15,8 +15,8 @@ const RadioField = (p) => {
|
|
|
15
15
|
let E = T, D = x.defaultValue || "", O = v ? "This field is required" : void 0, k;
|
|
16
16
|
m[6] === O ? k = m[7] : (k = { required: O }, m[6] = O, m[7] = k);
|
|
17
17
|
let A;
|
|
18
|
-
m[8] !== x || m[9] !== w || m[10] !== E || m[11] !== h || m[12] !== v || m[13] !== g.inline ? (A = (
|
|
19
|
-
let { field: f } =
|
|
18
|
+
m[8] !== x || m[9] !== w || m[10] !== E || m[11] !== h || m[12] !== v || m[13] !== g.inline ? (A = (d) => {
|
|
19
|
+
let { field: f } = d;
|
|
20
20
|
return /* @__PURE__ */ jsx(BaseFieldWrapper, {
|
|
21
21
|
name: h,
|
|
22
22
|
label: x.fieldLabel,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
import { Slider } from "../../ui/slider.js";
|
|
1
2
|
import { useFieldConfig } from "../hooks/useFieldConfig.js";
|
|
2
3
|
import { BaseFieldWrapper } from "./BaseFieldWrapper.js";
|
|
3
|
-
import { Slider } from "../../ui/slider.js";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
|
5
5
|
import React, { useRef, useState } from "react";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { Controller } from "react-hook-form";
|
|
8
|
-
var buildSliderValidationRules = (
|
|
9
|
-
let a =
|
|
8
|
+
var buildSliderValidationRules = (t, i) => {
|
|
9
|
+
let a = t.minimum ?? 0, o = t.maximum ?? 100;
|
|
10
10
|
return {
|
|
11
11
|
required: i ? "This field is required" : void 0,
|
|
12
12
|
min: {
|
|
@@ -18,8 +18,8 @@ var buildSliderValidationRules = (e, i) => {
|
|
|
18
18
|
message: `Value must be at most ${o}`
|
|
19
19
|
},
|
|
20
20
|
validate: {
|
|
21
|
-
multipleOf: (i) =>
|
|
22
|
-
isNumber: (
|
|
21
|
+
multipleOf: (i) => t.multipleOf && i % t.multipleOf !== 0 ? `Value must be a multiple of ${t.multipleOf}` : !0,
|
|
22
|
+
isNumber: (t) => typeof t != "number" || isNaN(t) ? "Value must be a valid number" : !0
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
25
|
};
|
|
@@ -27,14 +27,14 @@ const SliderField = (s) => {
|
|
|
27
27
|
let f = c(23), { name: p, schema: m, ui: h, required: g, form: _, disabled: v } = s, y = useFieldConfig(p, m, h, v), [b, x] = useState(!1), [S, C] = useState(!1), w = useRef(null), T = m.minimum ?? 0, E = m.maximum ?? 100, D = m.multipleOf ?? 1, O = m.default ?? T, k;
|
|
28
28
|
f[0] !== g || f[1] !== m ? (k = buildSliderValidationRules(m, g), f[0] = g, f[1] = m, f[2] = k) : k = f[2];
|
|
29
29
|
let A = k, j;
|
|
30
|
-
f[3] !== E || f[4] !== T ? (j = (
|
|
30
|
+
f[3] !== E || f[4] !== T ? (j = (t) => {
|
|
31
31
|
if (!w.current) return 0;
|
|
32
32
|
let i = w.current.offsetWidth;
|
|
33
|
-
return (
|
|
33
|
+
return (t - T) / (E - T) * i;
|
|
34
34
|
}, f[3] = E, f[4] = T, f[5] = j) : j = f[5];
|
|
35
35
|
let M = j, N;
|
|
36
|
-
f[6] !== M || f[7] !== y || f[8] !== O || f[9] !== b || f[10] !== S || f[11] !== E || f[12] !== T || f[13] !== p || f[14] !== g || f[15] !== D ? (N = (
|
|
37
|
-
let { field: o } =
|
|
36
|
+
f[6] !== M || f[7] !== y || f[8] !== O || f[9] !== b || f[10] !== S || f[11] !== E || f[12] !== T || f[13] !== p || f[14] !== g || f[15] !== D ? (N = (i) => {
|
|
37
|
+
let { field: o } = i, { onChange: s, value: l } = o, u = typeof l == "number" && !isNaN(l) ? l : O, d = M(u);
|
|
38
38
|
return /* @__PURE__ */ jsx(BaseFieldWrapper, {
|
|
39
39
|
name: p,
|
|
40
40
|
label: y.fieldLabel,
|
|
@@ -48,17 +48,17 @@ const SliderField = (s) => {
|
|
|
48
48
|
children: [
|
|
49
49
|
/* @__PURE__ */ jsx("div", {
|
|
50
50
|
className: "slider-with-hover",
|
|
51
|
-
onMouseMove: (
|
|
51
|
+
onMouseMove: (t) => {
|
|
52
52
|
if (!w.current) return;
|
|
53
|
-
let i = w.current.getBoundingClientRect(), a =
|
|
53
|
+
let i = w.current.getBoundingClientRect(), a = t.clientX - i.left - 8;
|
|
54
54
|
C(Math.abs(a - d) < 12);
|
|
55
55
|
},
|
|
56
56
|
onMouseLeave: () => C(!1),
|
|
57
57
|
children: /* @__PURE__ */ jsx(Slider, {
|
|
58
58
|
id: p,
|
|
59
59
|
value: [u],
|
|
60
|
-
onValueChange: (
|
|
61
|
-
y.isReadOnly || s(
|
|
60
|
+
onValueChange: (t) => {
|
|
61
|
+
y.isReadOnly || s(t[0]);
|
|
62
62
|
},
|
|
63
63
|
"aria-label": y.fieldLabel,
|
|
64
64
|
step: D,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Label } from "../../ui/label.js";
|
|
2
|
+
import { Switch } from "../../ui/switch.js";
|
|
2
3
|
import { useFieldConfig } from "../hooks/useFieldConfig.js";
|
|
3
4
|
import { BaseFieldWrapper } from "./BaseFieldWrapper.js";
|
|
4
|
-
import { Switch } from "../../ui/switch.js";
|
|
5
5
|
import { c } from "react/compiler-runtime";
|
|
6
6
|
import React from "react";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Label } from "../../ui/label.js";
|
|
2
|
+
import { Textarea } from "../../ui/textarea.js";
|
|
2
3
|
import { buildTextValidationRules } from "./utils/text-validation-utils.js";
|
|
3
4
|
import { useFieldConfig } from "../hooks/useFieldConfig.js";
|
|
4
5
|
import { BaseFieldWrapper } from "./BaseFieldWrapper.js";
|
|
5
|
-
import { Textarea } from "../../ui/textarea.js";
|
|
6
6
|
import { c } from "react/compiler-runtime";
|
|
7
7
|
import React from "react";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -32,7 +32,7 @@ const TextareaField = (d) => {
|
|
|
32
32
|
}
|
|
33
33
|
let T = b.defaultValue || "", E;
|
|
34
34
|
f[12] !== b || f[13] !== p || f[14] !== x || f[15] !== g || f[16] !== S || f[17] !== m.maxLength ? (E = (r) => {
|
|
35
|
-
let { field:
|
|
35
|
+
let { field: s } = r;
|
|
36
36
|
return /* @__PURE__ */ jsx(BaseFieldWrapper, {
|
|
37
37
|
name: p,
|
|
38
38
|
label: b.fieldLabel,
|
|
@@ -41,9 +41,9 @@ const TextareaField = (d) => {
|
|
|
41
41
|
helpText: b.helpText,
|
|
42
42
|
description: b.description,
|
|
43
43
|
children: /* @__PURE__ */ jsx(Textarea, {
|
|
44
|
-
...
|
|
44
|
+
...s,
|
|
45
45
|
id: p,
|
|
46
|
-
onChange: b.isReadOnly ? void 0 :
|
|
46
|
+
onChange: b.isReadOnly ? void 0 : s.onChange,
|
|
47
47
|
rows: S,
|
|
48
48
|
placeholder: x,
|
|
49
49
|
disabled: b.isDisabled,
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "./ui/accordion.js";
|
|
2
|
+
import { Button, buttonVariants } from "./ui/button.js";
|
|
3
|
+
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger } from "./ui/alert-dialog.js";
|
|
4
|
+
import { Alert, AlertDescription, AlertTitle } from "./ui/alert.js";
|
|
5
|
+
import { Avatar, AvatarFallback, AvatarImage } from "./ui/avatar.js";
|
|
6
|
+
import { Badge, badgeVariants } from "./ui/badge.js";
|
|
7
|
+
import { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from "./ui/breadcrumb.js";
|
|
8
|
+
import { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "./ui/card.js";
|
|
9
|
+
import { Checkbox } from "./ui/checkbox.js";
|
|
10
|
+
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "./ui/collapsible.js";
|
|
11
|
+
import { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger } from "./ui/dialog.js";
|
|
12
|
+
import { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger } from "./ui/drawer.js";
|
|
13
|
+
import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "./ui/dropdown-menu.js";
|
|
14
|
+
import { Input } from "./ui/input.js";
|
|
15
|
+
import { Label } from "./ui/label.js";
|
|
16
|
+
import { Popover, PopoverAnchor, PopoverContent, PopoverTrigger } from "./ui/popover.js";
|
|
17
|
+
import { RadioGroup, RadioGroupItem } from "./ui/radio-group.js";
|
|
18
|
+
import { ScrollArea, ScrollBar } from "./ui/scroll-area.js";
|
|
19
|
+
import { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue } from "./ui/select.js";
|
|
20
|
+
import { Separator } from "./ui/separator.js";
|
|
21
|
+
import { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger } from "./ui/sheet.js";
|
|
22
|
+
import { Skeleton } from "./ui/skeleton.js";
|
|
23
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./ui/tooltip.js";
|
|
24
|
+
import { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarInsetDiv, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuDiv, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar } from "./ui/sidebar.js";
|
|
25
|
+
import { Slider } from "./ui/slider.js";
|
|
26
|
+
import { Switch } from "./ui/switch.js";
|
|
27
|
+
import { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow } from "./ui/table.js";
|
|
28
|
+
import { Textarea } from "./ui/textarea.js";
|
|
29
|
+
import { DiscordLogo } from "./ui/DiscordLogo.js";
|
|
30
|
+
import { GoogleLogo } from "./ui/GoogleLogo.js";
|
|
31
|
+
import PageBreadcrumbs_default from "./page/PageBreadcrumbs.js";
|
|
32
|
+
import MainLayout_default from "./layout/MainLayout.js";
|
|
33
|
+
import ConfirmDialog_default from "./data-table/ConfirmDialog.js";
|
|
34
|
+
import DataTableBatchAction_default from "./data-table/DataTableBatchAction.js";
|
|
35
|
+
import DataTableFilters_default from "./data-table/DataTableFilters.js";
|
|
36
|
+
import DataTablePagination_default from "./data-table/DataTablePagination.js";
|
|
37
|
+
import DataTableToolbar_default from "./data-table/DataTableToolbar.js";
|
|
38
|
+
import { DataTable } from "./data-table/DataTable.js";
|
|
39
|
+
import { DataList } from "./data-table/DataList.js";
|
|
40
|
+
import ListView_default from "./lists/ListView.js";
|
|
41
|
+
import CustomListView_default from "./lists/CustomListView.js";
|
|
42
|
+
import CompletionMessagePaper_default from "./messages/CompletionMessagePaper.js";
|
|
43
|
+
import Snackbar_default from "./snackbars/Snackbar.js";
|
|
44
|
+
import ErrorSnackbar_default from "./snackbars/ErrorSnackbar.js";
|
|
45
|
+
import LoadingCentered_default from "./LoadingCentered.js";
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { cn } from "../../lib/utils.js";
|
|
2
|
+
import { Card } from "../ui/card.js";
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
var CompletionMessagePaper_default = (s) => {
|
|
7
|
+
let l = c(38), { role: u, children: d, timestamp: f, metadata: p, fullWidth: m, className: h } = s, g = m === void 0 ? !1 : m, _;
|
|
8
|
+
l[0] === Symbol.for("react.memo_cache_sentinel") ? (_ = {
|
|
9
|
+
system: {
|
|
10
|
+
color: "#efb108",
|
|
11
|
+
align: "left"
|
|
12
|
+
},
|
|
13
|
+
user: {
|
|
14
|
+
color: "#0496d0",
|
|
15
|
+
align: "right"
|
|
16
|
+
},
|
|
17
|
+
assistant: {
|
|
18
|
+
color: "#004a98",
|
|
19
|
+
align: "left"
|
|
20
|
+
},
|
|
21
|
+
document: {
|
|
22
|
+
color: "#0e2135",
|
|
23
|
+
align: "left"
|
|
24
|
+
},
|
|
25
|
+
tool: {
|
|
26
|
+
color: "#efb108",
|
|
27
|
+
align: "left"
|
|
28
|
+
},
|
|
29
|
+
error: {
|
|
30
|
+
color: "#dc0d33",
|
|
31
|
+
align: "left"
|
|
32
|
+
}
|
|
33
|
+
}, l[0] = _) : _ = l[0];
|
|
34
|
+
let v = _, y = (u ? v[u] : void 0) ?? v.assistant, b = u === "user", x = _temp, S = b ? "justify-end" : "justify-start", C;
|
|
35
|
+
l[1] !== h || l[2] !== S ? (C = cn("animate-in fade-in mb-1 flex flex-row items-start duration-300", S, h), l[1] = h, l[2] = S, l[3] = C) : C = l[3];
|
|
36
|
+
let w = g ? "w-full max-w-full" : "w-auto max-w-[75%]", T = b ? "items-end" : "items-start", E;
|
|
37
|
+
l[4] !== w || l[5] !== T ? (E = cn("flex min-w-50 flex-col", w, T), l[4] = w, l[5] = T, l[6] = E) : E = l[6];
|
|
38
|
+
let D;
|
|
39
|
+
l[7] !== y || l[8] !== u ? (D = u ? /* @__PURE__ */ jsx("span", {
|
|
40
|
+
className: "text-xs font-semibold tracking-wider uppercase",
|
|
41
|
+
style: { color: y.color },
|
|
42
|
+
children: u
|
|
43
|
+
}) : "", l[7] = y, l[8] = u, l[9] = D) : D = l[9];
|
|
44
|
+
let O;
|
|
45
|
+
l[10] === f ? O = l[11] : (O = f && /* @__PURE__ */ jsx("span", {
|
|
46
|
+
className: "text-muted-foreground font-mono text-xs",
|
|
47
|
+
children: x(f)
|
|
48
|
+
}), l[10] = f, l[11] = O);
|
|
49
|
+
let k;
|
|
50
|
+
l[12] !== D || l[13] !== O ? (k = /* @__PURE__ */ jsxs("div", {
|
|
51
|
+
className: "mb-2 flex items-center gap-2 opacity-70",
|
|
52
|
+
children: [D, O]
|
|
53
|
+
}), l[12] = D, l[13] = O, l[14] = k) : k = l[14];
|
|
54
|
+
let A;
|
|
55
|
+
l[15] !== b || l[16] !== p ? (A = p && Object.keys(p).length > 0 && /* @__PURE__ */ jsx("div", {
|
|
56
|
+
className: cn("bg-muted mFax-w-full mb-2 rounded-md p-2", b ? "self-end" : "self-start"),
|
|
57
|
+
children: Object.entries(p).map(_temp2)
|
|
58
|
+
}), l[15] = b, l[16] = p, l[17] = A) : A = l[17];
|
|
59
|
+
let j = g ? "w-full" : "w-auto", M;
|
|
60
|
+
l[18] === j ? M = l[19] : (M = cn("relative max-w-full px-6 py-4 wrap-break-word shadow-none", j), l[18] = j, l[19] = M);
|
|
61
|
+
let N = b ? "user" : "text-foreground", P;
|
|
62
|
+
l[20] === N ? P = l[21] : (P = cn("leading-relaxed wrap-break-word whitespace-pre-wrap", N), l[20] = N, l[21] = P);
|
|
63
|
+
let F;
|
|
64
|
+
l[22] === d ? F = l[23] : (F = /* @__PURE__ */ jsx("div", {
|
|
65
|
+
className: "message-content",
|
|
66
|
+
children: d
|
|
67
|
+
}), l[22] = d, l[23] = F);
|
|
68
|
+
let I;
|
|
69
|
+
l[24] !== P || l[25] !== F ? (I = /* @__PURE__ */ jsx("div", {
|
|
70
|
+
className: P,
|
|
71
|
+
children: F
|
|
72
|
+
}), l[24] = P, l[25] = F, l[26] = I) : I = l[26];
|
|
73
|
+
let L;
|
|
74
|
+
l[27] !== M || l[28] !== I ? (L = /* @__PURE__ */ jsx(Card, {
|
|
75
|
+
className: M,
|
|
76
|
+
children: I
|
|
77
|
+
}), l[27] = M, l[28] = I, l[29] = L) : L = l[29];
|
|
78
|
+
let R;
|
|
79
|
+
l[30] !== k || l[31] !== A || l[32] !== L || l[33] !== E ? (R = /* @__PURE__ */ jsxs("div", {
|
|
80
|
+
className: E,
|
|
81
|
+
children: [
|
|
82
|
+
k,
|
|
83
|
+
A,
|
|
84
|
+
L
|
|
85
|
+
]
|
|
86
|
+
}), l[30] = k, l[31] = A, l[32] = L, l[33] = E, l[34] = R) : R = l[34];
|
|
87
|
+
let z;
|
|
88
|
+
return l[35] !== R || l[36] !== C ? (z = /* @__PURE__ */ jsx("div", {
|
|
89
|
+
className: C,
|
|
90
|
+
children: R
|
|
91
|
+
}), l[35] = R, l[36] = C, l[37] = z) : z = l[37], z;
|
|
92
|
+
};
|
|
93
|
+
function _temp(r) {
|
|
94
|
+
return r.toLocaleTimeString([], {
|
|
95
|
+
hour: "2-digit",
|
|
96
|
+
minute: "2-digit"
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
function _temp2(r) {
|
|
100
|
+
let [a, o] = r;
|
|
101
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
102
|
+
className: "text-muted-foreground font-mono text-xs",
|
|
103
|
+
children: [
|
|
104
|
+
/* @__PURE__ */ jsxs("strong", { children: [a, ":"] }),
|
|
105
|
+
" ",
|
|
106
|
+
String(o)
|
|
107
|
+
]
|
|
108
|
+
}, a);
|
|
109
|
+
}
|
|
110
|
+
export { CompletionMessagePaper_default as default };
|