@vue/compiler-dom 3.6.0-alpha.6 → 3.6.0-beta.1

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,5 +1,5 @@
1
1
  /**
2
- * @vue/compiler-dom v3.6.0-alpha.6
2
+ * @vue/compiler-dom v3.6.0-beta.1
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -10,26 +10,26 @@ Object.defineProperty(exports, '__esModule', { value: true });
10
10
  var compilerCore = require('@vue/compiler-core');
11
11
  var shared = require('@vue/shared');
12
12
 
13
- const V_MODEL_RADIO = Symbol(`vModelRadio` );
14
- const V_MODEL_CHECKBOX = Symbol(
13
+ const V_MODEL_RADIO = /* @__PURE__ */ Symbol(`vModelRadio` );
14
+ const V_MODEL_CHECKBOX = /* @__PURE__ */ Symbol(
15
15
  `vModelCheckbox`
16
16
  );
17
- const V_MODEL_TEXT = Symbol(`vModelText` );
18
- const V_MODEL_SELECT = Symbol(
17
+ const V_MODEL_TEXT = /* @__PURE__ */ Symbol(`vModelText` );
18
+ const V_MODEL_SELECT = /* @__PURE__ */ Symbol(
19
19
  `vModelSelect`
20
20
  );
21
- const V_MODEL_DYNAMIC = Symbol(
21
+ const V_MODEL_DYNAMIC = /* @__PURE__ */ Symbol(
22
22
  `vModelDynamic`
23
23
  );
24
- const V_ON_WITH_MODIFIERS = Symbol(
24
+ const V_ON_WITH_MODIFIERS = /* @__PURE__ */ Symbol(
25
25
  `vOnModifiersGuard`
26
26
  );
27
- const V_ON_WITH_KEYS = Symbol(
27
+ const V_ON_WITH_KEYS = /* @__PURE__ */ Symbol(
28
28
  `vOnKeysGuard`
29
29
  );
30
- const V_SHOW = Symbol(`vShow` );
31
- const TRANSITION = Symbol(`Transition` );
32
- const TRANSITION_GROUP = Symbol(
30
+ const V_SHOW = /* @__PURE__ */ Symbol(`vShow` );
31
+ const TRANSITION = /* @__PURE__ */ Symbol(`Transition` );
32
+ const TRANSITION_GROUP = /* @__PURE__ */ Symbol(
33
33
  `TransitionGroup`
34
34
  );
35
35
  compilerCore.registerRuntimeHelpers({
@@ -126,57 +126,57 @@ function createDOMCompilerError(code, loc) {
126
126
  );
127
127
  }
128
128
  const DOMErrorCodes = {
129
- "X_V_HTML_NO_EXPRESSION": 53,
130
- "53": "X_V_HTML_NO_EXPRESSION",
131
- "X_V_HTML_WITH_CHILDREN": 54,
132
- "54": "X_V_HTML_WITH_CHILDREN",
133
- "X_V_TEXT_NO_EXPRESSION": 55,
134
- "55": "X_V_TEXT_NO_EXPRESSION",
135
- "X_V_TEXT_WITH_CHILDREN": 56,
136
- "56": "X_V_TEXT_WITH_CHILDREN",
137
- "X_V_MODEL_ON_INVALID_ELEMENT": 57,
138
- "57": "X_V_MODEL_ON_INVALID_ELEMENT",
139
- "X_V_MODEL_ARG_ON_ELEMENT": 58,
140
- "58": "X_V_MODEL_ARG_ON_ELEMENT",
141
- "X_V_MODEL_ON_FILE_INPUT_ELEMENT": 59,
142
- "59": "X_V_MODEL_ON_FILE_INPUT_ELEMENT",
143
- "X_V_MODEL_UNNECESSARY_VALUE": 60,
144
- "60": "X_V_MODEL_UNNECESSARY_VALUE",
145
- "X_V_SHOW_NO_EXPRESSION": 61,
146
- "61": "X_V_SHOW_NO_EXPRESSION",
147
- "X_TRANSITION_INVALID_CHILDREN": 62,
148
- "62": "X_TRANSITION_INVALID_CHILDREN",
149
- "X_IGNORED_SIDE_EFFECT_TAG": 63,
150
- "63": "X_IGNORED_SIDE_EFFECT_TAG",
151
- "__EXTEND_POINT__": 64,
152
- "64": "__EXTEND_POINT__"
129
+ "X_V_HTML_NO_EXPRESSION": 54,
130
+ "54": "X_V_HTML_NO_EXPRESSION",
131
+ "X_V_HTML_WITH_CHILDREN": 55,
132
+ "55": "X_V_HTML_WITH_CHILDREN",
133
+ "X_V_TEXT_NO_EXPRESSION": 56,
134
+ "56": "X_V_TEXT_NO_EXPRESSION",
135
+ "X_V_TEXT_WITH_CHILDREN": 57,
136
+ "57": "X_V_TEXT_WITH_CHILDREN",
137
+ "X_V_MODEL_ON_INVALID_ELEMENT": 58,
138
+ "58": "X_V_MODEL_ON_INVALID_ELEMENT",
139
+ "X_V_MODEL_ARG_ON_ELEMENT": 59,
140
+ "59": "X_V_MODEL_ARG_ON_ELEMENT",
141
+ "X_V_MODEL_ON_FILE_INPUT_ELEMENT": 60,
142
+ "60": "X_V_MODEL_ON_FILE_INPUT_ELEMENT",
143
+ "X_V_MODEL_UNNECESSARY_VALUE": 61,
144
+ "61": "X_V_MODEL_UNNECESSARY_VALUE",
145
+ "X_V_SHOW_NO_EXPRESSION": 62,
146
+ "62": "X_V_SHOW_NO_EXPRESSION",
147
+ "X_TRANSITION_INVALID_CHILDREN": 63,
148
+ "63": "X_TRANSITION_INVALID_CHILDREN",
149
+ "X_IGNORED_SIDE_EFFECT_TAG": 64,
150
+ "64": "X_IGNORED_SIDE_EFFECT_TAG",
151
+ "__EXTEND_POINT__": 65,
152
+ "65": "__EXTEND_POINT__"
153
153
  };
154
154
  const DOMErrorMessages = {
155
- [53]: `v-html is missing expression.`,
156
- [54]: `v-html will override element children.`,
157
- [55]: `v-text is missing expression.`,
158
- [56]: `v-text will override element children.`,
159
- [57]: `v-model can only be used on <input>, <textarea> and <select> elements.`,
160
- [58]: `v-model argument is not supported on plain elements.`,
161
- [59]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`,
162
- [60]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`,
163
- [61]: `v-show is missing expression.`,
164
- [62]: `<Transition> expects exactly one child element or component.`,
165
- [63]: `Tags with side effect (<script> and <style>) are ignored in client component templates.`,
155
+ [54]: `v-html is missing expression.`,
156
+ [55]: `v-html will override element children.`,
157
+ [56]: `v-text is missing expression.`,
158
+ [57]: `v-text will override element children.`,
159
+ [58]: `v-model can only be used on <input>, <textarea> and <select> elements.`,
160
+ [59]: `v-model argument is not supported on plain elements.`,
161
+ [60]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`,
162
+ [61]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`,
163
+ [62]: `v-show is missing expression.`,
164
+ [63]: `<Transition> expects exactly one child element or component.`,
165
+ [64]: `Tags with side effect (<script> and <style>) are ignored in client component templates.`,
166
166
  // just to fulfill types
167
- [64]: ``
167
+ [65]: ``
168
168
  };
169
169
 
170
170
  const transformVHtml = (dir, node, context) => {
171
171
  const { exp, loc } = dir;
172
172
  if (!exp) {
173
173
  context.onError(
174
- createDOMCompilerError(53, loc)
174
+ createDOMCompilerError(54, loc)
175
175
  );
176
176
  }
177
177
  if (node.children.length) {
178
178
  context.onError(
179
- createDOMCompilerError(54, loc)
179
+ createDOMCompilerError(55, loc)
180
180
  );
181
181
  node.children.length = 0;
182
182
  }
@@ -194,12 +194,12 @@ const transformVText = (dir, node, context) => {
194
194
  const { exp, loc } = dir;
195
195
  if (!exp) {
196
196
  context.onError(
197
- createDOMCompilerError(55, loc)
197
+ createDOMCompilerError(56, loc)
198
198
  );
199
199
  }
200
200
  if (node.children.length) {
201
201
  context.onError(
202
- createDOMCompilerError(56, loc)
202
+ createDOMCompilerError(57, loc)
203
203
  );
204
204
  node.children.length = 0;
205
205
  }
@@ -225,7 +225,7 @@ const transformModel = (dir, node, context) => {
225
225
  if (dir.arg) {
226
226
  context.onError(
227
227
  createDOMCompilerError(
228
- 58,
228
+ 59,
229
229
  dir.arg.loc
230
230
  )
231
231
  );
@@ -235,7 +235,7 @@ const transformModel = (dir, node, context) => {
235
235
  if (value && compilerCore.isStaticArgOf(value.arg, "value")) {
236
236
  context.onError(
237
237
  createDOMCompilerError(
238
- 60,
238
+ 61,
239
239
  value.loc
240
240
  )
241
241
  );
@@ -263,7 +263,7 @@ const transformModel = (dir, node, context) => {
263
263
  isInvalidType = true;
264
264
  context.onError(
265
265
  createDOMCompilerError(
266
- 59,
266
+ 60,
267
267
  dir.loc
268
268
  )
269
269
  );
@@ -289,7 +289,7 @@ const transformModel = (dir, node, context) => {
289
289
  } else {
290
290
  context.onError(
291
291
  createDOMCompilerError(
292
- 57,
292
+ 58,
293
293
  dir.loc
294
294
  )
295
295
  );
@@ -400,7 +400,7 @@ const transformShow = (dir, node, context) => {
400
400
  const { exp, loc } = dir;
401
401
  if (!exp) {
402
402
  context.onError(
403
- createDOMCompilerError(61, loc)
403
+ createDOMCompilerError(62, loc)
404
404
  );
405
405
  }
406
406
  return {
@@ -424,7 +424,7 @@ function postTransformTransition(node, onError, hasMultipleChildren = defaultHas
424
424
  }
425
425
  if (hasMultipleChildren(node)) {
426
426
  onError(
427
- createDOMCompilerError(62, {
427
+ createDOMCompilerError(63, {
428
428
  start: node.children[0].loc.start,
429
429
  end: node.children[node.children.length - 1].loc.end,
430
430
  source: ""
@@ -693,7 +693,7 @@ const ignoreSideEffectTags = (node, context) => {
693
693
  if (node.type === 1 && node.tagType === 0 && (node.tag === "script" || node.tag === "style")) {
694
694
  context.onError(
695
695
  createDOMCompilerError(
696
- 63,
696
+ 64,
697
697
  node.loc
698
698
  )
699
699
  );
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compiler-dom v3.6.0-alpha.6
2
+ * @vue/compiler-dom v3.6.0-beta.1
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -10,26 +10,26 @@ Object.defineProperty(exports, '__esModule', { value: true });
10
10
  var compilerCore = require('@vue/compiler-core');
11
11
  var shared = require('@vue/shared');
12
12
 
13
- const V_MODEL_RADIO = Symbol(``);
14
- const V_MODEL_CHECKBOX = Symbol(
13
+ const V_MODEL_RADIO = /* @__PURE__ */ Symbol(``);
14
+ const V_MODEL_CHECKBOX = /* @__PURE__ */ Symbol(
15
15
  ``
16
16
  );
17
- const V_MODEL_TEXT = Symbol(``);
18
- const V_MODEL_SELECT = Symbol(
17
+ const V_MODEL_TEXT = /* @__PURE__ */ Symbol(``);
18
+ const V_MODEL_SELECT = /* @__PURE__ */ Symbol(
19
19
  ``
20
20
  );
21
- const V_MODEL_DYNAMIC = Symbol(
21
+ const V_MODEL_DYNAMIC = /* @__PURE__ */ Symbol(
22
22
  ``
23
23
  );
24
- const V_ON_WITH_MODIFIERS = Symbol(
24
+ const V_ON_WITH_MODIFIERS = /* @__PURE__ */ Symbol(
25
25
  ``
26
26
  );
27
- const V_ON_WITH_KEYS = Symbol(
27
+ const V_ON_WITH_KEYS = /* @__PURE__ */ Symbol(
28
28
  ``
29
29
  );
30
- const V_SHOW = Symbol(``);
31
- const TRANSITION = Symbol(``);
32
- const TRANSITION_GROUP = Symbol(
30
+ const V_SHOW = /* @__PURE__ */ Symbol(``);
31
+ const TRANSITION = /* @__PURE__ */ Symbol(``);
32
+ const TRANSITION_GROUP = /* @__PURE__ */ Symbol(
33
33
  ``
34
34
  );
35
35
  compilerCore.registerRuntimeHelpers({
@@ -126,57 +126,57 @@ function createDOMCompilerError(code, loc) {
126
126
  );
127
127
  }
128
128
  const DOMErrorCodes = {
129
- "X_V_HTML_NO_EXPRESSION": 53,
130
- "53": "X_V_HTML_NO_EXPRESSION",
131
- "X_V_HTML_WITH_CHILDREN": 54,
132
- "54": "X_V_HTML_WITH_CHILDREN",
133
- "X_V_TEXT_NO_EXPRESSION": 55,
134
- "55": "X_V_TEXT_NO_EXPRESSION",
135
- "X_V_TEXT_WITH_CHILDREN": 56,
136
- "56": "X_V_TEXT_WITH_CHILDREN",
137
- "X_V_MODEL_ON_INVALID_ELEMENT": 57,
138
- "57": "X_V_MODEL_ON_INVALID_ELEMENT",
139
- "X_V_MODEL_ARG_ON_ELEMENT": 58,
140
- "58": "X_V_MODEL_ARG_ON_ELEMENT",
141
- "X_V_MODEL_ON_FILE_INPUT_ELEMENT": 59,
142
- "59": "X_V_MODEL_ON_FILE_INPUT_ELEMENT",
143
- "X_V_MODEL_UNNECESSARY_VALUE": 60,
144
- "60": "X_V_MODEL_UNNECESSARY_VALUE",
145
- "X_V_SHOW_NO_EXPRESSION": 61,
146
- "61": "X_V_SHOW_NO_EXPRESSION",
147
- "X_TRANSITION_INVALID_CHILDREN": 62,
148
- "62": "X_TRANSITION_INVALID_CHILDREN",
149
- "X_IGNORED_SIDE_EFFECT_TAG": 63,
150
- "63": "X_IGNORED_SIDE_EFFECT_TAG",
151
- "__EXTEND_POINT__": 64,
152
- "64": "__EXTEND_POINT__"
129
+ "X_V_HTML_NO_EXPRESSION": 54,
130
+ "54": "X_V_HTML_NO_EXPRESSION",
131
+ "X_V_HTML_WITH_CHILDREN": 55,
132
+ "55": "X_V_HTML_WITH_CHILDREN",
133
+ "X_V_TEXT_NO_EXPRESSION": 56,
134
+ "56": "X_V_TEXT_NO_EXPRESSION",
135
+ "X_V_TEXT_WITH_CHILDREN": 57,
136
+ "57": "X_V_TEXT_WITH_CHILDREN",
137
+ "X_V_MODEL_ON_INVALID_ELEMENT": 58,
138
+ "58": "X_V_MODEL_ON_INVALID_ELEMENT",
139
+ "X_V_MODEL_ARG_ON_ELEMENT": 59,
140
+ "59": "X_V_MODEL_ARG_ON_ELEMENT",
141
+ "X_V_MODEL_ON_FILE_INPUT_ELEMENT": 60,
142
+ "60": "X_V_MODEL_ON_FILE_INPUT_ELEMENT",
143
+ "X_V_MODEL_UNNECESSARY_VALUE": 61,
144
+ "61": "X_V_MODEL_UNNECESSARY_VALUE",
145
+ "X_V_SHOW_NO_EXPRESSION": 62,
146
+ "62": "X_V_SHOW_NO_EXPRESSION",
147
+ "X_TRANSITION_INVALID_CHILDREN": 63,
148
+ "63": "X_TRANSITION_INVALID_CHILDREN",
149
+ "X_IGNORED_SIDE_EFFECT_TAG": 64,
150
+ "64": "X_IGNORED_SIDE_EFFECT_TAG",
151
+ "__EXTEND_POINT__": 65,
152
+ "65": "__EXTEND_POINT__"
153
153
  };
154
154
  const DOMErrorMessages = {
155
- [53]: `v-html is missing expression.`,
156
- [54]: `v-html will override element children.`,
157
- [55]: `v-text is missing expression.`,
158
- [56]: `v-text will override element children.`,
159
- [57]: `v-model can only be used on <input>, <textarea> and <select> elements.`,
160
- [58]: `v-model argument is not supported on plain elements.`,
161
- [59]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`,
162
- [60]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`,
163
- [61]: `v-show is missing expression.`,
164
- [62]: `<Transition> expects exactly one child element or component.`,
165
- [63]: `Tags with side effect (<script> and <style>) are ignored in client component templates.`,
155
+ [54]: `v-html is missing expression.`,
156
+ [55]: `v-html will override element children.`,
157
+ [56]: `v-text is missing expression.`,
158
+ [57]: `v-text will override element children.`,
159
+ [58]: `v-model can only be used on <input>, <textarea> and <select> elements.`,
160
+ [59]: `v-model argument is not supported on plain elements.`,
161
+ [60]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`,
162
+ [61]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`,
163
+ [62]: `v-show is missing expression.`,
164
+ [63]: `<Transition> expects exactly one child element or component.`,
165
+ [64]: `Tags with side effect (<script> and <style>) are ignored in client component templates.`,
166
166
  // just to fulfill types
167
- [64]: ``
167
+ [65]: ``
168
168
  };
169
169
 
170
170
  const transformVHtml = (dir, node, context) => {
171
171
  const { exp, loc } = dir;
172
172
  if (!exp) {
173
173
  context.onError(
174
- createDOMCompilerError(53, loc)
174
+ createDOMCompilerError(54, loc)
175
175
  );
176
176
  }
177
177
  if (node.children.length) {
178
178
  context.onError(
179
- createDOMCompilerError(54, loc)
179
+ createDOMCompilerError(55, loc)
180
180
  );
181
181
  node.children.length = 0;
182
182
  }
@@ -194,12 +194,12 @@ const transformVText = (dir, node, context) => {
194
194
  const { exp, loc } = dir;
195
195
  if (!exp) {
196
196
  context.onError(
197
- createDOMCompilerError(55, loc)
197
+ createDOMCompilerError(56, loc)
198
198
  );
199
199
  }
200
200
  if (node.children.length) {
201
201
  context.onError(
202
- createDOMCompilerError(56, loc)
202
+ createDOMCompilerError(57, loc)
203
203
  );
204
204
  node.children.length = 0;
205
205
  }
@@ -225,7 +225,7 @@ const transformModel = (dir, node, context) => {
225
225
  if (dir.arg) {
226
226
  context.onError(
227
227
  createDOMCompilerError(
228
- 58,
228
+ 59,
229
229
  dir.arg.loc
230
230
  )
231
231
  );
@@ -252,7 +252,7 @@ const transformModel = (dir, node, context) => {
252
252
  isInvalidType = true;
253
253
  context.onError(
254
254
  createDOMCompilerError(
255
- 59,
255
+ 60,
256
256
  dir.loc
257
257
  )
258
258
  );
@@ -271,7 +271,7 @@ const transformModel = (dir, node, context) => {
271
271
  } else {
272
272
  context.onError(
273
273
  createDOMCompilerError(
274
- 57,
274
+ 58,
275
275
  dir.loc
276
276
  )
277
277
  );
@@ -382,7 +382,7 @@ const transformShow = (dir, node, context) => {
382
382
  const { exp, loc } = dir;
383
383
  if (!exp) {
384
384
  context.onError(
385
- createDOMCompilerError(61, loc)
385
+ createDOMCompilerError(62, loc)
386
386
  );
387
387
  }
388
388
  return {
@@ -398,7 +398,7 @@ function postTransformTransition(node, onError, hasMultipleChildren = defaultHas
398
398
  }
399
399
  if (hasMultipleChildren(node)) {
400
400
  onError(
401
- createDOMCompilerError(62, {
401
+ createDOMCompilerError(63, {
402
402
  start: node.children[0].loc.start,
403
403
  end: node.children[node.children.length - 1].loc.end,
404
404
  source: ""
@@ -21,18 +21,18 @@ interface DOMCompilerError extends CompilerError {
21
21
  }
22
22
  export declare function createDOMCompilerError(code: DOMErrorCodes, loc?: SourceLocation): DOMCompilerError;
23
23
  export declare enum DOMErrorCodes {
24
- X_V_HTML_NO_EXPRESSION = 53,
25
- X_V_HTML_WITH_CHILDREN = 54,
26
- X_V_TEXT_NO_EXPRESSION = 55,
27
- X_V_TEXT_WITH_CHILDREN = 56,
28
- X_V_MODEL_ON_INVALID_ELEMENT = 57,
29
- X_V_MODEL_ARG_ON_ELEMENT = 58,
30
- X_V_MODEL_ON_FILE_INPUT_ELEMENT = 59,
31
- X_V_MODEL_UNNECESSARY_VALUE = 60,
32
- X_V_SHOW_NO_EXPRESSION = 61,
33
- X_TRANSITION_INVALID_CHILDREN = 62,
34
- X_IGNORED_SIDE_EFFECT_TAG = 63,
35
- __EXTEND_POINT__ = 64
24
+ X_V_HTML_NO_EXPRESSION = 54,
25
+ X_V_HTML_WITH_CHILDREN = 55,
26
+ X_V_TEXT_NO_EXPRESSION = 56,
27
+ X_V_TEXT_WITH_CHILDREN = 57,
28
+ X_V_MODEL_ON_INVALID_ELEMENT = 58,
29
+ X_V_MODEL_ARG_ON_ELEMENT = 59,
30
+ X_V_MODEL_ON_FILE_INPUT_ELEMENT = 60,
31
+ X_V_MODEL_UNNECESSARY_VALUE = 61,
32
+ X_V_SHOW_NO_EXPRESSION = 62,
33
+ X_TRANSITION_INVALID_CHILDREN = 63,
34
+ X_IGNORED_SIDE_EFFECT_TAG = 64,
35
+ __EXTEND_POINT__ = 65
36
36
  }
37
37
  export declare const DOMErrorMessages: Record<DOMErrorCodes, string>;
38
38