bt-core-app 2.0.210 → 2.0.212

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.
@@ -44841,31 +44841,31 @@ function Ise() {
44841
44841
  }
44842
44842
  function WU(e) {
44843
44843
  function t() {
44844
- const m = n.includes("Safari") && !n.includes("Chrome") && !n.includes("Edg"), f = n.includes("Macintosh") || n.includes("Windows");
44845
- return m && f;
44844
+ const g = n.includes("Safari") && !n.includes("Chrome") && !n.includes("Edg"), h = n.includes("Macintosh") || n.includes("Windows");
44845
+ return g && h;
44846
44846
  }
44847
44847
  function a() {
44848
44848
  return l(/iPhone|iPad|iPod/) || t();
44849
44849
  }
44850
44850
  const n = window.navigator.userAgent;
44851
- function l(m) {
44852
- return !!n.match(m);
44851
+ function l(g) {
44852
+ return !!n.match(g);
44853
44853
  }
44854
- function r(m) {
44855
- console.log("notfiy update available"), um.value = m.detail, Fg.value = !0;
44854
+ function r(g) {
44855
+ console.log("notfiy update available"), um.value = g.detail, Fg.value = !0;
44856
44856
  }
44857
44857
  function i() {
44858
44858
  console.log("controller changed"), !IS && (IS = !0, window.location.reload());
44859
44859
  }
44860
44860
  function o() {
44861
- var m;
44862
- Rg.value != null ? ((m = Rg.value) == null || m.prompt(), sm.value = !1) : a() && (ES.value = !0);
44861
+ var g;
44862
+ Rg.value != null ? ((g = Rg.value) == null || g.prompt(), sm.value = !1) : a() && (ES.value = !0);
44863
44863
  }
44864
44864
  function s() {
44865
44865
  return !!("standalone" in window.navigator && window.navigator.standalone) || !!window.matchMedia("(display-mode: standalone)").matches;
44866
44866
  }
44867
- function c(m) {
44868
- m.preventDefault(), sm.value = !0, Rg.value = m;
44867
+ function c(g) {
44868
+ g.preventDefault(), sm.value = !0, Rg.value = g;
44869
44869
  }
44870
44870
  function u() {
44871
44871
  Fg.value = !1, !(!um.value || !um.value.waiting) && um.value.waiting.postMessage({ type: "SKIP_WAITING" });
@@ -44873,32 +44873,31 @@ function WU(e) {
44873
44873
  RE(() => {
44874
44874
  TS == null && (TS = document.addEventListener("swUpdated", r, { once: !0 })), AS == null && (AS = navigator.serviceWorker.addEventListener("controllerchange", i)), $S == null && ($S = window.addEventListener("beforeinstallprompt", c)), a() && !s() && (sm.value = !0);
44875
44875
  });
44876
- function d(m) {
44877
- document.dispatchEvent(new CustomEvent("swUpdated", { detail: m }));
44876
+ function d(g) {
44877
+ document.dispatchEvent(new CustomEvent("swUpdated", { detail: g }));
44878
44878
  }
44879
- if (e.registerServiceWorker && "serviceWorker" in navigator) {
44880
- let m = tv(e.urls);
44879
+ let m, f = tv(e.urls);
44880
+ return typeof window < "u" && (typeof Promise < "u" ? m = new Promise((g) => window.addEventListener("load", g)) : m = { then: (g) => window.addEventListener("load", g) }), e.registerServiceWorker == !0 && "serviceWorker" in navigator && (m == null || m.then(() => {
44881
44881
  console.log("registering"), navigator.serviceWorker.register(
44882
- m != "development" ? "/service-worker.js" : "/dev-sw.js?dev-sw",
44883
- { type: m != "development" ? "classic" : "module" }
44884
- ).then((f) => {
44885
- if (console.log("registering done"), f.waiting) {
44886
- console.log("waiting"), d(f);
44882
+ f != "development" ? "/service-worker.js" : "/dev-sw.js?dev-sw",
44883
+ { type: f != "development" ? "classic" : "module" }
44884
+ ).then((g) => {
44885
+ if (console.log("registering done"), g.waiting) {
44886
+ console.log("waiting"), d(g);
44887
44887
  return;
44888
44888
  }
44889
- f.onupdatefound = () => {
44890
- if (console.log("update found"), f.installing != null) {
44891
- const g = f.installing;
44892
- g.onstatechange = () => {
44893
- (g == null ? void 0 : g.state) === "installed" && navigator.serviceWorker.controller && d(f);
44889
+ g.onupdatefound = () => {
44890
+ if (console.log("update found"), console.log(g), g.installing != null) {
44891
+ const h = g.installing;
44892
+ h.onstatechange = () => {
44893
+ (h == null ? void 0 : h.state) === "installed" && navigator.serviceWorker.controller && d(g);
44894
44894
  };
44895
44895
  }
44896
44896
  };
44897
- }).catch((f) => {
44898
- console.log("service worker registration error"), console.log(f);
44897
+ }).catch((g) => {
44898
+ console.log("service worker registration error"), console.log(g);
44899
44899
  });
44900
- }
44901
- return I0 = {
44900
+ })), I0 = {
44902
44901
  canInstallApp: sm,
44903
44902
  canUpdateApp: Fg,
44904
44903
  installApp: o,
package/dist/index.d.ts CHANGED
@@ -1508,7 +1508,7 @@ export declare interface PathOptions {
1508
1508
  useLocalCache?: boolean;
1509
1509
  }
1510
1510
 
1511
- declare type PermissionGroup = string[];
1511
+ export declare type PermissionGroup = string[];
1512
1512
 
1513
1513
  export declare interface PointerOrTouchEvent extends PointerEvent, TouchEvent {
1514
1514
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bt-core-app",
3
- "version": "2.0.210",
3
+ "version": "2.0.212",
4
4
  "description": "Core app tools for some basic features like navigation, authentication, server apis, and cosmetics",
5
5
  "homepage": "https://github.com/BlitzItTech/bt-core",
6
6
  "bugs": {