glacia-native 0.5.1 → 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 (403) hide show
  1. package/LICENSE +29 -4
  2. package/README.md +111 -17
  3. package/lib/module/Accordion.js +58 -0
  4. package/lib/module/ActionSheet.js +38 -0
  5. package/lib/module/Alert.js +23 -0
  6. package/lib/module/AlertDialog.js +47 -0
  7. package/lib/module/Avatar.js +48 -0
  8. package/lib/module/Badge.js +36 -0
  9. package/lib/module/Bars.js +13 -267
  10. package/lib/module/Button.js +57 -36
  11. package/lib/module/Card.js +32 -20
  12. package/lib/module/Checkbox.js +42 -0
  13. package/lib/module/Chip.js +80 -0
  14. package/lib/module/Collapsible.js +26 -0
  15. package/lib/module/ContextMenu.js +33 -0
  16. package/lib/module/Dialog.js +39 -124
  17. package/lib/module/DropdownMenu.js +33 -0
  18. package/lib/module/Field.js +22 -0
  19. package/lib/module/Glass.js +12 -5
  20. package/lib/module/Group.js +36 -0
  21. package/lib/module/IconButton.js +40 -0
  22. package/lib/module/Input.js +47 -40
  23. package/lib/module/Label.js +17 -0
  24. package/lib/module/MorphGroup.js +47 -0
  25. package/lib/module/Popover.js +29 -0
  26. package/lib/module/Progress.js +32 -0
  27. package/lib/module/RadioGroup.js +51 -0
  28. package/lib/module/Scrim.js +44 -0
  29. package/lib/module/SegmentedControl.js +74 -58
  30. package/lib/module/Select.js +51 -0
  31. package/lib/module/Separator.js +25 -0
  32. package/lib/module/Sheet.js +51 -0
  33. package/lib/module/Skeleton.js +48 -0
  34. package/lib/module/Slider.js +60 -40
  35. package/lib/module/Stepper.js +167 -0
  36. package/lib/module/Switch.js +45 -43
  37. package/lib/module/TabBar.js +62 -50
  38. package/lib/module/Tabs.js +3 -2
  39. package/lib/module/Textarea.js +18 -0
  40. package/lib/module/Toast.js +55 -0
  41. package/lib/module/Toggle.js +47 -0
  42. package/lib/module/ToggleGroup.js +56 -0
  43. package/lib/module/Toolbar.js +37 -0
  44. package/lib/module/Tooltip.js +31 -0
  45. package/lib/module/glass-provider.js +28 -0
  46. package/lib/module/glass-stack.js +61 -0
  47. package/lib/module/index.js +78 -109
  48. package/lib/module/internal/GlassBackdrop.js +36 -0
  49. package/lib/module/internal/GlassView.js +45 -13
  50. package/lib/module/internal/blur-community.js +20 -0
  51. package/lib/module/internal/blur-community.web.js +9 -0
  52. package/lib/module/internal/blur.js +75 -0
  53. package/lib/module/internal/fallback.js +110 -20
  54. package/lib/module/internal/glass-routing.js +154 -30
  55. package/lib/module/internal/glow.js +36 -0
  56. package/lib/module/internal/initials.js +12 -0
  57. package/lib/module/internal/lens.js +70 -0
  58. package/lib/module/internal/material.js +64 -0
  59. package/lib/module/internal/overlay.js +147 -0
  60. package/lib/module/internal/primitives.js +17 -0
  61. package/lib/module/internal/rim.js +35 -0
  62. package/lib/module/internal/tokens.js +34 -2
  63. package/lib/typescript/Accordion.d.ts +22 -0
  64. package/lib/typescript/ActionSheet.d.ts +24 -0
  65. package/lib/typescript/Alert.d.ts +15 -0
  66. package/lib/typescript/AlertDialog.d.ts +17 -0
  67. package/lib/typescript/Avatar.d.ts +22 -0
  68. package/lib/typescript/Badge.d.ts +12 -0
  69. package/lib/typescript/Bars.d.ts +3 -188
  70. package/lib/typescript/Button.d.ts +44 -10
  71. package/lib/typescript/Card.d.ts +30 -3
  72. package/lib/typescript/Checkbox.d.ts +14 -0
  73. package/lib/typescript/Chip.d.ts +19 -0
  74. package/lib/typescript/Collapsible.d.ts +17 -0
  75. package/lib/typescript/ContextMenu.d.ts +23 -0
  76. package/lib/typescript/Dialog.d.ts +8 -68
  77. package/lib/typescript/DropdownMenu.d.ts +23 -0
  78. package/lib/typescript/Field.d.ts +19 -0
  79. package/lib/typescript/Glass.d.ts +11 -2
  80. package/lib/typescript/Group.d.ts +35 -0
  81. package/lib/typescript/IconButton.d.ts +21 -0
  82. package/lib/typescript/Input.d.ts +17 -18
  83. package/lib/typescript/Label.d.ts +14 -0
  84. package/lib/typescript/MorphGroup.d.ts +46 -0
  85. package/lib/typescript/Popover.d.ts +17 -0
  86. package/lib/typescript/Progress.d.ts +13 -0
  87. package/lib/typescript/RadioGroup.d.ts +21 -0
  88. package/lib/typescript/Scrim.d.ts +33 -0
  89. package/lib/typescript/SegmentedControl.d.ts +24 -13
  90. package/lib/typescript/Select.d.ts +19 -0
  91. package/lib/typescript/Separator.d.ts +10 -0
  92. package/lib/typescript/Sheet.d.ts +45 -0
  93. package/lib/typescript/Skeleton.d.ts +10 -0
  94. package/lib/typescript/Slider.d.ts +15 -7
  95. package/lib/typescript/Stepper.d.ts +49 -0
  96. package/lib/typescript/Switch.d.ts +19 -12
  97. package/lib/typescript/TabBar.d.ts +18 -6
  98. package/lib/typescript/Textarea.d.ts +6 -0
  99. package/lib/typescript/Toast.d.ts +40 -0
  100. package/lib/typescript/Toggle.d.ts +21 -0
  101. package/lib/typescript/ToggleGroup.d.ts +22 -0
  102. package/lib/typescript/Toolbar.d.ts +35 -0
  103. package/lib/typescript/Tooltip.d.ts +16 -0
  104. package/lib/typescript/glass-provider.d.ts +34 -0
  105. package/lib/typescript/glass-stack.d.ts +54 -0
  106. package/lib/typescript/index.d.ts +39 -17
  107. package/lib/typescript/internal/GlassBackdrop.d.ts +33 -0
  108. package/lib/typescript/internal/GlassView.d.ts +31 -2
  109. package/lib/typescript/internal/blur-community.d.ts +2 -0
  110. package/lib/typescript/internal/blur-community.web.d.ts +2 -0
  111. package/lib/typescript/internal/blur.d.ts +24 -0
  112. package/lib/typescript/internal/fallback.d.ts +27 -2
  113. package/lib/typescript/internal/glass-routing.d.ts +83 -15
  114. package/lib/typescript/internal/glow.d.ts +11 -0
  115. package/lib/typescript/internal/initials.d.ts +2 -0
  116. package/lib/typescript/internal/lens.d.ts +47 -0
  117. package/lib/typescript/internal/material.d.ts +27 -0
  118. package/lib/typescript/internal/overlay.d.ts +74 -0
  119. package/lib/typescript/internal/primitives.d.ts +13 -0
  120. package/lib/typescript/internal/rim.d.ts +16 -0
  121. package/lib/typescript/internal/tokens.d.ts +36 -0
  122. package/package.json +15 -4
  123. package/src/Accordion.tsx +165 -0
  124. package/src/ActionSheet.tsx +149 -0
  125. package/src/Alert.tsx +85 -0
  126. package/src/AlertDialog.tsx +124 -0
  127. package/src/Avatar.tsx +102 -0
  128. package/src/Badge.tsx +80 -0
  129. package/src/Bars.tsx +10 -797
  130. package/src/Button.tsx +196 -60
  131. package/src/Card.tsx +106 -33
  132. package/src/Checkbox.tsx +98 -0
  133. package/src/Chip.tsx +149 -0
  134. package/src/Collapsible.tsx +66 -0
  135. package/src/ContextMenu.tsx +103 -0
  136. package/src/Dialog.tsx +86 -325
  137. package/src/DropdownMenu.tsx +103 -0
  138. package/src/Field.tsx +65 -0
  139. package/src/Glass.tsx +19 -5
  140. package/src/Group.tsx +98 -0
  141. package/src/IconButton.tsx +110 -0
  142. package/src/Input.tsx +143 -87
  143. package/src/Label.tsx +56 -0
  144. package/src/MorphGroup.tsx +134 -0
  145. package/src/Popover.tsx +81 -0
  146. package/src/Progress.tsx +83 -0
  147. package/src/RadioGroup.tsx +122 -0
  148. package/src/Scrim.tsx +94 -0
  149. package/src/SegmentedControl.tsx +147 -90
  150. package/src/Select.tsx +136 -0
  151. package/src/Separator.tsx +52 -0
  152. package/src/Sheet.tsx +139 -0
  153. package/src/Skeleton.tsx +77 -0
  154. package/src/Slider.tsx +100 -54
  155. package/src/Stepper.tsx +315 -0
  156. package/src/Switch.tsx +80 -58
  157. package/src/TabBar.tsx +118 -84
  158. package/src/Tabs.tsx +5 -0
  159. package/src/Textarea.tsx +34 -0
  160. package/src/Toast.tsx +131 -0
  161. package/src/Toggle.tsx +113 -0
  162. package/src/ToggleGroup.tsx +129 -0
  163. package/src/Toolbar.tsx +111 -0
  164. package/src/Tooltip.tsx +79 -0
  165. package/src/engine/CHANGELOG.md +430 -0
  166. package/src/engine/NOTICE +54 -0
  167. package/src/engine/README.md +975 -0
  168. package/src/engine/android/build.gradle +18 -0
  169. package/src/engine/android/src/main/AndroidManifest.xml +2 -0
  170. package/src/engine/android/src/main/java/expo/modules/liquidglass/ExpoLiquidGlassModule.kt +174 -0
  171. package/src/engine/android/src/main/java/expo/modules/liquidglass/GlassConstants.kt +7 -0
  172. package/src/engine/android/src/main/java/expo/modules/liquidglass/LiquidGlassContainerView.kt +16 -0
  173. package/src/engine/android/src/main/java/expo/modules/liquidglass/LiquidGlassProviderView.kt +165 -0
  174. package/src/engine/android/src/main/java/expo/modules/liquidglass/LiquidGlassView.kt +1731 -0
  175. package/src/engine/android/src/main/java/expo/modules/liquidglass/enums/GlassEnums.kt +171 -0
  176. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/BackdropGraph.kt +146 -0
  177. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/BackdropSource.kt +53 -0
  178. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/ContinuousCorners.kt +188 -0
  179. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/CornerRadii.kt +62 -0
  180. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassAppearance.kt +352 -0
  181. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassDebug.kt +109 -0
  182. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassEnvironment.kt +139 -0
  183. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassHdr.kt +85 -0
  184. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassLuminanceProbe.kt +189 -0
  185. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassPressAnimator.kt +264 -0
  186. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassProgressiveBlur.kt +249 -0
  187. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassShaderCache.kt +256 -0
  188. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassShaderSource.kt +845 -0
  189. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassTier.kt +63 -0
  190. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/ProviderRegistry.kt +71 -0
  191. package/src/engine/android/src/main/java/expo/modules/liquidglass/records/GlassRecords.kt +288 -0
  192. package/src/engine/index.ts +24 -0
  193. package/src/engine/ios/Enums/GlassBlurDirection.swift +21 -0
  194. package/src/engine/ios/Enums/GlassVariant.swift +86 -0
  195. package/src/engine/ios/ExpoLiquidGlass.podspec +93 -0
  196. package/src/engine/ios/ExpoLiquidGlassModule.swift +77 -0
  197. package/src/engine/ios/Glass/BackdropCapturer.swift +811 -0
  198. package/src/engine/ios/Glass/ContinuousCorners.swift +165 -0
  199. package/src/engine/ios/Glass/GlassBackdrop.swift +176 -0
  200. package/src/engine/ios/Glass/GlassFramePhase.swift +126 -0
  201. package/src/engine/ios/Glass/GlassFrameScheduler.swift +261 -0
  202. package/src/engine/ios/Glass/GlassPressAnimator.swift +250 -0
  203. package/src/engine/ios/Glass/GlassRenderContext.swift +168 -0
  204. package/src/engine/ios/Glass/GlassRenderer.swift +186 -0
  205. package/src/engine/ios/Glass/GlassSurfaceView.swift +452 -0
  206. package/src/engine/ios/Glass/NonRenderableView.swift +54 -0
  207. package/src/engine/ios/Glass/StripCache.swift +545 -0
  208. package/src/engine/ios/Records/GlassCornerRadii.swift +79 -0
  209. package/src/engine/ios/Records/GlassMetalOptions.swift +180 -0
  210. package/src/engine/ios/Records/GlassRefractionCurve.swift +14 -0
  211. package/src/engine/ios/Shaders/LiquidGlass.metal +480 -0
  212. package/src/engine/ios/Shaders/bundle-marker.txt +6 -0
  213. package/src/engine/ios/Views/LiquidGlassContainerView.swift +99 -0
  214. package/src/engine/ios/Views/LiquidGlassView.swift +859 -0
  215. package/src/engine/package.json +70 -0
  216. package/src/engine/src/components/LiquidGlassButton/LiquidGlassButton.tsx +424 -0
  217. package/src/engine/src/components/LiquidGlassCard/LiquidGlassCard.tsx +98 -0
  218. package/src/engine/src/components/LiquidGlassChip/LiquidGlassChip.tsx +65 -0
  219. package/src/engine/src/components/LiquidGlassGroup/LiquidGlassGroup.tsx +350 -0
  220. package/src/engine/src/components/LiquidGlassIconButton/LiquidGlassIconButton.tsx +24 -0
  221. package/src/engine/src/components/LiquidGlassMorphGroup/LiquidGlassMorphGroup.tsx +434 -0
  222. package/src/engine/src/components/LiquidGlassScrim/LiquidGlassScrim.tsx +100 -0
  223. package/src/engine/src/components/LiquidGlassSegmentedControl/LiquidGlassSegmentedControl.tsx +213 -0
  224. package/src/engine/src/components/LiquidGlassSheet/LiquidGlassSheet.tsx +218 -0
  225. package/src/engine/src/components/LiquidGlassSlider/LiquidGlassSlider.tsx +327 -0
  226. package/src/engine/src/components/LiquidGlassStepper/LiquidGlassStepper.tsx +321 -0
  227. package/src/engine/src/components/LiquidGlassSwitch/LiquidGlassSwitch.tsx +296 -0
  228. package/src/engine/src/components/LiquidGlassTabBar/LiquidGlassTabBar.tsx +952 -0
  229. package/src/engine/src/components/LiquidGlassTextInput/LiquidGlassTextInput.tsx +151 -0
  230. package/src/engine/src/components/LiquidGlassToast/LiquidGlassToast.tsx +169 -0
  231. package/src/engine/src/components/LiquidGlassToolbar/LiquidGlassToolbar.tsx +124 -0
  232. package/src/engine/src/components/index.ts +16 -0
  233. package/src/engine/src/constants/index.ts +4 -0
  234. package/src/engine/src/constants/metal.constants.ts +327 -0
  235. package/src/engine/src/constants/metrics.constants.ts +325 -0
  236. package/src/engine/src/constants/springs.constants.ts +107 -0
  237. package/src/engine/src/constants/styles.constants.ts +12 -0
  238. package/src/engine/src/context/glass-group.context.ts +65 -0
  239. package/src/engine/src/context/index.ts +6 -0
  240. package/src/engine/src/core/components/LiquidGlassContainer/LiquidGlassContainer.tsx +32 -0
  241. package/src/engine/src/core/components/LiquidGlassContainer/index.ts +1 -0
  242. package/src/engine/src/core/components/LiquidGlassProvider/LiquidGlassProvider.tsx +66 -0
  243. package/src/engine/src/core/components/LiquidGlassProvider/index.ts +1 -0
  244. package/src/engine/src/core/components/LiquidGlassStack/LiquidGlassStack.tsx +184 -0
  245. package/src/engine/src/core/components/LiquidGlassStack/index.ts +1 -0
  246. package/src/engine/src/core/components/LiquidGlassView/LiquidGlassView.tsx +126 -0
  247. package/src/engine/src/core/components/LiquidGlassView/index.ts +1 -0
  248. package/src/engine/src/core/components/index.ts +4 -0
  249. package/src/engine/src/core/constants/glass.constants.ts +57 -0
  250. package/src/engine/src/core/constants/index.ts +20 -0
  251. package/src/engine/src/core/constants/native.constants.ts +16 -0
  252. package/src/engine/src/core/context/glass-stack.context.ts +30 -0
  253. package/src/engine/src/core/context/index.ts +4 -0
  254. package/src/engine/src/core/enum/index.ts +12 -0
  255. package/src/engine/src/core/index.ts +1 -0
  256. package/src/engine/src/core/interfaces/glass-hdr.interface.ts +15 -0
  257. package/src/engine/src/core/interfaces/glass-metal.interface.ts +248 -0
  258. package/src/engine/src/core/interfaces/glass-surface.interface.ts +9 -0
  259. package/src/engine/src/core/interfaces/index.ts +31 -0
  260. package/src/engine/src/core/interfaces/liquid-glass-container.interface.ts +6 -0
  261. package/src/engine/src/core/interfaces/liquid-glass-provider.interface.ts +14 -0
  262. package/src/engine/src/core/interfaces/liquid-glass-stack.interface.ts +21 -0
  263. package/src/engine/src/core/interfaces/liquid-glass-view.interface.ts +129 -0
  264. package/src/engine/src/core/interfaces/native-liquid-glass-view.interface.ts +19 -0
  265. package/src/engine/src/core/modules/ExpoLiquidGlassModule.ts +26 -0
  266. package/src/engine/src/core/modules/index.ts +2 -0
  267. package/src/engine/src/core/root/index.ts +51 -0
  268. package/src/engine/src/core/types/glass.types.ts +25 -0
  269. package/src/engine/src/core/types/index.ts +8 -0
  270. package/src/engine/src/core/utils/debug.utils.ts +17 -0
  271. package/src/engine/src/core/utils/dev-warn.utils.ts +17 -0
  272. package/src/engine/src/core/utils/hdr.utils.ts +37 -0
  273. package/src/engine/src/core/utils/index.ts +5 -0
  274. package/src/engine/src/core/utils/native-view.utils.ts +33 -0
  275. package/src/engine/src/core/utils/platform.utils.ts +34 -0
  276. package/src/engine/src/core/views/NativeGlassBackdropView.ts +24 -0
  277. package/src/engine/src/core/views/NativeLiquidGlassContainerView.ts +13 -0
  278. package/src/engine/src/core/views/NativeLiquidGlassContainerView.web.ts +10 -0
  279. package/src/engine/src/core/views/NativeLiquidGlassProviderView.ts +13 -0
  280. package/src/engine/src/core/views/NativeLiquidGlassProviderView.web.ts +10 -0
  281. package/src/engine/src/core/views/NativeLiquidGlassView.ts +19 -0
  282. package/src/engine/src/core/views/NativeLiquidGlassView.web.ts +14 -0
  283. package/src/engine/src/core/views/index.ts +4 -0
  284. package/src/engine/src/hooks/index.ts +18 -0
  285. package/src/engine/src/hooks/use-adaptive-glass.ts +91 -0
  286. package/src/engine/src/hooks/use-damped-drag.ts +332 -0
  287. package/src/engine/src/hooks/use-echo-filter.ts +55 -0
  288. package/src/engine/src/hooks/use-glass-group-member.ts +169 -0
  289. package/src/engine/src/hooks/use-gravity-highlight.ts +79 -0
  290. package/src/engine/src/hooks/use-press-progress.ts +44 -0
  291. package/src/engine/src/index.ts +120 -0
  292. package/src/engine/src/interfaces/index.ts +28 -0
  293. package/src/engine/src/interfaces/liquid-glass-button.interface.ts +94 -0
  294. package/src/engine/src/interfaces/liquid-glass-card.interface.ts +40 -0
  295. package/src/engine/src/interfaces/liquid-glass-chip.interface.ts +29 -0
  296. package/src/engine/src/interfaces/liquid-glass-group.interface.ts +32 -0
  297. package/src/engine/src/interfaces/liquid-glass-icon-button.interface.ts +19 -0
  298. package/src/engine/src/interfaces/liquid-glass-morph-group.interface.ts +59 -0
  299. package/src/engine/src/interfaces/liquid-glass-scrim.interface.ts +36 -0
  300. package/src/engine/src/interfaces/liquid-glass-segmented-control.interface.ts +32 -0
  301. package/src/engine/src/interfaces/liquid-glass-sheet.interface.ts +38 -0
  302. package/src/engine/src/interfaces/liquid-glass-slider.interface.ts +37 -0
  303. package/src/engine/src/interfaces/liquid-glass-stepper.interface.ts +35 -0
  304. package/src/engine/src/interfaces/liquid-glass-switch.interface.ts +27 -0
  305. package/src/engine/src/interfaces/liquid-glass-tab-bar.interface.ts +116 -0
  306. package/src/engine/src/interfaces/liquid-glass-text-input.interface.ts +42 -0
  307. package/src/engine/src/interfaces/liquid-glass-toast.interface.ts +36 -0
  308. package/src/engine/src/interfaces/liquid-glass-toolbar.interface.ts +33 -0
  309. package/src/engine/src/theme/glass-ui-theme.ts +100 -0
  310. package/src/engine/src/theme/index.ts +2 -0
  311. package/src/engine/src/utils/button-press.utils.ts +63 -0
  312. package/src/engine/src/utils/index.ts +3 -0
  313. package/src/engine/src/utils/metal.utils.ts +164 -0
  314. package/src/glass-provider.tsx +60 -0
  315. package/src/glass-stack.tsx +115 -0
  316. package/src/index.ts +48 -190
  317. package/src/internal/GlassBackdrop.tsx +60 -0
  318. package/src/internal/GlassView.tsx +70 -18
  319. package/src/internal/blur-community.ts +19 -0
  320. package/src/internal/blur-community.web.ts +7 -0
  321. package/src/internal/blur.ts +89 -0
  322. package/src/internal/fallback.tsx +158 -20
  323. package/src/internal/glass-routing.ts +211 -34
  324. package/src/internal/glow.tsx +62 -0
  325. package/src/internal/initials.ts +7 -0
  326. package/src/internal/lens.tsx +105 -0
  327. package/src/internal/material.ts +92 -0
  328. package/src/internal/overlay.tsx +258 -0
  329. package/src/internal/primitives.ts +26 -0
  330. package/src/internal/rim.tsx +79 -0
  331. package/src/internal/tokens.ts +34 -1
  332. package/lib/module/Carousel.js +0 -103
  333. package/lib/module/Display.js +0 -317
  334. package/lib/module/Feedback.js +0 -386
  335. package/lib/module/Form.js +0 -164
  336. package/lib/module/Forms2.js +0 -454
  337. package/lib/module/Message.js +0 -88
  338. package/lib/module/Overlays.js +0 -328
  339. package/lib/module/Pickers.js +0 -243
  340. package/lib/module/Table.js +0 -99
  341. package/lib/module/ai.js +0 -280
  342. package/lib/module/charts/AreaChart.js +0 -32
  343. package/lib/module/charts/BarChart.js +0 -67
  344. package/lib/module/charts/FunnelChart.js +0 -50
  345. package/lib/module/charts/HeatmapChart.js +0 -71
  346. package/lib/module/charts/LineChart.js +0 -81
  347. package/lib/module/charts/PlotChart.js +0 -52
  348. package/lib/module/charts/RadarChart.js +0 -78
  349. package/lib/module/charts/RingChart.js +0 -52
  350. package/lib/module/charts/ScatterChart.js +0 -95
  351. package/lib/module/charts/WaterfallChart.js +0 -85
  352. package/lib/module/charts/advanced.js +0 -313
  353. package/lib/module/charts/extra.js +0 -108
  354. package/lib/module/charts/index.js +0 -50
  355. package/lib/module/charts/scales.js +0 -140
  356. package/lib/typescript/Carousel.d.ts +0 -47
  357. package/lib/typescript/Display.d.ts +0 -178
  358. package/lib/typescript/Feedback.d.ts +0 -196
  359. package/lib/typescript/Form.d.ts +0 -97
  360. package/lib/typescript/Forms2.d.ts +0 -209
  361. package/lib/typescript/Message.d.ts +0 -71
  362. package/lib/typescript/Overlays.d.ts +0 -146
  363. package/lib/typescript/Pickers.d.ts +0 -105
  364. package/lib/typescript/Table.d.ts +0 -64
  365. package/lib/typescript/ai.d.ts +0 -166
  366. package/lib/typescript/charts/AreaChart.d.ts +0 -44
  367. package/lib/typescript/charts/BarChart.d.ts +0 -19
  368. package/lib/typescript/charts/FunnelChart.d.ts +0 -25
  369. package/lib/typescript/charts/HeatmapChart.d.ts +0 -23
  370. package/lib/typescript/charts/LineChart.d.ts +0 -30
  371. package/lib/typescript/charts/PlotChart.d.ts +0 -31
  372. package/lib/typescript/charts/RadarChart.d.ts +0 -27
  373. package/lib/typescript/charts/RingChart.d.ts +0 -28
  374. package/lib/typescript/charts/ScatterChart.d.ts +0 -34
  375. package/lib/typescript/charts/WaterfallChart.d.ts +0 -22
  376. package/lib/typescript/charts/advanced.d.ts +0 -107
  377. package/lib/typescript/charts/extra.d.ts +0 -63
  378. package/lib/typescript/charts/index.d.ts +0 -13
  379. package/lib/typescript/charts/scales.d.ts +0 -35
  380. package/src/Carousel.tsx +0 -233
  381. package/src/Display.tsx +0 -778
  382. package/src/Feedback.tsx +0 -969
  383. package/src/Form.tsx +0 -425
  384. package/src/Forms2.tsx +0 -1014
  385. package/src/Message.tsx +0 -219
  386. package/src/Overlays.tsx +0 -685
  387. package/src/Pickers.tsx +0 -590
  388. package/src/Table.tsx +0 -231
  389. package/src/ai.tsx +0 -707
  390. package/src/charts/AreaChart.tsx +0 -73
  391. package/src/charts/BarChart.tsx +0 -183
  392. package/src/charts/FunnelChart.tsx +0 -125
  393. package/src/charts/HeatmapChart.tsx +0 -155
  394. package/src/charts/LineChart.tsx +0 -247
  395. package/src/charts/PlotChart.tsx +0 -168
  396. package/src/charts/RadarChart.tsx +0 -208
  397. package/src/charts/RingChart.tsx +0 -133
  398. package/src/charts/ScatterChart.tsx +0 -223
  399. package/src/charts/WaterfallChart.tsx +0 -201
  400. package/src/charts/advanced.tsx +0 -676
  401. package/src/charts/extra.tsx +0 -242
  402. package/src/charts/index.ts +0 -86
  403. package/src/charts/scales.ts +0 -163
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Popover = Popover;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ // Wave 2 — Popover.
6
+ //
7
+ // The donor's popover: an anchored panel with its own open state, dismissed by
8
+ // an outside press or Android's back gesture, never stealing a rendering pass
9
+ // from the screen behind it. Dressed on the family's overlay surface.
10
+ const react_1 = require("react");
11
+ const primitives_1 = require("./internal/primitives");
12
+ const motion_1 = require("./internal/motion");
13
+ const overlay_1 = require("./internal/overlay");
14
+ function Popover({ trigger, children, open: openProp, defaultOpen = false, onOpenChange, width = 260, accessibilityLabel = "Popover", isDark: isDarkProp, style, testID, }) {
15
+ const isDark = (0, motion_1.useIsDark)(isDarkProp);
16
+ const { View, Pressable } = (0, primitives_1.primitives)();
17
+ const [internalOpen, setInternalOpen] = (0, react_1.useState)(defaultOpen);
18
+ const { ref, anchor, capture } = (0, overlay_1.useTriggerAnchor)();
19
+ const open = openProp !== undefined ? openProp : internalOpen;
20
+ const setOpen = (next) => {
21
+ if (openProp === undefined)
22
+ setInternalOpen(next);
23
+ onOpenChange?.(next);
24
+ };
25
+ return ((0, jsx_runtime_1.jsxs)(View, { style: { alignSelf: "flex-start" }, children: [(0, jsx_runtime_1.jsx)(Pressable, { ref: ref, accessibilityRole: "button", accessibilityLabel: accessibilityLabel, accessibilityState: { expanded: open }, onPress: () => {
26
+ void capture();
27
+ setOpen(!open);
28
+ }, children: trigger }), (0, jsx_runtime_1.jsx)(overlay_1.OverlayPanel, { open: open, onClose: () => setOpen(false), anchor: anchor, width: width, isDark: isDark, testID: testID, accessibilityLabel: accessibilityLabel, role: "dialog", panelStyle: style, children: (0, jsx_runtime_1.jsx)(View, { style: { padding: 14 }, children: children }) })] }));
29
+ }
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Progress = Progress;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const Glass_1 = require("./Glass");
6
+ const tokens_1 = require("./internal/tokens");
7
+ const primitives_1 = require("./internal/primitives");
8
+ const motion_1 = require("./internal/motion");
9
+ function Progress({ value, variant = "linear", tint, accessibilityLabel = "Progress", style, isDark: isDarkProp, testID, }) {
10
+ const isDark = (0, motion_1.useIsDark)(isDarkProp);
11
+ const theme = isDark ? tokens_1.colors.dark : tokens_1.colors.light;
12
+ const { View, Text: RNText } = (0, primitives_1.primitives)();
13
+ const indeterminate = variant === "indeterminate";
14
+ const labelled = variant === "track" || variant === "ring";
15
+ const percent = Math.min(100, Math.max(0, Number.isFinite(value) ? value : 0));
16
+ return ((0, jsx_runtime_1.jsxs)(View, { testID: testID, accessible: true, accessibilityRole: "progressbar", accessibilityLabel: accessibilityLabel, accessibilityValue: indeterminate ? undefined : { min: 0, max: 100, now: Math.round(percent) }, children: [(0, jsx_runtime_1.jsx)(Glass_1.Glass, { effect: "regular", surface: "control", isDark: isDark, style: flattenStyle([
17
+ { height: 8, borderRadius: tokens_1.radii.pill, overflow: "hidden", justifyContent: "center" },
18
+ style,
19
+ ]), children: (0, jsx_runtime_1.jsx)(View, { style: {
20
+ height: "100%",
21
+ width: indeterminate ? "40%" : `${percent}%`,
22
+ borderRadius: tokens_1.radii.pill,
23
+ backgroundColor: tint ?? theme.fill,
24
+ } }) }), labelled ? ((0, jsx_runtime_1.jsxs)(RNText, { style: { ...tokens_1.typeScale.caption, color: theme.muted, marginTop: 4 }, children: [Math.round(percent), "%"] })) : null] }));
25
+ }
26
+ /** Flattens a style prop into one object, so a plain view surface can take it. */
27
+ function flattenStyle(style) {
28
+ if (style == null)
29
+ return undefined;
30
+ const list = Array.isArray(style) ? style : [style];
31
+ return Object.assign({}, ...list.filter(Boolean));
32
+ }
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RadioGroup = RadioGroup;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ // Wave 2 — RadioGroup.
6
+ //
7
+ // The donor's radio semantics: the group is a `radiogroup`, every option is a
8
+ // `radio` with `selected`, disabled options are skipped, and the value can be
9
+ // controlled or internal. Dressed in the Wave 1 family's rows and type steps.
10
+ const react_1 = require("react");
11
+ const tokens_1 = require("./internal/tokens");
12
+ const primitives_1 = require("./internal/primitives");
13
+ const motion_1 = require("./internal/motion");
14
+ const haptics_1 = require("./internal/haptics");
15
+ function RadioGroup({ value: valueProp, defaultValue, onValueChange, options, horizontal = false, disabled = false, accessibilityLabel = "Options", isDark: isDarkProp, style, testID, }) {
16
+ const isDark = (0, motion_1.useIsDark)(isDarkProp);
17
+ const theme = isDark ? tokens_1.colors.dark : tokens_1.colors.light;
18
+ const { View, Pressable, Text: RNText } = (0, primitives_1.primitives)();
19
+ const [internal, setInternal] = (0, react_1.useState)(defaultValue);
20
+ const value = valueProp !== undefined ? valueProp : internal;
21
+ const choose = (next) => {
22
+ if (valueProp === undefined)
23
+ setInternal(next);
24
+ (0, haptics_1.hapticSelection)();
25
+ onValueChange?.(next);
26
+ };
27
+ return ((0, jsx_runtime_1.jsx)(View, { testID: testID, accessibilityRole: "radiogroup", accessibilityLabel: accessibilityLabel, style: [{ gap: 6, flexDirection: horizontal ? "row" : "column", flexWrap: "wrap" }, style], children: options.map((option) => {
28
+ const selected = value === option.value;
29
+ const off = disabled || option.disabled;
30
+ return ((0, jsx_runtime_1.jsxs)(Pressable, { accessibilityRole: "radio", accessibilityLabel: option.label, accessibilityState: { checked: selected, disabled: off }, disabled: off, onPress: () => choose(option.value), style: {
31
+ flexDirection: "row",
32
+ alignItems: "center",
33
+ gap: 10,
34
+ paddingVertical: 8,
35
+ opacity: off ? 0.38 : 1,
36
+ }, children: [(0, jsx_runtime_1.jsx)(View, { style: {
37
+ width: 22,
38
+ height: 22,
39
+ borderRadius: tokens_1.radii.pill,
40
+ borderWidth: 1.5,
41
+ borderColor: selected ? theme.fill : theme.separator,
42
+ alignItems: "center",
43
+ justifyContent: "center",
44
+ }, children: selected ? ((0, jsx_runtime_1.jsx)(View, { style: {
45
+ width: 12,
46
+ height: 12,
47
+ borderRadius: tokens_1.radii.pill,
48
+ backgroundColor: theme.fill,
49
+ } })) : null }), (0, jsx_runtime_1.jsxs)(View, { style: { flex: 1 }, children: [(0, jsx_runtime_1.jsx)(RNText, { style: { ...tokens_1.typeScale.body, color: theme.foreground }, children: option.label }), option.description ? ((0, jsx_runtime_1.jsx)(RNText, { style: { ...tokens_1.typeScale.caption, color: theme.muted }, children: option.description })) : null] })] }, option.value));
50
+ }) }));
51
+ }
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Scrim = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const glass_routing_1 = require("./internal/glass-routing");
7
+ const GlassView_1 = require("./internal/GlassView");
8
+ const tokens_1 = require("./internal/tokens");
9
+ const primitives_1 = require("./internal/primitives");
10
+ const motion_1 = require("./internal/motion");
11
+ /**
12
+ * A scroll-edge scrim — ported from the engine's `LiquidGlassScrim`, the design
13
+ * Binyam approved on real devices this week (edge-hugging blur ramp).
14
+ *
15
+ * With a glass renderer available the engine's own control mounts, carrying the
16
+ * approved ramp. Without one — Expo Go, below every tier, or Reduce Transparency —
17
+ * the fallback floor renders the same scrim with a solid wash, so content is
18
+ * never lost behind an invisible scrim.
19
+ */
20
+ exports.Scrim = (0, react_1.forwardRef)(function Scrim({ edge = "bottom", size = 160, radius = 24, reach = 0.7, tint, providerId, style, children, ...props }, ref) {
21
+ const isDark = (0, motion_1.useIsDark)();
22
+ const themeColors = isDark ? tokens_1.colors.dark : tokens_1.colors.light;
23
+ const { View } = (0, primitives_1.primitives)();
24
+ const capabilities = (0, GlassView_1.glassCapabilities)();
25
+ const EngineScrim = (0, glass_routing_1.loadEngineControl)("Scrim");
26
+ if (EngineScrim && capabilities.supported) {
27
+ const EngineScrimComponent = EngineScrim;
28
+ return ((0, jsx_runtime_1.jsx)(EngineScrimComponent, { edge: edge, size: size, radius: radius, reach: reach, tint: tint, providerId: providerId, style: style, children: children }));
29
+ }
30
+ // Fallback floor: solid scrim at the content edge, full geometry.
31
+ const scrimStyle = {
32
+ position: "absolute",
33
+ ...(edge === "top"
34
+ ? { top: 0, left: 0, right: 0, height: size }
35
+ : edge === "bottom"
36
+ ? { bottom: 0, left: 0, right: 0, height: size }
37
+ : edge === "left"
38
+ ? { left: 0, top: 0, bottom: 0, width: size }
39
+ : { right: 0, top: 0, bottom: 0, width: size }),
40
+ backgroundColor: tint ?? themeColors.scrim,
41
+ ...style,
42
+ };
43
+ return (0, jsx_runtime_1.jsx)(View, { ref: ref, style: scrimStyle, ...props, children: children });
44
+ });
@@ -3,92 +3,108 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SegmentedControl = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
+ const glass_routing_1 = require("./internal/glass-routing");
7
+ const GlassView_1 = require("./internal/GlassView");
6
8
  const Glass_1 = require("./Glass");
7
9
  const tokens_1 = require("./internal/tokens");
8
10
  const primitives_1 = require("./internal/primitives");
9
11
  const motion_1 = require("./internal/motion");
10
12
  const haptics_1 = require("./internal/haptics");
11
- const SEGMENT_HEIGHT = 30;
13
+ const lens_1 = require("./internal/lens");
12
14
  /**
13
- * A row of mutually exclusive segments on one glass container.
15
+ * A segmented control — ported from the engine's `LiquidGlassSegmentedControl`,
16
+ * the design Binyam approved on real devices this week (40dp track, 3dp-inset
17
+ * thumb).
14
18
  *
15
- * The selected segment is marked by a pill that slides on the springs token.
16
- * The pill's colours come from the theme tokens, so it reads correctly in both
17
- * light and dark instead of assuming a white-on-light palette.
19
+ * With a glass renderer available the engine's own control mounts, carrying the
20
+ * approved geometry and thumb behaviour. Without one — Expo Go, below every
21
+ * tier, or Reduce Transparency — the fallback floor renders the same row of
22
+ * segments with solid selected states, so the control is never invisible.
18
23
  */
19
- exports.SegmentedControl = (0, react_1.forwardRef)(function SegmentedControl({ values, selectedIndex: selectedProp, defaultIndex = 0, onValueChange, haptics = true, style, isDark: isDarkProp, testID, ...props }, ref) {
24
+ exports.SegmentedControl = (0, react_1.forwardRef)(function SegmentedControl({ segments, selectedIndex, onChange, height = 40, tint, thumbTint, thumbMetal, accessibilityLabel, isDark: isDarkProp, testID, style, textStyle, ...props }, ref) {
20
25
  const isDark = (0, motion_1.useIsDark)(isDarkProp);
21
26
  const themeColors = isDark ? tokens_1.colors.dark : tokens_1.colors.light;
22
- const { View, Text, Pressable, Animated } = (0, primitives_1.primitives)();
23
- const [internalIndex, setInternalIndex] = (0, react_1.useState)(defaultIndex);
24
- const activeIndex = selectedProp !== undefined ? selectedProp : internalIndex;
25
- const safeIndex = Math.min(Math.max(activeIndex, 0), Math.max(values.length - 1, 0));
27
+ const { View, Pressable, Text: RNText, Animated } = (0, primitives_1.primitives)();
28
+ const capabilities = (0, GlassView_1.glassCapabilities)();
29
+ const EngineSegmentedControl = (0, glass_routing_1.loadEngineControl)("SegmentedControl");
30
+ const selected = Math.min(Math.max(selectedIndex, 0), Math.max(segments.length - 1, 0));
26
31
  // The pill slides between equal-width segments, so a ratio is enough: 0 is
27
32
  // the first segment, values.length - 1 the last.
28
- const { value: slide, animated } = (0, motion_1.useSpring)(safeIndex, "snappy");
29
- const handleSelect = (index) => {
30
- // Only a change ticks: re-pressing the current segment is not a selection.
31
- if (haptics && index !== safeIndex)
32
- (0, haptics_1.hapticSelection)();
33
- if (selectedProp === undefined)
34
- setInternalIndex(index);
35
- const val = values[index];
36
- if (val !== undefined)
37
- onValueChange?.(val, index);
38
- };
39
- const count = Math.max(values.length, 1);
33
+ const count = Math.max(segments.length, 1);
40
34
  const pillWidth = `${100 / count}%`;
41
- const containerStyle = {
42
- position: "relative",
43
- flexDirection: "row",
44
- alignItems: "center",
45
- alignSelf: "flex-start",
46
- padding: 2,
47
- borderRadius: tokens_1.radii.md,
48
- backgroundColor: "rgba(118, 118, 128, 0.12)",
49
- ...style,
50
- };
35
+ const { value: slide, animated } = (0, motion_1.useSpring)(selected, "snappy");
51
36
  const pillTranslate = animated
52
37
  ? slide.interpolate({
53
38
  inputRange: [0, Math.max(count - 1, 1)],
54
- // One segment's worth per step, measured against the pill's own width.
55
39
  outputRange: ["0%", `${((count - 1) * 100) / count}%`],
56
40
  })
57
- : `${(safeIndex * 100) / count}%`;
58
- return ((0, jsx_runtime_1.jsxs)(Glass_1.Glass, { ref: ref, effect: "regular", isDark: isDark, style: containerStyle, testID: testID, ...props, children: [animated ? ((0, jsx_runtime_1.jsx)(Animated.View, { style: {
41
+ : `${(selected * 100) / count}%`;
42
+ if (EngineSegmentedControl && capabilities.supported) {
43
+ const EngineSegmentedControlComponent = EngineSegmentedControl;
44
+ return ((0, jsx_runtime_1.jsx)(EngineSegmentedControlComponent, { segments: segments, selectedIndex: selected, onChange: (index) => {
45
+ (0, haptics_1.hapticSelection)();
46
+ onChange(index);
47
+ }, height: height, tint: tint, thumbTint: thumbTint, thumbMetal: thumbMetal, style: style, textStyle: textStyle }));
48
+ }
49
+ // Fallback floor: the sliding lens pill on a solid track, full selection
50
+ // behaviour, so the selected segment reads exactly as it does in glass.
51
+ const fallback = ((0, jsx_runtime_1.jsxs)(Glass_1.Glass, { effect: "regular", surface: "rail", pressed: false, isDark: isDark, style: {
52
+ position: "relative",
53
+ flexDirection: "row",
54
+ alignItems: "center",
55
+ alignSelf: "flex-start",
56
+ padding: 3,
57
+ borderRadius: tokens_1.radii.pill,
58
+ backgroundColor: themeColors.fieldWash,
59
+ ...style,
60
+ }, testID: testID, ...props, children: [animated ? ((0, jsx_runtime_1.jsx)(Animated.View, { style: {
59
61
  position: "absolute",
60
- top: 2,
61
- left: 2,
62
+ top: 3,
63
+ left: 3,
62
64
  width: pillWidth,
63
- height: SEGMENT_HEIGHT,
64
- borderRadius: tokens_1.radii.sm,
65
+ height: height - 6,
66
+ borderRadius: (height - 6) / 2,
65
67
  backgroundColor: themeColors.glassActive,
66
68
  borderWidth: 0.5,
67
69
  borderColor: themeColors.edge,
70
+ // The thumb is a lens: lifted off the rail, with its own rim.
71
+ ...(0, lens_1.lensShadow)(isDark),
68
72
  transform: [{ translateX: pillTranslate }],
69
- }, pointerEvents: "none" })) : ((0, jsx_runtime_1.jsx)(View, { style: {
73
+ }, pointerEvents: "none", children: (0, jsx_runtime_1.jsx)(lens_1.LensRim, { radius: (height - 6) / 2, isDark: isDark }) })) : ((0, jsx_runtime_1.jsx)(View, { style: {
70
74
  position: "absolute",
71
- top: 2,
72
- left: `${2 + (safeIndex * 100) / count}%`,
75
+ top: 3,
76
+ left: `${3 + (selected * 100) / count}%`,
73
77
  width: pillWidth,
74
- height: SEGMENT_HEIGHT,
75
- borderRadius: tokens_1.radii.sm,
78
+ height: height - 6,
79
+ borderRadius: (height - 6) / 2,
76
80
  backgroundColor: themeColors.glassActive,
77
81
  borderWidth: 0.5,
78
82
  borderColor: themeColors.edge,
79
- }, pointerEvents: "none" })), values.map((label, idx) => {
80
- const isSelected = idx === safeIndex;
81
- return ((0, jsx_runtime_1.jsx)(Pressable, { accessibilityRole: "tab", accessibilityLabel: label, accessibilityState: { selected: isSelected }, onPress: () => handleSelect(idx), style: {
82
- flex: 1,
83
- height: SEGMENT_HEIGHT,
84
- alignItems: "center",
85
- justifyContent: "center",
86
- paddingHorizontal: 16,
87
- borderRadius: tokens_1.radii.sm,
88
- }, children: (0, jsx_runtime_1.jsx)(Text, { numberOfLines: 1, style: {
89
- fontSize: 13,
90
- fontWeight: isSelected ? "600" : "500",
91
- color: isSelected ? themeColors.foreground : themeColors.muted,
92
- }, children: label }) }, label));
83
+ ...(0, lens_1.lensShadow)(isDark),
84
+ }, pointerEvents: "none", children: (0, jsx_runtime_1.jsx)(lens_1.LensRim, { radius: (height - 6) / 2, isDark: isDark }) })), segments.map((segment, index) => {
85
+ const isSelected = index === selected;
86
+ const cell = (height - 6) / Math.max(segments.length, 1);
87
+ return ((0, jsx_runtime_1.jsxs)(View, { style: { width: cell, height: height - 6, position: "relative" }, children: [isSelected ? ((0, jsx_runtime_1.jsx)(View, { style: {
88
+ position: "absolute",
89
+ top: 0,
90
+ left: 0,
91
+ width: cell,
92
+ height: height - 6,
93
+ borderRadius: (height - 6) / 2,
94
+ backgroundColor: themeColors.glassActive,
95
+ } })) : null, (0, jsx_runtime_1.jsx)(Pressable, { testID: testID ? `${testID}-segment-${index}` : undefined, accessibilityRole: "tab", accessibilityLabel: `${accessibilityLabel ?? "Segment"} ${segment}`, accessibilityState: { selected: isSelected, disabled: false }, disabled: false, onPress: () => {
96
+ if (index === selected)
97
+ return;
98
+ (0, haptics_1.hapticSelection)();
99
+ onChange(index);
100
+ }, style: { width: "100%", height, alignItems: "center", justifyContent: "center" }, children: (0, jsx_runtime_1.jsx)(RNText, { style: [
101
+ {
102
+ fontSize: 14,
103
+ fontWeight: isSelected ? "600" : "500",
104
+ color: isSelected ? themeColors.onTint : themeColors.muted,
105
+ },
106
+ textStyle,
107
+ ], children: segment }) })] }, segment));
93
108
  })] }));
109
+ return fallback;
94
110
  });
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Select = Select;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ // Wave 2 — Select.
6
+ //
7
+ // The donor's single-choice field: a `listbox`-style combobox whose trigger
8
+ // shows the chosen label, opening an anchored list where each option is
9
+ // selectable and the chosen one is marked. Controlled or internal, with a
10
+ // placeholder and disabled options.
11
+ const react_1 = require("react");
12
+ const Glass_1 = require("./Glass");
13
+ const tokens_1 = require("./internal/tokens");
14
+ const primitives_1 = require("./internal/primitives");
15
+ const motion_1 = require("./internal/motion");
16
+ const haptics_1 = require("./internal/haptics");
17
+ const overlay_1 = require("./internal/overlay");
18
+ function Select({ value: valueProp, defaultValue, onValueChange, options, placeholder = "Select…", disabled = false, accessibilityLabel = "Select", isDark: isDarkProp, style, testID, }) {
19
+ const isDark = (0, motion_1.useIsDark)(isDarkProp);
20
+ const theme = isDark ? tokens_1.colors.dark : tokens_1.colors.light;
21
+ const { View, Pressable, Text: RNText } = (0, primitives_1.primitives)();
22
+ const [internal, setInternal] = (0, react_1.useState)(defaultValue);
23
+ const [open, setOpen] = (0, react_1.useState)(false);
24
+ const { ref, anchor, capture } = (0, overlay_1.useTriggerAnchor)();
25
+ const value = valueProp !== undefined ? valueProp : internal;
26
+ const chosen = options.find((option) => option.value === value);
27
+ return ((0, jsx_runtime_1.jsxs)(View, { style: { alignSelf: "flex-start", width: 220, maxWidth: "100%" }, children: [(0, jsx_runtime_1.jsx)(Pressable, { ref: ref, testID: testID, accessibilityRole: "button", accessibilityLabel: chosen ? chosen.label : accessibilityLabel, accessibilityState: { expanded: open, disabled }, accessibilityValue: chosen ? { text: chosen.label } : undefined, disabled: disabled, onPress: () => {
28
+ void capture();
29
+ setOpen(true);
30
+ }, style: { opacity: disabled ? 0.38 : 1 }, children: (0, jsx_runtime_1.jsxs)(Glass_1.Glass, { effect: "regular", surface: "control", isDark: isDark, pressed: open, style: {
31
+ height: 40,
32
+ borderRadius: tokens_1.radii.md,
33
+ paddingHorizontal: 14,
34
+ flexDirection: "row",
35
+ alignItems: "center",
36
+ justifyContent: "space-between",
37
+ gap: 8,
38
+ }, children: [(0, jsx_runtime_1.jsx)(RNText, { numberOfLines: 1, style: {
39
+ flex: 1,
40
+ fontSize: 15,
41
+ color: chosen ? theme.foreground : theme.muted,
42
+ }, children: chosen?.label ?? placeholder }), (0, jsx_runtime_1.jsx)(RNText, { style: { fontSize: 11, color: theme.muted, transform: [{ rotate: open ? "180deg" : "0deg" }] }, children: "\u25BE" })] }) }), (0, jsx_runtime_1.jsx)(overlay_1.OverlayPanel, { open: open, onClose: () => setOpen(false), anchor: anchor, width: 220, isDark: isDark, testID: testID ? `${testID}-list` : undefined, accessibilityLabel: chosen ? chosen.label : accessibilityLabel, role: "listbox", children: options.map((option) => ((0, jsx_runtime_1.jsx)(overlay_1.PanelItem, { label: option.label, disabled: option.disabled, selected: option.value === value, role: "option", isDark: isDark, onPress: () => {
43
+ if (option.disabled)
44
+ return;
45
+ setOpen(false);
46
+ if (valueProp === undefined)
47
+ setInternal(option.value);
48
+ (0, haptics_1.hapticSelection)();
49
+ onValueChange?.(option.value);
50
+ } }, option.value))) })] }));
51
+ }
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Separator = Separator;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const tokens_1 = require("./internal/tokens");
6
+ const primitives_1 = require("./internal/primitives");
7
+ const motion_1 = require("./internal/motion");
8
+ function Separator({ orientation = "horizontal", inset = 0, isDark: isDarkProp, style, testID, }) {
9
+ const isDark = (0, motion_1.useIsDark)(isDarkProp);
10
+ const theme = isDark ? tokens_1.colors.dark : tokens_1.colors.light;
11
+ const { View } = (0, primitives_1.primitives)();
12
+ const horizontal = orientation === "horizontal";
13
+ return ((0, jsx_runtime_1.jsx)(View, { testID: testID, accessibilityRole: "none", role: "separator", style: [
14
+ {
15
+ backgroundColor: theme.separator,
16
+ alignSelf: "stretch",
17
+ height: horizontal ? 1 : undefined,
18
+ width: horizontal ? undefined : 1,
19
+ marginLeft: horizontal ? inset : undefined,
20
+ marginVertical: horizontal ? 8 : 0,
21
+ },
22
+ horizontal ? null : { height: "100%" },
23
+ style,
24
+ ] }));
25
+ }
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Sheet = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const glass_routing_1 = require("./internal/glass-routing");
7
+ const GlassView_1 = require("./internal/GlassView");
8
+ const tokens_1 = require("./internal/tokens");
9
+ const primitives_1 = require("./internal/primitives");
10
+ const motion_1 = require("./internal/motion");
11
+ /**
12
+ * A bottom sheet — ported from the engine's `LiquidGlassSheet`, the design
13
+ * Binyam approved on real devices this week (28dp top corners, 36x5 grab handle,
14
+ * dismissed past 30 % of its height or on a dim tap).
15
+ *
16
+ * With a glass renderer available the engine's own control mounts, carrying the
17
+ * approved material, handle and dismissal behaviour. Without one — Expo Go, below
18
+ * every tier, or Reduce Transparency — the fallback floor renders the same panel
19
+ * with a solid surface and the same dismissal affordances, so the sheet is never
20
+ * invisible.
21
+ */
22
+ exports.Sheet = (0, react_1.forwardRef)(function Sheet({ visible, onDismiss, height = 420, cornerRadius = 28, handle = true, dim = 0.25, dismissOnTap = true, tint, variant = "regular", style, contentStyle, children, isDark: isDarkProp, testID, ...props }, ref) {
23
+ const isDark = (0, motion_1.useIsDark)(isDarkProp);
24
+ const themeColors = isDark ? tokens_1.colors.dark : tokens_1.colors.light;
25
+ const { View } = (0, primitives_1.primitives)();
26
+ const capabilities = (0, GlassView_1.glassCapabilities)();
27
+ const EngineSheet = (0, glass_routing_1.loadEngineControl)("Sheet");
28
+ if (!visible)
29
+ return null;
30
+ if (EngineSheet && capabilities.supported) {
31
+ const EngineSheetComponent = EngineSheet;
32
+ return ((0, jsx_runtime_1.jsx)(EngineSheetComponent, { visible: visible, onDismiss: onDismiss, height: height, cornerRadius: cornerRadius, handle: handle, dim: dim, dismissOnTap: dismissOnTap, tint: tint, variant: variant, style: style, contentStyle: contentStyle, testID: testID, children: children }));
33
+ }
34
+ // Fallback floor: dim + solid panel at the bottom, same geometry.
35
+ const panelStyle = {
36
+ position: "absolute",
37
+ bottom: 0,
38
+ left: 0,
39
+ right: 0,
40
+ height,
41
+ borderTopLeftRadius: cornerRadius,
42
+ borderTopRightRadius: cornerRadius,
43
+ overflow: "hidden",
44
+ backgroundColor: tint ?? themeColors.surface,
45
+ ...style,
46
+ };
47
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [dim > 0 ? ((0, jsx_runtime_1.jsx)(View, { testID: testID ? `${testID}-dim` : undefined, pointerEvents: "box-none", style: { position: "absolute", top: 0, left: 0, right: 0, bottom: 0, backgroundColor: themeColors.scrim }, onStartShouldSetResponder: () => true, onResponderGrant: () => {
48
+ if (dismissOnTap)
49
+ onDismiss?.();
50
+ } })) : null, (0, jsx_runtime_1.jsxs)(View, { style: panelStyle, testID: testID, children: [handle ? ((0, jsx_runtime_1.jsx)(View, { style: { width: 36, height: 5, borderRadius: 2.5, alignSelf: "center", marginTop: 8 } })) : null, (0, jsx_runtime_1.jsx)(View, { style: contentStyle, children: children })] })] }));
51
+ });
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Skeleton = Skeleton;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ // Wave 2 — Skeleton.
6
+ //
7
+ // The donor's placeholder is decorative: it hides its content from screen
8
+ // readers and announces a busy state on the container instead. The shimmer is
9
+ // the family's motion and disappears under Reduce Motion.
10
+ const react_1 = require("react");
11
+ const tokens_1 = require("./internal/tokens");
12
+ const primitives_1 = require("./internal/primitives");
13
+ const motion_1 = require("./internal/motion");
14
+ const a11y_1 = require("./internal/a11y");
15
+ function Skeleton({ shape = "rect", width, height, isDark: isDarkProp, style, testID, }) {
16
+ const isDark = (0, motion_1.useIsDark)(isDarkProp);
17
+ const theme = isDark ? tokens_1.colors.dark : tokens_1.colors.light;
18
+ const reducedMotion = (0, a11y_1.useReducedMotion)();
19
+ const { View, Animated, isNative } = (0, primitives_1.primitives)();
20
+ const pulse = (0, react_1.useRef)(null);
21
+ const animate = Boolean(isNative && Animated?.Value && Animated?.timing) && !reducedMotion;
22
+ if (pulse.current === null)
23
+ pulse.current = animate ? new Animated.Value(0.55) : { value: 1 };
24
+ (0, react_1.useEffect)(() => {
25
+ if (!animate) {
26
+ pulse.current.value = 1;
27
+ return;
28
+ }
29
+ const loop = Animated.loop(Animated.sequence([
30
+ Animated.timing(pulse.current, { toValue: 1, duration: 700, useNativeDriver: true }),
31
+ Animated.timing(pulse.current, { toValue: 0.55, duration: 700, useNativeDriver: true }),
32
+ ]));
33
+ loop.start();
34
+ return () => loop.stop?.();
35
+ }, [animate]);
36
+ const resolvedHeight = height ?? (shape === "line" ? 12 : 20);
37
+ const size = shape === "circle" ? resolvedHeight : undefined;
38
+ return ((0, jsx_runtime_1.jsx)(Animated.View, { testID: testID, accessibilityRole: "none", importantForAccessibility: "no", accessibilityElementsHidden: true, style: [
39
+ {
40
+ width: size ?? width ?? "100%",
41
+ height: resolvedHeight,
42
+ backgroundColor: theme.skeleton,
43
+ borderRadius: shape === "circle" ? resolvedHeight / 2 : tokens_1.radii.sm,
44
+ opacity: pulse.current,
45
+ },
46
+ style,
47
+ ] }));
48
+ }