@next-core/brick-kit 2.153.0 → 2.153.2

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/index.esm.js CHANGED
@@ -3557,6 +3557,10 @@ function matchStoryboard(storyboards, pathname) {
3557
3557
  */
3558
3558
 
3559
3559
  function isOutsideApp(storyboard) {
3560
+ if (process.env.NODE_ENV === "test") {
3561
+ return false;
3562
+ }
3563
+
3560
3564
  return !storyboard || !window.STANDALONE_MICRO_APPS && storyboard.app.standaloneMode;
3561
3565
  }
3562
3566
 
@@ -3934,6 +3938,10 @@ function _internalApiGetCurrentContext() {
3934
3938
  /* istanbul ignore next */
3935
3939
 
3936
3940
  function _internalApiMatchStoryboard(pathname) {
3941
+ if (process.env.NODE_ENV === "test") {
3942
+ return;
3943
+ }
3944
+
3937
3945
  return matchStoryboard(kernel.bootstrapData.storyboards, pathname);
3938
3946
  }
3939
3947
  /* istanbul ignore next */
@@ -12513,17 +12521,20 @@ class Router {
12513
12521
  route_alias: route === null || route === void 0 ? void 0 : route.alias
12514
12522
  }, analyticsData));
12515
12523
  _this3.state = "mounted";
12516
- devtoolsHookEmit("rendered"); // Try to prefetch during a browser's idle periods.
12517
- // https://developer.mozilla.org/en-US/docs/Web/API/Window/requestIdleCallback
12518
-
12519
- if (typeof window.requestIdleCallback === "function") {
12520
- window.requestIdleCallback(() => {
12521
- _this3.kernel.prefetchDepsOfStoryboard(storyboard);
12522
- });
12523
- } else {
12524
- setTimeout(() => {
12525
- _this3.kernel.prefetchDepsOfStoryboard(storyboard);
12526
- }, 0);
12524
+ devtoolsHookEmit("rendered");
12525
+
12526
+ if (!_this3.featureFlags["disable-prefetch-scripts"]) {
12527
+ // Try to prefetch during a browser's idle periods.
12528
+ // https://developer.mozilla.org/en-US/docs/Web/API/Window/requestIdleCallback
12529
+ if (typeof window.requestIdleCallback === "function") {
12530
+ window.requestIdleCallback(() => {
12531
+ _this3.kernel.prefetchDepsOfStoryboard(storyboard);
12532
+ });
12533
+ } else {
12534
+ setTimeout(() => {
12535
+ _this3.kernel.prefetchDepsOfStoryboard(storyboard);
12536
+ }, 0);
12537
+ }
12527
12538
  }
12528
12539
 
12529
12540
  return;