@optilogic/chat 1.0.0-beta.14 → 1.0.0-beta.15

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.cts CHANGED
@@ -787,6 +787,10 @@ interface UserPromptInputProps extends Omit<React.HTMLAttributes<HTMLDivElement>
787
787
  isSubmitting?: boolean;
788
788
  /** Called when user clicks Stop during submission */
789
789
  onStop?: () => void;
790
+ /** Tooltip text shown on hover over the stop button */
791
+ stopTooltip?: string;
792
+ /** Additional CSS class names applied to the stop button */
793
+ stopClassName?: string;
790
794
  /** Whether to disable input while submitting (default: true) */
791
795
  disableWhileSubmitting?: boolean;
792
796
  /** Auto-focus the editor when mounted (handles Slate initialization timing) */
package/dist/index.d.ts CHANGED
@@ -787,6 +787,10 @@ interface UserPromptInputProps extends Omit<React.HTMLAttributes<HTMLDivElement>
787
787
  isSubmitting?: boolean;
788
788
  /** Called when user clicks Stop during submission */
789
789
  onStop?: () => void;
790
+ /** Tooltip text shown on hover over the stop button */
791
+ stopTooltip?: string;
792
+ /** Additional CSS class names applied to the stop button */
793
+ stopClassName?: string;
790
794
  /** Whether to disable input while submitting (default: true) */
791
795
  disableWhileSubmitting?: boolean;
792
796
  /** Auto-focus the editor when mounted (handles Slate initialization timing) */
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as React11 from 'react';
2
2
  import { useState, useCallback, useRef, useEffect, useMemo } from 'react';
3
- import { cn, Popover, PopoverTrigger, PopoverContent, Button, Textarea, IconButton, LoadingSpinner } from '@optilogic/core';
3
+ import { cn, Popover, PopoverTrigger, PopoverContent, Button, Textarea, Tooltip, IconButton, LoadingSpinner } from '@optilogic/core';
4
4
  import { Activity, Wrench, Book, HardDrive, Check, Copy, ThumbsUp, ThumbsDown, ChevronDown, ChevronRight, MessageCircleQuestion, Square, Loader2, Send, ChevronUp, Brain, BookOpen, MessageSquare, AlertCircle, ChevronsDownUp, ChevronsUpDown } from 'lucide-react';
5
5
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
6
6
  import { SlateEditor, Text } from '@optilogic/editor';
@@ -1546,6 +1546,8 @@ var UserPromptInput = React11.forwardRef(
1546
1546
  disabled = false,
1547
1547
  isSubmitting = false,
1548
1548
  onStop,
1549
+ stopTooltip,
1550
+ stopClassName,
1549
1551
  disableWhileSubmitting = true,
1550
1552
  autoFocus = false,
1551
1553
  refocusAfterSubmit = false,
@@ -1672,16 +1674,17 @@ var UserPromptInput = React11.forwardRef(
1672
1674
  ) }),
1673
1675
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between pl-2 pr-1 pb-1 pt-1", children: [
1674
1676
  /* @__PURE__ */ jsx("div", { className: "flex items-center gap-1", children: renderActions?.() }),
1675
- isSubmitting && onStop ? /* @__PURE__ */ jsx(
1677
+ isSubmitting && onStop ? /* @__PURE__ */ jsx(Tooltip, { content: stopTooltip, disabled: !stopTooltip, children: /* @__PURE__ */ jsx(
1676
1678
  IconButton,
1677
1679
  {
1678
1680
  icon: /* @__PURE__ */ jsx(Square, {}),
1679
1681
  variant: "filled",
1680
1682
  size: "sm",
1681
- "aria-label": "Stop",
1682
- onClick: onStop
1683
+ "aria-label": stopTooltip || "Stop",
1684
+ onClick: onStop,
1685
+ className: stopClassName
1683
1686
  }
1684
- ) : /* @__PURE__ */ jsx(
1687
+ ) }) : /* @__PURE__ */ jsx(
1685
1688
  IconButton,
1686
1689
  {
1687
1690
  icon: isSubmitting ? /* @__PURE__ */ jsx(Loader2, { className: "animate-spin" }) : /* @__PURE__ */ jsx(Send, {}),