impeccable 3.0.0 → 3.0.1

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.
@@ -1084,9 +1084,13 @@ function checkHtmlPatterns(html) {
1084
1084
  // --- Motion ---
1085
1085
 
1086
1086
  // Bounce/elastic animation names
1087
- const bounceRe = /animation(?:-name)?\s*:\s*[^;]*\b(bounce|elastic|wobble|jiggle|spring)\b/gi;
1088
- if (bounceRe.test(html)) {
1089
- findings.push({ id: 'bounce-easing', snippet: 'Bounce/elastic animation in CSS' });
1087
+ const bounceRe = /animation(?:-name)?\s*:\s*([^;{}]*(?:bounce|elastic|wobble|jiggle|spring)[^;{}]*)/gi;
1088
+ const bounceMatch = bounceRe.exec(html);
1089
+ if (bounceMatch) {
1090
+ const animationToken = bounceMatch[1]
1091
+ .split(/[,\s]+/)
1092
+ .find((part) => /bounce|elastic|wobble|jiggle|spring/i.test(part));
1093
+ findings.push({ id: 'bounce-easing', snippet: `animation: ${animationToken || bounceMatch[1].trim()}` });
1090
1094
  }
1091
1095
 
1092
1096
  // Overshoot cubic-bezier
@@ -110,9 +110,14 @@ const REGEX_MATCHERS = [
110
110
  { id: 'bounce-easing', regex: /\banimate-bounce\b/g,
111
111
  test: () => true,
112
112
  fmt: () => 'animate-bounce (Tailwind)' },
113
- { id: 'bounce-easing', regex: /animation(?:-name)?\s*:\s*[^;]*\b(bounce|elastic|wobble|jiggle|spring)\b/gi,
113
+ { id: 'bounce-easing', regex: /animation(?:-name)?\s*:\s*([^;{}]*(?:bounce|elastic|wobble|jiggle|spring)[^;{}]*)/gi,
114
114
  test: () => true,
115
- fmt: (m) => m[0] },
115
+ fmt: (m) => {
116
+ const token = m[1]
117
+ .split(/[,\s]+/)
118
+ .find((part) => /bounce|elastic|wobble|jiggle|spring/i.test(part));
119
+ return `animation: ${token || m[1].trim()}`;
120
+ } },
116
121
  { id: 'bounce-easing', regex: /cubic-bezier\(\s*([\d.-]+)\s*,\s*([\d.-]+)\s*,\s*([\d.-]+)\s*,\s*([\d.-]+)\s*\)/g,
117
122
  test: (m) => {
118
123
  const y1 = parseFloat(m[2]), y2 = parseFloat(m[4]);
@@ -514,9 +514,13 @@ function checkHtmlPatterns(html) {
514
514
  // --- Motion ---
515
515
 
516
516
  // Bounce/elastic animation names
517
- const bounceRe = /animation(?:-name)?\s*:\s*[^;]*\b(bounce|elastic|wobble|jiggle|spring)\b/gi;
518
- if (bounceRe.test(html)) {
519
- findings.push({ id: 'bounce-easing', snippet: 'Bounce/elastic animation in CSS' });
517
+ const bounceRe = /animation(?:-name)?\s*:\s*([^;{}]*(?:bounce|elastic|wobble|jiggle|spring)[^;{}]*)/gi;
518
+ const bounceMatch = bounceRe.exec(html);
519
+ if (bounceMatch) {
520
+ const animationToken = bounceMatch[1]
521
+ .split(/[,\s]+/)
522
+ .find((part) => /bounce|elastic|wobble|jiggle|spring/i.test(part));
523
+ findings.push({ id: 'bounce-easing', snippet: `animation: ${animationToken || bounceMatch[1].trim()}` });
520
524
  }
521
525
 
522
526
  // Overshoot cubic-bezier
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impeccable",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "author": "Paul Bakaus",
5
5
  "description": "Design skills, commands, and anti-pattern detection for AI coding agents",
6
6
  "keywords": [