@blank-utils/llm 0.3.4 → 0.3.6

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 (69) hide show
  1. package/dist/KaTeX_AMS-Regular-CYEKBG2K.woff +0 -0
  2. package/dist/KaTeX_AMS-Regular-JKX5W2C4.ttf +0 -0
  3. package/dist/KaTeX_AMS-Regular-U6PRYMIZ.woff2 +0 -0
  4. package/dist/KaTeX_Caligraphic-Bold-5QL5CMTE.woff2 +0 -0
  5. package/dist/KaTeX_Caligraphic-Bold-WZ3QSGD3.woff +0 -0
  6. package/dist/KaTeX_Caligraphic-Bold-ZTS3R3HK.ttf +0 -0
  7. package/dist/KaTeX_Caligraphic-Regular-3LKEU76G.woff +0 -0
  8. package/dist/KaTeX_Caligraphic-Regular-A7XRTZ5Q.ttf +0 -0
  9. package/dist/KaTeX_Caligraphic-Regular-KX5MEWCF.woff2 +0 -0
  10. package/dist/KaTeX_Fraktur-Bold-2QVFK6NQ.woff2 +0 -0
  11. package/dist/KaTeX_Fraktur-Bold-T4SWXBMT.woff +0 -0
  12. package/dist/KaTeX_Fraktur-Bold-WGHVTYOR.ttf +0 -0
  13. package/dist/KaTeX_Fraktur-Regular-2PEIFJSJ.woff2 +0 -0
  14. package/dist/KaTeX_Fraktur-Regular-5U4OPH2X.ttf +0 -0
  15. package/dist/KaTeX_Fraktur-Regular-PQMHCIK6.woff +0 -0
  16. package/dist/KaTeX_Main-Bold-2GA4IZIN.woff +0 -0
  17. package/dist/KaTeX_Main-Bold-W5FBVCZM.ttf +0 -0
  18. package/dist/KaTeX_Main-Bold-YP5VVQRP.woff2 +0 -0
  19. package/dist/KaTeX_Main-BoldItalic-4P4C7HJH.woff +0 -0
  20. package/dist/KaTeX_Main-BoldItalic-N4V3DX7S.woff2 +0 -0
  21. package/dist/KaTeX_Main-BoldItalic-ODMLBJJQ.ttf +0 -0
  22. package/dist/KaTeX_Main-Italic-I43T2HSR.ttf +0 -0
  23. package/dist/KaTeX_Main-Italic-RELBIK7M.woff2 +0 -0
  24. package/dist/KaTeX_Main-Italic-SASNQFN2.woff +0 -0
  25. package/dist/KaTeX_Main-Regular-ARRPAO67.woff2 +0 -0
  26. package/dist/KaTeX_Main-Regular-P5I74A2A.woff +0 -0
  27. package/dist/KaTeX_Main-Regular-W74P5G27.ttf +0 -0
  28. package/dist/KaTeX_Math-BoldItalic-6EBV3DK5.woff +0 -0
  29. package/dist/KaTeX_Math-BoldItalic-K4WTGH3J.woff2 +0 -0
  30. package/dist/KaTeX_Math-BoldItalic-VB447A4D.ttf +0 -0
  31. package/dist/KaTeX_Math-Italic-6KGCHLFN.woff2 +0 -0
  32. package/dist/KaTeX_Math-Italic-KKK3USB2.woff +0 -0
  33. package/dist/KaTeX_Math-Italic-SON4MRCA.ttf +0 -0
  34. package/dist/KaTeX_SansSerif-Bold-RRNVJFFW.woff2 +0 -0
  35. package/dist/KaTeX_SansSerif-Bold-STQ6RXC7.ttf +0 -0
  36. package/dist/KaTeX_SansSerif-Bold-X5M5EMOD.woff +0 -0
  37. package/dist/KaTeX_SansSerif-Italic-HMPFTM52.woff2 +0 -0
  38. package/dist/KaTeX_SansSerif-Italic-PSN4QKYX.woff +0 -0
  39. package/dist/KaTeX_SansSerif-Italic-WTBAZBGY.ttf +0 -0
  40. package/dist/KaTeX_SansSerif-Regular-2TL3USAE.ttf +0 -0
  41. package/dist/KaTeX_SansSerif-Regular-OQCII6EP.woff +0 -0
  42. package/dist/KaTeX_SansSerif-Regular-XIQ62X4E.woff2 +0 -0
  43. package/dist/KaTeX_Script-Regular-72OLXYNA.ttf +0 -0
  44. package/dist/KaTeX_Script-Regular-A5IFOEBS.woff +0 -0
  45. package/dist/KaTeX_Script-Regular-APUWIHLP.woff2 +0 -0
  46. package/dist/KaTeX_Size1-Regular-4HRHTS65.woff +0 -0
  47. package/dist/KaTeX_Size1-Regular-5LRUTBFT.woff2 +0 -0
  48. package/dist/KaTeX_Size1-Regular-7K6AASVL.ttf +0 -0
  49. package/dist/KaTeX_Size2-Regular-222HN3GT.ttf +0 -0
  50. package/dist/KaTeX_Size2-Regular-K5ZHAIS6.woff +0 -0
  51. package/dist/KaTeX_Size2-Regular-LELKET5D.woff2 +0 -0
  52. package/dist/KaTeX_Size3-Regular-TLFPAHDE.woff +0 -0
  53. package/dist/KaTeX_Size3-Regular-UFCO6WCA.ttf +0 -0
  54. package/dist/KaTeX_Size3-Regular-WQRQ47UD.woff2 +0 -0
  55. package/dist/KaTeX_Size4-Regular-7PGNVPQK.ttf +0 -0
  56. package/dist/KaTeX_Size4-Regular-CDMV7U5C.woff2 +0 -0
  57. package/dist/KaTeX_Size4-Regular-PKMWZHNC.woff +0 -0
  58. package/dist/KaTeX_Typewriter-Regular-3F5K6SQ6.ttf +0 -0
  59. package/dist/KaTeX_Typewriter-Regular-MJMFSK64.woff +0 -0
  60. package/dist/KaTeX_Typewriter-Regular-VBYJ4NRC.woff2 +0 -0
  61. package/dist/{chunk-365XIJLC.js → chunk-NDXKOAAG.js} +148 -746
  62. package/dist/{index-BfDM8kLq.d.ts → index-fIqGfqTG.d.ts} +1 -77
  63. package/dist/index.css +1155 -0
  64. package/dist/index.d.ts +2 -2
  65. package/dist/index.js +1 -1
  66. package/dist/react/index.css +1155 -0
  67. package/dist/react/index.d.ts +1 -1
  68. package/dist/react/index.js +1 -1
  69. package/package.json +9 -3
@@ -590,90 +590,30 @@ interface LLMReadyProps {
590
590
  */
591
591
  declare function LLMReady({ children, fallback }: LLMReadyProps): react_jsx_runtime.JSX.Element;
592
592
 
593
- /**
594
- * Chat — A complete, self-contained chat interface for @blank-utils/llm.
595
- * Drop inside <LLMProvider> and get a working chat UI in one line.
596
- *
597
- * Brutalist minimal aesthetic — flat black, high contrast, no decoration.
598
- *
599
- * @example
600
- * ```tsx
601
- * import { LLMProvider, Chat, ChatApp } from "@blank-utils/llm/react";
602
- *
603
- * // Option A: Zero setup (includes provider + model switching)
604
- * <ChatApp defaultModel="qwen-2.5-0.5b" />
605
- *
606
- * // Option B: Manual provider
607
- * <LLMProvider model="qwen-2.5-0.5b">
608
- * <Chat />
609
- * </LLMProvider>
610
- * ```
611
- */
612
-
613
593
  interface ChatProps {
614
- /** System prompt for the conversation */
615
594
  systemPrompt?: string;
616
- /** Placeholder text for the input */
617
595
  placeholder?: string;
618
- /** Theme */
619
596
  theme?: 'dark' | 'light';
620
- /** Additional className for the outermost container */
621
597
  className?: string;
622
- /** Maximum height of the chat container. Default: '600px' */
623
598
  maxHeight?: string;
624
- /** Options passed to useChat internally */
625
599
  chatOptions?: Omit<UseChatOptions, 'systemPrompt'>;
626
- /** Custom actions rendered in the input toolbar */
627
600
  inputActions?: React.ReactNode;
628
- /** Called when a message is sent */
629
601
  onSend?: (message: string) => void;
630
- /** Called when a response is received */
631
602
  onResponse?: (response: string) => void;
632
- /** Called on error */
633
603
  onError?: (error: Error) => void;
634
- /** Whether to show the model info header. Default: true */
635
604
  showHeader?: boolean;
636
- /** Whether to show loading progress. Default: true */
637
605
  showProgress?: boolean;
638
- /** Custom welcome message when chat is empty */
639
606
  welcomeMessage?: string;
640
- /** Called when the user selects a new model in the dropdown */
641
607
  onModelChange?: (modelId: string) => void;
642
608
  }
643
609
  interface ChatAppProps extends ChatProps {
644
- /** Default model ID to start with */
645
610
  defaultModel?: SupportedModel;
646
- /** Default backend to use */
647
611
  defaultBackend?: 'webllm' | 'transformers' | 'auto';
648
- /** Auto-load model on mount. Default: true */
649
612
  autoLoad?: boolean;
650
613
  }
651
614
  declare function Chat({ systemPrompt, placeholder, theme, className, maxHeight, inputActions, onSend: onSendProp, onResponse, onError: onErrorProp, showHeader, showProgress, welcomeMessage, onModelChange, }: ChatProps): React.JSX.Element;
652
615
  declare function ChatApp({ defaultModel, defaultBackend, autoLoad, onModelChange, ...chatProps }: ChatAppProps): React.JSX.Element;
653
616
 
654
- /**
655
- * ChatInput — Self-contained auto-resizing textarea with send button, image paste/upload, and model selector slot.
656
- * Zero external dependencies. All styles embedded via CSS-in-JS.
657
- * Brutalist minimal aesthetic — flat, no decoration.
658
- *
659
- * Supports: Ctrl+V paste, drag-and-drop, and click-to-upload for images.
660
- *
661
- * @example
662
- * ```tsx
663
- * <ChatInput
664
- * value={input}
665
- * onChange={setInput}
666
- * onSend={handleSend}
667
- * disabled={isGenerating}
668
- * placeholder="Type a message..."
669
- * images={images}
670
- * onImageAdd={handleAddImage}
671
- * onImageRemove={handleRemoveImage}
672
- * modelSelector={<MyDropdown />}
673
- * />
674
- * ```
675
- */
676
-
677
617
  interface ImageAttachment {
678
618
  id: string;
679
619
  dataUrl: string;
@@ -681,37 +621,21 @@ interface ImageAttachment {
681
621
  name: string;
682
622
  }
683
623
  interface ChatInputProps {
684
- /** Current value of the input */
685
624
  value: string;
686
- /** Called when value changes */
687
625
  onChange: (value: string) => void;
688
- /** Called when user submits (Enter or send button) */
689
626
  onSend: () => void;
690
- /** Called when user clicks stop */
691
627
  onStop?: () => void;
692
- /** Whether the input is disabled (e.g. during generation) */
693
628
  disabled?: boolean;
694
- /** Whether currently generating (shows stop button instead of send) */
695
629
  isGenerating?: boolean;
696
- /** Placeholder text */
697
630
  placeholder?: string;
698
- /** Maximum rows before scrolling */
699
631
  maxRows?: number;
700
- /** Optional action elements to render in the toolbar */
701
632
  actions?: React.ReactNode;
702
- /** Theme */
703
- theme?: 'dark' | 'light';
704
- /** Additional className for the container */
705
633
  className?: string;
706
- /** Current images attached */
707
634
  images?: ImageAttachment[];
708
- /** Called when an image is added (paste/drop/upload) */
709
635
  onImageAdd?: (image: ImageAttachment) => void;
710
- /** Called when an image is removed */
711
636
  onImageRemove?: (id: string) => void;
712
- /** Optional slot for a model selector dropdown */
713
637
  modelSelector?: React.ReactNode;
714
638
  }
715
- declare function ChatInput({ value, onChange, onSend, onStop, disabled, isGenerating, placeholder, maxRows, actions, theme, className, images, onImageAdd, onImageRemove, modelSelector, }: ChatInputProps): React.JSX.Element;
639
+ declare function ChatInput({ value, onChange, onSend, onStop, disabled, isGenerating, placeholder, maxRows, actions, className, images, onImageAdd, onImageRemove, modelSelector, }: ChatInputProps): react_jsx_runtime.JSX.Element;
716
640
 
717
641
  export { type AttachOptions as A, type BrowserCapabilities as B, type ChatMessage as C, type Device as D, useCompletion as E, useLLM as F, type GenerateOptions as G, useStream as H, ChatApp as I, type ChatAppProps as J, type ImageAttachment as K, type LLMProvider$1 as L, type MessageRole as M, type Quantization as Q, type StreamCallback as S, TRANSFORMERS_MODELS as T, type UseChatOptions as U, WEBLLM_MODELS as W, type Backend as a, type LoadProgressCallback as b, Chat as c, ChatInput as d, type ChatInputProps as e, type ChatProps as f, DEFAULT_TRANSFORMERS_MODEL as g, DEFAULT_WEBLLM_MODEL as h, type LLMConfig as i, type LLMContextValue as j, LLMLoading as k, type LLMLoadingProps as l, LLMProvider as m, type LLMProviderProps as n, LLMReady as o, type LLMReadyProps as p, type LoadProgress as q, type LocalLLM as r, type UseChatReturn as s, type UseCompletionOptions as t, type UseCompletionReturn as u, type UseStreamOptions as v, type UseStreamReturn as w, createLLM as x, isWebGPUSupported as y, useChat as z };