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,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Collapsible = Collapsible;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ // Wave 2 — Collapsible.
6
+ //
7
+ // The donor's single disclosure: the trigger announces `expanded`, the content
8
+ // mounts only while open, and state can be controlled or internal. Nothing is
9
+ // styled like the donor — the trigger is the family's glass control.
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
+ function Collapsible({ open: openProp, defaultOpen = false, onOpenChange, trigger, accessibilityLabel = "Toggle section", disabled = false, children, style, isDark: isDarkProp, testID, }) {
15
+ const isDark = (0, motion_1.useIsDark)(isDarkProp);
16
+ const theme = isDark ? tokens_1.colors.dark : tokens_1.colors.light;
17
+ const { View, Pressable, Text: RNText } = (0, primitives_1.primitives)();
18
+ const [internalOpen, setInternalOpen] = (0, react_1.useState)(defaultOpen);
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, { testID: testID, style: style, children: [(0, jsx_runtime_1.jsx)(Pressable, { accessibilityRole: "button", accessibilityLabel: accessibilityLabel, accessibilityState: { expanded: open, disabled }, disabled: disabled, onPress: () => setOpen(!open), children: trigger }), open ? (0, jsx_runtime_1.jsx)(View, { style: { paddingTop: 8 }, children: children }) : null] }));
26
+ }
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ContextMenu = ContextMenu;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ // Wave 2 — ContextMenu.
6
+ //
7
+ // The donor's context menu: nothing opens it until a long press on the trigger,
8
+ // the panel carries a `menu` role with `menuitem` rows, and it closes on
9
+ // selection, outside press, or Android's back gesture. Dressed like the
10
+ // dropdown menu — same surface, same rows.
11
+ const react_1 = require("react");
12
+ const primitives_1 = require("./internal/primitives");
13
+ const motion_1 = require("./internal/motion");
14
+ const overlay_1 = require("./internal/overlay");
15
+ function ContextMenu({ trigger, items, open: openProp, onOpenChange, width = 220, accessibilityLabel = "Context menu", isDark: isDarkProp, style, testID, }) {
16
+ const isDark = (0, motion_1.useIsDark)(isDarkProp);
17
+ const { View, Pressable } = (0, primitives_1.primitives)();
18
+ const [internalOpen, setInternalOpen] = (0, react_1.useState)(false);
19
+ const { ref, anchor, capture } = (0, overlay_1.useTriggerAnchor)();
20
+ const open = openProp !== undefined ? openProp : internalOpen;
21
+ const setOpen = (next) => {
22
+ if (openProp === undefined)
23
+ setInternalOpen(next);
24
+ onOpenChange?.(next);
25
+ };
26
+ 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 }, onLongPress: () => {
27
+ void capture();
28
+ setOpen(true);
29
+ }, delayLongPress: 350, children: trigger }), (0, jsx_runtime_1.jsx)(overlay_1.OverlayPanel, { open: open, onClose: () => setOpen(false), anchor: anchor, width: width, isDark: isDark, testID: testID ? `${testID}-menu` : undefined, accessibilityLabel: accessibilityLabel, role: "menu", panelStyle: style, children: items.map((item, index) => ((0, jsx_runtime_1.jsx)(overlay_1.PanelItem, { label: item.label, icon: item.icon, destructive: item.destructive, disabled: item.disabled, role: "menuitem", isDark: isDark, onPress: () => {
30
+ setOpen(false);
31
+ item.onPress();
32
+ } }, `${item.label}-${index}`))) })] }));
33
+ }
@@ -2,138 +2,53 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Dialog = Dialog;
4
4
  exports.DialogTrigger = DialogTrigger;
5
- exports.AlertDialog = AlertDialog;
6
- exports.ActionSheet = ActionSheet;
7
5
  const jsx_runtime_1 = require("react/jsx-runtime");
6
+ // Wave 2 — Dialog.
7
+ //
8
+ // Behaviour from the donor: a modal layer that closes on the backdrop unless
9
+ // told not to, on Android's back gesture, and announces itself as a modal
10
+ // dialog with a heading. The dress is the Wave 1 family — the same glass
11
+ // surface, radius, type steps and spring entrance as the sheet.
8
12
  const react_1 = require("react");
13
+ const Button_1 = require("./Button");
14
+ const Glass_1 = require("./Glass");
9
15
  const tokens_1 = require("./internal/tokens");
10
16
  const primitives_1 = require("./internal/primitives");
11
17
  const motion_1 = require("./internal/motion");
12
- const Glass_1 = require("./Glass");
13
- const Button_1 = require("./Button");
14
- /**
15
- * A centred modal panel above a dimmed backdrop.
16
- *
17
- * The panel is a glass surface, so it is Apple's real Liquid Glass on iOS 26+
18
- * and Glacia's translucent tint elsewhere; the text sits on it with the
19
- * theme's foreground colour, so contrast holds either way.
20
- *
21
- * React Native has no built-in focus trap, so this component covers what the
22
- * platform can actually do: `Modal` blocks touches behind it, Android's back
23
- * button routes to `onOpenChange(false)`, and the heading is marked as such so
24
- * screen readers announce the dialog as it appears.
25
- *
26
- * To open a dialog from a button, use `DialogTrigger`.
27
- */
28
- function Dialog({ open: controlledOpen, onOpenChange, title, description, children, footer, dismissOnBackdropPress = true, isDark: isDarkProp, style, testID, }) {
18
+ const overlay_1 = require("./internal/overlay");
19
+ function Dialog({ open: openProp, onOpenChange, title, description, children, footer, dismissOnBackdropPress = true, isDark: isDarkProp, style, testID, }) {
29
20
  const isDark = (0, motion_1.useIsDark)(isDarkProp);
30
21
  const theme = isDark ? tokens_1.colors.dark : tokens_1.colors.light;
31
- const { View, Text, Pressable, Modal, getBackHandler } = (0, primitives_1.primitives)();
32
- const [uncontrolled, setUncontrolled] = (0, react_1.useState)(false);
33
- const open = controlledOpen ?? uncontrolled;
34
- const setOpen = (0, react_1.useCallback)((next) => {
35
- if (controlledOpen === undefined)
36
- setUncontrolled(next);
37
- onOpenChange?.(next);
38
- }, [controlledOpen, onOpenChange]);
39
- // Android's hardware back must close the dialog, not the screen behind it.
40
- (0, react_1.useEffect)(() => {
41
- if (!open)
42
- return;
43
- const BackHandler = getBackHandler();
44
- if (!BackHandler)
45
- return;
46
- const sub = BackHandler.addEventListener("hardwareBackPress", () => {
47
- setOpen(false);
48
- return true;
49
- });
50
- return () => sub.remove();
51
- }, [open, setOpen, getBackHandler]);
52
- return ((0, jsx_runtime_1.jsx)(Modal, { visible: open, transparent: true, animationType: "fade", onRequestClose: () => setOpen(false), children: (0, jsx_runtime_1.jsx)(Pressable, { accessibilityRole: "button", accessibilityLabel: "Close dialog", onPress: dismissOnBackdropPress ? () => setOpen(false) : undefined, style: {
53
- flex: 1,
54
- alignItems: "center",
55
- justifyContent: "center",
56
- padding: 24,
57
- backgroundColor: "rgba(0, 0, 0, 0.45)",
58
- }, children: (0, jsx_runtime_1.jsx)(Pressable, { accessibilityRole: "none", onPress: () => { }, style: { width: "100%", maxWidth: 380 }, children: (0, jsx_runtime_1.jsxs)(Glass_1.Glass, { effect: "regular", isDark: isDark, testID: testID, style: {
59
- borderRadius: tokens_1.radii.lg,
60
- borderWidth: 1,
61
- borderColor: theme.edge,
62
- padding: 20,
63
- gap: 8,
64
- ...style,
65
- }, children: [title && ((0, jsx_runtime_1.jsx)(Text, { accessibilityRole: "heading", style: { fontSize: 17, fontWeight: "600", color: theme.foreground }, children: title })), description && ((0, jsx_runtime_1.jsx)(Text, { style: { fontSize: 13, color: theme.muted, lineHeight: 18 }, children: description })), children, footer && (0, jsx_runtime_1.jsx)(View, { style: { marginTop: 12, gap: 8 }, children: footer })] }) }) }) }));
66
- }
67
- /** Opens the dialog without the caller tracking state. */
68
- function DialogTrigger({ label, children, ...dialogProps }) {
69
- const [open, setOpen] = (0, react_1.useState)(false);
70
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Button_1.Button, { accessibilityLabel: label, onPress: () => setOpen(true), children: label }), (0, jsx_runtime_1.jsx)(Dialog, { ...dialogProps, open: open, onOpenChange: setOpen })] }));
71
- }
72
- /**
73
- * A dialog that asks for confirmation.
74
- *
75
- * Deliberately not dismissible by tapping the backdrop: a destructive question
76
- * should require a real answer, so the only ways out are the two buttons or the
77
- * Android back button, which counts as cancel.
78
- */
79
- function AlertDialog({ open: controlledOpen, onOpenChange, title, description, confirmLabel = "Confirm", cancelLabel = "Cancel", destructive = false, onConfirm, onCancel, isDark: isDarkProp, testID, }) {
80
- const isDark = (0, motion_1.useIsDark)(isDarkProp);
81
- const theme = isDark ? tokens_1.colors.dark : tokens_1.colors.light;
82
- const { View } = (0, primitives_1.primitives)();
83
- const [uncontrolled, setUncontrolled] = (0, react_1.useState)(false);
84
- const open = controlledOpen ?? uncontrolled;
85
- const close = (next) => {
86
- if (controlledOpen === undefined)
87
- setUncontrolled(next);
22
+ const { View, Pressable, Text: RNText, Modal } = (0, primitives_1.primitives)();
23
+ const [internalOpen, setInternalOpen] = (0, react_1.useState)(false);
24
+ const open = openProp !== undefined ? openProp : internalOpen;
25
+ const setOpen = (next) => {
26
+ if (openProp === undefined)
27
+ setInternalOpen(next);
88
28
  onOpenChange?.(next);
89
29
  };
90
- const cancel = () => {
91
- onCancel?.();
92
- close(false);
93
- };
94
- return ((0, jsx_runtime_1.jsx)(Dialog, { open: open, testID: testID,
95
- // Android's back button routes here as a dismissal, and a dismissal of a
96
- // confirmation question is a cancellation, so onCancel fires too.
97
- onOpenChange: (next) => {
98
- if (!next) {
99
- cancel();
100
- return;
101
- }
102
- close(true);
103
- }, title: title, description: description, dismissOnBackdropPress: false, isDark: isDark, footer: (0, jsx_runtime_1.jsxs)(View, { style: { flexDirection: "row", gap: 8, justifyContent: "flex-end" }, children: [(0, jsx_runtime_1.jsx)(Button_1.Button, { accessibilityLabel: cancelLabel, variant: "ghost", onPress: cancel, children: cancelLabel }), (0, jsx_runtime_1.jsx)(Button_1.Button, { accessibilityLabel: confirmLabel, variant: "filled", tint: destructive ? theme.destructive : undefined, onPress: () => {
104
- onConfirm?.();
105
- close(false);
106
- }, children: confirmLabel })] }) }));
30
+ const dismiss = () => setOpen(false);
31
+ (0, overlay_1.useBackDismiss)(open, dismiss);
32
+ return ((0, jsx_runtime_1.jsx)(Modal, { visible: open, transparent: true, animationType: "fade", onRequestClose: dismiss, children: (0, jsx_runtime_1.jsxs)(View, { style: { flex: 1, backgroundColor: theme.scrim }, children: [(0, jsx_runtime_1.jsx)(Pressable, { accessibilityRole: "button", accessibilityLabel: "Close dialog", accessibilityState: { disabled: !dismissOnBackdropPress }, onPress: dismissOnBackdropPress ? dismiss : undefined, style: StyleSheetAbsoluteFill }), (0, jsx_runtime_1.jsx)(View, { style: { flex: 1, justifyContent: "center", padding: 24 }, pointerEvents: "box-none", children: (0, jsx_runtime_1.jsx)(Pressable, { accessibilityRole: "none", onPress: () => { }, children: (0, jsx_runtime_1.jsxs)(Glass_1.Glass, { effect: "regular", surface: "overlay", isDark: isDark, testID: testID, accessibilityViewIsModal: true, style: [
33
+ {
34
+ borderRadius: tokens_1.radii.lg,
35
+ backgroundColor: theme.surface,
36
+ padding: 20,
37
+ gap: 10,
38
+ alignSelf: "stretch",
39
+ },
40
+ style,
41
+ ], children: [title ? ((0, jsx_runtime_1.jsx)(RNText, { accessibilityRole: "heading", as: true, any: true, style: { ...tokens_1.typeScale.heading, color: theme.foreground }, children: title })) : null, description ? ((0, jsx_runtime_1.jsx)(RNText, { style: { ...tokens_1.typeScale.body, color: theme.muted }, children: description })) : null, children ? (0, jsx_runtime_1.jsx)(View, { style: { gap: 10 }, children: children }) : null, footer ? ((0, jsx_runtime_1.jsx)(View, { style: { gap: 8, marginTop: 4 }, children: footer })) : ((0, jsx_runtime_1.jsx)(View, { style: { alignSelf: "flex-end", marginTop: 4 }, children: (0, jsx_runtime_1.jsx)(Button_1.Button, { accessibilityLabel: "Close", variant: "filled", onPress: dismiss, children: "Close" }) }))] }) }) })] }) }));
107
42
  }
108
- /**
109
- * A list of choices attached to the bottom of the screen.
110
- *
111
- * Anchored to the bottom because that is where a thumb reaches, and it keeps a
112
- * separate Cancel row so a mis-tap is always reversible.
113
- */
114
- function ActionSheet({ open: controlledOpen, onOpenChange, title, message, options, cancelLabel = "Cancel", isDark: isDarkProp, testID, }) {
115
- const isDark = (0, motion_1.useIsDark)(isDarkProp);
116
- const theme = isDark ? tokens_1.colors.dark : tokens_1.colors.light;
117
- // Android's back button is handled by Modal's onRequestClose, so no
118
- // BackHandler subscription is needed here.
119
- const { View, Text, Pressable, Modal } = (0, primitives_1.primitives)();
120
- const [uncontrolled, setUncontrolled] = (0, react_1.useState)(false);
121
- const open = controlledOpen ?? uncontrolled;
122
- const close = () => {
123
- if (controlledOpen === undefined)
124
- setUncontrolled(false);
125
- onOpenChange?.(false);
126
- };
127
- return ((0, jsx_runtime_1.jsx)(Modal, { visible: open, transparent: true, animationType: "slide", onRequestClose: close, testID: testID, children: (0, jsx_runtime_1.jsx)(Pressable, { accessibilityRole: "button", accessibilityLabel: "Dismiss actions", onPress: close, style: { flex: 1, justifyContent: "flex-end", backgroundColor: "rgba(0,0,0,0.4)" }, children: (0, jsx_runtime_1.jsxs)(Pressable, { accessibilityRole: "none", onPress: () => { }, style: { padding: 10, gap: 8 }, children: [(0, jsx_runtime_1.jsxs)(Glass_1.Glass, { effect: "regular", isDark: isDark, style: { borderRadius: tokens_1.radii.lg, overflow: "hidden" }, children: [(title || message) && ((0, jsx_runtime_1.jsxs)(View, { style: { paddingVertical: 12, paddingHorizontal: 16, alignItems: "center" }, children: [title && ((0, jsx_runtime_1.jsx)(Text, { style: { fontSize: 13, fontWeight: "600", color: theme.foreground }, children: title })), message && ((0, jsx_runtime_1.jsx)(Text, { style: { fontSize: 12, color: theme.muted, marginTop: 4, textAlign: "center" }, children: message }))] })), options.map((option, index) => ((0, jsx_runtime_1.jsx)(Pressable, { accessibilityRole: "button", accessibilityLabel: option.label, onPress: () => {
128
- option.onPress?.();
129
- close();
130
- }, style: {
131
- paddingVertical: 14,
132
- alignItems: "center",
133
- borderTopWidth: index === 0 && !title && !message ? 0 : 1,
134
- borderTopColor: theme.edge,
135
- }, children: (0, jsx_runtime_1.jsx)(Text, { style: {
136
- fontSize: 16,
137
- color: option.destructive ? theme.destructive : theme.foreground,
138
- }, children: option.label }) }, option.label)))] }), (0, jsx_runtime_1.jsx)(Glass_1.Glass, { effect: "regular", isDark: isDark, style: { borderRadius: tokens_1.radii.lg }, children: (0, jsx_runtime_1.jsx)(Pressable, { accessibilityRole: "button", accessibilityLabel: cancelLabel, onPress: close, style: { paddingVertical: 14, alignItems: "center" }, children: (0, jsx_runtime_1.jsx)(Text, { style: { fontSize: 16, fontWeight: "600", color: theme.foreground }, children: cancelLabel }) }) })] }) }) }));
43
+ const StyleSheetAbsoluteFill = {
44
+ position: "absolute",
45
+ top: 0,
46
+ left: 0,
47
+ right: 0,
48
+ bottom: 0,
49
+ };
50
+ /** A button that owns a dialog's open state, the donor's `Dialog.Trigger`. */
51
+ function DialogTrigger({ label, children, ...dialog }) {
52
+ const [open, setOpen] = (0, react_1.useState)(false);
53
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Button_1.Button, { accessibilityLabel: label, onPress: () => setOpen(true), children: children ?? label }), (0, jsx_runtime_1.jsx)(Dialog, { ...dialog, open: open, onOpenChange: setOpen })] }));
139
54
  }
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DropdownMenu = DropdownMenu;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ // Wave 2 — DropdownMenu.
6
+ //
7
+ // The donor's menu button: a trigger that opens a menu of actions, closes on
8
+ // selection, on an outside press, and on Android's back gesture; the menu is a
9
+ // `menu` with `menuitem` rows. Dressed on the family's overlay surface, with the
10
+ // destructive tone the library already uses.
11
+ const react_1 = require("react");
12
+ const primitives_1 = require("./internal/primitives");
13
+ const motion_1 = require("./internal/motion");
14
+ const overlay_1 = require("./internal/overlay");
15
+ function DropdownMenu({ trigger, items, open: openProp, defaultOpen = false, onOpenChange, width = 220, accessibilityLabel = "Menu", isDark: isDarkProp, style, testID, }) {
16
+ const isDark = (0, motion_1.useIsDark)(isDarkProp);
17
+ const { View, Pressable } = (0, primitives_1.primitives)();
18
+ const [internalOpen, setInternalOpen] = (0, react_1.useState)(defaultOpen);
19
+ const { ref, anchor, capture } = (0, overlay_1.useTriggerAnchor)();
20
+ const open = openProp !== undefined ? openProp : internalOpen;
21
+ const setOpen = (next) => {
22
+ if (openProp === undefined)
23
+ setInternalOpen(next);
24
+ onOpenChange?.(next);
25
+ };
26
+ 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: () => {
27
+ void capture();
28
+ setOpen(!open);
29
+ }, children: trigger }), (0, jsx_runtime_1.jsx)(overlay_1.OverlayPanel, { open: open, onClose: () => setOpen(false), anchor: anchor, width: width, isDark: isDark, testID: testID ? `${testID}-menu` : undefined, accessibilityLabel: accessibilityLabel, role: "menu", panelStyle: style, children: items.map((item, index) => ((0, jsx_runtime_1.jsx)(overlay_1.PanelItem, { label: item.label, icon: item.icon, destructive: item.destructive, disabled: item.disabled, role: "menuitem", isDark: isDark, onPress: () => {
30
+ setOpen(false);
31
+ item.onPress();
32
+ } }, `${item.label}-${index}`))) })] }));
33
+ }
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Field = Field;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const Label_1 = require("./Label");
6
+ const tokens_1 = require("./internal/tokens");
7
+ const primitives_1 = require("./internal/primitives");
8
+ const motion_1 = require("./internal/motion");
9
+ /**
10
+ * Label, control and message stacked in the order assistive tech announces
11
+ * them, so a caller never has to place these three by hand.
12
+ */
13
+ function Field({ label, description, error, required = false, disabled = false, isDark: isDarkProp, children, style, }) {
14
+ const isDark = (0, motion_1.useIsDark)(isDarkProp);
15
+ const theme = isDark ? tokens_1.colors.dark : tokens_1.colors.light;
16
+ const { View, Text } = (0, primitives_1.primitives)();
17
+ const message = error ?? description;
18
+ return ((0, jsx_runtime_1.jsxs)(View, { style: { gap: 7, ...style }, children: [label && ((0, jsx_runtime_1.jsx)(Label_1.Label, { required: required, disabled: disabled, isDark: isDark, children: label })), children, message && ((0, jsx_runtime_1.jsx)(Text, { accessibilityRole: error ? "alert" : "text", style: {
19
+ fontSize: 12,
20
+ color: error ? theme.destructive : theme.muted,
21
+ }, children: message }))] }));
22
+ }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Glass = void 0;
3
+ exports.GlassView = exports.Glass = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const GlassView_1 = require("./internal/GlassView");
@@ -9,10 +9,17 @@ const motion_1 = require("./internal/motion");
9
9
  * A glass surface.
10
10
  *
11
11
  * Routes through the package's single switch: Apple's real `UIGlassEffect` on
12
- * iOS 26+, Glacia's translucent fallback of identical shape on older iOS and
13
- * Android. `testID` is passed to whichever surface renders.
12
+ * iOS 26+, the engine's Metal renderer on iOS 16.4–25 and its AGSL renderer on
13
+ * Android 13+, Glacia's own glass fallback of identical shape elsewhere — Expo
14
+ * Go and below every tier. `testID` is passed to whichever surface renders.
14
15
  */
15
- exports.Glass = (0, react_1.forwardRef)(function Glass({ effect = "regular", tintColor, interactive = false, testID, style, children, isDark: isDarkProp, ...props }, ref) {
16
+ exports.Glass = (0, react_1.forwardRef)(function Glass({ effect = "regular", tintColor, interactive = false, surface, pressed, testID, style, children, isDark: isDarkProp, ...props }, ref) {
16
17
  const isDark = (0, motion_1.useIsDark)(isDarkProp);
17
- return ((0, jsx_runtime_1.jsx)(GlassView_1.GlassView, { ref: ref, effect: effect, tintColor: tintColor, interactive: interactive, testID: testID, isDark: isDark, style: style, ...props, children: children }));
18
+ return ((0, jsx_runtime_1.jsx)(GlassView_1.GlassView, { ref: ref, effect: effect, tintColor: tintColor, interactive: interactive, surface: surface, pressed: pressed, testID: testID, isDark: isDark, style: style, ...props, children: children }));
18
19
  });
20
+ /**
21
+ * The surface, under the engine's name. The public API uses Glacia names only,
22
+ * so the surface ships as `GlassView` alongside the Glacia `Glass` alias — both
23
+ * are the same component, and both are Glacia names.
24
+ */
25
+ exports.GlassView = exports.Glass;
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Group = 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 group of glass members that merge when pressed together — ported from the
13
+ * engine's `LiquidGlassGroup`.
14
+ *
15
+ * With a glass renderer available the engine's own control mounts, carrying the
16
+ * approved merge behaviour. Without one — Expo Go, below every tier, or Reduce
17
+ * Transparency — the fallback floor renders the same row of members with the
18
+ * fallback material, so the group is never invisible.
19
+ */
20
+ exports.Group = (0, react_1.forwardRef)(function Group({ spacing = 28, gap = 12, direction = "row", metal, tint, providerId, style, children, isDark: isDarkProp, testID, ...props }, ref) {
21
+ const isDark = (0, motion_1.useIsDark)(isDarkProp);
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 EngineGroup = (0, glass_routing_1.loadEngineControl)("Group");
26
+ if (EngineGroup && capabilities.supported) {
27
+ const EngineGroupComponent = EngineGroup;
28
+ return ((0, jsx_runtime_1.jsx)(EngineGroupComponent, { spacing: spacing, gap: gap, direction: direction, metal: metal, tint: tint, providerId: providerId, style: style, testID: testID, children: children }));
29
+ }
30
+ // Fallback floor: the members laid out with the group's resting gap.
31
+ return ((0, jsx_runtime_1.jsx)(View, { style: {
32
+ flexDirection: direction === "column" ? "column" : "row",
33
+ gap,
34
+ ...style,
35
+ }, testID: testID, ...props, children: children }));
36
+ });
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IconButton = 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 Glass_1 = require("./Glass");
9
+ const tokens_1 = require("./internal/tokens");
10
+ const primitives_1 = require("./internal/primitives");
11
+ const motion_1 = require("./internal/motion");
12
+ const SIZES = { sm: 32, md: 38, lg: 44 };
13
+ /**
14
+ * An icon button on Glacia's glass — ported from the engine's
15
+ * `LiquidGlassIconButton`, which extends the engine button's design with a
16
+ * required accessibility label (a bare circle of glass has no text to read).
17
+ */
18
+ exports.IconButton = (0, react_1.forwardRef)(function IconButton({ icon, onPress, disabled = false, size = "md", tint, accessibilityLabel, accessibilityState, style, isDark: isDarkProp, testID, children, }, ref) {
19
+ const isDark = (0, motion_1.useIsDark)(isDarkProp);
20
+ const themeColors = isDark ? tokens_1.colors.dark : tokens_1.colors.light;
21
+ const { Pressable, View } = (0, primitives_1.primitives)();
22
+ const capabilities = (0, GlassView_1.glassCapabilities)();
23
+ const EngineIconButton = (0, glass_routing_1.loadEngineControl)("IconButton");
24
+ const dimension = SIZES[size];
25
+ if (EngineIconButton && capabilities.supported) {
26
+ const EngineIconButtonComponent = EngineIconButton;
27
+ return ((0, jsx_runtime_1.jsx)(EngineIconButtonComponent, { ref: ref, onPress: disabled ? undefined : onPress, disabled: disabled, icon: icon, tint: tint, accessibilityLabel: accessibilityLabel, accessibilityState: { disabled, ...accessibilityState }, style: style, size: size, children: children }));
28
+ }
29
+ // Fallback floor: solid circle, full geometry, on the fallback material.
30
+ const radius = dimension / 2;
31
+ return ((0, jsx_runtime_1.jsx)(Glass_1.Glass, { effect: "regular", surface: "control", isDark: isDark, tintColor: tint, style: style, testID: testID, children: (0, jsx_runtime_1.jsx)(Pressable, { ref: ref, testID: testID, accessibilityRole: "button", accessibilityLabel: accessibilityLabel, accessibilityState: { disabled }, disabled: disabled, onPress: disabled ? undefined : onPress, style: style, children: (0, jsx_runtime_1.jsx)(View, { style: {
32
+ width: dimension,
33
+ height: dimension,
34
+ borderRadius: radius,
35
+ backgroundColor: tint ?? themeColors.fill,
36
+ opacity: disabled ? 0.38 : 1,
37
+ alignItems: "center",
38
+ justifyContent: "center",
39
+ } }) }) }));
40
+ });
@@ -1,29 +1,36 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Textarea = exports.Input = void 0;
3
+ exports.Input = 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");
8
+ const Glass_1 = require("./Glass");
6
9
  const tokens_1 = require("./internal/tokens");
7
10
  const primitives_1 = require("./internal/primitives");
8
11
  const motion_1 = require("./internal/motion");
9
- const heights = { sm: 34, md: 42, lg: 50 };
12
+ const heights = { sm: 28, md: 34, lg: 44 };
10
13
  const fontSizes = { sm: 14, md: 15, lg: 16 };
11
14
  /**
12
- * A single-line or multiline text field.
15
+ * A single-line or multiline text field — ported from the engine's
16
+ * `LiquidGlassTextInput`, the design Binyam approved on real devices this week
17
+ * (48dp capsule, focus ring that springs in, leading/trailing slots).
13
18
  *
14
19
  * The native TextInput has no placeholder styling prop, so the placeholder is
15
- * drawn as a sibling Text: that keeps its colour tied to the theme instead of
16
- * the OS default, which changes between iOS versions.
20
+ * drawn as a sibling Text: that keeps its colour tied to the theme instead of the
21
+ * OS default, which changes between iOS versions.
17
22
  *
18
- * The field works controlled (`value` + `onChangeText`) or uncontrolled (no
19
- * `value` prop). In uncontrolled use it tracks its own text so the themed
20
- * placeholder disappears as soon as the user types; without that state the
21
- * overlay would sit on top of the typed text until the parent re-rendered.
23
+ * With a glass renderer available the engine's own control mounts, carrying the
24
+ * approved material and focus behaviour. Without one — Expo Go, below every tier,
25
+ * or Reduce Transparency — the fallback floor renders the same capsule with the
26
+ * fallback material, so the field is never invisible and never bare text.
22
27
  */
23
- exports.Input = (0, react_1.forwardRef)(function Input({ value, onChangeText, placeholder, invalid = false, disabled = false, secureTextEntry = false, keyboardType = "default", autoCapitalize, autoCorrect, multiline = false, minLines = 3, size = "md", accessibilityLabel, returnKeyType, onSubmitEditing, defaultValue, prefix, suffix, isDark: isDarkProp, style, testID, maxLength, editable, onFocus, onBlur, }, ref) {
28
+ exports.Input = (0, react_1.forwardRef)(function Input({ value, onChangeText, placeholder, invalid = false, disabled = false, secureTextEntry = false, keyboardType = "default", autoCapitalize, autoCorrect, multiline = false, minLines = 3, size = "md", accessibilityLabel, returnKeyType, onSubmitEditing, defaultValue, prefix, suffix, isDark: isDarkProp, style, testID, maxLength, editable, onFocus, onBlur, height, tint, variant = "regular", interactive = true, leading, trailing, focusRing = true, accentColor, ...props }, ref) {
24
29
  const isDark = (0, motion_1.useIsDark)(isDarkProp);
25
30
  const theme = isDark ? tokens_1.colors.dark : tokens_1.colors.light;
26
31
  const { View, Text, TextInput } = (0, primitives_1.primitives)();
32
+ const capabilities = (0, GlassView_1.glassCapabilities)();
33
+ const EngineInput = (0, glass_routing_1.loadEngineControl)("Input");
27
34
  // Uncontrolled support: with no `value` prop the field owns its text.
28
35
  const [internalText, setInternalText] = (0, react_1.useState)(defaultValue ?? "");
29
36
  const text = value !== undefined ? value : internalText;
@@ -34,43 +41,43 @@ exports.Input = (0, react_1.forwardRef)(function Input({ value, onChangeText, pl
34
41
  };
35
42
  const isEditable = editable !== undefined ? editable : !disabled;
36
43
  const showPlaceholder = !text && Boolean(placeholder);
44
+ const resolvedHeight = height ?? heights[size];
37
45
  const fieldStyle = {
38
46
  flex: 1,
39
- paddingVertical: height_padding(size),
47
+ paddingVertical: multiline ? 0 : height_padding(size),
40
48
  paddingHorizontal: 0,
41
49
  fontSize: fontSizes[size],
42
50
  color: theme.foreground,
43
51
  };
44
- return ((0, jsx_runtime_1.jsxs)(View, { style: {
45
- flexDirection: "row",
46
- alignItems: multiline ? "flex-start" : "center",
47
- gap: 8,
48
- minHeight: multiline ? undefined : heights[size],
49
- borderRadius: tokens_1.radii.md,
50
- borderWidth: 1,
51
- borderColor: invalid ? theme.destructive : theme.edge,
52
- backgroundColor: theme.glass,
53
- paddingHorizontal: 12,
54
- opacity: disabled ? 0.5 : 1,
55
- ...style,
56
- }, children: [prefix, (0, jsx_runtime_1.jsxs)(View, { style: { flex: 1, justifyContent: "center" }, children: [showPlaceholder && ((0, jsx_runtime_1.jsx)(Text, { style: {
57
- position: "absolute",
58
- left: 0,
59
- top: multiline ? 0 : undefined,
60
- fontSize: fontSizes[size],
61
- color: theme.muted,
62
- }, pointerEvents: "none", numberOfLines: 1, children: placeholder })), (0, jsx_runtime_1.jsx)(TextInput, { ref: ref, testID: testID, value: text, onChangeText: handleChangeText, editable: isEditable, secureTextEntry: secureTextEntry, keyboardType: keyboardType, autoCapitalize: autoCapitalize, autoCorrect: autoCorrect, multiline: multiline, numberOfLines: multiline ? minLines : undefined, maxLength: maxLength, returnKeyType: returnKeyType, onSubmitEditing: onSubmitEditing, onFocus: onFocus, onBlur: onBlur, accessibilityLabel: accessibilityLabel ?? placeholder, accessibilityState: { disabled: !isEditable }, style: fieldStyle })] }), suffix] }));
52
+ // ------------------------------------------------------------------
53
+ // Fallback floor: the same capsule with the fallback material underneath.
54
+ // ------------------------------------------------------------------
55
+ if (!(EngineInput && capabilities.supported)) {
56
+ const { View, Text, TextInput } = (0, primitives_1.primitives)();
57
+ return ((0, jsx_runtime_1.jsxs)(Glass_1.Glass, { effect: variant, surface: "field", isDark: isDark, style: {
58
+ flexDirection: "row",
59
+ alignItems: multiline ? "flex-start" : "center",
60
+ gap: 8,
61
+ borderRadius: multiline ? tokens_1.radii.xl : tokens_1.radii.pill,
62
+ minHeight: multiline ? 84 : resolvedHeight,
63
+ paddingHorizontal: 14,
64
+ paddingVertical: multiline ? 10 : 0,
65
+ borderColor: invalid ? theme.destructive : undefined,
66
+ opacity: disabled ? 0.5 : 1,
67
+ ...style,
68
+ }, testID: testID, children: [prefix, (0, jsx_runtime_1.jsxs)(View, { style: { flex: 1, justifyContent: "center" }, children: [showPlaceholder && ((0, jsx_runtime_1.jsx)(Text, { style: {
69
+ position: "absolute",
70
+ left: 0,
71
+ top: multiline ? 0 : undefined,
72
+ fontSize: fontSizes[size],
73
+ color: theme.muted,
74
+ }, pointerEvents: "none", numberOfLines: 1, children: placeholder })), (0, jsx_runtime_1.jsx)(TextInput, { ref: ref, testID: testID, value: text, onChangeText: handleChangeText, editable: isEditable, secureTextEntry: secureTextEntry, keyboardType: keyboardType, autoCapitalize: autoCapitalize, autoCorrect: autoCorrect, multiline: multiline, numberOfLines: multiline ? minLines : undefined, maxLength: maxLength, returnKeyType: returnKeyType, onSubmitEditing: onSubmitEditing, onFocus: onFocus, onBlur: onBlur, accessibilityLabel: accessibilityLabel ?? placeholder, accessibilityState: { disabled: !isEditable }, style: fieldStyle })] }), trailing] }));
75
+ }
76
+ const EngineInputComponent = EngineInput;
77
+ const capsuleHeight = resolvedHeight;
78
+ return ((0, jsx_runtime_1.jsx)(EngineInputComponent, { value: value, defaultValue: defaultValue, onChangeText: handleChangeText, placeholder: placeholder, invalid: invalid, disabled: disabled, secureTextEntry: secureTextEntry, keyboardType: keyboardType, autoCapitalize: autoCapitalize, autoCorrect: autoCorrect, multiline: multiline, minLines: minLines, size: size, accessibilityLabel: accessibilityLabel, returnKeyType: returnKeyType, onSubmitEditing: onSubmitEditing, onFocus: onFocus, onBlur: onBlur, maxLength: maxLength, editable: isEditable, height: capsuleHeight, tint: tint, variant: variant, interactive: interactive, leading: leading, trailing: trailing, focusRing: focusRing, accentColor: accentColor, style: style, contentStyle: undefined, inputStyle: fieldStyle, testID: testID }));
63
79
  });
64
80
  /** Vertical padding tuned per size so the text sits optically centred. */
65
81
  function height_padding(size) {
66
- return size === "sm" ? 6 : size === "lg" ? 12 : 9;
82
+ return size === "sm" ? 4 : size === "lg" ? 10 : 7;
67
83
  }
68
- /**
69
- * A multi-line field.
70
- *
71
- * Separate from Input so `multiline` cannot silently turn off the single-line
72
- * sizing, and so callers get a `rows` prop instead of guessing a pixel height.
73
- */
74
- exports.Textarea = (0, react_1.forwardRef)(function Textarea({ rows = 4, ...props }, ref) {
75
- return (0, jsx_runtime_1.jsx)(exports.Input, { ref: ref, ...props, multiline: true, minLines: rows });
76
- });
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Label = Label;
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 Label({ children, required = false, disabled = false, nativeID, 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 { Text: RNText } = (0, primitives_1.primitives)();
12
+ return ((0, jsx_runtime_1.jsxs)(RNText, { testID: testID, nativeID: nativeID, accessibilityRole: "text", accessibilityState: { disabled }, style: [
13
+ tokens_1.typeScale.label,
14
+ { color: disabled ? theme.muted : theme.foreground },
15
+ style,
16
+ ], ...{ "aria-required": required }, children: [children, required ? (0, jsx_runtime_1.jsx)(RNText, { style: { color: theme.destructive }, children: " *" }) : null] }));
17
+ }
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MorphGroup = 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 haptics_1 = require("./internal/haptics");
11
+ const motion_1 = require("./internal/motion");
12
+ /**
13
+ * A morphing group of capsules — ported from the engine's
14
+ * `LiquidGlassMorphGroup`, the design Binyam approved on real devices this week
15
+ * (capsules fuse when dragged together, spring home on release).
16
+ *
17
+ * With a glass renderer available the engine's own control mounts, carrying the
18
+ * approved morph behaviour. Without one — Expo Go, below every tier, or Reduce
19
+ * Transparency — the fallback floor renders the same capsules with solid
20
+ * surfaces, so the group is never invisible.
21
+ */
22
+ exports.MorphGroup = (0, react_1.forwardRef)(function MorphGroup({ items, onMerge, onItemPress, spacing = 28, gap = 12, height = 48, tint, variant = "regular", metal, providerId, style, textStyle, ...props }, ref) {
23
+ const isDark = (0, motion_1.useIsDark)();
24
+ const themeColors = isDark ? tokens_1.colors.dark : tokens_1.colors.light;
25
+ const { View, Pressable, Text: RNText } = (0, primitives_1.primitives)();
26
+ const capabilities = (0, GlassView_1.glassCapabilities)();
27
+ const EngineMorphGroup = (0, glass_routing_1.loadEngineControl)("MorphGroup");
28
+ const capsules = items.map((item) => ((0, jsx_runtime_1.jsxs)(Pressable, { accessibilityRole: "button", accessibilityLabel: item.label ?? item.key, disabled: !item.onPress, onPress: () => {
29
+ (0, haptics_1.hapticSelection)();
30
+ item.onPress?.();
31
+ onItemPress?.(item.key);
32
+ }, style: {
33
+ height,
34
+ borderRadius: height / 2,
35
+ backgroundColor: themeColors.fill,
36
+ alignItems: "center",
37
+ justifyContent: "center",
38
+ paddingHorizontal: 16,
39
+ ...style,
40
+ }, children: [item.icon, item.label ? (0, jsx_runtime_1.jsx)(RNText, { style: [textStyle, { fontSize: 15, fontWeight: "600" }], children: item.label }) : null] }, item.key)));
41
+ if (EngineMorphGroup && capabilities.supported) {
42
+ const EngineMorphGroupComponent = EngineMorphGroup;
43
+ return ((0, jsx_runtime_1.jsx)(EngineMorphGroupComponent, { items: items, onMerge: onMerge, onItemPress: onItemPress, spacing: spacing, gap: gap, height: height, tint: tint, variant: variant, metal: metal, providerId: providerId, style: style, textStyle: textStyle }));
44
+ }
45
+ // Fallback floor: the same capsules, solid, in the same row.
46
+ return ((0, jsx_runtime_1.jsx)(View, { style: { flexDirection: "row", gap, ...style }, testID: undefined, ...props, children: capsules }));
47
+ });