@apteva/apteva-kit 0.1.23 → 0.1.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1275,12 +1275,12 @@ function MarkdownContent({ content, className = "" }) {
1275
1275
 
1276
1276
  function ToolCall({ name, status }) {
1277
1277
  if (status === "running") {
1278
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2 px-3 py-2 rounded-xl bg-blue-50 dark:bg-blue-900/30 border border-blue-200 dark:border-blue-700 !text-blue-700 dark:!text-blue-300 text-sm", children: [
1279
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "svg", { className: "w-4 h-4 animate-spin", fill: "none", viewBox: "0 0 24 24", children: [
1280
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
1281
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z" })
1278
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "apteva-tool-card apteva-tool-card-running", children: [
1279
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "svg", { className: "apteva-tool-icon apteva-tool-icon-spin", fill: "none", viewBox: "0 0 24 24", children: [
1280
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "circle", { className: "apteva-tool-spinner-track", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
1281
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { className: "apteva-tool-spinner-fill", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z" })
1282
1282
  ] }),
1283
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { children: [
1283
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "apteva-tool-label", children: [
1284
1284
  "Calling ",
1285
1285
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: name }),
1286
1286
  "..."
@@ -1288,17 +1288,17 @@ function ToolCall({ name, status }) {
1288
1288
  ] });
1289
1289
  }
1290
1290
  if (status === "completed") {
1291
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2 px-3 py-2 rounded-xl bg-green-50 dark:bg-green-900/30 border border-green-200 dark:border-green-700 !text-green-700 dark:!text-green-300 text-sm", children: [
1292
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M5 13l4 4L19 7" }) }),
1293
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { children: [
1291
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "apteva-tool-card apteva-tool-card-completed", children: [
1292
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "apteva-tool-icon", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M5 13l4 4L19 7" }) }),
1293
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "apteva-tool-label", children: [
1294
1294
  "Tool completed: ",
1295
1295
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: name })
1296
1296
  ] })
1297
1297
  ] });
1298
1298
  }
1299
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2 px-3 py-2 rounded-xl bg-red-50 dark:bg-red-900/30 border border-red-200 dark:border-red-700 !text-red-700 dark:!text-red-300 text-sm", children: [
1300
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) }),
1301
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { children: [
1299
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "apteva-tool-card apteva-tool-card-error", children: [
1300
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "apteva-tool-icon", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) }),
1301
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "apteva-tool-label", children: [
1302
1302
  "Tool failed: ",
1303
1303
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: name })
1304
1304
  ] })
@@ -1363,10 +1363,10 @@ function Message({ message, onAction, enableWidgets, onWidgetRender }) {
1363
1363
  };
1364
1364
  const renderContent = () => {
1365
1365
  if (isUser) {
1366
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "whitespace-pre-wrap !text-sm leading-relaxed", children: message.content });
1366
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "apteva-message-text", children: message.content });
1367
1367
  }
1368
1368
  if (isStreaming && !hasContent) {
1369
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "apteva-typing-indicator !text-gray-400", children: [
1369
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "apteva-typing-indicator", children: [
1370
1370
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", {}),
1371
1371
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", {}),
1372
1372
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", {})
@@ -1394,13 +1394,13 @@ function Message({ message, onAction, enableWidgets, onWidgetRender }) {
1394
1394
  "div",
1395
1395
  {
1396
1396
  className: cn(
1397
- "max-w-[80%] px-4 py-2.5 rounded-2xl",
1398
- isUser ? "bg-blue-600 !text-white rounded-br-md" : "bg-gray-100 dark:bg-gray-800 !text-gray-900 dark:!text-gray-100 rounded-bl-md"
1397
+ "apteva-message-bubble",
1398
+ isUser ? "apteva-message-user" : "apteva-message-assistant"
1399
1399
  ),
1400
1400
  children: [
1401
- renderContent(),
1402
- message.widgets && message.widgets.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: cn(isUser ? "mt-3" : "mt-2"), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Widgets, { widgets: message.widgets, onAction, layout: "stack" }) }),
1403
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: cn("!text-xs mt-1.5", isUser ? "!text-blue-200" : "!text-gray-500 dark:!text-gray-400"), suppressHydrationWarning: true, children: message.timestamp.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }) })
1401
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: isUser ? "apteva-message-content-user" : "apteva-message-content-assistant", children: renderContent() }),
1402
+ message.widgets && message.widgets.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "apteva-message-widgets", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Widgets, { widgets: message.widgets, onAction, layout: "stack" }) }),
1403
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: cn("apteva-message-timestamp", isUser ? "apteva-message-timestamp-user" : "apteva-message-timestamp-assistant"), suppressHydrationWarning: true, children: message.timestamp.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }) })
1404
1404
  ]
1405
1405
  }
1406
1406
  );
@@ -1567,7 +1567,7 @@ function MessageList({
1567
1567
  listRef.current.scrollTop = listRef.current.scrollHeight;
1568
1568
  }
1569
1569
  }, [messages]);
1570
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ref: listRef, className: "flex-1 overflow-y-auto px-4 py-4 space-y-3 apteva-scrollbar-hidden", children: messages.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1570
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ref: listRef, className: "apteva-message-list apteva-scrollbar-hidden", children: messages.length === 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1571
1571
  WelcomeScreen,
1572
1572
  {
1573
1573
  title: welcomeTitle,
@@ -1578,7 +1578,7 @@ function MessageList({
1578
1578
  onPromptClick: onPromptClick || (() => {
1579
1579
  })
1580
1580
  }
1581
- ) : messages.map((message) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: `flex ${message.role === "user" ? "justify-end" : "justify-start"}`, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Message, { message, onAction, enableWidgets, onWidgetRender }) }, message.id)) });
1581
+ ) : messages.map((message) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: message.role === "user" ? "apteva-message-row-user" : "apteva-message-row-assistant", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Message, { message, onAction, enableWidgets, onWidgetRender }) }, message.id)) });
1582
1582
  }
1583
1583
 
1584
1584
  // src/components/Chat/Composer.tsx