@dust-tt/sparkle 0.2.41 → 0.2.43

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.
@@ -60,8 +60,8 @@ import { PageHeader } from "./components/PageHeader";
60
60
  export { PageHeader };
61
61
  import { LogoHorizontalColor as LogoHorizontalColorLogo, LogoHorizontalDark as LogoHorizontalDarkLogo, LogoHorizontalWhite as LogoHorizontalWhiteLogo, LogoSquareColor as LogoSquareColorLogo, LogoSquareDark as LogoSquareDarkLogo, LogoSquareWhite as LogoSquareWhiteLogo } from "./logo/dust";
62
62
  export { LogoHorizontalColorLogo, LogoHorizontalDarkLogo, LogoHorizontalWhiteLogo, LogoSquareColorLogo, LogoSquareDarkLogo, LogoSquareWhiteLogo, };
63
- import { Ai21 as Ai21Logo, Anthropic as AnthropicLogo, Claude as ClaudeLogo, Cohere as CohereLogo, Drive as DriveLogo, Github as GithubLogo, GithubWhite as GithubWhiteLogo, Google as GoogleLogo, Gpt3 as Gpt3Logo, Gpt4 as Gpt4Logo, HuggingFace as HuggingFaceLogo, Microsoft as MicrosoftLogo, Mistral as MistralLogo, Notion as NotionLogo, Openai as OpenaiLogo, Replicate as ReplicateLogo, Slack as SlackLogo } from "./logo/platforms";
64
- export { Ai21Logo, AnthropicLogo, ClaudeLogo, CohereLogo, DriveLogo, GithubLogo, GithubWhiteLogo, GoogleLogo, Gpt3Logo, Gpt4Logo, HuggingFaceLogo, MicrosoftLogo, MistralLogo, NotionLogo, OpenaiLogo, ReplicateLogo, SlackLogo, };
63
+ import { Ai21 as Ai21Logo, Anthropic as AnthropicLogo, Claude as ClaudeLogo, Cohere as CohereLogo, Drive as DriveLogo, Github as GithubLogo, GithubWhite as GithubWhiteLogo, Google as GoogleLogo, Gpt3 as Gpt3Logo, Gpt4 as Gpt4Logo, HuggingFace as HuggingFaceLogo, Intercom as IntercomLogo, Microsoft as MicrosoftLogo, Mistral as MistralLogo, Notion as NotionLogo, Openai as OpenaiLogo, Replicate as ReplicateLogo, Slack as SlackLogo } from "./logo/platforms";
64
+ export { Ai21Logo, AnthropicLogo, ClaudeLogo, CohereLogo, DriveLogo, GithubLogo, GithubWhiteLogo, GoogleLogo, Gpt3Logo, Gpt4Logo, HuggingFaceLogo, IntercomLogo, MicrosoftLogo, MistralLogo, NotionLogo, OpenaiLogo, ReplicateLogo, SlackLogo, };
65
65
  import { ArrowDownCircle as ArrowDownCircleIcon, ArrowDownOnSquare as ArrowDownOnSquareIcon, ArrowPath as ArrowPathIcon, ArrowRight as ArrowRightIcon, ArrowUpOnSquare as ArrowUpOnSquareIcon, Attachment as AttachmentIcon, Backspace as BackspaceIcon, Bookmark as BookmarkIcon, Braces as BracesIcon, Card as CardIcon, ChatBubbleBottomCenterPlus as ChatBubbleBottomCenterPlusIcon, ChatBubbleBottomCenterText as ChatBubbleBottomCenterTextIcon, ChatBubbleLeftRight as ChatBubbleLeftRightIcon, Check as CheckIcon, CheckCircle as CheckCircleIcon, ChevronDown as ChevronDownIcon, ChevronLeft as ChevronLeftIcon, ChevronRight as ChevronRightIcon, ChevronUp as ChevronUpIcon, ChevronUpDown as ChevronUpDownIcon, Circle as CircleIcon, Clipboard as ClipboardIcon, ClipboardCheck as ClipboardCheckIcon, Clock as ClockIcon, CloudArrowDown as CloudArrowDownIcon, CloudArrowLeftRight as CloudArrowLeftRightIcon, CloudX as CloudXIcon, Cog6Tooth as Cog6ToothIcon, CommandLine as CommandLineIcon, Cube as CubeIcon, Dash as DashIcon, DocumentDuplicate as DocumentDuplicateIcon, DocumentPile as DocumentPileIcon, DocumentPlus as DocumentPlusIcon, DocumentText as DocumentTextIcon, Equalizer as EqualizerIcon, ExclamationCircle as ExclamationCircleIcon, ExternalLink as ExternalLinkIcon, Eye as EyeIcon, EyeSlash as EyeSlashIcon, Flag as FlagIcon, FolderOpen as FolderOpenIcon, Fullscreen as FullscreenIcon, GlobeAlt as GlobeAltIcon, HandThumbDown as HandThumbDownIcon, HandThumbUp as HandThumbUpIcon, Hexagon as HexagonIcon, Image as ImageIcon, InformationCircle as InformationCircleIcon, Key as KeyIcon, Lightbulb as LightbulbIcon, Link as LinkIcon, ListCheck as ListCheckIcon, Lock as LockIcon, Login as LoginIcon, Logout as LogoutIcon, MagnifyingGlass as MagnifyingGlassIcon, Menu as MenuIcon, More as MoreIcon, MovingMail as MovingMailIcon, PaperAirplane as PaperAirplaneIcon, Pause as PauseIcon, PencilSquare as PencilSquareIcon, Planet as PlanetIcon, Play as PlayIcon, Plus as PlusIcon, PlusCircle as PlusCircleIcon, QuestionMarkCircle as QuestionMarkCircleIcon, Reaction as ReactionIcon, Rectangle as RectangleIcon, Robot as RobotIcon, Rocket as RocketIcon, Server as ServerIcon, ShakeHands as ShakeHandsIcon, Shapes as ShapesIcon, Sparkles as SparklesIcon, Square as SquareIcon, Square3Stack3D as Square3Stack3DIcon, Stop as StopIcon, TestTube as TestTubeIcon, Trash as TrashIcon, Triangle as TriangleIcon, User as UserIcon, UserArrow as UserArrowIcon, UserGroup as UserGroupIcon, UserPlus as UserPlusIcon, Wrench as WrenchIcon, XCircle as XCircleIcon, XMark as XMarkIcon } from "./icons/solid";
66
66
  export { ArrowDownCircleIcon, ArrowDownOnSquareIcon, ArrowPathIcon, ArrowRightIcon, ArrowUpOnSquareIcon, AttachmentIcon, BackspaceIcon, BookmarkIcon, BracesIcon, CardIcon, ChatBubbleBottomCenterPlusIcon, ChatBubbleBottomCenterTextIcon, ChatBubbleLeftRightIcon, CheckCircleIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpDownIcon, ChevronUpIcon, CircleIcon, ClipboardCheckIcon, ClipboardIcon, ClockIcon, CloudArrowDownIcon, CloudArrowLeftRightIcon, CloudXIcon, Cog6ToothIcon, CommandLineIcon, CubeIcon, DashIcon, DocumentDuplicateIcon, DocumentPileIcon, DocumentPlusIcon, DocumentTextIcon, EqualizerIcon, ExclamationCircleIcon, ExternalLinkIcon, EyeIcon, EyeSlashIcon, FlagIcon, FolderOpenIcon, FullscreenIcon, GlobeAltIcon, HandThumbDownIcon, HandThumbUpIcon, HexagonIcon, ImageIcon, InformationCircleIcon, KeyIcon, LightbulbIcon, LinkIcon, ListCheckIcon, LockIcon, LoginIcon, LogoutIcon, MagnifyingGlassIcon, MenuIcon, MoreIcon, MovingMailIcon, PaperAirplaneIcon, PauseIcon, PencilSquareIcon, PlanetIcon, PlayIcon, PlusCircleIcon, PlusIcon, QuestionMarkCircleIcon, ReactionIcon, RectangleIcon, RobotIcon, RocketIcon, ServerIcon, ShakeHandsIcon, ShapesIcon, SparklesIcon, Square3Stack3DIcon, SquareIcon, StopIcon, TestTubeIcon, TrashIcon, TriangleIcon, UserArrowIcon, UserGroupIcon, UserIcon, UserPlusIcon, WrenchIcon, XCircleIcon, XMarkIcon, };
67
67
  import { ArrowDownCircle as ArrowDownCircleStrokeIcon, ArrowDownOnSquare as ArrowDownOnSquareStrokeIcon, ArrowPath as ArrowPathStrokeIcon, ArrowRight as ArrowRightStrokeIcon, ArrowUpOnSquare as ArrowUpOnSquareStrokeIcon, Attachment as AttachmentStrokeIcon, Backspace as BackspaceStrokeIcon, Bookmark as BookmarkStrokeIcon, Braces as BracesStrokeIcon, Card as CardStrokeIcon, ChatBubbleBottomCenterPlus as ChatBubbleBottomCenterPlusStrokeIcon, ChatBubbleBottomCenterText as ChatBubbleBottomCenterTextStrokeIcon, ChatBubbleLeftRight as ChatBubbleLeftRightStrokeIcon, Check as CheckStrokeIcon, CheckCircle as CheckCircleStrokeIcon, ChevronDown as ChevronDownStrokeIcon, ChevronLeft as ChevronLeftStrokeIcon, ChevronRight as ChevronRightStrokeIcon, ChevronUp as ChevronUpStrokeIcon, ChevronUpDown as ChevronUpDownStrokeIcon, Circle as CircleStrokeIcon, Clipboard as ClipboardStrokeIcon, ClipboardCheck as ClipboardCheckStrokeIcon, Clock as ClockStrokeIcon, CloudArrowDown as CloudArrowDownStrokeIcon, CloudArrowLeftRight as CloudArrowLeftRightStrokeIcon, CloudX as CloudXStrokeIcon, Cog6Tooth as Cog6ToothStrokeIcon, CommandLine as CommandLineStrokeIcon, Cube as CubeStrokeIcon, Dash as DashStrokeIcon, DocumentDuplicate as DocumentDuplicateStrokeIcon, DocumentPile as DocumentPileStrokeIcon, DocumentPlus as DocumentPlusStrokeIcon, DocumentText as DocumentTextStrokeIcon, Equalizer as EqualizerStrokeIcon, ExclamationCircle as ExclamationCircleStrokeIcon, ExternalLink as ExternalLinkStrokeIcon, Eye as EyeStrokeIcon, EyeSlash as EyeSlashStrokeIcon, Flag as FlagStrokeIcon, FolderOpen as FolderOpenStrokeIcon, Fullscreen as FullscreenStrokeIcon, GlobeAlt as GlobeAltStrokeIcon, HandThumbDown as HandThumbDownStrokeIcon, HandThumbUp as HandThumbUpStrokeIcon, Hexagon as HexagonStrokeIcon, Image as ImageStrokeIcon, InformationCircle as InformationCircleStrokeIcon, Key as KeyStrokeIcon, Lightbulb as LightbulbStrokeIcon, Link as LinkStrokeIcon, ListCheck as ListCheckStrokeIcon, Lock as LockStrokeIcon, Login as LoginStrokeIcon, Logout as LogoutStrokeIcon, MagnifyingGlass as MagnifyingGlassStrokeIcon, Menu as MenuStrokeIcon, More as MoreStrokeIcon, MovingMail as MovingMailStrokeIcon, PaperAirplane as PaperAirplaneStrokeIcon, Pause as PauseStrokeIcon, PencilSquare as PencilSquareStrokeIcon, Planet as PlanetStrokeIcon, Play as PlayStrokeIcon, Plus as PlusStrokeIcon, PlusCircle as PlusCircleStrokeIcon, QuestionMarkCircle as QuestionMarkCircleStrokeIcon, Reaction as ReactionStrokeIcon, Rectangle as RectangleStrokeIcon, Robot as RobotStrokeIcon, Rocket as RocketStrokeIcon, Server as ServerStrokeIcon, ShakeHands as ShakeHandsStrokeIcon, Shapes as ShapesStrokeIcon, Sparkles as SparklesStrokeIcon, Square as SquareStrokeIcon, Square3Stack3D as Square3Stack3DStrokeIcon, Stop as StopStrokeIcon, TestTube as TestTubeStrokeIcon, Trash as TrashStrokeIcon, Triangle as TriangleStrokeIcon, User as UserStrokeIcon, UserArrow as UserArrowStrokeIcon, UserGroup as UserGroupStrokeIcon, UserPlus as UserPlusStrokeIcon, Wrench as WrenchStrokeIcon, XCircle as XCircleStrokeIcon, XMark as XMarkStrokeIcon } from "./icons/stroke";
@@ -6,6 +6,8 @@ interface CitationProps {
6
6
  index?: ReactNode;
7
7
  isBlinking?: boolean;
8
8
  href?: string;
9
+ onClose?: () => void;
10
+ avatarUrl?: string;
9
11
  }
10
- export declare function Citation({ title, index, type, description, href, isBlinking, }: CitationProps): React.JSX.Element;
12
+ export declare function Citation({ title, index, type, description, href, onClose, isBlinking, avatarUrl, }: CitationProps): React.JSX.Element;
11
13
  export {};
package/dist/cjs/index.js CHANGED
@@ -32497,6 +32497,13 @@ var SvgHuggingFace = function (props) { return (React__namespace.createElement("
32497
32497
  React__namespace.createElement("path", { fill: "#FF9D0B", d: "M18.61 12.91c.358 0 .678.15.9.424.19.242.293.544.293.855.14-.044.285-.067.431-.069.343 0 .652.135.871.378a1.349 1.349 0 0 1 .177 1.59c.195.165.333.39.393.642.053.204.107.636-.176 1.077a1.209 1.209 0 0 1 .081 1.14c-.225.528-.789.942-1.88 1.387-.682.277-1.305.455-1.31.457-.787.224-1.599.346-2.415.363-1.296 0-2.222-.409-2.755-1.213-.857-1.293-.736-2.477.376-3.618.614-.632 1.024-1.562 1.107-1.766.173-.605.626-1.277 1.38-1.277.2.003.397.055.574.152.177.098.329.237.443.407.22-.287.437-.512.634-.641.259-.18.563-.28.875-.289Zm0 .908c-.113 0-.25.05-.403.148-.47.309-1.381 1.916-1.715 2.54a.547.547 0 0 1-.197.217.525.525 0 0 1-.276.082c-.34 0-.608-.348-.031-.791.864-.666.561-1.755.148-1.82a.326.326 0 0 0-.053-.005c-.376 0-.542.665-.542.665s-.486 1.255-1.32 2.114c-.835.857-.88 1.546-.27 2.462.414.625 1.21.813 2.024.813.844 0 1.708-.204 2.195-.332.022-.007 2.973-.863 2.6-1.59-.065-.123-.167-.173-.297-.173-.526 0-1.483.804-1.895.804-.092 0-.156-.038-.183-.136-.177-.648 2.664-.92 2.425-1.857-.042-.166-.155-.232-.318-.232-.694 0-2.255 1.257-2.582 1.257-.022 0-.042-.007-.051-.023-.164-.272-.075-.463 1.079-1.181 1.156-.719 1.967-1.15 1.503-1.666-.051-.06-.126-.087-.217-.087-.703 0-2.358 1.55-2.358 1.55s-.447.477-.717.477a.16.16 0 0 1-.087-.02.166.166 0 0 1-.063-.066c-.192-.332 1.78-1.868 1.89-2.502.075-.432-.053-.648-.29-.648Z" }),
32498
32498
  React__namespace.createElement("path", { fill: "#FFD21E", d: "M13.952 19.43c-.608-.919-.566-1.607.27-2.464.833-.857 1.32-2.114 1.32-2.114s.18-.727.596-.659c.411.068.714 1.155-.15 1.82-.867.666.172 1.119.504.494.334-.625 1.244-2.232 1.715-2.541.471-.307.805-.136.692.5-.11.634-2.082 2.17-1.89 2.5.19.334.867-.389.867-.389s2.117-1.98 2.577-1.463c.46.515-.35.947-1.503 1.665-1.156.719-1.245.91-1.083 1.182.165.273 2.714-1.938 2.953-1 .239.934-2.6 1.205-2.425 1.853.177.647 2-1.223 2.374-.496.374.73-2.575 1.586-2.6 1.593-.952.255-3.373.793-4.217-.482Z" }))); };
32499
32499
 
32500
+ var SvgIntercom = function (props) { return (React__namespace.createElement("svg", __assign({ xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "none", viewBox: "0 0 24 24" }, props),
32501
+ React__namespace.createElement("g", { clipPath: "url(#Intercom_svg__a)" },
32502
+ React__namespace.createElement("path", { fill: "#1F8DED", d: "M19.333 12.996a.667.667 0 0 1-1.333 0V7a.667.667 0 0 1 1.333 0v5.996Zm-.232 4.173c-.103.088-2.573 2.16-7.101 2.16-4.528 0-6.997-2.072-7.1-2.16a.667.667 0 0 1 .866-1.014c.039.033 2.244 1.84 6.234 1.84 4.04 0 6.211-1.82 6.233-1.838a.667.667 0 0 1 .868 1.012ZM4.667 7A.667.667 0 0 1 6 7v5.996a.667.667 0 0 1-1.333 0V7ZM8 5.667a.667.667 0 0 1 1.333 0v8.906a.667.667 0 0 1-1.333 0V5.667Zm3.333-.338a.665.665 0 0 1 .922-.616.668.668 0 0 1 .412.616v9.667a.667.667 0 0 1-1.334 0V5.329Zm3.334.338a.667.667 0 0 1 1.333 0v8.906a.667.667 0 0 1-1.333 0V5.667ZM19.5 2h-15A2.5 2.5 0 0 0 2 4.5v15A2.5 2.5 0 0 0 4.5 22h15a2.5 2.5 0 0 0 2.5-2.5v-15A2.5 2.5 0 0 0 19.5 2Z" })),
32503
+ React__namespace.createElement("defs", null,
32504
+ React__namespace.createElement("clipPath", { id: "Intercom_svg__a" },
32505
+ React__namespace.createElement("path", { fill: "#fff", d: "M0 0h24v24H0z" }))))); };
32506
+
32500
32507
  var SvgMicrosoft = function (props) { return (React__namespace.createElement("svg", __assign({ xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "none", viewBox: "0 0 24 24" }, props),
32501
32508
  React__namespace.createElement("path", { fill: "#F25022", d: "M3 3h8.5v8.5H3z" }),
32502
32509
  React__namespace.createElement("path", { fill: "#00A4EF", d: "M3 12.5h8.5V21H3z" }),
@@ -32540,14 +32547,16 @@ var typeIcons = {
32540
32547
  document: SvgDocumentText,
32541
32548
  };
32542
32549
  function Citation(_a) {
32543
- var title = _a.title, index = _a.index, _b = _a.type, type = _b === void 0 ? "document" : _b, description = _a.description, href = _a.href, _c = _a.isBlinking, isBlinking = _c === void 0 ? false : _c;
32550
+ var title = _a.title, index = _a.index, _b = _a.type, type = _b === void 0 ? "document" : _b, description = _a.description, href = _a.href, onClose = _a.onClose, _c = _a.isBlinking, isBlinking = _c === void 0 ? false : _c, avatarUrl = _a.avatarUrl;
32544
32551
  return (React.createElement("div", { className: classNames("s-flex s-w-48 s-flex-none s-flex-col s-gap-1 s-rounded-xl s-border s-border-structure-100 s-bg-white s-p-3 s-shadow-sm sm:s-w-64", isBlinking ? "s-animate-[bgblink_500ms_3]" : "") },
32545
32552
  React.createElement("div", { className: "s-flex s-items-center s-gap-2" },
32553
+ avatarUrl && React.createElement(Avatar, { visual: avatarUrl, size: "xs" }),
32546
32554
  index && (React.createElement("div", { className: "s-flex s-h-5 s-w-5 s-items-center s-justify-center s-rounded-full s-border s-border-violet-200 s-bg-violet-100 s-text-xs s-font-semibold s-text-element-800" }, index)),
32547
- React.createElement(Icon, { visual: typeIcons[type], size: "sm" }),
32555
+ React.createElement(Icon, { visual: typeIcons[type], size: "sm", className: "s-text-element-700" }),
32548
32556
  React.createElement("div", { className: "s-flex-grow s-text-xs" }),
32549
32557
  href && (React.createElement("a", { target: "_blank", rel: "noopener noreferrer", href: href },
32550
- React.createElement(IconButton, { icon: SvgExternalLink$1, size: "sm", variant: "secondary" })))),
32558
+ React.createElement(IconButton, { icon: SvgExternalLink$1, size: "sm", variant: "secondary" }))),
32559
+ onClose && (React.createElement(IconButton, { icon: SvgXCircle$1, size: "sm", variant: "tertiary", onClick: onClose }))),
32551
32560
  React.createElement(Tooltip, { label: title, position: "above" },
32552
32561
  React.createElement("div", { className: "s-line-clamp-1 s-text-sm s-font-bold s-text-element-900" }, title)),
32553
32562
  description && (React.createElement("div", { className: "s-line-clamp-2 s-text-xs s-font-normal s-text-element-700" }, description))));
@@ -33429,6 +33438,7 @@ exports.ImageStrokeIcon = SvgImage;
33429
33438
  exports.InformationCircleIcon = SvgInformationCircle$1;
33430
33439
  exports.InformationCircleStrokeIcon = SvgInformationCircle;
33431
33440
  exports.Input = Input;
33441
+ exports.IntercomLogo = SvgIntercom;
33432
33442
  exports.Item = Item;
33433
33443
  exports.KeyIcon = SvgKey$1;
33434
33444
  exports.KeyStrokeIcon = SvgKey;