Files
Claude-Code-Workflow/tailwind-tokens.js
catlog22 28c93a0001 refactor: v4.0.2 - Complete UI design workflow refactoring
BREAKING CHANGES:
- Command paths: /workflow:design:* → /workflow:ui-design:*
- Removed --tool parameter from all commands
- Pure Claude execution, zero external tool dependencies

Major Changes:
- style-extract: Single-pass Claude analysis (1 file vs 4+)
- style-consolidate: Claude synthesis (no gemini-wrapper/codex)
- ui-generate: Unified agent-only execution
- File renames: style-extract.md → extract.md, etc.

Improvements:
- Zero external dependencies (no CLI tools)
- Faster execution, reduced I/O
- Enhanced reproducibility
- Streamlined data flow

Updated:
- CHANGELOG.md: Detailed v4.0.2 release notes
- README.md: Updated all UI design examples
- Command files: Complete rewrite for Claude-native execution

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-09 09:36:30 +08:00

34 lines
871 B
JavaScript

const tokens = require("./design-tokens.json");
function toFontArray(fontList) {
return String(fontList)
.split(",")
.map((s) => s.trim())
.filter(Boolean);
}
function buildTailwindTheme(variantId = "variant-1") {
const v = tokens.variants[variantId];
if (!v) throw new Error(`Unknown variant: ${variantId}`);
const colors = { ...v.colors };
const spacing = { ...v.spacing };
const borderRadius = { ...v.radii };
const fontFamily = {
heading: toFontArray(v.typography.fonts.heading),
sans: toFontArray(v.typography.fonts.body),
mono: toFontArray(v.typography.fonts.mono)
};
const boxShadow = {
soft: v.effects.shadow_soft,
raised: v.effects.shadow_raised
};
return {
theme: {
extend: { colors, spacing, borderRadius, fontFamily, boxShadow }
}
};
}
module.exports = { buildTailwindTheme, tokens };