kira-arts 1.2.3 → 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.cjs CHANGED
@@ -1158,7 +1158,7 @@ function extensionForFormat(format) {
1158
1158
 
1159
1159
  // Src/Utils/profileImage.output.utils.ts
1160
1160
  ensureFontsRegistered();
1161
- async function genPng(data, options) {
1161
+ async function genPng(data, options, themeBorderColor) {
1162
1162
  const { basicInfo, assets } = data;
1163
1163
  const canvas = (0, import_canvas9.createCanvas)(885, 303);
1164
1164
  const ctx = canvas.getContext("2d");
@@ -1192,7 +1192,8 @@ async function genPng(data, options) {
1192
1192
  useNitroTheme: !options?.disableProfileTheme,
1193
1193
  nitroColors: data?.decoration?.profileColors,
1194
1194
  useRoleColor: options?.useRoleColor,
1195
- roleColor: data?.decoration?.roleColor
1195
+ roleColor: data?.decoration?.roleColor,
1196
+ fallback: themeBorderColor ?? []
1196
1197
  });
1197
1198
  if (borderColors.length > 0) {
1198
1199
  const border = await genBorder(borderColors, options);
@@ -1337,8 +1338,7 @@ Expected string userId, got ${typeof userId === "undefined" || !userId ? "undefi
1337
1338
  const resolvedOptions = {
1338
1339
  ...options,
1339
1340
  usernameColor: options.usernameColor ?? palette?.usernameColor,
1340
- tagColor: options.tagColor ?? palette?.tagColor,
1341
- borderColor: options.borderColor ?? palette?.borderColor
1341
+ tagColor: options.tagColor ?? palette?.tagColor
1342
1342
  };
1343
1343
  if (resolvedOptions.rankData) {
1344
1344
  resolvedOptions.rankData = {
@@ -1348,7 +1348,7 @@ Expected string userId, got ${typeof userId === "undefined" || !userId ? "undefi
1348
1348
  };
1349
1349
  }
1350
1350
  try {
1351
- const buffer = await genPng(data, resolvedOptions);
1351
+ const buffer = await genPng(data, resolvedOptions, palette?.borderColor);
1352
1352
  return buffer;
1353
1353
  } catch (error) {
1354
1354
  if (error instanceof KiraError) throw error;