2023-11-29 01:25:46 +08:00
|
|
|
// Core API ------------------------------------------------------------------
|
|
|
|
|
2024-08-09 16:56:59 +08:00
|
|
|
export const version: string = __VERSION__
|
2023-11-29 01:25:46 +08:00
|
|
|
export {
|
|
|
|
// core
|
2024-05-27 02:37:06 +08:00
|
|
|
TrackOpTypes,
|
|
|
|
TriggerOpTypes,
|
2023-11-29 01:25:46 +08:00
|
|
|
reactive,
|
|
|
|
ref,
|
|
|
|
readonly,
|
2023-11-29 02:38:01 +08:00
|
|
|
computed,
|
2023-11-29 01:25:46 +08:00
|
|
|
// utilities
|
|
|
|
unref,
|
|
|
|
proxyRefs,
|
|
|
|
isRef,
|
|
|
|
toRef,
|
|
|
|
toValue,
|
|
|
|
toRefs,
|
|
|
|
isProxy,
|
|
|
|
isReactive,
|
|
|
|
isReadonly,
|
|
|
|
isShallow,
|
|
|
|
// advanced
|
|
|
|
customRef,
|
|
|
|
triggerRef,
|
|
|
|
shallowRef,
|
|
|
|
shallowReactive,
|
|
|
|
shallowReadonly,
|
|
|
|
markRaw,
|
|
|
|
toRaw,
|
|
|
|
// effect
|
|
|
|
stop,
|
|
|
|
ReactiveEffect,
|
2024-03-18 21:57:18 +08:00
|
|
|
onEffectCleanup,
|
2023-11-29 01:25:46 +08:00
|
|
|
// effect scope
|
|
|
|
effectScope,
|
|
|
|
EffectScope,
|
|
|
|
getCurrentScope,
|
2023-12-01 01:28:16 +08:00
|
|
|
onScopeDispose,
|
2024-03-18 21:57:18 +08:00
|
|
|
// baseWatch
|
|
|
|
onWatcherCleanup,
|
|
|
|
getCurrentWatcher,
|
2023-11-29 01:25:46 +08:00
|
|
|
} from '@vue/reactivity'
|
2024-11-16 03:51:08 +08:00
|
|
|
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'
|
2023-12-03 18:36:01 +08:00
|
|
|
|
2024-04-28 18:43:16 +08:00
|
|
|
import { NOOP } from '@vue/shared'
|
|
|
|
import { warn as _warn } from './warning'
|
|
|
|
export const warn = (__DEV__ ? _warn : NOOP) as typeof _warn
|
|
|
|
|
2024-01-19 16:59:03 +08:00
|
|
|
export { nextTick } from './scheduler'
|
2024-02-07 21:03:46 +08:00
|
|
|
export {
|
|
|
|
getCurrentInstance,
|
2024-12-01 16:41:51 +08:00
|
|
|
type ComponentInternalInstance as ComponentInternalInstance,
|
2024-09-17 10:32:28 +08:00
|
|
|
type Component as Component,
|
2024-02-07 21:03:46 +08:00
|
|
|
type ObjectComponent,
|
|
|
|
type FunctionalComponent,
|
|
|
|
type SetupFn,
|
|
|
|
} from './component'
|
2024-04-14 17:41:58 +08:00
|
|
|
export { createSlot } from './componentSlots'
|
2024-03-18 20:13:40 +08:00
|
|
|
export { renderEffect } from './renderEffect'
|
2024-02-25 15:23:29 +08:00
|
|
|
export {
|
|
|
|
watch,
|
|
|
|
watchEffect,
|
|
|
|
watchPostEffect,
|
|
|
|
watchSyncEffect,
|
|
|
|
type WatchEffect,
|
|
|
|
type WatchOptions,
|
|
|
|
type WatchOptionsBase,
|
|
|
|
type WatchCallback,
|
|
|
|
type WatchSource,
|
|
|
|
type WatchStopHandle,
|
|
|
|
} from './apiWatch'
|
|
|
|
export {
|
|
|
|
withDirectives,
|
|
|
|
type Directive,
|
|
|
|
type DirectiveBinding,
|
|
|
|
type DirectiveArguments,
|
|
|
|
type DirectiveModifiers,
|
|
|
|
} from './directives'
|
2024-02-25 15:11:25 +08:00
|
|
|
|
2024-02-26 22:37:08 +08:00
|
|
|
export { template, children, next } from './dom/template'
|
2024-02-26 21:38:04 +08:00
|
|
|
export { insert, prepend, remove, createTextNode } from './dom/element'
|
2024-02-25 15:11:25 +08:00
|
|
|
export { setStyle } from './dom/style'
|
|
|
|
export {
|
|
|
|
setText,
|
|
|
|
setHtml,
|
|
|
|
setClass,
|
|
|
|
setAttr,
|
|
|
|
setDOMProp,
|
|
|
|
setDynamicProp,
|
|
|
|
setDynamicProps,
|
|
|
|
} from './dom/prop'
|
2024-03-14 14:15:45 +08:00
|
|
|
export { on, delegate, delegateEvents, setDynamicEvents } from './dom/event'
|
2024-02-25 15:11:25 +08:00
|
|
|
export { setRef } from './dom/templateRef'
|
|
|
|
|
2024-01-31 18:06:16 +08:00
|
|
|
export { defineComponent } from './apiDefineComponent'
|
2024-03-22 23:41:16 +08:00
|
|
|
export {
|
|
|
|
type InjectionKey,
|
|
|
|
inject,
|
|
|
|
provide,
|
|
|
|
hasInjectionContext,
|
|
|
|
} from './apiInject'
|
2024-02-25 15:23:29 +08:00
|
|
|
export {
|
|
|
|
onBeforeMount,
|
|
|
|
onMounted,
|
|
|
|
onBeforeUpdate,
|
|
|
|
onUpdated,
|
|
|
|
onBeforeUnmount,
|
|
|
|
onUnmounted,
|
|
|
|
// onActivated,
|
|
|
|
// onDeactivated,
|
2024-04-21 20:30:47 +08:00
|
|
|
onRenderTracked,
|
|
|
|
onRenderTriggered,
|
2024-02-25 15:23:29 +08:00
|
|
|
onErrorCaptured,
|
|
|
|
// onServerPrefetch,
|
|
|
|
} from './apiLifecycle'
|
2024-04-01 03:51:37 +08:00
|
|
|
export { useAttrs, useSlots } from './apiSetupHelpers'
|
2024-03-16 18:54:36 +08:00
|
|
|
export {
|
|
|
|
createVaporApp,
|
|
|
|
type App,
|
|
|
|
type AppConfig,
|
|
|
|
type AppContext,
|
2024-05-17 20:54:08 +08:00
|
|
|
type Plugin,
|
|
|
|
type ObjectPlugin,
|
|
|
|
type FunctionPlugin,
|
2024-03-16 18:54:36 +08:00
|
|
|
} from './apiCreateVaporApp'
|
2024-11-15 04:49:06 +08:00
|
|
|
export { createBranch, createIf } from './apiCreateIf'
|
2024-05-21 08:50:10 +08:00
|
|
|
export { createFor, createForSlots } from './apiCreateFor'
|
2024-03-16 18:54:36 +08:00
|
|
|
export { createComponent } from './apiCreateComponent'
|
2024-09-22 02:30:21 +08:00
|
|
|
export { createSelector } from './apiCreateSelector'
|
2024-11-14 20:01:10 +08:00
|
|
|
export { setInheritAttrs } from './componentAttrs'
|
2024-03-16 18:54:36 +08:00
|
|
|
|
2024-11-13 14:56:39 +08:00
|
|
|
export {
|
|
|
|
resolveComponent,
|
|
|
|
resolveDirective,
|
|
|
|
resolveDynamicComponent,
|
|
|
|
} from './helpers/resolveAssets'
|
2024-05-01 19:01:57 +08:00
|
|
|
export { toHandlers } from './helpers/toHandlers'
|
2024-01-21 02:16:30 +08:00
|
|
|
|
2024-05-31 15:49:49 +08:00
|
|
|
export { withDestructure } from './destructure'
|
|
|
|
|
2024-02-25 15:23:29 +08:00
|
|
|
// **Internal** DOM-only runtime directive helpers
|
|
|
|
export {
|
|
|
|
vModelText,
|
|
|
|
vModelCheckbox,
|
|
|
|
vModelRadio,
|
|
|
|
vModelSelect,
|
|
|
|
vModelDynamic,
|
|
|
|
} from './directives/vModel'
|
|
|
|
export { vShow } from './directives/vShow'
|
2024-06-21 14:03:11 +08:00
|
|
|
|
|
|
|
// 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
|