2020-05-01 22:37:40 +08:00
|
|
|
// Core API ------------------------------------------------------------------
|
2019-08-22 23:12:37 +08:00
|
|
|
|
2019-11-05 07:38:55 +08:00
|
|
|
export const version = __VERSION__
|
2020-02-14 13:13:54 +08:00
|
|
|
export {
|
2020-04-16 04:45:20 +08:00
|
|
|
// core
|
|
|
|
reactive,
|
2020-02-14 13:13:54 +08:00
|
|
|
ref,
|
2020-04-16 04:45:20 +08:00
|
|
|
readonly,
|
|
|
|
// utilities
|
2020-02-22 11:39:32 +08:00
|
|
|
unref,
|
2020-07-29 04:30:56 +08:00
|
|
|
proxyRefs,
|
2020-02-14 13:13:54 +08:00
|
|
|
isRef,
|
2020-04-15 08:49:18 +08:00
|
|
|
toRef,
|
2020-02-14 13:13:54 +08:00
|
|
|
toRefs,
|
2020-04-16 04:45:20 +08:00
|
|
|
isProxy,
|
2020-02-14 13:13:54 +08:00
|
|
|
isReactive,
|
|
|
|
isReadonly,
|
2020-04-16 04:45:20 +08:00
|
|
|
// advanced
|
|
|
|
customRef,
|
2020-04-23 06:00:10 +08:00
|
|
|
triggerRef,
|
2020-04-16 04:45:20 +08:00
|
|
|
shallowRef,
|
2020-02-14 13:13:54 +08:00
|
|
|
shallowReactive,
|
2020-04-15 11:49:46 +08:00
|
|
|
shallowReadonly,
|
2020-04-16 04:45:20 +08:00
|
|
|
markRaw,
|
2020-04-15 08:45:41 +08:00
|
|
|
toRaw
|
2020-02-14 13:13:54 +08:00
|
|
|
} from '@vue/reactivity'
|
|
|
|
export { computed } from './apiComputed'
|
2020-02-22 15:19:10 +08:00
|
|
|
export { watch, watchEffect } from './apiWatch'
|
2020-02-14 13:13:54 +08:00
|
|
|
export {
|
|
|
|
onBeforeMount,
|
|
|
|
onMounted,
|
|
|
|
onBeforeUpdate,
|
|
|
|
onUpdated,
|
|
|
|
onBeforeUnmount,
|
|
|
|
onUnmounted,
|
|
|
|
onActivated,
|
|
|
|
onDeactivated,
|
|
|
|
onRenderTracked,
|
|
|
|
onRenderTriggered,
|
|
|
|
onErrorCaptured
|
|
|
|
} from './apiLifecycle'
|
|
|
|
export { provide, inject } from './apiInject'
|
2019-11-03 00:18:35 +08:00
|
|
|
export { nextTick } from './scheduler'
|
2020-09-16 22:09:35 +08:00
|
|
|
export { defineComponent } from './apiDefineComponent'
|
2020-03-26 23:59:54 +08:00
|
|
|
export { defineAsyncComponent } from './apiAsyncComponent'
|
2020-11-25 04:12:59 +08:00
|
|
|
export { defineProps, defineEmit, useContext } from './apiSetupHelpers'
|
2019-08-22 23:12:37 +08:00
|
|
|
|
2019-08-23 09:38:00 +08:00
|
|
|
// Advanced API ----------------------------------------------------------------
|
|
|
|
|
2019-11-03 00:18:35 +08:00
|
|
|
// For getting a hold of the internal instance in setup() - useful for advanced
|
|
|
|
// plugins
|
|
|
|
export { getCurrentInstance } from './component'
|
|
|
|
|
2019-08-23 09:38:00 +08:00
|
|
|
// For raw render function users
|
2019-08-24 03:27:17 +08:00
|
|
|
export { h } from './h'
|
2020-05-01 22:37:40 +08:00
|
|
|
// Advanced render function utilities
|
2020-05-11 23:09:36 +08:00
|
|
|
export { createVNode, cloneVNode, mergeProps, isVNode } from './vnode'
|
2020-05-01 22:37:40 +08:00
|
|
|
// VNode types
|
2020-07-20 02:09:37 +08:00
|
|
|
export { Fragment, Text, Comment, Static } from './vnode'
|
2020-05-01 22:37:40 +08:00
|
|
|
// Built-in components
|
2020-03-31 22:52:42 +08:00
|
|
|
export { Teleport, TeleportProps } from './components/Teleport'
|
2019-11-05 07:38:55 +08:00
|
|
|
export { Suspense, SuspenseProps } from './components/Suspense'
|
|
|
|
export { KeepAlive, KeepAliveProps } from './components/KeepAlive'
|
2019-11-25 05:00:46 +08:00
|
|
|
export {
|
|
|
|
BaseTransition,
|
|
|
|
BaseTransitionProps
|
|
|
|
} from './components/BaseTransition'
|
2020-05-02 22:19:40 +08:00
|
|
|
// For using custom directives
|
|
|
|
export { withDirectives } from './directives'
|
2020-02-19 02:26:15 +08:00
|
|
|
// SSR context
|
|
|
|
export { useSSRContext, ssrContextKey } from './helpers/useSsrContext'
|
|
|
|
|
2020-05-01 05:04:35 +08:00
|
|
|
// Custom Renderer API ---------------------------------------------------------
|
2020-02-14 13:13:54 +08:00
|
|
|
|
2020-02-14 14:30:08 +08:00
|
|
|
export { createRenderer, createHydrationRenderer } from './renderer'
|
2020-05-01 02:58:50 +08:00
|
|
|
export { queuePostFlushCb } from './scheduler'
|
2019-10-11 06:02:51 +08:00
|
|
|
export { warn } from './warning'
|
2019-08-31 03:05:39 +08:00
|
|
|
export {
|
|
|
|
handleError,
|
|
|
|
callWithErrorHandling,
|
2020-03-15 23:40:58 +08:00
|
|
|
callWithAsyncErrorHandling,
|
|
|
|
ErrorCodes
|
2019-08-31 03:05:39 +08:00
|
|
|
} from './errorHandling'
|
2020-05-04 20:52:59 +08:00
|
|
|
export {
|
|
|
|
resolveComponent,
|
|
|
|
resolveDirective,
|
|
|
|
resolveDynamicComponent
|
|
|
|
} from './helpers/resolveAssets'
|
|
|
|
// For integration with runtime compiler
|
2021-02-25 05:18:55 +08:00
|
|
|
export { registerRuntimeCompiler, isRuntimeOnly } from './component'
|
2019-11-29 07:41:01 +08:00
|
|
|
export {
|
|
|
|
useTransitionState,
|
|
|
|
resolveTransitionHooks,
|
2020-06-30 00:04:28 +08:00
|
|
|
setTransitionHooks,
|
|
|
|
getTransitionRawChildren
|
2019-11-29 07:41:01 +08:00
|
|
|
} from './components/BaseTransition'
|
2020-10-13 23:50:09 +08:00
|
|
|
export { initCustomFormatter } from './customFormatter'
|
2019-08-23 09:38:00 +08:00
|
|
|
|
2020-07-17 06:18:52 +08:00
|
|
|
// For devtools
|
|
|
|
export { devtools, setDevtoolsHook } from './devtools'
|
|
|
|
|
|
|
|
// Types -------------------------------------------------------------------------
|
2019-08-23 09:38:00 +08:00
|
|
|
|
2020-05-02 04:14:30 +08:00
|
|
|
import { VNode } from './vnode'
|
|
|
|
import { ComponentInternalInstance } from './component'
|
|
|
|
|
|
|
|
// Augment Ref unwrap bail types.
|
|
|
|
// Note: if updating this, also update `types/refBail.d.ts`.
|
|
|
|
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
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-02-14 13:13:54 +08:00
|
|
|
export {
|
|
|
|
ReactiveEffect,
|
|
|
|
ReactiveEffectOptions,
|
|
|
|
DebuggerEvent,
|
|
|
|
TrackOpTypes,
|
|
|
|
TriggerOpTypes,
|
|
|
|
Ref,
|
|
|
|
ComputedRef,
|
2020-07-08 23:49:07 +08:00
|
|
|
WritableComputedRef,
|
2020-02-14 13:13:54 +08:00
|
|
|
UnwrapRef,
|
2020-07-29 04:30:56 +08:00
|
|
|
ShallowUnwrapRef,
|
2020-04-25 01:10:16 +08:00
|
|
|
WritableComputedOptions,
|
2020-07-17 21:29:44 +08:00
|
|
|
ToRefs,
|
|
|
|
DeepReadonly
|
2020-02-14 13:13:54 +08:00
|
|
|
} from '@vue/reactivity'
|
|
|
|
export {
|
|
|
|
// types
|
2020-03-23 23:11:27 +08:00
|
|
|
WatchEffect,
|
2020-02-14 13:13:54 +08:00
|
|
|
WatchOptions,
|
2020-04-28 01:33:57 +08:00
|
|
|
WatchOptionsBase,
|
2020-02-14 13:13:54 +08:00
|
|
|
WatchCallback,
|
|
|
|
WatchSource,
|
2020-04-28 01:33:57 +08:00
|
|
|
WatchStopHandle
|
2020-02-14 13:13:54 +08:00
|
|
|
} from './apiWatch'
|
|
|
|
export { InjectionKey } from './apiInject'
|
2020-01-24 04:05:38 +08:00
|
|
|
export {
|
|
|
|
App,
|
|
|
|
AppConfig,
|
|
|
|
AppContext,
|
|
|
|
Plugin,
|
2020-03-24 23:59:00 +08:00
|
|
|
CreateAppFunction,
|
|
|
|
OptionMergeFunction
|
2020-01-24 04:05:38 +08:00
|
|
|
} from './apiCreateApp'
|
2020-01-29 11:58:02 +08:00
|
|
|
export {
|
|
|
|
VNode,
|
2020-05-01 22:37:40 +08:00
|
|
|
VNodeChild,
|
2020-01-29 11:58:02 +08:00
|
|
|
VNodeTypes,
|
|
|
|
VNodeProps,
|
|
|
|
VNodeArrayChildren,
|
|
|
|
VNodeNormalizedChildren
|
|
|
|
} from './vnode'
|
2019-09-07 00:58:31 +08:00
|
|
|
export {
|
|
|
|
Component,
|
2020-08-20 04:11:29 +08:00
|
|
|
ConcreteComponent,
|
2019-09-07 00:58:31 +08:00
|
|
|
FunctionalComponent,
|
2019-09-21 00:16:19 +08:00
|
|
|
ComponentInternalInstance,
|
2020-07-20 02:09:37 +08:00
|
|
|
SetupContext,
|
|
|
|
ComponentCustomProps,
|
|
|
|
AllowedComponentProps
|
2019-09-07 00:58:31 +08:00
|
|
|
} from './component'
|
2020-09-16 22:09:35 +08:00
|
|
|
export { DefineComponent } from './apiDefineComponent'
|
2019-09-07 00:58:31 +08:00
|
|
|
export {
|
|
|
|
ComponentOptions,
|
2020-06-15 23:13:00 +08:00
|
|
|
ComponentOptionsMixin,
|
2019-09-07 00:58:31 +08:00
|
|
|
ComponentOptionsWithoutProps,
|
2020-04-17 21:41:36 +08:00
|
|
|
ComponentOptionsWithObjectProps,
|
|
|
|
ComponentOptionsWithArrayProps,
|
2020-04-28 01:31:40 +08:00
|
|
|
ComponentCustomOptions,
|
2020-05-01 22:37:40 +08:00
|
|
|
ComponentOptionsBase,
|
2020-09-16 21:29:42 +08:00
|
|
|
RenderFunction,
|
|
|
|
MethodOptions,
|
2021-04-28 23:35:59 +08:00
|
|
|
ComputedOptions,
|
|
|
|
RuntimeCompilerOptions
|
2020-04-04 07:08:17 +08:00
|
|
|
} from './componentOptions'
|
2020-09-16 21:29:42 +08:00
|
|
|
export { EmitsOptions, ObjectEmitsOptions } from './componentEmits'
|
2020-04-17 21:12:50 +08:00
|
|
|
export {
|
|
|
|
ComponentPublicInstance,
|
|
|
|
ComponentCustomProperties
|
2020-08-20 04:11:29 +08:00
|
|
|
} from './componentPublicInstance'
|
2020-02-15 01:33:32 +08:00
|
|
|
export {
|
|
|
|
Renderer,
|
2020-03-27 21:30:49 +08:00
|
|
|
RendererNode,
|
|
|
|
RendererElement,
|
2020-02-15 01:33:32 +08:00
|
|
|
HydrationRenderer,
|
|
|
|
RendererOptions,
|
|
|
|
RootRenderFunction
|
|
|
|
} from './renderer'
|
|
|
|
export { RootHydrateFunction } from './hydration'
|
2019-08-23 09:38:00 +08:00
|
|
|
export { Slot, Slots } from './componentSlots'
|
2019-10-08 21:26:09 +08:00
|
|
|
export {
|
|
|
|
Prop,
|
|
|
|
PropType,
|
|
|
|
ComponentPropsOptions,
|
2020-04-17 21:00:25 +08:00
|
|
|
ComponentObjectPropsOptions,
|
2020-09-16 22:09:35 +08:00
|
|
|
ExtractPropTypes,
|
|
|
|
ExtractDefaultPropTypes
|
2019-10-08 21:26:09 +08:00
|
|
|
} from './componentProps'
|
2019-09-07 00:58:31 +08:00
|
|
|
export {
|
|
|
|
Directive,
|
|
|
|
DirectiveBinding,
|
|
|
|
DirectiveHook,
|
2019-10-16 14:12:26 +08:00
|
|
|
ObjectDirective,
|
|
|
|
FunctionDirective,
|
2019-09-07 00:58:31 +08:00
|
|
|
DirectiveArguments
|
|
|
|
} from './directives'
|
2019-11-05 07:38:55 +08:00
|
|
|
export { SuspenseBoundary } from './components/Suspense'
|
2020-02-14 13:13:54 +08:00
|
|
|
export { TransitionState, TransitionHooks } from './components/BaseTransition'
|
2020-03-22 04:01:08 +08:00
|
|
|
export {
|
|
|
|
AsyncComponentOptions,
|
|
|
|
AsyncComponentLoader
|
|
|
|
} from './apiAsyncComponent'
|
2019-12-17 06:57:34 +08:00
|
|
|
export { HMRRuntime } from './hmr'
|
2020-05-01 05:04:35 +08:00
|
|
|
|
|
|
|
// Internal API ----------------------------------------------------------------
|
|
|
|
|
|
|
|
// **IMPORTANT** Internal APIs may change without notice between versions and
|
|
|
|
// user code should avoid relying on them.
|
|
|
|
|
|
|
|
// For compiler generated code
|
2021-03-27 22:53:45 +08:00
|
|
|
// should sync with '@vue/compiler-core/src/runtimeHelpers.ts'
|
|
|
|
export {
|
|
|
|
withCtx,
|
|
|
|
pushScopeId,
|
|
|
|
popScopeId,
|
|
|
|
withScopeId
|
|
|
|
} from './componentRenderContext'
|
2020-05-01 05:04:35 +08:00
|
|
|
export { renderList } from './helpers/renderList'
|
|
|
|
export { toHandlers } from './helpers/toHandlers'
|
|
|
|
export { renderSlot } from './helpers/renderSlot'
|
|
|
|
export { createSlots } from './helpers/createSlots'
|
|
|
|
export {
|
2020-05-01 22:37:40 +08:00
|
|
|
openBlock,
|
|
|
|
createBlock,
|
2020-05-01 05:04:35 +08:00
|
|
|
setBlockTracking,
|
|
|
|
createTextVNode,
|
|
|
|
createCommentVNode,
|
|
|
|
createStaticVNode
|
|
|
|
} from './vnode'
|
2020-10-20 05:15:53 +08:00
|
|
|
export {
|
|
|
|
toDisplayString,
|
|
|
|
camelize,
|
|
|
|
capitalize,
|
|
|
|
toHandlerKey
|
|
|
|
} from '@vue/shared'
|
2020-05-01 21:19:30 +08:00
|
|
|
|
2020-05-01 05:04:35 +08:00
|
|
|
// 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, setupComponent } from './component'
|
2021-03-06 00:10:06 +08:00
|
|
|
import { renderComponentRoot } from './componentRenderUtils'
|
|
|
|
import { setCurrentRenderingInstance } from './componentRenderContext'
|
2020-05-01 05:04:35 +08:00
|
|
|
import { isVNode, normalizeVNode } from './vnode'
|
|
|
|
|
|
|
|
const _ssrUtils = {
|
|
|
|
createComponentInstance,
|
|
|
|
setupComponent,
|
|
|
|
renderComponentRoot,
|
|
|
|
setCurrentRenderingInstance,
|
|
|
|
isVNode,
|
2020-09-16 00:45:06 +08:00
|
|
|
normalizeVNode
|
2020-05-01 05:04:35 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* SSR utils for \@vue/server-renderer. Only exposed in cjs builds.
|
|
|
|
* @internal
|
|
|
|
*/
|
|
|
|
export const ssrUtils = (__NODE_JS__ ? _ssrUtils : null) as typeof _ssrUtils
|
2021-04-06 05:09:22 +08:00
|
|
|
|
|
|
|
// 2.x COMPAT ------------------------------------------------------------------
|
|
|
|
|
2021-04-13 06:47:50 +08:00
|
|
|
export { DeprecationTypes } from './compat/compatConfig'
|
2021-04-07 23:22:56 +08:00
|
|
|
export { CompatVue } from './compat/global'
|
2021-04-07 05:38:43 +08:00
|
|
|
export { LegacyConfig } from './compat/globalConfig'
|
2021-04-07 23:22:56 +08:00
|
|
|
|
2021-04-13 06:47:50 +08:00
|
|
|
import { warnDeprecation } from './compat/compatConfig'
|
2021-04-07 23:22:56 +08:00
|
|
|
import { createCompatVue } from './compat/global'
|
2021-04-10 11:51:50 +08:00
|
|
|
import {
|
|
|
|
isCompatEnabled,
|
|
|
|
checkCompatEnabled,
|
|
|
|
softAssertCompatEnabled
|
|
|
|
} from './compat/compatConfig'
|
2021-04-20 00:08:26 +08:00
|
|
|
import { resolveFilter as _resolveFilter } from './helpers/resolveAssets'
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @internal only exposed in compat builds
|
|
|
|
*/
|
|
|
|
export const resolveFilter = __COMPAT__ ? _resolveFilter : null
|
2021-04-07 23:22:56 +08:00
|
|
|
|
|
|
|
const _compatUtils = {
|
|
|
|
warnDeprecation,
|
|
|
|
createCompatVue,
|
2021-04-08 03:54:36 +08:00
|
|
|
isCompatEnabled,
|
2021-04-10 11:51:50 +08:00
|
|
|
checkCompatEnabled,
|
2021-04-08 03:54:36 +08:00
|
|
|
softAssertCompatEnabled
|
2021-04-07 23:22:56 +08:00
|
|
|
}
|
|
|
|
|
2021-04-09 05:15:02 +08:00
|
|
|
/**
|
|
|
|
* @internal only exposed in compat builds.
|
|
|
|
*/
|
2021-04-07 23:22:56 +08:00
|
|
|
export const compatUtils = (__COMPAT__
|
|
|
|
? _compatUtils
|
|
|
|
: null) as typeof _compatUtils
|