@code-coaching/vuetiful 0.21.1 → 0.21.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/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@code-coaching/vuetiful",
|
|
3
|
-
"version": "0.21.
|
|
3
|
+
"version": "0.21.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "onchange 'src/**/*.vue' 'src/**/*.ts' 'src/**/*.css' -- npm run build",
|
|
7
7
|
"prebuild": "node 'scripts/intellisense.js'",
|
|
8
8
|
"build": "rimraf dist && vue-tsc && vite build && npm run build:style",
|
|
9
|
-
"build:style": "npx tailwindcss -i ./src/styles/all.css -o ./dist/styles/all.css",
|
|
9
|
+
"build:style": "npx tailwindcss -i ./src/styles/all.css -o ./dist/styles/all.css && node scripts/minify-css.js",
|
|
10
10
|
"docs:dev": "cd docs && npm run dev",
|
|
11
11
|
"docs:build": "cd docs && npm run build",
|
|
12
12
|
"docs:serve": "cd docs && npm run serve",
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
"@vitest/coverage-c8": "^0.29.8",
|
|
28
28
|
"@vue/test-utils": "^2.3.2",
|
|
29
29
|
"autoprefixer": "^10.4.14",
|
|
30
|
+
"clean-css": "^5.3.2",
|
|
30
31
|
"jsdom": "^21.1.1",
|
|
31
32
|
"onchange": "^7.1.0",
|
|
32
33
|
"postcss": "^8.4.21",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { readonly, Ref, ref } from "vue";
|
|
1
|
+
import { computed, readonly, Ref, ref } from "vue";
|
|
2
2
|
import { usePlatform } from "../utils/platform/platform.service";
|
|
3
3
|
|
|
4
4
|
const { isBrowser } = usePlatform();
|
|
@@ -11,6 +11,7 @@ const MODE = {
|
|
|
11
11
|
const modeOsPrefers = ref(MODE.DARK);
|
|
12
12
|
const currentMode = ref(MODE.DARK);
|
|
13
13
|
const modeUserPrefers: Ref<boolean | undefined> = ref(undefined);
|
|
14
|
+
const isDark = computed(() => currentMode.value === MODE.DARK);
|
|
14
15
|
|
|
15
16
|
const useDarkMode = () => {
|
|
16
17
|
const getModeOsPrefers = (): boolean => {
|
|
@@ -78,6 +79,7 @@ const useDarkMode = () => {
|
|
|
78
79
|
modeOsPrefers: readonly(modeOsPrefers),
|
|
79
80
|
modeUserPrefers: readonly(modeUserPrefers),
|
|
80
81
|
currentMode: readonly(currentMode),
|
|
82
|
+
isDark: readonly(isDark),
|
|
81
83
|
getModeOsPrefers,
|
|
82
84
|
getModeUserPrefers,
|
|
83
85
|
getModeAutoPrefers,
|