@apteva/apteva-kit 0.1.95 → 0.1.97

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.d.mts CHANGED
@@ -274,6 +274,7 @@ interface ChatProps {
274
274
  onError?: (error: Error) => void;
275
275
  onToolCall?: (toolName: string, toolId: string) => void;
276
276
  onToolResult?: (toolName: string, result?: any) => void;
277
+ variant?: 'default' | 'minimal' | 'terminal';
277
278
  theme?: 'light' | 'dark' | 'auto';
278
279
  placeholder?: string;
279
280
  showHeader?: boolean;
package/dist/index.d.ts CHANGED
@@ -274,6 +274,7 @@ interface ChatProps {
274
274
  onError?: (error: Error) => void;
275
275
  onToolCall?: (toolName: string, toolId: string) => void;
276
276
  onToolResult?: (toolName: string, result?: any) => void;
277
+ variant?: 'default' | 'minimal' | 'terminal';
277
278
  theme?: 'light' | 'dark' | 'auto';
278
279
  placeholder?: string;
279
280
  showHeader?: boolean;
package/dist/index.js CHANGED
@@ -768,8 +768,10 @@ var WIDGET_DEFINITIONS = {
768
768
  }
769
769
  };
770
770
  var ALL_WIDGET_TYPES = Object.keys(WIDGET_DEFINITIONS);
771
+ var DISABLED_WIDGETS = ["flow"];
772
+ var DEFAULT_WIDGET_TYPES = ALL_WIDGET_TYPES.filter((t) => !DISABLED_WIDGETS.includes(t));
771
773
  function generateWidgetContext(enabledWidgets) {
772
- const widgets = enabledWidgets || ALL_WIDGET_TYPES;
774
+ const widgets = enabledWidgets || DEFAULT_WIDGET_TYPES;
773
775
  let context = `
774
776
  ## UI Widgets
775
777
  SYNTAX: @ui:type[{json}] - MUST use SQUARE BRACKETS [] around the JSON object.
@@ -789,7 +791,7 @@ Per-item "metadata" is sent as payload on action click.
789
791
  return context;
790
792
  }
791
793
  function generateCompactWidgetContext(enabledWidgets) {
792
- const widgets = enabledWidgets || ALL_WIDGET_TYPES;
794
+ const widgets = enabledWidgets || DEFAULT_WIDGET_TYPES;
793
795
  return `
794
796
  Widgets: @ui:type[{json}] - MUST use square brackets []. Example: @ui:list[{"items": [...]}]. Types: ${widgets.join(", ")}. Per-item "metadata" is sent as action payload.
795
797
  `;
@@ -3015,6 +3017,7 @@ var Chat = _react.forwardRef.call(void 0, function Chat2({
3015
3017
  onToolCall,
3016
3018
  onToolResult,
3017
3019
  // UI
3020
+ variant = "default",
3018
3021
  placeholder,
3019
3022
  showHeader = true,
3020
3023
  headerTitle = "Chat",
@@ -3583,7 +3586,7 @@ ${planToExecute}`;
3583
3586
  setCurrentRequestId(null);
3584
3587
  };
3585
3588
  const isCompact = commandVariant === "compact";
3586
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: cn("apteva-chat flex flex-col h-full", className), children: [
3589
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: cn("apteva-chat flex flex-col h-full", variant !== "default" && `apteva-chat-${variant}`, className), children: [
3587
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", { children: [
3588
3591
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "apteva-chat-title", children: headerTitle }),
3589
3592
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: cn(