+
{
{ label: 'Not used', value: 'not-used' },
]"
/>
+
@@ -105,8 +140,8 @@ const filtered = computed(() => {
v-if="filtered.builtin.size"
:open="filtered.count.builtin <= DETAILS_MAX_ITEMS"
icon="simple-icons-nuxtdotjs"
- text="Built-in composables"
- :description="`${filtered.count.builtin} composables`"
+ :text="`Built-in ${filterEntries === 'directives' ? 'directives' : 'composables'}`"
+ :description="filteredBuiltinTitle"
>
@@ -114,8 +149,8 @@ const filtered = computed(() => {
v-if="filtered.lib.size"
:open="filtered.count.lib <= DETAILS_MAX_ITEMS"
icon="carbon-3d-mpr-toggle"
- text="Composables from libraries"
- :description="`${filtered.count.lib} composables from ${filtered.lib.size} packages`"
+ :text="`${filterEntries === 'directives' ? 'Directives' : 'Composables'} from libraries`"
+ :description="filteredLibTitle"
>
diff --git a/packages/devtools/src/integrations/vue-devtools.ts b/packages/devtools/src/integrations/vue-devtools.ts
index ada1fc7275..9e0fe5e730 100644
--- a/packages/devtools/src/integrations/vue-devtools.ts
+++ b/packages/devtools/src/integrations/vue-devtools.ts
@@ -1,15 +1,15 @@
import type { NuxtDevtoolsServerContext } from '../types'
-import { addPluginTemplate } from '@nuxt/kit'
+import { addPluginTemplate, resolvePath } from '@nuxt/kit'
import { join } from 'pathe'
import { runtimeDir } from '../dirs'
-export function setup({ nuxt }: NuxtDevtoolsServerContext) {
+export async function setup({ nuxt }: NuxtDevtoolsServerContext) {
if (!nuxt.options.dev || nuxt.options.test)
return
addPluginTemplate({
name: 'vue-devtools-client',
mode: 'client',
- src: join(runtimeDir, 'vue-devtools-client.js'),
+ src: await resolvePath(join(runtimeDir, 'vue-devtools-client')),
})
}
diff --git a/playgrounds/tab-pinia/directives/focus.ts b/playgrounds/tab-pinia/directives/focus.ts
new file mode 100644
index 0000000000..c12b2bd00c
--- /dev/null
+++ b/playgrounds/tab-pinia/directives/focus.ts
@@ -0,0 +1,23 @@
+// todo: remove this once nuxt with directives folder here
+import type { DirectiveBinding } from 'vue'
+
+function mounted(el: HTMLElement, binding: DirectiveBinding) {
+ // eslint-disable-next-line no-console
+ console.log('mounted', el, binding)
+}
+
+function unmounted(el: HTMLElement, binding: DirectiveBinding) {
+ // eslint-disable-next-line no-console
+ console.log('unmounted', el, binding)
+}
+
+function updated(el: HTMLElement, binding: DirectiveBinding) {
+ // eslint-disable-next-line no-console
+ console.log('updated', el, binding)
+}
+
+export const Focus = {
+ mounted,
+ unmounted,
+ updated,
+}
diff --git a/playgrounds/tab-pinia/nuxt.config.ts b/playgrounds/tab-pinia/nuxt.config.ts
index 1106f8c86f..24f3b21d81 100644
--- a/playgrounds/tab-pinia/nuxt.config.ts
+++ b/playgrounds/tab-pinia/nuxt.config.ts
@@ -1,3 +1,7 @@
+import { createResolver } from '@nuxt/kit'
+
+const resolver = createResolver(import.meta.url)
+
export default defineNuxtConfig({
css: ['~/assets/main.css'],
@@ -9,6 +13,20 @@ export default defineNuxtConfig({
imports: {
dirs: ['./stores'],
+ presets: [{
+ from: resolver.resolve('directives/focus.ts'),
+ imports: [{
+ name: 'Focus',
+ meta: {
+ vueDirective: true,
+ docsUrl: 'https://vuetifyjs.com/en/directives/click-outside/#usage',
+ description: 'The v-focus directive focus the element once mounted.',
+ },
+ }],
+ }],
+ addons: {
+ vueDirectives: true,
+ },
},
pinia: {
diff --git a/playgrounds/tab-pinia/pages/index.vue b/playgrounds/tab-pinia/pages/index.vue
index 38647b3bca..0c6f83f786 100644
--- a/playgrounds/tab-pinia/pages/index.vue
+++ b/playgrounds/tab-pinia/pages/index.vue
@@ -10,7 +10,7 @@ const counter = useCounter()
-
+
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index de4914a2d8..7348b9718a 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -275,7 +275,7 @@ catalogs:
version: 2.3.1
pkg-types:
specifier: ^1.3.1
- version: 1.3.0
+ version: 1.3.1
prompts:
specifier: ^2.4.2
version: 2.4.2
@@ -551,7 +551,7 @@ importers:
version: 1.0.0
pkg-types:
specifier: 'catalog:'
- version: 1.3.0
+ version: 1.3.1
semver:
specifier: 'catalog:'
version: 7.7.1
@@ -857,7 +857,7 @@ importers:
version: 2.0.2
pkg-types:
specifier: 'catalog:'
- version: 1.3.0
+ version: 1.3.1
prompts:
specifier: 'catalog:'
version: 2.4.2
@@ -5853,9 +5853,6 @@ packages:
typescript:
optional: true
- pkg-types@1.3.0:
- resolution: {integrity: sha512-kS7yWjVFCkIw9hqdJBoMxDdzEngmkr5FXeWZZfQ6GoYacjVnsW6l2CcYW/0ThD0vF4LPJgVYnrg4d0uuhwYQbg==}
-
pkg-types@1.3.1:
resolution: {integrity: sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==}
@@ -14235,12 +14232,6 @@ snapshots:
transitivePeerDependencies:
- '@vue/composition-api'
- pkg-types@1.3.0:
- dependencies:
- confbox: 0.1.8
- mlly: 1.7.4
- pathe: 1.1.2
-
pkg-types@1.3.1:
dependencies:
confbox: 0.1.8