@lvce-editor/renderer-process 21.0.0 → 21.1.0

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.
@@ -730,13 +730,13 @@ const removeChild = ($Element, index) => {
730
730
  const $Child = $Element.children[index];
731
731
  $Child.remove();
732
732
  };
733
- const add$1 = ($Element, nodes) => {
734
- renderInternal($Element, nodes, {}, {});
733
+ const add$1 = ($Element, nodes, eventMap = {}) => {
734
+ renderInternal($Element, nodes, eventMap, eventMap);
735
735
  };
736
- const replace = ($Element, nodes) => {
736
+ const replace = ($Element, nodes, eventMap = {}) => {
737
737
  // Create a temporary container to render the new nodes
738
738
  const $Temp = document.createElement('div');
739
- renderInternal($Temp, nodes, {}, {});
739
+ renderInternal($Temp, nodes, eventMap, eventMap);
740
740
  // Replace the current element with the new ones
741
741
  const $NewElement = $Temp.firstElementChild;
742
742
  $Element.replaceWith($NewElement);
@@ -751,12 +751,12 @@ const NavigateChild = 7;
751
751
  const NavigateParent = 8;
752
752
  const RemoveChild = 9;
753
753
  const NavigateSibling = 10;
754
- const applyPatch = ($Element, patches) => {
754
+ const applyPatch = ($Element, patches, eventMap = {}) => {
755
755
  let $Current = $Element;
756
756
  for (const patch of patches) {
757
757
  switch (patch.type) {
758
758
  case Add:
759
- add$1($Current, patch.nodes);
759
+ add$1($Current, patch.nodes, eventMap);
760
760
  break;
761
761
  case NavigateChild:
762
762
  $Current = $Current.childNodes[patch.index];
@@ -774,7 +774,7 @@ const applyPatch = ($Element, patches) => {
774
774
  removeChild($Current, patch.index);
775
775
  break;
776
776
  case Replace:
777
- $Current = replace($Current, patch.nodes);
777
+ $Current = replace($Current, patch.nodes, eventMap);
778
778
  break;
779
779
  case SetAttribute:
780
780
  setAttribute($Current, patch.key, patch.value);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/renderer-process",
3
- "version": "21.0.0",
3
+ "version": "21.1.0",
4
4
  "keywords": [
5
5
  "lvce-editor",
6
6
  "renderer-process"