@dust-tt/sparkle 0.2.649 → 0.2.650

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.
Files changed (75) hide show
  1. package/dist/cjs/index.js +1 -1
  2. package/dist/esm/components/AssistantCard.d.ts +0 -1
  3. package/dist/esm/components/AssistantCard.d.ts.map +1 -1
  4. package/dist/esm/components/AssistantCard.js +4 -4
  5. package/dist/esm/components/AssistantCard.js.map +1 -1
  6. package/dist/esm/components/Button.d.ts +0 -1
  7. package/dist/esm/components/Button.d.ts.map +1 -1
  8. package/dist/esm/components/Button.js +2 -2
  9. package/dist/esm/components/Button.js.map +1 -1
  10. package/dist/esm/components/Card.d.ts +0 -2
  11. package/dist/esm/components/Card.d.ts.map +1 -1
  12. package/dist/esm/components/Card.js +3 -3
  13. package/dist/esm/components/Card.js.map +1 -1
  14. package/dist/esm/components/Citation.js +1 -1
  15. package/dist/esm/components/Citation.js.map +1 -1
  16. package/dist/esm/components/ConversationMessage.d.ts +2 -0
  17. package/dist/esm/components/ConversationMessage.d.ts.map +1 -1
  18. package/dist/esm/components/ConversationMessage.js +7 -6
  19. package/dist/esm/components/ConversationMessage.js.map +1 -1
  20. package/dist/esm/components/Dialog.d.ts +0 -1
  21. package/dist/esm/components/Dialog.d.ts.map +1 -1
  22. package/dist/esm/components/Dialog.js +2 -2
  23. package/dist/esm/components/Dialog.js.map +1 -1
  24. package/dist/esm/components/EmptyCTA.d.ts +0 -1
  25. package/dist/esm/components/EmptyCTA.d.ts.map +1 -1
  26. package/dist/esm/components/EmptyCTA.js +2 -2
  27. package/dist/esm/components/EmptyCTA.js.map +1 -1
  28. package/dist/esm/components/LinkWrapper.d.ts +0 -1
  29. package/dist/esm/components/LinkWrapper.d.ts.map +1 -1
  30. package/dist/esm/components/LinkWrapper.js +2 -2
  31. package/dist/esm/components/LinkWrapper.js.map +1 -1
  32. package/dist/esm/components/MultiPageDialog.d.ts +0 -1
  33. package/dist/esm/components/MultiPageDialog.d.ts.map +1 -1
  34. package/dist/esm/components/MultiPageDialog.js +2 -2
  35. package/dist/esm/components/MultiPageDialog.js.map +1 -1
  36. package/dist/esm/components/NavigationList.d.ts +0 -1
  37. package/dist/esm/components/NavigationList.d.ts.map +1 -1
  38. package/dist/esm/components/NavigationList.js +2 -2
  39. package/dist/esm/components/NavigationList.js.map +1 -1
  40. package/dist/esm/components/PriceTable.d.ts +1 -2
  41. package/dist/esm/components/PriceTable.d.ts.map +1 -1
  42. package/dist/esm/components/PriceTable.js +2 -2
  43. package/dist/esm/components/PriceTable.js.map +1 -1
  44. package/dist/esm/components/Sheet.d.ts +0 -1
  45. package/dist/esm/components/Sheet.d.ts.map +1 -1
  46. package/dist/esm/components/Sheet.js +2 -2
  47. package/dist/esm/components/Sheet.js.map +1 -1
  48. package/dist/esm/components/Tabs.d.ts +0 -1
  49. package/dist/esm/components/Tabs.d.ts.map +1 -1
  50. package/dist/esm/components/Tabs.js +2 -2
  51. package/dist/esm/components/Tabs.js.map +1 -1
  52. package/dist/esm/icons/app/Atom.js +1 -1
  53. package/dist/esm/icons/app/Atom.js.map +1 -1
  54. package/dist/esm/stories/Chip.stories.d.ts +0 -1
  55. package/dist/esm/stories/Chip.stories.d.ts.map +1 -1
  56. package/dist/esm/stories/ConversationMessage.stories.d.ts.map +1 -1
  57. package/dist/esm/stories/ConversationMessage.stories.js +3 -3
  58. package/dist/esm/stories/ConversationMessage.stories.js.map +1 -1
  59. package/dist/sparkle.css +9 -5
  60. package/package.json +1 -1
  61. package/src/components/AssistantCard.tsx +27 -36
  62. package/src/components/Button.tsx +0 -3
  63. package/src/components/Card.tsx +0 -4
  64. package/src/components/Citation.tsx +1 -1
  65. package/src/components/ConversationMessage.tsx +13 -3
  66. package/src/components/Dialog.tsx +0 -3
  67. package/src/components/EmptyCTA.tsx +1 -11
  68. package/src/components/LinkWrapper.tsx +19 -26
  69. package/src/components/MultiPageDialog.tsx +0 -3
  70. package/src/components/NavigationList.tsx +0 -3
  71. package/src/components/PriceTable.tsx +0 -3
  72. package/src/components/Sheet.tsx +0 -3
  73. package/src/components/Tabs.tsx +0 -3
  74. package/src/icons/app/Atom.tsx +1 -1
  75. package/src/stories/ConversationMessage.stories.tsx +3 -1
@@ -80,7 +80,6 @@ interface DialogContentProps
80
80
  isAlertDialog?: boolean;
81
81
  preventAutoFocusOnClose?: boolean;
82
82
  mountPortalContainer?: HTMLElement;
83
- dataAnalytics?: string;
84
83
  }
85
84
 
86
85
  const DialogContent = React.forwardRef<
@@ -98,7 +97,6 @@ const DialogContent = React.forwardRef<
98
97
  preventAutoFocusOnClose = true,
99
98
  onCloseAutoFocus,
100
99
  mountPortalContainer,
101
- dataAnalytics,
102
100
  ...props
103
101
  },
104
102
  ref
@@ -126,7 +124,6 @@ const DialogContent = React.forwardRef<
126
124
  : props.onInteractOutside
127
125
  }
128
126
  onCloseAutoFocus={handleCloseAutoFocus}
129
- data-analytics={dataAnalytics}
130
127
  {...props}
131
128
  >
132
129
  {children}
@@ -42,24 +42,14 @@ EmptyCTA.displayName = "EmptyCTA";
42
42
  interface EmptyCTAButtonProps extends RegularButtonProps {
43
43
  icon: React.ComponentType;
44
44
  label: string;
45
- dataAnalytics?: string;
46
45
  }
47
46
 
48
47
  const EmptyCTAButton: React.FC<EmptyCTAButtonProps> = ({
49
48
  icon,
50
49
  label,
51
50
  variant = "highlight",
52
- dataAnalytics,
53
51
  ...props
54
- }) => (
55
- <Button
56
- icon={icon}
57
- label={label}
58
- variant={variant}
59
- dataAnalytics={dataAnalytics}
60
- {...props}
61
- />
62
- );
52
+ }) => <Button icon={icon} label={label} variant={variant} {...props} />;
63
53
 
64
54
  EmptyCTAButton.displayName = "EmptyCTAButton";
65
55
 
@@ -10,36 +10,29 @@ export interface LinkWrapperProps {
10
10
  shallow?: boolean;
11
11
  target?: string;
12
12
  prefetch?: boolean;
13
- dataAnalytics?: string;
14
13
  }
15
14
 
16
15
  export const LinkWrapper = React.forwardRef<
17
16
  HTMLAnchorElement,
18
17
  LinkWrapperProps
19
- >(
20
- (
21
- { children, href, rel, replace, shallow, target, prefetch, dataAnalytics },
22
- ref
23
- ) => {
24
- const { components } = React.useContext(SparkleContext);
18
+ >(({ children, href, rel, replace, shallow, target, prefetch }, ref) => {
19
+ const { components } = React.useContext(SparkleContext);
25
20
 
26
- if (href) {
27
- return (
28
- <components.link
29
- ref={ref}
30
- href={href}
31
- target={target}
32
- rel={rel}
33
- replace={replace}
34
- shallow={shallow}
35
- prefetch={prefetch}
36
- data-analytics={dataAnalytics}
37
- >
38
- {children}
39
- </components.link>
40
- );
41
- }
42
-
43
- return children;
21
+ if (href) {
22
+ return (
23
+ <components.link
24
+ ref={ref}
25
+ href={href}
26
+ target={target}
27
+ rel={rel}
28
+ replace={replace}
29
+ shallow={shallow}
30
+ prefetch={prefetch}
31
+ >
32
+ {children}
33
+ </components.link>
34
+ );
44
35
  }
45
- );
36
+
37
+ return children;
38
+ });
@@ -99,7 +99,6 @@ interface MultiPageDialogProps {
99
99
  footerContent?: React.ReactNode;
100
100
  addFooterSeparator?: boolean;
101
101
  hideCloseButton?: boolean;
102
- dataAnalytics?: string;
103
102
  }
104
103
 
105
104
  interface MultiPageDialogContentProps extends MultiPageDialogProps {
@@ -130,7 +129,6 @@ const MultiPageDialogContent = React.forwardRef<
130
129
  rightButton,
131
130
  footerContent,
132
131
  hideCloseButton,
133
- dataAnalytics,
134
132
  ...props
135
133
  },
136
134
  ref
@@ -190,7 +188,6 @@ const MultiPageDialogContent = React.forwardRef<
190
188
  isAlertDialog={isAlertDialog}
191
189
  preventAutoFocusOnClose={preventAutoFocusOnClose}
192
190
  className={className}
193
- dataAnalytics={dataAnalytics}
194
191
  {...props}
195
192
  >
196
193
  <div className={cn(multiPageDialogLayoutVariants())}>
@@ -71,7 +71,6 @@ interface NavigationListItemProps
71
71
  icon?: React.ComponentType;
72
72
  moreMenu?: React.ReactNode;
73
73
  status?: "idle" | "unread" | "blocked";
74
- dataAnalytics?: string;
75
74
  }
76
75
 
77
76
  const NavigationListItem = React.forwardRef<
@@ -91,7 +90,6 @@ const NavigationListItem = React.forwardRef<
91
90
  shallow,
92
91
  moreMenu,
93
92
  status = "idle",
94
- dataAnalytics,
95
93
  ...props
96
94
  },
97
95
  ref
@@ -131,7 +129,6 @@ const NavigationListItem = React.forwardRef<
131
129
  rel={rel}
132
130
  replace={replace}
133
131
  shallow={shallow}
134
- dataAnalytics={dataAnalytics}
135
132
  >
136
133
  <div
137
134
  className={cn(
@@ -14,7 +14,6 @@ interface PriceTableProps {
14
14
  className?: string;
15
15
  children: ReactNode;
16
16
  magnified?: boolean;
17
- dataAnalytics?: string;
18
17
  }
19
18
 
20
19
  const colorTable = {
@@ -46,7 +45,6 @@ export function PriceTable({
46
45
  priceLabel = "",
47
46
  className = "",
48
47
  magnified = true,
49
- dataAnalytics,
50
48
  children, // Use children instead of tableItems
51
49
  }: PriceTableProps) {
52
50
  // Pass size prop to all PriceTable.Item children
@@ -75,7 +73,6 @@ export function PriceTable({
75
73
  colorTable[color],
76
74
  className
77
75
  )}
78
- data-analytics={dataAnalytics}
79
76
  >
80
77
  <div
81
78
  className={classNames(
@@ -89,7 +89,6 @@ interface SheetContentProps
89
89
  side?: SheetSideType;
90
90
  preventAutoFocusOnClose?: boolean;
91
91
  preventAutoFocusOnOpen?: boolean;
92
- dataAnalytics?: string;
93
92
  }
94
93
 
95
94
  const SheetContent = React.forwardRef<
@@ -107,7 +106,6 @@ const SheetContent = React.forwardRef<
107
106
  preventAutoFocusOnOpen = true,
108
107
  onCloseAutoFocus,
109
108
  onOpenAutoFocus,
110
- dataAnalytics,
111
109
  ...props
112
110
  },
113
111
  ref
@@ -162,7 +160,6 @@ const SheetContent = React.forwardRef<
162
160
  onCloseAutoFocus={handleCloseAutoFocus}
163
161
  onOpenAutoFocus={handleOpenAutoFocus}
164
162
  onKeyDownCapture={onKeyDownCapture}
165
- data-analytics={dataAnalytics}
166
163
  {...props}
167
164
  >
168
165
  {children}
@@ -52,7 +52,6 @@ const TabsTrigger = React.forwardRef<
52
52
  >
53
53
  > & {
54
54
  isLoading?: boolean;
55
- dataAnalytics?: string;
56
55
  } & Omit<LinkWrapperProps, "children" | "className">
57
56
  >(
58
57
  (
@@ -70,7 +69,6 @@ const TabsTrigger = React.forwardRef<
70
69
  variant = "ghost",
71
70
  isCounter = false,
72
71
  counterValue,
73
- dataAnalytics,
74
72
  ...props
75
73
  },
76
74
  ref
@@ -97,7 +95,6 @@ const TabsTrigger = React.forwardRef<
97
95
  shallow={shallow}
98
96
  isCounter={isCounter}
99
97
  counterValue={counterValue}
100
- dataAnalytics={dataAnalytics}
101
98
  className={cn(
102
99
  "s-relative",
103
100
  "after:s-absolute after:s-bottom-[-9px] after:s-left-1/2 after:s-h-[2px] after:s-w-full after:s--translate-x-1/2",
@@ -10,7 +10,7 @@ const SvgAtom = (props: SVGProps<SVGSVGElement>) => (
10
10
  {...props}
11
11
  >
12
12
  <path
13
- fill="#000"
13
+ fill="currentColor"
14
14
  fillRule="evenodd"
15
15
  d="M14.974 2.284c.831-.248 1.733-.268 2.526.19.793.458 1.227 1.249 1.428 2.093.2.841.196 1.827.047 2.866-.029.196-.065.396-.104.599.196.068.387.137.571.21.975.39 1.83.88 2.46 1.474C22.531 10.313 23 11.084 23 12c0 .915-.468 1.687-1.099 2.283-.628.594-1.484 1.084-2.459 1.473-.184.074-.375.143-.57.211.038.204.074.404.103.6.15 1.039.153 2.025-.047 2.866-.201.844-.635 1.635-1.428 2.093-.793.458-1.695.438-2.526.19-.83-.247-1.681-.743-2.506-1.392a12.997 12.997 0 0 1-.468-.389c-.157.136-.312.266-.468.389-.825.649-1.677 1.145-2.506 1.392-.831.248-1.733.268-2.526-.19-.793-.458-1.227-1.249-1.428-2.093-.2-.841-.196-1.827-.047-2.866.029-.196.064-.396.103-.6a13.01 13.01 0 0 1-.57-.21c-.975-.39-1.83-.88-2.46-1.474C1.469 13.687 1 12.915 1 12c0-.916.468-1.687 1.099-2.284.628-.594 1.484-1.083 2.459-1.473.184-.074.374-.143.57-.211-.04-.203-.074-.403-.103-.599-.15-1.039-.153-2.025.047-2.866.201-.844.635-1.635 1.428-2.093.793-.458 1.695-.438 2.526-.19.83.247 1.681.743 2.506 1.392.156.123.312.253.468.388.156-.135.312-.265.468-.388.825-.649 1.677-1.145 2.506-1.392ZM7.06 16.502a10.7 10.7 0 0 0-.056.35c-.128.89-.11 1.605.013 2.118.121.51.319.73.482.825.163.094.452.155.955.005.506-.15 1.134-.492 1.84-1.049.092-.07.182-.146.274-.223a21.574 21.574 0 0 1-1.368-1.683 21.558 21.558 0 0 1-2.14-.343Zm9.878 0c-.677.145-1.394.26-2.141.343a21.577 21.577 0 0 1-1.368 1.683c.092.077.183.152.274.224.707.556 1.335.898 1.84 1.048.504.15.793.089.956-.006.163-.094.36-.314.482-.824.123-.513.141-1.229.013-2.119a10.715 10.715 0 0 0-.056-.35ZM12 17l-.114-.002.113.127.114-.127L12 17Zm0-8c-.582 0-1.15.022-1.698.061A23.841 23.841 0 0 0 8.605 12a23.888 23.888 0 0 0 1.697 2.939 23.855 23.855 0 0 0 3.395 0 23.915 23.915 0 0 0 1.697-2.94 23.902 23.902 0 0 0-1.697-2.937A23.853 23.853 0 0 0 12 9Zm4.33 5.5c-.019.033-.04.065-.058.098l.168-.035-.054-.163c-.02.033-.037.067-.056.1Zm-8.77.063.168.034-.058-.097-.057-.1-.053.163Zm10.808-4.59c-.212.66-.47 1.338-.772 2.027.301.688.56 1.366.772 2.025.113-.041.224-.082.331-.125.835-.334 1.445-.708 1.828-1.07.381-.36.473-.642.473-.83 0-.19-.092-.47-.473-.83-.383-.363-.993-.737-1.828-1.07a10.657 10.657 0 0 0-.33-.127Zm-12.737 0c-.113.041-.223.083-.33.126-.835.334-1.445.708-1.828 1.07-.381.36-.473.642-.473.83 0 .19.092.47.473.83.383.363.993.737 1.828 1.071.107.043.217.084.33.125.212-.659.471-1.337.772-2.025a21.546 21.546 0 0 1-.772-2.027Zm1.929-.537.053.162.057-.098.058-.098-.168.034Zm8.77.064.056.098.053-.162-.168-.035.06.099ZM8.455 4.2c-.503-.15-.792-.089-.955.006-.163.094-.36.314-.482.824-.123.513-.141 1.229-.013 2.119.016.114.035.23.056.349a21.543 21.543 0 0 1 2.14-.345c.446-.605.904-1.17 1.368-1.683-.091-.077-.183-.15-.273-.221-.707-.557-1.335-.898-1.84-1.05Zm8.045.006c-.163-.095-.452-.156-.955-.006-.506.15-1.134.492-1.84 1.049-.091.07-.184.144-.275.221a21.56 21.56 0 0 1 1.368 1.683c.747.083 1.464.199 2.14.345.021-.119.04-.235.057-.349.128-.89.11-1.606-.013-2.12-.121-.51-.319-.73-.482-.823ZM11.887 7 12 7h.112A17.69 17.69 0 0 0 12 6.874L11.887 7Z"
16
16
  clipRule="evenodd"
@@ -202,6 +202,7 @@ export const ConversationHandoffExample = () => {
202
202
  <ConversationMessage
203
203
  type="agent"
204
204
  name="@soupinou"
205
+ timestamp="17:10"
205
206
  pictureUrl="https://avatars.githubusercontent.com/u/138893015?&v=4"
206
207
  buttons={[
207
208
  <Button
@@ -228,11 +229,12 @@ export const ConversationHandoffExample = () => {
228
229
  type="agentAsTool"
229
230
  name="Deep Dive"
230
231
  renderName={(name) => (
231
- <span className="s-inline-flex s-items-center s-text-faint dark:s-text-faint-night">
232
+ <span className="s-inline-flex s-items-center s-text-muted-foreground dark:s-text-muted-foreground-night">
232
233
  <Icon visual={AtomIcon} size="sm" />
233
234
  <span className="s-ml-1">{name}</span>
234
235
  </span>
235
236
  )}
237
+ completionStatus="Completed in 9 min 30 sec"
236
238
  citations={[
237
239
  <Citation href="https://www.google.com">
238
240
  <CitationIcons>