@vue/runtime-dom 3.3.7 → 3.3.8

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.
@@ -2447,6 +2447,61 @@ var VueRuntimeDOM = (function (exports) {
2447
2447
  }
2448
2448
  }
2449
2449
 
2450
+ const COMPONENTS = "components";
2451
+ const DIRECTIVES = "directives";
2452
+ function resolveComponent(name, maybeSelfReference) {
2453
+ return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
2454
+ }
2455
+ const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
2456
+ function resolveDynamicComponent(component) {
2457
+ if (isString(component)) {
2458
+ return resolveAsset(COMPONENTS, component, false) || component;
2459
+ } else {
2460
+ return component || NULL_DYNAMIC_COMPONENT;
2461
+ }
2462
+ }
2463
+ function resolveDirective(name) {
2464
+ return resolveAsset(DIRECTIVES, name);
2465
+ }
2466
+ function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {
2467
+ const instance = currentRenderingInstance || currentInstance;
2468
+ if (instance) {
2469
+ const Component = instance.type;
2470
+ if (type === COMPONENTS) {
2471
+ const selfName = getComponentName(
2472
+ Component,
2473
+ false
2474
+ /* do not include inferred name to avoid breaking existing code */
2475
+ );
2476
+ if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {
2477
+ return Component;
2478
+ }
2479
+ }
2480
+ const res = (
2481
+ // local registration
2482
+ // check instance[type] first which is resolved for options API
2483
+ resolve(instance[type] || Component[type], name) || // global registration
2484
+ resolve(instance.appContext[type], name)
2485
+ );
2486
+ if (!res && maybeSelfReference) {
2487
+ return Component;
2488
+ }
2489
+ if (warnMissing && !res) {
2490
+ const extra = type === COMPONENTS ? `
2491
+ If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;
2492
+ warn(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
2493
+ }
2494
+ return res;
2495
+ } else {
2496
+ warn(
2497
+ `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`
2498
+ );
2499
+ }
2500
+ }
2501
+ function resolve(registry, name) {
2502
+ return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);
2503
+ }
2504
+
2450
2505
  const isSuspense = (type) => type.__isSuspense;
2451
2506
  const SuspenseImpl = {
2452
2507
  name: "Suspense",
@@ -2981,7 +3036,7 @@ var VueRuntimeDOM = (function (exports) {
2981
3036
  }
2982
3037
  if (isArray(s)) {
2983
3038
  const singleChild = filterSingleRoot(s);
2984
- if (!singleChild) {
3039
+ if (!singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) {
2985
3040
  warn(`<Suspense> slots expect a single root node.`);
2986
3041
  }
2987
3042
  s = singleChild;
@@ -4066,61 +4121,6 @@ var VueRuntimeDOM = (function (exports) {
4066
4121
  injectHook("ec", hook, target);
4067
4122
  }
4068
4123
 
4069
- const COMPONENTS = "components";
4070
- const DIRECTIVES = "directives";
4071
- function resolveComponent(name, maybeSelfReference) {
4072
- return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
4073
- }
4074
- const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
4075
- function resolveDynamicComponent(component) {
4076
- if (isString(component)) {
4077
- return resolveAsset(COMPONENTS, component, false) || component;
4078
- } else {
4079
- return component || NULL_DYNAMIC_COMPONENT;
4080
- }
4081
- }
4082
- function resolveDirective(name) {
4083
- return resolveAsset(DIRECTIVES, name);
4084
- }
4085
- function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {
4086
- const instance = currentRenderingInstance || currentInstance;
4087
- if (instance) {
4088
- const Component = instance.type;
4089
- if (type === COMPONENTS) {
4090
- const selfName = getComponentName(
4091
- Component,
4092
- false
4093
- /* do not include inferred name to avoid breaking existing code */
4094
- );
4095
- if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {
4096
- return Component;
4097
- }
4098
- }
4099
- const res = (
4100
- // local registration
4101
- // check instance[type] first which is resolved for options API
4102
- resolve(instance[type] || Component[type], name) || // global registration
4103
- resolve(instance.appContext[type], name)
4104
- );
4105
- if (!res && maybeSelfReference) {
4106
- return Component;
4107
- }
4108
- if (warnMissing && !res) {
4109
- const extra = type === COMPONENTS ? `
4110
- If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;
4111
- warn(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
4112
- }
4113
- return res;
4114
- } else {
4115
- warn(
4116
- `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`
4117
- );
4118
- }
4119
- }
4120
- function resolve(registry, name) {
4121
- return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);
4122
- }
4123
-
4124
4124
  function renderList(source, renderItem, cache, index) {
4125
4125
  let ret;
4126
4126
  const cached = cache && cache[index];
@@ -5936,15 +5936,15 @@ If you want to remount the same app, move your app creation logic into a factory
5936
5936
  }
5937
5937
  break;
5938
5938
  case Comment:
5939
- if (domType !== 8 /* COMMENT */ || isFragmentStart) {
5940
- if (node.tagName.toLowerCase() === "template") {
5941
- const content = vnode.el.content.firstChild;
5942
- replaceNode(content, node, parentComponent);
5943
- vnode.el = node = content;
5944
- nextNode = nextSibling(node);
5945
- } else {
5946
- nextNode = onMismatch();
5947
- }
5939
+ if (isTemplateNode(node)) {
5940
+ nextNode = nextSibling(node);
5941
+ replaceNode(
5942
+ vnode.el = node.content.firstChild,
5943
+ node,
5944
+ parentComponent
5945
+ );
5946
+ } else if (domType !== 8 /* COMMENT */ || isFragmentStart) {
5947
+ nextNode = onMismatch();
5948
5948
  } else {
5949
5949
  nextNode = nextSibling(node);
5950
5950
  }
@@ -6288,8 +6288,7 @@ If you want to remount the same app, move your app creation logic into a factory
6288
6288
  let parent = parentComponent;
6289
6289
  while (parent) {
6290
6290
  if (parent.vnode.el === oldNode) {
6291
- parent.vnode.el = newNode;
6292
- parent.subTree.el = newNode;
6291
+ parent.vnode.el = parent.subTree.el = newNode;
6293
6292
  }
6294
6293
  parent = parent.parent;
6295
6294
  }
@@ -9069,7 +9068,7 @@ Component that was made reactive: `,
9069
9068
  return true;
9070
9069
  }
9071
9070
 
9072
- const version = "3.3.7";
9071
+ const version = "3.3.8";
9073
9072
  const ssrUtils = null;
9074
9073
  const resolveFilter = null;
9075
9074
  const compatUtils = null;