@vue/compat 3.6.0-beta.1 → 3.6.0-beta.3

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.6.0-beta.1
2
+ * @vue/compat v3.6.0-beta.3
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -2466,7 +2466,6 @@ function warn$1(msg, ...args) {
2466
2466
  instance,
2467
2467
  11,
2468
2468
  [
2469
- // eslint-disable-next-line no-restricted-syntax
2470
2469
  msg + args.map((a) => {
2471
2470
  var _a, _b;
2472
2471
  return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a);
@@ -3096,7 +3095,6 @@ function setDevtoolsHook$1(hook, target) {
3096
3095
  // (#4815)
3097
3096
  typeof window !== "undefined" && // some envs mock window but not fully
3098
3097
  window.HTMLElement && // also exclude jsdom
3099
- // eslint-disable-next-line no-restricted-syntax
3100
3098
  !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes("jsdom"))
3101
3099
  ) {
3102
3100
  const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || [];
@@ -5590,9 +5588,17 @@ function isMismatchAllowed(el, allowedType) {
5590
5588
  }
5591
5589
  }
5592
5590
 
5593
- const requestIdleCallback = getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1));
5594
- const cancelIdleCallback = getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id));
5591
+ let requestIdleCallback;
5592
+ let cancelIdleCallback;
5593
+ function ensureIdleCallbacks() {
5594
+ if (!requestIdleCallback) {
5595
+ const g = getGlobalThis();
5596
+ requestIdleCallback = g.requestIdleCallback || ((cb) => setTimeout(cb, 1));
5597
+ cancelIdleCallback = g.cancelIdleCallback || ((id) => clearTimeout(id));
5598
+ }
5599
+ }
5595
5600
  const hydrateOnIdle = (timeout = 1e4) => (hydrate) => {
5601
+ ensureIdleCallbacks();
5596
5602
  const id = requestIdleCallback(hydrate, { timeout });
5597
5603
  return () => cancelIdleCallback(id);
5598
5604
  };
@@ -6671,9 +6677,10 @@ function createSlots(slots, dynamicSlots) {
6671
6677
 
6672
6678
  function renderSlot(slots, name, props = {}, fallback, noSlotted) {
6673
6679
  let slot = slots[name];
6674
- if (slot && slot.__vapor) {
6680
+ const vaporSlot = slot && (slot.__vs || (slot.__vapor ? slot : null));
6681
+ if (vaporSlot) {
6675
6682
  const ret = (openBlock(), createBlock(VaporSlot, props));
6676
- ret.vs = { slot, fallback };
6683
+ ret.vs = { slot: vaporSlot, fallback };
6677
6684
  return ret;
6678
6685
  }
6679
6686
  if (currentRenderingInstance && (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce)) {
@@ -6736,14 +6743,14 @@ function ensureVaporSlotFallback(vnodes, fallback) {
6736
6743
  }
6737
6744
  }
6738
6745
 
6739
- function toHandlers(obj, preserveCaseIfNecessary, needWrap) {
6746
+ function toHandlers(obj, preserveCaseIfNecessary) {
6740
6747
  const ret = {};
6741
6748
  if (!!(process.env.NODE_ENV !== "production") && !isObject(obj)) {
6742
6749
  warn$1(`v-on with no argument expects an object value.`);
6743
6750
  return ret;
6744
6751
  }
6745
6752
  for (const key in obj) {
6746
- ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = needWrap ? () => obj[key] : obj[key];
6753
+ ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key];
6747
6754
  }
6748
6755
  return ret;
6749
6756
  }
@@ -7886,7 +7893,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
7886
7893
  return vm;
7887
7894
  }
7888
7895
  }
7889
- Vue.version = `2.6.14-compat:${"3.6.0-beta.1"}`;
7896
+ Vue.version = `2.6.14-compat:${"3.6.0-beta.3"}`;
7890
7897
  Vue.config = singletonApp.config;
7891
7898
  Vue.use = (plugin, ...options) => {
7892
7899
  if (plugin && isFunction(plugin.install)) {
@@ -12059,7 +12066,7 @@ function hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace
12059
12066
  parentSuspense,
12060
12067
  parentComponent,
12061
12068
  node.parentNode,
12062
- // eslint-disable-next-line no-restricted-globals
12069
+ // oxlint-disable-next-line no-restricted-globals
12063
12070
  document.createElement("div"),
12064
12071
  null,
12065
12072
  namespace,
@@ -12622,7 +12629,7 @@ const setCurrentInstance = (instance, scope = instance !== null ? instance.scope
12622
12629
  simpleSetCurrentInstance(instance);
12623
12630
  }
12624
12631
  };
12625
- const internalOptions = ["ce", "type"];
12632
+ const internalOptions = ["ce", "type", "uid"];
12626
12633
  const useInstanceOption = (key, silent = false) => {
12627
12634
  const instance = getCurrentGenericInstance();
12628
12635
  if (!instance) {
@@ -12642,7 +12649,7 @@ const useInstanceOption = (key, silent = false) => {
12642
12649
  return { hasInstance: true, value: instance[key] };
12643
12650
  };
12644
12651
 
12645
- const emptyAppContext = createAppContext();
12652
+ const emptyAppContext = /* @__PURE__ */ createAppContext();
12646
12653
  let uid = 0;
12647
12654
  function nextUid() {
12648
12655
  return uid++;
@@ -13303,7 +13310,7 @@ function isMemoSame(cached, memo) {
13303
13310
  return true;
13304
13311
  }
13305
13312
 
13306
- const version = "3.6.0-beta.1";
13313
+ const version = "3.6.0-beta.3";
13307
13314
  const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
13308
13315
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
13309
13316
  const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
@@ -15473,6 +15480,7 @@ var runtimeDom = /*#__PURE__*/Object.freeze({
15473
15480
  KeepAlive: KeepAlive,
15474
15481
  MismatchTypes: MismatchTypes,
15475
15482
  MoveType: MoveType,
15483
+ NULL_DYNAMIC_COMPONENT: NULL_DYNAMIC_COMPONENT,
15476
15484
  ReactiveEffect: ReactiveEffect,
15477
15485
  Static: Static,
15478
15486
  Suspense: Suspense,
@@ -21781,4 +21789,4 @@ Vue.compile = compileToFunction;
21781
21789
 
21782
21790
  const configureCompat = Vue.configureCompat;
21783
21791
 
21784
- export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, MismatchTypes, MoveType, ReactiveEffect, Static, Suspense, Teleport, Text, TrackOpTypes, Transition, TransitionGroup, TransitionPropsValidators, TriggerOpTypes, VueElement, VueElementBase, activate, assertNumber, baseApplyTranslation, baseEmit, baseNormalizePropsOptions, baseResolveTransitionHooks, baseUseCssVars, callPendingCbs, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, checkTransitionMode, cloneVNode, compatUtils, computed, configureCompat, createApp, createAppAPI, createAsyncComponentContext, createBlock, createCanSetSetupRefChecker, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createInternalObject, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, currentInstance, customRef, deactivate, Vue as default, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSSRCustomElement, defineSlots, devtools, devtoolsComponentAdded, effect, effectScope, endMeasure, ensureHydrationRenderer, ensureRenderer, ensureVaporSlotFallback, expose, flushOnAppMount, forceReflow, getAttributeMismatch, getComponentName, getCurrentInstance, getCurrentScope, getCurrentWatcher, getFunctionalFallthrough, getInheritedScopeIds, getTransitionRawChildren, guardReactiveProps, h, handleError, handleMovedChildren, hasCSSTransform, hasInjectionContext, hydrate, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initDirectivesForSSR, initFeatureFlags, inject, isAsyncWrapper, isEmitListener, isKeepAlive, isMapEqual, isMemoSame, isMismatchAllowed, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isSetEqual, isShallow, isTeleportDeferred, isTeleportDisabled, isTemplateNode$1 as isTemplateNode, isVNode, isValidHtmlOrSvgAttribute, leaveCbKey, markAsyncBoundary, markRaw, matches, mergeDefaults, mergeModels, mergeProps, nextTick, nextUid, nodeOps, normalizeClass, normalizeContainer, normalizeProps, normalizeRef, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, onWatcherCleanup, openBlock, patchProp, patchStyle, performAsyncHydrate, performTransitionEnter, performTransitionLeave, popScopeId, popWarningContext, provide, proxyRefs, pushScopeId, pushWarningContext, queueJob, queuePostFlushCb, reactive, readonly, ref, registerHMR, registerRuntimeCompiler, render, renderList, renderSlot, resetShapeFlag, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolvePropValue, resolveTarget as resolveTeleportTarget, resolveTransitionHooks, resolveTransitionProps, setBlockTracking, setCurrentInstance, setDevtoolsHook, setRef, setTransitionHooks, setVarsOnNode, shallowReactive, shallowReadonly, shallowRef, shouldSetAsProp, simpleSetCurrentInstance, ssrContextKey, ssrUtils, startMeasure, stop, svgNS, toClassSet, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toStyleMap, toValue, transformVNodeArgs, triggerRef, unref, unregisterHMR, unsafeToTrustedHTML, useAsyncComponentState, useAttrs, useCssModule, useCssVars, useHost, useId, useInstanceOption, useModel, useSSRContext, useShadowRoot, useSlots, useTemplateRef, useTransitionState, vModelCheckbox, vModelCheckboxInit, vModelCheckboxUpdate, vModelDynamic, getValue as vModelGetValue, vModelRadio, vModelSelect, vModelSelectInit, vModelSetSelected, vModelText, vModelTextInit, vModelTextUpdate, vShow, vShowHidden, vShowOriginalDisplay, validateComponentName, validateProps, version, warn, warnExtraneousAttributes, warnPropMismatch, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId, xlinkNS };
21792
+ export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, MismatchTypes, MoveType, NULL_DYNAMIC_COMPONENT, ReactiveEffect, Static, Suspense, Teleport, Text, TrackOpTypes, Transition, TransitionGroup, TransitionPropsValidators, TriggerOpTypes, VueElement, VueElementBase, activate, assertNumber, baseApplyTranslation, baseEmit, baseNormalizePropsOptions, baseResolveTransitionHooks, baseUseCssVars, callPendingCbs, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, checkTransitionMode, cloneVNode, compatUtils, computed, configureCompat, createApp, createAppAPI, createAsyncComponentContext, createBlock, createCanSetSetupRefChecker, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createInternalObject, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, currentInstance, customRef, deactivate, Vue as default, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSSRCustomElement, defineSlots, devtools, devtoolsComponentAdded, effect, effectScope, endMeasure, ensureHydrationRenderer, ensureRenderer, ensureVaporSlotFallback, expose, flushOnAppMount, forceReflow, getAttributeMismatch, getComponentName, getCurrentInstance, getCurrentScope, getCurrentWatcher, getFunctionalFallthrough, getInheritedScopeIds, getTransitionRawChildren, guardReactiveProps, h, handleError, handleMovedChildren, hasCSSTransform, hasInjectionContext, hydrate, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initDirectivesForSSR, initFeatureFlags, inject, isAsyncWrapper, isEmitListener, isKeepAlive, isMapEqual, isMemoSame, isMismatchAllowed, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isSetEqual, isShallow, isTeleportDeferred, isTeleportDisabled, isTemplateNode$1 as isTemplateNode, isVNode, isValidHtmlOrSvgAttribute, leaveCbKey, markAsyncBoundary, markRaw, matches, mergeDefaults, mergeModels, mergeProps, nextTick, nextUid, nodeOps, normalizeClass, normalizeContainer, normalizeProps, normalizeRef, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, onWatcherCleanup, openBlock, patchProp, patchStyle, performAsyncHydrate, performTransitionEnter, performTransitionLeave, popScopeId, popWarningContext, provide, proxyRefs, pushScopeId, pushWarningContext, queueJob, queuePostFlushCb, reactive, readonly, ref, registerHMR, registerRuntimeCompiler, render, renderList, renderSlot, resetShapeFlag, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolvePropValue, resolveTarget as resolveTeleportTarget, resolveTransitionHooks, resolveTransitionProps, setBlockTracking, setCurrentInstance, setDevtoolsHook, setRef, setTransitionHooks, setVarsOnNode, shallowReactive, shallowReadonly, shallowRef, shouldSetAsProp, simpleSetCurrentInstance, ssrContextKey, ssrUtils, startMeasure, stop, svgNS, toClassSet, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toStyleMap, toValue, transformVNodeArgs, triggerRef, unref, unregisterHMR, unsafeToTrustedHTML, useAsyncComponentState, useAttrs, useCssModule, useCssVars, useHost, useId, useInstanceOption, useModel, useSSRContext, useShadowRoot, useSlots, useTemplateRef, useTransitionState, vModelCheckbox, vModelCheckboxInit, vModelCheckboxUpdate, vModelDynamic, getValue as vModelGetValue, vModelRadio, vModelSelect, vModelSelectInit, vModelSetSelected, vModelText, vModelTextInit, vModelTextUpdate, vShow, vShowHidden, vShowOriginalDisplay, validateComponentName, validateProps, version, warn, warnExtraneousAttributes, warnPropMismatch, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId, xlinkNS };
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compat v3.6.0-beta.1
2
+ * @vue/compat v3.6.0-beta.3
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -2454,7 +2454,6 @@ var Vue = (function () {
2454
2454
  instance,
2455
2455
  11,
2456
2456
  [
2457
- // eslint-disable-next-line no-restricted-syntax
2458
2457
  msg + args.map((a) => {
2459
2458
  var _a, _b;
2460
2459
  return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a);
@@ -3079,7 +3078,6 @@ var Vue = (function () {
3079
3078
  // (#4815)
3080
3079
  typeof window !== "undefined" && // some envs mock window but not fully
3081
3080
  window.HTMLElement && // also exclude jsdom
3082
- // eslint-disable-next-line no-restricted-syntax
3083
3081
  !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes("jsdom"))
3084
3082
  ) {
3085
3083
  const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || [];
@@ -5518,9 +5516,17 @@ Server rendered element contains fewer child nodes than client vdom.`
5518
5516
  }
5519
5517
  }
5520
5518
 
5521
- const requestIdleCallback = getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1));
5522
- const cancelIdleCallback = getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id));
5519
+ let requestIdleCallback;
5520
+ let cancelIdleCallback;
5521
+ function ensureIdleCallbacks() {
5522
+ if (!requestIdleCallback) {
5523
+ const g = getGlobalThis();
5524
+ requestIdleCallback = g.requestIdleCallback || ((cb) => setTimeout(cb, 1));
5525
+ cancelIdleCallback = g.cancelIdleCallback || ((id) => clearTimeout(id));
5526
+ }
5527
+ }
5523
5528
  const hydrateOnIdle = (timeout = 1e4) => (hydrate) => {
5529
+ ensureIdleCallbacks();
5524
5530
  const id = requestIdleCallback(hydrate, { timeout });
5525
5531
  return () => cancelIdleCallback(id);
5526
5532
  };
@@ -6593,9 +6599,10 @@ If this is a native custom element, make sure to exclude it from component resol
6593
6599
 
6594
6600
  function renderSlot(slots, name, props = {}, fallback, noSlotted) {
6595
6601
  let slot = slots[name];
6596
- if (slot && slot.__vapor) {
6602
+ const vaporSlot = slot && (slot.__vs || (slot.__vapor ? slot : null));
6603
+ if (vaporSlot) {
6597
6604
  const ret = (openBlock(), createBlock(VaporSlot, props));
6598
- ret.vs = { slot, fallback };
6605
+ ret.vs = { slot: vaporSlot, fallback };
6599
6606
  return ret;
6600
6607
  }
6601
6608
  if (currentRenderingInstance && (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce)) {
@@ -6658,14 +6665,14 @@ If this is a native custom element, make sure to exclude it from component resol
6658
6665
  }
6659
6666
  }
6660
6667
 
6661
- function toHandlers(obj, preserveCaseIfNecessary, needWrap) {
6668
+ function toHandlers(obj, preserveCaseIfNecessary) {
6662
6669
  const ret = {};
6663
6670
  if (!isObject(obj)) {
6664
6671
  warn$1(`v-on with no argument expects an object value.`);
6665
6672
  return ret;
6666
6673
  }
6667
6674
  for (const key in obj) {
6668
- ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = needWrap ? () => obj[key] : obj[key];
6675
+ ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key];
6669
6676
  }
6670
6677
  return ret;
6671
6678
  }
@@ -7803,7 +7810,7 @@ If this is a native custom element, make sure to exclude it from component resol
7803
7810
  return vm;
7804
7811
  }
7805
7812
  }
7806
- Vue.version = `2.6.14-compat:${"3.6.0-beta.1"}`;
7813
+ Vue.version = `2.6.14-compat:${"3.6.0-beta.3"}`;
7807
7814
  Vue.config = singletonApp.config;
7808
7815
  Vue.use = (plugin, ...options) => {
7809
7816
  if (plugin && isFunction(plugin.install)) {
@@ -11933,7 +11940,7 @@ app.use(vaporInteropPlugin)
11933
11940
  parentSuspense,
11934
11941
  parentComponent,
11935
11942
  node.parentNode,
11936
- // eslint-disable-next-line no-restricted-globals
11943
+ // oxlint-disable-next-line no-restricted-globals
11937
11944
  document.createElement("div"),
11938
11945
  null,
11939
11946
  namespace,
@@ -12484,7 +12491,7 @@ Component that was made reactive: `,
12484
12491
  simpleSetCurrentInstance(instance);
12485
12492
  }
12486
12493
  };
12487
- const internalOptions = ["ce", "type"];
12494
+ const internalOptions = ["ce", "type", "uid"];
12488
12495
  const useInstanceOption = (key, silent = false) => {
12489
12496
  const instance = getCurrentGenericInstance();
12490
12497
  if (!instance) {
@@ -12504,7 +12511,7 @@ Component that was made reactive: `,
12504
12511
  return { hasInstance: true, value: instance[key] };
12505
12512
  };
12506
12513
 
12507
- const emptyAppContext = createAppContext();
12514
+ const emptyAppContext = /* @__PURE__ */ createAppContext();
12508
12515
  let uid = 0;
12509
12516
  function createComponentInstance(vnode, parent, suspense) {
12510
12517
  const type = vnode.type;
@@ -13146,7 +13153,7 @@ Component that was made reactive: `,
13146
13153
  return true;
13147
13154
  }
13148
13155
 
13149
- const version = "3.6.0-beta.1";
13156
+ const version = "3.6.0-beta.3";
13150
13157
  const warn = warn$1 ;
13151
13158
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
13152
13159
  const devtools = devtools$1 ;
@@ -15243,6 +15250,7 @@ Expected function or array of functions, received type ${typeof value}.`
15243
15250
  Fragment: Fragment,
15244
15251
  KeepAlive: KeepAlive,
15245
15252
  MoveType: MoveType,
15253
+ NULL_DYNAMIC_COMPONENT: NULL_DYNAMIC_COMPONENT,
15246
15254
  ReactiveEffect: ReactiveEffect,
15247
15255
  Static: Static,
15248
15256
  Suspense: Suspense,