Skip to content

Commit df516c5

Browse files
authored
0.9.8 (#3)
* Core - Add `inject` fallback, fix #2 * Pkg - Edit README * Pkg - Bump v0.9.8 * Nuxt - Cleanup module impl * Tests - Up tests deps
1 parent 317716f commit df516c5

File tree

7 files changed

+28
-24
lines changed

7 files changed

+28
-24
lines changed

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,11 +228,17 @@ import PulseSpinner from 'vue-global-loader/PulseSpinner.vue'
228228
</template>
229229
```
230230

231-
There's no need to style the spinners (e.g. the spinner should be 110px wide on desktop, 80px wide on mobile devices, animations should be disabled if users prefer reduced motion, etc). This is already taken care for you.
232-
233231
Each spinner already has its own CSS and inherits the `foregroundColor` option specified in your config or scoped options.
234232

235-
You may append a class to override its styles, but I wouldn't recommend it. Instead, you should use a custom spinner.
233+
If you think the spinner size is too big, add a class or inline styles to it and they'll be forwarded to the root `svg` element:
234+
235+
```vue
236+
<template>
237+
<GlobalLoader>
238+
<PulseSpinner style="width: 60px" />
239+
</GlobalLoader>
240+
</template>
241+
```
236242

237243
#### Custom Spinners
238244

packages/vue-global-loader/core/store.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export function useGlobalLoader(scopedOptions: Partial<GlobalLoaderOptions> = {}
8181
}
8282
}
8383

84-
const store = inject(injectionKey)!
84+
const store = inject(injectionKey, new GlobalLoaderStore(scopedOptions))
8585

8686
return {
8787
/** Display the global loader with any scoped option set in `useGlobalLoader` parameter. */
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"name": "vue-global-loader/nuxt",
33
"configKey": "globalLoader",
4-
"version": "0.9.7"
4+
"version": "0.9.8"
55
}

packages/vue-global-loader/nuxt/module.mjs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ import {
88
} from '@nuxt/kit'
99
import { defu } from 'defu'
1010

11-
const module = defineNuxtModule({
11+
export default defineNuxtModule({
1212
meta: {
1313
name: 'nuxt/vue-global-loader',
1414
configKey: 'globalLoader',
1515
compatibility: {
1616
nuxt: '>=3.0.0',
1717
},
1818
},
19-
async setup(moduleOptions, nuxt) {
19+
setup(moduleOptions, nuxt) {
2020
nuxt.options.runtimeConfig.public.globalLoader = defu(
2121
nuxt.options.runtimeConfig.public.globalLoader || {},
2222
moduleOptions
@@ -55,5 +55,3 @@ const module = defineNuxtModule({
5555
})
5656
},
5757
})
58-
59-
export { module as default }

packages/vue-global-loader/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-global-loader",
3-
"version": "0.9.7",
3+
"version": "0.9.8",
44
"private": false,
55
"description": "Global loaders made easy for Vue and Nuxt",
66
"keywords": [

playground/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
"postinstall": "nuxt prepare"
1111
},
1212
"devDependencies": {
13-
"@nuxt/devtools": "latest",
14-
"browserslist": "^4.22.2",
15-
"lightningcss": "^1.22.1",
16-
"nuxt": "^3.8.2",
17-
"vue": "^3.3.11",
18-
"vue-router": "^4.2.5"
13+
"@nuxt/devtools": "^1.2.0",
14+
"browserslist": "^4.23.0",
15+
"lightningcss": "^1.24.1",
16+
"nuxt": "^3.11.2",
17+
"vue": "^3.4.26",
18+
"vue-router": "^4.3.2"
1919
},
2020
"dependencies": {
2121
"vue-global-loader": "workspace:^"

tests/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@
88
"dependencies": {
99
"tinycolor2": "^1.6.0",
1010
"vue-global-loader": "workspace:*",
11-
"vue-router": "^4.2.5"
11+
"vue-router": "^4.3.2"
1212
},
1313
"devDependencies": {
14-
"@types/node": "^20.10.4",
14+
"@types/node": "^20.12.8",
1515
"@types/tinycolor2": "^1.4.6",
16-
"@vitejs/plugin-vue": "^4.5.2",
16+
"@vitejs/plugin-vue": "^5.0.4",
1717
"@vitejs/plugin-vue-jsx": "^3.1.0",
18-
"cypress": "^13.6.1",
19-
"typescript": "^5.3.3",
20-
"vite": "^4.5.1",
21-
"vue": "^3.3.11",
22-
"vue-tsc": "^1.8.25"
18+
"cypress": "^13.8.1",
19+
"typescript": "^5.4.5",
20+
"vite": "^5.2.11",
21+
"vue": "^3.4.26",
22+
"vue-tsc": "^2.0.16"
2323
}
2424
}

0 commit comments

Comments
 (0)