@dust-tt/sparkle 0.2.61-alpha → 0.2.61-alpha-1

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,6 +1,7 @@
1
1
  import React from "react";
2
2
  type AssistantPreviewVariant = "sm" | "md" | "lg" | "list";
3
3
  interface AssistantPreviewProps {
4
+ allowAddAction: boolean;
4
5
  description: string;
5
6
  isAdded: boolean;
6
7
  isUpdatingList: boolean;
package/dist/cjs/index.js CHANGED
@@ -32260,13 +32260,13 @@ var MediumVariantContent = function () {
32260
32260
  var LargeVariantContent = function (_a) {
32261
32261
  var _b;
32262
32262
  var props = _a.props;
32263
- var isWorkspace = props.isWorkspace, isAdded = props.isAdded, name = props.name, description = props.description, subtitle = props.subtitle, pictureUrl = props.pictureUrl, onTestClick = props.onTestClick, onUpdate = props.onUpdate, onShowDetailsClick = props.onShowDetailsClick, isUpdatingList = props.isUpdatingList;
32264
- var galleryChip = isAdded && (React.createElement("div", { className: "s-group" },
32263
+ var description = props.description, isAdded = props.isAdded, allowAddAction = props.allowAddAction, isUpdatingList = props.isUpdatingList, isWorkspace = props.isWorkspace, name = props.name, onShowDetailsClick = props.onShowDetailsClick, onTestClick = props.onTestClick, onUpdate = props.onUpdate, pictureUrl = props.pictureUrl, subtitle = props.subtitle;
32264
+ var galleryChip = allowAddAction && isAdded && (React.createElement("div", { className: "s-group" },
32265
32265
  React.createElement(Chip, { color: "emerald", size: "xs", label: "Added", className: "group-hover:s-hidden" }),
32266
32266
  React.createElement("div", { className: "s-hidden group-hover:s-block" },
32267
32267
  React.createElement(Button.List, { isWrapping: true },
32268
32268
  React.createElement(Button, { key: "remove", variant: "tertiary", icon: SvgDash$1, disabled: isUpdatingList, size: "xs", label: "Remove", onClick: function () { return onUpdate("removed"); } })))));
32269
- var addButton = !isAdded && (React.createElement(Button, { key: "add", variant: "tertiary", icon: SvgPlus$1, disabled: isUpdatingList, size: "xs", label: isWorkspace ? "Add to Workspace" : "Add", onClick: function () { return onUpdate("added"); } }));
32269
+ var addButton = !isAdded && allowAddAction && (React.createElement(Button, { key: "add", variant: "tertiary", icon: SvgPlus$1, disabled: isUpdatingList, size: "xs", label: isWorkspace ? "Add to Workspace" : "Add", onClick: function () { return onUpdate("added"); } }));
32270
32270
  var testButton = null;
32271
32271
  if (onTestClick) {
32272
32272
  testButton = (React.createElement(Button, { key: "test", variant: "tertiary", icon: SvgPlay$1, size: "xs", label: "Test", onClick: onTestClick }));