(isDarkMode: boolean)
| 8 | import { tokens } from './tokens' |
| 9 | |
| 10 | export function generateCSSVariables(isDarkMode: boolean): string { |
| 11 | const mode = isDarkMode ? 'dark' : 'light' |
| 12 | |
| 13 | return ` |
| 14 | /* Background colors */ |
| 15 | --agentflow-canvas-bg: ${tokens.colors.background.canvas[mode]}; |
| 16 | --agentflow-card-bg: ${tokens.colors.background.card[mode]}; |
| 17 | --agentflow-card-bg-hover: ${tokens.colors.background.cardHover[mode]}; |
| 18 | --agentflow-palette-bg: ${tokens.colors.background.palette[mode]}; |
| 19 | --agentflow-header-bg: ${tokens.colors.background.header[mode]}; |
| 20 | |
| 21 | /* Border colors */ |
| 22 | --agentflow-border: ${tokens.colors.border.default[mode]}; |
| 23 | --agentflow-border-hover: ${tokens.colors.border.hover[mode]}; |
| 24 | |
| 25 | /* Text colors */ |
| 26 | --agentflow-text-primary: ${tokens.colors.text.primary[mode]}; |
| 27 | --agentflow-text-secondary: ${tokens.colors.text.secondary[mode]}; |
| 28 | --agentflow-text-tertiary: ${tokens.colors.text.tertiary[mode]}; |
| 29 | |
| 30 | /* Semantic colors */ |
| 31 | --agentflow-success: ${tokens.colors.semantic.success}; |
| 32 | --agentflow-error: ${tokens.colors.semantic.error}; |
| 33 | --agentflow-warning: ${tokens.colors.semantic.warning}; |
| 34 | --agentflow-info: ${tokens.colors.semantic.info}; |
| 35 | |
| 36 | /* Node-specific colors */ |
| 37 | --agentflow-sticky-note-bg: ${tokens.colors.nodes.stickyNote}; |
| 38 | --agentflow-iteration-border: ${tokens.colors.nodes.iteration}; |
| 39 | |
| 40 | /* ReactFlow colors */ |
| 41 | --agentflow-minimap-node: ${tokens.colors.reactflow.minimap.node[mode]}; |
| 42 | --agentflow-minimap-node-stroke: ${tokens.colors.reactflow.minimap.nodeStroke[mode]}; |
| 43 | --agentflow-minimap-bg: ${tokens.colors.reactflow.minimap.background[mode]}; |
| 44 | --agentflow-bg-dots: ${tokens.colors.reactflow.background.dots[mode]}; |
| 45 | |
| 46 | /* Spacing */ |
| 47 | --agentflow-spacing-xs: ${tokens.spacing.xs}px; |
| 48 | --agentflow-spacing-sm: ${tokens.spacing.sm}px; |
| 49 | --agentflow-spacing-md: ${tokens.spacing.md}px; |
| 50 | --agentflow-spacing-lg: ${tokens.spacing.lg}px; |
| 51 | --agentflow-spacing-xl: ${tokens.spacing.xl}px; |
| 52 | --agentflow-spacing-xxl: ${tokens.spacing.xxl}px; |
| 53 | |
| 54 | /* Shadows */ |
| 55 | --agentflow-shadow-card: ${tokens.shadows.card}; |
| 56 | --agentflow-shadow-toolbar: ${tokens.shadows.toolbar[mode]}; |
| 57 | --agentflow-shadow-minimap: ${tokens.shadows.minimap}; |
| 58 | --agentflow-shadow-controls: ${tokens.shadows.controls}; |
| 59 | --agentflow-shadow-sticky-note: ${tokens.shadows.stickyNote}; |
| 60 | |
| 61 | /* Border radius */ |
| 62 | --agentflow-radius-sm: ${tokens.borderRadius.sm}px; |
| 63 | --agentflow-radius-md: ${tokens.borderRadius.md}px; |
| 64 | --agentflow-radius-lg: ${tokens.borderRadius.lg}px; |
| 65 | `.trim() |
| 66 | } |
no outgoing calls
no test coverage detected