@vue/compiler-dom 3.6.0-beta.7 → 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-dom.cjs.js +12 -23
- package/dist/compiler-dom.cjs.prod.js +12 -22
- package/dist/compiler-dom.esm-browser.js +4 -58
- package/dist/compiler-dom.esm-browser.prod.js +1 -1
- package/dist/compiler-dom.esm-bundler.js +3 -20
- package/dist/compiler-dom.global.js +291 -347
- package/dist/compiler-dom.global.prod.js +1 -1
- package/package.json +3 -3
package/dist/compiler-dom.cjs.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compiler-dom v3.6.0-beta.
|
|
2
|
+
* @vue/compiler-dom 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_core = require("@vue/compiler-core");
|
|
8
11
|
let _vue_shared = require("@vue/shared");
|
|
9
|
-
|
|
10
12
|
//#region packages/compiler-dom/src/runtimeHelpers.ts
|
|
11
13
|
const V_MODEL_RADIO = Symbol(`vModelRadio`);
|
|
12
14
|
const V_MODEL_CHECKBOX = Symbol(`vModelCheckbox`);
|
|
@@ -30,7 +32,6 @@ const TRANSITION_GROUP = Symbol(`TransitionGroup`);
|
|
|
30
32
|
[TRANSITION]: `Transition`,
|
|
31
33
|
[TRANSITION_GROUP]: `TransitionGroup`
|
|
32
34
|
});
|
|
33
|
-
|
|
34
35
|
//#endregion
|
|
35
36
|
//#region packages/compiler-dom/src/parserOptions.ts
|
|
36
37
|
const parserOptions = {
|
|
@@ -61,7 +62,6 @@ const parserOptions = {
|
|
|
61
62
|
return ns;
|
|
62
63
|
}
|
|
63
64
|
};
|
|
64
|
-
|
|
65
65
|
//#endregion
|
|
66
66
|
//#region packages/compiler-dom/src/transforms/transformStyle.ts
|
|
67
67
|
const transformStyle = (node) => {
|
|
@@ -80,7 +80,6 @@ const parseInlineCSS = (cssText, loc) => {
|
|
|
80
80
|
const normalized = (0, _vue_shared.parseStringStyle)(cssText);
|
|
81
81
|
return (0, _vue_compiler_core.createSimpleExpression)(JSON.stringify(normalized), false, loc, 3);
|
|
82
82
|
};
|
|
83
|
-
|
|
84
83
|
//#endregion
|
|
85
84
|
//#region packages/compiler-dom/src/errors.ts
|
|
86
85
|
function createDOMCompilerError(code, loc) {
|
|
@@ -126,7 +125,6 @@ const DOMErrorMessages = {
|
|
|
126
125
|
[64]: `Tags with side effect (<script> and <style>) are ignored in client component templates.`,
|
|
127
126
|
[65]: ``
|
|
128
127
|
};
|
|
129
|
-
|
|
130
128
|
//#endregion
|
|
131
129
|
//#region packages/compiler-dom/src/transforms/vHtml.ts
|
|
132
130
|
const transformVHtml = (dir, node, context) => {
|
|
@@ -138,7 +136,6 @@ const transformVHtml = (dir, node, context) => {
|
|
|
138
136
|
}
|
|
139
137
|
return { props: [(0, _vue_compiler_core.createObjectProperty)((0, _vue_compiler_core.createSimpleExpression)(`innerHTML`, true, loc), exp || (0, _vue_compiler_core.createSimpleExpression)("", true))] };
|
|
140
138
|
};
|
|
141
|
-
|
|
142
139
|
//#endregion
|
|
143
140
|
//#region packages/compiler-dom/src/transforms/vText.ts
|
|
144
141
|
const transformVText = (dir, node, context) => {
|
|
@@ -150,7 +147,6 @@ const transformVText = (dir, node, context) => {
|
|
|
150
147
|
}
|
|
151
148
|
return { props: [(0, _vue_compiler_core.createObjectProperty)((0, _vue_compiler_core.createSimpleExpression)(`textContent`, true), exp ? (0, _vue_compiler_core.getConstantType)(exp, context) > 0 ? exp : (0, _vue_compiler_core.createCallExpression)(context.helperString(_vue_compiler_core.TO_DISPLAY_STRING), [exp], loc) : (0, _vue_compiler_core.createSimpleExpression)("", true))] };
|
|
152
149
|
};
|
|
153
|
-
|
|
154
150
|
//#endregion
|
|
155
151
|
//#region packages/compiler-dom/src/transforms/vModel.ts
|
|
156
152
|
const transformModel = (dir, node, context) => {
|
|
@@ -194,7 +190,6 @@ const transformModel = (dir, node, context) => {
|
|
|
194
190
|
baseResult.props = baseResult.props.filter((p) => !(p.key.type === 4 && p.key.content === "modelValue"));
|
|
195
191
|
return baseResult;
|
|
196
192
|
};
|
|
197
|
-
|
|
198
193
|
//#endregion
|
|
199
194
|
//#region packages/compiler-dom/src/transforms/vOn.ts
|
|
200
195
|
const isEventOptionModifier = /* @__PURE__ */ (0, _vue_shared.makeMap)(`passive,once,capture`);
|
|
@@ -257,7 +252,6 @@ const transformOn = (dir, node, context) => {
|
|
|
257
252
|
return { props: [(0, _vue_compiler_core.createObjectProperty)(key, handlerExp)] };
|
|
258
253
|
});
|
|
259
254
|
};
|
|
260
|
-
|
|
261
255
|
//#endregion
|
|
262
256
|
//#region packages/compiler-dom/src/transforms/vShow.ts
|
|
263
257
|
const transformShow = (dir, node, context) => {
|
|
@@ -268,7 +262,6 @@ const transformShow = (dir, node, context) => {
|
|
|
268
262
|
needRuntime: context.helper(V_SHOW)
|
|
269
263
|
};
|
|
270
264
|
};
|
|
271
|
-
|
|
272
265
|
//#endregion
|
|
273
266
|
//#region packages/compiler-dom/src/transforms/Transition.ts
|
|
274
267
|
const transformTransition = (node, context) => {
|
|
@@ -301,7 +294,6 @@ function defaultHasMultipleChildren(node) {
|
|
|
301
294
|
const child = children[0];
|
|
302
295
|
return children.length !== 1 || child.type === 11 || child.type === 9 && child.branches.some(defaultHasMultipleChildren);
|
|
303
296
|
}
|
|
304
|
-
|
|
305
297
|
//#endregion
|
|
306
298
|
//#region packages/compiler-dom/src/transforms/stringifyStatic.ts
|
|
307
299
|
/**
|
|
@@ -493,7 +485,6 @@ function evaluateConstant(exp) {
|
|
|
493
485
|
return res;
|
|
494
486
|
}
|
|
495
487
|
}
|
|
496
|
-
|
|
497
488
|
//#endregion
|
|
498
489
|
//#region packages/compiler-dom/src/transforms/ignoreSideEffectTags.ts
|
|
499
490
|
const ignoreSideEffectTags = (node, context) => {
|
|
@@ -502,7 +493,6 @@ const ignoreSideEffectTags = (node, context) => {
|
|
|
502
493
|
context.removeNode();
|
|
503
494
|
}
|
|
504
495
|
};
|
|
505
|
-
|
|
506
496
|
//#endregion
|
|
507
497
|
//#region packages/compiler-dom/src/htmlNesting.ts
|
|
508
498
|
/**
|
|
@@ -693,7 +683,6 @@ const knownInvalidParents = {
|
|
|
693
683
|
h5: headings,
|
|
694
684
|
h6: headings
|
|
695
685
|
};
|
|
696
|
-
|
|
697
686
|
//#endregion
|
|
698
687
|
//#region packages/compiler-dom/src/transforms/validateHtmlNesting.ts
|
|
699
688
|
const validateHtmlNesting = (node, context) => {
|
|
@@ -703,7 +692,6 @@ const validateHtmlNesting = (node, context) => {
|
|
|
703
692
|
context.onWarn(error);
|
|
704
693
|
}
|
|
705
694
|
};
|
|
706
|
-
|
|
707
695
|
//#endregion
|
|
708
696
|
//#region packages/compiler-dom/src/index.ts
|
|
709
697
|
const DOMNodeTransforms = [transformStyle, ...[transformTransition, validateHtmlNesting]];
|
|
@@ -729,7 +717,6 @@ function compile(src, options = {}) {
|
|
|
729
717
|
function parse(template, options = {}) {
|
|
730
718
|
return (0, _vue_compiler_core.baseParse)(template, (0, _vue_shared.extend)({}, parserOptions, options));
|
|
731
719
|
}
|
|
732
|
-
|
|
733
720
|
//#endregion
|
|
734
721
|
exports.DOMDirectiveTransforms = DOMDirectiveTransforms;
|
|
735
722
|
exports.DOMErrorCodes = DOMErrorCodes;
|
|
@@ -754,9 +741,11 @@ exports.parserOptions = parserOptions;
|
|
|
754
741
|
exports.postTransformTransition = postTransformTransition;
|
|
755
742
|
exports.resolveModifiers = resolveModifiers;
|
|
756
743
|
exports.transformStyle = transformStyle;
|
|
757
|
-
Object.keys(_vue_compiler_core).forEach(function
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
744
|
+
Object.keys(_vue_compiler_core).forEach(function(k) {
|
|
745
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
746
|
+
enumerable: true,
|
|
747
|
+
get: function() {
|
|
748
|
+
return _vue_compiler_core[k];
|
|
749
|
+
}
|
|
750
|
+
});
|
|
762
751
|
});
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compiler-dom v3.6.0-beta.
|
|
2
|
+
* @vue/compiler-dom 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_core = require("@vue/compiler-core");
|
|
8
11
|
let _vue_shared = require("@vue/shared");
|
|
9
|
-
|
|
10
12
|
//#region packages/compiler-dom/src/runtimeHelpers.ts
|
|
11
13
|
const V_MODEL_RADIO = Symbol(``);
|
|
12
14
|
const V_MODEL_CHECKBOX = Symbol(``);
|
|
@@ -30,7 +32,6 @@ const TRANSITION_GROUP = Symbol(``);
|
|
|
30
32
|
[TRANSITION]: `Transition`,
|
|
31
33
|
[TRANSITION_GROUP]: `TransitionGroup`
|
|
32
34
|
});
|
|
33
|
-
|
|
34
35
|
//#endregion
|
|
35
36
|
//#region packages/compiler-dom/src/parserOptions.ts
|
|
36
37
|
const parserOptions = {
|
|
@@ -61,7 +62,6 @@ const parserOptions = {
|
|
|
61
62
|
return ns;
|
|
62
63
|
}
|
|
63
64
|
};
|
|
64
|
-
|
|
65
65
|
//#endregion
|
|
66
66
|
//#region packages/compiler-dom/src/transforms/transformStyle.ts
|
|
67
67
|
const transformStyle = (node) => {
|
|
@@ -80,7 +80,6 @@ const parseInlineCSS = (cssText, loc) => {
|
|
|
80
80
|
const normalized = (0, _vue_shared.parseStringStyle)(cssText);
|
|
81
81
|
return (0, _vue_compiler_core.createSimpleExpression)(JSON.stringify(normalized), false, loc, 3);
|
|
82
82
|
};
|
|
83
|
-
|
|
84
83
|
//#endregion
|
|
85
84
|
//#region packages/compiler-dom/src/errors.ts
|
|
86
85
|
function createDOMCompilerError(code, loc) {
|
|
@@ -126,7 +125,6 @@ const DOMErrorMessages = {
|
|
|
126
125
|
[64]: `Tags with side effect (<script> and <style>) are ignored in client component templates.`,
|
|
127
126
|
[65]: ``
|
|
128
127
|
};
|
|
129
|
-
|
|
130
128
|
//#endregion
|
|
131
129
|
//#region packages/compiler-dom/src/transforms/vHtml.ts
|
|
132
130
|
const transformVHtml = (dir, node, context) => {
|
|
@@ -138,7 +136,6 @@ const transformVHtml = (dir, node, context) => {
|
|
|
138
136
|
}
|
|
139
137
|
return { props: [(0, _vue_compiler_core.createObjectProperty)((0, _vue_compiler_core.createSimpleExpression)(`innerHTML`, true, loc), exp || (0, _vue_compiler_core.createSimpleExpression)("", true))] };
|
|
140
138
|
};
|
|
141
|
-
|
|
142
139
|
//#endregion
|
|
143
140
|
//#region packages/compiler-dom/src/transforms/vText.ts
|
|
144
141
|
const transformVText = (dir, node, context) => {
|
|
@@ -150,7 +147,6 @@ const transformVText = (dir, node, context) => {
|
|
|
150
147
|
}
|
|
151
148
|
return { props: [(0, _vue_compiler_core.createObjectProperty)((0, _vue_compiler_core.createSimpleExpression)(`textContent`, true), exp ? (0, _vue_compiler_core.getConstantType)(exp, context) > 0 ? exp : (0, _vue_compiler_core.createCallExpression)(context.helperString(_vue_compiler_core.TO_DISPLAY_STRING), [exp], loc) : (0, _vue_compiler_core.createSimpleExpression)("", true))] };
|
|
152
149
|
};
|
|
153
|
-
|
|
154
150
|
//#endregion
|
|
155
151
|
//#region packages/compiler-dom/src/transforms/vModel.ts
|
|
156
152
|
const transformModel = (dir, node, context) => {
|
|
@@ -186,7 +182,6 @@ const transformModel = (dir, node, context) => {
|
|
|
186
182
|
baseResult.props = baseResult.props.filter((p) => !(p.key.type === 4 && p.key.content === "modelValue"));
|
|
187
183
|
return baseResult;
|
|
188
184
|
};
|
|
189
|
-
|
|
190
185
|
//#endregion
|
|
191
186
|
//#region packages/compiler-dom/src/transforms/vOn.ts
|
|
192
187
|
const isEventOptionModifier = /* @__PURE__ */ (0, _vue_shared.makeMap)(`passive,once,capture`);
|
|
@@ -249,7 +244,6 @@ const transformOn = (dir, node, context) => {
|
|
|
249
244
|
return { props: [(0, _vue_compiler_core.createObjectProperty)(key, handlerExp)] };
|
|
250
245
|
});
|
|
251
246
|
};
|
|
252
|
-
|
|
253
247
|
//#endregion
|
|
254
248
|
//#region packages/compiler-dom/src/transforms/vShow.ts
|
|
255
249
|
const transformShow = (dir, node, context) => {
|
|
@@ -260,7 +254,6 @@ const transformShow = (dir, node, context) => {
|
|
|
260
254
|
needRuntime: context.helper(V_SHOW)
|
|
261
255
|
};
|
|
262
256
|
};
|
|
263
|
-
|
|
264
257
|
//#endregion
|
|
265
258
|
//#region packages/compiler-dom/src/transforms/Transition.ts
|
|
266
259
|
function postTransformTransition(node, onError, hasMultipleChildren = defaultHasMultipleChildren) {
|
|
@@ -288,7 +281,6 @@ function defaultHasMultipleChildren(node) {
|
|
|
288
281
|
const child = children[0];
|
|
289
282
|
return children.length !== 1 || child.type === 11 || child.type === 9 && child.branches.some(defaultHasMultipleChildren);
|
|
290
283
|
}
|
|
291
|
-
|
|
292
284
|
//#endregion
|
|
293
285
|
//#region packages/compiler-dom/src/transforms/stringifyStatic.ts
|
|
294
286
|
/**
|
|
@@ -480,13 +472,11 @@ function evaluateConstant(exp) {
|
|
|
480
472
|
return res;
|
|
481
473
|
}
|
|
482
474
|
}
|
|
483
|
-
|
|
484
475
|
//#endregion
|
|
485
476
|
//#region packages/compiler-dom/src/transforms/ignoreSideEffectTags.ts
|
|
486
477
|
const ignoreSideEffectTags = (node, context) => {
|
|
487
478
|
if (node.type === 1 && node.tagType === 0 && (node.tag === "script" || node.tag === "style")) context.removeNode();
|
|
488
479
|
};
|
|
489
|
-
|
|
490
480
|
//#endregion
|
|
491
481
|
//#region packages/compiler-dom/src/htmlNesting.ts
|
|
492
482
|
/**
|
|
@@ -677,7 +667,6 @@ const knownInvalidParents = {
|
|
|
677
667
|
h5: headings,
|
|
678
668
|
h6: headings
|
|
679
669
|
};
|
|
680
|
-
|
|
681
670
|
//#endregion
|
|
682
671
|
//#region packages/compiler-dom/src/index.ts
|
|
683
672
|
const DOMNodeTransforms = [transformStyle, ...[]];
|
|
@@ -703,7 +692,6 @@ function compile(src, options = {}) {
|
|
|
703
692
|
function parse(template, options = {}) {
|
|
704
693
|
return (0, _vue_compiler_core.baseParse)(template, (0, _vue_shared.extend)({}, parserOptions, options));
|
|
705
694
|
}
|
|
706
|
-
|
|
707
695
|
//#endregion
|
|
708
696
|
exports.DOMDirectiveTransforms = DOMDirectiveTransforms;
|
|
709
697
|
exports.DOMErrorCodes = DOMErrorCodes;
|
|
@@ -728,9 +716,11 @@ exports.parserOptions = parserOptions;
|
|
|
728
716
|
exports.postTransformTransition = postTransformTransition;
|
|
729
717
|
exports.resolveModifiers = resolveModifiers;
|
|
730
718
|
exports.transformStyle = transformStyle;
|
|
731
|
-
Object.keys(_vue_compiler_core).forEach(function
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
719
|
+
Object.keys(_vue_compiler_core).forEach(function(k) {
|
|
720
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
721
|
+
enumerable: true,
|
|
722
|
+
get: function() {
|
|
723
|
+
return _vue_compiler_core[k];
|
|
724
|
+
}
|
|
725
|
+
});
|
|
736
726
|
});
|