import { describe, it, expect } from 'vitest' import { exportFrame } from '@/lib/wysiwyg/export' import type { Frame } from '@/lib/wysiwyg/schema' function baseFrame(): Frame { return { id: 'f', width: 320, height: 200, background: '#111111', layers: [{ id: 'l1', name: 'Base', visible: true, locked: false, objects: [] }], } } describe('wysiwyg export - style tokens for controls', () => { it('defines base styles for inputs/selects/textarea/fieldset/legend using tokens', () => { const f = baseFrame() const out = exportFrame(f) expect(out.css).toMatch(/input,select,textarea\s*{[^}]*color:var\(--text\)/) expect(out.css).toMatch(/input,select,textarea\s*{[^}]*border:1px solid var\(--border\)/) expect(out.css).toMatch(/fieldset\s*{[^}]*border:1px solid var\(--border\)/) expect(out.css).toMatch(/legend\s*{[^}]*color:var\(--text\)/) }) })