@mastra/playground-ui 30.0.0 → 30.0.1-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/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @mastra/playground-ui
2
2
 
3
+ ## 30.0.1-alpha.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Removed the EntityList and EntityListPageLayout components — they were superseded by DataList. The 9 Studio root list pages (Agents, Datasets, Experiments, MCPs, Processors, Prompts, Scorers, Tools, Workflows) now build on DataList, matching the condensed layout shared across the rest of Studio. ([#17058](https://github.com/mastra-ai/mastra/pull/17058))
8
+
9
+ **Migration**
10
+
11
+ If you were importing EntityList or EntityListPageLayout from `@mastra/playground-ui`, switch to DataList — its API is a strict superset:
12
+
13
+ ```tsx
14
+ // Before
15
+ import { EntityList, EntityListSkeleton } from '@mastra/playground-ui';
16
+
17
+ // After
18
+ import { DataList, DataListSkeleton } from '@mastra/playground-ui';
19
+ ```
20
+
21
+ The primitive names match (`.Top`, `.TopCell`, `.TopCellSmart`, `.RowLink`, `.Cell`, `.TextCell`, `.NameCell`, `.DescriptionCell`, `.NoMatch`, `.Pagination`). DataList additionally exposes `.Row`, `.RowButton`, `.RowStatic`, `.IdCell`, `.MonoCell`, `.SelectCell`, `.NextPageLoading`, and more — useful when you need selection rows or action cells outside a RowLink.
22
+
3
23
  ## 30.0.0
4
24
 
5
25
  ### Minor Changes
package/dist/index.cjs.js CHANGED
@@ -12837,11 +12837,11 @@ const ItemList = Object.assign(ItemListRoot, {
12837
12837
  LabelCell: ItemListLabelCell
12838
12838
  });
12839
12839
 
12840
- const widths$2 = ["75%", "50%", "65%", "90%", "60%", "80%"];
12840
+ const widths$1 = ["75%", "50%", "65%", "90%", "60%", "80%"];
12841
12841
  function ItemListItemsSkeleton({ columns, numberOfRows = 3 }) {
12842
12842
  const getPseudoRandomWidth = (rowIdx, colIdx) => {
12843
- const index = (rowIdx + colIdx + (columns?.length || 0) + (numberOfRows || 0)) % widths$2.length;
12844
- return widths$2[index];
12843
+ const index = (rowIdx + colIdx + (columns?.length || 0) + (numberOfRows || 0)) % widths$1.length;
12844
+ return widths$1[index];
12845
12845
  };
12846
12846
  return /* @__PURE__ */ jsxRuntime.jsx(ItemListItems, { children: Array.from({ length: numberOfRows }).map((_, rowIdx) => /* @__PURE__ */ jsxRuntime.jsx(ItemListRow, { children: /* @__PURE__ */ jsxRuntime.jsx(ItemListRowButton, { columns, children: (columns || []).map((col, colIdx) => {
12847
12847
  const key = `${col.name}-${colIdx}`;
@@ -13668,7 +13668,7 @@ function DataListTopCellWithTooltip({ children, tooltip, className }) {
13668
13668
  /* @__PURE__ */ jsxRuntime.jsx(TooltipContent, { children: tooltip })
13669
13669
  ] });
13670
13670
  }
13671
- const breakpointClasses$1 = {
13671
+ const breakpointClasses = {
13672
13672
  sm: { show: "hidden sm:inline-flex", hide: "inline-flex sm:hidden" },
13673
13673
  md: { show: "hidden md:inline-flex", hide: "inline-flex md:hidden" },
13674
13674
  lg: { show: "hidden lg:inline-flex", hide: "inline-flex lg:hidden" },
@@ -13683,7 +13683,7 @@ function DataListTopCellSmart({
13683
13683
  className
13684
13684
  }) {
13685
13685
  const tooltipText = tooltip ?? (typeof long === "string" ? long : void 0);
13686
- const bp = breakpointClasses$1[breakpoint];
13686
+ const bp = breakpointClasses[breakpoint];
13687
13687
  const content = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
13688
13688
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("items-center gap-1", bp.show), children: long }),
13689
13689
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("items-center gap-1", bp.hide), children: short })
@@ -13756,14 +13756,14 @@ const DataList = Object.assign(DataListRoot, {
13756
13756
  Pagination: DataListPagination
13757
13757
  });
13758
13758
 
13759
- const widths$1 = ["75%", "50%", "65%", "90%", "60%", "80%"];
13759
+ const widths = ["75%", "50%", "65%", "90%", "60%", "80%"];
13760
13760
  function DataListSkeleton({ columns = "auto 1fr auto auto", numberOfRows = 3 }) {
13761
13761
  const columnParts = columns.trim().split(/\s+/);
13762
13762
  const columnCount = columnParts.length;
13763
13763
  const skeletonColumns = columnParts.map((col) => col === "auto" ? "minmax(6rem, auto)" : col).join(" ");
13764
13764
  const getPseudoRandomWidth = (rowIdx, colIdx) => {
13765
- const index = (rowIdx + colIdx + columnCount + numberOfRows) % widths$1.length;
13766
- return widths$1[index];
13765
+ const index = (rowIdx + colIdx + columnCount + numberOfRows) % widths.length;
13766
+ return widths[index];
13767
13767
  };
13768
13768
  return /* @__PURE__ */ jsxRuntime.jsx(DataListRoot, { columns: skeletonColumns, children: Array.from({ length: numberOfRows }).map((_, rowIdx) => /* @__PURE__ */ jsxRuntime.jsx(
13769
13769
  "div",
@@ -13889,221 +13889,6 @@ const TracesDataList = Object.assign(TracesDataListRoot, {
13889
13889
  NextPageLoading: DataListNextPageLoading
13890
13890
  });
13891
13891
 
13892
- function EntityListCell({ children, className }) {
13893
- return /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("relative py-4 grid items-center text-ui-md whitespace-nowrap text-neutral3", className), children });
13894
- }
13895
- function EntityListTextCell({ children, className }) {
13896
- return /* @__PURE__ */ jsxRuntime.jsx(EntityListCell, { className, children });
13897
- }
13898
- function EntityListNameCell({ children, className }) {
13899
- return /* @__PURE__ */ jsxRuntime.jsx(EntityListCell, { className: cn("text-left text-neutral4", className), children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children }) });
13900
- }
13901
- function EntityListDescriptionCell({ children, className }) {
13902
- return /* @__PURE__ */ jsxRuntime.jsx(EntityListCell, { className: cn("text-neutral2", className), children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children }) });
13903
- }
13904
-
13905
- function EntityListNoMatch({ message = "Nothing matches your search", className }) {
13906
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("col-span-full flex flex-col items-center justify-center gap-2 py-12 text-neutral3", className), children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-ui-md", children: message }) });
13907
- }
13908
-
13909
- function EntityListPagination({ currentPage, hasMore, onNextPage, onPrevPage }) {
13910
- const showNavigation = typeof currentPage === "number" && currentPage > 0 || hasMore;
13911
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("col-span-full flex items-center justify-center gap-8 pt-6 pb-4 text-ui-md text-neutral3"), children: [
13912
- /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
13913
- "Page ",
13914
- /* @__PURE__ */ jsxRuntime.jsx("b", { children: currentPage ? currentPage + 1 : "1" })
13915
- ] }),
13916
- showNavigation && /* @__PURE__ */ jsxRuntime.jsxs(
13917
- "div",
13918
- {
13919
- className: cn(
13920
- "flex gap-4",
13921
- "[&>button]:flex [&>button]:items-center [&>button]:gap-2 [&>button]:text-neutral4 [&>button:hover]:text-neutral5 [&>button]:transition-colors [&>button]:border [&>button]:border-border1 [&>button]:p-1 [&>button]:px-2 [&>button]:rounded-md",
13922
- "[&_svg]:w-[1em] [&_svg]:h-[1em] [&_svg]:text-neutral3"
13923
- ),
13924
- children: [
13925
- typeof currentPage === "number" && currentPage > 0 && /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", onClick: onPrevPage, children: [
13926
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowLeftIcon, {}),
13927
- "Previous"
13928
- ] }),
13929
- hasMore && /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", onClick: onNextPage, children: [
13930
- "Next",
13931
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowRightIcon, {})
13932
- ] })
13933
- ]
13934
- }
13935
- )
13936
- ] });
13937
- }
13938
-
13939
- function EntityListRoot({ children, columns, className }) {
13940
- return /* @__PURE__ */ jsxRuntime.jsx(
13941
- "div",
13942
- {
13943
- className: cn(
13944
- "grid bg-surface2 border h-full border-border1 rounded-xl overflow-y-auto content-start",
13945
- className
13946
- ),
13947
- style: { gridTemplateColumns: columns },
13948
- children
13949
- }
13950
- );
13951
- }
13952
-
13953
- function EntityListRow({ children, className, onClick, selected }) {
13954
- return /* @__PURE__ */ jsxRuntime.jsx(
13955
- "div",
13956
- {
13957
- role: onClick ? "button" : void 0,
13958
- tabIndex: onClick ? 0 : void 0,
13959
- onClick,
13960
- onKeyDown: onClick ? (e) => {
13961
- if (e.currentTarget !== e.target) return;
13962
- if (e.key === "Enter" || e.key === " ") {
13963
- e.preventDefault();
13964
- onClick();
13965
- }
13966
- } : void 0,
13967
- className: cn(
13968
- "entity-list-row grid grid-cols-subgrid gap-6 lg:gap-8 xl:gap-10 2xl:gap-12 3xl:gap-14 col-span-full cursor-pointer border-y border-b-border1 border-t-transparent px-5",
13969
- "hover:bg-surface4 hover:border-transparent focus-within:bg-surface4 focus-within:border-transparent focus-within:ring-1 focus-within:ring-inset focus-within:ring-accent1",
13970
- "[.entity-list-row:hover+&]:border-t-transparent [.entity-list-row:focus-within+&]:border-t-transparent",
13971
- "transition-colors duration-200 rounded-lg",
13972
- selected && "bg-surface4 border-transparent",
13973
- className
13974
- ),
13975
- children
13976
- }
13977
- );
13978
- }
13979
-
13980
- function EntityListRowLink({ children, to, className, LinkComponent: Link }) {
13981
- return /* @__PURE__ */ jsxRuntime.jsx(
13982
- Link,
13983
- {
13984
- href: to,
13985
- className: cn(
13986
- "entity-list-row grid grid-cols-subgrid gap-6 lg:gap-8 xl:gap-10 2xl:gap-12 3xl:gap-14 col-span-full px-5 outline-hidden cursor-pointer border-y border-b-border1 border-t-transparent",
13987
- "hover:bg-surface4 hover:border-transparent focus-within:bg-surface4 focus-within:border-transparent focus-within:ring-1 focus-within:ring-inset focus-within:ring-accent1",
13988
- "[.entity-list-row:hover+&]:border-t-transparent [.entity-list-row:focus-within+&]:border-t-transparent",
13989
- "transition-colors duration-200 rounded-lg",
13990
- className
13991
- ),
13992
- children
13993
- }
13994
- );
13995
- }
13996
-
13997
- function EntityListRows({ children, className }) {
13998
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("grid grid-cols-subgrid col-span-full overflow-y-auto p-1", className), children });
13999
- }
14000
-
14001
- function EntityListTop({ children, className }) {
14002
- return /* @__PURE__ */ jsxRuntime.jsx(
14003
- "div",
14004
- {
14005
- className: cn(
14006
- "grid grid-cols-subgrid gap-6 lg:gap-8 xl:gap-10 2xl:gap-12 3xl:gap-14 col-span-full border-b border-border1 px-4 bg-surface2 sticky top-0 z-10",
14007
- className
14008
- ),
14009
- children
14010
- }
14011
- );
14012
- }
14013
-
14014
- const EntityListTopCell = React.forwardRef(({ children, className }, ref) => {
14015
- return /* @__PURE__ */ jsxRuntime.jsx(
14016
- "span",
14017
- {
14018
- ref,
14019
- className: cn(
14020
- "h-8 py-1 flex items-center uppercase whitespace-nowrap text-neutral2 tracking-widest text-ui-xs",
14021
- className
14022
- ),
14023
- children
14024
- }
14025
- );
14026
- });
14027
- function EntityListTopCellWithTooltip({ children, tooltip, className }) {
14028
- return /* @__PURE__ */ jsxRuntime.jsxs(Tooltip, { children: [
14029
- /* @__PURE__ */ jsxRuntime.jsx(TooltipTrigger, { children: /* @__PURE__ */ jsxRuntime.jsx(EntityListTopCell, { className, children }) }),
14030
- /* @__PURE__ */ jsxRuntime.jsx(TooltipContent, { children: tooltip })
14031
- ] });
14032
- }
14033
- const breakpointClasses = {
14034
- sm: { show: "hidden sm:inline-flex", hide: "inline-flex sm:hidden" },
14035
- md: { show: "hidden md:inline-flex", hide: "inline-flex md:hidden" },
14036
- lg: { show: "hidden lg:inline-flex", hide: "inline-flex lg:hidden" },
14037
- xl: { show: "hidden xl:inline-flex", hide: "inline-flex xl:hidden" },
14038
- "2xl": { show: "hidden 2xl:inline-flex", hide: "inline-flex 2xl:hidden" }
14039
- };
14040
- function EntityListTopCellSmart({
14041
- long,
14042
- short,
14043
- tooltip,
14044
- breakpoint = "2xl",
14045
- className
14046
- }) {
14047
- const tooltipText = tooltip ?? (typeof long === "string" ? long : void 0);
14048
- const bp = breakpointClasses[breakpoint];
14049
- const content = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
14050
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("items-center gap-1", bp.show), children: long }),
14051
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("items-center gap-1", bp.hide), children: short })
14052
- ] });
14053
- if (tooltipText) {
14054
- return /* @__PURE__ */ jsxRuntime.jsx(
14055
- EntityListTopCellWithTooltip,
14056
- {
14057
- tooltip: tooltipText,
14058
- className: cn("flex [&_svg]:w-[1.3em] [&_svg]:h-[1.3em]", className),
14059
- children: content
14060
- }
14061
- );
14062
- }
14063
- return /* @__PURE__ */ jsxRuntime.jsx(EntityListTopCell, { className: cn("flex [&_svg]:w-[1.3em] [&_svg]:h-[1.3em]", className), children: content });
14064
- }
14065
-
14066
- const EntityList = Object.assign(EntityListRoot, {
14067
- Top: EntityListTop,
14068
- TopCell: EntityListTopCell,
14069
- TopCellWithTooltip: EntityListTopCellWithTooltip,
14070
- TopCellSmart: EntityListTopCellSmart,
14071
- Rows: EntityListRows,
14072
- Row: EntityListRow,
14073
- RowLink: EntityListRowLink,
14074
- Cell: EntityListCell,
14075
- TextCell: EntityListTextCell,
14076
- NameCell: EntityListNameCell,
14077
- DescriptionCell: EntityListDescriptionCell,
14078
- NoMatch: EntityListNoMatch,
14079
- Pagination: EntityListPagination
14080
- });
14081
-
14082
- const widths = ["75%", "50%", "65%", "90%", "60%", "80%"];
14083
- function EntityListSkeleton({ columns, numberOfRows = 3 }) {
14084
- const columnParts = columns.trim().split(/\s+/);
14085
- const columnCount = columnParts.length;
14086
- const skeletonColumns = columnParts.map((col) => col === "auto" ? "minmax(6rem, auto)" : col).join(" ");
14087
- const getPseudoRandomWidth = (rowIdx, colIdx) => {
14088
- const index = (rowIdx + colIdx + columnCount + numberOfRows) % widths.length;
14089
- return widths[index];
14090
- };
14091
- return /* @__PURE__ */ jsxRuntime.jsx(EntityListRoot, { columns: skeletonColumns, children: Array.from({ length: numberOfRows }).map((_, rowIdx) => /* @__PURE__ */ jsxRuntime.jsx(
14092
- "div",
14093
- {
14094
- className: "entity-list-row grid grid-cols-subgrid gap-6 lg:gap-8 xl:gap-10 2xl:gap-12 3xl:gap-14 col-span-full px-5 border-y border-b-border1 border-t-transparent transition-colors duration-200 rounded-lg",
14095
- children: Array.from({ length: columnCount }).map((_2, colIdx) => /* @__PURE__ */ jsxRuntime.jsx(EntityListCell, { children: /* @__PURE__ */ jsxRuntime.jsx(
14096
- "div",
14097
- {
14098
- className: "bg-surface4 rounded-md animate-pulse text-transparent h-4 select-none",
14099
- style: { width: getPseudoRandomWidth(rowIdx, colIdx) }
14100
- }
14101
- ) }, colIdx))
14102
- },
14103
- rowIdx
14104
- )) });
14105
- }
14106
-
14107
13892
  const LEVEL_CONFIG = {
14108
13893
  debug: { label: "DEBUG", color: "#71717a" },
14109
13894
  info: { label: "INFO", color: "#60a5fa" },
@@ -14172,31 +13957,6 @@ const LogsDataList = Object.assign(DataListRoot, {
14172
13957
  NextPageLoading: DataListNextPageLoading
14173
13958
  });
14174
13959
 
14175
- function EntityListPageLayoutRoot({ children, className }) {
14176
- const pageHeading = usePageHeading();
14177
- return /* @__PURE__ */ jsxRuntime.jsxs(
14178
- "main",
14179
- {
14180
- className: cn(
14181
- "w-full h-full overflow-hidden grid grid-rows-[auto_auto] max-w-[110rem] px-10 mx-auto gap-4 py-6 content-start",
14182
- className
14183
- ),
14184
- children: [
14185
- pageHeading && /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "sr-only", children: pageHeading }),
14186
- children
14187
- ]
14188
- }
14189
- );
14190
- }
14191
-
14192
- function EntityListPageLayoutTop({ children, className }) {
14193
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("grid gap-4", className), children });
14194
- }
14195
-
14196
- const EntityListPageLayout = Object.assign(EntityListPageLayoutRoot, {
14197
- Top: EntityListPageLayoutTop
14198
- });
14199
-
14200
13960
  function PageLayoutColumn({ children, className }) {
14201
13961
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("grid content-start", className), children });
14202
13962
  }
@@ -22473,9 +22233,6 @@ exports.EntityContent = EntityContent;
22473
22233
  exports.EntityDescription = EntityDescription;
22474
22234
  exports.EntityHeader = EntityHeader;
22475
22235
  exports.EntityIcon = EntityIcon;
22476
- exports.EntityList = EntityList;
22477
- exports.EntityListPageLayout = EntityListPageLayout;
22478
- exports.EntityListSkeleton = EntityListSkeleton;
22479
22236
  exports.EntityName = EntityName;
22480
22237
  exports.Entry = Entry;
22481
22238
  exports.EntryCell = EntryCell;