@dust-tt/sparkle 0.2.38-rc1 → 0.2.38-rc10
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
2
|
interface CitationProps {
|
|
3
3
|
type?: "slack" | "google_drive" | "github" | "notion" | "document";
|
|
4
4
|
title: string;
|
|
@@ -7,7 +7,7 @@ interface CitationProps {
|
|
|
7
7
|
isBlinking?: boolean;
|
|
8
8
|
href?: string;
|
|
9
9
|
action?: React.ReactNode;
|
|
10
|
-
|
|
10
|
+
avatarUrl?: string;
|
|
11
11
|
}
|
|
12
|
-
export declare function Citation({ title, index, type, description, href, action, isBlinking, }: CitationProps): React.JSX.Element;
|
|
12
|
+
export declare function Citation({ title, index, type, description, href, action, isBlinking, avatarUrl, }: CitationProps): React.JSX.Element;
|
|
13
13
|
export {};
|
package/dist/cjs/index.js
CHANGED
|
@@ -32587,12 +32587,13 @@ var typeIcons = {
|
|
|
32587
32587
|
document: SvgDocumentText,
|
|
32588
32588
|
};
|
|
32589
32589
|
function Citation(_a) {
|
|
32590
|
-
var title = _a.title, index = _a.index, _b = _a.type, type = _b === void 0 ? "document" : _b, description = _a.description, href = _a.href, action = _a.action, _c = _a.isBlinking, isBlinking = _c === void 0 ? false : _c;
|
|
32590
|
+
var title = _a.title, index = _a.index, _b = _a.type, type = _b === void 0 ? "document" : _b, description = _a.description, href = _a.href, action = _a.action, _c = _a.isBlinking, isBlinking = _c === void 0 ? false : _c, avatarUrl = _a.avatarUrl;
|
|
32591
32591
|
if (action && href) {
|
|
32592
32592
|
throw new Error("Citation cannot have both action and href");
|
|
32593
32593
|
}
|
|
32594
32594
|
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]" : "") },
|
|
32595
32595
|
React.createElement("div", { className: "s-flex s-items-center s-gap-2" },
|
|
32596
|
+
avatarUrl && React.createElement(Avatar, { visual: avatarUrl, size: "xs" }),
|
|
32596
32597
|
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)),
|
|
32597
32598
|
React.createElement(Icon, { visual: typeIcons[type], size: "sm", className: "s-text-element-700" }),
|
|
32598
32599
|
React.createElement("div", { className: "s-flex-grow s-text-xs" }),
|