@vue/compiler-ssr 3.6.0-beta.6 → 3.6.0-beta.8
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.
- package/dist/compiler-ssr.cjs.js +6 -21
- package/package.json +3 -3
package/dist/compiler-ssr.cjs.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compiler-ssr v3.6.0-beta.
|
|
2
|
+
* @vue/compiler-ssr v3.6.0-beta.8
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
6
|
-
Object.defineProperties(exports, {
|
|
6
|
+
Object.defineProperties(exports, {
|
|
7
|
+
__esModule: { value: true },
|
|
8
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
9
|
+
});
|
|
7
10
|
let _vue_compiler_dom = require("@vue/compiler-dom");
|
|
8
11
|
let _vue_shared = require("@vue/shared");
|
|
9
|
-
|
|
10
12
|
//#region packages/compiler-ssr/src/runtimeHelpers.ts
|
|
11
13
|
const SSR_INTERPOLATE = Symbol(`ssrInterpolate`);
|
|
12
14
|
const SSR_RENDER_VNODE = Symbol(`ssrRenderVNode`);
|
|
@@ -49,7 +51,6 @@ const ssrHelpers = {
|
|
|
49
51
|
[SSR_GET_DIRECTIVE_PROPS]: `ssrGetDirectiveProps`
|
|
50
52
|
};
|
|
51
53
|
(0, _vue_compiler_dom.registerRuntimeHelpers)(ssrHelpers);
|
|
52
|
-
|
|
53
54
|
//#endregion
|
|
54
55
|
//#region packages/compiler-ssr/src/transforms/ssrVIf.ts
|
|
55
56
|
const ssrTransformIf = (0, _vue_compiler_dom.createStructuralDirectiveTransform)(/^(?:if|else|else-if)$/, _vue_compiler_dom.processIf);
|
|
@@ -70,7 +71,6 @@ function processIfBranch(branch, context, disableNestedFragments = false) {
|
|
|
70
71
|
const { children } = branch;
|
|
71
72
|
return processChildrenAsStatement(branch, context, !disableNestedFragments && (children.length !== 1 || children[0].type !== 1) && !(children.length === 1 && children[0].type === 11));
|
|
72
73
|
}
|
|
73
|
-
|
|
74
74
|
//#endregion
|
|
75
75
|
//#region packages/compiler-ssr/src/transforms/ssrVFor.ts
|
|
76
76
|
const ssrTransformFor = (0, _vue_compiler_dom.createStructuralDirectiveTransform)("for", _vue_compiler_dom.processFor);
|
|
@@ -82,7 +82,6 @@ function ssrProcessFor(node, context, disableNestedFragments = false) {
|
|
|
82
82
|
context.pushStatement((0, _vue_compiler_dom.createCallExpression)(context.helper(SSR_RENDER_LIST), [node.source, renderLoop]));
|
|
83
83
|
if (!disableNestedFragments) context.pushStringPart(`<!--]-->`);
|
|
84
84
|
}
|
|
85
|
-
|
|
86
85
|
//#endregion
|
|
87
86
|
//#region packages/compiler-ssr/src/transforms/ssrTransformSlotOutlet.ts
|
|
88
87
|
const ssrTransformSlotOutlet = (node, context) => {
|
|
@@ -125,7 +124,6 @@ function ssrProcessSlotOutlet(node, context) {
|
|
|
125
124
|
}
|
|
126
125
|
context.pushStatement(node.ssrCodegenNode);
|
|
127
126
|
}
|
|
128
|
-
|
|
129
127
|
//#endregion
|
|
130
128
|
//#region packages/compiler-ssr/src/errors.ts
|
|
131
129
|
function createSSRCompilerError(code, loc) {
|
|
@@ -136,7 +134,6 @@ const SSRErrorMessages = {
|
|
|
136
134
|
[66]: `Missing the 'to' prop on teleport element.`,
|
|
137
135
|
[67]: `Invalid AST node during SSR transform.`
|
|
138
136
|
};
|
|
139
|
-
|
|
140
137
|
//#endregion
|
|
141
138
|
//#region packages/compiler-ssr/src/transforms/ssrTransformTeleport.ts
|
|
142
139
|
function ssrProcessTeleport(node, context) {
|
|
@@ -164,7 +161,6 @@ function ssrProcessTeleport(node, context) {
|
|
|
164
161
|
`_parent`
|
|
165
162
|
]));
|
|
166
163
|
}
|
|
167
|
-
|
|
168
164
|
//#endregion
|
|
169
165
|
//#region packages/compiler-ssr/src/transforms/ssrTransformSuspense.ts
|
|
170
166
|
const wipMap$3 = /* @__PURE__ */ new WeakMap();
|
|
@@ -197,7 +193,6 @@ function ssrProcessSuspense(node, context) {
|
|
|
197
193
|
}
|
|
198
194
|
context.pushStatement((0, _vue_compiler_dom.createCallExpression)(context.helper(SSR_RENDER_SUSPENSE), [`_push`, slotsExp]));
|
|
199
195
|
}
|
|
200
|
-
|
|
201
196
|
//#endregion
|
|
202
197
|
//#region packages/compiler-ssr/src/transforms/ssrTransformElement.ts
|
|
203
198
|
const rawChildrenMap = /* @__PURE__ */ new WeakMap();
|
|
@@ -346,7 +341,6 @@ function ssrProcessElement(node, context) {
|
|
|
346
341
|
else if (node.children.length) processChildren(node, context);
|
|
347
342
|
if (!isVoidTag(node.tag)) context.pushStringPart(`</${node.tag}>`);
|
|
348
343
|
}
|
|
349
|
-
|
|
350
344
|
//#endregion
|
|
351
345
|
//#region packages/compiler-ssr/src/transforms/ssrTransformTransitionGroup.ts
|
|
352
346
|
const wipMap$2 = /* @__PURE__ */ new WeakMap();
|
|
@@ -407,7 +401,6 @@ function ssrProcessTransitionGroup(node, context) {
|
|
|
407
401
|
}
|
|
408
402
|
} else processChildren(node, context, true, true, true);
|
|
409
403
|
}
|
|
410
|
-
|
|
411
404
|
//#endregion
|
|
412
405
|
//#region packages/compiler-ssr/src/transforms/ssrTransformTransition.ts
|
|
413
406
|
const wipMap$1 = /* @__PURE__ */ new WeakMap();
|
|
@@ -425,7 +418,6 @@ function ssrProcessTransition(node, context) {
|
|
|
425
418
|
context.pushStringPart(`</template>`);
|
|
426
419
|
} else processChildren(node, context, false, true);
|
|
427
420
|
}
|
|
428
|
-
|
|
429
421
|
//#endregion
|
|
430
422
|
//#region packages/compiler-ssr/src/transforms/ssrTransformComponent.ts
|
|
431
423
|
const wipMap = /* @__PURE__ */ new WeakMap();
|
|
@@ -579,7 +571,6 @@ function clone(v) {
|
|
|
579
571
|
return res;
|
|
580
572
|
} else return v;
|
|
581
573
|
}
|
|
582
|
-
|
|
583
574
|
//#endregion
|
|
584
575
|
//#region packages/compiler-ssr/src/ssrCodegenTransform.ts
|
|
585
576
|
function ssrCodegenTransform(ast, options) {
|
|
@@ -691,7 +682,6 @@ function processChildrenAsStatement(parent, parentContext, asFragment = false, w
|
|
|
691
682
|
processChildren(parent, childContext, asFragment);
|
|
692
683
|
return (0, _vue_compiler_dom.createBlockStatement)(childContext.body);
|
|
693
684
|
}
|
|
694
|
-
|
|
695
685
|
//#endregion
|
|
696
686
|
//#region packages/compiler-ssr/src/transforms/ssrVModel.ts
|
|
697
687
|
const ssrTransformModel = (dir, node, context) => {
|
|
@@ -762,14 +752,12 @@ function findValueBinding(node) {
|
|
|
762
752
|
const valueBinding = (0, _vue_compiler_dom.findProp)(node, "value");
|
|
763
753
|
return valueBinding ? valueBinding.type === 7 ? valueBinding.exp : (0, _vue_compiler_dom.createSimpleExpression)(valueBinding.value.content, true) : (0, _vue_compiler_dom.createSimpleExpression)(`null`, false);
|
|
764
754
|
}
|
|
765
|
-
|
|
766
755
|
//#endregion
|
|
767
756
|
//#region packages/compiler-ssr/src/transforms/ssrVShow.ts
|
|
768
757
|
const ssrTransformShow = (dir, node, context) => {
|
|
769
758
|
if (!dir.exp) context.onError((0, _vue_compiler_dom.createDOMCompilerError)(62));
|
|
770
759
|
return { props: [(0, _vue_compiler_dom.createObjectProperty)(`style`, (0, _vue_compiler_dom.createConditionalExpression)(dir.exp, (0, _vue_compiler_dom.createSimpleExpression)(`null`, false), (0, _vue_compiler_dom.createObjectExpression)([(0, _vue_compiler_dom.createObjectProperty)(`display`, (0, _vue_compiler_dom.createSimpleExpression)(`none`, true))]), false))] };
|
|
771
760
|
};
|
|
772
|
-
|
|
773
761
|
//#endregion
|
|
774
762
|
//#region packages/compiler-ssr/src/transforms/ssrInjectFallthroughAttrs.ts
|
|
775
763
|
const ssrInjectFallthroughAttrs = (node, context) => {
|
|
@@ -797,7 +785,6 @@ function injectFallthroughAttrs(node) {
|
|
|
797
785
|
loc: _vue_compiler_dom.locStub
|
|
798
786
|
});
|
|
799
787
|
}
|
|
800
|
-
|
|
801
788
|
//#endregion
|
|
802
789
|
//#region packages/compiler-ssr/src/transforms/ssrInjectCssVars.ts
|
|
803
790
|
const ssrInjectCssVars = (node, context) => {
|
|
@@ -820,7 +807,6 @@ function injectCssVars(node) {
|
|
|
820
807
|
loc: _vue_compiler_dom.locStub
|
|
821
808
|
});
|
|
822
809
|
}
|
|
823
|
-
|
|
824
810
|
//#endregion
|
|
825
811
|
//#region packages/compiler-ssr/src/index.ts
|
|
826
812
|
function compile(source, options = {}) {
|
|
@@ -868,6 +854,5 @@ function compile(source, options = {}) {
|
|
|
868
854
|
ssrCodegenTransform(ast, options);
|
|
869
855
|
return (0, _vue_compiler_dom.generate)(ast, options);
|
|
870
856
|
}
|
|
871
|
-
|
|
872
857
|
//#endregion
|
|
873
|
-
exports.compile = compile;
|
|
858
|
+
exports.compile = compile;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/compiler-ssr",
|
|
3
|
-
"version": "3.6.0-beta.
|
|
3
|
+
"version": "3.6.0-beta.8",
|
|
4
4
|
"description": "@vue/compiler-ssr",
|
|
5
5
|
"main": "dist/compiler-ssr.cjs.js",
|
|
6
6
|
"types": "dist/compiler-ssr.d.ts",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-ssr#readme",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@vue/shared": "3.6.0-beta.
|
|
32
|
-
"@vue/compiler-dom": "3.6.0-beta.
|
|
31
|
+
"@vue/shared": "3.6.0-beta.8",
|
|
32
|
+
"@vue/compiler-dom": "3.6.0-beta.8"
|
|
33
33
|
}
|
|
34
34
|
}
|