프로필 UI 글자 크기를 네 단계와 공통 축소 규칙으로 통일한다

This commit is contained in:
2026-09-29 09:41:39 +00:00
parent 5bafdfc1e7
commit 7c65cf60f3
43 changed files with 1347 additions and 299 deletions
@@ -65,6 +65,8 @@ const normalizeStructuralTag = (tag: string): string | null => {
export type FormatLegacyLogHtmlOptions = {
colorize?: boolean;
/** Game UI can use its shared step-down class; other consumers retain the legacy ratio. */
smallText?: 'relative' | 'semantic';
};
/**
@@ -88,7 +90,8 @@ export const formatLegacyLogHtml = (value?: string | null, options: FormatLegacy
if (legacy === '/') return '</span>';
const colorCode = legacy === '1' ? null : legacy[0]!;
const small = legacy === '1' || legacy.endsWith('1');
return `<span style="${colorCode ? (legacyStyleMap[colorCode] ?? '') : ''}${small ? legacyStyleMap['1'] : ''}">`;
const semanticSmall = small && options.smallText === 'semantic';
return `<span${semanticSmall ? ' class="legacy-small"' : ''} style="${colorCode ? (legacyStyleMap[colorCode] ?? '') : ''}${small && !semanticSmall ? legacyStyleMap['1'] : ''}">`;
}
return normalizeStructuralTag(part) ?? escapeText(part);