@mastra/playground-ui 5.1.5 → 5.1.6-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.es.js CHANGED
@@ -534,13 +534,13 @@ const arbitraryVariableRegex = /^\((?:(\w[\w-]*):)?(.+)\)$/i;
534
534
  const fractionRegex = /^\d+\/\d+$/;
535
535
  const tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/;
536
536
  const lengthUnitRegex = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/;
537
- const colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/;
537
+ const colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/;
538
538
  // Shadow always begins with x and y offset separated by underscore optionally prepended by inset
539
539
  const shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;
540
540
  const imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;
541
541
  const isFraction = value => fractionRegex.test(value);
542
- const isNumber = value => Boolean(value) && !Number.isNaN(Number(value));
543
- const isInteger = value => Boolean(value) && Number.isInteger(Number(value));
542
+ const isNumber = value => !!value && !Number.isNaN(Number(value));
543
+ const isInteger = value => !!value && Number.isInteger(Number(value));
544
544
  const isPercent = value => value.endsWith('%') && isNumber(value.slice(0, -1));
545
545
  const isTshirtSize = value => tshirtUnitRegex.test(value);
546
546
  const isAny = () => true;
@@ -559,7 +559,7 @@ const isArbitraryLength = value => getIsArbitraryValue(value, isLabelLength, isL
559
559
  const isArbitraryNumber = value => getIsArbitraryValue(value, isLabelNumber, isNumber);
560
560
  const isArbitraryPosition = value => getIsArbitraryValue(value, isLabelPosition, isNever);
561
561
  const isArbitraryImage = value => getIsArbitraryValue(value, isLabelImage, isImage);
562
- const isArbitraryShadow = value => getIsArbitraryValue(value, isNever, isShadow);
562
+ const isArbitraryShadow = value => getIsArbitraryValue(value, isLabelShadow, isShadow);
563
563
  const isArbitraryVariable = value => arbitraryVariableRegex.test(value);
564
564
  const isArbitraryVariableLength = value => getIsArbitraryVariable(value, isLabelLength);
565
565
  const isArbitraryVariableFamilyName = value => getIsArbitraryVariable(value, isLabelFamilyName);
@@ -589,11 +589,9 @@ const getIsArbitraryVariable = (value, testLabel, shouldMatchNoLabel = false) =>
589
589
  return false;
590
590
  };
591
591
  // Labels
592
- const isLabelPosition = label => label === 'position';
593
- const imageLabels = /*#__PURE__*/new Set(['image', 'url']);
594
- const isLabelImage = label => imageLabels.has(label);
595
- const sizeLabels = /*#__PURE__*/new Set(['length', 'size', 'percentage']);
596
- const isLabelSize = label => sizeLabels.has(label);
592
+ const isLabelPosition = label => label === 'position' || label === 'percentage';
593
+ const isLabelImage = label => label === 'image' || label === 'url';
594
+ const isLabelSize = label => label === 'length' || label === 'size' || label === 'bg-size';
597
595
  const isLabelLength = label => label === 'length';
598
596
  const isLabelNumber = label => label === 'number';
599
597
  const isLabelFamilyName = label => label === 'family-name';
@@ -616,6 +614,7 @@ const getDefaultConfig = () => {
616
614
  const themeRadius = fromTheme('radius');
617
615
  const themeShadow = fromTheme('shadow');
618
616
  const themeInsetShadow = fromTheme('inset-shadow');
617
+ const themeTextShadow = fromTheme('text-shadow');
619
618
  const themeDropShadow = fromTheme('drop-shadow');
620
619
  const themeBlur = fromTheme('blur');
621
620
  const themePerspective = fromTheme('perspective');
@@ -630,7 +629,16 @@ const getDefaultConfig = () => {
630
629
  */
631
630
  /***/
632
631
  const scaleBreak = () => ['auto', 'avoid', 'all', 'avoid-page', 'page', 'left', 'right', 'column'];
633
- const scalePosition = () => ['bottom', 'center', 'left', 'left-bottom', 'left-top', 'right', 'right-bottom', 'right-top', 'top'];
632
+ const scalePosition = () => ['center', 'top', 'bottom', 'left', 'right', 'top-left',
633
+ // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
634
+ 'left-top', 'top-right',
635
+ // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
636
+ 'right-top', 'bottom-right',
637
+ // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
638
+ 'right-bottom', 'bottom-left',
639
+ // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
640
+ 'left-bottom'];
641
+ const scalePositionWithArbitrary = () => [...scalePosition(), isArbitraryVariable, isArbitraryValue];
634
642
  const scaleOverflow = () => ['auto', 'hidden', 'clip', 'visible', 'scroll'];
635
643
  const scaleOverscroll = () => ['auto', 'contain', 'none'];
636
644
  const scaleUnambiguousSpacing = () => [isArbitraryVariable, isArbitraryValue, themeSpacing];
@@ -638,25 +646,34 @@ const getDefaultConfig = () => {
638
646
  const scaleGridTemplateColsRows = () => [isInteger, 'none', 'subgrid', isArbitraryVariable, isArbitraryValue];
639
647
  const scaleGridColRowStartAndEnd = () => ['auto', {
640
648
  span: ['full', isInteger, isArbitraryVariable, isArbitraryValue]
641
- }, isArbitraryVariable, isArbitraryValue];
649
+ }, isInteger, isArbitraryVariable, isArbitraryValue];
642
650
  const scaleGridColRowStartOrEnd = () => [isInteger, 'auto', isArbitraryVariable, isArbitraryValue];
643
651
  const scaleGridAutoColsRows = () => ['auto', 'min', 'max', 'fr', isArbitraryVariable, isArbitraryValue];
644
- const scaleAlignPrimaryAxis = () => ['start', 'end', 'center', 'between', 'around', 'evenly', 'stretch', 'baseline'];
645
- const scaleAlignSecondaryAxis = () => ['start', 'end', 'center', 'stretch'];
652
+ const scaleAlignPrimaryAxis = () => ['start', 'end', 'center', 'between', 'around', 'evenly', 'stretch', 'baseline', 'center-safe', 'end-safe'];
653
+ const scaleAlignSecondaryAxis = () => ['start', 'end', 'center', 'stretch', 'center-safe', 'end-safe'];
646
654
  const scaleMargin = () => ['auto', ...scaleUnambiguousSpacing()];
647
655
  const scaleSizing = () => [isFraction, 'auto', 'full', 'dvw', 'dvh', 'lvw', 'lvh', 'svw', 'svh', 'min', 'max', 'fit', ...scaleUnambiguousSpacing()];
648
656
  const scaleColor = () => [themeColor, isArbitraryVariable, isArbitraryValue];
649
- const scaleGradientStopPosition = () => [isPercent, isArbitraryLength];
657
+ const scaleBgPosition = () => [...scalePosition(), isArbitraryVariablePosition, isArbitraryPosition, {
658
+ position: [isArbitraryVariable, isArbitraryValue]
659
+ }];
660
+ const scaleBgRepeat = () => ['no-repeat', {
661
+ repeat: ['', 'x', 'y', 'space', 'round']
662
+ }];
663
+ const scaleBgSize = () => ['auto', 'cover', 'contain', isArbitraryVariableSize, isArbitrarySize, {
664
+ size: [isArbitraryVariable, isArbitraryValue]
665
+ }];
666
+ const scaleGradientStopPosition = () => [isPercent, isArbitraryVariableLength, isArbitraryLength];
650
667
  const scaleRadius = () => [
651
668
  // Deprecated since Tailwind CSS v4.0.0
652
669
  '', 'none', 'full', themeRadius, isArbitraryVariable, isArbitraryValue];
653
670
  const scaleBorderWidth = () => ['', isNumber, isArbitraryVariableLength, isArbitraryLength];
654
671
  const scaleLineStyle = () => ['solid', 'dashed', 'dotted', 'double'];
655
672
  const scaleBlendMode = () => ['normal', 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity'];
673
+ const scaleMaskImagePosition = () => [isNumber, isPercent, isArbitraryVariablePosition, isArbitraryPosition];
656
674
  const scaleBlur = () => [
657
675
  // Deprecated since Tailwind CSS v4.0.0
658
676
  '', 'none', themeBlur, isArbitraryVariable, isArbitraryValue];
659
- const scaleOrigin = () => ['center', 'top', 'top-right', 'right', 'bottom-right', 'bottom', 'bottom-left', 'left', 'top-left', isArbitraryVariable, isArbitraryValue];
660
677
  const scaleRotate = () => ['none', isNumber, isArbitraryVariable, isArbitraryValue];
661
678
  const scaleScale = () => ['none', isNumber, isArbitraryVariable, isArbitraryValue];
662
679
  const scaleSkew = () => [isNumber, isArbitraryVariable, isArbitraryValue];
@@ -681,6 +698,7 @@ const getDefaultConfig = () => {
681
698
  shadow: [isTshirtSize],
682
699
  spacing: ['px', isNumber],
683
700
  text: [isTshirtSize],
701
+ 'text-shadow': [isTshirtSize],
684
702
  tracking: ['tighter', 'tight', 'normal', 'wide', 'wider', 'widest']
685
703
  },
686
704
  classGroups: {
@@ -783,7 +801,7 @@ const getDefaultConfig = () => {
783
801
  * @see https://tailwindcss.com/docs/object-position
784
802
  */
785
803
  'object-position': [{
786
- object: [...scalePosition(), isArbitraryValue, isArbitraryVariable]
804
+ object: scalePositionWithArbitrary()
787
805
  }],
788
806
  /**
789
807
  * Overflow
@@ -1090,14 +1108,18 @@ const getDefaultConfig = () => {
1090
1108
  * @see https://tailwindcss.com/docs/align-items
1091
1109
  */
1092
1110
  'align-items': [{
1093
- items: [...scaleAlignSecondaryAxis(), 'baseline']
1111
+ items: [...scaleAlignSecondaryAxis(), {
1112
+ baseline: ['', 'last']
1113
+ }]
1094
1114
  }],
1095
1115
  /**
1096
1116
  * Align Self
1097
1117
  * @see https://tailwindcss.com/docs/align-self
1098
1118
  */
1099
1119
  'align-self': [{
1100
- self: ['auto', ...scaleAlignSecondaryAxis(), 'baseline']
1120
+ self: ['auto', ...scaleAlignSecondaryAxis(), {
1121
+ baseline: ['', 'last']
1122
+ }]
1101
1123
  }],
1102
1124
  /**
1103
1125
  * Place Content
@@ -1312,21 +1334,21 @@ const getDefaultConfig = () => {
1312
1334
  * @see https://tailwindcss.com/docs/height
1313
1335
  */
1314
1336
  h: [{
1315
- h: ['screen', ...scaleSizing()]
1337
+ h: ['screen', 'lh', ...scaleSizing()]
1316
1338
  }],
1317
1339
  /**
1318
1340
  * Min-Height
1319
1341
  * @see https://tailwindcss.com/docs/min-height
1320
1342
  */
1321
1343
  'min-h': [{
1322
- 'min-h': ['screen', 'none', ...scaleSizing()]
1344
+ 'min-h': ['screen', 'lh', 'none', ...scaleSizing()]
1323
1345
  }],
1324
1346
  /**
1325
1347
  * Max-Height
1326
1348
  * @see https://tailwindcss.com/docs/max-height
1327
1349
  */
1328
1350
  'max-h': [{
1329
- 'max-h': ['screen', ...scaleSizing()]
1351
+ 'max-h': ['screen', 'lh', ...scaleSizing()]
1330
1352
  }],
1331
1353
  // ------------------
1332
1354
  // --- Typography ---
@@ -1542,6 +1564,13 @@ const getDefaultConfig = () => {
1542
1564
  break: [{
1543
1565
  break: ['normal', 'words', 'all', 'keep']
1544
1566
  }],
1567
+ /**
1568
+ * Overflow Wrap
1569
+ * @see https://tailwindcss.com/docs/overflow-wrap
1570
+ */
1571
+ wrap: [{
1572
+ wrap: ['break-word', 'anywhere', 'normal']
1573
+ }],
1545
1574
  /**
1546
1575
  * Hyphens
1547
1576
  * @see https://tailwindcss.com/docs/hyphens
@@ -1585,23 +1614,21 @@ const getDefaultConfig = () => {
1585
1614
  * @see https://tailwindcss.com/docs/background-position
1586
1615
  */
1587
1616
  'bg-position': [{
1588
- bg: [...scalePosition(), isArbitraryVariablePosition, isArbitraryPosition]
1617
+ bg: scaleBgPosition()
1589
1618
  }],
1590
1619
  /**
1591
1620
  * Background Repeat
1592
1621
  * @see https://tailwindcss.com/docs/background-repeat
1593
1622
  */
1594
1623
  'bg-repeat': [{
1595
- bg: ['no-repeat', {
1596
- repeat: ['', 'x', 'y', 'space', 'round']
1597
- }]
1624
+ bg: scaleBgRepeat()
1598
1625
  }],
1599
1626
  /**
1600
1627
  * Background Size
1601
1628
  * @see https://tailwindcss.com/docs/background-size
1602
1629
  */
1603
1630
  'bg-size': [{
1604
- bg: ['auto', 'cover', 'contain', isArbitraryVariableSize, isArbitrarySize]
1631
+ bg: scaleBgSize()
1605
1632
  }],
1606
1633
  /**
1607
1634
  * Background Image
@@ -1970,7 +1997,7 @@ const getDefaultConfig = () => {
1970
1997
  * @see https://tailwindcss.com/docs/outline-color
1971
1998
  */
1972
1999
  'outline-color': [{
1973
- outline: [themeColor]
2000
+ outline: scaleColor()
1974
2001
  }],
1975
2002
  // ---------------
1976
2003
  // --- Effects ---
@@ -1996,7 +2023,7 @@ const getDefaultConfig = () => {
1996
2023
  * @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-shadow
1997
2024
  */
1998
2025
  'inset-shadow': [{
1999
- 'inset-shadow': ['none', isArbitraryVariable, isArbitraryValue, themeInsetShadow]
2026
+ 'inset-shadow': ['none', themeInsetShadow, isArbitraryVariableShadow, isArbitraryShadow]
2000
2027
  }],
2001
2028
  /**
2002
2029
  * Inset Box Shadow Color
@@ -2058,6 +2085,20 @@ const getDefaultConfig = () => {
2058
2085
  'inset-ring-color': [{
2059
2086
  'inset-ring': scaleColor()
2060
2087
  }],
2088
+ /**
2089
+ * Text Shadow
2090
+ * @see https://tailwindcss.com/docs/text-shadow
2091
+ */
2092
+ 'text-shadow': [{
2093
+ 'text-shadow': ['none', themeTextShadow, isArbitraryVariableShadow, isArbitraryShadow]
2094
+ }],
2095
+ /**
2096
+ * Text Shadow Color
2097
+ * @see https://tailwindcss.com/docs/text-shadow#setting-the-shadow-color
2098
+ */
2099
+ 'text-shadow-color': [{
2100
+ 'text-shadow': scaleColor()
2101
+ }],
2061
2102
  /**
2062
2103
  * Opacity
2063
2104
  * @see https://tailwindcss.com/docs/opacity
@@ -2079,6 +2120,202 @@ const getDefaultConfig = () => {
2079
2120
  'bg-blend': [{
2080
2121
  'bg-blend': scaleBlendMode()
2081
2122
  }],
2123
+ /**
2124
+ * Mask Clip
2125
+ * @see https://tailwindcss.com/docs/mask-clip
2126
+ */
2127
+ 'mask-clip': [{
2128
+ 'mask-clip': ['border', 'padding', 'content', 'fill', 'stroke', 'view']
2129
+ }, 'mask-no-clip'],
2130
+ /**
2131
+ * Mask Composite
2132
+ * @see https://tailwindcss.com/docs/mask-composite
2133
+ */
2134
+ 'mask-composite': [{
2135
+ mask: ['add', 'subtract', 'intersect', 'exclude']
2136
+ }],
2137
+ /**
2138
+ * Mask Image
2139
+ * @see https://tailwindcss.com/docs/mask-image
2140
+ */
2141
+ 'mask-image-linear-pos': [{
2142
+ 'mask-linear': [isNumber]
2143
+ }],
2144
+ 'mask-image-linear-from-pos': [{
2145
+ 'mask-linear-from': scaleMaskImagePosition()
2146
+ }],
2147
+ 'mask-image-linear-to-pos': [{
2148
+ 'mask-linear-to': scaleMaskImagePosition()
2149
+ }],
2150
+ 'mask-image-linear-from-color': [{
2151
+ 'mask-linear-from': scaleColor()
2152
+ }],
2153
+ 'mask-image-linear-to-color': [{
2154
+ 'mask-linear-to': scaleColor()
2155
+ }],
2156
+ 'mask-image-t-from-pos': [{
2157
+ 'mask-t-from': scaleMaskImagePosition()
2158
+ }],
2159
+ 'mask-image-t-to-pos': [{
2160
+ 'mask-t-to': scaleMaskImagePosition()
2161
+ }],
2162
+ 'mask-image-t-from-color': [{
2163
+ 'mask-t-from': scaleColor()
2164
+ }],
2165
+ 'mask-image-t-to-color': [{
2166
+ 'mask-t-to': scaleColor()
2167
+ }],
2168
+ 'mask-image-r-from-pos': [{
2169
+ 'mask-r-from': scaleMaskImagePosition()
2170
+ }],
2171
+ 'mask-image-r-to-pos': [{
2172
+ 'mask-r-to': scaleMaskImagePosition()
2173
+ }],
2174
+ 'mask-image-r-from-color': [{
2175
+ 'mask-r-from': scaleColor()
2176
+ }],
2177
+ 'mask-image-r-to-color': [{
2178
+ 'mask-r-to': scaleColor()
2179
+ }],
2180
+ 'mask-image-b-from-pos': [{
2181
+ 'mask-b-from': scaleMaskImagePosition()
2182
+ }],
2183
+ 'mask-image-b-to-pos': [{
2184
+ 'mask-b-to': scaleMaskImagePosition()
2185
+ }],
2186
+ 'mask-image-b-from-color': [{
2187
+ 'mask-b-from': scaleColor()
2188
+ }],
2189
+ 'mask-image-b-to-color': [{
2190
+ 'mask-b-to': scaleColor()
2191
+ }],
2192
+ 'mask-image-l-from-pos': [{
2193
+ 'mask-l-from': scaleMaskImagePosition()
2194
+ }],
2195
+ 'mask-image-l-to-pos': [{
2196
+ 'mask-l-to': scaleMaskImagePosition()
2197
+ }],
2198
+ 'mask-image-l-from-color': [{
2199
+ 'mask-l-from': scaleColor()
2200
+ }],
2201
+ 'mask-image-l-to-color': [{
2202
+ 'mask-l-to': scaleColor()
2203
+ }],
2204
+ 'mask-image-x-from-pos': [{
2205
+ 'mask-x-from': scaleMaskImagePosition()
2206
+ }],
2207
+ 'mask-image-x-to-pos': [{
2208
+ 'mask-x-to': scaleMaskImagePosition()
2209
+ }],
2210
+ 'mask-image-x-from-color': [{
2211
+ 'mask-x-from': scaleColor()
2212
+ }],
2213
+ 'mask-image-x-to-color': [{
2214
+ 'mask-x-to': scaleColor()
2215
+ }],
2216
+ 'mask-image-y-from-pos': [{
2217
+ 'mask-y-from': scaleMaskImagePosition()
2218
+ }],
2219
+ 'mask-image-y-to-pos': [{
2220
+ 'mask-y-to': scaleMaskImagePosition()
2221
+ }],
2222
+ 'mask-image-y-from-color': [{
2223
+ 'mask-y-from': scaleColor()
2224
+ }],
2225
+ 'mask-image-y-to-color': [{
2226
+ 'mask-y-to': scaleColor()
2227
+ }],
2228
+ 'mask-image-radial': [{
2229
+ 'mask-radial': [isArbitraryVariable, isArbitraryValue]
2230
+ }],
2231
+ 'mask-image-radial-from-pos': [{
2232
+ 'mask-radial-from': scaleMaskImagePosition()
2233
+ }],
2234
+ 'mask-image-radial-to-pos': [{
2235
+ 'mask-radial-to': scaleMaskImagePosition()
2236
+ }],
2237
+ 'mask-image-radial-from-color': [{
2238
+ 'mask-radial-from': scaleColor()
2239
+ }],
2240
+ 'mask-image-radial-to-color': [{
2241
+ 'mask-radial-to': scaleColor()
2242
+ }],
2243
+ 'mask-image-radial-shape': [{
2244
+ 'mask-radial': ['circle', 'ellipse']
2245
+ }],
2246
+ 'mask-image-radial-size': [{
2247
+ 'mask-radial': [{
2248
+ closest: ['side', 'corner'],
2249
+ farthest: ['side', 'corner']
2250
+ }]
2251
+ }],
2252
+ 'mask-image-radial-pos': [{
2253
+ 'mask-radial-at': scalePosition()
2254
+ }],
2255
+ 'mask-image-conic-pos': [{
2256
+ 'mask-conic': [isNumber]
2257
+ }],
2258
+ 'mask-image-conic-from-pos': [{
2259
+ 'mask-conic-from': scaleMaskImagePosition()
2260
+ }],
2261
+ 'mask-image-conic-to-pos': [{
2262
+ 'mask-conic-to': scaleMaskImagePosition()
2263
+ }],
2264
+ 'mask-image-conic-from-color': [{
2265
+ 'mask-conic-from': scaleColor()
2266
+ }],
2267
+ 'mask-image-conic-to-color': [{
2268
+ 'mask-conic-to': scaleColor()
2269
+ }],
2270
+ /**
2271
+ * Mask Mode
2272
+ * @see https://tailwindcss.com/docs/mask-mode
2273
+ */
2274
+ 'mask-mode': [{
2275
+ mask: ['alpha', 'luminance', 'match']
2276
+ }],
2277
+ /**
2278
+ * Mask Origin
2279
+ * @see https://tailwindcss.com/docs/mask-origin
2280
+ */
2281
+ 'mask-origin': [{
2282
+ 'mask-origin': ['border', 'padding', 'content', 'fill', 'stroke', 'view']
2283
+ }],
2284
+ /**
2285
+ * Mask Position
2286
+ * @see https://tailwindcss.com/docs/mask-position
2287
+ */
2288
+ 'mask-position': [{
2289
+ mask: scaleBgPosition()
2290
+ }],
2291
+ /**
2292
+ * Mask Repeat
2293
+ * @see https://tailwindcss.com/docs/mask-repeat
2294
+ */
2295
+ 'mask-repeat': [{
2296
+ mask: scaleBgRepeat()
2297
+ }],
2298
+ /**
2299
+ * Mask Size
2300
+ * @see https://tailwindcss.com/docs/mask-size
2301
+ */
2302
+ 'mask-size': [{
2303
+ mask: scaleBgSize()
2304
+ }],
2305
+ /**
2306
+ * Mask Type
2307
+ * @see https://tailwindcss.com/docs/mask-type
2308
+ */
2309
+ 'mask-type': [{
2310
+ 'mask-type': ['alpha', 'luminance']
2311
+ }],
2312
+ /**
2313
+ * Mask Image
2314
+ * @see https://tailwindcss.com/docs/mask-image
2315
+ */
2316
+ 'mask-image': [{
2317
+ mask: ['none', isArbitraryVariable, isArbitraryValue]
2318
+ }],
2082
2319
  // ---------------
2083
2320
  // --- Filters ---
2084
2321
  // ---------------
@@ -2119,7 +2356,14 @@ const getDefaultConfig = () => {
2119
2356
  'drop-shadow': [{
2120
2357
  'drop-shadow': [
2121
2358
  // Deprecated since Tailwind CSS v4.0.0
2122
- '', 'none', themeDropShadow, isArbitraryVariable, isArbitraryValue]
2359
+ '', 'none', themeDropShadow, isArbitraryVariableShadow, isArbitraryShadow]
2360
+ }],
2361
+ /**
2362
+ * Drop Shadow Color
2363
+ * @see https://tailwindcss.com/docs/filter-drop-shadow#setting-the-shadow-color
2364
+ */
2365
+ 'drop-shadow-color': [{
2366
+ 'drop-shadow': scaleColor()
2123
2367
  }],
2124
2368
  /**
2125
2369
  * Grayscale
@@ -2340,7 +2584,7 @@ const getDefaultConfig = () => {
2340
2584
  * @see https://tailwindcss.com/docs/perspective-origin
2341
2585
  */
2342
2586
  'perspective-origin': [{
2343
- 'perspective-origin': scaleOrigin()
2587
+ 'perspective-origin': scalePositionWithArbitrary()
2344
2588
  }],
2345
2589
  /**
2346
2590
  * Rotate
@@ -2436,7 +2680,7 @@ const getDefaultConfig = () => {
2436
2680
  * @see https://tailwindcss.com/docs/transform-origin
2437
2681
  */
2438
2682
  'transform-origin': [{
2439
- origin: scaleOrigin()
2683
+ origin: scalePositionWithArbitrary()
2440
2684
  }],
2441
2685
  /**
2442
2686
  * Transform Style
@@ -2804,10 +3048,10 @@ const getDefaultConfig = () => {
2804
3048
  'rounded-b': ['rounded-br', 'rounded-bl'],
2805
3049
  'rounded-l': ['rounded-tl', 'rounded-bl'],
2806
3050
  'border-spacing': ['border-spacing-x', 'border-spacing-y'],
2807
- 'border-w': ['border-w-s', 'border-w-e', 'border-w-t', 'border-w-r', 'border-w-b', 'border-w-l'],
3051
+ 'border-w': ['border-w-x', 'border-w-y', 'border-w-s', 'border-w-e', 'border-w-t', 'border-w-r', 'border-w-b', 'border-w-l'],
2808
3052
  'border-w-x': ['border-w-r', 'border-w-l'],
2809
3053
  'border-w-y': ['border-w-t', 'border-w-b'],
2810
- 'border-color': ['border-color-s', 'border-color-e', 'border-color-t', 'border-color-r', 'border-color-b', 'border-color-l'],
3054
+ 'border-color': ['border-color-x', 'border-color-y', 'border-color-s', 'border-color-e', 'border-color-t', 'border-color-r', 'border-color-b', 'border-color-l'],
2811
3055
  'border-color-x': ['border-color-r', 'border-color-l'],
2812
3056
  'border-color-y': ['border-color-t', 'border-color-b'],
2813
3057
  translate: ['translate-x', 'translate-y', 'translate-none'],
@@ -2826,7 +3070,7 @@ const getDefaultConfig = () => {
2826
3070
  conflictingClassGroupModifiers: {
2827
3071
  'font-size': ['leading']
2828
3072
  },
2829
- orderSensitiveModifiers: ['before', 'after', 'placeholder', 'file', 'marker', 'selection', 'first-line', 'first-letter', 'backdrop', '*', '**']
3073
+ orderSensitiveModifiers: ['*', '**', 'after', 'backdrop', 'before', 'details-content', 'file', 'first-letter', 'first-line', 'marker', 'placeholder', 'selection']
2830
3074
  };
2831
3075
  };
2832
3076
  const twMerge = /*#__PURE__*/createTailwindMerge(getDefaultConfig);
@@ -5153,10 +5397,6 @@ function ScoreIndicator({ score }) {
5153
5397
  return /* @__PURE__ */ jsx(Badge, { variant: "secondary", children: score.toFixed(2) });
5154
5398
  }
5155
5399
 
5156
- function Skeleton({ className, ...props }) {
5157
- return /* @__PURE__ */ jsx("div", { className: cn("animate-pulse rounded-md bg-muted/50", className), ...props });
5158
- }
5159
-
5160
5400
  const Table$1 = React.forwardRef(
5161
5401
  ({ className, ...props }, ref) => /* @__PURE__ */ jsx("table", { ref, className: cn("w-full caption-bottom text-sm border-spacing-0", className), ...props })
5162
5402
  );
@@ -5228,32 +5468,6 @@ const TabsContent = React.forwardRef(({ className, ...props }, ref) => /* @__PUR
5228
5468
  ));
5229
5469
  TabsContent.displayName = TabsPrimitive.Content.displayName;
5230
5470
 
5231
- const useEvalsByAgentId = (agentId, type) => {
5232
- const [evals, setEvals] = useState([]);
5233
- const [isLoading, setIsLoading] = useState(true);
5234
- const client = useMastraClient();
5235
- const fetchEvals = async (_agentId) => {
5236
- setIsLoading(true);
5237
- const activeAgentId = _agentId ?? agentId;
5238
- try {
5239
- const res = type === "live" ? await client.getAgent(activeAgentId).liveEvals() : await client.getAgent(activeAgentId).evals();
5240
- setEvals(res.evals);
5241
- } catch (error) {
5242
- setEvals([]);
5243
- console.error("Error fetching evals", error);
5244
- toast.error("Error fetching evals");
5245
- } finally {
5246
- setIsLoading(false);
5247
- }
5248
- };
5249
- useEffect(() => {
5250
- fetchEvals(agentId);
5251
- }, [agentId]);
5252
- return { evals, isLoading, refetchEvals: fetchEvals };
5253
- };
5254
-
5255
- const AgentEvalsContext = createContext({ handleRefresh: () => {
5256
- }, isLoading: true });
5257
5471
  const scrollableContentClass = cn(
5258
5472
  "relative overflow-y-auto overflow-x-hidden invisible hover:visible focus:visible",
5259
5473
  "[&::-webkit-scrollbar]:w-1",
@@ -5269,26 +5483,13 @@ const tabIndicatorClass = cn(
5269
5483
  "focus-visible:outline-none"
5270
5484
  );
5271
5485
  const tabContentClass = cn("data-[state=inactive]:mt-0 min-h-0 h-full grid grid-rows-[1fr]");
5272
- function AgentEvals({ agentId }) {
5486
+ function AgentEvals({ liveEvals, ciEvals, onRefetchLiveEvals, onRefetchCiEvals }) {
5273
5487
  const [activeTab, setActiveTab] = useState("live");
5274
- const {
5275
- evals: liveEvals,
5276
- isLoading: isLiveLoading,
5277
- refetchEvals: refetchLiveEvals
5278
- } = useEvalsByAgentId(agentId, "live");
5279
- const { evals: ciEvals, isLoading: isCiLoading, refetchEvals: refetchCiEvals } = useEvalsByAgentId(agentId, "ci");
5280
- const contextValue = {
5281
- handleRefresh,
5282
- isLoading: activeTab === "live" ? isLiveLoading : isCiLoading
5283
- };
5284
5488
  function handleRefresh() {
5285
- if (activeTab === "live") {
5286
- refetchLiveEvals();
5287
- } else {
5288
- refetchCiEvals();
5289
- }
5489
+ if (activeTab === "live") return onRefetchLiveEvals();
5490
+ return onRefetchCiEvals();
5290
5491
  }
5291
- return /* @__PURE__ */ jsx(AgentEvalsContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs(
5492
+ return /* @__PURE__ */ jsxs(
5292
5493
  Tabs,
5293
5494
  {
5294
5495
  value: activeTab,
@@ -5299,14 +5500,13 @@ function AgentEvals({ agentId }) {
5299
5500
  /* @__PURE__ */ jsx(TabsTrigger, { value: "live", className: tabIndicatorClass, children: "Live" }),
5300
5501
  /* @__PURE__ */ jsx(TabsTrigger, { value: "ci", className: tabIndicatorClass, children: "CI" })
5301
5502
  ] }) }),
5302
- /* @__PURE__ */ jsx(TabsContent, { value: "live", className: tabContentClass, children: /* @__PURE__ */ jsx(EvalTable, { evals: liveEvals, isCIMode: false }) }),
5303
- /* @__PURE__ */ jsx(TabsContent, { value: "ci", className: tabContentClass, children: /* @__PURE__ */ jsx(EvalTable, { evals: ciEvals, isCIMode: true }) })
5503
+ /* @__PURE__ */ jsx(TabsContent, { value: "live", className: tabContentClass, children: /* @__PURE__ */ jsx(EvalTable, { evals: liveEvals, isCIMode: false, onRefresh: handleRefresh }) }),
5504
+ /* @__PURE__ */ jsx(TabsContent, { value: "ci", className: tabContentClass, children: /* @__PURE__ */ jsx(EvalTable, { evals: ciEvals, isCIMode: true, onRefresh: handleRefresh }) })
5304
5505
  ]
5305
5506
  }
5306
- ) });
5507
+ );
5307
5508
  }
5308
- function EvalTable({ evals, isCIMode = false }) {
5309
- const { handleRefresh, isLoading: isTableLoading } = useContext(AgentEvalsContext);
5509
+ function EvalTable({ evals, isCIMode = false, onRefresh }) {
5310
5510
  const [expandedMetrics, setExpandedMetrics] = useState(/* @__PURE__ */ new Set());
5311
5511
  const [searchTerm, setSearchTerm] = useState("");
5312
5512
  const [sortConfig, setSortConfig] = useState({ field: "metricName", direction: "asc" });
@@ -5329,7 +5529,7 @@ function EvalTable({ evals, isCIMode = false }) {
5329
5529
  evals.length,
5330
5530
  " Total Evaluations"
5331
5531
  ] }),
5332
- /* @__PURE__ */ jsx(Button$1, { variant: "ghost", size: "icon", onClick: handleRefresh, disabled: isTableLoading, className: "h-9 w-9", children: isTableLoading ? /* @__PURE__ */ jsx(RefreshCcwIcon, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ jsx(RefreshCcwIcon, { className: "h-4 w-4" }) })
5532
+ /* @__PURE__ */ jsx(Button$1, { variant: "ghost", size: "icon", onClick: onRefresh, className: "h-9 w-9", children: /* @__PURE__ */ jsx(RefreshCcwIcon, { className: "h-4 w-4" }) })
5333
5533
  ] }),
5334
5534
  /* @__PURE__ */ jsx("div", { className: "overflow-auto", children: /* @__PURE__ */ jsxs(Table$1, { className: "w-full", children: [
5335
5535
  /* @__PURE__ */ jsx(TableHeader, { className: "bg-mastra-bg-2 h-[var(--table-header-height)] sticky top-0 z-10", children: /* @__PURE__ */ jsxs(TableRow, { className: "border-gray-6 border-b-[0.1px] text-[0.8125rem]", children: [
@@ -5352,13 +5552,7 @@ function EvalTable({ evals, isCIMode = false }) {
5352
5552
  ] }) }),
5353
5553
  /* @__PURE__ */ jsx(TableHead, { className: "w-48 text-mastra-el-3", children: "Evaluations" })
5354
5554
  ] }) }),
5355
- /* @__PURE__ */ jsx(TableBody, { className: "border-b border-gray-6 relative", children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", presenceAffectsLayout: false, children: isTableLoading ? Array.from({ length: 3 }).map((_, i) => /* @__PURE__ */ jsxs(TableRow, { className: "border-b-gray-6 border-b-[0.1px] text-[0.8125rem]", children: [
5356
- /* @__PURE__ */ jsx(TableCell, { className: "w-12 h-12", children: /* @__PURE__ */ jsx(Skeleton, { className: "h-8 w-8 rounded-full" }) }),
5357
- /* @__PURE__ */ jsx(TableCell, { className: "min-w-[200px] max-w-[30%]", children: /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-3/4" }) }),
5358
- /* @__PURE__ */ jsx(TableCell, { className: "flex-1", children: /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-full" }) }),
5359
- /* @__PURE__ */ jsx(TableCell, { className: "w-48", children: /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-20" }) }),
5360
- /* @__PURE__ */ jsx(TableCell, { className: "w-48", children: /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-20" }) })
5361
- ] }, i)) : groupEvals(evals).length === 0 ? /* @__PURE__ */ jsxs(TableRow, { children: [
5555
+ /* @__PURE__ */ jsx(TableBody, { className: "border-b border-gray-6 relative", children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", presenceAffectsLayout: false, children: groupEvals(evals).length === 0 ? /* @__PURE__ */ jsxs(TableRow, { children: [
5362
5556
  /* @__PURE__ */ jsx(TableCell, { className: "h-12 w-16" }),
5363
5557
  /* @__PURE__ */ jsx(TableCell, { colSpan: 4, className: "h-32 px-4 text-center text-mastra-el-3", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-2", children: [
5364
5558
  /* @__PURE__ */ jsx(Search, { className: "size-5" }),
@@ -6711,6 +6905,10 @@ function WorkflowTracesInner({ traces, error, runId, stepName }) {
6711
6905
  ] });
6712
6906
  }
6713
6907
 
6908
+ function Skeleton({ className, ...props }) {
6909
+ return /* @__PURE__ */ jsx("div", { className: cn("animate-pulse rounded-md bg-muted/50", className), ...props });
6910
+ }
6911
+
6714
6912
  const sanitizeWorkflowWatchResult = (record) => {
6715
6913
  const formattedResults = Object.entries(record.payload.workflowState.steps || {}).reduce(
6716
6914
  (acc, [key, value]) => {
@@ -6791,33 +6989,6 @@ const useLegacyWorkflow = (workflowId) => {
6791
6989
  }, [workflowId]);
6792
6990
  return { legacyWorkflow, isLoading };
6793
6991
  };
6794
- const useWorkflow = (workflowId) => {
6795
- const [workflow, setWorkflow] = useState(null);
6796
- const [isLoading, setIsLoading] = useState(true);
6797
- const client = useMastraClient();
6798
- useEffect(() => {
6799
- const fetchWorkflow = async () => {
6800
- setIsLoading(true);
6801
- try {
6802
- if (!workflowId) {
6803
- setWorkflow(null);
6804
- setIsLoading(false);
6805
- return;
6806
- }
6807
- const res = await client.getWorkflow(workflowId).details();
6808
- setWorkflow(res);
6809
- } catch (error) {
6810
- setWorkflow(null);
6811
- console.error("Error fetching workflow", error);
6812
- toast.error("Error fetching workflow");
6813
- } finally {
6814
- setIsLoading(false);
6815
- }
6816
- };
6817
- fetchWorkflow();
6818
- }, [workflowId]);
6819
- return { workflow, isLoading };
6820
- };
6821
6992
  const useExecuteWorkflow = () => {
6822
6993
  const client = useMastraClient();
6823
6994
  const createLegacyWorkflowRun = async ({ workflowId, prevRunId }) => {
@@ -9606,8 +9777,7 @@ function WorkflowGraphInner({ workflow, onShowTrace }) {
9606
9777
  ) });
9607
9778
  }
9608
9779
 
9609
- function WorkflowGraph({ workflowId, onShowTrace }) {
9610
- const { workflow, isLoading } = useWorkflow(workflowId);
9780
+ function WorkflowGraph({ workflowId, onShowTrace, workflow, isLoading }) {
9611
9781
  const { snapshot } = useContext(WorkflowRunContext);
9612
9782
  if (isLoading) {
9613
9783
  return /* @__PURE__ */ jsx("div", { className: "p-4", children: /* @__PURE__ */ jsx(Skeleton, { className: "h-full" }) });
@@ -9631,10 +9801,14 @@ function WorkflowGraph({ workflowId, onShowTrace }) {
9631
9801
  ) }) }, snapshot?.runId ?? workflowId);
9632
9802
  }
9633
9803
 
9634
- function WorkflowTrigger({ workflowId, setRunId }) {
9804
+ function WorkflowTrigger({
9805
+ workflowId,
9806
+ setRunId,
9807
+ workflow,
9808
+ isLoading
9809
+ }) {
9635
9810
  const { runtimeContext } = usePlaygroundStore();
9636
9811
  const { result, setResult, payload, setPayload } = useContext(WorkflowRunContext);
9637
- const { isLoading, workflow } = useWorkflow(workflowId);
9638
9812
  const { createWorkflowRun, startWorkflowRun } = useExecuteWorkflow();
9639
9813
  const { watchWorkflow, watchResult, isWatchingWorkflow } = useWatchWorkflow();
9640
9814
  const { resumeWorkflow, isResumingWorkflow } = useResumeWorkflow();
@@ -9677,7 +9851,8 @@ function WorkflowTrigger({ workflowId, setRunId }) {
9677
9851
  const suspended = Object.entries(watchResultToUse.payload.workflowState.steps).filter(([_, { status }]) => status === "suspended").map(([stepId, { payload: payload2 }]) => ({
9678
9852
  stepId,
9679
9853
  runId: result.runId,
9680
- suspendPayload: payload2
9854
+ suspendPayload: payload2,
9855
+ isLoading: false
9681
9856
  }));
9682
9857
  setSuspendedSteps(suspended);
9683
9858
  }, [watchResultToUse, result]);
@@ -9748,8 +9923,7 @@ function WorkflowTrigger({ workflowId, setRunId }) {
9748
9923
  stepId: step.stepId,
9749
9924
  runId: step.runId,
9750
9925
  suspendPayload: step.suspendPayload,
9751
- resumeData: data
9752
- });
9926
+ resumeData: data});
9753
9927
  }
9754
9928
  }
9755
9929
  )