@mastra/playground-ui 22.1.1 → 22.1.2-alpha.0

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/index.css CHANGED
@@ -8747,6 +8747,10 @@
8747
8747
  height: var(--spacing-3_5);
8748
8748
  }
8749
8749
 
8750
+ .\[\&\>svg\]\:h-3 > svg {
8751
+ height: var(--spacing-3);
8752
+ }
8753
+
8750
8754
  .\[\&\>svg\]\:h-4 > svg {
8751
8755
  height: var(--spacing-4);
8752
8756
  }
@@ -8815,6 +8819,10 @@
8815
8819
  height: var(--height-icon-sm);
8816
8820
  }
8817
8821
 
8822
+ .\[\&\>svg\]\:w-3 > svg {
8823
+ width: var(--spacing-3);
8824
+ }
8825
+
8818
8826
  .\[\&\>svg\]\:w-4 > svg {
8819
8827
  width: var(--spacing-4);
8820
8828
  }
@@ -8892,6 +8900,10 @@
8892
8900
  translate: var(--tw-translate-x) var(--tw-translate-y);
8893
8901
  }
8894
8902
 
8903
+ .\[\&\>svg\]\:text-accent1 > svg {
8904
+ color: var(--color-accent1);
8905
+ }
8906
+
8895
8907
  .\[\&\>svg\]\:text-neutral3 > svg {
8896
8908
  color: var(--color-neutral3);
8897
8909
  }
package/dist/index.es.js CHANGED
@@ -8,7 +8,7 @@ import { useMastraClient, resolveToChildMessages, useCreateWorkflowRun, useStrea
8
8
  import { useQuery, useQueryClient, useMutation, useInfiniteQuery, useQueries, QueryClient, QueryClientProvider } from '@tanstack/react-query';
9
9
  import './index.css';export * from '@tanstack/react-query';
10
10
  import { useComposer, useComposerRuntime, useAttachment, ComposerPrimitive, AttachmentPrimitive, useAuiState, useAssistantState, useMessage, MessagePrimitive, ActionBarPrimitive, ThreadPrimitive, CompositeAttachmentAdapter, SimpleImageAttachmentAdapter, SimpleTextAttachmentAdapter, WebSpeechSynthesisAdapter, useExternalStoreRuntime, AssistantRuntimeProvider } from '@assistant-ui/react';
11
- import { X, Wand2, Link, CloudUpload, FileText, CircleXIcon, ChevronUpIcon, CircleCheck, CircleX, CircleAlert, Info, CheckIcon as CheckIcon$1, CopyIcon, Share2, Check, FolderTree, HardDrive, Loader2, Brain, ChevronDown, ChevronRight, Unplug, XCircle, CloudCog, TerminalSquare, Clock as Clock$1, PlayCircle, Workflow, Layers, List, CalendarClock, Timer, CornerDownRight, GitBranch, RefreshCw, Repeat, Repeat1, Network, Footprints, Circle, TrashIcon, Brackets, PlusIcon, TriangleAlertIcon, CalendarIcon, CircleAlertIcon, InfoIcon as InfoIcon$1, AlertCircle, TriangleAlert, Braces, ChevronDownIcon, Plus, EyeOffIcon, EyeIcon, ShieldAlert, PauseIcon, HourglassIcon, CircleDashed, Minus, Maximize, AlertCircleIcon, StopCircle, CirclePause, Tag, ShieldX, SearchIcon, ExternalLinkIcon, CircleSlashIcon, Cpu, ChevronsUpDown, Search, ArrowRight, ArrowLeft, CheckCircleIcon, BrainIcon, AudioLinesIcon, StopCircleIcon, DatabaseIcon, Save, Mic, ArrowUp, SaveIcon, BookOpen, ExternalLink, RotateCcw, GripVertical, Trash, MoveRight, Copy, ArrowLeftIcon, ArrowRightIcon, AlignLeftIcon, AlignJustifyIcon, ArrowUpIcon, ArrowDownIcon, ChevronsRightIcon, CalculatorIcon, ChevronRightIcon, GaugeIcon, ChevronsLeftRightEllipsisIcon, HashIcon, FileInputIcon, FileOutputIcon, ReceiptText, XIcon, Type, ToggleLeft, Hash, Ban, ListX, ChevronsLeft, ChevronsRight, ChevronLeft, Text, TextSearch, EqualNot, Equal, Component, Trash2, Ruler, Globe, Folder, Pencil, Link2, Maximize2, Minimize2, RefreshCcwIcon, Monitor, ChevronUp, PanelRight, AlignLeft, Trash2Icon, FileTextIcon, BookmarkPlus, PenLine, LaptopMinimal, Plug, File as File$1, FolderOpen, Image, FileJson, FileCode, FolderPlus, Drill, Eye, Wrench, MessageSquare, AlertTriangleIcon, BracesIcon, ArrowRightToLineIcon, CoinsIcon, CircleGaugeIcon, PanelTopIcon, ChevronsUpIcon, ChevronsDownIcon, CircleChevronUpIcon, CircleChevronDownIcon, FileIcon, TimerIcon, ChevronsLeftRightIcon, ChevronFirstIcon, ChevronLastIcon, CircleDashedIcon, ListTreeIcon, PanelLeftIcon, Award, ClipboardCheck, CheckCircle, FormInput, Sparkles, Play, CheckCircle2, ChevronLeftIcon, Paperclip, FlaskConical, Database, ThumbsUp, ThumbsDown, FilterIcon, Loader2Icon, FileInput, FileOutput, NetworkIcon, WorkflowIcon as WorkflowIcon$1, PackageIcon, GitBranchIcon, PackageOpenIcon, OctagonXIcon, FrownIcon, TrendingUpIcon, TrendingDownIcon, ExpandIcon, ChevronsUpDownIcon, ChevronsDownUpIcon, Upload, MoveRightIcon, GitCompare, RouteIcon, TagIcon, FileCodeIcon, Calendar1Icon, HistoryIcon, History, EllipsisVerticalIcon, AmpersandIcon, GitCompareIcon, Download, FolderOutput, ClockIcon, BanIcon, AlertTriangle, MoreVertical, PanelRightIcon, PlayIcon, OctagonAlertIcon, CrosshairIcon, TargetIcon, LayersIcon, EqualIcon, PenIcon, LogIn, KeyboardIcon, CircleSlash, Cloud, Zap, FileCode2, Code, Server, Home, Package, Github } from 'lucide-react';
11
+ import { X, Wand2, Link, CloudUpload, FileText, CircleXIcon, ChevronUpIcon, CircleCheck, CircleX, CircleAlert, Info, CheckIcon as CheckIcon$1, CopyIcon, Share2, Check, FolderTree, HardDrive, Loader2, Brain, ChevronDown, ChevronRight, Unplug, XCircle, CloudCog, TerminalSquare, Clock as Clock$1, PlayCircle, Workflow, Layers, List, CalendarClock, Timer, CornerDownRight, GitBranch, RefreshCw, Repeat, Repeat1, Network, Footprints, Circle, TrashIcon, Brackets, PlusIcon, TriangleAlertIcon, CalendarIcon, CircleAlertIcon, InfoIcon as InfoIcon$1, AlertCircle, TriangleAlert, Braces, ChevronDownIcon, Plus, EyeOffIcon, EyeIcon, ShieldAlert, PauseIcon, HourglassIcon, CircleDashed, Minus, Maximize, AlertCircleIcon, StopCircle, CirclePause, Tag, ShieldX, SearchIcon, ExternalLinkIcon, CircleSlashIcon, Cpu, ChevronsUpDown, Search, ArrowRight, ArrowLeft, CheckCircleIcon, BrainIcon, AudioLinesIcon, StopCircleIcon, DatabaseIcon, Save, Mic, ArrowUp, SaveIcon, BookOpen, ExternalLink, RotateCcw, GripVertical, Trash, MoveRight, Copy, ArrowLeftIcon, ArrowRightIcon, AlignLeftIcon, AlignJustifyIcon, ArrowUpIcon, ArrowDownIcon, ChevronsRightIcon, CalculatorIcon, ChevronRightIcon, GaugeIcon, ChevronsLeftRightEllipsisIcon, HashIcon, FileInputIcon, FileOutputIcon, ReceiptText, XIcon, Type, ToggleLeft, Hash, Ban, ListX, ChevronsLeft, ChevronsRight, ChevronLeft, Text, TextSearch, EqualNot, Equal, Component, Trash2, Ruler, Globe, Folder, Pencil, Link2, Maximize2, Minimize2, RefreshCcwIcon, Monitor, ChevronUp, PanelRight, AlignLeft, Trash2Icon, FileTextIcon, BookmarkPlus, PenLine, LaptopMinimal, Plug, File as File$1, FolderOpen, Image, FileJson, FileCode, FolderPlus, Drill, Eye, Wrench, MessageSquare, AlertTriangleIcon, BracesIcon, ArrowRightToLineIcon, CoinsIcon, CircleGaugeIcon, PanelTopIcon, ChevronsUpIcon, ChevronsDownIcon, CircleChevronUpIcon, CircleChevronDownIcon, FileIcon, TimerIcon, ChevronsLeftRightIcon, ChevronFirstIcon, ChevronLastIcon, CircleDashedIcon, ListTreeIcon, PanelLeftIcon, Award, ClipboardCheck, CheckCircle, FormInput, Sparkles, Play, CheckCircle2, ChevronLeftIcon, Paperclip, FlaskConical, Database, ThumbsUp, ThumbsDown, FilterIcon, Loader2Icon, FileInput, FileOutput, NetworkIcon, WorkflowIcon as WorkflowIcon$1, PackageIcon, GitBranchIcon, PackageOpenIcon, OctagonXIcon, FrownIcon, TrendingUpIcon, TrendingDownIcon, Link2Icon, ExpandIcon, ChevronsUpDownIcon, ChevronsDownUpIcon, Upload, MoveRightIcon, GitCompare, RouteIcon, TagIcon, FileCodeIcon, Calendar1Icon, HistoryIcon, History, EllipsisVerticalIcon, AmpersandIcon, GitCompareIcon, Download, FolderOutput, ClockIcon, BanIcon, AlertTriangle, MoreVertical, PanelRightIcon, PlayIcon, OctagonAlertIcon, CrosshairIcon, TargetIcon, LayersIcon, EqualIcon, PenIcon, LogIn, KeyboardIcon, CircleSlash, Cloud, Zap, FileCode2, Code, Server, Home, Package, Github } from 'lucide-react';
12
12
  import { S as Shadows, G as Glows, B as BorderColors, C as Colors, b as Sizes, F as FontSizes, L as LineHeights, a as BorderRadius, c as Spacings } from './spacings-CKfS0_hW.js';
13
13
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
14
14
  import { TooltipProvider as TooltipProvider$1 } from '@radix-ui/react-tooltip';
@@ -46823,13 +46823,83 @@ function DataKeysAndValuesRoot({ className, children, numOfCol = 1 }) {
46823
46823
  );
46824
46824
  }
46825
46825
 
46826
+ const dataKeysAndValuesValueStyles = "text-ui-smd text-neutral3 min-w-0 py-0.5";
46827
+
46826
46828
  function DataKeysAndValuesValue({ className, children }) {
46827
- return /* @__PURE__ */ jsx("dd", { className: cn("text-ui-smd text-neutral3 truncate min-w-0 py-0.5", className), children });
46829
+ return /* @__PURE__ */ jsx("dd", { className: cn(dataKeysAndValuesValueStyles, "truncate", className), children });
46830
+ }
46831
+
46832
+ function isExternalUrl(href) {
46833
+ return /^https?:\/\//.test(href);
46834
+ }
46835
+ function DataKeysAndValuesValueLink({ className, children, href }) {
46836
+ const { Link } = useLinkComponent();
46837
+ const isExternal = isExternalUrl(href);
46838
+ const linkClassName = cn(
46839
+ "truncate flex items-center gap-2 hover:text-neutral4 transition-colors",
46840
+ "[&>svg]:w-4 [&>svg]:h-4 [&>svg]:shrink-0 [&>svg]:opacity-70 [&:hover>svg]:opacity-100"
46841
+ );
46842
+ if (isExternal) {
46843
+ return /* @__PURE__ */ jsx("dd", { className: cn(dataKeysAndValuesValueStyles, className), children: /* @__PURE__ */ jsxs("a", { href, target: "_blank", rel: "noopener noreferrer", className: linkClassName, children: [
46844
+ /* @__PURE__ */ jsx("span", { children }),
46845
+ /* @__PURE__ */ jsx(ExternalLinkIcon, {})
46846
+ ] }) });
46847
+ }
46848
+ return /* @__PURE__ */ jsx("dd", { className: cn(dataKeysAndValuesValueStyles, className), children: /* @__PURE__ */ jsxs(Link, { href, className: linkClassName, children: [
46849
+ /* @__PURE__ */ jsx("span", { children }),
46850
+ /* @__PURE__ */ jsx(Link2Icon, {})
46851
+ ] }) });
46852
+ }
46853
+
46854
+ function DataKeysAndValuesValueWithCopyBtn({
46855
+ className,
46856
+ children,
46857
+ copyValue,
46858
+ copyTooltip = "Copy to clipboard"
46859
+ }) {
46860
+ const { isCopied, handleCopy } = useCopyToClipboard$1({
46861
+ text: copyValue,
46862
+ copyMessage: "Copied!"
46863
+ });
46864
+ return /* @__PURE__ */ jsx("dd", { className: cn(dataKeysAndValuesValueStyles, className), children: /* @__PURE__ */ jsxs(Tooltip, { open: isCopied || void 0, children: [
46865
+ /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
46866
+ "button",
46867
+ {
46868
+ onClick: handleCopy,
46869
+ type: "button",
46870
+ className: cn(
46871
+ "flex gap-2 items-center",
46872
+ "[&>svg]:w-3 [&>svg]:h-3 [&>svg]:shrink-0 [&>svg]:opacity-70 [&:hover>svg]:opacity-100",
46873
+ { "[&>svg]:w-4 [&>svg]:h-4 [&>svg]:text-accent1": isCopied }
46874
+ ),
46875
+ "aria-label": isCopied ? "Copied!" : copyTooltip,
46876
+ children: [
46877
+ /* @__PURE__ */ jsx("span", { children }),
46878
+ isCopied ? /* @__PURE__ */ jsx(CheckIcon$1, {}) : /* @__PURE__ */ jsx(CopyIcon, {})
46879
+ ]
46880
+ }
46881
+ ) }),
46882
+ /* @__PURE__ */ jsx(TooltipContent, { children: isCopied ? "Copied!" : copyTooltip })
46883
+ ] }) });
46884
+ }
46885
+
46886
+ function DataKeysAndValuesValueWithTooltip({
46887
+ className,
46888
+ children,
46889
+ tooltip
46890
+ }) {
46891
+ return /* @__PURE__ */ jsx("dd", { className: cn(dataKeysAndValuesValueStyles, className), children: /* @__PURE__ */ jsxs(Tooltip, { children: [
46892
+ /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx("div", { tabIndex: 0, className: "truncate cursor-help hover:text-neutral4 inline", children }) }),
46893
+ /* @__PURE__ */ jsx(TooltipContent, { children: tooltip })
46894
+ ] }) });
46828
46895
  }
46829
46896
 
46830
46897
  const DataKeysAndValues = Object.assign(DataKeysAndValuesRoot, {
46831
46898
  Key: DataKeysAndValuesKey,
46832
46899
  Value: DataKeysAndValuesValue,
46900
+ ValueLink: DataKeysAndValuesValueLink,
46901
+ ValueWithTooltip: DataKeysAndValuesValueWithTooltip,
46902
+ ValueWithCopyBtn: DataKeysAndValuesValueWithCopyBtn,
46833
46903
  Header: DataKeysAndValuesHeader
46834
46904
  });
46835
46905