vue3-core/packages/runtime-vapor/src/index.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

192 lines
4.0 KiB
TypeScript
Raw Normal View History

// Core API ------------------------------------------------------------------
export const version: string = __VERSION__
export {
// core
TrackOpTypes,
TriggerOpTypes,
reactive,
ref,
readonly,
2023-11-29 02:38:01 +08:00
computed,
// utilities
unref,
proxyRefs,
isRef,
toRef,
toValue,
toRefs,
isProxy,
isReactive,
isReadonly,
isShallow,
// advanced
customRef,
triggerRef,
shallowRef,
shallowReactive,
shallowReadonly,
markRaw,
toRaw,
// effect
stop,
ReactiveEffect,
onEffectCleanup,
// effect scope
effectScope,
EffectScope,
getCurrentScope,
2023-12-01 01:28:16 +08:00
onScopeDispose,
// baseWatch
onWatcherCleanup,
getCurrentWatcher,
} 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'
2023-12-03 18:36:01 +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'
export {
getCurrentInstance,
type ComponentInternalInstance as ComponentInternalInstance,
type Component as Component,
type ObjectComponent,
type FunctionalComponent,
type SetupFn,
} from './component'
export { createSlot } from './componentSlots'
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-26 22:37:08 +08:00
export { template, children, next } from './dom/template'
export { insert, prepend, remove, createTextNode } from './dom/element'
export { setStyle } from './dom/style'
export {
setText,
setHtml,
setClass,
setAttr,
setDOMProp,
setDynamicProp,
setDynamicProps,
} from './dom/prop'
export { on, delegate, delegateEvents, setDynamicEvents } from './dom/event'
export { setRef } from './dom/templateRef'
export { defineComponent } from './apiDefineComponent'
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,
onRenderTracked,
onRenderTriggered,
2024-02-25 15:23:29 +08:00
onErrorCaptured,
// onServerPrefetch,
} from './apiLifecycle'
export { useAttrs, useSlots } from './apiSetupHelpers'
export {
createVaporApp,
type App,
type AppConfig,
type AppContext,
type Plugin,
type ObjectPlugin,
type FunctionPlugin,
} from './apiCreateVaporApp'
export { createBranch, createIf } from './apiCreateIf'
export { createFor, createForSlots } from './apiCreateFor'
export { createComponent } from './apiCreateComponent'
export { createSelector } from './apiCreateSelector'
export { setInheritAttrs } from './componentAttrs'
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
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'
// 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