vue 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.
@@ -2512,6 +2512,61 @@ var Vue = (function (exports) {
2512
2512
  }
2513
2513
  }
2514
2514
 
2515
+ const COMPONENTS = "components";
2516
+ const DIRECTIVES = "directives";
2517
+ function resolveComponent(name, maybeSelfReference) {
2518
+ return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
2519
+ }
2520
+ const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
2521
+ function resolveDynamicComponent(component) {
2522
+ if (isString(component)) {
2523
+ return resolveAsset(COMPONENTS, component, false) || component;
2524
+ } else {
2525
+ return component || NULL_DYNAMIC_COMPONENT;
2526
+ }
2527
+ }
2528
+ function resolveDirective(name) {
2529
+ return resolveAsset(DIRECTIVES, name);
2530
+ }
2531
+ function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {
2532
+ const instance = currentRenderingInstance || currentInstance;
2533
+ if (instance) {
2534
+ const Component = instance.type;
2535
+ if (type === COMPONENTS) {
2536
+ const selfName = getComponentName(
2537
+ Component,
2538
+ false
2539
+ /* do not include inferred name to avoid breaking existing code */
2540
+ );
2541
+ if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {
2542
+ return Component;
2543
+ }
2544
+ }
2545
+ const res = (
2546
+ // local registration
2547
+ // check instance[type] first which is resolved for options API
2548
+ resolve(instance[type] || Component[type], name) || // global registration
2549
+ resolve(instance.appContext[type], name)
2550
+ );
2551
+ if (!res && maybeSelfReference) {
2552
+ return Component;
2553
+ }
2554
+ if (warnMissing && !res) {
2555
+ const extra = type === COMPONENTS ? `
2556
+ If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;
2557
+ warn(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
2558
+ }
2559
+ return res;
2560
+ } else {
2561
+ warn(
2562
+ `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`
2563
+ );
2564
+ }
2565
+ }
2566
+ function resolve(registry, name) {
2567
+ return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);
2568
+ }
2569
+
2515
2570
  const isSuspense = (type) => type.__isSuspense;
2516
2571
  const SuspenseImpl = {
2517
2572
  name: "Suspense",
@@ -3046,7 +3101,7 @@ var Vue = (function (exports) {
3046
3101
  }
3047
3102
  if (isArray(s)) {
3048
3103
  const singleChild = filterSingleRoot(s);
3049
- if (!singleChild) {
3104
+ if (!singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) {
3050
3105
  warn(`<Suspense> slots expect a single root node.`);
3051
3106
  }
3052
3107
  s = singleChild;
@@ -4131,61 +4186,6 @@ var Vue = (function (exports) {
4131
4186
  injectHook("ec", hook, target);
4132
4187
  }
4133
4188
 
4134
- const COMPONENTS = "components";
4135
- const DIRECTIVES = "directives";
4136
- function resolveComponent(name, maybeSelfReference) {
4137
- return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
4138
- }
4139
- const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
4140
- function resolveDynamicComponent(component) {
4141
- if (isString(component)) {
4142
- return resolveAsset(COMPONENTS, component, false) || component;
4143
- } else {
4144
- return component || NULL_DYNAMIC_COMPONENT;
4145
- }
4146
- }
4147
- function resolveDirective(name) {
4148
- return resolveAsset(DIRECTIVES, name);
4149
- }
4150
- function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {
4151
- const instance = currentRenderingInstance || currentInstance;
4152
- if (instance) {
4153
- const Component = instance.type;
4154
- if (type === COMPONENTS) {
4155
- const selfName = getComponentName(
4156
- Component,
4157
- false
4158
- /* do not include inferred name to avoid breaking existing code */
4159
- );
4160
- if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {
4161
- return Component;
4162
- }
4163
- }
4164
- const res = (
4165
- // local registration
4166
- // check instance[type] first which is resolved for options API
4167
- resolve(instance[type] || Component[type], name) || // global registration
4168
- resolve(instance.appContext[type], name)
4169
- );
4170
- if (!res && maybeSelfReference) {
4171
- return Component;
4172
- }
4173
- if (warnMissing && !res) {
4174
- const extra = type === COMPONENTS ? `
4175
- If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;
4176
- warn(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
4177
- }
4178
- return res;
4179
- } else {
4180
- warn(
4181
- `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`
4182
- );
4183
- }
4184
- }
4185
- function resolve(registry, name) {
4186
- return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);
4187
- }
4188
-
4189
4189
  function renderList(source, renderItem, cache, index) {
4190
4190
  let ret;
4191
4191
  const cached = cache && cache[index];
@@ -6001,15 +6001,15 @@ If you want to remount the same app, move your app creation logic into a factory
6001
6001
  }
6002
6002
  break;
6003
6003
  case Comment:
6004
- if (domType !== 8 /* COMMENT */ || isFragmentStart) {
6005
- if (node.tagName.toLowerCase() === "template") {
6006
- const content = vnode.el.content.firstChild;
6007
- replaceNode(content, node, parentComponent);
6008
- vnode.el = node = content;
6009
- nextNode = nextSibling(node);
6010
- } else {
6011
- nextNode = onMismatch();
6012
- }
6004
+ if (isTemplateNode(node)) {
6005
+ nextNode = nextSibling(node);
6006
+ replaceNode(
6007
+ vnode.el = node.content.firstChild,
6008
+ node,
6009
+ parentComponent
6010
+ );
6011
+ } else if (domType !== 8 /* COMMENT */ || isFragmentStart) {
6012
+ nextNode = onMismatch();
6013
6013
  } else {
6014
6014
  nextNode = nextSibling(node);
6015
6015
  }
@@ -6353,8 +6353,7 @@ If you want to remount the same app, move your app creation logic into a factory
6353
6353
  let parent = parentComponent;
6354
6354
  while (parent) {
6355
6355
  if (parent.vnode.el === oldNode) {
6356
- parent.vnode.el = newNode;
6357
- parent.subTree.el = newNode;
6356
+ parent.vnode.el = parent.subTree.el = newNode;
6358
6357
  }
6359
6358
  parent = parent.parent;
6360
6359
  }
@@ -9134,7 +9133,7 @@ Component that was made reactive: `,
9134
9133
  return true;
9135
9134
  }
9136
9135
 
9137
- const version = "3.3.7";
9136
+ const version = "3.3.8";
9138
9137
  const ssrUtils = null;
9139
9138
  const resolveFilter = null;
9140
9139
  const compatUtils = null;