global: snapshot

This commit is contained in:
nym21
2026-04-08 01:38:03 +02:00
parent 0c14dfe924
commit 4c4c6fc840
79 changed files with 2040 additions and 1408 deletions

View File

@@ -10,6 +10,7 @@ import { capture } from "./capture.js";
import { colors } from "../colors.js";
import { createRadios, createSelect, getElementById } from "../dom.js";
import { createPersistedValue } from "../persisted.js";
import { createMapCache } from "../cache.js";
import { onChange as onThemeChange } from "../theme.js";
import { throttle, debounce } from "../timing.js";
import { serdeBool, INDEX_FROM_LABEL } from "../serde.js";
@@ -190,9 +191,7 @@ export function createChart({ parent, brk, fitContent }) {
},
};
// Memory cache for instant index switching
/** @type {Map<string, AnySeriesData>} */
const cache = new Map();
const cache = createMapCache(Infinity);
// Range state: localStorage stores all ranges per-index, URL stores current range only
/** @typedef {{ from: number, to: number }} Range */