| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559 |
- // Core API ------------------------------------------------------------------
- export const version: string = __VERSION__
- export {
- // core
- reactive,
- ref,
- readonly,
- // utilities
- unref,
- proxyRefs,
- isRef,
- toRef,
- toValue,
- toRefs,
- isProxy,
- isReactive,
- isReadonly,
- isShallow,
- // advanced
- customRef,
- triggerRef,
- shallowRef,
- shallowReactive,
- shallowReadonly,
- markRaw,
- toRaw,
- // effect
- effect,
- stop,
- getCurrentWatcher,
- onWatcherCleanup,
- ReactiveEffect,
- // effect scope
- effectScope,
- EffectScope,
- getCurrentScope,
- onScopeDispose,
- } from '@vue/reactivity'
- export { computed } from './apiComputed'
- export {
- watch,
- watchEffect,
- watchPostEffect,
- watchSyncEffect,
- } from './apiWatch'
- export {
- onBeforeMount,
- onMounted,
- onBeforeUpdate,
- onUpdated,
- onBeforeUnmount,
- onUnmounted,
- onActivated,
- onDeactivated,
- onRenderTracked,
- onRenderTriggered,
- onErrorCaptured,
- onServerPrefetch,
- } from './apiLifecycle'
- export { provide, inject, hasInjectionContext } from './apiInject'
- export { nextTick } from './scheduler'
- export { defineComponent } from './apiDefineComponent'
- export { defineAsyncComponent } from './apiAsyncComponent'
- export { useAttrs, useSlots } from './apiSetupHelpers'
- export { useModel } from './helpers/useModel'
- export { useTemplateRef } from './helpers/useTemplateRef'
- export { useId } from './helpers/useId'
- export {
- hydrateOnIdle,
- hydrateOnVisible,
- hydrateOnMediaQuery,
- hydrateOnInteraction,
- } from './hydrationStrategies'
- // <script setup> API ----------------------------------------------------------
- export {
- // macros runtime, for typing and warnings only
- defineProps,
- defineEmits,
- defineExpose,
- defineOptions,
- defineSlots,
- defineModel,
- withDefaults,
- type DefineProps,
- type ModelRef,
- type ComponentTypeEmits,
- } from './apiSetupHelpers'
- /**
- * @internal
- */
- export {
- mergeDefaults,
- mergeModels,
- createPropsRestProxy,
- withAsyncContext,
- } from './apiSetupHelpers'
- // Advanced API ----------------------------------------------------------------
- // For getting a hold of the internal instance in setup() - useful for advanced
- // plugins
- export { getCurrentInstance } from './component'
- // For raw render function users
- export { h } from './h'
- // Advanced render function utilities
- export { createVNode, cloneVNode, mergeProps, isVNode } from './vnode'
- // VNode types
- export { Fragment, Text, Comment, Static, type VNodeRef } from './vnode'
- // Built-in components
- export { Teleport, type TeleportProps } from './components/Teleport'
- export { Suspense, type SuspenseProps } from './components/Suspense'
- export { KeepAlive, type KeepAliveProps } from './components/KeepAlive'
- export {
- BaseTransition,
- BaseTransitionPropsValidators,
- type BaseTransitionProps,
- } from './components/BaseTransition'
- // For using custom directives
- export { withDirectives } from './directives'
- // SSR context
- export { useSSRContext, ssrContextKey } from './helpers/useSsrContext'
- // Custom Renderer API ---------------------------------------------------------
- export { createRenderer, createHydrationRenderer } from './renderer'
- export { queuePostFlushCb } from './scheduler'
- import { warn as _warn } from './warning'
- export const warn = (__DEV__ ? _warn : NOOP) as typeof _warn
- /** @internal */
- export { assertNumber } from './warning'
- export {
- handleError,
- callWithErrorHandling,
- callWithAsyncErrorHandling,
- ErrorCodes,
- } from './errorHandling'
- export {
- resolveComponent,
- resolveDirective,
- resolveDynamicComponent,
- } from './helpers/resolveAssets'
- // For integration with runtime compiler
- export { registerRuntimeCompiler, isRuntimeOnly } from './component'
- export {
- useTransitionState,
- resolveTransitionHooks,
- setTransitionHooks,
- getTransitionRawChildren,
- } from './components/BaseTransition'
- export { initCustomFormatter } from './customFormatter'
- import { ErrorTypeStrings as _ErrorTypeStrings } from './errorHandling'
- /**
- * Runtime error messages. Only exposed in dev or esm builds.
- * @internal
- */
- export const ErrorTypeStrings = (
- __ESM_BUNDLER__ || __CJS__ || __DEV__ ? _ErrorTypeStrings : null
- ) as typeof _ErrorTypeStrings
- // For devtools
- import {
- type DevtoolsHook,
- devtools as _devtools,
- setDevtoolsHook as _setDevtoolsHook,
- } from './devtools'
- export const devtools = (
- __DEV__ || __ESM_BUNDLER__ ? _devtools : undefined
- ) as DevtoolsHook
- export const setDevtoolsHook = (
- __DEV__ || __ESM_BUNDLER__ ? _setDevtoolsHook : NOOP
- ) as typeof _setDevtoolsHook
- // Types -----------------------------------------------------------------------
- import type { VNode } from './vnode'
- import type { ComponentInternalInstance } from './component'
- // Augment Ref unwrap bail types.
- declare module '@vue/reactivity' {
- export interface RefUnwrapBailTypes {
- runtimeCoreBailTypes:
- | VNode
- | {
- // directly bailing on ComponentPublicInstance results in recursion
- // so we use this as a bail hint
- $: ComponentInternalInstance
- }
- }
- }
- export { TrackOpTypes, TriggerOpTypes } from '@vue/reactivity'
- export type {
- Ref,
- MaybeRef,
- MaybeRefOrGetter,
- ToRef,
- ToRefs,
- UnwrapRef,
- ShallowRef,
- ShallowUnwrapRef,
- CustomRefFactory,
- ReactiveFlags,
- DeepReadonly,
- ShallowReactive,
- UnwrapNestedRefs,
- ComputedRef,
- WritableComputedRef,
- WritableComputedOptions,
- ComputedGetter,
- ComputedSetter,
- ReactiveEffectRunner,
- ReactiveEffectOptions,
- EffectScheduler,
- DebuggerOptions,
- DebuggerEvent,
- DebuggerEventExtraInfo,
- Raw,
- Reactive,
- } from '@vue/reactivity'
- export type {
- MultiWatchSources,
- WatchEffect,
- WatchOptions,
- WatchEffectOptions as WatchOptionsBase,
- WatchCallback,
- WatchSource,
- WatchHandle,
- WatchStopHandle,
- } from './apiWatch'
- export type { InjectionKey } from './apiInject'
- export type {
- App,
- AppConfig,
- AppContext,
- GenericAppContext,
- Plugin,
- ObjectPlugin,
- FunctionPlugin,
- CreateAppFunction,
- OptionMergeFunction,
- } from './apiCreateApp'
- export type {
- VNode,
- VNodeChild,
- VNodeTypes,
- VNodeProps,
- VNodeArrayChildren,
- VNodeNormalizedChildren,
- } from './vnode'
- export type {
- Component,
- ConcreteComponent,
- FunctionalComponent,
- ComponentInternalInstance,
- SetupContext,
- ComponentCustomProps,
- AllowedComponentProps,
- GlobalComponents,
- GlobalDirectives,
- ComponentInstance,
- ComponentCustomElementInterface,
- } from './component'
- export type {
- DefineComponent,
- DefineSetupFnComponent,
- PublicProps,
- } from './apiDefineComponent'
- export type {
- ComponentOptions,
- ComponentOptionsMixin,
- ComponentCustomOptions,
- ComponentOptionsBase,
- ComponentProvideOptions,
- RenderFunction,
- MethodOptions,
- ComputedOptions,
- RuntimeCompilerOptions,
- ComponentInjectOptions,
- // deprecated
- ComponentOptionsWithoutProps,
- ComponentOptionsWithArrayProps,
- ComponentOptionsWithObjectProps,
- } from './componentOptions'
- export type {
- EmitsOptions,
- ObjectEmitsOptions,
- EmitsToProps,
- ShortEmitsToObject,
- EmitFn,
- } from './componentEmits'
- export type {
- ComponentPublicInstance,
- ComponentCustomProperties,
- CreateComponentPublicInstance,
- CreateComponentPublicInstanceWithMixins,
- } from './componentPublicInstance'
- export type {
- Renderer,
- RendererNode,
- RendererElement,
- HydrationRenderer,
- RendererOptions,
- RootRenderFunction,
- ElementNamespace,
- } from './renderer'
- export type { RootHydrateFunction } from './hydration'
- export type { Slot, Slots, SlotsType } from './componentSlots'
- export type {
- Prop,
- PropType,
- ComponentPropsOptions,
- ComponentObjectPropsOptions,
- ExtractPropTypes,
- ExtractPublicPropTypes,
- ExtractDefaultPropTypes,
- } from './componentProps'
- export type {
- Directive,
- DirectiveBinding,
- DirectiveHook,
- ObjectDirective,
- FunctionDirective,
- DirectiveArguments,
- DirectiveModifiers,
- } from './directives'
- export type { SuspenseBoundary } from './components/Suspense'
- export type {
- TransitionState,
- TransitionHooks,
- } from './components/BaseTransition'
- export type {
- AsyncComponentOptions,
- AsyncComponentLoader,
- } from './apiAsyncComponent'
- export type {
- HydrationStrategy,
- HydrationStrategyFactory,
- } from './hydrationStrategies'
- export type { HMRRuntime } from './hmr'
- // Internal API ----------------------------------------------------------------
- // **IMPORTANT** Internal APIs may change without notice between versions and
- // user code should avoid relying on them.
- // For compiler generated code
- // should sync with '@vue/compiler-core/src/runtimeHelpers.ts'
- export {
- withCtx,
- pushScopeId,
- popScopeId,
- withScopeId,
- } from './componentRenderContext'
- export { renderList } from './helpers/renderList'
- export { toHandlers } from './helpers/toHandlers'
- export { renderSlot } from './helpers/renderSlot'
- export { createSlots } from './helpers/createSlots'
- export { withMemo, isMemoSame } from './helpers/withMemo'
- export {
- openBlock,
- createBlock,
- setBlockTracking,
- createTextVNode,
- createCommentVNode,
- createStaticVNode,
- createElementVNode,
- createElementBlock,
- guardReactiveProps,
- } from './vnode'
- export {
- toDisplayString,
- camelize,
- capitalize,
- toHandlerKey,
- normalizeProps,
- normalizeClass,
- normalizeStyle,
- } from '@vue/shared'
- // For test-utils
- export { transformVNodeArgs } from './vnode'
- // SSR -------------------------------------------------------------------------
- // **IMPORTANT** These APIs are exposed solely for @vue/server-renderer and may
- // change without notice between versions. User code should never rely on them.
- import {
- createComponentInstance,
- getComponentPublicInstance,
- setupComponent,
- } from './component'
- import { renderComponentRoot } from './componentRenderUtils'
- import { setCurrentRenderingInstance } from './componentRenderContext'
- import { isVNode, normalizeVNode } from './vnode'
- import { ensureValidVNode } from './helpers/renderSlot'
- import { popWarningContext, pushWarningContext } from './warning'
- const _ssrUtils: {
- createComponentInstance: typeof createComponentInstance
- setupComponent: typeof setupComponent
- renderComponentRoot: typeof renderComponentRoot
- setCurrentRenderingInstance: typeof setCurrentRenderingInstance
- isVNode: typeof isVNode
- normalizeVNode: typeof normalizeVNode
- getComponentPublicInstance: typeof getComponentPublicInstance
- ensureValidVNode: typeof ensureValidVNode
- pushWarningContext: typeof pushWarningContext
- popWarningContext: typeof popWarningContext
- } = {
- createComponentInstance,
- setupComponent,
- renderComponentRoot,
- setCurrentRenderingInstance,
- isVNode,
- normalizeVNode,
- getComponentPublicInstance,
- ensureValidVNode,
- pushWarningContext,
- popWarningContext,
- }
- /**
- * SSR utils for \@vue/server-renderer. Only exposed in ssr-possible builds.
- * @internal
- */
- export const ssrUtils = (__SSR__ ? _ssrUtils : null) as typeof _ssrUtils
- // 2.x COMPAT ------------------------------------------------------------------
- import { DeprecationTypes as _DeprecationTypes } from './compat/compatConfig'
- export type { CompatVue } from './compat/global'
- export type { LegacyConfig } from './compat/globalConfig'
- import { warnDeprecation } from './compat/compatConfig'
- import { createCompatVue } from './compat/global'
- import {
- checkCompatEnabled,
- isCompatEnabled,
- softAssertCompatEnabled,
- } from './compat/compatConfig'
- import { resolveFilter as _resolveFilter } from './helpers/resolveAssets'
- import { NOOP } from '@vue/shared'
- /**
- * @internal only exposed in compat builds
- */
- export const resolveFilter: typeof _resolveFilter | null = __COMPAT__
- ? _resolveFilter
- : null
- const _compatUtils: {
- warnDeprecation: typeof warnDeprecation
- createCompatVue: typeof createCompatVue
- isCompatEnabled: typeof isCompatEnabled
- checkCompatEnabled: typeof checkCompatEnabled
- softAssertCompatEnabled: typeof softAssertCompatEnabled
- } = {
- warnDeprecation,
- createCompatVue,
- isCompatEnabled,
- checkCompatEnabled,
- softAssertCompatEnabled,
- }
- /**
- * @internal only exposed in compat builds.
- */
- export const compatUtils = (
- __COMPAT__ ? _compatUtils : null
- ) as typeof _compatUtils
- export const DeprecationTypes = (
- __COMPAT__ ? _DeprecationTypes : null
- ) as typeof _DeprecationTypes
- // VAPOR -----------------------------------------------------------------------
- // **IMPORTANT** These APIs are exposed solely for @vue/runtime-vapor and may
- // change without notice between versions. User code should never rely on them.
- /**
- * these types cannot be marked internal because runtime-vapor's type relies on
- * them, but they should be considered internal
- * @private
- */
- export {
- type ComponentInternalOptions,
- type GenericComponentInstance,
- type LifecycleHook,
- } from './component'
- export { type NormalizedPropsOptions } from './componentProps'
- /**
- * @internal
- */
- export { type VaporInteropInterface } from './apiCreateApp'
- /**
- * @internal
- */
- export { type RendererInternals } from './renderer'
- /**
- * @internal
- */
- export {
- baseNormalizePropsOptions,
- resolvePropValue,
- validateProps,
- } from './componentProps'
- /**
- * @internal
- */
- export { baseEmit, isEmitListener } from './componentEmits'
- /**
- * @internal
- */
- export { type SchedulerJob, queueJob, flushOnAppMount } from './scheduler'
- /**
- * @internal
- */
- export { expose, nextUid, validateComponentName } from './component'
- /**
- * @internal
- */
- export { pushWarningContext, popWarningContext } from './warning'
- /**
- * @internal
- */
- export {
- createAppAPI,
- type AppMountFn,
- type AppUnmountFn,
- } from './apiCreateApp'
- /**
- * @internal
- */
- export {
- currentInstance,
- simpleSetCurrentInstance,
- } from './componentCurrentInstance'
- /**
- * @internal
- */
- export { registerHMR, unregisterHMR } from './hmr'
- /**
- * @internal
- */
- export { startMeasure, endMeasure } from './profiling'
- /**
- * @internal
- */
- export { initFeatureFlags } from './featureFlags'
|