diff --git a/package.json b/package.json index 6afe2bce..04481d9d 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "svelte": "4.2.18", "svelte-check": "^3.8.2", "svelte-interactions": "^0.2.0", + "svelte-tiny-virtual-list": "^2.1.2", "tailwind-merge": "^2.3.0", "tailwindcss": "^3.4.4", "tslib": "^2.6.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 500cfa62..87f44415 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -163,6 +163,9 @@ importers: svelte-interactions: specifier: ^0.2.0 version: 0.2.0(svelte@4.2.18) + svelte-tiny-virtual-list: + specifier: ^2.1.2 + version: 2.1.2 tailwind-merge: specifier: ^2.3.0 version: 2.3.0 @@ -2339,6 +2342,9 @@ packages: typescript: optional: true + svelte-tiny-virtual-list@2.1.2: + resolution: {integrity: sha512-jeP/WMvgFUR4mYXHGPiCexjX5DuzSO+3xzHNhxfcsFyy+uYPtnqI5UGb383swpzQAyXB0OBqYfzpYihD/5gxnA==} + svelte@4.2.18: resolution: {integrity: sha512-d0FdzYIiAePqRJEb90WlJDkjUEx42xhivxN8muUBmfZnP+tzUgz12DJ2hRJi8sIHCME7jeK1PTMgKPSfTd8JrA==} engines: {node: '>=16'} @@ -4567,6 +4573,8 @@ snapshots: postcss-load-config: 4.0.2(postcss@8.4.38) typescript: 5.5.2 + svelte-tiny-virtual-list@2.1.2: {} + svelte@4.2.18: dependencies: '@ampproject/remapping': 2.3.0 diff --git a/src/app.css b/src/app.css index 57a6b5b3..026358ac 100644 --- a/src/app.css +++ b/src/app.css @@ -229,3 +229,11 @@ filter: url(#enchanted-glint) drop-shadow(2px 2px 2px rgba(0, 0, 0, 0.4)); } } + +.virtual-list-wrapper { + @apply overflow-y-auto overflow-x-hidden; +} + +.virtual-list-inner { + @apply overflow-hidden; +} diff --git a/src/lib/components/AdditionStat.svelte b/src/lib/components/AdditionStat.svelte index 82679fbb..f56bf7fd 100644 --- a/src/lib/components/AdditionStat.svelte +++ b/src/lib/components/AdditionStat.svelte @@ -1,4 +1,5 @@ - - {text}: - {data} - {#if subData} - {subData} - {/if} - + + + + {text}: + + + + + {data} + - {#if asterisk} - * - {/if} + {#if subData} + {subData} + {/if} + + + {#if asterisk} + * + {/if} + {#if asterisk} diff --git a/src/lib/layouts/stats/Items.svelte b/src/lib/layouts/stats/Items.svelte index 054701d8..0a99c950 100644 --- a/src/lib/layouts/stats/Items.svelte +++ b/src/lib/layouts/stats/Items.svelte @@ -10,7 +10,7 @@ {#if title} - {title} + {title} {/if} {#if subtitle} {subtitle} diff --git a/src/lib/layouts/stats/Main.svelte b/src/lib/layouts/stats/Main.svelte index 6eac4216..e180c010 100644 --- a/src/lib/layouts/stats/Main.svelte +++ b/src/lib/layouts/stats/Main.svelte @@ -11,6 +11,7 @@ import Dungeons from "$lib/sections/stats/Dungeons.svelte"; import Inventory from "$lib/sections/stats/Inventory.svelte"; import Minions from "$lib/sections/stats/Minions.svelte"; + import MiscSection from "$lib/sections/stats/MiscSection.svelte"; import Pets from "$lib/sections/stats/Pets.svelte"; import Rift from "$lib/sections/stats/Rift.svelte"; import SkillsSection from "$lib/sections/stats/SkillsSection.svelte"; @@ -42,6 +43,7 @@ + diff --git a/src/lib/sections/stats/MiscSection.svelte b/src/lib/sections/stats/MiscSection.svelte new file mode 100644 index 00000000..467c8b8c --- /dev/null +++ b/src/lib/sections/stats/MiscSection.svelte @@ -0,0 +1,43 @@ + + +Miscellaneous + + + + + + + + + + + + + + + + + diff --git a/src/lib/sections/stats/misc/auctions.svelte b/src/lib/sections/stats/misc/auctions.svelte new file mode 100644 index 00000000..e4a35378 --- /dev/null +++ b/src/lib/sections/stats/misc/auctions.svelte @@ -0,0 +1,39 @@ + + + + + + + + {#each Object.entries(misc.auctions.total_sold) as [rarity, amount]} + {#if rarity !== "total"} + + {/if} + {/each} + + + + + + + + + + + + {#each Object.entries(misc.auctions.total_bought) as [rarity, amount]} + {#if rarity !== "total"} + + {/if} + {/each} + + + diff --git a/src/lib/sections/stats/misc/claimed.svelte b/src/lib/sections/stats/misc/claimed.svelte new file mode 100644 index 00000000..2076f50d --- /dev/null +++ b/src/lib/sections/stats/misc/claimed.svelte @@ -0,0 +1,24 @@ + + + + + {#each Object.entries(misc.claimed_items) as [item, time]} + + {formatDate(time, "'Claimed on' dd MMMM yyyy 'at' HH:mm")} + + {/each} + + diff --git a/src/lib/sections/stats/misc/damage.svelte b/src/lib/sections/stats/misc/damage.svelte new file mode 100644 index 00000000..a5f9b292 --- /dev/null +++ b/src/lib/sections/stats/misc/damage.svelte @@ -0,0 +1,17 @@ + + + + + {#each Object.entries(misc.damage) as [text, data]} + + {/each} + + diff --git a/src/lib/sections/stats/misc/dragons.svelte b/src/lib/sections/stats/misc/dragons.svelte new file mode 100644 index 00000000..fc38594c --- /dev/null +++ b/src/lib/sections/stats/misc/dragons.svelte @@ -0,0 +1,36 @@ + + + + + + {#each Object.entries(misc.dragons.most_damage) as [text, data]} + {#if text !== "best"} + + {/if} + {/each} + + + {#each Object.entries(misc.dragons.fastest_kill) as [text, data]} + {#if text !== "best"} + + {/if} + {/each} + + + + {#each Object.entries(misc.dragons.deaths) as [text, data]} + {#if text !== "total"} + + {/if} + {/each} + + + diff --git a/src/lib/sections/stats/misc/endstone.svelte b/src/lib/sections/stats/misc/endstone.svelte new file mode 100644 index 00000000..8f5e43f6 --- /dev/null +++ b/src/lib/sections/stats/misc/endstone.svelte @@ -0,0 +1,17 @@ + + + + + {#each Object.entries(misc.endstone_protector) as [text, data]} + + {/each} + + diff --git a/src/lib/sections/stats/misc/essence.svelte b/src/lib/sections/stats/misc/essence.svelte new file mode 100644 index 00000000..e4c6e747 --- /dev/null +++ b/src/lib/sections/stats/misc/essence.svelte @@ -0,0 +1,29 @@ + + + + Essence + + {#each misc.essence as essence} + {@const hasUnlocked = essence.amount} + + + + {essence.name} + + Amount: + {format(essence.amount)} + + + + + {/each} + + diff --git a/src/lib/sections/stats/misc/gifts.svelte b/src/lib/sections/stats/misc/gifts.svelte new file mode 100644 index 00000000..1ba71e27 --- /dev/null +++ b/src/lib/sections/stats/misc/gifts.svelte @@ -0,0 +1,17 @@ + + + + + {#each Object.entries(misc.gifts) as [text, data]} + + {/each} + + diff --git a/src/lib/sections/stats/misc/jerry.svelte b/src/lib/sections/stats/misc/jerry.svelte new file mode 100644 index 00000000..e0178024 --- /dev/null +++ b/src/lib/sections/stats/misc/jerry.svelte @@ -0,0 +1,17 @@ + + + + + {#each Object.entries(misc.season_of_jerry) as [text, data]} + + {/each} + + diff --git a/src/lib/sections/stats/misc/kills.svelte b/src/lib/sections/stats/misc/kills.svelte new file mode 100644 index 00000000..6554f6c2 --- /dev/null +++ b/src/lib/sections/stats/misc/kills.svelte @@ -0,0 +1,39 @@ + + + + Kills + + + + + + + Kills + 0 ? 20 : 0} scrollDirection="vertical"> + + #{index + 1} + {misc.kills.kills[index].name} + : {format(misc.kills.kills[index].amount)} + + + + + Deaths + 0 ? 20 : 0} scrollDirection="vertical"> + + #{index + 1} + {misc.kills.deaths[index].name} + : {format(misc.kills.deaths[index].amount)} + + + + + diff --git a/src/lib/sections/stats/misc/mythological.svelte b/src/lib/sections/stats/misc/mythological.svelte new file mode 100644 index 00000000..4ba31305 --- /dev/null +++ b/src/lib/sections/stats/misc/mythological.svelte @@ -0,0 +1,51 @@ + + + + + + + + Rarities used: + {#each Object.entries(misc.mythological_event.burrows_dug_next) as [tier, count]} + {#if tier !== "total"} + + {/if} + {/each} + + + + Rarities used: + {#each Object.entries(misc.mythological_event.burrows_dug_combat) as [tier, count]} + {#if tier !== "total"} + + {/if} + {/each} + + + + Rarities used: + {#each Object.entries(misc.mythological_event.burrows_dug_treasure) as [tier, count]} + {#if tier !== "total"} + + {/if} + {/each} + + + + Rarities used: + {#each Object.entries(misc.mythological_event.burrows_chains_complete) as [tier, count]} + {#if tier !== "total"} + + {/if} + {/each} + + + diff --git a/src/lib/sections/stats/misc/pet.svelte b/src/lib/sections/stats/misc/pet.svelte new file mode 100644 index 00000000..9bb94be7 --- /dev/null +++ b/src/lib/sections/stats/misc/pet.svelte @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + diff --git a/src/lib/sections/stats/misc/potions.svelte b/src/lib/sections/stats/misc/potions.svelte new file mode 100644 index 00000000..3ba2c022 --- /dev/null +++ b/src/lib/sections/stats/misc/potions.svelte @@ -0,0 +1,20 @@ + + + + + + Disabled Potion Effects: + {#each misc.effects.disabled as effect} + {effect.replaceAll("_", " ")} + {/each} + + + diff --git a/src/lib/sections/stats/misc/races.svelte b/src/lib/sections/stats/misc/races.svelte new file mode 100644 index 00000000..befab889 --- /dev/null +++ b/src/lib/sections/stats/misc/races.svelte @@ -0,0 +1,52 @@ + + + + Races + + {#each Object.entries(misc.races) as [_, race]} + + {race.name} + + {#if race.races.with_return} + With Return: + + + {#each Object.entries(race.races.with_return) as [_, value]} + + {/each} + + + {/if} + + {#if race.races.no_return} + No Return: + + + {#each Object.entries(race.races.no_return) as [_, value]} + + {/each} + + + {/if} + + {#if race.name === "Other"} + + {#each Object.entries(race.races) as [_, value]} + {#if "name" in value} + + {/if} + {/each} + + {/if} + + + {/each} + + diff --git a/src/lib/sections/stats/misc/uncategorized.svelte b/src/lib/sections/stats/misc/uncategorized.svelte new file mode 100644 index 00000000..22ccd83e --- /dev/null +++ b/src/lib/sections/stats/misc/uncategorized.svelte @@ -0,0 +1,29 @@ + + + + + {#if misc.uncategorized.soulflow} + + {/if} + + {#if misc.uncategorized.teleporter_pill_consumed} + + {/if} + + {#if misc.uncategorized.reaper_peppers_eaten} + + {/if} + + {#if misc.uncategorized.personal_bank !== "Unknown"} + + {/if} + + diff --git a/src/lib/sections/stats/misc/upgrades.svelte b/src/lib/sections/stats/misc/upgrades.svelte new file mode 100644 index 00000000..af1373fb --- /dev/null +++ b/src/lib/sections/stats/misc/upgrades.svelte @@ -0,0 +1,19 @@ + + + + + + + + + + +
Rarities used:
Disabled Potion Effects:
{effect.replaceAll("_", " ")}
With Return:
No Return: