From 961fffd6c907dd2fa2995e207b337c13c99b977d Mon Sep 17 00:00:00 2001 From: Evan You Date: Sat, 6 May 2023 11:38:15 +0800 Subject: [PATCH 001/633] update aircode url --- .vitepress/theme/components/TextAd.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vitepress/theme/components/TextAd.vue b/.vitepress/theme/components/TextAd.vue index 26d302e56d..99277171db 100644 --- a/.vitepress/theme/components/TextAd.vue +++ b/.vitepress/theme/components/TextAd.vue @@ -8,7 +8,7 @@ function track() {
Ad Date: Sat, 6 May 2023 16:51:48 +0800 Subject: [PATCH 002/633] update text ad --- .vitepress/theme/components/TextAd.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vitepress/theme/components/TextAd.vue b/.vitepress/theme/components/TextAd.vue index 99277171db..22d52b6d6d 100644 --- a/.vitepress/theme/components/TextAd.vue +++ b/.vitepress/theme/components/TextAd.vue @@ -12,7 +12,7 @@ function track() { target="_blank" rel="noopener nofollow" @click="track" - >Build a ChatGPT bot with JavaScript in 5 minutesBuild and deploy your own ChatGPT bot with JavaScript in 5 minutes
From fc10afd827547295d323e51f2610b4a1a2ad9baf Mon Sep 17 00:00:00 2001 From: Evan You Date: Wed, 10 May 2023 13:56:38 +0100 Subject: [PATCH 003/633] update text ad --- .vitepress/theme/components/TextAd.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vitepress/theme/components/TextAd.vue b/.vitepress/theme/components/TextAd.vue index 22d52b6d6d..320e82a411 100644 --- a/.vitepress/theme/components/TextAd.vue +++ b/.vitepress/theme/components/TextAd.vue @@ -12,7 +12,7 @@ function track() { target="_blank" rel="noopener nofollow" @click="track" - >Build and deploy your own ChatGPT bot with JavaScript in 5 minutesTry it → Build and deploy your own ChatGPT bot with JavaScript in 5 minutes From 615cb39ef1413c86d3937eaed41b1b99c93a07e4 Mon Sep 17 00:00:00 2001 From: Evan You Date: Wed, 10 May 2023 17:31:37 +0100 Subject: [PATCH 004/633] update tighten email --- src/partners/partners.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/partners/partners.json b/src/partners/partners.json index 351ea1aa45..0ad48298c0 100644 --- a/src/partners/partners.json +++ b/src/partners/partners.json @@ -118,7 +118,7 @@ "text": "tighten.com", "url": "https://tighten.com/vue" }, - "contact": "keith.damiani@tighten.co", + "contact": "hello@tighten.co", "platinum": true }, { From b778c75189fc55352e7b543b5a15c7c9df9084cb Mon Sep 17 00:00:00 2001 From: Andrew <44983823+andrewvasilchuk@users.noreply.github.com> Date: Thu, 11 May 2023 10:50:21 +0300 Subject: [PATCH 005/633] docs: change the outdated option for end-to-end testing (#2351) The latest version (`3.6.1`) of `create-vue` allows to select the end-to-end testing framework, suggesting 2 options: Cypress and Playwright --- src/guide/quick-start.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/guide/quick-start.md b/src/guide/quick-start.md index b5ccd4d27b..0b168b8315 100644 --- a/src/guide/quick-start.md +++ b/src/guide/quick-start.md @@ -34,7 +34,7 @@ This command will install and execute [create-vue](https://github.com/vuejs/crea Add Vue Router for Single Page Application development? No / Yes Add Pinia for state management? No / Yes Add Vitest for Unit testing? No / Yes - Add Cypress for both Unit and End-to-End testing? No / Yes + Add an End-to-End Testing Solution? No / Cypress / Playwright Add ESLint for code quality? No / Yes Add Prettier for code formatting? No / Yes From 3b2469f97038924f9a0a130c96d8512e64069b50 Mon Sep 17 00:00:00 2001 From: PMolnes <72920187+PMolnes@users.noreply.github.com> Date: Thu, 11 May 2023 09:53:59 +0200 Subject: [PATCH 006/633] fix: non-case sensitive filtering (#2362) --- src/guide/built-ins/transition-demos/ListStagger.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/guide/built-ins/transition-demos/ListStagger.vue b/src/guide/built-ins/transition-demos/ListStagger.vue index d8be0a11f7..9fef135f34 100644 --- a/src/guide/built-ins/transition-demos/ListStagger.vue +++ b/src/guide/built-ins/transition-demos/ListStagger.vue @@ -13,7 +13,7 @@ const list = [ const query = ref('') const computedList = computed(() => { - return list.filter((item) => item.msg.toLowerCase().includes(query.value)) + return list.filter((item) => item.msg.toLowerCase().includes(query.value.toLowerCase())) }) function onBeforeEnter(el) { From 9c081ac461e2efcd666d4f497f687d797b987945 Mon Sep 17 00:00:00 2001 From: Evan You Date: Mon, 1 May 2023 15:11:39 +0800 Subject: [PATCH 007/633] 3.3: update sfc macro external type limitation --- src/api/sfc-script-setup.md | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/api/sfc-script-setup.md b/src/api/sfc-script-setup.md index 546087ec1f..8059eef35d 100644 --- a/src/api/sfc-script-setup.md +++ b/src/api/sfc-script-setup.md @@ -288,14 +288,7 @@ const emit = defineEmits<{ - In prod mode, the compiler will generate the array format declaration to reduce bundle size (the props here will be compiled into `['foo', 'bar']`) - - The emitted code is still TypeScript with valid typing, which can be further processed by other tools. - -- As of now, the type declaration argument must be one of the following to ensure correct static analysis: - - - A type literal - - A reference to an interface or a type literal in the same file - - Currently complex types and type imports from other files are not supported. It is possible to support type imports in the future. +- In versions 3.2 and below, the type parameter is limited to either a type literal or a reference to a local type. This limitation has been removed in 3.3. Starting in 3.3, Vue is able to infer runtime props from most common types, including externally imported ones. ### Default props values when using type declaration {#default-props-values-when-using-type-declaration} From fc83501ea7fb0f62e32455f5f3404b37ce7c767e Mon Sep 17 00:00:00 2001 From: Evan You Date: Mon, 1 May 2023 15:26:46 +0800 Subject: [PATCH 008/633] 3.3: jsx changes --- src/guide/extras/render-function.md | 12 +++++++++++- src/guide/typescript/overview.md | 4 ++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/guide/extras/render-function.md b/src/guide/extras/render-function.md index 12659a9889..510180a6a1 100644 --- a/src/guide/extras/render-function.md +++ b/src/guide/extras/render-function.md @@ -239,6 +239,16 @@ Although first introduced by React, JSX actually has no defined runtime semantic Vue's type definition also provides type inference for TSX usage. When using TSX, make sure to specify `"jsx": "preserve"` in `tsconfig.json` so that TypeScript leaves the JSX syntax intact for Vue JSX transform to process. +### JSX Type Inference + +Similar to the transform, Vue's JSX also needs different type definitions. Currently, Vue's types automatically registers Vue's JSX types globally. This means TSX will work out of the box when Vue's type is available. + +The global JSX types may cause conflict with used together with other libraries that also needs JSX type inference, in particular React. Starting in 3.3, Vue supports specifying JSX namespace via TypeScript's [jsxImportSource](https://www.typescriptlang.org/tsconfig#jsxImportSource) option. We plan to remove the default global JSX namespace registration in 3.4. + +For TSX users, it is suggested to set [jsxImportSource](https://www.typescriptlang.org/tsconfig#jsxImportSource) to `'vue'` in `tsconfig.json` after upgrading to 3.3, or opt-in per file with `/* @jsxImportSource vue */`. This will allow you to opt-in to the new behavior now and upgrade seamlessly when 3.4 releases. + +If there is code that depends on the presence of the global `JSX` namespace, you can retain the exact pre-3.4 global behavior by explicitly referencing `vue/jsx`, which registers the global `JSX` namespace. + ## Render Function Recipes {#render-function-recipes} Below we will provide some common recipes for implementing template features as their equivalent render functions / JSX. @@ -669,7 +679,7 @@ export default {
-With the Options API, template refs are created by passing the ref name as a string in the vnode props: +With the Options API, template refs are created by passing the ref name as a string in the vnode props: ```js export default { diff --git a/src/guide/typescript/overview.md b/src/guide/typescript/overview.md index 6a7ee7c40d..f934331a18 100644 --- a/src/guide/typescript/overview.md +++ b/src/guide/typescript/overview.md @@ -208,6 +208,10 @@ let x: string | number = 1 If using Vue CLI or a webpack-based setup, TypeScript in template expressions requires `vue-loader@^16.8.0`. ::: +### Usage with TSX + +Vue also supports authoring components with JSX / TSX. Details are covered in the [Render Function & JSX](/guide/extras/render-function.html#jsx-tsx) guide. + ## API-Specific Recipes {#api-specific-recipes} - [TS with Composition API](./composition-api) From 4d31a8876045621dd729e9370dafaba83dc9a9ed Mon Sep 17 00:00:00 2001 From: Evan You Date: Mon, 1 May 2023 15:49:24 +0800 Subject: [PATCH 009/633] 3.3: generic components --- src/api/general.md | 59 +++++++++++++++++++++++++++++++- src/api/sfc-script-setup.md | 29 ++++++++++++++++ src/guide/typescript/overview.md | 11 ++++++ 3 files changed, 98 insertions(+), 1 deletion(-) diff --git a/src/api/general.md b/src/api/general.md index 358de62ec9..16990804da 100644 --- a/src/api/general.md +++ b/src/api/general.md @@ -101,9 +101,16 @@ A type helper for defining a Vue component with type inference. - **Type** ```ts + // options syntax function defineComponent( - component: ComponentOptions | ComponentOptions['setup'] + component: ComponentOptions ): ComponentConstructor + + // function syntax (requires 3.3+) + function defineComponent( + setup: ComponentOptions['setup'], + extraOptions?: ComponentOptions + ): () => any ``` > Type is simplified for readability. @@ -122,6 +129,56 @@ A type helper for defining a Vue component with type inference. type FooInstance = InstanceType ``` + ### Function Signature {#function-signature} + + `defineComponent()` also has an alternative signature that is meant to be used with Composition API and [render functions or JSX](/guide/extras/render-function.html). + + Instead of passing in an options object, a function is expected instead. This function works the same as the Composition API [`setup()`](/api/composition-api-setup.html#composition-api-setup) function: it receives the props and the setup context. The return value should be a render function - both `h()` and JSX are supported: + + ```js + import { ref, h } from 'vue' + + const Comp = defineComponent( + (props) => { + // use Composition API here like in +``` + +The value of `generic` works exactly the same as the parameter list between `<...>` in TypeScript. For example, you can use multiple parameters, `extends` constraints, default types, or reference imported types: + +```vue + +``` + ## Restrictions {#restrictions} Due to the difference in module execution semantics, code inside ` +``` + +- Only supported in 3.3+. +- This is a macro. The options will be hoisted to module scope and cannot access local variables in ` +``` + +- Only supported in 3.3+. + ## `useSlots()` & `useAttrs()` {#useslots-useattrs} Usage of `slots` and `attrs` inside ` ``` When `toRef` is used with component props, the usual restrictions around mutating the props still apply. Attempting to assign a new value to the ref is equivalent to trying to modify the prop directly and is not allowed. In that scenario you may want to consider using [`computed`](./reactivity-core#computed) with `get` and `set` instead. See the guide to [using `v-model` with components](/guide/components/v-model) for more information. - `toRef()` will return a usable ref even if the source property doesn't currently exist. This makes it possible to work with optional properties, which wouldn't be picked up by [`toRefs`](#torefs). + When using the object property signature, `toRef()` will return a usable ref even if the source property doesn't currently exist. This makes it possible to work with optional properties, which wouldn't be picked up by [`toRefs`](#torefs). ## toRefs() {#torefs} From 8bcbf1a0562bde580356e0225ddd7e16b2d54e73 Mon Sep 17 00:00:00 2001 From: Evan You Date: Mon, 1 May 2023 17:17:02 +0800 Subject: [PATCH 015/633] 3.3: toValue --- src/api/reactivity-utilities.md | 37 +++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/src/api/reactivity-utilities.md b/src/api/reactivity-utilities.md index b5c308c5e5..7732864fce 100644 --- a/src/api/reactivity-utilities.md +++ b/src/api/reactivity-utilities.md @@ -132,6 +132,43 @@ Can also be used to create a ref for a property on a source reactive object. The When using the object property signature, `toRef()` will return a usable ref even if the source property doesn't currently exist. This makes it possible to work with optional properties, which wouldn't be picked up by [`toRefs`](#torefs). +## toValue() {#tovalue} + +Normalizes values / refs / getters to values. This is similar to [unref()](#unref), except that it also normalizes getters. If the argument is a getter, it will be invoked and its return value will be returned. + +This can be used in [Composables](/guide/reusability/composables.html) to normalize an argument that can be either a value, a ref, or a getter. + +- **Type** + + ```ts + function toValue(source: T | Ref | (() => T)): T + ``` + +- **Example** + + ```js + toValue(1) // --> 1 + toValue(ref(1)) // --> 1 + toValue(() => 1) // --> 1 + ``` + + Normalizing arguments in composables: + + ```ts + import type { MaybeRefOrGetter } from 'vue' + + function useFeature(id: MaybeRefOrGetter) { + watch(() => toValue(id), id => { + // react to id changes + }) + } + + // this composable supports any of the following: + useFeature(1) + useFeature(ref(1)) + useFeature(() => 1) + ``` + ## toRefs() {#torefs} Converts a reactive object to a plain object where each property of the resulting object is a ref pointing to the corresponding property of the original object. Each individual ref is created using [`toRef()`](#toref). From da8c449a9cfff9fda796093dff7d1c97a1ca2c05 Mon Sep 17 00:00:00 2001 From: Evan You Date: Mon, 1 May 2023 17:46:15 +0800 Subject: [PATCH 016/633] 3.3: app.runWithContext --- src/api/application.md | 147 +++++++++++++++++++++++++---------------- 1 file changed, 89 insertions(+), 58 deletions(-) diff --git a/src/api/application.md b/src/api/application.md index fc1b57c977..b8ecfae2a8 100644 --- a/src/api/application.md +++ b/src/api/application.md @@ -90,64 +90,6 @@ Unmounts a mounted application instance, triggering the unmount lifecycle hooks } ``` -## app.provide() {#app-provide} - -Provide a value that can be injected in all descendant components within the application. - -- **Type** - - ```ts - interface App { - provide(key: InjectionKey | symbol | string, value: T): this - } - ``` - -- **Details** - - Expects the injection key as the first argument, and the provided value as the second. Returns the application instance itself. - -- **Example** - - ```js - import { createApp } from 'vue' - - const app = createApp(/* ... */) - - app.provide('message', 'hello') - ``` - - Inside a component in the application: - -
- - ```js - import { inject } from 'vue' - - export default { - setup() { - console.log(inject('message')) // 'hello' - } - } - ``` - -
-
- - ```js - export default { - inject: ['message'], - created() { - console.log(this.message) // 'hello' - } - } - ``` - -
- -- **See also:** - - [Provide / Inject](/guide/components/provide-inject) - - [App-level Provide](/guide/components/provide-inject#app-level-provide) - ## app.component() {#app-component} Registers a global component if passing both a name string and a component definition, or retrieves an already registered one if only the name is passed. @@ -270,6 +212,95 @@ For logic reuse, prefer [Composables](/guide/reusability/composables) instead. } ``` +## app.provide() {#app-provide} + +Provide a value that can be injected in all descendant components within the application. + +- **Type** + + ```ts + interface App { + provide(key: InjectionKey | symbol | string, value: T): this + } + ``` + +- **Details** + + Expects the injection key as the first argument, and the provided value as the second. Returns the application instance itself. + +- **Example** + + ```js + import { createApp } from 'vue' + + const app = createApp(/* ... */) + + app.provide('message', 'hello') + ``` + + Inside a component in the application: + +
+ + ```js + import { inject } from 'vue' + + export default { + setup() { + console.log(inject('message')) // 'hello' + } + } + ``` + +
+
+ + ```js + export default { + inject: ['message'], + created() { + console.log(this.message) // 'hello' + } + } + ``` + +
+ +- **See also:** + - [Provide / Inject](/guide/components/provide-inject) + - [App-level Provide](/guide/components/provide-inject#app-level-provide) + - [app.runWithContext()](#app-runwithcontext) + +## app.runWithContext() {#app-runwithcontext} + +Execute a callback with the current app as injection context. + +- **Type** + + ```ts + interface App { + runWithContext(fn: () => T): T + } + ``` + +- **Details** + + Expects a callback function and runs the callback immediately. During the synchronous call of the callback, `inject()` calls are able to look up injections from the values provided by the current app, even when there is no current active component instance. The return value of the callback will also be returned. + +- **Example** + + ```js + import { inject } from 'vue' + + app.provide('id', 1) + + const injected = app.runWithContext(() => { + return inject('id') + }) + + console.log(injected) // 1 + ``` + ## app.version {#app-version} Provides the version of Vue that the application was created with. This is useful inside [plugins](/guide/reusability/plugins), where you might need conditional logic based on different Vue versions. From 4e2658532279a9366b2b3534c8260dd0e2491014 Mon Sep 17 00:00:00 2001 From: Evan You Date: Tue, 2 May 2023 15:59:07 +0800 Subject: [PATCH 017/633] 3.3: utility types --- src/api/utility-types.md | 83 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 78 insertions(+), 5 deletions(-) diff --git a/src/api/utility-types.md b/src/api/utility-types.md index 42c0557430..5535b5535a 100644 --- a/src/api/utility-types.md +++ b/src/api/utility-types.md @@ -32,6 +32,78 @@ Used to annotate a prop with more advanced types when using runtime props declar - **See also:** [Guide - Typing Component Props](/guide/typescript/options-api#typing-component-props) +## MaybeRef\ {#mayberef} + +Alias for `T | Ref`. Useful for annotating arguments of [Composables](/guide/reusability/composables.html). + +- Only supported in 3.3+. + +## MaybeRefOrGetter\ {#maybereforgetter} + +Alias for `T | Ref | (() => T)`. Useful for annotating arguments of [Composables](/guide/reusability/composables.html). + +- Only supported in 3.3+. + +## ExtractPropTypes\ {#extractproptypes} + +Extract prop types from a runtime props options object. The extracted types are internal facing - i.e. the resolved props received by the component. This means boolean props and props with default values are always defined, even if they are not required. + +To extract public facing props, i.e. props that the parent is allowed to pass, use [`ExtractPublicPropTypes`](#extractpublicproptypes). + +- **Example** + + ```ts + const propsOptions = { + foo: String, + bar: Boolean, + baz: { + type: Number, + required: true + }, + qux: { + type: Number, + default: 1 + } + } as const + + type Props = ExtractPropTypes + // { + // foo?: string, + // bar: boolean, + // baz: number, + // qux: number + // } + ``` + +## ExtractPublicPropTypes\ {#extractpublicproptypes} + +Extract prop types from a runtime props options object. The extracted types are public facing - i.e. the props that the parent is allowed to pass. + +- **Example** + + ```ts + const propsOptions = { + foo: String, + bar: Boolean, + baz: { + type: Number, + required: true + }, + qux: { + type: Number, + default: 1 + } + } as const + + type Props = ExtractPublicPropTypes + // { + // foo?: string, + // bar?: boolean, + // baz: number, + // qux?: number + // } + ``` + ## ComponentCustomProperties {#componentcustomproperties} Used to augment the component instance type to support custom global properties. @@ -121,15 +193,16 @@ Used to augment allowed values in style property bindings. ```tsx
``` + ```html -
+
``` - :::tip - Augmentations must be placed in a module `.ts` or `.d.ts` file. See [Type Augmentation Placement](/guide/typescript/options-api#augmenting-global-properties) for more details. - ::: +:::tip +Augmentations must be placed in a module `.ts` or `.d.ts` file. See [Type Augmentation Placement](/guide/typescript/options-api#augmenting-global-properties) for more details. +::: - :::info See also +:::info See also SFC ` diff --git a/.vitepress/theme/index.ts b/.vitepress/theme/index.ts index a1943d0fbb..512ce8eeca 100644 --- a/.vitepress/theme/index.ts +++ b/.vitepress/theme/index.ts @@ -9,14 +9,14 @@ import { } from './components/preferences' import SponsorsAside from './components/SponsorsAside.vue' import VueSchoolLink from './components/VueSchoolLink.vue' -import Banner from './components/Banner.vue' +// import Banner from './components/Banner.vue' import TextAd from './components/TextAd.vue' export default Object.assign({}, VPTheme, { Layout: () => { // @ts-ignore return h(VPTheme.Layout, null, { - banner: () => h(Banner), + // banner: () => h(Banner), 'sidebar-top': () => h(PreferenceSwitch), 'aside-mid': () => h(SponsorsAside) }) From e5671d23b44dba4896eb0171f82c54873cf75efa Mon Sep 17 00:00:00 2001 From: Evan You Date: Mon, 29 May 2023 07:11:28 -0400 Subject: [PATCH 028/633] remove text ad --- .vitepress/config.ts | 5 +++-- .vitepress/theme/index.ts | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.vitepress/config.ts b/.vitepress/config.ts index eaf6631720..b992d6b053 100644 --- a/.vitepress/config.ts +++ b/.vitepress/config.ts @@ -4,7 +4,7 @@ import { defineConfigWithTheme } from 'vitepress' import type { Config as ThemeConfig } from '@vue/theme' import baseConfig from '@vue/theme/config' import { headerPlugin } from './headerMdPlugin' -import { textAdPlugin } from './textAdMdPlugin' +// import { textAdPlugin } from './textAdMdPlugin' const nav: ThemeConfig['nav'] = [ { @@ -678,7 +678,8 @@ export default defineConfigWithTheme({ markdown: { config(md) { - md.use(headerPlugin).use(textAdPlugin) + md.use(headerPlugin) + // .use(textAdPlugin) } }, diff --git a/.vitepress/theme/index.ts b/.vitepress/theme/index.ts index 512ce8eeca..7084831abc 100644 --- a/.vitepress/theme/index.ts +++ b/.vitepress/theme/index.ts @@ -10,7 +10,7 @@ import { import SponsorsAside from './components/SponsorsAside.vue' import VueSchoolLink from './components/VueSchoolLink.vue' // import Banner from './components/Banner.vue' -import TextAd from './components/TextAd.vue' +// import TextAd from './components/TextAd.vue' export default Object.assign({}, VPTheme, { Layout: () => { @@ -26,6 +26,6 @@ export default Object.assign({}, VPTheme, { app.provide('prefer-sfc', preferSFC) app.provide('filter-headers', filterHeadersByPreference) app.component('VueSchoolLink', VueSchoolLink) - app.component('TextAd', TextAd) + // app.component('TextAd', TextAd) } }) From 02d0f702ec0b1a88e117875e6ab844d23b7f1dc4 Mon Sep 17 00:00:00 2001 From: yoshipi Date: Wed, 31 May 2023 00:33:26 +0900 Subject: [PATCH 029/633] docs: Fix broken URL for restricted list of globals (#2388) (#2389) --- src/guide/essentials/template-syntax.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/guide/essentials/template-syntax.md b/src/guide/essentials/template-syntax.md index 761f1daca1..eb2eb799d7 100644 --- a/src/guide/essentials/template-syntax.md +++ b/src/guide/essentials/template-syntax.md @@ -162,7 +162,7 @@ Functions called inside binding expressions will be called every time the compon ### Restricted Globals Access {#restricted-globals-access} -Template expressions are sandboxed and only have access to a [restricted list of globals](https://github.com/vuejs/core/blob/main/packages/shared/src/globalsWhitelist.ts#L3). The list exposes commonly used built-in globals such as `Math` and `Date`. +Template expressions are sandboxed and only have access to a [restricted list of globals](https://github.com/vuejs/core/blob/main/packages/shared/src/globalsAllowList.ts#L3). The list exposes commonly used built-in globals such as `Math` and `Date`. Globals not explicitly included in the list, for example user-attached properties on `window`, will not be accessible in template expressions. You can, however, explicitly define additional globals for all Vue expressions by adding them to [`app.config.globalProperties`](/api/application#app-config-globalproperties). From 173d5073e5f4b1239fcb84a3bf32291a05b284b4 Mon Sep 17 00:00:00 2001 From: wxsm Date: Wed, 31 May 2023 23:41:50 +0800 Subject: [PATCH 030/633] add missing anchor (#2373) --- src/guide/extras/render-function.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/guide/extras/render-function.md b/src/guide/extras/render-function.md index 510180a6a1..335d9ff5e5 100644 --- a/src/guide/extras/render-function.md +++ b/src/guide/extras/render-function.md @@ -239,7 +239,7 @@ Although first introduced by React, JSX actually has no defined runtime semantic Vue's type definition also provides type inference for TSX usage. When using TSX, make sure to specify `"jsx": "preserve"` in `tsconfig.json` so that TypeScript leaves the JSX syntax intact for Vue JSX transform to process. -### JSX Type Inference +### JSX Type Inference {#jsx-type-inference} Similar to the transform, Vue's JSX also needs different type definitions. Currently, Vue's types automatically registers Vue's JSX types globally. This means TSX will work out of the box when Vue's type is available. From 6671688ababc8c55e6706f58ee2e0e9ab739597b Mon Sep 17 00:00:00 2001 From: Jun Shindo <46585162+jay-es@users.noreply.github.com> Date: Thu, 1 Jun 2023 00:42:03 +0900 Subject: [PATCH 031/633] fix: removed anchor (#2374) --- src/guide/components/props.md | 2 +- src/guide/extras/reactivity-transform.md | 2 +- src/guide/typescript/overview.md | 4 ---- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/guide/components/props.md b/src/guide/components/props.md index 609d3796ca..4d0adc5d78 100644 --- a/src/guide/components/props.md +++ b/src/guide/components/props.md @@ -494,7 +494,7 @@ When prop validation fails, Vue will produce a console warning (if using the dev
-If using [Type-based props declarations](/api/sfc-script-setup#typescript-only-features) , Vue will try its best to compile the type annotations into equivalent runtime prop declarations. For example, `defineProps<{ msg: string }>` will be compiled into `{ msg: { type: String, required: true }}`. +If using [Type-based props declarations](/api/sfc-script-setup#type-only-props-emit-declarations) , Vue will try its best to compile the type annotations into equivalent runtime prop declarations. For example, `defineProps<{ msg: string }>` will be compiled into `{ msg: { type: String, required: true }}`.
diff --git a/src/guide/extras/reactivity-transform.md b/src/guide/extras/reactivity-transform.md index 2cabbc3824..1e4e363c4a 100644 --- a/src/guide/extras/reactivity-transform.md +++ b/src/guide/extras/reactivity-transform.md @@ -111,7 +111,7 @@ There are two pain points with the current `defineProps()` usage in ` + + + ``` +
- **See also:** [Fallthrough Attributes](/guide/components/attrs) diff --git a/src/guide/components/attrs.md b/src/guide/components/attrs.md index 38e5292027..9ffbad0b98 100644 --- a/src/guide/components/attrs.md +++ b/src/guide/components/attrs.md @@ -92,6 +92,17 @@ export default { +``` + + Since 3.3 you can also use `defineOptions` directly in ` ```
diff --git a/src/guide/extras/composition-api-faq.md b/src/guide/extras/composition-api-faq.md index 34155668fc..b30522e720 100644 --- a/src/guide/extras/composition-api-faq.md +++ b/src/guide/extras/composition-api-faq.md @@ -108,6 +108,12 @@ Options API does allow you to "think less" when writing component code, which is Yes in terms of stateful logic. When using Composition API, there are only a few options that may still be needed: `props`, `emits`, `name`, and `inheritAttrs`. If using ` ``` -`useFetch()` takes a static URL string as input - so it performs the fetch only once and is then done. What if we want it to re-fetch whenever the URL changes? We can achieve that by also accepting refs as an argument: +### Accepting Reactive State {#accepting-reactive-state} + +`useFetch()` takes a static URL string as input - so it performs the fetch only once and is then done. What if we want it to re-fetch whenever the URL changes? In order to achieve this, we need to pass reactive state into the composable function, and let the composable create watchers that perform actions using the passed state. + +For example, `useFetch()` should be able to accept a ref: + +```js +const url = ref('/initial-url') + +const { data, error } = useFetch(url) + +// this should trigger a re-fetch +url.value = '/new-url' +``` + +Or, accept a getter function: + +```js +// re-fetch when props.id changes +const { data, error } = useFetch(() => `/posts/${props.id}`) +``` + +We can refactor our existing implementation with the [`watchEffect()`](/api/reactivity-core.html#watcheffect) and [`toValue()`](/api/reactivity-utilities.html#tovalue) APIs: ```js // fetch.js -import { ref, isRef, unref, watchEffect } from 'vue' +import { ref, watchEffect, toValue } from 'vue' export function useFetch(url) { const data = ref(null) const error = ref(null) - function doFetch() { + watchEffect(() => { // reset state before fetching.. data.value = null error.value = null - // unref() unwraps potential refs - fetch(unref(url)) + // toValue() unwraps potential refs or getters + fetch(toValue(url)) .then((res) => res.json()) .then((json) => (data.value = json)) .catch((err) => (error.value = err)) - } - - if (isRef(url)) { - // setup reactive re-fetch if input URL is a ref - watchEffect(doFetch) - } else { - // otherwise, just fetch once - // and avoid the overhead of a watcher - doFetch() - } + }) return { data, error } } ``` -This version of `useFetch()` now accepts both static URL strings and refs of URL strings. When it detects that the URL is a dynamic ref using [`isRef()`](/api/reactivity-utilities#isref), it sets up a reactive effect using [`watchEffect()`](/api/reactivity-core#watcheffect). The effect will run immediately and will also track the URL ref as a dependency. Whenever the URL ref changes, the data will be reset and fetched again. +`toValue()` is an API added in 3.3. It is designed to normalize refs or getters into values. If the argument is a ref, it returns the ref's value; if the argument is a function, it will call the function and return its return value. Otherwise, it returns the argument as-is. It works similarly to [`unref()`](/api/reactivity-utilities.html#unref), but with special treatment for functions. + +Notice that `toValue(url)` is called **inside** the `watchEffect` callback. This ensures that any reactive dependencies accessed during the `toValue()` normalization are tracked by the watcher. -Here's [the updated version of `useFetch()`](https://play.vuejs.org/#eNptVMFu2zAM/RXOl7hYancYdgnSYAO2nTZsKLadfFFsulHrSIYkJwuC/PtISnbdrpc4ksjH9x4pnbNPfV8cBsxW2drXTvcBPIah31RG73vrApzBYbuE2u77IWADF2id3cOCkhazoMHjVwz1bjovynGrePAUWZnaGh9gqzz+dh3cwmIXQu9XZfngrek7VePOdg26Ipx6XdsGCypaBttYXxJATNcNZRKjfPFucTVuDoI3UszzK7jdTIXeUk5xUN2AFD9mnKFRQS0BnbNuSYDBnYj67aQjJ0yKX5fRFfKDFgH3xDMgrQC+WdVAb4XTijfW2yEEa+Bw3Vp3W2UatIEPVQYf607Xj7zD5HWVbc5n0HC5rMuYIuhVWDf6QNm6pVAhRpEMTND95oft/Rv4wtuApGIwAR02KyAsCS726L26R8HlBkpi4jRREKWEe8ffWX0KLal8/Bd5YOcxkmGvKOczfaAj2Vx23TtkHXwWS9L6VYwNO6XNfVEU4/m6nKzMltlsUGgOn8+d9nf8GYysjorCvrQt1uHFIFYG/0peO5g6aJL8rJNwZlKx98I4DpEZOu7yeCI+Pj/iQ+VPpn4CbmzETaAAZUkZdG3AB1IEW6T+I7QcJLJjFJeNc0gVGD1ux979vz+Htt0BIexQBj2GMqWds8YOvjuBt6DDwkNwqn6kS6o8qAmgwR5NQzNzgu1pbmEu0kfxhP0nsRC30w144sJXJCkWXOWCbnWtVUclOnUC4qpMQz2Jw0uRVSD3jkoHCHqPdkgleZsAYpkrOOqu4ys4OCMqaTep1G3UpXiPr0gqbSnMHbWPrsRYQdlyNgOJCdfaJwEhaiQvSV5kJP1hkaKaWy3oz9oUIymLRtOa0a8L1Gwi5DiNwMs+YorkD/3wh7TkMs1i7Hx45MWlKormixrt8Fq4iXpDTxr8vvtGF2F0gbPmXUzzKOQuwDduhj05tYSHgRyIyNbUieE0zDOmqRWvvZGrMYFjJfyVQajMdFemtkdKCdngEX7S5SVaeZ7mmws8kBx5uxN/MuZXAohv+uQ2m/ldhV0RJ45ON3BTvJ/1g4sJ8Ni1l+bEEC6ZMx95WfPFXZxgWS2unlJTP5fw/uYmekW/l+zyD/mIah0=), with an artificial delay and randomized error for demo purposes. +This version of `useFetch()` now accepts static URL strings, refs, and getters, making it much more flexible. The watch effect will run immediately, and will track any dependencies accessed during `toValue(url)`. If no dependencies are tracked (e.g. url is already a string), the effect runs only once; otherwise, it will re-run whenever a tracked dependency changes. + +Here's [the updated version of `useFetch()`](https://play.vuejs.org/#eNptVMFu2zAM/RXOFztYZncodgmSYAPWnTZsKLadfFFsulHrSIZEJwuC/PtIyXaTtkALxxT5yPf45FPypevyfY/JIln6yumOwCP13bo0etdZR3ACh80cKrvresIaztA4u4OUi9KLpN7jN6RqO53nxRjKHz1nlqayxhNslMc/roUVpFuizi+K4tFb07Wqwq1ta3Q5HTtd2RpzblqQra0vGCCW65oreaIs/ZjOxmAf8MYRs2wGq/XU6D3X5HvV9sj5Y8UJakVqDuicdXMGJHfk0VcTj4wxOX9ZRFVYD34h3PGchPwG8N2qGjobZlpIYLnpiayB/YfGulWZaNAGPpUJfK5aXT1JRIbXZbI+nUDD+bwsYklAL2lZ6z1X64ZTw2CcKcAM3a1/2s6/gzsJAzKL3hA6rBfAWCE536H36gEDriwwFA4zTSMEpox7L8+L/pxacPv4K86Brcc4jGjFNV/5AS3TlrbLzqHwkLPYkt/fxFiLUto85Hk+ni+LScpknlwYhX147buD4oO7psGK5kD2r+zxhQdLg/9CSdObijSzvVoinGSeuPYwbPSP6VtZ8HgSJHx5JP8XA2TKH00F0V4BFaAouISvDHhiNrBB3j1CI90D5ZglfaMHuYXAx3Dc2+v4JbRt9wi0xWDymCpTbJ01tvftEbwFTakHcqp64guqPKgJoMYOTc1+OcLmeMUlEBzZM3ZUdjVqPPj/eRq5IAPngKwc6UZXWrXcpFVH4GmVqXkt0boiHwGog9IEpHdo+6GphBmgN6L1DA66beUC9s4EnhwdeOomMlMSkwsytLac5g7aR11ibkDZSLUABRk+aD8QoMiS1WSCcaKwISEZ2MqXIaBfLSpmchUb05pRsTNUIiNkOFjr9SZxyJTHOXx1YGR49eGRDP4rzRt6lmay86Re7DcgGTzAL74GrEOWDUaRL9kjb/fSoWzO3wPAlXNB9M1+KNrmcXF8uoab/PaCljQLwCN5oS93+jpFWmYyT/g8Zel9NEJ4S2fPpYMsc7i9uQlREeecnP8DWEwr0Q==), with an artificial delay and randomized error for demo purposes. ## Conventions and Best Practices {#conventions-and-best-practices} @@ -230,19 +247,21 @@ It is a convention to name composable functions with camelCase names that start ### Input Arguments {#input-arguments} -A composable can accept ref arguments even if it doesn't rely on them for reactivity. If you are writing a composable that may be used by other developers, it's a good idea to handle the case of input arguments being refs instead of raw values. The [`unref()`](/api/reactivity-utilities#unref) utility function will come in handy for this purpose: +A composable can accept ref or getter arguments even if it doesn't rely on them for reactivity. If you are writing a composable that may be used by other developers, it's a good idea to handle the case of input arguments being refs or getters instead of raw values. The [`toValue()`](/api/reactivity-utilities#tovalue) utility function will come in handy for this purpose: ```js -import { unref } from 'vue' +import { toValue } from 'vue' -function useFeature(maybeRef) { +function useFeature(maybeRefOrGetter) { // if maybeRef is indeed a ref, its .value will be returned // otherwise, maybeRef is returned as-is - const value = unref(maybeRef) + const value = toValue(maybeRefOrGetter) } ``` -If your composable creates reactive effects when the input is a ref, make sure to either explicitly watch the ref with `watch()`, or call `unref()` inside a `watchEffect()` so that it is properly tracked. +If your composable creates reactive effects when the input is a ref or a getter, make sure to either explicitly watch the ref / getter with `watch()`, or call `toValue()` inside a `watchEffect()` so that it is properly tracked. + +The [useFetch() implementation discussed earlier](#accepting-reactive-state) provides a concrete example of a composable that accepts refs, getters and plain values as input argument. ### Return Values {#return-values} From 226d98c4245adadb2b2bccecda0537e3071c7a00 Mon Sep 17 00:00:00 2001 From: Evan You Date: Thu, 8 Jun 2023 11:28:08 +0800 Subject: [PATCH 038/633] update embed restriction headers --- src/public/_headers | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/public/_headers b/src/public/_headers index d56075af67..c81a76d6c1 100644 --- a/src/public/_headers +++ b/src/public/_headers @@ -1,5 +1,6 @@ /* - X-Frame-Options: DENY + X-Frame-Options: ALLOW-FROM https://staging.certification.vuejs.org https://certification.vuejs.org https://certificates.dev https://staging.certificates.dev + Content-Security-Policy: frame-ancestors https://staging.certification.vuejs.org https://certification.vuejs.org https://certificates.dev https://staging.certificates.dev /assets/* cache-control: max-age=31536000 From 4e815850879a736b01baee86f637f6101e648843 Mon Sep 17 00:00:00 2001 From: Evan You Date: Thu, 8 Jun 2023 21:11:41 +0800 Subject: [PATCH 039/633] minor tweaks --- src/guide/reusability/composables.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/guide/reusability/composables.md b/src/guide/reusability/composables.md index 27fdd2fc1e..1e8be09fbb 100644 --- a/src/guide/reusability/composables.md +++ b/src/guide/reusability/composables.md @@ -208,7 +208,7 @@ const { data, error } = useFetch(() => `/posts/${props.id}`) We can refactor our existing implementation with the [`watchEffect()`](/api/reactivity-core.html#watcheffect) and [`toValue()`](/api/reactivity-utilities.html#tovalue) APIs: -```js +```js{8,13} // fetch.js import { ref, watchEffect, toValue } from 'vue' @@ -253,8 +253,9 @@ A composable can accept ref or getter arguments even if it doesn't rely on them import { toValue } from 'vue' function useFeature(maybeRefOrGetter) { - // if maybeRef is indeed a ref, its .value will be returned - // otherwise, maybeRef is returned as-is + // If maybeRefOrGetter is a ref or a getter, + // its normalized value will be returned. + // Otherwise, it is returned as-is. const value = toValue(maybeRefOrGetter) } ``` From 2c9ba2dec9593883c8cfd6636399b3a3ba23c50e Mon Sep 17 00:00:00 2001 From: Evan You Date: Fri, 9 Jun 2023 10:33:31 +0800 Subject: [PATCH 040/633] bump deps --- package.json | 6 +- pnpm-lock.yaml | 565 ++++++++++++++++++++++++++++++++----------------- 2 files changed, 372 insertions(+), 199 deletions(-) diff --git a/package.json b/package.json index 63f9d19d13..f92bd8084c 100644 --- a/package.json +++ b/package.json @@ -10,11 +10,11 @@ }, "dependencies": { "@vue/repl": "^1.3.3", - "@vue/theme": "^2.2.2", + "@vue/theme": "^2.2.3", "dynamics.js": "^1.1.5", "gsap": "^3.9.0", - "vitepress": "^1.0.0-alpha.74", - "vue": "^3.2.47" + "vitepress": "^1.0.0-beta.1", + "vue": "^3.3.4" }, "devDependencies": { "@types/markdown-it": "^12.2.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 84c08e7bbc..e9eff263b2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -3,10 +3,10 @@ lockfileVersion: '6.0' dependencies: '@vue/repl': specifier: ^1.3.3 - version: 1.3.3(vue@3.2.47) + version: 1.3.3(vue@3.3.4) '@vue/theme': - specifier: ^2.2.2 - version: 2.2.2(vitepress@1.0.0-alpha.74)(vue@3.2.47) + specifier: ^2.2.3 + version: 2.2.3(vitepress@1.0.0-beta.1)(vue@3.3.4) dynamics.js: specifier: ^1.1.5 version: 1.1.5 @@ -14,11 +14,11 @@ dependencies: specifier: ^3.9.0 version: 3.9.0 vitepress: - specifier: ^1.0.0-alpha.74 - version: 1.0.0-alpha.74(@types/node@16.10.3)(terser@5.14.2) + specifier: ^1.0.0-beta.1 + version: 1.0.0-beta.1(@types/node@16.10.3)(search-insights@2.6.0)(terser@5.14.2) vue: - specifier: ^3.2.47 - version: 3.2.47 + specifier: ^3.3.4 + version: 3.3.4 devDependencies: '@types/markdown-it': @@ -39,6 +39,29 @@ packages: '@algolia/autocomplete-shared': 1.7.4 dev: false + /@algolia/autocomplete-core@1.9.2(algoliasearch@4.10.5)(search-insights@2.6.0): + resolution: {integrity: sha512-hkG80c9kx9ClVAEcUJbTd2ziVC713x9Bji9Ty4XJfKXlxlsx3iXsoNhAwfeR4ulzIUg7OE5gez0UU1zVDdG7kg==} + dependencies: + '@algolia/autocomplete-plugin-algolia-insights': 1.9.2(algoliasearch@4.10.5)(search-insights@2.6.0) + '@algolia/autocomplete-shared': 1.9.2(algoliasearch@4.10.5) + transitivePeerDependencies: + - '@algolia/client-search' + - algoliasearch + - search-insights + dev: false + + /@algolia/autocomplete-plugin-algolia-insights@1.9.2(algoliasearch@4.10.5)(search-insights@2.6.0): + resolution: {integrity: sha512-2LVsf4W66hVHQ3Ua/8k15oPlxjELCztbAkQm/hP42Sw+GLkHAdY1vaVRYziaWq64+Oljfg6FKkZHCdgXH+CGIA==} + peerDependencies: + search-insights: '>= 1 < 3' + dependencies: + '@algolia/autocomplete-shared': 1.9.2(algoliasearch@4.10.5) + search-insights: 2.6.0 + transitivePeerDependencies: + - '@algolia/client-search' + - algoliasearch + dev: false + /@algolia/autocomplete-preset-algolia@1.7.4(algoliasearch@4.10.5): resolution: {integrity: sha512-s37hrvLEIfcmKY8VU9LsAXgm2yfmkdHT3DnA3SgHaY93yjZ2qL57wzb5QweVkYuEBZkT2PIREvRoLXC2sxTbpQ==} peerDependencies: @@ -52,10 +75,35 @@ packages: algoliasearch: 4.10.5 dev: false + /@algolia/autocomplete-preset-algolia@1.9.2(algoliasearch@4.10.5): + resolution: {integrity: sha512-pqgIm2GNqtCT59Y1ICctIPrYTi34+wNPiNWEclD/yDzp5uDUUsyGe5XrUjCNyQRTKonAlmYxoaEHOn8FWgmBHA==} + peerDependencies: + '@algolia/client-search': '>= 4.9.1 < 6' + algoliasearch: '>= 4.9.1 < 6' + peerDependenciesMeta: + '@algolia/client-search': + optional: true + dependencies: + '@algolia/autocomplete-shared': 1.9.2(algoliasearch@4.10.5) + algoliasearch: 4.10.5 + dev: false + /@algolia/autocomplete-shared@1.7.4: resolution: {integrity: sha512-2VGCk7I9tA9Ge73Km99+Qg87w0wzW4tgUruvWAn/gfey1ZXgmxZtyIRBebk35R1O8TbK77wujVtCnpsGpRy1kg==} dev: false + /@algolia/autocomplete-shared@1.9.2(algoliasearch@4.10.5): + resolution: {integrity: sha512-XxX6YDn+7LG+SmdpXEOnj7fc3TjiVpQ0CbGhjLwrd2tYr6LVY2D4Iiu/iuYJ4shvVDWWnpwArSk0uIWC/8OPUA==} + peerDependencies: + '@algolia/client-search': '>= 4.9.1 < 6' + algoliasearch: '>= 4.9.1 < 6' + peerDependenciesMeta: + '@algolia/client-search': + optional: true + dependencies: + algoliasearch: 4.10.5 + dev: false + /@algolia/cache-browser-local-storage@4.10.5: resolution: {integrity: sha512-cfX2rEKOtuuljcGI5DMDHClwZHdDqd2nT2Ohsc8aHtBiz6bUxKVyIqxr2gaC6tU8AgPtrTVBzcxCA+UavXpKww==} dependencies: @@ -151,8 +199,8 @@ packages: engines: {node: '>=6.9.0'} dev: false - /@babel/parser@7.16.4: - resolution: {integrity: sha512-6V0qdPUaiVHH3RtZeLIsc+6pDhbYzHR8ogA8w+f+Wc77DuXto19g2QUwveINoS34Uw+W8/hQDGJCx+i4n7xcng==} + /@babel/parser@7.22.5: + resolution: {integrity: sha512-DFZMC9LJUG9PLOclRC32G63UXwzqS2koQC8dkx+PLdmt1xSePYpbT/NbsrJy8Q/muXz7o/h/d4A7Fuyixm559Q==} engines: {node: '>=6.0.0'} hasBin: true dependencies: @@ -171,6 +219,10 @@ packages: resolution: {integrity: sha512-6SCwI7P8ao+se1TUsdZ7B4XzL+gqeQZnBc+2EONZlcVa0dVrk0NjETxozFKgMv0eEGH8QzP1fkN+A1rH61l4eg==} dev: false + /@docsearch/css@3.5.0: + resolution: {integrity: sha512-Ob5FQLubplcBNihAVtriR59FRBeP8u69F6mu4L4yIr60KfsPc10bOV0DoPErJw0zF9IBN2cNLW9qdmt8zWPxyg==} + dev: false + /@docsearch/js@3.3.3: resolution: {integrity: sha512-2xAv2GFuHzzmG0SSZgf8wHX0qZX8n9Y1ZirKUk5Wrdc+vH9CL837x2hZIUdwcPZI9caBA+/CzxsS68O4waYjUQ==} dependencies: @@ -183,6 +235,19 @@ packages: - react-dom dev: false + /@docsearch/js@3.5.0(search-insights@2.6.0): + resolution: {integrity: sha512-WqB+z+zVKSXDkGq028nClT9RvMzfFlemZuIulX5ZwWkdUtl4k7M9cmZA/c6kuZf7FG24XQsMHWuBjeUo9hLRyA==} + dependencies: + '@docsearch/react': 3.5.0(search-insights@2.6.0) + preact: 10.5.14 + transitivePeerDependencies: + - '@algolia/client-search' + - '@types/react' + - react + - react-dom + - search-insights + dev: false + /@docsearch/react@3.3.3: resolution: {integrity: sha512-pLa0cxnl+G0FuIDuYlW+EBK6Rw2jwLw9B1RHIeS4N4s2VhsfJ/wzeCi3CWcs5yVfxLd5ZK50t//TMA5e79YT7Q==} peerDependencies: @@ -205,8 +270,31 @@ packages: - '@algolia/client-search' dev: false - /@esbuild/android-arm64@0.17.18: - resolution: {integrity: sha512-/iq0aK0eeHgSC3z55ucMAHO05OIqmQehiGay8eP5l/5l+iEr4EIbh4/MI8xD9qRFjqzgkc0JkX0LculNC9mXBw==} + /@docsearch/react@3.5.0(search-insights@2.6.0): + resolution: {integrity: sha512-3IG8mmSMzSHNGy2S1VuPyYU9tFCxFpj5Ov8SYwsSHM4yMvFsaO9oFxXocA5lSenliIELhuOuS5+BdxHa/Qlf2A==} + peerDependencies: + '@types/react': '>= 16.8.0 < 19.0.0' + react: '>= 16.8.0 < 19.0.0' + react-dom: '>= 16.8.0 < 19.0.0' + peerDependenciesMeta: + '@types/react': + optional: true + react: + optional: true + react-dom: + optional: true + dependencies: + '@algolia/autocomplete-core': 1.9.2(algoliasearch@4.10.5)(search-insights@2.6.0) + '@algolia/autocomplete-preset-algolia': 1.9.2(algoliasearch@4.10.5) + '@docsearch/css': 3.5.0 + algoliasearch: 4.10.5 + transitivePeerDependencies: + - '@algolia/client-search' + - search-insights + dev: false + + /@esbuild/android-arm64@0.17.19: + resolution: {integrity: sha512-KBMWvEZooR7+kzY0BtbTQn0OAYY7CsiydT63pVEaPtVYF0hXbUaOyZog37DKxK7NF3XacBJOpYT4adIJh+avxA==} engines: {node: '>=12'} cpu: [arm64] os: [android] @@ -214,8 +302,8 @@ packages: dev: false optional: true - /@esbuild/android-arm@0.17.18: - resolution: {integrity: sha512-EmwL+vUBZJ7mhFCs5lA4ZimpUH3WMAoqvOIYhVQwdIgSpHC8ImHdsRyhHAVxpDYUSm0lWvd63z0XH1IlImS2Qw==} + /@esbuild/android-arm@0.17.19: + resolution: {integrity: sha512-rIKddzqhmav7MSmoFCmDIb6e2W57geRsM94gV2l38fzhXMwq7hZoClug9USI2pFRGL06f4IOPHHpFNOkWieR8A==} engines: {node: '>=12'} cpu: [arm] os: [android] @@ -223,8 +311,8 @@ packages: dev: false optional: true - /@esbuild/android-x64@0.17.18: - resolution: {integrity: sha512-x+0efYNBF3NPW2Xc5bFOSFW7tTXdAcpfEg2nXmxegm4mJuVeS+i109m/7HMiOQ6M12aVGGFlqJX3RhNdYM2lWg==} + /@esbuild/android-x64@0.17.19: + resolution: {integrity: sha512-uUTTc4xGNDT7YSArp/zbtmbhO0uEEK9/ETW29Wk1thYUJBz3IVnvgEiEwEa9IeLyvnpKrWK64Utw2bgUmDveww==} engines: {node: '>=12'} cpu: [x64] os: [android] @@ -232,8 +320,8 @@ packages: dev: false optional: true - /@esbuild/darwin-arm64@0.17.18: - resolution: {integrity: sha512-6tY+djEAdF48M1ONWnQb1C+6LiXrKjmqjzPNPWXhu/GzOHTHX2nh8Mo2ZAmBFg0kIodHhciEgUBtcYCAIjGbjQ==} + /@esbuild/darwin-arm64@0.17.19: + resolution: {integrity: sha512-80wEoCfF/hFKM6WE1FyBHc9SfUblloAWx6FJkFWTWiCoht9Mc0ARGEM47e67W9rI09YoUxJL68WHfDRYEAvOhg==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] @@ -241,8 +329,8 @@ packages: dev: false optional: true - /@esbuild/darwin-x64@0.17.18: - resolution: {integrity: sha512-Qq84ykvLvya3dO49wVC9FFCNUfSrQJLbxhoQk/TE1r6MjHo3sFF2tlJCwMjhkBVq3/ahUisj7+EpRSz0/+8+9A==} + /@esbuild/darwin-x64@0.17.19: + resolution: {integrity: sha512-IJM4JJsLhRYr9xdtLytPLSH9k/oxR3boaUIYiHkAawtwNOXKE8KoU8tMvryogdcT8AU+Bflmh81Xn6Q0vTZbQw==} engines: {node: '>=12'} cpu: [x64] os: [darwin] @@ -250,8 +338,8 @@ packages: dev: false optional: true - /@esbuild/freebsd-arm64@0.17.18: - resolution: {integrity: sha512-fw/ZfxfAzuHfaQeMDhbzxp9mc+mHn1Y94VDHFHjGvt2Uxl10mT4CDavHm+/L9KG441t1QdABqkVYwakMUeyLRA==} + /@esbuild/freebsd-arm64@0.17.19: + resolution: {integrity: sha512-pBwbc7DufluUeGdjSU5Si+P3SoMF5DQ/F/UmTSb8HXO80ZEAJmrykPyzo1IfNbAoaqw48YRpv8shwd1NoI0jcQ==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] @@ -259,8 +347,8 @@ packages: dev: false optional: true - /@esbuild/freebsd-x64@0.17.18: - resolution: {integrity: sha512-FQFbRtTaEi8ZBi/A6kxOC0V0E9B/97vPdYjY9NdawyLd4Qk5VD5g2pbWN2VR1c0xhzcJm74HWpObPszWC+qTew==} + /@esbuild/freebsd-x64@0.17.19: + resolution: {integrity: sha512-4lu+n8Wk0XlajEhbEffdy2xy53dpR06SlzvhGByyg36qJw6Kpfk7cp45DR/62aPH9mtJRmIyrXAS5UWBrJT6TQ==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] @@ -268,8 +356,8 @@ packages: dev: false optional: true - /@esbuild/linux-arm64@0.17.18: - resolution: {integrity: sha512-R7pZvQZFOY2sxUG8P6A21eq6q+eBv7JPQYIybHVf1XkQYC+lT7nDBdC7wWKTrbvMXKRaGudp/dzZCwL/863mZQ==} + /@esbuild/linux-arm64@0.17.19: + resolution: {integrity: sha512-ct1Tg3WGwd3P+oZYqic+YZF4snNl2bsnMKRkb3ozHmnM0dGWuxcPTTntAF6bOP0Sp4x0PjSF+4uHQ1xvxfRKqg==} engines: {node: '>=12'} cpu: [arm64] os: [linux] @@ -277,8 +365,8 @@ packages: dev: false optional: true - /@esbuild/linux-arm@0.17.18: - resolution: {integrity: sha512-jW+UCM40LzHcouIaqv3e/oRs0JM76JfhHjCavPxMUti7VAPh8CaGSlS7cmyrdpzSk7A+8f0hiedHqr/LMnfijg==} + /@esbuild/linux-arm@0.17.19: + resolution: {integrity: sha512-cdmT3KxjlOQ/gZ2cjfrQOtmhG4HJs6hhvm3mWSRDPtZ/lP5oe8FWceS10JaSJC13GBd4eH/haHnqf7hhGNLerA==} engines: {node: '>=12'} cpu: [arm] os: [linux] @@ -286,8 +374,8 @@ packages: dev: false optional: true - /@esbuild/linux-ia32@0.17.18: - resolution: {integrity: sha512-ygIMc3I7wxgXIxk6j3V00VlABIjq260i967Cp9BNAk5pOOpIXmd1RFQJQX9Io7KRsthDrQYrtcx7QCof4o3ZoQ==} + /@esbuild/linux-ia32@0.17.19: + resolution: {integrity: sha512-w4IRhSy1VbsNxHRQpeGCHEmibqdTUx61Vc38APcsRbuVgK0OPEnQ0YD39Brymn96mOx48Y2laBQGqgZ0j9w6SQ==} engines: {node: '>=12'} cpu: [ia32] os: [linux] @@ -295,8 +383,8 @@ packages: dev: false optional: true - /@esbuild/linux-loong64@0.17.18: - resolution: {integrity: sha512-bvPG+MyFs5ZlwYclCG1D744oHk1Pv7j8psF5TfYx7otCVmcJsEXgFEhQkbhNW8otDHL1a2KDINW20cfCgnzgMQ==} + /@esbuild/linux-loong64@0.17.19: + resolution: {integrity: sha512-2iAngUbBPMq439a+z//gE+9WBldoMp1s5GWsUSgqHLzLJ9WoZLZhpwWuym0u0u/4XmZ3gpHmzV84PonE+9IIdQ==} engines: {node: '>=12'} cpu: [loong64] os: [linux] @@ -304,8 +392,8 @@ packages: dev: false optional: true - /@esbuild/linux-mips64el@0.17.18: - resolution: {integrity: sha512-oVqckATOAGuiUOa6wr8TXaVPSa+6IwVJrGidmNZS1cZVx0HqkTMkqFGD2HIx9H1RvOwFeWYdaYbdY6B89KUMxA==} + /@esbuild/linux-mips64el@0.17.19: + resolution: {integrity: sha512-LKJltc4LVdMKHsrFe4MGNPp0hqDFA1Wpt3jE1gEyM3nKUvOiO//9PheZZHfYRfYl6AwdTH4aTcXSqBerX0ml4A==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] @@ -313,8 +401,8 @@ packages: dev: false optional: true - /@esbuild/linux-ppc64@0.17.18: - resolution: {integrity: sha512-3dLlQO+b/LnQNxgH4l9rqa2/IwRJVN9u/bK63FhOPB4xqiRqlQAU0qDU3JJuf0BmaH0yytTBdoSBHrb2jqc5qQ==} + /@esbuild/linux-ppc64@0.17.19: + resolution: {integrity: sha512-/c/DGybs95WXNS8y3Ti/ytqETiW7EU44MEKuCAcpPto3YjQbyK3IQVKfF6nbghD7EcLUGl0NbiL5Rt5DMhn5tg==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] @@ -322,8 +410,8 @@ packages: dev: false optional: true - /@esbuild/linux-riscv64@0.17.18: - resolution: {integrity: sha512-/x7leOyDPjZV3TcsdfrSI107zItVnsX1q2nho7hbbQoKnmoeUWjs+08rKKt4AUXju7+3aRZSsKrJtaRmsdL1xA==} + /@esbuild/linux-riscv64@0.17.19: + resolution: {integrity: sha512-FC3nUAWhvFoutlhAkgHf8f5HwFWUL6bYdvLc/TTuxKlvLi3+pPzdZiFKSWz/PF30TB1K19SuCxDTI5KcqASJqA==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] @@ -331,8 +419,8 @@ packages: dev: false optional: true - /@esbuild/linux-s390x@0.17.18: - resolution: {integrity: sha512-cX0I8Q9xQkL/6F5zWdYmVf5JSQt+ZfZD2bJudZrWD+4mnUvoZ3TDDXtDX2mUaq6upMFv9FlfIh4Gfun0tbGzuw==} + /@esbuild/linux-s390x@0.17.19: + resolution: {integrity: sha512-IbFsFbxMWLuKEbH+7sTkKzL6NJmG2vRyy6K7JJo55w+8xDk7RElYn6xvXtDW8HCfoKBFK69f3pgBJSUSQPr+4Q==} engines: {node: '>=12'} cpu: [s390x] os: [linux] @@ -340,8 +428,8 @@ packages: dev: false optional: true - /@esbuild/linux-x64@0.17.18: - resolution: {integrity: sha512-66RmRsPlYy4jFl0vG80GcNRdirx4nVWAzJmXkevgphP1qf4dsLQCpSKGM3DUQCojwU1hnepI63gNZdrr02wHUA==} + /@esbuild/linux-x64@0.17.19: + resolution: {integrity: sha512-68ngA9lg2H6zkZcyp22tsVt38mlhWde8l3eJLWkyLrp4HwMUr3c1s/M2t7+kHIhvMjglIBrFpncX1SzMckomGw==} engines: {node: '>=12'} cpu: [x64] os: [linux] @@ -349,8 +437,8 @@ packages: dev: false optional: true - /@esbuild/netbsd-x64@0.17.18: - resolution: {integrity: sha512-95IRY7mI2yrkLlTLb1gpDxdC5WLC5mZDi+kA9dmM5XAGxCME0F8i4bYH4jZreaJ6lIZ0B8hTrweqG1fUyW7jbg==} + /@esbuild/netbsd-x64@0.17.19: + resolution: {integrity: sha512-CwFq42rXCR8TYIjIfpXCbRX0rp1jo6cPIUPSaWwzbVI4aOfX96OXY8M6KNmtPcg7QjYeDmN+DD0Wp3LaBOLf4Q==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] @@ -358,8 +446,8 @@ packages: dev: false optional: true - /@esbuild/openbsd-x64@0.17.18: - resolution: {integrity: sha512-WevVOgcng+8hSZ4Q3BKL3n1xTv5H6Nb53cBrtzzEjDbbnOmucEVcZeGCsCOi9bAOcDYEeBZbD2SJNBxlfP3qiA==} + /@esbuild/openbsd-x64@0.17.19: + resolution: {integrity: sha512-cnq5brJYrSZ2CF6c35eCmviIN3k3RczmHz8eYaVlNasVqsNY+JKohZU5MKmaOI+KkllCdzOKKdPs762VCPC20g==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] @@ -367,8 +455,8 @@ packages: dev: false optional: true - /@esbuild/sunos-x64@0.17.18: - resolution: {integrity: sha512-Rzf4QfQagnwhQXVBS3BYUlxmEbcV7MY+BH5vfDZekU5eYpcffHSyjU8T0xucKVuOcdCsMo+Ur5wmgQJH2GfNrg==} + /@esbuild/sunos-x64@0.17.19: + resolution: {integrity: sha512-vCRT7yP3zX+bKWFeP/zdS6SqdWB8OIpaRq/mbXQxTGHnIxspRtigpkUcDMlSCOejlHowLqII7K2JKevwyRP2rg==} engines: {node: '>=12'} cpu: [x64] os: [sunos] @@ -376,8 +464,8 @@ packages: dev: false optional: true - /@esbuild/win32-arm64@0.17.18: - resolution: {integrity: sha512-Kb3Ko/KKaWhjeAm2YoT/cNZaHaD1Yk/pa3FTsmqo9uFh1D1Rfco7BBLIPdDOozrObj2sahslFuAQGvWbgWldAg==} + /@esbuild/win32-arm64@0.17.19: + resolution: {integrity: sha512-yYx+8jwowUstVdorcMdNlzklLYhPxjniHWFKgRqH7IFlUEa0Umu3KuYplf1HUZZ422e3NU9F4LGb+4O0Kdcaag==} engines: {node: '>=12'} cpu: [arm64] os: [win32] @@ -385,8 +473,8 @@ packages: dev: false optional: true - /@esbuild/win32-ia32@0.17.18: - resolution: {integrity: sha512-0/xUMIdkVHwkvxfbd5+lfG7mHOf2FRrxNbPiKWg9C4fFrB8H0guClmaM3BFiRUYrznVoyxTIyC/Ou2B7QQSwmw==} + /@esbuild/win32-ia32@0.17.19: + resolution: {integrity: sha512-eggDKanJszUtCdlVs0RB+h35wNlb5v4TWEkq4vZcmVt5u/HiDZrTXe2bWFQUez3RgNHwx/x4sk5++4NSSicKkw==} engines: {node: '>=12'} cpu: [ia32] os: [win32] @@ -394,8 +482,8 @@ packages: dev: false optional: true - /@esbuild/win32-x64@0.17.18: - resolution: {integrity: sha512-qU25Ma1I3NqTSHJUOKi9sAH1/Mzuvlke0ioMJRthLXKm7JiSKVwFghlGbDLOO2sARECGhja4xYfRAZNPAkooYg==} + /@esbuild/win32-x64@0.17.19: + resolution: {integrity: sha512-lAhycmKnVOuRYNtRtatQR1LPQf2oYCkRGkSFnseDAKPl8lu5SOsK/e1sXe5a0Pc5kHIHe6P2I/ilntNv2xf3cA==} engines: {node: '>=12'} cpu: [x64] os: [win32] @@ -456,123 +544,127 @@ packages: resolution: {integrity: sha512-oh8q2Zc32S6gd/j50GowEjKLoOVOwHP/bWVjKJInBwQqdOYMdPrf1oVlelTlyfFK3CKxL1uahMDAr+vy8T7yMQ==} dev: false - /@vitejs/plugin-vue@4.2.0(vite@4.3.1)(vue@3.2.47): - resolution: {integrity: sha512-hYaXFvEKEwyTmwHq2ft7GGeLBvyYLwTM3E5R1jpvzxg9gO4m5PQcTVvj1wEPKoPL8PAt+KAlxo3gyJWnmwzaWQ==} + /@types/web-bluetooth@0.0.17: + resolution: {integrity: sha512-4p9vcSmxAayx72yn70joFoL44c9MO/0+iVEBIQXe3v2h2SiAsEIo/G5v6ObFWvNKRFjbrVadNf9LqEEZeQPzdA==} + dev: false + + /@vitejs/plugin-vue@4.2.3(vite@4.3.9)(vue@3.3.4): + resolution: {integrity: sha512-R6JDUfiZbJA9cMiguQ7jxALsgiprjBeHL5ikpXfJCH62pPHtI+JdJ5xWj6Ev73yXSlYl86+blXn1kZHQ7uElxw==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: vite: ^4.0.0 vue: ^3.2.25 dependencies: - vite: 4.3.1(@types/node@16.10.3)(terser@5.14.2) - vue: 3.2.47 + vite: 4.3.9(@types/node@16.10.3)(terser@5.14.2) + vue: 3.3.4 dev: false - /@vue/compiler-core@3.2.47: - resolution: {integrity: sha512-p4D7FDnQb7+YJmO2iPEv0SQNeNzcbHdGByJDsT4lynf63AFkOTFN07HsiRSvjGo0QrxR/o3d0hUyNCUnBU2Tig==} + /@vue/compiler-core@3.3.4: + resolution: {integrity: sha512-cquyDNvZ6jTbf/+x+AgM2Arrp6G4Dzbb0R64jiG804HRMfRiFXWI6kqUVqZ6ZR0bQhIoQjB4+2bhNtVwndW15g==} dependencies: - '@babel/parser': 7.16.4 - '@vue/shared': 3.2.47 + '@babel/parser': 7.22.5 + '@vue/shared': 3.3.4 estree-walker: 2.0.2 - source-map: 0.6.1 + source-map-js: 1.0.2 dev: false - /@vue/compiler-dom@3.2.47: - resolution: {integrity: sha512-dBBnEHEPoftUiS03a4ggEig74J2YBZ2UIeyfpcRM2tavgMWo4bsEfgCGsu+uJIL/vax9S+JztH8NmQerUo7shQ==} + /@vue/compiler-dom@3.3.4: + resolution: {integrity: sha512-wyM+OjOVpuUukIq6p5+nwHYtj9cFroz9cwkfmP9O1nzH68BenTTv0u7/ndggT8cIQlnBeOo6sUT/gvHcIkLA5w==} dependencies: - '@vue/compiler-core': 3.2.47 - '@vue/shared': 3.2.47 + '@vue/compiler-core': 3.3.4 + '@vue/shared': 3.3.4 dev: false - /@vue/compiler-sfc@3.2.47: - resolution: {integrity: sha512-rog05W+2IFfxjMcFw10tM9+f7i/+FFpZJJ5XHX72NP9eC2uRD+42M3pYcQqDXVYoj74kHMSEdQ/WmCjt8JFksQ==} + /@vue/compiler-sfc@3.3.4: + resolution: {integrity: sha512-6y/d8uw+5TkCuzBkgLS0v3lSM3hJDntFEiUORM11pQ/hKvkhSKZrXW6i69UyXlJQisJxuUEJKAWEqWbWsLeNKQ==} dependencies: - '@babel/parser': 7.16.4 - '@vue/compiler-core': 3.2.47 - '@vue/compiler-dom': 3.2.47 - '@vue/compiler-ssr': 3.2.47 - '@vue/reactivity-transform': 3.2.47 - '@vue/shared': 3.2.47 + '@babel/parser': 7.22.5 + '@vue/compiler-core': 3.3.4 + '@vue/compiler-dom': 3.3.4 + '@vue/compiler-ssr': 3.3.4 + '@vue/reactivity-transform': 3.3.4 + '@vue/shared': 3.3.4 estree-walker: 2.0.2 - magic-string: 0.25.7 - postcss: 8.4.19 - source-map: 0.6.1 + magic-string: 0.30.0 + postcss: 8.4.21 + source-map-js: 1.0.2 dev: false - /@vue/compiler-ssr@3.2.47: - resolution: {integrity: sha512-wVXC+gszhulcMD8wpxMsqSOpvDZ6xKXSVWkf50Guf/S+28hTAXPDYRTbLQ3EDkOP5Xz/+SY37YiwDquKbJOgZw==} + /@vue/compiler-ssr@3.3.4: + resolution: {integrity: sha512-m0v6oKpup2nMSehwA6Uuu+j+wEwcy7QmwMkVNVfrV9P2qE5KshC6RwOCq8fjGS/Eak/uNb8AaWekfiXxbBB6gQ==} dependencies: - '@vue/compiler-dom': 3.2.47 - '@vue/shared': 3.2.47 + '@vue/compiler-dom': 3.3.4 + '@vue/shared': 3.3.4 dev: false /@vue/devtools-api@6.5.0: resolution: {integrity: sha512-o9KfBeaBmCKl10usN4crU53fYtC1r7jJwdGKjPT24t348rHxgfpZ0xL3Xm/gLUYnc0oTp8LAmrxOeLyu6tbk2Q==} dev: false - /@vue/reactivity-transform@3.2.47: - resolution: {integrity: sha512-m8lGXw8rdnPVVIdIFhf0LeQ/ixyHkH5plYuS83yop5n7ggVJU+z5v0zecwEnX7fa7HNLBhh2qngJJkxpwEEmYA==} + /@vue/reactivity-transform@3.3.4: + resolution: {integrity: sha512-MXgwjako4nu5WFLAjpBnCj/ieqcjE2aJBINUNQzkZQfzIZA4xn+0fV1tIYBJvvva3N3OvKGofRLvQIwEQPpaXw==} dependencies: - '@babel/parser': 7.16.4 - '@vue/compiler-core': 3.2.47 - '@vue/shared': 3.2.47 + '@babel/parser': 7.22.5 + '@vue/compiler-core': 3.3.4 + '@vue/shared': 3.3.4 estree-walker: 2.0.2 - magic-string: 0.25.7 + magic-string: 0.30.0 dev: false - /@vue/reactivity@3.2.47: - resolution: {integrity: sha512-7khqQ/75oyyg+N/e+iwV6lpy1f5wq759NdlS1fpAhFXa8VeAIKGgk2E/C4VF59lx5b+Ezs5fpp/5WsRYXQiKxQ==} + /@vue/reactivity@3.3.4: + resolution: {integrity: sha512-kLTDLwd0B1jG08NBF3R5rqULtv/f8x3rOFByTDz4J53ttIQEDmALqKqXY0J+XQeN0aV2FBxY8nJDf88yvOPAqQ==} dependencies: - '@vue/shared': 3.2.47 + '@vue/shared': 3.3.4 dev: false - /@vue/repl@1.3.3(vue@3.2.47): + /@vue/repl@1.3.3(vue@3.3.4): resolution: {integrity: sha512-mrN3Gd4CIaiIiRdi7/pAOH9rPud8q8I5svLurSoyxLhxFXs9WdfaKZlirExSJIuecHYFiAAozTBtb8XQPNhCHw==} peerDependencies: vue: ^3.2.13 dependencies: - vue: 3.2.47 + vue: 3.3.4 dev: false - /@vue/runtime-core@3.2.47: - resolution: {integrity: sha512-RZxbLQIRB/K0ev0K9FXhNbBzT32H9iRtYbaXb0ZIz2usLms/D55dJR2t6cIEUn6vyhS3ALNvNthI+Q95C+NOpA==} + /@vue/runtime-core@3.3.4: + resolution: {integrity: sha512-R+bqxMN6pWO7zGI4OMlmvePOdP2c93GsHFM/siJI7O2nxFRzj55pLwkpCedEY+bTMgp5miZ8CxfIZo3S+gFqvA==} dependencies: - '@vue/reactivity': 3.2.47 - '@vue/shared': 3.2.47 + '@vue/reactivity': 3.3.4 + '@vue/shared': 3.3.4 dev: false - /@vue/runtime-dom@3.2.47: - resolution: {integrity: sha512-ArXrFTjS6TsDei4qwNvgrdmHtD930KgSKGhS5M+j8QxXrDJYLqYw4RRcDy1bz1m1wMmb6j+zGLifdVHtkXA7gA==} + /@vue/runtime-dom@3.3.4: + resolution: {integrity: sha512-Aj5bTJ3u5sFsUckRghsNjVTtxZQ1OyMWCr5dZRAPijF/0Vy4xEoRCwLyHXcj4D0UFbJ4lbx3gPTgg06K/GnPnQ==} dependencies: - '@vue/runtime-core': 3.2.47 - '@vue/shared': 3.2.47 - csstype: 2.6.18 + '@vue/runtime-core': 3.3.4 + '@vue/shared': 3.3.4 + csstype: 3.1.2 dev: false - /@vue/server-renderer@3.2.47(vue@3.2.47): - resolution: {integrity: sha512-dN9gc1i8EvmP9RCzvneONXsKfBRgqFeFZLurmHOveL7oH6HiFXJw5OGu294n1nHc/HMgTy6LulU/tv5/A7f/LA==} + /@vue/server-renderer@3.3.4(vue@3.3.4): + resolution: {integrity: sha512-Q6jDDzR23ViIb67v+vM1Dqntu+HUexQcsWKhhQa4ARVzxOY2HbC7QRW/ggkDBd5BU+uM1sV6XOAP0b216o34JQ==} peerDependencies: - vue: 3.2.47 + vue: 3.3.4 dependencies: - '@vue/compiler-ssr': 3.2.47 - '@vue/shared': 3.2.47 - vue: 3.2.47 + '@vue/compiler-ssr': 3.3.4 + '@vue/shared': 3.3.4 + vue: 3.3.4 dev: false - /@vue/shared@3.2.47: - resolution: {integrity: sha512-BHGyyGN3Q97EZx0taMQ+OLNuZcW3d37ZEVmEAyeoA9ERdGvm9Irc/0Fua8SNyOtV1w6BS4q25wbMzJujO9HIfQ==} + /@vue/shared@3.3.4: + resolution: {integrity: sha512-7OjdcV8vQ74eiz1TZLzZP4JwqM5fA94K6yntPS5Z25r9HDuGNzaGdgvwKYq6S+MxwF0TFRwe50fIR/MYnakdkQ==} dev: false - /@vue/theme@2.2.2(vitepress@1.0.0-alpha.74)(vue@3.2.47): - resolution: {integrity: sha512-HPXujStu0KGybuFX2r+eLCNw7Mmj1igZu3/kGY+ef+D/s08vr/ZOnY807eLN0W4RcWsOoBePfOJ4EpXfpO9x6g==} + /@vue/theme@2.2.3(vitepress@1.0.0-beta.1)(vue@3.3.4): + resolution: {integrity: sha512-lJzlPi1hg21CQ/d3SY1f0vIt4O4nTzOb3EeOKF7KDOm0uvZ/pVRwPQiDeeJ6LqLeOOMWeLCzwagf1KmczsMM/w==} peerDependencies: vitepress: ^1.0.0-alpha.60 dependencies: '@docsearch/css': 3.3.3 '@docsearch/js': 3.3.3 - '@vueuse/core': 9.13.0(vue@3.2.47) + '@vueuse/core': 9.13.0(vue@3.3.4) body-scroll-lock: 3.1.5 normalize.css: 8.0.1 - vitepress: 1.0.0-alpha.74(@types/node@16.10.3)(terser@5.14.2) + vitepress: 1.0.0-beta.1(@types/node@16.10.3)(search-insights@2.6.0)(terser@5.14.2) transitivePeerDependencies: - '@algolia/client-search' - '@types/react' @@ -582,51 +674,101 @@ packages: - vue dev: false - /@vueuse/core@10.1.0(vue@3.2.47): - resolution: {integrity: sha512-3Znoa5m5RO+z4/C9w6DRaKTR3wCVJvD5rav8HTDGsr+7rOZRHtcgFJ8NcCs0ZvIpmev2kExTa311ns5j2RbzDQ==} + /@vueuse/core@10.1.2(vue@3.3.4): + resolution: {integrity: sha512-roNn8WuerI56A5uiTyF/TEYX0Y+VKlhZAF94unUfdhbDUI+NfwQMn4FUnUscIRUhv3344qvAghopU4bzLPNFlA==} dependencies: - '@types/web-bluetooth': 0.0.16 - '@vueuse/metadata': 10.1.0 - '@vueuse/shared': 10.1.0(vue@3.2.47) - vue-demi: 0.14.0(vue@3.2.47) + '@types/web-bluetooth': 0.0.17 + '@vueuse/metadata': 10.1.2 + '@vueuse/shared': 10.1.2(vue@3.3.4) + vue-demi: 0.14.0(vue@3.3.4) transitivePeerDependencies: - '@vue/composition-api' - vue dev: false - /@vueuse/core@9.13.0(vue@3.2.47): + /@vueuse/core@9.13.0(vue@3.3.4): resolution: {integrity: sha512-pujnclbeHWxxPRqXWmdkKV5OX4Wk4YeK7wusHqRwU0Q7EFusHoqNA/aPhB6KCh9hEqJkLAJo7bb0Lh9b+OIVzw==} dependencies: '@types/web-bluetooth': 0.0.16 '@vueuse/metadata': 9.13.0 - '@vueuse/shared': 9.13.0(vue@3.2.47) - vue-demi: 0.14.0(vue@3.2.47) + '@vueuse/shared': 9.13.0(vue@3.3.4) + vue-demi: 0.14.0(vue@3.3.4) transitivePeerDependencies: - '@vue/composition-api' - vue dev: false - /@vueuse/metadata@10.1.0: - resolution: {integrity: sha512-cM28HjDEw5FIrPE9rgSPFZvQ0ZYnOLAOr8hl1XM6tFl80U3WAR5ROdnAqiYybniwP5gt9MKKAJAqd/ab2aHkqg==} + /@vueuse/integrations@10.1.2(focus-trap@7.4.3)(vue@3.3.4): + resolution: {integrity: sha512-wUpG3Wv6LiWerOwCzOAM0iGhNQ4vfFUTkhj/xQy7TLXduh2M3D8N08aS0KqlxsejY6R8NLxydDIM+68QfHZZ8Q==} + peerDependencies: + async-validator: '*' + axios: '*' + change-case: '*' + drauu: '*' + focus-trap: '*' + fuse.js: '*' + idb-keyval: '*' + jwt-decode: '*' + nprogress: '*' + qrcode: '*' + sortablejs: '*' + universal-cookie: '*' + peerDependenciesMeta: + async-validator: + optional: true + axios: + optional: true + change-case: + optional: true + drauu: + optional: true + focus-trap: + optional: true + fuse.js: + optional: true + idb-keyval: + optional: true + jwt-decode: + optional: true + nprogress: + optional: true + qrcode: + optional: true + sortablejs: + optional: true + universal-cookie: + optional: true + dependencies: + '@vueuse/core': 10.1.2(vue@3.3.4) + '@vueuse/shared': 10.1.2(vue@3.3.4) + focus-trap: 7.4.3 + vue-demi: 0.14.0(vue@3.3.4) + transitivePeerDependencies: + - '@vue/composition-api' + - vue + dev: false + + /@vueuse/metadata@10.1.2: + resolution: {integrity: sha512-3mc5BqN9aU2SqBeBuWE7ne4OtXHoHKggNgxZR2K+zIW4YLsy6xoZ4/9vErQs6tvoKDX6QAqm3lvsrv0mczAwIQ==} dev: false /@vueuse/metadata@9.13.0: resolution: {integrity: sha512-gdU7TKNAUVlXXLbaF+ZCfte8BjRJQWPCa2J55+7/h+yDtzw3vOoGQDRXzI6pyKyo6bXFT5/QoPE4hAknExjRLQ==} dev: false - /@vueuse/shared@10.1.0(vue@3.2.47): - resolution: {integrity: sha512-2X52ogu12i9DkKOQ01yeb/BKg9UO87RNnpm5sXkQvyORlbq8ONS5l39MYkjkeVWWjdT0teJru7a2S41dmHmqjQ==} + /@vueuse/shared@10.1.2(vue@3.3.4): + resolution: {integrity: sha512-1uoUTPBlgyscK9v6ScGeVYDDzlPSFXBlxuK7SfrDGyUTBiznb3mNceqhwvZHjtDRELZEN79V5uWPTF1VDV8svA==} dependencies: - vue-demi: 0.14.0(vue@3.2.47) + vue-demi: 0.14.0(vue@3.3.4) transitivePeerDependencies: - '@vue/composition-api' - vue dev: false - /@vueuse/shared@9.13.0(vue@3.2.47): + /@vueuse/shared@9.13.0(vue@3.3.4): resolution: {integrity: sha512-UrnhU+Cnufu4S6JLCPZnkWh0WwZGUp72ktOF2DFptMlOs3TOdVv8xJN53zhHGARmVOsz5KqOls09+J1NR6sBKw==} dependencies: - vue-demi: 0.14.0(vue@3.2.47) + vue-demi: 0.14.0(vue@3.3.4) transitivePeerDependencies: - '@vue/composition-api' - vue @@ -674,48 +816,54 @@ packages: /commander@2.20.3: resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} - /csstype@2.6.18: - resolution: {integrity: sha512-RSU6Hyeg14am3Ah4VZEmeX8H7kLwEEirXe6aU2IPfKNvhXwTflK5HQRDNI0ypQXoqmm+QPyG2IaPuQE5zMwSIQ==} + /csstype@3.1.2: + resolution: {integrity: sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==} dev: false /dynamics.js@1.1.5: resolution: {integrity: sha1-uQvcM2Bc7+ZSuEFucB95v27vzjI=} dev: false - /esbuild@0.17.18: - resolution: {integrity: sha512-z1lix43jBs6UKjcZVKOw2xx69ffE2aG0PygLL5qJ9OS/gy0Ewd1gW/PUQIOIQGXBHWNywSc0floSKoMFF8aK2w==} + /esbuild@0.17.19: + resolution: {integrity: sha512-XQ0jAPFkK/u3LcVRcvVHQcTIqD6E2H1fvZMA5dQPSOWb3suUbWbfbRf94pjc0bNzRYLfIrDRQXr7X+LHIm5oHw==} engines: {node: '>=12'} hasBin: true requiresBuild: true optionalDependencies: - '@esbuild/android-arm': 0.17.18 - '@esbuild/android-arm64': 0.17.18 - '@esbuild/android-x64': 0.17.18 - '@esbuild/darwin-arm64': 0.17.18 - '@esbuild/darwin-x64': 0.17.18 - '@esbuild/freebsd-arm64': 0.17.18 - '@esbuild/freebsd-x64': 0.17.18 - '@esbuild/linux-arm': 0.17.18 - '@esbuild/linux-arm64': 0.17.18 - '@esbuild/linux-ia32': 0.17.18 - '@esbuild/linux-loong64': 0.17.18 - '@esbuild/linux-mips64el': 0.17.18 - '@esbuild/linux-ppc64': 0.17.18 - '@esbuild/linux-riscv64': 0.17.18 - '@esbuild/linux-s390x': 0.17.18 - '@esbuild/linux-x64': 0.17.18 - '@esbuild/netbsd-x64': 0.17.18 - '@esbuild/openbsd-x64': 0.17.18 - '@esbuild/sunos-x64': 0.17.18 - '@esbuild/win32-arm64': 0.17.18 - '@esbuild/win32-ia32': 0.17.18 - '@esbuild/win32-x64': 0.17.18 + '@esbuild/android-arm': 0.17.19 + '@esbuild/android-arm64': 0.17.19 + '@esbuild/android-x64': 0.17.19 + '@esbuild/darwin-arm64': 0.17.19 + '@esbuild/darwin-x64': 0.17.19 + '@esbuild/freebsd-arm64': 0.17.19 + '@esbuild/freebsd-x64': 0.17.19 + '@esbuild/linux-arm': 0.17.19 + '@esbuild/linux-arm64': 0.17.19 + '@esbuild/linux-ia32': 0.17.19 + '@esbuild/linux-loong64': 0.17.19 + '@esbuild/linux-mips64el': 0.17.19 + '@esbuild/linux-ppc64': 0.17.19 + '@esbuild/linux-riscv64': 0.17.19 + '@esbuild/linux-s390x': 0.17.19 + '@esbuild/linux-x64': 0.17.19 + '@esbuild/netbsd-x64': 0.17.19 + '@esbuild/openbsd-x64': 0.17.19 + '@esbuild/sunos-x64': 0.17.19 + '@esbuild/win32-arm64': 0.17.19 + '@esbuild/win32-ia32': 0.17.19 + '@esbuild/win32-x64': 0.17.19 dev: false /estree-walker@2.0.2: resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} dev: false + /focus-trap@7.4.3: + resolution: {integrity: sha512-BgSSbK4GPnS2VbtZ50VtOv1Sti6DIkj3+LkVjiWMNjLeAp1SH1UlLx3ULu/DCu4vq5R4/uvTm+zrvsMsuYmGLg==} + dependencies: + tabbable: 6.1.2 + dev: false + /fsevents@2.3.2: resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} @@ -732,18 +880,19 @@ packages: resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==} dev: false - /magic-string@0.25.7: - resolution: {integrity: sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==} + /magic-string@0.30.0: + resolution: {integrity: sha512-LA+31JYDJLs82r2ScLrlz1GjSgu66ZV518eyWT+S8VhyQn/JL0u9MeBOvQMGYiPk1DBiSN9DDMOcXvigJZaViQ==} + engines: {node: '>=12'} dependencies: - sourcemap-codec: 1.4.8 + '@jridgewell/sourcemap-codec': 1.4.14 dev: false /mark.js@8.11.1: resolution: {integrity: sha512-1I+1qpDt4idfgLQG+BNWmrqku+7/2bi5nLf4YwF8y8zXvmfiTBY3PV3ZibfrjBueCByROpuBjLLFCajqkgYoLQ==} dev: false - /minisearch@6.0.1: - resolution: {integrity: sha512-Ly1w0nHKnlhAAh6/BF/+9NgzXfoJxaJ8nhopFhQ3NcvFJrFIL+iCg9gw9e9UMBD+XIsp/RyznJ/o5UIe5Kw+kg==} + /minisearch@6.1.0: + resolution: {integrity: sha512-PNxA/X8pWk+TiqPbsoIYH0GQ5Di7m6326/lwU/S4mlo4wGQddIcf/V//1f9TB0V4j59b57b+HZxt8h3iMROGvg==} dev: false /nanoid@3.3.4: @@ -752,6 +901,12 @@ packages: hasBin: true dev: false + /nanoid@3.3.6: + resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + dev: false + /normalize.css@8.0.1: resolution: {integrity: sha512-qizSNPO93t1YUuUhP22btGOo3chcvDFqFaj2TRybP0DMxkHOCTYwp3n34fel4a31ORXy4m1Xq0Gyqpb5m33qIg==} dev: false @@ -760,8 +915,8 @@ packages: resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} dev: false - /postcss@8.4.19: - resolution: {integrity: sha512-h+pbPsyhlYj6N2ozBmHhHrs9DzGmbaarbLvWipMRO7RLS+v4onj26MPFXA5OBYFxyqYhUJK456SwDcY9H2/zsA==} + /postcss@8.4.21: + resolution: {integrity: sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==} engines: {node: ^10 || ^12 || >=14} dependencies: nanoid: 3.3.4 @@ -769,11 +924,11 @@ packages: source-map-js: 1.0.2 dev: false - /postcss@8.4.21: - resolution: {integrity: sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==} + /postcss@8.4.24: + resolution: {integrity: sha512-M0RzbcI0sO/XJNucsGjvWU9ERWxb/ytp1w6dKtxTKgixdtQDq4rmx/g8W1hnaheq9jgwL/oyEdH5Bc4WwJKMqg==} engines: {node: ^10 || ^12 || >=14} dependencies: - nanoid: 3.3.4 + nanoid: 3.3.6 picocolors: 1.0.0 source-map-js: 1.0.2 dev: false @@ -782,16 +937,21 @@ packages: resolution: {integrity: sha512-KojoltCrshZ099ksUZ2OQKfbH66uquFoxHSbnwKbTJHeQNvx42EmC7wQVWNuDt6vC5s3nudRHFtKbpY4ijKlaQ==} dev: false - /rollup@3.21.0: - resolution: {integrity: sha512-ANPhVcyeHvYdQMUyCbczy33nbLzI7RzrBje4uvNiTDJGIMtlKoOStmympwr9OtS1LZxiDmE2wvxHyVhoLtf1KQ==} + /rollup@3.24.0: + resolution: {integrity: sha512-OgraHOIg2YpHQTjl0/ymWfFNBEyPucB7lmhXrQUh38qNOegxLapSPFs9sNr0qKR75awW41D93XafoR2QfhBdUQ==} engines: {node: '>=14.18.0', npm: '>=8.0.0'} hasBin: true optionalDependencies: fsevents: 2.3.2 dev: false - /shiki@0.14.1: - resolution: {integrity: sha512-+Jz4nBkCBe0mEDqo1eKRcCdjRtrCjozmcbTUjbPTX7OOJfEbTZzlUWlZtGe3Gb5oV1/jnojhG//YZc3rs9zSEw==} + /search-insights@2.6.0: + resolution: {integrity: sha512-vU2/fJ+h/Mkm/DJOe+EaM5cafJv/1rRTZpGJTuFPf/Q5LjzgMDsqPdSaZsAe+GAWHHsfsu+rQSAn6c8IGtBEVw==} + engines: {node: '>=8.16.0'} + dev: false + + /shiki@0.14.2: + resolution: {integrity: sha512-ltSZlSLOuSY0M0Y75KA+ieRaZ0Trf5Wl3gutE7jzLuIcWxLp5i/uEnLoQWNvgKXQ5OMpGkJnVMRLAuzjc0LJ2A==} dependencies: ansi-sequence-parser: 1.1.0 jsonc-parser: 3.2.0 @@ -814,9 +974,8 @@ packages: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} engines: {node: '>=0.10.0'} - /sourcemap-codec@1.4.8: - resolution: {integrity: sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==} - deprecated: Please use @jridgewell/sourcemap-codec instead + /tabbable@6.1.2: + resolution: {integrity: sha512-qCN98uP7i9z0fIS4amQ5zbGBOq+OSigYeGvPy7NDk8Y9yncqDZ9pRPgfsc2PJIVM9RrJj7GIfuRgmjoUU9zTHQ==} dev: false /terser@5.14.2: @@ -834,8 +993,8 @@ packages: engines: {node: '>=4'} dev: false - /vite@4.3.1(@types/node@16.10.3)(terser@5.14.2): - resolution: {integrity: sha512-EPmfPLAI79Z/RofuMvkIS0Yr091T2ReUoXQqc5ppBX/sjFRhHKiPPF/R46cTdoci/XgeQpB23diiJxq5w30vdg==} + /vite@4.3.9(@types/node@16.10.3)(terser@5.14.2): + resolution: {integrity: sha512-qsTNZjO9NoJNW7KnOrgYwczm0WctJ8m/yqYAMAK9Lxt4SoySUfS5S8ia9K7JHpa3KEeMfyF8LoJ3c5NeBJy6pg==} engines: {node: ^14.18.0 || >=16.0.0} hasBin: true peerDependencies: @@ -860,41 +1019,55 @@ packages: optional: true dependencies: '@types/node': 16.10.3 - esbuild: 0.17.18 - postcss: 8.4.21 - rollup: 3.21.0 + esbuild: 0.17.19 + postcss: 8.4.24 + rollup: 3.24.0 terser: 5.14.2 optionalDependencies: fsevents: 2.3.2 dev: false - /vitepress@1.0.0-alpha.74(@types/node@16.10.3)(terser@5.14.2): - resolution: {integrity: sha512-n5UHqsLJKaJ3V6BSiofS5ZVhtxzarNIn3/kyOzUp/vePmVbQyX/pZ6/MhZgNr0g5t4E55j7XM3AHf/Fo0hnrpw==} + /vitepress@1.0.0-beta.1(@types/node@16.10.3)(search-insights@2.6.0)(terser@5.14.2): + resolution: {integrity: sha512-V2yyCwQ+v9fh7rbnGDLp8M7vHa9sLElexXf/JHtBOsOwv7ed9wt1QI4WUagYgKR3TeoJT9v2s6f0UaQSne0EvQ==} hasBin: true dependencies: - '@docsearch/css': 3.3.3 - '@docsearch/js': 3.3.3 - '@vitejs/plugin-vue': 4.2.0(vite@4.3.1)(vue@3.2.47) + '@docsearch/css': 3.5.0 + '@docsearch/js': 3.5.0(search-insights@2.6.0) + '@vitejs/plugin-vue': 4.2.3(vite@4.3.9)(vue@3.3.4) '@vue/devtools-api': 6.5.0 - '@vueuse/core': 10.1.0(vue@3.2.47) + '@vueuse/core': 10.1.2(vue@3.3.4) + '@vueuse/integrations': 10.1.2(focus-trap@7.4.3)(vue@3.3.4) body-scroll-lock: 4.0.0-beta.0 + focus-trap: 7.4.3 mark.js: 8.11.1 - minisearch: 6.0.1 - shiki: 0.14.1 - vite: 4.3.1(@types/node@16.10.3)(terser@5.14.2) - vue: 3.2.47 + minisearch: 6.1.0 + shiki: 0.14.2 + vite: 4.3.9(@types/node@16.10.3)(terser@5.14.2) + vue: 3.3.4 transitivePeerDependencies: - '@algolia/client-search' - '@types/node' - '@types/react' - '@vue/composition-api' + - async-validator + - axios + - change-case + - drauu + - fuse.js + - idb-keyval + - jwt-decode - less + - nprogress + - qrcode - react - react-dom - sass + - search-insights + - sortablejs - stylus - sugarss - terser + - universal-cookie dev: false /vscode-oniguruma@1.7.0: @@ -905,7 +1078,7 @@ packages: resolution: {integrity: sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==} dev: false - /vue-demi@0.14.0(vue@3.2.47): + /vue-demi@0.14.0(vue@3.3.4): resolution: {integrity: sha512-gt58r2ogsNQeVoQ3EhoUAvUsH9xviydl0dWJj7dabBC/2L4uBId7ujtCwDRD0JhkGsV1i0CtfLAeyYKBht9oWg==} engines: {node: '>=12'} hasBin: true @@ -917,15 +1090,15 @@ packages: '@vue/composition-api': optional: true dependencies: - vue: 3.2.47 + vue: 3.3.4 dev: false - /vue@3.2.47: - resolution: {integrity: sha512-60188y/9Dc9WVrAZeUVSDxRQOZ+z+y5nO2ts9jWXSTkMvayiWxCWOWtBQoYjLeccfXkiiPZWAHcV+WTPhkqJHQ==} + /vue@3.3.4: + resolution: {integrity: sha512-VTyEYn3yvIeY1Py0WaYGZsXnz3y5UnGi62GjVEqvEGPl6nxbOrCXbVOTQWBEJUqAyTUk2uJ5JLVnYJ6ZzGbrSw==} dependencies: - '@vue/compiler-dom': 3.2.47 - '@vue/compiler-sfc': 3.2.47 - '@vue/runtime-dom': 3.2.47 - '@vue/server-renderer': 3.2.47(vue@3.2.47) - '@vue/shared': 3.2.47 + '@vue/compiler-dom': 3.3.4 + '@vue/compiler-sfc': 3.3.4 + '@vue/runtime-dom': 3.3.4 + '@vue/server-renderer': 3.3.4(vue@3.3.4) + '@vue/shared': 3.3.4 dev: false From 7eb59845e8970595ce117ca38de6b054a037f66b Mon Sep 17 00:00:00 2001 From: Evan You Date: Fri, 9 Jun 2023 12:34:03 +0800 Subject: [PATCH 041/633] ignore missing dep --- package.json | 3 ++- pnpm-lock.yaml | 37 +++++++++++++++++++------------------ 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/package.json b/package.json index f92bd8084c..e0e00360d4 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,8 @@ "@algolia/client-search", "react", "react-dom", - "@types/react" + "@types/react", + "search-insights" ] } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e9eff263b2..e9f376d7c0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,4 +1,8 @@ -lockfileVersion: '6.0' +lockfileVersion: '6.1' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false dependencies: '@vue/repl': @@ -15,7 +19,7 @@ dependencies: version: 3.9.0 vitepress: specifier: ^1.0.0-beta.1 - version: 1.0.0-beta.1(@types/node@16.10.3)(search-insights@2.6.0)(terser@5.14.2) + version: 1.0.0-beta.1(@types/node@16.10.3)(terser@5.14.2) vue: specifier: ^3.3.4 version: 3.3.4 @@ -39,10 +43,10 @@ packages: '@algolia/autocomplete-shared': 1.7.4 dev: false - /@algolia/autocomplete-core@1.9.2(algoliasearch@4.10.5)(search-insights@2.6.0): + /@algolia/autocomplete-core@1.9.2(algoliasearch@4.10.5): resolution: {integrity: sha512-hkG80c9kx9ClVAEcUJbTd2ziVC713x9Bji9Ty4XJfKXlxlsx3iXsoNhAwfeR4ulzIUg7OE5gez0UU1zVDdG7kg==} dependencies: - '@algolia/autocomplete-plugin-algolia-insights': 1.9.2(algoliasearch@4.10.5)(search-insights@2.6.0) + '@algolia/autocomplete-plugin-algolia-insights': 1.9.2(algoliasearch@4.10.5) '@algolia/autocomplete-shared': 1.9.2(algoliasearch@4.10.5) transitivePeerDependencies: - '@algolia/client-search' @@ -50,13 +54,15 @@ packages: - search-insights dev: false - /@algolia/autocomplete-plugin-algolia-insights@1.9.2(algoliasearch@4.10.5)(search-insights@2.6.0): + /@algolia/autocomplete-plugin-algolia-insights@1.9.2(algoliasearch@4.10.5): resolution: {integrity: sha512-2LVsf4W66hVHQ3Ua/8k15oPlxjELCztbAkQm/hP42Sw+GLkHAdY1vaVRYziaWq64+Oljfg6FKkZHCdgXH+CGIA==} peerDependencies: search-insights: '>= 1 < 3' + peerDependenciesMeta: + search-insights: + optional: true dependencies: '@algolia/autocomplete-shared': 1.9.2(algoliasearch@4.10.5) - search-insights: 2.6.0 transitivePeerDependencies: - '@algolia/client-search' - algoliasearch @@ -235,10 +241,10 @@ packages: - react-dom dev: false - /@docsearch/js@3.5.0(search-insights@2.6.0): + /@docsearch/js@3.5.0: resolution: {integrity: sha512-WqB+z+zVKSXDkGq028nClT9RvMzfFlemZuIulX5ZwWkdUtl4k7M9cmZA/c6kuZf7FG24XQsMHWuBjeUo9hLRyA==} dependencies: - '@docsearch/react': 3.5.0(search-insights@2.6.0) + '@docsearch/react': 3.5.0 preact: 10.5.14 transitivePeerDependencies: - '@algolia/client-search' @@ -270,7 +276,7 @@ packages: - '@algolia/client-search' dev: false - /@docsearch/react@3.5.0(search-insights@2.6.0): + /@docsearch/react@3.5.0: resolution: {integrity: sha512-3IG8mmSMzSHNGy2S1VuPyYU9tFCxFpj5Ov8SYwsSHM4yMvFsaO9oFxXocA5lSenliIELhuOuS5+BdxHa/Qlf2A==} peerDependencies: '@types/react': '>= 16.8.0 < 19.0.0' @@ -284,7 +290,7 @@ packages: react-dom: optional: true dependencies: - '@algolia/autocomplete-core': 1.9.2(algoliasearch@4.10.5)(search-insights@2.6.0) + '@algolia/autocomplete-core': 1.9.2(algoliasearch@4.10.5) '@algolia/autocomplete-preset-algolia': 1.9.2(algoliasearch@4.10.5) '@docsearch/css': 3.5.0 algoliasearch: 4.10.5 @@ -664,7 +670,7 @@ packages: '@vueuse/core': 9.13.0(vue@3.3.4) body-scroll-lock: 3.1.5 normalize.css: 8.0.1 - vitepress: 1.0.0-beta.1(@types/node@16.10.3)(search-insights@2.6.0)(terser@5.14.2) + vitepress: 1.0.0-beta.1(@types/node@16.10.3)(terser@5.14.2) transitivePeerDependencies: - '@algolia/client-search' - '@types/react' @@ -945,11 +951,6 @@ packages: fsevents: 2.3.2 dev: false - /search-insights@2.6.0: - resolution: {integrity: sha512-vU2/fJ+h/Mkm/DJOe+EaM5cafJv/1rRTZpGJTuFPf/Q5LjzgMDsqPdSaZsAe+GAWHHsfsu+rQSAn6c8IGtBEVw==} - engines: {node: '>=8.16.0'} - dev: false - /shiki@0.14.2: resolution: {integrity: sha512-ltSZlSLOuSY0M0Y75KA+ieRaZ0Trf5Wl3gutE7jzLuIcWxLp5i/uEnLoQWNvgKXQ5OMpGkJnVMRLAuzjc0LJ2A==} dependencies: @@ -1027,12 +1028,12 @@ packages: fsevents: 2.3.2 dev: false - /vitepress@1.0.0-beta.1(@types/node@16.10.3)(search-insights@2.6.0)(terser@5.14.2): + /vitepress@1.0.0-beta.1(@types/node@16.10.3)(terser@5.14.2): resolution: {integrity: sha512-V2yyCwQ+v9fh7rbnGDLp8M7vHa9sLElexXf/JHtBOsOwv7ed9wt1QI4WUagYgKR3TeoJT9v2s6f0UaQSne0EvQ==} hasBin: true dependencies: '@docsearch/css': 3.5.0 - '@docsearch/js': 3.5.0(search-insights@2.6.0) + '@docsearch/js': 3.5.0 '@vitejs/plugin-vue': 4.2.3(vite@4.3.9)(vue@3.3.4) '@vue/devtools-api': 6.5.0 '@vueuse/core': 10.1.2(vue@3.3.4) From cdd928d4ac74867993862568d2f9b2b9459809d3 Mon Sep 17 00:00:00 2001 From: Evan You Date: Sat, 10 Jun 2023 08:12:22 +0800 Subject: [PATCH 042/633] Rewrite reactivity fundamentals CAPI to start with refs (#2396) --- .../essentials/reactivity-fundamentals.md | 407 ++++++++++-------- src/guide/quick-start.md | 4 +- 2 files changed, 218 insertions(+), 193 deletions(-) diff --git a/src/guide/essentials/reactivity-fundamentals.md b/src/guide/essentials/reactivity-fundamentals.md index dab149e6fe..501ed0c8b3 100644 --- a/src/guide/essentials/reactivity-fundamentals.md +++ b/src/guide/essentials/reactivity-fundamentals.md @@ -8,10 +8,10 @@ outline: deep This page and many other chapters later in the guide contain different content for the Options API and the Composition API. Your current preference is Options APIComposition API. You can toggle between the API styles using the "API Preference" switches at the top of the left sidebar. ::: -## Declaring Reactive State {#declaring-reactive-state} -
+## Declaring Reactive State \* {#declaring-reactive-state} + With the Options API, we use the `data` option to declare reactive state of a component. The option value should be a function that returns an object. Vue will call the function when creating a new component instance, and wrap the returned object in its reactivity system. Any top-level properties of this object are proxied on the component instance (`this` in methods and lifecycle hooks): ```js{2-6} @@ -67,98 +67,157 @@ When you access `this.someObject` after assigning it, the value is a reactive pr
-We can create a reactive object or array with the [`reactive()`](/api/reactivity-core#reactive) function: +## Declaring Reactive State \** {#declaring-reactive-state-1} + +### `ref()` \** {#ref} + +In Composition API, the recommended way to declare reactive state is using the [`ref()`](/api/reactivity-core#ref) function: ```js -import { reactive } from 'vue' +import { ref } from 'vue' -const state = reactive({ count: 0 }) +const count = ref(0) ``` -Reactive objects are [JavaScript Proxies](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) and behave just like normal objects. The difference is that Vue is able to track the property access and mutations of a reactive object. If you are curious about the details, we explain how Vue's reactivity system works in [Reactivity in Depth](/guide/extras/reactivity-in-depth) - but we recommend reading it after you have finished the main guide. +`ref()` takes the argument and returns it wrapped within a ref object with a `.value` property: + +```js +const count = ref(0) + +console.log(count) // { value: 0 } +console.log(count.value) // 0 + +count.value++ +console.log(count.value) // 1 +``` -See also: [Typing Reactive](/guide/typescript/composition-api#typing-reactive) +> See also: [Typing Refs](/guide/typescript/composition-api#typing-ref) -To use reactive state in a component's template, declare and return them from a component's `setup()` function: +To access refs in a component's template, declare and return them from a component's `setup()` function: ```js{5,9-11} -import { reactive } from 'vue' +import { ref } from 'vue' export default { - // `setup` is a special hook dedicated for the composition API. + // `setup` is a special hook dedicated for the Composition API. setup() { - const state = reactive({ count: 0 }) + const count = ref(0) - // expose the state to the template + // expose the ref to the template return { - state + count } } } ``` ```vue-html -
{{ state.count }}
+
{{ count }}
``` -Similarly, we can declare functions that mutate reactive state in the same scope and expose them as methods alongside the state: +Notice that we did **not** need to append `.value` when using the ref in the template. For convenience, refs are automatically unwrapped when used inside templates (with a few [caveats](#caveat-when-unwrapping-in-templates)). -```js{7-9,14} -import { reactive } from 'vue' +You can also mutate a ref directly in event handlers: + +```vue-html{1} + +``` + +For more complex logic, we can declare functions that mutate refs in the same scope and expose them as methods alongside the state: + +```js{7-10,15} +import { ref } from 'vue' export default { setup() { - const state = reactive({ count: 0 }) + const count = ref(0) function increment() { - state.count++ + // .value is needed in JavaScript + count.value++ } // don't forget to expose the function as well. return { - state, + count, increment } } } ``` -Exposed methods are typically used as event listeners: +Exposed methods can then be used as event handlers: -```vue-html +```vue-html{1} ``` +Here's the example live on [Codepen](https://codepen.io/vuejs-examples/pen/WNYbaqo), without using any build tools. + ### ` ``` -[Try it in the Playground](https://play.vuejs.org/#eNpNjkEKgzAURK8yZFNF0K5FS3uPbGyIEKo/If64Cbl7fxWky2HePCarVwjtnqzq1bCZ6AJjs5zCQ5Nbg4+MjGgnw263KJijX3ET/qZJk/G0Cc8TW4wXVmUYn4h73FHqHzcnksYTHJloV0tc1ciacG7bA28aTUXT0J035IAEtmtYBJEEDO/ELJanWZz5jFpdOq0OAMj5X4kiQtl151CYobuMqnwBBoFaVA==) +[Try it in the Playground](https://play.vuejs.org/#eNo9jUEKgzAQRa8yZKMiaNcllvYe2dgwQqiZhDhxE3L3jrW4/DPvv1/UK8Zhz6juSm82uciwIef4MOR8DImhQMIFKiwpeGgEbQwZsoE2BhsyMUwH0d66475ksuwCgSOb0CNx20ExBCc77POase8NVUN6PBdlSwKjj+vMKAlAvzOzWJ52dfYzGXXpjPoBAKX856uopDGeFfnq8XKp+gWq4FAi) -Top-level imports and variables declared in ` - - +const object = { id: ref(0) } ``` -[Try it in the Playground](https://play.vuejs.org/#eNo9jUEKgzAQRa8yZKMiaNclSnuP2dgwQqiZhDhxE3L3Riwu//DmvazeIQxHIvVUejfRBoGdJIUZ2brgo0CGSCsUWKN30FS0QUY2nncB4xMLTCfRPrrzviY2Yj2DZRPJEUvbQUaGix2OZUvU98gFWY9XsbbqEHJhW4TqAtCfJFItL7NZ851Q3TpUc87/cCl6vMD6pMfboMoPvd1Nzg==) +Therefore, this expression works as expected: -Note that the unwrapping only applies if the ref is a top-level property on the template render context. As an example, `object` is a top-level property, but `object.foo` is not. - -So, given the following object: - -```js -const object = { foo: ref(1) } +```vue-html +{{ count + 1 }} ``` -The following expression will **NOT** work as expected: +...while this one does **NOT**: ```vue-html -{{ object.foo + 1 }} +{{ object.id + 1 }} ``` -The rendered result will be `[object Object]1` because `object.foo` is a ref object. We can fix that by making `foo` a top-level property: +The rendered result will be `[object Object]1` because `object.id` is not unwrapped when evaluating the expression and remains a ref object. To fix this, we can destructure `id` into a top-level property: ```js -const { foo } = object +const { id } = object ``` ```vue-html -{{ foo + 1 }} +{{ id + 1 }} ``` Now the render result will be `2`. -One thing to note is that a ref will also be unwrapped if it is the final evaluated value of a text interpolation (i.e. a {{ }} tag), so the following will render `1`: +Another thing to note is that a ref does get unwrapped if it is the final evaluated value of a text interpolation (i.e. a {{ }} tag), so the following will render `1`: ```vue-html -{{ object.foo }} -``` - -This is just a convenience feature of text interpolation and is equivalent to {{ object.foo.value }}. - -### Ref Unwrapping in Reactive Objects \*\* {#ref-unwrapping-in-reactive-objects} - -When a `ref` is accessed or mutated as a property of a reactive object, it is also automatically unwrapped so it behaves like a normal property: - -```js -const count = ref(0) -const state = reactive({ - count -}) - -console.log(state.count) // 0 - -state.count = 1 -console.log(count.value) // 1 +{{ object.id }} ``` -If a new ref is assigned to a property linked to an existing ref, it will replace the old ref: - -```js -const otherCount = ref(2) - -state.count = otherCount -console.log(state.count) // 2 -// original ref is now disconnected from state.count -console.log(count.value) // 1 -``` - -Ref unwrapping only happens when nested inside a deep reactive object. It does not apply when it is accessed as a property of a [shallow reactive object](/api/reactivity-advanced#shallowreactive). - -### Ref Unwrapping in Arrays and Collections {#ref-unwrapping-in-arrays-and-collections} - -Unlike reactive objects, there is no unwrapping performed when the ref is accessed as an element of a reactive array or a native collection type like `Map`: - -```js -const books = reactive([ref('Vue 3 Guide')]) -// need .value here -console.log(books[0].value) - -const map = reactive(new Map([['count', ref(0)]])) -// need .value here -console.log(map.get('count').value) -``` +This is just a convenience feature of text interpolation and is equivalent to {{ object.id.value }}.
diff --git a/src/guide/quick-start.md b/src/guide/quick-start.md index cde18e17c5..46f38688e1 100644 --- a/src/guide/quick-start.md +++ b/src/guide/quick-start.md @@ -98,7 +98,7 @@ The above link loads the *global build* of Vue, where all top-level APIs are exp ``` -[JSFiddle demo](https://jsfiddle.net/yyx990803/nw1xg8Lj/) +[Codepen demo](https://codepen.io/vuejs-examples/pen/QWJwJLp) ### Using the ES Module Build {#using-the-es-module-build} @@ -122,7 +122,7 @@ Throughout the rest of the documentation, we will be primarily using [ES modules Notice that we are using ` + + + + diff --git a/.vitepress/theme/components/preferences.ts b/.vitepress/theme/components/preferences.ts index e67279e9d9..5a5cc2d25d 100644 --- a/.vitepress/theme/components/preferences.ts +++ b/.vitepress/theme/components/preferences.ts @@ -1,14 +1,14 @@ import { ref } from 'vue' import { AugmentedHeader } from '../../headerMdPlugin' -const hasStorage = typeof localStorage !== 'undefined' +export const inBrowser = typeof window !== 'undefined' const get = (key: string, defaultValue = false): boolean => - hasStorage + inBrowser ? JSON.parse(localStorage.getItem(key) || String(defaultValue)) : defaultValue export const preferCompositionKey = 'vue-docs-prefer-composition' -export const preferComposition = ref(get(preferCompositionKey)) +export const preferComposition = ref(get(preferCompositionKey, true)) export const preferSFCKey = 'vue-docs-prefer-sfc' export const preferSFC = ref(get(preferSFCKey, true)) diff --git a/src/guide/introduction.md b/src/guide/introduction.md index 2c77e93c8a..df29356301 100644 --- a/src/guide/introduction.md +++ b/src/guide/introduction.md @@ -30,6 +30,8 @@ Vue (pronounced /vjuː/, like **view**) is a JavaScript framework for building u Here is a minimal example: +
+ ```js import { createApp } from 'vue' @@ -42,6 +44,23 @@ createApp({ }).mount('#app') ``` +
+
+ +```js +import { createApp, ref } from 'vue' + +createApp({ + setup() { + return { + count: ref(0) + } + } +}).mount('#app') +``` + +
+ ```vue-html
-- **See also:** [`this.$nextTick()`](/api/component-instance#nexttick) +- **See also** [`this.$nextTick()`](/api/component-instance#nexttick) ## defineComponent() {#definecomponent} @@ -191,7 +191,7 @@ A type helper for defining a Vue component with type inference. Note this is not necessary if you are using Vite, because Rollup (the underlying production bundler used by Vite) is smart enough to determine that `defineComponent()` is in fact side-effect-free without the need for manual annotations. -- **See also:** [Guide - Using Vue with TypeScript](/guide/typescript/overview#general-usage-notes) +- **See also** [Guide - Using Vue with TypeScript](/guide/typescript/overview#general-usage-notes) ## defineAsyncComponent() {#defineasynccomponent} @@ -222,7 +222,7 @@ Define an async component which is lazy loaded only when it is rendered. The arg } ``` -- **See also:** [Guide - Async Components](/guide/components/async) +- **See also** [Guide - Async Components](/guide/components/async) ## defineCustomElement() {#definecustomelement} @@ -261,7 +261,7 @@ This method accepts the same argument as [`defineComponent`](#definecomponent), customElements.define('my-vue-element', MyVueElement) ``` -- **See also:** +- **See also** - [Guide - Building Custom Elements with Vue](/guide/extras/web-components#building-custom-elements-with-vue) diff --git a/src/api/options-composition.md b/src/api/options-composition.md index e4d1f5e7b9..5e79a0a7d8 100644 --- a/src/api/options-composition.md +++ b/src/api/options-composition.md @@ -12,7 +12,7 @@ Provide values that can be injected by descendant components. } ``` -- **Details:** +- **Details** `provide` and [`inject`](#inject) are used together to allow an ancestor component to serve as a dependency injector for all its descendants, regardless of how deep the component hierarchy is, as long as they are in the same parent chain. @@ -52,7 +52,7 @@ Provide values that can be injected by descendant components. Note in the above example, the provided `msg` will NOT be reactive. See [Working with Reactivity](/guide/components/provide-inject#working-with-reactivity) for more details. -- **See also:** [Provide / Inject](/guide/components/provide-inject) +- **See also** [Provide / Inject](/guide/components/provide-inject) ## inject {#inject} @@ -167,7 +167,7 @@ Declare properties to inject into the current component by locating them from an } ``` -- **See also:** [Provide / Inject](/guide/components/provide-inject) +- **See also** [Provide / Inject](/guide/components/provide-inject) ## mixins {#mixins} @@ -181,7 +181,7 @@ An array of option objects to be mixed into the current component. } ``` -- **Details:** +- **Details** The `mixins` option accepts an array of mixin objects. These mixin objects can contain instance options like normal instance objects, and they will be merged against the eventual options using the certain option merging logic. For example, if your mixin contains a `created` hook and the component itself also has one, both functions will be called. @@ -191,7 +191,7 @@ An array of option objects to be mixed into the current component. In Vue 2, mixins were the primary mechanism for creating reusable chunks of component logic. While mixins continue to be supported in Vue 3, [Composable functions using Composition API](/guide/reusability/composables) is now the preferred approach for code reuse between components. ::: -- **Example:** +- **Example** ```js const mixin = { @@ -215,7 +215,7 @@ An array of option objects to be mixed into the current component. A "base class" component to extend from. -- **Type:** +- **Type** ```ts interface ComponentOptions { @@ -223,7 +223,7 @@ A "base class" component to extend from. } ``` -- **Details:** +- **Details** Allows one component to extend another, inheriting its component options. @@ -233,7 +233,7 @@ A "base class" component to extend from. As with `mixins`, any options (except for `setup()`) will be merged using the relevant merge strategy. -- **Example:** +- **Example** ```js const CompA = { ... } diff --git a/src/api/options-lifecycle.md b/src/api/options-lifecycle.md index c6af3852f5..d4f18648ff 100644 --- a/src/api/options-lifecycle.md +++ b/src/api/options-lifecycle.md @@ -230,7 +230,7 @@ Called when a reactive dependency has been tracked by the component's render eff } ``` -- **See also:** [Reactivity in Depth](/guide/extras/reactivity-in-depth) +- **See also** [Reactivity in Depth](/guide/extras/reactivity-in-depth) ## renderTriggered {#rendertriggered} @@ -256,7 +256,7 @@ Called when a reactive dependency triggers the component's render effect to be r } ``` -- **See also:** [Reactivity in Depth](/guide/extras/reactivity-in-depth) +- **See also** [Reactivity in Depth](/guide/extras/reactivity-in-depth) ## activated {#activated} @@ -272,7 +272,7 @@ Called after the component instance is inserted into the DOM as part of a tree c } ``` -- **See also:** [Guide - Lifecycle of Cached Instance](/guide/built-ins/keep-alive#lifecycle-of-cached-instance) +- **See also** [Guide - Lifecycle of Cached Instance](/guide/built-ins/keep-alive#lifecycle-of-cached-instance) ## deactivated {#deactivated} @@ -288,7 +288,7 @@ Called after the component instance is removed from the DOM as part of a tree ca } ``` -- **See also:** [Guide - Lifecycle of Cached Instance](/guide/built-ins/keep-alive#lifecycle-of-cached-instance) +- **See also** [Guide - Lifecycle of Cached Instance](/guide/built-ins/keep-alive#lifecycle-of-cached-instance) ## serverPrefetch {#serverprefetch} @@ -333,4 +333,4 @@ Async function to be resolved before the component instance is to be rendered on } ``` -- **See also:** [Server-Side Rendering](/guide/scaling-up/ssr) +- **See also** [Server-Side Rendering](/guide/scaling-up/ssr) diff --git a/src/api/options-misc.md b/src/api/options-misc.md index 16e2d4c73b..9c42f7948b 100644 --- a/src/api/options-misc.md +++ b/src/api/options-misc.md @@ -125,7 +125,7 @@ Controls whether the default component attribute fallthrough behavior should be
-- **See also:** [Fallthrough Attributes](/guide/components/attrs) +- **See also** [Fallthrough Attributes](/guide/components/attrs) ## components {#components} @@ -155,7 +155,7 @@ An object that registers components to be made available to the component instan } ``` -- **See also:** [Component Registration](/guide/components/registration) +- **See also** [Component Registration](/guide/components/registration) ## directives {#directives} @@ -190,4 +190,4 @@ An object that registers directives to be made available to the component instan A hash of directives to be made available to the component instance. -- **See also:** [Custom Directives](/guide/reusability/custom-directives) +- **See also** [Custom Directives](/guide/reusability/custom-directives) diff --git a/src/api/options-rendering.md b/src/api/options-rendering.md index eebb2b8528..a10c4c8212 100644 --- a/src/api/options-rendering.md +++ b/src/api/options-rendering.md @@ -51,13 +51,13 @@ A function that programmatically returns the virtual DOM tree of the component. type VNodeArrayChildren = (VNodeArrayChildren | VNodeChildAtom)[] ``` -- **Details:** +- **Details** `render` is an alternative to string templates that allows you to leverage the full programmatic power of JavaScript to declare the render output of the component. Pre-compiled templates, for example those in Single-File Components, are compiled into the `render` option at build time. If both `render` and `template` are present in a component, `render` will take higher priority. -- **See also:** +- **See also** - [Rendering Mechanism](/guide/extras/rendering-mechanism) - [Render Functions](/guide/extras/render-function) @@ -82,7 +82,7 @@ Configure runtime compiler options for the component's template. This config option is only respected when using the full build (i.e. the standalone `vue.js` that can compile templates in the browser). It supports the same options as the app-level [app.config.compilerOptions](/api/application#app-config-compileroptions), and has higher priority for the current component. -- **See also:** [app.config.compilerOptions](/api/application#app-config-compileroptions) +- **See also** [app.config.compilerOptions](/api/application#app-config-compileroptions) ## slots {#slots} diff --git a/src/api/options-state.md b/src/api/options-state.md index 9541430847..f91e744f6d 100644 --- a/src/api/options-state.md +++ b/src/api/options-state.md @@ -45,7 +45,7 @@ A function that returns the initial reactive state for the component instance. data: (vm) => ({ a: vm.myProp }) ``` -- **See also:** [Reactivity in Depth](/guide/extras/reactivity-in-depth) +- **See also** [Reactivity in Depth](/guide/extras/reactivity-in-depth) ## props {#props} @@ -125,7 +125,7 @@ Declare the props of a component. } ``` -- **See also:** +- **See also** - [Guide - Props](/guide/components/props) - [Guide - Typing Component Props](/guide/typescript/options-api#typing-component-props) @@ -207,7 +207,7 @@ Declare computed properties to be exposed on the component instance. } ``` -- **See also:** +- **See also** - [Guide - Computed Properties](/guide/essentials/computed) - [Guide - Typing Computed Properties](/guide/typescript/options-api#typing-computed-properties) @@ -250,7 +250,7 @@ Declare methods to be mixed into the component instance. } ``` -- **See also:** [Event Handling](/guide/essentials/event-handling) +- **See also** [Event Handling](/guide/essentials/event-handling) ## watch {#watch} @@ -368,7 +368,7 @@ Declare watch callbacks to be invoked on data change. } ``` -- **See also:** [Watchers](/guide/essentials/watchers) +- **See also** [Watchers](/guide/essentials/watchers) ## emits {#emits} @@ -433,7 +433,7 @@ Declare the custom events emitted by the component. } ``` -- **See also:** +- **See also** - [Guide - Fallthrough Attributes](/guide/components/attrs) - [Guide - Typing Component Emits](/guide/typescript/options-api#typing-component-emits) diff --git a/src/api/reactivity-advanced.md b/src/api/reactivity-advanced.md index 22f2d35be9..cb5e67f514 100644 --- a/src/api/reactivity-advanced.md +++ b/src/api/reactivity-advanced.md @@ -32,7 +32,7 @@ Shallow version of [`ref()`](./reactivity-core#ref). state.value = { count: 2 } ``` -- **See also:** +- **See also** - [Guide - Reduce Reactivity Overhead for Large Immutable Structures](/guide/best-practices/performance#reduce-reactivity-overhead-for-large-immutable-structures) - [Guide - Integration with External State Systems](/guide/extras/reactivity-in-depth#integration-with-external-state-systems) diff --git a/src/api/reactivity-core.md b/src/api/reactivity-core.md index 8fd27c989b..9e6c115685 100644 --- a/src/api/reactivity-core.md +++ b/src/api/reactivity-core.md @@ -39,7 +39,7 @@ Takes an inner value and returns a reactive and mutable ref object, which has a console.log(count.value) // 1 ``` -- **See also:** +- **See also** - [Guide - Reactive Variables with `ref()`](/guide/essentials/reactivity-fundamentals#reactive-variables-with-ref) - [Guide - Typing `ref()`](/guide/typescript/composition-api#typing-ref) @@ -108,7 +108,7 @@ Takes a getter function and returns a readonly reactive [ref](#ref) object for t }) ``` -- **See also:** +- **See also** - [Guide - Computed Properties](/guide/essentials/computed) - [Guide - Computed Debugging](/guide/extras/reactivity-in-depth#computed-debugging) - [Guide - Typing `computed()`](/guide/typescript/composition-api#typing-computed) @@ -186,7 +186,7 @@ Returns a reactive proxy of the object. console.log(obj.count === count.value) // true ``` -- **See also:** +- **See also** - [Guide - Reactivity Fundamentals](/guide/essentials/reactivity-fundamentals) - [Guide - Typing `reactive()`](/guide/typescript/composition-api#typing-reactive) @@ -308,7 +308,7 @@ Runs a function immediately while reactively tracking its dependencies and re-ru }) ``` -- **See also**: +- **See also** - [Guide - Watchers](/guide/essentials/watchers#watcheffect) - [Guide - Watcher Debugging](/guide/extras/reactivity-in-depth#watcher-debugging) @@ -481,7 +481,7 @@ Watches one or more reactive data sources and invokes a callback function when t }) ``` -- **See also**: +- **See also** - [Guide - Watchers](/guide/essentials/watchers) - [Guide - Watcher Debugging](/guide/extras/reactivity-in-depth#watcher-debugging) diff --git a/src/api/render-function.md b/src/api/render-function.md index eb35aaebb2..4798cd910d 100644 --- a/src/api/render-function.md +++ b/src/api/render-function.md @@ -93,7 +93,7 @@ Creates virtual DOM nodes (vnodes). }) ``` -- **See also:** [Guide - Render Functions - Creating VNodes](/guide/extras/render-function#creating-vnodes) +- **See also** [Guide - Render Functions - Creating VNodes](/guide/extras/render-function#creating-vnodes) ## mergeProps() {#mergeprops} @@ -228,7 +228,7 @@ For manually resolving a registered component by name.
-- **See also:** [Guide - Render Functions - Components](/guide/extras/render-function#components) +- **See also** [Guide - Render Functions - Components](/guide/extras/render-function#components) ## resolveDirective() {#resolvedirective} @@ -248,7 +248,7 @@ For manually resolving a registered directive by name. If the directive is not found, a runtime warning will be emitted, and the function returns `undefined`. -- **See also:** [Guide - Render Functions - Custom Directives](/guide/extras/render-function#custom-directives) +- **See also** [Guide - Render Functions - Custom Directives](/guide/extras/render-function#custom-directives) ## withDirectives() {#withdirectives} @@ -296,7 +296,7 @@ For adding custom directives to vnodes. ]) ``` -- **See also:** [Guide - Render Functions - Custom Directives](/guide/extras/render-function#custom-directives) +- **See also** [Guide - Render Functions - Custom Directives](/guide/extras/render-function#custom-directives) ## withModifiers() {#withmodifiers} @@ -321,4 +321,4 @@ For adding built-in [`v-on` modifiers](/guide/essentials/event-handling#event-mo }) ``` -- **See also:** [Guide - Render Functions - Event Modifiers](/guide/extras/render-function#event-modifiers) +- **See also** [Guide - Render Functions - Event Modifiers](/guide/extras/render-function#event-modifiers) diff --git a/src/api/ssr.md b/src/api/ssr.md index 18a2381954..a85101323a 100644 --- a/src/api/ssr.md +++ b/src/api/ssr.md @@ -43,7 +43,7 @@ Most other SSR APIs on this page also optionally accept a context object. The context object can be accessed in component code via the [useSSRContext](#usessrcontext) helper. -- **See also:** [Guide - Server-Side Rendering](/guide/scaling-up/ssr) +- **See also** [Guide - Server-Side Rendering](/guide/scaling-up/ssr) ## renderToNodeStream() {#rendertonodestream} diff --git a/src/api/utility-types.md b/src/api/utility-types.md index 5535b5535a..d91655a631 100644 --- a/src/api/utility-types.md +++ b/src/api/utility-types.md @@ -30,7 +30,7 @@ Used to annotate a prop with more advanced types when using runtime props declar } ``` -- **See also:** [Guide - Typing Component Props](/guide/typescript/options-api#typing-component-props) +- **See also** [Guide - Typing Component Props](/guide/typescript/options-api#typing-component-props) ## MaybeRef\ {#mayberef} @@ -125,7 +125,7 @@ Used to augment the component instance type to support custom global properties. Augmentations must be placed in a module `.ts` or `.d.ts` file. See [Type Augmentation Placement](/guide/typescript/options-api#augmenting-global-properties) for more details. ::: -- **See also:** [Guide - Augmenting Global Properties](/guide/typescript/options-api#augmenting-global-properties) +- **See also** [Guide - Augmenting Global Properties](/guide/typescript/options-api#augmenting-global-properties) ## ComponentCustomOptions {#componentcustomoptions} @@ -147,7 +147,7 @@ Used to augment the component options type to support custom options. Augmentations must be placed in a module `.ts` or `.d.ts` file. See [Type Augmentation Placement](/guide/typescript/options-api#augmenting-global-properties) for more details. ::: -- **See also:** [Guide - Augmenting Custom Options](/guide/typescript/options-api#augmenting-custom-options) +- **See also** [Guide - Augmenting Custom Options](/guide/typescript/options-api#augmenting-custom-options) ## ComponentCustomProps {#componentcustomprops} From 3f4e35c416e49af4ac70a6619e94db75169534f3 Mon Sep 17 00:00:00 2001 From: BUG <33438314+YuhuiM@users.noreply.github.com> Date: Tue, 13 Jun 2023 17:04:13 +0800 Subject: [PATCH 060/633] Improve boolean casting example (#2273) --- src/guide/components/props.md | 42 ++++++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/src/guide/components/props.md b/src/guide/components/props.md index c802deb141..869db5b5ac 100644 --- a/src/guide/components/props.md +++ b/src/guide/components/props.md @@ -589,27 +589,63 @@ The component can be used like this: ``` -When a prop is declared to allow multiple types, e.g. +When a prop is declared to allow multiple types, the casting rules for `Boolean` will also be applied. However, there is an edge when both `String` and `Boolean` are allowed - the Boolean casting rule only applies if Boolean appears before String:
```js +// disabled will be casted to true defineProps({ disabled: [Boolean, Number] }) + +// disabled will be casted to true +defineProps({ + disabled: [Boolean, String] +}) + +// disabled will be casted to true +defineProps({ + disabled: [Number, Boolean] +}) + +// disabled will be parsed as an empty string (disabled="") +defineProps({ + disabled: [String, Boolean] +}) ```
```js +// disabled will be casted to true export default { props: { disabled: [Boolean, Number] } } + +// disabled will be casted to true +export default { + props: { + disabled: [Boolean, String] + } +} + +// disabled will be casted to true +export default { + props: { + disabled: [Number, Boolean] + } +} + +// disabled will be parsed as an empty string (disabled="") +export default { + props: { + disabled: [String, Boolean] + } +} ```
- -If the array of types includes `Boolean` then the casting rules for `Boolean` will apply, unless `String` appears earlier in the array. From e602b1d58de7071e03a20833df214ba8feac6f04 Mon Sep 17 00:00:00 2001 From: David Krijgsman Date: Tue, 13 Jun 2023 11:21:55 +0200 Subject: [PATCH 061/633] Update provide-inject.md (#2317) --- src/guide/components/provide-inject.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/guide/components/provide-inject.md b/src/guide/components/provide-inject.md index a36a54964b..a90435d344 100644 --- a/src/guide/components/provide-inject.md +++ b/src/guide/components/provide-inject.md @@ -208,9 +208,11 @@ const value = inject('message', 'default value') In some cases, the default value may need to be created by calling a function or instantiating a new class. To avoid unnecessary computation or side effects in case the optional value is not used, we can use a factory function for creating the default value: ```js -const value = inject('key', () => new ExpensiveClass()) +const value = inject('key', () => new ExpensiveClass(), true) ``` +The third parameter indicates the default value should be treated as a factory function. +
From 79b448d5fc71a910c3ab60ddecc5c55458eb4526 Mon Sep 17 00:00:00 2001 From: Evan You Date: Tue, 13 Jun 2023 17:26:11 +0800 Subject: [PATCH 062/633] update inject api docs for factory usage close #1809, ref vuejs/core#6194 --- src/api/composition-api-dependency-injection.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/api/composition-api-dependency-injection.md b/src/api/composition-api-dependency-injection.md index ba8be73e2e..0245c385ca 100644 --- a/src/api/composition-api-dependency-injection.md +++ b/src/api/composition-api-dependency-injection.md @@ -66,7 +66,9 @@ Injects a value provided by an ancestor component or the application (via `app.p The first argument is the injection key. Vue will walk up the parent chain to locate a provided value with a matching key. If multiple components in the parent chain provides the same key, the one closest to the injecting component will "shadow" those higher up the chain. If no value with matching key was found, `inject()` returns `undefined` unless a default value is provided. - The second argument is optional and is the default value to be used when no matching value was found. It can also be a factory function to return values that are expensive to create. If the default value is a function, then `false` must be passed as the third argument to indicate that the function should be used as the value instead of the factory. + The second argument is optional and is the default value to be used when no matching value was found. + + The second argument can also be a factory function that returns values that are expensive to create. In this case, `true` must be passed as the third argument to indicate that the function should be used as a factory instead of the value itself. Similar to lifecycle hook registration APIs, `inject()` must be called synchronously during a component's `setup()` phase. @@ -93,11 +95,11 @@ Injects a value provided by an ancestor component or the application (via `app.p // inject with default value const bar = inject('foo', 'default value') - // inject with default value factory - const baz = inject('foo', () => new Map()) + // inject with function default value + const fn = inject('function', () => {}) - // inject with function default value, by passing the 3rd argument - const fn = inject('function', () => {}, false) + // inject with default value factory + const baz = inject('factory', () => new ExpensiveObject(), true) ``` From 1f28a6b1fb640efc5ce1bdc95b4eb458daff5377 Mon Sep 17 00:00:00 2001 From: Issayah Date: Tue, 13 Jun 2023 04:33:16 -0500 Subject: [PATCH 063/633] =?UTF-8?q?docs:=20update=20docs=20to=20use=20defi?= =?UTF-8?q?neOptions=20over=20requesting=20a=20second=20scrip=E2=80=A6=20(?= =?UTF-8?q?#2384)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/options-misc.md | 11 ++++------- src/guide/components/attrs.md | 13 ++++--------- src/guide/extras/composition-api-faq.md | 2 +- 3 files changed, 9 insertions(+), 17 deletions(-) diff --git a/src/api/options-misc.md b/src/api/options-misc.md index 9c42f7948b..b53182fae5 100644 --- a/src/api/options-misc.md +++ b/src/api/options-misc.md @@ -76,18 +76,15 @@ Controls whether the default component attribute fallthrough behavior should be
- When declaring this option in a component that uses ` -