@capgo/capacitor-native-navigation 8.0.17 → 8.0.19

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 CHANGED
@@ -1,55 +1,78 @@
1
1
  # @capgo/capacitor-native-navigation
2
- <a href="https://capgo.app/"><img src="https://capgo.app/readme-banner.svg?repo=Cap-go/capacitor-native-navigation" alt="Capgo - Instant updates for Capacitor" /></a>
2
+
3
+ <a href="https://capgo.app/">
4
+ <img
5
+ src="https://capgo.app/readme-banner.svg?repo=Cap-go/capacitor-native-navigation"
6
+ alt="Capgo - Instant updates for Capacitor"
7
+ />
8
+ </a>
3
9
 
4
10
  <div align="center">
5
- <h2><a href="https://capgo.app/?ref=plugin_native_navigation">Get instant updates for your app with Capgo</a></h2>
6
- <h2><a href="https://capgo.app/consulting/?ref=plugin_native_navigation">Missing a feature? We can build the plugin for you</a></h2>
11
+ <h2>
12
+ <a href="https://capgo.app/?ref=plugin_native_navigation">Get instant updates for your app with Capgo</a>
13
+ </h2>
14
+ <h2>
15
+ <a href="https://capgo.app/consulting/?ref=plugin_native_navigation">
16
+ Missing a feature? We can build the plugin for you
17
+ </a>
18
+ </h2>
7
19
  </div>
8
20
 
9
- Native navigation chrome for Capacitor apps. Render a native navbar, native tabbar, and native transition shell over a single full-screen WebView while your framework keeps owning routes and content.
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.
10
22
 
11
23
  ## Demo
12
24
 
25
+ <img src="./docs/demo.webp" alt="Demo of capacitor-native-navigation in action" width="300" />
26
+
13
27
  ### Native navigation tap flow
14
28
 
15
- <img src="./docs/demo-navigation.webp" alt="Animated native navigation tap flow showing tab selection, push transition, and native back" width="320" />
29
+ <img
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
+ />
16
34
 
17
35
  ### SVG icon descriptors
18
36
 
19
- <img src="./docs/demo-svg-icons.webp" alt="Animated native SVG icon demo showing inline SVG icons, native tint, labels, and tab selection" width="320" />
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
+ />
20
42
 
21
43
  ### Native styling and zoom options
22
44
 
23
- <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="320" />
45
+ <img
46
+ src="./docs/demo-options.webp"
47
+ alt="Animated native navigation options demo showing dynamic colors, selected labels, custom indicators, badges, system Liquid Glass, and zoom transitions"
48
+ width="320"
49
+ />
24
50
 
25
- ## What It Does
51
+ ## Features
26
52
 
27
- - Renders native top navigation and bottom tab chrome from JavaScript state.
28
- - Emits native intent events such as `navbarBack`, `navbarItemTap`, and `tabSelect`.
29
- - Captures WebView snapshots for native-feeling push, back, root, tab, and zoom transition shells.
30
- - Supports native tab styling controls such as Material You dynamic colors, label visibility, indicators, ripples, badges, and selected icons.
31
- - Writes CSS variables so web content can scroll behind native bars without being hidden.
32
- - Works with React, Vue, Angular, Svelte, Solid, vanilla JS, and any router that can call imperative methods.
53
+ - Drive native top navigation and bottom tabs from JavaScript state.
54
+ - Use system-owned iOS navigation bars, tab bars, tab gestures, and Liquid Glass rendering.
55
+ - Emit native intent events such as `navbarBack`, `navbarItemTap`, and `tabSelect`.
56
+ - Capture WebView snapshots for native-feeling push, back, root, tab, and zoom transitions.
57
+ - Configure tab labels, selected icons, badges, indicators, ripples, tint colors, and dynamic colors.
58
+ - Write CSS inset variables so web content can scroll behind native bars without being hidden.
59
+ - Work with React, Vue, Angular, Svelte, Solid, vanilla JS, and any router that exposes imperative navigation.
33
60
 
34
- ## What It Does Not Do
61
+ ## How It Fits
35
62
 
36
- - It does not create one native WebView per route.
37
- - It does not render React/Vue/Svelte icon nodes natively. Icons must be serializable descriptors such as SVG strings, SF Symbols, or native resource names.
38
- - It does not replace your router. JS still owns route state and web content rendering.
63
+ - Your router still owns route state and page rendering.
64
+ - The app still uses one full-screen WebView.
65
+ - Icons must be serializable descriptors such as SVG strings, SF Symbols, or native resource names.
39
66
 
40
67
  ## Compatibility
41
68
 
42
- | Plugin version | Capacitor compatibility | Maintained |
43
- | -------------- | ----------------------- | ---------- |
44
- | v8.\*.\* | v8.\*.\* | Yes |
45
- | v7.\*.\* | v7.\*.\* | On demand |
46
- | v6.\*.\* | v6.\*.\* | On demand |
69
+ `@capgo/capacitor-native-navigation` targets Capacitor 8 and Node.js 22+.
47
70
 
48
71
  ## Install
49
72
 
50
73
  ```bash
51
- bun add @capgo/capacitor-native-navigation
52
- bunx cap sync
74
+ npm install @capgo/capacitor-native-navigation
75
+ npx cap sync
53
76
  ```
54
77
 
55
78
  ## Minimal Usage
@@ -103,8 +126,8 @@ await NativeNavigation.setTabbar({
103
126
  ],
104
127
  });
105
128
 
106
- NativeNavigation.addListener('tabSelect', ({ id }) => {
107
- router.navigate(id);
129
+ await NativeNavigation.addListener('tabSelect', ({ id }) => {
130
+ router.navigate(`/${id}`);
108
131
  });
109
132
  ```
110
133
 
@@ -306,7 +329,7 @@ const icon = {
306
329
  width: 24,
307
330
  height: 24,
308
331
  template: true,
309
- src: 'fallback_asset_name',
332
+ src: 'shared_asset_name',
310
333
  ios: {
311
334
  svg: '<svg viewBox="0 0 24 24"><path d="M3 10.5 12 3l9 7.5"/></svg>',
312
335
  sfSymbol: 'house.fill',
@@ -324,9 +347,9 @@ Inline SVG supports the icon-focused subset used by common sets such as Lucide a
324
347
 
325
348
  ## Platform Notes
326
349
 
327
- - iOS uses UIKit `UINavigationBar` and `UITabBar`. iOS 26+ hosts the tabbar in a real `UITabBarController` so Apple owns the system Liquid Glass background; earlier versions use native translucent/material fallback styling.
328
- - Android uses an AppCompat `Toolbar` and a floating native tab capsule with edge-to-edge placement.
329
- - Web fallback does not draw native bars; it mirrors inset variables and events for development.
350
+ - iOS uses UIKit `UINavigationBar`, `UITabBar`, and `UITabBarController` so the system owns tab interaction, Liquid Glass rendering, and safe-area behavior.
351
+ - Android uses an AppCompat `Toolbar` and a native bottom tab surface with edge-to-edge placement.
352
+ - Web mirrors inset variables and events for local development.
330
353
 
331
354
  ## Example App
332
355
 
@@ -334,11 +357,11 @@ The `example-app/` folder is a vanilla JS Capacitor demo linked with `file:..`.
334
357
 
335
358
  ```bash
336
359
  cd example-app
337
- bun install
338
- bun run build
339
- bunx cap add ios
340
- bunx cap add android
341
- bunx cap sync
360
+ npm install
361
+ npm run build
362
+ npx cap add ios
363
+ npx cap add android
364
+ npx cap sync
342
365
  ```
343
366
 
344
367
  ## API
package/docs/demo.webp ADDED
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capgo/capacitor-native-navigation",
3
- "version": "8.0.17",
4
- "description": "Capacitor plugin for native navbar, tabbar, and route transition chrome over a WebView.",
3
+ "version": "8.0.19",
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",
7
7
  "types": "dist/esm/index.d.ts",