From e55e71351768e0f044dd7cfdb77862c02d46f3aa Mon Sep 17 00:00:00 2001 From: Ilia Mashkov Date: Wed, 24 Jun 2026 13:49:24 +0300 Subject: [PATCH] feat(CompareBoard): add board constants and storage schema --- .../CompareBoard/model/const/const.ts | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/features/CompareBoard/model/const/const.ts diff --git a/src/features/CompareBoard/model/const/const.ts b/src/features/CompareBoard/model/const/const.ts new file mode 100644 index 0000000..c22a2d9 --- /dev/null +++ b/src/features/CompareBoard/model/const/const.ts @@ -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.', +};