├── .editorconfig
├── .eslintrc.cjs
├── .gitattributes
├── .github
├── dependabot.yml
└── workflows
│ └── test-build.yml
├── .gitignore
├── .npmrc
├── .prettierignore
├── .prettierrc.json
├── README.md
├── build.mjs
├── deploy-storybook.mjs
├── generate_api_cache.mjs
├── github-pages
└── index.html
├── globals
├── README.md
├── package.json
├── src
│ ├── index.ts
│ └── styles
│ │ ├── Layout.jsx
│ │ ├── defaultStyles.ts
│ │ ├── globals.js
│ │ ├── muiTheme.jsx
│ │ ├── muiTheme.tsx
│ │ ├── professionThemes.js
│ │ └── withGw2Theme.jsx
├── tsconfig.json
└── typings.d.ts
├── gw2-ui
├── .storybook
│ ├── main.js
│ └── preview.js
├── LICENSE
├── README.md
├── api_typecheck.mjs
├── babel.config.json
├── generate_from_api.mjs
├── package.json
├── src
│ ├── assets
│ │ ├── icons
│ │ │ ├── 404.png
│ │ │ ├── 500.png
│ │ │ ├── Attribute
│ │ │ │ ├── AgonyResistance.png
│ │ │ │ ├── Armor.png
│ │ │ │ ├── BoonDuration.png
│ │ │ │ ├── Concentration.png
│ │ │ │ ├── ConditionDamage.png
│ │ │ │ ├── ConditionDuration.png
│ │ │ │ ├── CriticalChance.png
│ │ │ │ ├── CriticalDamage.png
│ │ │ │ ├── Expertise.png
│ │ │ │ ├── Ferocity.png
│ │ │ │ ├── GoldFind.png
│ │ │ │ ├── HealingPower.png
│ │ │ │ ├── Health.png
│ │ │ │ ├── KarmaGain.png
│ │ │ │ ├── MagicFind.png
│ │ │ │ ├── Power.png
│ │ │ │ ├── Precision.png
│ │ │ │ ├── Toughness.png
│ │ │ │ ├── Vitality.png
│ │ │ │ └── XPGain.png
│ │ │ ├── Augmentation
│ │ │ │ ├── MistAttunement1.png
│ │ │ │ ├── MistAttunement2.png
│ │ │ │ ├── MistAttunement3.png
│ │ │ │ └── MistAttunement4.png
│ │ │ ├── Aura
│ │ │ │ ├── Chaos.png
│ │ │ │ ├── Dark.png
│ │ │ │ ├── Fire.png
│ │ │ │ ├── Frost.png
│ │ │ │ ├── Light.png
│ │ │ │ ├── Magnetic.png
│ │ │ │ └── Shocking.png
│ │ │ ├── Boon
│ │ │ │ ├── Aegis.png
│ │ │ │ ├── Alacrity.png
│ │ │ │ ├── Fury.png
│ │ │ │ ├── Might.png
│ │ │ │ ├── Protection.png
│ │ │ │ ├── Quickness.png
│ │ │ │ ├── Regeneration.png
│ │ │ │ ├── Resistance.png
│ │ │ │ ├── Resolution.png
│ │ │ │ ├── Retaliation.png
│ │ │ │ ├── Stability.png
│ │ │ │ ├── Swiftness.png
│ │ │ │ └── Vigor.png
│ │ │ ├── Common
│ │ │ │ ├── Agony.png
│ │ │ │ ├── Barrier.png
│ │ │ │ ├── Blight.png
│ │ │ │ ├── Exposed.png
│ │ │ │ ├── Invulnerability.png
│ │ │ │ ├── ReinforcedArmor.png
│ │ │ │ ├── Revealed.png
│ │ │ │ ├── RigorousCertainty.png
│ │ │ │ ├── Stealth.png
│ │ │ │ ├── StunBreak.png
│ │ │ │ ├── Superspeed.png
│ │ │ │ └── Unblockable.png
│ │ │ ├── Condition
│ │ │ │ ├── Bleeding.png
│ │ │ │ ├── Blinded.png
│ │ │ │ ├── Burning.png
│ │ │ │ ├── Chilled.png
│ │ │ │ ├── Confusion.png
│ │ │ │ ├── Crippled.png
│ │ │ │ ├── Fear.png
│ │ │ │ ├── Immobile.png
│ │ │ │ ├── Poisoned.png
│ │ │ │ ├── Slow.png
│ │ │ │ ├── Taunt.png
│ │ │ │ ├── Torment.png
│ │ │ │ ├── Vulnerability.png
│ │ │ │ └── Weakness.png
│ │ │ ├── Consumable
│ │ │ │ ├── Enhancement.png
│ │ │ │ └── Nourishment.png
│ │ │ ├── Control
│ │ │ │ ├── Daze.png
│ │ │ │ ├── Float.png
│ │ │ │ ├── Knockback.png
│ │ │ │ ├── Knockdown.png
│ │ │ │ ├── Launch.png
│ │ │ │ ├── Pull.png
│ │ │ │ ├── Push.png
│ │ │ │ ├── Sink.png
│ │ │ │ └── Stun.png
│ │ │ ├── Empty.png
│ │ │ ├── Lock.png
│ │ │ ├── MistlockInstability
│ │ │ │ ├── AdrenalineRush.png
│ │ │ │ ├── Afflicted.png
│ │ │ │ ├── BoonOverload.png
│ │ │ │ ├── FluxBomb.png
│ │ │ │ ├── FractalVindicators.png
│ │ │ │ ├── Frailty.png
│ │ │ │ ├── Hamstrung.png
│ │ │ │ ├── LastLaugh.png
│ │ │ │ ├── MistsConvergence.png
│ │ │ │ ├── NoPainNoGain.png
│ │ │ │ ├── Outflanked.png
│ │ │ │ ├── SocialAwkwardness.png
│ │ │ │ ├── StickTogether.png
│ │ │ │ ├── SugarRush.png
│ │ │ │ ├── ToxicSickness.png
│ │ │ │ ├── ToxicTrail.png
│ │ │ │ ├── Vengeance.png
│ │ │ │ └── WeBleedFire.png
│ │ │ ├── Profession
│ │ │ │ ├── Berserker.png
│ │ │ │ ├── Bladesworn.png
│ │ │ │ ├── Catalyst.png
│ │ │ │ ├── Chronomancer.png
│ │ │ │ ├── Daredevil.png
│ │ │ │ ├── Deadeye.png
│ │ │ │ ├── Dragonhunter.png
│ │ │ │ ├── Druid.png
│ │ │ │ ├── Elementalist.png
│ │ │ │ ├── Engineer.png
│ │ │ │ ├── Firebrand.png
│ │ │ │ ├── Guardian.png
│ │ │ │ ├── Harbinger.png
│ │ │ │ ├── Herald.png
│ │ │ │ ├── Holosmith.png
│ │ │ │ ├── Mechanist.png
│ │ │ │ ├── Mesmer.png
│ │ │ │ ├── Mirage.png
│ │ │ │ ├── Necromancer.png
│ │ │ │ ├── Ranger.png
│ │ │ │ ├── Reaper.png
│ │ │ │ ├── Renegade.png
│ │ │ │ ├── Revenant.png
│ │ │ │ ├── Scourge.png
│ │ │ │ ├── Scrapper.png
│ │ │ │ ├── Soulbeast.png
│ │ │ │ ├── Specter.png
│ │ │ │ ├── Spellbreaker.png
│ │ │ │ ├── Tempest.png
│ │ │ │ ├── Thief.png
│ │ │ │ ├── Untamed.png
│ │ │ │ ├── Vindicator.png
│ │ │ │ ├── Virtuoso.png
│ │ │ │ ├── Warrior.png
│ │ │ │ ├── Weaver.png
│ │ │ │ └── Willbender.png
│ │ │ ├── Race
│ │ │ │ ├── Asura.png
│ │ │ │ ├── Charr.png
│ │ │ │ ├── Human.png
│ │ │ │ ├── Norn.png
│ │ │ │ └── Sylvari.png
│ │ │ ├── Reset.png
│ │ │ ├── Weapon
│ │ │ │ ├── Axe.png
│ │ │ │ ├── Focus.png
│ │ │ │ ├── Greatsword.png
│ │ │ │ ├── Hammer.png
│ │ │ │ ├── HarpoonGun.png
│ │ │ │ ├── Longbow.png
│ │ │ │ ├── Mace.png
│ │ │ │ ├── Pistol.png
│ │ │ │ ├── Rifle.png
│ │ │ │ ├── Scepter.png
│ │ │ │ ├── Shield.png
│ │ │ │ ├── ShortBow.png
│ │ │ │ ├── Spear.png
│ │ │ │ ├── Staff.png
│ │ │ │ ├── Sword.png
│ │ │ │ ├── Torch.png
│ │ │ │ ├── Trident.png
│ │ │ │ └── Warhorn.png
│ │ │ └── WeaponSwap.png
│ │ ├── tooltip-background.png
│ │ └── trait-line-connector.png
│ ├── builder
│ │ ├── attributes.ts
│ │ ├── createItem.ts
│ │ ├── index.ts
│ │ ├── itemArmorWeights.ts
│ │ ├── itemCategories.ts
│ │ ├── itemCategoryNames.ts
│ │ ├── itemModifiers.ts
│ │ ├── itemRarities.ts
│ │ ├── itemStatNames.ts
│ │ ├── itemStatTypes.ts
│ │ ├── itemStats.ts
│ │ ├── itemTypeNames.ts
│ │ └── valueOf.ts
│ ├── components
│ │ ├── AbilityDetails
│ │ │ ├── AbilityDetails.module.css
│ │ │ └── AbilityDetails.tsx
│ │ ├── Attribute
│ │ │ ├── Attribute.module.css
│ │ │ ├── Attribute.stories.tsx
│ │ │ └── Attribute.tsx
│ │ ├── Augmentation
│ │ │ ├── Augmentation.stories.tsx
│ │ │ └── Augmentation.tsx
│ │ ├── Aura
│ │ │ ├── Aura.tsx
│ │ │ └── Auras.stories.tsx
│ │ ├── Boon
│ │ │ ├── Boon.stories.tsx
│ │ │ └── Boon.tsx
│ │ ├── Coin
│ │ │ ├── Coin.module.css
│ │ │ ├── Coin.stories.tsx
│ │ │ └── Coin.tsx
│ │ ├── CommonEffect
│ │ │ ├── CommonEffect.stories.tsx
│ │ │ └── CommonEffect.tsx
│ │ ├── Condition
│ │ │ ├── Condition.stories.tsx
│ │ │ └── Condition.tsx
│ │ ├── ConsumableEffect
│ │ │ ├── ConsumableEffect.stories.tsx
│ │ │ └── ConsumableEffect.tsx
│ │ ├── ControlEffect
│ │ │ ├── ControlEffect.stories.tsx
│ │ │ └── ControlEffect.tsx
│ │ ├── CreateItem
│ │ │ ├── CreateItem.stories.tsx
│ │ │ └── CreateItem.tsx
│ │ ├── CustomComponent
│ │ │ ├── CustomComponent.stories.tsx
│ │ │ └── CustomComponent.tsx
│ │ ├── DetailsFact
│ │ │ ├── DetailsFact.module.css
│ │ │ └── DetailsFact.tsx
│ │ ├── DetailsHeader
│ │ │ ├── DetailsHeader.module.css
│ │ │ └── DetailsHeader.tsx
│ │ ├── DetailsHeaderTitle
│ │ │ ├── DetailsHeaderTitle.module.css
│ │ │ └── DetailsHeaderTitle.tsx
│ │ ├── DetailsText
│ │ │ ├── DetailsText.module.css
│ │ │ └── DetailsText.tsx
│ │ ├── Effect
│ │ │ ├── Effect.module.css
│ │ │ ├── Effect.stories.tsx
│ │ │ └── Effect.tsx
│ │ ├── Error
│ │ │ ├── Error.module.css
│ │ │ ├── Error.stories.tsx
│ │ │ └── Error.tsx
│ │ ├── Icon
│ │ │ ├── Icon.module.css
│ │ │ ├── Icon.stories.tsx
│ │ │ └── Icon.tsx
│ │ ├── IconWithText
│ │ │ ├── IconWithText.module.css
│ │ │ ├── IconWithText.stories.tsx
│ │ │ └── IconWithText.tsx
│ │ ├── Item
│ │ │ ├── Item.module.css
│ │ │ ├── Item.stories.tsx
│ │ │ ├── Item.tsx
│ │ │ ├── ItemDetails.module.css
│ │ │ ├── ItemDetails.tsx
│ │ │ └── ItemInternal.tsx
│ │ ├── MistlockInstability
│ │ │ ├── MistlockInstability.stories.tsx
│ │ │ └── MistlockInstability.tsx
│ │ ├── Profession
│ │ │ ├── Profession.module.css
│ │ │ ├── Profession.stories.tsx
│ │ │ ├── Profession.tsx
│ │ │ └── professions.module.css
│ │ ├── Progress
│ │ │ ├── Progress.module.css
│ │ │ ├── Progress.stories.tsx
│ │ │ └── Progress.tsx
│ │ ├── Race
│ │ │ ├── Race.module.css
│ │ │ ├── Race.stories.tsx
│ │ │ └── Race.tsx
│ │ ├── Skill
│ │ │ ├── Skill.module.css
│ │ │ ├── Skill.stories.tsx
│ │ │ ├── Skill.tsx
│ │ │ └── SkillInternal.tsx
│ │ ├── Specialization
│ │ │ ├── Specialization.stories.tsx
│ │ │ ├── Specialization.tsx
│ │ │ ├── SpecializationInternal.tsx
│ │ │ └── SpecializationTooltip.tsx
│ │ ├── Spinner
│ │ │ ├── Spinner.module.css
│ │ │ ├── Spinner.stories.tsx
│ │ │ └── Spinner.tsx
│ │ ├── Tooltip
│ │ │ ├── Tooltip.module.css
│ │ │ ├── Tooltip.stories.tsx
│ │ │ └── Tooltip.tsx
│ │ ├── TooltipContainer
│ │ │ ├── TooltipContainer.module.css
│ │ │ ├── TooltipContainer.stories.tsx
│ │ │ └── TooltipContainer.tsx
│ │ ├── Trait
│ │ │ ├── Trait.module.css
│ │ │ ├── Trait.stories.tsx
│ │ │ ├── Trait.tsx
│ │ │ └── TraitInternal.tsx
│ │ ├── TraitLine
│ │ │ ├── TraitLine.module.css
│ │ │ ├── TraitLine.stories.tsx
│ │ │ ├── TraitLine.tsx
│ │ │ ├── TraitLineConnector.tsx
│ │ │ ├── TraitLineInternal.tsx
│ │ │ └── TraitlLineConnector.module.css
│ │ ├── WikiLink
│ │ │ ├── WikiLink.module.css
│ │ │ ├── WikiLink.stories.tsx
│ │ │ └── WikiLink.tsx
│ │ └── index.ts
│ ├── data
│ │ ├── attributes.ts
│ │ ├── augmentations.ts
│ │ ├── auras.ts
│ │ ├── boons.ts
│ │ ├── commonEffects.ts
│ │ ├── conditions.ts
│ │ ├── consumableEffects.ts
│ │ ├── controlEffects.ts
│ │ ├── defaultIcons.ts
│ │ ├── mistlockInstabilities.ts
│ │ ├── professions.ts
│ │ ├── races.ts
│ │ └── specializations.ts
│ ├── default_style.css
│ ├── gw2api
│ │ ├── cache.ts
│ │ ├── hooks.ts
│ │ ├── overrides
│ │ │ ├── async.ts
│ │ │ ├── data
│ │ │ │ ├── descriptions.ts
│ │ │ │ └── skills.ts
│ │ │ ├── index.ts
│ │ │ ├── item_ascended_consumables.ts
│ │ │ ├── skill_facts.ts
│ │ │ ├── skill_missing.ts
│ │ │ ├── skill_types.ts
│ │ │ └── trait_missing_descriptions.ts
│ │ ├── typeguards
│ │ │ ├── .gitignore
│ │ │ ├── failures
│ │ │ │ └── .gitignore
│ │ │ ├── guards.ts
│ │ │ └── tsconfig.json
│ │ └── types
│ │ │ ├── common
│ │ │ ├── armorSlotType.ts
│ │ │ ├── armorType.ts
│ │ │ ├── attribute.ts
│ │ │ ├── comboFieldType.ts
│ │ │ ├── containerType.ts
│ │ │ ├── damageType.ts
│ │ │ ├── fact.ts
│ │ │ ├── gameType.ts
│ │ │ ├── gizmoType.ts
│ │ │ ├── infusionSlotFlag.ts
│ │ │ ├── infusionUpgradeFlag.ts
│ │ │ ├── profession.ts
│ │ │ ├── salvageKitType.ts
│ │ │ ├── traited_fact.ts
│ │ │ ├── trinketType.ts
│ │ │ ├── upgradeComponentType.ts
│ │ │ ├── weaponType.ts
│ │ │ └── weightClass.ts
│ │ │ ├── items
│ │ │ ├── details
│ │ │ │ ├── armor.ts
│ │ │ │ ├── backItem.ts
│ │ │ │ ├── bag.ts
│ │ │ │ ├── common
│ │ │ │ │ ├── infixUpgrade.ts
│ │ │ │ │ └── infusionSlot.ts
│ │ │ │ ├── consumable.ts
│ │ │ │ ├── container.ts
│ │ │ │ ├── details.ts
│ │ │ │ ├── gatheringTool.ts
│ │ │ │ ├── gizmo.ts
│ │ │ │ ├── miniature.ts
│ │ │ │ ├── salvageKit.ts
│ │ │ │ ├── trinket.ts
│ │ │ │ ├── upgradeComponent.ts
│ │ │ │ └── weapon.ts
│ │ │ └── item.ts
│ │ │ ├── skills
│ │ │ ├── enums.ts
│ │ │ └── skill.ts
│ │ │ ├── specialization
│ │ │ └── specialization.ts
│ │ │ └── traits
│ │ │ └── trait.ts
│ ├── helpers
│ │ ├── apiAttributes.ts
│ │ ├── capitalize.ts
│ │ ├── factsOrder.ts
│ │ └── formatDuration.ts
│ ├── i18n
│ │ ├── attributes.ts
│ │ ├── augmentations.ts
│ │ ├── auras.ts
│ │ ├── boons.ts
│ │ ├── commonEffects.ts
│ │ ├── conditions.ts
│ │ ├── controlEffects.ts
│ │ ├── index.ts
│ │ ├── mistlockInstabilities.ts
│ │ ├── professions.ts
│ │ └── races.ts
│ └── index.ts
├── tsconfig.json
└── typings.d.ts
├── gw2apicache
└── .gitignore
├── node_api_helpers.mjs
├── package.json
├── pnpm-lock.yaml
├── pnpm-workspace.yaml
├── react-discretize-components
├── .storybook
│ ├── main.js
│ └── preview.js
├── README.md
├── babel.config.json
├── package.json
├── src
│ ├── character
│ │ ├── Armor
│ │ │ ├── Armor.module.css
│ │ │ ├── Armor.stories.tsx
│ │ │ └── Armor.tsx
│ │ ├── AssumedBuffs
│ │ │ ├── AssumedBuffs.module.css
│ │ │ ├── AssumedBuffs.stories.tsx
│ │ │ └── AssumedBuffs.tsx
│ │ ├── Attributes
│ │ │ ├── Attributes.module.css
│ │ │ ├── Attributes.stories.tsx
│ │ │ └── Attributes.tsx
│ │ ├── BackAndTrinkets
│ │ │ ├── BackAndTrinkets.module.css
│ │ │ ├── BackAndTrinkets.stories.tsx
│ │ │ └── BackAndTrinkets.tsx
│ │ ├── Character
│ │ │ ├── Character.module.css
│ │ │ ├── Character.stories.tsx
│ │ │ └── Character.tsx
│ │ ├── Consumables
│ │ │ ├── Consumables.module.css
│ │ │ ├── Consumables.stories.tsx
│ │ │ └── Consumables.tsx
│ │ ├── Legends
│ │ │ ├── Legends.module.css
│ │ │ ├── Legends.stories.tsx
│ │ │ └── Legends.tsx
│ │ ├── Skills
│ │ │ ├── Skills.module.css
│ │ │ ├── Skills.stories.tsx
│ │ │ └── Skills.tsx
│ │ └── Weapons
│ │ │ ├── Weapons.stories.tsx
│ │ │ └── Weapons.tsx
│ ├── helpers
│ │ ├── DynamicItem
│ │ │ └── DynamicItem.tsx
│ │ ├── HelperIcon
│ │ │ ├── HelperIcon.module.css
│ │ │ ├── HelperIcon.stories.tsx
│ │ │ └── HelperIcon.tsx
│ │ ├── NoSelection
│ │ │ ├── NoSelection.module.css
│ │ │ └── NoSelection.tsx
│ │ ├── Switch
│ │ │ ├── Switch.module.css
│ │ │ └── Switch.tsx
│ │ ├── TextDivider
│ │ │ ├── TextDivider.module.css
│ │ │ ├── TextDivider.stories.tsx
│ │ │ └── TextDivider.tsx
│ │ ├── firstUppercase.js
│ │ ├── iconSizes.ts
│ │ └── useMediaQuery.ts
│ ├── index.ts
│ └── styles
│ │ ├── defaultStyles.module.css
│ │ └── defaultTheme.css
├── tsconfig.json
└── typings.d.ts
├── remark-mdx-gw2ui
├── index.js
├── injectCharacterProps.js
├── map-gw2-ids.js
├── mapping
│ ├── items.js
│ ├── items.json
│ ├── itemstats.js
│ ├── itemstats.json
│ ├── skills.js
│ ├── skills.json
│ ├── specializations.js
│ ├── specializations.json
│ ├── traits.js
│ └── traits.json
└── package.json
├── tsconfig.base.json
└── typeface-menomonia
├── CHANGELOG.md
├── LICENSE
├── README.md
├── files
├── menomonia-italic.eot
├── menomonia-italic.svg
├── menomonia-italic.ttf
├── menomonia-italic.woff
├── menomonia.eot
├── menomonia.svg
├── menomonia.ttf
└── menomonia.woff
├── index.css
└── package.json
/.editorconfig:
--------------------------------------------------------------------------------
1 | # editorconfig.org
2 | root = true
3 |
4 | [*]
5 | indent_style = space
6 | indent_size = 2
7 | end_of_line = lf
8 | charset = utf-8
9 | trim_trailing_whitespace = true
10 | insert_final_newline = true
11 |
12 | [*.html]
13 | indent_style = space
14 | indent_size = 2
15 | trim_trailing_whitespace = true
16 | insert_final_newline = true
17 |
18 | [*.js]
19 | indent_style = space
20 | indent_size = 2
21 | trim_trailing_whitespace = true
22 | insert_final_newline = true
23 |
24 | [*.yaml]
25 | trim_trailing_whitespace = true
26 | indent_style = space
27 | indent_size = 2
28 |
29 | [*.md]
30 | trim_trailing_whitespace = false
31 |
32 | [{Makefile,**.mk}]
33 | indent_style = tab
34 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | * text=auto eol=lf
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | version: 2
2 | updates:
3 | - package-ecosystem: github-actions
4 | directory: /
5 | labels: []
6 | schedule:
7 | interval: monthly
8 | groups:
9 | github-actions:
10 | patterns:
11 | - '*'
12 |
--------------------------------------------------------------------------------
/.github/workflows/test-build.yml:
--------------------------------------------------------------------------------
1 | name: Test Build
2 |
3 | on:
4 | push:
5 | branches:
6 | - main
7 | pull_request:
8 | types: [opened, reopened, synchronize, ready_for_review]
9 | workflow_dispatch:
10 |
11 | concurrency:
12 | group: ${{ github.workflow }}-${{ github.ref }}
13 |
14 | jobs:
15 | test:
16 | if: github.event.pull_request.draft == false
17 | runs-on: ubuntu-latest
18 | timeout-minutes: 5
19 |
20 | steps:
21 | - name: Checkout
22 | uses: actions/checkout@v4
23 | - name: Set up PNPM
24 | uses: pnpm/action-setup@v4
25 | - name: Set up Node
26 | uses: actions/setup-node@v4
27 | with:
28 | node-version: lts/*
29 | cache: pnpm
30 | - name: Install dependencies
31 | run: pnpm install
32 |
33 | - name: Test build
34 | run: pnpm build
35 |
--------------------------------------------------------------------------------
/.npmrc:
--------------------------------------------------------------------------------
1 | engine-strict=true
2 |
--------------------------------------------------------------------------------
/.prettierignore:
--------------------------------------------------------------------------------
1 | dist/
2 | pnpm-lock.yaml
3 | pnpm-workspace.yaml
4 | *.md
5 | /gw2-ui/src/gw2api/typeguards/out/
6 | /gw2-ui/src/gw2api/typeguards/failures/
7 | /gw2apicache/
8 | /remark-mdx-gw2ui/mapping/*.json
9 | **/storybook-static
10 |
--------------------------------------------------------------------------------
/.prettierrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "semi": true,
3 | "singleQuote": true,
4 | "trailingComma": "all",
5 | "endOfLine": "auto"
6 | }
7 |
--------------------------------------------------------------------------------
/deploy-storybook.mjs:
--------------------------------------------------------------------------------
1 | import ghpages from 'gh-pages';
2 | import { access, constants } from 'node:fs/promises';
3 | import path from 'node:path';
4 |
5 | const workspace = path.basename(process.cwd());
6 |
7 | const publish = (dir, options) =>
8 | new Promise((resolve) => ghpages.publish(dir, options, resolve));
9 |
10 | async function deploy() {
11 | try {
12 | await access('storybook-static', constants.R_OK);
13 | } catch {
14 | console.error(
15 | `Please build the ${workspace} storybook before deploying it.`,
16 | );
17 | return;
18 | }
19 |
20 | await publish('../github-pages', {
21 | message: `Update index`,
22 | add: true,
23 | nojekyll: true,
24 | });
25 | console.log('Deployed github-pages folder contents!');
26 |
27 | await publish('storybook-static', {
28 | message: `Update ${workspace}`,
29 | dest: `${workspace}`,
30 | nojekyll: true,
31 | });
32 | console.log(`Deployed ${workspace} storybook!`);
33 | }
34 |
35 | deploy();
36 |
--------------------------------------------------------------------------------
/github-pages/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Redirecting...
5 |
9 |
10 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/globals/README.md:
--------------------------------------------------------------------------------
1 | # @discretize/globals [](https://www.npmjs.com/package/@discretize/globals)
2 |
3 | Contains various globals, mui themes, and other global variables for the Discretize projects.
4 |
5 | ## Installation
6 |
7 | ```
8 | yarn add @discretize/globals
9 | ```
10 |
11 |
--------------------------------------------------------------------------------
/globals/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@discretize/globals",
3 | "version": "3.2.0",
4 | "description": "MUI dependencies, global variables, theme related stuff",
5 | "author": "gw2princeps",
6 | "license": "MIT",
7 | "private": false,
8 | "sideEffects": [
9 | "*.css",
10 | "*.png",
11 | "*.jpg"
12 | ],
13 | "files": [
14 | "dist"
15 | ],
16 | "module": "dist/index.js",
17 | "//types": "dist/index.d.ts",
18 | "scripts": {
19 | "build": "node ../build.mjs",
20 | "prepublish": "pnpm build"
21 | },
22 | "devDependencies": {
23 | "@mui/material": "^6.4.10",
24 | "@mui/styles": "^6.4.8",
25 | "react": "^19.0.0",
26 | "react-dom": "^19.0.0",
27 | "tss-react": "^4.9.16"
28 | },
29 | "peerDependencies": {
30 | "@mui/material": "^5.0.0 || ^6.0.0",
31 | "@mui/styles": "^5.0.0 || ^6.0.0",
32 | "react": "^18.0.0 || ^19.0.0",
33 | "react-dom": "^18.0.0 || ^19.0.0",
34 | "tss-react": "^4.0.0"
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/globals/src/index.ts:
--------------------------------------------------------------------------------
1 | import globals from './styles/globals';
2 | import muiTheme from './styles/muiTheme';
3 | import professionTheme from './styles/professionThemes';
4 | import Layout from './styles/Layout';
5 | import withGw2Theme from './styles/withGw2Theme';
6 |
7 | export { globals, muiTheme, professionTheme, Layout, withGw2Theme };
8 |
--------------------------------------------------------------------------------
/globals/src/styles/Layout.jsx:
--------------------------------------------------------------------------------
1 | import { Box, Container, useMediaQuery, useTheme } from '@mui/material';
2 | import React from 'react';
3 |
4 | const Layout = ({ children, ContainerProps, disableContainer = false }) => {
5 | const theme = useTheme();
6 | const isMobile = useMediaQuery(theme.breakpoints.down('lg'));
7 | return (
8 | <>
9 | {(!disableContainer && !isMobile && (
10 |
11 |
18 | {children}
19 |
20 |
21 | )) || {children}}
22 | >
23 | );
24 | };
25 |
26 | export default Layout;
27 |
--------------------------------------------------------------------------------
/globals/src/styles/defaultStyles.ts:
--------------------------------------------------------------------------------
1 | import { makeStyles } from 'tss-react/mui';
2 |
3 | export const useDefaultStyles = makeStyles()((theme) => ({
4 | gw2Item: {
5 | fontSize: '60px',
6 | [theme.breakpoints.down('sm')]: {
7 | fontSize: '45px',
8 | },
9 | lineHeight: '0.9 !important',
10 | },
11 | title: {
12 | fontSize: '0.8125rem',
13 | fontWeight: 400,
14 | fontFamily: 'Muli',
15 | },
16 | infusions: {
17 | fontSize: '0.8rem',
18 | color: 'rgb(153 153 153)',
19 | },
20 | }));
21 |
--------------------------------------------------------------------------------
/globals/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.base.json",
3 | "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.jsx", "typings.d.ts"]
4 | }
5 |
--------------------------------------------------------------------------------
/globals/typings.d.ts:
--------------------------------------------------------------------------------
1 | declare module '*.module.css';
2 |
--------------------------------------------------------------------------------
/gw2-ui/.storybook/main.js:
--------------------------------------------------------------------------------
1 | import { dirname, join } from 'node:path';
2 |
3 | module.exports = {
4 | stories: ['../src/**/*.stories.tsx'],
5 | addons: [
6 | getAbsolutePath('@storybook/addon-actions'),
7 | getAbsolutePath('@storybook/addon-essentials'),
8 | getAbsolutePath('storybook-css-modules-preset'),
9 | '@storybook/addon-webpack5-compiler-babel',
10 | ],
11 | framework: {
12 | name: getAbsolutePath('@storybook/react-webpack5'),
13 | options: {},
14 | },
15 | docs: {},
16 | typescript: {
17 | reactDocgen: 'react-docgen-typescript',
18 | },
19 | };
20 |
21 | function getAbsolutePath(value) {
22 | return dirname(require.resolve(join(value, 'package.json')));
23 | }
24 |
--------------------------------------------------------------------------------
/gw2-ui/.storybook/preview.js:
--------------------------------------------------------------------------------
1 | import '@discretize/typeface-menomonia';
2 | import '../src/default_style.css';
3 |
4 | export const parameters = {
5 | actions: { argTypesRegex: '^on[A-Z].*' },
6 | controls: {
7 | matchers: {
8 | color: /(background|color)$/i,
9 | date: /Date$/,
10 | },
11 | },
12 | };
13 |
14 | // export const tags = ['autodocs'];
15 |
--------------------------------------------------------------------------------
/gw2-ui/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 Manuel Haag
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/gw2-ui/babel.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "sourceType": "unambiguous",
3 | "presets": [
4 | ["@babel/preset-env", { "targets": "defaults" }],
5 | "@babel/preset-typescript",
6 | ["@babel/preset-react", { "runtime": "automatic" }]
7 | ],
8 | "plugins": []
9 | }
10 |
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/404.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/404.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/500.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/500.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Attribute/AgonyResistance.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Attribute/AgonyResistance.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Attribute/Armor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Attribute/Armor.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Attribute/BoonDuration.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Attribute/BoonDuration.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Attribute/Concentration.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Attribute/Concentration.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Attribute/ConditionDamage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Attribute/ConditionDamage.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Attribute/ConditionDuration.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Attribute/ConditionDuration.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Attribute/CriticalChance.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Attribute/CriticalChance.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Attribute/CriticalDamage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Attribute/CriticalDamage.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Attribute/Expertise.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Attribute/Expertise.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Attribute/Ferocity.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Attribute/Ferocity.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Attribute/GoldFind.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Attribute/GoldFind.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Attribute/HealingPower.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Attribute/HealingPower.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Attribute/Health.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Attribute/Health.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Attribute/KarmaGain.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Attribute/KarmaGain.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Attribute/MagicFind.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Attribute/MagicFind.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Attribute/Power.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Attribute/Power.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Attribute/Precision.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Attribute/Precision.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Attribute/Toughness.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Attribute/Toughness.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Attribute/Vitality.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Attribute/Vitality.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Attribute/XPGain.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Attribute/XPGain.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Augmentation/MistAttunement1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Augmentation/MistAttunement1.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Augmentation/MistAttunement2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Augmentation/MistAttunement2.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Augmentation/MistAttunement3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Augmentation/MistAttunement3.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Augmentation/MistAttunement4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Augmentation/MistAttunement4.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Aura/Chaos.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Aura/Chaos.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Aura/Dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Aura/Dark.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Aura/Fire.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Aura/Fire.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Aura/Frost.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Aura/Frost.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Aura/Light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Aura/Light.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Aura/Magnetic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Aura/Magnetic.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Aura/Shocking.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Aura/Shocking.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Boon/Aegis.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Boon/Aegis.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Boon/Alacrity.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Boon/Alacrity.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Boon/Fury.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Boon/Fury.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Boon/Might.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Boon/Might.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Boon/Protection.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Boon/Protection.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Boon/Quickness.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Boon/Quickness.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Boon/Regeneration.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Boon/Regeneration.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Boon/Resistance.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Boon/Resistance.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Boon/Resolution.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Boon/Resolution.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Boon/Retaliation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Boon/Retaliation.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Boon/Stability.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Boon/Stability.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Boon/Swiftness.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Boon/Swiftness.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Boon/Vigor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Boon/Vigor.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Common/Agony.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Common/Agony.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Common/Barrier.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Common/Barrier.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Common/Blight.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Common/Blight.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Common/Exposed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Common/Exposed.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Common/Invulnerability.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Common/Invulnerability.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Common/ReinforcedArmor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Common/ReinforcedArmor.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Common/Revealed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Common/Revealed.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Common/RigorousCertainty.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Common/RigorousCertainty.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Common/Stealth.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Common/Stealth.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Common/StunBreak.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Common/StunBreak.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Common/Superspeed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Common/Superspeed.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Common/Unblockable.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Common/Unblockable.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Condition/Bleeding.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Condition/Bleeding.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Condition/Blinded.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Condition/Blinded.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Condition/Burning.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Condition/Burning.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Condition/Chilled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Condition/Chilled.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Condition/Confusion.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Condition/Confusion.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Condition/Crippled.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Condition/Crippled.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Condition/Fear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Condition/Fear.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Condition/Immobile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Condition/Immobile.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Condition/Poisoned.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Condition/Poisoned.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Condition/Slow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Condition/Slow.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Condition/Taunt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Condition/Taunt.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Condition/Torment.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Condition/Torment.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Condition/Vulnerability.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Condition/Vulnerability.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Condition/Weakness.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Condition/Weakness.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Consumable/Enhancement.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Consumable/Enhancement.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Consumable/Nourishment.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Consumable/Nourishment.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Control/Daze.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Control/Daze.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Control/Float.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Control/Float.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Control/Knockback.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Control/Knockback.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Control/Knockdown.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Control/Knockdown.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Control/Launch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Control/Launch.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Control/Pull.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Control/Pull.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Control/Push.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Control/Push.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Control/Sink.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Control/Sink.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Control/Stun.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Control/Stun.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Empty.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Empty.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Lock.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Lock.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/MistlockInstability/AdrenalineRush.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/MistlockInstability/AdrenalineRush.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/MistlockInstability/Afflicted.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/MistlockInstability/Afflicted.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/MistlockInstability/BoonOverload.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/MistlockInstability/BoonOverload.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/MistlockInstability/FluxBomb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/MistlockInstability/FluxBomb.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/MistlockInstability/FractalVindicators.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/MistlockInstability/FractalVindicators.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/MistlockInstability/Frailty.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/MistlockInstability/Frailty.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/MistlockInstability/Hamstrung.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/MistlockInstability/Hamstrung.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/MistlockInstability/LastLaugh.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/MistlockInstability/LastLaugh.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/MistlockInstability/MistsConvergence.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/MistlockInstability/MistsConvergence.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/MistlockInstability/NoPainNoGain.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/MistlockInstability/NoPainNoGain.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/MistlockInstability/Outflanked.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/MistlockInstability/Outflanked.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/MistlockInstability/SocialAwkwardness.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/MistlockInstability/SocialAwkwardness.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/MistlockInstability/StickTogether.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/MistlockInstability/StickTogether.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/MistlockInstability/SugarRush.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/MistlockInstability/SugarRush.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/MistlockInstability/ToxicSickness.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/MistlockInstability/ToxicSickness.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/MistlockInstability/ToxicTrail.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/MistlockInstability/ToxicTrail.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/MistlockInstability/Vengeance.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/MistlockInstability/Vengeance.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/MistlockInstability/WeBleedFire.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/MistlockInstability/WeBleedFire.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Profession/Berserker.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Profession/Berserker.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Profession/Bladesworn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Profession/Bladesworn.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Profession/Catalyst.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Profession/Catalyst.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Profession/Chronomancer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Profession/Chronomancer.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Profession/Daredevil.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Profession/Daredevil.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Profession/Deadeye.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Profession/Deadeye.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Profession/Dragonhunter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Profession/Dragonhunter.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Profession/Druid.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Profession/Druid.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Profession/Elementalist.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Profession/Elementalist.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Profession/Engineer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Profession/Engineer.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Profession/Firebrand.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Profession/Firebrand.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Profession/Guardian.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Profession/Guardian.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Profession/Harbinger.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Profession/Harbinger.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Profession/Herald.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Profession/Herald.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Profession/Holosmith.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Profession/Holosmith.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Profession/Mechanist.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Profession/Mechanist.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Profession/Mesmer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Profession/Mesmer.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Profession/Mirage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Profession/Mirage.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Profession/Necromancer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Profession/Necromancer.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Profession/Ranger.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Profession/Ranger.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Profession/Reaper.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Profession/Reaper.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Profession/Renegade.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Profession/Renegade.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Profession/Revenant.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Profession/Revenant.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Profession/Scourge.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Profession/Scourge.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Profession/Scrapper.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Profession/Scrapper.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Profession/Soulbeast.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Profession/Soulbeast.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Profession/Specter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Profession/Specter.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Profession/Spellbreaker.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Profession/Spellbreaker.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Profession/Tempest.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Profession/Tempest.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Profession/Thief.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Profession/Thief.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Profession/Untamed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Profession/Untamed.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Profession/Vindicator.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Profession/Vindicator.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Profession/Virtuoso.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Profession/Virtuoso.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Profession/Warrior.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Profession/Warrior.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Profession/Weaver.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Profession/Weaver.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Profession/Willbender.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Profession/Willbender.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Race/Asura.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Race/Asura.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Race/Charr.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Race/Charr.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Race/Human.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Race/Human.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Race/Norn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Race/Norn.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Race/Sylvari.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Race/Sylvari.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Reset.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Reset.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Weapon/Axe.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Weapon/Axe.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Weapon/Focus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Weapon/Focus.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Weapon/Greatsword.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Weapon/Greatsword.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Weapon/Hammer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Weapon/Hammer.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Weapon/HarpoonGun.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Weapon/HarpoonGun.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Weapon/Longbow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Weapon/Longbow.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Weapon/Mace.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Weapon/Mace.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Weapon/Pistol.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Weapon/Pistol.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Weapon/Rifle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Weapon/Rifle.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Weapon/Scepter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Weapon/Scepter.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Weapon/Shield.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Weapon/Shield.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Weapon/ShortBow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Weapon/ShortBow.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Weapon/Spear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Weapon/Spear.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Weapon/Staff.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Weapon/Staff.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Weapon/Sword.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Weapon/Sword.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Weapon/Torch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Weapon/Torch.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Weapon/Trident.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Weapon/Trident.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/Weapon/Warhorn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/Weapon/Warhorn.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/icons/WeaponSwap.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/icons/WeaponSwap.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/tooltip-background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/tooltip-background.png
--------------------------------------------------------------------------------
/gw2-ui/src/assets/trait-line-connector.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/assets/trait-line-connector.png
--------------------------------------------------------------------------------
/gw2-ui/src/builder/attributes.ts:
--------------------------------------------------------------------------------
1 | import type GW2ApiAttribute from '../gw2api/types/common/attribute';
2 | import type ValueOf from './valueOf';
3 |
4 | export type Attribute = ValueOf;
5 |
6 | export interface Attributes {
7 | POWER: GW2ApiAttribute;
8 | PRECISION: GW2ApiAttribute;
9 | TOUGHNESS: GW2ApiAttribute;
10 | VITALITY: GW2ApiAttribute;
11 | CONCENTRATION: GW2ApiAttribute;
12 | CONDITION_DAMAGE: GW2ApiAttribute;
13 | EXPERTISE: GW2ApiAttribute;
14 | FEROCITY: GW2ApiAttribute;
15 | HEALING_POWER: GW2ApiAttribute;
16 | }
17 |
18 | const attributes: Record = {
19 | POWER: 'Power',
20 | PRECISION: 'Precision',
21 | TOUGHNESS: 'Toughness',
22 | VITALITY: 'Vitality',
23 | CONCENTRATION: 'BoonDuration',
24 | CONDITION_DAMAGE: 'ConditionDamage',
25 | EXPERTISE: 'ConditionDuration',
26 | FEROCITY: 'CritDamage',
27 | HEALING_POWER: 'Healing',
28 | };
29 |
30 | export default attributes;
31 |
--------------------------------------------------------------------------------
/gw2-ui/src/builder/index.ts:
--------------------------------------------------------------------------------
1 | export { default as createItem } from './createItem';
2 |
3 | export { default as attributes } from './attributes';
4 | export { default as itemArmorWeights } from './itemArmorWeights';
5 | export { default as itemCategories } from './itemCategories';
6 | export { default as itemCategoryNames } from './itemCategoryNames';
7 | export { default as itemModifiers } from './itemModifiers';
8 | export { default as itemRarities } from './itemRarities';
9 | export { default as itemStatNames } from './itemStatNames';
10 | export { default as itemStats } from './itemStats';
11 | export { default as itemStatTypes } from './itemStatTypes';
12 | export { default as itemTypeNames } from './itemTypeNames';
13 |
--------------------------------------------------------------------------------
/gw2-ui/src/builder/itemArmorWeights.ts:
--------------------------------------------------------------------------------
1 | import type ValueOf from './valueOf';
2 |
3 | export type ItemArmorWeight = ValueOf;
4 |
5 | export interface ItemArmorWeights {
6 | HEAVY: string;
7 | MEDIUM: string;
8 | LIGHT: string;
9 | }
10 |
11 | const itemArmorWeights: ItemArmorWeights = {
12 | HEAVY: 'Heavy',
13 | MEDIUM: 'Medium',
14 | LIGHT: 'Light',
15 | };
16 |
17 | export default itemArmorWeights;
18 |
--------------------------------------------------------------------------------
/gw2-ui/src/builder/itemCategories.ts:
--------------------------------------------------------------------------------
1 | import ITEM_CATEGORY_NAMES, {
2 | type ItemCategoryName,
3 | } from './itemCategoryNames';
4 | import ITEM_TYPE_NAMES, { type ItemTypeNames } from './itemTypeNames';
5 | import type ValueOf from './valueOf';
6 |
7 | export type ItemCategory = ValueOf[];
8 |
9 | export interface ItemCategories {
10 | [itemCategoryName: ItemCategoryName]: ItemCategory;
11 | }
12 |
13 | const itemCategories: ItemCategories = {
14 | [ITEM_CATEGORY_NAMES.ARMOR]: [
15 | ITEM_TYPE_NAMES.HELM,
16 | ITEM_TYPE_NAMES.SHOULDERS,
17 | ITEM_TYPE_NAMES.COAT,
18 | ITEM_TYPE_NAMES.GLOVES,
19 | ITEM_TYPE_NAMES.LEGGINGS,
20 | ITEM_TYPE_NAMES.BOOTS,
21 | ],
22 |
23 | [ITEM_CATEGORY_NAMES.TRINKET]: [
24 | ITEM_TYPE_NAMES.ACCESSORY,
25 | ITEM_TYPE_NAMES.AMULET,
26 | ITEM_TYPE_NAMES.RING,
27 | ],
28 |
29 | [ITEM_CATEGORY_NAMES.BACK]: [ITEM_TYPE_NAMES.BACK_ITEM],
30 |
31 | [ITEM_CATEGORY_NAMES.WEAPON]: [
32 | ITEM_TYPE_NAMES.GREATSWORD,
33 | ITEM_TYPE_NAMES.HAMMER,
34 | ITEM_TYPE_NAMES.LONGBOW,
35 | ITEM_TYPE_NAMES.RIFLE,
36 | ITEM_TYPE_NAMES.SHORT_BOW,
37 | ITEM_TYPE_NAMES.STAFF,
38 |
39 | ITEM_TYPE_NAMES.AXE,
40 | ITEM_TYPE_NAMES.DAGGER,
41 | ITEM_TYPE_NAMES.MACE,
42 | ITEM_TYPE_NAMES.PISTOL,
43 | ITEM_TYPE_NAMES.SWORD,
44 |
45 | ITEM_TYPE_NAMES.SCEPTER,
46 |
47 | ITEM_TYPE_NAMES.FOCUS,
48 | ITEM_TYPE_NAMES.SHIELD,
49 | ITEM_TYPE_NAMES.TORCH,
50 | ITEM_TYPE_NAMES.WARHORN,
51 |
52 | ITEM_TYPE_NAMES.HARPOON,
53 | ITEM_TYPE_NAMES.SPEARGUN,
54 | ITEM_TYPE_NAMES.TRIDENT,
55 | ],
56 | };
57 |
58 | export default itemCategories;
59 |
--------------------------------------------------------------------------------
/gw2-ui/src/builder/itemCategoryNames.ts:
--------------------------------------------------------------------------------
1 | import type ValueOf from './valueOf';
2 |
3 | export type ItemCategoryName = ValueOf;
4 |
5 | export interface ItemCategoryNames {
6 | ARMOR: string;
7 | TRINKET: string;
8 | BACK: string;
9 | WEAPON: string;
10 | }
11 |
12 | const itemCategoryNames: ItemCategoryNames = {
13 | ARMOR: 'Armor',
14 | TRINKET: 'Trinket',
15 | BACK: 'Back',
16 | WEAPON: 'Weapon',
17 | };
18 |
19 | export default itemCategoryNames;
20 |
--------------------------------------------------------------------------------
/gw2-ui/src/builder/itemRarities.ts:
--------------------------------------------------------------------------------
1 | import type ValueOf from './valueOf';
2 |
3 | export type ItemRarity = ValueOf;
4 |
5 | export interface ItemRarities {
6 | LEGENDARY: string;
7 | ASCENDED: string;
8 | EXOTIC: string;
9 | RARE: string;
10 | MASTERWORK: string;
11 | FINE: string;
12 | BASIC: string;
13 | }
14 |
15 | const itemRarities: ItemRarities = {
16 | LEGENDARY: 'Legendary',
17 | ASCENDED: 'Ascended',
18 | EXOTIC: 'Exotic',
19 | RARE: 'Rare',
20 | MASTERWORK: 'Masterwork',
21 | FINE: 'Fine',
22 | BASIC: 'Basic',
23 | };
24 |
25 | export default itemRarities;
26 |
--------------------------------------------------------------------------------
/gw2-ui/src/builder/itemStatTypes.ts:
--------------------------------------------------------------------------------
1 | import type ValueOf from './valueOf';
2 |
3 | export type ItemStatType = ValueOf;
4 |
5 | export interface ItemStatTypes {
6 | TRIPLE: string;
7 | QUADRUPLE: string;
8 | ALL: string;
9 | }
10 |
11 | const itemStatTypes: ItemStatTypes = {
12 | TRIPLE: 'Triple',
13 | QUADRUPLE: 'Quadruple',
14 | ALL: 'All',
15 | };
16 |
17 | export default itemStatTypes;
18 |
--------------------------------------------------------------------------------
/gw2-ui/src/builder/itemTypeNames.ts:
--------------------------------------------------------------------------------
1 | import type ValueOf from './valueOf';
2 |
3 | export type ItemTypeName = ValueOf;
4 |
5 | export interface ItemTypeNames {
6 | HELM: string;
7 | SHOULDERS: string;
8 | COAT: string;
9 | GLOVES: string;
10 | LEGGINGS: string;
11 | BOOTS: string;
12 |
13 | ACCESSORY: string;
14 | AMULET: string;
15 | RING: string;
16 |
17 | BACK_ITEM: string;
18 |
19 | GREATSWORD: string;
20 | HAMMER: string;
21 | LONGBOW: string;
22 | RIFLE: string;
23 | SHORT_BOW: string;
24 | STAFF: string;
25 |
26 | AXE: string;
27 | DAGGER: string;
28 | MACE: string;
29 | PISTOL: string;
30 | SWORD: string;
31 |
32 | SCEPTER: string;
33 |
34 | FOCUS: string;
35 | SHIELD: string;
36 | TORCH: string;
37 | WARHORN: string;
38 |
39 | HARPOON: string;
40 | SPEARGUN: string;
41 | TRIDENT: string;
42 | }
43 |
44 | const itemTypeNames: ItemTypeNames = {
45 | HELM: 'Helm',
46 | SHOULDERS: 'Shoulders',
47 | COAT: 'Coat',
48 | GLOVES: 'Gloves',
49 | LEGGINGS: 'Leggings',
50 | BOOTS: 'Boots',
51 |
52 | ACCESSORY: 'Accessory',
53 | AMULET: 'Amulet',
54 | RING: 'Ring',
55 |
56 | BACK_ITEM: 'Back Item',
57 |
58 | GREATSWORD: 'Greatsword',
59 | HAMMER: 'Hammer',
60 | LONGBOW: 'Longbow',
61 | RIFLE: 'Rifle',
62 | SHORT_BOW: 'Short Bow',
63 | STAFF: 'Staff',
64 |
65 | AXE: 'Axe',
66 | DAGGER: 'Dagger',
67 | MACE: 'Mace',
68 | PISTOL: 'Pistol',
69 | SWORD: 'Sword',
70 |
71 | SCEPTER: 'Scepter',
72 |
73 | FOCUS: 'Focus',
74 | SHIELD: 'Shield',
75 | TORCH: 'Torch',
76 | WARHORN: 'Warhorn',
77 |
78 | HARPOON: 'Harpoon',
79 | SPEARGUN: 'Speargun',
80 | TRIDENT: 'Trident',
81 | };
82 |
83 | export default itemTypeNames;
84 |
--------------------------------------------------------------------------------
/gw2-ui/src/builder/valueOf.ts:
--------------------------------------------------------------------------------
1 | type ValueOf = T[keyof T];
2 |
3 | export default ValueOf;
4 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/AbilityDetails/AbilityDetails.module.css:
--------------------------------------------------------------------------------
1 | .mb8 {
2 | margin-bottom: 8px;
3 | }
4 | .detailsText {
5 | color: var(--gw2-color-details-ability-type);
6 | }
7 | .mt12 {
8 | margin-top: 12px;
9 | }
10 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/Attribute/Attribute.stories.tsx:
--------------------------------------------------------------------------------
1 | import type { Meta, StoryFn, StoryObj } from '@storybook/react';
2 | import React from 'react';
3 | import Attribute from './Attribute';
4 |
5 | const meta: Meta = {
6 | title: 'Components/Attribute',
7 | component: Attribute,
8 | argTypes: {
9 | className: { control: false },
10 | },
11 | };
12 | export default meta;
13 |
14 | const Template: StoryFn = (args) => {
15 | return ;
16 | };
17 |
18 | export const BoonDuration: StoryObj = {
19 | render: Template,
20 |
21 | args: {
22 | name: 'Boon Duration',
23 | },
24 | };
25 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/Augmentation/Augmentation.stories.tsx:
--------------------------------------------------------------------------------
1 | import type { Meta, StoryFn, StoryObj } from '@storybook/react';
2 | import React from 'react';
3 | import Augmentation from './Augmentation';
4 |
5 | const meta: Meta = {
6 | title: 'Components/Augmentation',
7 | component: Augmentation,
8 | argTypes: {
9 | className: { control: false },
10 | },
11 | };
12 | export default meta;
13 |
14 | const Template: StoryFn = (args) => {
15 | return ;
16 | };
17 |
18 | export const God: StoryObj = {
19 | render: Template,
20 |
21 | args: {
22 | name: 'Mist Attunement 4',
23 | },
24 | };
25 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/Augmentation/Augmentation.tsx:
--------------------------------------------------------------------------------
1 | import React, { type CSSProperties, type ReactElement } from 'react';
2 | import { type AugmentationsTypes } from '../../data/augmentations';
3 | import { translate, useAPILanguage } from '../../i18n';
4 | import {
5 | TRANSLATIONS_AUGMENTATIONS,
6 | TRANSLATIONS_AUGMENTATION_DESCRIPTIONS,
7 | } from '../../i18n/augmentations';
8 | import Effect from '../Effect/Effect';
9 |
10 | export interface AugmentationProps {
11 | name: AugmentationsTypes;
12 | disableTooltip?: boolean;
13 | disableText?: boolean;
14 | disableLink?: boolean;
15 | disableIcon?: boolean;
16 | className?: string;
17 | style?: CSSProperties;
18 | }
19 |
20 | const Augmentation = (props: AugmentationProps): ReactElement => {
21 | const { name } = props;
22 | const language = useAPILanguage();
23 |
24 | const translation = translate(TRANSLATIONS_AUGMENTATIONS, name, language);
25 | const description = translate(
26 | TRANSLATIONS_AUGMENTATION_DESCRIPTIONS,
27 | name,
28 | language,
29 | );
30 |
31 | return (
32 |
39 | );
40 | };
41 |
42 | export default Augmentation;
43 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/Aura/Aura.tsx:
--------------------------------------------------------------------------------
1 | import React, { type CSSProperties, type ReactElement } from 'react';
2 | import Effect from '../Effect/Effect';
3 | import { type AuraTypes } from '../../data/auras';
4 | import { translate, useAPILanguage } from '../../i18n';
5 | import {
6 | TRANSLATIONS_AURAS,
7 | TRANSLATIONS_AURA_DESCRIPTIONS,
8 | } from '../../i18n/auras';
9 |
10 | export interface AuraProps {
11 | name: AuraTypes;
12 | disableTooltip?: boolean;
13 | disableText?: boolean;
14 | disableLink?: boolean;
15 | disableIcon?: boolean;
16 | className?: string;
17 | style?: CSSProperties;
18 | }
19 |
20 | const Aura = (props: AuraProps): ReactElement => {
21 | const { name } = props;
22 | const language = useAPILanguage();
23 |
24 | const translation = translate(TRANSLATIONS_AURAS, name, language);
25 | const description = translate(TRANSLATIONS_AURA_DESCRIPTIONS, name, language);
26 |
27 | return (
28 |
35 | );
36 | };
37 |
38 | export default Aura;
39 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/Aura/Auras.stories.tsx:
--------------------------------------------------------------------------------
1 | import type { Meta, StoryFn, StoryObj } from '@storybook/react';
2 | import React from 'react';
3 | import Aura from './Aura';
4 |
5 | const meta: Meta = {
6 | title: 'Components/Aura',
7 | component: Aura,
8 | argTypes: {
9 | className: { control: false },
10 | },
11 | };
12 | export default meta;
13 |
14 | const Template: StoryFn = (args) => {
15 | return ;
16 | };
17 |
18 | export const Simple: StoryObj = {
19 | render: Template,
20 |
21 | args: {
22 | name: 'Light',
23 | },
24 | };
25 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/Boon/Boon.stories.tsx:
--------------------------------------------------------------------------------
1 | import type { Meta, StoryFn, StoryObj } from '@storybook/react';
2 | import React from 'react';
3 | import Boon from './Boon';
4 |
5 | const meta: Meta = {
6 | title: 'Components/Boon',
7 | component: Boon,
8 | argTypes: {
9 | className: { control: false },
10 | },
11 | };
12 | export default meta;
13 |
14 | const Template: StoryFn = (args) => {
15 | return ;
16 | };
17 |
18 | export const BoonMight: StoryObj = {
19 | render: Template,
20 |
21 | args: {
22 | name: 'Might',
23 | },
24 | };
25 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/Boon/Boon.tsx:
--------------------------------------------------------------------------------
1 | import React, { type CSSProperties, type ReactElement } from 'react';
2 | import { type BoonsTypes } from '../../data/boons';
3 | import { translate, useAPILanguage } from '../../i18n';
4 | import {
5 | TRANSLATIONS_BOONS,
6 | TRANSLATIONS_BOON_DESCRIPTIONS,
7 | } from '../../i18n/boons';
8 | import Effect from '../Effect/Effect';
9 |
10 | export interface BoonProps {
11 | name: BoonsTypes;
12 | count?: number;
13 | disableTooltip?: boolean;
14 | disableText?: boolean;
15 | disableLink?: boolean;
16 | disableIcon?: boolean;
17 | className?: string;
18 | style?: CSSProperties;
19 | }
20 |
21 | const Boon = (props: BoonProps): ReactElement => {
22 | const { name, count = 1 } = props;
23 | const language = useAPILanguage();
24 |
25 | const translation = translate(TRANSLATIONS_BOONS, name, language);
26 | const description = translate(TRANSLATIONS_BOON_DESCRIPTIONS, name, language);
27 |
28 | return (
29 |
37 | );
38 | };
39 |
40 | export default Boon;
41 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/Coin/Coin.module.css:
--------------------------------------------------------------------------------
1 | .root {
2 | font-family: var(--gw2-font);
3 | font-weight: var(--gw2-font-weight-body);
4 | line-height: var(--gw2-line-height-body);
5 | }
6 |
7 | .gold {
8 | color: var(--gw2-color-gold);
9 | }
10 | .silver {
11 | color: var(--gw2-color-silver);
12 | }
13 | .copper {
14 | color: var(--gw2-color-copper);
15 | }
16 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/Coin/Coin.stories.tsx:
--------------------------------------------------------------------------------
1 | import type { Meta, StoryFn, StoryObj } from '@storybook/react';
2 | import React from 'react';
3 | import Coin from './Coin';
4 |
5 | const meta: Meta = {
6 | title: 'Components/Coin',
7 | component: Coin,
8 | argTypes: {
9 | className: { control: false },
10 | },
11 | };
12 | export default meta;
13 |
14 | const Template: StoryFn = (args) => {
15 | return ;
16 | };
17 |
18 | export const CoinMight: StoryObj = {
19 | render: Template,
20 |
21 | args: {
22 | value: 1234123,
23 | },
24 | };
25 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/CommonEffect/CommonEffect.stories.tsx:
--------------------------------------------------------------------------------
1 | import type { Meta, StoryFn, StoryObj } from '@storybook/react';
2 | import React from 'react';
3 | import { APILanguageProvider } from '../../i18n';
4 | import CommonEffect from './CommonEffect';
5 |
6 | const meta: Meta = {
7 | title: 'Components/CommonEffect',
8 | component: CommonEffect,
9 | argTypes: {
10 | className: { control: false },
11 | },
12 | };
13 | export default meta;
14 |
15 | const Template: StoryFn = (args) => {
16 | return ;
17 | };
18 |
19 | export const Simple: StoryObj = {
20 | render: Template,
21 |
22 | args: {
23 | name: 'Agony',
24 | },
25 | };
26 |
27 | export function Translated() {
28 | return (
29 | <>
30 | This is an english effect: ,{' '}
31 |
32 |
33 |
34 | This is a german effect:
35 | ,{' '}
36 |
37 |
38 |
39 | >
40 | );
41 | }
42 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/CommonEffect/CommonEffect.tsx:
--------------------------------------------------------------------------------
1 | import React, { type CSSProperties, type ReactElement } from 'react';
2 |
3 | import Effect from '../Effect/Effect';
4 |
5 | import { type CommonEffectTypes } from '../../data/commonEffects';
6 | import { useTranslation } from '../../i18n/index';
7 | import {
8 | COMMON_EFFECTS,
9 | COMMON_EFFECTS_DESCRIPTIONS,
10 | } from '../../i18n/commonEffects';
11 |
12 | export interface CommonEffectProps {
13 | name: CommonEffectTypes | 'Mistlock Singularity';
14 | disableTooltip?: boolean;
15 | disableText?: boolean;
16 | disableLink?: boolean;
17 | disableIcon?: boolean;
18 | className?: string;
19 | style?: CSSProperties;
20 | }
21 |
22 | const CommonEffect = ({
23 | name: propsName,
24 | disableTooltip,
25 | disableText,
26 | disableLink,
27 | disableIcon,
28 | className,
29 | style,
30 | }: CommonEffectProps): ReactElement => {
31 | const name =
32 | propsName === 'Mistlock Singularity' ? 'Rigorous Certainty' : propsName;
33 |
34 | const nameTranslated = useTranslation(COMMON_EFFECTS, name);
35 | const descriptionTranslated = useTranslation(
36 | COMMON_EFFECTS_DESCRIPTIONS,
37 | name,
38 | );
39 |
40 | return (
41 |
53 | );
54 | };
55 |
56 | export default CommonEffect;
57 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/Condition/Condition.stories.tsx:
--------------------------------------------------------------------------------
1 | import type { Meta, StoryFn, StoryObj } from '@storybook/react';
2 | import React from 'react';
3 | import Condition from './Condition';
4 |
5 | const meta: Meta = {
6 | title: 'Components/Condition',
7 | component: Condition,
8 | argTypes: {
9 | className: { control: false },
10 | },
11 | };
12 | export default meta;
13 |
14 | const Template: StoryFn = (args) => {
15 | return ;
16 | };
17 |
18 | export const Bleed: StoryObj = {
19 | render: Template,
20 |
21 | args: {
22 | name: 'Bleeding',
23 | },
24 | };
25 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/Condition/Condition.tsx:
--------------------------------------------------------------------------------
1 | import React, { type CSSProperties, type ReactElement } from 'react';
2 |
3 | import Effect from '../Effect/Effect';
4 |
5 | import { type ConditionTypes } from '../../data/conditions';
6 | import { useTranslation } from '../../i18n';
7 | import { CONDITIONS, CONDITIONS_DESCRIPTIONS } from '../../i18n/conditions';
8 |
9 | export interface ConditionProps {
10 | name: ConditionTypes;
11 | count?: number;
12 | disableTooltip?: boolean;
13 | disableText?: boolean;
14 | disableLink?: boolean;
15 | disableIcon?: boolean;
16 | className?: string;
17 | style?: CSSProperties;
18 | }
19 |
20 | const Condition = ({
21 | name,
22 | count = 1,
23 | disableTooltip,
24 | disableText,
25 | disableLink,
26 | disableIcon,
27 | className,
28 | style,
29 | }: ConditionProps): ReactElement => {
30 | const nameTranslated = useTranslation(CONDITIONS, name);
31 | const descriptionTranslated = useTranslation(CONDITIONS_DESCRIPTIONS, name);
32 |
33 | return (
34 |
47 | );
48 | };
49 |
50 | export default Condition;
51 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/ConsumableEffect/ConsumableEffect.stories.tsx:
--------------------------------------------------------------------------------
1 | import type { Meta, StoryFn, StoryObj } from '@storybook/react';
2 | import React from 'react';
3 | import ConsumableEffect from './ConsumableEffect';
4 |
5 | const meta: Meta = {
6 | title: 'Components/ConsumableEffect',
7 | component: ConsumableEffect,
8 | argTypes: {
9 | className: { control: false },
10 | },
11 | };
12 | export default meta;
13 |
14 | const Template: StoryFn = (args) => {
15 | return ;
16 | };
17 |
18 | export const Simple: StoryObj = {
19 | render: Template,
20 |
21 | args: {
22 | name: 'Enhancement',
23 | },
24 | };
25 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/ConsumableEffect/ConsumableEffect.tsx:
--------------------------------------------------------------------------------
1 | import React, { type CSSProperties, type ReactElement } from 'react';
2 |
3 | import Effect from '../Effect/Effect';
4 |
5 | import consumableEffects, {
6 | type ConsumableEffectTypes,
7 | } from '../../data/consumableEffects';
8 |
9 | export interface ConsumableEffectProps {
10 | name: ConsumableEffectTypes;
11 | text?: string;
12 | disableTooltip?: boolean;
13 | disableText?: boolean;
14 | disableLink?: boolean;
15 | disableIcon?: boolean;
16 | className?: string;
17 | style?: CSSProperties;
18 | }
19 |
20 | const ConsumableEffect = ({
21 | name,
22 | text,
23 | disableTooltip = true,
24 | disableText,
25 | disableLink,
26 | disableIcon,
27 | className,
28 | style,
29 | }: ConsumableEffectProps): ReactElement => {
30 | return (
31 |
43 | );
44 | };
45 |
46 | export default ConsumableEffect;
47 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/ControlEffect/ControlEffect.stories.tsx:
--------------------------------------------------------------------------------
1 | import type { Meta, StoryFn, StoryObj } from '@storybook/react';
2 | import React from 'react';
3 | import ControlEffect from './ControlEffect';
4 | import { APILanguageProvider } from '../../i18n';
5 |
6 | const meta: Meta = {
7 | title: 'Components/ControlEffect',
8 | component: ControlEffect,
9 | argTypes: {
10 | className: { control: false },
11 | },
12 | };
13 | export default meta;
14 |
15 | const Template: StoryFn = (args) => {
16 | return ;
17 | };
18 |
19 | export const Daze: StoryObj = {
20 | render: Template,
21 |
22 | args: {
23 | name: 'Daze',
24 | },
25 | };
26 |
27 | export function Translated() {
28 | return (
29 | <>
30 | This is an english effect: ,{' '}
31 |
32 |
33 |
34 | This is a german effect:
35 | ,
36 |
37 |
38 | >
39 | );
40 | }
41 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/ControlEffect/ControlEffect.tsx:
--------------------------------------------------------------------------------
1 | import React, { type CSSProperties, type ReactElement } from 'react';
2 |
3 | import Effect from '../Effect/Effect';
4 |
5 | import { type ControlEffectTypes } from '../../data/controlEffects';
6 | import {
7 | CONTROL_EFFECTS,
8 | CONTROL_EFFECTS_DESCRIPTIONS,
9 | } from '../../i18n/controlEffects';
10 | import { useTranslation } from '../../i18n';
11 |
12 | export interface ControlEffectProps {
13 | name: ControlEffectTypes;
14 | disableTooltip?: boolean;
15 | disableText?: boolean;
16 | disableLink?: boolean;
17 | disableIcon?: boolean;
18 | className?: string;
19 | style?: CSSProperties;
20 | }
21 |
22 | const ControlEffect = ({
23 | name,
24 | disableTooltip,
25 | disableText,
26 | disableLink,
27 | disableIcon,
28 | className,
29 | style,
30 | }: ControlEffectProps): ReactElement => {
31 | const nameTranslated = useTranslation(CONTROL_EFFECTS, name);
32 | const descriptionTranslated = useTranslation(
33 | CONTROL_EFFECTS_DESCRIPTIONS,
34 | name,
35 | );
36 |
37 | return (
38 |
50 | );
51 | };
52 |
53 | export default ControlEffect;
54 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/CreateItem/CreateItem.stories.tsx:
--------------------------------------------------------------------------------
1 | import type { Meta, StoryFn, StoryObj } from '@storybook/react';
2 | import ITEM_ARMOR_WEIGHTS from '../../builder/itemArmorWeights';
3 | import ITEM_RARITIES from '../../builder/itemRarities';
4 | import ITEM_STAT_NAMES from '../../builder/itemStatNames';
5 | import ITEM_TYPE_NAMES from '../../builder/itemTypeNames';
6 | import CreateItem from './CreateItem';
7 |
8 | const meta: Meta = {
9 | title: 'Components/CreateItem',
10 | component: CreateItem,
11 | argTypes: {
12 | className: { control: false },
13 | type: {
14 | control: { type: 'select' },
15 | options: Object.values(ITEM_TYPE_NAMES),
16 | },
17 | stat: {
18 | control: { type: 'select' },
19 | options: Object.values(ITEM_STAT_NAMES),
20 | },
21 | weight: {
22 | control: { type: 'select' },
23 | options: Object.values(ITEM_ARMOR_WEIGHTS),
24 | },
25 | rarity: {
26 | control: { type: 'select' },
27 | options: Object.values(ITEM_RARITIES),
28 | },
29 | text: {
30 | control: { type: 'text' },
31 | },
32 | },
33 | };
34 | export default meta;
35 |
36 | const Template: StoryFn = (args) => {
37 | return ;
38 | };
39 |
40 | export const Single: StoryObj = {
41 | render: Template,
42 |
43 | args: {
44 | type: 'Mace',
45 | stat: 'Berserker',
46 | upgrades: [86303, 86303],
47 | },
48 | };
49 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/DetailsFact/DetailsFact.module.css:
--------------------------------------------------------------------------------
1 | .factRoot {
2 | display: flex;
3 | flex-direction: row;
4 | align-items: flex-start;
5 | }
6 |
7 | .factIconWrapper {
8 | display: flex;
9 | flex-direction: row;
10 | font-size: 30px;
11 | }
12 |
13 | .factIcon {
14 | margin-right: 0px;
15 | }
16 |
17 | .factText {
18 | margin-left: 4px;
19 | color: var(--gw2-color-details-muted);
20 | align-self: center;
21 | }
22 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/DetailsHeader/DetailsHeader.module.css:
--------------------------------------------------------------------------------
1 | .root {
2 | display: flex;
3 | flex-direction: row;
4 | margin-bottom: 3px;
5 | }
6 |
7 | .icon {
8 | font-size: 32px;
9 | margin-right: 6px;
10 | border: 1px solid #cfd0d0;
11 | border-radius: 0px;
12 | }
13 |
14 | .flagsRoot {
15 | margin-left: 6px;
16 | }
17 |
18 | .flagsIcon {
19 | margin-left: 2px;
20 | }
21 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/DetailsHeader/DetailsHeader.tsx:
--------------------------------------------------------------------------------
1 | import clsx from 'clsx';
2 | import React, { type PropsWithChildren, type ReactElement } from 'react';
3 | import DetailsHeaderTitle from '../DetailsHeaderTitle/DetailsHeaderTitle';
4 | import Icon, { type IconProps } from '../Icon/Icon';
5 | import css from './DetailsHeader.module.css';
6 |
7 | export interface DetailsHeaderFlagProps {
8 | icon: string;
9 | value: number | any;
10 | }
11 |
12 | export interface DetailsHeaderProps {
13 | icon?: string;
14 | iconProps?: Partial;
15 | titleClassName?: string;
16 | flags?: DetailsHeaderFlagProps[];
17 | className?: string;
18 | }
19 |
20 | const DetailsHeader = ({
21 | icon,
22 | iconProps,
23 | titleClassName,
24 | flags,
25 | children,
26 | className,
27 | }: PropsWithChildren): ReactElement => {
28 | return (
29 |
30 | {typeof icon === 'string' ||
31 | iconProps?.src ||
32 | iconProps?.iconViaClassname ? (
33 |
38 | ) : (
39 | icon
40 | )}
41 |
42 |
43 | {children}
44 |
45 |
46 | {flags && (
47 |
48 | {flags.map(({ icon: flagIcon, value }) => (
49 |
50 | {value}
51 | {flagIcon && }
52 |
53 | ))}
54 |
55 | )}
56 |
57 | );
58 | };
59 |
60 | export default DetailsHeader;
61 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/DetailsHeaderTitle/DetailsHeaderTitle.module.css:
--------------------------------------------------------------------------------
1 | .root {
2 | color: var(--gw2-color-details-title);
3 | font-size: 16px;
4 | font-family: var(--gw2-font);
5 | font-weight: var(--gw2-font-weight-heading);
6 | flex-grow: 1;
7 | align-self: center;
8 | line-height: var(--gw2-line-height-heading);
9 | }
10 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/DetailsHeaderTitle/DetailsHeaderTitle.tsx:
--------------------------------------------------------------------------------
1 | import clsx from 'clsx';
2 | import React, { type PropsWithChildren, type ReactElement } from 'react';
3 | import css from './DetailsHeaderTitle.module.css';
4 |
5 | const DetailsHeaderTitle = ({
6 | children,
7 | className,
8 | }: PropsWithChildren<{ className?: string }>): ReactElement => {
9 | return {children}
;
10 | };
11 |
12 | export default DetailsHeaderTitle;
13 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/DetailsText/DetailsText.module.css:
--------------------------------------------------------------------------------
1 | .colorAbilitytype {
2 | color: var(--gw2-color-details-ability-type) !important;
3 | }
4 | .colorAbility {
5 | color: var(--gw2-color-details-ability) !important;
6 | }
7 | .colorMuted {
8 | color: var(--gw2-color-details-muted) !important;
9 | }
10 | .colorFlavor {
11 | color: var(--gw2-color-details-flavor) !important;
12 | }
13 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/Effect/Effect.stories.tsx:
--------------------------------------------------------------------------------
1 | import type { Meta, StoryFn, StoryObj } from '@storybook/react';
2 | import React from 'react';
3 | import Effect from './Effect';
4 |
5 | const meta: Meta = {
6 | title: 'Helper Components/Effect',
7 | component: Effect,
8 | argTypes: {
9 | className: { control: false },
10 | },
11 | };
12 | export default meta;
13 |
14 | const Template: StoryFn = (args) => {
15 | return ;
16 | };
17 |
18 | export const BoonMight: StoryObj = {
19 | render: Template,
20 |
21 | args: {
22 | name: 'Might',
23 | type: 'Boon',
24 | description: 'Increased outgoing damage; stacks intensity.',
25 | },
26 | };
27 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/Error/Error.module.css:
--------------------------------------------------------------------------------
1 | .errorColor {
2 | color: var(--gw2-color-error);
3 | }
4 |
5 | .imageError404 {
6 | background-image: url('../../assets/icons/404.png');
7 | }
8 | .imageError500 {
9 | background-image: url('../../assets/icons/500.png');
10 | }
11 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/Error/Error.stories.tsx:
--------------------------------------------------------------------------------
1 | import type { Meta, StoryFn, StoryObj } from '@storybook/react';
2 | import React from 'react';
3 | import { APILanguageProvider } from '../../i18n';
4 | import Error from './Error';
5 |
6 | const meta: Meta = {
7 | title: 'Helper Components/Error',
8 | component: Error,
9 | argTypes: {
10 | className: { control: false },
11 | },
12 | };
13 | export default meta;
14 |
15 | const Template: StoryFn = (args) => {
16 | return (
17 | <>
18 |
19 | >
20 | );
21 | };
22 |
23 | const ERROR_NAMES = {
24 | 404: { en: 'Mishap :(', es: 'Accidente :(' },
25 | 500: 'Network Mishap :(',
26 | };
27 | const ERROR_MESSAGES = {
28 | 404: {
29 | en: `Quaggan looked everywhere but coouldn't find what yoou're looking foor *pohooo*`,
30 | es: 'Quaggan did not expect the spanish translation.',
31 | },
32 | 500: `Quaggan's network waddles slower than a centaur *pohooo*`,
33 | };
34 |
35 | export const NotFound: StoryObj = {
36 | render: Template,
37 |
38 | args: {
39 | code: 404,
40 | message: ERROR_MESSAGES,
41 | name: ERROR_NAMES,
42 | },
43 | };
44 |
45 | export const NetworkError: StoryObj = {
46 | render: Template,
47 |
48 | args: {
49 | code: 500,
50 | message: ERROR_MESSAGES,
51 | name: ERROR_NAMES,
52 | },
53 | };
54 |
55 | export function Translated() {
56 | return (
57 | <>
58 | English:
59 |
60 |
61 | Spanish:{' '}
62 |
63 |
64 | >
65 | );
66 | }
67 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/Icon/Icon.module.css:
--------------------------------------------------------------------------------
1 | .root {
2 | display: inline-flex;
3 | width: 1em;
4 | height: 1em;
5 | position: relative;
6 | background-position: center;
7 | background-repeat: no-repeat;
8 | border-radius: 0px;
9 | }
10 | .rootBgSizeCover {
11 | background-size: cover;
12 | }
13 | .rootHexagon {
14 | clip-path: polygon(50% 4%, 100% 28%, 100% 73%, 50% 99%, 0% 73%, 0% 28%);
15 | border-radius: 0px;
16 | }
17 | .gutterRight {
18 | margin-right: 0.25em;
19 | }
20 | .gutterLeft {
21 | margin-left: 0.25em;
22 | }
23 | .inline {
24 | vertical-align: text-top;
25 | }
26 | .hexagon {
27 | width: 0.875em;
28 | }
29 | .inactive {
30 | opacity: 0.5;
31 | will-change: opacity;
32 | transition: opacity 200ms;
33 | }
34 | .inactive:hover {
35 | opacity: 0.8;
36 | }
37 |
38 | .applyCount {
39 | position: absolute;
40 | bottom: 0.1em;
41 | right: 0;
42 | font-size: 0.5em;
43 | font-weight: var(--gw2-font-weight-body);
44 | font-family: var(--gw2-font);
45 | line-height: 1;
46 | color: #fff;
47 | text-shadow: 1px 1px 1px black;
48 | }
49 |
50 | .imageEmpty {
51 | background-image: url(../../assets/icons/Empty.png);
52 | }
53 | .imageLock {
54 | background-image: url(../../assets/icons/Lock.png);
55 | }
56 | .imageReset {
57 | background-image: url(../../assets/icons/Reset.png);
58 | }
59 | .imageWeaponSwap {
60 | background-image: url(../../assets/icons/WeaponSwap.png);
61 | }
62 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/Icon/Icon.stories.tsx:
--------------------------------------------------------------------------------
1 | import type { Meta, StoryFn, StoryObj } from '@storybook/react';
2 | import React, { type ComponentProps } from 'react';
3 | import Icon from './Icon';
4 |
5 | const meta: Meta = {
6 | title: 'Helper Components/Icon',
7 | component: Icon,
8 | argTypes: {
9 | className: { control: false },
10 | },
11 | };
12 | export default meta;
13 |
14 | const Template: StoryFn = (args: ComponentProps) => {
15 | return (
16 | <>
17 |
18 | >
19 | );
20 | };
21 |
22 | export const Simple: StoryObj = {
23 | render: Template,
24 |
25 | args: {
26 | src: 'https://render.guildwars2.com/file/2FA9DF9D6BC17839BBEA14723F1C53D645DDB5E1/102852.png',
27 | },
28 | };
29 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/IconWithText/IconWithText.module.css:
--------------------------------------------------------------------------------
1 | .root {
2 | font-family: var(--gw2-font);
3 | font-weight: var(--gw2-font-weight-body);
4 | line-height: var(--gw2-line-height-body);
5 | }
6 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/IconWithText/IconWithText.stories.tsx:
--------------------------------------------------------------------------------
1 | import type { Meta, StoryFn, StoryObj } from '@storybook/react';
2 | import React from 'react';
3 | import IconWithText from './IconWithText';
4 |
5 | const meta: Meta = {
6 | title: 'Helper Components/IconWithText',
7 | component: IconWithText,
8 | argTypes: {
9 | className: { control: false },
10 | },
11 | };
12 | export default meta;
13 |
14 | const Template: StoryFn = (args) => {
15 | return (
16 | <>
17 |
18 | >
19 | );
20 | };
21 |
22 | export const BaneSignet: StoryObj = {
23 | render: Template,
24 |
25 | args: {
26 | icon: 'https://render.guildwars2.com/file/9FF294A9CC489D4FE8CED934A0C4359964B67443/103638.png',
27 | text: 'Bane Signet',
28 | },
29 | };
30 |
31 | export const Loading: StoryObj = {
32 | render: Template,
33 |
34 | args: {
35 | loading: true,
36 | },
37 | };
38 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/Item/Item.module.css:
--------------------------------------------------------------------------------
1 | .container {
2 | max-width: 353px;
3 | }
4 |
5 | .iconApplyCount {
6 | top: 0.1em;
7 | right: 0.1em;
8 | bottom: initial;
9 | color: #fee49a;
10 | }
11 |
12 | .colorRarityLegendary {
13 | color: var(--gw2-color-rarity-legendary-main);
14 | }
15 | .colorRarityLegendary:hover {
16 | color: var(--gw2-color-rarity-legendary-dark);
17 | }
18 | .colorRarityAscended {
19 | color: var(--gw2-color-rarity-ascended-main);
20 | }
21 | .colorRarityAscended:hover {
22 | color: var(--gw2-color-rarity-ascended-dark);
23 | }
24 | .colorRarityExotic {
25 | color: var(--gw2-color-rarity-exotic-main);
26 | }
27 | .colorRarityExotic:hover {
28 | color: var(--gw2-color-rarity-exotic-dark);
29 | }
30 | .colorRarityRare {
31 | color: var(--gw2-color-rarity-rare-main);
32 | }
33 | .colorRarityRare:hover {
34 | color: var(--gw2-color-rarity-rare-dark);
35 | }
36 | .colorRarityMasterwork {
37 | color: var(--gw2-color-rarity-masterwork-main);
38 | }
39 | .colorRarityMasterwork:hover {
40 | color: var(--gw2-color-rarity-masterwork-dark);
41 | }
42 | .colorRarityFine {
43 | color: var(--gw2-color-rarity-fine-main);
44 | }
45 | .colorRarityFine:hover {
46 | color: var(--gw2-color-rarity-fine-dark);
47 | }
48 | .colorRarityJunk {
49 | color: var(--gw2-color-rarity-junk-main);
50 | }
51 | .colorRarityJunk:hover {
52 | color: var(--gw2-color-rarity-junk-dark);
53 | }
54 | .colorRarityBasic {
55 | color: var(--gw2-color-rarity-junk-main);
56 | }
57 | .colorRarityBasic:hover {
58 | color: var(--gw2-color-rarity-junk-dark);
59 | }
60 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/Item/Item.stories.tsx:
--------------------------------------------------------------------------------
1 | import type { Meta, StoryFn, StoryObj } from '@storybook/react';
2 | import React from 'react';
3 | import Item from './Item';
4 | import ITEM_STAT_NAMES from '../../builder/itemStatNames';
5 |
6 | const meta: Meta = {
7 | title: 'Components/Item',
8 | component: Item,
9 | argTypes: {
10 | stat: {
11 | control: { type: 'select', options: Object.values(ITEM_STAT_NAMES) },
12 | },
13 | className: { control: false },
14 | },
15 | };
16 | export default meta;
17 |
18 | const Template: StoryFn = (args) => {
19 | return ;
20 | };
21 |
22 | export const Single: StoryObj = {
23 | render: Template,
24 |
25 | args: {
26 | id: 75187,
27 | upgrades: [86303, 86303],
28 | },
29 | };
30 |
31 | export function Multiple() {
32 | return (
33 | <>
34 | Empty:
35 |
36 | With Infusions:
37 |
38 | With Runes:
39 |
40 | Invalid id:
41 |
42 | Invalid upgrade:
43 | >
44 | );
45 | }
46 |
47 | export function AscendedFood() {
48 | return (
49 | <>
50 | Ascended Food requires API overrides, otherwise the details are missing.
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | >
59 | );
60 | }
61 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/Item/ItemDetails.module.css:
--------------------------------------------------------------------------------
1 | .detailsHeaderIcon {
2 | border: none;
3 | font-size: 16px;
4 | }
5 | .detailsHeaderTitleUpgrade {
6 | color: var(--gw2-color-details-bonus) !important;
7 | font-size: 14px;
8 | font-weight: var(--gw2-font-weight-body);
9 | }
10 | .mb1 {
11 | margin-bottom: 1px;
12 | }
13 | .mb12 {
14 | margin-bottom: 12px;
15 | }
16 | .mb16 {
17 | margin-bottom: 16px;
18 | }
19 | .attributeColor {
20 | color: var(--gw2-color-details-attribute);
21 | }
22 | .bonusColor {
23 | color: var(--gw2-color-details-bonus);
24 | }
25 | .bonusInactiveColor {
26 | color: var(--gw2-color-details-bonus-inactive);
27 | }
28 | .mt12 {
29 | margin-top: 12px;
30 | }
31 | .mt16 {
32 | margin-top: 16px;
33 | }
34 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/MistlockInstability/MistlockInstability.stories.tsx:
--------------------------------------------------------------------------------
1 | import type { Meta, StoryFn, StoryObj } from '@storybook/react';
2 | import React from 'react';
3 | import MistlockInstability from './MistlockInstability';
4 |
5 | const meta: Meta = {
6 | title: 'Components/MistlockInstability',
7 | component: MistlockInstability,
8 | argTypes: {
9 | className: { control: false },
10 | },
11 | };
12 | export default meta;
13 |
14 | const Template: StoryFn = (args) => {
15 | return ;
16 | };
17 |
18 | export const Simple: StoryObj = {
19 | render: Template,
20 |
21 | args: {
22 | name: 'Adrenaline Rush',
23 | },
24 | };
25 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/Profession/Profession.stories.tsx:
--------------------------------------------------------------------------------
1 | import type { Meta, StoryFn, StoryObj } from '@storybook/react';
2 | import React from 'react';
3 | import { APILanguageProvider } from '../../i18n/';
4 | import Profession from './Profession';
5 |
6 | const meta: Meta = {
7 | title: 'Components/Profession',
8 | component: Profession,
9 | argTypes: {
10 | className: { control: false },
11 | },
12 | };
13 | export default meta;
14 |
15 | const Template: StoryFn = (args) => {
16 | return ;
17 | };
18 |
19 | export const Firebrand: StoryObj = {
20 | render: Template,
21 |
22 | args: {
23 | name: 'Firebrand',
24 | },
25 | };
26 |
27 | export const invalid: StoryObj = {
28 | render: Template,
29 |
30 | args: {
31 | name: 'AAAAAAAAAAAAAAAAAAHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHh' as any,
32 | },
33 | };
34 |
35 | export function Translated() {
36 | return (
37 | <>
38 | This is an english guardian: ,{' '}
39 |
40 |
41 |
42 | This is a chinese guardian:
43 | ,
44 |
45 |
46 | >
47 | );
48 | }
49 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/Progress/Progress.module.css:
--------------------------------------------------------------------------------
1 | .root {
2 | display: inline-flex;
3 | align-items: flex-end;
4 | width: 4em;
5 | height: 1em;
6 | }
7 | .root::before {
8 | content: '';
9 | width: 100%;
10 | height: 85%;
11 | background-color: rgba(0, 0, 0, 0.2);
12 | background-image: linear-gradient(
13 | 90deg,
14 | rgba(0, 0, 0, 0),
15 | rgba(0, 0, 0, 0.2),
16 | currentColor,
17 | rgba(0, 0, 0, 0.2),
18 | rgba(0, 0, 0, 0)
19 | );
20 | background-repeat: no-repeat;
21 | animation: progress 1.5s infinite;
22 | border-radius: 4px;
23 | }
24 | @keyframes progress {
25 | from {
26 | background-position: -4em 0;
27 | }
28 | to {
29 | background-position: 4em 0;
30 | }
31 | }
32 | .inline {
33 | vertical-align: text-top;
34 | }
35 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/Progress/Progress.stories.tsx:
--------------------------------------------------------------------------------
1 | import type { Meta, StoryFn, StoryObj } from '@storybook/react';
2 | import React from 'react';
3 | import Progress from './Progress';
4 |
5 | const meta: Meta = {
6 | title: 'Helper Components/Progress',
7 | component: Progress,
8 | // argTypes: {
9 | // className: { control: false },
10 | // },
11 | };
12 | export default meta;
13 |
14 | const Template: StoryFn = (args) => {
15 | return (
16 | <>
17 |
18 | >
19 | );
20 | };
21 |
22 | export const Simple: StoryObj = {
23 | render: Template,
24 | };
25 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/Progress/Progress.tsx:
--------------------------------------------------------------------------------
1 | import clsx from 'clsx';
2 | import React, { type ReactElement } from 'react';
3 | import css from './Progress.module.css';
4 |
5 | export interface ProgressProps {
6 | inline?: boolean;
7 | }
8 |
9 | const Progress = ({ inline }: ProgressProps): ReactElement => {
10 | return ;
11 | };
12 |
13 | export default Progress;
14 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/Race/Race.module.css:
--------------------------------------------------------------------------------
1 | .colorAsura {
2 | color: var(--gw2-color-race-asura-main);
3 | }
4 | .colorAsura:hover {
5 | color: var(--gw2-color-race-asura-dark);
6 | }
7 | .colorCharr {
8 | color: var(--gw2-color-race-charr-main);
9 | }
10 | .colorCharr:hover {
11 | color: var(--gw2-color-race-charr-dark);
12 | }
13 | .colorHuman {
14 | color: var(--gw2-color-race-human-main);
15 | }
16 | .colorHuman:hover {
17 | color: var(--gw2-color-race-human-dark);
18 | }
19 | .colorNorn {
20 | color: var(--gw2-color-race-norn-main);
21 | }
22 | .colorNorn:hover {
23 | color: var(--gw2-color-race-norn-dark);
24 | }
25 | .colorSylvari {
26 | color: var(--gw2-color-race-sylvari-main);
27 | }
28 | .colorSylvari:hover {
29 | color: var(--gw2-color-race-sylvari-dark);
30 | }
31 |
32 | .imageRaceAsura {
33 | background-image: url(../../assets/icons/Race/Asura.png);
34 | }
35 | .imageRaceSylvari {
36 | background-image: url(../../assets/icons/Race/Sylvari.png);
37 | }
38 | .imageRaceNorn {
39 | background-image: url(../../assets/icons/Race/Norn.png);
40 | }
41 | .imageRaceHuman {
42 | background-image: url(../../assets/icons/Race/Human.png);
43 | }
44 | .imageRaceCharr {
45 | background-image: url(../../assets/icons/Race/Charr.png);
46 | }
47 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/Race/Race.stories.tsx:
--------------------------------------------------------------------------------
1 | import type { Meta, StoryFn, StoryObj } from '@storybook/react';
2 | import React from 'react';
3 | import { APILanguageProvider } from '../../i18n';
4 | import Race from './Race';
5 |
6 | const meta: Meta = {
7 | title: 'Components/Race',
8 | component: Race,
9 | argTypes: {
10 | className: { control: false },
11 | },
12 | };
13 | export default meta;
14 |
15 | const Template: StoryFn = (args) => {
16 | return ;
17 | };
18 |
19 | export const Simple: StoryObj = {
20 | render: Template,
21 |
22 | args: {
23 | name: 'Asura',
24 | },
25 | };
26 |
27 | export function Languages() {
28 | return (
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 | );
44 | }
45 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/Skill/Skill.module.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/gw2-ui/src/components/Skill/Skill.module.css
--------------------------------------------------------------------------------
/gw2-ui/src/components/Skill/Skill.tsx:
--------------------------------------------------------------------------------
1 | import { type ReactElement } from 'react';
2 | import { useSkill } from '../../gw2api/hooks';
3 | import Error from '../Error/Error';
4 | import IconWithText from '../IconWithText/IconWithText';
5 | import SkillInternal, { type SkillInternalProps } from './SkillInternal';
6 |
7 | export interface SkillProps extends Omit {
8 | id: number;
9 | }
10 |
11 | const SKILL_ERROR_NAMES = {
12 | 404: 'Skill Not Found',
13 | 500: 'Network Error',
14 | };
15 | const SKILL_ERROR_MESSAGES = {
16 | 404: (id: number) => `The requested skill with the id ${id} was not found.`,
17 | 500: (id: number) =>
18 | `A Network Error occured trying to fetch the skill ${id}.`,
19 | };
20 |
21 | const Skill = (props: SkillProps): ReactElement => {
22 | const skill = useSkill(props.id);
23 |
24 | if (skill.loading) {
25 | return ;
26 | }
27 |
28 | if (skill.error) {
29 | return (
30 |
36 | );
37 | }
38 |
39 | return ;
40 | };
41 |
42 | export default Skill;
43 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/Specialization/Specialization.stories.tsx:
--------------------------------------------------------------------------------
1 | import type { Meta, StoryFn, StoryObj } from '@storybook/react';
2 | import React from 'react';
3 | import Specialization from './Specialization';
4 |
5 | const meta: Meta = {
6 | title: 'Components/Specialization',
7 | component: Specialization,
8 | argTypes: {
9 | className: { control: false },
10 | },
11 | };
12 | export default meta;
13 |
14 | const Template: StoryFn = (args) => {
15 | return ;
16 | };
17 |
18 | export const Simple: StoryObj = {
19 | render: Template,
20 |
21 | args: {
22 | id: 42,
23 | },
24 | };
25 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/Specialization/Specialization.tsx:
--------------------------------------------------------------------------------
1 | import { type ReactElement } from 'react';
2 | import { useSpecialization } from '../../gw2api/hooks';
3 | import Error from '../Error/Error';
4 | import IconWithText from '../IconWithText/IconWithText';
5 | import SpecializationInternal, {
6 | type SpecializationInternalProps,
7 | } from './SpecializationInternal';
8 |
9 | const SPECIALIZATION_ERROR_NAMES = {
10 | 404: 'Specialization Not Found',
11 | 500: 'Network Error',
12 | };
13 | const SPECIALIZATION_ERROR_MESSAGES = {
14 | 404: (id: number) =>
15 | `The requested specialization with the id ${id} was not found.`,
16 | 500: (id: number) =>
17 | `A Network Error occured trying to fetch the specialization ${id}.`,
18 | };
19 |
20 | export interface SpecializationProps
21 | extends Omit {
22 | id: number;
23 | }
24 |
25 | const Specialization = (props: SpecializationProps): ReactElement => {
26 | const specialization = useSpecialization(props.id);
27 |
28 | if (specialization.loading) {
29 | return ;
30 | }
31 | if (specialization.error) {
32 | return (
33 |
39 | );
40 | }
41 |
42 | return ;
43 | };
44 |
45 | export default Specialization;
46 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/Specialization/SpecializationTooltip.tsx:
--------------------------------------------------------------------------------
1 | import { type ReactElement } from 'react';
2 | import type GW2ApiSpecialization from '../../gw2api/types/specialization/specialization';
3 | import DetailsHeader from '../DetailsHeader/DetailsHeader';
4 | import DetailsText from '../DetailsText/DetailsText';
5 |
6 | export interface SpecializationTooltipProps {
7 | data: GW2ApiSpecialization;
8 | }
9 |
10 | const SpecializationTooltip = ({
11 | data,
12 | }: SpecializationTooltipProps): ReactElement => {
13 | const { name, profession, elite } = data;
14 |
15 | return (
16 | <>
17 | {name}
18 |
25 | >
26 | );
27 | };
28 |
29 | export default SpecializationTooltip;
30 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/Spinner/Spinner.module.css:
--------------------------------------------------------------------------------
1 | .root {
2 | display: inline-flex;
3 | align-items: flex-end;
4 | width: 1em;
5 | height: 1em;
6 | border: 4px rgba(0, 0, 0, 0.2) solid;
7 | border-top-color: currentColor;
8 | border-radius: 50%;
9 | animation: spin 0.8s linear infinite;
10 | box-sizing: border-box;
11 | }
12 | @keyframes spin {
13 | from {
14 | transform: rotate(0deg);
15 | }
16 | to {
17 | transform: rotate(360deg);
18 | }
19 | }
20 | .inline {
21 | vertical-align: text-top;
22 | }
23 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/Spinner/Spinner.stories.tsx:
--------------------------------------------------------------------------------
1 | import type { Meta, StoryFn, StoryObj } from '@storybook/react';
2 | import React from 'react';
3 | import Spinner from './Spinner';
4 |
5 | const meta: Meta = {
6 | title: 'Helper Components/Spinner',
7 | component: Spinner,
8 | };
9 | export default meta;
10 |
11 | const Template: StoryFn = (args) => {
12 | return (
13 | <>
14 | Spinner with inline {args.inline ? 'enabled' : 'disabled'}
15 |
16 | >
17 | );
18 | };
19 |
20 | export const Simple: StoryObj = {
21 | render: Template,
22 | };
23 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/Spinner/Spinner.tsx:
--------------------------------------------------------------------------------
1 | import clsx from 'clsx';
2 | import React, { type ReactElement } from 'react';
3 | import css from './Spinner.module.css';
4 |
5 | export interface SpinnerProps {
6 | inline?: boolean;
7 | className?: string;
8 | }
9 |
10 | const Spinner = ({ inline, className }: SpinnerProps): ReactElement => (
11 |
12 | );
13 |
14 | export default Spinner;
15 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/Tooltip/Tooltip.module.css:
--------------------------------------------------------------------------------
1 | .root {
2 | max-height: calc(100vh - 20px);
3 | display: flex;
4 | flex-direction: column;
5 | flex-wrap: wrap;
6 | z-index: 1500;
7 | pointer-events: none;
8 | padding: 5px;
9 | }
10 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/TooltipContainer/TooltipContainer.module.css:
--------------------------------------------------------------------------------
1 | .root {
2 | background-color: rgba(46, 53, 56, 0.7);
3 | border-style: solid;
4 | border-width: 2px;
5 | border-color: #040505;
6 | box-shadow:
7 | 0px 1px 5px 0px rgba(0, 0, 0, 0.2),
8 | 0px 2px 2px 0px rgba(0, 0, 0, 0.14),
9 | 0px 3px 1px -2px rgba(0, 0, 0, 0.12);
10 | padding: 4px;
11 | background-position: top;
12 | background-repeat: no-repeat;
13 | -webkit-background-size: cover;
14 | background-size: cover;
15 | background-image: url(../../assets/tooltip-background.png);
16 | color: #fff;
17 | font-family: var(--gw2-font);
18 | font-weight: var(--gw2-font-weight-body);
19 | line-height: var(--gw2-line-height-heading);
20 | font-size: 14px;
21 | border-radius: 0px;
22 | text-shadow: 1px 1px 1px #010101;
23 | max-width: 300px;
24 | white-space: pre-wrap;
25 | }
26 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/TooltipContainer/TooltipContainer.stories.tsx:
--------------------------------------------------------------------------------
1 | import type { Meta, StoryFn, StoryObj } from '@storybook/react';
2 | import React from 'react';
3 | import TooltipContainer from './TooltipContainer';
4 |
5 | const meta: Meta = {
6 | title: 'Helper Components/TooltipContainer',
7 | component: TooltipContainer,
8 | argTypes: {
9 | className: { control: false },
10 | },
11 | };
12 | export default meta;
13 |
14 | const Template: StoryFn = (args) => {
15 | return (
16 | <>
17 |
18 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
19 | tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
20 | veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
21 | commodo consequat. Duis aute irure dolor in reprehenderit in voluptate
22 | velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint
23 | occaecat cupidatat non proident, sunt in culpa qui officia deserunt
24 | mollit anim id est laborum.
25 |
26 | >
27 | );
28 | };
29 |
30 | export const Simple: StoryObj = {
31 | render: Template,
32 | };
33 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/TooltipContainer/TooltipContainer.tsx:
--------------------------------------------------------------------------------
1 | import clsx from 'clsx';
2 | import React, { type PropsWithChildren, type ReactElement } from 'react';
3 | import css from './TooltipContainer.module.css';
4 |
5 | export type TooltipContainerProps = PropsWithChildren<{
6 | className?: string;
7 | }>;
8 |
9 | const TooltipContainer = ({
10 | children,
11 | className,
12 | }: TooltipContainerProps): ReactElement => {
13 | return {children}
;
14 | };
15 |
16 | export default TooltipContainer;
17 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/Trait/Trait.module.css:
--------------------------------------------------------------------------------
1 | .traitSkill {
2 | margin-top: 6px;
3 | }
4 |
5 | .ability {
6 | border-color: #537ca5;
7 | }
8 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/Trait/Trait.stories.tsx:
--------------------------------------------------------------------------------
1 | import type { Meta, StoryFn, StoryObj } from '@storybook/react';
2 | import React from 'react';
3 | import Trait from './Trait';
4 |
5 | const meta: Meta = {
6 | title: 'Components/Trait',
7 | component: Trait,
8 | argTypes: {
9 | className: { control: false },
10 | },
11 | };
12 | export default meta;
13 |
14 | const Template: StoryFn = (args) => {
15 | return ;
16 | };
17 |
18 | export const FreshAir: StoryObj = {
19 | render: Template,
20 |
21 | args: {
22 | id: 1503,
23 | },
24 | };
25 |
26 | export const RecklessDodge: StoryObj = {
27 | render: Template,
28 |
29 | args: {
30 | id: 1446,
31 | },
32 | };
33 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/Trait/Trait.tsx:
--------------------------------------------------------------------------------
1 | import { type ReactElement } from 'react';
2 |
3 | import { useTrait } from '../../gw2api/hooks';
4 | import Error from '../Error/Error';
5 | import IconWithText from '../IconWithText/IconWithText';
6 | import TraitInternal, { type TraitInternalProps } from './TraitInternal';
7 |
8 | export interface TraitProps extends Omit {
9 | id: number;
10 | }
11 |
12 | const TRAIT_ERROR_NAMES = {
13 | 404: 'Trait Not Found',
14 | 500: 'Network Error',
15 | };
16 | const TRAIT_ERROR_MESSAGES = {
17 | 404: (id: number) => `The requested trait with the id ${id} was not found.`,
18 | 500: (id: number) =>
19 | `A Network Error occured trying to fetch the trait ${id}.`,
20 | };
21 |
22 | const Trait = (props: TraitProps): ReactElement => {
23 | const trait = useTrait(props.id);
24 |
25 | if (trait.loading) {
26 | return ;
27 | }
28 | if (trait.error) {
29 | return (
30 |
36 | );
37 | }
38 |
39 | return ;
40 | };
41 |
42 | export default Trait;
43 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/TraitLine/TraitlLineConnector.module.css:
--------------------------------------------------------------------------------
1 | .root {
2 | position: relative;
3 | }
4 |
5 | .wrapper {
6 | position: absolute;
7 | height: 8px;
8 | bottom: 0;
9 | left: 0;
10 | overflow: hidden;
11 | }
12 |
13 | .traitlineConnector {
14 | background-image: url(../../assets/trait-line-connector.png);
15 | background-repeat: repeat-x;
16 | height: 8px;
17 | width: 172px;
18 | }
19 | @media screen and (prefers-reduced-motion: no-preference) {
20 | .traitlineConnector {
21 | animation: move 10s steps(150) infinite;
22 | }
23 | }
24 | @keyframes move {
25 | from {
26 | transform: translateX(0);
27 | }
28 | to {
29 | transform: translateX(-50%);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/WikiLink/WikiLink.module.css:
--------------------------------------------------------------------------------
1 | .default {
2 | color: var(--gw2-color-primary);
3 | transition: color 200ms ease-in-out;
4 | }
5 | .default:hover {
6 | color: var(--gw2-color-primary-dark);
7 | }
8 | .root {
9 | text-decoration: none;
10 | }
11 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/WikiLink/WikiLink.stories.tsx:
--------------------------------------------------------------------------------
1 | import type { Meta, StoryFn, StoryObj } from '@storybook/react';
2 | import React from 'react';
3 | import WikiLink from './WikiLink';
4 |
5 | const meta: Meta = {
6 | title: 'Helper Components/WikiLink',
7 | component: WikiLink,
8 | argTypes: {
9 | className: { control: false },
10 | },
11 | };
12 | export default meta;
13 |
14 | const Template: StoryFn = (args) => {
15 | return (
16 | <>
17 |
18 | >
19 | );
20 | };
21 |
22 | export const BaneSignet: StoryObj = {
23 | render: Template,
24 |
25 | args: {
26 | to: 'Bane Signet',
27 | },
28 | };
29 |
--------------------------------------------------------------------------------
/gw2-ui/src/components/WikiLink/WikiLink.tsx:
--------------------------------------------------------------------------------
1 | import clsx from 'clsx';
2 | import React, { type CSSProperties, type ReactElement } from 'react';
3 | import css from './WikiLink.module.css';
4 |
5 | // https://wiki.guildwars2.com/wiki/Template:Language
6 | export const languages = [
7 | 'en',
8 | 'zh',
9 | 'cs',
10 | 'nl',
11 | 'fi',
12 | 'fr',
13 | 'de',
14 | 'hu',
15 | 'it',
16 | 'ja',
17 | 'ko',
18 | 'ms',
19 | 'po',
20 | 'pt',
21 | 'ru',
22 | 'es',
23 | 'sv',
24 | 'tr',
25 | 'un',
26 | ] as const;
27 | type languagesAvailable = (typeof languages)[number];
28 |
29 | export interface WikiLinkProps {
30 | component?: any;
31 | to: string;
32 | text?: string;
33 | lang?: languagesAvailable;
34 | style?: CSSProperties;
35 | className?: string;
36 | }
37 |
38 | const WikiLink = ({
39 | component: Component = 'a',
40 | to,
41 | text,
42 | lang = 'en',
43 | style,
44 | className,
45 | }: WikiLinkProps): ReactElement => {
46 | return (
47 |
57 | {text || to}
58 |
59 | );
60 | };
61 |
62 | export default WikiLink;
63 |
--------------------------------------------------------------------------------
/gw2-ui/src/data/attributes.ts:
--------------------------------------------------------------------------------
1 | export type AttributeCategory = 'Primary' | 'Secondary' | 'Derived' | 'Special';
2 | export type AttributeTypes =
3 | | 'Power'
4 | | 'Precision'
5 | | 'Toughness'
6 | | 'Vitality'
7 | | 'Concentration'
8 | | 'Condition Damage'
9 | | 'Expertise'
10 | | 'Ferocity'
11 | | 'Healing Power'
12 | | 'Armor'
13 | | 'Boon Duration'
14 | | 'Critical Chance'
15 | | 'Critical Damage'
16 | | 'Condition Duration'
17 | | 'Health'
18 | | 'Agony Resistance'
19 | | 'Gold Find'
20 | | 'Karma Gain'
21 | | 'Magic Find'
22 | | 'XP Gain';
23 |
24 | const ATTRIBUTES: Record = {
25 | Primary: ['Power', 'Precision', 'Toughness', 'Vitality'],
26 | Secondary: [
27 | 'Concentration',
28 | 'Condition Damage',
29 | 'Expertise',
30 | 'Ferocity',
31 | 'Healing Power',
32 | ],
33 | Derived: [
34 | 'Armor',
35 | 'Boon Duration',
36 | 'Critical Chance',
37 | 'Critical Damage',
38 | 'Condition Duration',
39 | 'Health',
40 | ],
41 | Special: [
42 | 'Agony Resistance',
43 | 'Gold Find',
44 | 'Karma Gain',
45 | 'Magic Find',
46 | 'XP Gain',
47 | ],
48 | };
49 | export default ATTRIBUTES;
50 |
--------------------------------------------------------------------------------
/gw2-ui/src/data/augmentations.ts:
--------------------------------------------------------------------------------
1 | export type AugmentationsTypes =
2 | | 'Mist Attunement 1'
3 | | 'Mist Attunement 2'
4 | | 'Mist Attunement 3'
5 | | 'Mist Attunement 4';
6 |
7 | const AUGMENTATIONS: AugmentationsTypes[] = [
8 | 'Mist Attunement 1',
9 | 'Mist Attunement 2',
10 | 'Mist Attunement 3',
11 | 'Mist Attunement 4',
12 | ];
13 | export default AUGMENTATIONS;
14 |
--------------------------------------------------------------------------------
/gw2-ui/src/data/auras.ts:
--------------------------------------------------------------------------------
1 | export type AuraTypes =
2 | | 'Chaos'
3 | | 'Dark'
4 | | 'Fire'
5 | | 'Frost'
6 | | 'Light'
7 | | 'Magnetic'
8 | | 'Shocking';
9 |
10 | const AURAS: AuraTypes[] = [
11 | 'Chaos',
12 | 'Dark',
13 | 'Fire',
14 | 'Frost',
15 | 'Light',
16 | 'Magnetic',
17 | 'Shocking',
18 | ];
19 | export default AURAS;
20 |
--------------------------------------------------------------------------------
/gw2-ui/src/data/boons.ts:
--------------------------------------------------------------------------------
1 | export type BoonsTypes =
2 | | 'Aegis'
3 | | 'Alacrity'
4 | | 'Fury'
5 | | 'Might'
6 | | 'Protection'
7 | | 'Quickness'
8 | | 'Regeneration'
9 | | 'Resistance'
10 | | 'Resolution'
11 | | 'Stability'
12 | | 'Swiftness'
13 | | 'Vigor';
14 | const BOONS: BoonsTypes[] = [
15 | 'Aegis',
16 | 'Alacrity',
17 | 'Fury',
18 | 'Might',
19 | 'Protection',
20 | 'Quickness',
21 | 'Regeneration',
22 | 'Resistance',
23 | 'Resolution',
24 | 'Stability',
25 | 'Swiftness',
26 | 'Vigor',
27 | ];
28 | export default BOONS;
29 |
--------------------------------------------------------------------------------
/gw2-ui/src/data/commonEffects.ts:
--------------------------------------------------------------------------------
1 | export type CommonEffectTypes =
2 | | 'Agony'
3 | | 'Barrier'
4 | | 'Blight'
5 | | 'Exposed'
6 | | 'Invulnerability'
7 | | 'Reinforced Armor'
8 | | 'Revealed'
9 | | 'Rigorous Certainty'
10 | | 'Stealth'
11 | | 'Stun Break'
12 | | 'Superspeed'
13 | | 'Unblockable';
14 |
15 | const COMMONEFFECTS: CommonEffectTypes[] = [
16 | 'Agony',
17 | 'Barrier',
18 | 'Blight',
19 | 'Exposed',
20 | 'Invulnerability',
21 | 'Reinforced Armor',
22 | 'Revealed',
23 | 'Rigorous Certainty',
24 | 'Stealth',
25 | 'Stun Break',
26 | 'Superspeed',
27 | 'Unblockable',
28 | ];
29 | export default COMMONEFFECTS;
30 |
--------------------------------------------------------------------------------
/gw2-ui/src/data/conditions.ts:
--------------------------------------------------------------------------------
1 | export type ConditionTypes =
2 | | 'Bleeding'
3 | | 'Blinded'
4 | | 'Burning'
5 | | 'Chilled'
6 | | 'Confusion'
7 | | 'Crippled'
8 | | 'Fear'
9 | | 'Immobile'
10 | | 'Poisoned'
11 | | 'Slow'
12 | | 'Taunt'
13 | | 'Torment'
14 | | 'Vulnerability'
15 | | 'Weakness';
16 |
17 | const CONDITIONS: ConditionTypes[] = [
18 | 'Bleeding',
19 | 'Blinded',
20 | 'Burning',
21 | 'Chilled',
22 | 'Confusion',
23 | 'Crippled',
24 | 'Fear',
25 | 'Immobile',
26 | 'Poisoned',
27 | 'Slow',
28 | 'Taunt',
29 | 'Torment',
30 | 'Vulnerability',
31 | 'Weakness',
32 | ];
33 | export default CONDITIONS;
34 |
--------------------------------------------------------------------------------
/gw2-ui/src/data/consumableEffects.ts:
--------------------------------------------------------------------------------
1 | export type ConsumableEffectTypes = 'Enhancement' | 'Nourishment';
2 |
3 | const CONSUMABLEEFFECTS: Record = {
4 | Enhancement: '',
5 | Nourishment: '',
6 | };
7 | export default CONSUMABLEEFFECTS;
8 |
--------------------------------------------------------------------------------
/gw2-ui/src/data/controlEffects.ts:
--------------------------------------------------------------------------------
1 | export type ControlEffectTypes =
2 | | 'Daze'
3 | | 'Float'
4 | | 'Knockback'
5 | | 'Knockdown'
6 | | 'Launch'
7 | | 'Pull'
8 | | 'Sink'
9 | | 'Stun';
10 | const CONTROLEFFECTS: ControlEffectTypes[] = [
11 | 'Daze',
12 | 'Float',
13 | 'Knockback',
14 | 'Knockdown',
15 | 'Launch',
16 | 'Pull',
17 | 'Sink',
18 | 'Stun',
19 | ];
20 | export default CONTROLEFFECTS;
21 |
--------------------------------------------------------------------------------
/gw2-ui/src/data/mistlockInstabilities.ts:
--------------------------------------------------------------------------------
1 | export type MistlockInstabilityTypes =
2 | | 'Adrenaline Rush'
3 | | 'Afflicted'
4 | | 'Boon Overload'
5 | | 'Flux Bomb'
6 | | 'Fractal Vindicators'
7 | | 'Frailty'
8 | | 'Hamstrung'
9 | | 'Last Laugh'
10 | | 'Mists Convergence'
11 | | 'No Pain, No Gain'
12 | | 'Outflanked'
13 | | 'Social Awkwardness'
14 | | 'Stick Together'
15 | | 'Sugar Rush'
16 | | 'Toxic Trail'
17 | | 'Vengeance'
18 | | 'We Bleed Fire'
19 | | 'Toxic Sickness';
20 |
21 | const MISTLOCKINSTABILITIES: MistlockInstabilityTypes[] = [
22 | 'Adrenaline Rush',
23 | 'Afflicted',
24 | 'Boon Overload',
25 | 'Flux Bomb',
26 | 'Fractal Vindicators',
27 | 'Frailty',
28 | 'Hamstrung',
29 | 'Last Laugh',
30 | 'Mists Convergence',
31 | 'No Pain, No Gain',
32 | 'Outflanked',
33 | 'Social Awkwardness',
34 | 'Stick Together',
35 | 'Sugar Rush',
36 | 'Toxic Trail',
37 | 'Vengeance',
38 | 'We Bleed Fire',
39 | 'Toxic Sickness',
40 | ];
41 | export default MISTLOCKINSTABILITIES;
42 |
--------------------------------------------------------------------------------
/gw2-ui/src/data/professions.ts:
--------------------------------------------------------------------------------
1 | // This file is autogenerated by /generate_from_api.mjs
2 | // Do not edit this file directly - it will be overwritten
3 |
4 | export type ProfessionTypes =
5 | | 'Elementalist'
6 | | 'Engineer'
7 | | 'Guardian'
8 | | 'Mesmer'
9 | | 'Necromancer'
10 | | 'Ranger'
11 | | 'Revenant'
12 | | 'Thief'
13 | | 'Warrior';
14 |
15 | export type EliteSpecTypes =
16 | | 'Berserker'
17 | | 'Bladesworn'
18 | | 'Catalyst'
19 | | 'Chronomancer'
20 | | 'Daredevil'
21 | | 'Deadeye'
22 | | 'Dragonhunter'
23 | | 'Druid'
24 | | 'Firebrand'
25 | | 'Harbinger'
26 | | 'Herald'
27 | | 'Holosmith'
28 | | 'Mechanist'
29 | | 'Mirage'
30 | | 'Reaper'
31 | | 'Renegade'
32 | | 'Scourge'
33 | | 'Scrapper'
34 | | 'Soulbeast'
35 | | 'Specter'
36 | | 'Spellbreaker'
37 | | 'Tempest'
38 | | 'Untamed'
39 | | 'Vindicator'
40 | | 'Virtuoso'
41 | | 'Weaver'
42 | | 'Willbender';
43 |
44 | const PROFESSIONS: Record = {
45 | Elementalist: ['Tempest', 'Weaver', 'Catalyst'],
46 | Engineer: ['Scrapper', 'Holosmith', 'Mechanist'],
47 | Guardian: ['Dragonhunter', 'Firebrand', 'Willbender'],
48 | Mesmer: ['Chronomancer', 'Mirage', 'Virtuoso'],
49 | Necromancer: ['Reaper', 'Scourge', 'Harbinger'],
50 | Ranger: ['Druid', 'Soulbeast', 'Untamed'],
51 | Revenant: ['Herald', 'Renegade', 'Vindicator'],
52 | Thief: ['Daredevil', 'Deadeye', 'Specter'],
53 | Warrior: ['Berserker', 'Spellbreaker', 'Bladesworn'],
54 | };
55 | export default PROFESSIONS;
56 |
--------------------------------------------------------------------------------
/gw2-ui/src/data/races.ts:
--------------------------------------------------------------------------------
1 | // This file is autogenerated by /generate_from_api.mjs
2 | // Do not edit this file directly - it will be overwritten
3 |
4 | export type RacesTypes = 'Asura' | 'Charr' | 'Human' | 'Norn' | 'Sylvari';
5 |
6 | const RACES: RacesTypes[] = ['Asura', 'Charr', 'Human', 'Norn', 'Sylvari'];
7 | export default RACES;
8 |
--------------------------------------------------------------------------------
/gw2-ui/src/data/specializations.ts:
--------------------------------------------------------------------------------
1 | // This file is autogenerated by /generate_from_api.mjs
2 | // Do not edit this file directly - it will be overwritten
3 |
4 | import type { ProfessionTypes } from './professions';
5 | const SPECIALIZATIONS: Record = {
6 | Elementalist: [17, 26, 31, 37, 41, 48, 56, 67],
7 | Engineer: [6, 21, 29, 38, 43, 47, 57, 70],
8 | Guardian: [13, 16, 27, 42, 46, 49, 62, 65],
9 | Mesmer: [1, 10, 23, 24, 40, 45, 59, 66],
10 | Necromancer: [2, 19, 34, 39, 50, 53, 60, 64],
11 | Ranger: [5, 8, 25, 30, 32, 33, 55, 72],
12 | Revenant: [3, 9, 12, 14, 15, 52, 63, 69],
13 | Thief: [7, 20, 28, 35, 44, 54, 58, 71],
14 | Warrior: [4, 11, 18, 22, 36, 51, 61, 68],
15 | };
16 | export default SPECIALIZATIONS;
17 |
--------------------------------------------------------------------------------
/gw2-ui/src/gw2api/overrides/index.ts:
--------------------------------------------------------------------------------
1 | import type GW2ApiItem from '../types/items/item';
2 | import type GW2ApiSkill from '../types/skills/skill';
3 | import type GW2ApiSpecialization from '../types/specialization/specialization';
4 | import type GW2ApiTrait from '../types/traits/trait';
5 | import type { Override } from '../cache';
6 | import { fixMissingSkills } from './skill_missing';
7 | import { fixFactsInSkill, fixFactsInTrait } from './skill_facts';
8 | import { fixSkillTypes } from './skill_types';
9 | import { fixAscendedConsumable } from './item_ascended_consumables';
10 | import { fixMissingTraitDescriptions } from './trait_missing_descriptions';
11 |
12 | export const SKILL_OVERRIDES: Override[] = [
13 | fixMissingSkills,
14 | fixFactsInSkill,
15 | fixSkillTypes,
16 | ];
17 |
18 | export const TRAIT_OVERRIDES: Override[] = [
19 | fixFactsInTrait,
20 | fixMissingTraitDescriptions,
21 | ];
22 |
23 | export const ITEM_OVERRIDES: Override[] = [fixAscendedConsumable];
24 | export const SPECIALIZATION_OVERRIDES: Override[] = [];
25 |
--------------------------------------------------------------------------------
/gw2-ui/src/gw2api/overrides/item_ascended_consumables.ts:
--------------------------------------------------------------------------------
1 | import type GW2ApiConsumableDetails from '../types/items/details/consumable';
2 | import type GW2ApiItem from '../types/items/item';
3 | import { mapWithDescriptions } from './async';
4 |
5 | const common_details: Partial = {
6 | duration_ms: 3600000,
7 | apply_count: 1,
8 | name: 'Nourishment',
9 | icon: 'https://render.guildwars2.com/file/779D3F0ABE5B46C09CFC57374DA8CC3A495F291C/436367.png',
10 | };
11 |
12 | export function fixAscendedConsumable(
13 | id: number,
14 | item: GW2ApiItem | undefined,
15 | ): GW2ApiItem | undefined | Promise {
16 | if (!item) return item;
17 | if (
18 | item.type === 'Consumable' &&
19 | item.rarity === 'Ascended' &&
20 | item.details.type === 'Food'
21 | ) {
22 | return mapWithDescriptions((descriptions) => {
23 | const description = descriptions?.food[id] || '';
24 | return {
25 | ...item,
26 | details: {
27 | ...common_details,
28 | description,
29 | ...item.details,
30 | },
31 | };
32 | });
33 | }
34 |
35 | return item;
36 | }
37 |
--------------------------------------------------------------------------------
/gw2-ui/src/gw2api/overrides/skill_facts.ts:
--------------------------------------------------------------------------------
1 | import { type GW2ApiFactPercent } from '../types/common/fact';
2 | import type GW2ApiFact from '../types/common/fact';
3 | import type GW2ApiSkill from '../types/skills/skill';
4 | import type GW2ApiTrait from '../types/traits/trait';
5 |
6 | function fix_fact(f: GW2ApiFact) {
7 | if (!f.type && 'percent' in f) {
8 | // On some facts, the type is missing
9 | (f as GW2ApiFact).type = 'Percent';
10 | }
11 | // On some percent facts, the percent is given as .value
12 | if (f.type === 'Percent') {
13 | if ('value' in f) {
14 | (f as GW2ApiFactPercent).percent = (f as any).value;
15 | delete (f as any).value;
16 | }
17 | }
18 | }
19 | function fix_facts(facts: GW2ApiFact[] | undefined) {
20 | if (!facts) return;
21 | for (const f of facts) fix_fact(f);
22 | }
23 |
24 | export function fixFactsInSkill(
25 | id: number,
26 | item: GW2ApiSkill | undefined,
27 | ): GW2ApiSkill | undefined {
28 | if (!item) return item;
29 | fix_facts(item.facts);
30 | fix_facts(item.traited_facts);
31 | return item;
32 | }
33 |
34 | export function fixFactsInTrait(
35 | id: number,
36 | item: GW2ApiTrait | undefined,
37 | ): GW2ApiTrait | undefined {
38 | if (!item) return item;
39 | fix_facts(item.facts);
40 | fix_facts(item.traited_facts);
41 | if (item.skills) {
42 | for (const s of item.skills) {
43 | fix_facts(s.facts);
44 | fix_facts(s.traited_facts);
45 | }
46 | }
47 | return item;
48 | }
49 |
--------------------------------------------------------------------------------
/gw2-ui/src/gw2api/overrides/skill_missing.ts:
--------------------------------------------------------------------------------
1 | import type GW2ApiSkill from '../types/skills/skill';
2 | import { mapWithSkills } from './async';
3 |
4 | const MISSING_IDS = new Set([
5 | // dragon trigger (bladesworn)
6 | 62797, 62980, 62951, 62893, 62926,
7 |
8 | // gunsaber (bladesworn)
9 | 62966, 62772, 62918, 62930, 62732, 62789, 62885,
10 |
11 | // tome of justice (firebrand)
12 | 41258, 40635, 42449, 40015, 42898,
13 |
14 | // tome of resolve (firebrand)
15 | 45022, 40679, 45128, 42008, 42925,
16 |
17 | // tome of courage (firebrand)
18 | 42986, 41968, 41836, 40988, 44455,
19 |
20 | // shadow shroud (specter)
21 | 63362, 63167, 63220, 63160, 63249,
22 |
23 | // mech AI skills (mechanist)
24 | 63298, 63263, 63288, 63264, 63348, 63047,
25 | ]);
26 |
27 | export function fixMissingSkills(
28 | id: number,
29 | item: GW2ApiSkill | undefined,
30 | ): GW2ApiSkill | undefined | Promise {
31 | if (!MISSING_IDS.has(id) || item) return item;
32 |
33 | return mapWithSkills((skills) => {
34 | const skill = skills?.missing_skills[id];
35 |
36 | if (!skill) return undefined;
37 | return {
38 | id: id,
39 | chat_link: make_chat_link(id),
40 | ...skill,
41 | };
42 | });
43 | }
44 |
45 | // See https://wiki.guildwars2.com/wiki/Chat_link_format
46 | function make_chat_link(_id: number) {
47 | let id = _id;
48 | let l = String.fromCharCode(6);
49 | for (let i = 0; i < 3; i++) {
50 | const next_byte = id % 256;
51 | l += String.fromCharCode(next_byte);
52 | id = id >> 8;
53 | }
54 | l += String.fromCharCode(0);
55 |
56 | return `[&${btoa(l)}]`;
57 | }
58 |
--------------------------------------------------------------------------------
/gw2-ui/src/gw2api/overrides/skill_types.ts:
--------------------------------------------------------------------------------
1 | import type GW2ApiSkill from '../types/skills/skill';
2 |
3 | export function fixSkillTypes(
4 | id: number,
5 | item: GW2ApiSkill | undefined,
6 | ): GW2ApiSkill | undefined {
7 | if (!item) return item;
8 | // Compare:
9 | // https://api.guildwars2.com/v2/skills?ids=10586
10 | // https://api.guildwars2.com/v2/skills?ids=10586&lang=zh
11 | if ((item.type as string) === 'Transform') item.type = 'Profession';
12 | if ((item.slot as string) === 'Transform_1') item.slot = 'Profession_1';
13 | return item;
14 | }
15 |
--------------------------------------------------------------------------------
/gw2-ui/src/gw2api/overrides/trait_missing_descriptions.ts:
--------------------------------------------------------------------------------
1 | import type GW2ApiTrait from '../types/traits/trait';
2 | import { mapWithDescriptions } from './async';
3 |
4 | export function fixMissingTraitDescriptions(
5 | id: number,
6 | trait: GW2ApiTrait | undefined,
7 | ): GW2ApiTrait | undefined | Promise {
8 | if (!trait || trait.description) return trait;
9 |
10 | return mapWithDescriptions((descriptions) => {
11 | const description = descriptions?.traits[id] || '';
12 | return {
13 | description,
14 | ...trait,
15 | };
16 | });
17 | }
18 |
--------------------------------------------------------------------------------
/gw2-ui/src/gw2api/typeguards/.gitignore:
--------------------------------------------------------------------------------
1 | # this is typescript's --outDir for the type guards
2 | /out
3 |
--------------------------------------------------------------------------------
/gw2-ui/src/gw2api/typeguards/failures/.gitignore:
--------------------------------------------------------------------------------
1 | # Failures from pnpm api-typecheck will be added here
2 | *
3 | !.gitignore
4 |
--------------------------------------------------------------------------------
/gw2-ui/src/gw2api/typeguards/guards.ts:
--------------------------------------------------------------------------------
1 | import { createAssertEquals } from 'typia';
2 |
3 | import type GW2ApiItem from '../types/items/item';
4 | import type GW2ApiSkill from '../types/skills/skill';
5 | import type GW2ApiSpecialization from '../types/specialization/specialization';
6 | import type GW2ApiTrait from '../types/traits/trait';
7 |
8 | export const isGW2ApiItem = createAssertEquals();
9 | export const isGW2ApiSkill = createAssertEquals();
10 | export const isGW2ApiSpecialization =
11 | createAssertEquals();
12 | export const isGW2ApiTrait = createAssertEquals();
13 |
14 | export * from '../overrides/index';
15 |
--------------------------------------------------------------------------------
/gw2-ui/src/gw2api/typeguards/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "esnext",
4 | "moduleResolution": "node",
5 | "strict": true,
6 | "esModuleInterop": true,
7 | "noEmit": true,
8 | "declaration": false,
9 | "isolatedModules": true,
10 | "lib": ["dom", "dom.iterable", "esnext"],
11 | "skipLibCheck": true,
12 | "allowSyntheticDefaultImports": true,
13 | "forceConsistentCasingInFileNames": true,
14 | "noFallthroughCasesInSwitch": true,
15 | "module": "esnext",
16 | "plugins": [
17 | {
18 | "transform": "typia/lib/transform"
19 | }
20 | ]
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/gw2-ui/src/gw2api/types/common/armorSlotType.ts:
--------------------------------------------------------------------------------
1 | type GW2ApiArmorSlotType =
2 | | 'Boots'
3 | | 'Coat'
4 | | 'Gloves'
5 | | 'Helm'
6 | | 'HelmAquatic'
7 | | 'Leggings'
8 | | 'Shoulders';
9 |
10 | export default GW2ApiArmorSlotType;
11 |
--------------------------------------------------------------------------------
/gw2-ui/src/gw2api/types/common/armorType.ts:
--------------------------------------------------------------------------------
1 | type GW2ApiArmorType = 'HeavyArmor' | 'MediumArmor' | 'LightArmor';
2 |
3 | export default GW2ApiArmorType;
4 |
--------------------------------------------------------------------------------
/gw2-ui/src/gw2api/types/common/attribute.ts:
--------------------------------------------------------------------------------
1 | type GW2ApiAttribute =
2 | | 'AgonyResistance'
3 | | 'BoonDuration'
4 | | 'ConditionDamage'
5 | | 'ConditionDuration'
6 | | 'CritDamage'
7 | | 'Healing'
8 | | 'Power'
9 | | 'Precision'
10 | | 'Toughness'
11 | | 'Vitality';
12 |
13 | export default GW2ApiAttribute;
14 |
--------------------------------------------------------------------------------
/gw2-ui/src/gw2api/types/common/comboFieldType.ts:
--------------------------------------------------------------------------------
1 | type GW2ApiComboFieldType =
2 | | 'Air'
3 | | 'Dark'
4 | | 'Fire'
5 | | 'Ice'
6 | | 'Light'
7 | | 'Lightning'
8 | | 'Poison'
9 | | 'Smoke'
10 | | 'Ethereal'
11 | | 'Water';
12 |
13 | export default GW2ApiComboFieldType;
14 |
--------------------------------------------------------------------------------
/gw2-ui/src/gw2api/types/common/containerType.ts:
--------------------------------------------------------------------------------
1 | type GW2ApiContainerType = 'Default' | 'GiftBox' | 'Immediate' | 'OpenUI';
2 |
3 | export default GW2ApiContainerType;
4 |
--------------------------------------------------------------------------------
/gw2-ui/src/gw2api/types/common/damageType.ts:
--------------------------------------------------------------------------------
1 | type GW2ApiDamageType = 'Fire' | 'Ice' | 'Lightning' | 'Physical' | 'Choking';
2 |
3 | export default GW2ApiDamageType;
4 |
--------------------------------------------------------------------------------
/gw2-ui/src/gw2api/types/common/gameType.ts:
--------------------------------------------------------------------------------
1 | type GW2ApiGameType =
2 | | 'Activity'
3 | | 'Dungeon'
4 | | 'Pve'
5 | | 'Pvp'
6 | | 'PvpLobby'
7 | | 'Wvw';
8 |
9 | export default GW2ApiGameType;
10 |
--------------------------------------------------------------------------------
/gw2-ui/src/gw2api/types/common/gizmoType.ts:
--------------------------------------------------------------------------------
1 | type GW2ApiGizmoType =
2 | | 'Default'
3 | | 'ContainerKey'
4 | | 'RentableContractNpc'
5 | | 'UnlimitedConsumable';
6 |
7 | export default GW2ApiGizmoType;
8 |
--------------------------------------------------------------------------------
/gw2-ui/src/gw2api/types/common/infusionSlotFlag.ts:
--------------------------------------------------------------------------------
1 | type GW2ApiInfusionSlotFlag = 'Enrichment' | 'Infusion';
2 |
3 | export default GW2ApiInfusionSlotFlag;
4 |
--------------------------------------------------------------------------------
/gw2-ui/src/gw2api/types/common/infusionUpgradeFlag.ts:
--------------------------------------------------------------------------------
1 | type GW2ApiInfusionUpgradeFlag =
2 | | 'Enrichment'
3 | | 'Infusion'
4 | | 'Defense'
5 | | 'Offense'
6 | | 'Utility'
7 | | 'Agony';
8 |
9 | export default GW2ApiInfusionUpgradeFlag;
10 |
--------------------------------------------------------------------------------
/gw2-ui/src/gw2api/types/common/profession.ts:
--------------------------------------------------------------------------------
1 | import { type ProfessionTypes } from '../../../data/professions';
2 |
3 | type GW2ApiProfession = ProfessionTypes;
4 |
5 | export default GW2ApiProfession;
6 |
--------------------------------------------------------------------------------
/gw2-ui/src/gw2api/types/common/salvageKitType.ts:
--------------------------------------------------------------------------------
1 | type GW2ApiSalvageKitType = 'Salvage';
2 |
3 | export default GW2ApiSalvageKitType;
4 |
--------------------------------------------------------------------------------
/gw2-ui/src/gw2api/types/common/traited_fact.ts:
--------------------------------------------------------------------------------
1 | import { type GW2ApiFact } from './fact';
2 |
3 | type GW2ApiTraitedFactAdditional = {
4 | requires_trait: number;
5 | overrides?: number;
6 | };
7 |
8 | type GW2ApiTraitedFact = GW2ApiFact & GW2ApiTraitedFactAdditional;
9 |
10 | export default GW2ApiTraitedFact;
11 |
--------------------------------------------------------------------------------
/gw2-ui/src/gw2api/types/common/trinketType.ts:
--------------------------------------------------------------------------------
1 | type GW2ApiTrinketType = 'Accessory' | 'Amulet' | 'Ring';
2 |
3 | export default GW2ApiTrinketType;
4 |
--------------------------------------------------------------------------------
/gw2-ui/src/gw2api/types/common/upgradeComponentType.ts:
--------------------------------------------------------------------------------
1 | type GW2ApiUpgradeComponentType = 'Default' | 'Gem' | 'Rune' | 'Sigil';
2 |
3 | export default GW2ApiUpgradeComponentType;
4 |
--------------------------------------------------------------------------------
/gw2-ui/src/gw2api/types/common/weaponType.ts:
--------------------------------------------------------------------------------
1 | export type GW2ApiOneHandedWeaponType =
2 | | 'Axe'
3 | | 'Dagger'
4 | | 'Mace'
5 | | 'Pistol'
6 | | 'Scepter'
7 | | 'Sword'
8 | | 'Focus'
9 | | 'Shield'
10 | | 'Torch'
11 | | 'Warhorn';
12 |
13 | export type GW2ApiTwoHandedWeaponType =
14 | | 'Greatsword'
15 | | 'Hammer'
16 | | 'Longbow'
17 | | 'Rifle'
18 | | 'Shortbow'
19 | | 'Staff';
20 |
21 | export type GW2ApiOtherWeaponType =
22 | | 'LargeBundle'
23 | | 'SmallBundle'
24 | | 'Toy'
25 | | 'ToyTwoHanded';
26 |
27 | export type GW2ApiAquaticWeaponType = 'Speargun' | 'Trident' | 'Spear';
28 |
29 | type GW2ApiWeaponType =
30 | | GW2ApiOneHandedWeaponType
31 | | GW2ApiTwoHandedWeaponType
32 | | GW2ApiAquaticWeaponType
33 | | GW2ApiOtherWeaponType;
34 |
35 | export default GW2ApiWeaponType;
36 |
37 | // Hooray for inconsistencies
38 | export type GW2ApiWeaponTypeForItemDetails =
39 | | GW2ApiOneHandedWeaponType
40 | | Exclude
41 | | 'LongBow'
42 | | 'ShortBow'
43 | | GW2ApiAquaticWeaponType
44 | | 'Harpoon'
45 | | GW2ApiOtherWeaponType;
46 |
--------------------------------------------------------------------------------
/gw2-ui/src/gw2api/types/common/weightClass.ts:
--------------------------------------------------------------------------------
1 | type GW2ApiWeightClass = 'Heavy' | 'Medium' | 'Light' | 'Clothing';
2 |
3 | export default GW2ApiWeightClass;
4 |
--------------------------------------------------------------------------------
/gw2-ui/src/gw2api/types/items/details/armor.ts:
--------------------------------------------------------------------------------
1 | import type GW2ApiArmorSlotType from '../../common/armorSlotType';
2 | import type GW2ApiWeightClass from '../../common/weightClass';
3 | import type GW2ApiInfixUpgrade from './common/infixUpgrade';
4 | import type GW2ApiInflusionSlot from './common/infusionSlot';
5 |
6 | interface GW2ApiArmorDetails {
7 | type: GW2ApiArmorSlotType;
8 | weight_class: GW2ApiWeightClass;
9 | defense: number;
10 | infusion_slots: GW2ApiInflusionSlot[];
11 | attribute_adjustment: number;
12 | infix_upgrade?: GW2ApiInfixUpgrade;
13 | suffix_item_id?: number;
14 | secondary_suffix_item_id: string;
15 | stat_choices?: number[];
16 | }
17 |
18 | export default GW2ApiArmorDetails;
19 |
--------------------------------------------------------------------------------
/gw2-ui/src/gw2api/types/items/details/backItem.ts:
--------------------------------------------------------------------------------
1 | import type GW2ApiInfixUpgrade from './common/infixUpgrade';
2 | import type GW2ApiInflusionSlot from './common/infusionSlot';
3 |
4 | interface GW2ApiBackItemDetails {
5 | infusion_slots: GW2ApiInflusionSlot[];
6 | attribute_adjustment: number;
7 | infix_upgrade?: GW2ApiInfixUpgrade;
8 | suffix_item_id?: number;
9 | secondary_suffix_item_id: string;
10 | stat_choices?: number[];
11 | }
12 |
13 | export default GW2ApiBackItemDetails;
14 |
--------------------------------------------------------------------------------
/gw2-ui/src/gw2api/types/items/details/bag.ts:
--------------------------------------------------------------------------------
1 | interface GW2ApiBagDetails {
2 | size: number;
3 | no_sell_or_sort: boolean;
4 | }
5 |
6 | export default GW2ApiBagDetails;
7 |
--------------------------------------------------------------------------------
/gw2-ui/src/gw2api/types/items/details/common/infixUpgrade.ts:
--------------------------------------------------------------------------------
1 | import type GW2ApiAttribute from '../../../common/attribute';
2 |
3 | export interface GW2ApiInfixUpgradeAttribute {
4 | attribute: GW2ApiAttribute;
5 | modifier: number;
6 | }
7 |
8 | export interface GW2ApiBuff {
9 | skill_id: number;
10 | description?: string;
11 | }
12 |
13 | interface GW2ApiInfixUpgrade {
14 | id?: number;
15 | attributes: GW2ApiInfixUpgradeAttribute[];
16 | buff?: GW2ApiBuff;
17 | }
18 |
19 | export default GW2ApiInfixUpgrade;
20 |
--------------------------------------------------------------------------------
/gw2-ui/src/gw2api/types/items/details/common/infusionSlot.ts:
--------------------------------------------------------------------------------
1 | import type GW2ApiInfusionSlotFlag from '../../../common/infusionSlotFlag';
2 |
3 | export interface GW2ApiInflusionSlot {
4 | flags: GW2ApiInfusionSlotFlag[];
5 | item_id?: number;
6 | }
7 |
8 | export default GW2ApiInflusionSlot;
9 |
--------------------------------------------------------------------------------
/gw2-ui/src/gw2api/types/items/details/consumable.ts:
--------------------------------------------------------------------------------
1 | type GW2ApiConsumableType =
2 | | 'AppearanceChange'
3 | | 'Booze'
4 | | 'ContractNpc'
5 | | 'Currency'
6 | | 'Food'
7 | | 'Generic'
8 | | 'Halloween'
9 | | 'Immediate'
10 | | 'MountRandomUnlock'
11 | | 'RandomUnlock'
12 | | 'Transmutation'
13 | | 'Unlock'
14 | | 'UpgradeRemoval'
15 | | 'Utility'
16 | | 'TeleportToFriend';
17 |
18 | type GW2ApiUnlockType =
19 | | 'BagSlot'
20 | | 'BankTab'
21 | | 'Champion'
22 | | 'CollectibleCapacity'
23 | | 'Content'
24 | | 'CraftingRecipe'
25 | | 'Dye'
26 | | 'GliderSkin'
27 | | 'Minipet'
28 | | 'Ms'
29 | | 'Outfit'
30 | | 'RandomUnlock'
31 | | 'SharedSlot'
32 | | 'GearLoadoutTab'
33 | | 'BuildLibrarySlot'
34 | | 'BuildLoadoutTab'
35 | | 'JadeBotSkin';
36 |
37 | interface GW2ApiConsumableDetails {
38 | type: GW2ApiConsumableType;
39 | description?: string;
40 | duration_ms?: number;
41 | unlock_type?: GW2ApiUnlockType;
42 | color_id?: number;
43 | recipe_id?: number;
44 | extra_recipe_ids?: number[];
45 | guild_upgrade_id?: number;
46 | apply_count?: number;
47 | name?: string;
48 | icon?: string;
49 | skins?: number[];
50 | }
51 |
52 | export default GW2ApiConsumableDetails;
53 |
--------------------------------------------------------------------------------
/gw2-ui/src/gw2api/types/items/details/container.ts:
--------------------------------------------------------------------------------
1 | import type GW2ApiContainerType from '../../common/containerType';
2 |
3 | interface GW2ApiContainerDetails {
4 | type: GW2ApiContainerType;
5 | }
6 |
7 | export default GW2ApiContainerDetails;
8 |
--------------------------------------------------------------------------------
/gw2-ui/src/gw2api/types/items/details/gatheringTool.ts:
--------------------------------------------------------------------------------
1 | interface GW2ApiGatheringToolDetails {
2 | type: 'Foraging' | 'Logging' | 'Mining' | 'Foo' | 'Bait' | 'Lure';
3 | }
4 |
5 | export default GW2ApiGatheringToolDetails;
6 |
--------------------------------------------------------------------------------
/gw2-ui/src/gw2api/types/items/details/gizmo.ts:
--------------------------------------------------------------------------------
1 | import type GW2ApiGizmoType from '../../common/gizmoType';
2 |
3 | interface GW2ApiGizmoDetails {
4 | type: GW2ApiGizmoType;
5 | guild_upgrade_id?: number;
6 | vendor_ids?: number[];
7 | }
8 |
9 | export default GW2ApiGizmoDetails;
10 |
--------------------------------------------------------------------------------
/gw2-ui/src/gw2api/types/items/details/miniature.ts:
--------------------------------------------------------------------------------
1 | interface GW2ApiMiniatureDetails {
2 | minipet_id: number;
3 | }
4 |
5 | export default GW2ApiMiniatureDetails;
6 |
--------------------------------------------------------------------------------
/gw2-ui/src/gw2api/types/items/details/salvageKit.ts:
--------------------------------------------------------------------------------
1 | import type GW2ApiSalvageKitType from '../../common/salvageKitType';
2 |
3 | interface GW2ApiSalvageKitDetails {
4 | type: GW2ApiSalvageKitType;
5 | charges: number;
6 | }
7 |
8 | export default GW2ApiSalvageKitDetails;
9 |
--------------------------------------------------------------------------------
/gw2-ui/src/gw2api/types/items/details/trinket.ts:
--------------------------------------------------------------------------------
1 | import type GW2ApiTrinketType from '../../common/trinketType';
2 | import type GW2ApiInfixUpgrade from './common/infixUpgrade';
3 | import type GW2ApiInflusionSlot from './common/infusionSlot';
4 |
5 | interface GW2ApiTrinketDetails {
6 | type: GW2ApiTrinketType;
7 | infusion_slots: GW2ApiInflusionSlot[];
8 | attribute_adjustment: number;
9 | infix_upgrade?: GW2ApiInfixUpgrade;
10 | suffix_item_id?: number;
11 | secondary_suffix_item_id: string;
12 | stat_choices?: number[];
13 | }
14 |
15 | export default GW2ApiTrinketDetails;
16 |
--------------------------------------------------------------------------------
/gw2-ui/src/gw2api/types/items/details/upgradeComponent.ts:
--------------------------------------------------------------------------------
1 | import type GW2ApiUpgradeComponentType from '../../common/upgradeComponentType';
2 | import {
3 | type GW2ApiOtherWeaponType,
4 | type GW2ApiWeaponTypeForItemDetails,
5 | } from '../../common/weaponType';
6 | import type GW2ApiArmorType from '../../common/armorType';
7 | import type GW2ApiInfusionUpgradeFlag from '../../common/infusionUpgradeFlag';
8 | import type GW2ApiInfixUpgrade from './common/infixUpgrade';
9 |
10 | export type GW2APiUpgradeComponentFlag =
11 | | Exclude
12 | | GW2ApiArmorType
13 | | 'Trinket';
14 |
15 | interface GW2ApiUpgradeComponentDetails {
16 | type: GW2ApiUpgradeComponentType;
17 | flags: GW2APiUpgradeComponentFlag[];
18 | infusion_upgrade_flags: GW2ApiInfusionUpgradeFlag[];
19 | suffix: string;
20 | infix_upgrade: GW2ApiInfixUpgrade;
21 | bonuses?: string[]; // only from runes, the 6 bonuses a rune provides
22 | attribute_adjustment: number;
23 | }
24 |
25 | export default GW2ApiUpgradeComponentDetails;
26 |
--------------------------------------------------------------------------------
/gw2-ui/src/gw2api/types/items/details/weapon.ts:
--------------------------------------------------------------------------------
1 | import type GW2ApiDamageType from '../../common/damageType';
2 | import { type GW2ApiWeaponTypeForItemDetails } from '../../common/weaponType';
3 | import type GW2ApiInfixUpgrade from './common/infixUpgrade';
4 | import type GW2ApiInflusionSlot from './common/infusionSlot';
5 |
6 | interface GW2ApiWeaponDetails {
7 | type: GW2ApiWeaponTypeForItemDetails;
8 | damage_type: GW2ApiDamageType;
9 | min_power: number;
10 | max_power: number;
11 | defense: number;
12 | infusion_slots: GW2ApiInflusionSlot[];
13 | attribute_adjustment: number;
14 | infix_upgrade?: GW2ApiInfixUpgrade;
15 | suffix_item_id?: number;
16 | secondary_suffix_item_id: string;
17 | stat_choices?: number[];
18 | }
19 |
20 | export default GW2ApiWeaponDetails;
21 |
--------------------------------------------------------------------------------
/gw2-ui/src/gw2api/types/skills/skill.ts:
--------------------------------------------------------------------------------
1 | import type GW2ApiFact from '../common/fact';
2 |
3 | import type GW2ApiTraitedFact from '../common/traited_fact';
4 | import type GW2ApiProfession from '../common/profession';
5 |
6 | import { type GW2ApiOneHandedWeaponType } from '../common/weaponType';
7 | import type GW2ApiWeaponType from '../common/weaponType';
8 | import {
9 | type GW2ApiSkillAttunement,
10 | type GW2ApiSkillCategory,
11 | type GW2ApiSkillFlag,
12 | type GW2ApiSkillSlot,
13 | type GW2ApiSkillType,
14 | } from './enums';
15 |
16 | export default interface GW2ApiSkill {
17 | id: number;
18 | name: string;
19 | description?: string;
20 | icon?: string;
21 | chat_link: string;
22 |
23 | // facts
24 | flags?: GW2ApiSkillFlag[];
25 | facts?: GW2ApiFact[];
26 | traited_facts?: GW2ApiTraitedFact[];
27 | cost?: number;
28 | initiative?: number;
29 |
30 | // categories
31 | professions?: GW2ApiProfession[];
32 | specialization?: number;
33 | type?: GW2ApiSkillType;
34 | categories?: GW2ApiSkillCategory[];
35 |
36 | // Weapons and slots
37 | weapon_type?: GW2ApiWeaponType | 'None';
38 | slot?: GW2ApiSkillSlot;
39 | dual_wield?: GW2ApiOneHandedWeaponType | 'None' | 'Nothing';
40 | attunement?: GW2ApiSkillAttunement;
41 | dual_attunement?: GW2ApiSkillAttunement;
42 |
43 | // related skills
44 | flip_skill?: number;
45 | next_chain?: number;
46 | prev_chain?: number;
47 | transform_skills?: number[];
48 | bundle_skills?: number[];
49 | toolbelt_skill?: number;
50 | subskills?: {
51 | id: number;
52 | attunement?: GW2ApiSkillAttunement;
53 | form?: 'CelestialAvatar';
54 | }[];
55 | }
56 |
--------------------------------------------------------------------------------
/gw2-ui/src/gw2api/types/specialization/specialization.ts:
--------------------------------------------------------------------------------
1 | interface GW2ApiSpecialization {
2 | id: number;
3 | name: string;
4 | profession: string;
5 | elite: boolean;
6 | icon: string;
7 | profession_icon?: string;
8 | profession_icon_big?: string;
9 | background: string;
10 | minor_traits: number[];
11 | major_traits: number[];
12 | weapon_trait?: number;
13 | }
14 |
15 | export default GW2ApiSpecialization;
16 |
--------------------------------------------------------------------------------
/gw2-ui/src/gw2api/types/traits/trait.ts:
--------------------------------------------------------------------------------
1 | import type GW2ApiFact from '../common/fact';
2 | import type GW2ApiTraitedFact from '../common/traited_fact';
3 |
4 | interface GW2ApiTraitBase {
5 | id: number;
6 | name: string;
7 | description?: string;
8 | icon: string;
9 | facts?: GW2ApiFact[];
10 | traited_facts?: GW2ApiTraitedFact[];
11 | }
12 |
13 | export interface GW2ApiTraitSkill extends GW2ApiTraitBase {
14 | flags: unknown[];
15 | chat_link: string;
16 | categories?: unknown[];
17 | }
18 |
19 | interface GW2ApiTrait extends GW2ApiTraitBase {
20 | specialization: number;
21 | tier: number;
22 | order: number;
23 | slot: 'Major' | 'Minor';
24 | skills?: GW2ApiTraitSkill[];
25 | }
26 |
27 | export default GW2ApiTrait;
28 |
--------------------------------------------------------------------------------
/gw2-ui/src/helpers/apiAttributes.ts:
--------------------------------------------------------------------------------
1 | import type GW2ApiAttribute from '../gw2api/types/common/attribute';
2 |
3 | const apiAttributes: Record = {
4 | Power: 'Power',
5 | Precision: 'Precision',
6 | Toughness: 'Toughness',
7 | Vitality: 'Vitality',
8 | BoonDuration: 'Concentration',
9 | ConditionDamage: 'Condition Damage',
10 | ConditionDuration: 'Expertise',
11 | CritDamage: 'Ferocity',
12 | Healing: 'Healing Power',
13 | AgonyResistance: 'Agony Resistance',
14 | None: 'No Attribute',
15 | };
16 | export default apiAttributes;
17 |
--------------------------------------------------------------------------------
/gw2-ui/src/helpers/capitalize.ts:
--------------------------------------------------------------------------------
1 | export function capitalize(str: string): string {
2 | return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();
3 | }
4 |
--------------------------------------------------------------------------------
/gw2-ui/src/helpers/factsOrder.ts:
--------------------------------------------------------------------------------
1 | import { type GW2ApiFactType } from '../gw2api/types/common/fact';
2 |
3 | const ORDER: Record = {
4 | Damage: 0,
5 | Heal: 1,
6 | HealingAdjust: 2,
7 |
8 | Buff: 3,
9 | PrefixedBuff: 4,
10 |
11 | AttributeAdjust: 5,
12 | BuffConversion: 6,
13 |
14 | Percent: 7,
15 | Number: 8,
16 |
17 | Duration: 9,
18 | Time: 10,
19 | Radius: 11,
20 | Distance: 12,
21 |
22 | ComboFinisher: 13,
23 | ComboField: 14,
24 |
25 | Unblockable: 15,
26 | StunBreak: 16,
27 | NoData: 17,
28 |
29 | Range: 18,
30 |
31 | Recharge: -1,
32 | };
33 | export default ORDER;
34 |
--------------------------------------------------------------------------------
/gw2-ui/src/helpers/formatDuration.ts:
--------------------------------------------------------------------------------
1 | export default function formatDuration(value: number) {
2 | let seconds = value;
3 |
4 | const weeks = Math.floor(seconds / 604800);
5 | seconds %= 604800;
6 |
7 | const days = Math.floor(seconds / 86400);
8 | seconds %= 86400;
9 |
10 | const hours = Math.floor(seconds / 3600);
11 | seconds %= 3600;
12 |
13 | const minutes = Math.floor(seconds / 60);
14 | seconds %= 60;
15 |
16 | return [
17 | weeks && `${weeks} w`,
18 | days && `${days} d`,
19 | hours && `${hours} h`,
20 | minutes && `${minutes} m`,
21 | seconds && `${seconds}${minutes ? ' s' : 's'}`,
22 | ]
23 | .filter((entry) => !!entry)
24 | .join(', ');
25 | }
26 |
--------------------------------------------------------------------------------
/gw2-ui/src/i18n/augmentations.ts:
--------------------------------------------------------------------------------
1 | import { type Translation } from '.';
2 | import { type AugmentationsTypes } from '../data/augmentations';
3 |
4 | export const TRANSLATIONS_AUGMENTATIONS: Record<
5 | AugmentationsTypes,
6 | Translation
7 | > = {
8 | 'Mist Attunement 1': { de: 'Nebeleinstimmung 1' },
9 | 'Mist Attunement 2': { de: 'Nebeleinstimmung 2' },
10 | 'Mist Attunement 3': { de: 'Nebeleinstimmung 3' },
11 | 'Mist Attunement 4': { de: 'Nebeleinstimmung 4' },
12 | };
13 |
14 | export const TRANSLATIONS_AUGMENTATION_DESCRIPTIONS: Record<
15 | AugmentationsTypes,
16 | Translation
17 | > = {
18 | 'Mist Attunement 1': {
19 | en: 'Gain 5 agony resistance, 1% outgoing damage, and 10 health per second.',
20 | de: 'Erhaltet 5 Qual-Widerstand, 1% zugefügten Schaden und 10 Lebenspunkte pro Sekunde.',
21 | },
22 | 'Mist Attunement 2': {
23 | en: 'Gain 10 agony resistance, 2% outgoing damage, and 20 health per second.',
24 | de: 'Erhaltet 10 Qual-Widerstand, 2% zugefügten Schaden und 20 Lebenspunkte pro Sekunde.',
25 | },
26 | 'Mist Attunement 3': {
27 | en: 'Gain 15 agony resistance, 4% outgoing damage, and 50 health per second.',
28 | de: 'Erhaltet 15 Qual-Widerstand, 4% zugefügten Schaden und 50 Lebenspunkte pro Sekunde.',
29 | },
30 | 'Mist Attunement 4': {
31 | en: 'Gain 25 agony resistance, 7% outgoing damage, and 100 health per second.',
32 | de: 'Erhaltet 25 Qual-Widerstand, 7% zugefügten Schaden und 100 Lebenspunkte pro Sekunde.',
33 | },
34 | };
35 |
--------------------------------------------------------------------------------
/gw2-ui/src/i18n/index.ts:
--------------------------------------------------------------------------------
1 | import * as React from 'react';
2 |
3 | export type APILanguage = 'de' | 'en' | 'es' | 'fr' | 'zh';
4 | export const API_LANGUAGES = ['de', 'en', 'es', 'fr', 'zh'];
5 |
6 | function isAPILanguage(l: string): l is APILanguage {
7 | return API_LANGUAGES.includes(l);
8 | }
9 |
10 | function getNavigatorDefaultLanguage(): APILanguage {
11 | if (typeof navigator === 'undefined') return 'en';
12 | const languages = navigator.languages || [navigator.language];
13 | for (let l of languages) {
14 | // l might still be undefined (edge-runtime) so we need to check for that
15 | l = l?.split('-')[0].toLowerCase(); // en-US -> en
16 | if (isAPILanguage(l)) return l;
17 | }
18 |
19 | return 'en';
20 | }
21 |
22 | const APILanguageContext = React.createContext(
23 | getNavigatorDefaultLanguage(),
24 | );
25 |
26 | export const APILanguageProvider = APILanguageContext.Provider;
27 |
28 | export function useAPILanguage() {
29 | return React.useContext(APILanguageContext);
30 | }
31 |
32 | export type Translation = Partial>;
33 |
34 | // Use this to translate a string. You need to figure out the appropriate language yourself.
35 | export function translate(
36 | map: Record,
37 | key: T,
38 | lang: APILanguage,
39 | ): string {
40 | const t = map[key];
41 | if (!t) return key;
42 | return t[lang] || t['en'] || key;
43 | }
44 |
45 | // A shorthand to both read the configured language and translate a string, for simple one-off uses.
46 | export function useTranslation(
47 | map: Record,
48 | key: T,
49 | ): string {
50 | const lang = useAPILanguage();
51 |
52 | return translate(map, key, lang);
53 | }
54 |
--------------------------------------------------------------------------------
/gw2-ui/src/i18n/races.ts:
--------------------------------------------------------------------------------
1 | // This file is autogenerated by /generate_from_api.mjs
2 | // Do not edit this file directly - it will be overwritten
3 |
4 | import type { Translation } from '.';
5 | import type { RacesTypes } from '../data/races';
6 |
7 | const TRANSLATIONS_RACES: Record = {
8 | Asura: { zh: '阿苏拉' },
9 | Charr: { zh: '夏尔' },
10 | Human: { de: 'Mensch', es: 'Humano', fr: 'Humain', zh: '人类' },
11 | Norn: { zh: '诺恩' },
12 | Sylvari: { zh: '希尔瓦里' },
13 | };
14 | export default TRANSLATIONS_RACES;
15 |
--------------------------------------------------------------------------------
/gw2-ui/src/index.ts:
--------------------------------------------------------------------------------
1 | import { APILanguageProvider } from './i18n';
2 |
3 | export { APILanguageProvider };
4 | export * from './components/index';
5 | export * from './gw2api/hooks';
6 |
--------------------------------------------------------------------------------
/gw2-ui/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.base.json",
3 | "include": ["src/**/*.ts", "src/**/*.tsx", "typings.d.ts"],
4 | "exclude": ["src/gw2api/typeguards/**/*"]
5 | }
6 |
--------------------------------------------------------------------------------
/gw2-ui/typings.d.ts:
--------------------------------------------------------------------------------
1 | declare module '*.module.css';
2 |
--------------------------------------------------------------------------------
/gw2apicache/.gitignore:
--------------------------------------------------------------------------------
1 | # This directory contains a cache of the GW2 API for debugging purposes.
2 | # You can populate it with pnpm generate-api-cache
3 | # But you probably don't need it.
4 | *
5 | !.gitignore
6 |
--------------------------------------------------------------------------------
/node_api_helpers.mjs:
--------------------------------------------------------------------------------
1 | import prettier from 'prettier';
2 | import * as path from 'node:path';
3 | import * as fs from 'node:fs';
4 | import * as url from 'node:url';
5 |
6 | export const API_LANGUAGES = ['de', 'en', 'es', 'fr', 'zh'];
7 | const GW2_API_URL = 'https://api.guildwars2.com';
8 |
9 | const AUTOGENERATE_HEADER = `
10 | // This file is autogenerated by /generate_from_api.mjs
11 | // Do not edit this file directly - it will be overwritten
12 |
13 | `;
14 |
15 | let prettier_options = null;
16 | export async function initPrettier() {
17 | prettier_options = await prettier.resolveConfig(
18 | url.fileURLToPath(import.meta.url),
19 | );
20 | }
21 | export async function writeSource(filepath, content) {
22 | filepath = path.join('src', filepath);
23 | let prettied = await prettier.format(AUTOGENERATE_HEADER + content, {
24 | ...prettier_options,
25 | filepath,
26 | });
27 | console.log('Generating', filepath);
28 | fs.writeFileSync(filepath, prettied, 'utf8');
29 | }
30 |
31 | const FETCH_OPTIONS = {
32 | method: 'GET',
33 | mode: 'cors',
34 | credentials: 'omit',
35 | redirect: 'error',
36 | };
37 |
38 | export async function fetch_api(path) {
39 | let url = GW2_API_URL + path;
40 | console.log('Fetching', url);
41 | let retries = 3;
42 | let res;
43 | while (retries > 0) {
44 | try {
45 | res = await fetch(url, FETCH_OPTIONS);
46 | break;
47 | } catch (e) {
48 | console.log(e);
49 | if (retries <= 1) throw e;
50 | }
51 | retries--;
52 | }
53 | if (!res.ok) throw new Error(`HTTP Error: ${res.status}`);
54 | let json = await res.json();
55 | return json;
56 | }
57 |
58 | export function compare_strings(a, b) {
59 | if (a === b) return 0;
60 | return a < b ? -1 : 1;
61 | }
62 |
--------------------------------------------------------------------------------
/pnpm-workspace.yaml:
--------------------------------------------------------------------------------
1 | packages:
2 | - gw2-ui
3 | - react-discretize-components
4 | - globals
5 | - typeface-menomonia
6 | - remark-mdx-gw2ui
7 |
--------------------------------------------------------------------------------
/react-discretize-components/.storybook/main.js:
--------------------------------------------------------------------------------
1 | import { dirname, join } from 'node:path';
2 |
3 | const path = require('path');
4 | module.exports = {
5 | stories: ['../src/**/*.stories.tsx'],
6 | addons: [
7 | getAbsolutePath('@storybook/addon-actions'),
8 | getAbsolutePath('@storybook/addon-essentials'),
9 | getAbsolutePath('storybook-css-modules-preset'),
10 | '@storybook/addon-webpack5-compiler-babel',
11 | ],
12 | framework: {
13 | name: getAbsolutePath('@storybook/react-webpack5'),
14 | options: {},
15 | },
16 | webpackFinal: async (config, { configType }) => {
17 | // if (configType !== 'DEVELOPMENT') {
18 | // return config;
19 | // }
20 | config.resolve = { ...config.resolve };
21 | config.resolve.alias = { ...config.resolve.alias };
22 | config.resolve.alias['@discretize/gw2-ui-new'] = path.resolve(
23 | path.join(__dirname, '..', '..', 'gw2-ui', 'src', 'index'),
24 | );
25 | // console.log(config);
26 | return config;
27 | },
28 | docs: {},
29 | typescript: {
30 | reactDocgen: 'react-docgen-typescript',
31 | },
32 | };
33 |
34 | function getAbsolutePath(value) {
35 | return dirname(require.resolve(join(value, 'package.json')));
36 | }
37 |
--------------------------------------------------------------------------------
/react-discretize-components/.storybook/preview.js:
--------------------------------------------------------------------------------
1 | import '@discretize/typeface-menomonia';
2 | import '../../gw2-ui/src/default_style.css';
3 | import 'typeface-fira-mono';
4 | import 'typeface-muli';
5 | import 'typeface-raleway';
6 | import '../src/styles/defaultTheme.css';
7 |
8 | export const parameters = {
9 | actions: { argTypesRegex: '^on[A-Z].*' },
10 | controls: {
11 | matchers: {
12 | color: /(background|color)$/i,
13 | date: /Date$/,
14 | },
15 | },
16 | backgrounds: {
17 | default: 'dark',
18 | },
19 | };
20 |
21 | // setup the MUI theming
22 | export const decorators = [
23 | (Story) => (
24 | <>
25 |
26 | >
27 | ),
28 | ];
29 |
30 | // export const tags = ['autodocs'];
31 |
--------------------------------------------------------------------------------
/react-discretize-components/README.md:
--------------------------------------------------------------------------------
1 | # @discretize/react-discretize-components [](https://www.npmjs.com/package/@discretize/react-discretize-components)
2 |
3 | react-discretize-components contains shared react components for all discretize projects. For example usage please refer to the gear-optimizer repository. At the moment this library will only work in gatsby projects.
4 |
5 | ## Installation
6 |
7 | ```
8 | yarn add @discretize/react-discretize-components
9 | ```
10 |
11 | Dependencies in the implementing application:
12 |
13 | - react
14 | - gw2-ui-new
15 |
16 | ## Included components
17 |
18 | List of react components:
19 |
20 | - Character
21 | - Armor
22 | - Attributes
23 | - BackAndTrinkets
24 | - Consumables
25 | - Legends
26 | - Skills
27 | - Weapons
28 | - TextDivider
29 | - NoSelection
30 |
31 | List of helper functions:
32 |
33 | - iconSizes mapping: (string) => integer
34 | - firstUppercase
35 |
--------------------------------------------------------------------------------
/react-discretize-components/babel.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "sourceType": "unambiguous",
3 | "presets": [
4 | ["@babel/preset-env", { "targets": "defaults" }],
5 | "@babel/preset-typescript",
6 | ["@babel/preset-react", { "runtime": "automatic" }]
7 | ],
8 | "plugins": []
9 | }
10 |
--------------------------------------------------------------------------------
/react-discretize-components/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@discretize/react-discretize-components",
3 | "version": "3.2.0",
4 | "description": "The source repo for common react components of discretize projects",
5 | "author": "gw2princeps",
6 | "license": "MIT",
7 | "private": false,
8 | "sideEffects": [
9 | "*.css",
10 | "*.png",
11 | "*.jpg"
12 | ],
13 | "files": [
14 | "dist"
15 | ],
16 | "module": "dist/index.js",
17 | "types": "dist/index.d.ts",
18 | "scripts": {
19 | "dev": "pnpm storybook",
20 | "storybook": "storybook dev -p 6006",
21 | "build-storybook": "storybook build",
22 | "build": "node ../build.mjs",
23 | "//serve": "rollup -c -w --environment BUILD:development",
24 | "deploy-storybook": "node ../deploy-storybook.mjs",
25 | "prepublish": "pnpm build",
26 | "postpublish": "pnpm build-storybook && pnpm deploy-storybook && rimraf ./storybook-static "
27 | },
28 | "dependencies": {
29 | "@discretize/gw2-ui-new": "workspace:^",
30 | "@discretize/typeface-menomonia": "workspace:^",
31 | "classnames": "^2.5.1",
32 | "typeface-fira-mono": "^0.0.72",
33 | "typeface-muli": "^1.1.3",
34 | "typeface-raleway": "^1.1.13"
35 | },
36 | "devDependencies": {
37 | "react": "^19.0.0",
38 | "react-dom": "^19.0.0"
39 | },
40 | "peerDependencies": {
41 | "react": "^18.0.0 || ^19.0.0",
42 | "react-dom": "^18.0.0 || ^19.0.0"
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/react-discretize-components/src/character/Armor/Armor.module.css:
--------------------------------------------------------------------------------
1 | .list {
2 | list-style: none;
3 | margin: 0;
4 | padding: 0;
5 | position: relative;
6 | padding-top: 8px;
7 | padding-bottom: 8px;
8 | }
9 | .listItem {
10 | display: flex;
11 | align-items: center;
12 | line-height: 0;
13 | justify-content: center;
14 | padding-top: 4px;
15 | padding-bottom: 4px;
16 | }
17 | .listItem > *:first-child {
18 | text-align: right;
19 | }
20 | .listItem > *:last-child {
21 | width: 55%;
22 | text-align: left;
23 | }
24 |
25 | .listItemText {
26 | flex: 1 1 auto;
27 | flex-grow: 0;
28 | margin-left: 16px;
29 | padding-left: 16px;
30 | border-left: 1px solid var(--rdc-color-border);
31 | line-height: 0;
32 | }
33 | .primaryText {
34 | line-height: 1.4;
35 | font-weight: 500;
36 | font-family: var(--rdc-font-family);
37 | color: var(--rdc-font-color);
38 | }
39 | .secondaryText {
40 | margin: 0;
41 | display: block;
42 | line-height: 1.23;
43 | font-size: 0.9rem;
44 | font-weight: 300;
45 | font-family: var(--rdc-font-family);
46 | }
47 |
--------------------------------------------------------------------------------
/react-discretize-components/src/character/AssumedBuffs/AssumedBuffs.module.css:
--------------------------------------------------------------------------------
1 | .component {
2 | font-size: 20px;
3 | }
4 |
--------------------------------------------------------------------------------
/react-discretize-components/src/character/AssumedBuffs/AssumedBuffs.stories.tsx:
--------------------------------------------------------------------------------
1 | import type { Meta, StoryFn, StoryObj } from '@storybook/react';
2 | import React from 'react';
3 | import AssumedBuffs from './AssumedBuffs';
4 |
5 | const meta: Meta = {
6 | title: 'Character/AssumedBuffs',
7 | component: AssumedBuffs,
8 | argTypes: {
9 | className: { control: false },
10 | },
11 | };
12 | export default meta;
13 |
14 | const Template: StoryFn = (args) => {
15 | return ;
16 | };
17 |
18 | export const Example: StoryObj = {
19 | render: Template,
20 |
21 | args: {
22 | value: [
23 | { id: 'Might', type: 'Boon' },
24 | { id: 'Fury', type: 'Boon' },
25 | { gw2id: 1786, type: 'Trait' },
26 | { gw2id: 12497, type: 'Skill' },
27 | { gw2id: 14407, type: 'Skill' },
28 | { gw2id: 14405, type: 'Skill' },
29 | { gw2id: 14404, type: 'Skill' },
30 | {
31 | gw2id: 79722,
32 | type: 'Item',
33 | },
34 | { gw2id: 96613, type: 'Item' },
35 | { id: 'Mist Attunement 3', type: 'Augmentation' },
36 | ],
37 | },
38 | };
39 |
--------------------------------------------------------------------------------
/react-discretize-components/src/character/Attributes/Attributes.module.css:
--------------------------------------------------------------------------------
1 | .wrapper {
2 | width: 100%;
3 | display: flex;
4 | }
5 | .half {
6 | width: 100%;
7 | }
8 | .gw2Item {
9 | font-size: 20px;
10 | color: #aaaaaa;
11 | white-space: nowrap;
12 | }
13 | .gridItem {
14 | padding: 4px 16px;
15 | }
16 | .list {
17 | list-style: none;
18 | margin: 0;
19 | padding: 0;
20 | }
21 |
--------------------------------------------------------------------------------
/react-discretize-components/src/character/Attributes/Attributes.stories.tsx:
--------------------------------------------------------------------------------
1 | import type { Meta, StoryFn, StoryObj } from '@storybook/react';
2 | import React from 'react';
3 | import Attributes from './Attributes';
4 |
5 | const meta: Meta = {
6 | title: 'Character/Attributes',
7 | component: Attributes,
8 | // argTypes: {
9 | // className: { control: false },
10 | // },
11 | };
12 | export default meta;
13 |
14 | const Template: StoryFn = (args) => {
15 | return ;
16 | };
17 |
18 | export const Example: StoryObj = {
19 | render: Template,
20 |
21 | args: {
22 | profession: 'Elementalist',
23 | data: {
24 | Armor: 2514,
25 | Power: 3926,
26 | Precision: 2384,
27 | Toughness: 1243,
28 | Vitality: 1235,
29 | Ferocity: 1556,
30 | 'Condition Damage': 750,
31 | Expertise: 0,
32 | Concentration: 243,
33 | 'Healing Power': 0,
34 | 'Agony Resistance': 162,
35 | 'Condition Duration': 0,
36 | 'Boon Duration': 0.162,
37 | 'Critical Chance': 1.259047619047619,
38 | 'Critical Damage': 2.5373333333333337,
39 | Health: 13995,
40 | },
41 | },
42 | };
43 |
--------------------------------------------------------------------------------
/react-discretize-components/src/character/BackAndTrinkets/BackAndTrinkets.module.css:
--------------------------------------------------------------------------------
1 | .root {
2 | grid-template-columns: repeat(3, 1fr);
3 | margin: -12px;
4 | display: grid;
5 | }
6 | .gridItem {
7 | display: flex;
8 | flex-direction: column;
9 | text-align: center;
10 | padding: 12px;
11 | align-items: flex-start;
12 | }
13 | .title {
14 | font-size: 0.8125rem;
15 | }
16 | .borderLeft {
17 | border-left: 1px solid var(--rdc-color-border);
18 | }
19 | .borderBottom {
20 | border-bottom: 1px solid var(--rdc-color-border);
21 | }
22 | .upperRowItem {
23 | align-self: flex-end;
24 | }
25 |
--------------------------------------------------------------------------------
/react-discretize-components/src/character/Character/Character.module.css:
--------------------------------------------------------------------------------
1 | .top {
2 | display: flex;
3 | justify-content: space-between;
4 | position: relative;
5 | z-index: 1;
6 | }
7 | .switches {
8 | display: flex;
9 | flex-wrap: wrap;
10 | gap: 1em;
11 | }
12 | .unbuffedInfo {
13 | position: absolute;
14 | bottom: 1em;
15 | right: 1em;
16 | transform: scale(1.5);
17 | }
18 | .section {
19 | position: relative;
20 | background-color: var(--rdc-character-background-color);
21 | padding: 16px;
22 | margin-top: 12px;
23 | margin-bottom: 12px;
24 | border-radius: 0;
25 | box-shadow:
26 | 0px 3px 5px -1px rgb(0 0 0 / 20%),
27 | 0px 5px 8px 0px rgb(0 0 0 / 14%),
28 | 0px 1px 14px 0px rgb(0 0 0 / 12%);
29 | }
30 | .assumedBuffs {
31 | display: flex;
32 | flex-shrink: 0;
33 | align-items: center;
34 | }
35 | .wrapper {
36 | display: flex;
37 | flex-wrap: wrap;
38 | justify-content: space-between;
39 | isolation: isolate;
40 | }
41 | .side {
42 | display: flex;
43 | flex: 0 0 250px;
44 | flex-direction: column;
45 | justify-content: space-between;
46 | z-index: 1;
47 | }
48 | .middle {
49 | display: flex;
50 | flex: 0.7 0.2;
51 | flex-direction: column;
52 | justify-content: space-between;
53 | }
54 | .middle > img {
55 | width: max(100%, 450px);
56 | left: 50%;
57 | top: 33%;
58 | position: relative;
59 | transform: translate(-50%, -50%);
60 | }
61 | .skillsLegends {
62 | max-width: 390px;
63 | }
64 | @media (min-width: 600px) {
65 | .skillsLegends {
66 | align-self: center;
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/react-discretize-components/src/character/Consumables/Consumables.module.css:
--------------------------------------------------------------------------------
1 | .root {
2 | display: grid;
3 | justify-content: center;
4 | grid-auto-flow: column;
5 | margin: -12px;
6 | }
7 | .gridItem {
8 | display: flex;
9 | flex-direction: column;
10 | text-align: center;
11 | padding: 12px;
12 | }
13 | .borderLeft {
14 | border-left: 1px solid var(--rdc-color-border);
15 | }
16 |
--------------------------------------------------------------------------------
/react-discretize-components/src/character/Consumables/Consumables.stories.tsx:
--------------------------------------------------------------------------------
1 | import type { Meta, StoryFn, StoryObj } from '@storybook/react';
2 | import React from 'react';
3 | import Consumables from './Consumables';
4 |
5 | const meta: Meta = {
6 | title: 'Character/Consumables',
7 | component: Consumables,
8 | // argTypes: {
9 | // className: { control: false },
10 | // },
11 | };
12 | export default meta;
13 |
14 | const Template: StoryFn = (args) => {
15 | return ;
16 | };
17 |
18 | export const Example: StoryObj = {
19 | render: Template,
20 |
21 | args: {
22 | foodId: 91805,
23 | utilityId: 50082,
24 | },
25 | };
26 |
--------------------------------------------------------------------------------
/react-discretize-components/src/character/Legends/Legends.module.css:
--------------------------------------------------------------------------------
1 | .grid {
2 | display: flex;
3 | justify-content: center;
4 | align-items: center;
5 | }
6 | .gridItem {
7 | display: flex;
8 | flex-direction: column;
9 | text-align: center;
10 | padding: 8px;
11 | }
12 | .skillDesktop {
13 | font-size: 60px;
14 | }
15 | .skillMobile {
16 | font-size: 45px;
17 | }
18 |
--------------------------------------------------------------------------------
/react-discretize-components/src/character/Legends/Legends.stories.tsx:
--------------------------------------------------------------------------------
1 | import type { Meta, StoryFn, StoryObj } from '@storybook/react';
2 | import React from 'react';
3 | import Legends from './Legends';
4 |
5 | const meta: Meta = {
6 | title: 'Character/Legends',
7 | component: Legends,
8 | argTypes: {
9 | className: { control: false },
10 | },
11 | };
12 | export default meta;
13 |
14 | const Template: StoryFn = (args) => {
15 | return ;
16 | };
17 |
18 | export const Example: StoryObj = {
19 | render: Template,
20 |
21 | args: {
22 | legend1Id: 28419,
23 | legend2Id: 62891,
24 | },
25 | };
26 |
--------------------------------------------------------------------------------
/react-discretize-components/src/character/Legends/Legends.tsx:
--------------------------------------------------------------------------------
1 | import { Icon, Skill } from '@discretize/gw2-ui-new';
2 | import useMediaQuery from '../../helpers/useMediaQuery';
3 | import classNames from 'classnames';
4 | import classes from './Legends.module.css';
5 |
6 | export interface LegendsProps {
7 | legend1Id: number;
8 | legend2Id: number;
9 | className?: string;
10 | }
11 |
12 | const Legends = ({ legend1Id, legend2Id, className }: LegendsProps) => {
13 | const isMobile = useMediaQuery('(max-width: 600px)');
14 |
15 | const classNameSkill = isMobile ? classes.skillMobile : classes.skillDesktop;
16 |
17 | return (
18 | <>
19 | {legend1Id && legend2Id && (
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 | )}
30 | >
31 | );
32 | };
33 |
34 | export default Legends;
35 |
--------------------------------------------------------------------------------
/react-discretize-components/src/character/Skills/Skills.module.css:
--------------------------------------------------------------------------------
1 | .grid {
2 | display: flex;
3 | justify-content: center;
4 | gap: 4px;
5 | }
6 | .gridItem {
7 | display: flex;
8 | flex-direction: column;
9 | text-align: center;
10 | }
11 | .gridItemMiddle {
12 | padding-right: 4px;
13 | padding-left: 4px;
14 | }
15 | .borders {
16 | border-left: 1px solid var(--rdc-color-border);
17 | border-right: 1px solid var(--rdc-color-border);
18 | }
19 |
--------------------------------------------------------------------------------
/react-discretize-components/src/character/Skills/Skills.stories.tsx:
--------------------------------------------------------------------------------
1 | import type { Meta, StoryFn, StoryObj } from '@storybook/react';
2 | import React from 'react';
3 | import Skills from './Skills';
4 |
5 | const meta: Meta = {
6 | title: 'Character/Skills',
7 | component: Skills,
8 | argTypes: {
9 | className: { control: false },
10 | },
11 | };
12 | export default meta;
13 |
14 | const Template: StoryFn = (args) => {
15 | return ;
16 | };
17 |
18 | export const Example: StoryObj = {
19 | render: Template,
20 |
21 | args: {
22 | healId: 5802,
23 | utility1Id: 5838,
24 | utility2Id: 5933,
25 | utility3Id: 63262,
26 | eliteId: 30800,
27 | },
28 | };
29 |
--------------------------------------------------------------------------------
/react-discretize-components/src/character/Weapons/Weapons.stories.tsx:
--------------------------------------------------------------------------------
1 | import type { Meta, StoryFn, StoryObj } from '@storybook/react';
2 | import React from 'react';
3 | import Weapons from './Weapons';
4 |
5 | const meta: Meta = {
6 | title: 'Character/Weapons',
7 | component: Weapons,
8 | // argTypes: {
9 | // className: { control: false },
10 | // },
11 | };
12 | export default meta;
13 |
14 | const Template: StoryFn = (args) => {
15 | return ;
16 | };
17 |
18 | export const Example: StoryObj = {
19 | render: Template,
20 |
21 | args: {
22 | weapon1MainId: 76158,
23 | weapon1MainAffix: 'Berserker',
24 | weapon1MainInfusion1Id: 49432,
25 | weapon1MainSigil1Id: 24615,
26 | weapon1OffId: 86098,
27 | weapon1OffAffix: 'Berserker',
28 | weapon1OffInfusionId: 49432,
29 | weapon1OffSigilId: 24868,
30 | weapon2MainType: 'Greatsword',
31 | weapon2MainAffix: 'Berserker',
32 | weapon2MainInfusion1Id: 49432,
33 | weapon2MainSigil1Id: 24615,
34 | weapon2MainInfusion2Id: 49432,
35 | weapon2MainSigil2Id: 24868,
36 | },
37 | };
38 |
39 | export const TwoHanded: StoryObj = {
40 | render: Template,
41 |
42 | args: {
43 | weapon1MainId: 30689,
44 | weapon1MainAffix: 'Berserker',
45 | weapon1MainInfusion1Id: 49432,
46 | weapon1MainSigil1Id: 24615,
47 | weapon1MainInfusion2Id: 49432,
48 | weapon1MainSigil2Id: 24868,
49 | },
50 | };
51 |
52 | export const EmptyOffhand: StoryObj = {
53 | render: Template,
54 |
55 | args: {
56 | weapon1MainId: 76158,
57 | weapon1MainAffix: 'Berserker',
58 | weapon1MainInfusion1Id: 49432,
59 | weapon1MainSigil1Id: 24615,
60 | },
61 | };
62 |
--------------------------------------------------------------------------------
/react-discretize-components/src/helpers/DynamicItem/DynamicItem.tsx:
--------------------------------------------------------------------------------
1 | import { CreateItem, Item } from '@discretize/gw2-ui-new';
2 | import defaultClasses from '../../styles/defaultStyles.module.css';
3 |
4 | type Affix = React.ComponentProps['stat'];
5 |
6 | function createUpgrades(
7 | array: (number | [number, number] | undefined)[],
8 | ): (number | [number, number])[] {
9 | return (
10 | array &&
11 | (array.filter(
12 | (elem: [number, number] | number | undefined) =>
13 | typeof elem === 'number' || Array.isArray(elem),
14 | ) as (number | [number, number])[])
15 | );
16 | }
17 |
18 | const DynamicItem = ({
19 | id,
20 | affix,
21 | upgrades,
22 | type,
23 | weight,
24 | rarity,
25 | }: {
26 | id?: number;
27 | affix?: Affix;
28 | upgrades?: (number | undefined | [number, number])[];
29 | type?: string;
30 | weight?: React.ComponentProps['weight'];
31 | rarity?: React.ComponentProps['rarity'];
32 | }) => {
33 | const sharedProps = {
34 | disableText: true,
35 | className: defaultClasses.gw2Item,
36 | upgrades: upgrades ? createUpgrades(upgrades) : [],
37 | stat: affix || '',
38 | };
39 |
40 | return (
41 | <>
42 | {id ? (
43 |
44 | ) : (
45 |
51 | )}
52 | >
53 | );
54 | };
55 | export default DynamicItem;
56 |
--------------------------------------------------------------------------------
/react-discretize-components/src/helpers/HelperIcon/HelperIcon.module.css:
--------------------------------------------------------------------------------
1 | .svg {
2 | width: 1em;
3 | height: 1em;
4 | display: inline-block;
5 | vertical-align: text-top;
6 | color: var(--rdc-color-primary);
7 | }
8 |
--------------------------------------------------------------------------------
/react-discretize-components/src/helpers/HelperIcon/HelperIcon.stories.tsx:
--------------------------------------------------------------------------------
1 | import type { Meta, StoryFn, StoryObj } from '@storybook/react';
2 | import React from 'react';
3 | import HelperIcon from './HelperIcon';
4 |
5 | const meta: Meta = {
6 | title: 'Components/HelperIcon',
7 | component: HelperIcon,
8 | // argTypes: {
9 | // className: { control: false },
10 | // },
11 | };
12 | export default meta;
13 |
14 | const Template: StoryFn = (args) => {
15 | return ;
16 | };
17 |
18 | export const Example: StoryObj = {
19 | render: Template,
20 |
21 | args: {
22 | text: 'Test-Helper',
23 | },
24 | };
25 |
--------------------------------------------------------------------------------
/react-discretize-components/src/helpers/HelperIcon/HelperIcon.tsx:
--------------------------------------------------------------------------------
1 | import { Tooltip } from '@discretize/gw2-ui-new';
2 | import * as React from 'react';
3 | import classes from './HelperIcon.module.css';
4 |
5 | export interface HelperIconProps {
6 | text: string;
7 | fontSize?: string;
8 | style?: React.CSSProperties;
9 | }
10 | const HelperIcon = ({ text, fontSize, style }: HelperIconProps) => {
11 | return (
12 |
13 |
14 |
27 |
28 |
29 | );
30 | };
31 | export default HelperIcon;
32 |
--------------------------------------------------------------------------------
/react-discretize-components/src/helpers/NoSelection/NoSelection.module.css:
--------------------------------------------------------------------------------
1 | .root {
2 | white-space: nowrap;
3 | }
4 |
--------------------------------------------------------------------------------
/react-discretize-components/src/helpers/NoSelection/NoSelection.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import classNames from 'classnames';
3 | import { Tooltip, Icon, DetailsHeader } from '@discretize/gw2-ui-new';
4 | import sizes, { type IconSizes } from '../iconSizes';
5 | import classes from './NoSelection.module.css';
6 |
7 | export interface NoSelectionProps {
8 | className?: string;
9 | size?: IconSizes;
10 | }
11 |
12 | const NoSelection = ({ className, size, ...rest }: NoSelectionProps) => {
13 | return (
14 | Empty Slot}>
15 |
23 |
24 |
25 |
26 | );
27 | };
28 |
29 | export default React.memo(NoSelection);
30 |
--------------------------------------------------------------------------------
/react-discretize-components/src/helpers/Switch/Switch.module.css:
--------------------------------------------------------------------------------
1 | .toggle {
2 | --width: 40px;
3 | --height: calc(var(--width) / 2);
4 | --border-radius: calc(var(--height) / 2);
5 |
6 | display: inline-block;
7 | cursor: pointer;
8 | }
9 | .toggle__input {
10 | display: none;
11 | }
12 | .toggle__fill {
13 | position: relative;
14 | width: var(--width);
15 | height: var(--height);
16 | border-radius: var(--border-radius);
17 | background: #dddddd;
18 | transition: background 0.2s;
19 | }
20 | .toggle__fill::after {
21 | content: '';
22 | position: absolute;
23 | top: 0;
24 | left: 0;
25 | height: var(--height);
26 | width: var(--height);
27 | background: #ffffff;
28 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.25);
29 | border-radius: var(--border-radius);
30 | transition: transform 0.2s;
31 | }
32 | .toggle__input:checked ~ .toggle__fill {
33 | background: var(--rdc-color-primary);
34 | }
35 |
36 | .toggle__input:checked ~ .toggle__fill::after {
37 | transform: translateX(var(--height));
38 | }
39 |
40 | .wrapper {
41 | display: flex;
42 | align-items: center;
43 | justify-content: center;
44 | font-family: var(--rdc-font-family);
45 | gap: 8px;
46 | }
47 |
--------------------------------------------------------------------------------
/react-discretize-components/src/helpers/Switch/Switch.tsx:
--------------------------------------------------------------------------------
1 | import * as React from 'react';
2 | import classes from './Switch.module.css';
3 |
4 | export interface SwitchProps {
5 | onChange: (e: React.ChangeEvent) => void;
6 | label: string;
7 | }
8 |
9 | const Switch = ({ onChange, label }: SwitchProps) => {
10 | return (
11 |
12 |
21 | {label}
22 |
23 | );
24 | };
25 | export default Switch;
26 |
--------------------------------------------------------------------------------
/react-discretize-components/src/helpers/TextDivider/TextDivider.module.css:
--------------------------------------------------------------------------------
1 | .root {
2 | display: flex;
3 | flex-direction: row;
4 | align-items: center;
5 | justify-content: center;
6 | margin-bottom: 16px;
7 | }
8 | .divider {
9 | height: 1px;
10 | background-color: var(--rdc-color-border);
11 | flex-grow: 1;
12 | }
13 | .content {
14 | font-family: Raleway;
15 | margin-left: 16px;
16 | margin-right: 16px;
17 | font-weight: 400;
18 | color: inherit;
19 | text-transform: uppercase;
20 | letter-spacing: 2px;
21 | line-height: 1.35417em;
22 | }
23 |
--------------------------------------------------------------------------------
/react-discretize-components/src/helpers/TextDivider/TextDivider.stories.tsx:
--------------------------------------------------------------------------------
1 | import type { Meta, StoryFn, StoryObj } from '@storybook/react';
2 | import React from 'react';
3 | import TextDivider from './TextDivider';
4 |
5 | const meta: Meta = {
6 | title: 'Components/TextDivider',
7 | component: TextDivider,
8 | argTypes: {
9 | className: { control: false },
10 | },
11 | };
12 | export default meta;
13 |
14 | const Template: StoryFn = (args) => {
15 | return ;
16 | };
17 |
18 | export const Example: StoryObj = {
19 | render: Template,
20 |
21 | args: {
22 | text: 'Test',
23 | },
24 | };
25 |
--------------------------------------------------------------------------------
/react-discretize-components/src/helpers/TextDivider/TextDivider.tsx:
--------------------------------------------------------------------------------
1 | import classNames from 'classnames';
2 | import { type ReactElement } from 'react';
3 | import classes from './TextDivider.module.css';
4 |
5 | export interface TextDividerProps {
6 | className?: string;
7 | text?: string;
8 | children?: ReactElement;
9 | }
10 |
11 | const TextDivider = ({ className, text, children }: TextDividerProps) => {
12 | return (
13 |
14 |
15 |
{text || children}
16 |
17 |
18 | );
19 | };
20 | export default TextDivider;
21 |
--------------------------------------------------------------------------------
/react-discretize-components/src/helpers/firstUppercase.js:
--------------------------------------------------------------------------------
1 | export default function firstUppercase(text) {
2 | if (typeof text === 'undefined' || text === null || text === '') return '';
3 |
4 | const toUpper = (str) =>
5 | str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();
6 | return text.split(/ |-/).map(toUpper).join(' ').trim();
7 | }
8 |
--------------------------------------------------------------------------------
/react-discretize-components/src/helpers/iconSizes.ts:
--------------------------------------------------------------------------------
1 | export type IconSizes =
2 | | 'tiny'
3 | | 'small'
4 | | 'medium'
5 | | 'medium2'
6 | | 'large'
7 | | 'large2'
8 | | 'big'
9 | | 'gigantic';
10 |
11 | const sizes: Record = {
12 | tiny: 12,
13 | small: 16,
14 | medium: 20,
15 | medium2: 30,
16 | large: 40,
17 | large2: 45,
18 | big: 60,
19 | gigantic: 70,
20 | };
21 |
22 | export default sizes;
23 |
--------------------------------------------------------------------------------
/react-discretize-components/src/helpers/useMediaQuery.ts:
--------------------------------------------------------------------------------
1 | import { useEffect, useState } from 'react';
2 |
3 | function useMediaQuery(query: string): boolean {
4 | const getMatches = (query: string): boolean => {
5 | // Prevents SSR issues
6 | if (typeof window !== 'undefined') {
7 | return window.matchMedia(query).matches;
8 | }
9 | return false;
10 | };
11 |
12 | const [matches, setMatches] = useState(getMatches(query));
13 |
14 | function handleChange() {
15 | setMatches(getMatches(query));
16 | }
17 |
18 | useEffect(() => {
19 | const matchMedia = window.matchMedia(query);
20 |
21 | // Triggered at the first client-side load and if query changes
22 | handleChange();
23 |
24 | // Listen matchMedia
25 | if (matchMedia.addListener) {
26 | matchMedia.addListener(handleChange);
27 | } else {
28 | matchMedia.addEventListener('change', handleChange);
29 | }
30 |
31 | return () => {
32 | if (matchMedia.removeListener) {
33 | matchMedia.removeListener(handleChange);
34 | } else {
35 | matchMedia.removeEventListener('change', handleChange);
36 | }
37 | };
38 | }, [query]);
39 |
40 | return matches;
41 | }
42 |
43 | export default useMediaQuery;
44 |
--------------------------------------------------------------------------------
/react-discretize-components/src/index.ts:
--------------------------------------------------------------------------------
1 | import Character from './character/Character/Character';
2 | import Armor from './character/Armor/Armor';
3 | import Attributes from './character/Attributes/Attributes';
4 | import BackAndTrinkets from './character/BackAndTrinkets/BackAndTrinkets';
5 | import Consumables from './character/Consumables/Consumables';
6 | import Skills from './character/Skills/Skills';
7 | import Weapons from './character/Weapons/Weapons';
8 | import AssumedBuffs from './character/AssumedBuffs/AssumedBuffs';
9 | import Legends from './character/Legends/Legends';
10 |
11 | import iconSizes from './helpers/iconSizes';
12 | import firstUppercase from './helpers/firstUppercase';
13 | import useMediaQuery from './helpers/useMediaQuery';
14 |
15 | import TextDivider from './helpers/TextDivider/TextDivider';
16 | import NoSelection from './helpers/NoSelection/NoSelection';
17 | import HelperIcon from './helpers/HelperIcon/HelperIcon';
18 |
19 | export {
20 | Character,
21 | Armor,
22 | Attributes,
23 | BackAndTrinkets,
24 | Consumables,
25 | Skills,
26 | Weapons,
27 | AssumedBuffs,
28 | Legends,
29 | iconSizes,
30 | firstUppercase,
31 | TextDivider,
32 | NoSelection,
33 | HelperIcon,
34 | useMediaQuery,
35 | };
36 |
--------------------------------------------------------------------------------
/react-discretize-components/src/styles/defaultStyles.module.css:
--------------------------------------------------------------------------------
1 | .gw2Item {
2 | font-size: 60px;
3 | line-height: 0.9 !important;
4 | }
5 | @media (max-width: 600px) {
6 | .gw2Item {
7 | font-size: 45px;
8 | line-height: 0.9 !important;
9 | }
10 | }
11 | .title {
12 | font-size: 0.8125rem;
13 | font-weight: 400;
14 | font-family: var(--rdc-font-family);
15 | color: var(--rdc-font-color);
16 | }
17 | .infusions {
18 | font-size: 0.8rem;
19 | color: rgb(153 153 153);
20 | }
21 |
--------------------------------------------------------------------------------
/react-discretize-components/src/styles/defaultTheme.css:
--------------------------------------------------------------------------------
1 | :root {
2 | --rdc-font-family: Muli;
3 | --rdc-font-color: #dddddd;
4 | --rdc-character-background-color: rgb(38, 41, 46);
5 | --rdc-color-primary: #009a9b;
6 | --rdc-color-border: rgb(30, 33, 36);
7 | }
8 |
--------------------------------------------------------------------------------
/react-discretize-components/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.base.json",
3 | "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.jsx", "typings.d.ts"]
4 | }
5 |
--------------------------------------------------------------------------------
/react-discretize-components/typings.d.ts:
--------------------------------------------------------------------------------
1 | declare module '*.module.css';
2 |
--------------------------------------------------------------------------------
/remark-mdx-gw2ui/index.js:
--------------------------------------------------------------------------------
1 | import { visit } from 'unist-util-visit';
2 | import resolve from './map-gw2-ids.js';
3 |
4 | function attrToProps(attr) {
5 | const props = {};
6 | if (attr) {
7 | attr.forEach((attr) => (props[attr.name] = attr.value));
8 | }
9 | return props;
10 | }
11 |
12 | export default () => {
13 | return (markdownAST) => {
14 | const gw2uitypes = ['Skill', 'Trait', 'Item'];
15 |
16 | visit(markdownAST, (node) => {
17 | const componentType = node.name;
18 |
19 | if (gw2uitypes.includes(componentType)) {
20 | const resolvedProps = resolve(
21 | componentType,
22 | attrToProps(node.attributes),
23 | );
24 |
25 | if (!resolvedProps) {
26 | return;
27 | }
28 |
29 | node.attributes = [
30 | ...node.attributes.filter((attr) => attr.name !== 'id'),
31 | { type: 'mdxJsxAttribute', name: 'id', value: resolvedProps.id },
32 | ];
33 | }
34 | });
35 |
36 | return markdownAST;
37 | };
38 | };
39 |
--------------------------------------------------------------------------------
/remark-mdx-gw2ui/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@discretize/remark-mdx-gw2ui",
3 | "description": "A remark plugin which injects the gw2-api into gw2-ui components",
4 | "version": "0.0.3",
5 | "author": "gw2princeps , Marcustyphoon ",
6 | "dependencies": {
7 | "unist-util-visit": "^4.1.1"
8 | },
9 | "keywords": [
10 | "remark",
11 | "gw2-ui",
12 | "mdx"
13 | ],
14 | "license": "MIT",
15 | "main": "index.js",
16 | "peerDependencies": {
17 | "react": "^16.9.0 || ^17.0.0 || ^18.0.0",
18 | "react-dom": "^16.9.0 || ^17.0.0 || ^18.0.0"
19 | },
20 | "engines": {
21 | "node": ">=12.13.0"
22 | },
23 | "type": "module"
24 | }
25 |
--------------------------------------------------------------------------------
/tsconfig.base.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | // Target latest version of ECMAScript.
4 | "target": "es2020",
5 | // Search under node_modules for non-relative imports.
6 | "moduleResolution": "node",
7 | // Process & infer types from .js files.
8 | "allowJs": true,
9 | // Don't emit; allow Babel to transform files.
10 | "noEmit": true,
11 | // Enable strictest settings like strictNullChecks & noImplicitAny.
12 | "strict": true,
13 | // Import non-ES modules as default imports.
14 | "esModuleInterop": true,
15 | // Do not create bindings, rollup does that.
16 | "declaration": false,
17 | // Ensure that Babel can safely transpile files in the TypeScript project
18 | "isolatedModules": true,
19 | // Other configuration
20 | "lib": ["dom", "dom.iterable", "esnext"],
21 | "skipLibCheck": true,
22 | "allowSyntheticDefaultImports": true,
23 | "forceConsistentCasingInFileNames": true,
24 | "noFallthroughCasesInSwitch": true,
25 | "module": "es2020",
26 | "resolveJsonModule": true,
27 | "jsx": "react-jsx",
28 | "plugins": [{ "name": "typescript-plugin-css-modules" }]
29 | },
30 | "exclude": ["node_modules/**/*"]
31 | }
32 |
--------------------------------------------------------------------------------
/typeface-menomonia/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Change Log
2 |
3 | All notable changes to this project will be documented in this file.
4 | See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5 |
6 | ## [0.1.2](https://github.com/ManuelHaag/gw2-ui/tree/master/packages/typeface-menomonia/compare/typeface-menomonia@0.1.1...typeface-menomonia@0.1.2) (2020-09-29)
7 |
8 |
9 | ### Bug Fixes
10 |
11 | * remove sideEffects field ([0948449](https://github.com/ManuelHaag/gw2-ui/tree/master/packages/typeface-menomonia/commit/09484495c1a6a76d70952152387e112bc0edda0d))
12 |
13 |
14 |
15 |
16 |
17 | ## [0.1.1](https://github.com/ManuelHaag/gw2-ui/tree/master/packages/typeface-menomonia/compare/typeface-menomonia@0.1.0...typeface-menomonia@0.1.1) (2020-09-28)
18 |
19 | **Note:** Version bump only for package typeface-menomonia
20 |
21 |
22 |
23 |
24 |
25 | # 0.1.0 (2020-03-22)
26 |
27 |
28 | ### Features
29 |
30 | * initial commit ([8b9e462](https://github.com/ManuelHaag/gw2-ui/tree/master/packages/typeface-menomonia/commit/8b9e46288d3804f92ae87ddb0e41d23bdaa0126b))
31 |
--------------------------------------------------------------------------------
/typeface-menomonia/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 Manuel Haag
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/typeface-menomonia/README.md:
--------------------------------------------------------------------------------
1 | # @discretize/typeface-menomonia [](https://www.npmjs.com/package/@discretize/typeface-menomonia)
2 |
--------------------------------------------------------------------------------
/typeface-menomonia/files/menomonia-italic.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/typeface-menomonia/files/menomonia-italic.eot
--------------------------------------------------------------------------------
/typeface-menomonia/files/menomonia-italic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/typeface-menomonia/files/menomonia-italic.ttf
--------------------------------------------------------------------------------
/typeface-menomonia/files/menomonia-italic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/typeface-menomonia/files/menomonia-italic.woff
--------------------------------------------------------------------------------
/typeface-menomonia/files/menomonia.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/typeface-menomonia/files/menomonia.eot
--------------------------------------------------------------------------------
/typeface-menomonia/files/menomonia.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/typeface-menomonia/files/menomonia.ttf
--------------------------------------------------------------------------------
/typeface-menomonia/files/menomonia.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/discretize/discretize-ui/a9befe7392bcb5d0477a2b3c3ec562b613b9f7bd/typeface-menomonia/files/menomonia.woff
--------------------------------------------------------------------------------
/typeface-menomonia/index.css:
--------------------------------------------------------------------------------
1 | /* menomonia-normal - latin */
2 | @font-face {
3 | font-family: 'Menomonia';
4 | font-style: normal;
5 | font-display: swap;
6 | font-weight: 400;
7 | src:
8 | local('Menomonia'),
9 | url('./files/menomonia.woff') format('woff');
10 | }
11 |
12 | /* menomonia-italic - latin */
13 | @font-face {
14 | font-family: 'Menomonia';
15 | font-style: italic;
16 | font-display: swap;
17 | font-weight: 400;
18 | src:
19 | local('Menomonia Italic'),
20 | url('./files/menomonia-italic.woff') format('woff');
21 | }
22 |
--------------------------------------------------------------------------------
/typeface-menomonia/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@discretize/typeface-menomonia",
3 | "version": "0.1.3",
4 | "description": "Menomonia typeface",
5 | "keywords": [
6 | "font",
7 | "font family",
8 | "menomonia",
9 | "typeface"
10 | ],
11 | "homepage": "https://github.com/discretize/discretize-ui",
12 | "bugs": "https://github.com/discretize/discretize-ui/issues",
13 | "repository": "https://github.com/discretize/discretize-ui/tree/main/typeface-menomonia",
14 | "license": "MIT",
15 | "author": "Manuel Haag ",
16 | "main": "index.css"
17 | }
18 |
--------------------------------------------------------------------------------