feat(CompareBoard): add board constants and storage schema

This commit is contained in:
Ilia Mashkov
2026-06-24 13:49:24 +03:00
parent f49180e83d
commit e55e713517
@@ -0,0 +1,35 @@
/**
* localStorage key for the persisted board (pairings + focal + specimen).
*/
export const BOARD_STORAGE_KEY = 'glyphdiff:board';
/**
* Per-role typography storage key — header AdjustTypography instance.
*/
export const HEADER_TYPO_KEY = 'glyphdiff:typo:header';
/**
* Per-role typography storage key — body AdjustTypography instance.
*/
export const BODY_TYPO_KEY = 'glyphdiff:typo:body';
/**
* Schema version stamped into persisted board state (gates future
* migrations / the URL share-state codec).
*/
export const BOARD_SCHEMA_VERSION = 1;
/**
* Hard cap on side-by-side columns that still preserve an honest measure.
*/
export const MAX_COLUMNS = 3;
/**
* Default shared specimen — one header line + one body paragraph (single
* language). Used to seed the board and as the share-state fallback.
*/
export const DEFAULT_SPECIMEN = {
header: 'The Art of Harmonious Type',
body:
'Good typography is invisible. It guides the eye without calling attention to itself, balancing rhythm, contrast, and proportion so the reader forgets there is a typeface at all and simply reads.',
};