@handijit/ui 1.0.0 → 2.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/README.md +485 -571
- package/build/base.css +1 -1
- package/build/charts.cjs +1 -1
- package/build/charts.cjs.map +1 -1
- package/build/charts.css +1 -1
- package/build/charts.js +350 -349
- package/build/charts.js.map +1 -1
- package/build/chat.cjs +3 -3
- package/build/chat.cjs.map +1 -1
- package/build/chat.css +1 -1
- package/build/chat.js +344 -343
- package/build/chat.js.map +1 -1
- package/build/components/Accordion/style.css +1 -1
- package/build/components/Alert/style.css +1 -1
- package/build/components/Avatar/style.css +1 -1
- package/build/components/Badge/index.cjs +1 -1
- package/build/components/Badge/index.cjs.map +1 -1
- package/build/components/Badge/index.d.ts +8 -13
- package/build/components/Badge/index.js +1 -1
- package/build/components/Badge/index.js.map +1 -1
- package/build/components/Badge/style.css +1 -1
- package/build/components/BottomSheet/style.css +1 -1
- package/build/components/Breadcrumb/style.css +1 -1
- package/build/components/Button/index.cjs +1 -1
- package/build/components/Button/index.cjs.map +1 -1
- package/build/components/Button/index.js +2 -2
- package/build/components/Button/index.js.map +1 -1
- package/build/components/Button/style.css +1 -1
- package/build/components/Card/style.css +1 -1
- package/build/components/Carousel/style.css +1 -1
- package/build/components/Checkbox/style.css +1 -1
- package/build/components/Chip/style.css +1 -1
- package/build/components/ChipGroup/style.css +1 -1
- package/build/components/CodeBadge/style.css +1 -1
- package/build/components/Combobox/index.cjs +1 -1
- package/build/components/Combobox/index.cjs.map +1 -1
- package/build/components/Combobox/index.js +51 -51
- package/build/components/Combobox/index.js.map +1 -1
- package/build/components/Combobox/style.css +1 -1
- package/build/components/CommandPalette/style.css +1 -1
- package/build/components/CopyField/style.css +1 -1
- package/build/components/DataTable/style.css +1 -1
- package/build/components/DateField/index.d.ts +1 -1
- package/build/components/DateField/style.css +1 -1
- package/build/components/Directory/style.css +1 -1
- package/build/components/Disclosure/style.css +1 -1
- package/build/components/Divider/style.css +1 -1
- package/build/components/Drawer/style.css +1 -1
- package/build/components/EmptyState/style.css +1 -1
- package/build/components/Field/style.css +1 -1
- package/build/components/FileUpload/style.css +1 -1
- package/build/components/FilterBar/style.css +1 -1
- package/build/components/IconButton/index.cjs +1 -1
- package/build/components/IconButton/index.cjs.map +1 -1
- package/build/components/IconButton/index.d.ts +2 -2
- package/build/components/IconButton/index.js +1 -1
- package/build/components/IconButton/index.js.map +1 -1
- package/build/components/IconButton/style.css +1 -1
- package/build/components/Input/index.d.ts +1 -1
- package/build/components/Input/style.css +1 -1
- package/build/components/Kbd/style.css +1 -1
- package/build/components/Menu/style.css +1 -1
- package/build/components/Modal/style.css +1 -1
- package/build/components/PageHeader/style.css +1 -1
- package/build/components/Pagination/style.css +1 -1
- package/build/components/Panel/style.css +1 -1
- package/build/components/PasswordInput/style.css +1 -1
- package/build/components/Popover/style.css +1 -1
- package/build/components/Price/style.css +1 -1
- package/build/components/Progress/style.css +1 -1
- package/build/components/PromptDialog/style.css +1 -1
- package/build/components/QuantityStepper/style.css +1 -1
- package/build/components/Radio/style.css +1 -1
- package/build/components/RadioCard/style.css +1 -1
- package/build/components/RangeSlider/style.css +1 -1
- package/build/components/Rating/style.css +1 -1
- package/build/components/RatingInput/style.css +1 -1
- package/build/components/ScrollArea/style.css +1 -1
- package/build/components/SectionHeader/style.css +1 -1
- package/build/components/SegmentedControl/style.css +1 -1
- package/build/components/Select/index.cjs +1 -1
- package/build/components/Select/index.cjs.map +1 -1
- package/build/components/Select/index.js +28 -28
- package/build/components/Select/index.js.map +1 -1
- package/build/components/Select/style.css +1 -1
- package/build/components/Skeleton/style.css +1 -1
- package/build/components/Spinner/style.css +1 -1
- package/build/components/Stat/style.css +1 -1
- package/build/components/StatusDot/style.css +1 -1
- package/build/components/Steps/style.css +1 -1
- package/build/components/SummaryCard/style.css +1 -1
- package/build/components/Switch/index.d.ts +1 -1
- package/build/components/Switch/style.css +1 -1
- package/build/components/Table/style.css +1 -1
- package/build/components/TableCheckbox/style.css +1 -1
- package/build/components/Tabs/style.css +1 -1
- package/build/components/TagInput/style.css +1 -1
- package/build/components/TextLink/style.css +1 -1
- package/build/components/Textarea/style.css +1 -1
- package/build/components/Tile/style.css +1 -1
- package/build/components/Timeline/style.css +1 -1
- package/build/components/Toast/style.css +1 -1
- package/build/components/Tooltip/style.css +1 -1
- package/build/constants/breakpoint.constants.cjs +1 -1
- package/build/constants/breakpoint.constants.cjs.map +1 -1
- package/build/constants/breakpoint.constants.d.ts +13 -8
- package/build/constants/breakpoint.constants.js +7 -5
- package/build/constants/breakpoint.constants.js.map +1 -1
- package/build/enums/ui-size.enum.cjs.map +1 -1
- package/build/enums/ui-size.enum.d.ts +5 -2
- package/build/enums/ui-size.enum.js.map +1 -1
- package/build/enums/ui-variant.enum.cjs +1 -1
- package/build/enums/ui-variant.enum.cjs.map +1 -1
- package/build/enums/ui-variant.enum.d.ts +13 -13
- package/build/enums/ui-variant.enum.js +1 -1
- package/build/enums/ui-variant.enum.js.map +1 -1
- package/build/helpers/theme.helper.cjs +1 -23
- package/build/helpers/theme.helper.cjs.map +1 -1
- package/build/helpers/theme.helper.d.ts +13 -44
- package/build/helpers/theme.helper.js +31 -69
- package/build/helpers/theme.helper.js.map +1 -1
- package/build/hooks/useUiTheme.cjs +1 -1
- package/build/hooks/useUiTheme.cjs.map +1 -1
- package/build/hooks/useUiTheme.d.ts +4 -1
- package/build/hooks/useUiTheme.js +34 -28
- package/build/hooks/useUiTheme.js.map +1 -1
- package/build/hooks/useUiTokens.cjs +1 -1
- package/build/hooks/useUiTokens.cjs.map +1 -1
- package/build/hooks/useUiTokens.d.ts +8 -8
- package/build/hooks/useUiTokens.js +24 -27
- package/build/hooks/useUiTokens.js.map +1 -1
- package/build/index.cjs +1 -1
- package/build/index.d.ts +3 -5
- package/build/index.js +194 -202
- package/build/index.js.map +1 -1
- package/build/scss/_index.scss +4 -3
- package/build/scss/_mixins.scss +264 -146
- package/build/scss/_variables.scss +216 -24
- package/build/styles.css +67 -67
- package/build/theme/UiProvider.cjs +1 -1
- package/build/theme/UiProvider.cjs.map +1 -1
- package/build/theme/UiProvider.d.ts +10 -9
- package/build/theme/UiProvider.js +7 -25
- package/build/theme/UiProvider.js.map +1 -1
- package/build/theme/UiThemeScript.cjs +1 -1
- package/build/theme/UiThemeScript.cjs.map +1 -1
- package/build/theme/UiThemeScript.d.ts +13 -10
- package/build/theme/UiThemeScript.js +2 -2
- package/build/theme/UiThemeScript.js.map +1 -1
- package/build/theme/context.js +2 -2
- package/build/types/charts/core/palette.d.ts +6 -8
- package/build/types/chat/Legend/index.d.ts +3 -2
- package/build/types/theme.type.d.ts +6 -48
- package/build/types/types/theme.type.d.ts +6 -48
- package/package.json +10 -10
- package/build/scss/_colors.generated.scss +0 -119
- package/build/scss/_metrics.generated.scss +0 -49
- package/build/theme/initUi.cjs +0 -2
- package/build/theme/initUi.cjs.map +0 -1
- package/build/theme/initUi.d.ts +0 -7
- package/build/theme/initUi.js +0 -10
- package/build/theme/initUi.js.map +0 -1
- package/build/theme/palette.cjs +0 -2
- package/build/theme/palette.cjs.map +0 -1
- package/build/theme/palette.d.ts +0 -219
- package/build/theme/palette.js +0 -148
- package/build/theme/palette.js.map +0 -1
- package/build/theme/tokens.cjs +0 -2
- package/build/theme/tokens.cjs.map +0 -1
- package/build/theme/tokens.d.ts +0 -225
- package/build/theme/tokens.js +0 -384
- package/build/theme/tokens.js.map +0 -1
- package/build/types/theme/palette.d.ts +0 -219
- package/build/types/theme/tokens.d.ts +0 -225
package/build/chat.js
CHANGED
|
@@ -1,38 +1,39 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as p, jsx as a, Fragment as
|
|
3
|
-
import { memo as g, useRef as L, useEffect as U, forwardRef as
|
|
4
|
-
import { ArrowDown as
|
|
5
|
-
import { useUi as C, useAnnounce as Pe, useStickToBottom as Ke, IconButton as te, Textarea as
|
|
2
|
+
import { jsxs as p, jsx as a, Fragment as We } from "react/jsx-runtime";
|
|
3
|
+
import { memo as g, useRef as L, useEffect as U, forwardRef as Xe, useState as ce, useMemo as pe, Fragment as Je, Children as Qe, isValidElement as Ve, cloneElement as et } from "react";
|
|
4
|
+
import { ArrowDown as tt, StopFill as nt, ArrowUp as st, CheckLg as at, ClipboardFill as it } from "react-bootstrap-icons";
|
|
5
|
+
import { useUi as C, useAnnounce as Pe, useStickToBottom as Ke, IconButton as te, Textarea as rt, hasOpenSurface as ot, Disclosure as Be, Spinner as ct, ScrollArea as lt, StatusDot as dt } from "@handijit/ui";
|
|
6
|
+
import { cssVar as Fe } from "@handijit/design";
|
|
6
7
|
const m = (...e) => {
|
|
7
|
-
let
|
|
8
|
+
let n = "";
|
|
8
9
|
for (const t of e)
|
|
9
|
-
t && (
|
|
10
|
-
return
|
|
11
|
-
}, k = (e,
|
|
12
|
-
for (const t of
|
|
10
|
+
t && (n = n === "" ? t : `${n} ${t}`);
|
|
11
|
+
return n;
|
|
12
|
+
}, k = (e, n) => Object.assign(e, { displayName: n }), he = /* @__PURE__ */ new Set(), x = (e, ...n) => {
|
|
13
|
+
for (const t of n) if (t !== void 0) return t;
|
|
13
14
|
return process.env.NODE_ENV !== "production" && !he.has(e) && (he.add(e), console.error(
|
|
14
15
|
`[@handijit/ui] Eksik metin: ${e}. Prop olarak geçin ya da <UiProvider labels={…}> içinde bir kez tanımlayın. Metinsiz bırakılan öğe ekran okuyucuda adsız kalır.`
|
|
15
16
|
)), "";
|
|
16
|
-
},
|
|
17
|
-
thread:
|
|
18
|
-
thread__scroll:
|
|
19
|
-
thread__column:
|
|
20
|
-
thread__dock:
|
|
21
|
-
thread__latest:
|
|
22
|
-
},
|
|
17
|
+
}, je = (e, n, ...t) => n ? n(...t) : x(e), _t = "ui-thread-R1LCJ", ut = "ui-thread__scroll-37EaI", mt = "ui-thread__column-57FQh", pt = "ui-thread__dock-y0Tt9", ht = "ui-thread__latest-ZNmqY", D = {
|
|
18
|
+
thread: _t,
|
|
19
|
+
thread__scroll: ut,
|
|
20
|
+
thread__column: mt,
|
|
21
|
+
thread__dock: pt,
|
|
22
|
+
thread__latest: ht
|
|
23
|
+
}, bt = ({ children: e, dock: n, isStreaming: t, label: i, className: r, testId: o }) => {
|
|
23
24
|
var f, b, y;
|
|
24
|
-
const { labels:
|
|
25
|
+
const { labels: s } = C(), l = Pe(), c = L(null), { isAtEnd: _, scrollToEnd: d } = Ke(c), u = L(t);
|
|
25
26
|
return U(() => {
|
|
26
27
|
var v;
|
|
27
|
-
u.current && !t && l(x("ChatThread.replyReady", (v =
|
|
28
|
-
}, [l, t, (f =
|
|
28
|
+
u.current && !t && l(x("ChatThread.replyReady", (v = s == null ? void 0 : s.chat) == null ? void 0 : v.replyReady)), u.current = t;
|
|
29
|
+
}, [l, t, (f = s == null ? void 0 : s.chat) == null ? void 0 : f.replyReady]), /* @__PURE__ */ p("div", { className: m(D.thread, r), "data-testid": o, children: [
|
|
29
30
|
/* @__PURE__ */ a(
|
|
30
31
|
"div",
|
|
31
32
|
{
|
|
32
33
|
ref: c,
|
|
33
34
|
className: D.thread__scroll,
|
|
34
35
|
role: "region",
|
|
35
|
-
"aria-label": x("ChatThread.label", i, (b =
|
|
36
|
+
"aria-label": x("ChatThread.label", i, (b = s == null ? void 0 : s.chat) == null ? void 0 : b.thread),
|
|
36
37
|
tabIndex: 0,
|
|
37
38
|
children: /* @__PURE__ */ a("div", { className: D.thread__column, children: e })
|
|
38
39
|
}
|
|
@@ -42,68 +43,68 @@ const m = (...e) => {
|
|
|
42
43
|
te,
|
|
43
44
|
{
|
|
44
45
|
className: D.thread__latest,
|
|
45
|
-
icon: /* @__PURE__ */ a(
|
|
46
|
-
label: x("ChatThread.scrollToLatest", (y =
|
|
46
|
+
icon: /* @__PURE__ */ a(tt, { "aria-hidden": !0 }),
|
|
47
|
+
label: x("ChatThread.scrollToLatest", (y = s == null ? void 0 : s.chat) == null ? void 0 : y.scrollToLatest),
|
|
47
48
|
variant: "outline",
|
|
48
49
|
shape: "round",
|
|
49
50
|
size: "sm",
|
|
50
51
|
onClick: d
|
|
51
52
|
}
|
|
52
53
|
),
|
|
53
|
-
|
|
54
|
+
n !== void 0 && /* @__PURE__ */ a("div", { className: D.thread__column, children: n })
|
|
54
55
|
] })
|
|
55
56
|
] });
|
|
56
|
-
},
|
|
57
|
-
/* @__PURE__ */ k(
|
|
58
|
-
),
|
|
59
|
-
message:
|
|
57
|
+
}, Qs = /* @__PURE__ */ g(
|
|
58
|
+
/* @__PURE__ */ k(bt, "ChatThread")
|
|
59
|
+
), ft = "ui-message-z5uVx", yt = "ui-message__avatar-QzWck", gt = "ui-message__main-1rh-A", kt = "ui-message__body-Ngiqq", wt = "ui-message__actions-dQ0Fn", M = {
|
|
60
|
+
message: ft,
|
|
60
61
|
"message--user": "ui-message--user-Mq6gb",
|
|
61
|
-
message__avatar:
|
|
62
|
-
message__main:
|
|
62
|
+
message__avatar: yt,
|
|
63
|
+
message__main: gt,
|
|
63
64
|
"message--assistant": "ui-message--assistant-ndkmH",
|
|
64
|
-
message__body:
|
|
65
|
-
message__actions:
|
|
66
|
-
},
|
|
65
|
+
message__body: kt,
|
|
66
|
+
message__actions: wt
|
|
67
|
+
}, vt = ({
|
|
67
68
|
author: e,
|
|
68
|
-
children:
|
|
69
|
+
children: n,
|
|
69
70
|
avatar: t,
|
|
70
71
|
actions: i,
|
|
71
72
|
isStreaming: r,
|
|
72
73
|
className: o,
|
|
73
|
-
testId:
|
|
74
|
+
testId: s
|
|
74
75
|
}) => /* @__PURE__ */ p(
|
|
75
76
|
"article",
|
|
76
77
|
{
|
|
77
78
|
className: m(M.message, M[`message--${e}`], o),
|
|
78
79
|
"aria-busy": r || void 0,
|
|
79
|
-
"data-testid":
|
|
80
|
+
"data-testid": s,
|
|
80
81
|
children: [
|
|
81
82
|
e === "assistant" && t !== void 0 && /* @__PURE__ */ a("div", { className: M.message__avatar, children: t }),
|
|
82
83
|
/* @__PURE__ */ p("div", { className: M.message__main, children: [
|
|
83
|
-
/* @__PURE__ */ a("div", { className: M.message__body, children:
|
|
84
|
+
/* @__PURE__ */ a("div", { className: M.message__body, children: n }),
|
|
84
85
|
i !== void 0 && /* @__PURE__ */ a("div", { className: M.message__actions, children: i })
|
|
85
86
|
] })
|
|
86
87
|
]
|
|
87
88
|
}
|
|
88
|
-
),
|
|
89
|
-
/* @__PURE__ */ k(
|
|
90
|
-
),
|
|
91
|
-
prompt:
|
|
92
|
-
prompt__box:
|
|
89
|
+
), Vs = /* @__PURE__ */ g(
|
|
90
|
+
/* @__PURE__ */ k(vt, "ChatMessage")
|
|
91
|
+
), Nt = "ui-prompt-qHV1e", St = "ui-prompt__box-sUQDu", xt = "ui-prompt__field-EmvTZ", Tt = "ui-prompt__start-2tqre", At = "ui-prompt__end-Zp7fi", Ct = "ui-prompt__hint-4TpeC", R = {
|
|
92
|
+
prompt: Nt,
|
|
93
|
+
prompt__box: St,
|
|
93
94
|
"prompt__box--disabled": "ui-prompt__box--disabled-xu-Yk",
|
|
94
|
-
prompt__field:
|
|
95
|
-
prompt__start:
|
|
95
|
+
prompt__field: xt,
|
|
96
|
+
prompt__start: Tt,
|
|
96
97
|
prompt__end: At,
|
|
97
|
-
prompt__hint:
|
|
98
|
-
},
|
|
98
|
+
prompt__hint: Ct
|
|
99
|
+
}, Et = /* @__PURE__ */ Xe(
|
|
99
100
|
({
|
|
100
101
|
value: e,
|
|
101
|
-
onChange:
|
|
102
|
+
onChange: n,
|
|
102
103
|
onSubmit: t,
|
|
103
104
|
onStop: i,
|
|
104
105
|
isBusy: r,
|
|
105
106
|
isDisabled: o,
|
|
106
|
-
isSubmitDisabled:
|
|
107
|
+
isSubmitDisabled: s,
|
|
107
108
|
placeholder: l,
|
|
108
109
|
label: c,
|
|
109
110
|
maxRows: _ = 8,
|
|
@@ -117,19 +118,19 @@ const m = (...e) => {
|
|
|
117
118
|
const { labels: w } = C(), K = e.trim() === "";
|
|
118
119
|
U(() => {
|
|
119
120
|
if (!r || !i) return;
|
|
120
|
-
const
|
|
121
|
-
me.key !== "Escape" || me.defaultPrevented ||
|
|
121
|
+
const T = (me) => {
|
|
122
|
+
me.key !== "Escape" || me.defaultPrevented || ot() || i();
|
|
122
123
|
};
|
|
123
|
-
return document.addEventListener("keydown",
|
|
124
|
+
return document.addEventListener("keydown", T), () => document.removeEventListener("keydown", T);
|
|
124
125
|
}, [r, i]);
|
|
125
|
-
const
|
|
126
|
-
|
|
126
|
+
const Ye = (T) => {
|
|
127
|
+
T.key !== "Enter" || T.shiftKey || T.nativeEvent.isComposing || (T.preventDefault(), !K && !r && !o && !s && t());
|
|
127
128
|
};
|
|
128
129
|
return /* @__PURE__ */ p("div", { className: m(R.prompt, b), "data-testid": y, children: [
|
|
129
130
|
/* @__PURE__ */ p("div", { className: m(R.prompt__box, o && R["prompt__box--disabled"]), children: [
|
|
130
131
|
u !== void 0 && /* @__PURE__ */ a("div", { className: R.prompt__start, children: u }),
|
|
131
132
|
/* @__PURE__ */ a(
|
|
132
|
-
|
|
133
|
+
rt,
|
|
133
134
|
{
|
|
134
135
|
ref: v,
|
|
135
136
|
className: R.prompt__field,
|
|
@@ -141,15 +142,15 @@ const m = (...e) => {
|
|
|
141
142
|
placeholder: l,
|
|
142
143
|
"aria-label": c ?? l,
|
|
143
144
|
disabled: o,
|
|
144
|
-
onChange: (
|
|
145
|
-
onKeyDown:
|
|
145
|
+
onChange: (T) => n(T.target.value),
|
|
146
|
+
onKeyDown: Ye
|
|
146
147
|
}
|
|
147
148
|
),
|
|
148
149
|
f !== void 0 && /* @__PURE__ */ a("div", { className: R.prompt__end, children: f }),
|
|
149
150
|
r ? /* @__PURE__ */ a(
|
|
150
151
|
te,
|
|
151
152
|
{
|
|
152
|
-
icon: /* @__PURE__ */ a(
|
|
153
|
+
icon: /* @__PURE__ */ a(nt, { "aria-hidden": !0 }),
|
|
153
154
|
label: x("PromptInput.stop", (_e = w == null ? void 0 : w.chat) == null ? void 0 : _e.stop),
|
|
154
155
|
variant: "outline",
|
|
155
156
|
shape: "round",
|
|
@@ -164,65 +165,65 @@ const m = (...e) => {
|
|
|
164
165
|
variant: "solid",
|
|
165
166
|
shape: "round",
|
|
166
167
|
onClick: t,
|
|
167
|
-
disabled: K || o ||
|
|
168
|
+
disabled: K || o || s
|
|
168
169
|
}
|
|
169
170
|
)
|
|
170
171
|
] }),
|
|
171
172
|
d !== void 0 && /* @__PURE__ */ a("div", { className: R.prompt__hint, children: d })
|
|
172
173
|
] });
|
|
173
174
|
}
|
|
174
|
-
),
|
|
175
|
-
/* @__PURE__ */ k(
|
|
176
|
-
),
|
|
177
|
-
grid:
|
|
178
|
-
card:
|
|
179
|
-
card__label:
|
|
180
|
-
card__description:
|
|
181
|
-
},
|
|
175
|
+
), ea = /* @__PURE__ */ g(
|
|
176
|
+
/* @__PURE__ */ k(Et, "PromptInput")
|
|
177
|
+
), $t = "ui-grid-4EfQ-", Rt = "ui-card-KTt0-", Ot = "ui-card__label-LNLTF", Lt = "ui-card__description-eIx-0", H = {
|
|
178
|
+
grid: $t,
|
|
179
|
+
card: Rt,
|
|
180
|
+
card__label: Ot,
|
|
181
|
+
card__description: Lt
|
|
182
|
+
}, zt = ({ label: e, items: n, onPick: t, className: i, testId: r }) => /* @__PURE__ */ a("div", { role: "group", "aria-label": e, className: m(H.grid, i), "data-testid": r, children: n.map((o) => /* @__PURE__ */ p("button", { type: "button", className: H.card, onClick: () => t(o), children: [
|
|
182
183
|
/* @__PURE__ */ a("span", { className: H.card__label, children: o.label }),
|
|
183
184
|
o.description && /* @__PURE__ */ a("span", { className: H.card__description, children: o.description })
|
|
184
|
-
] }, o.id)) }),
|
|
185
|
-
/* @__PURE__ */ k(
|
|
186
|
-
),
|
|
187
|
-
prose:
|
|
188
|
-
},
|
|
189
|
-
let t =
|
|
185
|
+
] }, o.id)) }), ta = /* @__PURE__ */ g(
|
|
186
|
+
/* @__PURE__ */ k(zt, "PromptSuggestions")
|
|
187
|
+
), It = "ui-prose-kAp6f", Dt = {
|
|
188
|
+
prose: It
|
|
189
|
+
}, Mt = ({ className: e, testId: n, ...t }) => /* @__PURE__ */ a("div", { className: m(Dt.prose, e), "data-testid": n, ...t }), na = /* @__PURE__ */ g(/* @__PURE__ */ k(Mt, "Prose")), Pt = /^(?:[ \t]*\r?\n)+/, Kt = " ", Bt = (e) => (e == null ? void 0 : e.trim().toLowerCase()) === "json", Ft = (e, n) => {
|
|
190
|
+
let t = n + 1;
|
|
190
191
|
for (; t < e.length && e[t] !== '"'; ) t += e[t] === "\\" ? 2 : 1;
|
|
191
192
|
return t + 1;
|
|
192
|
-
},
|
|
193
|
-
let t =
|
|
193
|
+
}, jt = (e, n) => {
|
|
194
|
+
let t = n;
|
|
194
195
|
for (; t < e.length && /\s/.test(e[t]); ) t++;
|
|
195
196
|
return t;
|
|
196
|
-
},
|
|
197
|
+
}, Zt = (e) => {
|
|
197
198
|
try {
|
|
198
199
|
JSON.parse(e);
|
|
199
200
|
} catch {
|
|
200
201
|
return e;
|
|
201
202
|
}
|
|
202
|
-
let
|
|
203
|
+
let n = "", t = 0;
|
|
203
204
|
const i = () => `
|
|
204
|
-
${
|
|
205
|
+
${Kt.repeat(t)}`;
|
|
205
206
|
for (let r = 0; r < e.length; r++) {
|
|
206
207
|
const o = e[r];
|
|
207
208
|
if (o === '"') {
|
|
208
|
-
const
|
|
209
|
-
|
|
209
|
+
const s = Ft(e, r);
|
|
210
|
+
n += e.slice(r, s), r = s - 1;
|
|
210
211
|
} else if (o === "{" || o === "[") {
|
|
211
|
-
const
|
|
212
|
-
e[
|
|
213
|
-
} else o === "}" || o === "]" ? (t--,
|
|
212
|
+
const s = jt(e, r + 1);
|
|
213
|
+
e[s] === (o === "{" ? "}" : "]") ? (n += o + e[s], r = s) : (t++, n += o + i());
|
|
214
|
+
} else o === "}" || o === "]" ? (t--, n += i() + o) : o === "," ? n += `,${i()}` : o === ":" ? n += ": " : /\s/.test(o) || (n += o);
|
|
214
215
|
}
|
|
215
|
-
return
|
|
216
|
-
},
|
|
217
|
-
const t = e.replace(
|
|
218
|
-
return
|
|
219
|
-
}, h = (e) => new Set(e.split(" ")), $ = /"(?:[^"\\\n]|\\.)*"?/, G = /'(?:[^'\\\n]|\\.)*'?/,
|
|
216
|
+
return n;
|
|
217
|
+
}, Ut = (e, n) => {
|
|
218
|
+
const t = e.replace(Pt, "").trimEnd();
|
|
219
|
+
return Bt(n) ? Zt(t) : t;
|
|
220
|
+
}, h = (e) => new Set(e.split(" ")), $ = /"(?:[^"\\\n]|\\.)*"?/, G = /'(?:[^'\\\n]|\\.)*'?/, Ze = /`(?:[^`\\]|\\[\s\S])*`?/, le = /"""[\s\S]*?(?:"""|(?![\s\S]))/, Gt = /'''[\s\S]*?(?:'''|(?![\s\S]))/, qt = /'(?:\\[^\n]{1,8}?|[^'\\\n])'/, ne = /\/\/.*/, q = /\/\*[\s\S]*?(?:\*\/|(?![\s\S]))/, z = /#.*/, P = /\b(?:0[xX][\dA-Fa-f_]+|0[bB][01_]+|0[oO][0-7_]+|\d[\d_]*(?:\.\d[\d_]*)?(?:[eE][+-]?\d+)?)[A-Za-z]*\b/, I = /[A-Za-z_]\w*/, se = /[{}[\]();,.:]/, de = /@[A-Za-z_][\w.]*/, Ht = /[\w$)\]]/, be = /\S/, fe = "break case catch class const continue debugger default delete do else export extends finally for function if import in instanceof let new return super switch this throw try typeof var void while with yield async await of static get set as from", Yt = "type interface enum implements namespace declare abstract private protected public readonly keyof infer is satisfies override module asserts unique", Wt = "true false null undefined NaN Infinity", Xt = "string number boolean any unknown never object symbol bigint", Jt = "int long short char float double bool boolean byte void unsigned signed string str usize isize u8 u16 u32 u64 u128 i8 i16 i32 i64 i128 f32 f64 rune uint uint8 uint16 uint32 uint64 int8 int16 int32 int64 float32 float64 error any decimal size_t", Qt = "true false null nil nullptr NULL", Ue = "auto break case const continue default do else enum extern for goto if inline register restrict return sizeof static struct switch typedef union volatile while", Vt = `${Ue} alignas alignof catch class constexpr consteval const_cast decltype delete dynamic_cast explicit export friend mutable namespace new noexcept operator private protected public reinterpret_cast static_assert static_cast template this thread_local throw try typeid typename using virtual override final concept requires co_await co_return co_yield`, en = "abstract as async await base break case catch checked class const continue default delegate do dynamic else enum event explicit extern finally fixed for foreach get goto if implicit in init interface internal is lock namespace new operator out override params partial private protected public readonly record ref return sealed set sizeof stackalloc static struct switch this throw try typeof unchecked unsafe using var virtual volatile when where while yield", tn = "abstract assert break case catch class const continue default do else enum extends final finally for goto if implements import instanceof interface native new package permits private protected public record return sealed static strictfp super switch synchronized this throw throws transient try var volatile while yield", nn = "abstract annotation as break by catch class companion const constructor continue crossinline data do else enum external final finally for fun get if import in infix init inline inner interface internal is lateinit noinline object open operator out override package private protected public reified return sealed set super suspend this throw try typealias val var vararg when where while", sn = "actor as associatedtype async await break case catch class continue default defer deinit do else enum extension fallthrough fileprivate final for func guard if import in init inout internal is lazy let mutating open operator override private protocol public repeat rethrows return self Self some static struct subscript super switch throw throws try typealias var weak where while", an = "break case chan const continue default defer else fallthrough for func go goto if import interface map package range return select struct switch type var", rn = "as async await break const continue crate dyn else enum extern fn for if impl in let loop match mod move mut pub ref return self Self static struct super trait type unsafe use where while", on = "abstract and array as break callable case catch class clone const continue declare default do echo else elseif empty extends final finally fn for foreach function global goto if implements include include_once instanceof insteadof interface isset list match namespace new or print private protected public readonly require require_once return static switch throw trait try unset use var while xor yield", cn = "if then else elif fi for while until do done case esac in function return local export select time break continue declare readonly unset shift source alias exit", ln = "FROM AS RUN CMD LABEL EXPOSE ENV ADD COPY ENTRYPOINT VOLUME USER WORKDIR ARG ONBUILD STOPSIGNAL HEALTHCHECK SHELL MAINTAINER", ae = (e, n) => ({
|
|
220
221
|
rules: [
|
|
221
|
-
["comment",
|
|
222
|
+
["comment", ne],
|
|
222
223
|
["comment", q],
|
|
223
224
|
["string", $],
|
|
224
225
|
["string", G],
|
|
225
|
-
["string",
|
|
226
|
+
["string", Ze],
|
|
226
227
|
/*
|
|
227
228
|
* Düzenli ifade. Tamamı (kapanış `/` ve bayraklar) önce gelir; alternatifler AYRIK olduğu
|
|
228
229
|
* için geri dönüş doğrusaldır.
|
|
@@ -237,39 +238,39 @@ ${Pt.repeat(t)}`;
|
|
|
237
238
|
* Bileşen etiketi yalnızca JSX'te; TS'te `<` bir tür parametresi ya da karşılaştırma. Açılış
|
|
238
239
|
* etiketi addan sonra gelemez (`useState<string>`); kapanış gelebilir (`Kaydet</Button>`).
|
|
239
240
|
*/
|
|
240
|
-
...
|
|
241
|
+
...n ? [
|
|
241
242
|
["tag", /<\/[A-Za-z][\w.:-]*/],
|
|
242
|
-
["tag", /<[A-Za-z][\w.:-]*/,
|
|
243
|
+
["tag", /<[A-Za-z][\w.:-]*/, Ht]
|
|
243
244
|
] : [],
|
|
244
245
|
["name", de],
|
|
245
246
|
["number", P],
|
|
246
247
|
["word", /[A-Za-z_$][\w$]*/],
|
|
247
|
-
["punctuation",
|
|
248
|
+
["punctuation", se]
|
|
248
249
|
],
|
|
249
|
-
keywords: h(e ? `${fe} ${
|
|
250
|
-
literals: h(
|
|
251
|
-
types: e ? h(
|
|
250
|
+
keywords: h(e ? `${fe} ${Yt}` : fe),
|
|
251
|
+
literals: h(Wt),
|
|
252
|
+
types: e ? h(Xt) : void 0,
|
|
252
253
|
hasCapitalTypes: !0
|
|
253
|
-
}),
|
|
254
|
+
}), A = (e, n = []) => ({
|
|
254
255
|
rules: [
|
|
255
|
-
...
|
|
256
|
-
["comment",
|
|
256
|
+
...n,
|
|
257
|
+
["comment", ne],
|
|
257
258
|
["comment", q],
|
|
258
259
|
/* Önişlemci (`#include`) ve Rust özniteliği (`#[derive(Debug)]`). */
|
|
259
260
|
["keyword", /^[ \t]*#[ \t]*[a-z]+|#!?\[[^\]\n]*\]/],
|
|
260
261
|
["string", le],
|
|
261
262
|
["string", $],
|
|
262
|
-
["string",
|
|
263
|
+
["string", qt],
|
|
263
264
|
/* Go'nun ham dizesi. */
|
|
264
|
-
["string",
|
|
265
|
+
["string", Ze],
|
|
265
266
|
["name", de],
|
|
266
267
|
["number", P],
|
|
267
268
|
["word", I],
|
|
268
|
-
["punctuation",
|
|
269
|
+
["punctuation", se]
|
|
269
270
|
],
|
|
270
271
|
keywords: h(e),
|
|
271
|
-
literals: h(
|
|
272
|
-
types: h(
|
|
272
|
+
literals: h(Qt),
|
|
273
|
+
types: h(Jt),
|
|
273
274
|
hasCapitalTypes: !0
|
|
274
275
|
}), ye = () => ({
|
|
275
276
|
rules: [
|
|
@@ -282,7 +283,7 @@ ${Pt.repeat(t)}`;
|
|
|
282
283
|
["name", de],
|
|
283
284
|
["number", P],
|
|
284
285
|
["word", I],
|
|
285
|
-
["punctuation",
|
|
286
|
+
["punctuation", se]
|
|
286
287
|
],
|
|
287
288
|
keywords: h(
|
|
288
289
|
"and as assert async await break class continue def del elif else except finally for from global if import in is lambda nonlocal not or pass raise return try while with yield match case"
|
|
@@ -300,14 +301,14 @@ ${Pt.repeat(t)}`;
|
|
|
300
301
|
["name", /@{1,2}[A-Za-z_]\w*/],
|
|
301
302
|
["number", P],
|
|
302
303
|
["word", /[A-Za-z_]\w*[?!]?/],
|
|
303
|
-
["punctuation",
|
|
304
|
+
["punctuation", se]
|
|
304
305
|
],
|
|
305
306
|
keywords: h(
|
|
306
307
|
"alias and begin break case class def defined? do else elsif end ensure for if in module next not or redo rescue retry return self super then undef unless until when while yield require require_relative attr_accessor attr_reader attr_writer private protected public raise"
|
|
307
308
|
),
|
|
308
309
|
literals: h("true false nil"),
|
|
309
310
|
hasCapitalTypes: !0
|
|
310
|
-
}),
|
|
311
|
+
}), Ge = (e) => ({
|
|
311
312
|
rules: [
|
|
312
313
|
/* `#` yorum açar yalnızca kelime başında: `$#`, `a#b` yorum değil. */
|
|
313
314
|
["comment", z, /[^\s;|&(]/],
|
|
@@ -322,7 +323,7 @@ ${Pt.repeat(t)}`;
|
|
|
322
323
|
keywords: h(e)
|
|
323
324
|
}), ke = () => ({
|
|
324
325
|
rules: [
|
|
325
|
-
["comment",
|
|
326
|
+
["comment", ne],
|
|
326
327
|
["comment", q],
|
|
327
328
|
/* Anahtar: ardından `:` gelen dize. */
|
|
328
329
|
["name", /"(?:[^"\\\n]|\\.)*"(?=\s*:)/],
|
|
@@ -349,13 +350,13 @@ ${Pt.repeat(t)}`;
|
|
|
349
350
|
["word", I]
|
|
350
351
|
],
|
|
351
352
|
literals: h("true false null True False Null TRUE FALSE NULL")
|
|
352
|
-
}),
|
|
353
|
+
}), dn = () => ({
|
|
353
354
|
rules: [
|
|
354
355
|
["comment", z],
|
|
355
356
|
["type", /^[ \t]*\[\[?[^\]\n]*\]\]?/],
|
|
356
357
|
["name", /(?:"[^"\n]*"|[\w.-]+)(?=[ \t]*=)/],
|
|
357
358
|
["string", le],
|
|
358
|
-
["string",
|
|
359
|
+
["string", Gt],
|
|
359
360
|
["string", $],
|
|
360
361
|
["string", /'[^'\n]*'?/],
|
|
361
362
|
[
|
|
@@ -370,7 +371,7 @@ ${Pt.repeat(t)}`;
|
|
|
370
371
|
rules: [
|
|
371
372
|
["comment", q],
|
|
372
373
|
/* SCSS/Less satır yorumu; `url(http://…)` içindeki `//` değil. */
|
|
373
|
-
["comment",
|
|
374
|
+
["comment", ne, /:/],
|
|
374
375
|
["string", $],
|
|
375
376
|
["string", G],
|
|
376
377
|
["keyword", /@[\w-]+|!important\b/],
|
|
@@ -403,7 +404,7 @@ ${Pt.repeat(t)}`;
|
|
|
403
404
|
["string", /`[^`\n]+`/],
|
|
404
405
|
["name", /!?\[[^\]\n]*\]\([^)\n]*\)/]
|
|
405
406
|
]
|
|
406
|
-
}),
|
|
407
|
+
}), _n = () => ({
|
|
407
408
|
rules: [
|
|
408
409
|
["comment", /--.*/],
|
|
409
410
|
["comment", q],
|
|
@@ -446,14 +447,14 @@ ${Pt.repeat(t)}`;
|
|
|
446
447
|
/* `ID` tamamı büyük harf ama sabit değil, yerleşik tip. */
|
|
447
448
|
types: h("ID"),
|
|
448
449
|
hasCapitalTypes: !0
|
|
449
|
-
}),
|
|
450
|
+
}), un = () => ({
|
|
450
451
|
rules: [
|
|
451
452
|
["tag", /<\/?[A-Za-z][\w:.-]*/],
|
|
452
453
|
["string", /"[^"]*"?|'[^']*'?/],
|
|
453
454
|
["name", /[^\s"'<>/=]+/],
|
|
454
455
|
["punctuation", /\/?>|=/]
|
|
455
456
|
]
|
|
456
|
-
}), W = () => ae(!1, !1),
|
|
457
|
+
}), W = () => ae(!1, !1), mn = () => ae(!1, !0), X = () => ae(!0, !1), pn = () => ae(!0, !0), B = () => Ge(cn), xe = () => Ge(ln), Te = () => A(Ue), re = () => A(Vt), Ae = () => A(en), Ce = () => A(nn), Ee = () => A(an), $e = () => A(rn), hn = () => A(on, [
|
|
457
458
|
["comment", z],
|
|
458
459
|
["name", /\$[A-Za-z_]\w*/],
|
|
459
460
|
["string", G]
|
|
@@ -462,12 +463,12 @@ ${Pt.repeat(t)}`;
|
|
|
462
463
|
js: W,
|
|
463
464
|
mjs: W,
|
|
464
465
|
cjs: W,
|
|
465
|
-
jsx:
|
|
466
|
+
jsx: mn,
|
|
466
467
|
typescript: X,
|
|
467
468
|
ts: X,
|
|
468
469
|
mts: X,
|
|
469
470
|
cts: X,
|
|
470
|
-
tsx:
|
|
471
|
+
tsx: pn,
|
|
471
472
|
json: ke,
|
|
472
473
|
jsonc: ke,
|
|
473
474
|
bash: B,
|
|
@@ -483,7 +484,7 @@ ${Pt.repeat(t)}`;
|
|
|
483
484
|
rb: ge,
|
|
484
485
|
yaml: we,
|
|
485
486
|
yml: we,
|
|
486
|
-
toml:
|
|
487
|
+
toml: dn,
|
|
487
488
|
css: ie,
|
|
488
489
|
scss: ie,
|
|
489
490
|
less: ie,
|
|
@@ -493,28 +494,28 @@ ${Pt.repeat(t)}`;
|
|
|
493
494
|
vue: Y,
|
|
494
495
|
markdown: ve,
|
|
495
496
|
md: ve,
|
|
496
|
-
sql:
|
|
497
|
+
sql: _n,
|
|
497
498
|
diff: Ne,
|
|
498
499
|
patch: Ne,
|
|
499
500
|
graphql: Se,
|
|
500
501
|
gql: Se,
|
|
501
|
-
c:
|
|
502
|
-
h:
|
|
502
|
+
c: Te,
|
|
503
|
+
h: Te,
|
|
503
504
|
cpp: re,
|
|
504
505
|
"c++": re,
|
|
505
506
|
hpp: re,
|
|
506
|
-
csharp:
|
|
507
|
-
cs:
|
|
508
|
-
java: () =>
|
|
507
|
+
csharp: Ae,
|
|
508
|
+
cs: Ae,
|
|
509
|
+
java: () => A(tn),
|
|
509
510
|
kotlin: Ce,
|
|
510
511
|
kt: Ce,
|
|
511
|
-
swift: () =>
|
|
512
|
+
swift: () => A(sn),
|
|
512
513
|
go: Ee,
|
|
513
514
|
golang: Ee,
|
|
514
515
|
rust: $e,
|
|
515
516
|
rs: $e,
|
|
516
|
-
php:
|
|
517
|
-
},
|
|
517
|
+
php: hn
|
|
518
|
+
}, bn = 2e4, Oe = /!?[ \t]*\(/y, fn = /^[A-Z][A-Z\d_]+$/, yn = /[(,=:[!&|?{};~+\-*%<>^]/, gn = /* @__PURE__ */ new Set([
|
|
518
519
|
"return",
|
|
519
520
|
"typeof",
|
|
520
521
|
"case",
|
|
@@ -528,72 +529,72 @@ ${Pt.repeat(t)}`;
|
|
|
528
529
|
"throw",
|
|
529
530
|
"yield",
|
|
530
531
|
"await"
|
|
531
|
-
]), Le = /* @__PURE__ */ new Map(),
|
|
532
|
-
const
|
|
533
|
-
if (
|
|
532
|
+
]), Le = /* @__PURE__ */ new Map(), qe = (e) => {
|
|
533
|
+
const n = Le.get(e);
|
|
534
|
+
if (n) return n;
|
|
534
535
|
const t = e(), r = { pattern: new RegExp(t.rules.map(([, o]) => `(${o.source})`).join("|"), "gm"), grammar: t };
|
|
535
536
|
return Le.set(e, r), r;
|
|
536
|
-
},
|
|
537
|
-
const
|
|
538
|
-
return
|
|
539
|
-
},
|
|
540
|
-
let t =
|
|
537
|
+
}, kn = (e) => {
|
|
538
|
+
const n = e == null ? void 0 : e.trim().toLowerCase();
|
|
539
|
+
return n && Object.hasOwn(Re, n) ? Re[n] : void 0;
|
|
540
|
+
}, wn = (e, n) => {
|
|
541
|
+
let t = n - 1;
|
|
541
542
|
for (; t >= 0 && /\s/.test(e[t]); ) t--;
|
|
542
|
-
if (t < 0 ||
|
|
543
|
+
if (t < 0 || yn.test(e[t])) return !0;
|
|
543
544
|
const i = t + 1;
|
|
544
545
|
for (; t >= 0 && /[\w$]/.test(e[t]); ) t--;
|
|
545
|
-
return
|
|
546
|
-
},
|
|
546
|
+
return gn.has(e.slice(t + 1, i));
|
|
547
|
+
}, vn = (e, n, t, i, r) => {
|
|
547
548
|
var l, c, _;
|
|
548
549
|
Oe.lastIndex = r;
|
|
549
550
|
const o = Oe.test(t);
|
|
550
551
|
if (t[i - 1] === ".") return o ? "name" : void 0;
|
|
551
|
-
const
|
|
552
|
-
if ((l = e.keywords) != null && l.has(
|
|
553
|
-
if ((c = e.literals) != null && c.has(
|
|
554
|
-
if ((_ = e.types) != null && _.has(
|
|
552
|
+
const s = e.isCaseInsensitive ? n.toLowerCase() : n;
|
|
553
|
+
if ((l = e.keywords) != null && l.has(s)) return "keyword";
|
|
554
|
+
if ((c = e.literals) != null && c.has(s)) return "number";
|
|
555
|
+
if ((_ = e.types) != null && _.has(s)) return "type";
|
|
555
556
|
if (o) return "name";
|
|
556
|
-
if (e.hasCapitalTypes && /^[A-Z]/.test(
|
|
557
|
-
return
|
|
558
|
-
},
|
|
559
|
-
const i = [], r = (
|
|
560
|
-
if (!
|
|
557
|
+
if (e.hasCapitalTypes && /^[A-Z]/.test(n))
|
|
558
|
+
return fn.test(n) ? "number" : "type";
|
|
559
|
+
}, He = ({ pattern: e, grammar: n }, t) => {
|
|
560
|
+
const i = [], r = (s, l) => {
|
|
561
|
+
if (!s) return;
|
|
561
562
|
const c = i.at(-1);
|
|
562
|
-
c && c.type === l ? c.text +=
|
|
563
|
+
c && c.type === l ? c.text += s : i.push({ text: s, type: l });
|
|
563
564
|
};
|
|
564
565
|
let o = 0;
|
|
565
566
|
e.lastIndex = 0;
|
|
566
|
-
for (let
|
|
567
|
-
const [l] =
|
|
567
|
+
for (let s = e.exec(t); s; s = e.exec(t)) {
|
|
568
|
+
const [l] = s, { index: c } = s, _ = c + l.length;
|
|
568
569
|
if (_ === c) {
|
|
569
570
|
e.lastIndex = c + 1;
|
|
570
571
|
continue;
|
|
571
572
|
}
|
|
572
|
-
const [d, , u] =
|
|
573
|
-
if (u !== void 0 && c > 0 && u.test(t[c - 1]) || d === "regex" && !
|
|
573
|
+
const [d, , u] = n.rules[s.indexOf(l, 1) - 1];
|
|
574
|
+
if (u !== void 0 && c > 0 && u.test(t[c - 1]) || d === "regex" && !wn(t, c)) {
|
|
574
575
|
e.lastIndex = c + 1;
|
|
575
576
|
continue;
|
|
576
577
|
}
|
|
577
|
-
if (r(t.slice(o, c)), o = _, d === "word") r(l,
|
|
578
|
+
if (r(t.slice(o, c)), o = _, d === "word") r(l, vn(n, l, t, c, _));
|
|
578
579
|
else if (d === "regex") r(l, "string");
|
|
579
580
|
else if (d === "tag") {
|
|
580
581
|
const b = l[1] === "/" ? 2 : 1, y = l.slice(b);
|
|
581
582
|
r(l.slice(0, b), "punctuation"), r(y, /^[A-Z]/.test(y) || y.includes(".") ? "type" : "keyword");
|
|
582
583
|
} else if (d === "markup")
|
|
583
|
-
for (const b of qe(
|
|
584
|
+
for (const b of He(qe(un), l)) r(b.text, b.type);
|
|
584
585
|
else r(l, d);
|
|
585
586
|
}
|
|
586
587
|
return r(t.slice(o)), i;
|
|
587
|
-
},
|
|
588
|
-
const t =
|
|
589
|
-
return t && e.length <=
|
|
590
|
-
},
|
|
591
|
-
block:
|
|
592
|
-
block__header:
|
|
593
|
-
block__language:
|
|
594
|
-
block__body:
|
|
595
|
-
block__pre:
|
|
596
|
-
block__highlighted:
|
|
588
|
+
}, Nn = (e, n) => {
|
|
589
|
+
const t = kn(n);
|
|
590
|
+
return t && e.length <= bn ? He(qe(t), e) : [{ text: e }];
|
|
591
|
+
}, Sn = "ui-block-M1yL9", xn = "ui-block__header-F2iBP", Tn = "ui-block__language-lmdS9", An = "ui-block__body-wDCJ2", Cn = "ui-block__pre--EERi", En = "ui-block__highlighted-JK1Yj", O = {
|
|
592
|
+
block: Sn,
|
|
593
|
+
block__header: xn,
|
|
594
|
+
block__language: Tn,
|
|
595
|
+
block__body: An,
|
|
596
|
+
block__pre: Cn,
|
|
597
|
+
block__highlighted: En,
|
|
597
598
|
"block__token--comment": "ui-block__token--comment-eFTyh",
|
|
598
599
|
"block__token--keyword": "ui-block__token--keyword-qQpj9",
|
|
599
600
|
"block__token--string": "ui-block__token--string-4onwX",
|
|
@@ -603,9 +604,9 @@ ${Pt.repeat(t)}`;
|
|
|
603
604
|
"block__token--punctuation": "ui-block__token--punctuation-Te2u8",
|
|
604
605
|
"block__token--inserted": "ui-block__token--inserted-sUKnQ",
|
|
605
606
|
"block__token--deleted": "ui-block__token--deleted-s74a-"
|
|
606
|
-
},
|
|
607
|
+
}, $n = 1600, Rn = ({ code: e, language: n, html: t, maxHeight: i, className: r, testId: o }) => {
|
|
607
608
|
var v;
|
|
608
|
-
const { labels:
|
|
609
|
+
const { labels: s } = C(), l = Pe(), [c, _] = ce(!1), d = L(void 0), u = pe(() => t ? e : Ut(e, n), [e, t, n]), f = pe(() => t ? [] : Nn(u, n), [u, t, n]);
|
|
609
610
|
U(() => () => window.clearTimeout(d.current), []);
|
|
610
611
|
const b = async () => {
|
|
611
612
|
var w;
|
|
@@ -614,16 +615,16 @@ ${Pt.repeat(t)}`;
|
|
|
614
615
|
} catch {
|
|
615
616
|
return;
|
|
616
617
|
}
|
|
617
|
-
_(!0), l(x("CodeBlock.copied", (w =
|
|
618
|
-
}, y =
|
|
618
|
+
_(!0), l(x("CodeBlock.copied", (w = s == null ? void 0 : s.chat) == null ? void 0 : w.codeCopied)), window.clearTimeout(d.current), d.current = window.setTimeout(() => _(!1), $n);
|
|
619
|
+
}, y = n ?? "";
|
|
619
620
|
return /* @__PURE__ */ p("figure", { className: m(O.block, r), "data-testid": o, children: [
|
|
620
621
|
/* @__PURE__ */ p("figcaption", { className: O.block__header, children: [
|
|
621
622
|
/* @__PURE__ */ a("span", { className: O.block__language, children: y }),
|
|
622
623
|
/* @__PURE__ */ a(
|
|
623
624
|
te,
|
|
624
625
|
{
|
|
625
|
-
icon: c ? /* @__PURE__ */ a(
|
|
626
|
-
label:
|
|
626
|
+
icon: c ? /* @__PURE__ */ a(at, { "aria-hidden": !0 }) : /* @__PURE__ */ a(it, { "aria-hidden": !0 }),
|
|
627
|
+
label: je("CodeBlock.copy", (v = s == null ? void 0 : s.chat) == null ? void 0 : v.codeCopy, y),
|
|
627
628
|
size: "sm",
|
|
628
629
|
onClick: b
|
|
629
630
|
}
|
|
@@ -638,90 +639,90 @@ ${Pt.repeat(t)}`;
|
|
|
638
639
|
role: y ? "region" : void 0,
|
|
639
640
|
"aria-label": y || void 0,
|
|
640
641
|
children: t ? /* @__PURE__ */ a("div", { className: O.block__highlighted, dangerouslySetInnerHTML: { __html: t } }) : /* @__PURE__ */ a("pre", { className: O.block__pre, children: /* @__PURE__ */ a("code", { children: f.map(
|
|
641
|
-
(w, K) => w.type ? /* @__PURE__ */ a("span", { className: O[`block__token--${w.type}`], children: w.text }, K) : /* @__PURE__ */ a(
|
|
642
|
+
(w, K) => w.type ? /* @__PURE__ */ a("span", { className: O[`block__token--${w.type}`], children: w.text }, K) : /* @__PURE__ */ a(Je, { children: w.text }, K)
|
|
642
643
|
) }) })
|
|
643
644
|
}
|
|
644
645
|
)
|
|
645
646
|
] });
|
|
646
|
-
},
|
|
647
|
-
block:
|
|
648
|
-
block__summary:
|
|
649
|
-
block__indicator:
|
|
650
|
-
block__body:
|
|
651
|
-
},
|
|
647
|
+
}, sa = /* @__PURE__ */ g(/* @__PURE__ */ k(Rn, "CodeBlock")), On = "ui-block-zqPjp", Ln = "ui-block__summary-Kkp-X", zn = "ui-block__indicator-GuJMa", In = "ui-block__body-mDvrV", J = {
|
|
648
|
+
block: On,
|
|
649
|
+
block__summary: Ln,
|
|
650
|
+
block__indicator: zn,
|
|
651
|
+
block__body: In
|
|
652
|
+
}, Dn = ({
|
|
652
653
|
summary: e,
|
|
653
|
-
isRunning:
|
|
654
|
+
isRunning: n = !1,
|
|
654
655
|
indicator: t,
|
|
655
656
|
isDefaultOpen: i = !1,
|
|
656
657
|
children: r,
|
|
657
658
|
className: o,
|
|
658
|
-
testId:
|
|
659
|
+
testId: s
|
|
659
660
|
}) => {
|
|
660
|
-
const [l, c] = ce(
|
|
661
|
+
const [l, c] = ce(n || i), _ = L(!1);
|
|
661
662
|
return U(() => {
|
|
662
|
-
_.current || c(
|
|
663
|
-
}, [
|
|
663
|
+
_.current || c(n || i);
|
|
664
|
+
}, [n, i]), /* @__PURE__ */ a(
|
|
664
665
|
Be,
|
|
665
666
|
{
|
|
666
667
|
variant: "plain",
|
|
667
668
|
className: m(J.block, o),
|
|
668
669
|
summary: /* @__PURE__ */ p("span", { className: J.block__summary, children: [
|
|
669
|
-
|
|
670
|
+
n && /* @__PURE__ */ a("span", { className: J.block__indicator, children: t ?? /* @__PURE__ */ a(ct, { size: "sm" }) }),
|
|
670
671
|
e
|
|
671
672
|
] }),
|
|
672
673
|
isOpen: l,
|
|
673
674
|
onOpenChange: (d) => {
|
|
674
675
|
_.current = !0, c(d);
|
|
675
676
|
},
|
|
676
|
-
testId:
|
|
677
|
+
testId: s,
|
|
677
678
|
children: /* @__PURE__ */ a("div", { className: J.block__body, children: r })
|
|
678
679
|
}
|
|
679
680
|
);
|
|
680
|
-
},
|
|
681
|
-
/* @__PURE__ */ k(
|
|
682
|
-
),
|
|
683
|
-
text:
|
|
684
|
-
text__body:
|
|
685
|
-
},
|
|
686
|
-
|
|
681
|
+
}, aa = /* @__PURE__ */ g(
|
|
682
|
+
/* @__PURE__ */ k(Dn, "ReasoningBlock")
|
|
683
|
+
), Mn = "ui-text-WKVxU", Pn = "ui-text__body--uP0k", ze = {
|
|
684
|
+
text: Mn,
|
|
685
|
+
text__body: Pn
|
|
686
|
+
}, Kn = ({ text: e, label: n, maxHeight: t = 180, className: i, testId: r }) => /* @__PURE__ */ a(
|
|
687
|
+
lt,
|
|
687
688
|
{
|
|
688
689
|
className: m(ze.text, i),
|
|
689
|
-
label:
|
|
690
|
+
label: n,
|
|
690
691
|
maxHeight: t,
|
|
691
692
|
hasFade: !0,
|
|
692
693
|
isFollowingEnd: !0,
|
|
693
694
|
testId: r,
|
|
694
695
|
children: /* @__PURE__ */ a("p", { className: ze.text__body, children: e })
|
|
695
696
|
}
|
|
696
|
-
),
|
|
697
|
-
/* @__PURE__ */ k(
|
|
698
|
-
),
|
|
699
|
-
call:
|
|
697
|
+
), ia = /* @__PURE__ */ g(
|
|
698
|
+
/* @__PURE__ */ k(Kn, "ReasoningText")
|
|
699
|
+
), Bn = "ui-call-tV2P8", Fn = "ui-call__header-8Tw7m", jn = "ui-call__icon-TLzwf", Zn = "ui-call__name-EHz6G", Un = "ui-call__summary-M4sLU", Gn = "ui-call__meta-bvpp7", qn = "ui-call__body-nFK-C", Hn = "ui-section-TjSGF", Yn = "ui-section__label-UrgqM", Wn = "ui-section__body-Dy1PX", N = {
|
|
700
|
+
call: Bn,
|
|
700
701
|
"call--static": "ui-call--static-Nldru",
|
|
701
|
-
call__header:
|
|
702
|
-
call__icon:
|
|
702
|
+
call__header: Fn,
|
|
703
|
+
call__icon: jn,
|
|
703
704
|
"call__icon--running": "ui-call__icon--running-Mx1XK",
|
|
704
|
-
call__name:
|
|
705
|
-
call__summary:
|
|
706
|
-
call__meta:
|
|
707
|
-
call__body:
|
|
708
|
-
section:
|
|
709
|
-
section__label:
|
|
710
|
-
section__body:
|
|
711
|
-
},
|
|
705
|
+
call__name: Zn,
|
|
706
|
+
call__summary: Un,
|
|
707
|
+
call__meta: Gn,
|
|
708
|
+
call__body: qn,
|
|
709
|
+
section: Hn,
|
|
710
|
+
section__label: Yn,
|
|
711
|
+
section__body: Wn
|
|
712
|
+
}, Xn = {
|
|
712
713
|
running: "neutral",
|
|
713
714
|
ok: "success",
|
|
714
715
|
error: "danger",
|
|
715
716
|
aborted: "warning",
|
|
716
717
|
interrupted: "danger"
|
|
717
|
-
},
|
|
718
|
+
}, Jn = ({
|
|
718
719
|
icon: e,
|
|
719
|
-
name:
|
|
720
|
+
name: n,
|
|
720
721
|
summary: t,
|
|
721
722
|
status: i,
|
|
722
723
|
meta: r,
|
|
723
724
|
isDefaultOpen: o,
|
|
724
|
-
isOpen:
|
|
725
|
+
isOpen: s,
|
|
725
726
|
onOpenChange: l,
|
|
726
727
|
children: c,
|
|
727
728
|
className: _,
|
|
@@ -737,9 +738,9 @@ ${Pt.repeat(t)}`;
|
|
|
737
738
|
children: e
|
|
738
739
|
}
|
|
739
740
|
),
|
|
740
|
-
/* @__PURE__ */ a("span", { className: N.call__name, children:
|
|
741
|
+
/* @__PURE__ */ a("span", { className: N.call__name, children: n }),
|
|
741
742
|
t !== void 0 && /* @__PURE__ */ a("span", { className: N.call__summary, children: t }),
|
|
742
|
-
/* @__PURE__ */ a(
|
|
743
|
+
/* @__PURE__ */ a(dt, { tone: Xn[i], label: f, isPulsing: i === "running" })
|
|
743
744
|
] });
|
|
744
745
|
return c === void 0 ? /* @__PURE__ */ p("div", { className: m(N.call, N["call--static"], _), "data-testid": d, children: [
|
|
745
746
|
b,
|
|
@@ -751,39 +752,39 @@ ${Pt.repeat(t)}`;
|
|
|
751
752
|
summary: b,
|
|
752
753
|
meta: r,
|
|
753
754
|
isDefaultOpen: o,
|
|
754
|
-
isOpen:
|
|
755
|
+
isOpen: s,
|
|
755
756
|
onOpenChange: l,
|
|
756
757
|
testId: d,
|
|
757
758
|
children: /* @__PURE__ */ a("div", { className: N.call__body, children: c })
|
|
758
759
|
}
|
|
759
760
|
);
|
|
760
|
-
},
|
|
761
|
+
}, ra = ({ label: e, children: n, className: t }) => (
|
|
761
762
|
/*
|
|
762
763
|
* Başlık bir HEADING değil: sohbet akışında başlık düzeyi tüketicinin sayfasına bağlı ve sabit bir
|
|
763
764
|
* `h4` hiyerarşiyi bozuyordu. Bölüm de bir landmark değil (her araç kartında bir "bölge" gürültü).
|
|
764
765
|
*/
|
|
765
766
|
/* @__PURE__ */ p("div", { className: m(N.section, t), children: [
|
|
766
767
|
/* @__PURE__ */ a("span", { className: N.section__label, children: e }),
|
|
767
|
-
/* @__PURE__ */ a("div", { className: N.section__body, children:
|
|
768
|
+
/* @__PURE__ */ a("div", { className: N.section__body, children: n })
|
|
768
769
|
] })
|
|
769
|
-
),
|
|
770
|
-
terminal:
|
|
771
|
-
terminal__command:
|
|
772
|
-
terminal__prompt:
|
|
773
|
-
terminal__stderr:
|
|
774
|
-
terminal__srOnly:
|
|
775
|
-
},
|
|
770
|
+
), oa = /* @__PURE__ */ g(/* @__PURE__ */ k(Jn, "ToolCall")), Qn = "ui-terminal-D4Bz8", Vn = "ui-terminal__command-A7PG2", es = "ui-terminal__prompt-9N1g2", ts = "ui-terminal__stderr-qCNFe", ns = "ui-terminal__srOnly-2pmQA", F = {
|
|
771
|
+
terminal: Qn,
|
|
772
|
+
terminal__command: Vn,
|
|
773
|
+
terminal__prompt: es,
|
|
774
|
+
terminal__stderr: ts,
|
|
775
|
+
terminal__srOnly: ns
|
|
776
|
+
}, ss = ({
|
|
776
777
|
command: e,
|
|
777
|
-
chunks:
|
|
778
|
+
chunks: n,
|
|
778
779
|
label: t,
|
|
779
780
|
maxHeight: i = 300,
|
|
780
781
|
className: r,
|
|
781
782
|
testId: o
|
|
782
783
|
}) => {
|
|
783
784
|
var _;
|
|
784
|
-
const { labels:
|
|
785
|
+
const { labels: s } = C(), l = L(null);
|
|
785
786
|
Ke(l);
|
|
786
|
-
const c = x("TerminalOutput.stderr", (_ =
|
|
787
|
+
const c = x("TerminalOutput.stderr", (_ = s == null ? void 0 : s.chat) == null ? void 0 : _.stderr);
|
|
787
788
|
return /* @__PURE__ */ p(
|
|
788
789
|
"pre",
|
|
789
790
|
{
|
|
@@ -804,7 +805,7 @@ ${Pt.repeat(t)}`;
|
|
|
804
805
|
`
|
|
805
806
|
`
|
|
806
807
|
] }),
|
|
807
|
-
|
|
808
|
+
n.map(
|
|
808
809
|
(d, u) => d.stream === "stderr" ? /* @__PURE__ */ p("span", { className: F.terminal__stderr, children: [
|
|
809
810
|
/* @__PURE__ */ a("span", { className: F.terminal__srOnly, children: `${c}: ` }),
|
|
810
811
|
d.text
|
|
@@ -813,53 +814,53 @@ ${Pt.repeat(t)}`;
|
|
|
813
814
|
]
|
|
814
815
|
}
|
|
815
816
|
);
|
|
816
|
-
},
|
|
817
|
-
/* @__PURE__ */ k(
|
|
818
|
-
),
|
|
819
|
-
list:
|
|
820
|
-
list__item:
|
|
821
|
-
list__index:
|
|
822
|
-
list__text:
|
|
823
|
-
list__title:
|
|
824
|
-
list__plain:
|
|
825
|
-
list__domain:
|
|
826
|
-
},
|
|
817
|
+
}, ca = /* @__PURE__ */ g(
|
|
818
|
+
/* @__PURE__ */ k(ss, "TerminalOutput")
|
|
819
|
+
), as = "ui-list-GC4NK", is = "ui-list__item-N8DAn", rs = "ui-list__index-VrSMs", os = "ui-list__text-4tll-", cs = "ui-list__title-seHfJ", ls = "ui-list__plain-ZcCvx", ds = "ui-list__domain-sJLI7", E = {
|
|
820
|
+
list: as,
|
|
821
|
+
list__item: is,
|
|
822
|
+
list__index: rs,
|
|
823
|
+
list__text: os,
|
|
824
|
+
list__title: cs,
|
|
825
|
+
list__plain: ls,
|
|
826
|
+
list__domain: ds
|
|
827
|
+
}, _s = ({ items: e, label: n, className: t, testId: i }) => {
|
|
827
828
|
var o;
|
|
828
829
|
const { labels: r } = C();
|
|
829
830
|
return /* @__PURE__ */ a(
|
|
830
831
|
"ol",
|
|
831
832
|
{
|
|
832
833
|
className: m(E.list, t),
|
|
833
|
-
"aria-label": x("SourceList.label",
|
|
834
|
+
"aria-label": x("SourceList.label", n, (o = r == null ? void 0 : r.chat) == null ? void 0 : o.sources),
|
|
834
835
|
"data-testid": i,
|
|
835
|
-
children: e.map((
|
|
836
|
+
children: e.map((s, l) => /* @__PURE__ */ p("li", { className: E.list__item, children: [
|
|
836
837
|
/* @__PURE__ */ a("span", { className: E.list__index, "aria-hidden": !0, children: l + 1 }),
|
|
837
838
|
/* @__PURE__ */ p("span", { className: E.list__text, children: [
|
|
838
|
-
|
|
839
|
+
s.url ? /* @__PURE__ */ a(
|
|
839
840
|
"a",
|
|
840
841
|
{
|
|
841
842
|
className: E.list__title,
|
|
842
|
-
href:
|
|
843
|
+
href: s.url,
|
|
843
844
|
target: "_blank",
|
|
844
845
|
rel: "noopener noreferrer",
|
|
845
|
-
children:
|
|
846
|
+
children: s.title
|
|
846
847
|
}
|
|
847
|
-
) :
|
|
848
|
-
|
|
848
|
+
) : s.onSelect ? /* @__PURE__ */ a("button", { type: "button", className: E.list__title, onClick: s.onSelect, children: s.title }) : /* @__PURE__ */ a("span", { className: E.list__plain, children: s.title }),
|
|
849
|
+
s.domain && /* @__PURE__ */ a("span", { className: E.list__domain, children: s.domain })
|
|
849
850
|
] })
|
|
850
|
-
] },
|
|
851
|
+
] }, s.id))
|
|
851
852
|
}
|
|
852
853
|
);
|
|
853
|
-
},
|
|
854
|
-
/* @__PURE__ */ k(
|
|
855
|
-
),
|
|
856
|
-
citation:
|
|
857
|
-
citation__srOnly:
|
|
854
|
+
}, la = /* @__PURE__ */ g(
|
|
855
|
+
/* @__PURE__ */ k(_s, "SourceList")
|
|
856
|
+
), us = "ui-citation-XrGMb", ms = "ui-citation__srOnly-GnMQp", j = {
|
|
857
|
+
citation: us,
|
|
858
|
+
citation__srOnly: ms,
|
|
858
859
|
"citation--static": "ui-citation--static-8gXHs"
|
|
859
|
-
},
|
|
860
|
-
var
|
|
861
|
-
const { labels: r } = C(), o =
|
|
862
|
-
return
|
|
860
|
+
}, ps = ({ index: e, href: n, onClick: t, className: i }) => {
|
|
861
|
+
var s;
|
|
862
|
+
const { labels: r } = C(), o = je("Citation.label", (s = r == null ? void 0 : r.chat) == null ? void 0 : s.citation, e);
|
|
863
|
+
return n ? /* @__PURE__ */ a("a", { className: m(j.citation, i), href: n, "aria-label": o, children: e }) : t ? /* @__PURE__ */ a(
|
|
863
864
|
"button",
|
|
864
865
|
{
|
|
865
866
|
type: "button",
|
|
@@ -872,14 +873,14 @@ ${Pt.repeat(t)}`;
|
|
|
872
873
|
/* @__PURE__ */ a("span", { "aria-hidden": !0, children: e }),
|
|
873
874
|
/* @__PURE__ */ a("span", { className: j.citation__srOnly, children: o })
|
|
874
875
|
] });
|
|
875
|
-
},
|
|
876
|
-
actions:
|
|
877
|
-
actions__meta:
|
|
878
|
-
},
|
|
876
|
+
}, da = /* @__PURE__ */ g(/* @__PURE__ */ k(ps, "Citation")), hs = "ui-actions-c8XlJ", bs = "ui-actions__meta-j-X3I", Ie = {
|
|
877
|
+
actions: hs,
|
|
878
|
+
actions__meta: bs
|
|
879
|
+
}, fs = "button:not(:disabled), a[href]", ys = ({ children: e, meta: n, label: t, className: i, testId: r }) => {
|
|
879
880
|
var c;
|
|
880
|
-
const { labels: o } = C(),
|
|
881
|
+
const { labels: o } = C(), s = L(null), l = (_) => {
|
|
881
882
|
var w;
|
|
882
|
-
const d = [...((w =
|
|
883
|
+
const d = [...((w = s.current) == null ? void 0 : w.querySelectorAll(fs)) ?? []], u = d.indexOf(document.activeElement);
|
|
883
884
|
if (u < 0 || d.length === 0) return;
|
|
884
885
|
const f = getComputedStyle(_.currentTarget).direction === "rtl", b = f ? "ArrowLeft" : "ArrowRight", y = f ? "ArrowRight" : "ArrowLeft", v = _.key === b ? d[(u + 1) % d.length] : _.key === y ? d[(u - 1 + d.length) % d.length] : _.key === "Home" ? d[0] : _.key === "End" ? d[d.length - 1] : null;
|
|
885
886
|
v && (_.preventDefault(), v.focus());
|
|
@@ -887,7 +888,7 @@ ${Pt.repeat(t)}`;
|
|
|
887
888
|
return /* @__PURE__ */ p(
|
|
888
889
|
"div",
|
|
889
890
|
{
|
|
890
|
-
ref:
|
|
891
|
+
ref: s,
|
|
891
892
|
role: "toolbar",
|
|
892
893
|
"aria-label": x("MessageActions.label", t, (c = o == null ? void 0 : o.chat) == null ? void 0 : c.messageActions),
|
|
893
894
|
className: m(Ie.actions, i),
|
|
@@ -895,62 +896,62 @@ ${Pt.repeat(t)}`;
|
|
|
895
896
|
"data-testid": r,
|
|
896
897
|
children: [
|
|
897
898
|
e,
|
|
898
|
-
|
|
899
|
+
n !== void 0 && /* @__PURE__ */ a("span", { className: Ie.actions__meta, children: n })
|
|
899
900
|
]
|
|
900
901
|
}
|
|
901
902
|
);
|
|
902
|
-
},
|
|
903
|
-
/* @__PURE__ */ k(
|
|
904
|
-
),
|
|
905
|
-
bar:
|
|
906
|
-
bar__brand:
|
|
907
|
-
bar__start:
|
|
908
|
-
bar__end:
|
|
909
|
-
}, De = "--ui-header-height",
|
|
903
|
+
}, _a = /* @__PURE__ */ g(
|
|
904
|
+
/* @__PURE__ */ k(ys, "MessageActions")
|
|
905
|
+
), gs = "ui-bar-UJGDL", ks = "ui-bar__brand-ZUcIw", ws = "ui-bar__start-nvmHH", vs = "ui-bar__end-NNQve", Q = {
|
|
906
|
+
bar: gs,
|
|
907
|
+
bar__brand: ks,
|
|
908
|
+
bar__start: ws,
|
|
909
|
+
bar__end: vs
|
|
910
|
+
}, De = "--ui-header-height", Ns = ({ brand: e, start: n, end: t, className: i, testId: r }) => {
|
|
910
911
|
const o = L(null);
|
|
911
912
|
return U(() => {
|
|
912
|
-
const
|
|
913
|
-
if (!
|
|
913
|
+
const s = o.current;
|
|
914
|
+
if (!s || typeof ResizeObserver > "u") return;
|
|
914
915
|
const l = document.documentElement, c = new ResizeObserver(
|
|
915
916
|
([_]) => {
|
|
916
917
|
var d, u;
|
|
917
918
|
return l.style.setProperty(
|
|
918
919
|
De,
|
|
919
|
-
`${Math.round(((u = (d = _.borderBoxSize) == null ? void 0 : d[0]) == null ? void 0 : u.blockSize) ??
|
|
920
|
+
`${Math.round(((u = (d = _.borderBoxSize) == null ? void 0 : d[0]) == null ? void 0 : u.blockSize) ?? s.offsetHeight)}px`
|
|
920
921
|
);
|
|
921
922
|
}
|
|
922
923
|
);
|
|
923
|
-
return c.observe(
|
|
924
|
+
return c.observe(s), () => {
|
|
924
925
|
c.disconnect(), l.style.removeProperty(De);
|
|
925
926
|
};
|
|
926
927
|
}, []), /* @__PURE__ */ p("header", { ref: o, className: m(Q.bar, i), "data-testid": r, children: [
|
|
927
928
|
/* @__PURE__ */ a("div", { className: Q.bar__brand, children: e }),
|
|
928
|
-
|
|
929
|
+
n !== void 0 && /* @__PURE__ */ a("div", { className: Q.bar__start, children: n }),
|
|
929
930
|
t !== void 0 && /* @__PURE__ */ a("div", { className: Q.bar__end, children: t })
|
|
930
931
|
] });
|
|
931
|
-
},
|
|
932
|
-
list:
|
|
932
|
+
}, ua = /* @__PURE__ */ g(/* @__PURE__ */ k(Ns, "AppBar")), Ss = "ui-list-e54gu", xs = "ui-list__window-ESrZX", Ts = "ui-list__slot-DxSnX", As = "ui-item-DKEGh", Cs = "ui-item__start-Yb3xf", Es = "ui-item__body-kD4Qk", $s = "ui-item__end-3SCT-", S = {
|
|
933
|
+
list: Ss,
|
|
933
934
|
"list--virtual": "ui-list--virtual-zxqy5",
|
|
934
|
-
list__window:
|
|
935
|
-
list__slot:
|
|
936
|
-
item:
|
|
935
|
+
list__window: xs,
|
|
936
|
+
list__slot: Ts,
|
|
937
|
+
item: As,
|
|
937
938
|
"item--selected": "ui-item--selected-AMl3I",
|
|
938
939
|
"item--muted": "ui-item--muted-XBeA3",
|
|
939
|
-
item__start:
|
|
940
|
-
item__body:
|
|
941
|
-
item__end:
|
|
942
|
-
}, Me = 6,
|
|
940
|
+
item__start: Cs,
|
|
941
|
+
item__body: Es,
|
|
942
|
+
item__end: $s
|
|
943
|
+
}, Me = 6, Rs = ({
|
|
943
944
|
label: e,
|
|
944
|
-
children:
|
|
945
|
+
children: n,
|
|
945
946
|
rowHeight: t,
|
|
946
947
|
maxHeight: i = 320,
|
|
947
948
|
className: r,
|
|
948
949
|
testId: o
|
|
949
950
|
}) => {
|
|
950
|
-
const
|
|
951
|
+
const s = Qe.toArray(n).filter(Ve), [l, c] = ce(0);
|
|
951
952
|
if (!t)
|
|
952
|
-
return /* @__PURE__ */ a("ul", { className: m(S.list, r), "aria-label": e, "data-testid": o, children:
|
|
953
|
-
const _ = Math.max(0, Math.floor(l / t) - Me), d = Math.min(
|
|
953
|
+
return /* @__PURE__ */ a("ul", { className: m(S.list, r), "aria-label": e, "data-testid": o, children: s });
|
|
954
|
+
const _ = Math.max(0, Math.floor(l / t) - Me), d = Math.min(s.length, Math.ceil((l + i) / t) + Me);
|
|
954
955
|
return /* @__PURE__ */ a(
|
|
955
956
|
"div",
|
|
956
957
|
{
|
|
@@ -964,27 +965,27 @@ ${Pt.repeat(t)}`;
|
|
|
964
965
|
"aria-label": e,
|
|
965
966
|
className: S.list__window,
|
|
966
967
|
style: {
|
|
967
|
-
blockSize:
|
|
968
|
+
blockSize: s.length * t,
|
|
968
969
|
paddingBlockStart: _ * t
|
|
969
970
|
},
|
|
970
|
-
children:
|
|
971
|
-
(u, f) =>
|
|
971
|
+
children: s.slice(_, d).map(
|
|
972
|
+
(u, f) => et(u, {
|
|
972
973
|
"aria-posinset": _ + f + 1,
|
|
973
|
-
"aria-setsize":
|
|
974
|
+
"aria-setsize": s.length
|
|
974
975
|
})
|
|
975
976
|
)
|
|
976
977
|
}
|
|
977
978
|
)
|
|
978
979
|
}
|
|
979
980
|
);
|
|
980
|
-
},
|
|
981
|
+
}, ma = ({
|
|
981
982
|
children: e,
|
|
982
|
-
start:
|
|
983
|
+
start: n,
|
|
983
984
|
end: t,
|
|
984
985
|
onClick: i,
|
|
985
986
|
href: r,
|
|
986
987
|
isSelected: o,
|
|
987
|
-
isMuted:
|
|
988
|
+
isMuted: s,
|
|
988
989
|
testId: l,
|
|
989
990
|
"aria-posinset": c,
|
|
990
991
|
"aria-setsize": _
|
|
@@ -992,9 +993,9 @@ ${Pt.repeat(t)}`;
|
|
|
992
993
|
const { linkComponent: d } = C(), u = m(
|
|
993
994
|
S.item,
|
|
994
995
|
o && S["item--selected"],
|
|
995
|
-
|
|
996
|
-
), f = /* @__PURE__ */ p(
|
|
997
|
-
|
|
996
|
+
s && S["item--muted"]
|
|
997
|
+
), f = /* @__PURE__ */ p(We, { children: [
|
|
998
|
+
n !== void 0 && /* @__PURE__ */ a("span", { className: S.item__start, children: n }),
|
|
998
999
|
/* @__PURE__ */ a("span", { className: S.item__body, children: e }),
|
|
999
1000
|
t !== void 0 && /* @__PURE__ */ a("span", { className: S.item__end, children: t })
|
|
1000
1001
|
] }), b = d ?? "a";
|
|
@@ -1009,15 +1010,15 @@ ${Pt.repeat(t)}`;
|
|
|
1009
1010
|
children: f
|
|
1010
1011
|
}
|
|
1011
1012
|
) });
|
|
1012
|
-
},
|
|
1013
|
-
/* @__PURE__ */ k(
|
|
1014
|
-
),
|
|
1015
|
-
bar:
|
|
1016
|
-
bar__segment:
|
|
1017
|
-
bar__marker:
|
|
1013
|
+
}, pa = /* @__PURE__ */ g(
|
|
1014
|
+
/* @__PURE__ */ k(Rs, "ActionList")
|
|
1015
|
+
), Os = "ui-bar-OZjXz", Ls = "ui-bar__segment-hexbp", zs = "ui-bar__marker-E0FeF", V = {
|
|
1016
|
+
bar: Os,
|
|
1017
|
+
bar__segment: Ls,
|
|
1018
|
+
bar__marker: zs,
|
|
1018
1019
|
"bar__marker--danger": "ui-bar__marker--danger-245FK"
|
|
1019
|
-
}, ee = (e,
|
|
1020
|
-
const
|
|
1020
|
+
}, ee = (e, n) => n <= 0 ? 0 : Math.min(100, Math.max(0, e / n * 100)), Is = (e) => Fe(e === "muted" ? "text-3" : e), Ds = ({ label: e, max: n, segments: t, markers: i = [], className: r, testId: o }) => {
|
|
1021
|
+
const s = [
|
|
1021
1022
|
...t.map((c) => c.label),
|
|
1022
1023
|
...i.map((c) => c.label)
|
|
1023
1024
|
];
|
|
@@ -1026,7 +1027,7 @@ ${Pt.repeat(t)}`;
|
|
|
1026
1027
|
"div",
|
|
1027
1028
|
{
|
|
1028
1029
|
role: "img",
|
|
1029
|
-
"aria-label": `${e}: ${
|
|
1030
|
+
"aria-label": `${e}: ${s.join(", ")}`,
|
|
1030
1031
|
className: m(V.bar, r),
|
|
1031
1032
|
"data-testid": o,
|
|
1032
1033
|
children: [
|
|
@@ -1038,9 +1039,9 @@ ${Pt.repeat(t)}`;
|
|
|
1038
1039
|
className: V.bar__segment,
|
|
1039
1040
|
title: c.label,
|
|
1040
1041
|
style: {
|
|
1041
|
-
insetInlineStart: `${ee(_,
|
|
1042
|
-
inlineSize: `${ee(d,
|
|
1043
|
-
backgroundColor:
|
|
1042
|
+
insetInlineStart: `${ee(_, n)}%`,
|
|
1043
|
+
inlineSize: `${ee(d, n) - ee(_, n)}%`,
|
|
1044
|
+
backgroundColor: Is(c.tone)
|
|
1044
1045
|
}
|
|
1045
1046
|
},
|
|
1046
1047
|
c.id
|
|
@@ -1054,36 +1055,36 @@ ${Pt.repeat(t)}`;
|
|
|
1054
1055
|
c.tone === "danger" && V["bar__marker--danger"]
|
|
1055
1056
|
),
|
|
1056
1057
|
title: c.label,
|
|
1057
|
-
style: { insetInlineStart: `${ee(c.at,
|
|
1058
|
+
style: { insetInlineStart: `${ee(c.at, n)}%` }
|
|
1058
1059
|
},
|
|
1059
1060
|
c.id
|
|
1060
1061
|
))
|
|
1061
1062
|
]
|
|
1062
1063
|
}
|
|
1063
1064
|
);
|
|
1064
|
-
},
|
|
1065
|
-
/* @__PURE__ */ k(
|
|
1066
|
-
),
|
|
1067
|
-
legend:
|
|
1068
|
-
legend__item:
|
|
1069
|
-
legend__swatch:
|
|
1070
|
-
},
|
|
1065
|
+
}, ha = /* @__PURE__ */ g(
|
|
1066
|
+
/* @__PURE__ */ k(Ds, "SegmentBar")
|
|
1067
|
+
), Ms = "ui-legend-zryov", Ps = "ui-legend__item-GGrR-", Ks = "ui-legend__swatch-2MkAR", oe = {
|
|
1068
|
+
legend: Ms,
|
|
1069
|
+
legend__item: Ps,
|
|
1070
|
+
legend__swatch: Ks
|
|
1071
|
+
}, Bs = (e) => Fe(e === "muted" ? "text-3" : e), Fs = ({ items: e, className: n, testId: t }) => /* @__PURE__ */ a("ul", { className: m(oe.legend, n), "data-testid": t, children: e.map((i) => /* @__PURE__ */ p("li", { className: oe.legend__item, children: [
|
|
1071
1072
|
/* @__PURE__ */ a(
|
|
1072
1073
|
"span",
|
|
1073
1074
|
{
|
|
1074
1075
|
"aria-hidden": !0,
|
|
1075
1076
|
className: oe.legend__swatch,
|
|
1076
|
-
style: { backgroundColor:
|
|
1077
|
+
style: { backgroundColor: Bs(i.tone) }
|
|
1077
1078
|
}
|
|
1078
1079
|
),
|
|
1079
1080
|
i.label
|
|
1080
|
-
] }, i.id)) }),
|
|
1081
|
-
list:
|
|
1082
|
-
list__row:
|
|
1083
|
-
list__term:
|
|
1084
|
-
list__value:
|
|
1081
|
+
] }, i.id)) }), ba = /* @__PURE__ */ g(/* @__PURE__ */ k(Fs, "Legend")), js = "ui-list-KSLu5", Zs = "ui-list__row-k7aHp", Us = "ui-list__term-vsD5B", Gs = "ui-list__value-6GY6z", Z = {
|
|
1082
|
+
list: js,
|
|
1083
|
+
list__row: Zs,
|
|
1084
|
+
list__term: Us,
|
|
1085
|
+
list__value: Gs,
|
|
1085
1086
|
"list__value--technical": "ui-list__value--technical-I-UYE"
|
|
1086
|
-
},
|
|
1087
|
+
}, qs = ({ items: e, className: n, testId: t }) => /* @__PURE__ */ a("dl", { className: m(Z.list, n), "data-testid": t, children: e.map((i, r) => /* @__PURE__ */ p("div", { className: Z.list__row, children: [
|
|
1087
1088
|
/* @__PURE__ */ a("dt", { className: Z.list__term, children: i.term }),
|
|
1088
1089
|
/* @__PURE__ */ a(
|
|
1089
1090
|
"dd",
|
|
@@ -1092,29 +1093,29 @@ ${Pt.repeat(t)}`;
|
|
|
1092
1093
|
children: i.description
|
|
1093
1094
|
}
|
|
1094
1095
|
)
|
|
1095
|
-
] }, r)) }),
|
|
1096
|
-
/* @__PURE__ */ k(
|
|
1096
|
+
] }, r)) }), fa = /* @__PURE__ */ g(
|
|
1097
|
+
/* @__PURE__ */ k(qs, "DescriptionList")
|
|
1097
1098
|
);
|
|
1098
1099
|
export {
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1100
|
+
pa as ActionList,
|
|
1101
|
+
ma as ActionListItem,
|
|
1102
|
+
ua as AppBar,
|
|
1103
|
+
Vs as ChatMessage,
|
|
1104
|
+
Qs as ChatThread,
|
|
1105
|
+
da as Citation,
|
|
1106
|
+
sa as CodeBlock,
|
|
1107
|
+
fa as DescriptionList,
|
|
1108
|
+
ba as Legend,
|
|
1109
|
+
_a as MessageActions,
|
|
1110
|
+
ea as PromptInput,
|
|
1111
|
+
ta as PromptSuggestions,
|
|
1112
|
+
na as Prose,
|
|
1113
|
+
aa as ReasoningBlock,
|
|
1114
|
+
ia as ReasoningText,
|
|
1115
|
+
ha as SegmentBar,
|
|
1116
|
+
la as SourceList,
|
|
1117
|
+
ca as TerminalOutput,
|
|
1118
|
+
oa as ToolCall,
|
|
1119
|
+
ra as ToolCallSection
|
|
1119
1120
|
};
|
|
1120
1121
|
//# sourceMappingURL=chat.js.map
|