Socket
Socket
Sign inDemoInstall

@jill64/svelte-device-theme

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jill64/svelte-device-theme - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

9

dist/index.js

@@ -1,7 +0,2 @@

import { readable } from 'svelte/store';
import { BROWSER } from 'esm-env';
export const isDark = readable(BROWSER ? matchMedia('(prefers-color-scheme: dark)').matches : undefined, (set) => {
if (BROWSER) {
matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) => set(e.matches));
}
});
import { listen } from 'svelte-mq-store';
export const isDark = listen('(prefers-color-scheme: dark)');
{
"name": "@jill64/svelte-device-theme",
"description": "🖥️ A simple store that syncs with your device's theme settings",
"version": "1.2.0",
"description": "☯ A simple store that syncs with your device's theme settings",
"version": "1.2.1",
"main": "dist/index.js",

@@ -27,2 +27,3 @@ "type": "module",

"keywords": [
"dark-mode",
"device",

@@ -46,11 +47,11 @@ "media",

"devDependencies": {
"@typescript-eslint/eslint-plugin": "6.9.1",
"@typescript-eslint/parser": "6.9.1",
"@typescript-eslint/eslint-plugin": "6.12.0",
"@typescript-eslint/parser": "6.12.0",
"eslint-plugin-deprecation": "2.0.0",
"svelte": "4.2.2",
"typescript": "5.2.2"
"svelte": "4.2.7",
"typescript": "5.3.2"
},
"dependencies": {
"esm-env": "1.0.0"
"svelte-mq-store": "0.0.1"
}
}

@@ -7,5 +7,5 @@ <!----- BEGIN GHOST DOCS HEADER ----->

🖥️ A simple store that syncs with your device's theme settings
☯ A simple store that syncs with your device's theme settings
## Install
## Installation

@@ -20,4 +20,2 @@ ```sh

Note: `$isDark` is `undefined` on the server
```svelte

@@ -34,1 +32,5 @@ <script>

```
> [!NOTE]
> `$isDark` is `undefined` on the server.
> If you need full theme management including SSR, please see [@jill64/svelte-dark-theme](https://github.com/jill64/svelte-dark-theme).
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc