@lmjs/core 2.1.24 → 2.2.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.
package/src/ws.js CHANGED
@@ -992,16 +992,12 @@ function syncViewFiles() {
992
992
  } else if (nodes[0] == n) {
993
993
  renderView(nodes[0], null, View.props ?? {});
994
994
  } else {
995
- // 2026-09-22: force=true — this really is
996
- // the subview's own file content changing
997
- // (deepCompare already confirmed that,
998
- // above), so it must bypass renderView()'s
999
- // new "already mounted, skip" gate (added
1000
- // to stop updateVXRs() from rebuilding
1001
- // every subview on every unrelated render
1002
- // pass) or a hot-reloaded subview file
1003
- // would never actually refresh.
1004
- renderView(n, true, {}, 'views', undefined, undefined, true);
995
+ // A subview can be nested at any depth (a
996
+ // footer inside a guide sub-page), so
997
+ // searching one views[] list misses most of
998
+ // them. Re-rendering the current page mounts
999
+ // every subview fresh from the updated files.
1000
+ renderView(nodes[0], null, View.props ?? {});
1005
1001
  }
1006
1002
  }
1007
1003
  }
@@ -1036,23 +1032,15 @@ function syncViewFiles() {
1036
1032
  }
1037
1033
  }
1038
1034
  }
1039
- // for (var key in tpls) {
1040
- // if (_ovcD['tpls'].hasOwnProperty(key)) {
1041
- // if (!deepCompare(_ovcD['tpls'][key], tpls[key])) {
1042
- // cl("Changed the " + "tpl " + atob(key));
1043
- // _ovcD['tpls'][key] = tpls[key];
1044
- // let n = atob(key)
1045
- // .split("src/tpls/")
1046
- // .join("")
1047
- // .split(".tpl")
1048
- // .join("");
1049
- // $('[tpl="' + n + '"]')
1050
- // .removeData("_status")
1051
- // .removeData("_re");
1052
- // globalWatch();
1053
- // }
1054
- // }
1055
- // }
1035
+ // tpls/comps render inline in their host views, so any
1036
+ // template change means re-rendering the current page.
1037
+ let tpls = _files["tpls"] || {};
1038
+ let tplsChanged = !deepCompare(clone(_ovcD['tpls'] || {}), clone(tpls));
1039
+ if (tplsChanged) {
1040
+ _ovcD['tpls'] = tpls;
1041
+ let nodes = getURLNodes();
1042
+ renderView(nodes[0], null, View.props ?? {});
1043
+ }
1056
1044
  }
1057
1045
  });
1058
1046
  }