glacia-native 0.5.2 → 0.6.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 (381) hide show
  1. package/README.md +84 -17
  2. package/lib/module/Accordion.js +58 -0
  3. package/lib/module/ActionSheet.js +38 -0
  4. package/lib/module/Alert.js +23 -0
  5. package/lib/module/AlertDialog.js +47 -0
  6. package/lib/module/Avatar.js +48 -0
  7. package/lib/module/Badge.js +36 -0
  8. package/lib/module/Bars.js +13 -268
  9. package/lib/module/Button.js +57 -39
  10. package/lib/module/Card.js +31 -19
  11. package/lib/module/Checkbox.js +42 -0
  12. package/lib/module/Chip.js +80 -0
  13. package/lib/module/Collapsible.js +26 -0
  14. package/lib/module/ContextMenu.js +33 -0
  15. package/lib/module/Dialog.js +39 -123
  16. package/lib/module/DropdownMenu.js +33 -0
  17. package/lib/module/Field.js +22 -0
  18. package/lib/module/Glass.js +10 -3
  19. package/lib/module/Group.js +36 -0
  20. package/lib/module/IconButton.js +40 -0
  21. package/lib/module/Input.js +43 -38
  22. package/lib/module/Label.js +17 -0
  23. package/lib/module/MorphGroup.js +47 -0
  24. package/lib/module/Popover.js +29 -0
  25. package/lib/module/Progress.js +32 -0
  26. package/lib/module/RadioGroup.js +51 -0
  27. package/lib/module/Scrim.js +44 -0
  28. package/lib/module/SegmentedControl.js +70 -63
  29. package/lib/module/Select.js +51 -0
  30. package/lib/module/Separator.js +25 -0
  31. package/lib/module/Sheet.js +51 -0
  32. package/lib/module/Skeleton.js +48 -0
  33. package/lib/module/Slider.js +45 -34
  34. package/lib/module/Stepper.js +167 -0
  35. package/lib/module/Switch.js +45 -55
  36. package/lib/module/TabBar.js +50 -44
  37. package/lib/module/Textarea.js +18 -0
  38. package/lib/module/Toast.js +55 -0
  39. package/lib/module/Toggle.js +47 -0
  40. package/lib/module/ToggleGroup.js +56 -0
  41. package/lib/module/Toolbar.js +37 -0
  42. package/lib/module/Tooltip.js +31 -0
  43. package/lib/module/glass-provider.js +28 -0
  44. package/lib/module/glass-stack.js +61 -0
  45. package/lib/module/index.js +78 -109
  46. package/lib/module/internal/GlassBackdrop.js +36 -0
  47. package/lib/module/internal/GlassView.js +43 -11
  48. package/lib/module/internal/blur-community.js +20 -0
  49. package/lib/module/internal/blur-community.web.js +9 -0
  50. package/lib/module/internal/blur.js +6 -9
  51. package/lib/module/internal/glass-routing.js +154 -30
  52. package/lib/module/internal/initials.js +12 -0
  53. package/lib/module/internal/overlay.js +147 -0
  54. package/lib/module/internal/primitives.js +16 -0
  55. package/lib/typescript/Accordion.d.ts +22 -0
  56. package/lib/typescript/ActionSheet.d.ts +24 -0
  57. package/lib/typescript/Alert.d.ts +15 -0
  58. package/lib/typescript/AlertDialog.d.ts +17 -0
  59. package/lib/typescript/Avatar.d.ts +22 -0
  60. package/lib/typescript/Badge.d.ts +12 -0
  61. package/lib/typescript/Bars.d.ts +3 -188
  62. package/lib/typescript/Button.d.ts +44 -10
  63. package/lib/typescript/Card.d.ts +30 -3
  64. package/lib/typescript/Checkbox.d.ts +14 -0
  65. package/lib/typescript/Chip.d.ts +19 -0
  66. package/lib/typescript/Collapsible.d.ts +17 -0
  67. package/lib/typescript/ContextMenu.d.ts +23 -0
  68. package/lib/typescript/Dialog.d.ts +8 -68
  69. package/lib/typescript/DropdownMenu.d.ts +23 -0
  70. package/lib/typescript/Field.d.ts +19 -0
  71. package/lib/typescript/Glass.d.ts +11 -2
  72. package/lib/typescript/Group.d.ts +35 -0
  73. package/lib/typescript/IconButton.d.ts +21 -0
  74. package/lib/typescript/Input.d.ts +17 -18
  75. package/lib/typescript/Label.d.ts +14 -0
  76. package/lib/typescript/MorphGroup.d.ts +46 -0
  77. package/lib/typescript/Popover.d.ts +17 -0
  78. package/lib/typescript/Progress.d.ts +13 -0
  79. package/lib/typescript/RadioGroup.d.ts +21 -0
  80. package/lib/typescript/Scrim.d.ts +33 -0
  81. package/lib/typescript/SegmentedControl.d.ts +24 -13
  82. package/lib/typescript/Select.d.ts +19 -0
  83. package/lib/typescript/Separator.d.ts +10 -0
  84. package/lib/typescript/Sheet.d.ts +45 -0
  85. package/lib/typescript/Skeleton.d.ts +10 -0
  86. package/lib/typescript/Slider.d.ts +15 -7
  87. package/lib/typescript/Stepper.d.ts +49 -0
  88. package/lib/typescript/Switch.d.ts +19 -12
  89. package/lib/typescript/TabBar.d.ts +18 -6
  90. package/lib/typescript/Textarea.d.ts +6 -0
  91. package/lib/typescript/Toast.d.ts +40 -0
  92. package/lib/typescript/Toggle.d.ts +21 -0
  93. package/lib/typescript/ToggleGroup.d.ts +22 -0
  94. package/lib/typescript/Toolbar.d.ts +35 -0
  95. package/lib/typescript/Tooltip.d.ts +16 -0
  96. package/lib/typescript/glass-provider.d.ts +34 -0
  97. package/lib/typescript/glass-stack.d.ts +54 -0
  98. package/lib/typescript/index.d.ts +38 -17
  99. package/lib/typescript/internal/GlassBackdrop.d.ts +33 -0
  100. package/lib/typescript/internal/GlassView.d.ts +18 -2
  101. package/lib/typescript/internal/blur-community.d.ts +2 -0
  102. package/lib/typescript/internal/blur-community.web.d.ts +2 -0
  103. package/lib/typescript/internal/glass-routing.d.ts +83 -15
  104. package/lib/typescript/internal/initials.d.ts +2 -0
  105. package/lib/typescript/internal/overlay.d.ts +74 -0
  106. package/lib/typescript/internal/primitives.d.ts +11 -0
  107. package/package.json +4 -2
  108. package/src/Accordion.tsx +165 -0
  109. package/src/ActionSheet.tsx +149 -0
  110. package/src/Alert.tsx +85 -0
  111. package/src/AlertDialog.tsx +124 -0
  112. package/src/Avatar.tsx +102 -0
  113. package/src/Badge.tsx +80 -0
  114. package/src/Bars.tsx +10 -807
  115. package/src/Button.tsx +196 -67
  116. package/src/Card.tsx +105 -32
  117. package/src/Checkbox.tsx +98 -0
  118. package/src/Chip.tsx +149 -0
  119. package/src/Collapsible.tsx +66 -0
  120. package/src/ContextMenu.tsx +103 -0
  121. package/src/Dialog.tsx +85 -335
  122. package/src/DropdownMenu.tsx +103 -0
  123. package/src/Field.tsx +65 -0
  124. package/src/Glass.tsx +15 -5
  125. package/src/Group.tsx +98 -0
  126. package/src/IconButton.tsx +110 -0
  127. package/src/Input.tsx +139 -87
  128. package/src/Label.tsx +56 -0
  129. package/src/MorphGroup.tsx +134 -0
  130. package/src/Popover.tsx +81 -0
  131. package/src/Progress.tsx +83 -0
  132. package/src/RadioGroup.tsx +122 -0
  133. package/src/Scrim.tsx +94 -0
  134. package/src/SegmentedControl.tsx +132 -99
  135. package/src/Select.tsx +136 -0
  136. package/src/Separator.tsx +52 -0
  137. package/src/Sheet.tsx +139 -0
  138. package/src/Skeleton.tsx +77 -0
  139. package/src/Slider.tsx +84 -47
  140. package/src/Stepper.tsx +315 -0
  141. package/src/Switch.tsx +81 -73
  142. package/src/TabBar.tsx +106 -93
  143. package/src/Textarea.tsx +34 -0
  144. package/src/Toast.tsx +131 -0
  145. package/src/Toggle.tsx +113 -0
  146. package/src/ToggleGroup.tsx +129 -0
  147. package/src/Toolbar.tsx +111 -0
  148. package/src/Tooltip.tsx +79 -0
  149. package/src/engine/CHANGELOG.md +430 -0
  150. package/src/engine/NOTICE +54 -0
  151. package/src/engine/README.md +975 -0
  152. package/src/engine/android/build.gradle +18 -0
  153. package/src/engine/android/src/main/AndroidManifest.xml +2 -0
  154. package/src/engine/android/src/main/java/expo/modules/liquidglass/ExpoLiquidGlassModule.kt +174 -0
  155. package/src/engine/android/src/main/java/expo/modules/liquidglass/GlassConstants.kt +7 -0
  156. package/src/engine/android/src/main/java/expo/modules/liquidglass/LiquidGlassContainerView.kt +16 -0
  157. package/src/engine/android/src/main/java/expo/modules/liquidglass/LiquidGlassProviderView.kt +165 -0
  158. package/src/engine/android/src/main/java/expo/modules/liquidglass/LiquidGlassView.kt +1731 -0
  159. package/src/engine/android/src/main/java/expo/modules/liquidglass/enums/GlassEnums.kt +171 -0
  160. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/BackdropGraph.kt +146 -0
  161. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/BackdropSource.kt +53 -0
  162. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/ContinuousCorners.kt +188 -0
  163. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/CornerRadii.kt +62 -0
  164. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassAppearance.kt +352 -0
  165. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassDebug.kt +109 -0
  166. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassEnvironment.kt +139 -0
  167. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassHdr.kt +85 -0
  168. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassLuminanceProbe.kt +189 -0
  169. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassPressAnimator.kt +264 -0
  170. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassProgressiveBlur.kt +249 -0
  171. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassShaderCache.kt +256 -0
  172. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassShaderSource.kt +845 -0
  173. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassTier.kt +63 -0
  174. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/ProviderRegistry.kt +71 -0
  175. package/src/engine/android/src/main/java/expo/modules/liquidglass/records/GlassRecords.kt +288 -0
  176. package/src/engine/index.ts +24 -0
  177. package/src/engine/ios/Enums/GlassBlurDirection.swift +21 -0
  178. package/src/engine/ios/Enums/GlassVariant.swift +86 -0
  179. package/src/engine/ios/ExpoLiquidGlass.podspec +93 -0
  180. package/src/engine/ios/ExpoLiquidGlassModule.swift +77 -0
  181. package/src/engine/ios/Glass/BackdropCapturer.swift +811 -0
  182. package/src/engine/ios/Glass/ContinuousCorners.swift +165 -0
  183. package/src/engine/ios/Glass/GlassBackdrop.swift +176 -0
  184. package/src/engine/ios/Glass/GlassFramePhase.swift +126 -0
  185. package/src/engine/ios/Glass/GlassFrameScheduler.swift +261 -0
  186. package/src/engine/ios/Glass/GlassPressAnimator.swift +250 -0
  187. package/src/engine/ios/Glass/GlassRenderContext.swift +168 -0
  188. package/src/engine/ios/Glass/GlassRenderer.swift +186 -0
  189. package/src/engine/ios/Glass/GlassSurfaceView.swift +452 -0
  190. package/src/engine/ios/Glass/NonRenderableView.swift +54 -0
  191. package/src/engine/ios/Glass/StripCache.swift +545 -0
  192. package/src/engine/ios/Records/GlassCornerRadii.swift +79 -0
  193. package/src/engine/ios/Records/GlassMetalOptions.swift +180 -0
  194. package/src/engine/ios/Records/GlassRefractionCurve.swift +14 -0
  195. package/src/engine/ios/Shaders/LiquidGlass.metal +480 -0
  196. package/src/engine/ios/Shaders/bundle-marker.txt +6 -0
  197. package/src/engine/ios/Views/LiquidGlassContainerView.swift +99 -0
  198. package/src/engine/ios/Views/LiquidGlassView.swift +859 -0
  199. package/src/engine/package.json +70 -0
  200. package/src/engine/src/components/LiquidGlassButton/LiquidGlassButton.tsx +424 -0
  201. package/src/engine/src/components/LiquidGlassCard/LiquidGlassCard.tsx +98 -0
  202. package/src/engine/src/components/LiquidGlassChip/LiquidGlassChip.tsx +65 -0
  203. package/src/engine/src/components/LiquidGlassGroup/LiquidGlassGroup.tsx +350 -0
  204. package/src/engine/src/components/LiquidGlassIconButton/LiquidGlassIconButton.tsx +24 -0
  205. package/src/engine/src/components/LiquidGlassMorphGroup/LiquidGlassMorphGroup.tsx +434 -0
  206. package/src/engine/src/components/LiquidGlassScrim/LiquidGlassScrim.tsx +100 -0
  207. package/src/engine/src/components/LiquidGlassSegmentedControl/LiquidGlassSegmentedControl.tsx +213 -0
  208. package/src/engine/src/components/LiquidGlassSheet/LiquidGlassSheet.tsx +218 -0
  209. package/src/engine/src/components/LiquidGlassSlider/LiquidGlassSlider.tsx +327 -0
  210. package/src/engine/src/components/LiquidGlassStepper/LiquidGlassStepper.tsx +321 -0
  211. package/src/engine/src/components/LiquidGlassSwitch/LiquidGlassSwitch.tsx +296 -0
  212. package/src/engine/src/components/LiquidGlassTabBar/LiquidGlassTabBar.tsx +952 -0
  213. package/src/engine/src/components/LiquidGlassTextInput/LiquidGlassTextInput.tsx +151 -0
  214. package/src/engine/src/components/LiquidGlassToast/LiquidGlassToast.tsx +169 -0
  215. package/src/engine/src/components/LiquidGlassToolbar/LiquidGlassToolbar.tsx +124 -0
  216. package/src/engine/src/components/index.ts +16 -0
  217. package/src/engine/src/constants/index.ts +4 -0
  218. package/src/engine/src/constants/metal.constants.ts +327 -0
  219. package/src/engine/src/constants/metrics.constants.ts +325 -0
  220. package/src/engine/src/constants/springs.constants.ts +107 -0
  221. package/src/engine/src/constants/styles.constants.ts +12 -0
  222. package/src/engine/src/context/glass-group.context.ts +65 -0
  223. package/src/engine/src/context/index.ts +6 -0
  224. package/src/engine/src/core/components/LiquidGlassContainer/LiquidGlassContainer.tsx +32 -0
  225. package/src/engine/src/core/components/LiquidGlassContainer/index.ts +1 -0
  226. package/src/engine/src/core/components/LiquidGlassProvider/LiquidGlassProvider.tsx +66 -0
  227. package/src/engine/src/core/components/LiquidGlassProvider/index.ts +1 -0
  228. package/src/engine/src/core/components/LiquidGlassStack/LiquidGlassStack.tsx +184 -0
  229. package/src/engine/src/core/components/LiquidGlassStack/index.ts +1 -0
  230. package/src/engine/src/core/components/LiquidGlassView/LiquidGlassView.tsx +126 -0
  231. package/src/engine/src/core/components/LiquidGlassView/index.ts +1 -0
  232. package/src/engine/src/core/components/index.ts +4 -0
  233. package/src/engine/src/core/constants/glass.constants.ts +57 -0
  234. package/src/engine/src/core/constants/index.ts +20 -0
  235. package/src/engine/src/core/constants/native.constants.ts +16 -0
  236. package/src/engine/src/core/context/glass-stack.context.ts +30 -0
  237. package/src/engine/src/core/context/index.ts +4 -0
  238. package/src/engine/src/core/enum/index.ts +12 -0
  239. package/src/engine/src/core/index.ts +1 -0
  240. package/src/engine/src/core/interfaces/glass-hdr.interface.ts +15 -0
  241. package/src/engine/src/core/interfaces/glass-metal.interface.ts +248 -0
  242. package/src/engine/src/core/interfaces/glass-surface.interface.ts +9 -0
  243. package/src/engine/src/core/interfaces/index.ts +31 -0
  244. package/src/engine/src/core/interfaces/liquid-glass-container.interface.ts +6 -0
  245. package/src/engine/src/core/interfaces/liquid-glass-provider.interface.ts +14 -0
  246. package/src/engine/src/core/interfaces/liquid-glass-stack.interface.ts +21 -0
  247. package/src/engine/src/core/interfaces/liquid-glass-view.interface.ts +129 -0
  248. package/src/engine/src/core/interfaces/native-liquid-glass-view.interface.ts +19 -0
  249. package/src/engine/src/core/modules/ExpoLiquidGlassModule.ts +26 -0
  250. package/src/engine/src/core/modules/index.ts +2 -0
  251. package/src/engine/src/core/root/index.ts +51 -0
  252. package/src/engine/src/core/types/glass.types.ts +25 -0
  253. package/src/engine/src/core/types/index.ts +8 -0
  254. package/src/engine/src/core/utils/debug.utils.ts +17 -0
  255. package/src/engine/src/core/utils/dev-warn.utils.ts +17 -0
  256. package/src/engine/src/core/utils/hdr.utils.ts +37 -0
  257. package/src/engine/src/core/utils/index.ts +5 -0
  258. package/src/engine/src/core/utils/native-view.utils.ts +33 -0
  259. package/src/engine/src/core/utils/platform.utils.ts +34 -0
  260. package/src/engine/src/core/views/NativeGlassBackdropView.ts +24 -0
  261. package/src/engine/src/core/views/NativeLiquidGlassContainerView.ts +13 -0
  262. package/src/engine/src/core/views/NativeLiquidGlassContainerView.web.ts +10 -0
  263. package/src/engine/src/core/views/NativeLiquidGlassProviderView.ts +13 -0
  264. package/src/engine/src/core/views/NativeLiquidGlassProviderView.web.ts +10 -0
  265. package/src/engine/src/core/views/NativeLiquidGlassView.ts +19 -0
  266. package/src/engine/src/core/views/NativeLiquidGlassView.web.ts +14 -0
  267. package/src/engine/src/core/views/index.ts +4 -0
  268. package/src/engine/src/hooks/index.ts +18 -0
  269. package/src/engine/src/hooks/use-adaptive-glass.ts +91 -0
  270. package/src/engine/src/hooks/use-damped-drag.ts +332 -0
  271. package/src/engine/src/hooks/use-echo-filter.ts +55 -0
  272. package/src/engine/src/hooks/use-glass-group-member.ts +169 -0
  273. package/src/engine/src/hooks/use-gravity-highlight.ts +79 -0
  274. package/src/engine/src/hooks/use-press-progress.ts +44 -0
  275. package/src/engine/src/index.ts +120 -0
  276. package/src/engine/src/interfaces/index.ts +28 -0
  277. package/src/engine/src/interfaces/liquid-glass-button.interface.ts +94 -0
  278. package/src/engine/src/interfaces/liquid-glass-card.interface.ts +40 -0
  279. package/src/engine/src/interfaces/liquid-glass-chip.interface.ts +29 -0
  280. package/src/engine/src/interfaces/liquid-glass-group.interface.ts +32 -0
  281. package/src/engine/src/interfaces/liquid-glass-icon-button.interface.ts +19 -0
  282. package/src/engine/src/interfaces/liquid-glass-morph-group.interface.ts +59 -0
  283. package/src/engine/src/interfaces/liquid-glass-scrim.interface.ts +36 -0
  284. package/src/engine/src/interfaces/liquid-glass-segmented-control.interface.ts +32 -0
  285. package/src/engine/src/interfaces/liquid-glass-sheet.interface.ts +38 -0
  286. package/src/engine/src/interfaces/liquid-glass-slider.interface.ts +37 -0
  287. package/src/engine/src/interfaces/liquid-glass-stepper.interface.ts +35 -0
  288. package/src/engine/src/interfaces/liquid-glass-switch.interface.ts +27 -0
  289. package/src/engine/src/interfaces/liquid-glass-tab-bar.interface.ts +116 -0
  290. package/src/engine/src/interfaces/liquid-glass-text-input.interface.ts +42 -0
  291. package/src/engine/src/interfaces/liquid-glass-toast.interface.ts +36 -0
  292. package/src/engine/src/interfaces/liquid-glass-toolbar.interface.ts +33 -0
  293. package/src/engine/src/theme/glass-ui-theme.ts +100 -0
  294. package/src/engine/src/theme/index.ts +2 -0
  295. package/src/engine/src/utils/button-press.utils.ts +63 -0
  296. package/src/engine/src/utils/index.ts +3 -0
  297. package/src/engine/src/utils/metal.utils.ts +164 -0
  298. package/src/glass-provider.tsx +60 -0
  299. package/src/glass-stack.tsx +115 -0
  300. package/src/index.ts +47 -190
  301. package/src/internal/GlassBackdrop.tsx +60 -0
  302. package/src/internal/GlassView.tsx +53 -18
  303. package/src/internal/blur-community.ts +19 -0
  304. package/src/internal/blur-community.web.ts +7 -0
  305. package/src/internal/blur.ts +7 -8
  306. package/src/internal/glass-routing.ts +211 -34
  307. package/src/internal/initials.ts +7 -0
  308. package/src/internal/overlay.tsx +258 -0
  309. package/src/internal/primitives.ts +23 -0
  310. package/lib/module/Carousel.js +0 -103
  311. package/lib/module/Display.js +0 -318
  312. package/lib/module/Feedback.js +0 -395
  313. package/lib/module/Form.js +0 -160
  314. package/lib/module/Forms2.js +0 -471
  315. package/lib/module/Message.js +0 -84
  316. package/lib/module/Overlays.js +0 -344
  317. package/lib/module/Pickers.js +0 -243
  318. package/lib/module/Table.js +0 -100
  319. package/lib/module/ai.js +0 -283
  320. package/lib/module/charts/AreaChart.js +0 -32
  321. package/lib/module/charts/BarChart.js +0 -75
  322. package/lib/module/charts/FunnelChart.js +0 -50
  323. package/lib/module/charts/HeatmapChart.js +0 -71
  324. package/lib/module/charts/LineChart.js +0 -81
  325. package/lib/module/charts/PlotChart.js +0 -52
  326. package/lib/module/charts/RadarChart.js +0 -78
  327. package/lib/module/charts/RingChart.js +0 -52
  328. package/lib/module/charts/ScatterChart.js +0 -95
  329. package/lib/module/charts/WaterfallChart.js +0 -85
  330. package/lib/module/charts/advanced.js +0 -313
  331. package/lib/module/charts/extra.js +0 -108
  332. package/lib/module/charts/index.js +0 -50
  333. package/lib/module/charts/scales.js +0 -140
  334. package/lib/typescript/Carousel.d.ts +0 -47
  335. package/lib/typescript/Display.d.ts +0 -178
  336. package/lib/typescript/Feedback.d.ts +0 -196
  337. package/lib/typescript/Form.d.ts +0 -97
  338. package/lib/typescript/Forms2.d.ts +0 -209
  339. package/lib/typescript/Message.d.ts +0 -67
  340. package/lib/typescript/Overlays.d.ts +0 -146
  341. package/lib/typescript/Pickers.d.ts +0 -105
  342. package/lib/typescript/Table.d.ts +0 -64
  343. package/lib/typescript/ai.d.ts +0 -166
  344. package/lib/typescript/charts/AreaChart.d.ts +0 -44
  345. package/lib/typescript/charts/BarChart.d.ts +0 -19
  346. package/lib/typescript/charts/FunnelChart.d.ts +0 -25
  347. package/lib/typescript/charts/HeatmapChart.d.ts +0 -23
  348. package/lib/typescript/charts/LineChart.d.ts +0 -30
  349. package/lib/typescript/charts/PlotChart.d.ts +0 -31
  350. package/lib/typescript/charts/RadarChart.d.ts +0 -27
  351. package/lib/typescript/charts/RingChart.d.ts +0 -28
  352. package/lib/typescript/charts/ScatterChart.d.ts +0 -34
  353. package/lib/typescript/charts/WaterfallChart.d.ts +0 -22
  354. package/lib/typescript/charts/advanced.d.ts +0 -107
  355. package/lib/typescript/charts/extra.d.ts +0 -63
  356. package/lib/typescript/charts/index.d.ts +0 -13
  357. package/lib/typescript/charts/scales.d.ts +0 -35
  358. package/src/Carousel.tsx +0 -233
  359. package/src/Display.tsx +0 -781
  360. package/src/Feedback.tsx +0 -992
  361. package/src/Form.tsx +0 -445
  362. package/src/Forms2.tsx +0 -1055
  363. package/src/Message.tsx +0 -218
  364. package/src/Overlays.tsx +0 -704
  365. package/src/Pickers.tsx +0 -595
  366. package/src/Table.tsx +0 -232
  367. package/src/ai.tsx +0 -715
  368. package/src/charts/AreaChart.tsx +0 -73
  369. package/src/charts/BarChart.tsx +0 -221
  370. package/src/charts/FunnelChart.tsx +0 -125
  371. package/src/charts/HeatmapChart.tsx +0 -155
  372. package/src/charts/LineChart.tsx +0 -247
  373. package/src/charts/PlotChart.tsx +0 -168
  374. package/src/charts/RadarChart.tsx +0 -208
  375. package/src/charts/RingChart.tsx +0 -133
  376. package/src/charts/ScatterChart.tsx +0 -223
  377. package/src/charts/WaterfallChart.tsx +0 -201
  378. package/src/charts/advanced.tsx +0 -676
  379. package/src/charts/extra.tsx +0 -242
  380. package/src/charts/index.ts +0 -86
  381. package/src/charts/scales.ts +0 -163
@@ -1,6 +1,8 @@
1
- import { forwardRef, useState } from "react";
2
- import type { StyleProp, ViewStyle } from "react-native";
1
+ import { forwardRef } from "react";
2
+ import type { StyleProp, TextStyle, ViewStyle } from "react-native";
3
3
 
4
+ import { loadEngineControl } from "./internal/glass-routing";
5
+ import { glassCapabilities } from "./internal/GlassView";
4
6
  import { Glass } from "./Glass";
5
7
  import { colors, radii } from "./internal/tokens";
6
8
  import { primitives } from "./internal/primitives";
@@ -9,109 +11,125 @@ import { hapticSelection } from "./internal/haptics";
9
11
  import { LensRim, lensShadow } from "./internal/lens";
10
12
 
11
13
  export interface SegmentedControlProps {
12
- values: string[];
13
- selectedIndex?: number;
14
- defaultIndex?: number;
15
- onValueChange?: (value: string, index: number) => void;
16
- /** One selection tick when the segment changes. `false` opts out. */
17
- haptics?: boolean;
18
- style?: StyleProp<ViewStyle>;
14
+ /** Segment labels, equal-width. */
15
+ segments: string[];
16
+ selectedIndex: number;
17
+ /** Fires when the user picks another segment. */
18
+ onChange: (index: number) => void;
19
+ /** Control height; the corner radius follows it. Defaults to 40. */
20
+ height?: number;
21
+ /** Track wash. */
22
+ tint?: string;
23
+ /** Thumb wash. */
24
+ thumbTint?: string;
25
+ thumbMetal?: unknown;
26
+ accessibilityLabel?: string;
19
27
  isDark?: boolean;
20
- /** Passed through to the control so it is testable. */
28
+ /** Passed to the control so it is testable. */
21
29
  testID?: string;
30
+ style?: StyleProp<ViewStyle>;
31
+ textStyle?: StyleProp<TextStyle>;
22
32
  }
23
33
 
24
- // The web segment is 32 high inside a 2pt inset, on a pill container, with the
25
- // selected pill itself a pill: 500/400 weights, not a bold selected label.
26
- const SEGMENT_HEIGHT = 32;
27
-
28
34
  /**
29
- * A row of mutually exclusive segments on one glass container.
35
+ * A segmented control — ported from the engine's `LiquidGlassSegmentedControl`,
36
+ * the design Binyam approved on real devices this week (40dp track, 3dp-inset
37
+ * thumb).
30
38
  *
31
- * The selected segment is marked by a pill that slides on the springs token.
32
- * The pill's colours come from the theme tokens, so it reads correctly in both
33
- * light and dark instead of assuming a white-on-light palette.
39
+ * With a glass renderer available the engine's own control mounts, carrying the
40
+ * approved geometry and thumb behaviour. Without one — Expo Go, below every
41
+ * tier, or Reduce Transparency — the fallback floor renders the same row of
42
+ * segments with solid selected states, so the control is never invisible.
34
43
  */
35
44
  export const SegmentedControl = forwardRef<any, SegmentedControlProps>(function SegmentedControl(
36
45
  {
37
- values,
38
- selectedIndex: selectedProp,
39
- defaultIndex = 0,
40
- onValueChange,
41
- haptics = true,
42
- style,
46
+ segments,
47
+ selectedIndex,
48
+ onChange,
49
+ height = 40,
50
+ tint,
51
+ thumbTint,
52
+ thumbMetal,
53
+ accessibilityLabel,
43
54
  isDark: isDarkProp,
44
55
  testID,
56
+ style,
57
+ textStyle,
45
58
  ...props
46
59
  },
47
60
  ref,
48
61
  ) {
49
62
  const isDark = useIsDark(isDarkProp);
50
63
  const themeColors = isDark ? colors.dark : colors.light;
51
- const { View, Text, Pressable, Animated } = primitives();
64
+ const { View, Pressable, Text: RNText, Animated } = primitives();
65
+ const capabilities = glassCapabilities();
66
+ const EngineSegmentedControl = loadEngineControl("SegmentedControl");
52
67
 
53
- const [internalIndex, setInternalIndex] = useState(defaultIndex);
54
- const [held, setHeld] = useState(false);
55
- const activeIndex = selectedProp !== undefined ? selectedProp : internalIndex;
56
- const safeIndex = Math.min(Math.max(activeIndex, 0), Math.max(values.length - 1, 0));
68
+ const selected = Math.min(Math.max(selectedIndex, 0), Math.max(segments.length - 1, 0));
57
69
 
58
70
  // The pill slides between equal-width segments, so a ratio is enough: 0 is
59
71
  // the first segment, values.length - 1 the last.
60
- const { value: slide, animated } = useSpring(safeIndex, "snappy");
61
-
62
- const handleSelect = (index: number) => {
63
- // Only a change ticks: re-pressing the current segment is not a selection.
64
- if (haptics && index !== safeIndex) hapticSelection();
65
- if (selectedProp === undefined) setInternalIndex(index);
66
- const val = values[index];
67
- if (val !== undefined) onValueChange?.(val, index);
68
- };
69
-
70
- const count = Math.max(values.length, 1);
72
+ const count = Math.max(segments.length, 1);
71
73
  const pillWidth = `${100 / count}%`;
72
-
73
- const containerStyle: ViewStyle = {
74
- position: "relative",
75
- flexDirection: "row",
76
- alignItems: "center",
77
- alignSelf: "flex-start",
78
- padding: 2,
79
- borderRadius: radii.pill,
80
- // The web lays the segment track tint over glass; the fallback paints the
81
- // same tint as the flat track the web sees through the glass.
82
- backgroundColor: themeColors.fieldWash,
83
- ...(style as ViewStyle),
84
- };
74
+ const { value: slide, animated } = useSpring(selected, "snappy");
85
75
 
86
76
  const pillTranslate = animated
87
77
  ? slide.interpolate({
88
78
  inputRange: [0, Math.max(count - 1, 1)],
89
- // One segment's worth per step, measured against the pill's own width.
90
79
  outputRange: ["0%", `${((count - 1) * 100) / count}%`],
91
80
  })
92
- : `${(safeIndex * 100) / count}%`;
81
+ : `${(selected * 100) / count}%`;
82
+
83
+ if (EngineSegmentedControl && capabilities.supported) {
84
+ const EngineSegmentedControlComponent = EngineSegmentedControl;
85
+ return (
86
+ <EngineSegmentedControlComponent
87
+ segments={segments}
88
+ selectedIndex={selected}
89
+ onChange={(index: number) => {
90
+ hapticSelection();
91
+ onChange(index);
92
+ }}
93
+ height={height}
94
+ tint={tint}
95
+ thumbTint={thumbTint}
96
+ thumbMetal={thumbMetal}
97
+ style={style}
98
+ textStyle={textStyle}
99
+ />
100
+ );
101
+ }
93
102
 
94
- return (
103
+ // Fallback floor: the sliding lens pill on a solid track, full selection
104
+ // behaviour, so the selected segment reads exactly as it does in glass.
105
+ const fallback = (
95
106
  <Glass
96
- ref={ref}
97
107
  effect="regular"
98
108
  surface="rail"
99
- pressed={held}
109
+ pressed={false}
100
110
  isDark={isDark}
101
- style={containerStyle}
111
+ style={{
112
+ position: "relative",
113
+ flexDirection: "row",
114
+ alignItems: "center",
115
+ alignSelf: "flex-start",
116
+ padding: 3,
117
+ borderRadius: radii.pill,
118
+ backgroundColor: themeColors.fieldWash,
119
+ ...(style as ViewStyle),
120
+ }}
102
121
  testID={testID}
103
122
  {...props}
104
123
  >
105
- {/* The sliding pill: one View behind the labels, coloured by the theme. */}
106
124
  {animated ? (
107
125
  <Animated.View
108
126
  style={{
109
127
  position: "absolute",
110
- top: 2,
111
- left: 2,
128
+ top: 3,
129
+ left: 3,
112
130
  width: pillWidth,
113
- height: SEGMENT_HEIGHT,
114
- borderRadius: radii.pill,
131
+ height: height - 6,
132
+ borderRadius: (height - 6) / 2,
115
133
  backgroundColor: themeColors.glassActive,
116
134
  borderWidth: 0.5,
117
135
  borderColor: themeColors.edge,
@@ -121,17 +139,17 @@ export const SegmentedControl = forwardRef<any, SegmentedControlProps>(function
121
139
  }}
122
140
  pointerEvents="none"
123
141
  >
124
- <LensRim radius={radii.pill} isDark={isDark} />
142
+ <LensRim radius={(height - 6) / 2} isDark={isDark} />
125
143
  </Animated.View>
126
144
  ) : (
127
145
  <View
128
146
  style={{
129
147
  position: "absolute",
130
- top: 2,
131
- left: `${2 + (safeIndex * 100) / count}%`,
148
+ top: 3,
149
+ left: `${3 + (selected * 100) / count}%`,
132
150
  width: pillWidth,
133
- height: SEGMENT_HEIGHT,
134
- borderRadius: radii.pill,
151
+ height: height - 6,
152
+ borderRadius: (height - 6) / 2,
135
153
  backgroundColor: themeColors.glassActive,
136
154
  borderWidth: 0.5,
137
155
  borderColor: themeColors.edge,
@@ -139,43 +157,58 @@ export const SegmentedControl = forwardRef<any, SegmentedControlProps>(function
139
157
  }}
140
158
  pointerEvents="none"
141
159
  >
142
- <LensRim radius={radii.pill} isDark={isDark} />
160
+ <LensRim radius={(height - 6) / 2} isDark={isDark} />
143
161
  </View>
144
162
  )}
145
-
146
- {values.map((label, idx) => {
147
- const isSelected = idx === safeIndex;
163
+ {segments.map((segment, index) => {
164
+ const isSelected = index === selected;
165
+ const cell = (height - 6) / Math.max(segments.length, 1);
148
166
  return (
149
- <Pressable
150
- key={label}
151
- accessibilityRole="tab"
152
- accessibilityLabel={label}
153
- accessibilityState={{ selected: isSelected }}
154
- onPress={() => handleSelect(idx)}
155
- onPressIn={() => setHeld(true)}
156
- onPressOut={() => setHeld(false)}
157
- style={{
158
- flex: 1,
159
- height: SEGMENT_HEIGHT,
160
- alignItems: "center",
161
- justifyContent: "center",
162
- paddingHorizontal: 16,
163
- borderRadius: radii.sm,
164
- }}
165
- >
166
- <Text
167
- numberOfLines={1}
168
- style={{
169
- fontSize: 13,
170
- fontWeight: isSelected ? "500" : "400",
171
- color: isSelected ? themeColors.foreground : themeColors.muted,
167
+ <View key={segment} style={{ width: cell, height: height - 6, position: "relative" }}>
168
+ {isSelected ? (
169
+ <View
170
+ style={{
171
+ position: "absolute",
172
+ top: 0,
173
+ left: 0,
174
+ width: cell,
175
+ height: height - 6,
176
+ borderRadius: (height - 6) / 2,
177
+ backgroundColor: themeColors.glassActive,
178
+ }}
179
+ />
180
+ ) : null}
181
+ <Pressable
182
+ testID={testID ? `${testID}-segment-${index}` : undefined}
183
+ accessibilityRole="tab"
184
+ accessibilityLabel={`${accessibilityLabel ?? "Segment"} ${segment}`}
185
+ accessibilityState={{ selected: isSelected, disabled: false }}
186
+ disabled={false}
187
+ onPress={() => {
188
+ if (index === selected) return;
189
+ hapticSelection();
190
+ onChange(index);
172
191
  }}
192
+ style={{ width: "100%", height, alignItems: "center", justifyContent: "center" }}
173
193
  >
174
- {label}
175
- </Text>
176
- </Pressable>
194
+ <RNText
195
+ style={[
196
+ {
197
+ fontSize: 14,
198
+ fontWeight: isSelected ? "600" : "500",
199
+ color: isSelected ? themeColors.onTint : themeColors.muted,
200
+ },
201
+ textStyle,
202
+ ]}
203
+ >
204
+ {segment}
205
+ </RNText>
206
+ </Pressable>
207
+ </View>
177
208
  );
178
209
  })}
179
210
  </Glass>
180
211
  );
212
+
213
+ return fallback;
181
214
  });
package/src/Select.tsx ADDED
@@ -0,0 +1,136 @@
1
+ // Wave 2 — Select.
2
+ //
3
+ // The donor's single-choice field: a `listbox`-style combobox whose trigger
4
+ // shows the chosen label, opening an anchored list where each option is
5
+ // selectable and the chosen one is marked. Controlled or internal, with a
6
+ // placeholder and disabled options.
7
+
8
+ import { useState } from "react";
9
+ import type { StyleProp, ViewStyle } from "react-native";
10
+
11
+ import { Glass } from "./Glass";
12
+ import { colors, radii } from "./internal/tokens";
13
+ import { primitives } from "./internal/primitives";
14
+ import { useIsDark } from "./internal/motion";
15
+ import { hapticSelection } from "./internal/haptics";
16
+ import { OverlayPanel, PanelItem, useTriggerAnchor } from "./internal/overlay";
17
+
18
+ export interface SelectOption {
19
+ value: string;
20
+ label: string;
21
+ disabled?: boolean;
22
+ }
23
+
24
+ export interface SelectProps {
25
+ value?: string;
26
+ defaultValue?: string;
27
+ onValueChange?: (value: string) => void;
28
+ options: SelectOption[];
29
+ placeholder?: string;
30
+ disabled?: boolean;
31
+ accessibilityLabel?: string;
32
+ isDark?: boolean;
33
+ style?: StyleProp<ViewStyle>;
34
+ testID?: string;
35
+ }
36
+
37
+ export function Select({
38
+ value: valueProp,
39
+ defaultValue,
40
+ onValueChange,
41
+ options,
42
+ placeholder = "Select…",
43
+ disabled = false,
44
+ accessibilityLabel = "Select",
45
+ isDark: isDarkProp,
46
+ style,
47
+ testID,
48
+ }: SelectProps) {
49
+ const isDark = useIsDark(isDarkProp);
50
+ const theme = isDark ? colors.dark : colors.light;
51
+ const { View, Pressable, Text: RNText } = primitives();
52
+ const [internal, setInternal] = useState(defaultValue);
53
+ const [open, setOpen] = useState(false);
54
+ const { ref, anchor, capture } = useTriggerAnchor();
55
+
56
+ const value = valueProp !== undefined ? valueProp : internal;
57
+ const chosen = options.find((option) => option.value === value);
58
+
59
+ return (
60
+ <View style={{ alignSelf: "flex-start", width: 220, maxWidth: "100%" }}>
61
+ <Pressable
62
+ ref={ref}
63
+ testID={testID}
64
+ accessibilityRole="button"
65
+ accessibilityLabel={chosen ? chosen.label : accessibilityLabel}
66
+ accessibilityState={{ expanded: open, disabled }}
67
+ accessibilityValue={chosen ? { text: chosen.label } : undefined}
68
+ disabled={disabled}
69
+ onPress={() => {
70
+ void capture();
71
+ setOpen(true);
72
+ }}
73
+ style={{ opacity: disabled ? 0.38 : 1 }}
74
+ >
75
+ <Glass
76
+ effect="regular"
77
+ surface="control"
78
+ isDark={isDark}
79
+ pressed={open}
80
+ style={{
81
+ height: 40,
82
+ borderRadius: radii.md,
83
+ paddingHorizontal: 14,
84
+ flexDirection: "row",
85
+ alignItems: "center",
86
+ justifyContent: "space-between",
87
+ gap: 8,
88
+ }}
89
+ >
90
+ <RNText
91
+ numberOfLines={1}
92
+ style={{
93
+ flex: 1,
94
+ fontSize: 15,
95
+ color: chosen ? theme.foreground : theme.muted,
96
+ }}
97
+ >
98
+ {chosen?.label ?? placeholder}
99
+ </RNText>
100
+ <RNText style={{ fontSize: 11, color: theme.muted, transform: [{ rotate: open ? "180deg" : "0deg" }] }}>
101
+ ▾
102
+ </RNText>
103
+ </Glass>
104
+ </Pressable>
105
+
106
+ <OverlayPanel
107
+ open={open}
108
+ onClose={() => setOpen(false)}
109
+ anchor={anchor}
110
+ width={220}
111
+ isDark={isDark}
112
+ testID={testID ? `${testID}-list` : undefined}
113
+ accessibilityLabel={chosen ? chosen.label : accessibilityLabel}
114
+ role="listbox"
115
+ >
116
+ {options.map((option) => (
117
+ <PanelItem
118
+ key={option.value}
119
+ label={option.label}
120
+ disabled={option.disabled}
121
+ selected={option.value === value}
122
+ role="option"
123
+ isDark={isDark}
124
+ onPress={() => {
125
+ if (option.disabled) return;
126
+ setOpen(false);
127
+ if (valueProp === undefined) setInternal(option.value);
128
+ hapticSelection();
129
+ onValueChange?.(option.value);
130
+ }}
131
+ />
132
+ ))}
133
+ </OverlayPanel>
134
+ </View>
135
+ );
136
+ }
@@ -0,0 +1,52 @@
1
+ // Wave 2 — Separator.
2
+ //
3
+ // The donor's semantic separator (`role="separator"`, horizontal by default,
4
+ // decorative when it carries no label), dressed at the family's hairline.
5
+
6
+ import type { StyleProp, ViewStyle } from "react-native";
7
+
8
+ import { colors } from "./internal/tokens";
9
+ import { primitives } from "./internal/primitives";
10
+ import { useIsDark } from "./internal/motion";
11
+
12
+ export interface SeparatorProps {
13
+ orientation?: "horizontal" | "vertical";
14
+ /** Leading inset for a horizontal rule inside a list, dp. */
15
+ inset?: number;
16
+ isDark?: boolean;
17
+ style?: StyleProp<ViewStyle>;
18
+ testID?: string;
19
+ }
20
+
21
+ export function Separator({
22
+ orientation = "horizontal",
23
+ inset = 0,
24
+ isDark: isDarkProp,
25
+ style,
26
+ testID,
27
+ }: SeparatorProps) {
28
+ const isDark = useIsDark(isDarkProp);
29
+ const theme = isDark ? colors.dark : colors.light;
30
+ const { View } = primitives();
31
+ const horizontal = orientation === "horizontal";
32
+
33
+ return (
34
+ <View
35
+ testID={testID}
36
+ accessibilityRole="none"
37
+ role="separator"
38
+ style={[
39
+ {
40
+ backgroundColor: theme.separator,
41
+ alignSelf: "stretch",
42
+ height: horizontal ? 1 : undefined,
43
+ width: horizontal ? undefined : 1,
44
+ marginLeft: horizontal ? inset : undefined,
45
+ marginVertical: horizontal ? 8 : 0,
46
+ },
47
+ horizontal ? null : { height: "100%" },
48
+ style,
49
+ ]}
50
+ />
51
+ );
52
+ }
package/src/Sheet.tsx ADDED
@@ -0,0 +1,139 @@
1
+ import { forwardRef } from "react";
2
+ import type { ReactNode } from "react";
3
+ import type { StyleProp, ViewStyle } from "react-native";
4
+
5
+ import { loadEngineControl } from "./internal/glass-routing";
6
+ import { glassCapabilities } from "./internal/GlassView";
7
+ import { Glass } from "./Glass";
8
+ import { colors } from "./internal/tokens";
9
+ import { primitives } from "./internal/primitives";
10
+ import { useIsDark } from "./internal/motion";
11
+
12
+ export interface SheetProps {
13
+ /** Up while `true`; slides away when it turns `false`. */
14
+ visible: boolean;
15
+ /**
16
+ * Called when the sheet wants to go — dragged down past 30 % of its height,
17
+ * flung down, or the dim behind it tapped. The app flips `visible`; the sheet
18
+ * never hides itself.
19
+ */
20
+ onDismiss?: () => void;
21
+ /** The sheet's height, dp. Defaults to 420. */
22
+ height?: number;
23
+ /** Top corner radius, continuous. Defaults to 28. */
24
+ cornerRadius?: number;
25
+ /** Shows the grab handle. Defaults to `true`. */
26
+ handle?: boolean;
27
+ /** Opacity of the black dim behind the sheet at full height; `0` for none. Defaults to 0.25. */
28
+ dim?: number;
29
+ /** A tap on the dim dismisses. Defaults to `true`. */
30
+ dismissOnTap?: boolean;
31
+ /** Surface wash. */
32
+ tint?: string;
33
+ variant?: "regular" | "clear";
34
+ /** The sheet frame — positioned absolutely at the bottom of its parent. */
35
+ style?: StyleProp<ViewStyle>;
36
+ /** The content view, under the handle. */
37
+ contentStyle?: StyleProp<ViewStyle>;
38
+ children?: ReactNode;
39
+ isDark?: boolean;
40
+ /** Passed to the sheet so it is testable. */
41
+ testID?: string;
42
+ }
43
+
44
+ /**
45
+ * A bottom sheet — ported from the engine's `LiquidGlassSheet`, the design
46
+ * Binyam approved on real devices this week (28dp top corners, 36x5 grab handle,
47
+ * dismissed past 30 % of its height or on a dim tap).
48
+ *
49
+ * With a glass renderer available the engine's own control mounts, carrying the
50
+ * approved material, handle and dismissal behaviour. Without one — Expo Go, below
51
+ * every tier, or Reduce Transparency — the fallback floor renders the same panel
52
+ * with a solid surface and the same dismissal affordances, so the sheet is never
53
+ * invisible.
54
+ */
55
+ export const Sheet = forwardRef<any, SheetProps>(function Sheet(
56
+ {
57
+ visible,
58
+ onDismiss,
59
+ height = 420,
60
+ cornerRadius = 28,
61
+ handle = true,
62
+ dim = 0.25,
63
+ dismissOnTap = true,
64
+ tint,
65
+ variant = "regular",
66
+ style,
67
+ contentStyle,
68
+ children,
69
+ isDark: isDarkProp,
70
+ testID,
71
+ ...props
72
+ },
73
+ ref,
74
+ ) {
75
+ const isDark = useIsDark(isDarkProp);
76
+ const themeColors = isDark ? colors.dark : colors.light;
77
+ const { View } = primitives();
78
+ const capabilities = glassCapabilities();
79
+ const EngineSheet = loadEngineControl("Sheet");
80
+
81
+ if (!visible) return null;
82
+
83
+ if (EngineSheet && capabilities.supported) {
84
+ const EngineSheetComponent = EngineSheet;
85
+ return (
86
+ <EngineSheetComponent
87
+ visible={visible}
88
+ onDismiss={onDismiss}
89
+ height={height}
90
+ cornerRadius={cornerRadius}
91
+ handle={handle}
92
+ dim={dim}
93
+ dismissOnTap={dismissOnTap}
94
+ tint={tint}
95
+ variant={variant}
96
+ style={style}
97
+ contentStyle={contentStyle}
98
+ testID={testID}
99
+ >
100
+ {children}
101
+ </EngineSheetComponent>
102
+ );
103
+ }
104
+
105
+ // Fallback floor: dim + solid panel at the bottom, same geometry.
106
+ const panelStyle: ViewStyle = {
107
+ position: "absolute",
108
+ bottom: 0,
109
+ left: 0,
110
+ right: 0,
111
+ height,
112
+ borderTopLeftRadius: cornerRadius,
113
+ borderTopRightRadius: cornerRadius,
114
+ overflow: "hidden",
115
+ backgroundColor: tint ?? themeColors.surface,
116
+ ...(style as ViewStyle),
117
+ };
118
+ return (
119
+ <>
120
+ {dim > 0 ? (
121
+ <View
122
+ testID={testID ? `${testID}-dim` : undefined}
123
+ pointerEvents="box-none"
124
+ style={{ position: "absolute", top: 0, left: 0, right: 0, bottom: 0, backgroundColor: themeColors.scrim }}
125
+ onStartShouldSetResponder={() => true}
126
+ onResponderGrant={() => {
127
+ if (dismissOnTap) onDismiss?.();
128
+ }}
129
+ />
130
+ ) : null}
131
+ <View style={panelStyle} testID={testID}>
132
+ {handle ? (
133
+ <View style={{ width: 36, height: 5, borderRadius: 2.5, alignSelf: "center", marginTop: 8 }} />
134
+ ) : null}
135
+ <View style={contentStyle}>{children}</View>
136
+ </View>
137
+ </>
138
+ );
139
+ });