@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.
Files changed (174) hide show
  1. package/README.md +485 -571
  2. package/build/base.css +1 -1
  3. package/build/charts.cjs +1 -1
  4. package/build/charts.cjs.map +1 -1
  5. package/build/charts.css +1 -1
  6. package/build/charts.js +350 -349
  7. package/build/charts.js.map +1 -1
  8. package/build/chat.cjs +3 -3
  9. package/build/chat.cjs.map +1 -1
  10. package/build/chat.css +1 -1
  11. package/build/chat.js +344 -343
  12. package/build/chat.js.map +1 -1
  13. package/build/components/Accordion/style.css +1 -1
  14. package/build/components/Alert/style.css +1 -1
  15. package/build/components/Avatar/style.css +1 -1
  16. package/build/components/Badge/index.cjs +1 -1
  17. package/build/components/Badge/index.cjs.map +1 -1
  18. package/build/components/Badge/index.d.ts +8 -13
  19. package/build/components/Badge/index.js +1 -1
  20. package/build/components/Badge/index.js.map +1 -1
  21. package/build/components/Badge/style.css +1 -1
  22. package/build/components/BottomSheet/style.css +1 -1
  23. package/build/components/Breadcrumb/style.css +1 -1
  24. package/build/components/Button/index.cjs +1 -1
  25. package/build/components/Button/index.cjs.map +1 -1
  26. package/build/components/Button/index.js +2 -2
  27. package/build/components/Button/index.js.map +1 -1
  28. package/build/components/Button/style.css +1 -1
  29. package/build/components/Card/style.css +1 -1
  30. package/build/components/Carousel/style.css +1 -1
  31. package/build/components/Checkbox/style.css +1 -1
  32. package/build/components/Chip/style.css +1 -1
  33. package/build/components/ChipGroup/style.css +1 -1
  34. package/build/components/CodeBadge/style.css +1 -1
  35. package/build/components/Combobox/index.cjs +1 -1
  36. package/build/components/Combobox/index.cjs.map +1 -1
  37. package/build/components/Combobox/index.js +51 -51
  38. package/build/components/Combobox/index.js.map +1 -1
  39. package/build/components/Combobox/style.css +1 -1
  40. package/build/components/CommandPalette/style.css +1 -1
  41. package/build/components/CopyField/style.css +1 -1
  42. package/build/components/DataTable/style.css +1 -1
  43. package/build/components/DateField/index.d.ts +1 -1
  44. package/build/components/DateField/style.css +1 -1
  45. package/build/components/Directory/style.css +1 -1
  46. package/build/components/Disclosure/style.css +1 -1
  47. package/build/components/Divider/style.css +1 -1
  48. package/build/components/Drawer/style.css +1 -1
  49. package/build/components/EmptyState/style.css +1 -1
  50. package/build/components/Field/style.css +1 -1
  51. package/build/components/FileUpload/style.css +1 -1
  52. package/build/components/FilterBar/style.css +1 -1
  53. package/build/components/IconButton/index.cjs +1 -1
  54. package/build/components/IconButton/index.cjs.map +1 -1
  55. package/build/components/IconButton/index.d.ts +2 -2
  56. package/build/components/IconButton/index.js +1 -1
  57. package/build/components/IconButton/index.js.map +1 -1
  58. package/build/components/IconButton/style.css +1 -1
  59. package/build/components/Input/index.d.ts +1 -1
  60. package/build/components/Input/style.css +1 -1
  61. package/build/components/Kbd/style.css +1 -1
  62. package/build/components/Menu/style.css +1 -1
  63. package/build/components/Modal/style.css +1 -1
  64. package/build/components/PageHeader/style.css +1 -1
  65. package/build/components/Pagination/style.css +1 -1
  66. package/build/components/Panel/style.css +1 -1
  67. package/build/components/PasswordInput/style.css +1 -1
  68. package/build/components/Popover/style.css +1 -1
  69. package/build/components/Price/style.css +1 -1
  70. package/build/components/Progress/style.css +1 -1
  71. package/build/components/PromptDialog/style.css +1 -1
  72. package/build/components/QuantityStepper/style.css +1 -1
  73. package/build/components/Radio/style.css +1 -1
  74. package/build/components/RadioCard/style.css +1 -1
  75. package/build/components/RangeSlider/style.css +1 -1
  76. package/build/components/Rating/style.css +1 -1
  77. package/build/components/RatingInput/style.css +1 -1
  78. package/build/components/ScrollArea/style.css +1 -1
  79. package/build/components/SectionHeader/style.css +1 -1
  80. package/build/components/SegmentedControl/style.css +1 -1
  81. package/build/components/Select/index.cjs +1 -1
  82. package/build/components/Select/index.cjs.map +1 -1
  83. package/build/components/Select/index.js +28 -28
  84. package/build/components/Select/index.js.map +1 -1
  85. package/build/components/Select/style.css +1 -1
  86. package/build/components/Skeleton/style.css +1 -1
  87. package/build/components/Spinner/style.css +1 -1
  88. package/build/components/Stat/style.css +1 -1
  89. package/build/components/StatusDot/style.css +1 -1
  90. package/build/components/Steps/style.css +1 -1
  91. package/build/components/SummaryCard/style.css +1 -1
  92. package/build/components/Switch/index.d.ts +1 -1
  93. package/build/components/Switch/style.css +1 -1
  94. package/build/components/Table/style.css +1 -1
  95. package/build/components/TableCheckbox/style.css +1 -1
  96. package/build/components/Tabs/style.css +1 -1
  97. package/build/components/TagInput/style.css +1 -1
  98. package/build/components/TextLink/style.css +1 -1
  99. package/build/components/Textarea/style.css +1 -1
  100. package/build/components/Tile/style.css +1 -1
  101. package/build/components/Timeline/style.css +1 -1
  102. package/build/components/Toast/style.css +1 -1
  103. package/build/components/Tooltip/style.css +1 -1
  104. package/build/constants/breakpoint.constants.cjs +1 -1
  105. package/build/constants/breakpoint.constants.cjs.map +1 -1
  106. package/build/constants/breakpoint.constants.d.ts +13 -8
  107. package/build/constants/breakpoint.constants.js +7 -5
  108. package/build/constants/breakpoint.constants.js.map +1 -1
  109. package/build/enums/ui-size.enum.cjs.map +1 -1
  110. package/build/enums/ui-size.enum.d.ts +5 -2
  111. package/build/enums/ui-size.enum.js.map +1 -1
  112. package/build/enums/ui-variant.enum.cjs +1 -1
  113. package/build/enums/ui-variant.enum.cjs.map +1 -1
  114. package/build/enums/ui-variant.enum.d.ts +13 -13
  115. package/build/enums/ui-variant.enum.js +1 -1
  116. package/build/enums/ui-variant.enum.js.map +1 -1
  117. package/build/helpers/theme.helper.cjs +1 -23
  118. package/build/helpers/theme.helper.cjs.map +1 -1
  119. package/build/helpers/theme.helper.d.ts +13 -44
  120. package/build/helpers/theme.helper.js +31 -69
  121. package/build/helpers/theme.helper.js.map +1 -1
  122. package/build/hooks/useUiTheme.cjs +1 -1
  123. package/build/hooks/useUiTheme.cjs.map +1 -1
  124. package/build/hooks/useUiTheme.d.ts +4 -1
  125. package/build/hooks/useUiTheme.js +34 -28
  126. package/build/hooks/useUiTheme.js.map +1 -1
  127. package/build/hooks/useUiTokens.cjs +1 -1
  128. package/build/hooks/useUiTokens.cjs.map +1 -1
  129. package/build/hooks/useUiTokens.d.ts +8 -8
  130. package/build/hooks/useUiTokens.js +24 -27
  131. package/build/hooks/useUiTokens.js.map +1 -1
  132. package/build/index.cjs +1 -1
  133. package/build/index.d.ts +3 -5
  134. package/build/index.js +194 -202
  135. package/build/index.js.map +1 -1
  136. package/build/scss/_index.scss +4 -3
  137. package/build/scss/_mixins.scss +264 -146
  138. package/build/scss/_variables.scss +216 -24
  139. package/build/styles.css +67 -67
  140. package/build/theme/UiProvider.cjs +1 -1
  141. package/build/theme/UiProvider.cjs.map +1 -1
  142. package/build/theme/UiProvider.d.ts +10 -9
  143. package/build/theme/UiProvider.js +7 -25
  144. package/build/theme/UiProvider.js.map +1 -1
  145. package/build/theme/UiThemeScript.cjs +1 -1
  146. package/build/theme/UiThemeScript.cjs.map +1 -1
  147. package/build/theme/UiThemeScript.d.ts +13 -10
  148. package/build/theme/UiThemeScript.js +2 -2
  149. package/build/theme/UiThemeScript.js.map +1 -1
  150. package/build/theme/context.js +2 -2
  151. package/build/types/charts/core/palette.d.ts +6 -8
  152. package/build/types/chat/Legend/index.d.ts +3 -2
  153. package/build/types/theme.type.d.ts +6 -48
  154. package/build/types/types/theme.type.d.ts +6 -48
  155. package/package.json +10 -10
  156. package/build/scss/_colors.generated.scss +0 -119
  157. package/build/scss/_metrics.generated.scss +0 -49
  158. package/build/theme/initUi.cjs +0 -2
  159. package/build/theme/initUi.cjs.map +0 -1
  160. package/build/theme/initUi.d.ts +0 -7
  161. package/build/theme/initUi.js +0 -10
  162. package/build/theme/initUi.js.map +0 -1
  163. package/build/theme/palette.cjs +0 -2
  164. package/build/theme/palette.cjs.map +0 -1
  165. package/build/theme/palette.d.ts +0 -219
  166. package/build/theme/palette.js +0 -148
  167. package/build/theme/palette.js.map +0 -1
  168. package/build/theme/tokens.cjs +0 -2
  169. package/build/theme/tokens.cjs.map +0 -1
  170. package/build/theme/tokens.d.ts +0 -225
  171. package/build/theme/tokens.js +0 -384
  172. package/build/theme/tokens.js.map +0 -1
  173. package/build/types/theme/palette.d.ts +0 -219
  174. 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 Ye } from "react/jsx-runtime";
3
- import { memo as g, useRef as L, useEffect as U, forwardRef as We, useState as ce, useMemo as pe, Fragment as Xe, Children as Je, isValidElement as Qe, cloneElement as Ve } from "react";
4
- import { ArrowDown as et, StopFill as tt, ArrowUp as st, CheckLg as nt, ClipboardFill as at } from "react-bootstrap-icons";
5
- import { useUi as C, useAnnounce as Pe, useStickToBottom as Ke, IconButton as te, Textarea as it, hasOpenSurface as rt, Disclosure as Be, Spinner as ot, ScrollArea as ct, StatusDot as lt } from "@handijit/ui";
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 s = "";
8
+ let n = "";
8
9
  for (const t of e)
9
- t && (s = s === "" ? t : `${s} ${t}`);
10
- return s;
11
- }, k = (e, s) => Object.assign(e, { displayName: s }), he = /* @__PURE__ */ new Set(), x = (e, ...s) => {
12
- for (const t of s) if (t !== void 0) return t;
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
- }, Fe = (e, s, ...t) => s ? s(...t) : x(e), dt = "ui-thread-R1LCJ", _t = "ui-thread__scroll-37EaI", ut = "ui-thread__column-57FQh", mt = "ui-thread__dock-y0Tt9", pt = "ui-thread__latest-ZNmqY", D = {
17
- thread: dt,
18
- thread__scroll: _t,
19
- thread__column: ut,
20
- thread__dock: mt,
21
- thread__latest: pt
22
- }, ht = ({ children: e, dock: s, isStreaming: t, label: i, className: r, testId: o }) => {
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: n } = C(), l = Pe(), c = L(null), { isAtEnd: _, scrollToEnd: d } = Ke(c), u = L(t);
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 = n == null ? void 0 : n.chat) == null ? void 0 : v.replyReady)), u.current = t;
28
- }, [l, t, (f = n == null ? void 0 : n.chat) == null ? void 0 : f.replyReady]), /* @__PURE__ */ p("div", { className: m(D.thread, r), "data-testid": o, children: [
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 = n == null ? void 0 : n.chat) == null ? void 0 : b.thread),
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(et, { "aria-hidden": !0 }),
46
- label: x("ChatThread.scrollToLatest", (y = n == null ? void 0 : n.chat) == null ? void 0 : y.scrollToLatest),
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
- s !== void 0 && /* @__PURE__ */ a("div", { className: D.thread__column, children: s })
54
+ n !== void 0 && /* @__PURE__ */ a("div", { className: D.thread__column, children: n })
54
55
  ] })
55
56
  ] });
56
- }, Xn = /* @__PURE__ */ g(
57
- /* @__PURE__ */ k(ht, "ChatThread")
58
- ), bt = "ui-message-z5uVx", ft = "ui-message__avatar-QzWck", yt = "ui-message__main-1rh-A", gt = "ui-message__body-Ngiqq", kt = "ui-message__actions-dQ0Fn", M = {
59
- message: bt,
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: ft,
62
- message__main: yt,
62
+ message__avatar: yt,
63
+ message__main: gt,
63
64
  "message--assistant": "ui-message--assistant-ndkmH",
64
- message__body: gt,
65
- message__actions: kt
66
- }, wt = ({
65
+ message__body: kt,
66
+ message__actions: wt
67
+ }, vt = ({
67
68
  author: e,
68
- children: s,
69
+ children: n,
69
70
  avatar: t,
70
71
  actions: i,
71
72
  isStreaming: r,
72
73
  className: o,
73
- testId: n
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": n,
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: s }),
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
- ), Jn = /* @__PURE__ */ g(
89
- /* @__PURE__ */ k(wt, "ChatMessage")
90
- ), vt = "ui-prompt-qHV1e", Nt = "ui-prompt__box-sUQDu", St = "ui-prompt__field-EmvTZ", xt = "ui-prompt__start-2tqre", At = "ui-prompt__end-Zp7fi", Tt = "ui-prompt__hint-4TpeC", R = {
91
- prompt: vt,
92
- prompt__box: Nt,
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: St,
95
- prompt__start: xt,
95
+ prompt__field: xt,
96
+ prompt__start: Tt,
96
97
  prompt__end: At,
97
- prompt__hint: Tt
98
- }, Ct = /* @__PURE__ */ We(
98
+ prompt__hint: Ct
99
+ }, Et = /* @__PURE__ */ Xe(
99
100
  ({
100
101
  value: e,
101
- onChange: s,
102
+ onChange: n,
102
103
  onSubmit: t,
103
104
  onStop: i,
104
105
  isBusy: r,
105
106
  isDisabled: o,
106
- isSubmitDisabled: n,
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 A = (me) => {
121
- me.key !== "Escape" || me.defaultPrevented || rt() || i();
121
+ const T = (me) => {
122
+ me.key !== "Escape" || me.defaultPrevented || ot() || i();
122
123
  };
123
- return document.addEventListener("keydown", A), () => document.removeEventListener("keydown", A);
124
+ return document.addEventListener("keydown", T), () => document.removeEventListener("keydown", T);
124
125
  }, [r, i]);
125
- const He = (A) => {
126
- A.key !== "Enter" || A.shiftKey || A.nativeEvent.isComposing || (A.preventDefault(), !K && !r && !o && !n && t());
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
- it,
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: (A) => s(A.target.value),
145
- onKeyDown: He
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(tt, { "aria-hidden": !0 }),
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 || n
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
- ), Qn = /* @__PURE__ */ g(
175
- /* @__PURE__ */ k(Ct, "PromptInput")
176
- ), Et = "ui-grid-4EfQ-", $t = "ui-card-KTt0-", Rt = "ui-card__label-LNLTF", Ot = "ui-card__description-eIx-0", H = {
177
- grid: Et,
178
- card: $t,
179
- card__label: Rt,
180
- card__description: Ot
181
- }, Lt = ({ label: e, items: s, onPick: t, className: i, testId: r }) => /* @__PURE__ */ a("div", { role: "group", "aria-label": e, className: m(H.grid, i), "data-testid": r, children: s.map((o) => /* @__PURE__ */ p("button", { type: "button", className: H.card, onClick: () => t(o), children: [
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)) }), Vn = /* @__PURE__ */ g(
185
- /* @__PURE__ */ k(Lt, "PromptSuggestions")
186
- ), zt = "ui-prose-kAp6f", It = {
187
- prose: zt
188
- }, Dt = ({ className: e, testId: s, ...t }) => /* @__PURE__ */ a("div", { className: m(It.prose, e), "data-testid": s, ...t }), ea = /* @__PURE__ */ g(/* @__PURE__ */ k(Dt, "Prose")), Mt = /^(?:[ \t]*\r?\n)+/, Pt = " ", Kt = (e) => (e == null ? void 0 : e.trim().toLowerCase()) === "json", Bt = (e, s) => {
189
- let t = s + 1;
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
- }, Ft = (e, s) => {
193
- let t = s;
193
+ }, jt = (e, n) => {
194
+ let t = n;
194
195
  for (; t < e.length && /\s/.test(e[t]); ) t++;
195
196
  return t;
196
- }, jt = (e) => {
197
+ }, Zt = (e) => {
197
198
  try {
198
199
  JSON.parse(e);
199
200
  } catch {
200
201
  return e;
201
202
  }
202
- let s = "", t = 0;
203
+ let n = "", t = 0;
203
204
  const i = () => `
204
- ${Pt.repeat(t)}`;
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 n = Bt(e, r);
209
- s += e.slice(r, n), r = n - 1;
209
+ const s = Ft(e, r);
210
+ n += e.slice(r, s), r = s - 1;
210
211
  } else if (o === "{" || o === "[") {
211
- const n = Ft(e, r + 1);
212
- e[n] === (o === "{" ? "}" : "]") ? (s += o + e[n], r = n) : (t++, s += o + i());
213
- } else o === "}" || o === "]" ? (t--, s += i() + o) : o === "," ? s += `,${i()}` : o === ":" ? s += ": " : /\s/.test(o) || (s += o);
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 s;
216
- }, Zt = (e, s) => {
217
- const t = e.replace(Mt, "").trimEnd();
218
- return Kt(s) ? jt(t) : t;
219
- }, h = (e) => new Set(e.split(" ")), $ = /"(?:[^"\\\n]|\\.)*"?/, G = /'(?:[^'\\\n]|\\.)*'?/, je = /`(?:[^`\\]|\\[\s\S])*`?/, le = /"""[\s\S]*?(?:"""|(?![\s\S]))/, Ut = /'''[\s\S]*?(?:'''|(?![\s\S]))/, Gt = /'(?:\\[^\n]{1,8}?|[^'\\\n])'/, se = /\/\/.*/, 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*/, ne = /[{}[\]();,.:]/, de = /@[A-Za-z_][\w.]*/, qt = /[\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", Ht = "type interface enum implements namespace declare abstract private protected public readonly keyof infer is satisfies override module asserts unique", Yt = "true false null undefined NaN Infinity", Wt = "string number boolean any unknown never object symbol bigint", Xt = "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", Jt = "true false null nil nullptr NULL", Ze = "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", Qt = `${Ze} 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`, Vt = "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", es = "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", ts = "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", ss = "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", ns = "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", as = "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", is = "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", rs = "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", os = "FROM AS RUN CMD LABEL EXPOSE ENV ADD COPY ENTRYPOINT VOLUME USER WORKDIR ARG ONBUILD STOPSIGNAL HEALTHCHECK SHELL MAINTAINER", ae = (e, s) => ({
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", se],
222
+ ["comment", ne],
222
223
  ["comment", q],
223
224
  ["string", $],
224
225
  ["string", G],
225
- ["string", je],
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
- ...s ? [
241
+ ...n ? [
241
242
  ["tag", /<\/[A-Za-z][\w.:-]*/],
242
- ["tag", /<[A-Za-z][\w.:-]*/, qt]
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", ne]
248
+ ["punctuation", se]
248
249
  ],
249
- keywords: h(e ? `${fe} ${Ht}` : fe),
250
- literals: h(Yt),
251
- types: e ? h(Wt) : void 0,
250
+ keywords: h(e ? `${fe} ${Yt}` : fe),
251
+ literals: h(Wt),
252
+ types: e ? h(Xt) : void 0,
252
253
  hasCapitalTypes: !0
253
- }), T = (e, s = []) => ({
254
+ }), A = (e, n = []) => ({
254
255
  rules: [
255
- ...s,
256
- ["comment", se],
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", Gt],
263
+ ["string", qt],
263
264
  /* Go'nun ham dizesi. */
264
- ["string", je],
265
+ ["string", Ze],
265
266
  ["name", de],
266
267
  ["number", P],
267
268
  ["word", I],
268
- ["punctuation", ne]
269
+ ["punctuation", se]
269
270
  ],
270
271
  keywords: h(e),
271
- literals: h(Jt),
272
- types: h(Xt),
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", ne]
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", ne]
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
- }), Ue = (e) => ({
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", se],
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
- }), cs = () => ({
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", Ut],
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", se, /:/],
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
- }), ls = () => ({
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
- }), ds = () => ({
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), _s = () => ae(!1, !0), X = () => ae(!0, !1), us = () => ae(!0, !0), B = () => Ue(rs), xe = () => Ue(os), Ae = () => T(Ze), re = () => T(Qt), Te = () => T(Vt), Ce = () => T(ts), Ee = () => T(ns), $e = () => T(as), ms = () => T(is, [
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: _s,
466
+ jsx: mn,
466
467
  typescript: X,
467
468
  ts: X,
468
469
  mts: X,
469
470
  cts: X,
470
- tsx: us,
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: cs,
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: ls,
497
+ sql: _n,
497
498
  diff: Ne,
498
499
  patch: Ne,
499
500
  graphql: Se,
500
501
  gql: Se,
501
- c: Ae,
502
- h: Ae,
502
+ c: Te,
503
+ h: Te,
503
504
  cpp: re,
504
505
  "c++": re,
505
506
  hpp: re,
506
- csharp: Te,
507
- cs: Te,
508
- java: () => T(es),
507
+ csharp: Ae,
508
+ cs: Ae,
509
+ java: () => A(tn),
509
510
  kotlin: Ce,
510
511
  kt: Ce,
511
- swift: () => T(ss),
512
+ swift: () => A(sn),
512
513
  go: Ee,
513
514
  golang: Ee,
514
515
  rust: $e,
515
516
  rs: $e,
516
- php: ms
517
- }, ps = 2e4, Oe = /!?[ \t]*\(/y, hs = /^[A-Z][A-Z\d_]+$/, bs = /[(,=:[!&|?{};~+\-*%<>^]/, fs = /* @__PURE__ */ new Set([
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(), Ge = (e) => {
532
- const s = Le.get(e);
533
- if (s) return s;
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
- }, ys = (e) => {
537
- const s = e == null ? void 0 : e.trim().toLowerCase();
538
- return s && Object.hasOwn(Re, s) ? Re[s] : void 0;
539
- }, gs = (e, s) => {
540
- let t = s - 1;
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 || bs.test(e[t])) return !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 fs.has(e.slice(t + 1, i));
546
- }, ks = (e, s, t, i, r) => {
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 n = e.isCaseInsensitive ? s.toLowerCase() : s;
552
- if ((l = e.keywords) != null && l.has(n)) return "keyword";
553
- if ((c = e.literals) != null && c.has(n)) return "number";
554
- if ((_ = e.types) != null && _.has(n)) return "type";
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(s))
557
- return hs.test(s) ? "number" : "type";
558
- }, qe = ({ pattern: e, grammar: s }, t) => {
559
- const i = [], r = (n, l) => {
560
- if (!n) return;
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 += n : i.push({ text: n, type: l });
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 n = e.exec(t); n; n = e.exec(t)) {
567
- const [l] = n, { index: c } = n, _ = c + l.length;
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] = s.rules[n.indexOf(l, 1) - 1];
573
- if (u !== void 0 && c > 0 && u.test(t[c - 1]) || d === "regex" && !gs(t, c)) {
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, ks(s, l, t, c, _));
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(Ge(ds), l)) r(b.text, b.type);
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
- }, ws = (e, s) => {
588
- const t = ys(s);
589
- return t && e.length <= ps ? qe(Ge(t), e) : [{ text: e }];
590
- }, vs = "ui-block-M1yL9", Ns = "ui-block__header-F2iBP", Ss = "ui-block__language-lmdS9", xs = "ui-block__body-wDCJ2", As = "ui-block__pre--EERi", Ts = "ui-block__highlighted-JK1Yj", O = {
591
- block: vs,
592
- block__header: Ns,
593
- block__language: Ss,
594
- block__body: xs,
595
- block__pre: As,
596
- block__highlighted: Ts,
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
- }, Cs = 1600, Es = ({ code: e, language: s, html: t, maxHeight: i, className: r, testId: o }) => {
607
+ }, $n = 1600, Rn = ({ code: e, language: n, html: t, maxHeight: i, className: r, testId: o }) => {
607
608
  var v;
608
- const { labels: n } = C(), l = Pe(), [c, _] = ce(!1), d = L(void 0), u = pe(() => t ? e : Zt(e, s), [e, t, s]), f = pe(() => t ? [] : ws(u, s), [u, t, s]);
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 = n == null ? void 0 : n.chat) == null ? void 0 : w.codeCopied)), window.clearTimeout(d.current), d.current = window.setTimeout(() => _(!1), Cs);
618
- }, y = s ?? "";
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(nt, { "aria-hidden": !0 }) : /* @__PURE__ */ a(at, { "aria-hidden": !0 }),
626
- label: Fe("CodeBlock.copy", (v = n == null ? void 0 : n.chat) == null ? void 0 : v.codeCopy, y),
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(Xe, { children: w.text }, K)
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
- }, ta = /* @__PURE__ */ g(/* @__PURE__ */ k(Es, "CodeBlock")), $s = "ui-block-zqPjp", Rs = "ui-block__summary-Kkp-X", Os = "ui-block__indicator-GuJMa", Ls = "ui-block__body-mDvrV", J = {
647
- block: $s,
648
- block__summary: Rs,
649
- block__indicator: Os,
650
- block__body: Ls
651
- }, zs = ({
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: s = !1,
654
+ isRunning: n = !1,
654
655
  indicator: t,
655
656
  isDefaultOpen: i = !1,
656
657
  children: r,
657
658
  className: o,
658
- testId: n
659
+ testId: s
659
660
  }) => {
660
- const [l, c] = ce(s || i), _ = L(!1);
661
+ const [l, c] = ce(n || i), _ = L(!1);
661
662
  return U(() => {
662
- _.current || c(s || i);
663
- }, [s, i]), /* @__PURE__ */ a(
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
- s && /* @__PURE__ */ a("span", { className: J.block__indicator, children: t ?? /* @__PURE__ */ a(ot, { size: "sm" }) }),
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: n,
677
+ testId: s,
677
678
  children: /* @__PURE__ */ a("div", { className: J.block__body, children: r })
678
679
  }
679
680
  );
680
- }, sa = /* @__PURE__ */ g(
681
- /* @__PURE__ */ k(zs, "ReasoningBlock")
682
- ), Is = "ui-text-WKVxU", Ds = "ui-text__body--uP0k", ze = {
683
- text: Is,
684
- text__body: Ds
685
- }, Ms = ({ text: e, label: s, maxHeight: t = 180, className: i, testId: r }) => /* @__PURE__ */ a(
686
- ct,
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: s,
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
- ), na = /* @__PURE__ */ g(
697
- /* @__PURE__ */ k(Ms, "ReasoningText")
698
- ), Ps = "ui-call-tV2P8", Ks = "ui-call__header-8Tw7m", Bs = "ui-call__icon-TLzwf", Fs = "ui-call__name-EHz6G", js = "ui-call__summary-M4sLU", Zs = "ui-call__meta-bvpp7", Us = "ui-call__body-nFK-C", Gs = "ui-section-TjSGF", qs = "ui-section__label-UrgqM", Hs = "ui-section__body-Dy1PX", N = {
699
- call: Ps,
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: Ks,
702
- call__icon: Bs,
702
+ call__header: Fn,
703
+ call__icon: jn,
703
704
  "call__icon--running": "ui-call__icon--running-Mx1XK",
704
- call__name: Fs,
705
- call__summary: js,
706
- call__meta: Zs,
707
- call__body: Us,
708
- section: Gs,
709
- section__label: qs,
710
- section__body: Hs
711
- }, Ys = {
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
- }, Ws = ({
718
+ }, Jn = ({
718
719
  icon: e,
719
- name: s,
720
+ name: n,
720
721
  summary: t,
721
722
  status: i,
722
723
  meta: r,
723
724
  isDefaultOpen: o,
724
- isOpen: n,
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: s }),
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(lt, { tone: Ys[i], label: f, isPulsing: i === "running" })
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: n,
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
- }, aa = ({ label: e, children: s, className: t }) => (
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: s })
768
+ /* @__PURE__ */ a("div", { className: N.section__body, children: n })
768
769
  ] })
769
- ), ia = /* @__PURE__ */ g(/* @__PURE__ */ k(Ws, "ToolCall")), Xs = "ui-terminal-D4Bz8", Js = "ui-terminal__command-A7PG2", Qs = "ui-terminal__prompt-9N1g2", Vs = "ui-terminal__stderr-qCNFe", en = "ui-terminal__srOnly-2pmQA", F = {
770
- terminal: Xs,
771
- terminal__command: Js,
772
- terminal__prompt: Qs,
773
- terminal__stderr: Vs,
774
- terminal__srOnly: en
775
- }, tn = ({
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: s,
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: n } = C(), l = L(null);
785
+ const { labels: s } = C(), l = L(null);
785
786
  Ke(l);
786
- const c = x("TerminalOutput.stderr", (_ = n == null ? void 0 : n.chat) == null ? void 0 : _.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
- s.map(
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
- }, ra = /* @__PURE__ */ g(
817
- /* @__PURE__ */ k(tn, "TerminalOutput")
818
- ), sn = "ui-list-GC4NK", nn = "ui-list__item-N8DAn", an = "ui-list__index-VrSMs", rn = "ui-list__text-4tll-", on = "ui-list__title-seHfJ", cn = "ui-list__plain-ZcCvx", ln = "ui-list__domain-sJLI7", E = {
819
- list: sn,
820
- list__item: nn,
821
- list__index: an,
822
- list__text: rn,
823
- list__title: on,
824
- list__plain: cn,
825
- list__domain: ln
826
- }, dn = ({ items: e, label: s, className: t, testId: i }) => {
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", s, (o = r == null ? void 0 : r.chat) == null ? void 0 : o.sources),
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((n, l) => /* @__PURE__ */ p("li", { className: E.list__item, children: [
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
- n.url ? /* @__PURE__ */ a(
839
+ s.url ? /* @__PURE__ */ a(
839
840
  "a",
840
841
  {
841
842
  className: E.list__title,
842
- href: n.url,
843
+ href: s.url,
843
844
  target: "_blank",
844
845
  rel: "noopener noreferrer",
845
- children: n.title
846
+ children: s.title
846
847
  }
847
- ) : n.onSelect ? /* @__PURE__ */ a("button", { type: "button", className: E.list__title, onClick: n.onSelect, children: n.title }) : /* @__PURE__ */ a("span", { className: E.list__plain, children: n.title }),
848
- n.domain && /* @__PURE__ */ a("span", { className: E.list__domain, children: n.domain })
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
- ] }, n.id))
851
+ ] }, s.id))
851
852
  }
852
853
  );
853
- }, oa = /* @__PURE__ */ g(
854
- /* @__PURE__ */ k(dn, "SourceList")
855
- ), _n = "ui-citation-XrGMb", un = "ui-citation__srOnly-GnMQp", j = {
856
- citation: _n,
857
- citation__srOnly: un,
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
- }, mn = ({ index: e, href: s, onClick: t, className: i }) => {
860
- var n;
861
- const { labels: r } = C(), o = Fe("Citation.label", (n = r == null ? void 0 : r.chat) == null ? void 0 : n.citation, e);
862
- return s ? /* @__PURE__ */ a("a", { className: m(j.citation, i), href: s, "aria-label": o, children: e }) : t ? /* @__PURE__ */ a(
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
- }, ca = /* @__PURE__ */ g(/* @__PURE__ */ k(mn, "Citation")), pn = "ui-actions-c8XlJ", hn = "ui-actions__meta-j-X3I", Ie = {
876
- actions: pn,
877
- actions__meta: hn
878
- }, bn = "button:not(:disabled), a[href]", fn = ({ children: e, meta: s, label: t, className: i, testId: r }) => {
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(), n = L(null), l = (_) => {
881
+ const { labels: o } = C(), s = L(null), l = (_) => {
881
882
  var w;
882
- const d = [...((w = n.current) == null ? void 0 : w.querySelectorAll(bn)) ?? []], u = d.indexOf(document.activeElement);
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: n,
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
- s !== void 0 && /* @__PURE__ */ a("span", { className: Ie.actions__meta, children: s })
899
+ n !== void 0 && /* @__PURE__ */ a("span", { className: Ie.actions__meta, children: n })
899
900
  ]
900
901
  }
901
902
  );
902
- }, la = /* @__PURE__ */ g(
903
- /* @__PURE__ */ k(fn, "MessageActions")
904
- ), yn = "ui-bar-UJGDL", gn = "ui-bar__brand-ZUcIw", kn = "ui-bar__start-nvmHH", wn = "ui-bar__end-NNQve", Q = {
905
- bar: yn,
906
- bar__brand: gn,
907
- bar__start: kn,
908
- bar__end: wn
909
- }, De = "--ui-header-height", vn = ({ brand: e, start: s, end: t, className: i, testId: r }) => {
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 n = o.current;
913
- if (!n || typeof ResizeObserver > "u") return;
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) ?? n.offsetHeight)}px`
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(n), () => {
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
- s !== void 0 && /* @__PURE__ */ a("div", { className: Q.bar__start, children: s }),
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
- }, da = /* @__PURE__ */ g(/* @__PURE__ */ k(vn, "AppBar")), Nn = "ui-list-e54gu", Sn = "ui-list__window-ESrZX", xn = "ui-list__slot-DxSnX", An = "ui-item-DKEGh", Tn = "ui-item__start-Yb3xf", Cn = "ui-item__body-kD4Qk", En = "ui-item__end-3SCT-", S = {
932
- list: Nn,
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: Sn,
935
- list__slot: xn,
936
- item: An,
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: Tn,
940
- item__body: Cn,
941
- item__end: En
942
- }, Me = 6, $n = ({
940
+ item__start: Cs,
941
+ item__body: Es,
942
+ item__end: $s
943
+ }, Me = 6, Rs = ({
943
944
  label: e,
944
- children: s,
945
+ children: n,
945
946
  rowHeight: t,
946
947
  maxHeight: i = 320,
947
948
  className: r,
948
949
  testId: o
949
950
  }) => {
950
- const n = Je.toArray(s).filter(Qe), [l, c] = ce(0);
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: n });
953
- const _ = Math.max(0, Math.floor(l / t) - Me), d = Math.min(n.length, Math.ceil((l + i) / t) + Me);
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: n.length * t,
968
+ blockSize: s.length * t,
968
969
  paddingBlockStart: _ * t
969
970
  },
970
- children: n.slice(_, d).map(
971
- (u, f) => Ve(u, {
971
+ children: s.slice(_, d).map(
972
+ (u, f) => et(u, {
972
973
  "aria-posinset": _ + f + 1,
973
- "aria-setsize": n.length
974
+ "aria-setsize": s.length
974
975
  })
975
976
  )
976
977
  }
977
978
  )
978
979
  }
979
980
  );
980
- }, _a = ({
981
+ }, ma = ({
981
982
  children: e,
982
- start: s,
983
+ start: n,
983
984
  end: t,
984
985
  onClick: i,
985
986
  href: r,
986
987
  isSelected: o,
987
- isMuted: n,
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
- n && S["item--muted"]
996
- ), f = /* @__PURE__ */ p(Ye, { children: [
997
- s !== void 0 && /* @__PURE__ */ a("span", { className: S.item__start, children: s }),
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
- }, ua = /* @__PURE__ */ g(
1013
- /* @__PURE__ */ k($n, "ActionList")
1014
- ), Rn = "ui-bar-OZjXz", On = "ui-bar__segment-hexbp", Ln = "ui-bar__marker-E0FeF", V = {
1015
- bar: Rn,
1016
- bar__segment: On,
1017
- bar__marker: Ln,
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, s) => s <= 0 ? 0 : Math.min(100, Math.max(0, e / s * 100)), zn = (e) => e === "muted" ? "var(--ui-text-3)" : `var(--ui-${e})`, In = ({ label: e, max: s, segments: t, markers: i = [], className: r, testId: o }) => {
1020
- const n = [
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}: ${n.join(", ")}`,
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(_, s)}%`,
1042
- inlineSize: `${ee(d, s) - ee(_, s)}%`,
1043
- backgroundColor: zn(c.tone)
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, s)}%` }
1058
+ style: { insetInlineStart: `${ee(c.at, n)}%` }
1058
1059
  },
1059
1060
  c.id
1060
1061
  ))
1061
1062
  ]
1062
1063
  }
1063
1064
  );
1064
- }, ma = /* @__PURE__ */ g(
1065
- /* @__PURE__ */ k(In, "SegmentBar")
1066
- ), Dn = "ui-legend-zryov", Mn = "ui-legend__item-GGrR-", Pn = "ui-legend__swatch-2MkAR", oe = {
1067
- legend: Dn,
1068
- legend__item: Mn,
1069
- legend__swatch: Pn
1070
- }, Kn = (e) => e === "muted" ? "var(--ui-text-3)" : `var(--ui-${e})`, Bn = ({ items: e, className: s, testId: t }) => /* @__PURE__ */ a("ul", { className: m(oe.legend, s), "data-testid": t, children: e.map((i) => /* @__PURE__ */ p("li", { className: oe.legend__item, children: [
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: Kn(i.tone) }
1077
+ style: { backgroundColor: Bs(i.tone) }
1077
1078
  }
1078
1079
  ),
1079
1080
  i.label
1080
- ] }, i.id)) }), pa = /* @__PURE__ */ g(/* @__PURE__ */ k(Bn, "Legend")), Fn = "ui-list-KSLu5", jn = "ui-list__row-k7aHp", Zn = "ui-list__term-vsD5B", Un = "ui-list__value-6GY6z", Z = {
1081
- list: Fn,
1082
- list__row: jn,
1083
- list__term: Zn,
1084
- list__value: Un,
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
- }, Gn = ({ items: e, className: s, testId: t }) => /* @__PURE__ */ a("dl", { className: m(Z.list, s), "data-testid": t, children: e.map((i, r) => /* @__PURE__ */ p("div", { className: Z.list__row, children: [
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)) }), ha = /* @__PURE__ */ g(
1096
- /* @__PURE__ */ k(Gn, "DescriptionList")
1096
+ ] }, r)) }), fa = /* @__PURE__ */ g(
1097
+ /* @__PURE__ */ k(qs, "DescriptionList")
1097
1098
  );
1098
1099
  export {
1099
- ua as ActionList,
1100
- _a as ActionListItem,
1101
- da as AppBar,
1102
- Jn as ChatMessage,
1103
- Xn as ChatThread,
1104
- ca as Citation,
1105
- ta as CodeBlock,
1106
- ha as DescriptionList,
1107
- pa as Legend,
1108
- la as MessageActions,
1109
- Qn as PromptInput,
1110
- Vn as PromptSuggestions,
1111
- ea as Prose,
1112
- sa as ReasoningBlock,
1113
- na as ReasoningText,
1114
- ma as SegmentBar,
1115
- oa as SourceList,
1116
- ra as TerminalOutput,
1117
- ia as ToolCall,
1118
- aa as ToolCallSection
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