@capgo/capacitor-native-navigation 8.2.4 → 8.2.6

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
@@ -808,17 +808,17 @@ Native tabbar layout and background shape options.
808
808
 
809
809
  | Prop | Type | Description |
810
810
  | --------------------------- | ----------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
811
- | **`shape`** | <code><a href="#nativenavigationtabbarshape">NativeNavigationTabbarShape</a></code> | `floating` keeps the existing capsule tabbar. `curve` draws a full-width bar with a center notch and raised center tab. |
811
+ | **`shape`** | <code><a href="#nativenavigationtabbarshape">NativeNavigationTabbarShape</a></code> | `floating` keeps the existing capsule tabbar. `curve` draws a full-width bar with an included center action. |
812
812
  | **`height`** | <code>number</code> | Bar height in native points/dp. Defaults to `64` for `floating` and `76` for `curve`. |
813
813
  | **`horizontalMargin`** | <code>number</code> | Horizontal margin in native points/dp. Defaults to `24` for `floating` and `0` for `curve`. |
814
814
  | **`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. |
815
815
  | **`bottomGap`** | <code>number</code> | Bottom gap above the platform safe area in native points/dp. Defaults to `10` for `floating` and `0` for `curve`. |
816
- | **`cornerRadius`** | <code>number</code> | Background corner radius in native points/dp. Defaults to a capsule radius for `floating` and `24` for `curve`. |
817
- | **`centerItemId`** | <code>string</code> | Tab id promoted into the raised center button for `curve`. Defaults to the middle tab. |
818
- | **`centerButtonDiameter`** | <code>number</code> | Raised center button diameter in native points/dp. Defaults to `76`. |
816
+ | **`cornerRadius`** | <code>number</code> | Background corner radius in native points/dp. Defaults to a capsule radius for `floating` and `0` for `curve`. |
817
+ | **`centerItemId`** | <code>string</code> | Tab id promoted into the included center button for `curve`. Defaults to the middle tab. |
818
+ | **`centerButtonDiameter`** | <code>number</code> | Included center button diameter in native points/dp. Defaults to `56`. |
819
819
  | **`centerButtonLift`** | <code>number</code> | Distance from the top of the center button to the top edge of the bar in native points/dp. Defaults to half of `centerButtonDiameter`. |
820
- | **`centerButtonColor`** | <code>string</code> | Raised center button color. Defaults to the active tint color. |
821
- | **`centerButtonIconColor`** | <code>string</code> | Raised center button icon color. Defaults to white. |
820
+ | **`centerButtonColor`** | <code>string</code> | Included center button color. Defaults to the active tint color. |
821
+ | **`centerButtonIconColor`** | <code>string</code> | Included center button icon color. Defaults to white. |
822
822
 
823
823
 
824
824
  #### NativeNavigationTransitionResult
@@ -63,10 +63,12 @@ public class NativeNavigationPlugin extends Plugin {
63
63
  private static final int DEFAULT_TABBAR_DP = 64;
64
64
  private static final int DEFAULT_TRANSITION_MS = 350;
65
65
  private static final int MENU_ITEM_BASE = 10_000;
66
+ private static final int DEFAULT_TABBAR_BACKGROUND_COLOR = Color.WHITE;
66
67
 
67
68
  private final NativeNavigation implementation = new NativeNavigation();
68
69
  private FrameLayout navbarContainer;
69
70
  private FrameLayout tabbarContainer;
71
+ private View tabbarBackdrop;
70
72
  private Toolbar toolbar;
71
73
  private NativeTabbarLayout tabbar;
72
74
  private GlassBackdropView navbarGlassBackdrop;
@@ -125,6 +127,8 @@ public class NativeNavigationPlugin extends Plugin {
125
127
  defaultTransitionMs = Math.max(0, duration.intValue());
126
128
  }
127
129
  if (!enabled) {
130
+ navbarVisible = false;
131
+ tabbarVisible = false;
128
132
  if (navbarContainer != null) {
129
133
  navbarContainer.setVisibility(View.GONE);
130
134
  }
@@ -134,6 +138,9 @@ public class NativeNavigationPlugin extends Plugin {
134
138
  if (tabbarContainer != null) {
135
139
  tabbarContainer.setVisibility(View.GONE);
136
140
  }
141
+ if (tabbarBackdrop != null) {
142
+ tabbarBackdrop.setVisibility(View.GONE);
143
+ }
137
144
  }
138
145
  if (enabled) {
139
146
  reapplyVisibleChromeBackgrounds();
@@ -214,6 +221,9 @@ public class NativeNavigationPlugin extends Plugin {
214
221
  if (tabbarContainer != null) {
215
222
  tabbarContainer.setVisibility(View.GONE);
216
223
  }
224
+ if (tabbarBackdrop != null) {
225
+ tabbarBackdrop.setVisibility(View.GONE);
226
+ }
217
227
  updateInsetsAndNotify();
218
228
  call.resolve(insetsResult());
219
229
  return;
@@ -280,6 +290,9 @@ public class NativeNavigationPlugin extends Plugin {
280
290
  if (tabbarContainer != null) {
281
291
  tabbarContainer.setVisibility(View.VISIBLE);
282
292
  }
293
+ if (tabbarBackdrop != null) {
294
+ tabbarBackdrop.setVisibility(View.VISIBLE);
295
+ }
283
296
  nativeTabbar.setVisibility(View.VISIBLE);
284
297
  layoutChrome();
285
298
  updateInsetsAndNotify();
@@ -651,6 +664,8 @@ public class NativeNavigationPlugin extends Plugin {
651
664
  return tabbar;
652
665
  }
653
666
  FrameLayout root = contentRoot();
667
+ tabbarBackdrop = new View(getContext());
668
+ tabbarBackdrop.setBackgroundColor(resolvedTabbarSurfaceColor());
654
669
  tabbarContainer = new FrameLayout(getContext());
655
670
  tabbarContainer.setClipChildren(false);
656
671
  tabbarContainer.setClipToPadding(false);
@@ -672,8 +687,13 @@ public class NativeNavigationPlugin extends Plugin {
672
687
  new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)
673
688
  );
674
689
  if (root != null) {
690
+ root.addView(tabbarBackdrop);
675
691
  root.addView(tabbarContainer);
676
692
  } else {
693
+ getActivity().addContentView(
694
+ tabbarBackdrop,
695
+ new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, 0, Gravity.BOTTOM)
696
+ );
677
697
  getActivity().addContentView(
678
698
  tabbarContainer,
679
699
  new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, dp(DEFAULT_TABBAR_DP))
@@ -733,10 +753,10 @@ public class NativeNavigationPlugin extends Plugin {
733
753
  GradientDrawable centerBackground = new GradientDrawable();
734
754
  centerBackground.setShape(GradientDrawable.OVAL);
735
755
  centerBackground.setColor(tabbarStyle.centerButtonColor);
736
- button.setBackground(centerBackground);
737
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
738
- button.setElevation(dp(10));
739
- }
756
+ View centerFill = new View(getContext());
757
+ centerFill.setBackground(centerBackground);
758
+ int centerFillDiameter = dp(Math.max(tabbarStyle.centerButtonDiameter - 14, 44));
759
+ button.addView(centerFill, new FrameLayout.LayoutParams(centerFillDiameter, centerFillDiameter, Gravity.CENTER));
740
760
  }
741
761
 
742
762
  if (!center && selected) {
@@ -1018,7 +1038,7 @@ public class NativeNavigationPlugin extends Plugin {
1018
1038
  }
1019
1039
 
1020
1040
  static TabbarStyle defaults(int tintColor) {
1021
- return new TabbarStyle("floating", 64, 24, 430, 10, 32, null, 76, 38, tintColor, Color.WHITE);
1041
+ return new TabbarStyle("floating", 64, 24, 430, 10, 32, null, 56, 28, tintColor, Color.WHITE);
1022
1042
  }
1023
1043
 
1024
1044
  boolean isCurve() {
@@ -1038,7 +1058,7 @@ public class NativeNavigationPlugin extends Plugin {
1038
1058
 
1039
1059
  private final Paint backgroundPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
1040
1060
  private TabbarStyle style = TabbarStyle.defaults(Color.rgb(0, 122, 255));
1041
- private int backgroundColor = Color.argb(235, 255, 255, 255);
1061
+ private int backgroundColor = DEFAULT_TABBAR_BACKGROUND_COLOR;
1042
1062
  private int centerIndex = -1;
1043
1063
 
1044
1064
  NativeTabbarLayout(Context context) {
@@ -1068,7 +1088,7 @@ public class NativeNavigationPlugin extends Plugin {
1068
1088
  if (hasCenterButton()) {
1069
1089
  int barHeight = dp(style.height);
1070
1090
  int barTop = dp(style.barTop());
1071
- int centerGap = Math.min(dp(style.centerButtonDiameter + 22), Math.round(width * 0.46f));
1091
+ int centerGap = Math.min(dp(style.centerButtonDiameter + 4), Math.round(width * 0.34f));
1072
1092
  int leftWidth = Math.max(0, Math.round(width / 2f - centerGap / 2f));
1073
1093
  int rightX = Math.min(width, Math.round(width / 2f + centerGap / 2f));
1074
1094
  measureRange(0, centerIndex, leftWidth, barHeight);
@@ -1094,11 +1114,12 @@ public class NativeNavigationPlugin extends Plugin {
1094
1114
  int barTop = dp(style.barTop());
1095
1115
  int barHeight = dp(style.height);
1096
1116
  int buttonDiameter = dp(style.centerButtonDiameter);
1097
- int centerGap = Math.min(dp(style.centerButtonDiameter + 22), Math.round(width * 0.46f));
1117
+ int centerGap = Math.min(dp(style.centerButtonDiameter + 4), Math.round(width * 0.34f));
1098
1118
  int leftWidth = Math.max(0, Math.round(width / 2f - centerGap / 2f));
1099
1119
  int rightX = Math.min(width, Math.round(width / 2f + centerGap / 2f));
1100
1120
  View center = getChildAt(centerIndex);
1101
- center.layout((width - buttonDiameter) / 2, 0, (width + buttonDiameter) / 2, buttonDiameter);
1121
+ int centerTop = Math.max(0, barTop - dp(style.centerButtonLift));
1122
+ center.layout((width - buttonDiameter) / 2, centerTop, (width + buttonDiameter) / 2, centerTop + buttonDiameter);
1102
1123
  layoutRange(0, centerIndex, 0, barTop, leftWidth, barHeight);
1103
1124
  layoutRange(centerIndex + 1, getChildCount(), rightX, barTop, width - rightX, barHeight);
1104
1125
  return;
@@ -1152,24 +1173,27 @@ public class NativeNavigationPlugin extends Plugin {
1152
1173
  float barHeight = dp(style.height);
1153
1174
  float cornerRadius = Math.min(dp(style.cornerRadius), barHeight / 2f);
1154
1175
  float centerX = width / 2f;
1155
- float notchRadius = dp(style.centerButtonDiameter) / 2f + dp(7);
1156
- float notchDepth = Math.min(barHeight * 0.78f, notchRadius);
1157
- float leftShoulder = Math.max(cornerRadius, centerX - notchRadius);
1158
- float rightShoulder = Math.min(width - cornerRadius, centerX + notchRadius);
1159
- float control = notchDepth * 0.55228475f;
1176
+ float centerRadius = dp(style.centerButtonDiameter) / 2f;
1177
+ float centerTop = Math.max(0f, barTop - dp(style.centerButtonLift));
1178
+ float centerY = centerTop + centerRadius;
1179
+ float dyToBarTop = barTop - centerY;
1180
+ float shoulderWidth = (float) Math.sqrt(Math.max(0f, centerRadius * centerRadius - dyToBarTop * dyToBarTop));
1181
+ float leftShoulder = Math.max(cornerRadius, centerX - shoulderWidth);
1182
+ float rightShoulder = Math.min(width - cornerRadius, centerX + shoulderWidth);
1160
1183
  RectF barRect = new RectF(0, barTop, width, barTop + barHeight);
1184
+ RectF centerRect = new RectF(centerX - centerRadius, centerY - centerRadius, centerX + centerRadius, centerY + centerRadius);
1185
+ float startAngle = (float) Math.toDegrees(Math.atan2(dyToBarTop, -shoulderWidth));
1186
+ float endAngle = (float) Math.toDegrees(Math.atan2(dyToBarTop, shoulderWidth));
1187
+ float sweepAngle = endAngle - startAngle;
1188
+ if (sweepAngle <= 0f) {
1189
+ sweepAngle += 360f;
1190
+ }
1161
1191
 
1162
1192
  path.moveTo(barRect.left + cornerRadius, barRect.top);
1163
1193
  path.lineTo(leftShoulder, barRect.top);
1164
- path.cubicTo(
1165
- leftShoulder,
1166
- barRect.top + control,
1167
- centerX - control,
1168
- barRect.top + notchDepth,
1169
- centerX,
1170
- barRect.top + notchDepth
1171
- );
1172
- path.cubicTo(centerX + control, barRect.top + notchDepth, rightShoulder, barRect.top + control, rightShoulder, barRect.top);
1194
+ if (shoulderWidth > 0f) {
1195
+ path.arcTo(centerRect, startAngle, sweepAngle, false);
1196
+ }
1173
1197
  path.lineTo(barRect.right - cornerRadius, barRect.top);
1174
1198
  path.quadTo(barRect.right, barRect.top, barRect.right, barRect.top + cornerRadius);
1175
1199
  path.lineTo(barRect.right, barRect.bottom - cornerRadius);
@@ -1389,13 +1413,13 @@ public class NativeNavigationPlugin extends Plugin {
1389
1413
  private TabbarStyle makeTabbarStyle(JSObject rawStyle) {
1390
1414
  String requestedShape = rawStyle.getString("shape", "floating");
1391
1415
  boolean curve = "curve".equalsIgnoreCase(requestedShape);
1392
- int centerButtonDiameter = Math.max(styleDimension(rawStyle, "centerButtonDiameter", 76), 44);
1416
+ int centerButtonDiameter = Math.max(styleDimension(rawStyle, "centerButtonDiameter", 56), 44);
1393
1417
  int height = Math.max(styleDimension(rawStyle, "height", curve ? 76 : DEFAULT_TABBAR_DP), 44);
1394
1418
  int centerButtonLift = Math.max(styleDimension(rawStyle, "centerButtonLift", centerButtonDiameter / 2), 0);
1395
1419
  int bottomGap = Math.max(styleDimension(rawStyle, "bottomGap", curve ? 0 : 10), 0);
1396
1420
  int horizontalMargin = Math.max(styleDimension(rawStyle, "horizontalMargin", curve ? 0 : 24), 0);
1397
1421
  int maxWidth = Math.max(styleDimension(rawStyle, "maxWidth", curve ? 0 : 430), 0);
1398
- int cornerRadius = Math.max(styleDimension(rawStyle, "cornerRadius", curve ? 24 : height / 2), 0);
1422
+ int cornerRadius = Math.max(styleDimension(rawStyle, "cornerRadius", curve ? 0 : height / 2), 0);
1399
1423
  int centerButtonColor = parseColor(rawStyle.getString("centerButtonColor", null), tintColor);
1400
1424
  int centerButtonIconColor = parseColor(rawStyle.getString("centerButtonIconColor", null), Color.WHITE);
1401
1425
  return new TabbarStyle(
@@ -1439,8 +1463,8 @@ public class NativeNavigationPlugin extends Plugin {
1439
1463
  int tintFallback = dynamic ? dynamicColor("system_accent1_600", tintColor) : tintColor;
1440
1464
  int inactiveFallback = dynamic ? dynamicColor("system_neutral2_600", inactiveTintColor) : inactiveTintColor;
1441
1465
  int backgroundFallback = dynamic
1442
- ? withAlpha(dynamicColor(isNightMode() ? "system_neutral1_900" : "system_neutral1_50", Color.WHITE), 245)
1443
- : Color.argb(235, 255, 255, 255);
1466
+ ? dynamicColor(isNightMode() ? "system_neutral1_900" : "system_neutral1_50", DEFAULT_TABBAR_BACKGROUND_COLOR)
1467
+ : DEFAULT_TABBAR_BACKGROUND_COLOR;
1444
1468
  tintColor = parseColor(colors.getString("tint", null), tintFallback);
1445
1469
  inactiveTintColor = parseColor(colors.getString("inactiveTint", null), inactiveFallback);
1446
1470
  tabbarBackgroundColor = parseColor(colors.getString("background", null), backgroundFallback);
@@ -1455,11 +1479,13 @@ public class NativeNavigationPlugin extends Plugin {
1455
1479
  if (tabbar == null) {
1456
1480
  return;
1457
1481
  }
1482
+ int drawColor = resolvedTabbarSurfaceColor();
1483
+ if (tabbarBackdrop != null) {
1484
+ tabbarBackdrop.setBackgroundColor(drawColor);
1485
+ }
1458
1486
 
1459
- int drawColor = tabbarBackgroundColor;
1460
1487
  GlassOptions resolvedGlassOptions = tabbarGlassOptions == null ? GlassOptions.defaults() : tabbarGlassOptions;
1461
1488
  if (resolvedGlassOptions.isLiquidGlass()) {
1462
- drawColor = glassSurfaceColor(tabbarBackgroundColor, resolvedGlassOptions);
1463
1489
  if (tabbarContainer != null) {
1464
1490
  tabbarContainer.setBackgroundColor(Color.TRANSPARENT);
1465
1491
  }
@@ -1487,6 +1513,13 @@ public class NativeNavigationPlugin extends Plugin {
1487
1513
  tabbar.setTabbarStyle(tabbarStyle, drawColor, centerIndex);
1488
1514
  }
1489
1515
 
1516
+ private int resolvedTabbarSurfaceColor() {
1517
+ GlassOptions resolvedGlassOptions = tabbarGlassOptions == null ? GlassOptions.defaults() : tabbarGlassOptions;
1518
+ return resolvedGlassOptions.isLiquidGlass()
1519
+ ? glassSurfaceColor(tabbarBackgroundColor, resolvedGlassOptions)
1520
+ : tabbarBackgroundColor;
1521
+ }
1522
+
1490
1523
  private void reapplyVisibleChromeBackgrounds() {
1491
1524
  if (navbarContainer != null && navbarContainer.getVisibility() == View.VISIBLE) {
1492
1525
  applyChromeBackground(navbarContainer, navbarGlassBackdrop, navbarGlassSurface, navbarBackgroundColor, navbarGlassOptions, 0f);
@@ -1659,6 +1692,17 @@ public class NativeNavigationPlugin extends Plugin {
1659
1692
  fillContainer(navbarGlassSurface);
1660
1693
  }
1661
1694
 
1695
+ if (tabbarBackdrop != null) {
1696
+ int backdropHeight = tabbarVisible ? bottom + dp(tabbarStyle.bottomGap) : 0;
1697
+ FrameLayout.LayoutParams backdropParams = new FrameLayout.LayoutParams(
1698
+ ViewGroup.LayoutParams.MATCH_PARENT,
1699
+ backdropHeight,
1700
+ Gravity.BOTTOM
1701
+ );
1702
+ tabbarBackdrop.setLayoutParams(backdropParams);
1703
+ tabbarBackdrop.setBackgroundColor(resolvedTabbarSurfaceColor());
1704
+ tabbarBackdrop.setVisibility(tabbarVisible && backdropHeight > 0 ? View.VISIBLE : View.GONE);
1705
+ }
1662
1706
  if (tabbarContainer != null) {
1663
1707
  int rootWidth = root.getWidth() > 0 ? root.getWidth() : Resources.getSystem().getDisplayMetrics().widthPixels;
1664
1708
  int availableWidth = Math.max(0, rootWidth - dp(tabbarStyle.horizontalMargin) * 2);
@@ -1692,6 +1736,9 @@ public class NativeNavigationPlugin extends Plugin {
1692
1736
  if (navbarContainer != null) {
1693
1737
  navbarContainer.bringToFront();
1694
1738
  }
1739
+ if (tabbarBackdrop != null) {
1740
+ tabbarBackdrop.bringToFront();
1741
+ }
1695
1742
  if (tabbar != null) {
1696
1743
  tabbar.bringToFront();
1697
1744
  }
package/dist/docs.json CHANGED
@@ -936,7 +936,7 @@
936
936
  {
937
937
  "name": "shape",
938
938
  "tags": [],
939
- "docs": "`floating` keeps the existing capsule tabbar. `curve` draws a full-width\nbar with a center notch and raised center tab.",
939
+ "docs": "`floating` keeps the existing capsule tabbar. `curve` draws a full-width\nbar with an included center action.",
940
940
  "complexTypes": [
941
941
  "NativeNavigationTabbarShape"
942
942
  ],
@@ -973,21 +973,21 @@
973
973
  {
974
974
  "name": "cornerRadius",
975
975
  "tags": [],
976
- "docs": "Background corner radius in native points/dp. Defaults to a capsule radius\nfor `floating` and `24` for `curve`.",
976
+ "docs": "Background corner radius in native points/dp. Defaults to a capsule radius\nfor `floating` and `0` for `curve`.",
977
977
  "complexTypes": [],
978
978
  "type": "number | undefined"
979
979
  },
980
980
  {
981
981
  "name": "centerItemId",
982
982
  "tags": [],
983
- "docs": "Tab id promoted into the raised center button for `curve`. Defaults to the\nmiddle tab.",
983
+ "docs": "Tab id promoted into the included center button for `curve`. Defaults to\nthe middle tab.",
984
984
  "complexTypes": [],
985
985
  "type": "string | undefined"
986
986
  },
987
987
  {
988
988
  "name": "centerButtonDiameter",
989
989
  "tags": [],
990
- "docs": "Raised center button diameter in native points/dp. Defaults to `76`.",
990
+ "docs": "Included center button diameter in native points/dp. Defaults to `56`.",
991
991
  "complexTypes": [],
992
992
  "type": "number | undefined"
993
993
  },
@@ -1001,14 +1001,14 @@
1001
1001
  {
1002
1002
  "name": "centerButtonColor",
1003
1003
  "tags": [],
1004
- "docs": "Raised center button color. Defaults to the active tint color.",
1004
+ "docs": "Included center button color. Defaults to the active tint color.",
1005
1005
  "complexTypes": [],
1006
1006
  "type": "string | undefined"
1007
1007
  },
1008
1008
  {
1009
1009
  "name": "centerButtonIconColor",
1010
1010
  "tags": [],
1011
- "docs": "Raised center button icon color. Defaults to white.",
1011
+ "docs": "Included center button icon color. Defaults to white.",
1012
1012
  "complexTypes": [],
1013
1013
  "type": "string | undefined"
1014
1014
  }
@@ -324,7 +324,7 @@ export interface NativeNavigationTab {
324
324
  export interface NativeNavigationTabbarStyle {
325
325
  /**
326
326
  * `floating` keeps the existing capsule tabbar. `curve` draws a full-width
327
- * bar with a center notch and raised center tab.
327
+ * bar with an included center action.
328
328
  */
329
329
  shape?: NativeNavigationTabbarShape;
330
330
  /**
@@ -349,16 +349,16 @@ export interface NativeNavigationTabbarStyle {
349
349
  bottomGap?: number;
350
350
  /**
351
351
  * Background corner radius in native points/dp. Defaults to a capsule radius
352
- * for `floating` and `24` for `curve`.
352
+ * for `floating` and `0` for `curve`.
353
353
  */
354
354
  cornerRadius?: number;
355
355
  /**
356
- * Tab id promoted into the raised center button for `curve`. Defaults to the
357
- * middle tab.
356
+ * Tab id promoted into the included center button for `curve`. Defaults to
357
+ * the middle tab.
358
358
  */
359
359
  centerItemId?: string;
360
360
  /**
361
- * Raised center button diameter in native points/dp. Defaults to `76`.
361
+ * Included center button diameter in native points/dp. Defaults to `56`.
362
362
  */
363
363
  centerButtonDiameter?: number;
364
364
  /**
@@ -367,11 +367,11 @@ export interface NativeNavigationTabbarStyle {
367
367
  */
368
368
  centerButtonLift?: number;
369
369
  /**
370
- * Raised center button color. Defaults to the active tint color.
370
+ * Included center button color. Defaults to the active tint color.
371
371
  */
372
372
  centerButtonColor?: string;
373
373
  /**
374
- * Raised center button icon color. Defaults to white.
374
+ * Included center button icon color. Defaults to white.
375
375
  */
376
376
  centerButtonIconColor?: string;
377
377
  }
@@ -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 * 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/**\n * Native tabbar layout and background shape options.\n */\nexport interface NativeNavigationTabbarStyle {\n /**\n * `floating` keeps the existing capsule tabbar. `curve` draws a full-width\n * bar with a center notch and raised center tab.\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 `24` for `curve`.\n */\n cornerRadius?: number;\n\n /**\n * Tab id promoted into the raised center button for `curve`. Defaults to the\n * middle tab.\n */\n centerItemId?: string;\n\n /**\n * Raised center button diameter in native points/dp. Defaults to `76`.\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 * Raised center button color. Defaults to the active tint color.\n */\n centerButtonColor?: string;\n\n /**\n * Raised 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 * 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/**\n * Native tabbar layout and background shape options.\n */\nexport interface NativeNavigationTabbarStyle {\n /**\n * `floating` keeps the existing capsule tabbar. `curve` draws a full-width\n * 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"]}
package/dist/esm/web.js CHANGED
@@ -63,7 +63,7 @@ export class NativeNavigationWeb extends WebPlugin {
63
63
  const defaultHeight = style.shape === 'curve' ? 76 : style.shape === 'floating' ? 64 : DEFAULT_TABBAR_HEIGHT;
64
64
  const height = (_a = style.height) !== null && _a !== void 0 ? _a : defaultHeight;
65
65
  const bottomGap = (_b = style.bottomGap) !== null && _b !== void 0 ? _b : (style.shape === 'curve' ? 0 : 10);
66
- const centerButtonLift = style.shape === 'curve' ? ((_c = style.centerButtonLift) !== null && _c !== void 0 ? _c : ((_d = style.centerButtonDiameter) !== null && _d !== void 0 ? _d : 76) / 2) : 0;
66
+ const centerButtonLift = style.shape === 'curve' ? ((_c = style.centerButtonLift) !== null && _c !== void 0 ? _c : ((_d = style.centerButtonDiameter) !== null && _d !== void 0 ? _d : 56) / 2) : 0;
67
67
  return Math.ceil(height + bottomGap + centerButtonLift);
68
68
  }
69
69
  applyInsets() {
@@ -1 +1 @@
1
- {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAgB5C,MAAM,qBAAqB,GAAG,EAAE,CAAC;AACjC,MAAM,qBAAqB,GAAG,EAAE,CAAC;AACjC,MAAM,2BAA2B,GAAG,GAAG,CAAC;AAExC,MAAM,OAAO,mBAAoB,SAAQ,SAAS;IAAlD;;QACU,WAAM,GAAqC;YACjD,gBAAgB,EAAE,KAAK;YACvB,OAAO,EAAE,IAAI;YACb,aAAa,EAAE,MAAM;SACtB,CAAC;QACM,WAAM,GAAkC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QACzD,WAAM,GAAkC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QACzD,qBAAgB,GAA4C,IAAI,CAAC;IAkJ3E,CAAC;IAhJC,KAAK,CAAC,SAAS,CAAC,UAA4C,EAAE;QAC5D,IAAI,CAAC,MAAM,iDACN,IAAI,CAAC,MAAM,GACX,OAAO,KACV,MAAM,kCACD,IAAI,CAAC,MAAM,CAAC,MAAM,GAClB,OAAO,CAAC,MAAM,GAEnB,KAAK,kCACA,IAAI,CAAC,MAAM,CAAC,KAAK,GACjB,OAAO,CAAC,KAAK,IAEnB,CAAC;QACF,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC;IAC5B,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,OAAsC;QACpD,IAAI,CAAC,MAAM,iDACN,IAAI,CAAC,MAAM,GACX,OAAO,KACV,MAAM,kCACD,IAAI,CAAC,MAAM,CAAC,MAAM,GAClB,OAAO,CAAC,MAAM,GAEnB,KAAK,kCACA,IAAI,CAAC,MAAM,CAAC,KAAK,GACjB,OAAO,CAAC,KAAK,IAEnB,CAAC;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BAA+B,EAAE,GAAG,MAAM,CAAC,KAAK,IAAI,CAAC,CAAC;YAC7E,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,gCAAgC,EAAE,GAAG,MAAM,CAAC,MAAM,IAAI,CAAC,CAAC;YAC/E,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,8BAA8B,EAAE,GAAG,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC;YAC3E,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,4BAA4B,EAAE,GAAG,MAAM,CAAC,YAAY,IAAI,CAAC,CAAC;YACjF,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,4BAA4B,EAAE,GAAG,MAAM,CAAC,YAAY,IAAI,CAAC,CAAC;QACnF,CAAC;QAED,MAAM,KAAK,GAAG,EAAE,MAAM,EAAE,CAAC;QACzB,IAAI,CAAC,eAAe,CAAC,iBAAiB,EAAE,KAAK,CAAC,CAAC;QAC/C,IAAI,CAAC,mBAAmB,CAAC,iBAAiB,EAAE,KAAK,CAAC,CAAC;QACnD,OAAO,EAAE,MAAM,EAAE,CAAC;IACpB,CAAC;IAEO,mBAAmB,CAAC,IAAY,EAAE,MAAe;QACvD,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;YAClC,OAAO;QACT,CAAC;QACD,MAAM,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,uBAAuB,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;IACnF,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type {\n NativeNavigationBeginTransitionOptions,\n NativeNavigationConfigureOptions,\n NativeNavigationFinishTransitionOptions,\n NativeNavigationInsets,\n NativeNavigationInsetsResult,\n NativeNavigationNavbarOptions,\n NativeNavigationPlugin,\n NativeNavigationTabbarOptions,\n NativeNavigationTransitionDirection,\n NativeNavigationTransitionResult,\n PluginVersionResult,\n} from './definitions';\n\nconst DEFAULT_NAVBAR_HEIGHT = 44;\nconst DEFAULT_TABBAR_HEIGHT = 49;\nconst DEFAULT_TRANSITION_DURATION = 350;\n\nexport class NativeNavigationWeb extends WebPlugin implements NativeNavigationPlugin {\n private config: NativeNavigationConfigureOptions = {\n contentInsetMode: 'css',\n enabled: true,\n platformStyle: 'auto',\n };\n private navbar: NativeNavigationNavbarOptions = { hidden: true };\n private tabbar: NativeNavigationTabbarOptions = { hidden: true };\n private activeTransition: NativeNavigationTransitionResult | null = null;\n\n async configure(options: NativeNavigationConfigureOptions = {}): Promise<NativeNavigationInsetsResult> {\n this.config = {\n ...this.config,\n ...options,\n colors: {\n ...this.config.colors,\n ...options.colors,\n },\n glass: {\n ...this.config.glass,\n ...options.glass,\n },\n };\n return this.applyInsets();\n }\n\n async setNavbar(options: NativeNavigationNavbarOptions): Promise<NativeNavigationInsetsResult> {\n this.navbar = {\n ...this.navbar,\n ...options,\n colors: {\n ...this.navbar.colors,\n ...options.colors,\n },\n glass: {\n ...this.navbar.glass,\n ...options.glass,\n },\n };\n return this.applyInsets();\n }\n\n async setTabbar(options: NativeNavigationTabbarOptions): Promise<NativeNavigationInsetsResult> {\n this.tabbar = {\n ...this.tabbar,\n ...options,\n colors: {\n ...this.tabbar.colors,\n ...options.colors,\n },\n style: {\n ...this.tabbar.style,\n ...options.style,\n },\n glass: {\n ...this.tabbar.glass,\n ...options.glass,\n },\n };\n return this.applyInsets();\n }\n\n async beginTransition(\n options: NativeNavigationBeginTransitionOptions = {},\n ): Promise<NativeNavigationTransitionResult> {\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\n async finishTransition(\n options: NativeNavigationFinishTransitionOptions = {},\n ): Promise<NativeNavigationTransitionResult> {\n const transition =\n this.activeTransition && (!options.id || options.id === this.activeTransition.id)\n ? {\n ...this.activeTransition,\n direction: options.direction ?? this.activeTransition.direction,\n duration: options.duration ?? this.activeTransition.duration,\n }\n : this.createTransition(options.id, options.direction, options.duration);\n\n this.activeTransition = null;\n this.notifyListeners('transitionEnd', transition);\n this.dispatchWindowEvent('transitionEnd', transition);\n return transition;\n }\n\n async getPluginVersion(): Promise<PluginVersionResult> {\n return {\n version: 'web',\n };\n }\n\n private createTransition(\n id = `transition-${Date.now()}`,\n direction: NativeNavigationTransitionDirection = 'forward',\n duration = this.config.animationDuration ?? DEFAULT_TRANSITION_DURATION,\n ): NativeNavigationTransitionResult {\n return { id, direction, duration };\n }\n\n private currentTabbarHeight(): number {\n const style = this.tabbar.style;\n if (!style) {\n return DEFAULT_TABBAR_HEIGHT;\n }\n\n const defaultHeight = style.shape === 'curve' ? 76 : style.shape === 'floating' ? 64 : DEFAULT_TABBAR_HEIGHT;\n const height = style.height ?? defaultHeight;\n const bottomGap = style.bottomGap ?? (style.shape === 'curve' ? 0 : 10);\n const centerButtonLift =\n style.shape === 'curve' ? (style.centerButtonLift ?? (style.centerButtonDiameter ?? 76) / 2) : 0;\n return Math.ceil(height + bottomGap + centerButtonLift);\n }\n\n private applyInsets(): NativeNavigationInsetsResult {\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: NativeNavigationInsets = {\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\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\n const event = { insets };\n this.notifyListeners('safeAreaChanged', event);\n this.dispatchWindowEvent('safeAreaChanged', event);\n return { insets };\n }\n\n private dispatchWindowEvent(name: string, detail: unknown): void {\n if (typeof window === 'undefined') {\n return;\n }\n window.dispatchEvent(new CustomEvent(`capNativeNavigation:${name}`, { detail }));\n }\n}\n"]}
1
+ {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAgB5C,MAAM,qBAAqB,GAAG,EAAE,CAAC;AACjC,MAAM,qBAAqB,GAAG,EAAE,CAAC;AACjC,MAAM,2BAA2B,GAAG,GAAG,CAAC;AAExC,MAAM,OAAO,mBAAoB,SAAQ,SAAS;IAAlD;;QACU,WAAM,GAAqC;YACjD,gBAAgB,EAAE,KAAK;YACvB,OAAO,EAAE,IAAI;YACb,aAAa,EAAE,MAAM;SACtB,CAAC;QACM,WAAM,GAAkC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QACzD,WAAM,GAAkC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QACzD,qBAAgB,GAA4C,IAAI,CAAC;IAkJ3E,CAAC;IAhJC,KAAK,CAAC,SAAS,CAAC,UAA4C,EAAE;QAC5D,IAAI,CAAC,MAAM,iDACN,IAAI,CAAC,MAAM,GACX,OAAO,KACV,MAAM,kCACD,IAAI,CAAC,MAAM,CAAC,MAAM,GAClB,OAAO,CAAC,MAAM,GAEnB,KAAK,kCACA,IAAI,CAAC,MAAM,CAAC,KAAK,GACjB,OAAO,CAAC,KAAK,IAEnB,CAAC;QACF,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC;IAC5B,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,OAAsC;QACpD,IAAI,CAAC,MAAM,iDACN,IAAI,CAAC,MAAM,GACX,OAAO,KACV,MA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e,CAAC;YACtC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,6BAA6B,EAAE,GAAG,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC;YACzE,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,+BAA+B,EAAE,GAAG,MAAM,CAAC,KAAK,IAAI,CAAC,CAAC;YAC7E,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,gCAAgC,EAAE,GAAG,MAAM,CAAC,MAAM,IAAI,CAAC,CAAC;YAC/E,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,8BAA8B,EAAE,GAAG,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC;YAC3E,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,4BAA4B,EAAE,GAAG,MAAM,CAAC,YAAY,IAAI,CAAC,CAAC;YACjF,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,4BAA4B,EAAE,GAAG,MAAM,CAAC,YAAY,IAAI,CAAC,CAAC;QACnF,CAAC;QAED,MAAM,KAAK,GAAG,EAAE,MAAM,EAAE,CAAC;QACzB,IAAI,CAAC,eAAe,CAAC,iBAAiB,EAAE,KAAK,CAAC,CAAC;QAC/C,IAAI,CAAC,mBAAmB,CAAC,iBAAiB,EAAE,KAAK,CAAC,CAAC;QACnD,OAAO,EAAE,MAAM,EAAE,CAAC;IACpB,CAAC;IAEO,mBAAmB,CAAC,IAAY,EAAE,MAAe;QACvD,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;YAClC,OAAO;QACT,CAAC;QACD,MAAM,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,uBAAuB,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;IACnF,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type {\n NativeNavigationBeginTransitionOptions,\n NativeNavigationConfigureOptions,\n NativeNavigationFinishTransitionOptions,\n NativeNavigationInsets,\n NativeNavigationInsetsResult,\n NativeNavigationNavbarOptions,\n NativeNavigationPlugin,\n NativeNavigationTabbarOptions,\n NativeNavigationTransitionDirection,\n NativeNavigationTransitionResult,\n PluginVersionResult,\n} from './definitions';\n\nconst DEFAULT_NAVBAR_HEIGHT = 44;\nconst DEFAULT_TABBAR_HEIGHT = 49;\nconst DEFAULT_TRANSITION_DURATION = 350;\n\nexport class NativeNavigationWeb extends WebPlugin implements NativeNavigationPlugin {\n private config: NativeNavigationConfigureOptions = {\n contentInsetMode: 'css',\n enabled: true,\n platformStyle: 'auto',\n };\n private navbar: NativeNavigationNavbarOptions = { hidden: true };\n private tabbar: NativeNavigationTabbarOptions = { hidden: true };\n private activeTransition: NativeNavigationTransitionResult | null = null;\n\n async configure(options: NativeNavigationConfigureOptions = {}): Promise<NativeNavigationInsetsResult> {\n this.config = {\n ...this.config,\n ...options,\n colors: {\n ...this.config.colors,\n ...options.colors,\n },\n glass: {\n ...this.config.glass,\n ...options.glass,\n },\n };\n return this.applyInsets();\n }\n\n async setNavbar(options: NativeNavigationNavbarOptions): Promise<NativeNavigationInsetsResult> {\n this.navbar = {\n ...this.navbar,\n ...options,\n colors: {\n ...this.navbar.colors,\n ...options.colors,\n },\n glass: {\n ...this.navbar.glass,\n ...options.glass,\n },\n };\n return this.applyInsets();\n }\n\n async setTabbar(options: NativeNavigationTabbarOptions): Promise<NativeNavigationInsetsResult> {\n this.tabbar = {\n ...this.tabbar,\n ...options,\n colors: {\n ...this.tabbar.colors,\n ...options.colors,\n },\n style: {\n ...this.tabbar.style,\n ...options.style,\n },\n glass: {\n ...this.tabbar.glass,\n ...options.glass,\n },\n };\n return this.applyInsets();\n }\n\n async beginTransition(\n options: NativeNavigationBeginTransitionOptions = {},\n ): Promise<NativeNavigationTransitionResult> {\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\n async finishTransition(\n options: NativeNavigationFinishTransitionOptions = {},\n ): Promise<NativeNavigationTransitionResult> {\n const transition =\n this.activeTransition && (!options.id || options.id === this.activeTransition.id)\n ? {\n ...this.activeTransition,\n direction: options.direction ?? this.activeTransition.direction,\n duration: options.duration ?? this.activeTransition.duration,\n }\n : this.createTransition(options.id, options.direction, options.duration);\n\n this.activeTransition = null;\n this.notifyListeners('transitionEnd', transition);\n this.dispatchWindowEvent('transitionEnd', transition);\n return transition;\n }\n\n async getPluginVersion(): Promise<PluginVersionResult> {\n return {\n version: 'web',\n };\n }\n\n private createTransition(\n id = `transition-${Date.now()}`,\n direction: NativeNavigationTransitionDirection = 'forward',\n duration = this.config.animationDuration ?? DEFAULT_TRANSITION_DURATION,\n ): NativeNavigationTransitionResult {\n return { id, direction, duration };\n }\n\n private currentTabbarHeight(): number {\n const style = this.tabbar.style;\n if (!style) {\n return DEFAULT_TABBAR_HEIGHT;\n }\n\n const defaultHeight = style.shape === 'curve' ? 76 : style.shape === 'floating' ? 64 : DEFAULT_TABBAR_HEIGHT;\n const height = style.height ?? defaultHeight;\n const bottomGap = style.bottomGap ?? (style.shape === 'curve' ? 0 : 10);\n const centerButtonLift =\n style.shape === 'curve' ? (style.centerButtonLift ?? (style.centerButtonDiameter ?? 56) / 2) : 0;\n return Math.ceil(height + bottomGap + centerButtonLift);\n }\n\n private applyInsets(): NativeNavigationInsetsResult {\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: NativeNavigationInsets = {\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\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\n const event = { insets };\n this.notifyListeners('safeAreaChanged', event);\n this.dispatchWindowEvent('safeAreaChanged', event);\n return { insets };\n }\n\n private dispatchWindowEvent(name: string, detail: unknown): void {\n if (typeof window === 'undefined') {\n return;\n }\n window.dispatchEvent(new CustomEvent(`capNativeNavigation:${name}`, { detail }));\n }\n}\n"]}
@@ -279,7 +279,7 @@ class NativeNavigationWeb extends core.WebPlugin {
279
279
  const defaultHeight = style.shape === 'curve' ? 76 : style.shape === 'floating' ? 64 : DEFAULT_TABBAR_HEIGHT;
280
280
  const height = (_a = style.height) !== null && _a !== void 0 ? _a : defaultHeight;
281
281
  const bottomGap = (_b = style.bottomGap) !== null && _b !== void 0 ? _b : (style.shape === 'curve' ? 0 : 10);
282
- const centerButtonLift = style.shape === 'curve' ? ((_c = style.centerButtonLift) !== null && _c !== void 0 ? _c : ((_d = style.centerButtonDiameter) !== null && _d !== void 0 ? _d : 76) / 2) : 0;
282
+ const centerButtonLift = style.shape === 'curve' ? ((_c = style.centerButtonLift) !== null && _c !== void 0 ? _c : ((_d = style.centerButtonDiameter) !== null && _d !== void 0 ? _d : 56) / 2) : 0;
283
283
  return Math.ceil(height + bottomGap + centerButtonLift);
284
284
  }
285
285
  applyInsets() {
@@ -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 : 76) / 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,IAAI;AACJ,CAAC;AACD,MAAM,mBAAmB,GAAG,YAAY,CAAC,MAAM,qDAAiB,EAAE,gBAAgB;AAC3E,SAAS,8BAA8B,GAAG;AACjD,IAAI,IAAI,OAAO,cAAc,KAAK,WA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AAQ,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;;;;;;;;;;;;;"}
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;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,IAA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,EAAE,CAAC,CAAC;AAC1F,YAAY,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,8BAA8B,EAAE,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACtF,YAAY,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,4BAA4B,EAAE,CAAC,EAAE,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;AAC5F,YAAY,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,4BAA4B,EAAE,CAAC,EAAE,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;AAC5F,QAAQ;AACR,QAAQ,MAAM,KAAK,GAAG,EAAE,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 CHANGED
@@ -278,7 +278,7 @@ var capacitorNativeNavigation = (function (exports, core) {
278
278
  const defaultHeight = style.shape === 'curve' ? 76 : style.shape === 'floating' ? 64 : DEFAULT_TABBAR_HEIGHT;
279
279
  const height = (_a = style.height) !== null && _a !== void 0 ? _a : defaultHeight;
280
280
  const bottomGap = (_b = style.bottomGap) !== null && _b !== void 0 ? _b : (style.shape === 'curve' ? 0 : 10);
281
- const centerButtonLift = style.shape === 'curve' ? ((_c = style.centerButtonLift) !== null && _c !== void 0 ? _c : ((_d = style.centerButtonDiameter) !== null && _d !== void 0 ? _d : 76) / 2) : 0;
281
+ const centerButtonLift = style.shape === 'curve' ? ((_c = style.centerButtonLift) !== null && _c !== void 0 ? _c : ((_d = style.centerButtonDiameter) !== null && _d !== void 0 ? _d : 56) / 2) : 0;
282
282
  return Math.ceil(height + bottomGap + centerButtonLift);
283
283
  }
284
284
  applyInsets() {
@@ -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 : 76) / 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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,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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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;;;;;;;;;;;;;;;;;;;"}
@@ -1233,13 +1233,13 @@ public class NativeNavigationPlugin: CAPPlugin, CAPBridgedPlugin, UITabBarContro
1233
1233
  let requestedShape = (rawStyle["shape"] as? String)?.lowercased()
1234
1234
  let shape: NativeNavigationTabbarShape = requestedShape == "curve" ? .curve : .floating
1235
1235
  let isCurve = shape == .curve
1236
- let centerDiameter = max(number(from: rawStyle["centerButtonDiameter"]) ?? 76, 44)
1236
+ let centerDiameter = max(number(from: rawStyle["centerButtonDiameter"]) ?? 56, 44)
1237
1237
  let height = max(number(from: rawStyle["height"]) ?? (isCurve ? 76 : 64), 44)
1238
1238
  let centerLift = max(number(from: rawStyle["centerButtonLift"]) ?? (centerDiameter / 2), 0)
1239
1239
  let bottomGap = max(number(from: rawStyle["bottomGap"]) ?? (isCurve ? 0 : 10), 0)
1240
1240
  let horizontalMargin = max(number(from: rawStyle["horizontalMargin"]) ?? (isCurve ? 0 : 24), 0)
1241
1241
  let maxWidth = max(number(from: rawStyle["maxWidth"]) ?? (isCurve ? 0 : 430), 0)
1242
- let cornerRadius = max(number(from: rawStyle["cornerRadius"]) ?? (isCurve ? 24 : height / 2), 0)
1242
+ let cornerRadius = max(number(from: rawStyle["cornerRadius"]) ?? (isCurve ? 0 : height / 2), 0)
1243
1243
  let centerButtonColor = (rawStyle["centerButtonColor"] as? String).flatMap { UIColor(hexString: $0) }
1244
1244
  let centerButtonIconColor = (rawStyle["centerButtonIconColor"] as? String).flatMap { UIColor(hexString: $0) } ?? .white
1245
1245
 
@@ -1854,8 +1854,8 @@ private struct NativeNavigationTabbarStyleConfig {
1854
1854
  var bottomGap: CGFloat = 10
1855
1855
  var cornerRadius: CGFloat = 32
1856
1856
  var centerItemId: String?
1857
- var centerButtonDiameter: CGFloat = 76
1858
- var centerButtonLift: CGFloat = 38
1857
+ var centerButtonDiameter: CGFloat = 56
1858
+ var centerButtonLift: CGFloat = 28
1859
1859
  var centerButtonColor: UIColor?
1860
1860
  var centerButtonIconColor: UIColor = .white
1861
1861
 
@@ -1877,25 +1877,24 @@ private enum NativeNavigationTabbarBackgroundPath {
1877
1877
  let barRect = CGRect(x: 0, y: style.barTop, width: bounds.width, height: max(style.height, 1))
1878
1878
  let cornerRadius = min(style.cornerRadius, barRect.height / 2)
1879
1879
  let centerX = bounds.midX
1880
- let notchRadius = (style.centerButtonDiameter / 2) + 7
1881
- let notchDepth = min(barRect.height * 0.78, notchRadius)
1882
- let leftShoulder = max(barRect.minX + cornerRadius, centerX - notchRadius)
1883
- let rightShoulder = min(barRect.maxX - cornerRadius, centerX + notchRadius)
1884
- let control = notchDepth * 0.55228475
1880
+ let centerRadius = style.centerButtonDiameter / 2
1881
+ let centerTop = max(0, barRect.minY - style.centerButtonLift)
1882
+ let centerY = centerTop + centerRadius
1883
+ let dyToBarTop = barRect.minY - centerY
1884
+ let shoulderWidth = sqrt(max(0, centerRadius * centerRadius - dyToBarTop * dyToBarTop))
1885
+ let leftShoulder = max(barRect.minX + cornerRadius, centerX - shoulderWidth)
1886
+ let startAngle = atan2(dyToBarTop, -shoulderWidth)
1887
+ var endAngle = atan2(dyToBarTop, shoulderWidth)
1888
+ if endAngle <= startAngle {
1889
+ endAngle += .pi * 2
1890
+ }
1885
1891
  let path = UIBezierPath()
1886
1892
 
1887
1893
  path.move(to: CGPoint(x: barRect.minX + cornerRadius, y: barRect.minY))
1888
1894
  path.addLine(to: CGPoint(x: leftShoulder, y: barRect.minY))
1889
- path.addCurve(
1890
- to: CGPoint(x: centerX, y: barRect.minY + notchDepth),
1891
- controlPoint1: CGPoint(x: leftShoulder, y: barRect.minY + control),
1892
- controlPoint2: CGPoint(x: centerX - control, y: barRect.minY + notchDepth)
1893
- )
1894
- path.addCurve(
1895
- to: CGPoint(x: rightShoulder, y: barRect.minY),
1896
- controlPoint1: CGPoint(x: centerX + control, y: barRect.minY + notchDepth),
1897
- controlPoint2: CGPoint(x: rightShoulder, y: barRect.minY + control)
1898
- )
1895
+ if shoulderWidth > 0 {
1896
+ path.addArc(withCenter: CGPoint(x: centerX, y: centerY), radius: centerRadius, startAngle: startAngle, endAngle: endAngle, clockwise: true)
1897
+ }
1899
1898
  path.addLine(to: CGPoint(x: barRect.maxX - cornerRadius, y: barRect.minY))
1900
1899
  path.addQuadCurve(to: CGPoint(x: barRect.maxX, y: barRect.minY + cornerRadius), controlPoint: CGPoint(x: barRect.maxX, y: barRect.minY))
1901
1900
  path.addLine(to: CGPoint(x: barRect.maxX, y: barRect.maxY - cornerRadius))
@@ -1988,13 +1987,13 @@ private final class NativeNavigationFloatingTabBar: UIView {
1988
1987
 
1989
1988
  if let centerIndex = centerButtonIndex(), buttons.indices.contains(centerIndex) {
1990
1989
  let buttonDiameter = tabbarStyle.centerButtonDiameter
1991
- let centerGap = min(buttonDiameter + 22, bounds.width * 0.46)
1990
+ let centerGap = min(buttonDiameter + 4, bounds.width * 0.34)
1992
1991
  let barFrame = CGRect(x: 0, y: tabbarStyle.barTop, width: bounds.width, height: tabbarStyle.height)
1993
1992
  let leftWidth = max(0, bounds.midX - centerGap / 2)
1994
1993
  let rightX = min(bounds.width, bounds.midX + centerGap / 2)
1995
1994
  let centerFrame = CGRect(
1996
1995
  x: bounds.midX - buttonDiameter / 2,
1997
- y: 0,
1996
+ y: max(0, tabbarStyle.barTop - tabbarStyle.centerButtonLift),
1998
1997
  width: buttonDiameter,
1999
1998
  height: buttonDiameter
2000
1999
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/capacitor-native-navigation",
3
- "version": "8.2.4",
3
+ "version": "8.2.6",
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",
@@ -54,7 +54,6 @@
54
54
  "check:wiring": "node scripts/check-capacitor-plugin-wiring.mjs",
55
55
  "demo:readme": "bun scripts/generate-readme-demos.mjs",
56
56
  "example:build": "bun run build && cd example-app && bun install --frozen-lockfile && bun run build",
57
- "example:capgo:deploy": "bun run example:build && bun scripts/deploy-example-capgo.mjs",
58
57
  "example:sync": "bun run example:build && cd example-app && bunx cap sync",
59
58
  "example:ios": "bun run example:build && cd example-app && ([ -d ios ] || bunx cap add ios) && bunx cap sync ios && bunx cap run ios",
60
59
  "example:android": "bun run example:build && cd example-app && ([ -d android ] || bunx cap add android) && bunx cap sync android && bunx cap run android",