2019-08-23 09:38:00 +08:00
|
|
|
// Public 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-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,
|
|
|
|
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'
|
2019-12-22 23:58:12 +08:00
|
|
|
export { defineComponent } from './apiDefineComponent'
|
2020-03-26 23:59:54 +08:00
|
|
|
export { defineAsyncComponent } from './apiAsyncComponent'
|
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'
|
2019-08-23 09:38:00 +08:00
|
|
|
export {
|
|
|
|
createVNode,
|
|
|
|
cloneVNode,
|
|
|
|
mergeProps,
|
|
|
|
openBlock,
|
|
|
|
createBlock
|
|
|
|
} from './vnode'
|
2019-10-30 10:28:38 +08:00
|
|
|
// Internal Components
|
2020-02-16 00:40:09 +08:00
|
|
|
export { Text, Comment, Fragment } from './vnode'
|
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'
|
2019-08-23 09:38:00 +08:00
|
|
|
|
2019-12-18 10:28:24 +08:00
|
|
|
// SFC CSS Modules
|
|
|
|
export { useCSSModule } from './helpers/useCssModule'
|
|
|
|
|
2020-02-19 02:26:15 +08:00
|
|
|
// SSR context
|
|
|
|
export { useSSRContext, ssrContextKey } from './helpers/useSsrContext'
|
|
|
|
|
2020-02-14 13:13:54 +08:00
|
|
|
// Internal API ----------------------------------------------------------------
|
|
|
|
|
2019-08-23 09:38:00 +08:00
|
|
|
// For custom renderers
|
2020-02-14 14:30:08 +08:00
|
|
|
export { createRenderer, createHydrationRenderer } from './renderer'
|
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'
|
2019-11-29 07:41:01 +08:00
|
|
|
export {
|
|
|
|
useTransitionState,
|
|
|
|
resolveTransitionHooks,
|
2020-02-14 13:13:54 +08:00
|
|
|
setTransitionHooks
|
2019-11-29 07:41:01 +08:00
|
|
|
} from './components/BaseTransition'
|
2019-08-23 09:38:00 +08:00
|
|
|
|
2019-12-13 01:42:21 +08:00
|
|
|
// For compiler generated code
|
2019-09-24 03:36:30 +08:00
|
|
|
// should sync with '@vue/compiler-core/src/runtimeConstants.ts'
|
2020-03-16 23:23:29 +08:00
|
|
|
export { withCtx } from './helpers/withRenderContext'
|
2019-10-19 04:35:01 +08:00
|
|
|
export { withDirectives } from './directives'
|
2019-10-19 00:09:04 +08:00
|
|
|
export {
|
|
|
|
resolveComponent,
|
|
|
|
resolveDirective,
|
|
|
|
resolveDynamicComponent
|
|
|
|
} from './helpers/resolveAssets'
|
2019-09-23 04:50:57 +08:00
|
|
|
export { renderList } from './helpers/renderList'
|
2019-09-25 08:51:48 +08:00
|
|
|
export { toHandlers } from './helpers/toHandlers'
|
2019-09-28 08:29:20 +08:00
|
|
|
export { renderSlot } from './helpers/renderSlot'
|
2019-10-03 11:10:41 +08:00
|
|
|
export { createSlots } from './helpers/createSlots'
|
2019-12-17 02:33:10 +08:00
|
|
|
export { pushScopeId, popScopeId, withScopeId } from './helpers/scopeId'
|
2020-02-13 00:56:42 +08:00
|
|
|
export {
|
|
|
|
setBlockTracking,
|
|
|
|
createTextVNode,
|
|
|
|
createCommentVNode,
|
|
|
|
createStaticVNode
|
|
|
|
} from './vnode'
|
2020-03-01 11:04:42 +08:00
|
|
|
export { toDisplayString, camelize } from '@vue/shared'
|
2019-09-01 04:36:36 +08:00
|
|
|
|
2019-12-13 01:42:21 +08:00
|
|
|
// For integration with runtime compiler
|
2019-09-21 00:16:19 +08:00
|
|
|
export { registerRuntimeCompiler } from './component'
|
2019-09-20 12:24:16 +08:00
|
|
|
|
2020-03-24 04:54:28 +08:00
|
|
|
// For test-utils
|
|
|
|
export { transformVNodeArgs } from './vnode'
|
|
|
|
|
2020-01-29 11:14:43 +08:00
|
|
|
// SSR -------------------------------------------------------------------------
|
2020-02-14 13:13:54 +08:00
|
|
|
|
2020-01-29 11:14:43 +08:00
|
|
|
import { createComponentInstance, setupComponent } from './component'
|
2020-02-06 12:07:23 +08:00
|
|
|
import {
|
|
|
|
renderComponentRoot,
|
|
|
|
setCurrentRenderingInstance
|
|
|
|
} from './componentRenderUtils'
|
2020-01-30 06:36:06 +08:00
|
|
|
import { isVNode, normalizeVNode } from './vnode'
|
2020-03-10 06:20:30 +08:00
|
|
|
import { normalizeSuspenseChildren } from './components/Suspense'
|
2020-01-29 11:14:43 +08:00
|
|
|
|
2020-01-29 22:49:17 +08:00
|
|
|
// SSR utils are only exposed in cjs builds.
|
2020-01-29 11:14:43 +08:00
|
|
|
const _ssrUtils = {
|
|
|
|
createComponentInstance,
|
|
|
|
setupComponent,
|
|
|
|
renderComponentRoot,
|
2020-02-06 12:07:23 +08:00
|
|
|
setCurrentRenderingInstance,
|
2020-01-30 06:36:06 +08:00
|
|
|
isVNode,
|
2020-03-10 06:20:30 +08:00
|
|
|
normalizeVNode,
|
|
|
|
normalizeSuspenseChildren
|
2020-01-29 11:14:43 +08:00
|
|
|
}
|
|
|
|
|
2020-01-29 22:49:17 +08:00
|
|
|
export const ssrUtils = (__NODE_JS__ ? _ssrUtils : null) as typeof _ssrUtils
|
2020-01-24 11:23:10 +08:00
|
|
|
|
2019-08-23 09:38:00 +08:00
|
|
|
// Types -----------------------------------------------------------------------
|
|
|
|
|
2020-02-14 13:13:54 +08:00
|
|
|
export {
|
|
|
|
ReactiveEffect,
|
|
|
|
ReactiveEffectOptions,
|
|
|
|
DebuggerEvent,
|
|
|
|
TrackOpTypes,
|
|
|
|
TriggerOpTypes,
|
|
|
|
Ref,
|
|
|
|
ComputedRef,
|
|
|
|
UnwrapRef,
|
|
|
|
WritableComputedOptions
|
|
|
|
} from '@vue/reactivity'
|
|
|
|
export {
|
|
|
|
// types
|
2020-03-23 23:11:27 +08:00
|
|
|
WatchEffect,
|
|
|
|
BaseWatchOptions,
|
2020-02-14 13:13:54 +08:00
|
|
|
WatchOptions,
|
|
|
|
WatchCallback,
|
|
|
|
WatchSource,
|
|
|
|
StopHandle
|
|
|
|
} 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,
|
|
|
|
VNodeTypes,
|
|
|
|
VNodeProps,
|
|
|
|
VNodeArrayChildren,
|
|
|
|
VNodeNormalizedChildren
|
|
|
|
} from './vnode'
|
2019-09-07 00:58:31 +08:00
|
|
|
export {
|
|
|
|
Component,
|
|
|
|
FunctionalComponent,
|
2019-09-21 00:16:19 +08:00
|
|
|
ComponentInternalInstance,
|
2019-11-23 02:15:59 +08:00
|
|
|
RenderFunction,
|
|
|
|
SetupContext
|
2019-09-07 00:58:31 +08:00
|
|
|
} from './component'
|
|
|
|
export {
|
|
|
|
ComponentOptions,
|
|
|
|
ComponentOptionsWithoutProps,
|
2019-10-08 21:26:09 +08:00
|
|
|
ComponentOptionsWithObjectProps as ComponentOptionsWithProps,
|
2019-09-07 00:58:31 +08:00
|
|
|
ComponentOptionsWithArrayProps
|
2020-04-04 07:08:17 +08:00
|
|
|
} from './componentOptions'
|
2019-10-02 22:03:43 +08:00
|
|
|
export { ComponentPublicInstance } from './componentProxy'
|
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,
|
|
|
|
ComponentObjectPropsOptions
|
|
|
|
} 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'
|