@humain/ui 2.2.6 → 2.2.9

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 (159) hide show
  1. package/dist/index101.js +2 -2
  2. package/dist/index101.js.map +1 -1
  3. package/dist/index103.js +3 -3
  4. package/dist/index103.js.map +1 -1
  5. package/dist/index108.js +1 -1
  6. package/dist/index108.js.map +1 -1
  7. package/dist/index117.js +1 -1
  8. package/dist/index117.js.map +1 -1
  9. package/dist/index122.js +6 -6
  10. package/dist/index122.js.map +1 -1
  11. package/dist/index126.js +1 -1
  12. package/dist/index126.js.map +1 -1
  13. package/dist/index130.js +2 -2
  14. package/dist/index130.js.map +1 -1
  15. package/dist/index146.js +4 -4
  16. package/dist/index146.js.map +1 -1
  17. package/dist/index152.js +1 -1
  18. package/dist/index152.js.map +1 -1
  19. package/dist/index154.js +2 -2
  20. package/dist/index154.js.map +1 -1
  21. package/dist/index166.js +1 -1
  22. package/dist/index166.js.map +1 -1
  23. package/dist/index168.js +1 -1
  24. package/dist/index168.js.map +1 -1
  25. package/dist/index169.js +1 -1
  26. package/dist/index169.js.map +1 -1
  27. package/dist/index173.js +2 -2
  28. package/dist/index173.js.map +1 -1
  29. package/dist/index175.js +4 -4
  30. package/dist/index175.js.map +1 -1
  31. package/dist/index176.js +2 -2
  32. package/dist/index176.js.map +1 -1
  33. package/dist/index177.js +2 -2
  34. package/dist/index177.js.map +1 -1
  35. package/dist/index184.js +1 -1
  36. package/dist/index184.js.map +1 -1
  37. package/dist/index191.js +3 -3
  38. package/dist/index191.js.map +1 -1
  39. package/dist/index192.js +2 -2
  40. package/dist/index192.js.map +1 -1
  41. package/dist/index201.js +2 -2
  42. package/dist/index201.js.map +1 -1
  43. package/dist/index204.js +4 -4
  44. package/dist/index204.js.map +1 -1
  45. package/dist/index228.js +1 -1
  46. package/dist/index228.js.map +1 -1
  47. package/dist/index229.js +1 -1
  48. package/dist/index229.js.map +1 -1
  49. package/dist/index24.js +2 -2
  50. package/dist/index24.js.map +1 -1
  51. package/dist/index5.js +1 -1
  52. package/dist/index5.js.map +1 -1
  53. package/dist/styles.css +1 -1
  54. package/dist/wc/AICodeBlock.js +41 -41
  55. package/dist/wc/AICodeBlock.js.map +1 -1
  56. package/dist/wc/AIMermaidDiagram.js +7 -7
  57. package/dist/wc/AIMermaidDiagram.js.map +1 -1
  58. package/dist/wc/AIMessage.js +6 -6
  59. package/dist/wc/AIMessage.js.map +1 -1
  60. package/dist/wc/AISource.js +2 -2
  61. package/dist/wc/AISource.js.map +1 -1
  62. package/dist/wc/AIToolCall.js +1 -1
  63. package/dist/wc/AIToolCall.js.map +1 -1
  64. package/dist/wc/Breadcrumb.js +43 -43
  65. package/dist/wc/Breadcrumb.js.map +1 -1
  66. package/dist/wc/DropdownMenu.js +9 -9
  67. package/dist/wc/DropdownMenu.js.map +1 -1
  68. package/dist/wc/Kbd.js +22 -22
  69. package/dist/wc/Kbd.js.map +1 -1
  70. package/dist/wc/button.js +7 -7
  71. package/dist/wc/button.js.map +1 -1
  72. package/dist/wc/close-button.js +19 -19
  73. package/dist/wc/close-button.js.map +1 -1
  74. package/dist/wc/hf-ai-prompt-suggestion.js +14 -14
  75. package/dist/wc/hf-ai-prompt-suggestion.js.map +1 -1
  76. package/dist/wc/hf-ai-reasoning-block.js +13 -13
  77. package/dist/wc/hf-ai-reasoning-block.js.map +1 -1
  78. package/dist/wc/hf-ai-steps.js +53 -53
  79. package/dist/wc/hf-ai-steps.js.map +1 -1
  80. package/dist/wc/hf-ai-system-message.js +26 -26
  81. package/dist/wc/hf-ai-system-message.js.map +1 -1
  82. package/dist/wc/hf-code-snippet.js +35 -35
  83. package/dist/wc/hf-code-snippet.js.map +1 -1
  84. package/dist/wc/hf-command-menu.js +39 -39
  85. package/dist/wc/hf-command-menu.js.map +1 -1
  86. package/dist/wc/hf-data-table.js +3 -3
  87. package/dist/wc/hf-data-table.js.map +1 -1
  88. package/dist/wc/hf-display-value.js +50 -50
  89. package/dist/wc/hf-display-value.js.map +1 -1
  90. package/dist/wc/hf-nav-account-menu.js +5 -5
  91. package/dist/wc/hf-nav-account-menu.js.map +1 -1
  92. package/dist/wc/hf-rich-textarea.js +1 -1
  93. package/dist/wc/hf-rich-textarea.js.map +1 -1
  94. package/dist/wc/hf-steps.js +8 -8
  95. package/dist/wc/hf-steps.js.map +1 -1
  96. package/dist/wc/markdown-renderer.js +1 -1
  97. package/dist/wc/markdown-renderer.js.map +1 -1
  98. package/dist/wc/selection-group.js +26 -26
  99. package/dist/wc/selection-group.js.map +1 -1
  100. package/dist/wc/syntax-highlight.js +4 -4
  101. package/dist/wc/syntax-highlight.js.map +1 -1
  102. package/dist/wc/workflow-step-renderer.js +51 -51
  103. package/dist/wc/workflow-step-renderer.js.map +1 -1
  104. package/dist/wc-react/AICodeBlock.js +17 -17
  105. package/dist/wc-react/AICodeBlock.js.map +1 -1
  106. package/dist/wc-react/AIMermaidDiagram.js +16 -16
  107. package/dist/wc-react/AIMermaidDiagram.js.map +1 -1
  108. package/dist/wc-react/AIMessage.js +7 -7
  109. package/dist/wc-react/AIMessage.js.map +1 -1
  110. package/dist/wc-react/AISource.js +41 -41
  111. package/dist/wc-react/AISource.js.map +1 -1
  112. package/dist/wc-react/AIToolCall.js +6 -6
  113. package/dist/wc-react/AIToolCall.js.map +1 -1
  114. package/dist/wc-react/Breadcrumb.js +18 -18
  115. package/dist/wc-react/Breadcrumb.js.map +1 -1
  116. package/dist/wc-react/DropdownMenu.js +27 -27
  117. package/dist/wc-react/DropdownMenu.js.map +1 -1
  118. package/dist/wc-react/Kbd.js +17 -17
  119. package/dist/wc-react/Kbd.js.map +1 -1
  120. package/dist/wc-react/button.js +12 -12
  121. package/dist/wc-react/button.js.map +1 -1
  122. package/dist/wc-react/close-button.js +19 -19
  123. package/dist/wc-react/close-button.js.map +1 -1
  124. package/dist/wc-react/hf-ai-prompt-suggestion.js +1 -1
  125. package/dist/wc-react/hf-ai-prompt-suggestion.js.map +1 -1
  126. package/dist/wc-react/hf-ai-reasoning-block.js +1 -1
  127. package/dist/wc-react/hf-ai-reasoning-block.js.map +1 -1
  128. package/dist/wc-react/hf-ai-steps.js +33 -33
  129. package/dist/wc-react/hf-ai-steps.js.map +1 -1
  130. package/dist/wc-react/hf-ai-system-message.js +9 -9
  131. package/dist/wc-react/hf-ai-system-message.js.map +1 -1
  132. package/dist/wc-react/hf-code-snippet.js +3 -3
  133. package/dist/wc-react/hf-code-snippet.js.map +1 -1
  134. package/dist/wc-react/hf-command-menu.js +56 -56
  135. package/dist/wc-react/hf-command-menu.js.map +1 -1
  136. package/dist/wc-react/hf-data-table.js +3 -3
  137. package/dist/wc-react/hf-data-table.js.map +1 -1
  138. package/dist/wc-react/hf-display-value.js +58 -58
  139. package/dist/wc-react/hf-display-value.js.map +1 -1
  140. package/dist/wc-react/hf-nav-account-menu.js +7 -7
  141. package/dist/wc-react/hf-nav-account-menu.js.map +1 -1
  142. package/dist/wc-react/hf-rich-textarea.js +5 -5
  143. package/dist/wc-react/hf-rich-textarea.js.map +1 -1
  144. package/dist/wc-react/hf-steps.js +2 -2
  145. package/dist/wc-react/hf-steps.js.map +1 -1
  146. package/dist/wc-react/markdown-renderer.js +1 -1
  147. package/dist/wc-react/markdown-renderer.js.map +1 -1
  148. package/dist/wc-react/selection-group.js +7 -7
  149. package/dist/wc-react/selection-group.js.map +1 -1
  150. package/dist/wc-react/syntax-highlight.js +4 -4
  151. package/dist/wc-react/syntax-highlight.js.map +1 -1
  152. package/dist/wc-react/workflow-step-renderer.js +44 -44
  153. package/dist/wc-react/workflow-step-renderer.js.map +1 -1
  154. package/package.json +1 -1
  155. package/skills/humain-ui/SKILL.md +1 -1
  156. package/skills/humain-ui-wc/SKILL.md +1 -1
  157. package/skills/humain-ui-wc.skill +0 -0
  158. package/skills/humain-ui.skill +0 -0
  159. package/src/tokens.css +4 -0
@@ -1,9 +1,9 @@
1
1
  import { f as c } from "./_shared.js";
2
- import { t as x } from "./createLucideIcon.js";
2
+ import { t as g } from "./createLucideIcon.js";
3
3
  import { t as N } from "./dist.js";
4
4
  import { n as b, r as S, t as M } from "./tooltip2.js";
5
5
  import * as d from "react";
6
- import { Fragment as k, jsx as t, jsxs as s } from "react/jsx-runtime";
6
+ import { Fragment as k, jsx as r, jsxs as s } from "react/jsx-runtime";
7
7
  var I = [
8
8
  ["path", {
9
9
  d: "M15 3h6v6",
@@ -17,7 +17,7 @@ var I = [
17
17
  d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",
18
18
  key: "a6xqqp"
19
19
  }]
20
- ], g = x("external-link", I), $ = [
20
+ ], x = g("external-link", I), $ = [
21
21
  ["circle", {
22
22
  cx: "12",
23
23
  cy: "12",
@@ -32,7 +32,7 @@ var I = [
32
32
  d: "M2 12h20",
33
33
  key: "9i4pu4"
34
34
  }]
35
- ], w = x("globe", $), A = N("inline-flex items-center gap-1.5 transition-colors cursor-pointer focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring", {
35
+ ], w = g("globe", $), A = N("inline-flex items-center gap-1.5 transition-colors cursor-pointer focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring", {
36
36
  variants: { variant: {
37
37
  default: "text-sm text-primary hover:text-primary underline underline-offset-2 rounded-sm",
38
38
  pill: "px-2.5 py-1 rounded-full bg-accent hover:bg-surface-2 text-xs text-secondary-foreground delight-selection-press",
@@ -43,46 +43,46 @@ var I = [
43
43
  function L(e) {
44
44
  return Number.isFinite(e) && e >= 0 ? Math.floor(e) : _;
45
45
  }
46
- function p({ url: e, favicon: r, className: a }) {
46
+ function f({ url: e, favicon: t, className: a }) {
47
47
  const [o, n] = d.useState(!1), i = d.useMemo(() => {
48
- if (r) return r;
48
+ if (t) return t;
49
49
  try {
50
50
  return `https://www.google.com/s2/favicons?domain=${new URL(e).hostname}&sz=32`;
51
51
  } catch {
52
52
  return null;
53
53
  }
54
- }, [e, r]);
55
- return !i || o ? /* @__PURE__ */ t(w, { className: c("size-4 text-muted-foreground", a) }) : /* @__PURE__ */ t("img", {
54
+ }, [e, t]);
55
+ return !i || o ? /* @__PURE__ */ r(w, { className: c("size-4 text-muted-foreground", a) }) : /* @__PURE__ */ r("img", {
56
56
  src: i,
57
57
  alt: "",
58
58
  className: c("size-4 rounded delight-fade-in motion-reduce:!animate-none", a),
59
59
  onError: () => n(!0)
60
60
  });
61
61
  }
62
- p.displayName = "SourceFavicon";
63
- function m({ source: e, variant: r, showFavicon: a = !0, className: o, onClick: n }) {
64
- const i = e.title || e.siteName || e.url, u = c(A({ variant: r }), o), l = /* @__PURE__ */ s(k, { children: [
65
- a && /* @__PURE__ */ t(p, {
62
+ f.displayName = "SourceFavicon";
63
+ function m({ source: e, variant: t, showFavicon: a = !0, className: o, onClick: n }) {
64
+ const i = e.title || e.siteName || e.url, u = c(A({ variant: t }), o), l = /* @__PURE__ */ s(k, { children: [
65
+ a && /* @__PURE__ */ r(f, {
66
66
  url: e.url,
67
67
  favicon: e.favicon
68
68
  }),
69
- /* @__PURE__ */ t("span", {
69
+ /* @__PURE__ */ r("span", {
70
70
  className: "truncate max-w-[200px]",
71
71
  children: i
72
72
  }),
73
- r === "default" && /* @__PURE__ */ t(g, {
73
+ t === "default" && /* @__PURE__ */ r(x, {
74
74
  className: "size-3 shrink-0",
75
75
  "aria-hidden": "true"
76
76
  })
77
77
  ] });
78
- return n ? /* @__PURE__ */ t("button", {
78
+ return n ? /* @__PURE__ */ r("button", {
79
79
  type: "button",
80
80
  "data-slot": "ai-source-trigger",
81
81
  onClick: n,
82
82
  className: u,
83
83
  "aria-label": `Source: ${i}`,
84
84
  children: l
85
- }) : /* @__PURE__ */ t("a", {
85
+ }) : /* @__PURE__ */ r("a", {
86
86
  "data-slot": "ai-source-trigger",
87
87
  href: e.url,
88
88
  target: "_blank",
@@ -93,7 +93,7 @@ function m({ source: e, variant: r, showFavicon: a = !0, className: o, onClick:
93
93
  });
94
94
  }
95
95
  m.displayName = "AISourceTrigger";
96
- function v({ source: e, className: r }) {
96
+ function v({ source: e, className: t }) {
97
97
  const a = d.useMemo(() => {
98
98
  try {
99
99
  return new URL(e.url).hostname;
@@ -102,26 +102,26 @@ function v({ source: e, className: r }) {
102
102
  }
103
103
  }, [e.url]);
104
104
  return /* @__PURE__ */ s("div", {
105
- className: c("p-3 max-w-xs space-y-2", r),
105
+ className: c("p-3 max-w-xs space-y-2", t),
106
106
  children: [
107
107
  /* @__PURE__ */ s("div", {
108
108
  className: "flex items-start gap-2",
109
- children: [/* @__PURE__ */ t(p, {
109
+ children: [/* @__PURE__ */ r(f, {
110
110
  url: e.url,
111
111
  favicon: e.favicon,
112
112
  className: "mt-0.5"
113
113
  }), /* @__PURE__ */ s("div", {
114
114
  className: "flex-1 min-w-0",
115
- children: [/* @__PURE__ */ t("p", {
115
+ children: [/* @__PURE__ */ r("p", {
116
116
  className: "text-sm font-medium text-foreground truncate",
117
117
  children: e.title || a
118
- }), /* @__PURE__ */ t("p", {
119
- className: "text-xs text-text-quaternary truncate",
118
+ }), /* @__PURE__ */ r("p", {
119
+ className: "text-xs text-secondary-foreground truncate",
120
120
  children: a
121
121
  })]
122
122
  })]
123
123
  }),
124
- e.description && /* @__PURE__ */ t("p", {
124
+ e.description && /* @__PURE__ */ r("p", {
125
125
  className: "text-xs text-muted-foreground line-clamp-2",
126
126
  children: e.description
127
127
  }),
@@ -130,55 +130,55 @@ function v({ source: e, className: r }) {
130
130
  target: "_blank",
131
131
  rel: "noopener noreferrer",
132
132
  className: "flex items-center gap-1 text-xs text-primary hover:text-primary",
133
- children: ["Visit source", /* @__PURE__ */ t(g, { className: "size-3" })]
133
+ children: ["Visit source", /* @__PURE__ */ r(x, { className: "size-3" })]
134
134
  })
135
135
  ]
136
136
  });
137
137
  }
138
138
  v.displayName = "AISourceContent";
139
- function y({ source: e, variant: r, showFavicon: a = !0, showTooltip: o = !0, className: n }) {
140
- return o ? /* @__PURE__ */ s(M, { children: [/* @__PURE__ */ t(S, { render: /* @__PURE__ */ t("span", {
139
+ function y({ source: e, variant: t, showFavicon: a = !0, showTooltip: o = !0, className: n }) {
140
+ return o ? /* @__PURE__ */ s(M, { children: [/* @__PURE__ */ r(S, { render: /* @__PURE__ */ r("span", {
141
141
  "data-slot": "ai-source",
142
- children: /* @__PURE__ */ t(m, {
142
+ children: /* @__PURE__ */ r(m, {
143
143
  source: e,
144
- variant: r,
144
+ variant: t,
145
145
  showFavicon: a,
146
146
  className: n
147
147
  })
148
- }) }), /* @__PURE__ */ t(b, {
148
+ }) }), /* @__PURE__ */ r(b, {
149
149
  side: "top",
150
150
  className: "p-0",
151
- children: /* @__PURE__ */ t(v, { source: e })
152
- })] }) : /* @__PURE__ */ t("span", {
151
+ children: /* @__PURE__ */ r(v, { source: e })
152
+ })] }) : /* @__PURE__ */ r("span", {
153
153
  "data-slot": "ai-source",
154
- children: /* @__PURE__ */ t(m, {
154
+ children: /* @__PURE__ */ r(m, {
155
155
  source: e,
156
- variant: r,
156
+ variant: t,
157
157
  showFavicon: a,
158
158
  className: n
159
159
  })
160
160
  });
161
161
  }
162
162
  y.displayName = "AISource";
163
- function T({ sources: e, maxVisible: r = 3, showAll: a = !1, onShowMore: o, className: n }) {
164
- const i = L(r), u = a ? e : e.slice(0, i), l = Math.max(0, e.length - i);
163
+ function T({ sources: e, maxVisible: t = 3, showAll: a = !1, onShowMore: o, className: n }) {
164
+ const i = L(t), u = a ? e : e.slice(0, i), l = Math.max(0, e.length - i);
165
165
  return /* @__PURE__ */ s("nav", {
166
166
  "data-slot": "ai-source-list",
167
167
  "aria-label": "Sources",
168
168
  className: c("flex flex-wrap items-center gap-2", n),
169
169
  children: [
170
- /* @__PURE__ */ t("span", {
171
- className: "text-xs text-text-quaternary",
170
+ /* @__PURE__ */ r("span", {
171
+ className: "text-xs text-secondary-foreground",
172
172
  children: "Sources:"
173
173
  }),
174
- u.map((f, h) => /* @__PURE__ */ t("span", {
174
+ u.map((p, h) => /* @__PURE__ */ r("span", {
175
175
  className: "delight-stagger motion-reduce:!animate-none",
176
176
  style: { "--delight-delay": `${h * 50}ms` },
177
- children: /* @__PURE__ */ t(y, {
178
- source: f,
177
+ children: /* @__PURE__ */ r(y, {
178
+ source: p,
179
179
  variant: "pill"
180
180
  })
181
- }, `${f.url}-${h}`)),
181
+ }, `${p.url}-${h}`)),
182
182
  !a && l > 0 && /* @__PURE__ */ s("button", {
183
183
  type: "button",
184
184
  onClick: o,
@@ -1 +1 @@
1
- {"version":3,"file":"AISource.js","names":["__iconNode"],"sources":["../../../../../../../../../../../Users/akarim/Documents/test/humain_foundation_ui/node_modules/.bun/lucide-react@1.27.0+0f58469d5b3bd39f/node_modules/lucide-react/dist/esm/icons/external-link.mjs","../../../../../../../../../../../Users/akarim/Documents/test/humain_foundation_ui/node_modules/.bun/lucide-react@1.27.0+0f58469d5b3bd39f/node_modules/lucide-react/dist/esm/icons/globe.mjs","../../src/components/organisms/ai/AISource/AISource.tsx"],"sourcesContent":["/**\n * @license lucide-react v1.27.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"path\", { d: \"M15 3h6v6\", key: \"1q9fwt\" }],\n [\"path\", { d: \"M10 14 21 3\", key: \"gplh6r\" }],\n [\"path\", { d: \"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\", key: \"a6xqqp\" }]\n];\nconst ExternalLink = createLucideIcon(\"external-link\", __iconNode);\n\nexport { __iconNode, ExternalLink as default };\n//# sourceMappingURL=external-link.mjs.map\n","/**\n * @license lucide-react v1.27.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"10\", key: \"1mglay\" }],\n [\"path\", { d: \"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20\", key: \"13o1zl\" }],\n [\"path\", { d: \"M2 12h20\", key: \"9i4pu4\" }]\n];\nconst Globe = createLucideIcon(\"globe\", __iconNode);\n\nexport { __iconNode, Globe as default };\n//# sourceMappingURL=globe.mjs.map\n","import { cva, type VariantProps } from 'class-variance-authority';\nimport { ExternalLink, Globe } from 'lucide-react';\nimport * as React from 'react';\nimport { Tooltip, TooltipPopup, TooltipTrigger } from '@/components/ui/tooltip';\nimport { cn } from '@/lib/utils';\n\n// =============================================================================\n// Variants\n// =============================================================================\n\nconst sourceVariants = cva(\n 'inline-flex items-center gap-1.5 transition-colors cursor-pointer focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring',\n {\n variants: {\n variant: {\n default:\n 'text-sm text-primary hover:text-primary underline underline-offset-2 rounded-sm',\n pill: 'px-2.5 py-1 rounded-full bg-accent hover:bg-surface-2 text-xs text-secondary-foreground delight-selection-press',\n minimal:\n 'text-xs text-secondary-foreground hover:text-foreground rounded-sm',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n },\n);\n\nconst DEFAULT_MAX_VISIBLE_SOURCES = 3;\n\nfunction getMaxVisibleSources(maxVisible: number): number {\n return Number.isFinite(maxVisible) && maxVisible >= 0\n ? Math.floor(maxVisible)\n : DEFAULT_MAX_VISIBLE_SOURCES;\n}\n\n// =============================================================================\n// Types\n// =============================================================================\n\nexport interface SourceData {\n /** Source URL */\n url: string;\n /** Display title */\n title?: string;\n /** Source description */\n description?: string;\n /** Favicon URL */\n favicon?: string;\n /** Site name */\n siteName?: string;\n}\n\n// =============================================================================\n// Source Favicon\n// =============================================================================\n\ninterface SourceFaviconProps {\n url: string;\n favicon?: string;\n className?: string;\n}\n\nfunction SourceFavicon({ url, favicon, className }: SourceFaviconProps) {\n const [hasError, setHasError] = React.useState(false);\n\n // Generate favicon URL from domain if not provided\n const faviconUrl = React.useMemo(() => {\n if (favicon) return favicon;\n try {\n const domain = new URL(url).hostname;\n return `https://www.google.com/s2/favicons?domain=${domain}&sz=32`;\n } catch {\n return null;\n }\n }, [url, favicon]);\n\n if (!faviconUrl || hasError) {\n return <Globe className={cn('size-4 text-muted-foreground', className)} />;\n }\n\n return (\n <img\n src={faviconUrl}\n alt=\"\"\n className={cn(\n 'size-4 rounded delight-fade-in motion-reduce:!animate-none',\n className,\n )}\n onError={() => setHasError(true)}\n />\n );\n}\n\nSourceFavicon.displayName = 'SourceFavicon';\n\n// =============================================================================\n// Source Trigger (Clickable element)\n// =============================================================================\n\nexport interface AISourceTriggerProps\n extends VariantProps<typeof sourceVariants> {\n /** Source data */\n source: SourceData;\n /** Whether to show favicon */\n showFavicon?: boolean;\n /** Additional class name */\n className?: string;\n /** Click handler */\n onClick?: () => void;\n}\n\nfunction AISourceTrigger({\n source,\n variant,\n showFavicon = true,\n className,\n onClick,\n}: AISourceTriggerProps) {\n const displayText = source.title || source.siteName || source.url;\n\n const sharedClassName = cn(sourceVariants({ variant }), className);\n const sharedChildren = (\n <>\n {showFavicon && (\n <SourceFavicon url={source.url} favicon={source.favicon} />\n )}\n <span className=\"truncate max-w-[200px]\">{displayText}</span>\n {variant === 'default' && (\n <ExternalLink className=\"size-3 shrink-0\" aria-hidden=\"true\" />\n )}\n </>\n );\n\n // Render as <a> when navigating to URL (proper semantics)\n if (!onClick) {\n return (\n <a\n data-slot=\"ai-source-trigger\"\n href={source.url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className={sharedClassName}\n aria-label={`Source: ${displayText}`}\n >\n {sharedChildren}\n </a>\n );\n }\n\n // Render as <button> when custom click handler is provided\n return (\n <button\n type=\"button\"\n data-slot=\"ai-source-trigger\"\n onClick={onClick}\n className={sharedClassName}\n aria-label={`Source: ${displayText}`}\n >\n {sharedChildren}\n </button>\n );\n}\n\nAISourceTrigger.displayName = 'AISourceTrigger';\n\n// =============================================================================\n// Source Content (Tooltip/Popover content)\n// =============================================================================\n\nexport interface AISourceContentProps {\n /** Source data */\n source: SourceData;\n /** Additional class name */\n className?: string;\n}\n\nfunction AISourceContent({ source, className }: AISourceContentProps) {\n const domain = React.useMemo(() => {\n try {\n return new URL(source.url).hostname;\n } catch {\n return source.url;\n }\n }, [source.url]);\n\n return (\n <div className={cn('p-3 max-w-xs space-y-2', className)}>\n <div className=\"flex items-start gap-2\">\n <SourceFavicon\n url={source.url}\n favicon={source.favicon}\n className=\"mt-0.5\"\n />\n <div className=\"flex-1 min-w-0\">\n <p className=\"text-sm font-medium text-foreground truncate\">\n {source.title || domain}\n </p>\n <p className=\"text-xs text-text-quaternary truncate\">{domain}</p>\n </div>\n </div>\n {source.description && (\n <p className=\"text-xs text-muted-foreground line-clamp-2\">\n {source.description}\n </p>\n )}\n <a\n href={source.url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"flex items-center gap-1 text-xs text-primary hover:text-primary\"\n >\n Visit source\n <ExternalLink className=\"size-3\" />\n </a>\n </div>\n );\n}\n\nAISourceContent.displayName = 'AISourceContent';\n\n// =============================================================================\n// Main AISource Component (with built-in tooltip)\n// =============================================================================\n\nexport interface AISourceProps extends VariantProps<typeof sourceVariants> {\n /** Source data */\n source: SourceData;\n /** Whether to show favicon */\n showFavicon?: boolean;\n /** Whether to show tooltip on hover */\n showTooltip?: boolean;\n /** Additional class name */\n className?: string;\n}\n\nfunction AISource({\n source,\n variant,\n showFavicon = true,\n showTooltip = true,\n className,\n}: AISourceProps) {\n if (!showTooltip) {\n return (\n <span data-slot=\"ai-source\">\n <AISourceTrigger\n source={source}\n variant={variant}\n showFavicon={showFavicon}\n className={className}\n />\n </span>\n );\n }\n\n return (\n <Tooltip>\n <TooltipTrigger\n render={\n <span data-slot=\"ai-source\">\n <AISourceTrigger\n source={source}\n variant={variant}\n showFavicon={showFavicon}\n className={className}\n />\n </span>\n }\n />\n <TooltipPopup side=\"top\" className=\"p-0\">\n <AISourceContent source={source} />\n </TooltipPopup>\n </Tooltip>\n );\n}\n\nAISource.displayName = 'AISource';\n\n// =============================================================================\n// Source List Component\n// =============================================================================\n\nexport interface AISourceListProps {\n /** Array of sources */\n sources: SourceData[];\n /** Maximum sources to show before truncating */\n maxVisible?: number;\n /** Whether to show expanded list */\n showAll?: boolean;\n /** Callback when \"show more\" is clicked */\n onShowMore?: () => void;\n /** Additional class name */\n className?: string;\n}\n\nfunction AISourceList({\n sources,\n maxVisible = 3,\n showAll = false,\n onShowMore,\n className,\n}: AISourceListProps) {\n const safeMaxVisible = getMaxVisibleSources(maxVisible);\n const visibleSources = showAll ? sources : sources.slice(0, safeMaxVisible);\n const remainingCount = Math.max(0, sources.length - safeMaxVisible);\n\n return (\n <nav\n data-slot=\"ai-source-list\"\n aria-label=\"Sources\"\n className={cn('flex flex-wrap items-center gap-2', className)}\n >\n <span className=\"text-xs text-text-quaternary\">Sources:</span>\n {visibleSources.map((source, index) => (\n <span\n key={`${source.url}-${index}`}\n className=\"delight-stagger motion-reduce:!animate-none\"\n style={\n { '--delight-delay': `${index * 50}ms` } as React.CSSProperties\n }\n >\n <AISource source={source} variant=\"pill\" />\n </span>\n ))}\n {!showAll && remainingCount > 0 && (\n <button\n type=\"button\"\n onClick={onShowMore}\n aria-label={`Show ${remainingCount} more sources`}\n className=\"px-2.5 py-1 rounded-full bg-accent hover:bg-surface-2 text-xs text-secondary-foreground transition-colors focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring delight-selection-press\"\n >\n +{remainingCount} more\n </button>\n )}\n </nav>\n );\n}\n\nAISourceList.displayName = 'AISourceList';\n\nexport {\n AISource,\n AISourceContent,\n AISourceList,\n AISourceTrigger,\n SourceFavicon,\n sourceVariants,\n};\n"],"x_google_ignoreList":[0,1],"mappings":";;;;;;AASA,IAAMA,IAAa;AAAA,EACjB,CAAC,QAAQ;AAAA,IAAE,GAAG;AAAA,IAAa,KAAK;AAAA,EAAS,CAAC;AAAA,EAC1C,CAAC,QAAQ;AAAA,IAAE,GAAG;AAAA,IAAe,KAAK;AAAA,EAAS,CAAC;AAAA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EP;AAAA;AAET;AAEA,EAAa,cAAc"}
1
+ {"version":3,"file":"AISource.js","names":["__iconNode"],"sources":["../../../../../../../../../../../Users/akarim/Documents/test/humain_foundation_ui/node_modules/.bun/lucide-react@1.27.0+0f58469d5b3bd39f/node_modules/lucide-react/dist/esm/icons/external-link.mjs","../../../../../../../../../../../Users/akarim/Documents/test/humain_foundation_ui/node_modules/.bun/lucide-react@1.27.0+0f58469d5b3bd39f/node_modules/lucide-react/dist/esm/icons/globe.mjs","../../src/components/organisms/ai/AISource/AISource.tsx"],"sourcesContent":["/**\n * @license lucide-react v1.27.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"path\", { d: \"M15 3h6v6\", key: \"1q9fwt\" }],\n [\"path\", { d: \"M10 14 21 3\", key: \"gplh6r\" }],\n [\"path\", { d: \"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\", key: \"a6xqqp\" }]\n];\nconst ExternalLink = createLucideIcon(\"external-link\", __iconNode);\n\nexport { __iconNode, ExternalLink as default };\n//# sourceMappingURL=external-link.mjs.map\n","/**\n * @license lucide-react v1.27.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"10\", key: \"1mglay\" }],\n [\"path\", { d: \"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20\", key: \"13o1zl\" }],\n [\"path\", { d: \"M2 12h20\", key: \"9i4pu4\" }]\n];\nconst Globe = createLucideIcon(\"globe\", __iconNode);\n\nexport { __iconNode, Globe as default };\n//# sourceMappingURL=globe.mjs.map\n","import { cva, type VariantProps } from 'class-variance-authority';\nimport { ExternalLink, Globe } from 'lucide-react';\nimport * as React from 'react';\nimport { Tooltip, TooltipPopup, TooltipTrigger } from '@/components/ui/tooltip';\nimport { cn } from '@/lib/utils';\n\n// =============================================================================\n// Variants\n// =============================================================================\n\nconst sourceVariants = cva(\n 'inline-flex items-center gap-1.5 transition-colors cursor-pointer focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring',\n {\n variants: {\n variant: {\n default:\n 'text-sm text-primary hover:text-primary underline underline-offset-2 rounded-sm',\n pill: 'px-2.5 py-1 rounded-full bg-accent hover:bg-surface-2 text-xs text-secondary-foreground delight-selection-press',\n minimal:\n 'text-xs text-secondary-foreground hover:text-foreground rounded-sm',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n },\n);\n\nconst DEFAULT_MAX_VISIBLE_SOURCES = 3;\n\nfunction getMaxVisibleSources(maxVisible: number): number {\n return Number.isFinite(maxVisible) && maxVisible >= 0\n ? Math.floor(maxVisible)\n : DEFAULT_MAX_VISIBLE_SOURCES;\n}\n\n// =============================================================================\n// Types\n// =============================================================================\n\nexport interface SourceData {\n /** Source URL */\n url: string;\n /** Display title */\n title?: string;\n /** Source description */\n description?: string;\n /** Favicon URL */\n favicon?: string;\n /** Site name */\n siteName?: string;\n}\n\n// =============================================================================\n// Source Favicon\n// =============================================================================\n\ninterface SourceFaviconProps {\n url: string;\n favicon?: string;\n className?: string;\n}\n\nfunction SourceFavicon({ url, favicon, className }: SourceFaviconProps) {\n const [hasError, setHasError] = React.useState(false);\n\n // Generate favicon URL from domain if not provided\n const faviconUrl = React.useMemo(() => {\n if (favicon) return favicon;\n try {\n const domain = new URL(url).hostname;\n return `https://www.google.com/s2/favicons?domain=${domain}&sz=32`;\n } catch {\n return null;\n }\n }, [url, favicon]);\n\n if (!faviconUrl || hasError) {\n return <Globe className={cn('size-4 text-muted-foreground', className)} />;\n }\n\n return (\n <img\n src={faviconUrl}\n alt=\"\"\n className={cn(\n 'size-4 rounded delight-fade-in motion-reduce:!animate-none',\n className,\n )}\n onError={() => setHasError(true)}\n />\n );\n}\n\nSourceFavicon.displayName = 'SourceFavicon';\n\n// =============================================================================\n// Source Trigger (Clickable element)\n// =============================================================================\n\nexport interface AISourceTriggerProps\n extends VariantProps<typeof sourceVariants> {\n /** Source data */\n source: SourceData;\n /** Whether to show favicon */\n showFavicon?: boolean;\n /** Additional class name */\n className?: string;\n /** Click handler */\n onClick?: () => void;\n}\n\nfunction AISourceTrigger({\n source,\n variant,\n showFavicon = true,\n className,\n onClick,\n}: AISourceTriggerProps) {\n const displayText = source.title || source.siteName || source.url;\n\n const sharedClassName = cn(sourceVariants({ variant }), className);\n const sharedChildren = (\n <>\n {showFavicon && (\n <SourceFavicon url={source.url} favicon={source.favicon} />\n )}\n <span className=\"truncate max-w-[200px]\">{displayText}</span>\n {variant === 'default' && (\n <ExternalLink className=\"size-3 shrink-0\" aria-hidden=\"true\" />\n )}\n </>\n );\n\n // Render as <a> when navigating to URL (proper semantics)\n if (!onClick) {\n return (\n <a\n data-slot=\"ai-source-trigger\"\n href={source.url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className={sharedClassName}\n aria-label={`Source: ${displayText}`}\n >\n {sharedChildren}\n </a>\n );\n }\n\n // Render as <button> when custom click handler is provided\n return (\n <button\n type=\"button\"\n data-slot=\"ai-source-trigger\"\n onClick={onClick}\n className={sharedClassName}\n aria-label={`Source: ${displayText}`}\n >\n {sharedChildren}\n </button>\n );\n}\n\nAISourceTrigger.displayName = 'AISourceTrigger';\n\n// =============================================================================\n// Source Content (Tooltip/Popover content)\n// =============================================================================\n\nexport interface AISourceContentProps {\n /** Source data */\n source: SourceData;\n /** Additional class name */\n className?: string;\n}\n\nfunction AISourceContent({ source, className }: AISourceContentProps) {\n const domain = React.useMemo(() => {\n try {\n return new URL(source.url).hostname;\n } catch {\n return source.url;\n }\n }, [source.url]);\n\n return (\n <div className={cn('p-3 max-w-xs space-y-2', className)}>\n <div className=\"flex items-start gap-2\">\n <SourceFavicon\n url={source.url}\n favicon={source.favicon}\n className=\"mt-0.5\"\n />\n <div className=\"flex-1 min-w-0\">\n <p className=\"text-sm font-medium text-foreground truncate\">\n {source.title || domain}\n </p>\n <p className=\"text-xs text-secondary-foreground truncate\">{domain}</p>\n </div>\n </div>\n {source.description && (\n <p className=\"text-xs text-muted-foreground line-clamp-2\">\n {source.description}\n </p>\n )}\n <a\n href={source.url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"flex items-center gap-1 text-xs text-primary hover:text-primary\"\n >\n Visit source\n <ExternalLink className=\"size-3\" />\n </a>\n </div>\n );\n}\n\nAISourceContent.displayName = 'AISourceContent';\n\n// =============================================================================\n// Main AISource Component (with built-in tooltip)\n// =============================================================================\n\nexport interface AISourceProps extends VariantProps<typeof sourceVariants> {\n /** Source data */\n source: SourceData;\n /** Whether to show favicon */\n showFavicon?: boolean;\n /** Whether to show tooltip on hover */\n showTooltip?: boolean;\n /** Additional class name */\n className?: string;\n}\n\nfunction AISource({\n source,\n variant,\n showFavicon = true,\n showTooltip = true,\n className,\n}: AISourceProps) {\n if (!showTooltip) {\n return (\n <span data-slot=\"ai-source\">\n <AISourceTrigger\n source={source}\n variant={variant}\n showFavicon={showFavicon}\n className={className}\n />\n </span>\n );\n }\n\n return (\n <Tooltip>\n <TooltipTrigger\n render={\n <span data-slot=\"ai-source\">\n <AISourceTrigger\n source={source}\n variant={variant}\n showFavicon={showFavicon}\n className={className}\n />\n </span>\n }\n />\n <TooltipPopup side=\"top\" className=\"p-0\">\n <AISourceContent source={source} />\n </TooltipPopup>\n </Tooltip>\n );\n}\n\nAISource.displayName = 'AISource';\n\n// =============================================================================\n// Source List Component\n// =============================================================================\n\nexport interface AISourceListProps {\n /** Array of sources */\n sources: SourceData[];\n /** Maximum sources to show before truncating */\n maxVisible?: number;\n /** Whether to show expanded list */\n showAll?: boolean;\n /** Callback when \"show more\" is clicked */\n onShowMore?: () => void;\n /** Additional class name */\n className?: string;\n}\n\nfunction AISourceList({\n sources,\n maxVisible = 3,\n showAll = false,\n onShowMore,\n className,\n}: AISourceListProps) {\n const safeMaxVisible = getMaxVisibleSources(maxVisible);\n const visibleSources = showAll ? sources : sources.slice(0, safeMaxVisible);\n const remainingCount = Math.max(0, sources.length - safeMaxVisible);\n\n return (\n <nav\n data-slot=\"ai-source-list\"\n aria-label=\"Sources\"\n className={cn('flex flex-wrap items-center gap-2', className)}\n >\n <span className=\"text-xs text-secondary-foreground\">Sources:</span>\n {visibleSources.map((source, index) => (\n <span\n key={`${source.url}-${index}`}\n className=\"delight-stagger motion-reduce:!animate-none\"\n style={\n { '--delight-delay': `${index * 50}ms` } as React.CSSProperties\n }\n >\n <AISource source={source} variant=\"pill\" />\n </span>\n ))}\n {!showAll && remainingCount > 0 && (\n <button\n type=\"button\"\n onClick={onShowMore}\n aria-label={`Show ${remainingCount} more sources`}\n className=\"px-2.5 py-1 rounded-full bg-accent hover:bg-surface-2 text-xs text-secondary-foreground transition-colors focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring delight-selection-press\"\n >\n +{remainingCount} more\n </button>\n )}\n </nav>\n );\n}\n\nAISourceList.displayName = 'AISourceList';\n\nexport {\n AISource,\n AISourceContent,\n AISourceList,\n AISourceTrigger,\n SourceFavicon,\n sourceVariants,\n};\n"],"x_google_ignoreList":[0,1],"mappings":";;;;;;AASA,IAAMA,IAAa;AAAA,EACjB,CAAC,QAAQ;AAAA,IAAE,GAAG;AAAA,IAAa,KAAK;AAAA,EAAS,CAAC;AAAA,EAC1C,CAAC,QAAQ;AAAA,IAAE,GAAG;AAAA,IAAe,KAAK;AAAA,EAAS,CAAC;AAAA,EAC5C,CAAC,QAAQ;AAAA,IAAE,GAAG;AAAA,IAA4D,KAAK;AAAA,EAAS,CAAC;AAC3F,GACM,IAAe,EAAiB,iBAAiBA,CAAU,GCL3D,IAAa;AAAA,EACjB,CAAC,UAAU;AAAA,IAAE,IAAI;AAAA,IAAM,IAAI;AAAA,IAAM,GAAG;AAAA,IAAM,KAAK;AAAA,EAAS,CAAC;AAAA,E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,CAAA;AAAA,EACG,CAAA;AAuBZ;AAEA,EAAS,cAAc;AAmBvB,SAAS,EAAa,EACpB,SAAA,GACA,YAAA,IAAa,GACb,SAAA,IAAU,IACV,YAAA,GACA,WAAA,EAAA,GACoB;AACpB,QAAM,IAAiB,EAAqB,CAAU,GAChD,IAAiB,IAAU,IAAU,EAAQ,MAAM,GAAG,CAAc,GACpE,IAAiB,KAAK,IAAI,GAAG,EAAQ,SAAS,CAAc;AAElE,SACE,gBAAA,EAAC,OAAD;AAAA,IACE,aAAU;AAAA,IACV,cAAW;AAAA,IACX,WAAW,EAAG,qCAAqC,CAAS;AAAA,cAH9D;AAAA,MAKE,gBAAA,EAAC,QAAD;AAAA,QAAM,WAAU;AAAA,kBAAoC;AAAA,MAAc,CAAA;AAAA,MACjE,EAAe,IAAA,CAAK,GAAQ,MAC3B,gBAAA,EAAC,QAAD;AAAA,QAEE,WAAU;AAAA,QACV,OACE,EAAE,mBAAmB,GAAG,IAAQ,EAAA,KAAO;AAAA,kBAGzC,gBAAA,EAAC,GAAD;AAAA,UAAkB,QAAA;AAAA,UAAQ,SAAQ;AAAA,QAAQ,CAAA;AAAA,MACtC,GAPC,GAAG,EAAO,GAAA,IAAO,CAAA,EAOlB,CACP;AAAA,MACA,CAAC,KAAW,IAAiB,KAC5B,gBAAA,EAAC,UAAD;AAAA,QACE,MAAK;AAAA,QACL,SAAS;AAAA,QACT,cAAY,QAAQ,CAAA;AAAA,QACpB,WAAU;AAAA,kBAJZ;AAAA,UAKC;AAAA,UACG;AAAA,UAAe;AAAA,QACX;AAAA;IAEP;AAAA;AAET;AAEA,EAAa,cAAc"}
@@ -7,18 +7,18 @@ import { t as w } from "./circle-alert.js";
7
7
  import { t as L } from "./clock.js";
8
8
  import { t as T } from "./dist.js";
9
9
  import { t as _ } from "./use-controllable-state.js";
10
- import { t as q } from "./react.js";
11
- import { t as B } from "./AnimatePresence.js";
10
+ import { t as B } from "./react.js";
11
+ import { t as R } from "./AnimatePresence.js";
12
12
  import { n as N } from "./AICodeBlock.js";
13
13
  import * as y from "react";
14
14
  import { jsx as t, jsxs as o } from "react/jsx-runtime";
15
- var R = [["path", {
15
+ var q = [["path", {
16
16
  d: "m16 18 6-6-6-6",
17
17
  key: "eg8j8"
18
18
  }], ["path", {
19
19
  d: "m8 6-6 6 6 6",
20
20
  key: "ppft3o"
21
- }]], C = I("code", R), D = [["path", {
21
+ }]], C = I("code", q), D = [["path", {
22
22
  d: "M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",
23
23
  key: "1ngwbx"
24
24
  }]], E = I("wrench", D), M = T("overflow-hidden rounded-xl border transition-colors", {
@@ -92,7 +92,7 @@ function h({ title: e, icon: s, children: n, className: a }) {
92
92
  return /* @__PURE__ */ o("div", {
93
93
  className: i("space-y-2", a),
94
94
  children: [/* @__PURE__ */ o("div", {
95
- className: "flex items-center gap-2 text-xs font-medium text-text-quaternary uppercase tracking-wide",
95
+ className: "flex items-center gap-2 text-xs font-medium text-secondary-foreground uppercase tracking-wide",
96
96
  children: [s, e]
97
97
  }), n]
98
98
  });
@@ -117,7 +117,7 @@ function S({ toolPart: e, defaultOpen: s = !1, open: n, onOpenChange: a, classNa
117
117
  status: m,
118
118
  isOpen: u,
119
119
  onToggle: p
120
- }), /* @__PURE__ */ t(B, { children: u && /* @__PURE__ */ t(q.div, {
120
+ }), /* @__PURE__ */ t(R, { children: u && /* @__PURE__ */ t(B.div, {
121
121
  initial: {
122
122
  height: 0,
123
123
  opacity: 0
@@ -1 +1 @@
1
- {"version":3,"file":"AIToolCall.js","names":["__iconNode"],"sources":["../../../../../../../../../../../Users/akarim/Documents/test/humain_foundation_ui/node_modules/.bun/lucide-react@1.27.0+0f58469d5b3bd39f/node_modules/lucide-react/dist/esm/icons/code.mjs","../../../../../../../../../../../Users/akarim/Documents/test/humain_foundation_ui/node_modules/.bun/lucide-react@1.27.0+0f58469d5b3bd39f/node_modules/lucide-react/dist/esm/icons/wrench.mjs","../../src/components/organisms/ai/AIToolCall/AIToolCall.tsx"],"sourcesContent":["/**\n * @license lucide-react v1.27.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"path\", { d: \"m16 18 6-6-6-6\", key: \"eg8j8\" }],\n [\"path\", { d: \"m8 6-6 6 6 6\", key: \"ppft3o\" }]\n];\nconst Code = createLucideIcon(\"code\", __iconNode);\n\nexport { __iconNode, Code as default };\n//# sourceMappingURL=code.mjs.map\n","/**\n * @license lucide-react v1.27.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\n \"path\",\n {\n d: \"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z\",\n key: \"1ngwbx\"\n }\n ]\n];\nconst Wrench = createLucideIcon(\"wrench\", __iconNode);\n\nexport { __iconNode, Wrench as default };\n//# sourceMappingURL=wrench.mjs.map\n","import { cva, type VariantProps } from 'class-variance-authority';\nimport {\n AlertCircle,\n Check,\n ChevronDown,\n ChevronRight,\n Clock,\n Code,\n Wrench,\n} from 'lucide-react';\nimport { AnimatePresence, motion } from 'motion/react';\nimport * as React from 'react';\nimport { AICodeBlock } from '@/components/organisms/ai/AICodeBlock';\nimport { useControllableState } from '@/hooks/use-controllable-state';\nimport { cn } from '@/lib/utils';\n\n// =============================================================================\n// Variants\n// =============================================================================\n\nconst toolCallVariants = cva(\n 'overflow-hidden rounded-xl border transition-colors',\n {\n variants: {\n status: {\n pending: 'border-border bg-muted',\n running: 'border-primary bg-primary/10',\n success: 'border-success/50 bg-success/10',\n error: 'border-destructive/50 bg-destructive/10',\n },\n },\n defaultVariants: {\n status: 'pending',\n },\n },\n);\n\nconst statusIconVariants = cva('size-4', {\n variants: {\n status: {\n pending: 'text-muted-foreground',\n running: 'text-primary animate-spin motion-reduce:animate-none',\n success: 'text-success',\n error: 'text-destructive',\n },\n },\n defaultVariants: {\n status: 'pending',\n },\n});\n\n// =============================================================================\n// Types\n// =============================================================================\n\nexport type ToolCallStatus = 'pending' | 'running' | 'success' | 'error';\n\nexport interface ToolCallPart {\n /** Unique tool call ID */\n toolCallId: string;\n /** Tool name */\n toolName: string;\n /** Tool input/arguments */\n args?: Record<string, unknown>;\n /** Tool output/result */\n result?: unknown;\n /** Tool status */\n status?: ToolCallStatus;\n /** Error message if status is error */\n error?: string;\n}\n\n// =============================================================================\n// Status Icon Component\n// =============================================================================\n\ninterface StatusIconProps {\n status: ToolCallStatus;\n className?: string;\n}\n\nfunction StatusIcon({ status, className }: StatusIconProps) {\n const iconClass = cn(statusIconVariants({ status }), className);\n\n switch (status) {\n case 'running':\n return <Clock className={iconClass} />;\n case 'success':\n return (\n <Check\n className={cn(\n iconClass,\n 'delight-check-bounce motion-reduce:!animate-none',\n )}\n />\n );\n case 'error':\n return (\n <AlertCircle\n className={cn(iconClass, 'delight-shake motion-reduce:!animate-none')}\n />\n );\n default:\n return <Wrench className={iconClass} />;\n }\n}\n\nStatusIcon.displayName = 'StatusIcon';\n\n// =============================================================================\n// Tool Call Header\n// =============================================================================\n\ninterface AIToolCallHeaderProps {\n toolName: string;\n status: ToolCallStatus;\n isOpen: boolean;\n onToggle: () => void;\n className?: string;\n}\n\nfunction AIToolCallHeader({\n toolName,\n status,\n isOpen,\n onToggle,\n className,\n}: AIToolCallHeaderProps) {\n const statusLabel = {\n pending: 'Pending',\n running: 'Running...',\n success: 'Completed',\n error: 'Failed',\n };\n\n return (\n <button\n type=\"button\"\n onClick={onToggle}\n aria-expanded={isOpen}\n className={cn(\n 'flex items-center justify-between w-full px-4 py-3 transition-colors hover:bg-foreground/5 focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-ring',\n className,\n )}\n >\n <div className=\"flex items-center gap-3\">\n <StatusIcon status={status} aria-hidden=\"true\" />\n <div className=\"flex flex-col items-start\">\n <span className=\"text-sm font-medium text-foreground\">\n {toolName}\n </span>\n <span className=\"text-xs text-secondary-foreground\">\n {statusLabel[status]}\n </span>\n </div>\n </div>\n {isOpen ? (\n <ChevronDown\n className=\"size-4 text-muted-foreground\"\n aria-hidden=\"true\"\n />\n ) : (\n <ChevronRight\n className=\"size-4 text-muted-foreground rtl:rotate-180\"\n aria-hidden=\"true\"\n />\n )}\n </button>\n );\n}\n\nAIToolCallHeader.displayName = 'AIToolCallHeader';\n\n// =============================================================================\n// Tool Call Section\n// =============================================================================\n\ninterface ToolCallSectionProps {\n title: string;\n icon: React.ReactNode;\n children: React.ReactNode;\n className?: string;\n}\n\nfunction ToolCallSection({\n title,\n icon,\n children,\n className,\n}: ToolCallSectionProps) {\n return (\n <div className={cn('space-y-2', className)}>\n <div className=\"flex items-center gap-2 text-xs font-medium text-text-quaternary uppercase tracking-wide\">\n {icon}\n {title}\n </div>\n {children}\n </div>\n );\n}\n\nToolCallSection.displayName = 'ToolCallSection';\n\n// =============================================================================\n// Main AIToolCall Component\n// =============================================================================\n\nexport interface AIToolCallProps extends VariantProps<typeof toolCallVariants> {\n /** Tool call data */\n toolPart: ToolCallPart;\n /** Whether to expand by default */\n defaultOpen?: boolean;\n /** Controlled open state */\n open?: boolean;\n /** Callback when open state changes */\n onOpenChange?: (open: boolean) => void;\n /** Additional class name */\n className?: string;\n}\n\nfunction formatValue(value: unknown): string {\n if (typeof value === 'string') return value;\n return JSON.stringify(value, null, 2);\n}\n\nfunction AIToolCall({\n toolPart,\n defaultOpen = false,\n open: controlledOpen,\n onOpenChange,\n className,\n}: AIToolCallProps) {\n const [isOpen, setIsOpen] = useControllableState({\n value: controlledOpen,\n defaultValue: defaultOpen,\n onChange: onOpenChange,\n });\n\n const status = toolPart.status || 'pending';\n\n const handleToggle = () => {\n setIsOpen(!isOpen);\n };\n\n return (\n <div\n data-slot=\"ai-tool-call\"\n className={cn(toolCallVariants({ status }), className)}\n >\n <AIToolCallHeader\n toolName={toolPart.toolName}\n status={status}\n isOpen={isOpen}\n onToggle={handleToggle}\n />\n\n <AnimatePresence>\n {isOpen && (\n <motion.div\n initial={{ height: 0, opacity: 0 }}\n animate={{ height: 'auto', opacity: 1 }}\n exit={{ height: 0, opacity: 0 }}\n transition={{ duration: 0.2 }}\n className=\"overflow-hidden\"\n >\n <div className=\"px-4 pb-4 space-y-4\">\n {/* Tool Call ID */}\n <div className=\"text-xs text-muted-foreground font-mono\">\n ID: {toolPart.toolCallId}\n </div>\n\n {/* Input Section */}\n {toolPart.args && Object.keys(toolPart.args).length > 0 && (\n <ToolCallSection\n title=\"Input\"\n icon={<Code className=\"size-3\" />}\n >\n <AICodeBlock\n code={formatValue(toolPart.args)}\n language=\"json\"\n showHeader={false}\n showCopyButton={true}\n size=\"sm\"\n />\n </ToolCallSection>\n )}\n\n {/* Output Section */}\n {toolPart.result !== undefined && (\n <ToolCallSection\n title=\"Output\"\n icon={<Code className=\"size-3\" />}\n >\n <AICodeBlock\n code={formatValue(toolPart.result)}\n language=\"json\"\n showHeader={false}\n showCopyButton={true}\n size=\"sm\"\n />\n </ToolCallSection>\n )}\n\n {/* Error Section */}\n {toolPart.error && (\n <div className=\"p-3 rounded-lg bg-destructive/20 border border-destructive/50\">\n <div className=\"flex items-start gap-2\">\n <AlertCircle className=\"size-4 text-destructive mt-0.5 shrink-0\" />\n <p className=\"text-sm text-destructive\">{toolPart.error}</p>\n </div>\n </div>\n )}\n </div>\n </motion.div>\n )}\n </AnimatePresence>\n </div>\n );\n}\n\nAIToolCall.displayName = 'AIToolCall';\n\n// =============================================================================\n// Tool Call List Component\n// =============================================================================\n\nexport interface AIToolCallListProps {\n /** Array of tool calls */\n toolCalls: readonly ToolCallPart[];\n /** Whether to expand all by default */\n defaultAllOpen?: boolean;\n /** Tool-call IDs to expand initially in uncontrolled mode */\n defaultOpenToolCallIds?: readonly string[];\n /** Controlled expanded tool-call IDs */\n openToolCallIds?: readonly string[];\n /** Called with expanded IDs in current tool-call order */\n onOpenToolCallIdsChange?: (ids: readonly string[]) => void;\n /** Additional class name */\n className?: string;\n}\n\nfunction normalizeOpenToolCallIds(\n ids: readonly string[],\n toolCalls: readonly ToolCallPart[],\n): string[] {\n const requested = new Set(ids);\n return toolCalls.flatMap((toolCall) =>\n requested.has(toolCall.toolCallId) ? [toolCall.toolCallId] : [],\n );\n}\n\nfunction areToolCallIdsEqual(\n left: readonly string[],\n right: readonly string[],\n): boolean {\n return (\n left.length === right.length &&\n left.every((id, index) => id === right[index])\n );\n}\n\nfunction AIToolCallList({\n toolCalls,\n defaultAllOpen = false,\n defaultOpenToolCallIds = [],\n openToolCallIds: controlledOpenToolCallIds,\n onOpenToolCallIdsChange,\n className,\n}: AIToolCallListProps) {\n const isControlled = controlledOpenToolCallIds !== undefined;\n const [uncontrolledOpenToolCallIds, setUncontrolledOpenToolCallIds] =\n React.useState<readonly string[]>(() =>\n normalizeOpenToolCallIds(\n defaultAllOpen\n ? toolCalls.map((toolCall) => toolCall.toolCallId)\n : defaultOpenToolCallIds,\n toolCalls,\n ),\n );\n const rawOpenToolCallIds = isControlled\n ? controlledOpenToolCallIds\n : uncontrolledOpenToolCallIds;\n const visibleOpenToolCallIds = normalizeOpenToolCallIds(\n rawOpenToolCallIds,\n toolCalls,\n );\n const openSet = new Set(visibleOpenToolCallIds);\n\n React.useLayoutEffect(() => {\n if (isControlled) return;\n setUncontrolledOpenToolCallIds((current) => {\n const normalized = normalizeOpenToolCallIds(current, toolCalls);\n return areToolCallIdsEqual(current, normalized) ? current : normalized;\n });\n }, [isControlled, toolCalls]);\n\n const setToolCallOpen = (toolCallId: string, open: boolean) => {\n const next = new Set(visibleOpenToolCallIds);\n if (open) next.add(toolCallId);\n else next.delete(toolCallId);\n const normalized = normalizeOpenToolCallIds([...next], toolCalls);\n if (!isControlled) {\n setUncontrolledOpenToolCallIds(normalized);\n }\n onOpenToolCallIdsChange?.([...normalized]);\n };\n\n return (\n <div data-slot=\"ai-tool-call-list\" className={cn('space-y-2', className)}>\n {toolCalls.map((toolCall) => (\n <AIToolCall\n key={toolCall.toolCallId}\n toolPart={toolCall}\n open={openSet.has(toolCall.toolCallId)}\n onOpenChange={(open) => setToolCallOpen(toolCall.toolCallId, open)}\n />\n ))}\n </div>\n );\n}\n\nAIToolCallList.displayName = 'AIToolCallList';\n\nexport {\n AIToolCall,\n AIToolCallHeader,\n AIToolCallList,\n StatusIcon,\n statusIconVariants,\n ToolCallSection,\n toolCallVariants,\n};\n"],"x_google_ignoreList":[0,1],"mappings":";;;;;;;;;;;;;;AASA,IAAMA,IAAa,CACjB,CAAC,QAAQ;AAAA,EAAE,GAAG;AAAA,EAAkB,KAAK;AAAQ,CAAC,GAC9C,CAAC,QAAQ;AAAA,EAAE,GAAG;AAAA,EAAgB,KAAK;AAAS,CAAC,CAC/C,GACM,IAAO,EAAiB,QAAQA,CAAU,GCJ1C,IAAa,CACjB,CACE,QACA;AAAA,EACE,GAAG;AAAA,EACH,KAAK;AACP,CACF,CACF,GACM,IAAS,EAAiB,UAAU,CAAU,GCE9C,IAAmB,EACvB,uDACA;AAAA,EACE,UAAU,EACR,QAAQ;AAAA,IACN,SAAS;AAAA,IACT,SAAS;AAAA,IACT,SAAS;AAAA,IACT,OAAO;AAAA,EACT,EACF;AAAA,EACA,iBAAiB,EACf,QAAQ,UACV;AACF,CACF,GAEM,IAAqB,EAAI,UAAU;AAAA,EACvC,UAAU,EACR,QAAQ;AAAA,IACN,SAAS;AAAA,IACT,SAAS;AAAA,IACT,SAAS;AAAA,IACT,OAAO;AAAA,EAC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AAEA,SACE,gBAAA,EAAC,OAAD;AAAA,IAAK,aAAU;AAAA,IAAoB,WAAW,EAAG,aAAa,CAAS;AAAA,cACpE,EAAU,IAAA,CAAK,MACd,gBAAA,EAAC,GAAD;AAAA,MAEE,UAAU;AAAA,MACV,MAAM,EAAQ,IAAI,EAAS,UAAU;AAAA,MACrC,cAAA,CAAe,MAAS,EAAgB,EAAS,YAAY,CAAI;AAAA,IAClE,GAJM,EAAS,UAIf,CACF;AAAA,EACE,CAAA;AAET;AAEA,EAAe,cAAc"}
1
+ {"version":3,"file":"AIToolCall.js","names":["__iconNode"],"sources":["../../../../../../../../../../../Users/akarim/Documents/test/humain_foundation_ui/node_modules/.bun/lucide-react@1.27.0+0f58469d5b3bd39f/node_modules/lucide-react/dist/esm/icons/code.mjs","../../../../../../../../../../../Users/akarim/Documents/test/humain_foundation_ui/node_modules/.bun/lucide-react@1.27.0+0f58469d5b3bd39f/node_modules/lucide-react/dist/esm/icons/wrench.mjs","../../src/components/organisms/ai/AIToolCall/AIToolCall.tsx"],"sourcesContent":["/**\n * @license lucide-react v1.27.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\"path\", { d: \"m16 18 6-6-6-6\", key: \"eg8j8\" }],\n [\"path\", { d: \"m8 6-6 6 6 6\", key: \"ppft3o\" }]\n];\nconst Code = createLucideIcon(\"code\", __iconNode);\n\nexport { __iconNode, Code as default };\n//# sourceMappingURL=code.mjs.map\n","/**\n * @license lucide-react v1.27.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n [\n \"path\",\n {\n d: \"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z\",\n key: \"1ngwbx\"\n }\n ]\n];\nconst Wrench = createLucideIcon(\"wrench\", __iconNode);\n\nexport { __iconNode, Wrench as default };\n//# sourceMappingURL=wrench.mjs.map\n","import { cva, type VariantProps } from 'class-variance-authority';\nimport {\n AlertCircle,\n Check,\n ChevronDown,\n ChevronRight,\n Clock,\n Code,\n Wrench,\n} from 'lucide-react';\nimport { AnimatePresence, motion } from 'motion/react';\nimport * as React from 'react';\nimport { AICodeBlock } from '@/components/organisms/ai/AICodeBlock';\nimport { useControllableState } from '@/hooks/use-controllable-state';\nimport { cn } from '@/lib/utils';\n\n// =============================================================================\n// Variants\n// =============================================================================\n\nconst toolCallVariants = cva(\n 'overflow-hidden rounded-xl border transition-colors',\n {\n variants: {\n status: {\n pending: 'border-border bg-muted',\n running: 'border-primary bg-primary/10',\n success: 'border-success/50 bg-success/10',\n error: 'border-destructive/50 bg-destructive/10',\n },\n },\n defaultVariants: {\n status: 'pending',\n },\n },\n);\n\nconst statusIconVariants = cva('size-4', {\n variants: {\n status: {\n pending: 'text-muted-foreground',\n running: 'text-primary animate-spin motion-reduce:animate-none',\n success: 'text-success',\n error: 'text-destructive',\n },\n },\n defaultVariants: {\n status: 'pending',\n },\n});\n\n// =============================================================================\n// Types\n// =============================================================================\n\nexport type ToolCallStatus = 'pending' | 'running' | 'success' | 'error';\n\nexport interface ToolCallPart {\n /** Unique tool call ID */\n toolCallId: string;\n /** Tool name */\n toolName: string;\n /** Tool input/arguments */\n args?: Record<string, unknown>;\n /** Tool output/result */\n result?: unknown;\n /** Tool status */\n status?: ToolCallStatus;\n /** Error message if status is error */\n error?: string;\n}\n\n// =============================================================================\n// Status Icon Component\n// =============================================================================\n\ninterface StatusIconProps {\n status: ToolCallStatus;\n className?: string;\n}\n\nfunction StatusIcon({ status, className }: StatusIconProps) {\n const iconClass = cn(statusIconVariants({ status }), className);\n\n switch (status) {\n case 'running':\n return <Clock className={iconClass} />;\n case 'success':\n return (\n <Check\n className={cn(\n iconClass,\n 'delight-check-bounce motion-reduce:!animate-none',\n )}\n />\n );\n case 'error':\n return (\n <AlertCircle\n className={cn(iconClass, 'delight-shake motion-reduce:!animate-none')}\n />\n );\n default:\n return <Wrench className={iconClass} />;\n }\n}\n\nStatusIcon.displayName = 'StatusIcon';\n\n// =============================================================================\n// Tool Call Header\n// =============================================================================\n\ninterface AIToolCallHeaderProps {\n toolName: string;\n status: ToolCallStatus;\n isOpen: boolean;\n onToggle: () => void;\n className?: string;\n}\n\nfunction AIToolCallHeader({\n toolName,\n status,\n isOpen,\n onToggle,\n className,\n}: AIToolCallHeaderProps) {\n const statusLabel = {\n pending: 'Pending',\n running: 'Running...',\n success: 'Completed',\n error: 'Failed',\n };\n\n return (\n <button\n type=\"button\"\n onClick={onToggle}\n aria-expanded={isOpen}\n className={cn(\n 'flex items-center justify-between w-full px-4 py-3 transition-colors hover:bg-foreground/5 focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-ring',\n className,\n )}\n >\n <div className=\"flex items-center gap-3\">\n <StatusIcon status={status} aria-hidden=\"true\" />\n <div className=\"flex flex-col items-start\">\n <span className=\"text-sm font-medium text-foreground\">\n {toolName}\n </span>\n <span className=\"text-xs text-secondary-foreground\">\n {statusLabel[status]}\n </span>\n </div>\n </div>\n {isOpen ? (\n <ChevronDown\n className=\"size-4 text-muted-foreground\"\n aria-hidden=\"true\"\n />\n ) : (\n <ChevronRight\n className=\"size-4 text-muted-foreground rtl:rotate-180\"\n aria-hidden=\"true\"\n />\n )}\n </button>\n );\n}\n\nAIToolCallHeader.displayName = 'AIToolCallHeader';\n\n// =============================================================================\n// Tool Call Section\n// =============================================================================\n\ninterface ToolCallSectionProps {\n title: string;\n icon: React.ReactNode;\n children: React.ReactNode;\n className?: string;\n}\n\nfunction ToolCallSection({\n title,\n icon,\n children,\n className,\n}: ToolCallSectionProps) {\n return (\n <div className={cn('space-y-2', className)}>\n <div className=\"flex items-center gap-2 text-xs font-medium text-secondary-foreground uppercase tracking-wide\">\n {icon}\n {title}\n </div>\n {children}\n </div>\n );\n}\n\nToolCallSection.displayName = 'ToolCallSection';\n\n// =============================================================================\n// Main AIToolCall Component\n// =============================================================================\n\nexport interface AIToolCallProps extends VariantProps<typeof toolCallVariants> {\n /** Tool call data */\n toolPart: ToolCallPart;\n /** Whether to expand by default */\n defaultOpen?: boolean;\n /** Controlled open state */\n open?: boolean;\n /** Callback when open state changes */\n onOpenChange?: (open: boolean) => void;\n /** Additional class name */\n className?: string;\n}\n\nfunction formatValue(value: unknown): string {\n if (typeof value === 'string') return value;\n return JSON.stringify(value, null, 2);\n}\n\nfunction AIToolCall({\n toolPart,\n defaultOpen = false,\n open: controlledOpen,\n onOpenChange,\n className,\n}: AIToolCallProps) {\n const [isOpen, setIsOpen] = useControllableState({\n value: controlledOpen,\n defaultValue: defaultOpen,\n onChange: onOpenChange,\n });\n\n const status = toolPart.status || 'pending';\n\n const handleToggle = () => {\n setIsOpen(!isOpen);\n };\n\n return (\n <div\n data-slot=\"ai-tool-call\"\n className={cn(toolCallVariants({ status }), className)}\n >\n <AIToolCallHeader\n toolName={toolPart.toolName}\n status={status}\n isOpen={isOpen}\n onToggle={handleToggle}\n />\n\n <AnimatePresence>\n {isOpen && (\n <motion.div\n initial={{ height: 0, opacity: 0 }}\n animate={{ height: 'auto', opacity: 1 }}\n exit={{ height: 0, opacity: 0 }}\n transition={{ duration: 0.2 }}\n className=\"overflow-hidden\"\n >\n <div className=\"px-4 pb-4 space-y-4\">\n {/* Tool Call ID */}\n <div className=\"text-xs text-muted-foreground font-mono\">\n ID: {toolPart.toolCallId}\n </div>\n\n {/* Input Section */}\n {toolPart.args && Object.keys(toolPart.args).length > 0 && (\n <ToolCallSection\n title=\"Input\"\n icon={<Code className=\"size-3\" />}\n >\n <AICodeBlock\n code={formatValue(toolPart.args)}\n language=\"json\"\n showHeader={false}\n showCopyButton={true}\n size=\"sm\"\n />\n </ToolCallSection>\n )}\n\n {/* Output Section */}\n {toolPart.result !== undefined && (\n <ToolCallSection\n title=\"Output\"\n icon={<Code className=\"size-3\" />}\n >\n <AICodeBlock\n code={formatValue(toolPart.result)}\n language=\"json\"\n showHeader={false}\n showCopyButton={true}\n size=\"sm\"\n />\n </ToolCallSection>\n )}\n\n {/* Error Section */}\n {toolPart.error && (\n <div className=\"p-3 rounded-lg bg-destructive/20 border border-destructive/50\">\n <div className=\"flex items-start gap-2\">\n <AlertCircle className=\"size-4 text-destructive mt-0.5 shrink-0\" />\n <p className=\"text-sm text-destructive\">{toolPart.error}</p>\n </div>\n </div>\n )}\n </div>\n </motion.div>\n )}\n </AnimatePresence>\n </div>\n );\n}\n\nAIToolCall.displayName = 'AIToolCall';\n\n// =============================================================================\n// Tool Call List Component\n// =============================================================================\n\nexport interface AIToolCallListProps {\n /** Array of tool calls */\n toolCalls: readonly ToolCallPart[];\n /** Whether to expand all by default */\n defaultAllOpen?: boolean;\n /** Tool-call IDs to expand initially in uncontrolled mode */\n defaultOpenToolCallIds?: readonly string[];\n /** Controlled expanded tool-call IDs */\n openToolCallIds?: readonly string[];\n /** Called with expanded IDs in current tool-call order */\n onOpenToolCallIdsChange?: (ids: readonly string[]) => void;\n /** Additional class name */\n className?: string;\n}\n\nfunction normalizeOpenToolCallIds(\n ids: readonly string[],\n toolCalls: readonly ToolCallPart[],\n): string[] {\n const requested = new Set(ids);\n return toolCalls.flatMap((toolCall) =>\n requested.has(toolCall.toolCallId) ? [toolCall.toolCallId] : [],\n );\n}\n\nfunction areToolCallIdsEqual(\n left: readonly string[],\n right: readonly string[],\n): boolean {\n return (\n left.length === right.length &&\n left.every((id, index) => id === right[index])\n );\n}\n\nfunction AIToolCallList({\n toolCalls,\n defaultAllOpen = false,\n defaultOpenToolCallIds = [],\n openToolCallIds: controlledOpenToolCallIds,\n onOpenToolCallIdsChange,\n className,\n}: AIToolCallListProps) {\n const isControlled = controlledOpenToolCallIds !== undefined;\n const [uncontrolledOpenToolCallIds, setUncontrolledOpenToolCallIds] =\n React.useState<readonly string[]>(() =>\n normalizeOpenToolCallIds(\n defaultAllOpen\n ? toolCalls.map((toolCall) => toolCall.toolCallId)\n : defaultOpenToolCallIds,\n toolCalls,\n ),\n );\n const rawOpenToolCallIds = isControlled\n ? controlledOpenToolCallIds\n : uncontrolledOpenToolCallIds;\n const visibleOpenToolCallIds = normalizeOpenToolCallIds(\n rawOpenToolCallIds,\n toolCalls,\n );\n const openSet = new Set(visibleOpenToolCallIds);\n\n React.useLayoutEffect(() => {\n if (isControlled) return;\n setUncontrolledOpenToolCallIds((current) => {\n const normalized = normalizeOpenToolCallIds(current, toolCalls);\n return areToolCallIdsEqual(current, normalized) ? current : normalized;\n });\n }, [isControlled, toolCalls]);\n\n const setToolCallOpen = (toolCallId: string, open: boolean) => {\n const next = new Set(visibleOpenToolCallIds);\n if (open) next.add(toolCallId);\n else next.delete(toolCallId);\n const normalized = normalizeOpenToolCallIds([...next], toolCalls);\n if (!isControlled) {\n setUncontrolledOpenToolCallIds(normalized);\n }\n onOpenToolCallIdsChange?.([...normalized]);\n };\n\n return (\n <div data-slot=\"ai-tool-call-list\" className={cn('space-y-2', className)}>\n {toolCalls.map((toolCall) => (\n <AIToolCall\n key={toolCall.toolCallId}\n toolPart={toolCall}\n open={openSet.has(toolCall.toolCallId)}\n onOpenChange={(open) => setToolCallOpen(toolCall.toolCallId, open)}\n />\n ))}\n </div>\n );\n}\n\nAIToolCallList.displayName = 'AIToolCallList';\n\nexport {\n AIToolCall,\n AIToolCallHeader,\n AIToolCallList,\n StatusIcon,\n statusIconVariants,\n ToolCallSection,\n toolCallVariants,\n};\n"],"x_google_ignoreList":[0,1],"mappings":";;;;;;;;;;;;;;AASA,IAAMA,IAAa,CACjB,CAAC,QAAQ;AAAA,EAAE,GAAG;AAAA,EAAkB,KAAK;AAAQ,CAAC,GAC9C,CAAC,QAAQ;AAAA,EAAE,GAAG;AAAA,EAAgB,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AAM,gBAAA,MAAsB;AAC1B,IAAI,KACJ,EAAA,CAAgC,MAAY;AAC1C,YAAM,IAAa,EAAyB,GAAS,CAAS;AAC9D,aAAO,EAAoB,GAAS,CAAU,IAAI,IAAU;AAAA,IAC9D,CAAC;AAAA,EACH,GAAG,CAAC,GAAc,CAAS,CAAC;AAE5B,QAAM,IAAA,CAAmB,GAAoB,MAAkB;AAC7D,UAAM,IAAO,IAAI,IAAI,CAAsB;AAC3C,IAAI,IAAM,EAAK,IAAI,CAAU,IACxB,EAAK,OAAO,CAAU;AAC3B,UAAM,IAAa,EAAyB,CAAC,GAAG,CAAI,GAAG,CAAS;AAChE,IAAK,KACH,EAA+B,CAAU,GAE3C,IAA0B,CAAC,GAAG,CAAU,CAAC;AAAA,EAC3C;AAEA,SACE,gBAAA,EAAC,OAAD;AAAA,IAAK,aAAU;AAAA,IAAoB,WAAW,EAAG,aAAa,CAAS;AAAA,cACpE,EAAU,IAAA,CAAK,MACd,gBAAA,EAAC,GAAD;AAAA,MAEE,UAAU;AAAA,MACV,MAAM,EAAQ,IAAI,EAAS,UAAU;AAAA,MACrC,cAAA,CAAe,MAAS,EAAgB,EAAS,YAAY,CAAI;AAAA,IAClE,GAJM,EAAS,UAIf,CACF;AAAA,EACE,CAAA;AAET;AAEA,EAAe,cAAc"}
@@ -20,21 +20,21 @@ function b({ className: r, ...e }) {
20
20
  ...e
21
21
  });
22
22
  }
23
- function p({ className: r, ...e }) {
23
+ function f({ className: r, ...e }) {
24
24
  return /* @__PURE__ */ a("ol", {
25
25
  "data-slot": "breadcrumb-list",
26
26
  className: o("text-muted-foreground gap-1.5 text-sm sm:gap-2.5 flex flex-wrap items-center break-words", r),
27
27
  ...e
28
28
  });
29
29
  }
30
- function f({ className: r, ...e }) {
30
+ function p({ className: r, ...e }) {
31
31
  return /* @__PURE__ */ a("li", {
32
32
  "data-slot": "breadcrumb-item",
33
33
  className: o("gap-1.5 inline-flex items-center", r),
34
34
  ...e
35
35
  });
36
36
  }
37
- function l({ className: r, render: e, ...t }) {
37
+ function d({ className: r, render: e, ...t }) {
38
38
  return H({
39
39
  defaultTagName: "a",
40
40
  props: E({ className: o("hover:text-foreground transition-colors focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring rounded-sm", r) }, t),
@@ -76,13 +76,13 @@ function V({ className: r, ...e }) {
76
76
  });
77
77
  }
78
78
  b.displayName = "Breadcrumb";
79
- p.displayName = "BreadcrumbList";
80
- f.displayName = "BreadcrumbItem";
81
- l.displayName = "BreadcrumbLink";
79
+ f.displayName = "BreadcrumbList";
80
+ p.displayName = "BreadcrumbItem";
81
+ d.displayName = "BreadcrumbLink";
82
82
  g.displayName = "BreadcrumbPage";
83
83
  x.displayName = "BreadcrumbSeparator";
84
84
  V.displayName = "BreadcrumbEllipsis";
85
- var N = "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring rounded-sm", d = z('inline-flex items-center transition-[color,opacity,background-color,border-color,text-decoration-color] duration-200 ease-out whitespace-nowrap relative before:absolute before:inset-x-0 before:top-1/2 before:-translate-y-1/2 before:min-h-11 before:content-[""] sm:before:content-none motion-reduce:transition-none', {
85
+ var N = "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring rounded-sm", l = z('inline-flex items-center transition-[color,opacity,background-color,border-color,text-decoration-color] duration-200 ease-out whitespace-nowrap relative before:absolute before:inset-x-0 before:top-1/2 before:-translate-y-1/2 before:min-h-11 before:content-[""] sm:before:content-none motion-reduce:transition-none', {
86
86
  variants: {
87
87
  variant: {
88
88
  text: "text-sm font-normal text-muted-foreground hover:text-foreground underline decoration-transparent underline-offset-4 hover:decoration-current/30",
@@ -130,7 +130,7 @@ var N = "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:ou
130
130
  variant: "text",
131
131
  isCurrent: !1
132
132
  }
133
- }), y = u.createContext({ separator: "chevron" }), q = () => u.useContext(y);
133
+ }), y = u.createContext({ separator: "chevron" }), M = () => u.useContext(y);
134
134
  function i({ className: r, separator: e = "chevron", ring: t = !1, children: n, ...s }) {
135
135
  const I = u.useMemo(() => ({ separator: e }), [e]);
136
136
  return /* @__PURE__ */ a(y.Provider, {
@@ -143,20 +143,20 @@ function i({ className: r, separator: e = "chevron", ring: t = !1, children: n,
143
143
  });
144
144
  }
145
145
  function v({ className: r, ...e }) {
146
- return /* @__PURE__ */ a(p, {
146
+ return /* @__PURE__ */ a(f, {
147
147
  className: o("flex-nowrap gap-1", r),
148
148
  ...e
149
149
  });
150
150
  }
151
151
  function B({ className: r, ...e }) {
152
- return /* @__PURE__ */ a(f, {
152
+ return /* @__PURE__ */ a(p, {
153
153
  className: o("gap-1", r),
154
154
  ...e
155
155
  });
156
156
  }
157
157
  function h({ className: r, variant: e = "text", isCurrent: t = !1, ...n }) {
158
- return /* @__PURE__ */ a(l, {
159
- className: o(d({
158
+ return /* @__PURE__ */ a(d, {
159
+ className: o(l({
160
160
  variant: e,
161
161
  isCurrent: t
162
162
  }), r),
@@ -165,7 +165,7 @@ function h({ className: r, variant: e = "text", isCurrent: t = !1, ...n }) {
165
165
  }
166
166
  function C({ className: r, variant: e = "text", ...t }) {
167
167
  return /* @__PURE__ */ a(g, {
168
- className: o(d({
168
+ className: o(l({
169
169
  variant: e,
170
170
  isCurrent: !0
171
171
  }), r),
@@ -173,9 +173,9 @@ function C({ className: r, variant: e = "text", ...t }) {
173
173
  });
174
174
  }
175
175
  function k({ className: r, type: e, ...t }) {
176
- const { separator: n } = q(), s = e ?? n;
176
+ const { separator: n } = M(), s = e ?? n;
177
177
  return /* @__PURE__ */ a(x, {
178
- className: o("[&>svg]:size-3.5 text-text-quaternary transition-opacity duration-200 ease-out motion-reduce:transition-none", r),
178
+ className: o("[&>svg]:size-3.5 text-muted-foreground transition-opacity duration-200 ease-out motion-reduce:transition-none", r),
179
179
  ...t,
180
180
  children: s === "slash" ? /* @__PURE__ */ a(j, {}) : /* @__PURE__ */ a(m, { className: "rtl:rotate-180" })
181
181
  });
@@ -185,7 +185,7 @@ function L({ className: r, variant: e = "text", ...t }) {
185
185
  type: "button",
186
186
  "data-slot": "breadcrumb-ellipsis",
187
187
  "aria-label": "Show more breadcrumb items",
188
- className: o(d({
188
+ className: o(l({
189
189
  variant: e,
190
190
  isCurrent: !1
191
191
  }), `cursor-pointer hover:text-foreground ${N}`, r),
@@ -194,8 +194,8 @@ function L({ className: r, variant: e = "text", ...t }) {
194
194
  });
195
195
  }
196
196
  function $({ className: r, variant: e = "text", srLabel: t = "Home", ...n }) {
197
- return /* @__PURE__ */ c(l, {
198
- className: o(`group inline-flex items-center text-text-quaternary hover:text-secondary-foreground transition-colors duration-200 ease-out motion-reduce:transition-none ${N}`, e === "soft-badge" && "rounded-full px-1.5 py-0.5 bg-primary/10 text-primary", e === "outline-badge" && "rounded-full px-1.5 py-0.5 border border-muted-foreground/50", r),
197
+ return /* @__PURE__ */ c(d, {
198
+ className: o(`group inline-flex items-center text-muted-foreground hover:text-secondary-foreground transition-colors duration-200 ease-out motion-reduce:transition-none ${N}`, e === "soft-badge" && "rounded-full px-1.5 py-0.5 bg-primary/10 text-primary", e === "outline-badge" && "rounded-full px-1.5 py-0.5 border border-muted-foreground/50", r),
199
199
  ...n,
200
200
  children: [/* @__PURE__ */ a(w, { className: "size-3.5 transition-transform duration-200 ease-out group-hover:scale-110 motion-reduce:transition-none" }), /* @__PURE__ */ a("span", {
201
201
  className: "sr-only",