@apteva/apteva-kit 0.1.98 → 0.1.99

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
@@ -2061,6 +2061,7 @@ var DefaultIcon = () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { cl
2061
2061
  d: "M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"
2062
2062
  }
2063
2063
  ) });
2064
+ var TerminalIcon = () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-4xl sm:text-5xl font-mono font-bold text-[#f97316]", children: ">_" });
2064
2065
  var ArrowIcon = () => /* @__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: "M13 7l5 5m0 0l-5 5m5-5H6" }) });
2065
2066
  function WelcomeScreen({
2066
2067
  title,
@@ -2068,8 +2069,10 @@ function WelcomeScreen({
2068
2069
  icon,
2069
2070
  prompts,
2070
2071
  variant = "centered",
2072
+ chatVariant = "default",
2071
2073
  onPromptClick
2072
2074
  }) {
2075
+ const WelcomeIcon = chatVariant === "terminal" ? TerminalIcon : DefaultIcon;
2073
2076
  const normalizedPrompts = (prompts || []).map(
2074
2077
  (p) => typeof p === "string" ? { text: p } : p
2075
2078
  );
@@ -2077,7 +2080,7 @@ function WelcomeScreen({
2077
2080
  const hasHeader = title || subtitle || icon;
2078
2081
  if (!hasHeader && !hasPrompts) {
2079
2082
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex items-center justify-center h-full !text-neutral-500 dark:!text-neutral-400", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-center space-y-2", children: [
2080
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DefaultIcon, {}) }),
2083
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WelcomeIcon, {}) }),
2081
2084
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm", children: "No messages yet. Start a conversation!" })
2082
2085
  ] }) });
2083
2086
  }
@@ -2114,7 +2117,7 @@ function WelcomeScreen({
2114
2117
  }
2115
2118
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col items-center justify-center h-full px-4 py-6 sm:py-8", children: [
2116
2119
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-center mb-6 sm:mb-8 max-w-md", children: [
2117
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mb-4 !text-neutral-400 dark:!text-neutral-500 flex justify-center", children: icon || /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DefaultIcon, {}) }),
2120
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mb-4 !text-neutral-400 dark:!text-neutral-500 flex justify-center", children: icon || /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WelcomeIcon, {}) }),
2118
2121
  title && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h1", { className: "text-xl sm:text-2xl font-semibold !text-neutral-900 dark:!text-white mb-2", children: title }),
2119
2122
  subtitle && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm sm:text-base !text-neutral-500 dark:!text-neutral-400", children: subtitle })
2120
2123
  ] }),
@@ -2201,6 +2204,7 @@ function MessageList({
2201
2204
  welcomeIcon,
2202
2205
  suggestedPrompts,
2203
2206
  welcomeVariant,
2207
+ chatVariant,
2204
2208
  onPromptClick,
2205
2209
  enableWidgets,
2206
2210
  onWidgetRender
@@ -2231,6 +2235,7 @@ function MessageList({
2231
2235
  icon: welcomeIcon,
2232
2236
  prompts: suggestedPrompts,
2233
2237
  variant: welcomeVariant,
2238
+ chatVariant,
2234
2239
  onPromptClick: onPromptClick || (() => {
2235
2240
  })
2236
2241
  }
@@ -3587,15 +3592,12 @@ ${planToExecute}`;
3587
3592
  };
3588
3593
  const isCompact = commandVariant === "compact";
3589
3594
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: cn("apteva-chat flex flex-col h-full", variant !== "default" && `apteva-chat-${variant}`, className), children: [
3590
- showHeader && mode === "chat" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "apteva-chat-header px-4 py-3 flex items-center justify-between", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
3591
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "apteva-chat-icon", children: variant === "terminal" ? ">_" : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z" }) }) }),
3592
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
3593
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "apteva-chat-title", children: headerTitle }),
3594
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: cn(
3595
- "apteva-chat-status",
3596
- isLoading ? chatToolName ? "apteva-chat-status-tool" : "apteva-chat-status-thinking" : "apteva-chat-status-ready"
3597
- ), children: isLoading ? chatToolName ? `Using ${chatToolName}...` : "Thinking..." : "Ready" })
3598
- ] })
3595
+ showHeader && mode === "chat" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "apteva-chat-header px-4 py-3 flex items-center justify-between", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
3596
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "apteva-chat-title", children: headerTitle }),
3597
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: cn(
3598
+ "apteva-chat-status",
3599
+ isLoading ? chatToolName ? "apteva-chat-status-tool" : "apteva-chat-status-thinking" : "apteva-chat-status-ready"
3600
+ ), children: isLoading ? chatToolName ? `Using ${chatToolName}...` : "Thinking..." : "Ready" })
3599
3601
  ] }) }),
3600
3602
  mode === "chat" && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
3601
3603
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -3608,6 +3610,7 @@ ${planToExecute}`;
3608
3610
  welcomeIcon,
3609
3611
  suggestedPrompts,
3610
3612
  welcomeVariant,
3613
+ chatVariant: variant,
3611
3614
  onPromptClick: (prompt) => handleSendMessage(prompt),
3612
3615
  enableWidgets,
3613
3616
  onWidgetRender