@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.
@@ -271,7 +271,7 @@ interface AriaAttributes {
271
271
  * Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.
272
272
  * @see aria-atomic.
273
273
  */
274
- 'aria-relevant'?: 'additions' | 'additions text' | 'all' | 'removals' | 'text';
274
+ 'aria-relevant'?: 'additions' | 'additions removals' | 'additions text' | 'all' | 'removals' | 'removals additions' | 'removals text' | 'text' | 'text additions' | 'text removals';
275
275
  /** Indicates that user input is required on the element before a form may be submitted. */
276
276
  'aria-required'?: Booleanish;
277
277
  /** Defines a human-readable, author-localized description for the role of an element. */
@@ -2444,6 +2444,61 @@ function updateHOCHostEl({ vnode, parent }, el) {
2444
2444
  }
2445
2445
  }
2446
2446
 
2447
+ const COMPONENTS = "components";
2448
+ const DIRECTIVES = "directives";
2449
+ function resolveComponent(name, maybeSelfReference) {
2450
+ return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
2451
+ }
2452
+ const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
2453
+ function resolveDynamicComponent(component) {
2454
+ if (isString(component)) {
2455
+ return resolveAsset(COMPONENTS, component, false) || component;
2456
+ } else {
2457
+ return component || NULL_DYNAMIC_COMPONENT;
2458
+ }
2459
+ }
2460
+ function resolveDirective(name) {
2461
+ return resolveAsset(DIRECTIVES, name);
2462
+ }
2463
+ function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {
2464
+ const instance = currentRenderingInstance || currentInstance;
2465
+ if (instance) {
2466
+ const Component = instance.type;
2467
+ if (type === COMPONENTS) {
2468
+ const selfName = getComponentName(
2469
+ Component,
2470
+ false
2471
+ /* do not include inferred name to avoid breaking existing code */
2472
+ );
2473
+ if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {
2474
+ return Component;
2475
+ }
2476
+ }
2477
+ const res = (
2478
+ // local registration
2479
+ // check instance[type] first which is resolved for options API
2480
+ resolve(instance[type] || Component[type], name) || // global registration
2481
+ resolve(instance.appContext[type], name)
2482
+ );
2483
+ if (!res && maybeSelfReference) {
2484
+ return Component;
2485
+ }
2486
+ if (warnMissing && !res) {
2487
+ const extra = type === COMPONENTS ? `
2488
+ If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;
2489
+ warn(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
2490
+ }
2491
+ return res;
2492
+ } else {
2493
+ warn(
2494
+ `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`
2495
+ );
2496
+ }
2497
+ }
2498
+ function resolve(registry, name) {
2499
+ return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);
2500
+ }
2501
+
2447
2502
  const isSuspense = (type) => type.__isSuspense;
2448
2503
  const SuspenseImpl = {
2449
2504
  name: "Suspense",
@@ -2978,7 +3033,7 @@ function normalizeSuspenseSlot(s) {
2978
3033
  }
2979
3034
  if (isArray(s)) {
2980
3035
  const singleChild = filterSingleRoot(s);
2981
- if (!singleChild) {
3036
+ if (!singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) {
2982
3037
  warn(`<Suspense> slots expect a single root node.`);
2983
3038
  }
2984
3039
  s = singleChild;
@@ -4063,61 +4118,6 @@ function onErrorCaptured(hook, target = currentInstance) {
4063
4118
  injectHook("ec", hook, target);
4064
4119
  }
4065
4120
 
4066
- const COMPONENTS = "components";
4067
- const DIRECTIVES = "directives";
4068
- function resolveComponent(name, maybeSelfReference) {
4069
- return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
4070
- }
4071
- const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
4072
- function resolveDynamicComponent(component) {
4073
- if (isString(component)) {
4074
- return resolveAsset(COMPONENTS, component, false) || component;
4075
- } else {
4076
- return component || NULL_DYNAMIC_COMPONENT;
4077
- }
4078
- }
4079
- function resolveDirective(name) {
4080
- return resolveAsset(DIRECTIVES, name);
4081
- }
4082
- function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {
4083
- const instance = currentRenderingInstance || currentInstance;
4084
- if (instance) {
4085
- const Component = instance.type;
4086
- if (type === COMPONENTS) {
4087
- const selfName = getComponentName(
4088
- Component,
4089
- false
4090
- /* do not include inferred name to avoid breaking existing code */
4091
- );
4092
- if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {
4093
- return Component;
4094
- }
4095
- }
4096
- const res = (
4097
- // local registration
4098
- // check instance[type] first which is resolved for options API
4099
- resolve(instance[type] || Component[type], name) || // global registration
4100
- resolve(instance.appContext[type], name)
4101
- );
4102
- if (!res && maybeSelfReference) {
4103
- return Component;
4104
- }
4105
- if (warnMissing && !res) {
4106
- const extra = type === COMPONENTS ? `
4107
- If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;
4108
- warn(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
4109
- }
4110
- return res;
4111
- } else {
4112
- warn(
4113
- `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`
4114
- );
4115
- }
4116
- }
4117
- function resolve(registry, name) {
4118
- return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);
4119
- }
4120
-
4121
4121
  function renderList(source, renderItem, cache, index) {
4122
4122
  let ret;
4123
4123
  const cached = cache && cache[index];
@@ -5933,15 +5933,15 @@ function createHydrationFunctions(rendererInternals) {
5933
5933
  }
5934
5934
  break;
5935
5935
  case Comment:
5936
- if (domType !== 8 /* COMMENT */ || isFragmentStart) {
5937
- if (node.tagName.toLowerCase() === "template") {
5938
- const content = vnode.el.content.firstChild;
5939
- replaceNode(content, node, parentComponent);
5940
- vnode.el = node = content;
5941
- nextNode = nextSibling(node);
5942
- } else {
5943
- nextNode = onMismatch();
5944
- }
5936
+ if (isTemplateNode(node)) {
5937
+ nextNode = nextSibling(node);
5938
+ replaceNode(
5939
+ vnode.el = node.content.firstChild,
5940
+ node,
5941
+ parentComponent
5942
+ );
5943
+ } else if (domType !== 8 /* COMMENT */ || isFragmentStart) {
5944
+ nextNode = onMismatch();
5945
5945
  } else {
5946
5946
  nextNode = nextSibling(node);
5947
5947
  }
@@ -6285,8 +6285,7 @@ function createHydrationFunctions(rendererInternals) {
6285
6285
  let parent = parentComponent;
6286
6286
  while (parent) {
6287
6287
  if (parent.vnode.el === oldNode) {
6288
- parent.vnode.el = newNode;
6289
- parent.subTree.el = newNode;
6288
+ parent.vnode.el = parent.subTree.el = newNode;
6290
6289
  }
6291
6290
  parent = parent.parent;
6292
6291
  }
@@ -9072,7 +9071,7 @@ function isMemoSame(cached, memo) {
9072
9071
  return true;
9073
9072
  }
9074
9073
 
9075
- const version = "3.3.7";
9074
+ const version = "3.3.8";
9076
9075
  const ssrUtils = null;
9077
9076
  const resolveFilter = null;
9078
9077
  const compatUtils = null;