@luckylca/react-native-liquid-glass 0.2.0 → 0.3.0

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.
Files changed (228) hide show
  1. package/README.md +20 -33
  2. package/README.zh-CN.md +20 -33
  3. package/THIRD_PARTY_NOTICES.md +1 -1
  4. package/android/build.gradle +4 -4
  5. package/android/src/main/java/expo/modules/{newhuliquidglass → liquidglass}/EffectiveScrollInputBridge.kt +2 -2
  6. package/android/src/main/java/expo/modules/{newhuliquidglass/ExpoGlassProviderCoreView.kt → liquidglass/GlassCaptureView.kt} +39 -39
  7. package/android/src/main/java/expo/modules/{newhuliquidglass/CoreLiquidGlassRegistry.kt → liquidglass/GlassRegistry.kt} +7 -7
  8. package/android/src/main/java/expo/modules/{newhuliquidglass/ExpoGlassSurfaceCoreView.kt → liquidglass/GlassSurfaceView.kt} +17 -17
  9. package/android/src/main/java/expo/modules/liquidglass/LiquidGlassModule.kt +205 -0
  10. package/android/src/main/java/expo/modules/{localglass/ExpoLocalGlassEngineModule.kt → liquidglass/LocalMaterialView.kt} +24 -27
  11. package/android/src/main/java/expo/modules/{newhuliquidglass → liquidglass}/PassSurfaceSuppression.kt +1 -1
  12. package/android/src/main/java/expo/modules/{newhuliquidglass → liquidglass}/SharedGlassPassProbeLog.kt +1 -1
  13. package/android/src/main/java/expo/modules/{newhuliquidglass → liquidglass}/SharedGlassPassWiring.kt +3 -3
  14. package/android-core/build.gradle +1 -1
  15. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/backdrop/BackdropRecorder.kt +4 -4
  16. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/backdrop/FrozenBackdrop.kt +1 -1
  17. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/backdrop/GlassBackdropCoordinator.kt +5 -5
  18. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/backdrop/GlassBackdropSourceHandle.kt +1 -1
  19. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/backdrop/GlassScrollSource.kt +1 -1
  20. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/backdrop/GlassViewController.kt +119 -722
  21. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/backdrop/LiquidGlassProviderLayout.kt +2 -2
  22. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/backdrop/LiquidGlassView.kt +2 -2
  23. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/backdrop/ReferenceSourceWindowPolicy.kt +1 -1
  24. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/backdrop/StableSceneTexturePolicy.kt +1 -1
  25. package/android-core/src/main/java/io/github/luckylca/liquidglass/backdrop/SurfaceFrameBuilder.kt +278 -0
  26. package/android-core/src/main/java/io/github/luckylca/liquidglass/backdrop/SurfaceInteraction.kt +359 -0
  27. package/android-core/src/main/java/io/github/luckylca/liquidglass/backdrop/internal/GlassFrame.kt +110 -0
  28. package/android-core/src/main/java/io/github/luckylca/liquidglass/backdrop/internal/GlassViewRenderer.kt +728 -0
  29. package/android-core/src/main/java/io/github/luckylca/liquidglass/backdrop/internal/ReferenceParityPasses.kt +705 -0
  30. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/backdrop/internal/ReferenceTabSampling.kt +1 -1
  31. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/backdrop/internal/SharedSceneCapture.kt +1 -1
  32. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/core/GlassCapabilities.kt +1 -1
  33. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/core/GlassEngine.kt +7 -7
  34. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/core/GlassMaterial.kt +1 -1
  35. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/core/GlassMath.kt +1 -1
  36. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/core/GlassOpticalInsets.kt +1 -1
  37. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/core/GlassRenderTier.kt +1 -1
  38. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/core/GlassShapePacker.kt +1 -1
  39. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/core/GlassSurfaceState.kt +1 -1
  40. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/core/GlassUniforms.kt +1 -1
  41. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/core/LiquidGlassShaders.kt +1 -1
  42. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/core/SharedGlassPass.kt +6 -6
  43. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/core/geometry/G2RoundedRectangle.kt +2 -2
  44. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/core/geometry/ReferenceG2MaskTexture.kt +1 -1
  45. package/android-core/src/main/java/io/github/luckylca/liquidglass/core/shader/HeightFieldGlassShader.kt +7 -0
  46. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/core/shader/ReferenceBackdropBlurShader.kt +1 -1
  47. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/core/shader/ReferenceGaussianDiscBackdropBlur.kt +1 -1
  48. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/core/shader/ReferenceGlassUniforms.kt +4 -4
  49. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/core/shader/ReferenceParityGlassShader.kt +1 -1
  50. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/core/shader/ReferenceParityMultiShapeShader.kt +1 -1
  51. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/core/shader/SdfScaleLensShader.kt +1 -1
  52. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/local/LocalGlassHardwareLayerExperiment.kt +1 -1
  53. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/local/LocalGlassMaterial.kt +1 -1
  54. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/local/LocalGlassRenderer.kt +2 -2
  55. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/local/LocalGlassRuntimeShader.kt +2 -2
  56. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/local/LocalGlassShader.kt +1 -1
  57. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/local/LocalGlassView.kt +2 -2
  58. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/motion/GlassMotionDriver.kt +1 -1
  59. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/motion/GlassMotionState.kt +1 -1
  60. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/motion/PointerVelocityTracker.kt +1 -1
  61. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/motion/SpringSpec.kt +1 -1
  62. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/optics/G2Corner.kt +1 -1
  63. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/optics/GlassMaterial.kt +3 -3
  64. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/optics/GlassOpticsShader.kt +3 -3
  65. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/optics/GlassParityProbe.kt +1 -1
  66. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/optics/GlassShapeGeometry.kt +1 -1
  67. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/optics/GlassUniformBinder.kt +2 -2
  68. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/optics/PixelDiff.kt +1 -1
  69. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/optics/ReferenceOptics.kt +1 -1
  70. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/rendering/GlassSurfaceHost.kt +17 -17
  71. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/rendering/GlassSurfaceRenderer.kt +9 -9
  72. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/rendering/RetainedBackdropLayer.kt +1 -1
  73. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/scheduler/GlassFrameScheduler.kt +2 -2
  74. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/telemetry/EffectiveScrollFpsProbe.kt +13 -13
  75. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/telemetry/GlassTelemetry.kt +1 -1
  76. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/telemetry/LiquidGlassPerfTelemetry.kt +13 -13
  77. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/telemetry/LiquidGlassTrace.kt +3 -3
  78. package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/telemetry/LocalGlassTelemetry.kt +1 -1
  79. package/docs/architecture.md +61 -0
  80. package/docs/migration-0.3.md +19 -0
  81. package/docs/publishing.md +29 -7
  82. package/expo-module.config.json +4 -4
  83. package/lib/commonjs/GlassSurface.js +157 -585
  84. package/lib/commonjs/GlassSurface.js.map +1 -1
  85. package/lib/commonjs/GlassTabBar.js +18 -957
  86. package/lib/commonjs/GlassTabBar.js.map +1 -1
  87. package/lib/commonjs/LocalGlassMaterial.js +3 -9
  88. package/lib/commonjs/LocalGlassMaterial.js.map +1 -1
  89. package/lib/commonjs/glassController.js +3 -7
  90. package/lib/commonjs/glassController.js.map +1 -1
  91. package/lib/commonjs/glassRuntime.js +7 -19
  92. package/lib/commonjs/glassRuntime.js.map +1 -1
  93. package/lib/commonjs/localGlassTelemetry.js +4 -13
  94. package/lib/commonjs/localGlassTelemetry.js.map +1 -1
  95. package/lib/commonjs/nativeGlassViews.js +8 -11
  96. package/lib/commonjs/nativeGlassViews.js.map +1 -1
  97. package/lib/commonjs/performanceTelemetry.js +2 -6
  98. package/lib/commonjs/performanceTelemetry.js.map +1 -1
  99. package/lib/commonjs/surface/InlineSurface.js +134 -0
  100. package/lib/commonjs/surface/InlineSurface.js.map +1 -0
  101. package/lib/commonjs/surface/MaterialProvider.js +78 -0
  102. package/lib/commonjs/surface/MaterialProvider.js.map +1 -0
  103. package/lib/commonjs/surface/NativeSurface.js +55 -0
  104. package/lib/commonjs/surface/NativeSurface.js.map +1 -0
  105. package/lib/commonjs/surface/PortalLayers.js +331 -0
  106. package/lib/commonjs/surface/PortalLayers.js.map +1 -0
  107. package/lib/commonjs/surface/contexts.js +108 -0
  108. package/lib/commonjs/surface/contexts.js.map +1 -0
  109. package/lib/commonjs/surface/registry.js +113 -0
  110. package/lib/commonjs/surface/registry.js.map +1 -0
  111. package/lib/commonjs/surface/styles.js +34 -0
  112. package/lib/commonjs/surface/styles.js.map +1 -0
  113. package/lib/commonjs/surface/types.js +3 -0
  114. package/lib/commonjs/surface/types.js.map +1 -0
  115. package/lib/commonjs/tabs/GlassTabItem.js +66 -0
  116. package/lib/commonjs/tabs/GlassTabItem.js.map +1 -0
  117. package/lib/commonjs/tabs/InlineTabBar.js +867 -0
  118. package/lib/commonjs/tabs/InlineTabBar.js.map +1 -0
  119. package/lib/commonjs/tabs/tabConstants.js +22 -0
  120. package/lib/commonjs/tabs/tabConstants.js.map +1 -0
  121. package/lib/commonjs/tabs/tabDebug.js +50 -0
  122. package/lib/commonjs/tabs/tabDebug.js.map +1 -0
  123. package/lib/commonjs/tabs/tabStyles.js +107 -0
  124. package/lib/commonjs/tabs/tabStyles.js.map +1 -0
  125. package/lib/commonjs/tabs/useInlineTabGesture.js +227 -0
  126. package/lib/commonjs/tabs/useInlineTabGesture.js.map +1 -0
  127. package/lib/commonjs/theme/buildTheme.js +1 -1
  128. package/lib/commonjs/theme/buildTheme.js.map +1 -1
  129. package/lib/module/GlassSurface.js +135 -563
  130. package/lib/module/GlassSurface.js.map +1 -1
  131. package/lib/module/GlassTabBar.js +18 -925
  132. package/lib/module/GlassTabBar.js.map +1 -1
  133. package/lib/module/LocalGlassMaterial.js +5 -11
  134. package/lib/module/LocalGlassMaterial.js.map +1 -1
  135. package/lib/module/glassController.js +3 -7
  136. package/lib/module/glassController.js.map +1 -1
  137. package/lib/module/glassRuntime.js +7 -19
  138. package/lib/module/glassRuntime.js.map +1 -1
  139. package/lib/module/localGlassTelemetry.js +4 -13
  140. package/lib/module/localGlassTelemetry.js.map +1 -1
  141. package/lib/module/nativeGlassViews.js +7 -10
  142. package/lib/module/nativeGlassViews.js.map +1 -1
  143. package/lib/module/performanceTelemetry.js +2 -6
  144. package/lib/module/performanceTelemetry.js.map +1 -1
  145. package/lib/module/surface/InlineSurface.js +97 -0
  146. package/lib/module/surface/InlineSurface.js.map +1 -0
  147. package/lib/module/surface/MaterialProvider.js +74 -0
  148. package/lib/module/surface/MaterialProvider.js.map +1 -0
  149. package/lib/module/surface/NativeSurface.js +47 -0
  150. package/lib/module/surface/NativeSurface.js.map +1 -0
  151. package/lib/module/surface/PortalLayers.js +292 -0
  152. package/lib/module/surface/PortalLayers.js.map +1 -0
  153. package/lib/module/surface/contexts.js +96 -0
  154. package/lib/module/surface/contexts.js.map +1 -0
  155. package/lib/module/surface/registry.js +103 -0
  156. package/lib/module/surface/registry.js.map +1 -0
  157. package/lib/module/surface/styles.js +31 -0
  158. package/lib/module/surface/styles.js.map +1 -0
  159. package/lib/module/surface/types.js +2 -0
  160. package/lib/module/surface/types.js.map +1 -0
  161. package/lib/module/tabs/GlassTabItem.js +30 -0
  162. package/lib/module/tabs/GlassTabItem.js.map +1 -0
  163. package/lib/module/tabs/InlineTabBar.js +829 -0
  164. package/lib/module/tabs/InlineTabBar.js.map +1 -0
  165. package/lib/module/tabs/tabConstants.js +19 -0
  166. package/lib/module/tabs/tabConstants.js.map +1 -0
  167. package/lib/module/tabs/tabDebug.js +13 -0
  168. package/lib/module/tabs/tabDebug.js.map +1 -0
  169. package/lib/module/tabs/tabStyles.js +104 -0
  170. package/lib/module/tabs/tabStyles.js.map +1 -0
  171. package/lib/module/tabs/useInlineTabGesture.js +221 -0
  172. package/lib/module/tabs/useInlineTabGesture.js.map +1 -0
  173. package/lib/module/theme/buildTheme.js +1 -1
  174. package/lib/module/theme/buildTheme.js.map +1 -1
  175. package/lib/types/GlassSurface.d.ts +17 -86
  176. package/lib/types/GlassTabBar.d.ts +1 -0
  177. package/lib/types/glassNativeEngine.d.ts +1 -1
  178. package/lib/types/glassRuntime.d.ts +5 -2
  179. package/lib/types/localGlassTelemetry.d.ts +2 -2
  180. package/lib/types/nativeGlassViews.d.ts +2 -4
  181. package/lib/types/surface/InlineSurface.d.ts +42 -0
  182. package/lib/types/surface/MaterialProvider.d.ts +46 -0
  183. package/lib/types/surface/NativeSurface.d.ts +11 -0
  184. package/lib/types/surface/PortalLayers.d.ts +33 -0
  185. package/lib/types/surface/contexts.d.ts +66 -0
  186. package/lib/types/surface/registry.d.ts +6 -0
  187. package/lib/types/surface/styles.d.ts +74 -0
  188. package/lib/types/surface/types.d.ts +118 -0
  189. package/lib/types/tabs/GlassTabItem.d.ts +20 -0
  190. package/lib/types/tabs/InlineTabBar.d.ts +5 -0
  191. package/lib/types/tabs/tabConstants.d.ts +34 -0
  192. package/lib/types/tabs/tabDebug.d.ts +15 -0
  193. package/lib/types/tabs/tabStyles.d.ts +119 -0
  194. package/lib/types/tabs/useInlineTabGesture.d.ts +34 -0
  195. package/package.json +6 -14
  196. package/src/GlassSurface.tsx +227 -1337
  197. package/src/GlassTabBar.tsx +43 -1241
  198. package/src/LocalGlassMaterial.tsx +5 -11
  199. package/src/glassController.ts +3 -7
  200. package/src/glassRuntime.ts +9 -26
  201. package/src/localGlassTelemetry.ts +6 -15
  202. package/src/nativeGlassViews.ts +7 -10
  203. package/src/performanceTelemetry.ts +2 -6
  204. package/src/surface/InlineSurface.tsx +299 -0
  205. package/src/surface/MaterialProvider.tsx +235 -0
  206. package/src/surface/NativeSurface.tsx +115 -0
  207. package/src/surface/PortalLayers.tsx +574 -0
  208. package/src/surface/contexts.tsx +188 -0
  209. package/src/surface/registry.ts +109 -0
  210. package/src/surface/styles.ts +31 -0
  211. package/src/surface/types.ts +139 -0
  212. package/src/tabs/GlassTabItem.tsx +100 -0
  213. package/src/tabs/InlineTabBar.tsx +1193 -0
  214. package/src/tabs/tabConstants.ts +35 -0
  215. package/src/tabs/tabDebug.ts +29 -0
  216. package/src/tabs/tabStyles.ts +104 -0
  217. package/src/tabs/useInlineTabGesture.ts +306 -0
  218. package/src/theme/buildTheme.ts +1 -1
  219. package/android/src/main/java/expo/modules/localglass/ExpoLocalGlassModule.kt +0 -341
  220. package/android/src/main/java/expo/modules/localglass/LocalGlassShader.kt +0 -59
  221. package/android/src/main/java/expo/modules/newhuliquidglass/ExpoGlassCoreModule.kt +0 -226
  222. package/android-core/src/main/java/com/newhu/liquidglass/backdrop/internal/GlassViewRenderer.kt +0 -1459
  223. package/android-core/src/main/java/com/newhu/liquidglass/core/shader/HeightFieldGlassShader.kt +0 -7
  224. package/android-core/src/main/java/com/newhu/liquidglass/rendering/GlassEngineSelection.kt +0 -30
  225. package/patches/liquid-glass-kit+1.0.0.patch +0 -2015
  226. package/patches/liquid-glass-kit-invalidation-coalescing.diff +0 -249
  227. package/patches/liquid-glass-kit-native-infra.diff +0 -624
  228. package/scripts/apply-legacy-patches.mjs +0 -116
@@ -0,0 +1,867 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.AnimatedNativeGlassSurface = void 0;
37
+ exports.withAlpha = withAlpha;
38
+ exports.InlineGlassTabBar = InlineGlassTabBar;
39
+ const jsx_runtime_1 = require("react/jsx-runtime");
40
+ const useInlineTabGesture_1 = require("./useInlineTabGesture");
41
+ const tabDebug_1 = require("./tabDebug");
42
+ const react_1 = require("react");
43
+ const react_native_1 = require("react-native");
44
+ const Haptics = __importStar(require("expo-haptics"));
45
+ const react_native_gesture_handler_1 = require("react-native-gesture-handler");
46
+ const react_native_reanimated_1 = require("react-native-reanimated");
47
+ const GlassSurface_1 = require("../GlassSurface");
48
+ const nativeGlassViews_1 = require("../nativeGlassViews");
49
+ const tabConstants_1 = require("./tabConstants");
50
+ const tabConstants_2 = require("./tabConstants");
51
+ const tabConstants_3 = require("./tabConstants");
52
+ const tabConstants_4 = require("./tabConstants");
53
+ const tabConstants_5 = require("./tabConstants");
54
+ const tabConstants_6 = require("./tabConstants");
55
+ const tabConstants_7 = require("./tabConstants");
56
+ const tabConstants_8 = require("./tabConstants");
57
+ const tabConstants_9 = require("./tabConstants");
58
+ const tabConstants_10 = require("./tabConstants");
59
+ const tabConstants_11 = require("./tabConstants");
60
+ const tabConstants_12 = require("./tabConstants");
61
+ const tabConstants_13 = require("./tabConstants");
62
+ const tabConstants_14 = require("./tabConstants");
63
+ const GlassTabItem_1 = require("./GlassTabItem");
64
+ const GlassTabItem_2 = require("./GlassTabItem");
65
+ const tabStyles_1 = require("./tabStyles");
66
+ exports.AnimatedNativeGlassSurface = nativeGlassViews_1.NativeGlassSurfaceView
67
+ ? (0, react_native_reanimated_1.createAnimatedComponent)(nativeGlassViews_1.NativeGlassSurfaceView)
68
+ : null;
69
+ function withAlpha(color, alpha, fallback) {
70
+ const value = color.trim();
71
+ const rgba = value.match(/^rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)/i);
72
+ if (rgba)
73
+ return `rgba(${Math.round(Number(rgba[1]))},${Math.round(Number(rgba[2]))},${Math.round(Number(rgba[3]))},${alpha})`;
74
+ const hex = value.replace(/^#/, '');
75
+ if (/^[\da-f]{3}$/i.test(hex)) {
76
+ return `rgba(${parseInt(hex[0] + hex[0], 16)},${parseInt(hex[1] + hex[1], 16)},${parseInt(hex[2] + hex[2], 16)},${alpha})`;
77
+ }
78
+ if (/^[\da-f]{6}([\da-f]{2})?$/i.test(hex)) {
79
+ return `rgba(${parseInt(hex.slice(0, 2), 16)},${parseInt(hex.slice(2, 4), 16)},${parseInt(hex.slice(4, 6), 16)},${alpha})`;
80
+ }
81
+ return fallback;
82
+ }
83
+ function InlineGlassTabBar({ items, selected, bottomInset = 0, shellBackgroundColor, onSelect, onSelectFromDrag, renderIcon, renderItem, presentation = 'floating', height = tabConstants_1.TAB_BAR_HEIGHT, width: requestedWidth, horizontalPadding = tabConstants_6.TAB_BAR_HORIZONTAL_PADDING, shellRadius, lensMaxWidth = tabConstants_8.SELECTION_LENS_MAX_WIDTH, lensRefractionHeight, accessibilityHint, }) {
84
+ const { width: windowWidth, height: windowHeight } = (0, react_native_1.useWindowDimensions)();
85
+ const appearance = (0, GlassSurface_1.useGlassAppearance)();
86
+ const reducedMotion = (0, GlassSurface_1.useGlassReducedMotion)();
87
+ const tabBarMaterial = appearance?.tokens.materials.tabBarShell ?? appearance?.tokens.materials.tabBar;
88
+ const nativeLiveAvailable = react_native_1.Platform.OS === 'android' && appearance?.tokens.quality !== 'fallback';
89
+ const NativeGlassSurface = exports.AnimatedNativeGlassSurface ?? react_native_1.View;
90
+ const dark = appearance?.dark ?? false;
91
+ const shellSurfaceColor = shellBackgroundColor
92
+ ? withAlpha(shellBackgroundColor, 0.4, dark ? 'rgba(18,18,18,0.4)' : 'rgba(250,250,250,0.4)')
93
+ : dark
94
+ ? 'rgba(18,18,18,0.4)'
95
+ : 'rgba(250,250,250,0.4)';
96
+ // An inline bar is drawn inside the page's route capture source. Pointing the
97
+ // selection lens at that same source makes the captured RenderNode contain the
98
+ // lens whose RenderEffect consumes it - a cycle that overflowed the stack in
99
+ // RenderNode::prepareTreeImpl on the User page. Inline lenses sample the theme
100
+ // backdrop instead, which is never an ancestor of the lens itself.
101
+ const samplingProviderId = (0, GlassSurface_1.useGlassSamplingProviderId)(presentation === 'inline' ? 'themeBackdrop' : 'routeScene') ?? '';
102
+ const tabScopeId = (0, react_1.useId)();
103
+ const [inlineWidth, setInlineWidth] = (0, react_1.useState)(0);
104
+ const shellBorderColor = appearance?.tokens.fallbackBorder[dark ? 'dark' : 'light'] ?? 'transparent';
105
+ const shellShadowColor = appearance?.tokens.procedural.outerShadow[dark ? 'dark' : 'light'] ?? 'transparent';
106
+ const itemCount = Math.max(items.length, 1);
107
+ const desiredWidth = itemCount * 100 + tabConstants_6.TAB_BAR_HORIZONTAL_PADDING * 2;
108
+ const floatingWidth = Math.min(Math.min(tabConstants_4.TAB_BAR_MAX_WIDTH, Math.max(tabConstants_5.TAB_BAR_MIN_WIDTH, desiredWidth)), Math.max(0, windowWidth - tabConstants_3.TAB_BAR_SIDE_MARGIN * 2));
109
+ const barWidth = presentation === 'inline'
110
+ ? typeof requestedWidth === 'number'
111
+ ? requestedWidth
112
+ : inlineWidth
113
+ : floatingWidth;
114
+ const itemWidth = Math.max(0, (barWidth - horizontalPadding * 2) / itemCount);
115
+ const lensWidth = Math.max(44, Math.min(lensMaxWidth, itemWidth - 8));
116
+ const lensBaseHeight = Math.min(tabConstants_7.SELECTION_LENS_HEIGHT, height - 8);
117
+ const verticalInset = (height - lensBaseHeight) / 2;
118
+ const selectedCenterX = horizontalPadding + itemWidth * (selected + 0.5);
119
+ const selectedLeft = selectedCenterX - lensWidth / 2;
120
+ const [inlineScreenLeft, setInlineScreenLeft] = (0, react_1.useState)(0);
121
+ const inlineHostRef = (0, react_1.useRef)(null);
122
+ const shellScreenLeft = presentation === 'floating' ? (windowWidth - barWidth) / 2 : inlineScreenLeft;
123
+ // The shell lives inside the floating glass overlay, where measureInWindow
124
+ // returns a rect from the wrong native branch. Publish the geometry the bar
125
+ // is actually laid out at instead of trusting that measurement.
126
+ const shellFrameOverride = presentation === 'floating'
127
+ ? {
128
+ x: shellScreenLeft,
129
+ y: windowHeight - bottomInset - tabConstants_2.TAB_BAR_BOTTOM_GAP - height,
130
+ width: barWidth,
131
+ height,
132
+ }
133
+ : undefined;
134
+ const lensLeft = (0, react_native_reanimated_1.useSharedValue)(selectedLeft);
135
+ const lensRight = (0, react_native_reanimated_1.useSharedValue)(selectedLeft + lensWidth);
136
+ const lensHeight = (0, react_native_reanimated_1.useSharedValue)(lensBaseHeight);
137
+ const lensOffsetY = (0, react_native_reanimated_1.useSharedValue)(0);
138
+ const interactionProgress = (0, react_native_reanimated_1.useSharedValue)(0);
139
+ const phase = (0, react_native_reanimated_1.useSharedValue)('idle');
140
+ const grabOffsetX = (0, react_native_reanimated_1.useSharedValue)(0);
141
+ const originSelectedIndex = (0, react_native_reanimated_1.useSharedValue)(selected);
142
+ const hoveredIndex = (0, react_native_reanimated_1.useSharedValue)(selected);
143
+ const pendingIndex = (0, react_native_reanimated_1.useSharedValue)(selected);
144
+ const snapStarted = (0, react_native_reanimated_1.useSharedValue)(false);
145
+ const interactionActive = (0, react_native_reanimated_1.useSharedValue)(false);
146
+ const holdCandidate = (0, react_native_reanimated_1.useSharedValue)(false);
147
+ const holdActivated = (0, react_native_reanimated_1.useSharedValue)(false);
148
+ const panActivated = (0, react_native_reanimated_1.useSharedValue)(false);
149
+ const panActivationRequested = (0, react_native_reanimated_1.useSharedValue)(false);
150
+ const panUpdateLogged = (0, react_native_reanimated_1.useSharedValue)(false);
151
+ const touchSessionActive = (0, react_native_reanimated_1.useSharedValue)(false);
152
+ const touchMovedPastSlop = (0, react_native_reanimated_1.useSharedValue)(false);
153
+ const sessionId = (0, react_native_reanimated_1.useSharedValue)(0);
154
+ const touchedIndex = (0, react_native_reanimated_1.useSharedValue)(selected);
155
+ const holdTimerProgress = (0, react_native_reanimated_1.useSharedValue)(0);
156
+ const touchStartX = (0, react_native_reanimated_1.useSharedValue)(0);
157
+ const touchStartY = (0, react_native_reanimated_1.useSharedValue)(0);
158
+ const lastHapticIndex = (0, react_native_reanimated_1.useSharedValue)(-1);
159
+ const dragVelocityX = (0, react_native_reanimated_1.useSharedValue)(0);
160
+ const dragVelocityY = (0, react_native_reanimated_1.useSharedValue)(0);
161
+ const [liveBackdropEnabled, setLiveBackdropEnabled] = (0, react_1.useState)(false);
162
+ const interactionActiveRef = (0, react_1.useRef)(false);
163
+ const dragCommittedTargetRef = (0, react_1.useRef)(null);
164
+ const previousGeometryRef = (0, react_1.useRef)({ selected, barWidth: 0 });
165
+ const [gestureDebug, setGestureDebug] = (0, react_1.useState)({
166
+ phase: 'idle',
167
+ holdCandidate: false,
168
+ holdActivated: false,
169
+ dragging: false,
170
+ snapStarted: false,
171
+ gestureCount: 0,
172
+ origin: selected,
173
+ hovered: selected,
174
+ pending: selected,
175
+ touchCount: 0,
176
+ });
177
+ const noteTabViewTouch = (0, react_1.useCallback)(() => {
178
+ if (tabConstants_10.GESTURE_DEBUG_ENABLED)
179
+ setGestureDebug((current) => ({ ...current, touchCount: current.touchCount + 1 }));
180
+ }, []);
181
+ const noteGestureDown = (0, react_1.useCallback)(() => {
182
+ if (tabConstants_10.GESTURE_DEBUG_ENABLED)
183
+ setGestureDebug((current) => ({ ...current, gestureCount: current.gestureCount + 1 }));
184
+ }, []);
185
+ const updateGestureDebug = (0, react_1.useCallback)((nextPhase, nextHoldCandidate, nextHoldActivated, nextDragging, nextSnapStarted, origin, hovered, pending) => {
186
+ if (!tabConstants_10.GESTURE_DEBUG_ENABLED)
187
+ return;
188
+ setGestureDebug((current) => ({
189
+ ...current,
190
+ phase: nextPhase,
191
+ holdCandidate: nextHoldCandidate,
192
+ holdActivated: nextHoldActivated,
193
+ dragging: nextDragging,
194
+ snapStarted: nextSnapStarted,
195
+ origin,
196
+ hovered,
197
+ pending,
198
+ }));
199
+ }, []);
200
+ (0, react_native_reanimated_1.useAnimatedReaction)(() => ({
201
+ phase: phase.value,
202
+ holdCandidate: holdCandidate.value,
203
+ holdActivated: holdActivated.value,
204
+ dragging: panActivated.value,
205
+ snapStarted: snapStarted.value,
206
+ origin: originSelectedIndex.value,
207
+ hovered: hoveredIndex.value,
208
+ pending: pendingIndex.value,
209
+ }), (current, previous) => {
210
+ if (!tabConstants_10.GESTURE_DEBUG_ENABLED)
211
+ return;
212
+ if (previous == null ||
213
+ current.phase !== previous.phase ||
214
+ current.holdCandidate !== previous.holdCandidate ||
215
+ current.holdActivated !== previous.holdActivated ||
216
+ current.dragging !== previous.dragging ||
217
+ current.snapStarted !== previous.snapStarted ||
218
+ current.origin !== previous.origin ||
219
+ current.hovered !== previous.hovered ||
220
+ current.pending !== previous.pending) {
221
+ (0, react_native_reanimated_1.runOnJS)(updateGestureDebug)(current.phase, current.holdCandidate, current.holdActivated, current.dragging, current.snapStarted, current.origin, current.hovered, current.pending);
222
+ }
223
+ }, [
224
+ holdCandidate,
225
+ holdActivated,
226
+ hoveredIndex,
227
+ originSelectedIndex,
228
+ panActivated,
229
+ pendingIndex,
230
+ phase,
231
+ snapStarted,
232
+ updateGestureDebug,
233
+ ]);
234
+ const beginInteraction = (0, react_1.useCallback)(() => {
235
+ interactionActiveRef.current = true;
236
+ dragCommittedTargetRef.current = null;
237
+ if (nativeLiveAvailable)
238
+ setLiveBackdropEnabled(true);
239
+ void Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Light).catch(() => undefined);
240
+ }, [nativeLiveAvailable]);
241
+ const activateHoldOnUI = (0, react_1.useCallback)((expectedSessionId, expectedIndex) => {
242
+ 'worklet';
243
+ if (!touchSessionActive.value ||
244
+ sessionId.value !== expectedSessionId ||
245
+ !holdCandidate.value ||
246
+ touchMovedPastSlop.value ||
247
+ expectedIndex !== selected)
248
+ return;
249
+ holdCandidate.value = false;
250
+ holdActivated.value = true;
251
+ phase.value = 'inflating';
252
+ interactionActive.value = true;
253
+ originSelectedIndex.value = selected;
254
+ hoveredIndex.value = selected;
255
+ pendingIndex.value = selected;
256
+ const currentCenter = (lensLeft.value + lensRight.value) / 2;
257
+ grabOffsetX.value = touchStartX.value - shellScreenLeft - currentCenter;
258
+ const expandedWidth = lensWidth + (reducedMotion ? 8 : 20);
259
+ const expandedHeight = lensBaseHeight + (reducedMotion ? 4 : 10);
260
+ lensLeft.value = (0, react_native_reanimated_1.withSpring)(currentCenter - expandedWidth / 2, reducedMotion ? tabConstants_11.IDLE_SPRING : { damping: 23, stiffness: 360, mass: 0.7 });
261
+ lensRight.value = (0, react_native_reanimated_1.withSpring)(currentCenter + expandedWidth / 2, reducedMotion ? tabConstants_11.IDLE_SPRING : { damping: 23, stiffness: 360, mass: 0.7 });
262
+ lensHeight.value = (0, react_native_reanimated_1.withSpring)(expandedHeight, reducedMotion ? { damping: 25, stiffness: 390 } : { damping: 23, stiffness: 350, mass: 0.7 });
263
+ interactionProgress.value = (0, react_native_reanimated_1.withTiming)(1, { duration: reducedMotion ? 85 : 135 });
264
+ (0, react_native_reanimated_1.runOnJS)(tabDebug_1.logGlassTabGesture)('HOLD_ACTIVE', `index=${selected}`);
265
+ (0, react_native_reanimated_1.runOnJS)(beginInteraction)();
266
+ if (tabConstants_10.GESTURE_DEBUG_ENABLED) {
267
+ (0, react_native_reanimated_1.runOnJS)(updateGestureDebug)('inflating', false, true, false, false, selected, selected, selected);
268
+ }
269
+ }, [
270
+ beginInteraction,
271
+ grabOffsetX,
272
+ holdActivated,
273
+ holdCandidate,
274
+ hoveredIndex,
275
+ interactionActive,
276
+ interactionProgress,
277
+ lensBaseHeight,
278
+ lensHeight,
279
+ lensLeft,
280
+ lensRight,
281
+ lensWidth,
282
+ originSelectedIndex,
283
+ pendingIndex,
284
+ phase,
285
+ reducedMotion,
286
+ selected,
287
+ sessionId,
288
+ shellScreenLeft,
289
+ touchMovedPastSlop,
290
+ touchSessionActive,
291
+ touchStartX,
292
+ updateGestureDebug,
293
+ ]);
294
+ const commitDragSelection = (0, react_1.useCallback)((targetIndex, startIndex) => {
295
+ const safeTarget = Math.max(0, Math.min(itemCount - 1, targetIndex));
296
+ const safeStart = Math.max(0, Math.min(itemCount - 1, startIndex));
297
+ if (safeTarget === safeStart || dragCommittedTargetRef.current !== null)
298
+ return;
299
+ // Mark this as the drag's own page change before notifying navigation.
300
+ // The selection effect must leave the remaining glass settle intact.
301
+ dragCommittedTargetRef.current = safeTarget;
302
+ previousGeometryRef.current = { selected: safeTarget, barWidth };
303
+ (0, tabDebug_1.logGlassTabGesture)('COMMIT', `target=${safeTarget}`);
304
+ (onSelectFromDrag ?? onSelect)(safeTarget);
305
+ }, [barWidth, itemCount, onSelect, onSelectFromDrag]);
306
+ const finishInteraction = (0, react_1.useCallback)((targetIndex) => {
307
+ const safeTarget = Math.max(0, Math.min(itemCount - 1, targetIndex));
308
+ interactionActiveRef.current = false;
309
+ setLiveBackdropEnabled(false);
310
+ previousGeometryRef.current = { selected: safeTarget, barWidth };
311
+ dragCommittedTargetRef.current = null;
312
+ (0, tabDebug_1.logGlassTabGesture)('BACKDROP_OFF');
313
+ (0, tabDebug_1.logGlassTabGesture)('RESET');
314
+ }, [barWidth, itemCount]);
315
+ const resetInteractionOnUI = (0, react_1.useCallback)((targetIndex) => {
316
+ 'worklet';
317
+ const safeTarget = Math.max(0, Math.min(itemCount - 1, targetIndex));
318
+ if (phase.value === 'idle' && !interactionActive.value && !snapStarted.value)
319
+ return;
320
+ // Mark idle before cancelling. A cancelled animation callback can
321
+ // re-enter this function, where it will now be a harmless no-op.
322
+ phase.value = 'idle';
323
+ interactionActive.value = false;
324
+ snapStarted.value = false;
325
+ holdCandidate.value = false;
326
+ holdActivated.value = false;
327
+ panActivated.value = false;
328
+ panActivationRequested.value = false;
329
+ panUpdateLogged.value = false;
330
+ touchSessionActive.value = false;
331
+ touchMovedPastSlop.value = false;
332
+ touchStartX.value = 0;
333
+ touchStartY.value = 0;
334
+ touchedIndex.value = safeTarget;
335
+ (0, react_native_reanimated_1.cancelAnimation)(holdTimerProgress);
336
+ holdTimerProgress.value = 0;
337
+ (0, react_native_reanimated_1.cancelAnimation)(lensLeft);
338
+ (0, react_native_reanimated_1.cancelAnimation)(lensRight);
339
+ (0, react_native_reanimated_1.cancelAnimation)(lensHeight);
340
+ (0, react_native_reanimated_1.cancelAnimation)(lensOffsetY);
341
+ (0, react_native_reanimated_1.cancelAnimation)(interactionProgress);
342
+ const center = horizontalPadding + itemWidth * (safeTarget + 0.5);
343
+ const left = center - lensWidth / 2;
344
+ lensLeft.value = left;
345
+ lensRight.value = left + lensWidth;
346
+ lensHeight.value = lensBaseHeight;
347
+ lensOffsetY.value = 0;
348
+ interactionProgress.value = 0;
349
+ dragVelocityX.value = 0;
350
+ dragVelocityY.value = 0;
351
+ originSelectedIndex.value = safeTarget;
352
+ hoveredIndex.value = safeTarget;
353
+ pendingIndex.value = safeTarget;
354
+ lastHapticIndex.value = -1;
355
+ (0, react_native_reanimated_1.runOnJS)(finishInteraction)(safeTarget);
356
+ }, [
357
+ dragVelocityX,
358
+ dragVelocityY,
359
+ finishInteraction,
360
+ holdActivated,
361
+ holdCandidate,
362
+ holdTimerProgress,
363
+ horizontalPadding,
364
+ hoveredIndex,
365
+ interactionActive,
366
+ interactionProgress,
367
+ itemCount,
368
+ itemWidth,
369
+ lastHapticIndex,
370
+ lensBaseHeight,
371
+ lensHeight,
372
+ lensLeft,
373
+ lensOffsetY,
374
+ lensRight,
375
+ lensWidth,
376
+ originSelectedIndex,
377
+ panActivated,
378
+ panActivationRequested,
379
+ panUpdateLogged,
380
+ pendingIndex,
381
+ phase,
382
+ snapStarted,
383
+ touchMovedPastSlop,
384
+ touchSessionActive,
385
+ touchStartX,
386
+ touchStartY,
387
+ touchedIndex,
388
+ ]);
389
+ (0, react_1.useEffect)(() => {
390
+ if (barWidth <= 0)
391
+ return;
392
+ const previous = previousGeometryRef.current;
393
+ const initialMeasurement = previous.barWidth <= 0;
394
+ const selectionChanged = previous.selected !== selected;
395
+ const widthChanged = previous.barWidth > 0 && previous.barWidth !== barWidth;
396
+ if (dragCommittedTargetRef.current === selected) {
397
+ // Our drag already placed the lens at this page. Do not cancel its
398
+ // settling animation or run the normal tap-selection spring again.
399
+ previousGeometryRef.current = { selected, barWidth };
400
+ return;
401
+ }
402
+ if (interactionActiveRef.current || interactionActive.value || phase.value !== 'idle') {
403
+ // An external page change during a live gesture takes ownership:
404
+ // cancel its animations and reconcile once the external selection
405
+ // is known. A drag's own commit pre-updates previousGeometryRef.
406
+ if (selectionChanged) {
407
+ phase.value = 'idle';
408
+ interactionActive.value = false;
409
+ snapStarted.value = false;
410
+ holdCandidate.value = false;
411
+ holdActivated.value = false;
412
+ panActivated.value = false;
413
+ panActivationRequested.value = false;
414
+ panUpdateLogged.value = false;
415
+ touchSessionActive.value = false;
416
+ touchMovedPastSlop.value = false;
417
+ touchStartX.value = 0;
418
+ touchStartY.value = 0;
419
+ touchedIndex.value = selected;
420
+ sessionId.value += 1;
421
+ (0, react_native_reanimated_1.cancelAnimation)(holdTimerProgress);
422
+ holdTimerProgress.value = 0;
423
+ (0, react_native_reanimated_1.cancelAnimation)(lensLeft);
424
+ (0, react_native_reanimated_1.cancelAnimation)(lensRight);
425
+ (0, react_native_reanimated_1.cancelAnimation)(lensHeight);
426
+ (0, react_native_reanimated_1.cancelAnimation)(lensOffsetY);
427
+ (0, react_native_reanimated_1.cancelAnimation)(interactionProgress);
428
+ const safeIndex = Math.max(0, Math.min(itemCount - 1, selected));
429
+ const center = horizontalPadding + itemWidth * (safeIndex + 0.5);
430
+ const left = center - lensWidth / 2;
431
+ lensLeft.value = left;
432
+ lensRight.value = left + lensWidth;
433
+ lensHeight.value = lensBaseHeight;
434
+ lensOffsetY.value = 0;
435
+ interactionProgress.value = 0;
436
+ dragVelocityX.value = 0;
437
+ dragVelocityY.value = 0;
438
+ hoveredIndex.value = safeIndex;
439
+ pendingIndex.value = safeIndex;
440
+ originSelectedIndex.value = safeIndex;
441
+ lastHapticIndex.value = -1;
442
+ interactionActiveRef.current = false;
443
+ setLiveBackdropEnabled(false);
444
+ dragCommittedTargetRef.current = null;
445
+ (0, tabDebug_1.logGlassTabGesture)('BACKDROP_OFF');
446
+ (0, tabDebug_1.logGlassTabGesture)('RESET', 'external_selection');
447
+ previousGeometryRef.current = { selected, barWidth };
448
+ }
449
+ // Keep same-selection and layout changes pending while the
450
+ // session owns the lens; reconcile them after it finishes.
451
+ return;
452
+ }
453
+ if (!initialMeasurement && !selectionChanged && !widthChanged)
454
+ return;
455
+ const safeIndex = Math.max(0, Math.min(itemCount - 1, selected));
456
+ const nextCenter = horizontalPadding + itemWidth * (safeIndex + 0.5);
457
+ const nextLeft = nextCenter - lensWidth / 2;
458
+ if (initialMeasurement) {
459
+ lensLeft.value = nextLeft;
460
+ lensRight.value = nextLeft + lensWidth;
461
+ lensHeight.value = lensBaseHeight;
462
+ }
463
+ else if (reducedMotion) {
464
+ lensLeft.value = (0, react_native_reanimated_1.withTiming)(nextLeft, { duration: 115 });
465
+ lensRight.value = (0, react_native_reanimated_1.withTiming)(nextLeft + lensWidth, { duration: 115 });
466
+ lensHeight.value = (0, react_native_reanimated_1.withTiming)(lensBaseHeight, { duration: 95 });
467
+ }
468
+ else {
469
+ lensLeft.value = (0, react_native_reanimated_1.withSpring)(nextLeft, tabConstants_12.TAP_SELECTION_SPRING);
470
+ lensRight.value = (0, react_native_reanimated_1.withSpring)(nextLeft + lensWidth, tabConstants_12.TAP_SELECTION_SPRING);
471
+ lensHeight.value = (0, react_native_reanimated_1.withSpring)(lensBaseHeight, { damping: 28, stiffness: 500, mass: 0.55 });
472
+ }
473
+ lensOffsetY.value = (0, react_native_reanimated_1.withTiming)(0, { duration: 110 });
474
+ previousGeometryRef.current = { selected, barWidth };
475
+ }, [
476
+ barWidth,
477
+ dragVelocityX,
478
+ dragVelocityY,
479
+ holdActivated,
480
+ holdCandidate,
481
+ holdTimerProgress,
482
+ horizontalPadding,
483
+ hoveredIndex,
484
+ interactionActive,
485
+ interactionProgress,
486
+ itemCount,
487
+ itemWidth,
488
+ lastHapticIndex,
489
+ lensBaseHeight,
490
+ lensHeight,
491
+ lensLeft,
492
+ lensOffsetY,
493
+ lensRight,
494
+ lensWidth,
495
+ originSelectedIndex,
496
+ panActivated,
497
+ panActivationRequested,
498
+ panUpdateLogged,
499
+ pendingIndex,
500
+ phase,
501
+ reducedMotion,
502
+ selected,
503
+ sessionId,
504
+ snapStarted,
505
+ touchMovedPastSlop,
506
+ touchSessionActive,
507
+ touchStartX,
508
+ touchStartY,
509
+ touchedIndex,
510
+ ]);
511
+ (0, react_1.useEffect)(() => () => {
512
+ (0, react_native_reanimated_1.cancelAnimation)(holdTimerProgress);
513
+ phase.value = 'idle';
514
+ interactionActive.value = false;
515
+ snapStarted.value = false;
516
+ holdCandidate.value = false;
517
+ holdActivated.value = false;
518
+ panActivated.value = false;
519
+ panActivationRequested.value = false;
520
+ panUpdateLogged.value = false;
521
+ touchSessionActive.value = false;
522
+ touchMovedPastSlop.value = false;
523
+ sessionId.value += 1;
524
+ touchedIndex.value = -1;
525
+ touchStartX.value = 0;
526
+ touchStartY.value = 0;
527
+ interactionActiveRef.current = false;
528
+ (0, react_native_reanimated_1.cancelAnimation)(lensLeft);
529
+ (0, react_native_reanimated_1.cancelAnimation)(lensRight);
530
+ (0, react_native_reanimated_1.cancelAnimation)(lensHeight);
531
+ (0, react_native_reanimated_1.cancelAnimation)(lensOffsetY);
532
+ (0, react_native_reanimated_1.cancelAnimation)(interactionProgress);
533
+ }, [
534
+ holdActivated,
535
+ holdCandidate,
536
+ holdTimerProgress,
537
+ interactionActive,
538
+ interactionProgress,
539
+ lensHeight,
540
+ lensLeft,
541
+ lensOffsetY,
542
+ lensRight,
543
+ panActivated,
544
+ panActivationRequested,
545
+ panUpdateLogged,
546
+ phase,
547
+ sessionId,
548
+ snapStarted,
549
+ touchMovedPastSlop,
550
+ touchSessionActive,
551
+ touchStartX,
552
+ touchStartY,
553
+ touchedIndex,
554
+ ]);
555
+ const onDragUpdate = (0, react_1.useCallback)((absoluteX, relativeY, velocityX, velocityY, startIndex) => {
556
+ 'worklet';
557
+ if (phase.value === 'inflating')
558
+ phase.value = 'dragging';
559
+ const rawCenter = absoluteX - shellScreenLeft - grabOffsetX.value;
560
+ const baseHalf = lensWidth / 2;
561
+ const minCenter = baseHalf;
562
+ const maxCenter = barWidth - baseHalf;
563
+ let center = rawCenter;
564
+ if (center < minCenter)
565
+ center = minCenter + (center - minCenter) * 0.2;
566
+ if (center > maxCenter)
567
+ center = maxCenter + (center - maxCenter) * 0.2;
568
+ center = Math.max(minCenter - 16, Math.min(maxCenter + 16, center));
569
+ let nearestIndex = 0;
570
+ let nearestDistance = Number.MAX_VALUE;
571
+ for (let index = 0; index < itemCount; index += 1) {
572
+ const tabCenter = horizontalPadding + itemWidth * (index + 0.5);
573
+ const distance = Math.abs(center - tabCenter);
574
+ if (distance < nearestDistance) {
575
+ nearestIndex = index;
576
+ nearestDistance = distance;
577
+ }
578
+ }
579
+ hoveredIndex.value = nearestIndex;
580
+ const magneticRange = Math.max(itemWidth * 0.9, 1);
581
+ const magneticStrength = 0.075 * (1 - Math.min(nearestDistance / magneticRange, 1));
582
+ center += (horizontalPadding + itemWidth * (nearestIndex + 0.5) - center) * magneticStrength;
583
+ const speed = Math.min(Math.abs(velocityX) / 1800, 1);
584
+ const stretch = reducedMotion ? 0 : speed * 16;
585
+ const activeWidth = lensWidth + (reducedMotion ? 0 : 20) + stretch;
586
+ const direction = velocityX > 28 ? 1 : velocityX < -28 ? -1 : 0;
587
+ const leadingExtra = stretch * 0.62;
588
+ const trailingExtra = stretch * 0.14;
589
+ const targetLeft = center - activeWidth / 2 - (direction < 0 ? leadingExtra : trailingExtra);
590
+ const targetRight = center + activeWidth / 2 + (direction > 0 ? leadingExtra : trailingExtra);
591
+ const yOffset = reducedMotion ? 0 : Math.max(-8, Math.min(8, relativeY - height / 2));
592
+ dragVelocityX.value = velocityX;
593
+ dragVelocityY.value = velocityY;
594
+ lensOffsetY.value = yOffset;
595
+ lensHeight.value =
596
+ lensBaseHeight + interactionProgress.value * 10 - (reducedMotion ? 0 : speed * 3);
597
+ // Keep the leading edge locked to the finger. Only the trailing edge
598
+ // chases it with a spring, so the lens translates continuously while
599
+ // still stretching like a viscous surface.
600
+ if (direction > 0) {
601
+ lensRight.value = targetRight;
602
+ lensLeft.value = (0, react_native_reanimated_1.withSpring)(targetLeft, tabConstants_14.EDGE_SPRING_SLOW);
603
+ }
604
+ else if (direction < 0) {
605
+ lensLeft.value = targetLeft;
606
+ lensRight.value = (0, react_native_reanimated_1.withSpring)(targetRight, tabConstants_14.EDGE_SPRING_SLOW);
607
+ }
608
+ else {
609
+ lensLeft.value = (0, react_native_reanimated_1.withSpring)(targetLeft, tabConstants_11.IDLE_SPRING);
610
+ lensRight.value = (0, react_native_reanimated_1.withSpring)(targetRight, tabConstants_11.IDLE_SPRING);
611
+ }
612
+ const hapticIndex = nearestDistance < itemWidth * 0.36 && nearestIndex !== startIndex ? nearestIndex : -1;
613
+ if (hapticIndex !== lastHapticIndex.value) {
614
+ lastHapticIndex.value = hapticIndex;
615
+ if (hapticIndex >= 0)
616
+ (0, react_native_reanimated_1.runOnJS)(tabDebug_1.emitTargetHaptic)(hapticIndex);
617
+ }
618
+ }, [
619
+ barWidth,
620
+ dragVelocityX,
621
+ dragVelocityY,
622
+ grabOffsetX,
623
+ height,
624
+ horizontalPadding,
625
+ hoveredIndex,
626
+ interactionProgress,
627
+ itemCount,
628
+ itemWidth,
629
+ lastHapticIndex,
630
+ lensBaseHeight,
631
+ lensHeight,
632
+ lensLeft,
633
+ lensRight,
634
+ lensWidth,
635
+ phase,
636
+ reducedMotion,
637
+ shellScreenLeft,
638
+ lensOffsetY,
639
+ ]);
640
+ const onBeginSnap = (0, react_1.useCallback)((velocityX, startIndex, cancelled = false) => {
641
+ 'worklet';
642
+ if (snapStarted.value || (phase.value !== 'inflating' && phase.value !== 'dragging'))
643
+ return;
644
+ snapStarted.value = true;
645
+ phase.value = 'snapping';
646
+ const originIndex = cancelled ? startIndex : originSelectedIndex.value;
647
+ const currentCenter = (lensLeft.value + lensRight.value) / 2;
648
+ const projectedCenter = currentCenter + velocityX * 0.075;
649
+ let targetIndex = 0;
650
+ let nearestDistance = Number.MAX_VALUE;
651
+ if (cancelled) {
652
+ targetIndex = originIndex;
653
+ }
654
+ else {
655
+ for (let index = 0; index < itemCount; index += 1) {
656
+ const tabCenter = horizontalPadding + itemWidth * (index + 0.5);
657
+ const distance = Math.abs(projectedCenter - tabCenter);
658
+ if (distance < nearestDistance) {
659
+ nearestDistance = distance;
660
+ targetIndex = index;
661
+ }
662
+ }
663
+ }
664
+ const targetCenter = horizontalPadding + itemWidth * (targetIndex + 0.5);
665
+ const targetLeft = targetCenter - lensWidth / 2;
666
+ pendingIndex.value = targetIndex;
667
+ (0, react_native_reanimated_1.runOnJS)(tabDebug_1.logGlassTabGesture)('SNAP_START', `target=${targetIndex}${cancelled ? ' rollback' : ''}`);
668
+ // Page ownership changes as soon as the finger is released and the
669
+ // destination is known. The glass snap/settle continues independently,
670
+ // so navigation never waits for the trailing spring to finish.
671
+ if (!cancelled && targetIndex !== originIndex) {
672
+ (0, react_native_reanimated_1.runOnJS)(commitDragSelection)(targetIndex, originIndex);
673
+ }
674
+ lensOffsetY.value = (0, react_native_reanimated_1.withSpring)(0, { damping: 24, stiffness: 300 });
675
+ lensHeight.value = reducedMotion
676
+ ? (0, react_native_reanimated_1.withTiming)(lensBaseHeight, { duration: 100 })
677
+ : (0, react_native_reanimated_1.withSpring)(lensBaseHeight, { damping: 25, stiffness: 320, mass: 0.7 });
678
+ const finishSnap = (finished) => {
679
+ 'worklet';
680
+ if (phase.value !== 'snapping')
681
+ return;
682
+ if (!finished) {
683
+ resetInteractionOnUI(originIndex);
684
+ return;
685
+ }
686
+ phase.value = 'settling';
687
+ (0, react_native_reanimated_1.runOnJS)(tabDebug_1.logGlassTabGesture)('SNAP_END', `target=${targetIndex}`);
688
+ interactionProgress.value = (0, react_native_reanimated_1.withTiming)(0, { duration: reducedMotion ? 95 : 145 }, (settled) => {
689
+ if (settled) {
690
+ (0, react_native_reanimated_1.runOnJS)(tabDebug_1.logGlassTabGesture)('SETTLE_END');
691
+ resetInteractionOnUI(targetIndex);
692
+ }
693
+ else {
694
+ resetInteractionOnUI(originIndex);
695
+ }
696
+ });
697
+ };
698
+ if (reducedMotion) {
699
+ lensLeft.value = (0, react_native_reanimated_1.withTiming)(targetLeft, { duration: 120 });
700
+ // One trailing edge owns completion. This avoids a two-callback
701
+ // counter getting stranded if either independent animation cancels.
702
+ lensRight.value = (0, react_native_reanimated_1.withTiming)(targetLeft + lensWidth, { duration: 120 }, finishSnap);
703
+ }
704
+ else {
705
+ // The trailing edge is the sole completion signal. It uses the
706
+ // slower spring, while the leading edge reaches the target first.
707
+ const wasMovingRight = velocityX >= 0;
708
+ lensLeft.value = (0, react_native_reanimated_1.withSpring)(targetLeft, wasMovingRight ? tabConstants_14.EDGE_SPRING_SLOW : tabConstants_13.EDGE_SPRING_FAST, wasMovingRight ? finishSnap : undefined);
709
+ lensRight.value = (0, react_native_reanimated_1.withSpring)(targetLeft + lensWidth, wasMovingRight ? tabConstants_13.EDGE_SPRING_FAST : tabConstants_14.EDGE_SPRING_SLOW, wasMovingRight ? undefined : finishSnap);
710
+ }
711
+ }, [
712
+ commitDragSelection,
713
+ horizontalPadding,
714
+ interactionProgress,
715
+ itemCount,
716
+ itemWidth,
717
+ lensBaseHeight,
718
+ lensHeight,
719
+ lensLeft,
720
+ lensOffsetY,
721
+ lensRight,
722
+ lensWidth,
723
+ originSelectedIndex,
724
+ pendingIndex,
725
+ phase,
726
+ reducedMotion,
727
+ resetInteractionOnUI,
728
+ snapStarted,
729
+ ]);
730
+ const tabBarGesture = (0, useInlineTabGesture_1.useInlineTabGesture)({
731
+ noteGestureDown,
732
+ touchSessionActive,
733
+ phase,
734
+ shellScreenLeft,
735
+ horizontalPadding,
736
+ itemWidth,
737
+ itemCount,
738
+ sessionId,
739
+ touchMovedPastSlop,
740
+ touchedIndex,
741
+ touchStartX,
742
+ touchStartY,
743
+ originSelectedIndex,
744
+ selected,
745
+ hoveredIndex,
746
+ pendingIndex,
747
+ holdCandidate,
748
+ holdActivated,
749
+ panActivated,
750
+ panActivationRequested,
751
+ panUpdateLogged,
752
+ snapStarted,
753
+ interactionActive,
754
+ lastHapticIndex,
755
+ holdTimerProgress,
756
+ activateHoldOnUI,
757
+ onBeginSnap,
758
+ onSelect,
759
+ onDragUpdate,
760
+ resetInteractionOnUI,
761
+ });
762
+ const localLensStyle = (0, react_native_reanimated_1.useAnimatedStyle)(() => {
763
+ const width = Math.max(lensRight.value - lensLeft.value, 1);
764
+ const center = (lensLeft.value + lensRight.value) / 2;
765
+ return {
766
+ borderRadius: Math.min(lensHeight.value, width) / 2,
767
+ transform: [
768
+ { translateX: center - selectedCenterX },
769
+ { translateY: lensOffsetY.value },
770
+ { scaleX: width / lensWidth },
771
+ { scaleY: lensHeight.value / lensBaseHeight },
772
+ ],
773
+ };
774
+ }, [lensBaseHeight, lensWidth, selectedCenterX]);
775
+ const liveLensStyle = (0, react_native_reanimated_1.useAnimatedStyle)(() => ({
776
+ left: lensLeft.value,
777
+ top: (height - lensHeight.value) / 2 + lensOffsetY.value,
778
+ width: Math.max(lensRight.value - lensLeft.value, 1),
779
+ height: lensHeight.value,
780
+ borderRadius: Math.min(lensHeight.value, lensRight.value - lensLeft.value) / 2,
781
+ }), [height]);
782
+ const liveLensAnimatedProps = (0, react_native_reanimated_1.useAnimatedProps)(() => ({
783
+ interactionProgress: interactionProgress.value,
784
+ motionX: Math.max(-1, Math.min(1, dragVelocityX.value / 1800)),
785
+ motionY: Math.max(-1, Math.min(1, dragVelocityY.value / 1800)),
786
+ }));
787
+ const renderVisual = renderItem ?? renderIcon ?? ((item) => item.label);
788
+ const renderTabItems = (sampled = false) => items.map((item, index) => ((0, jsx_runtime_1.jsx)(GlassTabItem_2.GlassTabItem, { item: item, index: index, selected: index === selected, itemWidth: itemWidth, horizontalPadding: horizontalPadding, barHeight: height, renderVisual: renderVisual, customContent: renderItem != null, sampled: sampled, lensLeft: lensLeft, lensRight: lensRight }, `${item.label}-${index}`)));
789
+ const tabItems = renderTabItems();
790
+ const accessibilityTargets = items.map((item, index) => ((0, jsx_runtime_1.jsx)(react_native_1.View, { accessible: true, accessibilityRole: "tab", accessibilityLabel: item.label, accessibilityHint: accessibilityHint ?? '长按并拖动当前选中页签可切换页面', accessibilityState: { selected: index === selected }, accessibilityActions: [{ name: 'activate', label: item.label }], onAccessibilityAction: () => onSelect(index), style: tabStyles_1.styles.interactionTarget }, `tab-accessibility-${item.label}-${index}`)));
791
+ const resolvedShellRadius = shellRadius ?? height / 2;
792
+ const shellMaterial = {
793
+ opticsModel: 'referenceParity',
794
+ referenceDepthEffect: true,
795
+ radius: resolvedShellRadius,
796
+ surfaceColor: { light: shellSurfaceColor, dark: shellSurfaceColor },
797
+ blurRadius: tabBarMaterial?.blurRadius ?? 8,
798
+ refractionHeight: tabBarMaterial?.refractionHeight ?? 24,
799
+ refractionAmount: tabBarMaterial?.refractionAmount ?? -24,
800
+ saturation: tabBarMaterial?.saturation ?? 1.5,
801
+ chromaticAberration: 0,
802
+ highlightAlpha: 0.5,
803
+ highlightWidth: 0.5,
804
+ };
805
+ const shellStyle = {
806
+ width: barWidth,
807
+ height,
808
+ borderRadius: resolvedShellRadius,
809
+ borderColor: shellBorderColor,
810
+ backgroundColor: 'transparent',
811
+ shadowColor: shellShadowColor,
812
+ shadowOpacity: tabBarMaterial?.shadowOpacity ?? 0,
813
+ shadowRadius: tabBarMaterial?.shadowRadius ?? 0,
814
+ shadowOffset: { width: 0, height: tabBarMaterial?.shadowOffsetY ?? 0 },
815
+ elevation: tabBarMaterial?.elevation ?? 0,
816
+ };
817
+ const barContents = ((0, jsx_runtime_1.jsxs)(react_native_1.View, { ref: inlineHostRef, onLayout: presentation === 'inline' && typeof requestedWidth !== 'number'
818
+ ? (event) => {
819
+ setInlineWidth(event.nativeEvent.layout.width);
820
+ inlineHostRef.current?.measureInWindow((left) => setInlineScreenLeft(left));
821
+ }
822
+ : undefined, pointerEvents: "box-none", style: presentation === 'floating'
823
+ ? [
824
+ tabStyles_1.styles.host,
825
+ {
826
+ left: shellScreenLeft,
827
+ bottom: bottomInset + tabConstants_2.TAB_BAR_BOTTOM_GAP,
828
+ width: barWidth,
829
+ height,
830
+ },
831
+ ]
832
+ : [tabStyles_1.styles.inlineHost, { width: requestedWidth ?? '100%', height }], children: [nativeLiveAvailable ? ((0, jsx_runtime_1.jsx)(GlassSurface_1.RouteGlassCaptureScope, { scopeId: tabScopeId, children: (0, jsx_runtime_1.jsx)(GlassTabItem_1.TabLensScene, { children: (tabSceneProviderId) => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(GlassSurface_1.RouteGlassCaptureSource, { captureMode: liveBackdropEnabled ? 'livePassThrough' : 'oneShotPassThrough', underlayProviderId: samplingProviderId, sourceRevision: `${dark}:${barWidth}:${height}:${items.map((item) => item.label).join('|')}`, style: react_native_1.StyleSheet.absoluteFill, children: (0, jsx_runtime_1.jsxs)(react_native_1.View, { pointerEvents: "none", style: [tabStyles_1.styles.shell, shellStyle], children: [(0, jsx_runtime_1.jsx)(GlassSurface_1.GlassSurface, { variant: "tabBarShell", positioning: "inFlow", sampling: presentation === 'inline' ? 'local' : 'backdrop', providerIdOverride: samplingProviderId, inlineBackdrop: true, pointerEvents: "none", materialOverrides: shellMaterial, style: [
833
+ react_native_1.StyleSheet.absoluteFill,
834
+ { borderRadius: resolvedShellRadius },
835
+ ] }), (0, jsx_runtime_1.jsx)(react_native_1.View, { pointerEvents: "none", style: [tabStyles_1.styles.row, { paddingHorizontal: horizontalPadding }], children: renderTabItems(true) })] }) }), (0, jsx_runtime_1.jsxs)(react_native_1.View, { pointerEvents: "none", style: [tabStyles_1.styles.shell, shellStyle], children: [(0, jsx_runtime_1.jsx)(GlassSurface_1.GlassSurface, { variant: "tabBarShell", frameOverride: shellFrameOverride, positioning: "inFlow",
836
+ // An inline bar lives inside the page's own route capture
837
+ // source, so sampling that scene makes the capture
838
+ // include the surface being captured. On the User page
839
+ // that cycle drove RenderNode::prepareTreeImpl into a
840
+ // stack overflow. Inline bars sample locally instead.
841
+ sampling: presentation === 'inline' ? 'local' : 'backdrop', samplingSource: "routeScene", providerIdOverride: samplingProviderId, inlineBackdrop: true, pointerEvents: "none", materialOverrides: shellMaterial, style: [
842
+ react_native_1.StyleSheet.absoluteFill,
843
+ { borderRadius: resolvedShellRadius },
844
+ ] }), (0, jsx_runtime_1.jsx)(react_native_1.View, { pointerEvents: "none", style: [tabStyles_1.styles.row, { paddingHorizontal: horizontalPadding }], children: tabItems })] }), (0, jsx_runtime_1.jsx)(NativeGlassSurface, { pointerEvents: "none", providerId: tabSceneProviderId, opticsModel: appearance?.tokens.materials.tabSelectionLens.opticsModel, highlightStyle: appearance?.tokens.materials.tabSelectionLens.referenceHighlightStyle, interactionProfile: "tab", surfaceColor: appearance?.tokens.materials.tabSelectionLens.surfaceColor?.[dark ? 'dark' : 'light'], cornerRadius: appearance?.tokens.materials.tabSelectionLens.radius ??
845
+ lensBaseHeight / 2, blurRadius: (appearance?.tokens.materials.tabSelectionLens.blurRadius ?? 0.35) *
846
+ (appearance?.tokens.materials.tabSelectionLens.opticsModel ===
847
+ 'referenceParity'
848
+ ? 1
849
+ : appearance?.tokens.quality === 'high'
850
+ ? 1.2
851
+ : 1), refractionHeight: lensRefractionHeight ??
852
+ appearance?.tokens.materials.tabSelectionLens.refractionHeight ??
853
+ 12, refractionAmount: appearance?.tokens.materials.tabSelectionLens.refractionAmount ?? 5.5, bodyRefractionAmount: appearance?.tokens.materials.tabSelectionLens.refractionBodyAmount ??
854
+ 1.5, saturation: appearance?.tokens.materials.tabSelectionLens.saturation ?? 1.02, chromaticAberration: appearance?.tokens.materials.tabSelectionLens.chromaticAberration ??
855
+ 0.3, highlightAlpha: appearance?.tokens.materials.tabSelectionLens.highlightAlpha ?? 0.62, highlightWidth: appearance?.tokens.materials.tabSelectionLens.highlightWidth ?? 1.3, tintAlpha: appearance?.tokens.materials.tabSelectionLens.tintAlpha ?? 0.08, specularStrength: appearance?.tokens.materials.tabSelectionLens.specularStrength ?? 0.95, fresnelStrength: appearance?.tokens.materials.tabSelectionLens.fresnelStrength ?? 0.72, innerShadowStrength: appearance?.tokens.materials.tabSelectionLens.innerShadowStrength ??
856
+ 0.2, shadowOpacity: appearance?.tokens.materials.tabSelectionLens.shadowOpacity ?? 0.05, shadowRadius: appearance?.tokens.materials.tabSelectionLens.shadowRadius ?? 4, shadowOffsetY: appearance?.tokens.materials.tabSelectionLens.shadowOffsetY ?? 4 / 6, tint: appearance?.tokens.tint[dark ? 'dark' : 'light'], continuous: liveBackdropEnabled, animatedProps: liveLensAnimatedProps, style: [tabStyles_1.styles.nativeLens, liveLensStyle] })] })) }) })) : ((0, jsx_runtime_1.jsxs)(react_native_1.View, { pointerEvents: "none", style: [tabStyles_1.styles.shell, shellStyle], children: [(0, jsx_runtime_1.jsx)(GlassSurface_1.GlassSurface, { variant: "tabBarShell", frameOverride: shellFrameOverride, positioning: "inFlow", sampling: "backdrop", samplingSource: "routeScene", inlineBackdrop: true, pointerEvents: "none", materialOverrides: shellMaterial, style: [react_native_1.StyleSheet.absoluteFill, { borderRadius: resolvedShellRadius }] }), (0, jsx_runtime_1.jsx)(react_native_1.View, { pointerEvents: "none", style: [tabStyles_1.styles.row, { paddingHorizontal: horizontalPadding }], children: tabItems }), (0, jsx_runtime_1.jsx)(GlassSurface_1.GlassSurface, { variant: "tabSelectionLens", positioning: "inFlow", sampling: "backdrop", samplingSource: "routeScene", inlineBackdrop: true, pointerEvents: "none", style: {
857
+ position: 'absolute',
858
+ left: selectedLeft,
859
+ top: verticalInset,
860
+ width: lensWidth,
861
+ height: lensBaseHeight,
862
+ borderRadius: lensBaseHeight / 2,
863
+ zIndex: 2,
864
+ }, animatedStyle: localLensStyle })] })), tabConstants_10.GESTURE_DEBUG_ENABLED && ((0, jsx_runtime_1.jsx)(react_native_1.View, { pointerEvents: "none", accessibilityElementsHidden: true, importantForAccessibility: "no-hide-descendants", style: [tabStyles_1.styles.gestureDebugOverlay, { width: Math.max(barWidth, tabConstants_5.TAB_BAR_MIN_WIDTH) }], children: (0, jsx_runtime_1.jsx)(react_native_1.Text, { style: tabStyles_1.styles.gestureDebugText, children: `view DOWN ${gestureDebug.touchCount} · gesture DOWN ${gestureDebug.gestureCount}\nphase ${gestureDebug.phase} · hold candidate ${gestureDebug.holdCandidate ? 'ON' : 'off'} · hold ${gestureDebug.holdActivated ? 'ON' : 'off'} · drag ${gestureDebug.dragging ? 'ON' : 'off'} · snap ${gestureDebug.snapStarted ? 'ON' : 'off'}\norigin ${gestureDebug.origin} · hovered ${gestureDebug.hovered} · pending ${gestureDebug.pending}` }) })), (0, jsx_runtime_1.jsx)(react_native_gesture_handler_1.GestureDetector, { gesture: tabBarGesture, children: (0, jsx_runtime_1.jsx)(react_native_1.View, { pointerEvents: "auto", onTouchStart: tabConstants_10.GESTURE_DEBUG_ENABLED ? noteTabViewTouch : undefined, collapsable: false, style: [tabStyles_1.styles.interactionLayer, { width: barWidth, height }], children: accessibilityTargets }) })] }));
865
+ return presentation === 'floating' ? ((0, jsx_runtime_1.jsx)(GlassSurface_1.GlassOverlay, { zIndex: tabConstants_9.TAB_BAR_PORTAL_Z_INDEX + 1, children: barContents })) : (barContents);
866
+ }
867
+ //# sourceMappingURL=InlineTabBar.js.map