@vue/compat 3.4.14 → 3.4.16

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/compat v3.4.14
2
+ * @vue/compat v3.4.16
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -265,6 +265,13 @@ const isKnownHtmlAttr = /* @__PURE__ */ makeMap(
265
265
  const isKnownSvgAttr = /* @__PURE__ */ makeMap(
266
266
  `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan`
267
267
  );
268
+ function isRenderableAttrValue(value) {
269
+ if (value == null) {
270
+ return false;
271
+ }
272
+ const type = typeof value;
273
+ return type === "string" || type === "number" || type === "boolean";
274
+ }
268
275
 
269
276
  function looseCompareArrays(a, b) {
270
277
  if (a.length !== b.length)
@@ -465,7 +472,7 @@ class ReactiveEffect {
465
472
  /**
466
473
  * @internal
467
474
  */
468
- this._dirtyLevel = 2;
475
+ this._dirtyLevel = 4;
469
476
  /**
470
477
  * @internal
471
478
  */
@@ -485,26 +492,27 @@ class ReactiveEffect {
485
492
  recordEffectScope(this, scope);
486
493
  }
487
494
  get dirty() {
488
- if (this._dirtyLevel === 1) {
495
+ if (this._dirtyLevel === 2 || this._dirtyLevel === 3) {
496
+ this._dirtyLevel = 1;
489
497
  pauseTracking();
490
498
  for (let i = 0; i < this._depsLength; i++) {
491
499
  const dep = this.deps[i];
492
500
  if (dep.computed) {
493
501
  triggerComputed(dep.computed);
494
- if (this._dirtyLevel >= 2) {
502
+ if (this._dirtyLevel >= 4) {
495
503
  break;
496
504
  }
497
505
  }
498
506
  }
499
- if (this._dirtyLevel < 2) {
507
+ if (this._dirtyLevel === 1) {
500
508
  this._dirtyLevel = 0;
501
509
  }
502
510
  resetTracking();
503
511
  }
504
- return this._dirtyLevel >= 2;
512
+ return this._dirtyLevel >= 4;
505
513
  }
506
514
  set dirty(v) {
507
- this._dirtyLevel = v ? 2 : 0;
515
+ this._dirtyLevel = v ? 4 : 0;
508
516
  }
509
517
  run() {
510
518
  this._dirtyLevel = 0;
@@ -544,7 +552,7 @@ function preCleanupEffect(effect2) {
544
552
  effect2._depsLength = 0;
545
553
  }
546
554
  function postCleanupEffect(effect2) {
547
- if (effect2.deps && effect2.deps.length > effect2._depsLength) {
555
+ if (effect2.deps.length > effect2._depsLength) {
548
556
  for (let i = effect2._depsLength; i < effect2.deps.length; i++) {
549
557
  cleanupDepEffect(effect2.deps[i], effect2);
550
558
  }
@@ -627,24 +635,23 @@ function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) {
627
635
  var _a;
628
636
  pauseScheduling();
629
637
  for (const effect2 of dep.keys()) {
630
- if (dep.get(effect2) !== effect2._trackId) {
631
- continue;
632
- }
633
- if (effect2._dirtyLevel < dirtyLevel && !(effect2._runnings && !effect2.allowRecurse)) {
634
- const lastDirtyLevel = effect2._dirtyLevel;
638
+ let tracking;
639
+ if (effect2._dirtyLevel < dirtyLevel && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
640
+ effect2._shouldSchedule || (effect2._shouldSchedule = effect2._dirtyLevel === 0);
635
641
  effect2._dirtyLevel = dirtyLevel;
636
- if (lastDirtyLevel === 0) {
637
- effect2._shouldSchedule = true;
638
- if (!!(process.env.NODE_ENV !== "production")) {
639
- (_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo));
642
+ }
643
+ if (effect2._shouldSchedule && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
644
+ if (!!(process.env.NODE_ENV !== "production")) {
645
+ (_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo));
646
+ }
647
+ effect2.trigger();
648
+ if ((!effect2._runnings || effect2.allowRecurse) && effect2._dirtyLevel !== 2) {
649
+ effect2._shouldSchedule = false;
650
+ if (effect2.scheduler) {
651
+ queueEffectSchedulers.push(effect2.scheduler);
640
652
  }
641
- effect2.trigger();
642
653
  }
643
654
  }
644
- if (effect2.scheduler && effect2._shouldSchedule && (!effect2._runnings || effect2.allowRecurse)) {
645
- effect2._shouldSchedule = false;
646
- queueEffectSchedulers.push(effect2.scheduler);
647
- }
648
655
  }
649
656
  resetScheduling();
650
657
  }
@@ -730,7 +737,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
730
737
  if (dep) {
731
738
  triggerEffects(
732
739
  dep,
733
- 2,
740
+ 4,
734
741
  !!(process.env.NODE_ENV !== "production") ? {
735
742
  target,
736
743
  type,
@@ -1315,7 +1322,9 @@ function toRaw(observed) {
1315
1322
  return raw ? toRaw(raw) : observed;
1316
1323
  }
1317
1324
  function markRaw(value) {
1318
- def(value, "__v_skip", true);
1325
+ if (Object.isExtensible(value)) {
1326
+ def(value, "__v_skip", true);
1327
+ }
1319
1328
  return value;
1320
1329
  }
1321
1330
  const toReactive = (value) => isObject(value) ? reactive(value) : value;
@@ -1329,7 +1338,10 @@ class ComputedRefImpl {
1329
1338
  this["__v_isReadonly"] = false;
1330
1339
  this.effect = new ReactiveEffect(
1331
1340
  () => getter(this._value),
1332
- () => triggerRefValue(this, 1)
1341
+ () => triggerRefValue(
1342
+ this,
1343
+ this.effect._dirtyLevel === 2 ? 2 : 3
1344
+ )
1333
1345
  );
1334
1346
  this.effect.computed = this;
1335
1347
  this.effect.active = this._cacheable = !isSSR;
@@ -1337,12 +1349,13 @@ class ComputedRefImpl {
1337
1349
  }
1338
1350
  get value() {
1339
1351
  const self = toRaw(this);
1340
- if (!self._cacheable || self.effect.dirty) {
1341
- if (hasChanged(self._value, self._value = self.effect.run())) {
1342
- triggerRefValue(self, 2);
1343
- }
1352
+ if ((!self._cacheable || self.effect.dirty) && hasChanged(self._value, self._value = self.effect.run())) {
1353
+ triggerRefValue(self, 4);
1344
1354
  }
1345
1355
  trackRefValue(self);
1356
+ if (self.effect._dirtyLevel >= 2) {
1357
+ triggerRefValue(self, 2);
1358
+ }
1346
1359
  return self._value;
1347
1360
  }
1348
1361
  set value(newValue) {
@@ -1379,14 +1392,15 @@ function computed$1(getterOrOptions, debugOptions, isSSR = false) {
1379
1392
  }
1380
1393
 
1381
1394
  function trackRefValue(ref2) {
1395
+ var _a;
1382
1396
  if (shouldTrack && activeEffect) {
1383
1397
  ref2 = toRaw(ref2);
1384
1398
  trackEffect(
1385
1399
  activeEffect,
1386
- ref2.dep || (ref2.dep = createDep(
1400
+ (_a = ref2.dep) != null ? _a : ref2.dep = createDep(
1387
1401
  () => ref2.dep = void 0,
1388
1402
  ref2 instanceof ComputedRefImpl ? ref2 : void 0
1389
- )),
1403
+ ),
1390
1404
  !!(process.env.NODE_ENV !== "production") ? {
1391
1405
  target: ref2,
1392
1406
  type: "get",
@@ -1395,7 +1409,7 @@ function trackRefValue(ref2) {
1395
1409
  );
1396
1410
  }
1397
1411
  }
1398
- function triggerRefValue(ref2, dirtyLevel = 2, newVal) {
1412
+ function triggerRefValue(ref2, dirtyLevel = 4, newVal) {
1399
1413
  ref2 = toRaw(ref2);
1400
1414
  const dep = ref2.dep;
1401
1415
  if (dep) {
@@ -1444,12 +1458,12 @@ class RefImpl {
1444
1458
  if (hasChanged(newVal, this._rawValue)) {
1445
1459
  this._rawValue = newVal;
1446
1460
  this._value = useDirectValue ? newVal : toReactive(newVal);
1447
- triggerRefValue(this, 2, newVal);
1461
+ triggerRefValue(this, 4, newVal);
1448
1462
  }
1449
1463
  }
1450
1464
  }
1451
1465
  function triggerRef(ref2) {
1452
- triggerRefValue(ref2, 2, !!(process.env.NODE_ENV !== "production") ? ref2.value : void 0);
1466
+ triggerRefValue(ref2, 4, !!(process.env.NODE_ENV !== "production") ? ref2.value : void 0);
1453
1467
  }
1454
1468
  function unref(ref2) {
1455
1469
  return isRef(ref2) ? ref2.value : ref2;
@@ -1768,7 +1782,7 @@ function handleError(err, instance, type, throwInDev = true) {
1768
1782
  if (instance) {
1769
1783
  let cur = instance.parent;
1770
1784
  const exposedInstance = instance.proxy;
1771
- const errorInfo = !!(process.env.NODE_ENV !== "production") ? ErrorTypeStrings$1[type] : `https://vuejs.org/errors/#runtime-${type}`;
1785
+ const errorInfo = !!(process.env.NODE_ENV !== "production") ? ErrorTypeStrings$1[type] : `https://vuejs.org/error-reference/#runtime-${type}`;
1772
1786
  while (cur) {
1773
1787
  const errorCapturedHooks = cur.ec;
1774
1788
  if (errorCapturedHooks) {
@@ -6526,7 +6540,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
6526
6540
  return vm;
6527
6541
  }
6528
6542
  }
6529
- Vue.version = `2.6.14-compat:${"3.4.14"}`;
6543
+ Vue.version = `2.6.14-compat:${"3.4.16"}`;
6530
6544
  Vue.config = singletonApp.config;
6531
6545
  Vue.use = (p, ...options) => {
6532
6546
  if (p && isFunction(p.install)) {
@@ -7074,11 +7088,12 @@ If you want to remount the same app, move your app creation logic into a factory
7074
7088
  return app;
7075
7089
  },
7076
7090
  runWithContext(fn) {
7091
+ const lastApp = currentApp;
7077
7092
  currentApp = app;
7078
7093
  try {
7079
7094
  return fn();
7080
7095
  } finally {
7081
- currentApp = null;
7096
+ currentApp = lastApp;
7082
7097
  }
7083
7098
  }
7084
7099
  };
@@ -7598,7 +7613,7 @@ const normalizeSlot = (key, rawSlot, ctx) => {
7598
7613
  return rawSlot;
7599
7614
  }
7600
7615
  const normalized = withCtx((...args) => {
7601
- if (!!(process.env.NODE_ENV !== "production") && currentInstance) {
7616
+ if (!!(process.env.NODE_ENV !== "production") && currentInstance && (!ctx || ctx.root === currentInstance.root)) {
7602
7617
  warn$1(
7603
7618
  `Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`
7604
7619
  );
@@ -8074,7 +8089,7 @@ Server rendered element contains more child nodes than client vdom.`
8074
8089
  if (props) {
8075
8090
  if (!!(process.env.NODE_ENV !== "production") || forcePatch || !optimized || patchFlag & (16 | 32)) {
8076
8091
  for (const key in props) {
8077
- if (!!(process.env.NODE_ENV !== "production") && propHasMismatch(el, key, props[key], vnode)) {
8092
+ if (!!(process.env.NODE_ENV !== "production") && propHasMismatch(el, key, props[key], vnode, parentComponent)) {
8078
8093
  hasMismatch = true;
8079
8094
  }
8080
8095
  if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
@@ -8259,7 +8274,8 @@ Server rendered element contains fewer child nodes than client vdom.`
8259
8274
  };
8260
8275
  return [hydrate, hydrateNode];
8261
8276
  }
8262
- function propHasMismatch(el, key, clientValue, vnode) {
8277
+ function propHasMismatch(el, key, clientValue, vnode, instance) {
8278
+ var _a;
8263
8279
  let mismatchType;
8264
8280
  let mismatchKey;
8265
8281
  let actual;
@@ -8282,6 +8298,10 @@ function propHasMismatch(el, key, clientValue, vnode) {
8282
8298
  }
8283
8299
  }
8284
8300
  }
8301
+ const cssVars = (_a = instance == null ? void 0 : instance.getCssVars) == null ? void 0 : _a.call(instance);
8302
+ for (const key2 in cssVars) {
8303
+ expectedMap.set(`--${key2}`, String(cssVars[key2]));
8304
+ }
8285
8305
  if (!isMapEqual(actualMap, expectedMap)) {
8286
8306
  mismatchType = mismatchKey = "style";
8287
8307
  }
@@ -8295,11 +8315,12 @@ function propHasMismatch(el, key, clientValue, vnode) {
8295
8315
  } else {
8296
8316
  if (el.hasAttribute(key)) {
8297
8317
  actual = el.getAttribute(key);
8318
+ } else if (key === "value" && el.tagName === "TEXTAREA") {
8319
+ actual = el.value;
8298
8320
  } else {
8299
- const serverValue = el[key];
8300
- actual = isObject(serverValue) || serverValue == null ? "" : String(serverValue);
8321
+ actual = false;
8301
8322
  }
8302
- expected = isObject(clientValue) || clientValue == null ? "" : String(clientValue);
8323
+ expected = isRenderableAttrValue(clientValue) ? String(clientValue) : false;
8303
8324
  }
8304
8325
  if (actual !== expected) {
8305
8326
  mismatchType = `attribute`;
@@ -11425,7 +11446,7 @@ function isMemoSame(cached, memo) {
11425
11446
  return true;
11426
11447
  }
11427
11448
 
11428
- const version = "3.4.14";
11449
+ const version = "3.4.16";
11429
11450
  const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
11430
11451
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
11431
11452
  const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
@@ -11854,7 +11875,7 @@ const vShow = {
11854
11875
  }
11855
11876
  },
11856
11877
  updated(el, { value, oldValue }, { transition }) {
11857
- if (!value === !oldValue)
11878
+ if (!value === !oldValue && el.style.display === el[vShowOldKey])
11858
11879
  return;
11859
11880
  if (transition) {
11860
11881
  if (value) {
@@ -11900,6 +11921,9 @@ function useCssVars(getter) {
11900
11921
  document.querySelectorAll(`[data-v-owner="${instance.uid}"]`)
11901
11922
  ).forEach((node) => setVarsOnNode(node, vars));
11902
11923
  };
11924
+ if (!!(process.env.NODE_ENV !== "production")) {
11925
+ instance.getCssVars = () => getter(instance.proxy);
11926
+ }
11903
11927
  const setVars = () => {
11904
11928
  const vars = getter(instance.proxy);
11905
11929
  setVarsOnVNode(instance.subTree, vars);
@@ -11980,6 +12004,7 @@ function patchStyle(el, prev, next) {
11980
12004
  }
11981
12005
  }
11982
12006
  if (vShowOldKey in el) {
12007
+ el[vShowOldKey] = style.display;
11983
12008
  style.display = currentDisplay;
11984
12009
  }
11985
12010
  }
@@ -12799,24 +12824,31 @@ const vModelSelect = {
12799
12824
  el[assignKey](
12800
12825
  el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0]
12801
12826
  );
12827
+ el._assigning = true;
12828
+ nextTick(() => {
12829
+ el._assigning = false;
12830
+ });
12802
12831
  });
12803
12832
  el[assignKey] = getModelAssigner(vnode);
12804
12833
  },
12805
12834
  // set value in mounted & updated because <select> relies on its children
12806
12835
  // <option>s.
12807
- mounted(el, { value }) {
12808
- setSelected(el, value);
12836
+ mounted(el, { value, oldValue, modifiers: { number } }) {
12837
+ setSelected(el, value, oldValue, number);
12809
12838
  },
12810
12839
  beforeUpdate(el, _binding, vnode) {
12811
12840
  el[assignKey] = getModelAssigner(vnode);
12812
12841
  },
12813
- updated(el, { value }) {
12814
- setSelected(el, value);
12842
+ updated(el, { value, oldValue, modifiers: { number } }) {
12843
+ if (!el._assigning) {
12844
+ setSelected(el, value, oldValue, number);
12845
+ }
12815
12846
  }
12816
12847
  };
12817
- function setSelected(el, value) {
12848
+ function setSelected(el, value, oldValue, number) {
12818
12849
  const isMultiple = el.multiple;
12819
- if (isMultiple && !isArray(value) && !isSet(value)) {
12850
+ const isArrayValue = isArray(value);
12851
+ if (isMultiple && !isArrayValue && !isSet(value)) {
12820
12852
  !!(process.env.NODE_ENV !== "production") && warn(
12821
12853
  `<select multiple v-model> expects an Array or Set value for its binding, but got ${Object.prototype.toString.call(value).slice(8, -1)}.`
12822
12854
  );
@@ -12826,8 +12858,15 @@ function setSelected(el, value) {
12826
12858
  const option = el.options[i];
12827
12859
  const optionValue = getValue(option);
12828
12860
  if (isMultiple) {
12829
- if (isArray(value)) {
12830
- option.selected = looseIndexOf(value, optionValue) > -1;
12861
+ if (isArrayValue) {
12862
+ const optionType = typeof optionValue;
12863
+ if (optionType === "string" || optionType === "number") {
12864
+ option.selected = value.includes(
12865
+ number ? looseToNumber(optionValue) : optionValue
12866
+ );
12867
+ } else {
12868
+ option.selected = looseIndexOf(value, optionValue) > -1;
12869
+ }
12831
12870
  } else {
12832
12871
  option.selected = value.has(optionValue);
12833
12872
  }
@@ -14449,7 +14488,7 @@ function defaultOnWarn(msg) {
14449
14488
  !!(process.env.NODE_ENV !== "production") && console.warn(`[Vue warn] ${msg.message}`);
14450
14489
  }
14451
14490
  function createCompilerError(code, loc, messages, additionalMessage) {
14452
- const msg = !!(process.env.NODE_ENV !== "production") || false ? (messages || errorMessages)[code] + (additionalMessage || ``) : `https://vuejs.org/errors/#compiler-${code}`;
14491
+ const msg = !!(process.env.NODE_ENV !== "production") || false ? (messages || errorMessages)[code] + (additionalMessage || ``) : `https://vuejs.org/error-reference/#compiler-${code}`;
14453
14492
  const error = new SyntaxError(String(msg));
14454
14493
  error.code = code;
14455
14494
  error.loc = loc;
@@ -14494,6 +14533,7 @@ const errorMessages = {
14494
14533
  [32]: `v-for has invalid expression.`,
14495
14534
  [33]: `<template v-for> key should be placed on the <template> tag.`,
14496
14535
  [34]: `v-bind is missing expression.`,
14536
+ [52]: `v-bind with same-name shorthand only allows static argument.`,
14497
14537
  [35]: `v-on is missing expression.`,
14498
14538
  [36]: `Unexpected custom directive on <slot> outlet.`,
14499
14539
  [37]: `Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.`,
@@ -14514,7 +14554,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
14514
14554
  [49]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`,
14515
14555
  [50]: `"scopeId" option is only supported in module mode.`,
14516
14556
  // just to fulfill types
14517
- [52]: ``
14557
+ [53]: ``
14518
14558
  };
14519
14559
 
14520
14560
  const isStaticExp = (p) => p.type === 4 && p.isStatic;
@@ -16110,8 +16150,7 @@ function generate(ast, options = {}) {
16110
16150
  const helpers = Array.from(ast.helpers);
16111
16151
  const hasHelpers = helpers.length > 0;
16112
16152
  const useWithBlock = !prefixIdentifiers && mode !== "module";
16113
- const isSetupInlined = false;
16114
- const preambleContext = isSetupInlined ? createCodegenContext(ast, options) : context;
16153
+ const preambleContext = context;
16115
16154
  {
16116
16155
  genFunctionPreamble(ast, preambleContext);
16117
16156
  }
@@ -16179,7 +16218,7 @@ function generate(ast, options = {}) {
16179
16218
  return {
16180
16219
  ast,
16181
16220
  code: context.code,
16182
- preamble: isSetupInlined ? preambleContext.code : ``,
16221
+ preamble: ``,
16183
16222
  map: context.map ? context.map.toJSON() : void 0
16184
16223
  };
16185
16224
  }
@@ -17939,8 +17978,12 @@ function processSlotOutlet(node, context) {
17939
17978
  }
17940
17979
  } else {
17941
17980
  if (p.name === "bind" && isStaticArgOf(p.arg, "name")) {
17942
- if (p.exp)
17981
+ if (p.exp) {
17943
17982
  slotName = p.exp;
17983
+ } else if (p.arg && p.arg.type === 4) {
17984
+ const name = camelize(p.arg.content);
17985
+ slotName = p.exp = createSimpleExpression(name, false, p.arg.loc);
17986
+ }
17944
17987
  } else {
17945
17988
  if (p.name === "bind" && p.arg && isStaticExp(p.arg)) {
17946
17989
  p.arg.content = camelize(p.arg.content);
@@ -18058,7 +18101,25 @@ const transformBind = (dir, _node, context) => {
18058
18101
  const { modifiers, loc } = dir;
18059
18102
  const arg = dir.arg;
18060
18103
  let { exp } = dir;
18061
- if (!exp && arg.type === 4) {
18104
+ if (exp && exp.type === 4 && !exp.content.trim()) {
18105
+ {
18106
+ exp = void 0;
18107
+ }
18108
+ }
18109
+ if (!exp) {
18110
+ if (arg.type !== 4 || !arg.isStatic) {
18111
+ context.onError(
18112
+ createCompilerError(
18113
+ 52,
18114
+ arg.loc
18115
+ )
18116
+ );
18117
+ return {
18118
+ props: [
18119
+ createObjectProperty(arg, createSimpleExpression("", true, loc))
18120
+ ]
18121
+ };
18122
+ }
18062
18123
  const propName = camelize(arg.content);
18063
18124
  exp = dir.exp = createSimpleExpression(propName, false, arg.loc);
18064
18125
  }
@@ -18088,12 +18149,6 @@ const transformBind = (dir, _node, context) => {
18088
18149
  injectPrefix(arg, "^");
18089
18150
  }
18090
18151
  }
18091
- if (!exp || exp.type === 4 && !exp.content.trim()) {
18092
- context.onError(createCompilerError(34, loc));
18093
- return {
18094
- props: [createObjectProperty(arg, createSimpleExpression("", true, loc))]
18095
- };
18096
- }
18097
18152
  return {
18098
18153
  props: [createObjectProperty(arg, exp)]
18099
18154
  };