@xiaou66/u-styles 0.0.1 → 0.0.3
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/dist/index.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
function applyTheme(e, t = {}) {
|
|
2
2
|
let n = t.target ?? document.documentElement;
|
|
3
3
|
if (e === "dark") {
|
|
4
|
-
n.setAttribute("theme-mode", "dark");
|
|
4
|
+
n.setAttribute("theme-mode", "dark"), n.classList.add("dark");
|
|
5
5
|
return;
|
|
6
6
|
}
|
|
7
|
-
n.removeAttribute("theme-mode");
|
|
7
|
+
n.removeAttribute("theme-mode"), n.classList.remove("dark");
|
|
8
8
|
}
|
|
9
9
|
export { applyTheme as t };
|
package/dist/runtime.es.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as applyTheme } from "./runtime-
|
|
1
|
+
import { t as applyTheme } from "./runtime-BEbyNSBV.mjs";
|
|
2
2
|
export { applyTheme };
|
package/dist/theme.css
CHANGED
package/dist/theme.less
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xiaou66/u-styles",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "Shared style tokens (TS-first) and theme assets",
|
|
5
5
|
"main": "./dist/index.es.js",
|
|
6
6
|
"module": "./dist/index.es.js",
|
|
@@ -11,14 +11,6 @@
|
|
|
11
11
|
"files": [
|
|
12
12
|
"dist/**/*"
|
|
13
13
|
],
|
|
14
|
-
"scripts": {
|
|
15
|
-
"build": "vite build && pnpm run build:tokens",
|
|
16
|
-
"build:tokens": "tsx \"./scripts/build-tokens.ts\"",
|
|
17
|
-
"dev": "vite",
|
|
18
|
-
"test:unit": "vitest run --config \"./vitest.config.ts\"",
|
|
19
|
-
"prepare": "pnpm run build",
|
|
20
|
-
"publish": "npm publish"
|
|
21
|
-
},
|
|
22
14
|
"author": "xiaou",
|
|
23
15
|
"license": "ISC",
|
|
24
16
|
"devDependencies": {
|
|
@@ -47,5 +39,11 @@
|
|
|
47
39
|
"./theme.css": "./dist/theme.css",
|
|
48
40
|
"./theme.less": "./dist/theme.less",
|
|
49
41
|
"./package.json": "./package.json"
|
|
42
|
+
},
|
|
43
|
+
"scripts": {
|
|
44
|
+
"build": "vite build && pnpm run build:tokens",
|
|
45
|
+
"build:tokens": "tsx \"./scripts/build-tokens.ts\"",
|
|
46
|
+
"dev": "vite",
|
|
47
|
+
"test:unit": "vitest run --config \"./vitest.config.ts\""
|
|
50
48
|
}
|
|
51
|
-
}
|
|
49
|
+
}
|