From 27022d787b682a8c1d1bd08bcd99f96599564e44 Mon Sep 17 00:00:00 2001 From: Ronald Inglett <71849533+inglettronald@users.noreply.github.com> Date: Fri, 30 Jan 2026 18:33:15 -0600 Subject: [PATCH 1/6] chore: generated webstorm files --- .idea/.gitignore | 8 +++ .idea/SkyCrypt.iml | 12 +++++ .idea/codeStyles/Project.xml | 57 ++++++++++++++++++++ .idea/codeStyles/codeStyleConfig.xml | 5 ++ .idea/inspectionProfiles/Project_Default.xml | 6 +++ .idea/modules.xml | 8 +++ .idea/prettier.xml | 6 +++ .idea/vcs.xml | 6 +++ 8 files changed, 108 insertions(+) create mode 100644 .idea/.gitignore create mode 100644 .idea/SkyCrypt.iml create mode 100644 .idea/codeStyles/Project.xml create mode 100644 .idea/codeStyles/codeStyleConfig.xml create mode 100644 .idea/inspectionProfiles/Project_Default.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/prettier.xml create mode 100644 .idea/vcs.xml diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 000000000..13566b81b --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/SkyCrypt.iml b/.idea/SkyCrypt.iml new file mode 100644 index 000000000..24643cc37 --- /dev/null +++ b/.idea/SkyCrypt.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 000000000..87e8badc2 --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 000000000..79ee123c2 --- /dev/null +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 000000000..03d9549ea --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 000000000..095647a26 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/prettier.xml b/.idea/prettier.xml new file mode 100644 index 000000000..b0c1c68fb --- /dev/null +++ b/.idea/prettier.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 000000000..35eb1ddfb --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file From 2ac06c47ca36faf03f87f5f631ec0d480e3f7e07 Mon Sep 17 00:00:00 2001 From: Ronald Inglett <71849533+inglettronald@users.noreply.github.com> Date: Fri, 30 Jan 2026 18:33:44 -0600 Subject: [PATCH 2/6] feat: modify layout to better suit in game context --- src/lib/components/Navbar.svelte | 2 +- src/lib/layouts/stats/Main.svelte | 11 +++-------- src/lib/sections/Sections.svelte | 1 + src/lib/sections/constants.ts | 27 +++++++++++++------------- src/lib/sections/stats/Overview.svelte | 16 +++++++++++++++ src/lib/sections/types.ts | 2 +- src/lib/stores/preferences.ts | 4 ++-- src/routes/+layout.svelte | 6 ++++-- 8 files changed, 42 insertions(+), 27 deletions(-) create mode 100644 src/lib/sections/stats/Overview.svelte diff --git a/src/lib/components/Navbar.svelte b/src/lib/components/Navbar.svelte index 321ec7af5..7d2244cb7 100644 --- a/src/lib/components/Navbar.svelte +++ b/src/lib/components/Navbar.svelte @@ -125,7 +125,7 @@ }); - + {#snippet viewportChildren()} diff --git a/src/lib/layouts/stats/Main.svelte b/src/lib/layouts/stats/Main.svelte index 8da622733..2cca4efd1 100644 --- a/src/lib/layouts/stats/Main.svelte +++ b/src/lib/layouts/stats/Main.svelte @@ -216,16 +216,11 @@ {/if} + + {#if getProfileContext().current} - - - - - - - diff --git a/src/lib/sections/Sections.svelte b/src/lib/sections/Sections.svelte index cb9ff7a2f..5fcc8a1f2 100644 --- a/src/lib/sections/Sections.svelte +++ b/src/lib/sections/Sections.svelte @@ -9,6 +9,7 @@ import { Tabs } from "bits-ui"; const COMPONENTS = { + Overview: () => import("$lib/sections/stats/Overview.svelte"), Gear: () => import("$lib/sections/stats/Gear.svelte"), Accessories: () => import("$lib/sections/stats/Accessories.svelte"), Pets: () => import("$lib/sections/stats/Pets.svelte"), diff --git a/src/lib/sections/constants.ts b/src/lib/sections/constants.ts index db0b0b436..fdc5c7a6d 100644 --- a/src/lib/sections/constants.ts +++ b/src/lib/sections/constants.ts @@ -1,17 +1,18 @@ import type { SectionID } from "$lib/sections/types"; export const sections: SectionID[] = [ - { id: 0, name: "Gear" }, - { id: 1, name: "Accessories" }, - { id: 2, name: "Pets" }, - { id: 3, name: "Inventory" }, - { id: 4, name: "Skills" }, - { id: 5, name: "Dungeons" }, - { id: 6, name: "Slayer" }, - { id: 7, name: "Minions" }, - { id: 8, name: "Bestiary" }, - { id: 9, name: "Collections" }, - { id: 10, name: "Crimson_Isle" }, - { id: 11, name: "Rift" }, - { id: 12, name: "Misc" } + { id: 0, name: "Overview" }, + { id: 1, name: "Gear" }, + { id: 2, name: "Accessories" }, + { id: 3, name: "Pets" }, + { id: 4, name: "Inventory" }, + { id: 5, name: "Skills" }, + { id: 6, name: "Dungeons" }, + { id: 7, name: "Slayer" }, + { id: 8, name: "Minions" }, + { id: 9, name: "Bestiary" }, + { id: 10, name: "Collections" }, + { id: 11, name: "Crimson_Isle" }, + { id: 12, name: "Rift" }, + { id: 13, name: "Misc" } ]; diff --git a/src/lib/sections/stats/Overview.svelte b/src/lib/sections/stats/Overview.svelte new file mode 100644 index 000000000..2c12a9db9 --- /dev/null +++ b/src/lib/sections/stats/Overview.svelte @@ -0,0 +1,16 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/lib/sections/types.ts b/src/lib/sections/types.ts index a6bd43277..3b4b7be89 100644 --- a/src/lib/sections/types.ts +++ b/src/lib/sections/types.ts @@ -1,6 +1,6 @@ import type { Component } from "svelte"; -export type SectionName = "Gear" | "Accessories" | "Pets" | "Inventory" | "Skills" | "Dungeons" | "Slayer" | "Minions" | "Bestiary" | "Collections" | "Crimson_Isle" | "Rift" | "Misc"; +export type SectionName = "Overview" | "Gear" | "Accessories" | "Pets" | "Inventory" | "Skills" | "Dungeons" | "Slayer" | "Minions" | "Bestiary" | "Collections" | "Crimson_Isle" | "Rift" | "Misc"; export type SectionComponents = Record | null>; export type SectionComponentsEager = Record; diff --git a/src/lib/stores/preferences.ts b/src/lib/stores/preferences.ts index 5ccf6fd39..5c96a9a0e 100644 --- a/src/lib/stores/preferences.ts +++ b/src/lib/stores/preferences.ts @@ -4,9 +4,9 @@ import type { SectionID } from "$lib/sections/types"; import { persisted } from "svelte-persisted-store"; export const sectionOrderPreferences = persisted("sectionOrderPreferences", sections); -export const performanceMode = persisted("performanceMode", false); +export const performanceMode = persisted("performanceMode", true); export const keybind = persisted("keybind", "/"); -export const showGlint = persisted("showGlint", true); +export const showGlint = persisted("showGlint", false); export const rainbowEnchantments = persisted("rainbowEnchantments", false); // Check for invalid section order and reset if found diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 11649ca03..2788099bc 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -206,9 +206,11 @@ {/if} - + - + {@render children()} From 065c45eb6cd8376ac857945e99dd2cf7b3e22c9d Mon Sep 17 00:00:00 2001 From: Ronald Inglett <71849533+inglettronald@users.noreply.github.com> Date: Sat, 21 Feb 2026 02:21:36 -0600 Subject: [PATCH 3/6] fix: profile context handling and add logging --- src/lib/components/Navbar.svelte | 2 +- src/lib/layouts/stats/Main.svelte | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/lib/components/Navbar.svelte b/src/lib/components/Navbar.svelte index 7d2244cb7..eb78707ef 100644 --- a/src/lib/components/Navbar.svelte +++ b/src/lib/components/Navbar.svelte @@ -80,7 +80,7 @@ } const topValue = parseInt(window.getComputedStyle(navbarElement).getPropertyValue("top")); - + console.info("topvalue = " + topValue); observer = new IntersectionObserver( ([e]) => { // Check if the element has reached its sticky position by comparing diff --git a/src/lib/layouts/stats/Main.svelte b/src/lib/layouts/stats/Main.svelte index 2cca4efd1..45fbfe426 100644 --- a/src/lib/layouts/stats/Main.svelte +++ b/src/lib/layouts/stats/Main.svelte @@ -45,8 +45,14 @@ // Initialize the profile context const profileClass = new ProfileContext(); + profileClass.current = profile; setProfileContext(profileClass); + // Update the profile context when the data changes + $effect.pre(() => { + profileClass.current = profile; + }); + function rewriteURL() { if (!(ctx as ModelsStatsOutput)) return; @@ -97,11 +103,6 @@ return searches; }); - // Update the profile context when the data changes - $effect.pre(() => { - profileClass.current = profile; - }); - $effect(() => { rewriteURL(); }); From 950ca8e06b495b6aab97771dcbefd1095010a63d Mon Sep 17 00:00:00 2001 From: Ronald Inglett <71849533+inglettronald@users.noreply.github.com> Date: Sat, 21 Feb 2026 02:53:12 -0600 Subject: [PATCH 4/6] fix: remove intersection observer, we want navigation always pinned --- src/lib/components/Navbar.svelte | 43 +------------------------------- 1 file changed, 1 insertion(+), 42 deletions(-) diff --git a/src/lib/components/Navbar.svelte b/src/lib/components/Navbar.svelte index eb78707ef..5c598ee14 100644 --- a/src/lib/components/Navbar.svelte +++ b/src/lib/components/Navbar.svelte @@ -39,9 +39,8 @@ }) ); - let pinned = $state(false); + let pinned = $state(true); let navbarElement = $state(null); - let observer: IntersectionObserver; function handleSectionClick(sectionName: SectionName) { tabValue.set(sectionName); @@ -73,46 +72,6 @@ link.scrollIntoView(scrollOptions); } - function observerInit() { - if (!navbarElement) { - console.warn("Navbar element is not defined"); - return; - } - - const topValue = parseInt(window.getComputedStyle(navbarElement).getPropertyValue("top")); - console.info("topvalue = " + topValue); - observer = new IntersectionObserver( - ([e]) => { - // Check if the element has reached its sticky position by comparing - // its actual top position to the CSS top value - const hasReachedStickyPosition = e.boundingClientRect.top <= topValue; - pinned = hasReachedStickyPosition && e.intersectionRatio < 1; - }, - { - threshold: [1], - rootMargin: `-${topValue + 1}px 0px` // shrink the viewport to element top value +1px to trigger observer when element has reach it's sticky position - } - ); - - observer.observe(navbarElement); - } - - function observerCleanup() { - if (observer) observer.disconnect(); - } - - $effect(() => { - if (!navbarElement) return; - observerInit(); - return () => { - observerCleanup(); - }; - }); - - onDestroy(() => { - observerCleanup(); - }); - // Effect to handle tab value changes and update URL $effect(() => { if (navbarElement && $tabValue) { From d9460dc80b5e3a0cac12904f75582b21aa6cb49b Mon Sep 17 00:00:00 2001 From: Ronald Inglett <71849533+inglettronald@users.noreply.github.com> Date: Sat, 21 Feb 2026 02:53:47 -0600 Subject: [PATCH 5/6] fix: clean up imports --- src/lib/components/Navbar.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/components/Navbar.svelte b/src/lib/components/Navbar.svelte index 5c598ee14..acba8c1e8 100644 --- a/src/lib/components/Navbar.svelte +++ b/src/lib/components/Navbar.svelte @@ -10,7 +10,7 @@ import ChevronLeft from "@lucide/svelte/icons/chevron-left"; import ChevronRight from "@lucide/svelte/icons/chevron-right"; import { Button, ScrollArea } from "bits-ui"; - import { onDestroy, tick, type Snippet } from "svelte"; + import { tick, type Snippet } from "svelte"; const { children }: { children?: Snippet } = $props(); const profile = $derived(getProfileContext().current); From ef49f5c0a90e6842a6e0f7b22777481f2edff10a Mon Sep 17 00:00:00 2001 From: Ronald Inglett <71849533+inglettronald@users.noreply.github.com> Date: Sat, 21 Feb 2026 03:00:46 -0600 Subject: [PATCH 6/6] fix: adjust navbar behavior and styling --- src/lib/components/Navbar.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/components/Navbar.svelte b/src/lib/components/Navbar.svelte index acba8c1e8..668cf1650 100644 --- a/src/lib/components/Navbar.svelte +++ b/src/lib/components/Navbar.svelte @@ -39,7 +39,7 @@ }) ); - let pinned = $state(true); + let pinned = $state(false); let navbarElement = $state(null); function handleSectionClick(sectionName: SectionName) { @@ -84,7 +84,7 @@ }); - + {#snippet viewportChildren()}