minimal-piral 1.8.0-beta.7721 → 1.8.0-beta.7739

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.
@@ -41931,12 +41931,12 @@ function installPiralDebug(options) {
41931
41931
  debug: debugApiVersion,
41932
41932
  instance: {
41933
41933
  name: "minimal-piral",
41934
- version: "1.8.0-beta.7721",
41934
+ version: "1.8.0-beta.7739",
41935
41935
  dependencies: "tslib,react,react-dom,react-router,react-router-dom"
41936
41936
  },
41937
41937
  build: {
41938
- date: "2024-12-27T00:20:22.047Z",
41939
- cli: "1.8.0-beta.7721",
41938
+ date: "2025-01-13T17:09:12.796Z",
41939
+ cli: "1.8.0-beta.7739",
41940
41940
  compat: "1"
41941
41941
  }
41942
41942
  };
@@ -42463,6 +42463,10 @@ if (typeof window !== 'undefined' && 'customElements' in window) {
42463
42463
  _this.close();
42464
42464
  }
42465
42465
  };
42466
+ _this.closeOnReload = function () {
42467
+ return _this.close();
42468
+ };
42469
+ window.addEventListener('pilets-reloaded', _this.closeOnReload);
42466
42470
  document.addEventListener('keydown', _this.closeOnEsc);
42467
42471
  return _this;
42468
42472
  }
@@ -42502,6 +42506,7 @@ if (typeof window !== 'undefined' && 'customElements' in window) {
42502
42506
  value: function close() {
42503
42507
  var _this$parentNode;
42504
42508
  (_this$parentNode = this.parentNode) === null || _this$parentNode === void 0 || _this$parentNode.removeChild(this);
42509
+ window.removeEventListener('pilets-reloaded', this.closeOnReload);
42505
42510
  document.removeEventListener('keydown', this.closeOnEsc);
42506
42511
  }
42507
42512
  }]);
@@ -42525,18 +42530,14 @@ __webpack_require__.r(__webpack_exports__);
42525
42530
  /* harmony export */ });
42526
42531
  var debugRouteCache = {
42527
42532
  active: 0,
42528
- paths: [],
42529
- refresh: undefined
42533
+ paths: []
42530
42534
  };
42531
42535
  function freezeRouteRefresh() {
42532
42536
  debugRouteCache.active++;
42533
42537
  return function () {
42534
42538
  debugRouteCache.active--;
42535
42539
  if (!debugRouteCache.active) {
42536
- var _debugRouteCache$refr;
42537
- (_debugRouteCache$refr = debugRouteCache.refresh) === null || _debugRouteCache$refr === void 0 || _debugRouteCache$refr.call(debugRouteCache, function (s) {
42538
- return s + 1;
42539
- });
42540
+ window.dispatchEvent(new CustomEvent('pilets-reloaded'));
42540
42541
  }
42541
42542
  };
42542
42543
  }
@@ -42667,9 +42668,14 @@ function useDebugRouteFilter(paths) {
42667
42668
  _ = _useState2[0],
42668
42669
  triggerChange = _useState2[1];
42669
42670
  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
42670
- _routeRefresh__WEBPACK_IMPORTED_MODULE_1__.debugRouteCache.refresh = triggerChange;
42671
+ var handler = function handler() {
42672
+ triggerChange(function (s) {
42673
+ return s + 1;
42674
+ });
42675
+ };
42676
+ window.addEventListener('pilets-reloaded', handler);
42671
42677
  return function () {
42672
- _routeRefresh__WEBPACK_IMPORTED_MODULE_1__.debugRouteCache.refresh = undefined;
42678
+ window.removeEventListener('pilets-reloaded', handler);
42673
42679
  };
42674
42680
  }, []);
42675
42681
  if (!_routeRefresh__WEBPACK_IMPORTED_MODULE_1__.debugRouteCache.active) {
@@ -45137,4 +45143,4 @@ var instance = (0,piral_core__WEBPACK_IMPORTED_MODULE_2__.createInstance)({
45137
45143
 
45138
45144
  /******/ })()
45139
45145
  ;
45140
- //# sourceMappingURL=index.b823af.js.map
45146
+ //# sourceMappingURL=index.c19544.js.map