Card Generation Failed
diff --git a/src/lib/components/header/Header.svelte b/src/lib/components/header/Header.svelte
index 5bcc31d18..423901ce8 100644
--- a/src/lib/components/header/Header.svelte
+++ b/src/lib/components/header/Header.svelte
@@ -11,6 +11,7 @@
const preferences = getPreferences();
const internalState = getInternalState();
const theme = getTheme();
+ const themeIcon = $derived(getThemeIcons({ color: theme.activeTheme?.colors?.logo, invert: theme.activeTheme?.light }).current);
const packageVersion = __NPM_PACKAGE_VERSION__;
@@ -21,17 +22,11 @@
-
-
-
- {#snippet pending()}
-
- {/snippet}
-
- {#snippet failed()}
-
- {/snippet}
-
+ {#if themeIcon}
+
+ {:else}
+
+ {/if}
SC
@@ -53,8 +48,8 @@
{#if page.url.pathname.startsWith("/stats")}
-
(internalState.openCommand = true)}>
- Press {preferences.keybind} to search
+ (internalState.openCommand = true)}>
+ Press {preferences.keybind} to search
diff --git a/src/lib/components/header/settings/Order.svelte b/src/lib/components/header/settings/Order.svelte
index 74b88ad17..23f6503ec 100644
--- a/src/lib/components/header/settings/Order.svelte
+++ b/src/lib/components/header/settings/Order.svelte
@@ -2,9 +2,10 @@
import { getPreferences } from "$ctx";
import { SettingsTab } from "$lib/components/header/types";
import { sections } from "$lib/sections/constants";
- import { RestrictToVerticalAxis } from "@dnd-kit/abstract/modifiers";
+ import { Feedback } from "@dnd-kit/dom";
+ import { OptimisticSortingPlugin, SortableKeyboardPlugin } from "@dnd-kit/dom/sortable";
import { move } from "@dnd-kit/helpers";
- import { DragDropProvider, DragOverlay, type DragDropEventHandlers } from "@dnd-kit/svelte";
+ import { DragDropProvider, type DragDropEventHandlers } from "@dnd-kit/svelte";
import { createSortable } from "@dnd-kit/svelte/sortable";
import GripVertical from "@lucide/svelte/icons/grip-vertical";
import ListOrdered from "@lucide/svelte/icons/list-ordered";
@@ -17,10 +18,13 @@
const defaultSectionOrder = sections;
const differsFromDefault = $derived(JSON.stringify(preferences.sectionOrder) !== JSON.stringify(defaultSectionOrder));
- let sectionOrder = $state(preferences.sectionOrder);
+ let sectionOrder = $state([...preferences.sectionOrder]);
+ let providerKey = $state(0);
function onDragEnd(event: Parameters>[0]) {
- preferences.sectionOrder = move(sectionOrder, event);
+ sectionOrder = move(sectionOrder, event);
+ preferences.sectionOrder = [...sectionOrder];
+ providerKey += 1;
}
@@ -34,27 +38,28 @@
- [...defaults, RestrictToVerticalAxis]}>
- {#each sectionOrder as section, index (section.id)}
- {@const sortable = createSortable({ id: section.id, index, feedback: "clone" })}
- {@render sectionRowContent(section, sortable, true)}
- {/each}
-
-
- {#snippet children(source)}
- {@const activeSection = sectionOrder.find((section) => section.id === source.id)}
- {#if activeSection}
- {@render sectionRowContent(activeSection)}
- {/if}
- {/snippet}
-
-
+ {#key providerKey}
+
+ {#each sectionOrder as section, index (section.id)}
+ {@const sortable = createSortable({
+ id: section.id,
+ get index() {
+ return index;
+ },
+ plugins: [SortableKeyboardPlugin, OptimisticSortingPlugin, Feedback.configure({ feedback: "clone" })]
+ })}
+ {@render sectionRowContent(section, sortable, true)}
+ {/each}
+
+ {/key}
{#if differsFromDefault}
{
- preferences.sectionOrder = defaultSectionOrder;
+ sectionOrder = [...defaultSectionOrder];
+ preferences.sectionOrder = [...defaultSectionOrder];
+ providerKey += 1;
}}>
Reset to default
@@ -63,7 +68,7 @@
{#snippet sectionRowContent(section: SectionItem, sortable: SortableItem | null = null, flipEnabled = false)}
-
+
{section.name.replaceAll("_", " ")}
{/snippet}
diff --git a/src/lib/components/item/item-content.svelte b/src/lib/components/item/item-content.svelte
index f42aabecd..3509e63e0 100644
--- a/src/lib/components/item/item-content.svelte
+++ b/src/lib/components/item/item-content.svelte
@@ -1,5 +1,5 @@
@@ -152,8 +125,8 @@
{/if}
- {#if wikiInfo}
-
+ {#if piece.wiki}
+
{/if}
diff --git a/src/lib/components/misc/CommandPalette.svelte b/src/lib/components/misc/CommandPalette.svelte
index dc0a37cc1..4d680e6a4 100644
--- a/src/lib/components/misc/CommandPalette.svelte
+++ b/src/lib/components/misc/CommandPalette.svelte
@@ -1,4 +1,6 @@
@@ -79,11 +122,11 @@
type="button"
class="flex aspect-square h-full items-center justify-center text-text"
onclick={() => {
- submittedSearchQuery = searchQuery;
+ void submitSearch();
}}>
{#if !searchQueryValidated.success && searchQuery.length > 0}
- {:else if searchUserRemoteFn?.loading || loading}
+ {:else if submittedSearchLoading || loading}
{:else}
@@ -95,8 +138,8 @@
- {#if searchUserRemoteFn?.error}
- {isHttpError(searchUserRemoteFn.error) ? searchUserRemoteFn.error.body.message : "Something went wrong"}
+ {#if submittedSearchError}
+ {submittedSearchError}
{:else}
Press Enter to search
{/if}
@@ -114,16 +157,16 @@
class={cn("flex h-10 cursor-pointer items-center gap-2 rounded-lg px-3 py-2.5 text-sm outline-hidden select-none", preferences.performanceMode ? "data-selected:bg-background-lore" : "data-selected:bg-background-grey")}
keywords={[searchQuery, "search", "find", "profile"]}
onSelect={() => {
- submittedSearchQuery = searchQuery;
+ void submitSearch();
}}>
- {#if searchUserRemoteFn?.loading || loading}
+ {#if submittedSearchLoading || loading}
{:else}
{/if}
- {#if searchUserRemoteFn?.error}
- {isHttpError(searchUserRemoteFn.error) ? searchUserRemoteFn.error.body.message : "Something went wrong"}
+ {#if submittedSearchError}
+ {submittedSearchError}
{:else}
Search for {searchQuery}
{/if}
diff --git a/src/lib/components/misc/CommandSettingsGroup.svelte b/src/lib/components/misc/CommandSettingsGroup.svelte
index 079065015..0a5b26a7f 100644
--- a/src/lib/components/misc/CommandSettingsGroup.svelte
+++ b/src/lib/components/misc/CommandSettingsGroup.svelte
@@ -2,7 +2,6 @@
import { getInternalState, getPreferences } from "$ctx";
import { SettingsTab } from "$lib/components/header/types";
import { cn } from "$lib/shared/utils";
- import BookOpenText from "@lucide/svelte/icons/book-open-text";
import Fan from "@lucide/svelte/icons/fan";
import Keyboard from "@lucide/svelte/icons/keyboard";
import ListOrdered from "@lucide/svelte/icons/list-ordered";
@@ -49,14 +48,6 @@
label: "Change Section Order",
tab: SettingsTab.Order
},
- {
- type: "tab",
- value: "wiki-order",
- icon: BookOpenText,
- keywords: ["order", "misc", "change", "wiki", "settings"],
- label: "Change Wiki Order",
- tab: SettingsTab.Misc
- },
{
type: "tab",
value: "keybind",
diff --git a/src/lib/components/misc/JsonLd.svelte b/src/lib/components/misc/JsonLd.svelte
new file mode 100644
index 000000000..6f496d089
--- /dev/null
+++ b/src/lib/components/misc/JsonLd.svelte
@@ -0,0 +1,29 @@
+
+
+
+ {json}
+
diff --git a/src/lib/components/misc/PerformanceMode.svelte b/src/lib/components/misc/PerformanceMode.svelte
index 2d99c90f2..611e12063 100644
--- a/src/lib/components/misc/PerformanceMode.svelte
+++ b/src/lib/components/misc/PerformanceMode.svelte
@@ -20,7 +20,7 @@
let shownToast = $state(false);
let lowFpsStreak = 0;
let fpsHistory: number[] = [];
- let isTabActive = $state(true);
+ let isTabActive = true;
let lastVisibilityChange = 0;
// Handle visibility changes to avoid false positives when tab/window is inactive
diff --git a/src/lib/components/misc/SEO.svelte b/src/lib/components/misc/SEO.svelte
index 0a59fb3b4..6a57ba33e 100644
--- a/src/lib/components/misc/SEO.svelte
+++ b/src/lib/components/misc/SEO.svelte
@@ -1,6 +1,7 @@
@@ -96,5 +97,6 @@
description: getLongDescription(embedData)
}}
{themeColor}
- jsonLd={profileJsonLd}
manifest="/manifest.webmanifest" />
+
+
diff --git a/src/lib/components/misc/Skin3D.svelte b/src/lib/components/misc/Skin3D.svelte
index 0f64b733d..dc35108d5 100644
--- a/src/lib/components/misc/Skin3D.svelte
+++ b/src/lib/components/misc/Skin3D.svelte
@@ -27,7 +27,7 @@
if (loadedUuid === uuid) return;
canvasIsLoading = true;
- const capeData = await ky(`https://mowojang.matdoes.dev/session/minecraft/profile/${uuid}`).json<{ properties: { name: string; value: string; signature?: string }[] }>();
+ const capeData = await ky(`https://mowojang.seraph.si/session/minecraft/profile/${uuid}`).json<{ properties: { name: string; value: string; signature?: string }[] }>();
const texturesProperty = capeData.properties.find((prop) => prop.name === "textures");
if (!texturesProperty) {
diff --git a/src/lib/components/misc/index.ts b/src/lib/components/misc/index.ts
index 8a1fb3909..665863923 100644
--- a/src/lib/components/misc/index.ts
+++ b/src/lib/components/misc/index.ts
@@ -5,6 +5,7 @@ export { default as CommandSettingsGroup } from "./CommandSettingsGroup.svelte";
export { default as ContributorCard } from "./ContributorCard.svelte";
export { default as ContributorCardSkeleton } from "./ContributorCardSkeleton.svelte";
export { default as CtaCard } from "./CtaCard.svelte";
+export { default as JsonLd } from "./JsonLd.svelte";
export { default as Navbar } from "./Navbar.svelte";
export { default as PerformanceMode } from "./PerformanceMode.svelte";
export { default as ScrollItems } from "./ScrollItems.svelte";
diff --git a/src/lib/components/notices/SurveyNotice.svelte b/src/lib/components/notices/SurveyNotice.svelte
deleted file mode 100644
index 6b08584c5..000000000
--- a/src/lib/components/notices/SurveyNotice.svelte
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-
-
SkyCrypt Survey
-
Please take a moment to fill out our survey and let us know what you think.
-
-
Your feedback is actually really helpful in improving the site.
-
Take the Survey
-
-
Dismiss
-
diff --git a/src/lib/layouts/CLAUDE.md b/src/lib/layouts/CLAUDE.md
new file mode 120000
index 000000000..47dc3e3d8
--- /dev/null
+++ b/src/lib/layouts/CLAUDE.md
@@ -0,0 +1 @@
+AGENTS.md
\ No newline at end of file
diff --git a/src/lib/layouts/stats/AdditionalStats.svelte b/src/lib/layouts/stats/AdditionalStats.svelte
index 045565321..72690c5eb 100644
--- a/src/lib/layouts/stats/AdditionalStats.svelte
+++ b/src/lib/layouts/stats/AdditionalStats.svelte
@@ -15,6 +15,17 @@
const profile = $derived(getProfileContext().current);
const profileUUID = $derived(profile?.uuid);
const profileId = $derived(profile?.profile_id);
+ const networthState = $derived.by(() => {
+ if (profileUUID == null || profileId == null) {
+ return { current: null };
+ }
+
+ const query = getNetworth({ uuid: profileUUID, profileId });
+
+ return {
+ current: query.current
+ };
+ });
const defaultPatternDecimal: string = "0,0.##";
const defaultPattern: string = "0,0";
@@ -133,14 +144,12 @@
Retry
{/snippet}
- {#if profileUUID != null && profileId != null}
- {@const networthData = await getNetworth({ uuid: profileUUID, profileId: profileId })}
-
- {#if networthData.normal}
-
+ {#if networthState.current}
+ {#if networthState.current.normal}
+
{/if}
- {#if networthData.nonCosmetic}
-
+ {#if networthState.current.nonCosmetic}
+
{/if}
{/if}
diff --git a/src/lib/layouts/stats/Main.svelte b/src/lib/layouts/stats/Main.svelte
index 16231b307..76741bc7f 100644
--- a/src/lib/layouts/stats/Main.svelte
+++ b/src/lib/layouts/stats/Main.svelte
@@ -2,7 +2,7 @@
import { replaceState } from "$app/navigation";
import { resolve } from "$app/paths";
import { page } from "$app/state";
- import { CombinedContext, CombinedQueryContext, getHoverContext, getInternalState, getPreferences, getProfileContext, getRecentSearches, ProfileContext, setCombinedContext, setCombinedQueryContext, setProfileContext } from "$ctx";
+ import { CombinedContext, getHoverContext, getInternalState, getPreferences, getProfileContext, getRecentSearches, ProfileContext, setCombinedContext, setProfileContext } from "$ctx";
import { ContainedItemsGrid, ItemContent } from "$lib/components/item";
import { Navbar } from "$lib/components/misc";
import Sections from "$lib/sections/Sections.svelte";
@@ -31,11 +31,19 @@
// Initialize the profile context
const profileClass = new ProfileContext();
const combinedClass = new CombinedContext();
- const combinedQueryClass = new CombinedQueryContext();
setProfileContext(profileClass);
setCombinedContext(combinedClass);
- setCombinedQueryContext(combinedQueryClass);
- const combined = $derived(ctx.uuid && ctx.profile_id ? getCombined({ uuid: ctx.uuid, profileId: ctx.profile_id }) : null);
+ const combinedState = $derived.by(() => {
+ if (!ctx.uuid || !ctx.profile_id) {
+ return { current: null };
+ }
+
+ const query = getCombined({ uuid: ctx.uuid, profileId: ctx.profile_id });
+
+ return {
+ current: query.current
+ };
+ });
function rewriteURL() {
if (!(ctx as ModelsStatsOutput)) return;
@@ -94,8 +102,7 @@
});
$effect.pre(() => {
- combinedQueryClass.current = combined;
- combinedClass.current = combined?.current ?? null;
+ combinedClass.current = combinedState.current ?? null;
});
$effect(() => {
diff --git a/src/lib/layouts/stats/Stats.svelte b/src/lib/layouts/stats/Stats.svelte
index 259dcad74..7239db858 100644
--- a/src/lib/layouts/stats/Stats.svelte
+++ b/src/lib/layouts/stats/Stats.svelte
@@ -12,8 +12,19 @@
const profile = $derived(getProfileContext().current);
const profileUUID = $derived(profile?.uuid);
const profileId = $derived(profile?.profile_id);
+ const statsState = $derived.by(() => {
+ if (!openState || !profileUUID || !profileId) {
+ return { current: null, error: null, loading: false };
+ }
- const stats = $derived(openState && profileUUID && profileId ? getAdditionalStats({ uuid: profileUUID, profileId }) : undefined);
+ const query = getAdditionalStats({ uuid: profileUUID, profileId });
+
+ return {
+ current: query.current,
+ error: query.error,
+ loading: query.loading
+ };
+ });
@@ -22,12 +33,12 @@
{#snippet child({ props, open })}
{#if open}
- {#if stats?.error}
-
+ {#if statsState.error}
+
{/if}
- {#if stats?.current?.stats}
+ {#if statsState.current?.stats}
- {#each Object.entries(stats.current.stats) as [statName, statData], index (index)}
+ {#each Object.entries(statsState.current.stats) as [statName, statData], index (index)}
{#if statData.total > 0}
{/if}
@@ -39,7 +50,7 @@
{/key}
- {#if stats?.loading}
+ {#if statsState.loading}
{:else}
{openState ? "Hide Stats" : "Show Stats"}
diff --git a/src/lib/sections/CLAUDE.md b/src/lib/sections/CLAUDE.md
new file mode 120000
index 000000000..47dc3e3d8
--- /dev/null
+++ b/src/lib/sections/CLAUDE.md
@@ -0,0 +1 @@
+AGENTS.md
\ No newline at end of file
diff --git a/src/lib/sections/Sections.svelte b/src/lib/sections/Sections.svelte
index 4a109e28e..6a19b3077 100644
--- a/src/lib/sections/Sections.svelte
+++ b/src/lib/sections/Sections.svelte
@@ -1,7 +1,8 @@