@vue/compat 3.3.0-alpha.4 → 3.3.0-alpha.6

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.
@@ -13,22 +13,99 @@ function makeMap(str, expectsLowerCase) {
13
13
  return expectsLowerCase ? (val) => !!map[val.toLowerCase()] : (val) => !!map[val];
14
14
  }
15
15
 
16
- const PatchFlagNames = {
17
- [1]: `TEXT`,
18
- [2]: `CLASS`,
19
- [4]: `STYLE`,
20
- [8]: `PROPS`,
21
- [16]: `FULL_PROPS`,
22
- [32]: `HYDRATE_EVENTS`,
23
- [64]: `STABLE_FRAGMENT`,
24
- [128]: `KEYED_FRAGMENT`,
25
- [256]: `UNKEYED_FRAGMENT`,
26
- [512]: `NEED_PATCH`,
27
- [1024]: `DYNAMIC_SLOTS`,
28
- [2048]: `DEV_ROOT_FRAGMENT`,
29
- [-1]: `HOISTED`,
30
- [-2]: `BAIL`
16
+ const EMPTY_OBJ = {};
17
+ const EMPTY_ARR = [];
18
+ const NOOP = () => {
19
+ };
20
+ const NO = () => false;
21
+ const onRE = /^on[^a-z]/;
22
+ const isOn = (key) => onRE.test(key);
23
+ const isModelListener = (key) => key.startsWith("onUpdate:");
24
+ const extend = Object.assign;
25
+ const remove = (arr, el) => {
26
+ const i = arr.indexOf(el);
27
+ if (i > -1) {
28
+ arr.splice(i, 1);
29
+ }
30
+ };
31
+ const hasOwnProperty$1 = Object.prototype.hasOwnProperty;
32
+ const hasOwn = (val, key) => hasOwnProperty$1.call(val, key);
33
+ const isArray = Array.isArray;
34
+ const isMap = (val) => toTypeString(val) === "[object Map]";
35
+ const isSet = (val) => toTypeString(val) === "[object Set]";
36
+ const isDate = (val) => toTypeString(val) === "[object Date]";
37
+ const isRegExp = (val) => toTypeString(val) === "[object RegExp]";
38
+ const isFunction = (val) => typeof val === "function";
39
+ const isString = (val) => typeof val === "string";
40
+ const isSymbol = (val) => typeof val === "symbol";
41
+ const isObject = (val) => val !== null && typeof val === "object";
42
+ const isPromise = (val) => {
43
+ return isObject(val) && isFunction(val.then) && isFunction(val.catch);
44
+ };
45
+ const objectToString = Object.prototype.toString;
46
+ const toTypeString = (value) => objectToString.call(value);
47
+ const toRawType = (value) => {
48
+ return toTypeString(value).slice(8, -1);
49
+ };
50
+ const isPlainObject = (val) => toTypeString(val) === "[object Object]";
51
+ const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
52
+ const isReservedProp = /* @__PURE__ */ makeMap(
53
+ // the leading comma is intentional so empty string "" is also included
54
+ ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"
55
+ );
56
+ const isBuiltInDirective = /* @__PURE__ */ makeMap(
57
+ "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"
58
+ );
59
+ const cacheStringFunction = (fn) => {
60
+ const cache = /* @__PURE__ */ Object.create(null);
61
+ return (str) => {
62
+ const hit = cache[str];
63
+ return hit || (cache[str] = fn(str));
64
+ };
65
+ };
66
+ const camelizeRE = /-(\w)/g;
67
+ const camelize = cacheStringFunction((str) => {
68
+ return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");
69
+ });
70
+ const hyphenateRE = /\B([A-Z])/g;
71
+ const hyphenate = cacheStringFunction(
72
+ (str) => str.replace(hyphenateRE, "-$1").toLowerCase()
73
+ );
74
+ const capitalize = cacheStringFunction(
75
+ (str) => str.charAt(0).toUpperCase() + str.slice(1)
76
+ );
77
+ const toHandlerKey = cacheStringFunction(
78
+ (str) => str ? `on${capitalize(str)}` : ``
79
+ );
80
+ const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
81
+ const invokeArrayFns = (fns, arg) => {
82
+ for (let i = 0; i < fns.length; i++) {
83
+ fns[i](arg);
84
+ }
85
+ };
86
+ const def = (obj, key, value) => {
87
+ Object.defineProperty(obj, key, {
88
+ configurable: true,
89
+ enumerable: false,
90
+ value
91
+ });
92
+ };
93
+ const looseToNumber = (val) => {
94
+ const n = parseFloat(val);
95
+ return isNaN(n) ? val : n;
96
+ };
97
+ const toNumber = (val) => {
98
+ const n = isString(val) ? Number(val) : NaN;
99
+ return isNaN(n) ? val : n;
31
100
  };
101
+ let _globalThis;
102
+ const getGlobalThis = () => {
103
+ return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
104
+ };
105
+ const identRE = /^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/;
106
+ function genPropsAccessExp(name) {
107
+ return identRE.test(name) ? `__props.${name}` : `__props[${JSON.stringify(name)}]`;
108
+ }
32
109
 
33
110
  const GLOBALS_WHITE_LISTED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt";
34
111
  const isGloballyWhitelisted = /* @__PURE__ */ makeMap(GLOBALS_WHITE_LISTED);
@@ -249,100 +326,6 @@ const replacer = (_key, val) => {
249
326
  return val;
250
327
  };
251
328
 
252
- const EMPTY_OBJ = {};
253
- const EMPTY_ARR = [];
254
- const NOOP = () => {
255
- };
256
- const NO = () => false;
257
- const onRE = /^on[^a-z]/;
258
- const isOn = (key) => onRE.test(key);
259
- const isModelListener = (key) => key.startsWith("onUpdate:");
260
- const extend = Object.assign;
261
- const remove = (arr, el) => {
262
- const i = arr.indexOf(el);
263
- if (i > -1) {
264
- arr.splice(i, 1);
265
- }
266
- };
267
- const hasOwnProperty$1 = Object.prototype.hasOwnProperty;
268
- const hasOwn = (val, key) => hasOwnProperty$1.call(val, key);
269
- const isArray = Array.isArray;
270
- const isMap = (val) => toTypeString(val) === "[object Map]";
271
- const isSet = (val) => toTypeString(val) === "[object Set]";
272
- const isDate = (val) => toTypeString(val) === "[object Date]";
273
- const isRegExp = (val) => toTypeString(val) === "[object RegExp]";
274
- const isFunction = (val) => typeof val === "function";
275
- const isString = (val) => typeof val === "string";
276
- const isSymbol = (val) => typeof val === "symbol";
277
- const isObject = (val) => val !== null && typeof val === "object";
278
- const isPromise = (val) => {
279
- return isObject(val) && isFunction(val.then) && isFunction(val.catch);
280
- };
281
- const objectToString = Object.prototype.toString;
282
- const toTypeString = (value) => objectToString.call(value);
283
- const toRawType = (value) => {
284
- return toTypeString(value).slice(8, -1);
285
- };
286
- const isPlainObject = (val) => toTypeString(val) === "[object Object]";
287
- const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
288
- const isReservedProp = /* @__PURE__ */ makeMap(
289
- // the leading comma is intentional so empty string "" is also included
290
- ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"
291
- );
292
- const isBuiltInDirective = /* @__PURE__ */ makeMap(
293
- "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"
294
- );
295
- const cacheStringFunction = (fn) => {
296
- const cache = /* @__PURE__ */ Object.create(null);
297
- return (str) => {
298
- const hit = cache[str];
299
- return hit || (cache[str] = fn(str));
300
- };
301
- };
302
- const camelizeRE = /-(\w)/g;
303
- const camelize = cacheStringFunction((str) => {
304
- return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");
305
- });
306
- const hyphenateRE = /\B([A-Z])/g;
307
- const hyphenate = cacheStringFunction(
308
- (str) => str.replace(hyphenateRE, "-$1").toLowerCase()
309
- );
310
- const capitalize = cacheStringFunction(
311
- (str) => str.charAt(0).toUpperCase() + str.slice(1)
312
- );
313
- const toHandlerKey = cacheStringFunction(
314
- (str) => str ? `on${capitalize(str)}` : ``
315
- );
316
- const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
317
- const invokeArrayFns = (fns, arg) => {
318
- for (let i = 0; i < fns.length; i++) {
319
- fns[i](arg);
320
- }
321
- };
322
- const def = (obj, key, value) => {
323
- Object.defineProperty(obj, key, {
324
- configurable: true,
325
- enumerable: false,
326
- value
327
- });
328
- };
329
- const looseToNumber = (val) => {
330
- const n = parseFloat(val);
331
- return isNaN(n) ? val : n;
332
- };
333
- const toNumber = (val) => {
334
- const n = isString(val) ? Number(val) : NaN;
335
- return isNaN(n) ? val : n;
336
- };
337
- let _globalThis;
338
- const getGlobalThis = () => {
339
- return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
340
- };
341
- const identRE = /^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/;
342
- function genPropsAccessExp(name) {
343
- return identRE.test(name) ? `__props.${name}` : `__props[${JSON.stringify(name)}]`;
344
- }
345
-
346
329
  let activeEffectScope;
347
330
  class EffectScope {
348
331
  constructor(detached = false) {
@@ -3227,8 +3210,8 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
3227
3210
  return ret;
3228
3211
  }
3229
3212
 
3230
- function defineComponent(options) {
3231
- return isFunction(options) ? { setup: options, name: options.name } : options;
3213
+ function defineComponent(options, extraOptions) {
3214
+ return isFunction(options) ? extend({}, extraOptions, { setup: options, name: options.name }) : options;
3232
3215
  }
3233
3216
 
3234
3217
  const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
@@ -3779,7 +3762,7 @@ const FILTERS = "filters";
3779
3762
  function resolveComponent(name, maybeSelfReference) {
3780
3763
  return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
3781
3764
  }
3782
- const NULL_DYNAMIC_COMPONENT = Symbol();
3765
+ const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
3783
3766
  function resolveDynamicComponent(component) {
3784
3767
  if (isString(component)) {
3785
3768
  return resolveAsset(COMPONENTS, component, false) || component;
@@ -5133,7 +5116,7 @@ function resolvePropValue(options, props, key, value, instance, isAbsent) {
5133
5116
  const hasDefault = hasOwn(opt, "default");
5134
5117
  if (hasDefault && value === void 0) {
5135
5118
  const defaultValue = opt.default;
5136
- if (opt.type !== Function && isFunction(defaultValue)) {
5119
+ if (opt.type !== Function && !opt.skipFactory && isFunction(defaultValue)) {
5137
5120
  const { propsDefaults } = instance;
5138
5121
  if (key in propsDefaults) {
5139
5122
  value = propsDefaults[key];
@@ -5372,7 +5355,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
5372
5355
  return vm;
5373
5356
  }
5374
5357
  }
5375
- Vue.version = `2.6.14-compat:${"3.3.0-alpha.4"}`;
5358
+ Vue.version = `2.6.14-compat:${"3.3.0-alpha.6"}`;
5376
5359
  Vue.config = singletonApp.config;
5377
5360
  Vue.use = (p, ...options) => {
5378
5361
  if (p && isFunction(p.install)) {
@@ -7906,10 +7889,10 @@ function convertLegacyComponent(comp, instance) {
7906
7889
  return comp;
7907
7890
  }
7908
7891
 
7909
- const Fragment = Symbol(void 0);
7910
- const Text = Symbol(void 0);
7911
- const Comment = Symbol(void 0);
7912
- const Static = Symbol(void 0);
7892
+ const Fragment = Symbol.for("v-fgt");
7893
+ const Text = Symbol.for("v-txt");
7894
+ const Comment = Symbol.for("v-cmt");
7895
+ const Static = Symbol.for("v-stc");
7913
7896
  const blockStack = [];
7914
7897
  let currentBlock = null;
7915
7898
  function openBlock(disableTracking = false) {
@@ -8337,13 +8320,29 @@ function createComponentInstance(vnode, parent, suspense) {
8337
8320
  }
8338
8321
  let currentInstance = null;
8339
8322
  const getCurrentInstance = () => currentInstance || currentRenderingInstance;
8323
+ let internalSetCurrentInstance;
8324
+ let globalCurrentInstanceSetters;
8325
+ let settersKey = "__VUE_INSTANCE_SETTERS__";
8326
+ {
8327
+ if (!(globalCurrentInstanceSetters = getGlobalThis()[settersKey])) {
8328
+ globalCurrentInstanceSetters = getGlobalThis()[settersKey] = [];
8329
+ }
8330
+ globalCurrentInstanceSetters.push((i) => currentInstance = i);
8331
+ internalSetCurrentInstance = (instance) => {
8332
+ if (globalCurrentInstanceSetters.length > 1) {
8333
+ globalCurrentInstanceSetters.forEach((s) => s(instance));
8334
+ } else {
8335
+ globalCurrentInstanceSetters[0](instance);
8336
+ }
8337
+ };
8338
+ }
8340
8339
  const setCurrentInstance = (instance) => {
8341
- currentInstance = instance;
8340
+ internalSetCurrentInstance(instance);
8342
8341
  instance.scope.on();
8343
8342
  };
8344
8343
  const unsetCurrentInstance = () => {
8345
8344
  currentInstance && currentInstance.scope.off();
8346
- currentInstance = null;
8345
+ internalSetCurrentInstance(null);
8347
8346
  };
8348
8347
  function isStatefulComponent(instance) {
8349
8348
  return instance.vnode.shapeFlag & 4;
@@ -8522,6 +8521,8 @@ function defineEmits() {
8522
8521
  }
8523
8522
  function defineExpose(exposed) {
8524
8523
  }
8524
+ function defineOptions(options) {
8525
+ }
8525
8526
  function withDefaults(props, defaults) {
8526
8527
  return null;
8527
8528
  }
@@ -8541,16 +8542,21 @@ function mergeDefaults(raw, defaults) {
8541
8542
  {}
8542
8543
  ) : raw;
8543
8544
  for (const key in defaults) {
8544
- const opt = props[key];
8545
+ if (key.startsWith("__skip"))
8546
+ continue;
8547
+ let opt = props[key];
8545
8548
  if (opt) {
8546
8549
  if (isArray(opt) || isFunction(opt)) {
8547
- props[key] = { type: opt, default: defaults[key] };
8550
+ opt = props[key] = { type: opt, default: defaults[key] };
8548
8551
  } else {
8549
8552
  opt.default = defaults[key];
8550
8553
  }
8551
8554
  } else if (opt === null) {
8552
- props[key] = { default: defaults[key] };
8555
+ opt = props[key] = { default: defaults[key] };
8553
8556
  } else ;
8557
+ if (opt && defaults[`__skip_${key}`]) {
8558
+ opt.skipFactory = true;
8559
+ }
8554
8560
  }
8555
8561
  return props;
8556
8562
  }
@@ -8600,7 +8606,7 @@ function h(type, propsOrChildren, children) {
8600
8606
  }
8601
8607
  }
8602
8608
 
8603
- const ssrContextKey = Symbol(``);
8609
+ const ssrContextKey = Symbol.for("v-scx");
8604
8610
  const useSSRContext = () => {
8605
8611
  {
8606
8612
  const ctx = inject(ssrContextKey);
@@ -8639,7 +8645,7 @@ function isMemoSame(cached, memo) {
8639
8645
  return true;
8640
8646
  }
8641
8647
 
8642
- const version = "3.3.0-alpha.4";
8648
+ const version = "3.3.0-alpha.6";
8643
8649
  const _ssrUtils = {
8644
8650
  createComponentInstance,
8645
8651
  setupComponent,
@@ -10176,6 +10182,7 @@ var runtimeDom = /*#__PURE__*/Object.freeze({
10176
10182
  defineCustomElement: defineCustomElement,
10177
10183
  defineEmits: defineEmits,
10178
10184
  defineExpose: defineExpose,
10185
+ defineOptions: defineOptions,
10179
10186
  defineProps: defineProps,
10180
10187
  defineSSRCustomElement: defineSSRCustomElement,
10181
10188
  get devtools () { return devtools; },
@@ -10589,6 +10596,20 @@ function createBlockStatement(body) {
10589
10596
  loc: locStub
10590
10597
  };
10591
10598
  }
10599
+ function getVNodeHelper(ssr, isComponent) {
10600
+ return ssr || isComponent ? CREATE_VNODE : CREATE_ELEMENT_VNODE;
10601
+ }
10602
+ function getVNodeBlockHelper(ssr, isComponent) {
10603
+ return ssr || isComponent ? CREATE_BLOCK : CREATE_ELEMENT_BLOCK;
10604
+ }
10605
+ function convertToBlock(node, { helper, removeHelper, inSSR }) {
10606
+ if (!node.isBlock) {
10607
+ node.isBlock = true;
10608
+ removeHelper(getVNodeHelper(inSSR, node.isComponent));
10609
+ helper(OPEN_BLOCK);
10610
+ helper(getVNodeBlockHelper(inSSR, node.isComponent));
10611
+ }
10612
+ }
10592
10613
 
10593
10614
  const isStaticExp = (p) => p.type === 4 && p.isStatic;
10594
10615
  const isBuiltInType = (tag, expected) => tag === expected || tag === hyphenate(expected);
@@ -10701,12 +10722,6 @@ function isTemplateNode(node) {
10701
10722
  function isSlotOutlet(node) {
10702
10723
  return node.type === 1 && node.tagType === 2;
10703
10724
  }
10704
- function getVNodeHelper(ssr, isComponent) {
10705
- return ssr || isComponent ? CREATE_VNODE : CREATE_ELEMENT_VNODE;
10706
- }
10707
- function getVNodeBlockHelper(ssr, isComponent) {
10708
- return ssr || isComponent ? CREATE_BLOCK : CREATE_ELEMENT_BLOCK;
10709
- }
10710
10725
  const propsHelperSet = /* @__PURE__ */ new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]);
10711
10726
  function getUnnormalizedProps(props, callPath = []) {
10712
10727
  if (props && !isString(props) && props.type === 14) {
@@ -10839,14 +10854,6 @@ function getMemoedVNodeCall(node) {
10839
10854
  return node;
10840
10855
  }
10841
10856
  }
10842
- function makeBlock(node, { helper, removeHelper, inSSR }) {
10843
- if (!node.isBlock) {
10844
- node.isBlock = true;
10845
- removeHelper(getVNodeHelper(inSSR, node.isComponent));
10846
- helper(OPEN_BLOCK);
10847
- helper(getVNodeBlockHelper(inSSR, node.isComponent));
10848
- }
10849
- }
10850
10857
 
10851
10858
  function getCompatValue(key, context) {
10852
10859
  const config = context.options ? context.options.compatConfig : context.compatConfig;
@@ -12032,7 +12039,7 @@ function createRootCodegen(root, context) {
12032
12039
  if (isSingleElementRoot(root, child) && child.codegenNode) {
12033
12040
  const codegenNode = child.codegenNode;
12034
12041
  if (codegenNode.type === 13) {
12035
- makeBlock(codegenNode, context);
12042
+ convertToBlock(codegenNode, context);
12036
12043
  }
12037
12044
  root.codegenNode = codegenNode;
12038
12045
  } else {
@@ -12040,7 +12047,6 @@ function createRootCodegen(root, context) {
12040
12047
  }
12041
12048
  } else if (children.length > 1) {
12042
12049
  let patchFlag = 64;
12043
- PatchFlagNames[64];
12044
12050
  root.codegenNode = createVNodeCall(
12045
12051
  context,
12046
12052
  helper(FRAGMENT),
@@ -12884,7 +12890,7 @@ function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [
12884
12890
  estreeWalker.walk(root, {
12885
12891
  enter(node, parent) {
12886
12892
  parent && parentStack.push(parent);
12887
- if (parent && parent.type.startsWith("TS") && parent.type !== "TSAsExpression" && parent.type !== "TSNonNullExpression" && parent.type !== "TSTypeAssertion") {
12893
+ if (parent && parent.type.startsWith("TS") && !TS_NODE_TYPES.includes(parent.type)) {
12888
12894
  return this.skip();
12889
12895
  }
12890
12896
  if (node.type === "Identifier") {
@@ -13115,6 +13121,18 @@ function isReferenced(node, parent, grandparent) {
13115
13121
  }
13116
13122
  return true;
13117
13123
  }
13124
+ const TS_NODE_TYPES = [
13125
+ "TSAsExpression",
13126
+ // foo as number
13127
+ "TSTypeAssertion",
13128
+ // (<number>foo)
13129
+ "TSNonNullExpression",
13130
+ // foo!
13131
+ "TSInstantiationExpression",
13132
+ // foo<string>
13133
+ "TSSatisfiesExpression"
13134
+ // foo satisfies T
13135
+ ];
13118
13136
 
13119
13137
  const isLiteralWhitelisted = /* @__PURE__ */ makeMap("true,false,null,this");
13120
13138
  const transformExpression = (node, context) => {
@@ -13155,7 +13173,7 @@ function processExpression(node, context, asParams = false, asRawStatements = fa
13155
13173
  const isAssignmentLVal = parent && parent.type === "AssignmentExpression" && parent.left === id;
13156
13174
  const isUpdateArg = parent && parent.type === "UpdateExpression" && parent.argument === id;
13157
13175
  const isDestructureAssignment = parent && isInDestructureAssignment(parent, parentStack);
13158
- if (type === "setup-const" || type === "setup-reactive-const" || localVars[raw]) {
13176
+ if (isConst(type) || type === "setup-reactive-const" || localVars[raw]) {
13159
13177
  return raw;
13160
13178
  } else if (type === "setup-ref") {
13161
13179
  return `${raw}.value`;
@@ -13199,6 +13217,8 @@ function processExpression(node, context, asParams = false, asRawStatements = fa
13199
13217
  return `$setup.${raw}`;
13200
13218
  } else if (type === "props-aliased") {
13201
13219
  return `$props['${bindingMetadata.__propsAliases[raw]}']`;
13220
+ } else if (type === "literal-const") {
13221
+ return raw;
13202
13222
  } else if (type) {
13203
13223
  return `$${type}.${raw}`;
13204
13224
  }
@@ -13212,7 +13232,7 @@ function processExpression(node, context, asParams = false, asRawStatements = fa
13212
13232
  const isAllowedGlobal = isGloballyWhitelisted(rawExp);
13213
13233
  const isLiteral = isLiteralWhitelisted(rawExp);
13214
13234
  if (!asParams && !isScopeVarReference && !isAllowedGlobal && !isLiteral) {
13215
- if (bindingMetadata[node.content] === "setup-const") {
13235
+ if (isConst(bindingMetadata[node.content])) {
13216
13236
  node.constType = 1;
13217
13237
  }
13218
13238
  node.content = rewriteIdentifier(rawExp);
@@ -13328,6 +13348,9 @@ function stringifyExpression(exp) {
13328
13348
  return exp.children.map(stringifyExpression).join("");
13329
13349
  }
13330
13350
  }
13351
+ function isConst(type) {
13352
+ return type === "setup-const" || type === "literal-const";
13353
+ }
13331
13354
 
13332
13355
  const transformIf = createStructuralDirectiveTransform(
13333
13356
  /^(if|else|else-if)$/,
@@ -13500,7 +13523,7 @@ function createChildrenCodegenNode(branch, keyIndex, context) {
13500
13523
  const ret = firstChild.codegenNode;
13501
13524
  const vnodeCall = getMemoedVNodeCall(ret);
13502
13525
  if (vnodeCall.type === 13) {
13503
- makeBlock(vnodeCall, context);
13526
+ convertToBlock(vnodeCall, context);
13504
13527
  }
13505
13528
  injectProp(vnodeCall, keyProperty, context);
13506
13529
  return ret;
@@ -14271,7 +14294,7 @@ function resolveSetupReference(name, context) {
14271
14294
  return PascalName;
14272
14295
  }
14273
14296
  };
14274
- const fromConst = checkType("setup-const") || checkType("setup-reactive-const");
14297
+ const fromConst = checkType("setup-const") || checkType("setup-reactive-const") || checkType("literal-const");
14275
14298
  if (fromConst) {
14276
14299
  return context.inline ? (
14277
14300
  // in inline mode, const setup bindings (e.g. imports) can be used as-is
@@ -15247,7 +15270,7 @@ const transformMemo = (node, context) => {
15247
15270
  const codegenNode = node.codegenNode || context.currentNode.codegenNode;
15248
15271
  if (codegenNode && codegenNode.type === 13) {
15249
15272
  if (node.tagType !== 1) {
15250
- makeBlock(codegenNode, context);
15273
+ convertToBlock(codegenNode, context);
15251
15274
  }
15252
15275
  node.codegenNode = createCallExpression(context.helper(WITH_MEMO), [
15253
15276
  dir.exp,