Skip to content

Commit

Permalink
Update minor dependencies (#549)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcustyphoon committed May 1, 2023
1 parent cc71616 commit 8d4014c
Show file tree
Hide file tree
Showing 5 changed files with 1,353 additions and 966 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"dependencies": {
"@discretize/gw2-ui-new": "^0.0.21",
"@discretize/object-compression": "^1.0.3",
"@discretize/react-discretize-components": "^2.2.9",
"@discretize/react-discretize-components": "2.3.0",
"@discretize/typeface-menomonia": "^0.1.3",
"@emotion/react": "^11.7.1",
"@emotion/styled": "^11.6.0",
Expand Down
26 changes: 13 additions & 13 deletions src/assets/modifierdata/metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const stats = [
'Healing Power',
'Agony Resistance',
] as const;
export type StatName = typeof stats[number];
export type StatName = (typeof stats)[number];

// added during the "buff" phase, so these cannot be "converted"
export const alternateStats = [
Expand All @@ -33,7 +33,7 @@ export const boons = [
'Swiftness',
'Vigor',
] as const;
export type BoonName = typeof boons[number];
export type BoonName = (typeof boons)[number];

const boonDurations = boons.map((boon) => `${boon} Duration`) as `${BoonName} Duration`[];

Expand All @@ -60,7 +60,7 @@ export const damagingConditions = [
'Poison',
'Torment',
] as const;
export type DamagingConditionName = typeof damagingConditions[number];
export type DamagingConditionName = (typeof damagingConditions)[number];

const conditionDurations = damagingConditions.map(
(condition) => `${condition} Duration`,
Expand Down Expand Up @@ -109,43 +109,43 @@ export const allDamageKeys = [
'Phantasm Damage',
'Phantasm Critical Damage',
] as const;
export type DamageKey = typeof allDamageKeys[number];
export type DamageKey = (typeof allDamageKeys)[number];

export const allDamageModes = ['add', 'mult', 'target', 'unknown'] as const;
export type DamageMode = typeof allDamageModes[number];
export type DamageMode = (typeof allDamageModes)[number];

export const allAttributePointKeys = [...stats, ...alternateStats];
type AttributePointKey = typeof allAttributePointKeys[number];
type AttributePointKey = (typeof allAttributePointKeys)[number];

export const allAttributePointModes = ['buff', 'converted', 'unknown'] as const;
export type AttributePointMode = typeof allAttributePointModes[number];
export type AttributePointMode = (typeof allAttributePointModes)[number];

export const allAttributeCoefficientKeys = coefficients;
export type AttributeCoefficientKey = typeof allAttributeCoefficientKeys[number];
export type AttributeCoefficientKey = (typeof allAttributeCoefficientKeys)[number];
export const allAttributePercentKeys = percents;
export type AttributePercentKey = typeof allAttributePercentKeys[number];
export type AttributePercentKey = (typeof allAttributePercentKeys)[number];

export type AttributeKey = AttributePointKey | AttributeCoefficientKey | AttributePercentKey;

export const allConversionSourceKeys = stats;
export type ConversionSourceKey = typeof allConversionSourceKeys[number];
export type ConversionSourceKey = (typeof allConversionSourceKeys)[number];
export const allConversionDestinationKeys = [...stats, ...percents, ...coefficients] as const;
export type ConversionDestinationKey = typeof allConversionDestinationKeys[number];
export type ConversionDestinationKey = (typeof allConversionDestinationKeys)[number];

export const allConversionAfterBuffsSourceKeys = [
...stats,
'Critical Chance',
'Clone Critical Chance',
'Phantasm Critical Chance',
] as const;
export type ConversionAfterBuffsSourceKey = typeof allConversionAfterBuffsSourceKeys[number];
export type ConversionAfterBuffsSourceKey = (typeof allConversionAfterBuffsSourceKeys)[number];
export const allConversionAfterBuffsDestinationKeys = [
...stats,
...percents,
...coefficients,
] as const;
export type ConversionAfterBuffsDestinationKey =
typeof allConversionAfterBuffsDestinationKeys[number];
(typeof allConversionAfterBuffsDestinationKeys)[number];

// these values don't behave well if scaled up and down,
// so disallow them in modifiers with an amount key
Expand Down
2 changes: 1 addition & 1 deletion src/pages/index/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const IndexPage = () => {
variant="filled"
severity="info"
color="subtleThemed"
sx={{ marginBottom: 1 }}
sx={{ marginBottom: 1, color: '#fff' }}
>
{alert}
</MuiAlert>
Expand Down
20 changes: 10 additions & 10 deletions src/utils/gw2-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,7 @@ export const Slots = {
};
export type WeaponHandednessType = keyof typeof Slots;

export type SlotsEntry = typeof Slots['Dual wield'];
export type SlotsEntry = (typeof Slots)['Dual wield'];

// used for forcing slots to a certain affix
export const ForcedSlots = [
Expand All @@ -907,7 +907,7 @@ export const ForcedSlots = [
'wep2', // 13
] as const;

export type ForcedSlotName = typeof ForcedSlots[number];
export type ForcedSlotName = (typeof ForcedSlots)[number];

export const omnipotionModifiers = {
// Condi dmg from omnipot has been removed
Expand Down Expand Up @@ -1170,7 +1170,7 @@ export const damagingConditions: ConditionName[] = [
];

const PrimaryAttributes = ['Power', 'Precision', 'Toughness', 'Vitality'] as const;
export type PrimaryAttributeName = typeof PrimaryAttributes[number];
export type PrimaryAttributeName = (typeof PrimaryAttributes)[number];

const SecondaryAttributes = [
'Ferocity',
Expand All @@ -1180,7 +1180,7 @@ const SecondaryAttributes = [
'Healing Power',
'Agony Resistance',
] as const;
export type SecondaryAttributeName = typeof SecondaryAttributes[number];
export type SecondaryAttributeName = (typeof SecondaryAttributes)[number];

const DerivedAttributes = [
'Critical Chance',
Expand All @@ -1190,7 +1190,7 @@ const DerivedAttributes = [
'Health',
'Armor',
] as const;
export type DerivedAttributeName = typeof DerivedAttributes[number];
export type DerivedAttributeName = (typeof DerivedAttributes)[number];

const BoonDurationAttributes = [
'Aegis Duration',
Expand All @@ -1205,7 +1205,7 @@ const BoonDurationAttributes = [
'Swiftness Duration',
'Vigor Duration',
] as const;
export type BoonDurationAttributeName = typeof BoonDurationAttributes[number];
export type BoonDurationAttributeName = (typeof BoonDurationAttributes)[number];

const ConditionDurationAttributes = [
'Bleeding Duration',
Expand All @@ -1223,7 +1223,7 @@ const ConditionDurationAttributes = [
'Vulnerability Duration',
'Weakness Duration',
] as const;
export type ConditionDurationAttributeName = typeof ConditionDurationAttributes[number];
export type ConditionDurationAttributeName = (typeof ConditionDurationAttributes)[number];

const ConditionDamageAttributes = [
'Bleeding Damage',
Expand All @@ -1232,13 +1232,13 @@ const ConditionDamageAttributes = [
'Poison Damage',
'Torment Damage',
] as const;
export type ConditionDamageAttributeName = typeof ConditionDamageAttributes[number];
export type ConditionDamageAttributeName = (typeof ConditionDamageAttributes)[number];

const EffectiveAttributes = ['Effective Power', 'Effective Health', 'Effective Healing'] as const;
export type EffectiveAttributeName = typeof EffectiveAttributes[number];
export type EffectiveAttributeName = (typeof EffectiveAttributes)[number];

const Indicators = ['Damage', 'Survivability', 'Healing'] as const;
export type IndicatorName = typeof Indicators[number];
export type IndicatorName = (typeof Indicators)[number];

export type AttributeName =
| PrimaryAttributeName
Expand Down
Loading

0 comments on commit 8d4014c

Please sign in to comment.