@vue/compiler-dom 3.5.24 → 3.5.26

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.
@@ -1,32 +1,32 @@
1
1
  /**
2
- * @vue/compiler-dom v3.5.24
2
+ * @vue/compiler-dom v3.5.26
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
6
- import { registerRuntimeHelpers, createSimpleExpression, createCompilerError, createObjectProperty, createCallExpression, getConstantType, TO_DISPLAY_STRING, transformModel as transformModel$1, findProp, hasDynamicKeyVBind, findDir, isStaticArgOf, transformOn as transformOn$1, isStaticExp, createCompoundExpression, checkCompatEnabled, noopDirectiveTransform, baseCompile, baseParse } from '@vue/compiler-core';
6
+ import { registerRuntimeHelpers, createSimpleExpression, createCompilerError, createObjectProperty, createCallExpression, getConstantType, TO_DISPLAY_STRING, transformModel as transformModel$1, findProp, hasDynamicKeyVBind, findDir, isStaticArgOf, transformOn as transformOn$1, isStaticExp, createCompoundExpression, checkCompatEnabled, isCommentOrWhitespace, noopDirectiveTransform, baseCompile, baseParse } from '@vue/compiler-core';
7
7
  export * from '@vue/compiler-core';
8
8
  import { isHTMLTag, isSVGTag, isMathMLTag, isVoidTag, parseStringStyle, makeMap, capitalize, extend } from '@vue/shared';
9
9
 
10
- const V_MODEL_RADIO = Symbol(!!(process.env.NODE_ENV !== "production") ? `vModelRadio` : ``);
11
- const V_MODEL_CHECKBOX = Symbol(
10
+ const V_MODEL_RADIO = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `vModelRadio` : ``);
11
+ const V_MODEL_CHECKBOX = /* @__PURE__ */ Symbol(
12
12
  !!(process.env.NODE_ENV !== "production") ? `vModelCheckbox` : ``
13
13
  );
14
- const V_MODEL_TEXT = Symbol(!!(process.env.NODE_ENV !== "production") ? `vModelText` : ``);
15
- const V_MODEL_SELECT = Symbol(
14
+ const V_MODEL_TEXT = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `vModelText` : ``);
15
+ const V_MODEL_SELECT = /* @__PURE__ */ Symbol(
16
16
  !!(process.env.NODE_ENV !== "production") ? `vModelSelect` : ``
17
17
  );
18
- const V_MODEL_DYNAMIC = Symbol(
18
+ const V_MODEL_DYNAMIC = /* @__PURE__ */ Symbol(
19
19
  !!(process.env.NODE_ENV !== "production") ? `vModelDynamic` : ``
20
20
  );
21
- const V_ON_WITH_MODIFIERS = Symbol(
21
+ const V_ON_WITH_MODIFIERS = /* @__PURE__ */ Symbol(
22
22
  !!(process.env.NODE_ENV !== "production") ? `vOnModifiersGuard` : ``
23
23
  );
24
- const V_ON_WITH_KEYS = Symbol(
24
+ const V_ON_WITH_KEYS = /* @__PURE__ */ Symbol(
25
25
  !!(process.env.NODE_ENV !== "production") ? `vOnKeysGuard` : ``
26
26
  );
27
- const V_SHOW = Symbol(!!(process.env.NODE_ENV !== "production") ? `vShow` : ``);
28
- const TRANSITION = Symbol(!!(process.env.NODE_ENV !== "production") ? `Transition` : ``);
29
- const TRANSITION_GROUP = Symbol(
27
+ const V_SHOW = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `vShow` : ``);
28
+ const TRANSITION = /* @__PURE__ */ Symbol(!!(process.env.NODE_ENV !== "production") ? `Transition` : ``);
29
+ const TRANSITION_GROUP = /* @__PURE__ */ Symbol(
30
30
  !!(process.env.NODE_ENV !== "production") ? `TransitionGroup` : ``
31
31
  );
32
32
  registerRuntimeHelpers({
@@ -137,55 +137,55 @@ function createDOMCompilerError(code, loc) {
137
137
  );
138
138
  }
139
139
  const DOMErrorCodes = {
140
- "X_V_HTML_NO_EXPRESSION": 53,
141
- "53": "X_V_HTML_NO_EXPRESSION",
142
- "X_V_HTML_WITH_CHILDREN": 54,
143
- "54": "X_V_HTML_WITH_CHILDREN",
144
- "X_V_TEXT_NO_EXPRESSION": 55,
145
- "55": "X_V_TEXT_NO_EXPRESSION",
146
- "X_V_TEXT_WITH_CHILDREN": 56,
147
- "56": "X_V_TEXT_WITH_CHILDREN",
148
- "X_V_MODEL_ON_INVALID_ELEMENT": 57,
149
- "57": "X_V_MODEL_ON_INVALID_ELEMENT",
150
- "X_V_MODEL_ARG_ON_ELEMENT": 58,
151
- "58": "X_V_MODEL_ARG_ON_ELEMENT",
152
- "X_V_MODEL_ON_FILE_INPUT_ELEMENT": 59,
153
- "59": "X_V_MODEL_ON_FILE_INPUT_ELEMENT",
154
- "X_V_MODEL_UNNECESSARY_VALUE": 60,
155
- "60": "X_V_MODEL_UNNECESSARY_VALUE",
156
- "X_V_SHOW_NO_EXPRESSION": 61,
157
- "61": "X_V_SHOW_NO_EXPRESSION",
158
- "X_TRANSITION_INVALID_CHILDREN": 62,
159
- "62": "X_TRANSITION_INVALID_CHILDREN",
160
- "X_IGNORED_SIDE_EFFECT_TAG": 63,
161
- "63": "X_IGNORED_SIDE_EFFECT_TAG",
162
- "__EXTEND_POINT__": 64,
163
- "64": "__EXTEND_POINT__"
140
+ "X_V_HTML_NO_EXPRESSION": 54,
141
+ "54": "X_V_HTML_NO_EXPRESSION",
142
+ "X_V_HTML_WITH_CHILDREN": 55,
143
+ "55": "X_V_HTML_WITH_CHILDREN",
144
+ "X_V_TEXT_NO_EXPRESSION": 56,
145
+ "56": "X_V_TEXT_NO_EXPRESSION",
146
+ "X_V_TEXT_WITH_CHILDREN": 57,
147
+ "57": "X_V_TEXT_WITH_CHILDREN",
148
+ "X_V_MODEL_ON_INVALID_ELEMENT": 58,
149
+ "58": "X_V_MODEL_ON_INVALID_ELEMENT",
150
+ "X_V_MODEL_ARG_ON_ELEMENT": 59,
151
+ "59": "X_V_MODEL_ARG_ON_ELEMENT",
152
+ "X_V_MODEL_ON_FILE_INPUT_ELEMENT": 60,
153
+ "60": "X_V_MODEL_ON_FILE_INPUT_ELEMENT",
154
+ "X_V_MODEL_UNNECESSARY_VALUE": 61,
155
+ "61": "X_V_MODEL_UNNECESSARY_VALUE",
156
+ "X_V_SHOW_NO_EXPRESSION": 62,
157
+ "62": "X_V_SHOW_NO_EXPRESSION",
158
+ "X_TRANSITION_INVALID_CHILDREN": 63,
159
+ "63": "X_TRANSITION_INVALID_CHILDREN",
160
+ "X_IGNORED_SIDE_EFFECT_TAG": 64,
161
+ "64": "X_IGNORED_SIDE_EFFECT_TAG",
162
+ "__EXTEND_POINT__": 65,
163
+ "65": "__EXTEND_POINT__"
164
164
  };
165
165
  const DOMErrorMessages = {
166
- [53]: `v-html is missing expression.`,
167
- [54]: `v-html will override element children.`,
168
- [55]: `v-text is missing expression.`,
169
- [56]: `v-text will override element children.`,
170
- [57]: `v-model can only be used on <input>, <textarea> and <select> elements.`,
171
- [58]: `v-model argument is not supported on plain elements.`,
172
- [59]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`,
173
- [60]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`,
174
- [61]: `v-show is missing expression.`,
175
- [62]: `<Transition> expects exactly one child element or component.`,
176
- [63]: `Tags with side effect (<script> and <style>) are ignored in client component templates.`
166
+ [54]: `v-html is missing expression.`,
167
+ [55]: `v-html will override element children.`,
168
+ [56]: `v-text is missing expression.`,
169
+ [57]: `v-text will override element children.`,
170
+ [58]: `v-model can only be used on <input>, <textarea> and <select> elements.`,
171
+ [59]: `v-model argument is not supported on plain elements.`,
172
+ [60]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`,
173
+ [61]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`,
174
+ [62]: `v-show is missing expression.`,
175
+ [63]: `<Transition> expects exactly one child element or component.`,
176
+ [64]: `Tags with side effect (<script> and <style>) are ignored in client component templates.`
177
177
  };
178
178
 
179
179
  const transformVHtml = (dir, node, context) => {
180
180
  const { exp, loc } = dir;
181
181
  if (!exp) {
182
182
  context.onError(
183
- createDOMCompilerError(53, loc)
183
+ createDOMCompilerError(54, loc)
184
184
  );
185
185
  }
186
186
  if (node.children.length) {
187
187
  context.onError(
188
- createDOMCompilerError(54, loc)
188
+ createDOMCompilerError(55, loc)
189
189
  );
190
190
  node.children.length = 0;
191
191
  }
@@ -203,12 +203,12 @@ const transformVText = (dir, node, context) => {
203
203
  const { exp, loc } = dir;
204
204
  if (!exp) {
205
205
  context.onError(
206
- createDOMCompilerError(55, loc)
206
+ createDOMCompilerError(56, loc)
207
207
  );
208
208
  }
209
209
  if (node.children.length) {
210
210
  context.onError(
211
- createDOMCompilerError(56, loc)
211
+ createDOMCompilerError(57, loc)
212
212
  );
213
213
  node.children.length = 0;
214
214
  }
@@ -234,7 +234,7 @@ const transformModel = (dir, node, context) => {
234
234
  if (dir.arg) {
235
235
  context.onError(
236
236
  createDOMCompilerError(
237
- 58,
237
+ 59,
238
238
  dir.arg.loc
239
239
  )
240
240
  );
@@ -244,7 +244,7 @@ const transformModel = (dir, node, context) => {
244
244
  if (value && isStaticArgOf(value.arg, "value")) {
245
245
  context.onError(
246
246
  createDOMCompilerError(
247
- 60,
247
+ 61,
248
248
  value.loc
249
249
  )
250
250
  );
@@ -272,7 +272,7 @@ const transformModel = (dir, node, context) => {
272
272
  isInvalidType = true;
273
273
  context.onError(
274
274
  createDOMCompilerError(
275
- 59,
275
+ 60,
276
276
  dir.loc
277
277
  )
278
278
  );
@@ -298,7 +298,7 @@ const transformModel = (dir, node, context) => {
298
298
  } else {
299
299
  context.onError(
300
300
  createDOMCompilerError(
301
- 57,
301
+ 58,
302
302
  dir.loc
303
303
  )
304
304
  );
@@ -406,7 +406,7 @@ const transformShow = (dir, node, context) => {
406
406
  const { exp, loc } = dir;
407
407
  if (!exp) {
408
408
  context.onError(
409
- createDOMCompilerError(61, loc)
409
+ createDOMCompilerError(62, loc)
410
410
  );
411
411
  }
412
412
  return {
@@ -426,7 +426,7 @@ const transformTransition = (node, context) => {
426
426
  if (hasMultipleChildren(node)) {
427
427
  context.onError(
428
428
  createDOMCompilerError(
429
- 62,
429
+ 63,
430
430
  {
431
431
  start: node.children[0].loc.start,
432
432
  end: node.children[node.children.length - 1].loc.end,
@@ -455,7 +455,7 @@ const transformTransition = (node, context) => {
455
455
  };
456
456
  function hasMultipleChildren(node) {
457
457
  const children = node.children = node.children.filter(
458
- (c) => c.type !== 3 && !(c.type === 2 && !c.content.trim())
458
+ (c) => !isCommentOrWhitespace(c)
459
459
  );
460
460
  const child = children[0];
461
461
  return children.length !== 1 || child.type === 11 || child.type === 9 && child.branches.some(hasMultipleChildren);
@@ -465,7 +465,7 @@ const ignoreSideEffectTags = (node, context) => {
465
465
  if (node.type === 1 && node.tagType === 0 && (node.tag === "script" || node.tag === "style")) {
466
466
  !!(process.env.NODE_ENV !== "production") && context.onError(
467
467
  createDOMCompilerError(
468
- 63,
468
+ 64,
469
469
  node.loc
470
470
  )
471
471
  );