x-essential-lib 0.5.35 → 0.5.37

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.js CHANGED
@@ -214,15 +214,15 @@ async function Z(e, a, t) {
214
214
  n();
215
215
  });
216
216
  }
217
- function Ae(e) {
218
- var l, o;
217
+ function Ae(e, a) {
218
+ var o;
219
219
  if (!window.appAppear) {
220
220
  window.appAppear = !0;
221
221
  return;
222
222
  }
223
- const a = "single-spa-application:" + e, t = (l = document.getElementById(a)) == null ? void 0 : l.classList;
224
- t && (t.remove("app-left", "app-right", "app-reset"), (o = window.routeExtras) != null && o.forward ? t.add("app-right") : t.add("app-left"), setTimeout(() => {
225
- t.add("app-reset");
223
+ const t = "single-spa-application:" + e, l = (o = document.getElementById(t)) == null ? void 0 : o.classList;
224
+ l && (l.remove("app-left", "app-right", "app-reset"), a ? l.add("app-right") : l.add("app-left"), setTimeout(() => {
225
+ l.add("app-reset");
226
226
  }, 0));
227
227
  }
228
228
  let te = Date.now();
@@ -410,7 +410,7 @@ function D(e, a) {
410
410
  const l = z(e), o = z(a), n = (l == null ? void 0 : l.app) === (o == null ? void 0 : o.app), r = (l == null ? void 0 : l.path) === (o == null ? void 0 : o.path), c = ((l == null ? void 0 : l.level) ?? -1) >= ((o == null ? void 0 : o.level) ?? -1);
411
411
  console.info(
412
412
  `~~~~before route change~~~~ ${a} -> ${e} inner=${n} forward=${c}`
413
- ), n ? r ? oe.value = "" : oe.value = c ? "inner-left" : "inner-right" : (window.routeExtras = { forward: c }, o && Ae(o.app));
413
+ ), n ? r ? oe.value = "" : oe.value = c ? "inner-left" : "inner-right" : l && Ae(l.app, c);
414
414
  }
415
415
  function Ee() {
416
416
  return !!R.get("accessToken");
@@ -2,4 +2,4 @@ import { Emitter, EventType } from 'mitt';
2
2
  export declare const eventBus: Emitter<Record<EventType, unknown>>;
3
3
  export declare function waitMs(ms: number): Promise<void>;
4
4
  export declare function waitUtil(conditionFunc: () => boolean, timeout?: number, interval?: number): Promise<boolean>;
5
- export declare function appAppear(name: string): void;
5
+ export declare function appAppear(name: string, forward: boolean): void;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "x-essential-lib",
3
3
  "private": false,
4
- "version": "0.5.35",
4
+ "version": "0.5.37",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",