@capgo/capacitor-native-navigation 8.3.2 → 8.4.1
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 +16 -36
- package/android/build.gradle +0 -2
- package/android/src/main/java/app/capgo/nativenavigation/NativeNavigationPlugin.java +16 -5
- package/dist/docs.json +1 -1
- package/dist/esm/definitions.d.ts +4 -2
- package/dist/esm/definitions.js.map +1 -1
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js.map +1 -1
- package/docs/iphone-duo-folded-center.webp +0 -0
- package/docs/iphone-duo-folded-system.webp +0 -0
- package/docs/iphone-duo-open-center.webp +0 -0
- package/docs/iphone-duo-open-system.webp +0 -0
- package/docs/iphone-duo-unfold.webp +0 -0
- package/ios/Sources/NativeNavigationPlugin/NativeNavigationPlugin.swift +74 -18
- package/package.json +14 -14
package/README.md
CHANGED
|
@@ -20,47 +20,27 @@
|
|
|
20
20
|
|
|
21
21
|
Native navbar, tabbar, safe-area handling, and WebView snapshot transitions for Capacitor apps. Your web framework keeps routing and page rendering while this plugin owns the platform surfaces users expect to feel native.
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
<img src="./docs/demo.webp" alt="Demo of capacitor-native-navigation in action" width="300" />
|
|
26
|
-
|
|
27
|
-
### Native navigation tap flow
|
|
23
|
+
**iOS 27 and iPhone Duo.** System tab bars, Liquid Glass, and the curved center button follow the window when a Duo folds and unfolds.
|
|
28
24
|
|
|
29
|
-
|
|
30
|
-
src="./docs/demo-navigation.webp"
|
|
31
|
-
alt="Animated native navigation tap flow showing tab selection, push transition, and native back"
|
|
32
|
-
width="320"
|
|
33
|
-
/>
|
|
34
|
-
|
|
35
|
-
### SVG icon descriptors
|
|
36
|
-
|
|
37
|
-
<img
|
|
38
|
-
src="./docs/demo-svg-icons.webp"
|
|
39
|
-
alt="Animated native SVG icon demo showing inline SVG icons, native tint, labels, and tab selection"
|
|
40
|
-
width="320"
|
|
41
|
-
/>
|
|
25
|
+
## Demo
|
|
42
26
|
|
|
43
|
-
|
|
27
|
+
| App | Tap flow | SVG icons | Styling |
|
|
28
|
+
| --- | --- | --- | --- |
|
|
29
|
+
| <img src="./docs/demo.webp" alt="Demo of capacitor-native-navigation in action" width="160" /> | <img src="./docs/demo-navigation.webp" alt="Animated native navigation tap flow showing tab selection, push transition, and native back" width="160" /> | <img src="./docs/demo-svg-icons.webp" alt="Animated native SVG icon demo showing inline SVG icons, native tint, labels, and tab selection" width="160" /> | <img src="./docs/demo-options.webp" alt="Animated native navigation options demo showing dynamic colors, selected labels, custom indicators, badges, system Liquid Glass, and zoom transitions" width="160" /> |
|
|
44
30
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
width="320"
|
|
49
|
-
/>
|
|
31
|
+
| iOS Liquid Glass | Android Liquid Glass | Curved tabbar |
|
|
32
|
+
| --- | --- | --- |
|
|
33
|
+
| <img src="./docs/native-liquid-glass-ios.webp" alt="iOS native Liquid Glass navbar and tabbar screenshot" width="160" /> | <img src="./docs/native-liquid-glass-android.webp" alt="Android Liquid Glass-style native navbar and tabbar screenshot" width="160" /> | <img src="./docs/native-screenshots/android-curved-tabbar.png" alt="Android native curved tabbar with raised center camera action and side margin" width="160" /> |
|
|
50
34
|
|
|
51
|
-
###
|
|
35
|
+
### iPhone Duo
|
|
52
36
|
|
|
53
|
-
|
|
54
|
-
| --- | --- |
|
|
55
|
-
| <img src="./docs/native-liquid-glass-ios.webp" alt="iOS native Liquid Glass navbar and tabbar screenshot" width="260" /> | <img src="./docs/native-liquid-glass-android.webp" alt="Android Liquid Glass-style native navbar and tabbar screenshot" width="260" /> |
|
|
37
|
+
Folded or open, iOS places the system tab bar as a vertical rail on the trailing edge. The curved center bar stays on the bottom, and its cradle stays a circle around the button when the window widens.
|
|
56
38
|
|
|
57
|
-
|
|
39
|
+
| Folded, center | Open, center | Open, system | Folded, system |
|
|
40
|
+
| --- | --- | --- | --- |
|
|
41
|
+
| <img src="./docs/iphone-duo-folded-center.webp" alt="iPhone Duo folded with a curved bottom tab bar and a circular center camera button" width="160" /> | <img src="./docs/iphone-duo-open-center.webp" alt="iPhone Duo open with the curved center camera button keeping a circular cradle" width="220" /> | <img src="./docs/iphone-duo-open-system.webp" alt="iPhone Duo open in landscape with the system tab bar as a vertical rail" width="220" /> | <img src="./docs/iphone-duo-folded-system.webp" alt="iPhone Duo folded with the system tab bar as a vertical rail" width="160" /> |
|
|
58
42
|
|
|
59
|
-
<img
|
|
60
|
-
src="./docs/native-screenshots/android-curved-tabbar.png"
|
|
61
|
-
alt="Android native curved tabbar with raised center camera action and side margin"
|
|
62
|
-
width="300"
|
|
63
|
-
/>
|
|
43
|
+
<img src="./docs/iphone-duo-unfold.webp" alt="iPhone Duo unfolding while the center camera cradle stays a circle around the button" width="280" />
|
|
64
44
|
|
|
65
45
|
## Features
|
|
66
46
|
|
|
@@ -81,7 +61,7 @@ Native navbar, tabbar, safe-area handling, and WebView snapshot transitions for
|
|
|
81
61
|
|
|
82
62
|
## Compatibility
|
|
83
63
|
|
|
84
|
-
`@capgo/capacitor-native-navigation` targets Capacitor 8 and Node.js 22+.
|
|
64
|
+
`@capgo/capacitor-native-navigation` targets Capacitor 8 and Node.js 22+. iOS 27 is supported, including iPhone Duo.
|
|
85
65
|
|
|
86
66
|
## Install
|
|
87
67
|
|
|
@@ -810,7 +790,7 @@ Native tabbar layout and background shape options.
|
|
|
810
790
|
| Prop | Type | Description |
|
|
811
791
|
| --------------------------- | ----------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
812
792
|
| **`shape`** | <code><a href="#nativenavigationtabbarshape">NativeNavigationTabbarShape</a></code> | `floating` keeps the capsule tabbar. On iOS 26+ this uses the system-owned Liquid Glass `UITabBarController` unless a custom capsule path is required; earlier iOS and the custom capsule path use `UIGlassEffect` on iOS 26+ (blur material fallback otherwise). `curve` draws a full-width bar with an included center action. |
|
|
813
|
-
| **`height`** | <code>number</code> | Bar height in native points/dp.
|
|
793
|
+
| **`height`** | <code>number</code> | Bar height in native points/dp, not including the system bottom inset. Curve defaults to `49` on iOS (83pt once the home indicator is added) and `80` on Android (Material navigation bar). Floating defaults to `64`. Pass `height` to override either platform. |
|
|
814
794
|
| **`horizontalMargin`** | <code>number</code> | Horizontal margin in native points/dp. Defaults to `24` for `floating` and `0` for `curve`. |
|
|
815
795
|
| **`maxWidth`** | <code>number</code> | Maximum tabbar width in native points/dp. Defaults to `430` for `floating`; `curve` uses the available width unless this is set. |
|
|
816
796
|
| **`bottomGap`** | <code>number</code> | Bottom gap above the platform safe area in native points/dp. Defaults to `10` for `floating` and `0` for `curve`. |
|
package/android/build.gradle
CHANGED
|
@@ -3,7 +3,6 @@ ext {
|
|
|
3
3
|
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.1'
|
|
4
4
|
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.3.0'
|
|
5
5
|
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.7.0'
|
|
6
|
-
materialVersion = project.hasProperty('materialVersion') ? rootProject.ext.materialVersion : '1.12.0'
|
|
7
6
|
}
|
|
8
7
|
|
|
9
8
|
buildscript {
|
|
@@ -54,7 +53,6 @@ dependencies {
|
|
|
54
53
|
implementation project(':capacitor-android')
|
|
55
54
|
annotationProcessor project(':capacitor-android')
|
|
56
55
|
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
|
|
57
|
-
implementation "com.google.android.material:material:$materialVersion"
|
|
58
56
|
testImplementation "junit:junit:$junitVersion"
|
|
59
57
|
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
|
|
60
58
|
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
|
|
@@ -1510,7 +1510,7 @@ public class NativeNavigationPlugin extends Plugin {
|
|
|
1510
1510
|
String requestedShape = rawStyle.getString("shape", "floating");
|
|
1511
1511
|
boolean curve = "curve".equalsIgnoreCase(requestedShape);
|
|
1512
1512
|
int centerButtonDiameter = Math.max(styleDimension(rawStyle, "centerButtonDiameter", 56), 44);
|
|
1513
|
-
int height = Math.max(styleDimension(rawStyle, "height", curve ?
|
|
1513
|
+
int height = Math.max(styleDimension(rawStyle, "height", curve ? 80 : DEFAULT_TABBAR_DP), 44);
|
|
1514
1514
|
int centerButtonLift = Math.max(styleDimension(rawStyle, "centerButtonLift", centerButtonDiameter / 2), 0);
|
|
1515
1515
|
int bottomGap = Math.max(styleDimension(rawStyle, "bottomGap", curve ? 0 : 10), 0);
|
|
1516
1516
|
int horizontalMargin = Math.max(styleDimension(rawStyle, "horizontalMargin", curve ? 0 : 24), 0);
|
|
@@ -1883,18 +1883,29 @@ public class NativeNavigationPlugin extends Plugin {
|
|
|
1883
1883
|
}
|
|
1884
1884
|
|
|
1885
1885
|
private JSObject currentInsets() {
|
|
1886
|
+
// View layout uses device pixels; CSS variables must be density-independent
|
|
1887
|
+
// or a 3x screen writes `192px` which CSS treats as 192 CSS px.
|
|
1886
1888
|
int top = navbarVisible ? statusBarInset() + dp(DEFAULT_NAVBAR_DP) : 0;
|
|
1887
1889
|
int bottom = tabbarVisible ? navigationBarInset() + dp(tabbarStyle.totalHeight()) + dp(tabbarStyle.bottomGap) : 0;
|
|
1888
1890
|
JSObject insets = new JSObject();
|
|
1889
|
-
insets.put("top", top);
|
|
1891
|
+
insets.put("top", cssPx(top));
|
|
1890
1892
|
insets.put("right", 0);
|
|
1891
|
-
insets.put("bottom", bottom);
|
|
1893
|
+
insets.put("bottom", cssPx(bottom));
|
|
1892
1894
|
insets.put("left", 0);
|
|
1893
|
-
insets.put("navbarHeight", top);
|
|
1894
|
-
insets.put("tabbarHeight", bottom);
|
|
1895
|
+
insets.put("navbarHeight", cssPx(top));
|
|
1896
|
+
insets.put("tabbarHeight", cssPx(bottom));
|
|
1895
1897
|
return insets;
|
|
1896
1898
|
}
|
|
1897
1899
|
|
|
1900
|
+
/** Converts a layout pixel value to CSS pixels for WebView CSS variables. */
|
|
1901
|
+
private int cssPx(int devicePx) {
|
|
1902
|
+
float density = getContext().getResources().getDisplayMetrics().density;
|
|
1903
|
+
if (density <= 0f) {
|
|
1904
|
+
return devicePx;
|
|
1905
|
+
}
|
|
1906
|
+
return Math.round(devicePx / density);
|
|
1907
|
+
}
|
|
1908
|
+
|
|
1898
1909
|
private JSObject insetsResult() {
|
|
1899
1910
|
JSObject result = new JSObject();
|
|
1900
1911
|
result.put("insets", currentInsets());
|
package/dist/docs.json
CHANGED
|
@@ -954,7 +954,7 @@
|
|
|
954
954
|
{
|
|
955
955
|
"name": "height",
|
|
956
956
|
"tags": [],
|
|
957
|
-
"docs": "Bar height in native points/dp
|
|
957
|
+
"docs": "Bar height in native points/dp, not including the system bottom inset.\nCurve defaults to `49` on iOS (83pt once the home indicator is added) and\n`80` on Android (Material navigation bar). Floating defaults to `64`.\nPass `height` to override either platform.",
|
|
958
958
|
"complexTypes": [],
|
|
959
959
|
"type": "number | undefined"
|
|
960
960
|
},
|
|
@@ -351,8 +351,10 @@ export interface NativeNavigationTabbarStyle {
|
|
|
351
351
|
*/
|
|
352
352
|
shape?: NativeNavigationTabbarShape;
|
|
353
353
|
/**
|
|
354
|
-
* Bar height in native points/dp
|
|
355
|
-
*
|
|
354
|
+
* Bar height in native points/dp, not including the system bottom inset.
|
|
355
|
+
* Curve defaults to `49` on iOS (83pt once the home indicator is added) and
|
|
356
|
+
* `80` on Android (Material navigation bar). Floating defaults to `64`.
|
|
357
|
+
* Pass `height` to override either platform.
|
|
356
358
|
*/
|
|
357
359
|
height?: number;
|
|
358
360
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["import type { PluginListenerHandle } from '@capacitor/core';\n\n/**\n * Platform rendering preference for the native bars.\n */\nexport type NativeNavigationPlatformStyle = 'auto' | 'ios' | 'android';\n\n/**\n * How the plugin exposes native bar sizes to web content.\n */\nexport type NativeNavigationContentInsetMode = 'css' | 'none';\n\n/**\n * Navigation animation direction.\n */\nexport type NativeNavigationTransitionDirection = 'forward' | 'back' | 'root' | 'tab' | 'zoom' | 'none';\n\n/**\n * Native material/blur effect preference.\n */\nexport type NativeNavigationBlurEffect =\n | 'none'\n | 'systemDefault'\n | 'extraLight'\n | 'light'\n | 'dark'\n | 'regular'\n | 'prominent'\n | 'systemUltraThinMaterial'\n | 'systemThinMaterial'\n | 'systemMaterial'\n | 'systemThickMaterial'\n | 'systemChromeMaterial'\n | 'systemUltraThinMaterialLight'\n | 'systemThinMaterialLight'\n | 'systemMaterialLight'\n | 'systemThickMaterialLight'\n | 'systemChromeMaterialLight'\n | 'systemUltraThinMaterialDark'\n | 'systemThinMaterialDark'\n | 'systemMaterialDark'\n | 'systemThickMaterialDark'\n | 'systemChromeMaterialDark';\n\n/**\n * Native glass background rendering preference.\n */\nexport type NativeNavigationGlassEffect = 'none' | 'liquidGlass';\n\n/**\n * Native glass background configuration.\n */\nexport interface NativeNavigationGlassOptions {\n /**\n * `liquidGlass` enables the Android 12+ live blurred WebView backdrop for\n * native bars. Android 11 and older keep a translucent surface fallback. iOS\n * uses the platform-owned Liquid Glass behavior.\n */\n effect?: NativeNavigationGlassEffect;\n\n /**\n * Android blur radius in native dp for `liquidGlass`. Defaults to `18`.\n */\n blurRadius?: number;\n\n /**\n * Alpha multiplier for the tint surface over the glass backdrop. Defaults to\n * `0.62`.\n */\n surfaceAlpha?: number;\n}\n\n/**\n * Native tab label visibility behavior.\n */\nexport type NativeNavigationTabLabelVisibilityMode = 'auto' | 'selected' | 'labeled' | 'unlabeled';\n\n/**\n * A rectangle in WebView viewport coordinates, expressed in native points/dp.\n */\nexport interface NativeNavigationRect {\n x: number;\n y: number;\n width: number;\n height: number;\n}\n\n/**\n * Native tabbar background shape.\n */\nexport type NativeNavigationTabbarShape = 'floating' | 'curve';\n\n/**\n * Native tab role for Liquid Glass tab bars.\n *\n * `search` (and `prominent` when the OS supports it) renders as a detached\n * trailing circular action beside the floating tab capsule — the Apple News /\n * Photos pattern. Only one detached trailing role is used; if multiple tabs\n * set `search` or `prominent`, the last one wins. Curve-shaped bars ignore\n * `role` and keep using the included center action instead.\n */\nexport type NativeNavigationTabRole = 'normal' | 'search' | 'prominent';\n\n/**\n * A serializable icon descriptor. Framework nodes are intentionally not accepted\n * because icons are rendered by native UI.\n */\nexport interface NativeNavigationIcon {\n /**\n * Cross-platform asset path or URL fallback.\n */\n src?: string;\n\n /**\n * Cross-platform inline SVG markup. The native renderers support common icon\n * shapes such as path, line, polyline, polygon, circle, and rect. SVG icons\n * are rendered as template images by default so native tint colors still\n * apply.\n */\n svg?: string;\n\n /**\n * Preferred rendered icon width in native points/dp. Defaults to `24`.\n */\n width?: number;\n\n /**\n * Preferred rendered icon height in native points/dp. Defaults to `24`.\n */\n height?: number;\n\n /**\n * When `true`, native tint colors are applied to the rendered SVG/image.\n * Defaults to `true`.\n */\n template?: boolean;\n\n /**\n * iOS-specific SF Symbol, bundled image name, or inline SVG.\n */\n ios?: {\n /**\n * SF Symbol name, for example `house.fill`.\n */\n sfSymbol?: string;\n\n /**\n * Bundled image name from the app asset catalog.\n */\n image?: string;\n\n /**\n * iOS-specific inline SVG markup.\n */\n svg?: string;\n };\n\n /**\n * Android-specific drawable resource, asset name, or inline SVG.\n */\n android?: {\n /**\n * Drawable resource name without the `R.drawable.` prefix.\n */\n resource?: string;\n\n /**\n * Bundled image asset name.\n */\n image?: string;\n\n /**\n * Android-specific inline SVG markup.\n */\n svg?: string;\n };\n}\n\n/**\n * Native bar colors. Use CSS-style hex strings (`#RRGGBB` or `#AARRGGBB`).\n */\nexport interface NativeNavigationColors {\n /**\n * When `true`, Android 12+ derives unspecified bar colors from Material You\n * system palettes. Explicit color fields still win.\n */\n dynamic?: boolean;\n\n /**\n * Tint color for active buttons/items.\n */\n tint?: string;\n\n /**\n * Color for inactive tab items. Ignored on iOS 26+ unless\n * `experimentalBakedTintColors` is enabled.\n */\n inactiveTint?: string;\n\n /**\n * Optional background tint. Ignored on iOS 26+ so UIKit can preserve the\n * system Liquid Glass navigation appearance.\n */\n background?: string;\n\n /**\n * Title and label text color where the native platform supports it.\n */\n foreground?: string;\n\n /**\n * Badge background color for native tab badges.\n */\n badgeBackground?: string;\n\n /**\n * Badge text color for native tab badges.\n */\n badgeText?: string;\n\n /**\n * Active tab indicator color on Android.\n */\n indicator?: string;\n\n /**\n * Tab press ripple color on Android.\n */\n ripple?: string;\n}\n\n/**\n * Global plugin configuration.\n */\nexport interface NativeNavigationConfigureOptions {\n /**\n * Enables or disables the native chrome host.\n */\n enabled?: boolean;\n\n /**\n * Native style preference. `auto` uses the current platform.\n */\n platformStyle?: NativeNavigationPlatformStyle;\n\n /**\n * When `css`, the plugin writes CSS variables on `document.documentElement`.\n */\n contentInsetMode?: NativeNavigationContentInsetMode;\n\n /**\n * Default native transition duration in milliseconds.\n */\n animationDuration?: number;\n\n /**\n * Shared color hints for native bars.\n */\n colors?: NativeNavigationColors;\n\n /**\n * Shared glass background defaults for native bars.\n */\n glass?: NativeNavigationGlassOptions;\n}\n\n/**\n * A button shown in the native navbar.\n */\nexport interface NativeNavigationBarButton {\n /**\n * Stable id returned in `navbarItemTap`.\n */\n id: string;\n\n /**\n * Visible text label.\n */\n title?: string;\n\n /**\n * Native icon descriptor.\n */\n icon?: NativeNavigationIcon;\n\n /**\n * Whether the action is enabled. Defaults to `true`.\n */\n enabled?: boolean;\n}\n\n/**\n * Native back button configuration.\n */\nexport interface NativeNavigationBackButton {\n /**\n * Show the native back affordance.\n */\n visible?: boolean;\n\n /**\n * Optional back title.\n */\n title?: string;\n}\n\n/**\n * Native navbar state.\n */\nexport interface NativeNavigationNavbarOptions {\n /**\n * Hide the native navbar.\n */\n hidden?: boolean;\n\n /**\n * Main title.\n */\n title?: string;\n\n /**\n * Secondary title where supported by the platform.\n */\n subtitle?: string;\n\n /**\n * Prefer a large iOS title style.\n */\n large?: boolean;\n\n /**\n * Prefer transparent/scroll-edge style.\n */\n transparent?: boolean;\n\n /**\n * iOS blur/material effect for the navbar background when glass is not\n * available. Defaults to `systemChromeMaterial` for transparent bars.\n */\n blurEffect?: NativeNavigationBlurEffect;\n\n /**\n * Optional glass background behavior. Overrides `configure({ glass })` for\n * this navbar update.\n */\n glass?: NativeNavigationGlassOptions;\n\n /**\n * Back button state.\n */\n backButton?: NativeNavigationBackButton;\n\n /**\n * Left-side action buttons.\n */\n leftItems?: NativeNavigationBarButton[];\n\n /**\n * Right-side action buttons.\n */\n rightItems?: NativeNavigationBarButton[];\n\n /**\n * Navbar color hints.\n */\n colors?: NativeNavigationColors;\n\n /**\n * Animate native navbar changes.\n */\n animated?: boolean;\n}\n\n/**\n * A native tab item.\n */\nexport interface NativeNavigationTab {\n /**\n * Stable tab id returned in `tabSelect`.\n */\n id: string;\n\n /**\n * Visible tab label.\n */\n title?: string;\n\n /**\n * Native icon descriptor.\n */\n icon?: NativeNavigationIcon;\n\n /**\n * Optional selected-state icon.\n */\n selectedIcon?: NativeNavigationIcon;\n\n /**\n * Optional badge. Numeric badges are supported on both platforms; text badge\n * support depends on platform capabilities.\n */\n badge?: string | number;\n\n /**\n * Whether the tab is enabled. Defaults to `true`.\n */\n enabled?: boolean;\n\n /**\n * Hide the tab item from the native tabbar. When the hidden tab is selected,\n * native platform constraints may keep it visible until another tab is\n * selected.\n */\n hidden?: boolean;\n\n /**\n * Optional tab role. On floating tabbars, `search` (or `prominent` when\n * available) becomes a detached trailing circular action beside the capsule\n * — including the iOS 26+ system Liquid Glass tab bar, Android floating\n * layout, and the custom floating capsule path. Only one detached trailing\n * role is used; if multiple tabs set `search` or `prominent`, the last one\n * wins. Curve-shaped bars ignore `role` and keep using the included center\n * action. Defaults to `normal`.\n */\n role?: NativeNavigationTabRole;\n}\n\n/**\n * Native tabbar layout and background shape options.\n */\nexport interface NativeNavigationTabbarStyle {\n /**\n * `floating` keeps the capsule tabbar. On iOS 26+ this uses the\n * system-owned Liquid Glass `UITabBarController` unless a custom capsule\n * path is required; earlier iOS and the custom capsule path use\n * `UIGlassEffect` on iOS 26+ (blur material fallback otherwise). `curve`\n * draws a full-width bar with an included center action.\n */\n shape?: NativeNavigationTabbarShape;\n\n /**\n * Bar height in native points/dp. Defaults to `64` for `floating` and `76`\n * for `curve`.\n */\n height?: number;\n\n /**\n * Horizontal margin in native points/dp. Defaults to `24` for `floating` and\n * `0` for `curve`.\n */\n horizontalMargin?: number;\n\n /**\n * Maximum tabbar width in native points/dp. Defaults to `430` for `floating`;\n * `curve` uses the available width unless this is set.\n */\n maxWidth?: number;\n\n /**\n * Bottom gap above the platform safe area in native points/dp. Defaults to\n * `10` for `floating` and `0` for `curve`.\n */\n bottomGap?: number;\n\n /**\n * Background corner radius in native points/dp. Defaults to a capsule radius\n * for `floating` and `0` for `curve`.\n */\n cornerRadius?: number;\n\n /**\n * Tab id promoted into the included center button for `curve`. Defaults to\n * the middle tab.\n */\n centerItemId?: string;\n\n /**\n * Included center button diameter in native points/dp. Defaults to `56`.\n */\n centerButtonDiameter?: number;\n\n /**\n * Distance from the top of the center button to the top edge of the bar in\n * native points/dp. Defaults to half of `centerButtonDiameter`.\n */\n centerButtonLift?: number;\n\n /**\n * Included center button color. Defaults to the active tint color.\n */\n centerButtonColor?: string;\n\n /**\n * Included center button icon color. Defaults to white.\n */\n centerButtonIconColor?: string;\n}\n\n/**\n * Native tabbar state.\n */\nexport interface NativeNavigationTabbarOptions {\n /**\n * Hide the native tabbar.\n */\n hidden?: boolean;\n\n /**\n * Tab definitions.\n */\n tabs?: NativeNavigationTab[];\n\n /**\n * Currently selected tab id.\n */\n selectedId?: string;\n\n /**\n * Show text labels. Defaults to `true`.\n */\n labels?: boolean;\n\n /**\n * Native label visibility mode. Overrides `labels` when provided.\n */\n labelVisibilityMode?: NativeNavigationTabLabelVisibilityMode;\n\n /**\n * Show icons. Defaults to `true`.\n */\n icons?: boolean;\n\n /**\n * Tabbar color hints.\n */\n colors?: NativeNavigationColors;\n\n /**\n * iOS blur/material effect for the tabbar background when glass is not\n * available.\n */\n blurEffect?: NativeNavigationBlurEffect;\n\n /**\n * Optional glass background behavior. Overrides `configure({ glass })` for\n * this tabbar update.\n */\n glass?: NativeNavigationGlassOptions;\n\n /**\n * Opt into the iOS 26 Liquid Glass tint workaround that renders active and\n * inactive tab items into baked images. This can affect badge positioning\n * and icon sizing, so it is disabled by default.\n */\n experimentalBakedTintColors?: boolean;\n\n /**\n * Keep the iOS scroll-edge tabbar appearance from becoming transparent.\n * Mirrors Expo Router native tabs' `disableTransparentOnScrollEdge` option.\n * Defaults to `false`.\n */\n disableTransparentOnScrollEdge?: boolean;\n\n /**\n * Disable the Android active tab indicator.\n */\n disableIndicator?: boolean;\n\n /**\n * Active tab indicator color on Android. `colors.indicator` is also\n * supported.\n */\n indicatorColor?: string;\n\n /**\n * Tab press ripple color on Android. `colors.ripple` is also supported.\n */\n rippleColor?: string;\n\n /**\n * Badge background color. `colors.badgeBackground` is also supported.\n */\n badgeBackgroundColor?: string;\n\n /**\n * Badge text color. `colors.badgeText` is also supported.\n */\n badgeTextColor?: string;\n\n /**\n * Optional native tabbar layout and shape customization.\n */\n style?: NativeNavigationTabbarStyle;\n\n /**\n * Animate native tabbar changes.\n */\n animated?: boolean;\n}\n\n/**\n * Insets exposed to web content.\n */\nexport interface NativeNavigationInsets {\n top: number;\n right: number;\n bottom: number;\n left: number;\n navbarHeight: number;\n tabbarHeight: number;\n}\n\n/**\n * Returned by methods that may change safe content bounds.\n */\nexport interface NativeNavigationInsetsResult {\n insets: NativeNavigationInsets;\n}\n\n/**\n * Begin a native transition transaction before JS changes route content.\n */\nexport interface NativeNavigationBeginTransitionOptions {\n id?: string;\n direction?: NativeNavigationTransitionDirection;\n duration?: number;\n /**\n * Source rectangle for `zoom` transitions. Use viewport coordinates such as\n * those returned by `Element.getBoundingClientRect()`.\n */\n sourceRect?: NativeNavigationRect;\n /**\n * Destination rectangle for shared-element-style `zoom` transitions.\n */\n targetRect?: NativeNavigationRect;\n /**\n * Corner radius used while animating a `zoom` transition.\n */\n cornerRadius?: number;\n}\n\n/**\n * Finish a native transition transaction after JS has changed route content.\n */\nexport interface NativeNavigationFinishTransitionOptions {\n id?: string;\n direction?: NativeNavigationTransitionDirection;\n duration?: number;\n /**\n * Source rectangle for `zoom` transitions when no active source was recorded.\n */\n sourceRect?: NativeNavigationRect;\n /**\n * Destination rectangle for shared-element-style `zoom` transitions.\n */\n targetRect?: NativeNavigationRect;\n /**\n * Corner radius used while animating a `zoom` transition.\n */\n cornerRadius?: number;\n}\n\n/**\n * Native transition result.\n */\nexport interface NativeNavigationTransitionResult {\n id: string;\n direction: NativeNavigationTransitionDirection;\n duration: number;\n}\n\n/**\n * Plugin version payload.\n */\nexport interface PluginVersionResult {\n /**\n * Version identifier returned by the platform implementation.\n */\n version: string;\n}\n\nexport interface NativeNavigationBackEvent {\n source: 'navbar';\n}\n\nexport interface NativeNavigationBarItemTapEvent {\n id: string;\n title?: string;\n placement: 'left' | 'right';\n}\n\nexport interface NativeNavigationTabSelectEvent {\n id: string;\n index: number;\n title?: string;\n}\n\nexport interface NativeNavigationSafeAreaChangedEvent {\n insets: NativeNavigationInsets;\n}\n\nexport interface NativeNavigationTransitionEvent {\n id: string;\n direction: NativeNavigationTransitionDirection;\n duration: number;\n}\n\n/**\n * Framework-agnostic native navigation chrome API.\n */\nexport interface NativeNavigationPlugin {\n /**\n * Configure the native chrome host and content inset behavior.\n */\n configure(options?: NativeNavigationConfigureOptions): Promise<NativeNavigationInsetsResult>;\n\n /**\n * Render or update the native navbar.\n */\n setNavbar(options: NativeNavigationNavbarOptions): Promise<NativeNavigationInsetsResult>;\n\n /**\n * Render or update the native tabbar.\n */\n setTabbar(options: NativeNavigationTabbarOptions): Promise<NativeNavigationInsetsResult>;\n\n /**\n * Capture the current WebView and prepare a native transition.\n */\n beginTransition(options?: NativeNavigationBeginTransitionOptions): Promise<NativeNavigationTransitionResult>;\n\n /**\n * Animate from the captured WebView snapshot to the current live WebView.\n */\n finishTransition(options?: NativeNavigationFinishTransitionOptions): Promise<NativeNavigationTransitionResult>;\n\n /**\n * Returns the platform implementation version marker.\n */\n getPluginVersion(): Promise<PluginVersionResult>;\n\n addListener(\n eventName: 'navbarBack',\n listenerFunc: (event: NativeNavigationBackEvent) => void,\n ): Promise<PluginListenerHandle>;\n\n addListener(\n eventName: 'navbarItemTap',\n listenerFunc: (event: NativeNavigationBarItemTapEvent) => void,\n ): Promise<PluginListenerHandle>;\n\n addListener(\n eventName: 'tabSelect',\n listenerFunc: (event: NativeNavigationTabSelectEvent) => void,\n ): Promise<PluginListenerHandle>;\n\n addListener(\n eventName: 'safeAreaChanged',\n listenerFunc: (event: NativeNavigationSafeAreaChangedEvent) => void,\n ): Promise<PluginListenerHandle>;\n\n addListener(\n eventName: 'transitionStart',\n listenerFunc: (event: NativeNavigationTransitionEvent) => void,\n ): Promise<PluginListenerHandle>;\n\n addListener(\n eventName: 'transitionEnd',\n listenerFunc: (event: NativeNavigationTransitionEvent) => void,\n ): Promise<PluginListenerHandle>;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["import type { PluginListenerHandle } from '@capacitor/core';\n\n/**\n * Platform rendering preference for the native bars.\n */\nexport type NativeNavigationPlatformStyle = 'auto' | 'ios' | 'android';\n\n/**\n * How the plugin exposes native bar sizes to web content.\n */\nexport type NativeNavigationContentInsetMode = 'css' | 'none';\n\n/**\n * Navigation animation direction.\n */\nexport type NativeNavigationTransitionDirection = 'forward' | 'back' | 'root' | 'tab' | 'zoom' | 'none';\n\n/**\n * Native material/blur effect preference.\n */\nexport type NativeNavigationBlurEffect =\n | 'none'\n | 'systemDefault'\n | 'extraLight'\n | 'light'\n | 'dark'\n | 'regular'\n | 'prominent'\n | 'systemUltraThinMaterial'\n | 'systemThinMaterial'\n | 'systemMaterial'\n | 'systemThickMaterial'\n | 'systemChromeMaterial'\n | 'systemUltraThinMaterialLight'\n | 'systemThinMaterialLight'\n | 'systemMaterialLight'\n | 'systemThickMaterialLight'\n | 'systemChromeMaterialLight'\n | 'systemUltraThinMaterialDark'\n | 'systemThinMaterialDark'\n | 'systemMaterialDark'\n | 'systemThickMaterialDark'\n | 'systemChromeMaterialDark';\n\n/**\n * Native glass background rendering preference.\n */\nexport type NativeNavigationGlassEffect = 'none' | 'liquidGlass';\n\n/**\n * Native glass background configuration.\n */\nexport interface NativeNavigationGlassOptions {\n /**\n * `liquidGlass` enables the Android 12+ live blurred WebView backdrop for\n * native bars. Android 11 and older keep a translucent surface fallback. iOS\n * uses the platform-owned Liquid Glass behavior.\n */\n effect?: NativeNavigationGlassEffect;\n\n /**\n * Android blur radius in native dp for `liquidGlass`. Defaults to `18`.\n */\n blurRadius?: number;\n\n /**\n * Alpha multiplier for the tint surface over the glass backdrop. Defaults to\n * `0.62`.\n */\n surfaceAlpha?: number;\n}\n\n/**\n * Native tab label visibility behavior.\n */\nexport type NativeNavigationTabLabelVisibilityMode = 'auto' | 'selected' | 'labeled' | 'unlabeled';\n\n/**\n * A rectangle in WebView viewport coordinates, expressed in native points/dp.\n */\nexport interface NativeNavigationRect {\n x: number;\n y: number;\n width: number;\n height: number;\n}\n\n/**\n * Native tabbar background shape.\n */\nexport type NativeNavigationTabbarShape = 'floating' | 'curve';\n\n/**\n * Native tab role for Liquid Glass tab bars.\n *\n * `search` (and `prominent` when the OS supports it) renders as a detached\n * trailing circular action beside the floating tab capsule — the Apple News /\n * Photos pattern. Only one detached trailing role is used; if multiple tabs\n * set `search` or `prominent`, the last one wins. Curve-shaped bars ignore\n * `role` and keep using the included center action instead.\n */\nexport type NativeNavigationTabRole = 'normal' | 'search' | 'prominent';\n\n/**\n * A serializable icon descriptor. Framework nodes are intentionally not accepted\n * because icons are rendered by native UI.\n */\nexport interface NativeNavigationIcon {\n /**\n * Cross-platform asset path or URL fallback.\n */\n src?: string;\n\n /**\n * Cross-platform inline SVG markup. The native renderers support common icon\n * shapes such as path, line, polyline, polygon, circle, and rect. SVG icons\n * are rendered as template images by default so native tint colors still\n * apply.\n */\n svg?: string;\n\n /**\n * Preferred rendered icon width in native points/dp. Defaults to `24`.\n */\n width?: number;\n\n /**\n * Preferred rendered icon height in native points/dp. Defaults to `24`.\n */\n height?: number;\n\n /**\n * When `true`, native tint colors are applied to the rendered SVG/image.\n * Defaults to `true`.\n */\n template?: boolean;\n\n /**\n * iOS-specific SF Symbol, bundled image name, or inline SVG.\n */\n ios?: {\n /**\n * SF Symbol name, for example `house.fill`.\n */\n sfSymbol?: string;\n\n /**\n * Bundled image name from the app asset catalog.\n */\n image?: string;\n\n /**\n * iOS-specific inline SVG markup.\n */\n svg?: string;\n };\n\n /**\n * Android-specific drawable resource, asset name, or inline SVG.\n */\n android?: {\n /**\n * Drawable resource name without the `R.drawable.` prefix.\n */\n resource?: string;\n\n /**\n * Bundled image asset name.\n */\n image?: string;\n\n /**\n * Android-specific inline SVG markup.\n */\n svg?: string;\n };\n}\n\n/**\n * Native bar colors. Use CSS-style hex strings (`#RRGGBB` or `#AARRGGBB`).\n */\nexport interface NativeNavigationColors {\n /**\n * When `true`, Android 12+ derives unspecified bar colors from Material You\n * system palettes. Explicit color fields still win.\n */\n dynamic?: boolean;\n\n /**\n * Tint color for active buttons/items.\n */\n tint?: string;\n\n /**\n * Color for inactive tab items. Ignored on iOS 26+ unless\n * `experimentalBakedTintColors` is enabled.\n */\n inactiveTint?: string;\n\n /**\n * Optional background tint. Ignored on iOS 26+ so UIKit can preserve the\n * system Liquid Glass navigation appearance.\n */\n background?: string;\n\n /**\n * Title and label text color where the native platform supports it.\n */\n foreground?: string;\n\n /**\n * Badge background color for native tab badges.\n */\n badgeBackground?: string;\n\n /**\n * Badge text color for native tab badges.\n */\n badgeText?: string;\n\n /**\n * Active tab indicator color on Android.\n */\n indicator?: string;\n\n /**\n * Tab press ripple color on Android.\n */\n ripple?: string;\n}\n\n/**\n * Global plugin configuration.\n */\nexport interface NativeNavigationConfigureOptions {\n /**\n * Enables or disables the native chrome host.\n */\n enabled?: boolean;\n\n /**\n * Native style preference. `auto` uses the current platform.\n */\n platformStyle?: NativeNavigationPlatformStyle;\n\n /**\n * When `css`, the plugin writes CSS variables on `document.documentElement`.\n */\n contentInsetMode?: NativeNavigationContentInsetMode;\n\n /**\n * Default native transition duration in milliseconds.\n */\n animationDuration?: number;\n\n /**\n * Shared color hints for native bars.\n */\n colors?: NativeNavigationColors;\n\n /**\n * Shared glass background defaults for native bars.\n */\n glass?: NativeNavigationGlassOptions;\n}\n\n/**\n * A button shown in the native navbar.\n */\nexport interface NativeNavigationBarButton {\n /**\n * Stable id returned in `navbarItemTap`.\n */\n id: string;\n\n /**\n * Visible text label.\n */\n title?: string;\n\n /**\n * Native icon descriptor.\n */\n icon?: NativeNavigationIcon;\n\n /**\n * Whether the action is enabled. Defaults to `true`.\n */\n enabled?: boolean;\n}\n\n/**\n * Native back button configuration.\n */\nexport interface NativeNavigationBackButton {\n /**\n * Show the native back affordance.\n */\n visible?: boolean;\n\n /**\n * Optional back title.\n */\n title?: string;\n}\n\n/**\n * Native navbar state.\n */\nexport interface NativeNavigationNavbarOptions {\n /**\n * Hide the native navbar.\n */\n hidden?: boolean;\n\n /**\n * Main title.\n */\n title?: string;\n\n /**\n * Secondary title where supported by the platform.\n */\n subtitle?: string;\n\n /**\n * Prefer a large iOS title style.\n */\n large?: boolean;\n\n /**\n * Prefer transparent/scroll-edge style.\n */\n transparent?: boolean;\n\n /**\n * iOS blur/material effect for the navbar background when glass is not\n * available. Defaults to `systemChromeMaterial` for transparent bars.\n */\n blurEffect?: NativeNavigationBlurEffect;\n\n /**\n * Optional glass background behavior. Overrides `configure({ glass })` for\n * this navbar update.\n */\n glass?: NativeNavigationGlassOptions;\n\n /**\n * Back button state.\n */\n backButton?: NativeNavigationBackButton;\n\n /**\n * Left-side action buttons.\n */\n leftItems?: NativeNavigationBarButton[];\n\n /**\n * Right-side action buttons.\n */\n rightItems?: NativeNavigationBarButton[];\n\n /**\n * Navbar color hints.\n */\n colors?: NativeNavigationColors;\n\n /**\n * Animate native navbar changes.\n */\n animated?: boolean;\n}\n\n/**\n * A native tab item.\n */\nexport interface NativeNavigationTab {\n /**\n * Stable tab id returned in `tabSelect`.\n */\n id: string;\n\n /**\n * Visible tab label.\n */\n title?: string;\n\n /**\n * Native icon descriptor.\n */\n icon?: NativeNavigationIcon;\n\n /**\n * Optional selected-state icon.\n */\n selectedIcon?: NativeNavigationIcon;\n\n /**\n * Optional badge. Numeric badges are supported on both platforms; text badge\n * support depends on platform capabilities.\n */\n badge?: string | number;\n\n /**\n * Whether the tab is enabled. Defaults to `true`.\n */\n enabled?: boolean;\n\n /**\n * Hide the tab item from the native tabbar. When the hidden tab is selected,\n * native platform constraints may keep it visible until another tab is\n * selected.\n */\n hidden?: boolean;\n\n /**\n * Optional tab role. On floating tabbars, `search` (or `prominent` when\n * available) becomes a detached trailing circular action beside the capsule\n * — including the iOS 26+ system Liquid Glass tab bar, Android floating\n * layout, and the custom floating capsule path. Only one detached trailing\n * role is used; if multiple tabs set `search` or `prominent`, the last one\n * wins. Curve-shaped bars ignore `role` and keep using the included center\n * action. Defaults to `normal`.\n */\n role?: NativeNavigationTabRole;\n}\n\n/**\n * Native tabbar layout and background shape options.\n */\nexport interface NativeNavigationTabbarStyle {\n /**\n * `floating` keeps the capsule tabbar. On iOS 26+ this uses the\n * system-owned Liquid Glass `UITabBarController` unless a custom capsule\n * path is required; earlier iOS and the custom capsule path use\n * `UIGlassEffect` on iOS 26+ (blur material fallback otherwise). `curve`\n * draws a full-width bar with an included center action.\n */\n shape?: NativeNavigationTabbarShape;\n\n /**\n * Bar height in native points/dp, not including the system bottom inset.\n * Curve defaults to `49` on iOS (83pt once the home indicator is added) and\n * `80` on Android (Material navigation bar). Floating defaults to `64`.\n * Pass `height` to override either platform.\n */\n height?: number;\n\n /**\n * Horizontal margin in native points/dp. Defaults to `24` for `floating` and\n * `0` for `curve`.\n */\n horizontalMargin?: number;\n\n /**\n * Maximum tabbar width in native points/dp. Defaults to `430` for `floating`;\n * `curve` uses the available width unless this is set.\n */\n maxWidth?: number;\n\n /**\n * Bottom gap above the platform safe area in native points/dp. Defaults to\n * `10` for `floating` and `0` for `curve`.\n */\n bottomGap?: number;\n\n /**\n * Background corner radius in native points/dp. Defaults to a capsule radius\n * for `floating` and `0` for `curve`.\n */\n cornerRadius?: number;\n\n /**\n * Tab id promoted into the included center button for `curve`. Defaults to\n * the middle tab.\n */\n centerItemId?: string;\n\n /**\n * Included center button diameter in native points/dp. Defaults to `56`.\n */\n centerButtonDiameter?: number;\n\n /**\n * Distance from the top of the center button to the top edge of the bar in\n * native points/dp. Defaults to half of `centerButtonDiameter`.\n */\n centerButtonLift?: number;\n\n /**\n * Included center button color. Defaults to the active tint color.\n */\n centerButtonColor?: string;\n\n /**\n * Included center button icon color. Defaults to white.\n */\n centerButtonIconColor?: string;\n}\n\n/**\n * Native tabbar state.\n */\nexport interface NativeNavigationTabbarOptions {\n /**\n * Hide the native tabbar.\n */\n hidden?: boolean;\n\n /**\n * Tab definitions.\n */\n tabs?: NativeNavigationTab[];\n\n /**\n * Currently selected tab id.\n */\n selectedId?: string;\n\n /**\n * Show text labels. Defaults to `true`.\n */\n labels?: boolean;\n\n /**\n * Native label visibility mode. Overrides `labels` when provided.\n */\n labelVisibilityMode?: NativeNavigationTabLabelVisibilityMode;\n\n /**\n * Show icons. Defaults to `true`.\n */\n icons?: boolean;\n\n /**\n * Tabbar color hints.\n */\n colors?: NativeNavigationColors;\n\n /**\n * iOS blur/material effect for the tabbar background when glass is not\n * available.\n */\n blurEffect?: NativeNavigationBlurEffect;\n\n /**\n * Optional glass background behavior. Overrides `configure({ glass })` for\n * this tabbar update.\n */\n glass?: NativeNavigationGlassOptions;\n\n /**\n * Opt into the iOS 26 Liquid Glass tint workaround that renders active and\n * inactive tab items into baked images. This can affect badge positioning\n * and icon sizing, so it is disabled by default.\n */\n experimentalBakedTintColors?: boolean;\n\n /**\n * Keep the iOS scroll-edge tabbar appearance from becoming transparent.\n * Mirrors Expo Router native tabs' `disableTransparentOnScrollEdge` option.\n * Defaults to `false`.\n */\n disableTransparentOnScrollEdge?: boolean;\n\n /**\n * Disable the Android active tab indicator.\n */\n disableIndicator?: boolean;\n\n /**\n * Active tab indicator color on Android. `colors.indicator` is also\n * supported.\n */\n indicatorColor?: string;\n\n /**\n * Tab press ripple color on Android. `colors.ripple` is also supported.\n */\n rippleColor?: string;\n\n /**\n * Badge background color. `colors.badgeBackground` is also supported.\n */\n badgeBackgroundColor?: string;\n\n /**\n * Badge text color. `colors.badgeText` is also supported.\n */\n badgeTextColor?: string;\n\n /**\n * Optional native tabbar layout and shape customization.\n */\n style?: NativeNavigationTabbarStyle;\n\n /**\n * Animate native tabbar changes.\n */\n animated?: boolean;\n}\n\n/**\n * Insets exposed to web content.\n */\nexport interface NativeNavigationInsets {\n top: number;\n right: number;\n bottom: number;\n left: number;\n navbarHeight: number;\n tabbarHeight: number;\n}\n\n/**\n * Returned by methods that may change safe content bounds.\n */\nexport interface NativeNavigationInsetsResult {\n insets: NativeNavigationInsets;\n}\n\n/**\n * Begin a native transition transaction before JS changes route content.\n */\nexport interface NativeNavigationBeginTransitionOptions {\n id?: string;\n direction?: NativeNavigationTransitionDirection;\n duration?: number;\n /**\n * Source rectangle for `zoom` transitions. Use viewport coordinates such as\n * those returned by `Element.getBoundingClientRect()`.\n */\n sourceRect?: NativeNavigationRect;\n /**\n * Destination rectangle for shared-element-style `zoom` transitions.\n */\n targetRect?: NativeNavigationRect;\n /**\n * Corner radius used while animating a `zoom` transition.\n */\n cornerRadius?: number;\n}\n\n/**\n * Finish a native transition transaction after JS has changed route content.\n */\nexport interface NativeNavigationFinishTransitionOptions {\n id?: string;\n direction?: NativeNavigationTransitionDirection;\n duration?: number;\n /**\n * Source rectangle for `zoom` transitions when no active source was recorded.\n */\n sourceRect?: NativeNavigationRect;\n /**\n * Destination rectangle for shared-element-style `zoom` transitions.\n */\n targetRect?: NativeNavigationRect;\n /**\n * Corner radius used while animating a `zoom` transition.\n */\n cornerRadius?: number;\n}\n\n/**\n * Native transition result.\n */\nexport interface NativeNavigationTransitionResult {\n id: string;\n direction: NativeNavigationTransitionDirection;\n duration: number;\n}\n\n/**\n * Plugin version payload.\n */\nexport interface PluginVersionResult {\n /**\n * Version identifier returned by the platform implementation.\n */\n version: string;\n}\n\nexport interface NativeNavigationBackEvent {\n source: 'navbar';\n}\n\nexport interface NativeNavigationBarItemTapEvent {\n id: string;\n title?: string;\n placement: 'left' | 'right';\n}\n\nexport interface NativeNavigationTabSelectEvent {\n id: string;\n index: number;\n title?: string;\n}\n\nexport interface NativeNavigationSafeAreaChangedEvent {\n insets: NativeNavigationInsets;\n}\n\nexport interface NativeNavigationTransitionEvent {\n id: string;\n direction: NativeNavigationTransitionDirection;\n duration: number;\n}\n\n/**\n * Framework-agnostic native navigation chrome API.\n */\nexport interface NativeNavigationPlugin {\n /**\n * Configure the native chrome host and content inset behavior.\n */\n configure(options?: NativeNavigationConfigureOptions): Promise<NativeNavigationInsetsResult>;\n\n /**\n * Render or update the native navbar.\n */\n setNavbar(options: NativeNavigationNavbarOptions): Promise<NativeNavigationInsetsResult>;\n\n /**\n * Render or update the native tabbar.\n */\n setTabbar(options: NativeNavigationTabbarOptions): Promise<NativeNavigationInsetsResult>;\n\n /**\n * Capture the current WebView and prepare a native transition.\n */\n beginTransition(options?: NativeNavigationBeginTransitionOptions): Promise<NativeNavigationTransitionResult>;\n\n /**\n * Animate from the captured WebView snapshot to the current live WebView.\n */\n finishTransition(options?: NativeNavigationFinishTransitionOptions): Promise<NativeNavigationTransitionResult>;\n\n /**\n * Returns the platform implementation version marker.\n */\n getPluginVersion(): Promise<PluginVersionResult>;\n\n addListener(\n eventName: 'navbarBack',\n listenerFunc: (event: NativeNavigationBackEvent) => void,\n ): Promise<PluginListenerHandle>;\n\n addListener(\n eventName: 'navbarItemTap',\n listenerFunc: (event: NativeNavigationBarItemTapEvent) => void,\n ): Promise<PluginListenerHandle>;\n\n addListener(\n eventName: 'tabSelect',\n listenerFunc: (event: NativeNavigationTabSelectEvent) => void,\n ): Promise<PluginListenerHandle>;\n\n addListener(\n eventName: 'safeAreaChanged',\n listenerFunc: (event: NativeNavigationSafeAreaChangedEvent) => void,\n ): Promise<PluginListenerHandle>;\n\n addListener(\n eventName: 'transitionStart',\n listenerFunc: (event: NativeNavigationTransitionEvent) => void,\n ): Promise<PluginListenerHandle>;\n\n addListener(\n eventName: 'transitionEnd',\n listenerFunc: (event: NativeNavigationTransitionEvent) => void,\n ): Promise<PluginListenerHandle>;\n}\n"]}
|
package/dist/plugin.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.cjs.js","sources":["esm/plugin.js","esm/components.js","esm/index.js","esm/web.js"],"sourcesContent":["export const createNativeNavigationWeb = () => import('./web').then((m) => new m.NativeNavigationWeb());\n//# sourceMappingURL=plugin.js.map","const parseBoolean = (value, defaultValue = false) => {\n if (value === null) {\n return defaultValue;\n }\n return value === '' || value === 'true' || value === '1';\n};\nconst normalizeAttribute = (value) => (value ? value : undefined);\nconst typedAttribute = (element, name) => normalizeAttribute(element.getAttribute(name));\nconst parseJsonAttribute = (element, name, fallback) => {\n const value = element.getAttribute(name);\n if (!value) {\n return fallback;\n }\n try {\n return JSON.parse(value);\n }\n catch (_a) {\n return fallback;\n }\n};\nconst getNativeNavigation = async () => (await import('./index')).NativeNavigation;\nexport function defineNativeNavigationElements() {\n if (typeof customElements === 'undefined' || typeof HTMLElement === 'undefined') {\n return;\n }\n class CapNativeNavigationProvider extends HTMLElement {\n static get observedAttributes() {\n return ['enabled', 'platform-style', 'content-inset-mode', 'animation-duration', 'colors', 'glass'];\n }\n connectedCallback() {\n void this.sync();\n }\n attributeChangedCallback() {\n if (this.isConnected) {\n void this.sync();\n }\n }\n async sync() {\n var _a, _b;\n const duration = this.getAttribute('animation-duration');\n const options = {\n enabled: parseBoolean(this.getAttribute('enabled'), true),\n platformStyle: (_a = typedAttribute(this, 'platform-style')) !== null && _a !== void 0 ? _a : 'auto',\n contentInsetMode: (_b = typedAttribute(this, 'content-inset-mode')) !== null && _b !== void 0 ? _b : 'css',\n colors: parseJsonAttribute(this, 'colors', undefined),\n glass: parseJsonAttribute(this, 'glass', undefined),\n };\n if (duration) {\n options.animationDuration = Number(duration);\n }\n const NativeNavigation = await getNativeNavigation();\n await NativeNavigation.configure(options);\n }\n }\n class CapNativeNavbar extends HTMLElement {\n static get observedAttributes() {\n return [\n 'hidden',\n 'title',\n 'subtitle',\n 'large',\n 'transparent',\n 'blur-effect',\n 'back-button',\n 'back-title',\n 'left-items',\n 'right-items',\n 'colors',\n 'glass',\n 'animated',\n ];\n }\n connectedCallback() {\n void this.sync();\n }\n attributeChangedCallback() {\n if (this.isConnected) {\n void this.sync();\n }\n }\n async sync() {\n var _a, _b;\n const options = {\n hidden: parseBoolean(this.getAttribute('hidden')),\n title: (_a = this.getAttribute('title')) !== null && _a !== void 0 ? _a : undefined,\n subtitle: (_b = this.getAttribute('subtitle')) !== null && _b !== void 0 ? _b : undefined,\n large: parseBoolean(this.getAttribute('large')),\n transparent: parseBoolean(this.getAttribute('transparent')),\n blurEffect: typedAttribute(this, 'blur-effect'),\n backButton: {\n visible: parseBoolean(this.getAttribute('back-button')),\n title: normalizeAttribute(this.getAttribute('back-title')),\n },\n leftItems: parseJsonAttribute(this, 'left-items', []),\n rightItems: parseJsonAttribute(this, 'right-items', []),\n colors: parseJsonAttribute(this, 'colors', undefined),\n glass: parseJsonAttribute(this, 'glass', undefined),\n animated: parseBoolean(this.getAttribute('animated')),\n };\n const NativeNavigation = await getNativeNavigation();\n await NativeNavigation.setNavbar(options);\n }\n }\n class CapNativeTabbar extends HTMLElement {\n static get observedAttributes() {\n return [\n 'hidden',\n 'tabs',\n 'selected-id',\n 'labels',\n 'label-visibility-mode',\n 'icons',\n 'colors',\n 'glass',\n 'blur-effect',\n 'disable-indicator',\n 'indicator-color',\n 'ripple-color',\n 'badge-background-color',\n 'badge-text-color',\n 'experimental-baked-tint-colors',\n 'animated',\n ];\n }\n connectedCallback() {\n void this.sync();\n }\n attributeChangedCallback() {\n if (this.isConnected) {\n void this.sync();\n }\n }\n async sync() {\n const options = {\n hidden: parseBoolean(this.getAttribute('hidden')),\n tabs: parseJsonAttribute(this, 'tabs', []),\n selectedId: normalizeAttribute(this.getAttribute('selected-id')),\n labels: parseBoolean(this.getAttribute('labels'), true),\n labelVisibilityMode: typedAttribute(this, 'label-visibility-mode'),\n icons: parseBoolean(this.getAttribute('icons'), true),\n colors: parseJsonAttribute(this, 'colors', undefined),\n glass: parseJsonAttribute(this, 'glass', undefined),\n blurEffect: typedAttribute(this, 'blur-effect'),\n disableIndicator: parseBoolean(this.getAttribute('disable-indicator')),\n indicatorColor: normalizeAttribute(this.getAttribute('indicator-color')),\n rippleColor: normalizeAttribute(this.getAttribute('ripple-color')),\n badgeBackgroundColor: normalizeAttribute(this.getAttribute('badge-background-color')),\n experimentalBakedTintColors: parseBoolean(this.getAttribute('experimental-baked-tint-colors')),\n badgeTextColor: normalizeAttribute(this.getAttribute('badge-text-color')),\n animated: parseBoolean(this.getAttribute('animated')),\n };\n const NativeNavigation = await getNativeNavigation();\n await NativeNavigation.setTabbar(options);\n }\n }\n if (!customElements.get('cap-native-navigation-provider')) {\n customElements.define('cap-native-navigation-provider', CapNativeNavigationProvider);\n }\n if (!customElements.get('cap-native-navbar')) {\n customElements.define('cap-native-navbar', CapNativeNavbar);\n }\n if (!customElements.get('cap-native-tabbar')) {\n customElements.define('cap-native-tabbar', CapNativeTabbar);\n }\n}\n//# sourceMappingURL=components.js.map","import { registerPlugin } from '@capacitor/core';\nimport { createNativeNavigationWeb } from './plugin';\nexport const NativeNavigation = registerPlugin('NativeNavigation', {\n web: createNativeNavigationWeb,\n});\nexport * from './definitions';\nexport { defineNativeNavigationElements } from './components';\nconst isElement = (target) => typeof Element !== 'undefined' && target instanceof Element;\nconst isDomRect = (target) => typeof DOMRect !== 'undefined' && target instanceof DOMRect;\n/**\n * Convert an element or DOMRect into viewport coordinates accepted by native\n * zoom transitions.\n */\nexport const getNativeNavigationRect = (target) => {\n const rect = isElement(target) ? target.getBoundingClientRect() : target;\n if (isDomRect(rect)) {\n return {\n x: rect.x,\n y: rect.y,\n width: rect.width,\n height: rect.height,\n };\n }\n return {\n x: rect.x,\n y: rect.y,\n width: rect.width,\n height: rect.height,\n };\n};\n/**\n * Begin an Apple-Zoom-style native transition from a DOM element or rect.\n */\nexport const beginZoomTransition = (target, options = {}) => NativeNavigation.beginTransition(Object.assign(Object.assign({}, options), { direction: 'zoom', sourceRect: getNativeNavigationRect(target) }));\n/**\n * Finish an Apple-Zoom-style native transition into an optional DOM element or\n * rect on the destination route.\n */\nexport const finishZoomTransition = (target, options = {}) => NativeNavigation.finishTransition(Object.assign(Object.assign({}, options), { direction: 'zoom', targetRect: target ? getNativeNavigationRect(target) : undefined }));\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nconst DEFAULT_NAVBAR_HEIGHT = 44;\nconst DEFAULT_TABBAR_HEIGHT = 49;\nconst DEFAULT_TRANSITION_DURATION = 350;\nexport class NativeNavigationWeb extends WebPlugin {\n constructor() {\n super(...arguments);\n this.config = {\n contentInsetMode: 'css',\n enabled: true,\n platformStyle: 'auto',\n };\n this.navbar = { hidden: true };\n this.tabbar = { hidden: true };\n this.activeTransition = null;\n }\n async configure(options = {}) {\n this.config = Object.assign(Object.assign(Object.assign({}, this.config), options), { colors: Object.assign(Object.assign({}, this.config.colors), options.colors), glass: Object.assign(Object.assign({}, this.config.glass), options.glass) });\n return this.applyInsets();\n }\n async setNavbar(options) {\n this.navbar = Object.assign(Object.assign(Object.assign({}, this.navbar), options), { colors: Object.assign(Object.assign({}, this.navbar.colors), options.colors), glass: Object.assign(Object.assign({}, this.navbar.glass), options.glass) });\n return this.applyInsets();\n }\n async setTabbar(options) {\n this.tabbar = Object.assign(Object.assign(Object.assign({}, this.tabbar), options), { colors: Object.assign(Object.assign({}, this.tabbar.colors), options.colors), style: Object.assign(Object.assign({}, this.tabbar.style), options.style), glass: Object.assign(Object.assign({}, this.tabbar.glass), options.glass) });\n return this.applyInsets();\n }\n async beginTransition(options = {}) {\n const transition = this.createTransition(options.id, options.direction, options.duration);\n this.activeTransition = transition;\n this.notifyListeners('transitionStart', transition);\n this.dispatchWindowEvent('transitionStart', transition);\n return transition;\n }\n async finishTransition(options = {}) {\n var _a, _b;\n const transition = this.activeTransition && (!options.id || options.id === this.activeTransition.id)\n ? Object.assign(Object.assign({}, this.activeTransition), { direction: (_a = options.direction) !== null && _a !== void 0 ? _a : this.activeTransition.direction, duration: (_b = options.duration) !== null && _b !== void 0 ? _b : this.activeTransition.duration }) : this.createTransition(options.id, options.direction, options.duration);\n this.activeTransition = null;\n this.notifyListeners('transitionEnd', transition);\n this.dispatchWindowEvent('transitionEnd', transition);\n return transition;\n }\n async getPluginVersion() {\n return {\n version: 'web',\n };\n }\n createTransition(id, direction, duration) {\n var _a;\n if (id === void 0) { id = `transition-${Date.now()}`; }\n if (direction === void 0) { direction = 'forward'; }\n if (duration === void 0) { duration = (_a = this.config.animationDuration) !== null && _a !== void 0 ? _a : DEFAULT_TRANSITION_DURATION; }\n return { id, direction, duration };\n }\n currentTabbarHeight() {\n var _a, _b, _c, _d;\n const style = this.tabbar.style;\n if (!style) {\n return DEFAULT_TABBAR_HEIGHT;\n }\n const defaultHeight = style.shape === 'curve' ? 76 : style.shape === 'floating' ? 64 : DEFAULT_TABBAR_HEIGHT;\n const height = (_a = style.height) !== null && _a !== void 0 ? _a : defaultHeight;\n const bottomGap = (_b = style.bottomGap) !== null && _b !== void 0 ? _b : (style.shape === 'curve' ? 0 : 10);\n const centerButtonLift = style.shape === 'curve' ? ((_c = style.centerButtonLift) !== null && _c !== void 0 ? _c : ((_d = style.centerButtonDiameter) !== null && _d !== void 0 ? _d : 56) / 2) : 0;\n return Math.ceil(height + bottomGap + centerButtonLift);\n }\n applyInsets() {\n const enabled = this.config.enabled !== false;\n const navbarVisible = enabled && this.navbar.hidden !== true;\n const tabbarVisible = enabled && this.tabbar.hidden !== true;\n const tabbarHeight = tabbarVisible ? this.currentTabbarHeight() : 0;\n const insets = {\n top: navbarVisible ? DEFAULT_NAVBAR_HEIGHT : 0,\n right: 0,\n bottom: tabbarHeight,\n left: 0,\n navbarHeight: navbarVisible ? DEFAULT_NAVBAR_HEIGHT : 0,\n tabbarHeight,\n };\n if (this.config.contentInsetMode !== 'none' && typeof document !== 'undefined') {\n const root = document.documentElement;\n root.style.setProperty('--cap-native-navigation-top', `${insets.top}px`);\n root.style.setProperty('--cap-native-navigation-right', `${insets.right}px`);\n root.style.setProperty('--cap-native-navigation-bottom', `${insets.bottom}px`);\n root.style.setProperty('--cap-native-navigation-left', `${insets.left}px`);\n root.style.setProperty('--cap-native-navbar-height', `${insets.navbarHeight}px`);\n root.style.setProperty('--cap-native-tabbar-height', `${insets.tabbarHeight}px`);\n }\n const event = { insets };\n this.notifyListeners('safeAreaChanged', event);\n this.dispatchWindowEvent('safeAreaChanged', event);\n return { insets };\n }\n dispatchWindowEvent(name, detail) {\n if (typeof window === 'undefined') {\n return;\n }\n window.dispatchEvent(new CustomEvent(`capNativeNavigation:${name}`, { detail }));\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AAAO,MAAM,yBAAyB,GAAG,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,mBAAmB,EAAE,CAAC;;ACAvG,MAAM,YAAY,GAAG,CAAC,KAAK,EAAE,YAAY,GAAG,KAAK,KAAK;AACtD,IAAI,IAAI,KAAK,KAAK,IAAI,EAAE;AACxB,QAAQ,OAAO,YAAY;AAC3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eNavigationWeb = () => import('./web').then((m) => new m.NativeNavigationWeb());\n//# sourceMappingURL=plugin.js.map","const parseBoolean = (value, defaultValue = false) => {\n if (value === null) {\n return defaultValue;\n }\n return value === '' || value === 'true' || value === '1';\n};\nconst normalizeAttribute = (value) => (value ? value : undefined);\nconst typedAttribute = (element, name) => normalizeAttribute(element.getAttribute(name));\nconst parseJsonAttribute = (element, name, fallback) => {\n const value = element.getAttribute(name);\n if (!value) {\n return fallback;\n }\n try {\n return JSON.parse(value);\n }\n catch (_a) {\n return fallback;\n }\n};\nconst getNativeNavigation = async () => (await import('./index')).NativeNavigation;\nexport function defineNativeNavigationElements() {\n if (typeof customElements === 'undefined' || typeof HTMLElement === 'undefined') {\n return;\n }\n class CapNativeNavigationProvider extends HTMLElement {\n static get observedAttributes() {\n return ['enabled', 'platform-style', 'content-inset-mode', 'animation-duration', 'colors', 'glass'];\n }\n connectedCallback() {\n void this.sync();\n }\n attributeChangedCallback() {\n if (this.isConnected) {\n void this.sync();\n }\n }\n async sync() {\n var _a, _b;\n const duration = this.getAttribute('animation-duration');\n const options = {\n enabled: parseBoolean(this.getAttribute('enabled'), true),\n platformStyle: (_a = typedAttribute(this, 'platform-style')) !== null && _a !== void 0 ? _a : 'auto',\n contentInsetMode: (_b = typedAttribute(this, 'content-inset-mode')) !== null && _b !== void 0 ? _b : 'css',\n colors: parseJsonAttribute(this, 'colors', undefined),\n glass: parseJsonAttribute(this, 'glass', undefined),\n };\n if (duration) {\n options.animationDuration = Number(duration);\n }\n const NativeNavigation = await getNativeNavigation();\n await NativeNavigation.configure(options);\n }\n }\n class CapNativeNavbar extends HTMLElement {\n static get observedAttributes() {\n return [\n 'hidden',\n 'title',\n 'subtitle',\n 'large',\n 'transparent',\n 'blur-effect',\n 'back-button',\n 'back-title',\n 'left-items',\n 'right-items',\n 'colors',\n 'glass',\n 'animated',\n ];\n }\n connectedCallback() {\n void this.sync();\n }\n attributeChangedCallback() {\n if (this.isConnected) {\n void this.sync();\n }\n }\n async sync() {\n var _a, _b;\n const options = {\n hidden: parseBoolean(this.getAttribute('hidden')),\n title: (_a = this.getAttribute('title')) !== null && _a !== void 0 ? _a : undefined,\n subtitle: (_b = this.getAttribute('subtitle')) !== null && _b !== void 0 ? _b : undefined,\n large: parseBoolean(this.getAttribute('large')),\n transparent: parseBoolean(this.getAttribute('transparent')),\n blurEffect: typedAttribute(this, 'blur-effect'),\n backButton: {\n visible: parseBoolean(this.getAttribute('back-button')),\n title: normalizeAttribute(this.getAttribute('back-title')),\n },\n leftItems: parseJsonAttribute(this, 'left-items', []),\n rightItems: parseJsonAttribute(this, 'right-items', []),\n colors: parseJsonAttribute(this, 'colors', undefined),\n glass: parseJsonAttribute(this, 'glass', undefined),\n animated: parseBoolean(this.getAttribute('animated')),\n };\n const NativeNavigation = await getNativeNavigation();\n await NativeNavigation.setNavbar(options);\n }\n }\n class CapNativeTabbar extends HTMLElement {\n static get observedAttributes() {\n return [\n 'hidden',\n 'tabs',\n 'selected-id',\n 'labels',\n 'label-visibility-mode',\n 'icons',\n 'colors',\n 'glass',\n 'blur-effect',\n 'disable-indicator',\n 'indicator-color',\n 'ripple-color',\n 'badge-background-color',\n 'badge-text-color',\n 'experimental-baked-tint-colors',\n 'animated',\n ];\n }\n connectedCallback() {\n void this.sync();\n }\n attributeChangedCallback() {\n if (this.isConnected) {\n void this.sync();\n }\n }\n async sync() {\n const options = {\n hidden: parseBoolean(this.getAttribute('hidden')),\n tabs: parseJsonAttribute(this, 'tabs', []),\n selectedId: normalizeAttribute(this.getAttribute('selected-id')),\n labels: parseBoolean(this.getAttribute('labels'), true),\n labelVisibilityMode: typedAttribute(this, 'label-visibility-mode'),\n icons: parseBoolean(this.getAttribute('icons'), true),\n colors: parseJsonAttribute(this, 'colors', undefined),\n glass: parseJsonAttribute(this, 'glass', undefined),\n blurEffect: typedAttribute(this, 'blur-effect'),\n disableIndicator: parseBoolean(this.getAttribute('disable-indicator')),\n indicatorColor: normalizeAttribute(this.getAttribute('indicator-color')),\n rippleColor: normalizeAttribute(this.getAttribute('ripple-color')),\n badgeBackgroundColor: normalizeAttribute(this.getAttribute('badge-background-color')),\n experimentalBakedTintColors: parseBoolean(this.getAttribute('experimental-baked-tint-colors')),\n badgeTextColor: normalizeAttribute(this.getAttribute('badge-text-color')),\n animated: parseBoolean(this.getAttribute('animated')),\n };\n const NativeNavigation = await getNativeNavigation();\n await NativeNavigation.setTabbar(options);\n }\n }\n if (!customElements.get('cap-native-navigation-provider')) {\n customElements.define('cap-native-navigation-provider', CapNativeNavigationProvider);\n }\n if (!customElements.get('cap-native-navbar')) {\n customElements.define('cap-native-navbar', CapNativeNavbar);\n }\n if (!customElements.get('cap-native-tabbar')) {\n customElements.define('cap-native-tabbar', CapNativeTabbar);\n }\n}\n//# sourceMappingURL=components.js.map","import { registerPlugin } from '@capacitor/core';\nimport { createNativeNavigationWeb } from './plugin';\nexport const NativeNavigation = registerPlugin('NativeNavigation', {\n web: createNativeNavigationWeb,\n});\nexport * from './definitions';\nexport { defineNativeNavigationElements } from './components';\nconst isElement = (target) => typeof Element !== 'undefined' && target instanceof Element;\nconst isDomRect = (target) => typeof DOMRect !== 'undefined' && target instanceof DOMRect;\n/**\n * Convert an element or DOMRect into viewport coordinates accepted by native\n * zoom transitions.\n */\nexport const getNativeNavigationRect = (target) => {\n const rect = isElement(target) ? target.getBoundingClientRect() : target;\n if (isDomRect(rect)) {\n return {\n x: rect.x,\n y: rect.y,\n width: rect.width,\n height: rect.height,\n };\n }\n return {\n x: rect.x,\n y: rect.y,\n width: rect.width,\n height: rect.height,\n };\n};\n/**\n * Begin an Apple-Zoom-style native transition from a DOM element or rect.\n */\nexport const beginZoomTransition = (target, options = {}) => NativeNavigation.beginTransition(Object.assign(Object.assign({}, options), { direction: 'zoom', sourceRect: getNativeNavigationRect(target) }));\n/**\n * Finish an Apple-Zoom-style native transition into an optional DOM element or\n * rect on the destination route.\n */\nexport const finishZoomTransition = (target, options = {}) => NativeNavigation.finishTransition(Object.assign(Object.assign({}, options), { direction: 'zoom', targetRect: target ? getNativeNavigationRect(target) : undefined }));\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nconst DEFAULT_NAVBAR_HEIGHT = 44;\nconst DEFAULT_TABBAR_HEIGHT = 49;\nconst DEFAULT_TRANSITION_DURATION = 350;\nexport class NativeNavigationWeb extends WebPlugin {\n constructor() {\n super(...arguments);\n this.config = {\n contentInsetMode: 'css',\n enabled: true,\n platformStyle: 'auto',\n };\n this.navbar = { hidden: true };\n this.tabbar = { hidden: true };\n this.activeTransition = null;\n }\n async configure(options = {}) {\n this.config = Object.assign(Object.assign(Object.assign({}, this.config), options), { colors: Object.assign(Object.assign({}, this.config.colors), options.colors), glass: Object.assign(Object.assign({}, this.config.glass), options.glass) });\n return this.applyInsets();\n }\n async setNavbar(options) {\n this.navbar = Object.assign(Object.assign(Object.assign({}, this.navbar), options), { colors: Object.assign(Object.assign({}, this.navbar.colors), options.colors), glass: Object.assign(Object.assign({}, this.navbar.glass), options.glass) });\n return this.applyInsets();\n }\n async setTabbar(options) {\n this.tabbar = Object.assign(Object.assign(Object.assign({}, this.tabbar), options), { colors: Object.assign(Object.assign({}, this.tabbar.colors), options.colors), style: Object.assign(Object.assign({}, this.tabbar.style), options.style), glass: Object.assign(Object.assign({}, this.tabbar.glass), options.glass) });\n return this.applyInsets();\n }\n async beginTransition(options = {}) {\n const transition = this.createTransition(options.id, options.direction, options.duration);\n this.activeTransition = transition;\n this.notifyListeners('transitionStart', transition);\n this.dispatchWindowEvent('transitionStart', transition);\n return transition;\n }\n async finishTransition(options = {}) {\n var _a, _b;\n const transition = this.activeTransition && (!options.id || options.id === this.activeTransition.id)\n ? Object.assign(Object.assign({}, this.activeTransition), { direction: (_a = options.direction) !== null && _a !== void 0 ? _a : this.activeTransition.direction, duration: (_b = options.duration) !== null && _b !== void 0 ? _b : this.activeTransition.duration }) : this.createTransition(options.id, options.direction, options.duration);\n this.activeTransition = null;\n this.notifyListeners('transitionEnd', transition);\n this.dispatchWindowEvent('transitionEnd', transition);\n return transition;\n }\n async getPluginVersion() {\n return {\n version: 'web',\n };\n }\n createTransition(id, direction, duration) {\n var _a;\n if (id === void 0) { id = `transition-${Date.now()}`; }\n if (direction === void 0) { direction = 'forward'; }\n if (duration === void 0) { duration = (_a = this.config.animationDuration) !== null && _a !== void 0 ? _a : DEFAULT_TRANSITION_DURATION; }\n return { id, direction, duration };\n }\n currentTabbarHeight() {\n var _a, _b, _c, _d;\n const style = this.tabbar.style;\n if (!style) {\n return DEFAULT_TABBAR_HEIGHT;\n }\n const defaultHeight = style.shape === 'curve' ? 76 : style.shape === 'floating' ? 64 : DEFAULT_TABBAR_HEIGHT;\n const height = (_a = style.height) !== null && _a !== void 0 ? _a : defaultHeight;\n const bottomGap = (_b = style.bottomGap) !== null && _b !== void 0 ? _b : (style.shape === 'curve' ? 0 : 10);\n const centerButtonLift = style.shape === 'curve' ? ((_c = style.centerButtonLift) !== null && _c !== void 0 ? _c : ((_d = style.centerButtonDiameter) !== null && _d !== void 0 ? _d : 56) / 2) : 0;\n return Math.ceil(height + bottomGap + centerButtonLift);\n }\n applyInsets() {\n const enabled = this.config.enabled !== false;\n const navbarVisible = enabled && this.navbar.hidden !== true;\n const tabbarVisible = enabled && this.tabbar.hidden !== true;\n const tabbarHeight = tabbarVisible ? this.currentTabbarHeight() : 0;\n const insets = {\n top: navbarVisible ? DEFAULT_NAVBAR_HEIGHT : 0,\n right: 0,\n bottom: tabbarHeight,\n left: 0,\n navbarHeight: navbarVisible ? DEFAULT_NAVBAR_HEIGHT : 0,\n tabbarHeight,\n };\n if (this.config.contentInsetMode !== 'none' && typeof document !== 'undefined') {\n const root = document.documentElement;\n root.style.setProperty('--cap-native-navigation-top', `${insets.top}px`);\n root.style.setProperty('--cap-native-navigation-right', `${insets.right}px`);\n root.style.setProperty('--cap-native-navigation-bottom', `${insets.bottom}px`);\n root.style.setProperty('--cap-native-navigation-left', `${insets.left}px`);\n root.style.setProperty('--cap-native-navbar-height', `${insets.navbarHeight}px`);\n root.style.setProperty('--cap-native-tabbar-height', `${insets.tabbarHeight}px`);\n }\n const event = { insets };\n this.notifyListeners('safeAreaChanged', event);\n this.dispatchWindowEvent('safeAreaChanged', event);\n return { insets };\n }\n dispatchWindowEvent(name, detail) {\n if (typeof window === 'undefined') {\n return;\n }\n window.dispatchEvent(new CustomEvent(`capNativeNavigation:${name}`, { detail }));\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AAAO,MAAM,yBAAyB,GAAG,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,mBAAmB,EAAE,CAAC;;ACAvG,MAAM,YAAY,GAAG,CAAC,KAAK,EAAE,YAAY,GAAG,KAAK,KAAK;AACtD,IAAI,IAAI,KAAK,KAAK,IAAI,EAAE;AACxB,QAAQ,OAAO,YAAY;AAC3B,IAAI;AACJ,IAAI,OAAO,KAAK,KAAK,EAAE,IAAI,KAAK,KAAK,MAAM,IAAI,KAAK,KAAK,GAAG;AAC5D,CAAC;AACD,MAAM,kBAAkB,GAAG,CAAC,KAAK,MAAM,KAAK,GAAG,KAAK,GAAG,SAAS,CAAC;AACjE,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE,IAAI,KAAK,kBAAkB,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;AACxF,MAAM,kBAAkB,GAAG,CAAC,OAAO,EAAE,IAAI,EAAE,QAAQ,KAAK;AACxD,IAAI,MAAM,KAAK,GAAG,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC;AAC5C,IAAI,IAAI,CAAC,KAAK,EAAE;AAChB,QAAQ,OAAO,QAAQ;AACvB,IAAI;AACJ,IAAI,IAAI;AACR,QAAQ,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC;AAChC,IAAI;AACJ,IAAI,OAAO,EAAE,EAAE;AACf,QAAQ,OAAO,QAAQ;AACvB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,MAAM,EAAE;AAChC,QAAQ,IAAI,CAAC,eAAe,CAAC,iBAAiB,EAAE,KAAK,CAAC;AACtD,QAAQ,IAAI,CAAC,mBAAmB,CAAC,iBAAiB,EAAE,KAAK,CAAC;AAC1D,QAAQ,OAAO,EAAE,MAAM,EAAE;AACzB,IAAI;AACJ,IAAI,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE;AACtC,QAAQ,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;AAC3C,YAAY;AACZ,QAAQ;AACR,QAAQ,MAAM,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,CAAC,oBAAoB,EAAE,IAAI,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;AACxF,IAAI;AACJ;;;;;;;;;;;"}
|
package/dist/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sources":["esm/plugin.js","esm/components.js","esm/index.js","esm/web.js"],"sourcesContent":["export const createNativeNavigationWeb = () => import('./web').then((m) => new m.NativeNavigationWeb());\n//# sourceMappingURL=plugin.js.map","const parseBoolean = (value, defaultValue = false) => {\n if (value === null) {\n return defaultValue;\n }\n return value === '' || value === 'true' || value === '1';\n};\nconst normalizeAttribute = (value) => (value ? value : undefined);\nconst typedAttribute = (element, name) => normalizeAttribute(element.getAttribute(name));\nconst parseJsonAttribute = (element, name, fallback) => {\n const value = element.getAttribute(name);\n if (!value) {\n return fallback;\n }\n try {\n return JSON.parse(value);\n }\n catch (_a) {\n return fallback;\n }\n};\nconst getNativeNavigation = async () => (await import('./index')).NativeNavigation;\nexport function defineNativeNavigationElements() {\n if (typeof customElements === 'undefined' || typeof HTMLElement === 'undefined') {\n return;\n }\n class CapNativeNavigationProvider extends HTMLElement {\n static get observedAttributes() {\n return ['enabled', 'platform-style', 'content-inset-mode', 'animation-duration', 'colors', 'glass'];\n }\n connectedCallback() {\n void this.sync();\n }\n attributeChangedCallback() {\n if (this.isConnected) {\n void this.sync();\n }\n }\n async sync() {\n var _a, _b;\n const duration = this.getAttribute('animation-duration');\n const options = {\n enabled: parseBoolean(this.getAttribute('enabled'), true),\n platformStyle: (_a = typedAttribute(this, 'platform-style')) !== null && _a !== void 0 ? _a : 'auto',\n contentInsetMode: (_b = typedAttribute(this, 'content-inset-mode')) !== null && _b !== void 0 ? _b : 'css',\n colors: parseJsonAttribute(this, 'colors', undefined),\n glass: parseJsonAttribute(this, 'glass', undefined),\n };\n if (duration) {\n options.animationDuration = Number(duration);\n }\n const NativeNavigation = await getNativeNavigation();\n await NativeNavigation.configure(options);\n }\n }\n class CapNativeNavbar extends HTMLElement {\n static get observedAttributes() {\n return [\n 'hidden',\n 'title',\n 'subtitle',\n 'large',\n 'transparent',\n 'blur-effect',\n 'back-button',\n 'back-title',\n 'left-items',\n 'right-items',\n 'colors',\n 'glass',\n 'animated',\n ];\n }\n connectedCallback() {\n void this.sync();\n }\n attributeChangedCallback() {\n if (this.isConnected) {\n void this.sync();\n }\n }\n async sync() {\n var _a, _b;\n const options = {\n hidden: parseBoolean(this.getAttribute('hidden')),\n title: (_a = this.getAttribute('title')) !== null && _a !== void 0 ? _a : undefined,\n subtitle: (_b = this.getAttribute('subtitle')) !== null && _b !== void 0 ? _b : undefined,\n large: parseBoolean(this.getAttribute('large')),\n transparent: parseBoolean(this.getAttribute('transparent')),\n blurEffect: typedAttribute(this, 'blur-effect'),\n backButton: {\n visible: parseBoolean(this.getAttribute('back-button')),\n title: normalizeAttribute(this.getAttribute('back-title')),\n },\n leftItems: parseJsonAttribute(this, 'left-items', []),\n rightItems: parseJsonAttribute(this, 'right-items', []),\n colors: parseJsonAttribute(this, 'colors', undefined),\n glass: parseJsonAttribute(this, 'glass', undefined),\n animated: parseBoolean(this.getAttribute('animated')),\n };\n const NativeNavigation = await getNativeNavigation();\n await NativeNavigation.setNavbar(options);\n }\n }\n class CapNativeTabbar extends HTMLElement {\n static get observedAttributes() {\n return [\n 'hidden',\n 'tabs',\n 'selected-id',\n 'labels',\n 'label-visibility-mode',\n 'icons',\n 'colors',\n 'glass',\n 'blur-effect',\n 'disable-indicator',\n 'indicator-color',\n 'ripple-color',\n 'badge-background-color',\n 'badge-text-color',\n 'experimental-baked-tint-colors',\n 'animated',\n ];\n }\n connectedCallback() {\n void this.sync();\n }\n attributeChangedCallback() {\n if (this.isConnected) {\n void this.sync();\n }\n }\n async sync() {\n const options = {\n hidden: parseBoolean(this.getAttribute('hidden')),\n tabs: parseJsonAttribute(this, 'tabs', []),\n selectedId: normalizeAttribute(this.getAttribute('selected-id')),\n labels: parseBoolean(this.getAttribute('labels'), true),\n labelVisibilityMode: typedAttribute(this, 'label-visibility-mode'),\n icons: parseBoolean(this.getAttribute('icons'), true),\n colors: parseJsonAttribute(this, 'colors', undefined),\n glass: parseJsonAttribute(this, 'glass', undefined),\n blurEffect: typedAttribute(this, 'blur-effect'),\n disableIndicator: parseBoolean(this.getAttribute('disable-indicator')),\n indicatorColor: normalizeAttribute(this.getAttribute('indicator-color')),\n rippleColor: normalizeAttribute(this.getAttribute('ripple-color')),\n badgeBackgroundColor: normalizeAttribute(this.getAttribute('badge-background-color')),\n experimentalBakedTintColors: parseBoolean(this.getAttribute('experimental-baked-tint-colors')),\n badgeTextColor: normalizeAttribute(this.getAttribute('badge-text-color')),\n animated: parseBoolean(this.getAttribute('animated')),\n };\n const NativeNavigation = await getNativeNavigation();\n await NativeNavigation.setTabbar(options);\n }\n }\n if (!customElements.get('cap-native-navigation-provider')) {\n customElements.define('cap-native-navigation-provider', CapNativeNavigationProvider);\n }\n if (!customElements.get('cap-native-navbar')) {\n customElements.define('cap-native-navbar', CapNativeNavbar);\n }\n if (!customElements.get('cap-native-tabbar')) {\n customElements.define('cap-native-tabbar', CapNativeTabbar);\n }\n}\n//# sourceMappingURL=components.js.map","import { registerPlugin } from '@capacitor/core';\nimport { createNativeNavigationWeb } from './plugin';\nexport const NativeNavigation = registerPlugin('NativeNavigation', {\n web: createNativeNavigationWeb,\n});\nexport * from './definitions';\nexport { defineNativeNavigationElements } from './components';\nconst isElement = (target) => typeof Element !== 'undefined' && target instanceof Element;\nconst isDomRect = (target) => typeof DOMRect !== 'undefined' && target instanceof DOMRect;\n/**\n * Convert an element or DOMRect into viewport coordinates accepted by native\n * zoom transitions.\n */\nexport const getNativeNavigationRect = (target) => {\n const rect = isElement(target) ? target.getBoundingClientRect() : target;\n if (isDomRect(rect)) {\n return {\n x: rect.x,\n y: rect.y,\n width: rect.width,\n height: rect.height,\n };\n }\n return {\n x: rect.x,\n y: rect.y,\n width: rect.width,\n height: rect.height,\n };\n};\n/**\n * Begin an Apple-Zoom-style native transition from a DOM element or rect.\n */\nexport const beginZoomTransition = (target, options = {}) => NativeNavigation.beginTransition(Object.assign(Object.assign({}, options), { direction: 'zoom', sourceRect: getNativeNavigationRect(target) }));\n/**\n * Finish an Apple-Zoom-style native transition into an optional DOM element or\n * rect on the destination route.\n */\nexport const finishZoomTransition = (target, options = {}) => NativeNavigation.finishTransition(Object.assign(Object.assign({}, options), { direction: 'zoom', targetRect: target ? getNativeNavigationRect(target) : undefined }));\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nconst DEFAULT_NAVBAR_HEIGHT = 44;\nconst DEFAULT_TABBAR_HEIGHT = 49;\nconst DEFAULT_TRANSITION_DURATION = 350;\nexport class NativeNavigationWeb extends WebPlugin {\n constructor() {\n super(...arguments);\n this.config = {\n contentInsetMode: 'css',\n enabled: true,\n platformStyle: 'auto',\n };\n this.navbar = { hidden: true };\n this.tabbar = { hidden: true };\n this.activeTransition = null;\n }\n async configure(options = {}) {\n this.config = Object.assign(Object.assign(Object.assign({}, this.config), options), { colors: Object.assign(Object.assign({}, this.config.colors), options.colors), glass: Object.assign(Object.assign({}, this.config.glass), options.glass) });\n return this.applyInsets();\n }\n async setNavbar(options) {\n this.navbar = Object.assign(Object.assign(Object.assign({}, this.navbar), options), { colors: Object.assign(Object.assign({}, this.navbar.colors), options.colors), glass: Object.assign(Object.assign({}, this.navbar.glass), options.glass) });\n return this.applyInsets();\n }\n async setTabbar(options) {\n this.tabbar = Object.assign(Object.assign(Object.assign({}, this.tabbar), options), { colors: Object.assign(Object.assign({}, this.tabbar.colors), options.colors), style: Object.assign(Object.assign({}, this.tabbar.style), options.style), glass: Object.assign(Object.assign({}, this.tabbar.glass), options.glass) });\n return this.applyInsets();\n }\n async beginTransition(options = {}) {\n const transition = this.createTransition(options.id, options.direction, options.duration);\n this.activeTransition = transition;\n this.notifyListeners('transitionStart', transition);\n this.dispatchWindowEvent('transitionStart', transition);\n return transition;\n }\n async finishTransition(options = {}) {\n var _a, _b;\n const transition = this.activeTransition && (!options.id || options.id === this.activeTransition.id)\n ? Object.assign(Object.assign({}, this.activeTransition), { direction: (_a = options.direction) !== null && _a !== void 0 ? _a : this.activeTransition.direction, duration: (_b = options.duration) !== null && _b !== void 0 ? _b : this.activeTransition.duration }) : this.createTransition(options.id, options.direction, options.duration);\n this.activeTransition = null;\n this.notifyListeners('transitionEnd', transition);\n this.dispatchWindowEvent('transitionEnd', transition);\n return transition;\n }\n async getPluginVersion() {\n return {\n version: 'web',\n };\n }\n createTransition(id, direction, duration) {\n var _a;\n if (id === void 0) { id = `transition-${Date.now()}`; }\n if (direction === void 0) { direction = 'forward'; }\n if (duration === void 0) { duration = (_a = this.config.animationDuration) !== null && _a !== void 0 ? _a : DEFAULT_TRANSITION_DURATION; }\n return { id, direction, duration };\n }\n currentTabbarHeight() {\n var _a, _b, _c, _d;\n const style = this.tabbar.style;\n if (!style) {\n return DEFAULT_TABBAR_HEIGHT;\n }\n const defaultHeight = style.shape === 'curve' ? 76 : style.shape === 'floating' ? 64 : DEFAULT_TABBAR_HEIGHT;\n const height = (_a = style.height) !== null && _a !== void 0 ? _a : defaultHeight;\n const bottomGap = (_b = style.bottomGap) !== null && _b !== void 0 ? _b : (style.shape === 'curve' ? 0 : 10);\n const centerButtonLift = style.shape === 'curve' ? ((_c = style.centerButtonLift) !== null && _c !== void 0 ? _c : ((_d = style.centerButtonDiameter) !== null && _d !== void 0 ? _d : 56) / 2) : 0;\n return Math.ceil(height + bottomGap + centerButtonLift);\n }\n applyInsets() {\n const enabled = this.config.enabled !== false;\n const navbarVisible = enabled && this.navbar.hidden !== true;\n const tabbarVisible = enabled && this.tabbar.hidden !== true;\n const tabbarHeight = tabbarVisible ? this.currentTabbarHeight() : 0;\n const insets = {\n top: navbarVisible ? DEFAULT_NAVBAR_HEIGHT : 0,\n right: 0,\n bottom: tabbarHeight,\n left: 0,\n navbarHeight: navbarVisible ? DEFAULT_NAVBAR_HEIGHT : 0,\n tabbarHeight,\n };\n if (this.config.contentInsetMode !== 'none' && typeof document !== 'undefined') {\n const root = document.documentElement;\n root.style.setProperty('--cap-native-navigation-top', `${insets.top}px`);\n root.style.setProperty('--cap-native-navigation-right', `${insets.right}px`);\n root.style.setProperty('--cap-native-navigation-bottom', `${insets.bottom}px`);\n root.style.setProperty('--cap-native-navigation-left', `${insets.left}px`);\n root.style.setProperty('--cap-native-navbar-height', `${insets.navbarHeight}px`);\n root.style.setProperty('--cap-native-tabbar-height', `${insets.tabbarHeight}px`);\n }\n const event = { insets };\n this.notifyListeners('safeAreaChanged', event);\n this.dispatchWindowEvent('safeAreaChanged', event);\n return { insets };\n }\n dispatchWindowEvent(name, detail) {\n if (typeof window === 'undefined') {\n return;\n }\n window.dispatchEvent(new CustomEvent(`capNativeNavigation:${name}`, { detail }));\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;IAAO,MAAM,yBAAyB,GAAG,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,mBAAmB,EAAE,CAAC;;ICAvG,MAAM,YAAY,GAAG,CAAC,KAAK,EAAE,YAAY,GAAG,KAAK,KAAK;IACtD,IAAI,IAAI,KAAK,KAAK,IAAI,EAAE;IACxB,QAAQ,OAAO,YAAY;IAC3B,IAAI;IACJ,IAAI,OAAO,KAAK,KAA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AAC,KAAK,CAAC,WAAW,CAAC,+BAA+B,EAAE,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACxF,YAAY,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,gCAAgC,EAAE,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IAC1F,YAAY,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,8BAA8B,EAAE,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACtF,YAAY,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,4BAA4B,EAAE,CAAC,EAAE,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;IAC5F,YAAY,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,4BAA4B,EAAE,CAAC,EAAE,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;IAC5F,QAAQ;IACR,QAAQ,MAAM,KAAK,GAAG,EAAE,MAAM,EAAE;IAChC,QAAQ,IAAI,CAAC,eAAe,CAAC,iBAAiB,EAAE,KAAK,CAAC;IACtD,QAAQ,IAAI,CAAC,mBAAmB,CAAC,iBAAiB,EAAE,KAAK,CAAC;IAC1D,QAAQ,OAAO,EAAE,MAAM,EAAE;IACzB,IAAI;IACJ,IAAI,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE;IACtC,QAAQ,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC3C,YAAY;IACZ,QAAQ;IACR,QAAQ,MAAM,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,CAAC,oBAAoB,EAAE,IAAI,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IACxF,IAAI;IACJ;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"plugin.js","sources":["esm/plugin.js","esm/components.js","esm/index.js","esm/web.js"],"sourcesContent":["export const createNativeNavigationWeb = () => import('./web').then((m) => new m.NativeNavigationWeb());\n//# sourceMappingURL=plugin.js.map","const parseBoolean = (value, defaultValue = false) => {\n if (value === null) {\n return defaultValue;\n }\n return value === '' || value === 'true' || value === '1';\n};\nconst normalizeAttribute = (value) => (value ? value : undefined);\nconst typedAttribute = (element, name) => normalizeAttribute(element.getAttribute(name));\nconst parseJsonAttribute = (element, name, fallback) => {\n const value = element.getAttribute(name);\n if (!value) {\n return fallback;\n }\n try {\n return JSON.parse(value);\n }\n catch (_a) {\n return fallback;\n }\n};\nconst getNativeNavigation = async () => (await import('./index')).NativeNavigation;\nexport function defineNativeNavigationElements() {\n if (typeof customElements === 'undefined' || typeof HTMLElement === 'undefined') {\n return;\n }\n class CapNativeNavigationProvider extends HTMLElement {\n static get observedAttributes() {\n return ['enabled', 'platform-style', 'content-inset-mode', 'animation-duration', 'colors', 'glass'];\n }\n connectedCallback() {\n void this.sync();\n }\n attributeChangedCallback() {\n if (this.isConnected) {\n void this.sync();\n }\n }\n async sync() {\n var _a, _b;\n const duration = this.getAttribute('animation-duration');\n const options = {\n enabled: parseBoolean(this.getAttribute('enabled'), true),\n platformStyle: (_a = typedAttribute(this, 'platform-style')) !== null && _a !== void 0 ? _a : 'auto',\n contentInsetMode: (_b = typedAttribute(this, 'content-inset-mode')) !== null && _b !== void 0 ? _b : 'css',\n colors: parseJsonAttribute(this, 'colors', undefined),\n glass: parseJsonAttribute(this, 'glass', undefined),\n };\n if (duration) {\n options.animationDuration = Number(duration);\n }\n const NativeNavigation = await getNativeNavigation();\n await NativeNavigation.configure(options);\n }\n }\n class CapNativeNavbar extends HTMLElement {\n static get observedAttributes() {\n return [\n 'hidden',\n 'title',\n 'subtitle',\n 'large',\n 'transparent',\n 'blur-effect',\n 'back-button',\n 'back-title',\n 'left-items',\n 'right-items',\n 'colors',\n 'glass',\n 'animated',\n ];\n }\n connectedCallback() {\n void this.sync();\n }\n attributeChangedCallback() {\n if (this.isConnected) {\n void this.sync();\n }\n }\n async sync() {\n var _a, _b;\n const options = {\n hidden: parseBoolean(this.getAttribute('hidden')),\n title: (_a = this.getAttribute('title')) !== null && _a !== void 0 ? _a : undefined,\n subtitle: (_b = this.getAttribute('subtitle')) !== null && _b !== void 0 ? _b : undefined,\n large: parseBoolean(this.getAttribute('large')),\n transparent: parseBoolean(this.getAttribute('transparent')),\n blurEffect: typedAttribute(this, 'blur-effect'),\n backButton: {\n visible: parseBoolean(this.getAttribute('back-button')),\n title: normalizeAttribute(this.getAttribute('back-title')),\n },\n leftItems: parseJsonAttribute(this, 'left-items', []),\n rightItems: parseJsonAttribute(this, 'right-items', []),\n colors: parseJsonAttribute(this, 'colors', undefined),\n glass: parseJsonAttribute(this, 'glass', undefined),\n animated: parseBoolean(this.getAttribute('animated')),\n };\n const NativeNavigation = await getNativeNavigation();\n await NativeNavigation.setNavbar(options);\n }\n }\n class CapNativeTabbar extends HTMLElement {\n static get observedAttributes() {\n return [\n 'hidden',\n 'tabs',\n 'selected-id',\n 'labels',\n 'label-visibility-mode',\n 'icons',\n 'colors',\n 'glass',\n 'blur-effect',\n 'disable-indicator',\n 'indicator-color',\n 'ripple-color',\n 'badge-background-color',\n 'badge-text-color',\n 'experimental-baked-tint-colors',\n 'animated',\n ];\n }\n connectedCallback() {\n void this.sync();\n }\n attributeChangedCallback() {\n if (this.isConnected) {\n void this.sync();\n }\n }\n async sync() {\n const options = {\n hidden: parseBoolean(this.getAttribute('hidden')),\n tabs: parseJsonAttribute(this, 'tabs', []),\n selectedId: normalizeAttribute(this.getAttribute('selected-id')),\n labels: parseBoolean(this.getAttribute('labels'), true),\n labelVisibilityMode: typedAttribute(this, 'label-visibility-mode'),\n icons: parseBoolean(this.getAttribute('icons'), true),\n colors: parseJsonAttribute(this, 'colors', undefined),\n glass: parseJsonAttribute(this, 'glass', undefined),\n blurEffect: typedAttribute(this, 'blur-effect'),\n disableIndicator: parseBoolean(this.getAttribute('disable-indicator')),\n indicatorColor: normalizeAttribute(this.getAttribute('indicator-color')),\n rippleColor: normalizeAttribute(this.getAttribute('ripple-color')),\n badgeBackgroundColor: normalizeAttribute(this.getAttribute('badge-background-color')),\n experimentalBakedTintColors: parseBoolean(this.getAttribute('experimental-baked-tint-colors')),\n badgeTextColor: normalizeAttribute(this.getAttribute('badge-text-color')),\n animated: parseBoolean(this.getAttribute('animated')),\n };\n const NativeNavigation = await getNativeNavigation();\n await NativeNavigation.setTabbar(options);\n }\n }\n if (!customElements.get('cap-native-navigation-provider')) {\n customElements.define('cap-native-navigation-provider', CapNativeNavigationProvider);\n }\n if (!customElements.get('cap-native-navbar')) {\n customElements.define('cap-native-navbar', CapNativeNavbar);\n }\n if (!customElements.get('cap-native-tabbar')) {\n customElements.define('cap-native-tabbar', CapNativeTabbar);\n }\n}\n//# sourceMappingURL=components.js.map","import { registerPlugin } from '@capacitor/core';\nimport { createNativeNavigationWeb } from './plugin';\nexport const NativeNavigation = registerPlugin('NativeNavigation', {\n web: createNativeNavigationWeb,\n});\nexport * from './definitions';\nexport { defineNativeNavigationElements } from './components';\nconst isElement = (target) => typeof Element !== 'undefined' && target instanceof Element;\nconst isDomRect = (target) => typeof DOMRect !== 'undefined' && target instanceof DOMRect;\n/**\n * Convert an element or DOMRect into viewport coordinates accepted by native\n * zoom transitions.\n */\nexport const getNativeNavigationRect = (target) => {\n const rect = isElement(target) ? target.getBoundingClientRect() : target;\n if (isDomRect(rect)) {\n return {\n x: rect.x,\n y: rect.y,\n width: rect.width,\n height: rect.height,\n };\n }\n return {\n x: rect.x,\n y: rect.y,\n width: rect.width,\n height: rect.height,\n };\n};\n/**\n * Begin an Apple-Zoom-style native transition from a DOM element or rect.\n */\nexport const beginZoomTransition = (target, options = {}) => NativeNavigation.beginTransition(Object.assign(Object.assign({}, options), { direction: 'zoom', sourceRect: getNativeNavigationRect(target) }));\n/**\n * Finish an Apple-Zoom-style native transition into an optional DOM element or\n * rect on the destination route.\n */\nexport const finishZoomTransition = (target, options = {}) => NativeNavigation.finishTransition(Object.assign(Object.assign({}, options), { direction: 'zoom', targetRect: target ? getNativeNavigationRect(target) : undefined }));\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nconst DEFAULT_NAVBAR_HEIGHT = 44;\nconst DEFAULT_TABBAR_HEIGHT = 49;\nconst DEFAULT_TRANSITION_DURATION = 350;\nexport class NativeNavigationWeb extends WebPlugin {\n constructor() {\n super(...arguments);\n this.config = {\n contentInsetMode: 'css',\n enabled: true,\n platformStyle: 'auto',\n };\n this.navbar = { hidden: true };\n this.tabbar = { hidden: true };\n this.activeTransition = null;\n }\n async configure(options = {}) {\n this.config = Object.assign(Object.assign(Object.assign({}, this.config), options), { colors: Object.assign(Object.assign({}, this.config.colors), options.colors), glass: Object.assign(Object.assign({}, this.config.glass), options.glass) });\n return this.applyInsets();\n }\n async setNavbar(options) {\n this.navbar = Object.assign(Object.assign(Object.assign({}, this.navbar), options), { colors: Object.assign(Object.assign({}, this.navbar.colors), options.colors), glass: Object.assign(Object.assign({}, this.navbar.glass), options.glass) });\n return this.applyInsets();\n }\n async setTabbar(options) {\n this.tabbar = Object.assign(Object.assign(Object.assign({}, this.tabbar), options), { colors: Object.assign(Object.assign({}, this.tabbar.colors), options.colors), style: Object.assign(Object.assign({}, this.tabbar.style), options.style), glass: Object.assign(Object.assign({}, this.tabbar.glass), options.glass) });\n return this.applyInsets();\n }\n async beginTransition(options = {}) {\n const transition = this.createTransition(options.id, options.direction, options.duration);\n this.activeTransition = transition;\n this.notifyListeners('transitionStart', transition);\n this.dispatchWindowEvent('transitionStart', transition);\n return transition;\n }\n async finishTransition(options = {}) {\n var _a, _b;\n const transition = this.activeTransition && (!options.id || options.id === this.activeTransition.id)\n ? Object.assign(Object.assign({}, this.activeTransition), { direction: (_a = options.direction) !== null && _a !== void 0 ? _a : this.activeTransition.direction, duration: (_b = options.duration) !== null && _b !== void 0 ? _b : this.activeTransition.duration }) : this.createTransition(options.id, options.direction, options.duration);\n this.activeTransition = null;\n this.notifyListeners('transitionEnd', transition);\n this.dispatchWindowEvent('transitionEnd', transition);\n return transition;\n }\n async getPluginVersion() {\n return {\n version: 'web',\n };\n }\n createTransition(id, direction, duration) {\n var _a;\n if (id === void 0) { id = `transition-${Date.now()}`; }\n if (direction === void 0) { direction = 'forward'; }\n if (duration === void 0) { duration = (_a = this.config.animationDuration) !== null && _a !== void 0 ? _a : DEFAULT_TRANSITION_DURATION; }\n return { id, direction, duration };\n }\n currentTabbarHeight() {\n var _a, _b, _c, _d;\n const style = this.tabbar.style;\n if (!style) {\n return DEFAULT_TABBAR_HEIGHT;\n }\n const defaultHeight = style.shape === 'curve' ? 76 : style.shape === 'floating' ? 64 : DEFAULT_TABBAR_HEIGHT;\n const height = (_a = style.height) !== null && _a !== void 0 ? _a : defaultHeight;\n const bottomGap = (_b = style.bottomGap) !== null && _b !== void 0 ? _b : (style.shape === 'curve' ? 0 : 10);\n const centerButtonLift = style.shape === 'curve' ? ((_c = style.centerButtonLift) !== null && _c !== void 0 ? _c : ((_d = style.centerButtonDiameter) !== null && _d !== void 0 ? _d : 56) / 2) : 0;\n return Math.ceil(height + bottomGap + centerButtonLift);\n }\n applyInsets() {\n const enabled = this.config.enabled !== false;\n const navbarVisible = enabled && this.navbar.hidden !== true;\n const tabbarVisible = enabled && this.tabbar.hidden !== true;\n const tabbarHeight = tabbarVisible ? this.currentTabbarHeight() : 0;\n const insets = {\n top: navbarVisible ? DEFAULT_NAVBAR_HEIGHT : 0,\n right: 0,\n bottom: tabbarHeight,\n left: 0,\n navbarHeight: navbarVisible ? DEFAULT_NAVBAR_HEIGHT : 0,\n tabbarHeight,\n };\n if (this.config.contentInsetMode !== 'none' && typeof document !== 'undefined') {\n const root = document.documentElement;\n root.style.setProperty('--cap-native-navigation-top', `${insets.top}px`);\n root.style.setProperty('--cap-native-navigation-right', `${insets.right}px`);\n root.style.setProperty('--cap-native-navigation-bottom', `${insets.bottom}px`);\n root.style.setProperty('--cap-native-navigation-left', `${insets.left}px`);\n root.style.setProperty('--cap-native-navbar-height', `${insets.navbarHeight}px`);\n root.style.setProperty('--cap-native-tabbar-height', `${insets.tabbarHeight}px`);\n }\n const event = { insets };\n this.notifyListeners('safeAreaChanged', event);\n this.dispatchWindowEvent('safeAreaChanged', event);\n return { insets };\n }\n dispatchWindowEvent(name, detail) {\n if (typeof window === 'undefined') {\n return;\n }\n window.dispatchEvent(new CustomEvent(`capNativeNavigation:${name}`, { detail }));\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;IAAO,MAAM,yBAAyB,GAAG,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,mBAAmB,EAAE,CAAC;;ICAvG,MAAM,YAAY,GAAG,CAAC,KAAK,EAAE,YAAY,GAAG,KAAK,KAAK;IACtD,IAAI,IAAI,KAAK,KAAK,IAAI,EAAE;IACxB,QAAQ,OAAO,YAAY;IAC3B,IAAI;IACJ,IAAI,OAAO,KAAK,KAAK,EAAE,IAAI,KAAK,KAAK,MAAM,IAAI,KAAK,KAAK,GAAG;IAC5D,CAAC;IACD,MAAM,kBAAkB,GAAG,CAAC,KAAK,MAAM,KAAK,GAAG,KAAK,GAAG,SAAS,CAAC;IACjE,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE,IAAI,KAAK,kBAAkB,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;IACxF,MAAM,kBAAkB,GAAG,CAAC,OAAO,EAAE,IAAI,EAAE,QAAQ,KAAK;IACxD,IAAI,MAAM,KAAK,GAAG,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC;IAC5C,IAAI,IAAI,CAAC,KAAK,EAAE;IAChB,QAAQ,OAAO,QAAQ;IACvB,IAAI;IACJ,IAAI,IAAI;IACR,QAAQ,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC;IAChC,IAAI;IACJ,IAAI,OAAO,EAAE,EAAE;IACf,QAAQ,OAAO,QAAQ;IACvB,IAAI;IACJ,CAAC;IACD,MAAM,mBAA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AC,eAAe,CAAC,iBAAiB,EAAE,KAAK,CAAC;IACtD,QAAQ,IAAI,CAAC,mBAAmB,CAAC,iBAAiB,EAAE,KAAK,CAAC;IAC1D,QAAQ,OAAO,EAAE,MAAM,EAAE;IACzB,IAAI;IACJ,IAAI,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE;IACtC,QAAQ,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IAC3C,YAAY;IACZ,QAAQ;IACR,QAAQ,MAAM,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,CAAC,oBAAoB,EAAE,IAAI,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IACxF,IAAI;IACJ;;;;;;;;;;;;;;;"}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -69,6 +69,7 @@ public class NativeNavigationPlugin: CAPPlugin, CAPBridgedPlugin, UITabBarContro
|
|
|
69
69
|
private var tabBaseImages: [UIImage?] = []
|
|
70
70
|
private var tabSelectedImages: [UIImage?] = []
|
|
71
71
|
private var suppressTabSelectEvent = false
|
|
72
|
+
private var tabSelectEmittedForReTap = false
|
|
72
73
|
private var transitionSnapshot: UIView?
|
|
73
74
|
private var activeTransitionId: String?
|
|
74
75
|
private var activeTransitionDirection = "forward"
|
|
@@ -220,6 +221,11 @@ public class NativeNavigationPlugin: CAPPlugin, CAPBridgedPlugin, UITabBarContro
|
|
|
220
221
|
let icons = call.getBool("icons", true)
|
|
221
222
|
|
|
222
223
|
if self.usesSystemLiquidGlass && self.tabbarStyle.shape != .curve {
|
|
224
|
+
self.floatingTabBar?.isHidden = true
|
|
225
|
+
self.tabContainer?.isHidden = true
|
|
226
|
+
// Unhide before rehosting. setTabBarHidden does not recover on iOS 26
|
|
227
|
+
// after the controller view itself was hidden.
|
|
228
|
+
self.tabBarController?.view.isHidden = false
|
|
223
229
|
let tabBar = self.ensureTabBar()
|
|
224
230
|
let (items, selectedIndex) = self.makeTabBarItems(
|
|
225
231
|
tabs,
|
|
@@ -227,8 +233,6 @@ public class NativeNavigationPlugin: CAPPlugin, CAPBridgedPlugin, UITabBarContro
|
|
|
227
233
|
labelVisibilityMode: labelVisibilityMode,
|
|
228
234
|
icons: icons
|
|
229
235
|
)
|
|
230
|
-
self.floatingTabBar?.isHidden = true
|
|
231
|
-
self.tabContainer?.isHidden = true
|
|
232
236
|
self.applySystemTabBarItems(items, selectedIndex: selectedIndex, animated: call.getBool("animated", false))
|
|
233
237
|
self.applyTabBarAppearance(tabBar: tabBar, options: call)
|
|
234
238
|
if items.isEmpty {
|
|
@@ -239,7 +243,6 @@ public class NativeNavigationPlugin: CAPPlugin, CAPBridgedPlugin, UITabBarContro
|
|
|
239
243
|
}
|
|
240
244
|
} else {
|
|
241
245
|
self.restoreWebViewFromSystemTabController()
|
|
242
|
-
self.setSystemTabBarHidden(true)
|
|
243
246
|
self.tabBarController?.view.isHidden = true
|
|
244
247
|
let tabBar = self.ensureFloatingTabBar()
|
|
245
248
|
let (items, selectedIndex) = self.makeFloatingTabBarItems(
|
|
@@ -541,17 +544,27 @@ public class NativeNavigationPlugin: CAPPlugin, CAPBridgedPlugin, UITabBarContro
|
|
|
541
544
|
if usesSystemLiquidGlass {
|
|
542
545
|
hostWebView(in: viewController)
|
|
543
546
|
}
|
|
547
|
+
tabSelectEmittedForReTap = false
|
|
548
|
+
if !suppressTabSelectEvent,
|
|
549
|
+
tabBarController.selectedViewController === viewController {
|
|
550
|
+
notifyTabSelect(index: viewController.tabBarItem.tag)
|
|
551
|
+
tabSelectEmittedForReTap = true
|
|
552
|
+
}
|
|
544
553
|
return true
|
|
545
554
|
}
|
|
546
555
|
|
|
547
556
|
public func tabBarController(_ tabBarController: UITabBarController, didSelect viewController: UIViewController) {
|
|
548
557
|
guard !suppressTabSelectEvent else {
|
|
558
|
+
tabSelectEmittedForReTap = false
|
|
549
559
|
hostWebViewInSelectedSystemTab()
|
|
550
560
|
return
|
|
551
561
|
}
|
|
552
562
|
let index = viewController.tabBarItem.tag
|
|
553
563
|
hostWebViewInSelectedSystemTab()
|
|
554
|
-
|
|
564
|
+
if !tabSelectEmittedForReTap {
|
|
565
|
+
notifyTabSelect(index: index)
|
|
566
|
+
}
|
|
567
|
+
tabSelectEmittedForReTap = false
|
|
555
568
|
}
|
|
556
569
|
|
|
557
570
|
private func notifyTabSelect(index: Int) {
|
|
@@ -1396,7 +1409,7 @@ public class NativeNavigationPlugin: CAPPlugin, CAPBridgedPlugin, UITabBarContro
|
|
|
1396
1409
|
let shape: NativeNavigationTabbarShape = requestedShape == "curve" ? .curve : .floating
|
|
1397
1410
|
let isCurve = shape == .curve
|
|
1398
1411
|
let centerDiameter = max(number(from: rawStyle["centerButtonDiameter"]) ?? 56, 44)
|
|
1399
|
-
let height = max(number(from: rawStyle["height"]) ?? (isCurve ?
|
|
1412
|
+
let height = max(number(from: rawStyle["height"]) ?? (isCurve ? 49 : 64), 44)
|
|
1400
1413
|
let centerLift = max(number(from: rawStyle["centerButtonLift"]) ?? (centerDiameter / 2), 0)
|
|
1401
1414
|
let bottomGap = max(number(from: rawStyle["bottomGap"]) ?? (isCurve ? 0 : 10), 0)
|
|
1402
1415
|
let horizontalMargin = max(number(from: rawStyle["horizontalMargin"]) ?? (isCurve ? 0 : 24), 0)
|
|
@@ -1598,7 +1611,10 @@ public class NativeNavigationPlugin: CAPPlugin, CAPBridgedPlugin, UITabBarContro
|
|
|
1598
1611
|
}
|
|
1599
1612
|
|
|
1600
1613
|
let opaqueBackground = backgroundTint ?? .systemBackground
|
|
1601
|
-
if
|
|
1614
|
+
if tabbarStyle.shape == .curve {
|
|
1615
|
+
// Curve hides the glass effect view, so the drawn fill has to stay visible.
|
|
1616
|
+
tabBar.backgroundFillColor = backgroundColor
|
|
1617
|
+
} else if prefersOpaqueTabBarBackground() {
|
|
1602
1618
|
tabBar.backgroundFillColor = opaqueBackground
|
|
1603
1619
|
} else if usesLiquidGlass {
|
|
1604
1620
|
// Keep the hand-drawn fill clear so UIGlassEffect can show through.
|
|
@@ -1786,7 +1802,13 @@ public class NativeNavigationPlugin: CAPPlugin, CAPBridgedPlugin, UITabBarContro
|
|
|
1786
1802
|
|
|
1787
1803
|
if let container = systemTabRootContainer {
|
|
1788
1804
|
container.frame = rootView.bounds
|
|
1789
|
-
|
|
1805
|
+
// Capacitor's root view is the WKWebView. After the webview is
|
|
1806
|
+
// hosted in a tab content controller, stretching it to this
|
|
1807
|
+
// container's full bounds overflows the tab VC (clipsToBounds is
|
|
1808
|
+
// off) and paints over the system tab bar.
|
|
1809
|
+
if !isWebViewHostedInSystemTabController {
|
|
1810
|
+
webView?.frame = container.bounds
|
|
1811
|
+
}
|
|
1790
1812
|
}
|
|
1791
1813
|
|
|
1792
1814
|
if let container = navContainer {
|
|
@@ -1803,9 +1825,17 @@ public class NativeNavigationPlugin: CAPPlugin, CAPBridgedPlugin, UITabBarContro
|
|
|
1803
1825
|
let trailingGap: CGFloat = 10
|
|
1804
1826
|
let trailingExtra = hasDetachedTrailing ? trailingDiameter + trailingGap : 0
|
|
1805
1827
|
let tabbarWidth = min(availableWidth, maxWidth + trailingExtra)
|
|
1828
|
+
let curveExtendsToBottom = tabbarStyle.shape == .curve && tabbarStyle.horizontalMargin == 0 && tabbarStyle.bottomGap == 0
|
|
1829
|
+
let bottomExtension = curveExtendsToBottom ? safeInsets.bottom : 0
|
|
1830
|
+
let contentHeight = tabbarStyle.height
|
|
1831
|
+
let barTop = tabbarStyle.shape == .curve ? tabbarStyle.centerButtonLift : 0
|
|
1832
|
+
let totalHeight = contentHeight + barTop
|
|
1806
1833
|
let originX = (width - tabbarWidth) / 2
|
|
1807
|
-
|
|
1808
|
-
|
|
1834
|
+
// Keep the home-indicator fill inside the screen. The previous origin
|
|
1835
|
+
// pushed that extension below the bezel and left labels on the edge.
|
|
1836
|
+
let originY = height - tabbarStyle.bottomGap - totalHeight - bottomExtension - (curveExtendsToBottom ? 0 : safeInsets.bottom)
|
|
1837
|
+
container.frame = CGRect(x: originX, y: originY, width: tabbarWidth, height: totalHeight + bottomExtension)
|
|
1838
|
+
floatingTabBar?.curveContentHeightOverride = tabbarStyle.shape == .curve ? contentHeight : nil
|
|
1809
1839
|
floatingTabBar?.frame = container.bounds
|
|
1810
1840
|
floatingTabBar?.layer.cornerRadius = 0
|
|
1811
1841
|
floatingTabBar?.layoutIfNeeded()
|
|
@@ -1839,8 +1869,11 @@ public class NativeNavigationPlugin: CAPPlugin, CAPBridgedPlugin, UITabBarContro
|
|
|
1839
1869
|
|
|
1840
1870
|
private func bringChromeToFront() {
|
|
1841
1871
|
if usesSystemLiquidGlass && tabbarStyle.shape != .curve {
|
|
1872
|
+
if let tabBarController = tabBarController {
|
|
1873
|
+
(systemTabRootContainer ?? bridge?.viewController?.view)?.bringSubviewToFront(tabBarController.view)
|
|
1874
|
+
}
|
|
1842
1875
|
if let navContainer = navContainer {
|
|
1843
|
-
bridge?.viewController?.view
|
|
1876
|
+
(systemTabRootContainer ?? bridge?.viewController?.view)?.bringSubviewToFront(navContainer)
|
|
1844
1877
|
}
|
|
1845
1878
|
bringLiftedWebViewOverlaysToFront()
|
|
1846
1879
|
return
|
|
@@ -1962,7 +1995,12 @@ public class NativeNavigationPlugin: CAPPlugin, CAPBridgedPlugin, UITabBarContro
|
|
|
1962
1995
|
let usesSystemTabbar = usesSystemLiquidGlass && tabbarStyle.shape != .curve
|
|
1963
1996
|
let nativeTabHeight = max(tabBar?.frame.height ?? 0, 49 + safeInsets.bottom)
|
|
1964
1997
|
let customTabHeight = tabbarHeight + safeInsets.bottom + tabbarStyle.bottomGap
|
|
1965
|
-
|
|
1998
|
+
// Hosted in the tab content VC: the WebView already ends above the
|
|
1999
|
+
// bar. Reporting the bar height as CSS overlap lifts the FAB by a
|
|
2000
|
+
// second bar.
|
|
2001
|
+
let tabHeight = isEnabled && tabbarVisible && !isWebViewHostedInSystemTabController
|
|
2002
|
+
? (usesSystemTabbar ? nativeTabHeight : customTabHeight)
|
|
2003
|
+
: 0
|
|
1966
2004
|
return [
|
|
1967
2005
|
"top": navHeight,
|
|
1968
2006
|
"right": safeInsets.right,
|
|
@@ -2106,7 +2144,7 @@ private enum NativeNavigationTabbarBackgroundPath {
|
|
|
2106
2144
|
return UIBezierPath(roundedRect: bounds, cornerRadius: style.cornerRadius)
|
|
2107
2145
|
}
|
|
2108
2146
|
|
|
2109
|
-
let barRect = CGRect(x: 0, y: style.barTop, width: bounds.width, height: max(style.
|
|
2147
|
+
let barRect = CGRect(x: 0, y: style.barTop, width: bounds.width, height: max(bounds.maxY - style.barTop, 1))
|
|
2110
2148
|
let cornerRadius = min(style.cornerRadius, barRect.height / 2)
|
|
2111
2149
|
let centerX = bounds.midX
|
|
2112
2150
|
let centerRadius = style.centerButtonDiameter / 2
|
|
@@ -2152,6 +2190,7 @@ private struct NativeNavigationFloatingTabStyle {
|
|
|
2152
2190
|
let centerButtonIconColor: UIColor
|
|
2153
2191
|
let badgeBackgroundColor: UIColor
|
|
2154
2192
|
let badgeTextColor: UIColor
|
|
2193
|
+
let showsSelectionBackground: Bool
|
|
2155
2194
|
}
|
|
2156
2195
|
|
|
2157
2196
|
private final class NativeNavigationFloatingTabBar: UIView {
|
|
@@ -2161,6 +2200,7 @@ private final class NativeNavigationFloatingTabBar: UIView {
|
|
|
2161
2200
|
private var iconsVisible = true
|
|
2162
2201
|
private let backgroundShapeView = NativeNavigationTabbarBackgroundView()
|
|
2163
2202
|
private var tabbarStyle = NativeNavigationTabbarStyleConfig()
|
|
2203
|
+
var curveContentHeightOverride: CGFloat?
|
|
2164
2204
|
|
|
2165
2205
|
var selectedIndex = 0
|
|
2166
2206
|
var selectedTintColor = UIColor.systemBlue {
|
|
@@ -2242,6 +2282,9 @@ private final class NativeNavigationFloatingTabBar: UIView {
|
|
|
2242
2282
|
super.layoutSubviews()
|
|
2243
2283
|
let capsule = capsuleBounds(in: bounds)
|
|
2244
2284
|
backgroundShapeView.frame = capsule
|
|
2285
|
+
// Unfolding resizes the bar without a new style pass. Rebuild the shadow
|
|
2286
|
+
// from the current bounds so the cradle stays a circle around the button.
|
|
2287
|
+
superview?.layer.shadowPath = NativeNavigationTabbarBackgroundPath.path(in: capsule, style: tabbarStyle).cgPath
|
|
2245
2288
|
guard !buttons.isEmpty else {
|
|
2246
2289
|
return
|
|
2247
2290
|
}
|
|
@@ -2249,7 +2292,7 @@ private final class NativeNavigationFloatingTabBar: UIView {
|
|
|
2249
2292
|
if let centerIndex = centerButtonIndex(), buttons.indices.contains(centerIndex) {
|
|
2250
2293
|
let buttonDiameter = tabbarStyle.centerButtonDiameter
|
|
2251
2294
|
let centerGap = min(buttonDiameter + 4, bounds.width * 0.34)
|
|
2252
|
-
let barFrame = CGRect(x: 0, y: tabbarStyle.barTop, width: bounds.width, height: tabbarStyle.height)
|
|
2295
|
+
let barFrame = CGRect(x: 0, y: tabbarStyle.barTop, width: bounds.width, height: curveContentHeightOverride ?? tabbarStyle.height)
|
|
2253
2296
|
let leftWidth = max(0, bounds.midX - centerGap / 2)
|
|
2254
2297
|
let rightX = min(bounds.width, bounds.midX + centerGap / 2)
|
|
2255
2298
|
let centerFrame = CGRect(
|
|
@@ -2357,7 +2400,8 @@ private final class NativeNavigationFloatingTabBar: UIView {
|
|
|
2357
2400
|
centerButtonColor: tabbarStyle.centerButtonColor ?? selectedTintColor,
|
|
2358
2401
|
centerButtonIconColor: tabbarStyle.centerButtonIconColor,
|
|
2359
2402
|
badgeBackgroundColor: badgeBackgroundColor,
|
|
2360
|
-
badgeTextColor: badgeTextColor
|
|
2403
|
+
badgeTextColor: badgeTextColor,
|
|
2404
|
+
showsSelectionBackground: isCenter || tabbarStyle.shape != .curve
|
|
2361
2405
|
)
|
|
2362
2406
|
}
|
|
2363
2407
|
|
|
@@ -2398,6 +2442,8 @@ private final class NativeNavigationTabbarBackgroundView: UIView {
|
|
|
2398
2442
|
super.init(frame: frame)
|
|
2399
2443
|
isOpaque = false
|
|
2400
2444
|
backgroundColor = .clear
|
|
2445
|
+
// Default scaleToFill stretches the last bitmap when the bar widens.
|
|
2446
|
+
contentMode = .redraw
|
|
2401
2447
|
}
|
|
2402
2448
|
|
|
2403
2449
|
required init?(coder: NSCoder) {
|
|
@@ -2472,7 +2518,7 @@ private final class NativeNavigationFloatingTabButton: UIControl {
|
|
|
2472
2518
|
selectedView.backgroundColor = style.isCenter
|
|
2473
2519
|
? style.centerButtonColor
|
|
2474
2520
|
: style.selectedTint.withAlphaComponent(style.selected && !isDetachedTrailing ? 0.16 : 0)
|
|
2475
|
-
selectedView.alpha = style.isCenter || (style.selected && !isDetachedTrailing) ? 1 : 0
|
|
2521
|
+
selectedView.alpha = style.isCenter || (style.selected && style.showsSelectionBackground && !isDetachedTrailing) ? 1 : 0
|
|
2476
2522
|
|
|
2477
2523
|
layer.shadowColor = UIColor.black.cgColor
|
|
2478
2524
|
layer.shadowOpacity = style.isCenter ? 0.2 : 0
|
|
@@ -2518,8 +2564,16 @@ private final class NativeNavigationFloatingTabButton: UIControl {
|
|
|
2518
2564
|
titleLabel.frame = CGRect(x: 8, y: (bounds.height - 18) / 2, width: bounds.width - 16, height: 18)
|
|
2519
2565
|
}
|
|
2520
2566
|
} else if hasIcon && hasLabel {
|
|
2521
|
-
|
|
2522
|
-
|
|
2567
|
+
let labelHeight: CGFloat = 14
|
|
2568
|
+
let gap: CGFloat = 2
|
|
2569
|
+
let stackHeight = iconSize + gap + labelHeight
|
|
2570
|
+
// Tall curve cells sit above the home indicator. Keep the label
|
|
2571
|
+
// under the icon, not on the bezel.
|
|
2572
|
+
let stackY = bounds.height >= 72
|
|
2573
|
+
? max(6, bounds.height - 10 - stackHeight)
|
|
2574
|
+
: max(4, (bounds.height - stackHeight) / 2)
|
|
2575
|
+
imageView.frame = CGRect(x: (bounds.width - iconSize) / 2, y: stackY, width: iconSize, height: iconSize)
|
|
2576
|
+
titleLabel.frame = CGRect(x: 4, y: stackY + iconSize + gap, width: bounds.width - 8, height: labelHeight)
|
|
2523
2577
|
} else if hasIcon {
|
|
2524
2578
|
imageView.frame = CGRect(x: (bounds.width - iconSize) / 2, y: (bounds.height - iconSize) / 2, width: iconSize, height: iconSize)
|
|
2525
2579
|
titleLabel.frame = .zero
|
|
@@ -2645,6 +2699,7 @@ final class NativeNavigationTabContentController: UIViewController {
|
|
|
2645
2699
|
let view = UIView()
|
|
2646
2700
|
view.backgroundColor = .systemBackground
|
|
2647
2701
|
view.isOpaque = true
|
|
2702
|
+
view.clipsToBounds = true
|
|
2648
2703
|
self.view = view
|
|
2649
2704
|
}
|
|
2650
2705
|
|
|
@@ -2685,7 +2740,8 @@ final class NativeNavigationTabContentController: UIViewController {
|
|
|
2685
2740
|
snapshotPlaceholder = nil
|
|
2686
2741
|
hostedWebView = webView
|
|
2687
2742
|
if webView.superview !== view {
|
|
2688
|
-
|
|
2743
|
+
// addSubview reparents in one step. removeFromSuperview() first
|
|
2744
|
+
// leaves a frame of this VC's backing colour (system white).
|
|
2689
2745
|
view.addSubview(webView)
|
|
2690
2746
|
}
|
|
2691
2747
|
webView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capgo/capacitor-native-navigation",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.4.1",
|
|
4
4
|
"description": "Capacitor plugin for native navbar, tabbar, safe-area handling, and WebView snapshot transitions.",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -37,14 +37,14 @@
|
|
|
37
37
|
"liquid-glass"
|
|
38
38
|
],
|
|
39
39
|
"scripts": {
|
|
40
|
+
"prettier": "prettier \"**/*.ts\"",
|
|
41
|
+
"eslint": "eslint",
|
|
40
42
|
"verify": "bun run verify:ios && bun run verify:android && bun run verify:web",
|
|
41
43
|
"verify:ios": "xcodebuild -scheme CapgoCapacitorNativeNavigation -destination generic/platform=iOS",
|
|
42
44
|
"verify:android": "cd android && ./gradlew clean build test && cd ..",
|
|
43
45
|
"verify:web": "bun run build",
|
|
44
46
|
"lint": "bun run eslint && bun run prettier -- --check && bun run swiftlint -- lint",
|
|
45
47
|
"fmt": "bun run eslint -- --fix && bun run prettier -- --write && bun run swiftlint -- --fix --format",
|
|
46
|
-
"eslint": "eslint . --ext .ts",
|
|
47
|
-
"prettier": "prettier-pretty-check \"**/*.{css,html,ts,js,java}\" --plugin=prettier-plugin-java",
|
|
48
48
|
"swiftlint": "node-swiftlint",
|
|
49
49
|
"docgen": "docgen --api NativeNavigationPlugin --output-readme README.md --output-json dist/docs.json",
|
|
50
50
|
"build": "bun run clean && bun run docgen && tsc && rollup -c rollup.config.mjs",
|
|
@@ -62,25 +62,25 @@
|
|
|
62
62
|
"changelog:ai": "node scripts/generate-ai-changelog.mjs"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
|
-
"@capacitor/android": "^8.
|
|
66
|
-
"@capacitor/cli": "^8.
|
|
67
|
-
"@capacitor/core": "^8.
|
|
65
|
+
"@capacitor/android": "^8.5.2",
|
|
66
|
+
"@capacitor/cli": "^8.5.2",
|
|
67
|
+
"@capacitor/core": "^8.5.2",
|
|
68
68
|
"@capacitor/docgen": "^0.3.1",
|
|
69
|
-
"@capacitor/ios": "^8.
|
|
70
|
-
"@ionic/eslint-config": "^0.
|
|
69
|
+
"@capacitor/ios": "^8.5.2",
|
|
70
|
+
"@ionic/eslint-config": "^0.5.0",
|
|
71
71
|
"@ionic/prettier-config": "^4.0.0",
|
|
72
72
|
"@ionic/swiftlint-config": "^2.0.0",
|
|
73
|
-
"@types/node": "^24.
|
|
74
|
-
"eslint": "^
|
|
73
|
+
"@types/node": "^24.13.6",
|
|
74
|
+
"eslint": "^10.11.0",
|
|
75
75
|
"eslint-plugin-import": "^2.31.0",
|
|
76
76
|
"husky": "^9.1.7",
|
|
77
|
-
"prettier": "^3.
|
|
77
|
+
"prettier": "^3.9.8",
|
|
78
|
+
"prettier-plugin-java": "^2.10.4",
|
|
78
79
|
"prettier-pretty-check": "^0.2.0",
|
|
79
|
-
"prettier-plugin-java": "^2.7.7",
|
|
80
80
|
"rimraf": "^6.1.0",
|
|
81
|
-
"rollup": "^4.
|
|
81
|
+
"rollup": "^4.63.4",
|
|
82
82
|
"swiftlint": "^2.0.0",
|
|
83
|
-
"typescript": "
|
|
83
|
+
"typescript": "6"
|
|
84
84
|
},
|
|
85
85
|
"peerDependencies": {
|
|
86
86
|
"@capacitor/core": ">=8.0.0"
|