@burdenoff/fe-libs 2026.819.5 → 2026.823.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/README.md +66 -0
- package/dist/button/Button.d.ts +1 -1
- package/dist/chrome/AppShellLayout.d.ts +14 -0
- package/dist/chrome/AppShellLayout.d.ts.map +1 -1
- package/dist/chrome/AppShellLayout.js +13 -10
- package/dist/chrome/DynamicFooter.d.ts +6 -1
- package/dist/chrome/DynamicFooter.d.ts.map +1 -1
- package/dist/chrome/DynamicFooter.js +21 -20
- package/dist/chrome/Footer.d.ts +6 -0
- package/dist/chrome/Footer.d.ts.map +1 -1
- package/dist/chrome/Footer.js +46 -45
- package/dist/chrome/FooterBar.d.ts +6 -1
- package/dist/chrome/FooterBar.d.ts.map +1 -1
- package/dist/chrome/FooterBar.js +28 -26
- package/dist/chrome/HeaderBar.d.ts.map +1 -1
- package/dist/chrome/HeaderBar.js +3 -0
- package/dist/chrome/MobileTabBar.d.ts +26 -0
- package/dist/chrome/MobileTabBar.d.ts.map +1 -0
- package/dist/chrome/MobileTabBar.js +194 -0
- package/dist/chrome/NativePageTransition.d.ts +10 -0
- package/dist/chrome/NativePageTransition.d.ts.map +1 -0
- package/dist/chrome/NativePageTransition.js +19 -0
- package/dist/chrome/NativeTopBar.d.ts +21 -0
- package/dist/chrome/NativeTopBar.d.ts.map +1 -0
- package/dist/chrome/NativeTopBar.js +72 -0
- package/dist/chrome/NotificationCenter.d.ts.map +1 -1
- package/dist/chrome/NotificationCenter.js +70 -65
- package/dist/chrome/ProductSideNav.d.ts.map +1 -1
- package/dist/chrome/ProductSideNav.js +44 -74
- package/dist/chrome/SwipeNavigation.d.ts +36 -0
- package/dist/chrome/SwipeNavigation.d.ts.map +1 -0
- package/dist/chrome/SwipeNavigation.js +111 -0
- package/dist/chrome/index.d.ts +14 -7
- package/dist/chrome/index.d.ts.map +1 -1
- package/dist/chrome/mobileTabBar/selectTabs.d.ts +45 -0
- package/dist/chrome/mobileTabBar/selectTabs.d.ts.map +1 -0
- package/dist/chrome/mobileTabBar/selectTabs.js +28 -0
- package/dist/chrome/mobileTabBar/useMobileTabBarVisible.d.ts +18 -0
- package/dist/chrome/mobileTabBar/useMobileTabBarVisible.d.ts.map +1 -0
- package/dist/chrome/mobileTabBar/useMobileTabBarVisible.js +16 -0
- package/dist/chrome/mobileTabBar/useVisibleNavItems.d.ts +18 -0
- package/dist/chrome/mobileTabBar/useVisibleNavItems.d.ts.map +1 -0
- package/dist/chrome/mobileTabBar/useVisibleNavItems.js +41 -0
- package/dist/chrome/nativeTopBarTitle.d.ts +15 -0
- package/dist/chrome/nativeTopBarTitle.d.ts.map +1 -0
- package/dist/chrome/nativeTopBarTitle.js +22 -0
- package/dist/chrome/swipe/swipeMath.d.ts +25 -0
- package/dist/chrome/swipe/swipeMath.d.ts.map +1 -0
- package/dist/chrome/swipe/swipeMath.js +14 -0
- package/dist/chrome/swipe/swipeState.d.ts +10 -0
- package/dist/chrome/swipe/swipeState.d.ts.map +1 -0
- package/dist/chrome/swipe/swipeState.js +11 -0
- package/dist/chrome.js +8 -1
- package/dist/shared/components/DesktopUpdateToast.d.ts +9 -0
- package/dist/shared/components/DesktopUpdateToast.d.ts.map +1 -0
- package/dist/shared/components/DesktopUpdateToast.js +39 -0
- package/dist/shared/components/PWAInstallBanner.js +1 -1
- package/dist/shared/components/SSORedirectGuard.d.ts.map +1 -1
- package/dist/shared/components/SSORedirectGuard.js +41 -45
- package/dist/shared/components/index.d.ts +2 -0
- package/dist/shared/components/index.d.ts.map +1 -1
- package/dist/shared/config/authBridgeUrls.d.ts +10 -0
- package/dist/shared/config/authBridgeUrls.d.ts.map +1 -1
- package/dist/shared/config/authBridgeUrls.js +16 -12
- package/dist/shared/config/gatewayUrls.d.ts.map +1 -1
- package/dist/shared/config/gatewayUrls.js +22 -19
- package/dist/shared/config/index.d.ts +1 -1
- package/dist/shared/config/index.d.ts.map +1 -1
- package/dist/shared/hooks/shell/useNavRegistry.d.ts +7 -0
- package/dist/shared/hooks/shell/useNavRegistry.d.ts.map +1 -1
- package/dist/shared/hooks/usePWA.d.ts.map +1 -1
- package/dist/shared/hooks/usePWA.js +34 -30
- package/dist/shared/native/consumers.d.ts +15 -1
- package/dist/shared/native/consumers.d.ts.map +1 -1
- package/dist/shared/native/consumers.js +26 -7
- package/dist/shared/native/desktop.d.ts +123 -0
- package/dist/shared/native/desktop.d.ts.map +1 -0
- package/dist/shared/native/desktop.js +280 -0
- package/dist/shared/native/entry.d.ts +39 -0
- package/dist/shared/native/entry.d.ts.map +1 -0
- package/dist/shared/native/entry.js +13 -0
- package/dist/shared/native/hooks/index.d.ts +10 -0
- package/dist/shared/native/hooks/index.d.ts.map +1 -1
- package/dist/shared/native/hooks/index.js +6 -0
- package/dist/shared/native/hooks/useActionSheet.d.ts +63 -0
- package/dist/shared/native/hooks/useActionSheet.d.ts.map +1 -0
- package/dist/shared/native/hooks/useActionSheet.js +45 -0
- package/dist/shared/native/hooks/useDesktop.d.ts +15 -0
- package/dist/shared/native/hooks/useDesktop.d.ts.map +1 -0
- package/dist/shared/native/hooks/useDesktop.js +18 -0
- package/dist/shared/native/hooks/useDesktopUpdateState.d.ts +7 -0
- package/dist/shared/native/hooks/useDesktopUpdateState.d.ts.map +1 -0
- package/dist/shared/native/hooks/useDesktopUpdateState.js +20 -0
- package/dist/shared/native/hooks/useDesktopWindowState.d.ts +7 -0
- package/dist/shared/native/hooks/useDesktopWindowState.d.ts.map +1 -0
- package/dist/shared/native/hooks/useDesktopWindowState.js +9 -0
- package/dist/shared/native/hooks/useHaptics.d.ts +1 -0
- package/dist/shared/native/hooks/useHaptics.d.ts.map +1 -1
- package/dist/shared/native/hooks/useHaptics.js +6 -6
- package/dist/shared/native/hooks/useNetworkStatus.d.ts +23 -0
- package/dist/shared/native/hooks/useNetworkStatus.d.ts.map +1 -0
- package/dist/shared/native/hooks/useNetworkStatus.js +29 -0
- package/dist/shared/native/hooks/usePullToRefresh.d.ts +62 -0
- package/dist/shared/native/hooks/usePullToRefresh.d.ts.map +1 -0
- package/dist/shared/native/hooks/usePullToRefresh.js +84 -0
- package/dist/shared/native/index.d.ts +6 -1
- package/dist/shared/native/index.d.ts.map +1 -1
- package/dist/shared/native/platform.d.ts.map +1 -1
- package/dist/shared/native/platform.js +2 -1
- package/dist/shared/native/purchases.d.ts +7 -1
- package/dist/shared/native/purchases.d.ts.map +1 -1
- package/dist/shared/native/purchases.js +3 -3
- package/dist/shared/native/types.d.ts +136 -0
- package/dist/shared/native/types.d.ts.map +1 -1
- package/dist/shared/providers/AppShellProvider.d.ts.map +1 -1
- package/dist/shared/providers/AppShellProvider.js +117 -115
- package/dist/shared/providers/shell/ThemeProvider.d.ts.map +1 -1
- package/dist/shared/providers/shell/ThemeProvider.js +64 -51
- package/dist/shared/providers/shell/authProvider/useSsoDepositBootGuard.d.ts.map +1 -1
- package/dist/shared/providers/shell/authProvider/useSsoDepositBootGuard.js +25 -29
- package/dist/shared/utils/gatewayFetchRewrite.d.ts.map +1 -1
- package/dist/shared/utils/gatewayFetchRewrite.js +87 -84
- package/dist/shared-components.js +2 -1
- package/dist/shared-config.js +10 -10
- package/dist/shared-native.js +21 -13
- package/dist/shared.js +120 -111
- package/dist/shell-native/actionSheet.d.ts +7 -0
- package/dist/shell-native/actionSheet.d.ts.map +1 -0
- package/dist/shell-native/actionSheet.js +26 -0
- package/dist/shell-native/app-lifecycle.d.ts +4 -0
- package/dist/shell-native/app-lifecycle.d.ts.map +1 -0
- package/dist/shell-native/app-lifecycle.js +12 -0
- package/dist/shell-native/auth-navigation.d.ts +4 -0
- package/dist/shell-native/auth-navigation.d.ts.map +1 -0
- package/dist/shell-native/auth-navigation.js +95 -0
- package/dist/shell-native/back-button.d.ts +8 -0
- package/dist/shell-native/back-button.d.ts.map +1 -0
- package/dist/shell-native/back-button.js +49 -0
- package/dist/shell-native/boot.d.ts +10 -0
- package/dist/shell-native/boot.d.ts.map +1 -0
- package/dist/shell-native/boot.js +65 -0
- package/dist/shell-native/bridge.d.ts +7 -0
- package/dist/shell-native/bridge.d.ts.map +1 -0
- package/dist/shell-native/bridge.js +30 -0
- package/dist/shell-native/browser.d.ts +12 -0
- package/dist/shell-native/browser.d.ts.map +1 -0
- package/dist/shell-native/browser.js +45 -0
- package/dist/shell-native/capacitor-config.d.ts +21 -0
- package/dist/shell-native/capacitor-config.d.ts.map +1 -0
- package/dist/shell-native/capacitor-config.js +102 -0
- package/dist/shell-native/clipboard.d.ts +3 -0
- package/dist/shell-native/clipboard.d.ts.map +1 -0
- package/dist/shell-native/clipboard.js +26 -0
- package/dist/shell-native/deep-link.d.ts +19 -0
- package/dist/shell-native/deep-link.d.ts.map +1 -0
- package/dist/shell-native/deep-link.js +53 -0
- package/dist/shell-native/desktop-bridge.d.ts +14 -0
- package/dist/shell-native/desktop-bridge.d.ts.map +1 -0
- package/dist/shell-native/desktop-bridge.js +17 -0
- package/dist/shell-native/device.d.ts +4 -0
- package/dist/shell-native/device.d.ts.map +1 -0
- package/dist/shell-native/device.js +27 -0
- package/dist/shell-native/dialog.d.ts +4 -0
- package/dist/shell-native/dialog.d.ts.map +1 -0
- package/dist/shell-native/dialog.js +13 -0
- package/dist/shell-native/feedback.d.ts +6 -0
- package/dist/shell-native/feedback.d.ts.map +1 -0
- package/dist/shell-native/feedback.js +29 -0
- package/dist/shell-native/index.d.ts +54 -0
- package/dist/shell-native/index.d.ts.map +1 -0
- package/dist/shell-native/keyboard.d.ts +15 -0
- package/dist/shell-native/keyboard.d.ts.map +1 -0
- package/dist/shell-native/keyboard.js +42 -0
- package/dist/shell-native/network.d.ts +9 -0
- package/dist/shell-native/network.d.ts.map +1 -0
- package/dist/shell-native/network.js +40 -0
- package/dist/shell-native/ota.d.ts +3 -0
- package/dist/shell-native/ota.d.ts.map +1 -0
- package/dist/shell-native/ota.js +21 -0
- package/dist/shell-native/platform.d.ts +21 -0
- package/dist/shell-native/platform.d.ts.map +1 -0
- package/dist/shell-native/platform.js +51 -0
- package/dist/shell-native/preview.d.ts +18 -0
- package/dist/shell-native/preview.d.ts.map +1 -0
- package/dist/shell-native/preview.js +124 -0
- package/dist/shell-native/push.d.ts +14 -0
- package/dist/shell-native/push.d.ts.map +1 -0
- package/dist/shell-native/push.js +62 -0
- package/dist/shell-native/pwa.d.ts +14 -0
- package/dist/shell-native/pwa.d.ts.map +1 -0
- package/dist/shell-native/pwa.js +49 -0
- package/dist/shell-native/service-worker.d.ts +5 -0
- package/dist/shell-native/service-worker.d.ts.map +1 -0
- package/dist/shell-native/service-worker.js +144 -0
- package/dist/shell-native/share.d.ts +4 -0
- package/dist/shell-native/share.d.ts.map +1 -0
- package/dist/shell-native/share.js +19 -0
- package/dist/shell-native/splash.d.ts +16 -0
- package/dist/shell-native/splash.d.ts.map +1 -0
- package/dist/shell-native/splash.js +25 -0
- package/dist/shell-native/system-bars.d.ts +24 -0
- package/dist/shell-native/system-bars.d.ts.map +1 -0
- package/dist/shell-native/system-bars.js +49 -0
- package/dist/shell-native/toast.d.ts +4 -0
- package/dist/shell-native/toast.d.ts.map +1 -0
- package/dist/shell-native/toast.js +16 -0
- package/dist/shell-native/types.d.ts +292 -0
- package/dist/shell-native/types.d.ts.map +1 -0
- package/dist/shell-native/web-manifest.d.ts +36 -0
- package/dist/shell-native/web-manifest.d.ts.map +1 -0
- package/dist/shell-native/web-manifest.js +55 -0
- package/dist/shell-native.d.ts +2 -0
- package/dist/shell-native.js +29 -0
- package/dist/ui/action-sheet.d.ts +29 -0
- package/dist/ui/action-sheet.d.ts.map +1 -0
- package/dist/ui/action-sheet.js +53 -0
- package/dist/ui/badge.d.ts +1 -1
- package/dist/ui/button.d.ts +1 -1
- package/dist/ui/index.d.ts +6 -0
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/native-welcome.d.ts +61 -0
- package/dist/ui/native-welcome.d.ts.map +1 -0
- package/dist/ui/native-welcome.js +152 -0
- package/dist/ui/offline-banner.d.ts +22 -0
- package/dist/ui/offline-banner.d.ts.map +1 -0
- package/dist/ui/offline-banner.js +34 -0
- package/dist/ui/pull-to-refresh.d.ts +29 -0
- package/dist/ui/pull-to-refresh.d.ts.map +1 -0
- package/dist/ui/pull-to-refresh.js +44 -0
- package/dist/ui/pwa-update-toast.d.ts +34 -0
- package/dist/ui/pwa-update-toast.d.ts.map +1 -0
- package/dist/ui/pwa-update-toast.js +43 -0
- package/dist/ui/select.d.ts +38 -0
- package/dist/ui/select.d.ts.map +1 -1
- package/dist/ui/select.js +162 -61
- package/dist/ui.js +40 -35
- package/package.json +93 -4
- package/src/shared/styles/app-shell.css +3 -0
- package/src/shared/styles/native.css +577 -0
- package/dist/node_modules/@capacitor/core/dist/index.js +0 -268
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"back-button.d.ts","sourceRoot":"","sources":["../../src/shell-native/back-button.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAMlD,sFAAsF;AACtF,wBAAgB,+BAA+B,CAAC,OAAO,EAAE,MAAM,GAAG,kBAAkB,CAqCnF;AAED,4EAA4E;AAC5E,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,kBAAkB,GAAG,IAAI,CAO1E;AAED,mEAAmE;AACnE,wBAAsB,wBAAwB,CAAC,QAAQ,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAO1F"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { isNativePluginAvailable as e } from "./platform.js";
|
|
2
|
+
import { showNativeConfirm as t } from "./dialog.js";
|
|
3
|
+
import { App as n } from "@capacitor/app";
|
|
4
|
+
//#region src/shell-native/back-button.ts
|
|
5
|
+
function r(e) {
|
|
6
|
+
return {
|
|
7
|
+
closeTopOverlay: () => {
|
|
8
|
+
if (typeof document > "u") return !1;
|
|
9
|
+
let e = document.querySelector("[role='dialog'][data-state='open']");
|
|
10
|
+
return e ? (e.querySelector("[data-dialog-close], [aria-label='Close']")?.click(), !0) : !1;
|
|
11
|
+
},
|
|
12
|
+
canNavigateBack: () => {
|
|
13
|
+
if (typeof window > "u") return !1;
|
|
14
|
+
let e = window.history.state;
|
|
15
|
+
return typeof e?.idx == "number" ? e.idx > 0 : window.history.length > 1;
|
|
16
|
+
},
|
|
17
|
+
navigateBack: () => {
|
|
18
|
+
typeof window < "u" && window.history.back();
|
|
19
|
+
},
|
|
20
|
+
confirmExit: () => {
|
|
21
|
+
t({
|
|
22
|
+
title: `Exit ${e}`,
|
|
23
|
+
message: "Are you sure you want to exit?",
|
|
24
|
+
okButtonTitle: "Exit",
|
|
25
|
+
cancelButtonTitle: "Cancel"
|
|
26
|
+
}).then(async (e) => {
|
|
27
|
+
if (e) try {
|
|
28
|
+
await n.exitApp();
|
|
29
|
+
} catch {}
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function i(e) {
|
|
35
|
+
if (!e.closeTopOverlay()) {
|
|
36
|
+
if (e.canNavigateBack()) {
|
|
37
|
+
e.navigateBack();
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
e.confirmExit();
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
async function a(t) {
|
|
44
|
+
if (e("App")) try {
|
|
45
|
+
await n.addListener("backButton", () => i(t));
|
|
46
|
+
} catch {}
|
|
47
|
+
}
|
|
48
|
+
//#endregion
|
|
49
|
+
export { r as createDefaultBackButtonHandlers, a as installBackButtonHandler, i as runBackButtonPrecedence };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BootNativeShellOptions, NativeShellHandle } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* One-call shell-side native boot. Call ONCE from `main.tsx` BEFORE React
|
|
4
|
+
* mounts. Idempotent — a second call returns the same handle. Every side
|
|
5
|
+
* effect is individually guarded so boot can never throw.
|
|
6
|
+
*/
|
|
7
|
+
export declare function bootNativeShell(options: BootNativeShellOptions): NativeShellHandle;
|
|
8
|
+
/** Test-only reset. */
|
|
9
|
+
export declare function resetNativeShellBootForTests(): void;
|
|
10
|
+
//# sourceMappingURL=boot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"boot.d.ts","sourceRoot":"","sources":["../../src/shell-native/boot.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAsB,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAyC7F;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,sBAAsB,GAAG,iBAAiB,CAoFlF;AAED,uBAAuB;AACvB,wBAAgB,4BAA4B,IAAI,IAAI,CAEnD"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { bootDesktopShell as e } from "../shared/native/desktop.js";
|
|
2
|
+
import { isElectron as t } from "../shared/native/platform.js";
|
|
3
|
+
import { applyNativePreview as n, getActiveNativePreview as r, resolveNativePreview as i } from "./preview.js";
|
|
4
|
+
import { applyNativePlatformClass as a, getNativePlatform as o, isNativePlatform as s, isNativePreview as c, isRealNativePlatform as l } from "./platform.js";
|
|
5
|
+
import { installMobileRuntimeHooks as u } from "./app-lifecycle.js";
|
|
6
|
+
import { configureElectronGlobalKey as d } from "./desktop-bridge.js";
|
|
7
|
+
import { installNativeAuthNavigationIntercept as f } from "./auth-navigation.js";
|
|
8
|
+
import { createDefaultBackButtonHandlers as p, installBackButtonHandler as m } from "./back-button.js";
|
|
9
|
+
import { installExternalUrlOpener as h } from "./browser.js";
|
|
10
|
+
import { installNativeBridge as g } from "./bridge.js";
|
|
11
|
+
import { installDeepLinkHandler as _ } from "./deep-link.js";
|
|
12
|
+
import { populateDeviceInfo as v } from "./device.js";
|
|
13
|
+
import { configureKeyboard as y } from "./keyboard.js";
|
|
14
|
+
import { installNetworkListener as b } from "./network.js";
|
|
15
|
+
import { notifyOtaReady as x } from "./ota.js";
|
|
16
|
+
import { installPushNotifications as S } from "./push.js";
|
|
17
|
+
import { installPwa as C } from "./pwa.js";
|
|
18
|
+
import { armSplashSafetyTimer as w, markAppReady as T } from "./splash.js";
|
|
19
|
+
import { installStatusBarThemeListener as E } from "./system-bars.js";
|
|
20
|
+
//#region src/shell-native/boot.ts
|
|
21
|
+
function D(e, t) {
|
|
22
|
+
try {
|
|
23
|
+
let n = t();
|
|
24
|
+
n instanceof Promise && n.catch((t) => {
|
|
25
|
+
console.debug(`[shell-native] boot step "${e}" failed:`, t);
|
|
26
|
+
});
|
|
27
|
+
} catch (t) {
|
|
28
|
+
console.debug(`[shell-native] boot step "${e}" failed:`, t);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
function O() {
|
|
32
|
+
if (typeof document > "u") return;
|
|
33
|
+
let e = document.querySelector("meta[name=\"viewport\"]");
|
|
34
|
+
if (!e) return;
|
|
35
|
+
let t = (e.content || "").split(",").map((e) => e.trim()).filter((e) => e.length > 0 && !e.startsWith("maximum-scale") && !e.startsWith("user-scalable") && !e.startsWith("interactive-widget"));
|
|
36
|
+
t.push("maximum-scale=1", "user-scalable=no"), o() === "android" && t.push("interactive-widget=resizes-content"), e.content = t.join(", ");
|
|
37
|
+
}
|
|
38
|
+
var k = null;
|
|
39
|
+
function A(A) {
|
|
40
|
+
if (k) return k;
|
|
41
|
+
if (d(A.electronGlobalKey ?? `${A.product}Electron`), A.preview?.allow !== !1 && D("preview", () => n(i())), D("notifyOtaReady", () => x(A.plugins ?? {})), D("authIntercept", () => f(A.authIntercept)), D("externalUrlOpener", () => h()), D("nativeBridge", () => {
|
|
42
|
+
g(), a();
|
|
43
|
+
}), D("deviceInfo", () => v()), D("statusBarTheme", () => E()), D("keyboard", () => y()), D("backButton", () => m({
|
|
44
|
+
...p(A.appName),
|
|
45
|
+
...A.backButton
|
|
46
|
+
})), D("deepLinks", () => _()), D("network", () => b(A.network ?? {})), D("runtimeHooks", () => u(A.runtimeHooks ?? {})), A.push?.enabled && A.plugins?.pushNotifications) {
|
|
47
|
+
let e = A.plugins.pushNotifications;
|
|
48
|
+
D("push", () => S(e, A.push ?? {}));
|
|
49
|
+
}
|
|
50
|
+
return l() && A.splash?.autoHide !== !1 && D("splashSafetyTimer", () => w(A.splash?.maxWaitMs ?? 8e3)), D("pwa", () => C({
|
|
51
|
+
enabled: !0,
|
|
52
|
+
...A.pwa
|
|
53
|
+
})), t() && D("desktopShell", () => e(A.desktop)), s() && D("viewport", () => O()), k = {
|
|
54
|
+
platform: o(),
|
|
55
|
+
isNative: s(),
|
|
56
|
+
isPreview: c(),
|
|
57
|
+
previewMode: r(),
|
|
58
|
+
markAppReady: T
|
|
59
|
+
}, k;
|
|
60
|
+
}
|
|
61
|
+
function j() {
|
|
62
|
+
k = null;
|
|
63
|
+
}
|
|
64
|
+
//#endregion
|
|
65
|
+
export { A as bootNativeShell, j as resetNativeShellBootForTests };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Installs `window.__burdenoffNativeBridge` — the FULL contract from
|
|
3
|
+
* `@burdenoff/fe-libs/shared/native/types` (incl. `selection`, `actionSheet`,
|
|
4
|
+
* `isPreview`) — and applies the platform classes. Idempotent.
|
|
5
|
+
*/
|
|
6
|
+
export declare function installNativeBridge(): void;
|
|
7
|
+
//# sourceMappingURL=bridge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bridge.d.ts","sourceRoot":"","sources":["../../src/shell-native/bridge.ts"],"names":[],"mappings":"AAiBA;;;;GAIG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAyB1C"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { applyNativePlatformClass as e, getNativePlatform as t, isNativePlatform as n, isNativePreview as r } from "./platform.js";
|
|
2
|
+
import { showNativeConfirm as i } from "./dialog.js";
|
|
3
|
+
import { showNativeActionSheet as a } from "./actionSheet.js";
|
|
4
|
+
import { openExternalUrl as o } from "./browser.js";
|
|
5
|
+
import { writeClipboardText as s } from "./clipboard.js";
|
|
6
|
+
import { impactFeedback as c, notificationFeedback as l, selectionFeedback as u } from "./feedback.js";
|
|
7
|
+
import { showNativeToast as d } from "./toast.js";
|
|
8
|
+
import { shareContent as f } from "./share.js";
|
|
9
|
+
//#region src/shell-native/bridge.ts
|
|
10
|
+
var p = !1;
|
|
11
|
+
function m() {
|
|
12
|
+
typeof window > "u" || (e(), !(p && window.__burdenoffNativeBridge) && (p = !0, window.__burdenoffNativeBridge = {
|
|
13
|
+
getPlatform: t,
|
|
14
|
+
isNativePlatform: n,
|
|
15
|
+
impact: c,
|
|
16
|
+
notify: l,
|
|
17
|
+
selection: u,
|
|
18
|
+
toast: d,
|
|
19
|
+
confirm: i,
|
|
20
|
+
actionSheet: a,
|
|
21
|
+
copyText: s,
|
|
22
|
+
share: f,
|
|
23
|
+
openExternalUrl: async (e) => {
|
|
24
|
+
await o(e);
|
|
25
|
+
},
|
|
26
|
+
isPreview: r
|
|
27
|
+
}));
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
export { m as installNativeBridge };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Open an external URL without escaping the embedded webview.
|
|
3
|
+
* Order: desktop bridge `openExternal` → Capacitor Browser → `window.open`
|
|
4
|
+
* (noopener) → `location.assign`. Resolves true when the URL was handed off.
|
|
5
|
+
*/
|
|
6
|
+
export declare function openExternalUrl(url: string): Promise<boolean>;
|
|
7
|
+
/**
|
|
8
|
+
* Publish `window.__burdenoffOpenExternal` so decoupled MFEs (microfe-auth…) can
|
|
9
|
+
* drive native browser hand-offs through one stable entry point.
|
|
10
|
+
*/
|
|
11
|
+
export declare function installExternalUrlOpener(): void;
|
|
12
|
+
//# sourceMappingURL=browser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../src/shell-native/browser.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,wBAAsB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CA+CnE;AAID;;;GAGG;AACH,wBAAgB,wBAAwB,IAAI,IAAI,CAM/C"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { getDesktopBridge as e } from "../shared/native/desktop.js";
|
|
2
|
+
import { isNativePluginAvailable as t } from "./platform.js";
|
|
3
|
+
import { getLegacyElectronBridge as n } from "./desktop-bridge.js";
|
|
4
|
+
import { Browser as r } from "@capacitor/browser";
|
|
5
|
+
//#region src/shell-native/browser.ts
|
|
6
|
+
async function i(i) {
|
|
7
|
+
let a = /^https?:\/\//i.test(i);
|
|
8
|
+
if (a) {
|
|
9
|
+
let t = e();
|
|
10
|
+
if (t) try {
|
|
11
|
+
if (await t.openExternal(i)) return !0;
|
|
12
|
+
} catch {}
|
|
13
|
+
let r = n();
|
|
14
|
+
if (r && typeof r.openExternal == "function") try {
|
|
15
|
+
if (await r.openExternal(i)) return !0;
|
|
16
|
+
} catch {}
|
|
17
|
+
}
|
|
18
|
+
if (a && t("Browser")) try {
|
|
19
|
+
return await r.open({
|
|
20
|
+
url: i,
|
|
21
|
+
presentationStyle: "fullscreen"
|
|
22
|
+
}), !0;
|
|
23
|
+
} catch {}
|
|
24
|
+
if (typeof window > "u") return !1;
|
|
25
|
+
let o;
|
|
26
|
+
try {
|
|
27
|
+
o = window.open(i, "_blank", "noopener,noreferrer");
|
|
28
|
+
} catch {
|
|
29
|
+
o = null;
|
|
30
|
+
}
|
|
31
|
+
if (!o) try {
|
|
32
|
+
window.location.assign(i);
|
|
33
|
+
} catch {
|
|
34
|
+
return !1;
|
|
35
|
+
}
|
|
36
|
+
return !0;
|
|
37
|
+
}
|
|
38
|
+
var a = !1;
|
|
39
|
+
function o() {
|
|
40
|
+
a || typeof window > "u" || (a = !0, window.__burdenoffOpenExternal = async (e) => {
|
|
41
|
+
await i(e);
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
//#endregion
|
|
45
|
+
export { o as installExternalUrlOpener, i as openExternalUrl };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { NativeConfig } from './types';
|
|
2
|
+
/** Structural stand-in for `@capacitor/cli`'s `CapacitorConfig`. */
|
|
3
|
+
export interface CapacitorConfigLike {
|
|
4
|
+
appId: string;
|
|
5
|
+
appName: string;
|
|
6
|
+
webDir: string;
|
|
7
|
+
server?: {
|
|
8
|
+
androidScheme?: string;
|
|
9
|
+
iosScheme?: string;
|
|
10
|
+
hostname?: string;
|
|
11
|
+
allowNavigation?: string[];
|
|
12
|
+
[key: string]: unknown;
|
|
13
|
+
};
|
|
14
|
+
ios?: Record<string, unknown>;
|
|
15
|
+
android?: Record<string, unknown>;
|
|
16
|
+
plugins?: Record<string, Record<string, unknown>>;
|
|
17
|
+
experimental?: Record<string, unknown>;
|
|
18
|
+
[key: string]: unknown;
|
|
19
|
+
}
|
|
20
|
+
export declare function defineCapacitorConfig(cfg: NativeConfig, overrides?: Partial<CapacitorConfigLike>): CapacitorConfigLike;
|
|
21
|
+
//# sourceMappingURL=capacitor-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capacitor-config.d.ts","sourceRoot":"","sources":["../../src/shell-native/capacitor-config.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,oEAAoE;AACpE,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE;QACP,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;QAC3B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACxB,CAAC;IACF,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAClD,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAuBD,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,YAAY,EACjB,SAAS,GAAE,OAAO,CAAC,mBAAmB,CAAM,GAC3C,mBAAmB,CAiHrB"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
//#region src/shell-native/capacitor-config.ts
|
|
2
|
+
function e(e) {
|
|
3
|
+
return [...new Set(e.filter((e) => e.length > 0))];
|
|
4
|
+
}
|
|
5
|
+
function t(e) {
|
|
6
|
+
return globalThis.process?.env?.[e] === "1";
|
|
7
|
+
}
|
|
8
|
+
function n(n, r = {}) {
|
|
9
|
+
let i = {
|
|
10
|
+
appId: n.appId,
|
|
11
|
+
appName: n.displayName,
|
|
12
|
+
webDir: "dist",
|
|
13
|
+
server: {
|
|
14
|
+
androidScheme: "https",
|
|
15
|
+
iosScheme: "https",
|
|
16
|
+
allowNavigation: e([
|
|
17
|
+
n.domains.prodApp,
|
|
18
|
+
n.domains.alphaApp,
|
|
19
|
+
n.domains.website,
|
|
20
|
+
...n.domains.docs ? [n.domains.docs] : [],
|
|
21
|
+
"*.burdenoff.com",
|
|
22
|
+
"*.*.burdenoff.com",
|
|
23
|
+
"*.*.*.burdenoff.com"
|
|
24
|
+
])
|
|
25
|
+
},
|
|
26
|
+
ios: {
|
|
27
|
+
contentInset: "automatic",
|
|
28
|
+
allowsLinkPreview: !1,
|
|
29
|
+
preferredContentMode: "mobile",
|
|
30
|
+
backgroundColor: n.brandColor,
|
|
31
|
+
scrollEnabled: !0
|
|
32
|
+
},
|
|
33
|
+
android: {
|
|
34
|
+
allowMixedContent: !1,
|
|
35
|
+
overScrollMode: "never",
|
|
36
|
+
webContentsDebuggingEnabled: t("CAP_DEBUG"),
|
|
37
|
+
minWebViewVersion: "80.0.0",
|
|
38
|
+
backgroundColor: n.brandColor
|
|
39
|
+
},
|
|
40
|
+
plugins: {
|
|
41
|
+
CapacitorUpdater: {
|
|
42
|
+
autoUpdate: !0,
|
|
43
|
+
appReadyTimeout: 1e4,
|
|
44
|
+
directUpdate: !1,
|
|
45
|
+
...n.ota?.channel ? { defaultChannel: n.ota.channel } : {}
|
|
46
|
+
},
|
|
47
|
+
SystemBars: {
|
|
48
|
+
insetsHandling: "css",
|
|
49
|
+
style: "default"
|
|
50
|
+
},
|
|
51
|
+
SplashScreen: {
|
|
52
|
+
launchAutoHide: !1,
|
|
53
|
+
backgroundColor: n.brandColor,
|
|
54
|
+
androidScaleType: "CENTER_CROP",
|
|
55
|
+
showSpinner: !1,
|
|
56
|
+
splashFullScreen: !0,
|
|
57
|
+
splashImmersive: !0,
|
|
58
|
+
launchFadeOutDuration: 200
|
|
59
|
+
},
|
|
60
|
+
StatusBar: {
|
|
61
|
+
overlaysWebView: !0,
|
|
62
|
+
style: "default"
|
|
63
|
+
},
|
|
64
|
+
Keyboard: {
|
|
65
|
+
resize: "body",
|
|
66
|
+
resizeOnFullScreen: !0
|
|
67
|
+
},
|
|
68
|
+
...n.push ? { PushNotifications: { presentationOptions: [
|
|
69
|
+
"badge",
|
|
70
|
+
"sound",
|
|
71
|
+
"alert"
|
|
72
|
+
] } } : {}
|
|
73
|
+
},
|
|
74
|
+
experimental: { ios: { spm: { swiftToolsVersion: "5.9" } } }
|
|
75
|
+
};
|
|
76
|
+
return {
|
|
77
|
+
...i,
|
|
78
|
+
...r,
|
|
79
|
+
server: {
|
|
80
|
+
...i.server,
|
|
81
|
+
...r.server
|
|
82
|
+
},
|
|
83
|
+
ios: {
|
|
84
|
+
...i.ios,
|
|
85
|
+
...r.ios
|
|
86
|
+
},
|
|
87
|
+
android: {
|
|
88
|
+
...i.android,
|
|
89
|
+
...r.android
|
|
90
|
+
},
|
|
91
|
+
plugins: {
|
|
92
|
+
...i.plugins,
|
|
93
|
+
...r.plugins
|
|
94
|
+
},
|
|
95
|
+
experimental: {
|
|
96
|
+
...i.experimental,
|
|
97
|
+
...r.experimental
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
//#endregion
|
|
102
|
+
export { n as defineCapacitorConfig };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clipboard.d.ts","sourceRoot":"","sources":["../../src/shell-native/clipboard.ts"],"names":[],"mappings":"AAwBA,kEAAkE;AAClE,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAoBvE"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { isNativePluginAvailable as e } from "./platform.js";
|
|
2
|
+
import { Clipboard as t } from "@capacitor/clipboard";
|
|
3
|
+
//#region src/shell-native/clipboard.ts
|
|
4
|
+
function n(e) {
|
|
5
|
+
if (typeof document > "u" || !document.body) return !1;
|
|
6
|
+
let t = document.createElement("textarea");
|
|
7
|
+
t.value = e, t.setAttribute("readonly", ""), t.style.position = "fixed", t.style.opacity = "0", document.body.appendChild(t), t.select();
|
|
8
|
+
try {
|
|
9
|
+
return document.execCommand("copy");
|
|
10
|
+
} catch {
|
|
11
|
+
return !1;
|
|
12
|
+
} finally {
|
|
13
|
+
document.body.removeChild(t);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
async function r(r) {
|
|
17
|
+
if (e("Clipboard")) try {
|
|
18
|
+
return await t.write({ string: r }), !0;
|
|
19
|
+
} catch {}
|
|
20
|
+
try {
|
|
21
|
+
if (typeof navigator < "u" && navigator.clipboard?.writeText) return await navigator.clipboard.writeText(r), !0;
|
|
22
|
+
} catch {}
|
|
23
|
+
return n(r);
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
export { r as writeClipboardText };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
type DeepLinkNavigator = (path: string) => void;
|
|
2
|
+
/**
|
|
3
|
+
* Map a deep-link URL to an in-app SPA path. Handles both
|
|
4
|
+
* `scheme://app/path?x` (custom scheme; host is the synthetic `app`) and
|
|
5
|
+
* `https://<host>/path?x` (universal/app links).
|
|
6
|
+
*/
|
|
7
|
+
export declare function deepLinkUrlToPath(rawUrl: string): string | null;
|
|
8
|
+
/** Listens to Capacitor `appUrlOpen` and the desktop bridge's `onDeepLink`. */
|
|
9
|
+
export declare function installDeepLinkHandler(): Promise<void>;
|
|
10
|
+
/**
|
|
11
|
+
* Register the router's navigate function. Links that arrived before the router
|
|
12
|
+
* mounted are queued and flushed here.
|
|
13
|
+
*/
|
|
14
|
+
export declare function registerDeepLinkNavigator(navigate: DeepLinkNavigator): void;
|
|
15
|
+
export declare function clearDeepLinkNavigator(): void;
|
|
16
|
+
/** Route a path through the active navigator (or queue it) — used by push taps. */
|
|
17
|
+
export declare function navigateDeepLinkPath(path: string): void;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=deep-link.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deep-link.d.ts","sourceRoot":"","sources":["../../src/shell-native/deep-link.ts"],"names":[],"mappings":"AAKA,KAAK,iBAAiB,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;AAYhD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAQ/D;AA8BD,+EAA+E;AAC/E,wBAAsB,sBAAsB,IAAI,OAAO,CAAC,IAAI,CAAC,CAG5D;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAG3E;AAED,wBAAgB,sBAAsB,IAAI,IAAI,CAE7C;AAED,mFAAmF;AACnF,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAGvD"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { getDesktopBridge as e } from "../shared/native/desktop.js";
|
|
2
|
+
import { isNativePluginAvailable as t } from "./platform.js";
|
|
3
|
+
import { getLegacyElectronBridge as n } from "./desktop-bridge.js";
|
|
4
|
+
import { App as r } from "@capacitor/app";
|
|
5
|
+
//#region src/shell-native/deep-link.ts
|
|
6
|
+
var i = [], a = null;
|
|
7
|
+
function o() {
|
|
8
|
+
if (!a || i.length === 0) return;
|
|
9
|
+
let e = i;
|
|
10
|
+
i = [];
|
|
11
|
+
for (let t of e) a(t);
|
|
12
|
+
}
|
|
13
|
+
function s(e) {
|
|
14
|
+
let t;
|
|
15
|
+
try {
|
|
16
|
+
t = new URL(e);
|
|
17
|
+
} catch {
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
return `${t.pathname || "/"}${t.search}${t.hash}`;
|
|
21
|
+
}
|
|
22
|
+
function c(e) {
|
|
23
|
+
let t = s(e);
|
|
24
|
+
t !== null && (a ? a(t) : i.push(t));
|
|
25
|
+
}
|
|
26
|
+
async function l() {
|
|
27
|
+
if (t("App")) try {
|
|
28
|
+
await r.addListener("appUrlOpen", (e) => c(e.url));
|
|
29
|
+
} catch {}
|
|
30
|
+
}
|
|
31
|
+
function u() {
|
|
32
|
+
let t = e();
|
|
33
|
+
if (t && typeof t.onDeepLink == "function") {
|
|
34
|
+
t.onDeepLink((e) => c(e));
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
let r = n();
|
|
38
|
+
r && typeof r.onDeepLink == "function" && r.onDeepLink((e) => c(e));
|
|
39
|
+
}
|
|
40
|
+
async function d() {
|
|
41
|
+
u(), await l();
|
|
42
|
+
}
|
|
43
|
+
function f(e) {
|
|
44
|
+
a = e, o();
|
|
45
|
+
}
|
|
46
|
+
function p() {
|
|
47
|
+
a = null;
|
|
48
|
+
}
|
|
49
|
+
function m(e) {
|
|
50
|
+
a ? a(e) : i.push(e);
|
|
51
|
+
}
|
|
52
|
+
//#endregion
|
|
53
|
+
export { p as clearDeepLinkNavigator, s as deepLinkUrlToPath, d as installDeepLinkHandler, m as navigateDeepLinkPath, f as registerDeepLinkNavigator };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { LegacyDesktopRuntime } from '../shared/native/desktop';
|
|
2
|
+
export { getDesktopBridge } from '../shared/native/desktop';
|
|
3
|
+
export type { LegacyDesktopRuntime } from '../shared/native/desktop';
|
|
4
|
+
/** Set by `bootNativeShell` — `options.electronGlobalKey ?? \`${product}Electron\``. */
|
|
5
|
+
export declare function configureElectronGlobalKey(key: string): void;
|
|
6
|
+
export declare function getElectronGlobalKey(): string;
|
|
7
|
+
/** Legacy `window.<product>Electron` preload, looked up by the configured key. */
|
|
8
|
+
export declare function getLegacyElectronBridge(): LegacyDesktopRuntime | null;
|
|
9
|
+
/**
|
|
10
|
+
* Running inside any Electron desktop shell: the `__burdenoffDesktop` bridge,
|
|
11
|
+
* a legacy per-product preload, or (last resort) an Electron user agent.
|
|
12
|
+
*/
|
|
13
|
+
export declare function isDesktopShell(): boolean;
|
|
14
|
+
//# sourceMappingURL=desktop-bridge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"desktop-bridge.d.ts","sourceRoot":"","sources":["../../src/shell-native/desktop-bridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAIL,KAAK,oBAAoB,EAC1B,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,YAAY,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAIrE,wFAAwF;AACxF,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAE5D;AAED,wBAAgB,oBAAoB,IAAI,MAAM,CAE7C;AAED,kFAAkF;AAClF,wBAAgB,uBAAuB,IAAI,oBAAoB,GAAG,IAAI,CAErE;AAED;;;GAGG;AACH,wBAAgB,cAAc,IAAI,OAAO,CAOxC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { getDesktopBridge as e, getLegacyDesktopRuntime as t, isDesktop as n } from "../shared/native/desktop.js";
|
|
2
|
+
//#region src/shell-native/desktop-bridge.ts
|
|
3
|
+
var r = "burdenoffElectron";
|
|
4
|
+
function i(e) {
|
|
5
|
+
r = e;
|
|
6
|
+
}
|
|
7
|
+
function a() {
|
|
8
|
+
return r;
|
|
9
|
+
}
|
|
10
|
+
function o() {
|
|
11
|
+
return t(r) ?? t();
|
|
12
|
+
}
|
|
13
|
+
function s() {
|
|
14
|
+
return !!(n() || e() || typeof navigator < "u" && /electron/i.test(navigator.userAgent || ""));
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { i as configureElectronGlobalKey, a as getElectronGlobalKey, o as getLegacyElectronBridge, s as isDesktopShell };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../../src/shell-native/device.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAGzD,oFAAoF;AACpF,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CA2BrE"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { getNativePlatform as e, isNativePluginAvailable as t } from "./platform.js";
|
|
2
|
+
import { Device as n } from "@capacitor/device";
|
|
3
|
+
//#region src/shell-native/device.ts
|
|
4
|
+
async function r() {
|
|
5
|
+
if (typeof window > "u") return null;
|
|
6
|
+
let r = e();
|
|
7
|
+
if (!t("Device")) {
|
|
8
|
+
let e = { platform: r };
|
|
9
|
+
return window.__burdenoffDeviceInfo = e, e;
|
|
10
|
+
}
|
|
11
|
+
try {
|
|
12
|
+
let e = await n.getInfo(), t = {
|
|
13
|
+
platform: r,
|
|
14
|
+
model: e.model,
|
|
15
|
+
osVersion: e.osVersion,
|
|
16
|
+
webViewVersion: e.webViewVersion,
|
|
17
|
+
manufacturer: e.manufacturer,
|
|
18
|
+
isVirtual: e.isVirtual
|
|
19
|
+
};
|
|
20
|
+
return window.__burdenoffDeviceInfo = t, t;
|
|
21
|
+
} catch {
|
|
22
|
+
let e = { platform: r };
|
|
23
|
+
return window.__burdenoffDeviceInfo = e, e;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
export { r as populateDeviceInfo };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ConfirmOptions } from '../shared/native/types';
|
|
2
|
+
/** Native confirm. Resolves `null` when the native dialog is unavailable (web fallback). */
|
|
3
|
+
export declare function showNativeConfirm(options: ConfirmOptions): Promise<boolean | null>;
|
|
4
|
+
//# sourceMappingURL=dialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/shell-native/dialog.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAG7D,4FAA4F;AAC5F,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAQxF"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { isNativePluginAvailable as e } from "./platform.js";
|
|
2
|
+
import { Dialog as t } from "@capacitor/dialog";
|
|
3
|
+
//#region src/shell-native/dialog.ts
|
|
4
|
+
async function n(n) {
|
|
5
|
+
if (!e("Dialog")) return null;
|
|
6
|
+
try {
|
|
7
|
+
return (await t.confirm(n)).value;
|
|
8
|
+
} catch {
|
|
9
|
+
return null;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { n as showNativeConfirm };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { HapticImpactStyle, HapticNotificationType } from '../shared/native/types';
|
|
2
|
+
export declare function impactFeedback(style?: HapticImpactStyle): Promise<void>;
|
|
3
|
+
/** Selection tick: start → changed → end, as one fire-and-forget gesture. */
|
|
4
|
+
export declare function selectionFeedback(): Promise<void>;
|
|
5
|
+
export declare function notificationFeedback(type: HapticNotificationType): Promise<void>;
|
|
6
|
+
//# sourceMappingURL=feedback.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feedback.d.ts","sourceRoot":"","sources":["../../src/shell-native/feedback.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAexF,wBAAsB,cAAc,CAAC,KAAK,GAAE,iBAA2B,GAAG,OAAO,CAAC,IAAI,CAAC,CAOtF;AAED,6EAA6E;AAC7E,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,CASvD;AAED,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC,CAOtF"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { isNativePluginAvailable as e } from "./platform.js";
|
|
2
|
+
import { Haptics as t, ImpactStyle as n, NotificationType as r } from "@capacitor/haptics";
|
|
3
|
+
//#region src/shell-native/feedback.ts
|
|
4
|
+
var i = {
|
|
5
|
+
light: n.Light,
|
|
6
|
+
medium: n.Medium,
|
|
7
|
+
heavy: n.Heavy
|
|
8
|
+
}, a = {
|
|
9
|
+
success: r.Success,
|
|
10
|
+
warning: r.Warning,
|
|
11
|
+
error: r.Error
|
|
12
|
+
};
|
|
13
|
+
async function o(n = "light") {
|
|
14
|
+
if (e("Haptics")) try {
|
|
15
|
+
await t.impact({ style: i[n] });
|
|
16
|
+
} catch {}
|
|
17
|
+
}
|
|
18
|
+
async function s() {
|
|
19
|
+
if (e("Haptics")) try {
|
|
20
|
+
await t.selectionStart(), await t.selectionChanged(), await t.selectionEnd();
|
|
21
|
+
} catch {}
|
|
22
|
+
}
|
|
23
|
+
async function c(n) {
|
|
24
|
+
if (e("Haptics")) try {
|
|
25
|
+
await t.notification({ type: a[n] });
|
|
26
|
+
} catch {}
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
export { o as impactFeedback, c as notificationFeedback, s as selectionFeedback };
|