mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 03:59:50 +02:00
update embed and fix varuna bug
This commit is contained in:
1 parent
d2041d0ee6
commit
645cfacecb
8 files changed
+81
-69
No files matched your search
@@ -1,16 +1,16 @@
|
||||
import { type CompositeStatsKey } from '@blitzkit/core';
|
||||
import { grayA, grayDark, grayDarkA } from '@radix-ui/colors';
|
||||
import type { ReactNode } from 'react';
|
||||
import { type CompositeStatsKey } from "@blitzkit/core";
|
||||
import { grayA, grayDark, grayDarkA } from "@radix-ui/colors";
|
||||
import type { ReactNode } from "react";
|
||||
import {
|
||||
BreakdownPreview,
|
||||
BreakdownRenderer,
|
||||
compositeStatsKeysOptions,
|
||||
} from '../components/Embeds/breakdown';
|
||||
} from "../components/Embeds/breakdown";
|
||||
import type {
|
||||
EmbedConfig,
|
||||
ExtractEmbedConfigTypes,
|
||||
} from '../stores/embedState';
|
||||
import { EmbedItemType } from '../stores/embedState/constants';
|
||||
} from "../stores/embedState";
|
||||
import { EmbedItemType } from "../stores/embedState/constants";
|
||||
|
||||
export const breakdownConfig = {
|
||||
width: { type: EmbedItemType.Slider, default: 320, min: 128, max: 640 },
|
||||
@@ -18,7 +18,7 @@ export const breakdownConfig = {
|
||||
|
||||
showTotal: { type: EmbedItemType.Boolean, default: true, pad: true },
|
||||
|
||||
listGap: { type: EmbedItemType.Size, default: '2' },
|
||||
listGap: { type: EmbedItemType.Size, default: "2" },
|
||||
listMaxTanks: {
|
||||
type: EmbedItemType.Slider,
|
||||
default: 4,
|
||||
@@ -27,15 +27,15 @@ export const breakdownConfig = {
|
||||
pad: true,
|
||||
},
|
||||
|
||||
cardRadius: { type: EmbedItemType.Radius, default: '2' },
|
||||
cardRadius: { type: EmbedItemType.Radius, default: "2" },
|
||||
cardHeaderBackgroundColor: {
|
||||
type: EmbedItemType.Color,
|
||||
default: grayDarkA.grayA3,
|
||||
},
|
||||
cardHeaderPadding: { type: EmbedItemType.Size, default: '1' },
|
||||
cardHeaderPadding: { type: EmbedItemType.Size, default: "1" },
|
||||
cardTitle: {
|
||||
type: EmbedItemType.RichText,
|
||||
default: { color: grayDark.gray12, weight: 'bold', size: '3' },
|
||||
default: { color: grayDark.gray12, weight: "bold", size: "3" },
|
||||
},
|
||||
cardTitleTypeColor: { type: EmbedItemType.Boolean, default: true },
|
||||
cardTitleClassIcon: { type: EmbedItemType.Boolean, default: true },
|
||||
@@ -45,45 +45,45 @@ export const breakdownConfig = {
|
||||
},
|
||||
cardBodyPadding: {
|
||||
type: EmbedItemType.Size,
|
||||
default: '2',
|
||||
default: "2",
|
||||
pad: true,
|
||||
},
|
||||
|
||||
columnGap: { type: EmbedItemType.Size, default: '0' },
|
||||
columnGap: { type: EmbedItemType.Size, default: "0" },
|
||||
columnValue: {
|
||||
type: EmbedItemType.RichText,
|
||||
default: { color: grayDark.gray12, size: '3', weight: 'regular' },
|
||||
default: { color: grayDark.gray12, size: "3", weight: "regular" },
|
||||
},
|
||||
columnLabel: {
|
||||
type: EmbedItemType.RichText,
|
||||
default: { color: grayDark.gray11, size: '2', weight: 'regular' },
|
||||
default: { color: grayDark.gray11, size: "2", weight: "regular" },
|
||||
pad: true,
|
||||
},
|
||||
|
||||
column1: {
|
||||
type: EmbedItemType.Enum,
|
||||
default: 'cumulative_battles' satisfies CompositeStatsKey,
|
||||
default: "cumulative_battles" satisfies CompositeStatsKey,
|
||||
options: compositeStatsKeysOptions,
|
||||
},
|
||||
column2: {
|
||||
type: EmbedItemType.Enum,
|
||||
default: 'normalized_wins' satisfies CompositeStatsKey,
|
||||
default: "normalized_wins" satisfies CompositeStatsKey,
|
||||
options: compositeStatsKeysOptions,
|
||||
},
|
||||
column3: {
|
||||
type: EmbedItemType.Enum,
|
||||
default: 'cumulative_wn8' satisfies CompositeStatsKey,
|
||||
default: "cumulative_wn8" satisfies CompositeStatsKey,
|
||||
options: compositeStatsKeysOptions,
|
||||
},
|
||||
column4: {
|
||||
type: EmbedItemType.Enum,
|
||||
default: 'normalized_damage_dealt' satisfies CompositeStatsKey,
|
||||
default: "normalized_damage_dealt" satisfies CompositeStatsKey,
|
||||
options: compositeStatsKeysOptions,
|
||||
},
|
||||
column1CustomLabel: { type: EmbedItemType.String, default: '' },
|
||||
column2CustomLabel: { type: EmbedItemType.String, default: '' },
|
||||
column3CustomLabel: { type: EmbedItemType.String, default: '' },
|
||||
column4CustomLabel: { type: EmbedItemType.String, default: '' },
|
||||
column1CustomLabel: { type: EmbedItemType.String, default: "" },
|
||||
column2CustomLabel: { type: EmbedItemType.String, default: "" },
|
||||
column3CustomLabel: { type: EmbedItemType.String, default: "" },
|
||||
column4CustomLabel: { type: EmbedItemType.String, default: "" },
|
||||
} satisfies EmbedConfig;
|
||||
|
||||
export const embedConfigurations = {
|
||||
@@ -93,6 +93,7 @@ export const embedConfigurations = {
|
||||
export const embedPreviews = {
|
||||
breakdown: BreakdownPreview,
|
||||
} satisfies Record<string, () => ReactNode>;
|
||||
|
||||
export function extractEmbedConfigDefaults<Config extends EmbedConfig>(
|
||||
config: Config,
|
||||
) {
|
||||
|
||||
Reference in new issue
Block a user