@versini/sassysaint 4.3.2 → 4.3.4
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/chunks/{App.CZfioAEh.js → App.siyG3dXp.js} +3 -3
- package/dist/chunks/{LazyHeader.Do8wpv96.js → LazyHeader.DhjF1UU_.js} +263 -248
- package/dist/chunks/{LazyMarkdownWithExtra.B3ZL10Il.js → LazyMarkdownWithExtra.DFoA9rL3.js} +1 -1
- package/dist/chunks/{LazyMessageAssistant.BEgtWJif.js → LazyMessageAssistant.DslyySBZ.js} +4 -4
- package/dist/chunks/{index.Bzt9pToY.Dod1oVcG.js → index.BA5202H5.EyL55e8c.js} +2 -2
- package/dist/chunks/{index.CRgG-bmB.js → index.DW-8fMRN.js} +10 -10
- package/dist/chunks/{useLocalStorage.RmxGoFAM.js → useLocalStorage.CHGtMHE-.js} +180 -174
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/package.json +3 -3
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsxs as x, Fragment as
|
|
1
|
+
import { jsxs as x, Fragment as ke, jsx as c } from "react/jsx-runtime";
|
|
2
2
|
import i from "clsx";
|
|
3
|
-
import H, { useContext as
|
|
4
|
-
import { A as xe, i as we, f as Ne, S as Te, f$1 as ve, V as Se, j as Ce, F as Ie, r as Ee, o as He, n as
|
|
5
|
-
const
|
|
3
|
+
import H, { useContext as A, useRef as N, useState as z, useLayoutEffect as L, useEffect as ae, useSyncExternalStore as _e, useCallback as j } from "react";
|
|
4
|
+
import { A as xe, i as we, f as Ne, S as Te, f$1 as ve, V as Se, j as Ce, F as Ie, r as Ee, o as He, n as se, l as Ae, a as J, MODEL_GPT4 as Oe } from "./index.DW-8fMRN.js";
|
|
5
|
+
const Be = (e) => {
|
|
6
6
|
let r = "";
|
|
7
7
|
if (typeof e == "number" || typeof e == "string")
|
|
8
8
|
r = "m-" + e;
|
|
@@ -18,17 +18,17 @@ const $e = (e) => {
|
|
|
18
18
|
className: a,
|
|
19
19
|
defaultViewBox: s,
|
|
20
20
|
defaultClassName: o,
|
|
21
|
-
spacing:
|
|
22
|
-
title:
|
|
21
|
+
spacing: d,
|
|
22
|
+
title: l,
|
|
23
23
|
semantic: n = !1,
|
|
24
24
|
...m
|
|
25
25
|
}) => {
|
|
26
|
-
const
|
|
27
|
-
|
|
26
|
+
const u = Be(d), y = i(
|
|
27
|
+
u,
|
|
28
28
|
a || o
|
|
29
29
|
);
|
|
30
|
-
return /* @__PURE__ */ x(
|
|
31
|
-
/* @__PURE__ */
|
|
30
|
+
return /* @__PURE__ */ x(ke, { children: [
|
|
31
|
+
/* @__PURE__ */ c(
|
|
32
32
|
"svg",
|
|
33
33
|
{
|
|
34
34
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -42,7 +42,7 @@ const $e = (e) => {
|
|
|
42
42
|
children: e
|
|
43
43
|
}
|
|
44
44
|
),
|
|
45
|
-
|
|
45
|
+
l && n && /* @__PURE__ */ c("span", { className: "sr-only", children: l })
|
|
46
46
|
] });
|
|
47
47
|
};
|
|
48
48
|
/*!
|
|
@@ -52,7 +52,7 @@ const $e = (e) => {
|
|
|
52
52
|
try {
|
|
53
53
|
window.__VERSINI_UI_PRIVATE__ || (window.__VERSINI_UI_PRIVATE__ = {
|
|
54
54
|
version: "1.4.8",
|
|
55
|
-
buildTime: "09/
|
|
55
|
+
buildTime: "09/09/2024 06:39 PM EDT",
|
|
56
56
|
homepage: "https://github.com/aversini/ui-components",
|
|
57
57
|
license: "MIT"
|
|
58
58
|
});
|
|
@@ -65,13 +65,13 @@ try {
|
|
|
65
65
|
try {
|
|
66
66
|
window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
|
|
67
67
|
version: "1.12.0",
|
|
68
|
-
buildTime: "09/
|
|
68
|
+
buildTime: "09/09/2024 06:39 PM EDT",
|
|
69
69
|
homepage: "https://github.com/aversini/ui-components",
|
|
70
70
|
license: "MIT"
|
|
71
71
|
});
|
|
72
72
|
} catch {
|
|
73
73
|
}
|
|
74
|
-
const
|
|
74
|
+
const Me = ({
|
|
75
75
|
className: e,
|
|
76
76
|
viewBox: r,
|
|
77
77
|
spacing: t,
|
|
@@ -89,17 +89,17 @@ const Be = ({
|
|
|
89
89
|
title: a || "Sort",
|
|
90
90
|
...o,
|
|
91
91
|
children: [
|
|
92
|
-
/* @__PURE__ */
|
|
92
|
+
/* @__PURE__ */ c(
|
|
93
93
|
"path",
|
|
94
94
|
{
|
|
95
95
|
opacity: s ? "1" : "0.4",
|
|
96
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
97
|
}
|
|
98
98
|
),
|
|
99
|
-
/* @__PURE__ */
|
|
99
|
+
/* @__PURE__ */ c("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
100
|
]
|
|
101
101
|
}
|
|
102
|
-
),
|
|
102
|
+
), $e = ({
|
|
103
103
|
className: e,
|
|
104
104
|
viewBox: r,
|
|
105
105
|
spacing: t,
|
|
@@ -117,14 +117,14 @@ const Be = ({
|
|
|
117
117
|
title: a || "Sort Down",
|
|
118
118
|
...o,
|
|
119
119
|
children: [
|
|
120
|
-
/* @__PURE__ */
|
|
120
|
+
/* @__PURE__ */ c(
|
|
121
121
|
"path",
|
|
122
122
|
{
|
|
123
123
|
opacity: s ? "1" : "0.4",
|
|
124
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
125
|
}
|
|
126
126
|
),
|
|
127
|
-
/* @__PURE__ */
|
|
127
|
+
/* @__PURE__ */ c("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
128
|
]
|
|
129
129
|
}
|
|
130
130
|
), Le = ({
|
|
@@ -145,17 +145,17 @@ const Be = ({
|
|
|
145
145
|
title: a || "Sort Up",
|
|
146
146
|
...o,
|
|
147
147
|
children: [
|
|
148
|
-
/* @__PURE__ */
|
|
148
|
+
/* @__PURE__ */ c(
|
|
149
149
|
"path",
|
|
150
150
|
{
|
|
151
151
|
opacity: s ? "1" : "0.4",
|
|
152
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
153
|
}
|
|
154
154
|
),
|
|
155
|
-
/* @__PURE__ */
|
|
155
|
+
/* @__PURE__ */ c("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
156
|
]
|
|
157
157
|
}
|
|
158
|
-
),
|
|
158
|
+
), oe = H.forwardRef(
|
|
159
159
|
({
|
|
160
160
|
children: e,
|
|
161
161
|
disabled: r = !1,
|
|
@@ -163,27 +163,27 @@ const Be = ({
|
|
|
163
163
|
focusMode: a = "system",
|
|
164
164
|
fullWidth: s = !1,
|
|
165
165
|
className: o,
|
|
166
|
-
type:
|
|
167
|
-
raw:
|
|
166
|
+
type: d = "button",
|
|
167
|
+
raw: l = !1,
|
|
168
168
|
noBorder: n = !1,
|
|
169
169
|
"aria-label": m,
|
|
170
|
-
label:
|
|
170
|
+
label: u,
|
|
171
171
|
size: y = "medium",
|
|
172
172
|
labelRight: p,
|
|
173
173
|
labelLeft: _,
|
|
174
174
|
spacing: g,
|
|
175
175
|
noBackground: S = !1,
|
|
176
176
|
align: C = "center",
|
|
177
|
-
active:
|
|
178
|
-
|
|
179
|
-
},
|
|
177
|
+
active: O = !1,
|
|
178
|
+
...B
|
|
179
|
+
}, M) => {
|
|
180
180
|
const U = xe({
|
|
181
181
|
type: Ne,
|
|
182
182
|
mode: t,
|
|
183
183
|
focusMode: a,
|
|
184
184
|
fullWidth: s,
|
|
185
185
|
disabled: r,
|
|
186
|
-
raw:
|
|
186
|
+
raw: l,
|
|
187
187
|
className: o,
|
|
188
188
|
noBorder: n,
|
|
189
189
|
size: y,
|
|
@@ -192,12 +192,12 @@ const Be = ({
|
|
|
192
192
|
spacing: g,
|
|
193
193
|
noBackground: S,
|
|
194
194
|
align: C
|
|
195
|
-
}),
|
|
196
|
-
"text-copy-accent-dark": t === "light" && !
|
|
197
|
-
"text-copy-light": t === "dark" && !
|
|
198
|
-
"text-copy-accent-dark dark:text-copy-light": t === "alt-system" && !
|
|
199
|
-
"text-copy-light dark:text-copy-accent-dark": t === "system" && !
|
|
200
|
-
}),
|
|
195
|
+
}), G = i({
|
|
196
|
+
"text-copy-accent-dark": t === "light" && !l,
|
|
197
|
+
"text-copy-light": t === "dark" && !l,
|
|
198
|
+
"text-copy-accent-dark dark:text-copy-light": t === "alt-system" && !l,
|
|
199
|
+
"text-copy-light dark:text-copy-accent-dark": t === "system" && !l
|
|
200
|
+
}), D = O ? i(
|
|
201
201
|
"relative",
|
|
202
202
|
"focus-within:static",
|
|
203
203
|
"focus-within:after:border-transparent",
|
|
@@ -214,25 +214,25 @@ const Be = ({
|
|
|
214
214
|
"after:border-table-light dark:after:border-table-dark": t === "alt-system"
|
|
215
215
|
}
|
|
216
216
|
) : "";
|
|
217
|
-
return /* @__PURE__ */
|
|
217
|
+
return /* @__PURE__ */ c("div", { className: D, children: /* @__PURE__ */ x(
|
|
218
218
|
we,
|
|
219
219
|
{
|
|
220
|
-
ref:
|
|
220
|
+
ref: M,
|
|
221
221
|
className: U,
|
|
222
222
|
disabled: r,
|
|
223
|
-
type:
|
|
224
|
-
"aria-label": m ||
|
|
225
|
-
|
|
223
|
+
type: d,
|
|
224
|
+
"aria-label": m || u,
|
|
225
|
+
...B,
|
|
226
226
|
children: [
|
|
227
|
-
_ && /* @__PURE__ */
|
|
228
|
-
/* @__PURE__ */
|
|
229
|
-
p && /* @__PURE__ */
|
|
227
|
+
_ && /* @__PURE__ */ c("span", { className: "pr-2", children: _ }),
|
|
228
|
+
/* @__PURE__ */ c("div", { className: G, children: e }),
|
|
229
|
+
p && /* @__PURE__ */ c("span", { className: "pl-2", children: p })
|
|
230
230
|
]
|
|
231
231
|
}
|
|
232
232
|
) });
|
|
233
233
|
}
|
|
234
234
|
);
|
|
235
|
-
|
|
235
|
+
oe.displayName = "ButtonSort";
|
|
236
236
|
const v = H.createContext({
|
|
237
237
|
mode: "light",
|
|
238
238
|
cellWrapper: "thead",
|
|
@@ -275,7 +275,7 @@ const v = H.createContext({
|
|
|
275
275
|
"text-copy-light dark:text-copy-dark": e === "system",
|
|
276
276
|
"text-copy-dark dark:text-copy-light": e === "alt-system"
|
|
277
277
|
})
|
|
278
|
-
}),
|
|
278
|
+
}), ze = ({
|
|
279
279
|
className: e,
|
|
280
280
|
stickyHeader: r,
|
|
281
281
|
mode: t
|
|
@@ -285,7 +285,7 @@ const v = H.createContext({
|
|
|
285
285
|
"shadow-[rgb(190_190_190_/20%)_0_0.5rem_1rem] dark:shadow-[rgb(65_65_65_/30%)_0_0.5rem_1rem]": r && t === "system",
|
|
286
286
|
"shadow-[rgb(65_65_65_/30%)_0_0.5rem_1rem]": r && t === "light",
|
|
287
287
|
"shadow-[rgb(65_65_65_/30%)_0_0.5rem_1rem] dark:shadow-[rgb(190_190_190_/20%)_0_0.5rem_1rem]": r && t === "alt-system"
|
|
288
|
-
}),
|
|
288
|
+
}), Re = ({
|
|
289
289
|
className: e,
|
|
290
290
|
stickyFooter: r,
|
|
291
291
|
mode: t
|
|
@@ -295,7 +295,7 @@ const v = H.createContext({
|
|
|
295
295
|
"shadow-[rgb(190_190_190_/20%)_0_-0.5rem_1rem] dark:shadow-[rgb(65_65_65_/30%)_0_-0.5rem_1rem]": r && t === "system",
|
|
296
296
|
"shadow-[rgb(65_65_65_/30%)_0_-0.5rem_1rem]": r && t === "light",
|
|
297
297
|
"shadow-[rgb(65_65_65_/30%)_-0_0.5rem_1rem] dark:shadow-[rgb(190_190_190_/20%)_0_-0.5rem_1rem]": r && t === "alt-system"
|
|
298
|
-
}),
|
|
298
|
+
}), Ue = ({
|
|
299
299
|
mode: e,
|
|
300
300
|
className: r,
|
|
301
301
|
cellWrapper: t
|
|
@@ -333,34 +333,34 @@ const v = H.createContext({
|
|
|
333
333
|
compact: a,
|
|
334
334
|
summary: s,
|
|
335
335
|
className: o,
|
|
336
|
-
wrapperClassName:
|
|
337
|
-
maxHeight:
|
|
336
|
+
wrapperClassName: d,
|
|
337
|
+
maxHeight: l,
|
|
338
338
|
stickyHeader: n,
|
|
339
339
|
stickyFooter: m,
|
|
340
|
-
spacing:
|
|
340
|
+
spacing: u,
|
|
341
341
|
...y
|
|
342
342
|
}) => {
|
|
343
343
|
const p = Ve({
|
|
344
344
|
mode: r,
|
|
345
345
|
className: o,
|
|
346
|
-
wrapperClassName:
|
|
346
|
+
wrapperClassName: d,
|
|
347
347
|
stickyHeader: n,
|
|
348
348
|
stickyFooter: m,
|
|
349
|
-
spacing:
|
|
349
|
+
spacing: u
|
|
350
350
|
});
|
|
351
|
-
return /* @__PURE__ */
|
|
351
|
+
return /* @__PURE__ */ c(
|
|
352
352
|
v.Provider,
|
|
353
353
|
{
|
|
354
354
|
value: { mode: r, stickyHeader: n, stickyFooter: m, compact: a },
|
|
355
|
-
children: /* @__PURE__ */
|
|
355
|
+
children: /* @__PURE__ */ c(
|
|
356
356
|
"div",
|
|
357
357
|
{
|
|
358
358
|
className: p.wrapper,
|
|
359
|
-
...
|
|
360
|
-
style: { maxHeight:
|
|
359
|
+
...l && {
|
|
360
|
+
style: { maxHeight: l }
|
|
361
361
|
},
|
|
362
362
|
children: /* @__PURE__ */ x("table", { className: p.table, summary: s, ...y, children: [
|
|
363
|
-
t && /* @__PURE__ */
|
|
363
|
+
t && /* @__PURE__ */ c("caption", { className: p.caption, children: t }),
|
|
364
364
|
e
|
|
365
365
|
] })
|
|
366
366
|
}
|
|
@@ -372,54 +372,54 @@ const v = H.createContext({
|
|
|
372
372
|
className: r,
|
|
373
373
|
...t
|
|
374
374
|
}) => {
|
|
375
|
-
const a =
|
|
375
|
+
const a = A(v);
|
|
376
376
|
a.cellWrapper = R;
|
|
377
|
-
const s =
|
|
377
|
+
const s = ze({
|
|
378
378
|
className: r,
|
|
379
379
|
mode: a.mode,
|
|
380
380
|
stickyHeader: a.stickyHeader
|
|
381
381
|
});
|
|
382
|
-
return /* @__PURE__ */
|
|
382
|
+
return /* @__PURE__ */ c("thead", { className: s, ...t, children: e });
|
|
383
383
|
}, dt = ({
|
|
384
384
|
children: e,
|
|
385
385
|
className: r,
|
|
386
386
|
...t
|
|
387
387
|
}) => {
|
|
388
|
-
const a =
|
|
388
|
+
const a = A(v);
|
|
389
389
|
a.cellWrapper = Y;
|
|
390
|
-
const s =
|
|
390
|
+
const s = Re({
|
|
391
391
|
className: r,
|
|
392
392
|
mode: a.mode,
|
|
393
393
|
stickyFooter: a.stickyFooter
|
|
394
394
|
});
|
|
395
|
-
return /* @__PURE__ */
|
|
395
|
+
return /* @__PURE__ */ c("tfoot", { className: s, ...t, children: e });
|
|
396
396
|
}, it = ({ children: e, ...r }) => {
|
|
397
|
-
const t =
|
|
398
|
-
return t.cellWrapper = T, /* @__PURE__ */
|
|
397
|
+
const t = A(v);
|
|
398
|
+
return t.cellWrapper = T, /* @__PURE__ */ c("tbody", { ...r, children: e });
|
|
399
399
|
}, nt = ({
|
|
400
400
|
children: e,
|
|
401
401
|
className: r,
|
|
402
402
|
...t
|
|
403
403
|
}) => {
|
|
404
|
-
const a =
|
|
404
|
+
const a = A(v), s = Ue({
|
|
405
405
|
mode: a.mode,
|
|
406
406
|
cellWrapper: a.cellWrapper,
|
|
407
407
|
className: r
|
|
408
408
|
});
|
|
409
|
-
return /* @__PURE__ */
|
|
410
|
-
},
|
|
409
|
+
return /* @__PURE__ */ c("tr", { className: s, ...t, children: e });
|
|
410
|
+
}, De = ({
|
|
411
411
|
children: e,
|
|
412
412
|
component: r,
|
|
413
413
|
className: t,
|
|
414
414
|
...a
|
|
415
415
|
}) => {
|
|
416
|
-
const s =
|
|
416
|
+
const s = A(v), o = r || (s.cellWrapper === R ? "th" : "td"), d = Ge({
|
|
417
417
|
cellWrapper: s.cellWrapper,
|
|
418
418
|
className: t,
|
|
419
419
|
mode: s.mode,
|
|
420
420
|
compact: s.compact
|
|
421
421
|
});
|
|
422
|
-
return /* @__PURE__ */
|
|
422
|
+
return /* @__PURE__ */ c(o, { className: d, ...a, children: e });
|
|
423
423
|
}, mt = ({
|
|
424
424
|
align: e,
|
|
425
425
|
children: r,
|
|
@@ -427,49 +427,54 @@ const v = H.createContext({
|
|
|
427
427
|
component: a,
|
|
428
428
|
focusMode: s = "alt-system",
|
|
429
429
|
mode: o = "alt-system",
|
|
430
|
-
onClick:
|
|
431
|
-
sortDirection:
|
|
430
|
+
onClick: d,
|
|
431
|
+
sortDirection: l,
|
|
432
432
|
sortedCell: n,
|
|
433
433
|
cellId: m,
|
|
434
|
-
...
|
|
435
|
-
}) => /* @__PURE__ */
|
|
436
|
-
|
|
434
|
+
...u
|
|
435
|
+
}) => /* @__PURE__ */ c(
|
|
436
|
+
De,
|
|
437
437
|
{
|
|
438
438
|
component: a,
|
|
439
439
|
className: t,
|
|
440
440
|
role: "columnheader",
|
|
441
|
-
"aria-sort":
|
|
442
|
-
...
|
|
443
|
-
children: /* @__PURE__ */
|
|
444
|
-
|
|
441
|
+
"aria-sort": l === V.ASC && n === m ? "ascending" : l === V.DESC && n === m ? "descending" : "other",
|
|
442
|
+
...u,
|
|
443
|
+
children: /* @__PURE__ */ c(
|
|
444
|
+
oe,
|
|
445
445
|
{
|
|
446
446
|
active: n === m,
|
|
447
447
|
className: "rounded-none text-sm",
|
|
448
|
-
onClick:
|
|
448
|
+
onClick: d,
|
|
449
449
|
align: e,
|
|
450
450
|
noBorder: !0,
|
|
451
451
|
focusMode: s,
|
|
452
452
|
mode: o,
|
|
453
453
|
fullWidth: !0,
|
|
454
454
|
labelRight: r,
|
|
455
|
-
children:
|
|
455
|
+
children: l === V.ASC && n === m ? /* @__PURE__ */ c(Le, { className: "size-4", monotone: !0 }) : l === V.DESC && n === m ? /* @__PURE__ */ c($e, { className: "size-4", monotone: !0 }) : /* @__PURE__ */ c(Me, { className: "size-4", monotone: !0 })
|
|
456
456
|
}
|
|
457
457
|
)
|
|
458
458
|
}
|
|
459
459
|
);
|
|
460
|
-
function
|
|
460
|
+
function Fe({
|
|
461
461
|
value: e,
|
|
462
462
|
defaultValue: r,
|
|
463
463
|
finalValue: t,
|
|
464
464
|
onChange: a = () => {
|
|
465
|
-
}
|
|
465
|
+
},
|
|
466
|
+
initialControlledDelay: s = 0
|
|
466
467
|
}) {
|
|
467
|
-
const [
|
|
468
|
+
const [o, d] = z(!1), [l, n] = z(
|
|
468
469
|
r !== void 0 ? r : t
|
|
469
|
-
)
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
470
|
+
), m = (u) => {
|
|
471
|
+
n(u), a == null || a(u);
|
|
472
|
+
};
|
|
473
|
+
return ae(() => {
|
|
474
|
+
(async () => e !== void 0 && !o && s > 0 && (await new Promise(
|
|
475
|
+
(u) => setTimeout(u, s)
|
|
476
|
+
), d(!0)))();
|
|
477
|
+
}, [e, s, o]), e !== void 0 ? !o && s > 0 ? ["", a, !0] : [e, a, !0] : [l, m, !1];
|
|
473
478
|
}
|
|
474
479
|
const Pe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hidden px-4 py-7", We = ({
|
|
475
480
|
mode: e
|
|
@@ -527,18 +532,18 @@ const Pe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
|
527
532
|
return "";
|
|
528
533
|
if (a)
|
|
529
534
|
return i(
|
|
530
|
-
|
|
535
|
+
J,
|
|
531
536
|
"absolute px-2 cursor-not-allowed opacity-50 font-medium"
|
|
532
537
|
);
|
|
533
538
|
if (!e)
|
|
534
|
-
return i(
|
|
539
|
+
return i(J, "absolute px-2 font-medium", {
|
|
535
540
|
"text-copy-medium": t === "dark",
|
|
536
541
|
"text-copy-dark": t === "light",
|
|
537
542
|
"text-copy-dark dark:text-copy-medium": t === "system",
|
|
538
543
|
"text-copy-medium dark:text-copy-dark": t === "alt-system"
|
|
539
544
|
});
|
|
540
545
|
if (e)
|
|
541
|
-
return i(
|
|
546
|
+
return i(J, "absolute px-2 font-medium", {
|
|
542
547
|
"text-copy-error-light": t === "dark",
|
|
543
548
|
"text-copy-error-dark": t === "light",
|
|
544
549
|
"text-copy-error-dark dark:text-copy-error-light": t === "system",
|
|
@@ -551,24 +556,24 @@ const Pe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
|
551
556
|
focusMode: a,
|
|
552
557
|
disabled: s,
|
|
553
558
|
noBorder: o,
|
|
554
|
-
error:
|
|
555
|
-
spacing:
|
|
559
|
+
error: d,
|
|
560
|
+
spacing: l,
|
|
556
561
|
mode: n
|
|
557
562
|
}) => {
|
|
558
563
|
const m = t ? e : i(
|
|
559
564
|
"relative flex w-full flex-col justify-center",
|
|
560
565
|
Ee,
|
|
561
566
|
e,
|
|
562
|
-
He(
|
|
563
|
-
),
|
|
564
|
-
|
|
567
|
+
He(l)
|
|
568
|
+
), u = t ? i(r) : i(
|
|
569
|
+
se,
|
|
565
570
|
r,
|
|
566
571
|
Pe(),
|
|
567
572
|
We({ mode: n }),
|
|
568
573
|
qe({ focusMode: a }),
|
|
569
574
|
je({
|
|
570
575
|
noBorder: o,
|
|
571
|
-
error:
|
|
576
|
+
error: d
|
|
572
577
|
}),
|
|
573
578
|
{
|
|
574
579
|
"disabled:cursor-not-allowed disabled:opacity-50": s
|
|
@@ -576,17 +581,17 @@ const Pe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
|
576
581
|
), y = t ? void 0 : "sr-only", p = Je({
|
|
577
582
|
disabled: s,
|
|
578
583
|
raw: t,
|
|
579
|
-
error:
|
|
584
|
+
error: d,
|
|
580
585
|
mode: n
|
|
581
586
|
}), _ = Qe({
|
|
582
|
-
error:
|
|
587
|
+
error: d,
|
|
583
588
|
raw: t,
|
|
584
589
|
mode: n,
|
|
585
590
|
disabled: s
|
|
586
|
-
}), g = t ? void 0 : i(
|
|
591
|
+
}), g = t ? void 0 : i(Ae, "absolute");
|
|
587
592
|
return {
|
|
588
593
|
wrapper: m,
|
|
589
|
-
textArea:
|
|
594
|
+
textArea: u,
|
|
590
595
|
accessibleLabel: y,
|
|
591
596
|
visibleLabel: p,
|
|
592
597
|
helperText: _,
|
|
@@ -600,8 +605,8 @@ const Pe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
|
600
605
|
}) => {
|
|
601
606
|
let s, o;
|
|
602
607
|
if (e > 0 && e !== r) {
|
|
603
|
-
const
|
|
604
|
-
s = t + -1 * Math.sign(
|
|
608
|
+
const d = e - r, l = Math.abs(d / 24);
|
|
609
|
+
s = t + -1 * Math.sign(d) * (12 * l), o = a + Math.sign(d) * (12 * l);
|
|
605
610
|
}
|
|
606
611
|
return {
|
|
607
612
|
labelOffset: s,
|
|
@@ -616,83 +621,84 @@ const Pe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
|
616
621
|
error: a = !1,
|
|
617
622
|
raw: s = !1,
|
|
618
623
|
className: o,
|
|
619
|
-
textAreaClassName:
|
|
620
|
-
mode:
|
|
624
|
+
textAreaClassName: d,
|
|
625
|
+
mode: l = "system",
|
|
621
626
|
focusMode: n = "system",
|
|
622
627
|
value: m,
|
|
623
|
-
defaultValue:
|
|
628
|
+
defaultValue: u,
|
|
624
629
|
disabled: y = !1,
|
|
625
630
|
noBorder: p = !1,
|
|
626
631
|
labelId: _,
|
|
627
632
|
helperText: g = "",
|
|
628
633
|
helperTextOnFocus: S = !1,
|
|
629
634
|
rightElement: C,
|
|
630
|
-
onChange:
|
|
631
|
-
onFocus:
|
|
632
|
-
onBlur:
|
|
635
|
+
onChange: O,
|
|
636
|
+
onFocus: B,
|
|
637
|
+
onBlur: M,
|
|
633
638
|
spacing: U,
|
|
634
|
-
...
|
|
635
|
-
},
|
|
636
|
-
const b = N(null),
|
|
639
|
+
...G
|
|
640
|
+
}, D) => {
|
|
641
|
+
const b = N(null), de = ve([D, b]), [ie, $] = Se(), F = N(80), K = N(-25), I = N(null), X = N(30), P = N(null), E = Ce({ id: e, prefix: `${se}-` }), [ne, me] = z(0), [ue, Z] = z(
|
|
637
642
|
!!(!S && g)
|
|
638
|
-
),
|
|
643
|
+
), he = `${r} error, ${g}`, w = Ye({
|
|
639
644
|
className: o,
|
|
640
|
-
textAreaClassName:
|
|
645
|
+
textAreaClassName: d,
|
|
641
646
|
error: a,
|
|
642
647
|
raw: s,
|
|
643
648
|
focusMode: n,
|
|
644
649
|
disabled: y,
|
|
645
650
|
noBorder: p,
|
|
646
651
|
spacing: U,
|
|
647
|
-
mode:
|
|
648
|
-
}), [f,
|
|
652
|
+
mode: l
|
|
653
|
+
}), [f, pe] = Fe({
|
|
649
654
|
value: m,
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
655
|
+
initialControlledDelay: 20,
|
|
656
|
+
defaultValue: u,
|
|
657
|
+
onChange: (h) => {
|
|
658
|
+
O && O({
|
|
653
659
|
target: {
|
|
654
|
-
value:
|
|
660
|
+
value: h
|
|
655
661
|
}
|
|
656
662
|
});
|
|
657
663
|
}
|
|
658
|
-
}),
|
|
659
|
-
|
|
660
|
-
},
|
|
661
|
-
S && g && Z(!0),
|
|
662
|
-
},
|
|
663
|
-
S && g && !f && Z(!1),
|
|
664
|
+
}), ge = (h) => {
|
|
665
|
+
pe(h.target.value);
|
|
666
|
+
}, ye = (h) => {
|
|
667
|
+
S && g && Z(!0), B && B(h);
|
|
668
|
+
}, be = (h) => {
|
|
669
|
+
S && g && !f && Z(!1), M && M(h);
|
|
664
670
|
};
|
|
665
671
|
return L(() => {
|
|
666
|
-
|
|
667
|
-
}, [
|
|
672
|
+
$ && $.width && me($.width + 18 + 10);
|
|
673
|
+
}, [$]), L(() => {
|
|
668
674
|
s || b && b.current && f !== void 0 && (b.current.style.height = "inherit", b.current.style.height = b.current.scrollHeight + "px");
|
|
669
675
|
}, [f, s]), L(() => {
|
|
670
676
|
s || setTimeout(() => {
|
|
671
|
-
var
|
|
672
|
-
(
|
|
677
|
+
var h;
|
|
678
|
+
(h = I == null ? void 0 : I.current) == null || h.style.setProperty(
|
|
673
679
|
"--av-text-area-wrapper-transition",
|
|
674
680
|
f ? "none" : "all 0.2s ease-out"
|
|
675
681
|
);
|
|
676
682
|
}, 0);
|
|
677
683
|
}, [f, s]), L(() => {
|
|
678
|
-
var
|
|
684
|
+
var h, ee;
|
|
679
685
|
if (!s && b && b.current && f !== void 0) {
|
|
680
|
-
const { labelOffset:
|
|
686
|
+
const { labelOffset: W, helperTextOffset: q, scrollHeight: fe } = Ke({
|
|
681
687
|
scrollHeight: b.current.scrollHeight,
|
|
682
688
|
currentHeight: F.current,
|
|
683
689
|
currentLabelOffset: K.current,
|
|
684
690
|
currentHelperTextOffset: X.current
|
|
685
691
|
});
|
|
686
|
-
|
|
692
|
+
W && (K.current = W, (h = I == null ? void 0 : I.current) == null || h.style.setProperty(
|
|
687
693
|
"--av-text-area-label",
|
|
688
|
-
`${P}px`
|
|
689
|
-
)), W && (X.current = W, (ee = D == null ? void 0 : D.current) == null || ee.style.setProperty(
|
|
690
|
-
"--av-text-area-helper-text",
|
|
691
694
|
`${W}px`
|
|
692
|
-
)),
|
|
695
|
+
)), q && (X.current = q, (ee = P == null ? void 0 : P.current) == null || ee.style.setProperty(
|
|
696
|
+
"--av-text-area-helper-text",
|
|
697
|
+
`${q}px`
|
|
698
|
+
)), F.current = fe || F.current;
|
|
693
699
|
}
|
|
694
700
|
}, [f, s]), /* @__PURE__ */ x("div", { className: w.wrapper, children: [
|
|
695
|
-
/* @__PURE__ */
|
|
701
|
+
/* @__PURE__ */ c(
|
|
696
702
|
"label",
|
|
697
703
|
{
|
|
698
704
|
htmlFor: E,
|
|
@@ -701,10 +707,10 @@ const Pe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
|
701
707
|
children: t
|
|
702
708
|
}
|
|
703
709
|
),
|
|
704
|
-
/* @__PURE__ */
|
|
710
|
+
/* @__PURE__ */ c(
|
|
705
711
|
"textarea",
|
|
706
712
|
{
|
|
707
|
-
ref:
|
|
713
|
+
ref: de,
|
|
708
714
|
id: E,
|
|
709
715
|
name: r,
|
|
710
716
|
disabled: y,
|
|
@@ -713,15 +719,15 @@ const Pe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
|
713
719
|
rows: 1,
|
|
714
720
|
...g && { "aria-describedby": `${E}-helper` },
|
|
715
721
|
...a && { "aria-invalid": "true" },
|
|
716
|
-
...C && !s && { style: { paddingRight:
|
|
722
|
+
...C && !s && { style: { paddingRight: ne } },
|
|
717
723
|
value: f,
|
|
718
|
-
onChange:
|
|
719
|
-
onFocus:
|
|
720
|
-
onBlur:
|
|
721
|
-
...
|
|
724
|
+
onChange: ge,
|
|
725
|
+
onFocus: ye,
|
|
726
|
+
onBlur: be,
|
|
727
|
+
...G
|
|
722
728
|
}
|
|
723
729
|
),
|
|
724
|
-
!s && /* @__PURE__ */
|
|
730
|
+
!s && /* @__PURE__ */ c(
|
|
725
731
|
"label",
|
|
726
732
|
{
|
|
727
733
|
ref: I,
|
|
@@ -731,24 +737,24 @@ const Pe = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
|
|
|
731
737
|
children: t
|
|
732
738
|
}
|
|
733
739
|
),
|
|
734
|
-
|
|
740
|
+
ue && /* @__PURE__ */ c(
|
|
735
741
|
"div",
|
|
736
742
|
{
|
|
737
|
-
ref:
|
|
743
|
+
ref: P,
|
|
738
744
|
id: `${E}-helper`,
|
|
739
745
|
className: w.helperText,
|
|
740
746
|
children: g
|
|
741
747
|
}
|
|
742
748
|
),
|
|
743
|
-
C && /* @__PURE__ */
|
|
749
|
+
C && /* @__PURE__ */ c(
|
|
744
750
|
"div",
|
|
745
751
|
{
|
|
746
|
-
ref:
|
|
752
|
+
ref: ie,
|
|
747
753
|
className: w.rightElement,
|
|
748
754
|
children: C
|
|
749
755
|
}
|
|
750
756
|
),
|
|
751
|
-
a && g && /* @__PURE__ */
|
|
757
|
+
a && g && /* @__PURE__ */ c(Ie, { politeness: "polite", clearAnnouncementDelay: 500, children: he })
|
|
752
758
|
] });
|
|
753
759
|
}
|
|
754
760
|
);
|
|
@@ -879,11 +885,11 @@ const k = {
|
|
|
879
885
|
location: e.location
|
|
880
886
|
})
|
|
881
887
|
}
|
|
882
|
-
},
|
|
888
|
+
}, le = process.env.PUBLIC_SASSY_API_SERVER_URL, Ze = async ({
|
|
883
889
|
query: e,
|
|
884
890
|
data: r,
|
|
885
891
|
headers: t = {}
|
|
886
|
-
}) => await fetch(`${
|
|
892
|
+
}) => await fetch(`${le}/graphql`, {
|
|
887
893
|
method: "POST",
|
|
888
894
|
credentials: "include",
|
|
889
895
|
headers: {
|
|
@@ -911,11 +917,11 @@ const k = {
|
|
|
911
917
|
});
|
|
912
918
|
if (o.status !== 200)
|
|
913
919
|
return { status: o.status, data: [] };
|
|
914
|
-
const { data:
|
|
920
|
+
const { data: d, errors: l } = await o.json();
|
|
915
921
|
return {
|
|
916
922
|
status: o.status,
|
|
917
|
-
data:
|
|
918
|
-
errors:
|
|
923
|
+
data: d[r.method],
|
|
924
|
+
errors: l
|
|
919
925
|
};
|
|
920
926
|
} catch (s) {
|
|
921
927
|
return console.error(s), { status: 500, data: [] };
|
|
@@ -927,7 +933,7 @@ const k = {
|
|
|
927
933
|
method: a = "POST"
|
|
928
934
|
}) => {
|
|
929
935
|
const s = `Bearer ${e}`;
|
|
930
|
-
return await fetch(`${
|
|
936
|
+
return await fetch(`${le}/api/${r}`, {
|
|
931
937
|
method: a,
|
|
932
938
|
credentials: "include",
|
|
933
939
|
headers: {
|
|
@@ -939,7 +945,7 @@ const k = {
|
|
|
939
945
|
}, gt = H.createContext({
|
|
940
946
|
state: {
|
|
941
947
|
id: "",
|
|
942
|
-
model:
|
|
948
|
+
model: Oe,
|
|
943
949
|
usage: 0,
|
|
944
950
|
messages: [],
|
|
945
951
|
isComponent: !1
|
|
@@ -952,51 +958,51 @@ const k = {
|
|
|
952
958
|
dispatch: () => {
|
|
953
959
|
}
|
|
954
960
|
});
|
|
955
|
-
function
|
|
961
|
+
function ce(e, r) {
|
|
956
962
|
window.dispatchEvent(new StorageEvent("storage", { key: e, newValue: r }));
|
|
957
963
|
}
|
|
958
964
|
const te = (e, r) => {
|
|
959
965
|
const t = JSON.stringify(
|
|
960
966
|
typeof r == "function" ? r() : r
|
|
961
967
|
);
|
|
962
|
-
window.localStorage.setItem(e, t),
|
|
968
|
+
window.localStorage.setItem(e, t), ce(e, t);
|
|
963
969
|
}, et = (e) => {
|
|
964
|
-
window.localStorage.removeItem(e),
|
|
970
|
+
window.localStorage.removeItem(e), ce(e, null);
|
|
965
971
|
}, re = (e) => window.localStorage.getItem(e), tt = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
|
|
966
972
|
function bt({
|
|
967
973
|
key: e,
|
|
968
974
|
initialValue: r
|
|
969
975
|
}) {
|
|
970
|
-
const t =
|
|
971
|
-
(
|
|
976
|
+
const t = _e(tt, () => re(e)), a = j(
|
|
977
|
+
(d) => {
|
|
972
978
|
try {
|
|
973
|
-
const
|
|
974
|
-
|
|
975
|
-
} catch (
|
|
976
|
-
console.warn(
|
|
979
|
+
const l = typeof d == "function" ? d(JSON.parse(t)) : d;
|
|
980
|
+
l == null ? et(e) : te(e, l);
|
|
981
|
+
} catch (l) {
|
|
982
|
+
console.warn(l);
|
|
977
983
|
}
|
|
978
984
|
},
|
|
979
985
|
[e, t]
|
|
980
|
-
), s =
|
|
986
|
+
), s = j(() => {
|
|
981
987
|
a(r);
|
|
982
|
-
}, [r, a]), o =
|
|
988
|
+
}, [r, a]), o = j(() => {
|
|
983
989
|
a(null);
|
|
984
990
|
}, [a]);
|
|
985
|
-
return
|
|
991
|
+
return ae(() => {
|
|
986
992
|
try {
|
|
987
993
|
re(e) === null && typeof r < "u" && te(e, r);
|
|
988
|
-
} catch (
|
|
989
|
-
console.warn(
|
|
994
|
+
} catch (d) {
|
|
995
|
+
console.warn(d);
|
|
990
996
|
}
|
|
991
997
|
}, [e, r]), [t ? JSON.parse(t) : null, a, s, o];
|
|
992
998
|
}
|
|
993
999
|
export {
|
|
994
1000
|
gt as AppContext,
|
|
995
|
-
Xe as At,
|
|
996
1001
|
bt as E,
|
|
997
1002
|
yt as HistoryContext,
|
|
998
|
-
|
|
1003
|
+
De as J,
|
|
999
1004
|
ut as SERVICE_TYPES,
|
|
1005
|
+
Xe as Tt,
|
|
1000
1006
|
ct as at,
|
|
1001
1007
|
mt as ct,
|
|
1002
1008
|
lt as et,
|