@ai-matrx/design-system 0.61.21 → 0.61.23

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.js CHANGED
@@ -393,6 +393,7 @@ function findPillViolation(el, maxWidth = PILL_MAX_WIDTH_PX) {
393
393
  if (lines > 1) {
394
394
  return `pill wraps to ${lines} lines holding "${describe(el)}" \u2014 a pill is one line: clamp it (Badge, or truncate + max-w + title) or render a list row.`;
395
395
  }
396
+ if (Math.abs(rect.width - rect.height) < 1) return null;
396
397
  const slack = stretchSlack(el, own, cs, rect.width, view);
397
398
  if (slack !== null && slack > PILL_STRETCH_TOLERANCE_PX) {
398
399
  return `pill is stretched: ${Math.round(slack)}px of empty capsule beside "${describe(el)}" \u2014 a pill hugs its label; stop the parent stretching it (a grid cell: justify-self-start; drop w-full / flex-1), or render a full-width tappable item as a row, never a pill.`;