feat(ext/shared): glyph constants module for unified icon language

Centralizes the unicode glyphs used by sidebar nav and form action buttons
so popup and fullscreen surfaces stay in sync. Includes the REQUIRED_PILL
snippet used to replace the trailing-asterisk required-field marker.

Plan 2026-04-30 fullscreen UX phase 1 task 1.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
adlee-was-taken
2026-04-30 20:25:12 -04:00
parent 31672b714d
commit 33b3f0b019
2 changed files with 43 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
import { describe, it, expect } from 'vitest';
import * as glyphs from '../glyphs';
describe('glyphs', () => {
it('exports the documented glyph constants', () => {
expect(glyphs.GLYPH_REVEAL).toBe('⊙');
expect(glyphs.GLYPH_HIDE).toBe('⊘');
expect(glyphs.GLYPH_GENERATE).toBe('↻');
expect(glyphs.GLYPH_FILL_FROM_TAB).toBe('⤓');
expect(glyphs.GLYPH_QR).toBe('◫');
expect(glyphs.GLYPH_MONO).toBe('≡');
expect(glyphs.GLYPH_TRASH).toBe('▦');
expect(glyphs.GLYPH_DEVICES).toBe('⌬');
expect(glyphs.GLYPH_SETTINGS).toBe('⚙');
expect(glyphs.GLYPH_LOCK).toBe('⏻');
});
it('exports REQUIRED_PILL as an HTML snippet', () => {
expect(glyphs.REQUIRED_PILL).toBe('<span class="req-pill">required</span>');
});
});