@vue/runtime-core 3.3.0-beta.4 → 3.3.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.
@@ -1135,7 +1135,7 @@ function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense
1135
1135
  );
1136
1136
  setActiveBranch(suspense, vnode.ssFallback);
1137
1137
  } else {
1138
- suspense.resolve();
1138
+ suspense.resolve(false, true);
1139
1139
  }
1140
1140
  }
1141
1141
  function patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) {
@@ -1294,7 +1294,6 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotSc
1294
1294
  }
1295
1295
  let hasWarned = false;
1296
1296
  function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals, isHydrating = false) {
1297
- var _a;
1298
1297
  if (!hasWarned) {
1299
1298
  hasWarned = true;
1300
1299
  console[console.info ? "info" : "log"](
@@ -1309,10 +1308,10 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
1309
1308
  o: { parentNode, remove }
1310
1309
  } = rendererInternals;
1311
1310
  let parentSuspenseId;
1312
- const isSuspensible = ((_a = vnode.props) == null ? void 0 : _a.suspensible) != null && vnode.props.suspensible !== false;
1311
+ const isSuspensible = isVNodeSuspensible(vnode);
1313
1312
  if (isSuspensible) {
1314
1313
  if (parentSuspense == null ? void 0 : parentSuspense.pendingBranch) {
1315
- parentSuspenseId = parentSuspense == null ? void 0 : parentSuspense.pendingId;
1314
+ parentSuspenseId = parentSuspense.pendingId;
1316
1315
  parentSuspense.deps++;
1317
1316
  }
1318
1317
  }
@@ -1337,7 +1336,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
1337
1336
  isHydrating,
1338
1337
  isUnmounted: false,
1339
1338
  effects: [],
1340
- resolve(resume = false) {
1339
+ resolve(resume = false, sync = false) {
1341
1340
  {
1342
1341
  if (!resume && !suspense.pendingBranch) {
1343
1342
  throw new Error(
@@ -1399,7 +1398,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
1399
1398
  if (isSuspensible) {
1400
1399
  if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {
1401
1400
  parentSuspense.deps--;
1402
- if (parentSuspense.deps === 0) {
1401
+ if (parentSuspense.deps === 0 && !sync) {
1403
1402
  parentSuspense.resolve();
1404
1403
  }
1405
1404
  }
@@ -1609,6 +1608,10 @@ function setActiveBranch(suspense, branch) {
1609
1608
  updateHOCHostEl(parentComponent, el);
1610
1609
  }
1611
1610
  }
1611
+ function isVNodeSuspensible(vnode) {
1612
+ var _a;
1613
+ return ((_a = vnode.props) == null ? void 0 : _a.suspensible) != null && vnode.props.suspensible !== false;
1614
+ }
1612
1615
 
1613
1616
  function watchEffect(effect, options) {
1614
1617
  return doWatch(effect, null, options);
@@ -2240,7 +2243,11 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
2240
2243
  }
2241
2244
 
2242
2245
  function defineComponent(options, extraOptions) {
2243
- return shared.isFunction(options) ? shared.extend({}, extraOptions, { setup: options, name: options.name }) : options;
2246
+ return shared.isFunction(options) ? (
2247
+ // #8326: extend call and options.name access are considered side-effects
2248
+ // by Rollup, so we have to wrap it in a pure-annotated IIFE.
2249
+ /* @__PURE__ */ (() => shared.extend({ name: options.name }, extraOptions, { setup: options }))()
2250
+ ) : options;
2244
2251
  }
2245
2252
 
2246
2253
  const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
@@ -7657,7 +7664,7 @@ function isMemoSame(cached, memo) {
7657
7664
  return true;
7658
7665
  }
7659
7666
 
7660
- const version = "3.3.0-beta.4";
7667
+ const version = "3.3.0";
7661
7668
  const _ssrUtils = {
7662
7669
  createComponentInstance,
7663
7670
  setupComponent,
@@ -653,7 +653,7 @@ function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense
653
653
  );
654
654
  setActiveBranch(suspense, vnode.ssFallback);
655
655
  } else {
656
- suspense.resolve();
656
+ suspense.resolve(false, true);
657
657
  }
658
658
  }
659
659
  function patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) {
@@ -811,7 +811,6 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotSc
811
811
  }
812
812
  }
813
813
  function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals, isHydrating = false) {
814
- var _a;
815
814
  const {
816
815
  p: patch,
817
816
  m: move,
@@ -820,10 +819,10 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
820
819
  o: { parentNode, remove }
821
820
  } = rendererInternals;
822
821
  let parentSuspenseId;
823
- const isSuspensible = ((_a = vnode.props) == null ? void 0 : _a.suspensible) != null && vnode.props.suspensible !== false;
822
+ const isSuspensible = isVNodeSuspensible(vnode);
824
823
  if (isSuspensible) {
825
824
  if (parentSuspense == null ? void 0 : parentSuspense.pendingBranch) {
826
- parentSuspenseId = parentSuspense == null ? void 0 : parentSuspense.pendingId;
825
+ parentSuspenseId = parentSuspense.pendingId;
827
826
  parentSuspense.deps++;
828
827
  }
829
828
  }
@@ -845,7 +844,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
845
844
  isHydrating,
846
845
  isUnmounted: false,
847
846
  effects: [],
848
- resolve(resume = false) {
847
+ resolve(resume = false, sync = false) {
849
848
  const {
850
849
  vnode: vnode2,
851
850
  activeBranch,
@@ -895,7 +894,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
895
894
  if (isSuspensible) {
896
895
  if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {
897
896
  parentSuspense.deps--;
898
- if (parentSuspense.deps === 0) {
897
+ if (parentSuspense.deps === 0 && !sync) {
899
898
  parentSuspense.resolve();
900
899
  }
901
900
  }
@@ -1096,6 +1095,10 @@ function setActiveBranch(suspense, branch) {
1096
1095
  updateHOCHostEl(parentComponent, el);
1097
1096
  }
1098
1097
  }
1098
+ function isVNodeSuspensible(vnode) {
1099
+ var _a;
1100
+ return ((_a = vnode.props) == null ? void 0 : _a.suspensible) != null && vnode.props.suspensible !== false;
1101
+ }
1099
1102
 
1100
1103
  function watchEffect(effect, options) {
1101
1104
  return doWatch(effect, null, options);
@@ -1680,7 +1683,11 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
1680
1683
  }
1681
1684
 
1682
1685
  function defineComponent(options, extraOptions) {
1683
- return shared.isFunction(options) ? shared.extend({}, extraOptions, { setup: options, name: options.name }) : options;
1686
+ return shared.isFunction(options) ? (
1687
+ // #8326: extend call and options.name access are considered side-effects
1688
+ // by Rollup, so we have to wrap it in a pure-annotated IIFE.
1689
+ /* @__PURE__ */ (() => shared.extend({ name: options.name }, extraOptions, { setup: options }))()
1690
+ ) : options;
1684
1691
  }
1685
1692
 
1686
1693
  const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
@@ -6008,7 +6015,7 @@ function isMemoSame(cached, memo) {
6008
6015
  return true;
6009
6016
  }
6010
6017
 
6011
- const version = "3.3.0-beta.4";
6018
+ const version = "3.3.0";
6012
6019
  const _ssrUtils = {
6013
6020
  createComponentInstance,
6014
6021
  setupComponent,
@@ -14,7 +14,8 @@ declare const SlotSymbol: unique symbol;
14
14
  export type SlotsType<T extends Record<string, any> = Record<string, any>> = {
15
15
  [SlotSymbol]?: T;
16
16
  };
17
- type TypedSlots<S extends SlotsType, T = NonNullable<S[typeof SlotSymbol]>> = [keyof S] extends [never] ? Slots : Readonly<Prettify<{
17
+ type StrictUnwrapSlotsType<S extends SlotsType, T = NonNullable<S[typeof SlotSymbol]>> = [keyof S] extends [never] ? Slots : Readonly<T>;
18
+ type UnwrapSlotsType<S extends SlotsType, T = NonNullable<S[typeof SlotSymbol]>> = [keyof S] extends [never] ? Slots : Readonly<Prettify<{
18
19
  [K in keyof T]: NonNullable<T[K]> extends (...args: any[]) => any ? T[K] : Slot<T[K]>;
19
20
  }>>;
20
21
  type RawSlots = {
@@ -118,7 +119,7 @@ C extends ComputedOptions = {}, M extends MethodOptions = {}, E extends EmitsOpt
118
119
  $props: Prettify<MakeDefaultsOptional extends true ? Partial<Defaults> & Omit<P & PublicProps, keyof Defaults> : P & PublicProps>;
119
120
  $attrs: Data;
120
121
  $refs: Data;
121
- $slots: TypedSlots<S>;
122
+ $slots: UnwrapSlotsType<S>;
122
123
  $root: ComponentPublicInstance | null;
123
124
  $parent: ComponentPublicInstance | null;
124
125
  $emit: EmitFn<E>;
@@ -193,7 +194,7 @@ export interface SuspenseBoundary {
193
194
  isHydrating: boolean;
194
195
  isUnmounted: boolean;
195
196
  effects: Function[];
196
- resolve(force?: boolean): void;
197
+ resolve(force?: boolean, sync?: boolean): void;
197
198
  fallback(fallbackVNode: VNode): void;
198
199
  move(container: RendererElement, anchor: RendererNode | null, type: MoveType): void;
199
200
  next(): RendererNode | null;
@@ -1101,7 +1102,7 @@ export type Component<Props = any, RawBindings = any, D = any, C extends Compute
1101
1102
  type LifecycleHook<TFn = Function> = TFn[] | null;
1102
1103
  export type SetupContext<E = EmitsOptions, S extends SlotsType = {}> = E extends any ? {
1103
1104
  attrs: Data;
1104
- slots: TypedSlots<S>;
1105
+ slots: UnwrapSlotsType<S>;
1105
1106
  emit: EmitFn<E>;
1106
1107
  expose: (exposed?: Record<string, any>) => void;
1107
1108
  } : never;
@@ -1360,7 +1361,7 @@ export declare function defineOptions<RawBindings = {}, D = {}, C extends Comput
1360
1361
  expose?: undefined;
1361
1362
  slots?: undefined;
1362
1363
  }): void;
1363
- export declare function defineSlots<S extends Record<string, any> = Record<string, any>>(): TypedSlots<SlotsType<S>>;
1364
+ export declare function defineSlots<S extends Record<string, any> = Record<string, any>>(): StrictUnwrapSlotsType<SlotsType<S>>;
1364
1365
  /**
1365
1366
  * (**Experimental**) Vue `<script setup>` compiler macro for declaring a
1366
1367
  * two-way binding prop that can be consumed via `v-model` from the parent
@@ -1139,7 +1139,7 @@ function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense
1139
1139
  );
1140
1140
  setActiveBranch(suspense, vnode.ssFallback);
1141
1141
  } else {
1142
- suspense.resolve();
1142
+ suspense.resolve(false, true);
1143
1143
  }
1144
1144
  }
1145
1145
  function patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) {
@@ -1298,7 +1298,6 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotSc
1298
1298
  }
1299
1299
  let hasWarned = false;
1300
1300
  function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals, isHydrating = false) {
1301
- var _a;
1302
1301
  if (process.env.NODE_ENV !== "production" && true && !hasWarned) {
1303
1302
  hasWarned = true;
1304
1303
  console[console.info ? "info" : "log"](
@@ -1313,10 +1312,10 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
1313
1312
  o: { parentNode, remove }
1314
1313
  } = rendererInternals;
1315
1314
  let parentSuspenseId;
1316
- const isSuspensible = ((_a = vnode.props) == null ? void 0 : _a.suspensible) != null && vnode.props.suspensible !== false;
1315
+ const isSuspensible = isVNodeSuspensible(vnode);
1317
1316
  if (isSuspensible) {
1318
1317
  if (parentSuspense == null ? void 0 : parentSuspense.pendingBranch) {
1319
- parentSuspenseId = parentSuspense == null ? void 0 : parentSuspense.pendingId;
1318
+ parentSuspenseId = parentSuspense.pendingId;
1320
1319
  parentSuspense.deps++;
1321
1320
  }
1322
1321
  }
@@ -1341,7 +1340,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
1341
1340
  isHydrating,
1342
1341
  isUnmounted: false,
1343
1342
  effects: [],
1344
- resolve(resume = false) {
1343
+ resolve(resume = false, sync = false) {
1345
1344
  if (process.env.NODE_ENV !== "production") {
1346
1345
  if (!resume && !suspense.pendingBranch) {
1347
1346
  throw new Error(
@@ -1403,7 +1402,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
1403
1402
  if (isSuspensible) {
1404
1403
  if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {
1405
1404
  parentSuspense.deps--;
1406
- if (parentSuspense.deps === 0) {
1405
+ if (parentSuspense.deps === 0 && !sync) {
1407
1406
  parentSuspense.resolve();
1408
1407
  }
1409
1408
  }
@@ -1613,6 +1612,10 @@ function setActiveBranch(suspense, branch) {
1613
1612
  updateHOCHostEl(parentComponent, el);
1614
1613
  }
1615
1614
  }
1615
+ function isVNodeSuspensible(vnode) {
1616
+ var _a;
1617
+ return ((_a = vnode.props) == null ? void 0 : _a.suspensible) != null && vnode.props.suspensible !== false;
1618
+ }
1616
1619
 
1617
1620
  function watchEffect(effect, options) {
1618
1621
  return doWatch(effect, null, options);
@@ -2246,7 +2249,11 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
2246
2249
  }
2247
2250
 
2248
2251
  function defineComponent(options, extraOptions) {
2249
- return isFunction(options) ? extend({}, extraOptions, { setup: options, name: options.name }) : options;
2252
+ return isFunction(options) ? (
2253
+ // #8326: extend call and options.name access are considered side-effects
2254
+ // by Rollup, so we have to wrap it in a pure-annotated IIFE.
2255
+ /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))()
2256
+ ) : options;
2250
2257
  }
2251
2258
 
2252
2259
  const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
@@ -7717,7 +7724,7 @@ function isMemoSame(cached, memo) {
7717
7724
  return true;
7718
7725
  }
7719
7726
 
7720
- const version = "3.3.0-beta.4";
7727
+ const version = "3.3.0";
7721
7728
  const _ssrUtils = {
7722
7729
  createComponentInstance,
7723
7730
  setupComponent,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/runtime-core",
3
- "version": "3.3.0-beta.4",
3
+ "version": "3.3.0",
4
4
  "description": "@vue/runtime-core",
5
5
  "main": "index.js",
6
6
  "module": "dist/runtime-core.esm-bundler.js",
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "homepage": "https://github.com/vuejs/core/tree/main/packages/runtime-core#readme",
34
34
  "dependencies": {
35
- "@vue/shared": "3.3.0-beta.4",
36
- "@vue/reactivity": "3.3.0-beta.4"
35
+ "@vue/shared": "3.3.0",
36
+ "@vue/reactivity": "3.3.0"
37
37
  }
38
- }
38
+ }