@vue/runtime-core 3.5.0-beta.3 → 3.5.0

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/runtime-core v3.5.0-beta.3
2
+ * @vue/runtime-core v3.5.0
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -1420,7 +1420,7 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
1420
1420
  // @__NO_SIDE_EFFECTS__
1421
1421
  function defineComponent(options, extraOptions) {
1422
1422
  return shared.isFunction(options) ? (
1423
- // #8326: extend call and options.name access are considered side-effects
1423
+ // #8236: extend call and options.name access are considered side-effects
1424
1424
  // by Rollup, so we have to wrap it in a pure-annotated IIFE.
1425
1425
  /* @__PURE__ */ (() => shared.extend({ name: options.name }, extraOptions, { setup: options }))()
1426
1426
  ) : options;
@@ -1856,8 +1856,7 @@ Server rendered element contains more child nodes than client vdom.`
1856
1856
  const isText = vnode.type === Text;
1857
1857
  if (node) {
1858
1858
  if (isText && !optimized) {
1859
- let next = children[i + 1];
1860
- if (next && (next = normalizeVNode(next)).type === Text) {
1859
+ if (i + 1 < l && normalizeVNode(children[i + 1]).type === Text) {
1861
1860
  insert(
1862
1861
  createText(
1863
1862
  node.data.slice(vnode.children.length)
@@ -2113,7 +2112,10 @@ function resolveCssVars(instance, vnode, expectedMap) {
2113
2112
  if (instance.getCssVars && (vnode === root || root && root.type === Fragment && root.children.includes(vnode))) {
2114
2113
  const cssVars = instance.getCssVars();
2115
2114
  for (const key in cssVars) {
2116
- expectedMap.set(`--${key}`, String(cssVars[key]));
2115
+ expectedMap.set(
2116
+ `--${shared.getEscapedCssVarName(key, false)}`,
2117
+ String(cssVars[key])
2118
+ );
2117
2119
  }
2118
2120
  }
2119
2121
  if (vnode === root && instance.parent) {
@@ -2547,6 +2549,7 @@ const KeepAliveImpl = {
2547
2549
  );
2548
2550
  const { include, exclude, max } = props;
2549
2551
  if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) {
2552
+ vnode.shapeFlag &= ~256;
2550
2553
  current = vnode;
2551
2554
  return rawVNode;
2552
2555
  }
@@ -8201,7 +8204,7 @@ function isMemoSame(cached, memo) {
8201
8204
  return true;
8202
8205
  }
8203
8206
 
8204
- const version = "3.5.0-beta.3";
8207
+ const version = "3.5.0";
8205
8208
  const warn = warn$1 ;
8206
8209
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
8207
8210
  const devtools = devtools$1 ;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/runtime-core v3.5.0-beta.3
2
+ * @vue/runtime-core v3.5.0
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -988,7 +988,7 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
988
988
  // @__NO_SIDE_EFFECTS__
989
989
  function defineComponent(options, extraOptions) {
990
990
  return shared.isFunction(options) ? (
991
- // #8326: extend call and options.name access are considered side-effects
991
+ // #8236: extend call and options.name access are considered side-effects
992
992
  // by Rollup, so we have to wrap it in a pure-annotated IIFE.
993
993
  /* @__PURE__ */ (() => shared.extend({ name: options.name }, extraOptions, { setup: options }))()
994
994
  ) : options;
@@ -1380,8 +1380,7 @@ function createHydrationFunctions(rendererInternals) {
1380
1380
  const isText = vnode.type === Text;
1381
1381
  if (node) {
1382
1382
  if (isText && !optimized) {
1383
- let next = children[i + 1];
1384
- if (next && (next = normalizeVNode(next)).type === Text) {
1383
+ if (i + 1 < l && normalizeVNode(children[i + 1]).type === Text) {
1385
1384
  insert(
1386
1385
  createText(
1387
1386
  node.data.slice(vnode.children.length)
@@ -1916,6 +1915,7 @@ const KeepAliveImpl = {
1916
1915
  );
1917
1916
  const { include, exclude, max } = props;
1918
1917
  if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) {
1918
+ vnode.shapeFlag &= ~256;
1919
1919
  current = vnode;
1920
1920
  return rawVNode;
1921
1921
  }
@@ -6375,7 +6375,7 @@ function isMemoSame(cached, memo) {
6375
6375
  return true;
6376
6376
  }
6377
6377
 
6378
- const version = "3.5.0-beta.3";
6378
+ const version = "3.5.0";
6379
6379
  const warn$1 = shared.NOOP;
6380
6380
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
6381
6381
  const devtools = void 0;
@@ -1,5 +1,5 @@
1
- import { computed as computed$1, Ref, WatchStopHandle, ShallowUnwrapRef, UnwrapNestedRefs, DebuggerEvent, ComputedGetter, WritableComputedOptions, ReactiveEffect, ComputedRef, DebuggerOptions, WatchHandle, ReactiveMarker, ShallowRef, WatchErrorCodes, reactive } from '@vue/reactivity';
2
- export { ComputedGetter, ComputedRef, ComputedSetter, CustomRefFactory, DebuggerEvent, DebuggerEventExtraInfo, DebuggerOptions, DeepReadonly, EffectScheduler, EffectScope, MaybeRef, MaybeRefOrGetter, Raw, Reactive, ReactiveEffect, ReactiveEffectOptions, ReactiveEffectRunner, ReactiveFlags, Ref, ShallowReactive, ShallowRef, ShallowUnwrapRef, ToRef, ToRefs, TrackOpTypes, TriggerOpTypes, UnwrapNestedRefs, UnwrapRef, WatchHandle, WatchStopHandle, WritableComputedOptions, WritableComputedRef, customRef, effect, effectScope, getCurrentScope, getCurrentWatcher, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, onWatcherCleanup, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, triggerRef, unref } from '@vue/reactivity';
1
+ import { computed as computed$1, Ref, OnCleanup, WatchStopHandle, ShallowUnwrapRef, UnwrapNestedRefs, DebuggerEvent, ComputedGetter, WritableComputedOptions, WatchCallback, ReactiveEffect, DebuggerOptions, WatchEffect, WatchHandle, WatchSource, ReactiveMarker, ShallowRef, WatchErrorCodes, reactive } from '@vue/reactivity';
2
+ export { ComputedGetter, ComputedRef, ComputedSetter, CustomRefFactory, DebuggerEvent, DebuggerEventExtraInfo, DebuggerOptions, DeepReadonly, EffectScheduler, EffectScope, MaybeRef, MaybeRefOrGetter, Raw, Reactive, ReactiveEffect, ReactiveEffectOptions, ReactiveEffectRunner, ReactiveFlags, Ref, ShallowReactive, ShallowRef, ShallowUnwrapRef, ToRef, ToRefs, TrackOpTypes, TriggerOpTypes, UnwrapNestedRefs, UnwrapRef, WatchCallback, WatchEffect, WatchHandle, WatchSource, WatchStopHandle, WritableComputedOptions, WritableComputedRef, customRef, effect, effectScope, getCurrentScope, getCurrentWatcher, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, onWatcherCleanup, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, triggerRef, unref } from '@vue/reactivity';
3
3
  import { IfAny, Prettify, Awaited, LooseRequired, UnionToIntersection, OverloadParameters } from '@vue/shared';
4
4
  export { camelize, capitalize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '@vue/shared';
5
5
 
@@ -269,13 +269,13 @@ export declare function defineOptions<RawBindings = {}, D = {}, C extends Comput
269
269
  slots?: never;
270
270
  }): void;
271
271
  export declare function defineSlots<S extends Record<string, any> = Record<string, any>>(): StrictUnwrapSlotsType<SlotsType<S>>;
272
- export type ModelRef<T, M extends PropertyKey = string> = Ref<T> & [
273
- ModelRef<T, M>,
272
+ export type ModelRef<T, M extends PropertyKey = string, G = T, S = T> = Ref<G, S> & [
273
+ ModelRef<T, M, G, S>,
274
274
  Record<M, true | undefined>
275
275
  ];
276
- type DefineModelOptions<T = any> = {
277
- get?: (v: T) => any;
278
- set?: (v: T) => any;
276
+ type DefineModelOptions<T = any, G = T, S = T> = {
277
+ get?: (v: T) => G;
278
+ set?: (v: S) => any;
279
279
  };
280
280
  /**
281
281
  * Vue `<script setup>` compiler macro for declaring a
@@ -310,20 +310,18 @@ type DefineModelOptions<T = any> = {
310
310
  * const count = defineModel<number>('count', { default: 0 })
311
311
  * ```
312
312
  */
313
- export declare function defineModel<T, M extends PropertyKey = string>(options: {
314
- required: true;
315
- } & PropOptions<T> & DefineModelOptions<T>): ModelRef<T, M>;
316
- export declare function defineModel<T, M extends PropertyKey = string>(options: {
313
+ export declare function defineModel<T, M extends PropertyKey = string, G = T, S = T>(options: ({
317
314
  default: any;
318
- } & PropOptions<T> & DefineModelOptions<T>): ModelRef<T, M>;
319
- export declare function defineModel<T, M extends PropertyKey = string>(options?: PropOptions<T> & DefineModelOptions<T>): ModelRef<T | undefined, M>;
320
- export declare function defineModel<T, M extends PropertyKey = string>(name: string, options: {
315
+ } | {
321
316
  required: true;
322
- } & PropOptions<T> & DefineModelOptions<T>): ModelRef<T, M>;
323
- export declare function defineModel<T, M extends PropertyKey = string>(name: string, options: {
317
+ }) & PropOptions<T> & DefineModelOptions<T, G, S>): ModelRef<T, M, G, S>;
318
+ export declare function defineModel<T, M extends PropertyKey = string, G = T, S = T>(options?: PropOptions<T> & DefineModelOptions<T, G, S>): ModelRef<T | undefined, M, G | undefined, S | undefined>;
319
+ export declare function defineModel<T, M extends PropertyKey = string, G = T, S = T>(name: string, options: ({
324
320
  default: any;
325
- } & PropOptions<T> & DefineModelOptions<T>): ModelRef<T, M>;
326
- export declare function defineModel<T, M extends PropertyKey = string>(name: string, options?: PropOptions<T> & DefineModelOptions<T>): ModelRef<T | undefined, M>;
321
+ } | {
322
+ required: true;
323
+ }) & PropOptions<T> & DefineModelOptions<T, G, S>): ModelRef<T, M, G, S>;
324
+ export declare function defineModel<T, M extends PropertyKey = string, G = T, S = T>(name: string, options?: PropOptions<T> & DefineModelOptions<T, G, S>): ModelRef<T | undefined, M, G | undefined, S | undefined>;
327
325
  type NotUndefined<T> = T extends undefined ? never : T;
328
326
  type MappedOmit<T, K extends keyof any> = {
329
327
  [P in keyof T as P extends K ? never : P]: T[P];
@@ -1334,7 +1332,7 @@ export interface ComponentCustomProps {
1334
1332
  * }
1335
1333
  * ```
1336
1334
  */
1337
- export interface GlobalDirectives extends Record<string, Directive> {
1335
+ export interface GlobalDirectives {
1338
1336
  }
1339
1337
  /**
1340
1338
  * For globally defined Components
@@ -1351,7 +1349,7 @@ export interface GlobalDirectives extends Record<string, Directive> {
1351
1349
  * }
1352
1350
  * ```
1353
1351
  */
1354
- export interface GlobalComponents extends Record<string, Component> {
1352
+ export interface GlobalComponents {
1355
1353
  Teleport: DefineComponent<TeleportProps>;
1356
1354
  Suspense: DefineComponent<SuspenseProps>;
1357
1355
  KeepAlive: DefineComponent<KeepAliveProps>;
@@ -1463,23 +1461,19 @@ export declare const isRuntimeOnly: () => boolean;
1463
1461
  export interface ComponentCustomElementInterface {
1464
1462
  }
1465
1463
 
1466
- export type WatchEffect = (onCleanup: OnCleanup) => void;
1467
- export type WatchSource<T = any> = Ref<T, any> | ComputedRef<T> | (() => T);
1468
- export type WatchCallback<V = any, OV = any> = (value: V, oldValue: OV, onCleanup: OnCleanup) => any;
1469
1464
  type MaybeUndefined<T, I> = I extends true ? T | undefined : T;
1470
1465
  type MapSources<T, Immediate> = {
1471
1466
  [K in keyof T]: T[K] extends WatchSource<infer V> ? MaybeUndefined<V, Immediate> : T[K] extends object ? MaybeUndefined<T[K], Immediate> : never;
1472
1467
  };
1473
- type OnCleanup = (cleanupFn: () => void) => void;
1474
- export interface WatchOptionsBase extends DebuggerOptions {
1468
+ export interface WatchEffectOptions extends DebuggerOptions {
1475
1469
  flush?: 'pre' | 'post' | 'sync';
1476
1470
  }
1477
- export interface WatchOptions<Immediate = boolean> extends WatchOptionsBase {
1471
+ export interface WatchOptions<Immediate = boolean> extends WatchEffectOptions {
1478
1472
  immediate?: Immediate;
1479
1473
  deep?: boolean | number;
1480
1474
  once?: boolean;
1481
1475
  }
1482
- export declare function watchEffect(effect: WatchEffect, options?: WatchOptionsBase): WatchHandle;
1476
+ export declare function watchEffect(effect: WatchEffect, options?: WatchEffectOptions): WatchHandle;
1483
1477
  export declare function watchPostEffect(effect: WatchEffect, options?: DebuggerOptions): WatchHandle;
1484
1478
  export declare function watchSyncEffect(effect: WatchEffect, options?: DebuggerOptions): WatchHandle;
1485
1479
  export type MultiWatchSources = (WatchSource<unknown> | object)[];
@@ -1523,7 +1517,7 @@ export declare function defineAsyncComponent<T extends Component = {
1523
1517
  new (): ComponentPublicInstance;
1524
1518
  }>(source: AsyncComponentLoader<T> | AsyncComponentOptions<T>): T;
1525
1519
 
1526
- export declare function useModel<M extends PropertyKey, T extends Record<string, any>, K extends keyof T>(props: T, name: K, options?: DefineModelOptions<T[K]>): ModelRef<T[K], M>;
1520
+ export declare function useModel<M extends PropertyKey, T extends Record<string, any>, K extends keyof T, G = T[K], S = T[K]>(props: T, name: K, options?: DefineModelOptions<T[K], G, S>): ModelRef<T[K], M, G, S>;
1527
1521
 
1528
1522
  export declare function useTemplateRef<T = unknown, Keys extends string = string>(key: Keys): Readonly<ShallowRef<T | null>>;
1529
1523
 
@@ -1798,7 +1792,7 @@ declare module '@vue/reactivity' {
1798
1792
 
1799
1793
  export declare const DeprecationTypes: typeof DeprecationTypes$1;
1800
1794
 
1801
- export { createBaseVNode as createElementVNode, };
1795
+ export { type WatchEffectOptions as WatchOptionsBase, createBaseVNode as createElementVNode, };
1802
1796
  // Note: this file is auto concatenated to the end of the bundled d.ts during
1803
1797
  // build.
1804
1798
 
@@ -1,11 +1,11 @@
1
1
  /**
2
- * @vue/runtime-core v3.5.0-beta.3
2
+ * @vue/runtime-core v3.5.0
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
6
6
  import { pauseTracking, resetTracking, isRef, toRaw, traverse, isReactive, ref, shallowReadArray, toReactive, shallowReadonly, track, reactive, shallowReactive, trigger, ReactiveEffect, watch as watch$1, customRef, isProxy, proxyRefs, markRaw, EffectScope, computed as computed$1, shallowRef, readonly, isShallow, isReadonly } from '@vue/reactivity';
7
7
  export { EffectScope, ReactiveEffect, TrackOpTypes, TriggerOpTypes, customRef, effect, effectScope, getCurrentScope, getCurrentWatcher, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, onWatcherCleanup, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, triggerRef, unref } from '@vue/reactivity';
8
- import { isString, isFunction, isPromise, isArray, EMPTY_OBJ, NOOP, getGlobalThis, extend, isBuiltInDirective, hasOwn, remove, def, isOn, isReservedProp, normalizeClass, stringifyStyle, normalizeStyle, isKnownSvgAttr, isBooleanAttr, isKnownHtmlAttr, includeBooleanAttr, isRenderableAttrValue, isObject, isRegExp, invokeArrayFns, toHandlerKey, capitalize, camelize, isGloballyAllowed, NO, hyphenate, EMPTY_ARR, toRawType, makeMap, hasChanged, looseToNumber, isModelListener, toNumber } from '@vue/shared';
8
+ import { isString, isFunction, isPromise, isArray, EMPTY_OBJ, NOOP, getGlobalThis, extend, isBuiltInDirective, hasOwn, remove, def, isOn, isReservedProp, normalizeClass, stringifyStyle, normalizeStyle, isKnownSvgAttr, isBooleanAttr, isKnownHtmlAttr, includeBooleanAttr, isRenderableAttrValue, getEscapedCssVarName, isObject, isRegExp, invokeArrayFns, toHandlerKey, capitalize, camelize, isGloballyAllowed, NO, hyphenate, EMPTY_ARR, toRawType, makeMap, hasChanged, looseToNumber, isModelListener, toNumber } from '@vue/shared';
9
9
  export { camelize, capitalize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '@vue/shared';
10
10
 
11
11
  const stack = [];
@@ -1424,7 +1424,7 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
1424
1424
  // @__NO_SIDE_EFFECTS__
1425
1425
  function defineComponent(options, extraOptions) {
1426
1426
  return isFunction(options) ? (
1427
- // #8326: extend call and options.name access are considered side-effects
1427
+ // #8236: extend call and options.name access are considered side-effects
1428
1428
  // by Rollup, so we have to wrap it in a pure-annotated IIFE.
1429
1429
  /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))()
1430
1430
  ) : options;
@@ -1871,8 +1871,7 @@ Server rendered element contains more child nodes than client vdom.`
1871
1871
  const isText = vnode.type === Text;
1872
1872
  if (node) {
1873
1873
  if (isText && !optimized) {
1874
- let next = children[i + 1];
1875
- if (next && (next = normalizeVNode(next)).type === Text) {
1874
+ if (i + 1 < l && normalizeVNode(children[i + 1]).type === Text) {
1876
1875
  insert(
1877
1876
  createText(
1878
1877
  node.data.slice(vnode.children.length)
@@ -2128,7 +2127,10 @@ function resolveCssVars(instance, vnode, expectedMap) {
2128
2127
  if (instance.getCssVars && (vnode === root || root && root.type === Fragment && root.children.includes(vnode))) {
2129
2128
  const cssVars = instance.getCssVars();
2130
2129
  for (const key in cssVars) {
2131
- expectedMap.set(`--${key}`, String(cssVars[key]));
2130
+ expectedMap.set(
2131
+ `--${getEscapedCssVarName(key, false)}`,
2132
+ String(cssVars[key])
2133
+ );
2132
2134
  }
2133
2135
  }
2134
2136
  if (vnode === root && instance.parent) {
@@ -2562,6 +2564,7 @@ const KeepAliveImpl = {
2562
2564
  );
2563
2565
  const { include, exclude, max } = props;
2564
2566
  if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) {
2567
+ vnode.shapeFlag &= ~256;
2565
2568
  current = vnode;
2566
2569
  return rawVNode;
2567
2570
  }
@@ -8272,7 +8275,7 @@ function isMemoSame(cached, memo) {
8272
8275
  return true;
8273
8276
  }
8274
8277
 
8275
- const version = "3.5.0-beta.3";
8278
+ const version = "3.5.0";
8276
8279
  const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
8277
8280
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
8278
8281
  const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/runtime-core",
3
- "version": "3.5.0-beta.3",
3
+ "version": "3.5.0",
4
4
  "description": "@vue/runtime-core",
5
5
  "main": "index.js",
6
6
  "module": "dist/runtime-core.esm-bundler.js",
@@ -46,7 +46,7 @@
46
46
  },
47
47
  "homepage": "https://github.com/vuejs/core/tree/main/packages/runtime-core#readme",
48
48
  "dependencies": {
49
- "@vue/shared": "3.5.0-beta.3",
50
- "@vue/reactivity": "3.5.0-beta.3"
49
+ "@vue/shared": "3.5.0",
50
+ "@vue/reactivity": "3.5.0"
51
51
  }
52
52
  }