@dust-tt/sparkle 0.2.84 → 0.2.85-rc
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/cjs/components/AssistantPreview2.d.ts +2 -1
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/components/AssistantPreview2.d.ts +2 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { SyntheticEvent } from "react";
|
|
2
2
|
type AssistantPreviewVariant = "item" | "list" | "gallery";
|
|
3
3
|
interface BaseAssistantPreviewProps {
|
|
4
4
|
variant: AssistantPreviewVariant;
|
|
@@ -18,6 +18,7 @@ type ListVariantAssistantPreviewProps = BaseAssistantPreviewProps & {
|
|
|
18
18
|
type GalleryVariantAssistantPreviewProps = BaseAssistantPreviewProps & {
|
|
19
19
|
variant: "gallery";
|
|
20
20
|
renderActions?: (isHovered: boolean) => React.ReactNode;
|
|
21
|
+
onPlayClick?: (e: SyntheticEvent) => void;
|
|
21
22
|
};
|
|
22
23
|
type AssistantPreviewProps = ItemVariantAssistantPreviewProps | ListVariantAssistantPreviewProps | GalleryVariantAssistantPreviewProps;
|
|
23
24
|
export declare function AssistantPreview2(props: AssistantPreviewProps): React.JSX.Element;
|
package/dist/cjs/index.js
CHANGED
|
@@ -32424,7 +32424,7 @@ var ListVariantContent = function (props) {
|
|
|
32424
32424
|
React.createElement("div", { className: classNames(descriptionClassNames["base"], descriptionClassNames.list) }, description))));
|
|
32425
32425
|
};
|
|
32426
32426
|
var GalleryVariantContent = function (props) {
|
|
32427
|
-
var renderActions = props.renderActions, description = props.description, title = props.title, pictureUrl = props.pictureUrl, subtitle = props.subtitle, isHovered = props.isHovered;
|
|
32427
|
+
var renderActions = props.renderActions, description = props.description, onPlayClick = props.onPlayClick, title = props.title, pictureUrl = props.pictureUrl, subtitle = props.subtitle, isHovered = props.isHovered;
|
|
32428
32428
|
return (React.createElement("div", { className: "s-flex s-gap-2" },
|
|
32429
32429
|
React.createElement(Avatar, { visual: React.createElement("img", { src: pictureUrl, alt: "Avatar of ".concat(title) }), size: "md" }),
|
|
32430
32430
|
React.createElement("div", { className: "s-flex s-w-full s-min-w-0 s-flex-col s-items-start s-gap-2" },
|
|
@@ -32436,7 +32436,7 @@ var GalleryVariantContent = function (props) {
|
|
|
32436
32436
|
React.createElement("div", { className: classNames(subtitleClassNames["base"], subtitleClassNames.gallery) },
|
|
32437
32437
|
"By: ",
|
|
32438
32438
|
subtitle)),
|
|
32439
|
-
isHovered && (React.createElement(Button, { variant: "primary", size: "sm", label: "Try", labelVisible: false, icon: SvgPlay$1 }))),
|
|
32439
|
+
isHovered && onPlayClick && (React.createElement(Button, { variant: "primary", size: "sm", label: "Try", labelVisible: false, icon: SvgPlay$1, onClick: onPlayClick }))),
|
|
32440
32440
|
renderActions && renderActions(isHovered),
|
|
32441
32441
|
React.createElement("div", { className: classNames(descriptionClassNames["base"], descriptionClassNames.gallery) }, description))));
|
|
32442
32442
|
};
|