@vue/compat 3.5.29 → 3.5.30

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.
package/dist/vue.cjs.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compat v3.5.29
2
+ * @vue/compat v3.5.30
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -1331,10 +1331,17 @@ function apply(self, method, fn, thisArg, wrappedRetFn, args) {
1331
1331
  }
1332
1332
  function reduce(self, method, fn, args) {
1333
1333
  const arr = shallowReadArray(self);
1334
+ const needsWrap = arr !== self && !isShallow(self);
1334
1335
  let wrappedFn = fn;
1336
+ let wrapInitialAccumulator = false;
1335
1337
  if (arr !== self) {
1336
- if (!isShallow(self)) {
1338
+ if (needsWrap) {
1339
+ wrapInitialAccumulator = args.length === 0;
1337
1340
  wrappedFn = function(acc, item, index) {
1341
+ if (wrapInitialAccumulator) {
1342
+ wrapInitialAccumulator = false;
1343
+ acc = toWrapped(self, acc);
1344
+ }
1338
1345
  return fn.call(this, acc, toWrapped(self, item), index, self);
1339
1346
  };
1340
1347
  } else if (fn.length > 3) {
@@ -1343,7 +1350,8 @@ function reduce(self, method, fn, args) {
1343
1350
  };
1344
1351
  }
1345
1352
  }
1346
- return arr[method](wrappedFn, ...args);
1353
+ const result = arr[method](wrappedFn, ...args);
1354
+ return wrapInitialAccumulator ? toWrapped(self, result) : result;
1347
1355
  }
1348
1356
  function searchProxy(self, method, args) {
1349
1357
  const arr = toRaw(self);
@@ -1633,15 +1641,14 @@ function createInstrumentations(readonly, shallow) {
1633
1641
  clear: createReadonlyMethod("clear")
1634
1642
  } : {
1635
1643
  add(value) {
1636
- if (!shallow && !isShallow(value) && !isReadonly(value)) {
1637
- value = toRaw(value);
1638
- }
1639
1644
  const target = toRaw(this);
1640
1645
  const proto = getProto(target);
1641
- const hadKey = proto.has.call(target, value);
1646
+ const rawValue = toRaw(value);
1647
+ const valueToAdd = !shallow && !isShallow(value) && !isReadonly(value) ? rawValue : value;
1648
+ const hadKey = proto.has.call(target, valueToAdd) || hasChanged(value, valueToAdd) && proto.has.call(target, value) || hasChanged(rawValue, valueToAdd) && proto.has.call(target, rawValue);
1642
1649
  if (!hadKey) {
1643
- target.add(value);
1644
- trigger(target, "add", value, value);
1650
+ target.add(valueToAdd);
1651
+ trigger(target, "add", valueToAdd, valueToAdd);
1645
1652
  }
1646
1653
  return this;
1647
1654
  },
@@ -6284,12 +6291,16 @@ function renderList(source, renderItem, cache, index) {
6284
6291
  );
6285
6292
  }
6286
6293
  } else if (typeof source === "number") {
6287
- if (!Number.isInteger(source)) {
6288
- warn$1(`The v-for range expect an integer value but got ${source}.`);
6289
- }
6290
- ret = new Array(source);
6291
- for (let i = 0; i < source; i++) {
6292
- ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);
6294
+ if (!Number.isInteger(source) || source < 0) {
6295
+ warn$1(
6296
+ `The v-for range expects a positive integer value but got ${source}.`
6297
+ );
6298
+ ret = [];
6299
+ } else {
6300
+ ret = new Array(source);
6301
+ for (let i = 0; i < source; i++) {
6302
+ ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);
6303
+ }
6293
6304
  }
6294
6305
  } else if (isObject(source)) {
6295
6306
  if (source[Symbol.iterator]) {
@@ -6992,6 +7003,7 @@ function createPropsRestProxy(props, excludedKeys) {
6992
7003
  }
6993
7004
  function withAsyncContext(getAwaitable) {
6994
7005
  const ctx = getCurrentInstance();
7006
+ const inSSRSetup = isInSSRComponentSetup;
6995
7007
  if (!ctx) {
6996
7008
  warn$1(
6997
7009
  `withAsyncContext called without active current instance. This is likely a bug.`
@@ -6999,13 +7011,25 @@ function withAsyncContext(getAwaitable) {
6999
7011
  }
7000
7012
  let awaitable = getAwaitable();
7001
7013
  unsetCurrentInstance();
7014
+ if (inSSRSetup) {
7015
+ setInSSRSetupState(false);
7016
+ }
7017
+ const restore = () => {
7018
+ setCurrentInstance(ctx);
7019
+ if (inSSRSetup) {
7020
+ setInSSRSetupState(true);
7021
+ }
7022
+ };
7002
7023
  const cleanup = () => {
7003
7024
  if (getCurrentInstance() !== ctx) ctx.scope.off();
7004
7025
  unsetCurrentInstance();
7026
+ if (inSSRSetup) {
7027
+ setInSSRSetupState(false);
7028
+ }
7005
7029
  };
7006
7030
  if (isPromise(awaitable)) {
7007
7031
  awaitable = awaitable.catch((e) => {
7008
- setCurrentInstance(ctx);
7032
+ restore();
7009
7033
  Promise.resolve().then(() => Promise.resolve().then(cleanup));
7010
7034
  throw e;
7011
7035
  });
@@ -7013,7 +7037,7 @@ function withAsyncContext(getAwaitable) {
7013
7037
  return [
7014
7038
  awaitable,
7015
7039
  () => {
7016
- setCurrentInstance(ctx);
7040
+ restore();
7017
7041
  Promise.resolve().then(cleanup);
7018
7042
  }
7019
7043
  ];
@@ -7537,7 +7561,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
7537
7561
  return vm;
7538
7562
  }
7539
7563
  }
7540
- Vue.version = `2.6.14-compat:${"3.5.29"}`;
7564
+ Vue.version = `2.6.14-compat:${"3.5.30"}`;
7541
7565
  Vue.config = singletonApp.config;
7542
7566
  Vue.use = (plugin, ...options) => {
7543
7567
  if (plugin && isFunction(plugin.install)) {
@@ -10034,7 +10058,10 @@ function baseCreateRenderer(options, createHydrationFns) {
10034
10058
  }
10035
10059
  } else {
10036
10060
  if (root.ce && root.ce._hasShadowRoot()) {
10037
- root.ce._injectChildStyle(type);
10061
+ root.ce._injectChildStyle(
10062
+ type,
10063
+ instance.parent ? instance.parent.type : void 0
10064
+ );
10038
10065
  }
10039
10066
  {
10040
10067
  startMeasure(instance, `render`);
@@ -12625,7 +12652,7 @@ function isMemoSame(cached, memo) {
12625
12652
  return true;
12626
12653
  }
12627
12654
 
12628
- const version = "3.5.29";
12655
+ const version = "3.5.30";
12629
12656
  const warn = warn$1 ;
12630
12657
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
12631
12658
  const devtools = devtools$1 ;
@@ -13442,7 +13469,9 @@ const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) =>
13442
13469
  }
13443
13470
  } else if (
13444
13471
  // #11081 force set props for possible async custom element
13445
- el._isVueCE && (/[A-Z]/.test(key) || !isString(nextValue))
13472
+ el._isVueCE && // #12408 check if it's declared prop or it's async custom element
13473
+ (shouldSetAsPropForVueCE(el, key) || // @ts-expect-error _def is private
13474
+ el._def.__asyncLoader && (/[A-Z]/.test(key) || !isString(nextValue)))
13446
13475
  ) {
13447
13476
  patchDOMProp(el, camelize(key), nextValue, parentComponent, key);
13448
13477
  } else {
@@ -13490,6 +13519,17 @@ function shouldSetAsProp(el, key, value, isSVG) {
13490
13519
  }
13491
13520
  return key in el;
13492
13521
  }
13522
+ function shouldSetAsPropForVueCE(el, key) {
13523
+ const props = (
13524
+ // @ts-expect-error _def is private
13525
+ el._def.props
13526
+ );
13527
+ if (!props) {
13528
+ return false;
13529
+ }
13530
+ const camelKey = camelize(key);
13531
+ return Array.isArray(props) ? props.some((prop) => camelize(prop) === camelKey) : Object.keys(props).some((prop) => camelize(prop) === camelKey);
13532
+ }
13493
13533
 
13494
13534
  const REMOVAL = {};
13495
13535
  // @__NO_SIDE_EFFECTS__
@@ -13534,6 +13574,7 @@ class VueElement extends BaseClass {
13534
13574
  this._dirty = false;
13535
13575
  this._numberProps = null;
13536
13576
  this._styleChildren = /* @__PURE__ */ new WeakSet();
13577
+ this._styleAnchors = /* @__PURE__ */ new WeakMap();
13537
13578
  this._ob = null;
13538
13579
  if (this.shadowRoot && _createApp !== createApp) {
13539
13580
  this._root = this.shadowRoot;
@@ -13562,7 +13603,8 @@ class VueElement extends BaseClass {
13562
13603
  }
13563
13604
  this._connected = true;
13564
13605
  let parent = this;
13565
- while (parent = parent && (parent.parentNode || parent.host)) {
13606
+ while (parent = parent && // #12479 should check assignedSlot first to get correct parent
13607
+ (parent.assignedSlot || parent.parentNode || parent.host)) {
13566
13608
  if (parent instanceof VueElement) {
13567
13609
  this._parent = parent;
13568
13610
  break;
@@ -13784,6 +13826,7 @@ class VueElement extends BaseClass {
13784
13826
  this._styles.forEach((s) => this._root.removeChild(s));
13785
13827
  this._styles.length = 0;
13786
13828
  }
13829
+ this._styleAnchors.delete(this._def);
13787
13830
  this._applyStyles(newStyles);
13788
13831
  this._instance = null;
13789
13832
  this._update();
@@ -13808,7 +13851,7 @@ class VueElement extends BaseClass {
13808
13851
  }
13809
13852
  return vnode;
13810
13853
  }
13811
- _applyStyles(styles, owner) {
13854
+ _applyStyles(styles, owner, parentComp) {
13812
13855
  if (!styles) return;
13813
13856
  if (owner) {
13814
13857
  if (owner === this._def || this._styleChildren.has(owner)) {
@@ -13817,11 +13860,19 @@ class VueElement extends BaseClass {
13817
13860
  this._styleChildren.add(owner);
13818
13861
  }
13819
13862
  const nonce = this._nonce;
13863
+ const root = this.shadowRoot;
13864
+ const insertionAnchor = parentComp ? this._getStyleAnchor(parentComp) || this._getStyleAnchor(this._def) : this._getRootStyleInsertionAnchor(root);
13865
+ let last = null;
13820
13866
  for (let i = styles.length - 1; i >= 0; i--) {
13821
13867
  const s = document.createElement("style");
13822
13868
  if (nonce) s.setAttribute("nonce", nonce);
13823
13869
  s.textContent = styles[i];
13824
- this.shadowRoot.prepend(s);
13870
+ root.insertBefore(s, last || insertionAnchor);
13871
+ last = s;
13872
+ if (i === 0) {
13873
+ if (!parentComp) this._styleAnchors.set(this._def, s);
13874
+ if (owner) this._styleAnchors.set(owner, s);
13875
+ }
13825
13876
  {
13826
13877
  if (owner) {
13827
13878
  if (owner.__hmrId) {
@@ -13838,6 +13889,28 @@ class VueElement extends BaseClass {
13838
13889
  }
13839
13890
  }
13840
13891
  }
13892
+ _getStyleAnchor(comp) {
13893
+ if (!comp) {
13894
+ return null;
13895
+ }
13896
+ const anchor = this._styleAnchors.get(comp);
13897
+ if (anchor && anchor.parentNode === this.shadowRoot) {
13898
+ return anchor;
13899
+ }
13900
+ if (anchor) {
13901
+ this._styleAnchors.delete(comp);
13902
+ }
13903
+ return null;
13904
+ }
13905
+ _getRootStyleInsertionAnchor(root) {
13906
+ for (let i = 0; i < root.childNodes.length; i++) {
13907
+ const node = root.childNodes[i];
13908
+ if (!(node instanceof HTMLStyleElement)) {
13909
+ return node;
13910
+ }
13911
+ }
13912
+ return null;
13913
+ }
13841
13914
  /**
13842
13915
  * Only called when shadowRoot is false
13843
13916
  */
@@ -13900,8 +13973,8 @@ class VueElement extends BaseClass {
13900
13973
  /**
13901
13974
  * @internal
13902
13975
  */
13903
- _injectChildStyle(comp) {
13904
- this._applyStyles(comp.styles, comp);
13976
+ _injectChildStyle(comp, parentComp) {
13977
+ this._applyStyles(comp.styles, comp, parentComp);
13905
13978
  }
13906
13979
  /**
13907
13980
  * @internal
@@ -13931,6 +14004,7 @@ class VueElement extends BaseClass {
13931
14004
  _removeChildStyle(comp) {
13932
14005
  {
13933
14006
  this._styleChildren.delete(comp);
14007
+ this._styleAnchors.delete(comp);
13934
14008
  if (this._childStyles && comp.__hmrId) {
13935
14009
  const oldStyles = this._childStyles.get(comp.__hmrId);
13936
14010
  if (oldStyles) {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compat v3.5.29
2
+ * @vue/compat v3.5.30
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -1176,10 +1176,17 @@ function apply(self, method, fn, thisArg, wrappedRetFn, args) {
1176
1176
  }
1177
1177
  function reduce(self, method, fn, args) {
1178
1178
  const arr = shallowReadArray(self);
1179
+ const needsWrap = arr !== self && !isShallow(self);
1179
1180
  let wrappedFn = fn;
1181
+ let wrapInitialAccumulator = false;
1180
1182
  if (arr !== self) {
1181
- if (!isShallow(self)) {
1183
+ if (needsWrap) {
1184
+ wrapInitialAccumulator = args.length === 0;
1182
1185
  wrappedFn = function(acc, item, index) {
1186
+ if (wrapInitialAccumulator) {
1187
+ wrapInitialAccumulator = false;
1188
+ acc = toWrapped(self, acc);
1189
+ }
1183
1190
  return fn.call(this, acc, toWrapped(self, item), index, self);
1184
1191
  };
1185
1192
  } else if (fn.length > 3) {
@@ -1188,7 +1195,8 @@ function reduce(self, method, fn, args) {
1188
1195
  };
1189
1196
  }
1190
1197
  }
1191
- return arr[method](wrappedFn, ...args);
1198
+ const result = arr[method](wrappedFn, ...args);
1199
+ return wrapInitialAccumulator ? toWrapped(self, result) : result;
1192
1200
  }
1193
1201
  function searchProxy(self, method, args) {
1194
1202
  const arr = toRaw(self);
@@ -1453,15 +1461,14 @@ function createInstrumentations(readonly, shallow) {
1453
1461
  clear: createReadonlyMethod("clear")
1454
1462
  } : {
1455
1463
  add(value) {
1456
- if (!shallow && !isShallow(value) && !isReadonly(value)) {
1457
- value = toRaw(value);
1458
- }
1459
1464
  const target = toRaw(this);
1460
1465
  const proto = getProto(target);
1461
- const hadKey = proto.has.call(target, value);
1466
+ const rawValue = toRaw(value);
1467
+ const valueToAdd = !shallow && !isShallow(value) && !isReadonly(value) ? rawValue : value;
1468
+ const hadKey = proto.has.call(target, valueToAdd) || hasChanged(value, valueToAdd) && proto.has.call(target, value) || hasChanged(rawValue, valueToAdd) && proto.has.call(target, rawValue);
1462
1469
  if (!hadKey) {
1463
- target.add(value);
1464
- trigger(target, "add", value, value);
1470
+ target.add(valueToAdd);
1471
+ trigger(target, "add", valueToAdd, valueToAdd);
1465
1472
  }
1466
1473
  return this;
1467
1474
  },
@@ -5062,9 +5069,11 @@ function renderList(source, renderItem, cache, index) {
5062
5069
  );
5063
5070
  }
5064
5071
  } else if (typeof source === "number") {
5065
- ret = new Array(source);
5066
- for (let i = 0; i < source; i++) {
5067
- ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);
5072
+ {
5073
+ ret = new Array(source);
5074
+ for (let i = 0; i < source; i++) {
5075
+ ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);
5076
+ }
5068
5077
  }
5069
5078
  } else if (isObject(source)) {
5070
5079
  if (source[Symbol.iterator]) {
@@ -5616,15 +5625,28 @@ function createPropsRestProxy(props, excludedKeys) {
5616
5625
  }
5617
5626
  function withAsyncContext(getAwaitable) {
5618
5627
  const ctx = getCurrentInstance();
5628
+ const inSSRSetup = isInSSRComponentSetup;
5619
5629
  let awaitable = getAwaitable();
5620
5630
  unsetCurrentInstance();
5631
+ if (inSSRSetup) {
5632
+ setInSSRSetupState(false);
5633
+ }
5634
+ const restore = () => {
5635
+ setCurrentInstance(ctx);
5636
+ if (inSSRSetup) {
5637
+ setInSSRSetupState(true);
5638
+ }
5639
+ };
5621
5640
  const cleanup = () => {
5622
5641
  if (getCurrentInstance() !== ctx) ctx.scope.off();
5623
5642
  unsetCurrentInstance();
5643
+ if (inSSRSetup) {
5644
+ setInSSRSetupState(false);
5645
+ }
5624
5646
  };
5625
5647
  if (isPromise(awaitable)) {
5626
5648
  awaitable = awaitable.catch((e) => {
5627
- setCurrentInstance(ctx);
5649
+ restore();
5628
5650
  Promise.resolve().then(() => Promise.resolve().then(cleanup));
5629
5651
  throw e;
5630
5652
  });
@@ -5632,7 +5654,7 @@ function withAsyncContext(getAwaitable) {
5632
5654
  return [
5633
5655
  awaitable,
5634
5656
  () => {
5635
- setCurrentInstance(ctx);
5657
+ restore();
5636
5658
  Promise.resolve().then(cleanup);
5637
5659
  }
5638
5660
  ];
@@ -6053,7 +6075,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
6053
6075
  return vm;
6054
6076
  }
6055
6077
  }
6056
- Vue.version = `2.6.14-compat:${"3.5.29"}`;
6078
+ Vue.version = `2.6.14-compat:${"3.5.30"}`;
6057
6079
  Vue.config = singletonApp.config;
6058
6080
  Vue.use = (plugin, ...options) => {
6059
6081
  if (plugin && isFunction(plugin.install)) {
@@ -8027,7 +8049,10 @@ function baseCreateRenderer(options, createHydrationFns) {
8027
8049
  }
8028
8050
  } else {
8029
8051
  if (root.ce && root.ce._hasShadowRoot()) {
8030
- root.ce._injectChildStyle(type);
8052
+ root.ce._injectChildStyle(
8053
+ type,
8054
+ instance.parent ? instance.parent.type : void 0
8055
+ );
8031
8056
  }
8032
8057
  const subTree = instance.subTree = renderComponentRoot(instance);
8033
8058
  patch(
@@ -10165,7 +10190,7 @@ function isMemoSame(cached, memo) {
10165
10190
  return true;
10166
10191
  }
10167
10192
 
10168
- const version = "3.5.29";
10193
+ const version = "3.5.30";
10169
10194
  const warn$1 = NOOP;
10170
10195
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
10171
10196
  const devtools = void 0;
@@ -10949,7 +10974,9 @@ const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) =>
10949
10974
  }
10950
10975
  } else if (
10951
10976
  // #11081 force set props for possible async custom element
10952
- el._isVueCE && (/[A-Z]/.test(key) || !isString(nextValue))
10977
+ el._isVueCE && // #12408 check if it's declared prop or it's async custom element
10978
+ (shouldSetAsPropForVueCE(el, key) || // @ts-expect-error _def is private
10979
+ el._def.__asyncLoader && (/[A-Z]/.test(key) || !isString(nextValue)))
10953
10980
  ) {
10954
10981
  patchDOMProp(el, camelize(key), nextValue, parentComponent, key);
10955
10982
  } else {
@@ -10997,6 +11024,17 @@ function shouldSetAsProp(el, key, value, isSVG) {
10997
11024
  }
10998
11025
  return key in el;
10999
11026
  }
11027
+ function shouldSetAsPropForVueCE(el, key) {
11028
+ const props = (
11029
+ // @ts-expect-error _def is private
11030
+ el._def.props
11031
+ );
11032
+ if (!props) {
11033
+ return false;
11034
+ }
11035
+ const camelKey = camelize(key);
11036
+ return Array.isArray(props) ? props.some((prop) => camelize(prop) === camelKey) : Object.keys(props).some((prop) => camelize(prop) === camelKey);
11037
+ }
11000
11038
 
11001
11039
  const REMOVAL = {};
11002
11040
  // @__NO_SIDE_EFFECTS__
@@ -11041,6 +11079,7 @@ class VueElement extends BaseClass {
11041
11079
  this._dirty = false;
11042
11080
  this._numberProps = null;
11043
11081
  this._styleChildren = /* @__PURE__ */ new WeakSet();
11082
+ this._styleAnchors = /* @__PURE__ */ new WeakMap();
11044
11083
  this._ob = null;
11045
11084
  if (this.shadowRoot && _createApp !== createApp) {
11046
11085
  this._root = this.shadowRoot;
@@ -11064,7 +11103,8 @@ class VueElement extends BaseClass {
11064
11103
  }
11065
11104
  this._connected = true;
11066
11105
  let parent = this;
11067
- while (parent = parent && (parent.parentNode || parent.host)) {
11106
+ while (parent = parent && // #12479 should check assignedSlot first to get correct parent
11107
+ (parent.assignedSlot || parent.parentNode || parent.host)) {
11068
11108
  if (parent instanceof VueElement) {
11069
11109
  this._parent = parent;
11070
11110
  break;
@@ -11290,7 +11330,7 @@ class VueElement extends BaseClass {
11290
11330
  }
11291
11331
  return vnode;
11292
11332
  }
11293
- _applyStyles(styles, owner) {
11333
+ _applyStyles(styles, owner, parentComp) {
11294
11334
  if (!styles) return;
11295
11335
  if (owner) {
11296
11336
  if (owner === this._def || this._styleChildren.has(owner)) {
@@ -11299,12 +11339,42 @@ class VueElement extends BaseClass {
11299
11339
  this._styleChildren.add(owner);
11300
11340
  }
11301
11341
  const nonce = this._nonce;
11342
+ const root = this.shadowRoot;
11343
+ const insertionAnchor = parentComp ? this._getStyleAnchor(parentComp) || this._getStyleAnchor(this._def) : this._getRootStyleInsertionAnchor(root);
11344
+ let last = null;
11302
11345
  for (let i = styles.length - 1; i >= 0; i--) {
11303
11346
  const s = document.createElement("style");
11304
11347
  if (nonce) s.setAttribute("nonce", nonce);
11305
11348
  s.textContent = styles[i];
11306
- this.shadowRoot.prepend(s);
11349
+ root.insertBefore(s, last || insertionAnchor);
11350
+ last = s;
11351
+ if (i === 0) {
11352
+ if (!parentComp) this._styleAnchors.set(this._def, s);
11353
+ if (owner) this._styleAnchors.set(owner, s);
11354
+ }
11355
+ }
11356
+ }
11357
+ _getStyleAnchor(comp) {
11358
+ if (!comp) {
11359
+ return null;
11360
+ }
11361
+ const anchor = this._styleAnchors.get(comp);
11362
+ if (anchor && anchor.parentNode === this.shadowRoot) {
11363
+ return anchor;
11307
11364
  }
11365
+ if (anchor) {
11366
+ this._styleAnchors.delete(comp);
11367
+ }
11368
+ return null;
11369
+ }
11370
+ _getRootStyleInsertionAnchor(root) {
11371
+ for (let i = 0; i < root.childNodes.length; i++) {
11372
+ const node = root.childNodes[i];
11373
+ if (!(node instanceof HTMLStyleElement)) {
11374
+ return node;
11375
+ }
11376
+ }
11377
+ return null;
11308
11378
  }
11309
11379
  /**
11310
11380
  * Only called when shadowRoot is false
@@ -11368,8 +11438,8 @@ class VueElement extends BaseClass {
11368
11438
  /**
11369
11439
  * @internal
11370
11440
  */
11371
- _injectChildStyle(comp) {
11372
- this._applyStyles(comp.styles, comp);
11441
+ _injectChildStyle(comp, parentComp) {
11442
+ this._applyStyles(comp.styles, comp, parentComp);
11373
11443
  }
11374
11444
  /**
11375
11445
  * @internal