diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index 4c905d219..a571d916e 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -1,8 +1,26 @@ +import { createRequire } from 'node:module' import { defineConfig } from 'vitepress' import { withPwa } from '@vite-pwa/vitepress' +import { transformerTwoslash } from '@shikijs/vitepress-twoslash' +import ts from 'typescript' import { docsLink } from '../../macros' import { getLocaleConfig, pwa } from './configs' +const require = createRequire(import.meta.url) + +// Volar plugins +const defineOptions = require('@vue-macros/volar/define-options') +const defineEmit = require('@vue-macros/volar/define-emit') +const defineProp = require('@vue-macros/volar/define-prop') +const defineProps = require('@vue-macros/volar/define-props') +const definePropsRefs = require('@vue-macros/volar/define-props-refs') +const defineSlots = require('@vue-macros/volar/define-slots') +const defineModels = require('@vue-macros/volar/define-models') +const exportExpose = require('@vue-macros/volar/export-expose') +const exportRender = require('@vue-macros/volar/export-render') +const jsxDirective = require('@vue-macros/volar/jsx-directive') +const booleanProp = require('@vue-macros/volar/boolean-prop') + export default withPwa( defineConfig({ lastUpdated: true, @@ -40,5 +58,33 @@ export default withPwa( hostname: docsLink, }, pwa, + markdown: { + codeTransformers: [ + transformerTwoslash({ + twoslashOptions: { + compilerOptions: { + jsx: ts.JsxEmit.Preserve, + jsxFactory: 'vue', + types: ['unplugin-vue-macros/macros-global', 'vue/jsx'], + }, + vueCompilerOptions: { + plugins: [ + defineOptions, + defineModels, + defineSlots, + defineEmit, + defineProp, + defineProps, + definePropsRefs, + exportRender, + exportExpose, + jsxDirective, + booleanProp, + ], + }, + }, + }), + ], + }, }), ) diff --git a/docs/.vitepress/theme/index.ts b/docs/.vitepress/theme/index.ts index aaa04444d..212908a7d 100644 --- a/docs/.vitepress/theme/index.ts +++ b/docs/.vitepress/theme/index.ts @@ -1,5 +1,6 @@ import Theme from 'vitepress/theme' import { NolebaseGitChangelogPlugin } from '@nolebase/vitepress-plugin-git-changelog/client' +import TwoslashFloatingVue from '@shikijs/vitepress-twoslash/client' import WarnBadge from '../components/WarnBadge.vue' import StabilityLevel from '../components/StabilityLevel.vue' import Layout from './Layout.vue' @@ -7,6 +8,7 @@ import type { EnhanceAppContext } from 'vitepress' import 'uno.css' import './style.css' import '@nolebase/vitepress-plugin-git-changelog/client/style.css' +import '@shikijs/vitepress-twoslash/style.css' export default { ...Theme, @@ -26,5 +28,6 @@ export default { }, ], }) + app.use(TwoslashFloatingVue) }, } diff --git a/docs/features/better-define.md b/docs/features/better-define.md index 68498cc4a..2ae4a4536 100644 --- a/docs/features/better-define.md +++ b/docs/features/better-define.md @@ -17,22 +17,27 @@ With enabling `betterDefine`, imported types are supported in ` ``` -```ts [types.ts] -export interface BaseProps { - title: string -} -``` +<<< ./better-define.md#basic{ts} [types.ts] ::: diff --git a/docs/features/boolean-prop.md b/docs/features/boolean-prop.md index 8454f23cc..430cb5f60 100644 --- a/docs/features/boolean-prop.md +++ b/docs/features/boolean-prop.md @@ -26,18 +26,35 @@ interface Options { ## Usage -```vue + +```vue twoslash + + ``` + -```vue +```vue twoslash ``` diff --git a/docs/features/export-expose.md b/docs/features/export-expose.md index d7a7c9701..f6e584451 100644 --- a/docs/features/export-expose.md +++ b/docs/features/export-expose.md @@ -23,12 +23,13 @@ Support these syntaxes: ### 1. local variable/function/class -```vue +```vue twoslash ``` ::: details Compiled Code -```vue +```vue twoslash ``` +<<< ./export-expose.md#export-file{ts} [types.ts] + +::: + ::: details Compiled Code -```vue +```vue twoslash ``` +```ts [types.ts] +export const foo = 'foo' +``` + +::: + ::: details Compiled Code -```vue +```vue twoslash +``` + +### `v-for` + +```vue twoslash + +``` + +### `v-slot` + +::: code-group + +```vue [App.vue] twoslash + +``` + +<<< ./jsx-directive.md#v-slot{tsx} [Child.tsx] + +::: + ### `v-on` ::: warning @@ -30,54 +109,97 @@ Vue built-in directives for JSX.
``` -### `v-if`, `v-else-if`, `v-else` +## Dynamic Arguments -```tsx -
-
0-0
-
0-1
-
0-2
-
-``` +It is also possible to use a variable in a directive argument by wrapping it with a pair of `$`: -### `v-for`, `v-memo` +`v-model` -```tsx -
- {item} -
-``` +::: code-group -### `v-slot` +```vue [App.vue] twoslash + ``` -## Dynamic Arguments +<<< ./jsx-directive.md#v-model{tsx} [Comp.tsx] -It is also possible to use a JavaScript expression in a directive argument by wrapping it with a pair of `$`: +::: -`v-model` +`v-slot` -```tsx - +::: code-group + +```vue [App.vue] twoslash + ``` -`v-slot` +<<< ./jsx-directive.md#v-slot-dynamic{tsx} [Comp.tsx] -```tsx - - - -``` +::: ## Modifiers diff --git a/docs/features/reactivity-transform.md b/docs/features/reactivity-transform.md index 64379825f..351be1aac 100644 --- a/docs/features/reactivity-transform.md +++ b/docs/features/reactivity-transform.md @@ -88,7 +88,7 @@ Ever since the introduction of the Composition API, one of the primary unresolve Reactivity Transform is a compile-time transform that allows us to write code like this: -```vue +```vue twoslash ``` The above will be compiled into the following runtime declaration equivalent: -```js -export default { +```ts twoslash +import { defineComponent, watchEffect } from 'vue' + +export default defineComponent({ props: { msg: { type: String, required: true }, count: { type: Number, default: 1 }, @@ -227,7 +244,7 @@ export default { console.log(props.msg, props.count, props.foo) }) }, -} +}) ``` ## Retaining Reactivity Across Function Boundaries {#retaining-reactivity-across-function-boundaries} @@ -238,7 +255,9 @@ While reactive variables relieve us from having to use `.value` everywhere, it c Given a function that expects a ref as an argument, e.g.: -```ts +```ts twoslash +import { type Ref, watch } from 'vue' + function trackChange(x: Ref) { watch(x, (x) => { console.log('x changed!') @@ -246,6 +265,7 @@ function trackChange(x: Ref) { } const count = $ref(0) +// @errors: 2345 trackChange(count) // doesn't work! ``` @@ -279,7 +299,7 @@ As we can see, `$$()` is a macro that serves as an **escape hint**: reactive var Reactivity can also be lost if reactive variables are used directly in a returned expression: -```ts +```ts twoslash function useMouse() { const x = $ref(0) const y = $ref(0) @@ -307,7 +327,7 @@ In order to retain reactivity, we should be returning the actual refs, not the c Again, we can use `$$()` to fix this. In this case, `$$()` can be used directly on the returned object - any reference to reactive variables inside the `$$()` call will retain the reference to their underlying refs: -```ts +```ts twoslash function useMouse() { const x = $ref(0) const y = $ref(0) @@ -326,21 +346,36 @@ function useMouse() { `$$()` works on destructured props since they are reactive variables as well. The compiler will convert it with `toRef` for efficiency: -```ts +```vue twoslash + ``` compiles to: -```js -export default { +```ts twoslash +import { type Ref, defineComponent, toRef } from 'vue' +function passAsRef(count: Ref) { + return count +} +// ---cut--- +export default defineComponent({ + props: { + count: { type: Number, required: true }, + }, setup(props) { const __props_count = toRef(props, 'count') passAsRef(__props_count) }, -} +}) ``` ## TypeScript Integration {#typescript-integration} diff --git a/docs/features/short-bind.md b/docs/features/short-bind.md index 1ffab7217..05d2eb338 100644 --- a/docs/features/short-bind.md +++ b/docs/features/short-bind.md @@ -17,12 +17,14 @@ A shorthand for binding prop with the same data name. ### Basic Usage -```vue +```vue twoslash + + ``` @@ -30,12 +32,12 @@ A shorthand for binding prop with the same data name. ```vue ``` @@ -52,14 +54,3 @@ A shorthand for binding prop with the same data name. }, } ``` - -## ESLint Configuration - -```jsonc {4} -// .eslintrc -{ - "rules": { - "vue/valid-v-bind": "off", - }, -} -``` diff --git a/docs/macros/chain-call.md b/docs/macros/chain-call.md index 23ccdd2af..c00f4cc5c 100644 --- a/docs/macros/chain-call.md +++ b/docs/macros/chain-call.md @@ -21,8 +21,10 @@ Extends `defineProps`, support call `withDefaults` as a chain. ## Basic Usage -```vue +```vue twoslash ``` diff --git a/docs/macros/define-models.md b/docs/macros/define-models.md index c231aaa50..01ce4bb17 100644 --- a/docs/macros/define-models.md +++ b/docs/macros/define-models.md @@ -30,7 +30,7 @@ VueMacros({ Requires [`@vueuse/core`](https://www.npmjs.com/package/@vueuse/core), install it by yourself before using. -```vue +```vue twoslash + + ``` ::: details Compiled Code -```vue +```vue twoslash - + + ``` ::: ## JSX in ` @@ -76,8 +80,10 @@ console.log(count.value) ### With Options -```vue +```vue twoslash ``` +### With Reactivity Transform + +```ts +const foo = $defineProp('foo') +// ^? type: string | undefined + +const bar = $(defineProp('bar', { default: 'bar' })) +// ^? type: string +``` + ## Johnson's Edition ### API Reference @@ -118,8 +134,10 @@ const propName = defineProp(defaultValue, required, rest) ### Basic Usage -```vue +```vue twoslash ``` @@ -162,12 +182,10 @@ disabled.value ```vue ``` diff --git a/docs/macros/define-props-refs.md b/docs/macros/define-props-refs.md index f8b651075..f84e104a8 100644 --- a/docs/macros/define-props-refs.md +++ b/docs/macros/define-props-refs.md @@ -15,23 +15,24 @@ Returns refs from `defineProps` instead of a reactive object. It can be destruct ## Basic Usage -```vue {2-3,8} +```vue twoslash {2-3,8} ``` ## With Default Value -```vue {2-3,8} +```vue twoslash {2-3,8} ``` diff --git a/docs/macros/define-props.md b/docs/macros/define-props.md index f54b81f6b..30d2cc60f 100644 --- a/docs/macros/define-props.md +++ b/docs/macros/define-props.md @@ -21,15 +21,15 @@ See also [Vue issue](https://github.com/vuejs/core/issues/6876), [Reactivity Tra ## Basic Usage -```vue +```vue twoslash ``` diff --git a/docs/macros/define-render.md b/docs/macros/define-render.md index 1044919a1..e69df2568 100644 --- a/docs/macros/define-render.md +++ b/docs/macros/define-render.md @@ -15,7 +15,7 @@ We need more feedback on [RFC Discussion](https://github.com/vuejs/rfcs/discussi ## Basic Usage -```vue +```vue twoslash ``` +Using type `ShortEmits` or for short `SE`. + +```vue twoslash + +``` + ## Difference with Official Version - function style of declaration is not supported by official version. diff --git a/docs/package.json b/docs/package.json index 214b1de91..63ed07267 100644 --- a/docs/package.json +++ b/docs/package.json @@ -17,8 +17,11 @@ "@nolebase/vitepress-plugin-enhanced-readabilities": "^2.1.1", "@nolebase/vitepress-plugin-git-changelog": "^2.1.1", "@nolebase/vitepress-plugin-highlight-targeted-heading": "^2.1.1", + "@shikijs/vitepress-twoslash": "^1.6.4", "@vite-pwa/vitepress": "^0.5.0", "@vitejs/plugin-vue-jsx": "^4.0.0", + "@vue-macros/volar": "workspace:*", + "unplugin-vue-macros": "workspace:*", "vite-plugin-pwa": "^0.20.0", "vite-plugin-vue-devtools": "^7.2.1", "vitepress": "^1.2.3", diff --git a/docs/zh-CN/features/better-define.md b/docs/zh-CN/features/better-define.md index 7a60ad8d2..49ed69f09 100644 --- a/docs/zh-CN/features/better-define.md +++ b/docs/zh-CN/features/better-define.md @@ -17,22 +17,27 @@ ::: code-group -```vue [App.vue] +```vue twoslash [App.vue] ``` -```ts [types.ts] -export interface BaseProps { - title: string -} -``` +<<< ./better-define.md#basic{ts} [types.ts] ::: diff --git a/docs/zh-CN/features/boolean-prop.md b/docs/zh-CN/features/boolean-prop.md index 5886a0b46..025e0406b 100644 --- a/docs/zh-CN/features/boolean-prop.md +++ b/docs/zh-CN/features/boolean-prop.md @@ -26,18 +26,35 @@ interface Options { ## 基本用法 -```vue + +```vue twoslash + + ``` + -```vue +```vue twoslash ``` diff --git a/docs/zh-CN/features/export-expose.md b/docs/zh-CN/features/export-expose.md index 3aca4821c..332f146e0 100644 --- a/docs/zh-CN/features/export-expose.md +++ b/docs/zh-CN/features/export-expose.md @@ -23,12 +23,13 @@ ### 1. 局部变量/函数/类 -```vue +```vue twoslash ``` ::: details 编译后代码 -```vue +```vue twoslash ``` +<<< ./export-expose.md#export-file{ts} [types.ts] + +::: + ::: details 编译后代码 -```vue +```vue twoslash ``` +```ts [types.ts] +export const foo = 'foo' +``` + +::: + ::: details 编译后代码 -```vue +```vue twoslash +``` + +### `v-for` + +```vue twoslash + +``` + +### `v-slot` + +::: code-group + +```vue [App.vue] twoslash + +``` + +<<< ./jsx-directive.md#v-slot{tsx} [Child.tsx] + +::: + ### `v-on` ::: warning @@ -30,54 +109,97 @@ ``` -### `v-if`, `v-else-if`, `v-else` +## 动态参数 -```tsx -
-
0-0
-
0-1
-
0-2
-
-``` +在指令参数上也可以使用一个变量,需要包含在一对 `$` 内: -### `v-for`, `v-memo` +`v-model` -```tsx -
- {item} -
-``` +::: code-group -### `v-slot` +```vue [App.vue] twoslash + ``` -## 动态参数 +<<< ./jsx-directive.md#v-model{tsx} [Comp.tsx] -在指令参数上也可以使用一个 JavaScript 表达式,需要包含在一对 `$` 内: +::: -`v-model` +`v-slot` -```tsx - +::: code-group + +```vue [App.vue] twoslash + ``` -`v-slot` +<<< ./jsx-directive.md#v-slot-dynamic{tsx} [Comp.tsx] -```tsx - - - -``` +::: ## 修饰符 diff --git a/docs/zh-CN/features/reactivity-transform.md b/docs/zh-CN/features/reactivity-transform.md index 5ef16b714..0c2e8df9b 100644 --- a/docs/zh-CN/features/reactivity-transform.md +++ b/docs/zh-CN/features/reactivity-transform.md @@ -88,7 +88,7 @@ module.exports = { 响应性语法糖是一个编译时的转换步骤,让我们可以像这样书写代码: -```vue +```vue twoslash ``` 上面的代码将被编译成下面这样的运行时声明: -```js -export default { +```ts twoslash +import { defineComponent, watchEffect } from 'vue' + +export default defineComponent({ props: { msg: { type: String, required: true }, count: { type: Number, default: 1 }, @@ -227,7 +244,7 @@ export default { console.log(props.msg, props.count, props.foo) }) }, -} +}) ``` ## 保持在函数间传递时的响应性 {#retaining-reactivity-across-function-boundaries} @@ -238,7 +255,9 @@ export default { 假设有一个期望接收一个 ref 对象为参数的函数: -```ts +```ts twoslash +import { type Ref, watch } from 'vue' + function trackChange(x: Ref) { watch(x, (x) => { console.log('x 改变了!') @@ -246,6 +265,7 @@ function trackChange(x: Ref) { } const count = $ref(0) +// @errors: 2345 trackChange(count) // 无效! ``` @@ -279,7 +299,7 @@ trackChange(count) 如果将响应式变量直接放在返回值表达式中会丢失掉响应性: -```ts +```ts twoslash function useMouse() { const x = $ref(0) const y = $ref(0) @@ -307,7 +327,7 @@ return { 我们还是可以使用 `$$()` 来解决这个问题。在这个例子中,`$$()` 可以直接用在要返回的对象上,`$$()` 调用时任何对响应式变量的引用都会保留为对相应 ref 的引用: -```ts +```ts twoslash function useMouse() { const x = $ref(0) const y = $ref(0) @@ -326,21 +346,36 @@ function useMouse() { `$$()` 也适用于已解构的 props,因为它们也是响应式的变量。编译器会高效地通过 `toRef` 来做转换: -```ts +```vue twoslash + ``` 编译结果为: -```js -export default { +```ts twoslash +import { type Ref, defineComponent, toRef } from 'vue' +function passAsRef(count: Ref) { + return count +} +// ---cut--- +export default defineComponent({ + props: { + count: { type: Number, required: true }, + }, setup(props) { const __props_count = toRef(props, 'count') passAsRef(__props_count) }, -} +}) ``` ## TypeScript 集成 {#typescript-integration} diff --git a/docs/zh-CN/features/short-bind.md b/docs/zh-CN/features/short-bind.md index 278bbe330..09d2b0c4d 100644 --- a/docs/zh-CN/features/short-bind.md +++ b/docs/zh-CN/features/short-bind.md @@ -17,12 +17,14 @@ ### 基本用法 -```vue +```vue twoslash + + ``` @@ -30,12 +32,12 @@ ```vue ``` diff --git a/docs/zh-CN/macros/chain-call.md b/docs/zh-CN/macros/chain-call.md index 38c5eab42..7df76aa6a 100644 --- a/docs/zh-CN/macros/chain-call.md +++ b/docs/zh-CN/macros/chain-call.md @@ -21,8 +21,10 @@ ## 基本用法 -```vue +```vue twoslash ``` diff --git a/docs/zh-CN/macros/define-models.md b/docs/zh-CN/macros/define-models.md index 1355e83ae..4ab52f445 100644 --- a/docs/zh-CN/macros/define-models.md +++ b/docs/zh-CN/macros/define-models.md @@ -30,7 +30,7 @@ VueMacros({ 在开始之前,请先自行安装 [`@vueuse/core`](https://www.npmjs.com/package/@vueuse/core) -```vue +```vue twoslash + + ``` ::: details 编译后的代码 -```vue +```vue twoslash - + + ``` ::: ## ` @@ -45,8 +49,10 @@ console.log(count.value) ### 选项 -```vue +```vue twoslash ``` +### 响应性语法糖 + +```ts +const foo = $defineProp('foo') +// ^? type: string | undefined +const bar = $(defineProp('bar', { default: 'bar' })) +// ^? type: string +``` + ## Johnson 的版本 ### API 参考 @@ -86,8 +102,10 @@ const propName = defineProp(defaultValue, required, rest) ### 基本用法 -```vue +```vue twoslash ``` @@ -129,13 +150,11 @@ const disabled = defineProp(true) ```vue ``` diff --git a/docs/zh-CN/macros/define-props-refs.md b/docs/zh-CN/macros/define-props-refs.md index e22e56f64..d4b9b383d 100644 --- a/docs/zh-CN/macros/define-props-refs.md +++ b/docs/zh-CN/macros/define-props-refs.md @@ -15,23 +15,24 @@ ## 基本用法 -```vue {2-3,8} +```vue twoslash {2-3,8} ``` ## 默认值 -```vue {2-3,8} +```vue twoslash {2-3,8} ``` diff --git a/docs/zh-CN/macros/define-props.md b/docs/zh-CN/macros/define-props.md index a5a152c42..d08cda56f 100644 --- a/docs/zh-CN/macros/define-props.md +++ b/docs/zh-CN/macros/define-props.md @@ -21,15 +21,15 @@ ## 基本用法 -```vue +```vue twoslash ``` diff --git a/docs/zh-CN/macros/define-render.md b/docs/zh-CN/macros/define-render.md index b7e1c7d19..62ebf9780 100644 --- a/docs/zh-CN/macros/define-render.md +++ b/docs/zh-CN/macros/define-render.md @@ -15,7 +15,7 @@ ## 基本用法 -```vue +```vue twoslash ``` +使用 `ShortEmits` 或简写为 `SE`,可以使用元组或方法定义。 + +```vue twoslash + +``` + ## 和官方版本不同的是 - 官方版本不支持函数式的声明风格。 diff --git a/eslint.config.js b/eslint.config.js index f3c930df7..8a5b86e9a 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -21,6 +21,8 @@ export default sxzz([ 'import/no-mutable-exports': 'off', '@typescript-eslint/no-inferrable-types': 'off', '@typescript-eslint/no-empty-function': 'off', + 'import/first': 'off', + 'import/order': 'off', }, }, { diff --git a/packages/volar/package.json b/packages/volar/package.json index 7a16fd42d..4567ffc3f 100644 --- a/packages/volar/package.json +++ b/packages/volar/package.json @@ -32,6 +32,7 @@ "types": "./index.d.ts" }, "./*": { + "dev": "./src/*.ts", "require": "./dist/*.js" } }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9ce890a18..1570a574f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -129,18 +129,27 @@ importers: '@nolebase/vitepress-plugin-highlight-targeted-heading': specifier: ^2.1.1 version: 2.1.1(vitepress@1.2.3(@algolia/client-search@4.23.3)(@types/node@20.14.2)(less@4.2.0)(postcss@8.4.38)(terser@5.31.0)(typescript@5.4.5)) + '@shikijs/vitepress-twoslash': + specifier: ^1.6.4 + version: 1.6.4(@nuxt/kit@3.11.2(rollup@4.18.0))(typescript@5.4.5) '@vite-pwa/vitepress': specifier: ^0.5.0 version: 0.5.0(vite-plugin-pwa@0.20.0(@types/babel__core@7.20.5)(vite@5.2.13(@types/node@20.14.2)(less@4.2.0)(terser@5.31.0))) '@vitejs/plugin-vue-jsx': specifier: ^4.0.0 version: 4.0.0(vite@5.2.13(@types/node@20.14.2)(less@4.2.0)(terser@5.31.0))(vue@3.4.27(typescript@5.4.5)) + '@vue-macros/volar': + specifier: workspace:* + version: link:../packages/volar + unplugin-vue-macros: + specifier: workspace:* + version: link:../packages/macros vite-plugin-pwa: specifier: ^0.20.0 version: 0.20.0(@types/babel__core@7.20.5)(vite@5.2.13(@types/node@20.14.2)(less@4.2.0)(terser@5.31.0)) vite-plugin-vue-devtools: specifier: ^7.2.1 - version: 7.2.1(rollup@4.18.0)(vite@5.2.13(@types/node@20.14.2)(less@4.2.0)(terser@5.31.0))(vue@3.4.27(typescript@5.4.5)) + version: 7.2.1(@nuxt/kit@3.11.2(rollup@4.18.0))(rollup@4.18.0)(vite@5.2.13(@types/node@20.14.2)(less@4.2.0)(terser@5.31.0))(vue@3.4.27(typescript@5.4.5)) vitepress: specifier: ^1.2.3 version: 1.2.3(@algolia/client-search@4.23.3)(@types/node@20.14.2)(less@4.2.0)(postcss@8.4.38)(terser@5.31.0)(typescript@5.4.5) @@ -582,7 +591,7 @@ importers: devDependencies: '@nuxt/devtools': specifier: ^1.3.3 - version: 1.3.3(@unocss/reset@0.60.4)(rollup@4.18.0)(unocss@0.60.4(rollup@4.18.0)(vite@5.2.13(@types/node@20.14.2)(less@4.2.0)(terser@5.31.0)))(vite@5.2.13(@types/node@20.14.2)(less@4.2.0)(terser@5.31.0))(vue@3.4.27(typescript@5.4.5)) + version: 1.3.3(@unocss/reset@0.60.4)(floating-vue@5.2.2(@nuxt/kit@3.11.2(rollup@4.18.0))(vue@3.4.27(typescript@5.4.5)))(rollup@4.18.0)(unocss@0.60.4(rollup@4.18.0)(vite@5.2.13(@types/node@20.14.2)(less@4.2.0)(terser@5.31.0)))(vite@5.2.13(@types/node@20.14.2)(less@4.2.0)(terser@5.31.0))(vue@3.4.27(typescript@5.4.5)) '@nuxt/schema': specifier: ^3.11.2 version: 3.11.2(rollup@4.18.0) @@ -2049,6 +2058,15 @@ packages: resolution: {integrity: sha512-HAbhAYKfsAC2EkTqve00ibWIZlaU74Z1EHwAjYr4PXF0YU2VEA1zSIKSSpKszRLRWwHzzRZXvK632u+uXzvsvw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@floating-ui/core@1.6.2': + resolution: {integrity: sha512-+2XpQV9LLZeanU4ZevzRnGFg2neDeKHgFLjP6YLW+tly0IvrhqT4u8enLGjLH3qeh85g19xY5rsAusfwTdn5lg==} + + '@floating-ui/dom@1.1.1': + resolution: {integrity: sha512-TpIO93+DIujg3g7SykEAGZMDtbJRrmnYRCNYSjJlvIbGhBjRSNTLVbNeDQBrzy9qDgUbiWdc7KA0uZHZ2tJmiw==} + + '@floating-ui/utils@0.2.2': + resolution: {integrity: sha512-J4yDIIthosAsRZ5CPYP/jQvUAQtlZTTD/4suA08/FEnlxqW3sKS9iAhgsa9VYLZ6vDHn/ixJgIqRQPotoBjxIw==} + '@humanwhocodes/module-importer@1.0.1': resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} engines: {node: '>=12.22'} @@ -2578,9 +2596,18 @@ packages: '@shikijs/core@1.6.3': resolution: {integrity: sha512-QnJKHFUW95GnlJLJGP6QLx4M69HM0KlXk+R2Y8lr/x4nAx1Yb/lsuxq4XwybuUjTxbJk+BT0g/kvn0bcsjGGHg==} + '@shikijs/core@1.6.4': + resolution: {integrity: sha512-WTU9rzZae1p2v6LOxMf6LhtmZOkIHYYW160IuahUyJy7YXPPjyWZLR1ag+SgD22ZMxZtz1gfU6Tccc8t0Il/XA==} + '@shikijs/transformers@1.6.2': resolution: {integrity: sha512-ndqTWyHnxmsLkowhKWTam26opw8hg5a34y6FAUG/Xf6E49n3MM//nenKxXiWpPYkNPl1KZnYXB1k+Ia46wjOZg==} + '@shikijs/twoslash@1.6.4': + resolution: {integrity: sha512-Ap3XQK3f2cGOaASx0qr//9+jpbJb/iuxAa1LYnayHntWnDDEXZBqaF7eA9iHO/tBv0Q+a/kDhS3MSHZw29sDSg==} + + '@shikijs/vitepress-twoslash@1.6.4': + resolution: {integrity: sha512-q7VmagXuouQQh52O3Kr9i6yBzZyIqGpO5czu+v0YJ+seLkVKosGjs0e7q5uq2utTQTuGs/LdDv/x0If8CdHZ7w==} + '@sigstore/bundle@2.3.2': resolution: {integrity: sha512-wueKWDk70QixNLB363yHc2D2ItTgYiMTdPwK8D9dKQMR3ZQ0c35IxP5xnwQ8cNLoCgCRcHf14kE+CLIvNX1zmA==} engines: {node: ^16.14.0 || >=18.0.0} @@ -2777,6 +2804,9 @@ packages: resolution: {integrity: sha512-7syYk4MzjxTEk0g/w3iqtgxnFQspDJfn6QKD36xMuuhTzjcxY7F8EmBLnALjVyaOF1/bVocu3bS/2/F7rXrveQ==} engines: {node: ^18.18.0 || >=20.0.0} + '@typescript/vfs@1.5.0': + resolution: {integrity: sha512-AJS307bPgbsZZ9ggCT3wwpg3VbTKMFNHfaY/uF0ahSkYYrPF2dSSKDNIDIQAHm9qJqbLvCsSJH7yN4Vs/CsMMg==} + '@ungap/structured-clone@1.2.0': resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} @@ -4213,6 +4243,15 @@ packages: resolution: {integrity: sha512-9UbaD6XdAL97+k/n+N7JwX46K/M6Zc6KcFYskrYL8wbBV/Uyk0CTAMY0VT+qiK5PM7AIc9aTWYtq65U7T+aCNQ==} engines: {node: '>=8'} + floating-vue@5.2.2: + resolution: {integrity: sha512-afW+h2CFafo+7Y9Lvw/xsqjaQlKLdJV7h1fCHfcYQ1C4SVMlu7OAekqWgu5d4SgvkBVU0pVpLlVsrSTBURFRkg==} + peerDependencies: + '@nuxt/kit': ^3.2.0 + vue: ^3.2.0 + peerDependenciesMeta: + '@nuxt/kit': + optional: true + focus-trap@7.5.4: resolution: {integrity: sha512-N7kHdlgsO/v+iD/dMoJKtsSqs5Dz/dXZVebRgJw23LDk+jMi/974zyiOYDziY2JPp8xivq9BmUGwIJMiuSBi7w==} @@ -5077,6 +5116,9 @@ packages: mdast-util-to-hast@13.1.0: resolution: {integrity: sha512-/e2l/6+OdGp/FB+ctrJ9Avz71AN/GRH3oi/3KAx/kMnoUsD6q0woXlDT8lLEeViVKE7oZxE7RXzvO3T8kF2/sA==} + mdast-util-to-hast@13.2.0: + resolution: {integrity: sha512-QGYKEuUsYT9ykKBCMOEDLsU5JRObWQusAolFMeko/tYPufNkRffBAQjIE+99jbA87xv6FgmjLtwjh9wBWajwAA==} + mdast-util-to-markdown@2.1.0: resolution: {integrity: sha512-SR2VnIEdVNCJbP6y7kVTJgPLifdr8WEU440fQec7qHoHOUz/oJ2jmNRqdDQ3rbiStOXb2mCDGTuwsK5OPUgYlQ==} @@ -6009,6 +6051,9 @@ packages: shiki@1.6.3: resolution: {integrity: sha512-lE1/YGlzFY0hQSyEfsZj18xGrTWxyhFQkaiILALqTBZPbJeYFWpbUhlmTGPOupYB/qC+H6sV4UznJzcEh3WMHQ==} + shiki@1.6.4: + resolution: {integrity: sha512-X88chM7w8jnadoZtjPTi5ahCJx9pc9f8GfEkZAEYUTlcUZIEw2D/RY86HI/LkkE7Nj8TQWkiBfaFTJ3VJT6ESg==} + side-channel@1.0.6: resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==} engines: {node: '>= 0.4'} @@ -6404,6 +6449,19 @@ packages: resolution: {integrity: sha512-GwIJau9XaA8nLVbUXsN3IlFi7WmQ48gBUrl3FTkkL/XLu/POhBzfmX9hd33FNMX1qAsfl6ozO1iMmW9NC8YniA==} engines: {node: ^16.14.0 || >=18.0.0} + twoslash-protocol@0.2.8: + resolution: {integrity: sha512-8l439jrFEJiQmQ6ugFtYXgHpQDp3nBYVF6RR88doLarFGWhjfq0sgntgQYc2aDmJb87Jzhh4EicV8k9DrqpIZg==} + + twoslash-vue@0.2.8: + resolution: {integrity: sha512-46I4TA0FNquQ++AKc2mKS8EV7ElQEP34dGi7T9mQm7y1/r5HH16zmq+Er9LUtomasFLue+Jb87B+qElbF2yYMw==} + peerDependencies: + typescript: '*' + + twoslash@0.2.8: + resolution: {integrity: sha512-mQiUB4SvBF58FJkEEtXvVhTO1h0oDpTZuEAyaC8xwf4P6392ydSFhsMiUBbJEOvaelN9DLesViopn3E9O2GKOA==} + peerDependencies: + typescript: '*' + type-check@0.4.0: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} @@ -7258,7 +7316,7 @@ snapshots: '@vitejs/plugin-vue-jsx': 3.1.0(vite@5.2.13(@types/node@20.14.2)(less@4.2.0)(terser@5.31.0))(vue@3.4.27(typescript@5.4.5)) '@vue/compiler-sfc': 3.4.27 astro: 4.10.1(@types/node@20.14.2)(less@4.2.0)(terser@5.31.0)(typescript@5.4.5) - vite-plugin-vue-devtools: 7.2.1(rollup@4.18.0)(vite@5.2.13(@types/node@20.14.2)(less@4.2.0)(terser@5.31.0))(vue@3.4.27(typescript@5.4.5)) + vite-plugin-vue-devtools: 7.2.1(@nuxt/kit@3.11.2(rollup@4.18.0))(rollup@4.18.0)(vite@5.2.13(@types/node@20.14.2)(less@4.2.0)(terser@5.31.0))(vue@3.4.27(typescript@5.4.5)) vue: 3.4.27(typescript@5.4.5) transitivePeerDependencies: - '@nuxt/kit' @@ -8413,6 +8471,16 @@ snapshots: '@eslint/object-schema@2.1.3': {} + '@floating-ui/core@1.6.2': + dependencies: + '@floating-ui/utils': 0.2.2 + + '@floating-ui/dom@1.1.1': + dependencies: + '@floating-ui/core': 1.6.2 + + '@floating-ui/utils@0.2.2': {} + '@humanwhocodes/module-importer@1.0.1': {} '@humanwhocodes/retry@0.3.0': {} @@ -8743,13 +8811,13 @@ snapshots: rc9: 2.1.2 semver: 7.6.2 - '@nuxt/devtools@1.3.3(@unocss/reset@0.60.4)(rollup@4.18.0)(unocss@0.60.4(rollup@4.18.0)(vite@5.2.13(@types/node@20.14.2)(less@4.2.0)(terser@5.31.0)))(vite@5.2.13(@types/node@20.14.2)(less@4.2.0)(terser@5.31.0))(vue@3.4.27(typescript@5.4.5))': + '@nuxt/devtools@1.3.3(@unocss/reset@0.60.4)(floating-vue@5.2.2(@nuxt/kit@3.11.2(rollup@4.18.0))(vue@3.4.27(typescript@5.4.5)))(rollup@4.18.0)(unocss@0.60.4(rollup@4.18.0)(vite@5.2.13(@types/node@20.14.2)(less@4.2.0)(terser@5.31.0)))(vite@5.2.13(@types/node@20.14.2)(less@4.2.0)(terser@5.31.0))(vue@3.4.27(typescript@5.4.5))': dependencies: '@antfu/utils': 0.7.8 '@nuxt/devtools-kit': 1.3.3(rollup@4.18.0)(vite@5.2.13(@types/node@20.14.2)(less@4.2.0)(terser@5.31.0)) '@nuxt/devtools-wizard': 1.3.3 '@nuxt/kit': 3.11.2(rollup@4.18.0) - '@vue/devtools-applet': 7.1.3(@unocss/reset@0.60.4)(unocss@0.60.4(rollup@4.18.0)(vite@5.2.13(@types/node@20.14.2)(less@4.2.0)(terser@5.31.0)))(vite@5.2.13(@types/node@20.14.2)(less@4.2.0)(terser@5.31.0))(vue@3.4.27(typescript@5.4.5)) + '@vue/devtools-applet': 7.1.3(@unocss/reset@0.60.4)(floating-vue@5.2.2(@nuxt/kit@3.11.2(rollup@4.18.0))(vue@3.4.27(typescript@5.4.5)))(unocss@0.60.4(rollup@4.18.0)(vite@5.2.13(@types/node@20.14.2)(less@4.2.0)(terser@5.31.0)))(vite@5.2.13(@types/node@20.14.2)(less@4.2.0)(terser@5.31.0))(vue@3.4.27(typescript@5.4.5)) '@vue/devtools-core': 7.1.3(vite@5.2.13(@types/node@20.14.2)(less@4.2.0)(terser@5.31.0))(vue@3.4.27(typescript@5.4.5)) '@vue/devtools-kit': 7.1.3(vue@3.4.27(typescript@5.4.5)) birpc: 0.2.17 @@ -9043,10 +9111,36 @@ snapshots: '@shikijs/core@1.6.3': {} + '@shikijs/core@1.6.4': {} + '@shikijs/transformers@1.6.2': dependencies: shiki: 1.6.2 + '@shikijs/twoslash@1.6.4(typescript@5.4.5)': + dependencies: + '@shikijs/core': 1.6.4 + twoslash: 0.2.8(typescript@5.4.5) + transitivePeerDependencies: + - supports-color + - typescript + + '@shikijs/vitepress-twoslash@1.6.4(@nuxt/kit@3.11.2(rollup@4.18.0))(typescript@5.4.5)': + dependencies: + '@shikijs/twoslash': 1.6.4(typescript@5.4.5) + floating-vue: 5.2.2(@nuxt/kit@3.11.2(rollup@4.18.0))(vue@3.4.27(typescript@5.4.5)) + mdast-util-from-markdown: 2.0.1 + mdast-util-gfm: 3.0.0 + mdast-util-to-hast: 13.2.0 + shiki: 1.6.4 + twoslash: 0.2.8(typescript@5.4.5) + twoslash-vue: 0.2.8(typescript@5.4.5) + vue: 3.4.27(typescript@5.4.5) + transitivePeerDependencies: + - '@nuxt/kit' + - supports-color + - typescript + '@sigstore/bundle@2.3.2': dependencies: '@sigstore/protobuf-specs': 0.3.2 @@ -9307,6 +9401,12 @@ snapshots: '@typescript-eslint/types': 7.11.0 eslint-visitor-keys: 3.4.3 + '@typescript/vfs@1.5.0': + dependencies: + debug: 4.3.5 + transitivePeerDependencies: + - supports-color + '@ungap/structured-clone@1.2.0': {} '@unocss/astro@0.60.4(rollup@4.18.0)(vite@5.2.13(@types/node@20.14.2)(less@4.2.0)(terser@5.31.0))': @@ -9735,12 +9835,12 @@ snapshots: transitivePeerDependencies: - vue - '@vue/devtools-applet@7.1.3(@unocss/reset@0.60.4)(unocss@0.60.4(rollup@4.18.0)(vite@5.2.13(@types/node@20.14.2)(less@4.2.0)(terser@5.31.0)))(vite@5.2.13(@types/node@20.14.2)(less@4.2.0)(terser@5.31.0))(vue@3.4.27(typescript@5.4.5))': + '@vue/devtools-applet@7.1.3(@unocss/reset@0.60.4)(floating-vue@5.2.2(@nuxt/kit@3.11.2(rollup@4.18.0))(vue@3.4.27(typescript@5.4.5)))(unocss@0.60.4(rollup@4.18.0)(vite@5.2.13(@types/node@20.14.2)(less@4.2.0)(terser@5.31.0)))(vite@5.2.13(@types/node@20.14.2)(less@4.2.0)(terser@5.31.0))(vue@3.4.27(typescript@5.4.5))': dependencies: '@vue/devtools-core': 7.2.1(vite@5.2.13(@types/node@20.14.2)(less@4.2.0)(terser@5.31.0))(vue@3.4.27(typescript@5.4.5)) '@vue/devtools-kit': 7.2.1(vue@3.4.27(typescript@5.4.5)) '@vue/devtools-shared': 7.2.1 - '@vue/devtools-ui': 7.2.1(@unocss/reset@0.60.4)(unocss@0.60.4(rollup@4.18.0)(vite@5.2.13(@types/node@20.14.2)(less@4.2.0)(terser@5.31.0)))(vue@3.4.27(typescript@5.4.5)) + '@vue/devtools-ui': 7.2.1(@unocss/reset@0.60.4)(floating-vue@5.2.2(@nuxt/kit@3.11.2(rollup@4.18.0))(vue@3.4.27(typescript@5.4.5)))(unocss@0.60.4(rollup@4.18.0)(vite@5.2.13(@types/node@20.14.2)(less@4.2.0)(terser@5.31.0)))(vue@3.4.27(typescript@5.4.5)) lodash-es: 4.17.21 perfect-debounce: 1.0.0 shiki: 1.3.0 @@ -9811,7 +9911,7 @@ snapshots: dependencies: rfdc: 1.3.1 - '@vue/devtools-ui@7.2.1(@unocss/reset@0.60.4)(unocss@0.60.4(rollup@4.18.0)(vite@5.2.13(@types/node@20.14.2)(less@4.2.0)(terser@5.31.0)))(vue@3.4.27(typescript@5.4.5))': + '@vue/devtools-ui@7.2.1(@unocss/reset@0.60.4)(floating-vue@5.2.2(@nuxt/kit@3.11.2(rollup@4.18.0))(vue@3.4.27(typescript@5.4.5)))(unocss@0.60.4(rollup@4.18.0)(vite@5.2.13(@types/node@20.14.2)(less@4.2.0)(terser@5.31.0)))(vue@3.4.27(typescript@5.4.5))': dependencies: '@unocss/reset': 0.60.4 '@vue/devtools-shared': 7.2.1 @@ -9819,6 +9919,7 @@ snapshots: '@vueuse/core': 10.10.0(vue@3.4.27(typescript@5.4.5)) '@vueuse/integrations': 10.10.0(focus-trap@7.5.4)(vue@3.4.27(typescript@5.4.5)) colord: 2.9.3 + floating-vue: 5.2.2(@nuxt/kit@3.11.2(rollup@4.18.0))(vue@3.4.27(typescript@5.4.5)) focus-trap: 7.5.4 unocss: 0.60.4(rollup@4.18.0)(vite@5.2.13(@types/node@20.14.2)(less@4.2.0)(terser@5.31.0)) vue: 3.4.27(typescript@5.4.5) @@ -11257,6 +11358,14 @@ snapshots: flattie@1.1.1: {} + floating-vue@5.2.2(@nuxt/kit@3.11.2(rollup@4.18.0))(vue@3.4.27(typescript@5.4.5)): + dependencies: + '@floating-ui/dom': 1.1.1 + vue: 3.4.27(typescript@5.4.5) + vue-resize: 2.0.0-alpha.1(vue@3.4.27(typescript@5.4.5)) + optionalDependencies: + '@nuxt/kit': 3.11.2(rollup@4.18.0) + focus-trap@7.5.4: dependencies: tabbable: 6.2.0 @@ -12199,6 +12308,18 @@ snapshots: unist-util-visit: 5.0.0 vfile: 6.0.1 + mdast-util-to-hast@13.2.0: + dependencies: + '@types/hast': 3.0.4 + '@types/mdast': 4.0.4 + '@ungap/structured-clone': 1.2.0 + devlop: 1.1.0 + micromark-util-sanitize-uri: 2.0.0 + trim-lines: 3.0.1 + unist-util-position: 5.0.0 + unist-util-visit: 5.0.0 + vfile: 6.0.1 + mdast-util-to-markdown@2.1.0: dependencies: '@types/mdast': 4.0.4 @@ -13352,6 +13473,10 @@ snapshots: dependencies: '@shikijs/core': 1.6.3 + shiki@1.6.4: + dependencies: + '@shikijs/core': 1.6.4 + side-channel@1.0.6: dependencies: call-bind: 1.0.7 @@ -13766,6 +13891,25 @@ snapshots: transitivePeerDependencies: - supports-color + twoslash-protocol@0.2.8: {} + + twoslash-vue@0.2.8(typescript@5.4.5): + dependencies: + '@vue/language-core': 2.0.21(typescript@5.4.5) + twoslash: 0.2.8(typescript@5.4.5) + twoslash-protocol: 0.2.8 + typescript: 5.4.5 + transitivePeerDependencies: + - supports-color + + twoslash@0.2.8(typescript@5.4.5): + dependencies: + '@typescript/vfs': 1.5.0 + twoslash-protocol: 0.2.8 + typescript: 5.4.5 + transitivePeerDependencies: + - supports-color + type-check@0.4.0: dependencies: prelude-ls: 1.2.1 @@ -14215,7 +14359,7 @@ snapshots: - '@types/babel__core' - supports-color - vite-plugin-vue-devtools@7.2.1(rollup@4.18.0)(vite@5.2.13(@types/node@20.14.2)(less@4.2.0)(terser@5.31.0))(vue@3.4.27(typescript@5.4.5)): + vite-plugin-vue-devtools@7.2.1(@nuxt/kit@3.11.2(rollup@4.18.0))(rollup@4.18.0)(vite@5.2.13(@types/node@20.14.2)(less@4.2.0)(terser@5.31.0))(vue@3.4.27(typescript@5.4.5)): dependencies: '@vue/devtools-core': 7.2.1(vite@5.2.13(@types/node@20.14.2)(less@4.2.0)(terser@5.31.0))(vue@3.4.27(typescript@5.4.5)) '@vue/devtools-kit': 7.2.1(vue@3.4.27(typescript@5.4.5))