kira-arts 1.2.2 → 1.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1086,7 +1086,7 @@ function extensionForFormat(format) {
1086
1086
 
1087
1087
  // Src/Utils/profileImage.output.utils.ts
1088
1088
  ensureFontsRegistered();
1089
- async function genPng(data, options) {
1089
+ async function genPng(data, options, themeBorderColor) {
1090
1090
  const { basicInfo, assets } = data;
1091
1091
  const canvas = createCanvas7(885, 303);
1092
1092
  const ctx = canvas.getContext("2d");
@@ -1120,7 +1120,8 @@ async function genPng(data, options) {
1120
1120
  useNitroTheme: !options?.disableProfileTheme,
1121
1121
  nitroColors: data?.decoration?.profileColors,
1122
1122
  useRoleColor: options?.useRoleColor,
1123
- roleColor: data?.decoration?.roleColor
1123
+ roleColor: data?.decoration?.roleColor,
1124
+ fallback: themeBorderColor ?? []
1124
1125
  });
1125
1126
  if (borderColors.length > 0) {
1126
1127
  const border = await genBorder(borderColors, options);
@@ -1265,8 +1266,7 @@ Expected string userId, got ${typeof userId === "undefined" || !userId ? "undefi
1265
1266
  const resolvedOptions = {
1266
1267
  ...options,
1267
1268
  usernameColor: options.usernameColor ?? palette?.usernameColor,
1268
- tagColor: options.tagColor ?? palette?.tagColor,
1269
- borderColor: options.borderColor ?? palette?.borderColor
1269
+ tagColor: options.tagColor ?? palette?.tagColor
1270
1270
  };
1271
1271
  if (resolvedOptions.rankData) {
1272
1272
  resolvedOptions.rankData = {
@@ -1276,7 +1276,7 @@ Expected string userId, got ${typeof userId === "undefined" || !userId ? "undefi
1276
1276
  };
1277
1277
  }
1278
1278
  try {
1279
- const buffer = await genPng(data, resolvedOptions);
1279
+ const buffer = await genPng(data, resolvedOptions, palette?.borderColor);
1280
1280
  return buffer;
1281
1281
  } catch (error) {
1282
1282
  if (error instanceof KiraError) throw error;