@thi.ng/color-palettes 1.2.57 → 1.2.58
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 +1 -1
- package/filter.js +1 -2
- package/package.json +12 -12
- package/theme.js +3 -6
package/CHANGELOG.md
CHANGED
package/filter.js
CHANGED
|
@@ -9,8 +9,7 @@ const defFilter = (pred, threshold) => (theme) => {
|
|
|
9
9
|
const $thresh = threshold ?? theme.length;
|
|
10
10
|
for (let i = theme.length, n = 0; i-- > 0; ) {
|
|
11
11
|
if (pred(theme[i])) {
|
|
12
|
-
if (++n >= $thresh)
|
|
13
|
-
return true;
|
|
12
|
+
if (++n >= $thresh) return true;
|
|
14
13
|
}
|
|
15
14
|
}
|
|
16
15
|
return false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/color-palettes",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.58",
|
|
4
4
|
"description": "Collection of 200+ image based color themes & composable theme query filters",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -38,18 +38,18 @@
|
|
|
38
38
|
"tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@thi.ng/api": "^8.11.
|
|
42
|
-
"@thi.ng/base-n": "^2.7.
|
|
43
|
-
"@thi.ng/checks": "^3.6.
|
|
44
|
-
"@thi.ng/color": "^5.6.
|
|
45
|
-
"@thi.ng/errors": "^2.5.
|
|
46
|
-
"@thi.ng/hex": "^2.3.
|
|
41
|
+
"@thi.ng/api": "^8.11.2",
|
|
42
|
+
"@thi.ng/base-n": "^2.7.14",
|
|
43
|
+
"@thi.ng/checks": "^3.6.4",
|
|
44
|
+
"@thi.ng/color": "^5.6.45",
|
|
45
|
+
"@thi.ng/errors": "^2.5.7",
|
|
46
|
+
"@thi.ng/hex": "^2.3.46"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@microsoft/api-extractor": "^7.43.
|
|
50
|
-
"esbuild": "^0.
|
|
51
|
-
"typedoc": "^0.25.
|
|
52
|
-
"typescript": "^5.4.
|
|
49
|
+
"@microsoft/api-extractor": "^7.43.2",
|
|
50
|
+
"esbuild": "^0.21.1",
|
|
51
|
+
"typedoc": "^0.25.13",
|
|
52
|
+
"typescript": "^5.4.5"
|
|
53
53
|
},
|
|
54
54
|
"keywords": [
|
|
55
55
|
"css",
|
|
@@ -90,5 +90,5 @@
|
|
|
90
90
|
"parent": "@thi.ng/color",
|
|
91
91
|
"year": 2021
|
|
92
92
|
},
|
|
93
|
-
"gitHead": "
|
|
93
|
+
"gitHead": "df34b4a9e650cc7323575356de207d78933bdcf3\n"
|
|
94
94
|
}
|
package/theme.js
CHANGED
|
@@ -52,15 +52,12 @@ function* __themes(fn, preds) {
|
|
|
52
52
|
const pred = compFilter(...preds);
|
|
53
53
|
for (let i = 0; i < NUM_THEMES; i++) {
|
|
54
54
|
const theme = fn(i);
|
|
55
|
-
if (pred(theme))
|
|
56
|
-
yield theme;
|
|
55
|
+
if (pred(theme)) yield theme;
|
|
57
56
|
}
|
|
58
57
|
} else if (preds.length) {
|
|
59
|
-
for (let id of preds)
|
|
60
|
-
yield fn(id);
|
|
58
|
+
for (let id of preds) yield fn(id);
|
|
61
59
|
} else {
|
|
62
|
-
for (let i = 0; i < NUM_THEMES; i++)
|
|
63
|
-
yield fn(i);
|
|
60
|
+
for (let i = 0; i < NUM_THEMES; i++) yield fn(i);
|
|
64
61
|
}
|
|
65
62
|
}
|
|
66
63
|
const __ensureID = (id) => assert(id >= 0 && id < NUM_THEMES, `invalid theme ID`);
|