index.ts 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. // Core API ------------------------------------------------------------------
  2. export const version = __VERSION__
  3. export {
  4. // core
  5. type Ref,
  6. type DebuggerEvent,
  7. TrackOpTypes,
  8. TriggerOpTypes,
  9. reactive,
  10. ref,
  11. readonly,
  12. computed,
  13. // utilities
  14. unref,
  15. proxyRefs,
  16. isRef,
  17. toRef,
  18. toValue,
  19. toRefs,
  20. isProxy,
  21. isReactive,
  22. isReadonly,
  23. isShallow,
  24. // advanced
  25. customRef,
  26. triggerRef,
  27. shallowRef,
  28. shallowReactive,
  29. shallowReadonly,
  30. markRaw,
  31. toRaw,
  32. // effect
  33. stop,
  34. ReactiveEffect,
  35. onEffectCleanup,
  36. // effect scope
  37. effectScope,
  38. EffectScope,
  39. getCurrentScope,
  40. onScopeDispose,
  41. // baseWatch
  42. onWatcherCleanup,
  43. getCurrentWatcher,
  44. } from '@vue/reactivity'
  45. import { NOOP } from '@vue/shared'
  46. import { warn as _warn } from './warning'
  47. export const warn = (__DEV__ ? _warn : NOOP) as typeof _warn
  48. export { nextTick } from './scheduler'
  49. export {
  50. getCurrentInstance,
  51. type ComponentInternalInstance,
  52. type Component,
  53. type ObjectComponent,
  54. type FunctionalComponent,
  55. type SetupFn,
  56. } from './component'
  57. export { createSlot } from './componentSlots'
  58. export { renderEffect } from './renderEffect'
  59. export {
  60. watch,
  61. watchEffect,
  62. watchPostEffect,
  63. watchSyncEffect,
  64. type WatchEffect,
  65. type WatchOptions,
  66. type WatchOptionsBase,
  67. type WatchCallback,
  68. type WatchSource,
  69. type WatchStopHandle,
  70. } from './apiWatch'
  71. export {
  72. withDirectives,
  73. type Directive,
  74. type DirectiveBinding,
  75. type DirectiveHook,
  76. type ObjectDirective,
  77. type FunctionDirective,
  78. type DirectiveArguments,
  79. type DirectiveModifiers,
  80. } from './directives'
  81. export { template, children, next } from './dom/template'
  82. export { insert, prepend, remove, createTextNode } from './dom/element'
  83. export { setStyle } from './dom/style'
  84. export {
  85. setText,
  86. setHtml,
  87. setClass,
  88. setAttr,
  89. setDOMProp,
  90. setDynamicProp,
  91. setDynamicProps,
  92. } from './dom/prop'
  93. export { on, delegate, delegateEvents, setDynamicEvents } from './dom/event'
  94. export { setRef } from './dom/templateRef'
  95. export { defineComponent } from './apiDefineComponent'
  96. export {
  97. type InjectionKey,
  98. inject,
  99. provide,
  100. hasInjectionContext,
  101. } from './apiInject'
  102. export {
  103. onBeforeMount,
  104. onMounted,
  105. onBeforeUpdate,
  106. onUpdated,
  107. onBeforeUnmount,
  108. onUnmounted,
  109. // onActivated,
  110. // onDeactivated,
  111. onRenderTracked,
  112. onRenderTriggered,
  113. onErrorCaptured,
  114. // onServerPrefetch,
  115. } from './apiLifecycle'
  116. export { useAttrs, useSlots } from './apiSetupHelpers'
  117. export {
  118. createVaporApp,
  119. type App,
  120. type AppConfig,
  121. type AppContext,
  122. type Plugin,
  123. type ObjectPlugin,
  124. type FunctionPlugin,
  125. } from './apiCreateVaporApp'
  126. export { createIf } from './apiCreateIf'
  127. export { createFor, createForSlots } from './apiCreateFor'
  128. export { createComponent } from './apiCreateComponent'
  129. export { resolveComponent, resolveDirective } from './helpers/resolveAssets'
  130. export { toHandlers } from './helpers/toHandlers'
  131. // **Internal** DOM-only runtime directive helpers
  132. export {
  133. vModelText,
  134. vModelCheckbox,
  135. vModelRadio,
  136. vModelSelect,
  137. vModelDynamic,
  138. } from './directives/vModel'
  139. export { vShow } from './directives/vShow'