@dust-tt/sparkle 0.2.155-alphatv → 0.2.158-alphatv

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/index.js CHANGED
@@ -74717,6 +74717,7 @@ ContextItem.SectionHeader = function (_a) {
74717
74717
  description && (React.createElement("div", { className: "s-text-sm s-font-normal s-text-element-700 dark:s-text-element-700-dark" }, description))));
74718
74718
  };
74719
74719
 
74720
+ var isBrowser = typeof window !== "undefined";
74720
74721
  var breakpoints = {
74721
74722
  sm: 640,
74722
74723
  md: 768,
@@ -74724,19 +74725,20 @@ var breakpoints = {
74724
74725
  xl: 1280,
74725
74726
  xxl: 1536, // Tailwind's default for `2xl`
74726
74727
  };
74728
+ var getWindowWidth = function () { return isBrowser ? window.innerWidth : 0; };
74727
74729
  var titleClassNames = {
74728
74730
  base: "s-truncate s-font-medium s-text-element-900 s-w-full",
74729
74731
  item: "s-text-sm",
74730
74732
  list: "s-text-base",
74731
74733
  gallery: "s-text-lg",
74732
- minimalGallery: "s-overflow-hidden s-whitespace-nowrap ".concat(window.innerWidth <= breakpoints.sm ? "s-text-sm" : window.innerWidth <= breakpoints.md ? "s-text-base" : ""),
74734
+ minimalGallery: "s-overflow-hidden s-whitespace-nowrap ".concat(getWindowWidth() <= breakpoints.sm ? "s-text-sm" : getWindowWidth() <= breakpoints.md ? "s-text-base" : ""),
74733
74735
  };
74734
74736
  var subtitleClassNames = {
74735
74737
  base: "s-font-normal s-text-element-700 s-truncate s-w-full",
74736
74738
  item: "s-text-xs",
74737
74739
  list: "s-text-sm",
74738
74740
  gallery: "s-text-sm",
74739
- minimalGallery: "s-overflow-hidden s-whitespace-nowrap ".concat(window.innerWidth <= breakpoints.sm ? "s-text-xs" : window.innerWidth <= breakpoints.md ? "s-text-sm" : ""),
74741
+ minimalGallery: "s-overflow-hidden s-whitespace-nowrap ".concat(getWindowWidth() <= breakpoints.sm ? "s-text-xs" : getWindowWidth() <= breakpoints.md ? "s-text-sm" : ""),
74740
74742
  };
74741
74743
  var descriptionClassNames = {
74742
74744
  base: "s-font-normal s-mb-1",
@@ -74808,9 +74810,8 @@ var GalleryVariantContent = function (_a) {
74808
74810
  React.createElement("div", { className: classNames(descriptionClassNames["base"], descriptionClassNames.gallery) }, description))));
74809
74811
  };
74810
74812
  var MinimalGalleryVariantContent = function (_a) {
74811
- var title = _a.title, pictureUrl = _a.pictureUrl, subtitle = _a.subtitle, _b = _a.hasAction, hasAction = _b === void 0 ? true : _b, onClick = _a.onClick, onActionClick = _a.onActionClick, renderActionButton = _a.renderActionButton;
74812
- var isSmallScreen = window.innerWidth <= breakpoints.sm;
74813
- var actionButton = (React.createElement(Button, { label: "", icon: SvgMore$1, variant: "tertiary", size: isSmallScreen ? "xs" : "sm", labelVisible: false, hasMagnifying: false, disabledTooltip: true, onClick: function (e) {
74813
+ var title = _a.title, pictureUrl = _a.pictureUrl, subtitle = _a.subtitle, _b = _a.hasAction, hasAction = _b === void 0 ? true : _b, onClick = _a.onClick, onActionClick = _a.onActionClick;
74814
+ var actionButton = (React.createElement(Button, { label: "", icon: SvgMore$1, variant: "tertiary", size: "sm", labelVisible: false, hasMagnifying: false, disabledTooltip: true, onClick: function (e) {
74814
74815
  e.stopPropagation();
74815
74816
  onActionClick === null || onActionClick === void 0 ? void 0 : onActionClick();
74816
74817
  } }));
@@ -74818,7 +74819,7 @@ var MinimalGalleryVariantContent = function (_a) {
74818
74819
  React.createElement("div", { id: "assistant-container", className: "s-flex s-grow s-flex-row s-justify-between s-gap-2 s-overflow-hidden s-py-1", onClick: onClick },
74819
74820
  React.createElement("div", { id: "preview", className: "s-flex s-w-full s-min-w-0 s-flex-row s-items-center s-gap-2" },
74820
74821
  React.createElement("div", { id: "avatar-column", className: "s-w-fit" },
74821
- React.createElement(Avatar, { name: "Avatar of ".concat(title), visual: pictureUrl, size: isSmallScreen ? "sm" : "md" })),
74822
+ React.createElement(Avatar, { name: "Avatar of ".concat(title), visual: pictureUrl, size: "md" })),
74822
74823
  React.createElement("div", { id: "details-column", className: "s-flex s-w-full s-min-w-0 s-flex-col s-items-start s-gap-0 s-overflow-hidden" },
74823
74824
  React.createElement("div", { className: classNames(titleClassNames["base"], titleClassNames.minimalGallery) },
74824
74825
  "@",
@@ -74826,7 +74827,7 @@ var MinimalGalleryVariantContent = function (_a) {
74826
74827
  React.createElement("div", { className: classNames(subtitleClassNames["base"], subtitleClassNames.minimalGallery) },
74827
74828
  "By: ",
74828
74829
  subtitle))),
74829
- React.createElement("div", { id: "actions-column", className: "s-flex s-shrink-0 s-w-fit" }, hasAction && (renderActionButton ? renderActionButton(actionButton) : actionButton)))));
74830
+ React.createElement("div", { id: "actions-column", className: "s-flex s-shrink-0 s-w-fit" }, hasAction && actionButton))));
74830
74831
  };
74831
74832
  function AssistantPreview(props) {
74832
74833
  var onClick = props.onClick, variant = props.variant;