refactor: move all color related code into separate file (#4557)

Co-authored-by: Alexandr <qwerty541zxc@gmail.com>
This commit is contained in:
Ophelia Goldstein
2025-10-11 22:07:03 +03:00
committed by GitHub
co-authored by Alexandr
parent 6a542c870d
commit 701068b8bc
11 changed files with 152 additions and 161 deletions
+1 -1
View File
@@ -1,7 +1,6 @@
// @ts-check
import {
getCardColors,
parseEmojis,
wrapTextMultiline,
encodeHTML,
@@ -12,6 +11,7 @@ import {
createLanguageNode,
} from "../common/utils.js";
import Card from "../common/Card.js";
import { getCardColors } from "../common/color.js";
import { icons } from "../common/icons.js";
/** Import language colors.
+1 -1
View File
@@ -1,11 +1,11 @@
// @ts-check
import { Card } from "../common/Card.js";
import { getCardColors } from "../common/color.js";
import { I18n } from "../common/I18n.js";
import { icons } from "../common/icons.js";
import {
encodeHTML,
flexLayout,
getCardColors,
kFormatter,
measureText,
parseEmojis,
+1 -1
View File
@@ -1,13 +1,13 @@
// @ts-check
import { Card } from "../common/Card.js";
import { getCardColors } from "../common/color.js";
import { CustomError } from "../common/error.js";
import { I18n } from "../common/I18n.js";
import { icons, rankIcon } from "../common/icons.js";
import {
clampValue,
flexLayout,
getCardColors,
kFormatter,
measureText,
} from "../common/utils.js";
+1 -1
View File
@@ -1,12 +1,12 @@
// @ts-check
import { Card } from "../common/Card.js";
import { getCardColors } from "../common/color.js";
import { createProgressNode } from "../common/createProgressNode.js";
import { I18n } from "../common/I18n.js";
import {
chunkArray,
clampValue,
flexLayout,
getCardColors,
lowercaseTrim,
measureText,
formatBytes,
+2 -6
View File
@@ -1,14 +1,10 @@
// @ts-check
import { Card } from "../common/Card.js";
import { getCardColors } from "../common/color.js";
import { createProgressNode } from "../common/createProgressNode.js";
import { I18n } from "../common/I18n.js";
import {
clampValue,
flexLayout,
getCardColors,
lowercaseTrim,
} from "../common/utils.js";
import { clampValue, flexLayout, lowercaseTrim } from "../common/utils.js";
import { wakatimeCardLocales } from "../translations.js";
/** Import language colors.