mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-20 23:11:43 +01:00
fix(module): boolean types and bump nuxt to 3.8.2 (#1006)
This commit is contained in:
@@ -98,9 +98,9 @@ _`enter` shortcut will only trigger when `queryInput` is focused._
|
||||
|
||||
### `whenever`
|
||||
|
||||
Prop: `whenever?: WatchSource<Boolean>[]`
|
||||
Prop: `whenever?: WatchSource<boolean>[]`
|
||||
|
||||
`whenever` allows to add constraints on the shortcut triggering behavior. This array can contain `Ref<Boolean>`, `ComputedRef<Boolean>` or `() => Boolean`.
|
||||
`whenever` allows to add constraints on the shortcut triggering behavior. This array can contain `Ref<boolean>`, `ComputedRef<boolean>` or `() => boolean`.
|
||||
|
||||
```ts
|
||||
defineShortcuts({
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
"date-fns": "^2.30.0",
|
||||
"eslint": "^8.52.0",
|
||||
"joi": "^17.11.0",
|
||||
"nuxt": "^3.8.0",
|
||||
"nuxt": "^3.8.2",
|
||||
"nuxt-cloudflare-analytics": "^1.0.8",
|
||||
"nuxt-component-meta": "npm:nuxt-component-meta-edge@0.5.5-28315603.0a285c7",
|
||||
"nuxt-og-image": "^2.2.4",
|
||||
|
||||
11
package.json
11
package.json
@@ -36,7 +36,7 @@
|
||||
"@headlessui/tailwindcss": "^0.2.0",
|
||||
"@headlessui/vue": "^1.7.16",
|
||||
"@iconify-json/heroicons": "^1.1.13",
|
||||
"@nuxt/kit": "^3.8.0",
|
||||
"@nuxt/kit": "^3.8.2",
|
||||
"@nuxtjs/color-mode": "^3.3.2",
|
||||
"@nuxtjs/tailwindcss": "^6.8.1",
|
||||
"@popperjs/core": "^2.11.8",
|
||||
@@ -58,14 +58,14 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nuxt/eslint-config": "^0.2.0",
|
||||
"@nuxt/module-builder": "^0.5.2",
|
||||
"@nuxt/module-builder": "^0.5.4",
|
||||
"@release-it/conventional-changelog": "^7.0.2",
|
||||
"@testing-library/vue": "^7.0.0",
|
||||
"@vitejs/plugin-vue": "^4.4.0",
|
||||
"eslint": "^8.52.0",
|
||||
"happy-dom": "^12.10.3",
|
||||
"joi": "^17.11.0",
|
||||
"nuxt": "^3.8.0",
|
||||
"nuxt": "^3.8.2",
|
||||
"nuxt-vitest": "^0.11.3",
|
||||
"release-it": "^16.2.1",
|
||||
"typescript": "^5.2.2",
|
||||
@@ -75,5 +75,10 @@
|
||||
"vue-tsc": "^1.8.21",
|
||||
"yup": "^1.3.2",
|
||||
"zod": "^3.22.4"
|
||||
},
|
||||
"resolutions": {
|
||||
"@nuxt/kit": "3.8.2",
|
||||
"@nuxt/schema": "3.8.2",
|
||||
"vue": "3.3.8"
|
||||
}
|
||||
}
|
||||
|
||||
2469
pnpm-lock.yaml
generated
2469
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -7,7 +7,7 @@ import { useShortcuts } from './useShortcuts'
|
||||
export interface ShortcutConfig {
|
||||
handler: Function
|
||||
usingInput?: string | boolean
|
||||
whenever?: WatchSource<Boolean>[]
|
||||
whenever?: WatchSource<boolean>[]
|
||||
}
|
||||
|
||||
export interface ShortcutsConfig {
|
||||
@@ -20,7 +20,7 @@ export interface ShortcutsOptions {
|
||||
|
||||
interface Shortcut {
|
||||
handler: Function
|
||||
condition: ComputedRef<Boolean>
|
||||
condition: ComputedRef<boolean>
|
||||
chained: boolean
|
||||
// KeyboardEvent attributes
|
||||
key: string
|
||||
@@ -149,7 +149,7 @@ export const defineShortcuts = (config: ShortcutsConfig, options: ShortcutsOptio
|
||||
}
|
||||
|
||||
// Create shortcut computed
|
||||
const conditions: ComputedRef<Boolean>[] = []
|
||||
const conditions: ComputedRef<boolean>[] = []
|
||||
if (!(shortcutConfig as ShortcutConfig).usingInput) {
|
||||
conditions.push(logicNot(usingInput))
|
||||
} else if (typeof (shortcutConfig as ShortcutConfig).usingInput === 'string') {
|
||||
|
||||
Reference in New Issue
Block a user