@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":"web-manifest.d.ts","sourceRoot":"","sources":["../../src/shell-native/web-manifest.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,KAAK,EAAE,eAAe,EAAE,CAAC;IACzB,SAAS,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAClC,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,oBAAoB,EAAE,OAAO,EAAE,CAAC;IAChC,2BAA2B,EAAE,OAAO,CAAC;CACtC;AAED,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,YAAY,EACjB,KAAK,GAAE;IAAE,SAAS,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;CAAO,GACvE,eAAe,CAuDjB"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
//#region src/shell-native/web-manifest.ts
|
|
2
|
+
function e(e, t = {}) {
|
|
3
|
+
let n = {
|
|
4
|
+
id: "/",
|
|
5
|
+
name: e.displayName,
|
|
6
|
+
short_name: e.displayName,
|
|
7
|
+
description: e.description ?? `${e.displayName} — part of the Burdenoff platform.`,
|
|
8
|
+
start_url: "/",
|
|
9
|
+
scope: "/",
|
|
10
|
+
display: "standalone",
|
|
11
|
+
display_override: ["window-controls-overlay", "standalone"],
|
|
12
|
+
orientation: e.orientation === "any" ? "any" : "portrait-primary",
|
|
13
|
+
theme_color: e.brandColor,
|
|
14
|
+
background_color: e.backgroundColor ?? e.brandColor,
|
|
15
|
+
icons: [
|
|
16
|
+
{
|
|
17
|
+
src: "/icons/icon.svg",
|
|
18
|
+
sizes: "any",
|
|
19
|
+
type: "image/svg+xml",
|
|
20
|
+
purpose: "any"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
src: "/icons/icon-192x192.png",
|
|
24
|
+
sizes: "192x192",
|
|
25
|
+
type: "image/png",
|
|
26
|
+
purpose: "any"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
src: "/icons/icon-512x512.png",
|
|
30
|
+
sizes: "512x512",
|
|
31
|
+
type: "image/png",
|
|
32
|
+
purpose: "any"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
src: "/icons/icon-192-maskable.png",
|
|
36
|
+
sizes: "192x192",
|
|
37
|
+
type: "image/png",
|
|
38
|
+
purpose: "maskable"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
src: "/icons/icon-512-maskable.png",
|
|
42
|
+
sizes: "512x512",
|
|
43
|
+
type: "image/png",
|
|
44
|
+
purpose: "maskable"
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
categories: t.categories ?? ["productivity", "business"],
|
|
48
|
+
lang: "en",
|
|
49
|
+
related_applications: [],
|
|
50
|
+
prefer_related_applications: !1
|
|
51
|
+
};
|
|
52
|
+
return t.shortcuts?.length && (n.shortcuts = t.shortcuts), n;
|
|
53
|
+
}
|
|
54
|
+
//#endregion
|
|
55
|
+
export { e as defineWebManifest };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { getDesktopBridge as e } from "./shared/native/desktop.js";
|
|
2
|
+
import { NATIVE_PREVIEW_QUERY_PARAM as t, NATIVE_PREVIEW_STORAGE_KEY as n, applyNativePreview as r, getActiveNativePreview as i, resolveNativePreview as a } from "./shell-native/preview.js";
|
|
3
|
+
import { applyNativePlatformClass as o, getNativePlatform as s, isNativePlatform as c, isNativePluginAvailable as l, isNativePreview as u, isRealNativePlatform as d } from "./shell-native/platform.js";
|
|
4
|
+
import { installMobileRuntimeHooks as f } from "./shell-native/app-lifecycle.js";
|
|
5
|
+
import { configureElectronGlobalKey as p, getElectronGlobalKey as m, getLegacyElectronBridge as h, isDesktopShell as g } from "./shell-native/desktop-bridge.js";
|
|
6
|
+
import { DEFAULT_AUTH_INTERCEPT_PREFIXES as _, installNativeAuthNavigationIntercept as v } from "./shell-native/auth-navigation.js";
|
|
7
|
+
import { showNativeConfirm as y } from "./shell-native/dialog.js";
|
|
8
|
+
import { createDefaultBackButtonHandlers as b, installBackButtonHandler as x, runBackButtonPrecedence as S } from "./shell-native/back-button.js";
|
|
9
|
+
import { showNativeActionSheet as C } from "./shell-native/actionSheet.js";
|
|
10
|
+
import { installExternalUrlOpener as w, openExternalUrl as T } from "./shell-native/browser.js";
|
|
11
|
+
import { writeClipboardText as E } from "./shell-native/clipboard.js";
|
|
12
|
+
import { impactFeedback as D, notificationFeedback as O, selectionFeedback as k } from "./shell-native/feedback.js";
|
|
13
|
+
import { showNativeToast as A } from "./shell-native/toast.js";
|
|
14
|
+
import { shareContent as j } from "./shell-native/share.js";
|
|
15
|
+
import { installNativeBridge as M } from "./shell-native/bridge.js";
|
|
16
|
+
import { clearDeepLinkNavigator as N, deepLinkUrlToPath as P, installDeepLinkHandler as F, navigateDeepLinkPath as I, registerDeepLinkNavigator as L } from "./shell-native/deep-link.js";
|
|
17
|
+
import { populateDeviceInfo as R } from "./shell-native/device.js";
|
|
18
|
+
import { KEYBOARD_HEIGHT_CSS_VAR as z, KEYBOARD_OPEN_CLASS as B, configureKeyboard as V, keyboardHandlers as H } from "./shell-native/keyboard.js";
|
|
19
|
+
import { NETWORK_STATUS_EVENT as U, getLastNetworkStatus as W, installNetworkListener as G } from "./shell-native/network.js";
|
|
20
|
+
import { notifyOtaReady as K } from "./shell-native/ota.js";
|
|
21
|
+
import { PUSH_TOKEN_EVENT as q, installPushNotifications as J, requestPushPermission as Y } from "./shell-native/push.js";
|
|
22
|
+
import { PWA_INSTALLED_EVENT as X, PWA_INSTALL_AVAILABLE_EVENT as Z, PWA_UPDATE_READY_EVENT as Q, installPwa as $, installPwaPrompt as ee, isPwaEligibleHost as te, resetPwaForTests as ne } from "./shell-native/pwa.js";
|
|
23
|
+
import { APP_READY_EVENT as re, armSplashSafetyTimer as ie, isAppReady as ae, markAppReady as oe, resetAppReadyForTests as se } from "./shell-native/splash.js";
|
|
24
|
+
import { DARK_FAMILY_THEMES as ce, applyStatusBarTheme as le, installStatusBarThemeListener as ue, isDarkThemeName as de, resolveDocumentIsDark as fe, statusBarDetailIsDark as pe } from "./shell-native/system-bars.js";
|
|
25
|
+
import { bootNativeShell as me, resetNativeShellBootForTests as he } from "./shell-native/boot.js";
|
|
26
|
+
import { defineCapacitorConfig as ge } from "./shell-native/capacitor-config.js";
|
|
27
|
+
import { defineWebManifest as _e } from "./shell-native/web-manifest.js";
|
|
28
|
+
import { SERVICE_WORKER_TEMPLATE as ve, renderServiceWorker as ye } from "./shell-native/service-worker.js";
|
|
29
|
+
export { re as APP_READY_EVENT, ce as DARK_FAMILY_THEMES, _ as DEFAULT_AUTH_INTERCEPT_PREFIXES, z as KEYBOARD_HEIGHT_CSS_VAR, B as KEYBOARD_OPEN_CLASS, t as NATIVE_PREVIEW_QUERY_PARAM, n as NATIVE_PREVIEW_STORAGE_KEY, U as NETWORK_STATUS_EVENT, q as PUSH_TOKEN_EVENT, X as PWA_INSTALLED_EVENT, Z as PWA_INSTALL_AVAILABLE_EVENT, Q as PWA_UPDATE_READY_EVENT, ve as SERVICE_WORKER_TEMPLATE, o as applyNativePlatformClass, r as applyNativePreview, le as applyStatusBarTheme, ie as armSplashSafetyTimer, me as bootNativeShell, N as clearDeepLinkNavigator, p as configureElectronGlobalKey, V as configureKeyboard, b as createDefaultBackButtonHandlers, P as deepLinkUrlToPath, ge as defineCapacitorConfig, _e as defineWebManifest, i as getActiveNativePreview, e as getDesktopBridge, m as getElectronGlobalKey, W as getLastNetworkStatus, h as getLegacyElectronBridge, s as getNativePlatform, D as impactFeedback, x as installBackButtonHandler, F as installDeepLinkHandler, w as installExternalUrlOpener, f as installMobileRuntimeHooks, v as installNativeAuthNavigationIntercept, M as installNativeBridge, G as installNetworkListener, J as installPushNotifications, $ as installPwa, ee as installPwaPrompt, ue as installStatusBarThemeListener, ae as isAppReady, de as isDarkThemeName, g as isDesktopShell, c as isNativePlatform, l as isNativePluginAvailable, u as isNativePreview, te as isPwaEligibleHost, d as isRealNativePlatform, H as keyboardHandlers, oe as markAppReady, I as navigateDeepLinkPath, O as notificationFeedback, K as notifyOtaReady, T as openExternalUrl, R as populateDeviceInfo, L as registerDeepLinkNavigator, ye as renderServiceWorker, Y as requestPushPermission, se as resetAppReadyForTests, he as resetNativeShellBootForTests, ne as resetPwaForTests, fe as resolveDocumentIsDark, a as resolveNativePreview, S as runBackButtonPrecedence, k as selectionFeedback, j as shareContent, C as showNativeActionSheet, y as showNativeConfirm, A as showNativeToast, pe as statusBarDetailIsDark, E as writeClipboardText };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ActionSheetButton } from '../shared/native/types';
|
|
2
|
+
export interface ActionSheetProps {
|
|
3
|
+
open: boolean;
|
|
4
|
+
onOpenChange: (open: boolean) => void;
|
|
5
|
+
/** Sheet heading (also the accessible name). */
|
|
6
|
+
title?: string;
|
|
7
|
+
/** Supporting line under the title. */
|
|
8
|
+
message?: string;
|
|
9
|
+
options: ActionSheetButton[];
|
|
10
|
+
/** Called with the index of the chosen option (cancel is NOT an option index). */
|
|
11
|
+
onSelect: (index: number) => void;
|
|
12
|
+
/** Cancel row label. Default "Cancel". */
|
|
13
|
+
cancelLabel?: string;
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* ActionSheet — the WEB fallback for the OS action sheet.
|
|
18
|
+
*
|
|
19
|
+
* Prefer `useActionSheet()` (`@burdenoff/fe-libs/shared/native`), which uses the
|
|
20
|
+
* native sheet on Capacitor shells and renders this component only when no
|
|
21
|
+
* native sheet exists. Rows are 48px (≥44px native target, spec §5.7),
|
|
22
|
+
* destructive rows use the error status token, and the cancel row is separated.
|
|
23
|
+
*
|
|
24
|
+
* DOM contract: `[data-action-sheet]` on the sheet body,
|
|
25
|
+
* `[data-action-sheet-option]` on each row (`data-destructive="true"` on
|
|
26
|
+
* destructive rows), `[data-action-sheet-cancel]` on the cancel row.
|
|
27
|
+
*/
|
|
28
|
+
export declare function ActionSheet({ open, onOpenChange, title, message, options, onSelect, cancelLabel, className, }: ActionSheetProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
//# sourceMappingURL=action-sheet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"action-sheet.d.ts","sourceRoot":"","sources":["../../src/ui/action-sheet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAUhE,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uCAAuC;IACvC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAC7B,kFAAkF;IAClF,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,0CAA0C;IAC1C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,OAAO,EACP,OAAO,EACP,QAAQ,EACR,WAAsB,EACtB,SAAS,GACV,EAAE,gBAAgB,2CAmDlB"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { BottomSheet as e, BottomSheetContent as t, BottomSheetDescription as n, BottomSheetHeader as r, BottomSheetTitle as i } from "./bottom-sheet.js";
|
|
2
|
+
import { cn as a } from "../shared-utils.js";
|
|
3
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
4
|
+
//#region src/ui/action-sheet.tsx
|
|
5
|
+
function c({ open: c, onOpenChange: l, title: u, message: d, options: f, onSelect: p, cancelLabel: m = "Cancel", className: h }) {
|
|
6
|
+
return /* @__PURE__ */ o(e, {
|
|
7
|
+
open: c,
|
|
8
|
+
onOpenChange: l,
|
|
9
|
+
children: /* @__PURE__ */ s(t, {
|
|
10
|
+
showCloseButton: !1,
|
|
11
|
+
className: a("gap-2", h),
|
|
12
|
+
children: [
|
|
13
|
+
/* @__PURE__ */ s(r, {
|
|
14
|
+
className: a("px-1 text-center", !u && !d && "sr-only"),
|
|
15
|
+
children: [/* @__PURE__ */ o(i, {
|
|
16
|
+
className: a("text-base", !u && "sr-only"),
|
|
17
|
+
children: u ?? "Actions"
|
|
18
|
+
}), d && /* @__PURE__ */ o(n, { children: d })]
|
|
19
|
+
}),
|
|
20
|
+
/* @__PURE__ */ o("div", {
|
|
21
|
+
"data-action-sheet": "",
|
|
22
|
+
role: "group",
|
|
23
|
+
className: "flex flex-col pb-1",
|
|
24
|
+
children: f.map((e, t) => {
|
|
25
|
+
let n = e.style === "destructive";
|
|
26
|
+
return /* @__PURE__ */ o("button", {
|
|
27
|
+
type: "button",
|
|
28
|
+
"data-action-sheet-option": "",
|
|
29
|
+
"data-destructive": n ? "true" : void 0,
|
|
30
|
+
onClick: () => {
|
|
31
|
+
p(t), l(!1);
|
|
32
|
+
},
|
|
33
|
+
className: a("flex h-12 w-full items-center justify-center rounded-button px-4 text-base font-medium transition-colors", "hover:bg-action-ghost-bgHover focus-visible:outline-none focus-visible:shadow-[var(--shadow-focus)] focus-visible:ring-1 focus-visible:ring-[var(--color-focus-ring)]", n ? "text-status-error-text" : "text-text-primary"),
|
|
34
|
+
children: e.title
|
|
35
|
+
}, `${e.title}-${t}`);
|
|
36
|
+
})
|
|
37
|
+
}),
|
|
38
|
+
/* @__PURE__ */ o("div", {
|
|
39
|
+
className: "mt-1 border-t border-border-subtle pt-2",
|
|
40
|
+
children: /* @__PURE__ */ o("button", {
|
|
41
|
+
type: "button",
|
|
42
|
+
"data-action-sheet-cancel": "",
|
|
43
|
+
onClick: () => l(!1),
|
|
44
|
+
className: "flex h-12 w-full items-center justify-center rounded-button px-4 text-base font-semibold text-text-secondary transition-colors hover:bg-action-ghost-bgHover focus-visible:outline-none focus-visible:shadow-[var(--shadow-focus)] focus-visible:ring-1 focus-visible:ring-[var(--color-focus-ring)]",
|
|
45
|
+
children: m
|
|
46
|
+
})
|
|
47
|
+
})
|
|
48
|
+
]
|
|
49
|
+
})
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
//#endregion
|
|
53
|
+
export { c as ActionSheet };
|
package/dist/ui/badge.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import { HTMLAttributes } from 'react';
|
|
3
3
|
declare const badgeVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "success" | "warning" | "info" | "
|
|
4
|
+
variant?: "default" | "success" | "warning" | "info" | "destructive" | "secondary" | "outline" | null | undefined;
|
|
5
5
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
6
|
export interface BadgeProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
7
7
|
}
|
package/dist/ui/button.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
|
-
variant?: "link" | "default" | "
|
|
4
|
+
variant?: "link" | "default" | "destructive" | "secondary" | "outline" | "ghost" | null | undefined;
|
|
5
5
|
size?: "default" | "icon" | "sm" | "lg" | "icon-sm" | "icon-lg" | null | undefined;
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
7
|
export type ButtonProps = React.ComponentProps<'button'> & VariantProps<typeof buttonVariants> & {
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -42,4 +42,10 @@ export { AuroraBackground, type AuroraBackgroundProps } from './aurora-backgroun
|
|
|
42
42
|
export { Illustration, type IllustrationProps, IllustratedEmptyState, type IllustratedEmptyStateProps, } from './illustration';
|
|
43
43
|
export { GradientText, type GradientTextProps } from './gradient-text';
|
|
44
44
|
export { PagePurpose, type PagePurposeProps, NextSteps, type NextStepsProps, type NextStep, } from './guidance';
|
|
45
|
+
export { NativeWelcome, type NativeWelcomeProps } from './native-welcome';
|
|
46
|
+
export { ActionSheet, type ActionSheetProps } from './action-sheet';
|
|
47
|
+
export { OfflineBanner, type OfflineBannerProps } from './offline-banner';
|
|
48
|
+
export { PullToRefresh, type PullToRefreshProps } from './pull-to-refresh';
|
|
49
|
+
export { PWAUpdateToast, type PWAUpdateToastProps } from './pwa-update-toast';
|
|
50
|
+
export { NativeSelect, type NativeSelectProps, type NativeSelectOption } from './select';
|
|
45
51
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/ui/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAG3F,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,KAAK,YAAY,EACjB,KAAK,oBAAoB,GAC1B,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAG7E,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,kBAAkB,EAClB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,KAAK,uBAAuB,EAC5B,KAAK,gBAAgB,GACtB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EACrB,uBAAuB,EACvB,2BAA2B,EAC3B,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,EACvB,KAAK,4BAA4B,GAClC,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACL,eAAe,EACf,KAAK,qBAAqB,EAC1B,KAAK,6BAA6B,EAClC,KAAK,oBAAoB,GAC1B,MAAM,oBAAo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B,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,gBAAgB,EAAE,KAAK,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AACnF,OAAO,EACL,YAAY,EACZ,KAAK,iBAAiB,EACtB,qBAAqB,EACrB,KAAK,0BAA0B,GAChC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAGvE,OAAO,EACL,WAAW,EACX,KAAK,gBAAgB,EACrB,SAAS,EACT,KAAK,cAAc,EACnB,KAAK,QAAQ,GACd,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,KAAK,kBAAkB,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ModernLandingFeature } from './modern-landing';
|
|
3
|
+
export interface NativeWelcomeProps {
|
|
4
|
+
/** Product display name. Defaults to `useAppShell().productName`. */
|
|
5
|
+
productName?: string;
|
|
6
|
+
/** One-line positioning statement. Defaults to `useAppShell().tagline`. */
|
|
7
|
+
tagline?: string;
|
|
8
|
+
/** Optional headline above the product name (e.g. "Welcome to"). */
|
|
9
|
+
headline?: string;
|
|
10
|
+
/** Up to a handful of highlight slides shown in a swipeable carousel. */
|
|
11
|
+
features?: ModernLandingFeature[];
|
|
12
|
+
primaryCtaLabel?: string;
|
|
13
|
+
secondaryCtaLabel?: string;
|
|
14
|
+
onSignIn: () => void;
|
|
15
|
+
/** Omit to hide the secondary CTA entirely (e.g. invite-only products). */
|
|
16
|
+
onCreateAccount?: () => void;
|
|
17
|
+
/**
|
|
18
|
+
* Legal footer. Defaults to Terms/Privacy links on the product website
|
|
19
|
+
* (`useAppShell().domain`), opened in the OS browser via `nativeOpenUrl`.
|
|
20
|
+
* Pass `null` to hide it.
|
|
21
|
+
*/
|
|
22
|
+
legal?: ReactNode;
|
|
23
|
+
/** Brand logo asset; falls back to the branded initial tile if it 404s. */
|
|
24
|
+
logoSrc?: string;
|
|
25
|
+
className?: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* NativeWelcome — the entry screen for INSTALLED apps (Capacitor native,
|
|
29
|
+
* installed/standalone PWA, Electron desktop).
|
|
30
|
+
*
|
|
31
|
+
* Installed apps must not open on the web marketing landing: app stores reject
|
|
32
|
+
* marketing walls and an installed app should land on a focused sign-in
|
|
33
|
+
* surface. Shells branch their logged-out route on `shouldShowNativeWelcome()`
|
|
34
|
+
* (`@burdenoff/fe-libs/shared/native`) and render this instead of
|
|
35
|
+
* `ModernLanding`:
|
|
36
|
+
*
|
|
37
|
+
* ```tsx
|
|
38
|
+
* if (shouldShowNativeWelcome()) {
|
|
39
|
+
* const routes = getNativeEntryRoutes();
|
|
40
|
+
* return (
|
|
41
|
+
* <NativeWelcome
|
|
42
|
+
* features={LANDING_FEATURES}
|
|
43
|
+
* onSignIn={() => navigate(routes.signIn)}
|
|
44
|
+
* onCreateAccount={() => navigate(routes.createAccount)}
|
|
45
|
+
* />
|
|
46
|
+
* );
|
|
47
|
+
* }
|
|
48
|
+
* ```
|
|
49
|
+
*
|
|
50
|
+
* Full-bleed and safe-area aware, token-only, with the sticky CTA block pinned
|
|
51
|
+
* above the home indicator. The highlights carousel is swipeable (CSS
|
|
52
|
+
* scroll-snap; no JS drag, no auto-advance — so `prefers-reduced-motion` users
|
|
53
|
+
* see no unrequested motion) and marked `data-swipe-ignore` so the shell's
|
|
54
|
+
* back-swipe navigation ignores horizontal drags inside it.
|
|
55
|
+
*
|
|
56
|
+
* DOM contract: `[data-native-welcome]`, `[data-native-welcome-carousel]`,
|
|
57
|
+
* `[data-shell-chrome]` on the header/CTA chrome. Desktop (Electron) constrains
|
|
58
|
+
* the same content to a centered 480px card.
|
|
59
|
+
*/
|
|
60
|
+
export declare function NativeWelcome({ productName, tagline, headline, features, primaryCtaLabel, secondaryCtaLabel, onSignIn, onCreateAccount, legal, logoSrc, className, }: NativeWelcomeProps): import("react/jsx-runtime").JSX.Element;
|
|
61
|
+
//# sourceMappingURL=native-welcome.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"native-welcome.d.ts","sourceRoot":"","sources":["../../src/ui/native-welcome.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAQtE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAE7D,MAAM,WAAW,kBAAkB;IACjC,qEAAqE;IACrE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2EAA2E;IAC3E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oEAAoE;IACpE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yEAAyE;IACzE,QAAQ,CAAC,EAAE,oBAAoB,EAAE,CAAC;IAClC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,2EAA2E;IAC3E,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,2EAA2E;IAC3E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA6BD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,aAAa,CAAC,EAC5B,WAAW,EACX,OAAO,EACP,QAAQ,EACR,QAAa,EACb,eAA2B,EAC3B,iBAAoC,EACpC,QAAQ,EACR,eAAe,EACf,KAAK,EACL,OAA2B,EAC3B,SAAS,GACV,EAAE,kBAAkB,2CAsJpB"}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { isElectron as e } from "../shared/native/platform.js";
|
|
2
|
+
import { useAppShell as t } from "../shared/providers/shell/AppShellContext.js";
|
|
3
|
+
import { cn as n } from "../shared-utils.js";
|
|
4
|
+
import { Button as r } from "./button.js";
|
|
5
|
+
import { nativeImpact as i, nativeOpenUrl as a } from "../shared/native/consumers.js";
|
|
6
|
+
import { SafeAreaView as o } from "../shared/native/SafeAreaView.js";
|
|
7
|
+
import { useCallback as s, useRef as c, useState as l } from "react";
|
|
8
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
9
|
+
//#region src/ui/native-welcome.tsx
|
|
10
|
+
function f({ domain: e }) {
|
|
11
|
+
let t = (t) => () => {
|
|
12
|
+
a(`https://${e}/${t}`);
|
|
13
|
+
};
|
|
14
|
+
return /* @__PURE__ */ d("p", {
|
|
15
|
+
className: "text-center text-xs leading-relaxed text-text-muted",
|
|
16
|
+
children: [
|
|
17
|
+
"By continuing you agree to our",
|
|
18
|
+
" ",
|
|
19
|
+
/* @__PURE__ */ u("button", {
|
|
20
|
+
type: "button",
|
|
21
|
+
onClick: t("terms"),
|
|
22
|
+
className: "text-text-link underline underline-offset-2 hover:text-text-linkHover",
|
|
23
|
+
children: "Terms"
|
|
24
|
+
}),
|
|
25
|
+
" ",
|
|
26
|
+
"and",
|
|
27
|
+
" ",
|
|
28
|
+
/* @__PURE__ */ u("button", {
|
|
29
|
+
type: "button",
|
|
30
|
+
onClick: t("privacy"),
|
|
31
|
+
className: "text-text-link underline underline-offset-2 hover:text-text-linkHover",
|
|
32
|
+
children: "Privacy Policy"
|
|
33
|
+
}),
|
|
34
|
+
"."
|
|
35
|
+
]
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
function p({ productName: a, tagline: p, headline: m, features: h = [], primaryCtaLabel: g = "Sign in", secondaryCtaLabel: _ = "Create account", onSignIn: v, onCreateAccount: y, legal: b, logoSrc: x = "/icons/icon.svg", className: S }) {
|
|
39
|
+
let C = t(), w = a ?? C.productName, T = p ?? C.tagline, [E, D] = l(!1), [O, k] = l(0), A = c(null), j = e(), M = s(() => {
|
|
40
|
+
let e = A.current;
|
|
41
|
+
if (!e) return;
|
|
42
|
+
let t = e.clientWidth || 1;
|
|
43
|
+
k(Math.round(e.scrollLeft / t));
|
|
44
|
+
}, []), N = s((e) => {
|
|
45
|
+
let t = A.current;
|
|
46
|
+
t && t.scrollTo({
|
|
47
|
+
left: e * t.clientWidth,
|
|
48
|
+
behavior: "smooth"
|
|
49
|
+
});
|
|
50
|
+
}, []), P = (e) => () => {
|
|
51
|
+
e && (i("light"), e());
|
|
52
|
+
}, F = b === void 0 ? C.domain ? /* @__PURE__ */ u(f, { domain: C.domain }) : null : b;
|
|
53
|
+
return /* @__PURE__ */ u(o, {
|
|
54
|
+
"data-native-welcome": "",
|
|
55
|
+
className: n("flex min-h-[100dvh] flex-col bg-bg-canvas text-text-primary", j && "items-center justify-center", S),
|
|
56
|
+
children: /* @__PURE__ */ d("div", {
|
|
57
|
+
className: n("flex flex-1 flex-col", j && "my-auto w-full max-w-[480px] rounded-card border border-border-subtle bg-bg-surface shadow-elevation-3"),
|
|
58
|
+
children: [
|
|
59
|
+
/* @__PURE__ */ d("header", {
|
|
60
|
+
"data-shell-chrome": "",
|
|
61
|
+
className: "flex flex-col items-center gap-4 px-6 pb-6 pt-12 text-center",
|
|
62
|
+
children: [
|
|
63
|
+
E ? /* @__PURE__ */ u("span", {
|
|
64
|
+
"aria-hidden": "true",
|
|
65
|
+
className: "flex size-16 items-center justify-center rounded-2xl bg-action-primary-bg text-2xl font-semibold text-action-primary-text shadow-elevation-1",
|
|
66
|
+
children: C.brandInitial
|
|
67
|
+
}) : /* @__PURE__ */ u("img", {
|
|
68
|
+
src: x,
|
|
69
|
+
alt: "",
|
|
70
|
+
"aria-hidden": "true",
|
|
71
|
+
onError: () => D(!0),
|
|
72
|
+
className: "size-16 rounded-2xl object-contain"
|
|
73
|
+
}),
|
|
74
|
+
m && /* @__PURE__ */ u("p", {
|
|
75
|
+
className: "text-sm font-medium uppercase tracking-wide text-text-muted",
|
|
76
|
+
children: m
|
|
77
|
+
}),
|
|
78
|
+
/* @__PURE__ */ u("h1", {
|
|
79
|
+
className: "text-3xl font-bold tracking-tight text-text-primary",
|
|
80
|
+
children: w
|
|
81
|
+
}),
|
|
82
|
+
T && /* @__PURE__ */ u("p", {
|
|
83
|
+
className: "max-w-sm text-base leading-relaxed text-text-secondary",
|
|
84
|
+
children: T
|
|
85
|
+
})
|
|
86
|
+
]
|
|
87
|
+
}),
|
|
88
|
+
h.length > 0 && /* @__PURE__ */ d("section", {
|
|
89
|
+
className: "flex flex-1 flex-col justify-center gap-4 py-2",
|
|
90
|
+
children: [/* @__PURE__ */ u("div", {
|
|
91
|
+
ref: A,
|
|
92
|
+
"data-native-welcome-carousel": "",
|
|
93
|
+
"data-swipe-ignore": "",
|
|
94
|
+
onScroll: M,
|
|
95
|
+
className: "flex snap-x snap-mandatory overflow-x-auto scroll-smooth",
|
|
96
|
+
children: h.map((e) => {
|
|
97
|
+
let t = e.icon;
|
|
98
|
+
return /* @__PURE__ */ d("article", {
|
|
99
|
+
className: "flex w-full shrink-0 snap-center flex-col items-center gap-3 px-8 text-center",
|
|
100
|
+
children: [
|
|
101
|
+
t && /* @__PURE__ */ u("span", {
|
|
102
|
+
className: "flex size-12 items-center justify-center rounded-xl bg-bg-accentSubtle text-action-primary-bg",
|
|
103
|
+
children: /* @__PURE__ */ u(t, { className: "size-6" })
|
|
104
|
+
}),
|
|
105
|
+
/* @__PURE__ */ u("h2", {
|
|
106
|
+
className: "text-lg font-semibold text-text-primary",
|
|
107
|
+
children: e.title
|
|
108
|
+
}),
|
|
109
|
+
/* @__PURE__ */ u("p", {
|
|
110
|
+
className: "max-w-sm text-sm leading-relaxed text-text-secondary",
|
|
111
|
+
children: e.description
|
|
112
|
+
})
|
|
113
|
+
]
|
|
114
|
+
}, e.title);
|
|
115
|
+
})
|
|
116
|
+
}), h.length > 1 && /* @__PURE__ */ u("div", {
|
|
117
|
+
className: "flex items-center justify-center gap-2",
|
|
118
|
+
children: h.map((e, t) => /* @__PURE__ */ u("button", {
|
|
119
|
+
type: "button",
|
|
120
|
+
"aria-current": t === O ? "true" : void 0,
|
|
121
|
+
"aria-label": `Show highlight: ${e.title}`,
|
|
122
|
+
onClick: () => N(t),
|
|
123
|
+
className: n("size-2 rounded-full transition-colors", t === O ? "bg-action-primary-bg" : "bg-border-strong")
|
|
124
|
+
}, e.title))
|
|
125
|
+
})]
|
|
126
|
+
}),
|
|
127
|
+
/* @__PURE__ */ d("footer", {
|
|
128
|
+
"data-shell-chrome": "",
|
|
129
|
+
className: "mt-auto flex flex-col gap-3 border-t border-border-subtle bg-bg-canvas px-6 pb-6 pt-4",
|
|
130
|
+
children: [
|
|
131
|
+
/* @__PURE__ */ u(r, {
|
|
132
|
+
size: "lg",
|
|
133
|
+
className: "w-full",
|
|
134
|
+
onClick: P(v),
|
|
135
|
+
children: g
|
|
136
|
+
}),
|
|
137
|
+
y && /* @__PURE__ */ u(r, {
|
|
138
|
+
size: "lg",
|
|
139
|
+
variant: "ghost",
|
|
140
|
+
className: "w-full",
|
|
141
|
+
onClick: P(y),
|
|
142
|
+
children: _
|
|
143
|
+
}),
|
|
144
|
+
F
|
|
145
|
+
]
|
|
146
|
+
})
|
|
147
|
+
]
|
|
148
|
+
})
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
//#endregion
|
|
152
|
+
export { p as NativeWelcome };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface OfflineBannerProps {
|
|
2
|
+
/** Offline copy. Default: "You're offline — changes will sync when you reconnect." */
|
|
3
|
+
message?: string;
|
|
4
|
+
/** Reconnect confirmation copy. Default: "Back online". */
|
|
5
|
+
onlineMessage?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* OfflineBanner — the global connectivity banner (spec §5.6).
|
|
10
|
+
*
|
|
11
|
+
* Pinned below the safe-area/top-bar, non-blocking, and never color-only (icon
|
|
12
|
+
* + text). Stays up for the whole outage, then flashes a brief "Back online"
|
|
13
|
+
* confirmation and hides itself. Connectivity comes from `useNetworkStatus()`
|
|
14
|
+
* (shell-native `burdenoff:networkStatusChange` on native, browser
|
|
15
|
+
* `online`/`offline` on web), so it works with or without `bootNativeShell`.
|
|
16
|
+
*
|
|
17
|
+
* Mount it once per shell, inside the app root (above the router outlet).
|
|
18
|
+
*
|
|
19
|
+
* DOM contract: `[data-offline-banner]` with `data-state="offline" | "online"`.
|
|
20
|
+
*/
|
|
21
|
+
export declare function OfflineBanner({ message, onlineMessage, className, }: OfflineBannerProps): import("react/jsx-runtime").JSX.Element | null;
|
|
22
|
+
//# sourceMappingURL=offline-banner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"offline-banner.d.ts","sourceRoot":"","sources":["../../src/ui/offline-banner.tsx"],"names":[],"mappings":"AASA,MAAM,WAAW,kBAAkB;IACjC,sFAAsF;IACtF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,2DAA2D;IAC3D,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,EAC5B,OAAkE,EAClE,aAA6B,EAC7B,SAAS,GACV,EAAE,kBAAkB,kDA6CpB"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { cn as e } from "../shared-utils.js";
|
|
2
|
+
import { useNetworkStatus as t } from "../shared/native/hooks/useNetworkStatus.js";
|
|
3
|
+
import { useEffect as n, useRef as r, useState as i } from "react";
|
|
4
|
+
import { CloudOff as a, Wifi as o } from "lucide-react";
|
|
5
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
6
|
+
//#region src/ui/offline-banner.tsx
|
|
7
|
+
var l = 2500;
|
|
8
|
+
function u({ message: u = "You're offline — changes will sync when you reconnect.", onlineMessage: d = "Back online", className: f }) {
|
|
9
|
+
let { connected: p } = t(), m = r(!1), [h, g] = i(!1);
|
|
10
|
+
if (n(() => {
|
|
11
|
+
if (!p) {
|
|
12
|
+
m.current = !0, g(!1);
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
if (!m.current) return;
|
|
16
|
+
m.current = !1, g(!0);
|
|
17
|
+
let e = setTimeout(() => g(!1), l);
|
|
18
|
+
return () => clearTimeout(e);
|
|
19
|
+
}, [p]), p && !h) return null;
|
|
20
|
+
let _ = !p;
|
|
21
|
+
return /* @__PURE__ */ c("div", {
|
|
22
|
+
"data-offline-banner": "",
|
|
23
|
+
"data-state": _ ? "offline" : "online",
|
|
24
|
+
role: "status",
|
|
25
|
+
"aria-live": "polite",
|
|
26
|
+
className: e("fixed inset-x-0 z-[130] flex items-center justify-center gap-2 px-4 py-2 text-sm font-medium", "border-b", _ ? "bg-status-warning-bg-subtle border-status-warning-border text-status-warning-text" : "bg-status-success-bg-subtle border-status-success-border text-status-success-text", f),
|
|
27
|
+
children: [s(_ ? a : o, {
|
|
28
|
+
className: "size-4 shrink-0",
|
|
29
|
+
"aria-hidden": "true"
|
|
30
|
+
}), /* @__PURE__ */ s("span", { children: _ ? u : d })]
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
34
|
+
export { u as OfflineBanner };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface PullToRefreshProps {
|
|
3
|
+
/** Runs when the gesture completes past the threshold. */
|
|
4
|
+
onRefresh: () => Promise<void> | void;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
/** Finger travel (px) required to arm the refresh. Default 72. */
|
|
7
|
+
threshold?: number;
|
|
8
|
+
/** Hard-disable the gesture. */
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
/** Enablement override; defaults to `isNative()`. Pass `true` for installed PWAs. */
|
|
11
|
+
enabled?: boolean;
|
|
12
|
+
/** Accessible label for the indicator. Default "Refreshing". */
|
|
13
|
+
label?: string;
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* PullToRefresh — scroll container with the native pull-to-refresh gesture
|
|
18
|
+
* (spec §5.7): only engages at `scrollTop === 0`, fires `impact('medium')` on
|
|
19
|
+
* crossing the threshold and `notify('success')` once the refresh resolves.
|
|
20
|
+
*
|
|
21
|
+
* The wrapper OWNS the scrolling (`overflow-y:auto`), so give it a bounded
|
|
22
|
+
* height (e.g. `className="h-full"` inside a flex column).
|
|
23
|
+
*
|
|
24
|
+
* DOM contract: `[data-pull-to-refresh]` on the scroller (its CSS sets
|
|
25
|
+
* `overscroll-behavior-y: contain`), `[data-pull-to-refresh-indicator]` on the
|
|
26
|
+
* indicator, `data-state="idle" | "pulling" | "armed" | "refreshing"`.
|
|
27
|
+
*/
|
|
28
|
+
export declare function PullToRefresh({ onRefresh, children, threshold, disabled, enabled, label, className, }: PullToRefreshProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
//# sourceMappingURL=pull-to-refresh.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pull-to-refresh.d.ts","sourceRoot":"","sources":["../../src/ui/pull-to-refresh.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMvC,MAAM,WAAW,kBAAkB;IACjC,0DAA0D;IAC1D,SAAS,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACtC,QAAQ,EAAE,SAAS,CAAC;IACpB,kEAAkE;IAClE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gCAAgC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qFAAqF;IACrF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gEAAgE;IAChE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAAC,EAC5B,SAAS,EACT,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,OAAO,EACP,KAAoB,EACpB,SAAS,GACV,EAAE,kBAAkB,2CA8CpB"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { cn as e } from "../shared-utils.js";
|
|
2
|
+
import { usePullToRefresh as t } from "../shared/native/hooks/usePullToRefresh.js";
|
|
3
|
+
import { ArrowDown as n, Loader2 as r } from "lucide-react";
|
|
4
|
+
import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
5
|
+
//#region src/ui/pull-to-refresh.tsx
|
|
6
|
+
function s({ onRefresh: s, children: c, threshold: l, disabled: u, enabled: d, label: f = "Refreshing", className: p }) {
|
|
7
|
+
let { bind: m, pulling: h, progress: g, offset: _, refreshing: v } = t({
|
|
8
|
+
onRefresh: s,
|
|
9
|
+
threshold: l,
|
|
10
|
+
disabled: u,
|
|
11
|
+
enabled: d
|
|
12
|
+
}), y = g >= 1, b = v ? "refreshing" : y ? "armed" : h ? "pulling" : "idle", x = h || v;
|
|
13
|
+
return /* @__PURE__ */ o("div", {
|
|
14
|
+
"data-pull-to-refresh": "",
|
|
15
|
+
"data-state": b,
|
|
16
|
+
className: e("relative h-full overflow-y-auto", p),
|
|
17
|
+
...m,
|
|
18
|
+
children: [/* @__PURE__ */ a("div", {
|
|
19
|
+
"data-pull-to-refresh-indicator": "",
|
|
20
|
+
"aria-hidden": !v,
|
|
21
|
+
className: "pointer-events-none absolute inset-x-0 top-0 z-[1] flex justify-center",
|
|
22
|
+
style: {
|
|
23
|
+
transform: `translateY(${x ? Math.max(_, v ? 32 : 0) : 0}px)`,
|
|
24
|
+
opacity: x ? Math.max(g, +!!v) : 0
|
|
25
|
+
},
|
|
26
|
+
children: /* @__PURE__ */ a("span", {
|
|
27
|
+
className: "mt-2 flex size-9 items-center justify-center rounded-full border border-border-subtle bg-bg-elevated text-text-secondary shadow-elevation-2",
|
|
28
|
+
children: v ? /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ a(r, {
|
|
29
|
+
className: "size-4 animate-spin",
|
|
30
|
+
"aria-hidden": "true"
|
|
31
|
+
}), /* @__PURE__ */ a("span", {
|
|
32
|
+
className: "sr-only",
|
|
33
|
+
children: f
|
|
34
|
+
})] }) : /* @__PURE__ */ a(n, {
|
|
35
|
+
className: "size-4 transition-transform duration-200",
|
|
36
|
+
style: { transform: y ? "rotate(180deg)" : void 0 },
|
|
37
|
+
"aria-hidden": "true"
|
|
38
|
+
})
|
|
39
|
+
})
|
|
40
|
+
}), c]
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
//#endregion
|
|
44
|
+
export { s as PullToRefresh };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export interface PWAUpdateToastProps {
|
|
2
|
+
/**
|
|
3
|
+
* Force the toast on/off. Omit to let the component listen for
|
|
4
|
+
* `burdenoff:pwaUpdateReady` itself (e.g. pass `usePWA().hasUpdate` when the
|
|
5
|
+
* shell already owns a `usePWA()` instance).
|
|
6
|
+
*/
|
|
7
|
+
hasUpdate?: boolean;
|
|
8
|
+
message?: string;
|
|
9
|
+
actionLabel?: string;
|
|
10
|
+
/** Override the reload action (default: `window.location.reload()`). */
|
|
11
|
+
onReload?: () => void;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* PWAUpdateToast — persistent "Update ready" snackbar for installed PWAs.
|
|
16
|
+
*
|
|
17
|
+
* Self-contained on purpose: it needs no provider and does NOT call `usePWA()`
|
|
18
|
+
* (which registers/polls the service worker — a second instance would duplicate
|
|
19
|
+
* that work). It listens for the shell-native `burdenoff:pwaUpdateReady` event,
|
|
20
|
+
* or renders from the `hasUpdate` prop when the shell already has a `usePWA()`.
|
|
21
|
+
*
|
|
22
|
+
* Shells mount it once, near the root:
|
|
23
|
+
* ```tsx
|
|
24
|
+
* <PWAUpdateToast />
|
|
25
|
+
* ```
|
|
26
|
+
* `AppShellProvider` shells already get an update banner from
|
|
27
|
+
* `PWAInstallBanner`; mount this only in shells that don't use that provider,
|
|
28
|
+
* or that want the snackbar treatment instead.
|
|
29
|
+
*
|
|
30
|
+
* DOM contract: `[data-pwa-update-toast]`, safe-area aware, sits above the
|
|
31
|
+
* mobile tab bar via `--mobile-tabbar-height`.
|
|
32
|
+
*/
|
|
33
|
+
export declare function PWAUpdateToast({ hasUpdate, message, actionLabel, onReload, className, }: PWAUpdateToastProps): import("react/jsx-runtime").JSX.Element | null;
|
|
34
|
+
//# sourceMappingURL=pwa-update-toast.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pwa-update-toast.d.ts","sourceRoot":"","sources":["../../src/ui/pwa-update-toast.tsx"],"names":[],"mappings":"AASA,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wEAAwE;IACxE,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,cAAc,CAAC,EAC7B,SAAS,EACT,OAAmC,EACnC,WAAsB,EACtB,QAAQ,EACR,SAAS,GACV,EAAE,mBAAmB,kDAsCrB"}
|