@mastra/playground-ui 22.2.0-alpha.8 → 22.2.0-alpha.9

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,20 @@
1
1
  # @mastra/playground-ui
2
2
 
3
+ ## 22.2.0-alpha.9
4
+
5
+ ### Minor Changes
6
+
7
+ - Added new Logo component to the playground-ui design system. Supports two sizes (sm, md), uses currentColor for theming, and includes an optional outline-on-hover animation that respects prefers-reduced-motion. ([#15513](https://github.com/mastra-ai/mastra/pull/15513))
8
+
9
+ ### Patch Changes
10
+
11
+ - dependencies updates: ([#15525](https://github.com/mastra-ai/mastra/pull/15525))
12
+ - Updated dependency [`prettier@^3.8.3` ↗︎](https://www.npmjs.com/package/prettier/v/3.8.3) (from `^3.8.1`, in `dependencies`)
13
+ - Updated dependencies [[`16e34ca`](https://github.com/mastra-ai/mastra/commit/16e34caa98b9a114b17a6125e4e3fd87f169d0d0)]:
14
+ - @mastra/core@1.26.0-alpha.9
15
+ - @mastra/client-js@1.13.5-alpha.9
16
+ - @mastra/react@0.2.27-alpha.9
17
+
3
18
  ## 22.2.0-alpha.8
4
19
 
5
20
  ### Patch Changes
package/dist/index.cjs.js CHANGED
@@ -3386,7 +3386,7 @@ function cn(...inputs) {
3386
3386
  return twMerge(clsx(inputs));
3387
3387
  }
3388
3388
 
3389
- const sizeClasses$5 = {
3389
+ const sizeClasses$6 = {
3390
3390
  sm: `${formElementSizes.sm} text-ui-sm px-[.75em]`,
3391
3391
  md: `${formElementSizes.md} text-ui-md px-[.75em]`,
3392
3392
  default: `${formElementSizes.default} text-ui-md px-[.85em] `,
@@ -3419,7 +3419,7 @@ function resolveVariant(variant) {
3419
3419
  function buttonVariants(options) {
3420
3420
  const variant = resolveVariant(options?.variant || "default");
3421
3421
  const size = options?.size || "default";
3422
- return cn(sharedStyles, sizeClasses$5[size], variantClasses$4[variant], options?.iconOnly && "[&>svg]:opacity-75");
3422
+ return cn(sharedStyles, sizeClasses$6[size], variantClasses$4[variant], options?.iconOnly && "[&>svg]:opacity-75");
3423
3423
  }
3424
3424
  function flattenChildren(children) {
3425
3425
  const result = [];
@@ -4797,7 +4797,7 @@ const AlertDescription = ({ children, as: As = "p" }) => {
4797
4797
  return /* @__PURE__ */ jsxRuntime.jsx(Txt, { as: As, variant: "ui-sm", children });
4798
4798
  };
4799
4799
 
4800
- const sizeClasses$4 = {
4800
+ const sizeClasses$5 = {
4801
4801
  sm: "h-avatar-sm w-avatar-sm",
4802
4802
  md: "h-avatar-md w-avatar-md",
4803
4803
  lg: "h-avatar-lg w-avatar-lg"
@@ -4807,7 +4807,7 @@ const Avatar = ({ src, name, size = "sm", interactive = false }) => {
4807
4807
  "div",
4808
4808
  {
4809
4809
  className: cn(
4810
- sizeClasses$4[size],
4810
+ sizeClasses$5[size],
4811
4811
  "border border-border1 bg-surface3 shrink-0 overflow-hidden rounded-full flex items-center justify-center",
4812
4812
  transitions.all,
4813
4813
  interactive && "cursor-pointer hover:scale-105 hover:border-neutral2 hover:shadow-sm"
@@ -5622,6 +5622,59 @@ const LogoWithoutText = (props) => /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns
5622
5622
  }
5623
5623
  ) });
5624
5624
 
5625
+ const PATH_D = "M4.49805 11.6934C6.98237 11.6934 8.99609 13.7081 8.99609 16.1924C8.9959 18.6765 6.98225 20.6904 4.49805 20.6904C2.01394 20.6903 0.000196352 18.6765 0 16.1924C0 13.7081 2.01382 11.6935 4.49805 11.6934ZM10.3867 0C12.8709 0 14.8846 2.01388 14.8848 4.49805C14.8848 4.8377 14.847 5.16846 14.7755 5.48643C14.4618 6.88139 14.1953 8.4633 14.9928 9.65L16.2575 11.5319C16.3363 11.6491 16.4727 11.7115 16.6137 11.703C16.7369 11.6957 16.8525 11.6343 16.9214 11.5318L18.1876 9.64717C18.9772 8.47198 18.7236 6.90783 18.4205 5.52484C18.3523 5.21392 18.3164 4.89094 18.3164 4.55957C18.3167 2.07546 20.3313 0.0615234 22.8154 0.0615234C25.2994 0.0617476 27.3132 2.0756 27.3135 4.55957C27.3135 4.93883 27.2665 5.30712 27.178 5.65896C26.8547 6.94441 26.5817 8.37932 27.2446 9.52714L28.459 11.6301C28.4819 11.6697 28.5245 11.6934 28.5703 11.6934C31.0545 11.6935 33.0684 13.7081 33.0684 16.1924C33.0682 18.6765 31.0544 20.6903 28.5703 20.6904C26.0861 20.6904 24.0725 18.6765 24.0723 16.1924C24.0723 15.8049 24.1212 15.4288 24.2133 15.0701C24.5458 13.7746 24.8298 12.3251 24.1609 11.1668L23.0044 9.16384C22.9656 9.09659 22.8931 9.05859 22.8154 9.05859C22.7983 9.05859 22.7824 9.06614 22.7728 9.08033L21.4896 10.9895C20.686 12.1851 20.9622 13.781 21.284 15.1851C21.3582 15.5089 21.3975 15.8461 21.3975 16.1924C21.3973 18.6764 19.3834 20.6902 16.8994 20.6904C14.4152 20.6904 12.4006 18.6765 12.4004 16.1924C12.4004 15.932 12.4226 15.6768 12.4651 15.4286C12.6859 14.14 12.8459 12.7122 12.1167 11.6271L11.2419 10.3253C10.6829 9.49347 9.71913 9.05932 8.78286 8.70188C7.0906 8.05584 5.88867 6.41734 5.88867 4.49805C5.88886 2.0139 7.90254 3.29835e-05 10.3867 0Z";
5626
+ const sizeClasses$4 = {
5627
+ sm: "w-6",
5628
+ md: "w-10"
5629
+ };
5630
+ function prefersReducedMotion() {
5631
+ if (typeof window === "undefined" || !window.matchMedia) return false;
5632
+ return window.matchMedia("(prefers-reduced-motion: reduce)").matches;
5633
+ }
5634
+ function Logo({ className, size = "md", animateOnHover = false, "aria-label": ariaLabel = "Mastra" }) {
5635
+ const reactId = React.useId();
5636
+ const clipId = `logo-clip-${reactId.replace(/[^a-zA-Z0-9_-]/g, "")}`;
5637
+ const [playing, setPlaying] = React.useState(false);
5638
+ const handleMouseEnter = animateOnHover ? () => {
5639
+ if (prefersReducedMotion()) return;
5640
+ setPlaying(true);
5641
+ } : void 0;
5642
+ const handleAnimationEnd = animateOnHover && playing ? (e) => {
5643
+ if (e.animationName !== "logo-stroke-cycle") return;
5644
+ setPlaying(false);
5645
+ } : void 0;
5646
+ return /* @__PURE__ */ jsxRuntime.jsx(
5647
+ "div",
5648
+ {
5649
+ role: "img",
5650
+ "aria-label": ariaLabel,
5651
+ onMouseEnter: handleMouseEnter,
5652
+ onAnimationEnd: handleAnimationEnd,
5653
+ className: cn(
5654
+ "logo inline-block text-neutral6",
5655
+ sizeClasses$4[size],
5656
+ animateOnHover && playing && "logo-animate-on-hover",
5657
+ className
5658
+ ),
5659
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
5660
+ "svg",
5661
+ {
5662
+ xmlns: "http://www.w3.org/2000/svg",
5663
+ viewBox: "0 0 34 21",
5664
+ fill: "none",
5665
+ className: "logo-svg block w-full h-auto",
5666
+ "aria-hidden": "true",
5667
+ children: [
5668
+ /* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsx("clipPath", { id: clipId, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: PATH_D }) }) }),
5669
+ /* @__PURE__ */ jsxRuntime.jsx("path", { className: "logo-fill", d: PATH_D }),
5670
+ /* @__PURE__ */ jsxRuntime.jsx("path", { className: "logo-stroke", d: PATH_D, clipPath: `url(#${clipId})` })
5671
+ ]
5672
+ }
5673
+ )
5674
+ }
5675
+ );
5676
+ }
5677
+
5625
5678
  const rowSize = {
5626
5679
  default: "[&>tbody>tr]:h-table-row",
5627
5680
  small: "[&>tbody>tr]:h-table-row-small"
@@ -14340,6 +14393,7 @@ exports.KeyValueList = KeyValueList;
14340
14393
  exports.Label = Label;
14341
14394
  exports.LatencyIcon = LatencyIcon;
14342
14395
  exports.ListSearch = ListSearch;
14396
+ exports.Logo = Logo;
14343
14397
  exports.LogoWithoutText = LogoWithoutText;
14344
14398
  exports.LogsDataList = LogsDataList;
14345
14399
  exports.LogsDataListSkeleton = DataListSkeleton;