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,115 @@
1
+ import { Children, forwardRef, isValidElement } from "react";
2
+ import type { ComponentType, ReactNode } from "react";
3
+ import type { StyleProp, ViewStyle } from "react-native";
4
+
5
+ import { defaultRouter } from "./internal/glass-routing";
6
+ import { primitives } from "./internal/primitives";
7
+
8
+ export interface GlassStackLayerProps {
9
+ /** The layer's content. */
10
+ children?: ReactNode;
11
+ /** The layer's own layout. Layers all share the stack's box; this insets or pads inside it. */
12
+ style?: StyleProp<ViewStyle>;
13
+ /** Passed through so a layer is findable in tests and on-device inspectors. */
14
+ testID?: string;
15
+ [prop: string]: any;
16
+ }
17
+
18
+ /**
19
+ * A marker, not a wrapper. `GlassStack` reads the layer props off these elements
20
+ * and builds the real (provider-nested) tree itself, so a bare `Layer` renders
21
+ * its content in a plain view.
22
+ */
23
+ const GlassStackLayer = ({ children, style, ...props }: GlassStackLayerProps) => {
24
+ const { View } = primitives();
25
+ return (
26
+ <View pointerEvents="box-none" style={style} {...props}>
27
+ {children}
28
+ </View>
29
+ );
30
+ };
31
+ GlassStackLayer.displayName = "GlassStack.Layer";
32
+
33
+ export interface GlassStackProps {
34
+ /** The layers, bottom to top. Bare children are treated as layers of their own. */
35
+ children?: ReactNode;
36
+ /**
37
+ * The stack's box. Layers are absolute, so the stack must own a size — pass
38
+ * `flex: 1` or a fixed height. Defaults to `flex: 1`.
39
+ */
40
+ style?: StyleProp<ViewStyle>;
41
+ /** Passed to the underlying stack so tests can find it. */
42
+ testID?: string;
43
+ }
44
+
45
+ /**
46
+ * Declarative stacked glass — glass that refracts other glass.
47
+ *
48
+ * Layers go bottom to top. Glass inside layer *k* automatically reads a backdrop
49
+ * containing everything below it, including lower layers' finished glass, so a
50
+ * sheet over a glass pill shows the pill's frost re-refracted through its own
51
+ * lens. Layers are direct children of the stack; mount and unmount *content
52
+ * inside* a layer rather than the layer list itself.
53
+ *
54
+ * Every layer occupies the stack's box once, at an explicit z-order — the fix
55
+ * for the smeared, overlapping layers in the lab demo (§7.2). Below every glass
56
+ * tier the layers still render, as plain views, so a stack is never blank.
57
+ */
58
+ const GlassStackBase = forwardRef<any, GlassStackProps>(function GlassStack(
59
+ { children, style, testID }: GlassStackProps,
60
+ ref: any,
61
+ ) {
62
+ const decision = defaultRouter();
63
+ const Stack = decision.LiquidGlassStack;
64
+
65
+ const all = Children.toArray(children);
66
+ const layers = all.map((child) =>
67
+ isValidElement(child) && child.type === GlassStackLayer
68
+ ? (child.props as GlassStackLayerProps)
69
+ : ({ children: child } as GlassStackLayerProps),
70
+ );
71
+
72
+ // Without a stack there is nothing to build; render the layers as plain
73
+ // views in order, so the content is visible rather than dropped.
74
+ if (!Stack) {
75
+ const { View } = primitives();
76
+ return (
77
+ <View ref={ref} testID={testID} style={style}>
78
+ {layers.map((layer, index) => (
79
+ <View key={index} pointerEvents="box-none" style={layer.style}>
80
+ {layer.children}
81
+ </View>
82
+ ))}
83
+ </View>
84
+ );
85
+ }
86
+
87
+ // The engine's stack reads its layers off elements typed as its own Layer
88
+ // component. Glacia's markers are translated into those, and bare children are
89
+ // wrapped here too, so the engine never sees a child it would drop.
90
+ const EngineLayer = (Stack as any).Layer as ComponentType<any> | undefined;
91
+ const engineLayers = EngineLayer
92
+ ? layers.map((layer, index) => (
93
+ <EngineLayer key={index} style={layer.style}>
94
+ {layer.children}
95
+ </EngineLayer>
96
+ ))
97
+ : (layers.map((layer) => layer.children) as ReactNode[]);
98
+
99
+ return (
100
+ <Stack ref={ref} style={style} testID={testID}>
101
+ {engineLayers}
102
+ </Stack>
103
+ );
104
+ });
105
+
106
+ /**
107
+ * The stacked-glass primitive. Renders the engine's stack, which builds the
108
+ * nested provider topology for its layers; below every glass tier it renders
109
+ * the plain layer views.
110
+ */
111
+ export const GlassStack = Object.assign(GlassStackBase, {
112
+ Layer: GlassStackLayer,
113
+ }) as typeof GlassStackBase & { Layer: typeof GlassStackLayer };
114
+
115
+ GlassStack.displayName = "GlassStack";
package/src/index.ts CHANGED
@@ -1,4 +1,18 @@
1
- export { Glass, type GlassProps } from "./Glass";
1
+ export { Glass, GlassView, type GlassProps, type GlassViewProps } from "./Glass";
2
+ export { isGlassSupported } from "./internal/GlassView";
3
+ export {
4
+ supportsGlass,
5
+ supportsNativeGlass,
6
+ readCapabilities,
7
+ loadEngineControl,
8
+ ENGINE_CONTROL_NAMES,
9
+ type GlassCapabilities,
10
+ } from "./internal/glass-routing";
11
+ export type { SurfaceProfile } from "./internal/material";
12
+ export { GlassContainer, type NativeGlassContainerProps } from "./internal/GlassContainer";
13
+ export { GlassProvider, type GlassProviderProps } from "./glass-provider";
14
+ export { GlassBackdrop, type GlassBackdropProps } from "./internal/GlassBackdrop";
15
+ export { GlassStack, type GlassStackProps } from "./glass-stack";
2
16
  export { Button, type ButtonProps } from "./Button";
3
17
  export { Switch, type SwitchProps } from "./Switch";
4
18
  export { Slider, type SliderProps } from "./Slider";
@@ -19,206 +33,50 @@ export {
19
33
  type CardProps,
20
34
  } from "./Card";
21
35
  // Forms.
22
- export {
23
- Input,
24
- Textarea,
25
- type InputProps,
26
- type TextareaProps,
27
- } from "./Input";
28
- export {
29
- Label,
30
- Field,
31
- Checkbox,
32
- RadioGroup,
33
- Select,
34
- type LabelProps,
35
- type FieldProps,
36
- type CheckboxProps,
37
- type RadioOption,
38
- type RadioGroupProps,
39
- type SelectOption,
40
- type SelectProps,
41
- } from "./Form";
36
+ export { Input, type InputProps } from "./Input";
37
+ export { Textarea, type TextareaProps } from "./Textarea";
38
+ export { Label, type LabelProps } from "./Label";
39
+ export { Field, type FieldProps } from "./Field";
40
+ export { Checkbox, type CheckboxProps } from "./Checkbox";
41
+ export { RadioGroup, type RadioOption, type RadioGroupProps } from "./RadioGroup";
42
+ export { Select, type SelectOption, type SelectProps } from "./Select";
42
43
  // Overlays.
43
- export {
44
- Dialog,
45
- DialogTrigger,
46
- AlertDialog,
47
- ActionSheet,
48
- type DialogProps,
49
- type AlertDialogProps,
50
- type ActionSheetProps,
51
- type ActionSheetOption,
52
- } from "./Dialog";
53
- // AI conversation primitives.
54
- export {
55
- NativePlan,
56
- NativeSources,
57
- NativeResponse,
58
- NativeTask,
59
- NativeSoundwave,
60
- NativeThinkingOrb,
61
- NativePanelside,
62
- NativeAIInput,
63
- NativeImageGeneration,
64
- type NativePlanProps,
65
- type NativePlanStep,
66
- type NativeSourcesProps,
67
- type NativeSource,
68
- type NativeResponseProps,
69
- type NativeTaskProps,
70
- type NativeSoundwaveProps,
71
- type NativeThinkingOrbProps,
72
- type NativePanelsideProps,
73
- type NativePanelNavItem,
74
- type NativeAIInputProps,
75
- type NativeImageGenerationProps,
76
- type NativeGeneratedImage,
77
- } from "./ai";
78
- // Data display.
79
- export {
80
- NativeTable,
81
- NativeScrollArea,
82
- type NativeTableProps,
83
- type NativeTableColumn,
84
- type NativeTableRow,
85
- type NativeScrollAreaProps,
86
- } from "./Table";
87
- // Charts, drawn with react-native-svg using the same maths as the web package.
88
- export * from "./charts";
44
+ export { Dialog, DialogTrigger, type DialogProps, type DialogTriggerProps } from "./Dialog";
45
+ export { AlertDialog, type AlertDialogProps } from "./AlertDialog";
46
+ export { Alert, type AlertProps, type AlertTone } from "./Alert";
47
+ export { ActionSheet, type ActionSheetProps, type ActionSheetOption } from "./ActionSheet";
48
+ export { Collapsible, type CollapsibleProps } from "./Collapsible";
49
+ export { ContextMenu, type ContextMenuProps, type ContextMenuItem } from "./ContextMenu";
50
+ export { DropdownMenu, type DropdownMenuProps, type DropdownMenuItem } from "./DropdownMenu";
51
+ export { Popover, type PopoverProps } from "./Popover";
52
+ export { Tooltip, type TooltipProps } from "./Tooltip";
89
53
  // Basics.
90
54
  export { Text, type TextProps, type TextVariant } from "./Text";
91
- export {
92
- Avatar,
93
- Badge,
94
- Separator,
95
- Skeleton,
96
- Spinner,
97
- Progress,
98
- initialsOf,
99
- type AvatarProps,
100
- type AvatarSize,
101
- type BadgeProps,
102
- type SeparatorProps,
103
- type SkeletonProps,
104
- type SpinnerProps,
105
- type SpinnerSize,
106
- type ProgressProps,
107
- type ProgressVariant,
108
- Rating,
109
- type RatingProps,
110
- NativeImage,
111
- type NativeImageProps,
112
- } from "./Display";
113
- // Feedback and display.
114
- export {
115
- Toast,
116
- Banner,
117
- List,
118
- ListItem,
119
- ListSection,
120
- Accordion,
121
- ToastViewport,
122
- type ToastProps,
123
- type ToastAction,
124
- type ToastItem,
125
- type ToastViewportProps,
126
- type BannerProps,
127
- type ListProps,
128
- type ListItemProps,
129
- type ListSwipeAction,
130
- type ListSectionProps,
131
- type AccordionProps,
132
- type AccordionSection,
133
- } from "./Feedback";
55
+ export { Avatar, initialsOf, type AvatarProps, type AvatarSize } from "./Avatar";
56
+ export { Badge, type BadgeProps } from "./Badge";
57
+ export { Separator, type SeparatorProps } from "./Separator";
58
+ export { Skeleton, type SkeletonProps } from "./Skeleton";
59
+ export { Progress, type ProgressProps, type ProgressVariant } from "./Progress";
60
+ export { Toast, type ToastProps } from "./Toast";
61
+ export { Accordion, type AccordionProps, type AccordionSection } from "./Accordion";
134
62
  // Bars, buttons and navigation.
135
63
  export {
136
- SearchBar,
137
64
  Chip,
138
- FAB,
139
65
  IconButton,
140
- AppBar,
141
- type SearchBarProps,
66
+ Toolbar,
142
67
  type ChipProps,
143
- type FABProps,
144
68
  type IconButtonProps,
145
- type AppBarProps,
146
- type AppBarAction,
147
- FABGroup,
148
- type FABGroupProps,
149
- type FABGroupAction,
69
+ type ToolbarProps,
150
70
  } from "./Bars";
151
- // Overlays.
152
- export {
153
- Menu,
154
- Sheet,
155
- Drawer,
156
- anchorPopover,
157
- resolveSnapPoint,
158
- nearestSnapPoint,
159
- type MenuProps,
160
- type MenuItem,
161
- type SheetProps,
162
- type DrawerProps,
163
- } from "./Overlays";
164
- // Carousel.
165
- export {
166
- Carousel,
167
- PageControl,
168
- type CarouselProps,
169
- type PageControlProps,
170
- } from "./Carousel";
71
+ // Glass composition primitives ported from the engine this wave.
72
+ export { Group, type GroupProps } from "./Group";
73
+ export { MorphGroup, type MorphGroupProps, type MorphGroupItem } from "./MorphGroup";
74
+ export { Scrim, type ScrimProps } from "./Scrim";
75
+ export { Sheet, type SheetProps } from "./Sheet";
171
76
  // Forms and pickers.
172
- export {
173
- Stepper,
174
- Toggle,
175
- ToggleGroup,
176
- InputOTP,
177
- ButtonGroup,
178
- type StepperProps,
179
- type ToggleProps,
180
- type ToggleGroupProps,
181
- type ToggleGroupItem,
182
- type InputOTPProps,
183
- type ButtonGroupProps,
184
- type ButtonGroupItem,
185
- ColorPicker,
186
- DEFAULT_PALETTE,
187
- hexToRgb,
188
- rgbToHex,
189
- hueGradientColors,
190
- type ColorPickerProps,
191
- Combobox,
192
- type ComboboxProps,
193
- type ComboboxOption,
194
- } from "./Forms2";
195
- export {
196
- Calendar,
197
- DatePicker,
198
- TimePicker,
199
- monthGrid,
200
- startOfDay,
201
- sameDay,
202
- parseTime,
203
- formatTime,
204
- WEEKDAYS,
205
- MONTHS,
206
- type CalendarProps,
207
- type CalendarCell,
208
- type DatePickerProps,
209
- type TimePickerProps,
210
- } from "./Pickers";
211
- // Chat. Bubbles are flat tints; the composer (NativeAIInput) is the glass.
212
- export {
213
- Message,
214
- MessageBubble,
215
- MessageAttachment,
216
- type MessageProps,
217
- type MessageBubbleProps,
218
- type MessageAttachmentProps,
219
- } from "./Message";
220
- export { isGlassSupported } from "./internal/GlassView";
221
- export { GlassContainer, type NativeGlassContainerProps } from "./internal/GlassContainer";
77
+ export { Stepper, type StepperProps } from "./Stepper";
78
+ export { Toggle, type ToggleProps } from "./Toggle";
79
+ export { ToggleGroup, type ToggleGroupProps, type ToggleGroupItem } from "./ToggleGroup";
222
80
  export {
223
81
  colors,
224
82
  controlSizes,
@@ -0,0 +1,60 @@
1
+ import { forwardRef, type ReactNode } from "react";
2
+ import type { StyleProp, ViewStyle } from "react-native";
3
+
4
+ import { primitives } from "./primitives";
5
+ import { loadBackdropScope } from "./glass-routing";
6
+
7
+ export interface GlassBackdropProps {
8
+ /**
9
+ * The scroll view inside this subtree whose content the glass photographs in
10
+ * content coordinates. Usually left out: the first scroll view found in the
11
+ * subtree is the one tracked, which is what a list screen wants.
12
+ */
13
+ children?: ReactNode;
14
+ style?: StyleProp<ViewStyle>;
15
+ testID?: string;
16
+ [prop: string]: any;
17
+ }
18
+
19
+ /**
20
+ * A bounded backdrop scope for glass that sits over scrolling content.
21
+ *
22
+ * Inside a `GlassBackdrop`, glass photographs the scroll content in CONTENT
23
+ * coordinates rather than photographing the window. A pane dragged over a list
24
+ * then keeps refracting the right rows while it moves, instead of showing a
25
+ * still frame of where the list used to be until the finger lifts.
26
+ *
27
+ * **iOS 16.4–25 with Metal only.** iOS 26+ uses Apple's own glass, which reads
28
+ * the live window and needs no scope; Android has its own provider contract
29
+ * and this component is a plain wrapper there; below the floor it is the
30
+ * fallback surface and a plain wrapper here. On every platform it lays out its
31
+ * children exactly once, so wrapping is free where it does nothing.
32
+ *
33
+ * The scope is a hint, not a guarantee. Sticky headers, parallax, nested
34
+ * scrollers, video and async image loads do not fit the content-space model;
35
+ * the renderer detects what it can and falls back to fresh window captures for
36
+ * that scope rather than showing stale rows.
37
+ */
38
+ export const GlassBackdrop = forwardRef<any, GlassBackdropProps>(
39
+ function GlassBackdrop({ children, style, testID, ...props }, ref) {
40
+ const { View } = primitives();
41
+
42
+ const NativeView = loadBackdropScope();
43
+
44
+ // No native scope (iOS 26+, Android, web, Expo Go): a wrapper that changes
45
+ // nothing, so the same tree runs everywhere.
46
+ if (!NativeView) {
47
+ return (
48
+ <View ref={ref} style={style} testID={testID} {...props}>
49
+ {children}
50
+ </View>
51
+ );
52
+ }
53
+
54
+ return (
55
+ <NativeView ref={ref} style={style} testID={testID} {...props}>
56
+ {children}
57
+ </NativeView>
58
+ );
59
+ },
60
+ );
@@ -2,13 +2,26 @@ import { forwardRef, type ReactNode } from "react";
2
2
  import type { StyleProp, ViewStyle } from "react-native";
3
3
 
4
4
  import { FallbackGlassView } from "./fallback";
5
- import { defaultRouter } from "./glass-routing";
5
+ import { defaultRouter, type GlassRouter, type GlassCapabilities } from "./glass-routing";
6
+ import type { SurfaceProfile } from "./material";
6
7
  import { useIsDark } from "./motion";
7
8
 
8
9
  export interface NativeGlassProps {
9
10
  effect?: "clear" | "regular" | "none";
10
11
  tintColor?: string;
11
12
  interactive?: boolean;
13
+ /**
14
+ * Which web surface profile this is (panel, control, field, overlay, hint,
15
+ * rail). The fallback uses it to pick blur, rim brightness and highlight —
16
+ * read by the fallback branch only; Apple's material replaces the stack on
17
+ * iOS 26, so the prop is not forwarded there.
18
+ */
19
+ surface?: SurfaceProfile;
20
+ /**
21
+ * True while the surface is held, so the fallback can fade its specular glow
22
+ * in. Not forwarded to Apple's view, which draws its own press effect.
23
+ */
24
+ pressed?: boolean;
12
25
  /** Passed to whichever surface renders, so tests can find the glass itself. */
13
26
  testID?: string;
14
27
  style?: StyleProp<ViewStyle>;
@@ -27,13 +40,12 @@ export interface NativeGlassProps {
27
40
  }
28
41
 
29
42
  /**
30
- * The installed `@callstack/liquid-glass` module's routing decision.
31
- *
32
- * Resolved lazily and memoised on first use, rather than at module load, so the
33
- * decision is taken when a surface first renders. On a device that is the same
34
- * answer either way — `isLiquidGlassSupported` is a constant of the installed
35
- * build — but it keeps the choice a property of the module rather than of
36
- * import order, which is what makes both branches reachable in tests.
43
+ * The installed engine module's routing decision, memoised on first use, rather
44
+ * than at module load, so the decision is taken when a surface first renders.
45
+ * On a device that is the same answer either way — the engine's capability flag
46
+ * is a constant of the installed build — but it keeps the choice a property of
47
+ * the module rather than of import order, which is what makes both branches
48
+ * reachable in tests.
37
49
  */
38
50
  let cachedRouter: ReturnType<typeof defaultRouter> | null = null;
39
51
 
@@ -47,13 +59,35 @@ export function resetGlassRouter() {
47
59
  cachedRouter = null;
48
60
  }
49
61
 
62
+ /**
63
+ * The memoised routing decision — the package's single source of truth for
64
+ * which glass surface a component may mount. Read through the same router the
65
+ * surface itself uses, so a component and its surface can never disagree about
66
+ * the mount tier.
67
+ */
68
+ export function glassDecision(): GlassRouter {
69
+ return router();
70
+ }
71
+
72
+ /**
73
+ * The capability verdicts the package switches on, read through the same
74
+ * memoised decision as the surface — the one place a component's engine branch
75
+ * and its fallback floor are chosen from.
76
+ */
77
+ export function glassCapabilities(): GlassCapabilities {
78
+ const decision = router();
79
+ return { supported: decision.supported, native: decision.native === true };
80
+ }
81
+
50
82
  /** Whether this build renders Apple's glass. */
51
83
  export const isGlassSupported = defaultRouter().supported;
52
84
 
53
85
  /**
54
86
  * Platform Glass View — the single place a glass surface is chosen:
55
- * - iOS 26+: Real UIGlassEffect via @callstack/liquid-glass
56
- * - iOS < 26 / Android / Expo Go: translucent tint View with identical layout
87
+ * - iOS 26+: Real `UIGlassEffect` via the vendored engine's native view
88
+ * - iOS 16.4–25: the engine's Metal renderer over a captured backdrop
89
+ * - Android 13+: the engine's AGSL renderer over a recorded backdrop
90
+ * - Everywhere else: Glacia's own glass fallback of identical shape
57
91
  *
58
92
  * Reduce Transparency is honoured on the fallback branch only: there the
59
93
  * translucent tint is replaced by the theme's solid glass colour, with the same
@@ -68,6 +102,8 @@ export const GlassView = forwardRef<any, NativeGlassProps>(function GlassView(
68
102
  effect = "regular",
69
103
  tintColor,
70
104
  interactive = false,
105
+ surface = "panel",
106
+ pressed,
71
107
  testID,
72
108
  style,
73
109
  children,
@@ -78,28 +114,44 @@ export const GlassView = forwardRef<any, NativeGlassProps>(function GlassView(
78
114
  ) {
79
115
  const isDark = useIsDark(isDarkProp);
80
116
  const decision = router();
81
- if (decision.supported && decision.LiquidGlassView) {
117
+
118
+ // A deliberate "no surface here" (a ghost button) never mounts a material:
119
+ // the engine has no none-variant and the fallback paints nothing, so the
120
+ // content renders bare in both.
121
+ const bare = effect === "none";
122
+
123
+ if (!bare && decision.supported && decision.LiquidGlassView) {
82
124
  const LiquidGlassView = decision.LiquidGlassView;
125
+ const variant = effect === "clear" ? "clear" : "regular";
126
+ const glow = pressed === undefined ? props.glow : { progress: pressed ? 1 : 0, lens: true };
127
+
128
+ // The engine owns the material; Glacia's own surface parameters stop at
129
+ // the branch. Everything else (accessibility contract, provider pairing,
130
+ // the adaptive sensor, an externally driven press) rides through.
83
131
  return (
84
132
  <LiquidGlassView
133
+ {...props}
85
134
  ref={ref}
86
- effect={effect}
87
- tintColor={tintColor}
135
+ variant={variant}
136
+ tint={tintColor}
88
137
  interactive={interactive}
89
- testID={testID}
138
+ glow={glow}
90
139
  style={style}
91
- {...props}
92
- >
93
- {children}
94
- </LiquidGlassView>
140
+ testID={testID}
141
+ children={children}
142
+ />
95
143
  );
96
144
  }
97
145
 
146
+ // Unsupported, or a deliberate "no surface": the fallback floor renders —
147
+ // with the same shape, states and materials as the glass would have.
98
148
  return (
99
149
  <FallbackGlassView
100
150
  ref={ref}
101
151
  effect={effect}
102
152
  tintColor={tintColor}
153
+ surface={surface}
154
+ pressed={pressed}
103
155
  testID={testID}
104
156
  isDark={isDark}
105
157
  style={style}
@@ -0,0 +1,19 @@
1
+ // The bare-React-Native blur backend, isolated so platform resolution can
2
+ // choose whether this file exists at all.
3
+ //
4
+ // `@react-native-community/blur` ships BlurView.ios.js / BlurView.android.js
5
+ // with no web build, so a web bundle that statically requires it fails to
6
+ // resolve `./components/BlurView`. Metro uses `blur-community.web.ts` for the
7
+ // web platform instead, and this module is only ever bundled natively.
8
+
9
+ declare const require: any;
10
+
11
+ /** The community `BlurView`, or null when the package is not installed. */
12
+ export function loadCommunityBlurView(): any | null {
13
+ try {
14
+ const community = require("@react-native-community/blur");
15
+ return community?.BlurView ?? null;
16
+ } catch {
17
+ return null;
18
+ }
19
+ }
@@ -0,0 +1,7 @@
1
+ // Web: the community blur has no web build, so it is never loaded and never
2
+ // resolved by Metro. `expo-blur` covers the web fallback through CSS blur.
3
+
4
+ /** Always null on web. */
5
+ export function loadCommunityBlurView(): any | null {
6
+ return null;
7
+ }