Current collected state Current
Observed since 20 Oct, 21:48 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
@-ft/mode
Theme mode manager
mode - Theme mode managerDark/light theme mode manager for web
import { mode } from '@-ft/mode';
// initialize mode manager with persistent settings if available
const modeManager = mode(getCookie('mode') ?? 'system');
// apply actual theme when theme is changed
modeManager.watchTheme((theme) => {
if (theme === 'dark') {
document.documentElement.classList.add('dark');
} else {
document.documentElement.classList.remove('dark');
}
});
// save persistent theme settings when mode is changed
modeManager.watchMode((mode) => {
document.cookie = 'mode=' + mode;
});
Download counts and popularity will appear here as the collector receives them.
Declarations describe requirements; they are not a resolved dependency graph.
Source distribution
{
"integrity": "sha512-x358OSg5HBaEbZyb5xpu2kVmL+R1wIUMKtECDJR2RV12fcgfoxNVxw1Q1WzVZKs2mI/BQQBy8JRDM0BV4B5OUw==",
"shasum": "2674e0fa87a7893bbd7586fc28d5984f7b7f9921",
"tarball": "https://registry.npmjs.org/@-ft/mode/-/mode-0.0.6.tgz",
"fileCount": 4,
"unpackedSize": 2399,
"signatures": [
{
"keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
"sig": "MEQCIC8FhogUEYeEiijrTBp1/x+GDEWpjyJhuswIRAYJH3yNAiBLrY5c3Hubpq2E/bYU/l3oZsRTp+BqXqXh4XnmqLl5dg=="
}
]
}Observed since 20 Oct, 21:48 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:ac91cab839777379fcc1e1fce26b608f6b98e40ef2cff977916c7bbc2123c4bc