vibe-design-system 2.8.1 → 2.8.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vibe-design-system",
3
- "version": "2.8.1",
3
+ "version": "2.8.2",
4
4
  "description": "Auto-generate design systems for vibe coding projects",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1382,7 +1382,72 @@ function extractFoundations() {
1382
1382
  if (count < 1) continue;
1383
1383
  const name = "arbitrary-" + hex.slice(1).toLowerCase();
1384
1384
  colors[name] = { value: hex, source: "arbitrary-tailwind", frequency: count };
1385
+ existingHexValues.add(hexUpper);
1385
1386
  }
1387
+
1388
+ // ── Inline style hex renkleri (style={{ color: '#AEF33F' }}) ─────────────────
1389
+ const INLINE_STYLE_HEX = /(?:color|background(?:Color)?|borderColor|fill|stroke|outlineColor|caretColor|accentColor)\s*:\s*['"]?(#[0-9a-fA-F]{3,8})['"]?/g;
1390
+ const inlineColors = new Map();
1391
+ for (const file of allTsxFiles) {
1392
+ try {
1393
+ const content = fs.readFileSync(file, "utf-8");
1394
+ for (const match of content.matchAll(INLINE_STYLE_HEX)) {
1395
+ const hex = match[1].toUpperCase();
1396
+ inlineColors.set(hex, (inlineColors.get(hex) || 0) + 1);
1397
+ }
1398
+ } catch (_) {}
1399
+ }
1400
+ for (const [hex, count] of inlineColors) {
1401
+ if (existingHexValues.has(hex)) continue;
1402
+ const key = "inline-" + hex.slice(1).toLowerCase();
1403
+ if (!colors[key]) {
1404
+ colors[key] = { value: hex, source: "inline-style", frequency: count };
1405
+ existingHexValues.add(hex);
1406
+ }
1407
+ }
1408
+
1409
+ // ── CSS dosyalarındaki hex renkler (color: #AEF33F, --brand: #AEF33F) ────────
1410
+ const CSS_PROP_HEX = /(?:--|color|background(?:-color)?|border(?:-color)?|fill|stroke|outline(?:-color)?|accent-color|caret-color)\s*[:\s]\s*(#[0-9a-fA-F]{3,8})\b/gi;
1411
+ const CSS_VAR_HEX = /(--[\w-]+)\s*:\s*(#[0-9a-fA-F]{3,8})\b/g;
1412
+ const allCssFiles = [];
1413
+ const walkCss = (dir) => {
1414
+ if (!fs.existsSync(dir)) return;
1415
+ for (const e of fs.readdirSync(dir, { withFileTypes: true })) {
1416
+ const full = path.join(dir, e.name);
1417
+ if (e.isDirectory() && !["node_modules", "dist", ".next", "build"].includes(e.name)) walkCss(full);
1418
+ else if (e.isFile() && /\.(css|scss|sass|less)$/i.test(e.name)) allCssFiles.push(full);
1419
+ }
1420
+ };
1421
+ walkCss(SRC_DIR);
1422
+ for (const name of ["index.css", "globals.css", "styles.css"]) {
1423
+ const p = path.join(PROJECT_ROOT, name);
1424
+ if (fs.existsSync(p)) allCssFiles.push(p);
1425
+ }
1426
+ for (const file of allCssFiles) {
1427
+ try {
1428
+ const content = fs.readFileSync(file, "utf-8");
1429
+ for (const match of content.matchAll(CSS_VAR_HEX)) {
1430
+ const varName = match[1];
1431
+ const hex = match[2].toUpperCase();
1432
+ if (existingHexValues.has(hex)) continue;
1433
+ const key = varName.replace(/^--/, "css-");
1434
+ if (!colors[key]) {
1435
+ colors[key] = { value: hex, source: "css-variable", cssVar: varName };
1436
+ existingHexValues.add(hex);
1437
+ }
1438
+ }
1439
+ for (const match of content.matchAll(CSS_PROP_HEX)) {
1440
+ const hex = match[1].toUpperCase();
1441
+ if (existingHexValues.has(hex)) continue;
1442
+ const key = "css-" + hex.slice(1).toLowerCase();
1443
+ if (!colors[key]) {
1444
+ colors[key] = { value: hex, source: "css-file", file: path.relative(PROJECT_ROOT, file) };
1445
+ existingHexValues.add(hex);
1446
+ }
1447
+ }
1448
+ } catch (_) {}
1449
+ }
1450
+
1386
1451
  // ── FALLBACK 2: Google Fonts URL ──────────────────────────
1387
1452
  const GFONTS_PATTERN = /family=([A-Za-z+]+)(?::.*?)?(?:&|$)/g;
1388
1453
  const fontFileCandidates = [