NodeTypes,
TestElement,
Fragment,
- PatchFlags,
resetOps,
dumpOps,
NodeOpTypes,
serializeInner,
createTextVNode
} from '@vue/runtime-test'
+import { PatchFlags } from '@vue/shared'
describe('renderer: fragment', () => {
it('should allow returning multiple component root nodes', () => {
mergeProps,
normalizeVNode
} from '../src/vnode'
-import { ShapeFlags } from '../src/shapeFlags'
import { Data } from '../src/component'
-import { PatchFlags } from '@vue/shared'
+import { ShapeFlags, PatchFlags } from '@vue/shared'
describe('vnode', () => {
test('create with just tag', () => {
makeMap,
isPromise,
isArray,
- hyphenate
+ hyphenate,
+ ShapeFlags
} from '@vue/shared'
import { SuspenseBoundary } from './components/Suspense'
import { CompilerOptions } from '@vue/compiler-core'
currentRenderingInstance,
markAttrsAccessed
} from './componentRenderUtils'
-import { ShapeFlags } from './shapeFlags'
export type Data = { [key: string]: unknown }
Comment,
cloneVNode
} from './vnode'
-import { ShapeFlags } from './shapeFlags'
import { handleError, ErrorCodes } from './errorHandling'
-import { PatchFlags, EMPTY_OBJ } from '@vue/shared'
+import { PatchFlags, ShapeFlags, EMPTY_OBJ } from '@vue/shared'
import { warn } from './warning'
// mark the current rendering instance for asset resolution (e.g.
normalizeVNode,
VNodeChild
} from './vnode'
-import { isArray, isFunction, EMPTY_OBJ } from '@vue/shared'
-import { ShapeFlags } from './shapeFlags'
+import { isArray, isFunction, EMPTY_OBJ, ShapeFlags } from '@vue/shared'
import { warn } from './warning'
import { isKeepAlive } from './components/KeepAlive'
import { isKeepAlive } from './KeepAlive'
import { toRaw } from '@vue/reactivity'
import { callWithAsyncErrorHandling, ErrorCodes } from '../errorHandling'
-import { ShapeFlags } from '../shapeFlags'
+import { ShapeFlags } from '@vue/shared'
import { onBeforeUnmount, onMounted } from '../apiLifecycle'
export interface BaseTransitionProps {
import { VNode, cloneVNode, isVNode } from '../vnode'
import { warn } from '../warning'
import { onBeforeUnmount, injectHook, onUnmounted } from '../apiLifecycle'
-import { isString, isArray } from '@vue/shared'
+import { isString, isArray, ShapeFlags } from '@vue/shared'
import { watch } from '../apiWatch'
-import { ShapeFlags } from '../shapeFlags'
import { SuspenseBoundary } from './Suspense'
import {
RendererInternals,
import { VNode, normalizeVNode, VNodeChild } from '../vnode'
-import { ShapeFlags } from '../shapeFlags'
-import { isFunction, isArray } from '@vue/shared'
+import { isFunction, isArray, ShapeFlags } from '@vue/shared'
import { ComponentInternalInstance, handleSetupResult } from '../component'
import { Slots } from '../componentSlots'
import { RendererInternals, MoveType } from '../renderer'
import { queuePostFlushCb, flushPostFlushCbs } from './scheduler'
import { ComponentInternalInstance } from './component'
import { invokeDirectiveHook } from './directives'
-import { ShapeFlags } from './shapeFlags'
import { warn } from './warning'
-import { PatchFlags, isReservedProp, isOn } from '@vue/shared'
+import { PatchFlags, ShapeFlags, isReservedProp, isOn } from '@vue/shared'
// Note: hydration is DOM-specific
// But we have to place it in core due to tight coupling with core - splitting
BaseTransition,
BaseTransitionProps
} from './components/BaseTransition'
-export { PatchFlags } from '@vue/shared'
-export { ShapeFlags } from './shapeFlags'
// SFC CSS Modules
export { useCSSModule } from './helpers/useCssModule'
isReservedProp,
isFunction,
PatchFlags,
+ ShapeFlags,
NOOP
} from '@vue/shared'
import {
} from '@vue/reactivity'
import { resolveProps } from './componentProps'
import { resolveSlots } from './componentSlots'
-import { ShapeFlags } from './shapeFlags'
import { pushWarningContext, popWarningContext, warn } from './warning'
import { invokeDirectiveHook } from './directives'
import { ComponentPublicInstance } from './componentProxy'
-import { createAppAPI } from './apiCreateApp'
+import { createAppAPI, CreateAppFunction } from './apiCreateApp'
import {
SuspenseBoundary,
queueEffectWithSuspense,
return {
render,
hydrate,
- createApp: createAppAPI<HostNode, HostElement>(render, hydrate)
+ createApp: createAppAPI(render, hydrate) as CreateAppFunction<HostElement>
}
}
extend,
normalizeClass,
normalizeStyle,
- PatchFlags
+ PatchFlags,
+ ShapeFlags
} from '@vue/shared'
import {
ComponentInternalInstance,
Component
} from './component'
import { RawSlots } from './componentSlots'
-import { ShapeFlags } from './shapeFlags'
import { isReactive, Ref } from '@vue/reactivity'
import { AppContext } from './apiCreateApp'
import { SuspenseBoundary } from './components/Suspense'
Comment,
Fragment,
Portal,
- ShapeFlags,
ssrUtils,
Slots,
warn
} from 'vue'
import {
+ ShapeFlags,
isString,
isPromise,
isArray,
export { makeMap }
export * from './patchFlags'
+export * from './shapeFlags'
export * from './globalsWhitelist'
export * from './codeframe'
export * from './mockWarn'
--- /dev/null
+export const enum ShapeFlags {
+ ELEMENT = 1,
+ FUNCTIONAL_COMPONENT = 1 << 1,
+ STATEFUL_COMPONENT = 1 << 2,
+ TEXT_CHILDREN = 1 << 3,
+ ARRAY_CHILDREN = 1 << 4,
+ SLOTS_CHILDREN = 1 << 5,
+ SUSPENSE = 1 << 6,
+ COMPONENT_SHOULD_KEEP_ALIVE = 1 << 7,
+ COMPONENT_KEPT_ALIVE = 1 << 8,
+ COMPONENT = ShapeFlags.STATEFUL_COMPONENT | ShapeFlags.FUNCTIONAL_COMPONENT
+}
await page().type('textarea', '\n## foo\n\n- bar\n- baz')
// assert the output is not updated yet because of debounce
expect(await html('#editor div')).toBe('<h1 id="hello">hello</h1>\n')
- await page().waitFor(16)
+ await page().waitFor(30)
expect(await html('#editor div')).toBe(
'<h1 id="hello">hello</h1>\n' +
'<h2 id="foo">foo</h2>\n' +