| 497 | const theme = resolved.theme as Record<string, Record<string, unknown>>; |
| 498 | |
| 499 | const flattenScale = (scale: Record<string, unknown> | undefined): Record<string, string> => { |
| 500 | const result: Record<string, string> = {}; |
| 501 | if (!scale) return result; |
| 502 | for (const [key, value] of Object.entries(scale)) { |
| 503 | if (typeof value === "string") { |
| 504 | result[key] = value; |
| 505 | } |
| 506 | } |
| 507 | return result; |
| 508 | }; |
| 509 | |
| 510 | // Flatten colors (may be nested like { slate: { 500: "#..." } }) |
| 511 | const flattenColors = (colors: Record<string, unknown> | undefined): Record<string, string> => { |