@vuact/runtime-dom 3.5.14-vuact.2 → 3.5.16-vuact.1

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vuact/runtime-dom v3.5.14
2
+ * @vuact/runtime-dom v3.5.16
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -822,13 +822,10 @@ class VueElement extends BaseClass {
822
822
  this._root = this;
823
823
  }
824
824
  }
825
- if (!this._def.__asyncLoader) {
826
- this._resolveProps(this._def);
827
- }
828
825
  }
829
826
  connectedCallback() {
830
827
  if (!this.isConnected) return;
831
- if (!this.shadowRoot) {
828
+ if (!this.shadowRoot && !this._resolved) {
832
829
  this._parseSlots();
833
830
  }
834
831
  this._connected = true;
@@ -841,8 +838,7 @@ class VueElement extends BaseClass {
841
838
  }
842
839
  if (!this._instance) {
843
840
  if (this._resolved) {
844
- this._setParent();
845
- this._update();
841
+ this._mount(this._def);
846
842
  } else {
847
843
  if (parent && parent._pendingResolve) {
848
844
  this._pendingResolve = parent._pendingResolve.then(() => {
@@ -858,7 +854,15 @@ class VueElement extends BaseClass {
858
854
  _setParent(parent = this._parent) {
859
855
  if (parent) {
860
856
  this._instance.parent = parent._instance;
861
- this._instance.provides = parent._instance.provides;
857
+ this._inheritParentContext(parent);
858
+ }
859
+ }
860
+ _inheritParentContext(parent = this._parent) {
861
+ if (parent && this._app) {
862
+ Object.setPrototypeOf(
863
+ this._app._context.provides,
864
+ parent._instance.provides
865
+ );
862
866
  }
863
867
  }
864
868
  disconnectedCallback() {
@@ -908,9 +912,7 @@ class VueElement extends BaseClass {
908
912
  }
909
913
  }
910
914
  this._numberProps = numberProps;
911
- if (isAsync) {
912
- this._resolveProps(def);
913
- }
915
+ this._resolveProps(def);
914
916
  if (this.shadowRoot) {
915
917
  this._applyStyles(styles);
916
918
  } else if (styles) {
@@ -934,6 +936,7 @@ class VueElement extends BaseClass {
934
936
  def.name = "VueElement";
935
937
  }
936
938
  this._app = this._createApp(def);
939
+ this._inheritParentContext();
937
940
  if (def.configureApp) {
938
941
  def.configureApp(this._app);
939
942
  }
@@ -1018,7 +1021,9 @@ class VueElement extends BaseClass {
1018
1021
  }
1019
1022
  }
1020
1023
  _update() {
1021
- render(this._createVNode(), this._root);
1024
+ const vnode = this._createVNode();
1025
+ if (this._app) vnode.appContext = this._app._context;
1026
+ render(vnode, this._root);
1022
1027
  }
1023
1028
  _createVNode() {
1024
1029
  const baseProps = {};
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vuact/runtime-dom v3.5.14
2
+ * @vuact/runtime-dom v3.5.16
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -786,13 +786,10 @@ class VueElement extends BaseClass {
786
786
  this._root = this;
787
787
  }
788
788
  }
789
- if (!this._def.__asyncLoader) {
790
- this._resolveProps(this._def);
791
- }
792
789
  }
793
790
  connectedCallback() {
794
791
  if (!this.isConnected) return;
795
- if (!this.shadowRoot) {
792
+ if (!this.shadowRoot && !this._resolved) {
796
793
  this._parseSlots();
797
794
  }
798
795
  this._connected = true;
@@ -805,8 +802,7 @@ class VueElement extends BaseClass {
805
802
  }
806
803
  if (!this._instance) {
807
804
  if (this._resolved) {
808
- this._setParent();
809
- this._update();
805
+ this._mount(this._def);
810
806
  } else {
811
807
  if (parent && parent._pendingResolve) {
812
808
  this._pendingResolve = parent._pendingResolve.then(() => {
@@ -822,7 +818,15 @@ class VueElement extends BaseClass {
822
818
  _setParent(parent = this._parent) {
823
819
  if (parent) {
824
820
  this._instance.parent = parent._instance;
825
- this._instance.provides = parent._instance.provides;
821
+ this._inheritParentContext(parent);
822
+ }
823
+ }
824
+ _inheritParentContext(parent = this._parent) {
825
+ if (parent && this._app) {
826
+ Object.setPrototypeOf(
827
+ this._app._context.provides,
828
+ parent._instance.provides
829
+ );
826
830
  }
827
831
  }
828
832
  disconnectedCallback() {
@@ -872,9 +876,7 @@ class VueElement extends BaseClass {
872
876
  }
873
877
  }
874
878
  this._numberProps = numberProps;
875
- if (isAsync) {
876
- this._resolveProps(def);
877
- }
879
+ this._resolveProps(def);
878
880
  if (this.shadowRoot) {
879
881
  this._applyStyles(styles);
880
882
  }
@@ -891,6 +893,7 @@ class VueElement extends BaseClass {
891
893
  }
892
894
  _mount(def) {
893
895
  this._app = this._createApp(def);
896
+ this._inheritParentContext();
894
897
  if (def.configureApp) {
895
898
  def.configureApp(this._app);
896
899
  }
@@ -973,7 +976,9 @@ class VueElement extends BaseClass {
973
976
  }
974
977
  }
975
978
  _update() {
976
- render(this._createVNode(), this._root);
979
+ const vnode = this._createVNode();
980
+ if (this._app) vnode.appContext = this._app._context;
981
+ render(vnode, this._root);
977
982
  }
978
983
  _createVNode() {
979
984
  const baseProps = {};