@thi.ng/checks 3.6.23 → 3.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2025-02-13T16:03:11Z
3
+ - **Last updated**: 2025-02-21T21:54:17Z
4
4
  - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
5
 
6
6
  All notable changes to this project will be documented in this file.
@@ -11,6 +11,12 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
11
11
  **Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
12
12
  and/or version bumps of transitive dependencies.
13
13
 
14
+ ## [3.7.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/checks@3.7.0) (2025-02-21)
15
+
16
+ #### 🚀 Features
17
+
18
+ - add `isDarkMode()` ([c42a738](https://github.com/thi-ng/umbrella/commit/c42a738))
19
+
14
20
  ### [3.6.19](https://github.com/thi-ng/umbrella/tree/@thi.ng/checks@3.6.19) (2025-01-14)
15
21
 
16
22
  #### ♻️ Refactoring
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
  [![Mastodon Follow](https://img.shields.io/mastodon/follow/109331703950160316?domain=https%3A%2F%2Fmastodon.thi.ng&style=social)](https://mastodon.thi.ng/@toxi)
8
8
 
9
9
  > [!NOTE]
10
- > This is one of 201 standalone projects, maintained as part
10
+ > This is one of 202 standalone projects, maintained as part
11
11
  > of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
12
12
  > and anti-framework.
13
13
  >
@@ -49,6 +49,7 @@ Collection of 70+ type, feature & value checks.
49
49
  - [`isBlob`](https://docs.thi.ng/umbrella/checks/functions/isBlob.html)
50
50
  - [`isBoolean`](https://docs.thi.ng/umbrella/checks/functions/isBoolean.html)
51
51
  - [`isChrome`](https://docs.thi.ng/umbrella/checks/functions/isChrome.html)
52
+ - [`isDarkMode`](https://docs.thi.ng/umbrella/checks/functions/isDarkMode.html)
52
53
  - [`isDataURL`](https://docs.thi.ng/umbrella/checks/functions/isDataURL.html)
53
54
  - [`isDate`](https://docs.thi.ng/umbrella/checks/functions/isDate.html)
54
55
  - [`isEven`](https://docs.thi.ng/umbrella/checks/functions/isEven.html)
@@ -134,7 +135,7 @@ For Node.js REPL:
134
135
  const ch = await import("@thi.ng/checks");
135
136
  ```
136
137
 
137
- Package sizes (brotli'd, pre-treeshake): ESM: 1.65 KB
138
+ Package sizes (brotli'd, pre-treeshake): ESM: 1.70 KB
138
139
 
139
140
  ## Dependencies
140
141
 
package/index.d.ts CHANGED
@@ -20,6 +20,7 @@ export * from "./is-bigint.js";
20
20
  export * from "./is-blob.js";
21
21
  export * from "./is-boolean.js";
22
22
  export * from "./is-chrome.js";
23
+ export * from "./is-dark-mode.js";
23
24
  export * from "./is-data-url.js";
24
25
  export * from "./is-date.js";
25
26
  export * from "./is-even.js";
package/index.js CHANGED
@@ -20,6 +20,7 @@ export * from "./is-bigint.js";
20
20
  export * from "./is-blob.js";
21
21
  export * from "./is-boolean.js";
22
22
  export * from "./is-chrome.js";
23
+ export * from "./is-dark-mode.js";
23
24
  export * from "./is-data-url.js";
24
25
  export * from "./is-date.js";
25
26
  export * from "./is-even.js";
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Browser only. Returns true if client has currently dark mode enabled. Always
3
+ * returns false if no global `window` object is available.
4
+ */
5
+ export declare const isDarkMode: () => boolean;
6
+ //# sourceMappingURL=is-dark-mode.d.ts.map
@@ -0,0 +1,4 @@
1
+ const isDarkMode = () => typeof window !== "undefined" ? window?.matchMedia?.("(prefers-color-scheme:dark)").matches ?? false : false;
2
+ export {
3
+ isDarkMode
4
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/checks",
3
- "version": "3.6.23",
3
+ "version": "3.7.0",
4
4
  "description": "Collection of 70+ type, feature & value checks",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -290,5 +290,5 @@
290
290
  "thi.ng": {
291
291
  "alias": "ch"
292
292
  },
293
- "gitHead": "9a0b33253fef092aaf301decf6ecd54317874d4c\n"
293
+ "gitHead": "2958e6a9881bd9e06de587a2141f6d23c64278db\n"
294
294
  }