@vue/compiler-core 3.3.0-alpha.4 → 3.3.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -342,6 +342,20 @@ function createReturnStatement(returns) {
|
|
|
342
342
|
loc: locStub
|
|
343
343
|
};
|
|
344
344
|
}
|
|
345
|
+
function getVNodeHelper(ssr, isComponent) {
|
|
346
|
+
return ssr || isComponent ? CREATE_VNODE : CREATE_ELEMENT_VNODE;
|
|
347
|
+
}
|
|
348
|
+
function getVNodeBlockHelper(ssr, isComponent) {
|
|
349
|
+
return ssr || isComponent ? CREATE_BLOCK : CREATE_ELEMENT_BLOCK;
|
|
350
|
+
}
|
|
351
|
+
function convertToBlock(node, { helper, removeHelper, inSSR }) {
|
|
352
|
+
if (!node.isBlock) {
|
|
353
|
+
node.isBlock = true;
|
|
354
|
+
removeHelper(getVNodeHelper(inSSR, node.isComponent));
|
|
355
|
+
helper(OPEN_BLOCK);
|
|
356
|
+
helper(getVNodeBlockHelper(inSSR, node.isComponent));
|
|
357
|
+
}
|
|
358
|
+
}
|
|
345
359
|
|
|
346
360
|
const isStaticExp = (p) => p.type === 4 && p.isStatic;
|
|
347
361
|
const isBuiltInType = (tag, expected) => tag === expected || tag === shared.hyphenate(expected);
|
|
@@ -524,12 +538,6 @@ function isTemplateNode(node) {
|
|
|
524
538
|
function isSlotOutlet(node) {
|
|
525
539
|
return node.type === 1 && node.tagType === 2;
|
|
526
540
|
}
|
|
527
|
-
function getVNodeHelper(ssr, isComponent) {
|
|
528
|
-
return ssr || isComponent ? CREATE_VNODE : CREATE_ELEMENT_VNODE;
|
|
529
|
-
}
|
|
530
|
-
function getVNodeBlockHelper(ssr, isComponent) {
|
|
531
|
-
return ssr || isComponent ? CREATE_BLOCK : CREATE_ELEMENT_BLOCK;
|
|
532
|
-
}
|
|
533
541
|
const propsHelperSet = /* @__PURE__ */ new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]);
|
|
534
542
|
function getUnnormalizedProps(props, callPath = []) {
|
|
535
543
|
if (props && !shared.isString(props) && props.type === 14) {
|
|
@@ -662,14 +670,6 @@ function getMemoedVNodeCall(node) {
|
|
|
662
670
|
return node;
|
|
663
671
|
}
|
|
664
672
|
}
|
|
665
|
-
function makeBlock(node, { helper, removeHelper, inSSR }) {
|
|
666
|
-
if (!node.isBlock) {
|
|
667
|
-
node.isBlock = true;
|
|
668
|
-
removeHelper(getVNodeHelper(inSSR, node.isComponent));
|
|
669
|
-
helper(OPEN_BLOCK);
|
|
670
|
-
helper(getVNodeBlockHelper(inSSR, node.isComponent));
|
|
671
|
-
}
|
|
672
|
-
}
|
|
673
673
|
|
|
674
674
|
const deprecationData = {
|
|
675
675
|
["COMPILER_IS_ON_ELEMENT"]: {
|
|
@@ -1959,7 +1959,7 @@ function createRootCodegen(root, context) {
|
|
|
1959
1959
|
if (isSingleElementRoot(root, child) && child.codegenNode) {
|
|
1960
1960
|
const codegenNode = child.codegenNode;
|
|
1961
1961
|
if (codegenNode.type === 13) {
|
|
1962
|
-
|
|
1962
|
+
convertToBlock(codegenNode, context);
|
|
1963
1963
|
}
|
|
1964
1964
|
root.codegenNode = codegenNode;
|
|
1965
1965
|
} else {
|
|
@@ -3454,7 +3454,7 @@ function createChildrenCodegenNode(branch, keyIndex, context) {
|
|
|
3454
3454
|
const ret = firstChild.codegenNode;
|
|
3455
3455
|
const vnodeCall = getMemoedVNodeCall(ret);
|
|
3456
3456
|
if (vnodeCall.type === 13) {
|
|
3457
|
-
|
|
3457
|
+
convertToBlock(vnodeCall, context);
|
|
3458
3458
|
}
|
|
3459
3459
|
injectProp(vnodeCall, keyProperty, context);
|
|
3460
3460
|
return ret;
|
|
@@ -5241,7 +5241,7 @@ const transformMemo = (node, context) => {
|
|
|
5241
5241
|
const codegenNode = node.codegenNode || context.currentNode.codegenNode;
|
|
5242
5242
|
if (codegenNode && codegenNode.type === 13) {
|
|
5243
5243
|
if (node.tagType !== 1) {
|
|
5244
|
-
|
|
5244
|
+
convertToBlock(codegenNode, context);
|
|
5245
5245
|
}
|
|
5246
5246
|
node.codegenNode = createCallExpression(context.helper(WITH_MEMO), [
|
|
5247
5247
|
dir.exp,
|
|
@@ -5373,6 +5373,7 @@ exports.buildDirectiveArgs = buildDirectiveArgs;
|
|
|
5373
5373
|
exports.buildProps = buildProps;
|
|
5374
5374
|
exports.buildSlots = buildSlots;
|
|
5375
5375
|
exports.checkCompatEnabled = checkCompatEnabled;
|
|
5376
|
+
exports.convertToBlock = convertToBlock;
|
|
5376
5377
|
exports.createArrayExpression = createArrayExpression;
|
|
5377
5378
|
exports.createAssignmentExpression = createAssignmentExpression;
|
|
5378
5379
|
exports.createBlockStatement = createBlockStatement;
|
|
@@ -5427,7 +5428,6 @@ exports.isTemplateNode = isTemplateNode;
|
|
|
5427
5428
|
exports.isText = isText$1;
|
|
5428
5429
|
exports.isVSlot = isVSlot;
|
|
5429
5430
|
exports.locStub = locStub;
|
|
5430
|
-
exports.makeBlock = makeBlock;
|
|
5431
5431
|
exports.noopDirectiveTransform = noopDirectiveTransform;
|
|
5432
5432
|
exports.processExpression = processExpression;
|
|
5433
5433
|
exports.processFor = processFor;
|
|
@@ -341,6 +341,20 @@ function createReturnStatement(returns) {
|
|
|
341
341
|
loc: locStub
|
|
342
342
|
};
|
|
343
343
|
}
|
|
344
|
+
function getVNodeHelper(ssr, isComponent) {
|
|
345
|
+
return ssr || isComponent ? CREATE_VNODE : CREATE_ELEMENT_VNODE;
|
|
346
|
+
}
|
|
347
|
+
function getVNodeBlockHelper(ssr, isComponent) {
|
|
348
|
+
return ssr || isComponent ? CREATE_BLOCK : CREATE_ELEMENT_BLOCK;
|
|
349
|
+
}
|
|
350
|
+
function convertToBlock(node, { helper, removeHelper, inSSR }) {
|
|
351
|
+
if (!node.isBlock) {
|
|
352
|
+
node.isBlock = true;
|
|
353
|
+
removeHelper(getVNodeHelper(inSSR, node.isComponent));
|
|
354
|
+
helper(OPEN_BLOCK);
|
|
355
|
+
helper(getVNodeBlockHelper(inSSR, node.isComponent));
|
|
356
|
+
}
|
|
357
|
+
}
|
|
344
358
|
|
|
345
359
|
const isStaticExp = (p) => p.type === 4 && p.isStatic;
|
|
346
360
|
const isBuiltInType = (tag, expected) => tag === expected || tag === shared.hyphenate(expected);
|
|
@@ -523,12 +537,6 @@ function isTemplateNode(node) {
|
|
|
523
537
|
function isSlotOutlet(node) {
|
|
524
538
|
return node.type === 1 && node.tagType === 2;
|
|
525
539
|
}
|
|
526
|
-
function getVNodeHelper(ssr, isComponent) {
|
|
527
|
-
return ssr || isComponent ? CREATE_VNODE : CREATE_ELEMENT_VNODE;
|
|
528
|
-
}
|
|
529
|
-
function getVNodeBlockHelper(ssr, isComponent) {
|
|
530
|
-
return ssr || isComponent ? CREATE_BLOCK : CREATE_ELEMENT_BLOCK;
|
|
531
|
-
}
|
|
532
540
|
const propsHelperSet = /* @__PURE__ */ new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]);
|
|
533
541
|
function getUnnormalizedProps(props, callPath = []) {
|
|
534
542
|
if (props && !shared.isString(props) && props.type === 14) {
|
|
@@ -661,14 +669,6 @@ function getMemoedVNodeCall(node) {
|
|
|
661
669
|
return node;
|
|
662
670
|
}
|
|
663
671
|
}
|
|
664
|
-
function makeBlock(node, { helper, removeHelper, inSSR }) {
|
|
665
|
-
if (!node.isBlock) {
|
|
666
|
-
node.isBlock = true;
|
|
667
|
-
removeHelper(getVNodeHelper(inSSR, node.isComponent));
|
|
668
|
-
helper(OPEN_BLOCK);
|
|
669
|
-
helper(getVNodeBlockHelper(inSSR, node.isComponent));
|
|
670
|
-
}
|
|
671
|
-
}
|
|
672
672
|
|
|
673
673
|
const deprecationData = {
|
|
674
674
|
["COMPILER_IS_ON_ELEMENT"]: {
|
|
@@ -1904,7 +1904,7 @@ function createRootCodegen(root, context) {
|
|
|
1904
1904
|
if (isSingleElementRoot(root, child) && child.codegenNode) {
|
|
1905
1905
|
const codegenNode = child.codegenNode;
|
|
1906
1906
|
if (codegenNode.type === 13) {
|
|
1907
|
-
|
|
1907
|
+
convertToBlock(codegenNode, context);
|
|
1908
1908
|
}
|
|
1909
1909
|
root.codegenNode = codegenNode;
|
|
1910
1910
|
} else {
|
|
@@ -3373,7 +3373,7 @@ function createChildrenCodegenNode(branch, keyIndex, context) {
|
|
|
3373
3373
|
const ret = firstChild.codegenNode;
|
|
3374
3374
|
const vnodeCall = getMemoedVNodeCall(ret);
|
|
3375
3375
|
if (vnodeCall.type === 13) {
|
|
3376
|
-
|
|
3376
|
+
convertToBlock(vnodeCall, context);
|
|
3377
3377
|
}
|
|
3378
3378
|
injectProp(vnodeCall, keyProperty, context);
|
|
3379
3379
|
return ret;
|
|
@@ -5120,7 +5120,7 @@ const transformMemo = (node, context) => {
|
|
|
5120
5120
|
const codegenNode = node.codegenNode || context.currentNode.codegenNode;
|
|
5121
5121
|
if (codegenNode && codegenNode.type === 13) {
|
|
5122
5122
|
if (node.tagType !== 1) {
|
|
5123
|
-
|
|
5123
|
+
convertToBlock(codegenNode, context);
|
|
5124
5124
|
}
|
|
5125
5125
|
node.codegenNode = createCallExpression(context.helper(WITH_MEMO), [
|
|
5126
5126
|
dir.exp,
|
|
@@ -5252,6 +5252,7 @@ exports.buildDirectiveArgs = buildDirectiveArgs;
|
|
|
5252
5252
|
exports.buildProps = buildProps;
|
|
5253
5253
|
exports.buildSlots = buildSlots;
|
|
5254
5254
|
exports.checkCompatEnabled = checkCompatEnabled;
|
|
5255
|
+
exports.convertToBlock = convertToBlock;
|
|
5255
5256
|
exports.createArrayExpression = createArrayExpression;
|
|
5256
5257
|
exports.createAssignmentExpression = createAssignmentExpression;
|
|
5257
5258
|
exports.createBlockStatement = createBlockStatement;
|
|
@@ -5306,7 +5307,6 @@ exports.isTemplateNode = isTemplateNode;
|
|
|
5306
5307
|
exports.isText = isText$1;
|
|
5307
5308
|
exports.isVSlot = isVSlot;
|
|
5308
5309
|
exports.locStub = locStub;
|
|
5309
|
-
exports.makeBlock = makeBlock;
|
|
5310
5310
|
exports.noopDirectiveTransform = noopDirectiveTransform;
|
|
5311
5311
|
exports.processExpression = processExpression;
|
|
5312
5312
|
exports.processFor = processFor;
|
package/dist/compiler-core.d.ts
CHANGED
|
@@ -539,6 +539,9 @@ declare function createIfStatement(test: IfStatement['test'], consequent: IfStat
|
|
|
539
539
|
declare function createAssignmentExpression(left: AssignmentExpression['left'], right: AssignmentExpression['right']): AssignmentExpression;
|
|
540
540
|
declare function createSequenceExpression(expressions: SequenceExpression['expressions']): SequenceExpression;
|
|
541
541
|
declare function createReturnStatement(returns: ReturnStatement['returns']): ReturnStatement;
|
|
542
|
+
declare function getVNodeHelper(ssr: boolean, isComponent: boolean): typeof CREATE_VNODE | typeof CREATE_ELEMENT_VNODE;
|
|
543
|
+
declare function getVNodeBlockHelper(ssr: boolean, isComponent: boolean): typeof CREATE_BLOCK | typeof CREATE_ELEMENT_BLOCK;
|
|
544
|
+
declare function convertToBlock(node: VNodeCall, { helper, removeHelper, inSSR }: TransformContext): void;
|
|
542
545
|
|
|
543
546
|
export interface CompilerError extends SyntaxError {
|
|
544
547
|
code: number | string;
|
|
@@ -935,13 +938,10 @@ declare function isText(node: TemplateChildNode): node is TextNode | Interpolati
|
|
|
935
938
|
declare function isVSlot(p: ElementNode['props'][0]): p is DirectiveNode;
|
|
936
939
|
declare function isTemplateNode(node: RootNode | TemplateChildNode): node is TemplateNode;
|
|
937
940
|
declare function isSlotOutlet(node: RootNode | TemplateChildNode): node is SlotOutletNode;
|
|
938
|
-
declare function getVNodeHelper(ssr: boolean, isComponent: boolean): typeof CREATE_VNODE | typeof CREATE_ELEMENT_VNODE;
|
|
939
|
-
declare function getVNodeBlockHelper(ssr: boolean, isComponent: boolean): typeof CREATE_BLOCK | typeof CREATE_ELEMENT_BLOCK;
|
|
940
941
|
declare function injectProp(node: VNodeCall | RenderSlotCall, prop: Property, context: TransformContext): void;
|
|
941
942
|
declare function toValidAssetId(name: string, type: 'component' | 'directive' | 'filter'): string;
|
|
942
943
|
declare function hasScopeRef(node: TemplateChildNode | IfBranchNode | ExpressionNode | undefined, ids: TransformContext['identifiers']): boolean;
|
|
943
944
|
declare function getMemoedVNodeCall(node: BlockCodegenNode | MemoExpression): VNodeCall | RenderSlotCall;
|
|
944
|
-
declare function makeBlock(node: VNodeCall, { helper, removeHelper, inSSR }: TransformContext): void;
|
|
945
945
|
|
|
946
946
|
declare function walkIdentifiers(root: Node$1, onIdentifier: (node: Identifier, parent: Node$1, parentStack: Node$1[], isReference: boolean, isLocal: boolean) => void, includeAll?: boolean, parentStack?: Node$1[], knownIds?: Record<string, number>): void;
|
|
947
947
|
declare function isReferencedIdentifier(id: Identifier, parent: Node$1 | null, parentStack: Node$1[]): boolean;
|
|
@@ -983,4 +983,4 @@ declare function processSlotOutlet(node: SlotOutletNode, context: TransformConte
|
|
|
983
983
|
|
|
984
984
|
declare function getConstantType(node: TemplateChildNode | SimpleExpressionNode, context: TransformContext): ConstantTypes;
|
|
985
985
|
|
|
986
|
-
export { BASE_TRANSITION, BindingTypes, CAMELIZE, CAPITALIZE, CREATE_BLOCK, CREATE_COMMENT, CREATE_ELEMENT_BLOCK, CREATE_ELEMENT_VNODE, CREATE_SLOTS, CREATE_STATIC, CREATE_TEXT, CREATE_VNODE, CompilerDeprecationTypes, ConstantTypes, ElementTypes, ErrorCodes, FRAGMENT, GUARD_REACTIVE_PROPS, IS_MEMO_SAME, IS_REF, KEEP_ALIVE, MERGE_PROPS, NORMALIZE_CLASS, NORMALIZE_PROPS, NORMALIZE_STYLE, Namespaces, NodeTypes, OPEN_BLOCK, POP_SCOPE_ID, PUSH_SCOPE_ID, RENDER_LIST, RENDER_SLOT, RESOLVE_COMPONENT, RESOLVE_DIRECTIVE, RESOLVE_DYNAMIC_COMPONENT, RESOLVE_FILTER, SET_BLOCK_TRACKING, SUSPENSE, TELEPORT, TO_DISPLAY_STRING, TO_HANDLERS, TO_HANDLER_KEY, TextModes, UNREF, WITH_CTX, WITH_DIRECTIVES, WITH_MEMO, advancePositionWithClone, advancePositionWithMutation, assert, baseCompile, baseParse, buildDirectiveArgs, buildProps, buildSlots, checkCompatEnabled, createArrayExpression, createAssignmentExpression, createBlockStatement, createCacheExpression, createCallExpression, createCompilerError, createCompoundExpression, createConditionalExpression, createForLoopParams, createFunctionExpression, createIfStatement, createInterpolation, createObjectExpression, createObjectProperty, createReturnStatement, createRoot, createSequenceExpression, createSimpleExpression, createStructuralDirectiveTransform, createTemplateLiteral, createTransformContext, createVNodeCall, extractIdentifiers, findDir, findProp, generate, getBaseTransformPreset, getConstantType, getInnerRange, getMemoedVNodeCall, getVNodeBlockHelper, getVNodeHelper, hasDynamicKeyVBind, hasScopeRef, helperNameMap, injectProp, isBuiltInType, isCoreComponent, isFunctionType, isInDestructureAssignment, isMemberExpression, isMemberExpressionBrowser, isMemberExpressionNode, isReferencedIdentifier, isSimpleIdentifier, isSlotOutlet, isStaticArgOf, isStaticExp, isStaticProperty, isStaticPropertyKey, isTemplateNode, isText, isVSlot, locStub,
|
|
986
|
+
export { BASE_TRANSITION, BindingTypes, CAMELIZE, CAPITALIZE, CREATE_BLOCK, CREATE_COMMENT, CREATE_ELEMENT_BLOCK, CREATE_ELEMENT_VNODE, CREATE_SLOTS, CREATE_STATIC, CREATE_TEXT, CREATE_VNODE, CompilerDeprecationTypes, ConstantTypes, ElementTypes, ErrorCodes, FRAGMENT, GUARD_REACTIVE_PROPS, IS_MEMO_SAME, IS_REF, KEEP_ALIVE, MERGE_PROPS, NORMALIZE_CLASS, NORMALIZE_PROPS, NORMALIZE_STYLE, Namespaces, NodeTypes, OPEN_BLOCK, POP_SCOPE_ID, PUSH_SCOPE_ID, RENDER_LIST, RENDER_SLOT, RESOLVE_COMPONENT, RESOLVE_DIRECTIVE, RESOLVE_DYNAMIC_COMPONENT, RESOLVE_FILTER, SET_BLOCK_TRACKING, SUSPENSE, TELEPORT, TO_DISPLAY_STRING, TO_HANDLERS, TO_HANDLER_KEY, TextModes, UNREF, WITH_CTX, WITH_DIRECTIVES, WITH_MEMO, advancePositionWithClone, advancePositionWithMutation, assert, baseCompile, baseParse, buildDirectiveArgs, buildProps, buildSlots, checkCompatEnabled, convertToBlock, createArrayExpression, createAssignmentExpression, createBlockStatement, createCacheExpression, createCallExpression, createCompilerError, createCompoundExpression, createConditionalExpression, createForLoopParams, createFunctionExpression, createIfStatement, createInterpolation, createObjectExpression, createObjectProperty, createReturnStatement, createRoot, createSequenceExpression, createSimpleExpression, createStructuralDirectiveTransform, createTemplateLiteral, createTransformContext, createVNodeCall, extractIdentifiers, findDir, findProp, generate, getBaseTransformPreset, getConstantType, getInnerRange, getMemoedVNodeCall, getVNodeBlockHelper, getVNodeHelper, hasDynamicKeyVBind, hasScopeRef, helperNameMap, injectProp, isBuiltInType, isCoreComponent, isFunctionType, isInDestructureAssignment, isMemberExpression, isMemberExpressionBrowser, isMemberExpressionNode, isReferencedIdentifier, isSimpleIdentifier, isSlotOutlet, isStaticArgOf, isStaticExp, isStaticProperty, isStaticPropertyKey, isTemplateNode, isText, isVSlot, locStub, noopDirectiveTransform, processExpression, processFor, processIf, processSlotOutlet, registerRuntimeHelpers, resolveComponentType, stringifyExpression, toValidAssetId, trackSlotScopes, trackVForSlotScopes, transform, transformBind, transformElement, transformExpression, transformModel, transformOn, traverseNode, walkBlockDeclarations, walkFunctionParams, walkIdentifiers, warnDeprecation };
|
|
@@ -336,6 +336,20 @@ function createReturnStatement(returns) {
|
|
|
336
336
|
loc: locStub
|
|
337
337
|
};
|
|
338
338
|
}
|
|
339
|
+
function getVNodeHelper(ssr, isComponent) {
|
|
340
|
+
return ssr || isComponent ? CREATE_VNODE : CREATE_ELEMENT_VNODE;
|
|
341
|
+
}
|
|
342
|
+
function getVNodeBlockHelper(ssr, isComponent) {
|
|
343
|
+
return ssr || isComponent ? CREATE_BLOCK : CREATE_ELEMENT_BLOCK;
|
|
344
|
+
}
|
|
345
|
+
function convertToBlock(node, { helper, removeHelper, inSSR }) {
|
|
346
|
+
if (!node.isBlock) {
|
|
347
|
+
node.isBlock = true;
|
|
348
|
+
removeHelper(getVNodeHelper(inSSR, node.isComponent));
|
|
349
|
+
helper(OPEN_BLOCK);
|
|
350
|
+
helper(getVNodeBlockHelper(inSSR, node.isComponent));
|
|
351
|
+
}
|
|
352
|
+
}
|
|
339
353
|
|
|
340
354
|
const isStaticExp = (p) => p.type === 4 && p.isStatic;
|
|
341
355
|
const isBuiltInType = (tag, expected) => tag === expected || tag === hyphenate(expected);
|
|
@@ -506,12 +520,6 @@ function isTemplateNode(node) {
|
|
|
506
520
|
function isSlotOutlet(node) {
|
|
507
521
|
return node.type === 1 && node.tagType === 2;
|
|
508
522
|
}
|
|
509
|
-
function getVNodeHelper(ssr, isComponent) {
|
|
510
|
-
return ssr || isComponent ? CREATE_VNODE : CREATE_ELEMENT_VNODE;
|
|
511
|
-
}
|
|
512
|
-
function getVNodeBlockHelper(ssr, isComponent) {
|
|
513
|
-
return ssr || isComponent ? CREATE_BLOCK : CREATE_ELEMENT_BLOCK;
|
|
514
|
-
}
|
|
515
523
|
const propsHelperSet = /* @__PURE__ */ new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]);
|
|
516
524
|
function getUnnormalizedProps(props, callPath = []) {
|
|
517
525
|
if (props && !isString(props) && props.type === 14) {
|
|
@@ -645,14 +653,6 @@ function getMemoedVNodeCall(node) {
|
|
|
645
653
|
return node;
|
|
646
654
|
}
|
|
647
655
|
}
|
|
648
|
-
function makeBlock(node, { helper, removeHelper, inSSR }) {
|
|
649
|
-
if (!node.isBlock) {
|
|
650
|
-
node.isBlock = true;
|
|
651
|
-
removeHelper(getVNodeHelper(inSSR, node.isComponent));
|
|
652
|
-
helper(OPEN_BLOCK);
|
|
653
|
-
helper(getVNodeBlockHelper(inSSR, node.isComponent));
|
|
654
|
-
}
|
|
655
|
-
}
|
|
656
656
|
|
|
657
657
|
const deprecationData = {
|
|
658
658
|
["COMPILER_IS_ON_ELEMENT"]: {
|
|
@@ -1915,7 +1915,7 @@ function createRootCodegen(root, context) {
|
|
|
1915
1915
|
if (isSingleElementRoot(root, child) && child.codegenNode) {
|
|
1916
1916
|
const codegenNode = child.codegenNode;
|
|
1917
1917
|
if (codegenNode.type === 13) {
|
|
1918
|
-
|
|
1918
|
+
convertToBlock(codegenNode, context);
|
|
1919
1919
|
}
|
|
1920
1920
|
root.codegenNode = codegenNode;
|
|
1921
1921
|
} else {
|
|
@@ -2934,7 +2934,7 @@ function createChildrenCodegenNode(branch, keyIndex, context) {
|
|
|
2934
2934
|
const ret = firstChild.codegenNode;
|
|
2935
2935
|
const vnodeCall = getMemoedVNodeCall(ret);
|
|
2936
2936
|
if (vnodeCall.type === 13) {
|
|
2937
|
-
|
|
2937
|
+
convertToBlock(vnodeCall, context);
|
|
2938
2938
|
}
|
|
2939
2939
|
injectProp(vnodeCall, keyProperty, context);
|
|
2940
2940
|
return ret;
|
|
@@ -4587,7 +4587,7 @@ const transformMemo = (node, context) => {
|
|
|
4587
4587
|
const codegenNode = node.codegenNode || context.currentNode.codegenNode;
|
|
4588
4588
|
if (codegenNode && codegenNode.type === 13) {
|
|
4589
4589
|
if (node.tagType !== 1) {
|
|
4590
|
-
|
|
4590
|
+
convertToBlock(codegenNode, context);
|
|
4591
4591
|
}
|
|
4592
4592
|
node.codegenNode = createCallExpression(context.helper(WITH_MEMO), [
|
|
4593
4593
|
dir.exp,
|
|
@@ -4667,4 +4667,4 @@ function baseCompile(template, options = {}) {
|
|
|
4667
4667
|
|
|
4668
4668
|
const noopDirectiveTransform = () => ({ props: [] });
|
|
4669
4669
|
|
|
4670
|
-
export { BASE_TRANSITION, CAMELIZE, CAPITALIZE, CREATE_BLOCK, CREATE_COMMENT, CREATE_ELEMENT_BLOCK, CREATE_ELEMENT_VNODE, CREATE_SLOTS, CREATE_STATIC, CREATE_TEXT, CREATE_VNODE, FRAGMENT, GUARD_REACTIVE_PROPS, IS_MEMO_SAME, IS_REF, KEEP_ALIVE, MERGE_PROPS, NORMALIZE_CLASS, NORMALIZE_PROPS, NORMALIZE_STYLE, OPEN_BLOCK, POP_SCOPE_ID, PUSH_SCOPE_ID, RENDER_LIST, RENDER_SLOT, RESOLVE_COMPONENT, RESOLVE_DIRECTIVE, RESOLVE_DYNAMIC_COMPONENT, RESOLVE_FILTER, SET_BLOCK_TRACKING, SUSPENSE, TELEPORT, TO_DISPLAY_STRING, TO_HANDLERS, TO_HANDLER_KEY, UNREF, WITH_CTX, WITH_DIRECTIVES, WITH_MEMO, advancePositionWithClone, advancePositionWithMutation, assert, baseCompile, baseParse, buildDirectiveArgs, buildProps, buildSlots, checkCompatEnabled, createArrayExpression, createAssignmentExpression, createBlockStatement, createCacheExpression, createCallExpression, createCompilerError, createCompoundExpression, createConditionalExpression, createForLoopParams, createFunctionExpression, createIfStatement, createInterpolation, createObjectExpression, createObjectProperty, createReturnStatement, createRoot, createSequenceExpression, createSimpleExpression, createStructuralDirectiveTransform, createTemplateLiteral, createTransformContext, createVNodeCall, extractIdentifiers, findDir, findProp, generate, getBaseTransformPreset, getConstantType, getInnerRange, getMemoedVNodeCall, getVNodeBlockHelper, getVNodeHelper, hasDynamicKeyVBind, hasScopeRef, helperNameMap, injectProp, isBuiltInType, isCoreComponent, isFunctionType, isInDestructureAssignment, isMemberExpression, isMemberExpressionBrowser, isMemberExpressionNode, isReferencedIdentifier, isSimpleIdentifier, isSlotOutlet, isStaticArgOf, isStaticExp, isStaticProperty, isStaticPropertyKey, isTemplateNode, isText$1 as isText, isVSlot, locStub,
|
|
4670
|
+
export { BASE_TRANSITION, CAMELIZE, CAPITALIZE, CREATE_BLOCK, CREATE_COMMENT, CREATE_ELEMENT_BLOCK, CREATE_ELEMENT_VNODE, CREATE_SLOTS, CREATE_STATIC, CREATE_TEXT, CREATE_VNODE, FRAGMENT, GUARD_REACTIVE_PROPS, IS_MEMO_SAME, IS_REF, KEEP_ALIVE, MERGE_PROPS, NORMALIZE_CLASS, NORMALIZE_PROPS, NORMALIZE_STYLE, OPEN_BLOCK, POP_SCOPE_ID, PUSH_SCOPE_ID, RENDER_LIST, RENDER_SLOT, RESOLVE_COMPONENT, RESOLVE_DIRECTIVE, RESOLVE_DYNAMIC_COMPONENT, RESOLVE_FILTER, SET_BLOCK_TRACKING, SUSPENSE, TELEPORT, TO_DISPLAY_STRING, TO_HANDLERS, TO_HANDLER_KEY, UNREF, WITH_CTX, WITH_DIRECTIVES, WITH_MEMO, advancePositionWithClone, advancePositionWithMutation, assert, baseCompile, baseParse, buildDirectiveArgs, buildProps, buildSlots, checkCompatEnabled, convertToBlock, createArrayExpression, createAssignmentExpression, createBlockStatement, createCacheExpression, createCallExpression, createCompilerError, createCompoundExpression, createConditionalExpression, createForLoopParams, createFunctionExpression, createIfStatement, createInterpolation, createObjectExpression, createObjectProperty, createReturnStatement, createRoot, createSequenceExpression, createSimpleExpression, createStructuralDirectiveTransform, createTemplateLiteral, createTransformContext, createVNodeCall, extractIdentifiers, findDir, findProp, generate, getBaseTransformPreset, getConstantType, getInnerRange, getMemoedVNodeCall, getVNodeBlockHelper, getVNodeHelper, hasDynamicKeyVBind, hasScopeRef, helperNameMap, injectProp, isBuiltInType, isCoreComponent, isFunctionType, isInDestructureAssignment, isMemberExpression, isMemberExpressionBrowser, isMemberExpressionNode, isReferencedIdentifier, isSimpleIdentifier, isSlotOutlet, isStaticArgOf, isStaticExp, isStaticProperty, isStaticPropertyKey, isTemplateNode, isText$1 as isText, isVSlot, locStub, noopDirectiveTransform, processExpression, processFor, processIf, processSlotOutlet, registerRuntimeHelpers, resolveComponentType, stringifyExpression, toValidAssetId, trackSlotScopes, trackVForSlotScopes, transform, transformBind, transformElement, transformExpression, transformModel, transformOn, traverseNode, walkBlockDeclarations, walkFunctionParams, walkIdentifiers, warnDeprecation };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/compiler-core",
|
|
3
|
-
"version": "3.3.0-alpha.
|
|
3
|
+
"version": "3.3.0-alpha.5",
|
|
4
4
|
"description": "@vue/compiler-core",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "dist/compiler-core.esm-bundler.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-core#readme",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@vue/shared": "3.3.0-alpha.
|
|
35
|
+
"@vue/shared": "3.3.0-alpha.5",
|
|
36
36
|
"@babel/parser": "^7.20.15",
|
|
37
37
|
"estree-walker": "^2.0.2",
|
|
38
38
|
"source-map": "^0.6.1"
|