@versini/sassysaint 0.0.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/LICENSE +21 -0
- package/README.md +3 -0
- package/dist/chunks/App.BvO5AYgu.js +867 -0
- package/dist/chunks/LazyHeader.DicV3qjN.js +1372 -0
- package/dist/chunks/LazyMarkdownWithExtra.CQOOOxpt.js +25603 -0
- package/dist/chunks/LazyMessageAssistant.BarQNBL-.js +8697 -0
- package/dist/chunks/index.C5AWMLF4.js +2749 -0
- package/dist/chunks/index.DruzEDnN.BqlYMlVQ.js +253 -0
- package/dist/chunks/useLocalStorage.DX6TGv84.js +680 -0
- package/dist/components/SassySaint/SassySaint.js +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +16 -0
- package/dist/style.css +1 -0
- package/dist/style.js +0 -0
- package/package.json +44 -0
|
@@ -0,0 +1,680 @@
|
|
|
1
|
+
import { jsxs as _, Fragment as M, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import m from "clsx";
|
|
3
|
+
import w, { useContext as k, useSyncExternalStore as W, useCallback as S, useEffect as U } from "react";
|
|
4
|
+
import { A as F, i as P, f as q, S as j, MODEL_GPT4 as J } from "./index.C5AWMLF4.js";
|
|
5
|
+
const Q = (e) => {
|
|
6
|
+
let a = "";
|
|
7
|
+
if (typeof e == "number" || typeof e == "string")
|
|
8
|
+
a = "m-" + e;
|
|
9
|
+
else {
|
|
10
|
+
const t = [];
|
|
11
|
+
(e == null ? void 0 : e.t) !== void 0 && t.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && t.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && t.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && t.push(`ml-${e.l}`), a = t.join(" ");
|
|
12
|
+
}
|
|
13
|
+
return a;
|
|
14
|
+
}, v = ({
|
|
15
|
+
children: e,
|
|
16
|
+
fill: a,
|
|
17
|
+
viewBox: t,
|
|
18
|
+
className: s,
|
|
19
|
+
defaultViewBox: r,
|
|
20
|
+
defaultClassName: o,
|
|
21
|
+
spacing: d,
|
|
22
|
+
title: c,
|
|
23
|
+
semantic: i = !1,
|
|
24
|
+
...n
|
|
25
|
+
}) => {
|
|
26
|
+
const h = Q(d), b = m(
|
|
27
|
+
h,
|
|
28
|
+
s || o
|
|
29
|
+
);
|
|
30
|
+
return /* @__PURE__ */ _(M, { children: [
|
|
31
|
+
/* @__PURE__ */ l(
|
|
32
|
+
"svg",
|
|
33
|
+
{
|
|
34
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
35
|
+
className: b,
|
|
36
|
+
viewBox: t || r,
|
|
37
|
+
fill: a || "currentColor",
|
|
38
|
+
role: "img",
|
|
39
|
+
"aria-hidden": !i,
|
|
40
|
+
focusable: !1,
|
|
41
|
+
...n,
|
|
42
|
+
children: e
|
|
43
|
+
}
|
|
44
|
+
),
|
|
45
|
+
c && i && /* @__PURE__ */ l("span", { className: "sr-only", children: c })
|
|
46
|
+
] });
|
|
47
|
+
};
|
|
48
|
+
/*!
|
|
49
|
+
@versini/ui-private v1.4.6
|
|
50
|
+
© 2024 gizmette.com
|
|
51
|
+
*/
|
|
52
|
+
try {
|
|
53
|
+
window.__VERSINI_UI_PRIVATE__ || (window.__VERSINI_UI_PRIVATE__ = {
|
|
54
|
+
version: "1.4.6",
|
|
55
|
+
buildTime: "07/06/2024 10:24 AM EDT",
|
|
56
|
+
homepage: "https://github.com/aversini/ui-components",
|
|
57
|
+
license: "MIT"
|
|
58
|
+
});
|
|
59
|
+
} catch {
|
|
60
|
+
}
|
|
61
|
+
/*!
|
|
62
|
+
@versini/ui-icons v1.10.0
|
|
63
|
+
© 2024 gizmette.com
|
|
64
|
+
*/
|
|
65
|
+
try {
|
|
66
|
+
window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
|
|
67
|
+
version: "1.10.0",
|
|
68
|
+
buildTime: "07/06/2024 10:24 AM EDT",
|
|
69
|
+
homepage: "https://github.com/aversini/ui-components",
|
|
70
|
+
license: "MIT"
|
|
71
|
+
});
|
|
72
|
+
} catch {
|
|
73
|
+
}
|
|
74
|
+
const Y = ({
|
|
75
|
+
className: e,
|
|
76
|
+
viewBox: a,
|
|
77
|
+
spacing: t,
|
|
78
|
+
title: s,
|
|
79
|
+
monotone: r,
|
|
80
|
+
...o
|
|
81
|
+
}) => /* @__PURE__ */ _(
|
|
82
|
+
v,
|
|
83
|
+
{
|
|
84
|
+
defaultViewBox: "0 0 576 512",
|
|
85
|
+
defaultClassName: "size-5",
|
|
86
|
+
viewBox: a,
|
|
87
|
+
className: e,
|
|
88
|
+
spacing: t,
|
|
89
|
+
title: s || "Sort",
|
|
90
|
+
...o,
|
|
91
|
+
children: [
|
|
92
|
+
/* @__PURE__ */ l(
|
|
93
|
+
"path",
|
|
94
|
+
{
|
|
95
|
+
opacity: r ? "1" : "0.4",
|
|
96
|
+
d: "M393.4 41.4c12.5-12.5 32.8-12.5 45.3 0l96 96c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L448 141.3V448c0 17.7-14.3 32-32 32s-32-14.3-32-32V141.3l-41.4 41.4c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l96-96z"
|
|
97
|
+
}
|
|
98
|
+
),
|
|
99
|
+
/* @__PURE__ */ l("path", { d: "M137.4 470.6c12.5 12.5 32.8 12.5 45.3 0l96-96c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 370.7V64c0-17.7-14.3-32-32-32s-32 14.3-32 32V370.7L86.6 329.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l96 96z" })
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
), K = ({
|
|
103
|
+
className: e,
|
|
104
|
+
viewBox: a,
|
|
105
|
+
spacing: t,
|
|
106
|
+
title: s,
|
|
107
|
+
monotone: r,
|
|
108
|
+
...o
|
|
109
|
+
}) => /* @__PURE__ */ _(
|
|
110
|
+
v,
|
|
111
|
+
{
|
|
112
|
+
defaultViewBox: "0 0 576 512",
|
|
113
|
+
defaultClassName: "size-5",
|
|
114
|
+
viewBox: a,
|
|
115
|
+
className: e,
|
|
116
|
+
spacing: t,
|
|
117
|
+
title: s || "Sort Down",
|
|
118
|
+
...o,
|
|
119
|
+
children: [
|
|
120
|
+
/* @__PURE__ */ l(
|
|
121
|
+
"path",
|
|
122
|
+
{
|
|
123
|
+
opacity: r ? "1" : "0.4",
|
|
124
|
+
d: "M288 448c0 17.7 14.3 32 32 32h32c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32zm0-128c0 17.7 14.3 32 32 32h96c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32zm0-128c0 17.7 14.3 32 32 32H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32zm0-128c0 17.7 14.3 32 32 32H544c17.7 0 32-14.3 32-32s-14.3-32-32-32H320c-17.7 0-32 14.3-32 32z"
|
|
125
|
+
}
|
|
126
|
+
),
|
|
127
|
+
/* @__PURE__ */ l("path", { d: "M128 480c9 0 17.5-3.8 23.6-10.4l88-96c11.9-13 11.1-33.3-2-45.2s-33.3-11.1-45.2 2L160 365.7V64c0-17.7-14.3-32-32-32s-32 14.3-32 32V365.7L63.6 330.4c-11.9-13-32.2-13.9-45.2-2s-13.9 32.2-2 45.2l88 96C110.5 476.2 119 480 128 480z" })
|
|
128
|
+
]
|
|
129
|
+
}
|
|
130
|
+
), X = ({
|
|
131
|
+
className: e,
|
|
132
|
+
viewBox: a,
|
|
133
|
+
spacing: t,
|
|
134
|
+
title: s,
|
|
135
|
+
monotone: r,
|
|
136
|
+
...o
|
|
137
|
+
}) => /* @__PURE__ */ _(
|
|
138
|
+
v,
|
|
139
|
+
{
|
|
140
|
+
defaultViewBox: "0 0 576 512",
|
|
141
|
+
defaultClassName: "size-5",
|
|
142
|
+
viewBox: a,
|
|
143
|
+
className: e,
|
|
144
|
+
spacing: t,
|
|
145
|
+
title: s || "Sort Up",
|
|
146
|
+
...o,
|
|
147
|
+
children: [
|
|
148
|
+
/* @__PURE__ */ l(
|
|
149
|
+
"path",
|
|
150
|
+
{
|
|
151
|
+
opacity: r ? "1" : "0.4",
|
|
152
|
+
d: "M288 64c0-17.7 14.3-32 32-32h32c17.7 0 32 14.3 32 32s-14.3 32-32 32H320c-17.7 0-32-14.3-32-32zm0 128c0-17.7 14.3-32 32-32h96c17.7 0 32 14.3 32 32s-14.3 32-32 32H320c-17.7 0-32-14.3-32-32zm0 128c0-17.7 14.3-32 32-32H480c17.7 0 32 14.3 32 32s-14.3 32-32 32H320c-17.7 0-32-14.3-32-32zm0 128c0-17.7 14.3-32 32-32H544c17.7 0 32 14.3 32 32s-14.3 32-32 32H320c-17.7 0-32-14.3-32-32z"
|
|
153
|
+
}
|
|
154
|
+
),
|
|
155
|
+
/* @__PURE__ */ l("path", { d: "M128 32c9 0 17.5 3.8 23.6 10.4l88 96c11.9 13 11.1 33.3-2 45.2s-33.3 11.1-45.2-2L160 146.3V448c0 17.7-14.3 32-32 32s-32-14.3-32-32V146.3L63.6 181.6c-11.9 13-32.2 13.9-45.2 2s-13.9-32.2-2-45.2l88-96C110.5 35.8 119 32 128 32z" })
|
|
156
|
+
]
|
|
157
|
+
}
|
|
158
|
+
), I = w.forwardRef(
|
|
159
|
+
({
|
|
160
|
+
children: e,
|
|
161
|
+
disabled: a = !1,
|
|
162
|
+
mode: t = "system",
|
|
163
|
+
focusMode: s = "system",
|
|
164
|
+
fullWidth: r = !1,
|
|
165
|
+
className: o,
|
|
166
|
+
type: d = "button",
|
|
167
|
+
raw: c = !1,
|
|
168
|
+
noBorder: i = !1,
|
|
169
|
+
"aria-label": n,
|
|
170
|
+
label: h,
|
|
171
|
+
size: b = "medium",
|
|
172
|
+
labelRight: p,
|
|
173
|
+
labelLeft: x,
|
|
174
|
+
spacing: B,
|
|
175
|
+
noBackground: z = !1,
|
|
176
|
+
align: L = "center",
|
|
177
|
+
active: V = !1,
|
|
178
|
+
...O
|
|
179
|
+
}, G) => {
|
|
180
|
+
const $ = F({
|
|
181
|
+
type: q,
|
|
182
|
+
mode: t,
|
|
183
|
+
focusMode: s,
|
|
184
|
+
fullWidth: r,
|
|
185
|
+
disabled: a,
|
|
186
|
+
raw: c,
|
|
187
|
+
className: o,
|
|
188
|
+
noBorder: i,
|
|
189
|
+
size: b,
|
|
190
|
+
labelRight: p,
|
|
191
|
+
labelLeft: x,
|
|
192
|
+
spacing: B,
|
|
193
|
+
noBackground: z,
|
|
194
|
+
align: L
|
|
195
|
+
}), R = m({
|
|
196
|
+
"text-copy-accent-dark": t === "light" && !c,
|
|
197
|
+
"text-copy-light": t === "dark" && !c,
|
|
198
|
+
"text-copy-accent-dark dark:text-copy-light": t === "alt-system" && !c,
|
|
199
|
+
"text-copy-light dark:text-copy-accent-dark": t === "system" && !c
|
|
200
|
+
}), D = V ? m(
|
|
201
|
+
"relative",
|
|
202
|
+
"focus-within:static",
|
|
203
|
+
"focus-within:after:border-transparent",
|
|
204
|
+
"after:absolute",
|
|
205
|
+
"after:content-['']",
|
|
206
|
+
"after:border-b-2",
|
|
207
|
+
"after:bottom-[-4px]",
|
|
208
|
+
"after:left-0",
|
|
209
|
+
"after:right-0",
|
|
210
|
+
{
|
|
211
|
+
"after:border-table-dark": t === "dark",
|
|
212
|
+
"after:border-table-light": t === "light",
|
|
213
|
+
"after:border-table-dark dark:after:border-table-light": t === "system",
|
|
214
|
+
"after:border-table-light dark:after:border-table-dark": t === "alt-system"
|
|
215
|
+
}
|
|
216
|
+
) : "";
|
|
217
|
+
return /* @__PURE__ */ l("div", { className: D, children: /* @__PURE__ */ _(
|
|
218
|
+
P,
|
|
219
|
+
{
|
|
220
|
+
ref: G,
|
|
221
|
+
className: $,
|
|
222
|
+
disabled: a,
|
|
223
|
+
type: d,
|
|
224
|
+
"aria-label": n || h,
|
|
225
|
+
...O,
|
|
226
|
+
children: [
|
|
227
|
+
x && /* @__PURE__ */ l("span", { className: "pr-2", children: x }),
|
|
228
|
+
/* @__PURE__ */ l("div", { className: R, children: e }),
|
|
229
|
+
p && /* @__PURE__ */ l("span", { className: "pl-2", children: p })
|
|
230
|
+
]
|
|
231
|
+
}
|
|
232
|
+
) });
|
|
233
|
+
}
|
|
234
|
+
);
|
|
235
|
+
I.displayName = "ButtonSort";
|
|
236
|
+
const y = w.createContext({
|
|
237
|
+
mode: "light",
|
|
238
|
+
cellWrapper: "thead",
|
|
239
|
+
stickyHeader: !1,
|
|
240
|
+
stickyFooter: !1,
|
|
241
|
+
compact: !1
|
|
242
|
+
}), N = "thead", C = "tfoot", u = "tbody", f = {
|
|
243
|
+
ASC: "asc",
|
|
244
|
+
DESC: "desc"
|
|
245
|
+
}, Z = ({
|
|
246
|
+
mode: e,
|
|
247
|
+
className: a,
|
|
248
|
+
wrapperClassName: t,
|
|
249
|
+
stickyHeader: s,
|
|
250
|
+
stickyFooter: r,
|
|
251
|
+
spacing: o
|
|
252
|
+
}) => ({
|
|
253
|
+
wrapper: m(
|
|
254
|
+
"not-prose relative w-full rounded-lg shadow-md",
|
|
255
|
+
j(o),
|
|
256
|
+
{
|
|
257
|
+
"overflow-x-auto": !s && !r,
|
|
258
|
+
"overflow-y-scroll": s || r,
|
|
259
|
+
"bg-surface-darker text-copy-light": e === "dark",
|
|
260
|
+
"bg-surface-light text-copy-dark": e === "light",
|
|
261
|
+
"bg-surface-darker text-copy-light dark:bg-surface-light dark:text-copy-dark": e === "system",
|
|
262
|
+
"bg-surface-light text-copy-dark dark:bg-surface-darker dark:text-copy-light": e === "alt-system"
|
|
263
|
+
},
|
|
264
|
+
t
|
|
265
|
+
),
|
|
266
|
+
table: m("my-0 w-full text-left text-sm", a, {
|
|
267
|
+
"text-copy-light": e === "dark",
|
|
268
|
+
"text-copy-dark": e === "light",
|
|
269
|
+
"text-copy-light dark:text-copy-dark": e === "system",
|
|
270
|
+
"text-copy-dark dark:text-copy-light": e === "alt-system"
|
|
271
|
+
}),
|
|
272
|
+
caption: m("py-2 text-sm font-bold", {
|
|
273
|
+
"text-copy-light": e === "dark",
|
|
274
|
+
"text-copy-dark": e === "light",
|
|
275
|
+
"text-copy-light dark:text-copy-dark": e === "system",
|
|
276
|
+
"text-copy-dark dark:text-copy-light": e === "alt-system"
|
|
277
|
+
})
|
|
278
|
+
}), ee = ({
|
|
279
|
+
className: e,
|
|
280
|
+
stickyHeader: a,
|
|
281
|
+
mode: t
|
|
282
|
+
}) => m(e, {
|
|
283
|
+
"sticky top-0 z-10": a,
|
|
284
|
+
"shadow-[rgb(190_190_190_/20%)_0_0.5rem_1rem]": a && t === "dark",
|
|
285
|
+
"shadow-[rgb(190_190_190_/20%)_0_0.5rem_1rem] dark:shadow-[rgb(65_65_65_/30%)_0_0.5rem_1rem]": a && t === "system",
|
|
286
|
+
"shadow-[rgb(65_65_65_/30%)_0_0.5rem_1rem]": a && t === "light",
|
|
287
|
+
"shadow-[rgb(65_65_65_/30%)_0_0.5rem_1rem] dark:shadow-[rgb(190_190_190_/20%)_0_0.5rem_1rem]": a && t === "alt-system"
|
|
288
|
+
}), te = ({
|
|
289
|
+
className: e,
|
|
290
|
+
stickyFooter: a,
|
|
291
|
+
mode: t
|
|
292
|
+
}) => m(e, {
|
|
293
|
+
"sticky bottom-0 z-10": a,
|
|
294
|
+
"shadow-[rgb(190_190_190_/20%)_0_-0.5rem_1rem]": a && t === "dark",
|
|
295
|
+
"shadow-[rgb(190_190_190_/20%)_0_-0.5rem_1rem] dark:shadow-[rgb(65_65_65_/30%)_0_-0.5rem_1rem]": a && t === "system",
|
|
296
|
+
"shadow-[rgb(65_65_65_/30%)_0_-0.5rem_1rem]": a && t === "light",
|
|
297
|
+
"shadow-[rgb(65_65_65_/30%)_-0_0.5rem_1rem] dark:shadow-[rgb(190_190_190_/20%)_0_-0.5rem_1rem]": a && t === "alt-system"
|
|
298
|
+
}), ae = ({
|
|
299
|
+
mode: e,
|
|
300
|
+
className: a,
|
|
301
|
+
cellWrapper: t
|
|
302
|
+
}) => t === N || t === C ? m({
|
|
303
|
+
"bg-table-head-dark": e === "dark",
|
|
304
|
+
"bg-table-head-light": e === "light",
|
|
305
|
+
"bg-table-head-dark dark:bg-table-head-light": e === "system",
|
|
306
|
+
"bg-table-head-light dark:bg-table-head-dark": e === "alt-system"
|
|
307
|
+
}) : m("border-b last:border-0", a, {
|
|
308
|
+
"border-table-dark": e === "dark",
|
|
309
|
+
"odd:bg-table-dark-odd even:bg-table-dark-even": t === u && e === "dark",
|
|
310
|
+
"border-table-light": e === "light",
|
|
311
|
+
"odd:bg-table-light-odd even:bg-table-light-even": t === u && e === "light",
|
|
312
|
+
"border-table-dark dark:border-table-light": e === "system",
|
|
313
|
+
"odd:bg-table-dark-odd even:bg-table-dark-even dark:odd:bg-table-light-odd dark:even:bg-table-light-even": t === u && e === "system",
|
|
314
|
+
"border-table-light dark:border-table-dark": e === "alt-system",
|
|
315
|
+
"odd:bg-table-light-odd even:bg-table-light-even dark:odd:bg-table-dark-odd dark:even:bg-table-dark-even": t === u && e === "alt-system"
|
|
316
|
+
}), se = ({
|
|
317
|
+
cellWrapper: e,
|
|
318
|
+
className: a,
|
|
319
|
+
compact: t,
|
|
320
|
+
mode: s
|
|
321
|
+
}) => m(a, {
|
|
322
|
+
"text-copy-light": s === "dark",
|
|
323
|
+
"text-copy-dark": s === "light",
|
|
324
|
+
"text-copy-light dark:text-copy-dark": s === "system",
|
|
325
|
+
"text-copy-dark dark:text-copy-light": s === "alt-system",
|
|
326
|
+
"px-4 py-3": !t && (e === N || e === C),
|
|
327
|
+
"p-4": !t && e === u,
|
|
328
|
+
"px-4 py-1": t
|
|
329
|
+
}), he = ({
|
|
330
|
+
children: e,
|
|
331
|
+
mode: a = "system",
|
|
332
|
+
caption: t,
|
|
333
|
+
compact: s,
|
|
334
|
+
summary: r,
|
|
335
|
+
className: o,
|
|
336
|
+
wrapperClassName: d,
|
|
337
|
+
maxHeight: c,
|
|
338
|
+
stickyHeader: i,
|
|
339
|
+
stickyFooter: n,
|
|
340
|
+
spacing: h,
|
|
341
|
+
...b
|
|
342
|
+
}) => {
|
|
343
|
+
const p = Z({
|
|
344
|
+
mode: a,
|
|
345
|
+
className: o,
|
|
346
|
+
wrapperClassName: d,
|
|
347
|
+
stickyHeader: i,
|
|
348
|
+
stickyFooter: n,
|
|
349
|
+
spacing: h
|
|
350
|
+
});
|
|
351
|
+
return /* @__PURE__ */ l(
|
|
352
|
+
y.Provider,
|
|
353
|
+
{
|
|
354
|
+
value: { mode: a, stickyHeader: i, stickyFooter: n, compact: s },
|
|
355
|
+
children: /* @__PURE__ */ l(
|
|
356
|
+
"div",
|
|
357
|
+
{
|
|
358
|
+
className: p.wrapper,
|
|
359
|
+
...c && {
|
|
360
|
+
style: { maxHeight: c }
|
|
361
|
+
},
|
|
362
|
+
children: /* @__PURE__ */ _("table", { className: p.table, summary: r, ...b, children: [
|
|
363
|
+
t && /* @__PURE__ */ l("caption", { className: p.caption, children: t }),
|
|
364
|
+
e
|
|
365
|
+
] })
|
|
366
|
+
}
|
|
367
|
+
)
|
|
368
|
+
}
|
|
369
|
+
);
|
|
370
|
+
}, pe = ({
|
|
371
|
+
children: e,
|
|
372
|
+
className: a,
|
|
373
|
+
...t
|
|
374
|
+
}) => {
|
|
375
|
+
const s = k(y);
|
|
376
|
+
s.cellWrapper = N;
|
|
377
|
+
const r = ee({
|
|
378
|
+
className: a,
|
|
379
|
+
mode: s.mode,
|
|
380
|
+
stickyHeader: s.stickyHeader
|
|
381
|
+
});
|
|
382
|
+
return /* @__PURE__ */ l("thead", { className: r, ...t, children: e });
|
|
383
|
+
}, ge = ({
|
|
384
|
+
children: e,
|
|
385
|
+
className: a,
|
|
386
|
+
...t
|
|
387
|
+
}) => {
|
|
388
|
+
const s = k(y);
|
|
389
|
+
s.cellWrapper = C;
|
|
390
|
+
const r = te({
|
|
391
|
+
className: a,
|
|
392
|
+
mode: s.mode,
|
|
393
|
+
stickyFooter: s.stickyFooter
|
|
394
|
+
});
|
|
395
|
+
return /* @__PURE__ */ l("tfoot", { className: r, ...t, children: e });
|
|
396
|
+
}, ue = ({ children: e, ...a }) => {
|
|
397
|
+
const t = k(y);
|
|
398
|
+
return t.cellWrapper = u, /* @__PURE__ */ l("tbody", { ...a, children: e });
|
|
399
|
+
}, _e = ({
|
|
400
|
+
children: e,
|
|
401
|
+
className: a,
|
|
402
|
+
...t
|
|
403
|
+
}) => {
|
|
404
|
+
const s = k(y), r = ae({
|
|
405
|
+
mode: s.mode,
|
|
406
|
+
cellWrapper: s.cellWrapper,
|
|
407
|
+
className: a
|
|
408
|
+
});
|
|
409
|
+
return /* @__PURE__ */ l("tr", { className: r, ...t, children: e });
|
|
410
|
+
}, re = ({
|
|
411
|
+
children: e,
|
|
412
|
+
component: a,
|
|
413
|
+
className: t,
|
|
414
|
+
...s
|
|
415
|
+
}) => {
|
|
416
|
+
const r = k(y), o = a || (r.cellWrapper === N ? "th" : "td"), d = se({
|
|
417
|
+
cellWrapper: r.cellWrapper,
|
|
418
|
+
className: t,
|
|
419
|
+
mode: r.mode,
|
|
420
|
+
compact: r.compact
|
|
421
|
+
});
|
|
422
|
+
return /* @__PURE__ */ l(o, { className: d, ...s, children: e });
|
|
423
|
+
}, ye = ({
|
|
424
|
+
align: e,
|
|
425
|
+
children: a,
|
|
426
|
+
className: t,
|
|
427
|
+
component: s,
|
|
428
|
+
focusMode: r = "alt-system",
|
|
429
|
+
mode: o = "alt-system",
|
|
430
|
+
onClick: d,
|
|
431
|
+
sortDirection: c,
|
|
432
|
+
sortedCell: i,
|
|
433
|
+
cellId: n,
|
|
434
|
+
...h
|
|
435
|
+
}) => /* @__PURE__ */ l(
|
|
436
|
+
re,
|
|
437
|
+
{
|
|
438
|
+
component: s,
|
|
439
|
+
className: t,
|
|
440
|
+
role: "columnheader",
|
|
441
|
+
"aria-sort": c === f.ASC && i === n ? "ascending" : c === f.DESC && i === n ? "descending" : "other",
|
|
442
|
+
...h,
|
|
443
|
+
children: /* @__PURE__ */ l(
|
|
444
|
+
I,
|
|
445
|
+
{
|
|
446
|
+
active: i === n,
|
|
447
|
+
className: "rounded-none text-sm",
|
|
448
|
+
onClick: d,
|
|
449
|
+
align: e,
|
|
450
|
+
noBorder: !0,
|
|
451
|
+
focusMode: r,
|
|
452
|
+
mode: o,
|
|
453
|
+
fullWidth: !0,
|
|
454
|
+
labelRight: a,
|
|
455
|
+
children: c === f.ASC && i === n ? /* @__PURE__ */ l(X, { className: "size-4", monotone: !0 }) : c === f.DESC && i === n ? /* @__PURE__ */ l(K, { className: "size-4", monotone: !0 }) : /* @__PURE__ */ l(Y, { className: "size-4", monotone: !0 })
|
|
456
|
+
}
|
|
457
|
+
)
|
|
458
|
+
}
|
|
459
|
+
), g = {
|
|
460
|
+
GET_LOCATION: `query GetLocation($latitude: Float!, $longitude: Float!) {
|
|
461
|
+
location(latitude: $latitude, longitude: $longitude) {
|
|
462
|
+
city
|
|
463
|
+
region
|
|
464
|
+
regionShort
|
|
465
|
+
country
|
|
466
|
+
countryShort
|
|
467
|
+
}
|
|
468
|
+
}`,
|
|
469
|
+
GET_CHATS: `query GetChats($userId: String!) {
|
|
470
|
+
chats(user: $userId) {
|
|
471
|
+
timestamp
|
|
472
|
+
id
|
|
473
|
+
messages {
|
|
474
|
+
content
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
}`,
|
|
478
|
+
GET_CHATS_STATS: `query GetChatsStats($userId: String!) {
|
|
479
|
+
chatsStats(user: $userId) {
|
|
480
|
+
totalChats
|
|
481
|
+
averageProcessingTimes
|
|
482
|
+
}
|
|
483
|
+
}`,
|
|
484
|
+
GET_CHAT: `query GetChatById($id: String!) {
|
|
485
|
+
chatById(id: $id) {
|
|
486
|
+
model
|
|
487
|
+
usage
|
|
488
|
+
messages {
|
|
489
|
+
content
|
|
490
|
+
role
|
|
491
|
+
name
|
|
492
|
+
processingTime
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
}`,
|
|
496
|
+
DELETE_CHAT: `mutation DeleteChat($id: String!, $userId: String!) {
|
|
497
|
+
deleteChat(id: $id, user: $userId) {
|
|
498
|
+
timestamp
|
|
499
|
+
id
|
|
500
|
+
messages {
|
|
501
|
+
content
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
}`,
|
|
505
|
+
ABOUT: `query About {
|
|
506
|
+
about {
|
|
507
|
+
version
|
|
508
|
+
models
|
|
509
|
+
plugins
|
|
510
|
+
}
|
|
511
|
+
}`
|
|
512
|
+
}, be = {
|
|
513
|
+
GET_LOCATION: {
|
|
514
|
+
schema: g.GET_LOCATION,
|
|
515
|
+
method: "location",
|
|
516
|
+
data: (e) => ({
|
|
517
|
+
latitude: e.latitude,
|
|
518
|
+
longitude: e.longitude
|
|
519
|
+
})
|
|
520
|
+
},
|
|
521
|
+
GET_CHATS: {
|
|
522
|
+
schema: g.GET_CHATS,
|
|
523
|
+
method: "chats",
|
|
524
|
+
data: (e) => ({
|
|
525
|
+
userId: e.userId
|
|
526
|
+
})
|
|
527
|
+
},
|
|
528
|
+
GET_CHATS_STATS: {
|
|
529
|
+
schema: g.GET_CHATS_STATS,
|
|
530
|
+
method: "chatsStats",
|
|
531
|
+
data: (e) => ({
|
|
532
|
+
userId: e.userId
|
|
533
|
+
})
|
|
534
|
+
},
|
|
535
|
+
GET_CHAT: {
|
|
536
|
+
schema: g.GET_CHAT,
|
|
537
|
+
method: "chatById",
|
|
538
|
+
data: (e) => ({
|
|
539
|
+
id: e.id
|
|
540
|
+
})
|
|
541
|
+
},
|
|
542
|
+
DELETE_CHAT: {
|
|
543
|
+
schema: g.DELETE_CHAT,
|
|
544
|
+
method: "deleteChat",
|
|
545
|
+
data: (e) => ({
|
|
546
|
+
id: e.id,
|
|
547
|
+
userId: e.userId
|
|
548
|
+
})
|
|
549
|
+
},
|
|
550
|
+
ABOUT: {
|
|
551
|
+
schema: g.ABOUT,
|
|
552
|
+
method: "about",
|
|
553
|
+
data: () => ({})
|
|
554
|
+
}
|
|
555
|
+
}, H = process.env.PUBLIC_SASSY_API_SERVER_URL, oe = async ({
|
|
556
|
+
query: e,
|
|
557
|
+
data: a,
|
|
558
|
+
headers: t = {}
|
|
559
|
+
}) => await fetch(`${H}/graphql`, {
|
|
560
|
+
method: "POST",
|
|
561
|
+
headers: {
|
|
562
|
+
...t,
|
|
563
|
+
"Content-Type": "application/json",
|
|
564
|
+
Accept: "application/json"
|
|
565
|
+
},
|
|
566
|
+
body: JSON.stringify({
|
|
567
|
+
query: e,
|
|
568
|
+
variables: a
|
|
569
|
+
})
|
|
570
|
+
}), ke = async ({
|
|
571
|
+
accessToken: e,
|
|
572
|
+
type: a,
|
|
573
|
+
params: t = {}
|
|
574
|
+
}) => {
|
|
575
|
+
const s = a != null && a.data ? a.data(t) : t;
|
|
576
|
+
try {
|
|
577
|
+
const r = `Bearer ${e}`, o = await oe({
|
|
578
|
+
headers: {
|
|
579
|
+
authorization: r
|
|
580
|
+
},
|
|
581
|
+
query: a.schema,
|
|
582
|
+
data: s
|
|
583
|
+
});
|
|
584
|
+
if (o.status !== 200)
|
|
585
|
+
return { status: o.status, data: [] };
|
|
586
|
+
const { data: d, errors: c } = await o.json();
|
|
587
|
+
return {
|
|
588
|
+
status: o.status,
|
|
589
|
+
data: d[a.method],
|
|
590
|
+
errors: c
|
|
591
|
+
};
|
|
592
|
+
} catch (r) {
|
|
593
|
+
return console.error(r), { status: 500, data: [] };
|
|
594
|
+
}
|
|
595
|
+
}, fe = async ({
|
|
596
|
+
accessToken: e,
|
|
597
|
+
name: a,
|
|
598
|
+
data: t,
|
|
599
|
+
method: s = "POST"
|
|
600
|
+
}) => {
|
|
601
|
+
const r = `Bearer ${e}`;
|
|
602
|
+
return await fetch(`${H}/api/${a}`, {
|
|
603
|
+
method: s,
|
|
604
|
+
headers: {
|
|
605
|
+
"Content-Type": "application/json",
|
|
606
|
+
authorization: r
|
|
607
|
+
},
|
|
608
|
+
body: JSON.stringify(t)
|
|
609
|
+
});
|
|
610
|
+
}, we = w.createContext({
|
|
611
|
+
state: {
|
|
612
|
+
id: "",
|
|
613
|
+
model: J,
|
|
614
|
+
usage: 0,
|
|
615
|
+
messages: [],
|
|
616
|
+
isComponent: !1
|
|
617
|
+
},
|
|
618
|
+
dispatch: () => {
|
|
619
|
+
},
|
|
620
|
+
serverStats: { version: "", models: [], plugins: [] }
|
|
621
|
+
}), Ne = w.createContext({
|
|
622
|
+
state: { searchString: "", sortedCell: "", sortDirection: "" },
|
|
623
|
+
dispatch: () => {
|
|
624
|
+
}
|
|
625
|
+
});
|
|
626
|
+
function A(e, a) {
|
|
627
|
+
window.dispatchEvent(new StorageEvent("storage", { key: e, newValue: a }));
|
|
628
|
+
}
|
|
629
|
+
const T = (e, a) => {
|
|
630
|
+
const t = JSON.stringify(
|
|
631
|
+
typeof a == "function" ? a() : a
|
|
632
|
+
);
|
|
633
|
+
window.localStorage.setItem(e, t), A(e, t);
|
|
634
|
+
}, le = (e) => {
|
|
635
|
+
window.localStorage.removeItem(e), A(e, null);
|
|
636
|
+
}, E = (e) => window.localStorage.getItem(e), ce = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
|
|
637
|
+
function xe({
|
|
638
|
+
key: e,
|
|
639
|
+
initialValue: a
|
|
640
|
+
}) {
|
|
641
|
+
const t = W(ce, () => E(e)), s = S(
|
|
642
|
+
(d) => {
|
|
643
|
+
try {
|
|
644
|
+
const c = typeof d == "function" ? d(JSON.parse(t)) : d;
|
|
645
|
+
c == null ? le(e) : T(e, c);
|
|
646
|
+
} catch (c) {
|
|
647
|
+
console.warn(c);
|
|
648
|
+
}
|
|
649
|
+
},
|
|
650
|
+
[e, t]
|
|
651
|
+
), r = S(() => {
|
|
652
|
+
s(a);
|
|
653
|
+
}, [a, s]), o = S(() => {
|
|
654
|
+
s(null);
|
|
655
|
+
}, [s]);
|
|
656
|
+
return U(() => {
|
|
657
|
+
try {
|
|
658
|
+
E(e) === null && typeof a < "u" && T(e, a);
|
|
659
|
+
} catch (d) {
|
|
660
|
+
console.warn(d);
|
|
661
|
+
}
|
|
662
|
+
}, [e, a]), [t ? JSON.parse(t) : null, s, r, o];
|
|
663
|
+
}
|
|
664
|
+
export {
|
|
665
|
+
we as AppContext,
|
|
666
|
+
xe as E,
|
|
667
|
+
Ne as HistoryContext,
|
|
668
|
+
re as J,
|
|
669
|
+
be as SERVICE_TYPES,
|
|
670
|
+
pe as at,
|
|
671
|
+
ye as ct,
|
|
672
|
+
he as et,
|
|
673
|
+
v as g,
|
|
674
|
+
f as k,
|
|
675
|
+
_e as lt,
|
|
676
|
+
fe as restCall,
|
|
677
|
+
ge as rt,
|
|
678
|
+
ke as serviceCall,
|
|
679
|
+
ue as st
|
|
680
|
+
};
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { SassySaint as r } from "./chunks/index.C5AWMLF4.js";
|
|
2
|
+
/*!
|
|
3
|
+
@sassysaint/client v3.0.2
|
|
4
|
+
© 2024 gizmette.com
|
|
5
|
+
*/
|
|
6
|
+
try {
|
|
7
|
+
window.__VERSINI_SASSY_GLOBAL__ || (window.__VERSINI_SASSY_GLOBAL__ = {
|
|
8
|
+
version: "3.0.2",
|
|
9
|
+
buildTime: "07/06/2024 03:19 PM EDT",
|
|
10
|
+
license: "MIT"
|
|
11
|
+
});
|
|
12
|
+
} catch {
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
r as SassySaint
|
|
16
|
+
};
|