diff --git a/composer.json b/composer.json index cab82d3..9b1fe21 100644 --- a/composer.json +++ b/composer.json @@ -38,6 +38,9 @@ "rector/rector": "^1.2 || ^2.2", "spatie/laravel-data": "^4.18" }, + "suggest": { + "ext-zlib": "Required for shareable links feature." + }, "autoload": { "psr-4": { "Sunchayn\\Nimbus\\": "src/" @@ -79,4 +82,4 @@ }, "minimum-stability": "dev", "prefer-stable": true -} +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 10c60d6..d61b839 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,6 +16,7 @@ "codemirror-json-schema": "^0.8.0", "concurrently": "^9.2.1", "jsonc-parser": "^3.3.1", + "pako": "^2.1.0", "pinia": "^3.0.1", "pinia-plugin-persistedstate": "^4.7.1", "pretty-bytes": "^7.0.1", @@ -35,6 +36,7 @@ "@testing-library/user-event": "^14.6.1", "@testing-library/vue": "^8.1.0", "@types/node": "^22.13.5", + "@types/pako": "^2.0.4", "@typescript-eslint/eslint-plugin": "^8.43.0", "@typescript-eslint/parser": "^8.43.0", "@vitejs/plugin-vue": "^5.2.1", @@ -2370,6 +2372,13 @@ "undici-types": "~6.21.0" } }, + "node_modules/@types/pako": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/pako/-/pako-2.0.4.tgz", + "integrity": "sha512-VWDCbrLeVXJM9fihYodcLiIv0ku+AlOa/TQ1SvYOaBuyrSKgEcro95LJyIsJ4vSo6BXIxOKxiJAat04CmST9Fw==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/unist": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", @@ -7800,6 +7809,12 @@ "dev": true, "license": "BlueOak-1.0.0" }, + "node_modules/pako": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/pako/-/pako-2.1.0.tgz", + "integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==", + "license": "(MIT AND Zlib)" + }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", diff --git a/package.json b/package.json index 536e1c1..30abe8c 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "build": "npm run type:check && npm run vite -- build && cp -a ./resources/dist-static/. ./resources/dist", "build:dev": "npm run vite -- build --mode=development && cp -a ./resources/dist-static/. ./resources/dist", "dev": "npm run vite -- dev", - "test": "vitest --config resources/js/tests/vitest.config.js", + "test": "vitest --config resources/js/tests/vitest.config.ts", "test:ui": "npm run test -- --ui", "test:run": "npm run test -- run", "test:coverage": "npm run test:run --coverage", @@ -28,6 +28,7 @@ "@testing-library/user-event": "^14.6.1", "@testing-library/vue": "^8.1.0", "@types/node": "^22.13.5", + "@types/pako": "^2.0.4", "@typescript-eslint/eslint-plugin": "^8.43.0", "@typescript-eslint/parser": "^8.43.0", "@vitejs/plugin-vue": "^5.2.1", @@ -73,6 +74,7 @@ "codemirror-json-schema": "^0.8.0", "concurrently": "^9.2.1", "jsonc-parser": "^3.3.1", + "pako": "^2.1.0", "pinia": "^3.0.1", "pinia-plugin-persistedstate": "^4.7.1", "pretty-bytes": "^7.0.1", @@ -83,4 +85,4 @@ "vue-codemirror": "^6.1.1", "vue-sonner": "^2.0.8" } -} +} \ No newline at end of file diff --git a/resources/js/app/App.vue b/resources/js/app/App.vue index 7fa6ef5..890b989 100644 --- a/resources/js/app/App.vue +++ b/resources/js/app/App.vue @@ -4,10 +4,12 @@ import { AppSonner } from '@/components/base/sonner'; import ValueGenerator from '@/components/common/ValueGenerator/ValueGenerator.vue'; import ScreenNavigationSidebar from '@/components/layout/ScreenNavigationSidebar.vue'; import { useSettingsStore } from '@/stores'; -import { onMounted, watch } from 'vue'; +import { onMounted, provide, ref, watch } from 'vue'; const settingsStore = useSettingsStore(); +const currentTheme = ref(''); + function applyTheme(preference: 'light' | 'dark' | 'system') { if (preference === 'system') { const isDark = @@ -17,6 +19,8 @@ function applyTheme(preference: 'light' | 'dark' | 'system') { preference = isDark ? 'dark' : 'light'; } + currentTheme.value = preference; + if (preference === 'dark') { document.documentElement.classList.add('dark'); @@ -61,6 +65,8 @@ watch( applyTheme(theme); }, ); + +provide('theme', currentTheme);