glacia-native 0.5.2 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (381) hide show
  1. package/README.md +84 -17
  2. package/lib/module/Accordion.js +58 -0
  3. package/lib/module/ActionSheet.js +38 -0
  4. package/lib/module/Alert.js +23 -0
  5. package/lib/module/AlertDialog.js +47 -0
  6. package/lib/module/Avatar.js +48 -0
  7. package/lib/module/Badge.js +36 -0
  8. package/lib/module/Bars.js +13 -268
  9. package/lib/module/Button.js +57 -39
  10. package/lib/module/Card.js +31 -19
  11. package/lib/module/Checkbox.js +42 -0
  12. package/lib/module/Chip.js +80 -0
  13. package/lib/module/Collapsible.js +26 -0
  14. package/lib/module/ContextMenu.js +33 -0
  15. package/lib/module/Dialog.js +39 -123
  16. package/lib/module/DropdownMenu.js +33 -0
  17. package/lib/module/Field.js +22 -0
  18. package/lib/module/Glass.js +10 -3
  19. package/lib/module/Group.js +36 -0
  20. package/lib/module/IconButton.js +40 -0
  21. package/lib/module/Input.js +43 -38
  22. package/lib/module/Label.js +17 -0
  23. package/lib/module/MorphGroup.js +47 -0
  24. package/lib/module/Popover.js +29 -0
  25. package/lib/module/Progress.js +32 -0
  26. package/lib/module/RadioGroup.js +51 -0
  27. package/lib/module/Scrim.js +44 -0
  28. package/lib/module/SegmentedControl.js +70 -63
  29. package/lib/module/Select.js +51 -0
  30. package/lib/module/Separator.js +25 -0
  31. package/lib/module/Sheet.js +51 -0
  32. package/lib/module/Skeleton.js +48 -0
  33. package/lib/module/Slider.js +45 -34
  34. package/lib/module/Stepper.js +167 -0
  35. package/lib/module/Switch.js +45 -55
  36. package/lib/module/TabBar.js +50 -44
  37. package/lib/module/Textarea.js +18 -0
  38. package/lib/module/Toast.js +55 -0
  39. package/lib/module/Toggle.js +47 -0
  40. package/lib/module/ToggleGroup.js +56 -0
  41. package/lib/module/Toolbar.js +37 -0
  42. package/lib/module/Tooltip.js +31 -0
  43. package/lib/module/glass-provider.js +28 -0
  44. package/lib/module/glass-stack.js +61 -0
  45. package/lib/module/index.js +78 -109
  46. package/lib/module/internal/GlassBackdrop.js +36 -0
  47. package/lib/module/internal/GlassView.js +43 -11
  48. package/lib/module/internal/blur-community.js +20 -0
  49. package/lib/module/internal/blur-community.web.js +9 -0
  50. package/lib/module/internal/blur.js +6 -9
  51. package/lib/module/internal/glass-routing.js +154 -30
  52. package/lib/module/internal/initials.js +12 -0
  53. package/lib/module/internal/overlay.js +147 -0
  54. package/lib/module/internal/primitives.js +16 -0
  55. package/lib/typescript/Accordion.d.ts +22 -0
  56. package/lib/typescript/ActionSheet.d.ts +24 -0
  57. package/lib/typescript/Alert.d.ts +15 -0
  58. package/lib/typescript/AlertDialog.d.ts +17 -0
  59. package/lib/typescript/Avatar.d.ts +22 -0
  60. package/lib/typescript/Badge.d.ts +12 -0
  61. package/lib/typescript/Bars.d.ts +3 -188
  62. package/lib/typescript/Button.d.ts +44 -10
  63. package/lib/typescript/Card.d.ts +30 -3
  64. package/lib/typescript/Checkbox.d.ts +14 -0
  65. package/lib/typescript/Chip.d.ts +19 -0
  66. package/lib/typescript/Collapsible.d.ts +17 -0
  67. package/lib/typescript/ContextMenu.d.ts +23 -0
  68. package/lib/typescript/Dialog.d.ts +8 -68
  69. package/lib/typescript/DropdownMenu.d.ts +23 -0
  70. package/lib/typescript/Field.d.ts +19 -0
  71. package/lib/typescript/Glass.d.ts +11 -2
  72. package/lib/typescript/Group.d.ts +35 -0
  73. package/lib/typescript/IconButton.d.ts +21 -0
  74. package/lib/typescript/Input.d.ts +17 -18
  75. package/lib/typescript/Label.d.ts +14 -0
  76. package/lib/typescript/MorphGroup.d.ts +46 -0
  77. package/lib/typescript/Popover.d.ts +17 -0
  78. package/lib/typescript/Progress.d.ts +13 -0
  79. package/lib/typescript/RadioGroup.d.ts +21 -0
  80. package/lib/typescript/Scrim.d.ts +33 -0
  81. package/lib/typescript/SegmentedControl.d.ts +24 -13
  82. package/lib/typescript/Select.d.ts +19 -0
  83. package/lib/typescript/Separator.d.ts +10 -0
  84. package/lib/typescript/Sheet.d.ts +45 -0
  85. package/lib/typescript/Skeleton.d.ts +10 -0
  86. package/lib/typescript/Slider.d.ts +15 -7
  87. package/lib/typescript/Stepper.d.ts +49 -0
  88. package/lib/typescript/Switch.d.ts +19 -12
  89. package/lib/typescript/TabBar.d.ts +18 -6
  90. package/lib/typescript/Textarea.d.ts +6 -0
  91. package/lib/typescript/Toast.d.ts +40 -0
  92. package/lib/typescript/Toggle.d.ts +21 -0
  93. package/lib/typescript/ToggleGroup.d.ts +22 -0
  94. package/lib/typescript/Toolbar.d.ts +35 -0
  95. package/lib/typescript/Tooltip.d.ts +16 -0
  96. package/lib/typescript/glass-provider.d.ts +34 -0
  97. package/lib/typescript/glass-stack.d.ts +54 -0
  98. package/lib/typescript/index.d.ts +38 -17
  99. package/lib/typescript/internal/GlassBackdrop.d.ts +33 -0
  100. package/lib/typescript/internal/GlassView.d.ts +18 -2
  101. package/lib/typescript/internal/blur-community.d.ts +2 -0
  102. package/lib/typescript/internal/blur-community.web.d.ts +2 -0
  103. package/lib/typescript/internal/glass-routing.d.ts +83 -15
  104. package/lib/typescript/internal/initials.d.ts +2 -0
  105. package/lib/typescript/internal/overlay.d.ts +74 -0
  106. package/lib/typescript/internal/primitives.d.ts +11 -0
  107. package/package.json +4 -2
  108. package/src/Accordion.tsx +165 -0
  109. package/src/ActionSheet.tsx +149 -0
  110. package/src/Alert.tsx +85 -0
  111. package/src/AlertDialog.tsx +124 -0
  112. package/src/Avatar.tsx +102 -0
  113. package/src/Badge.tsx +80 -0
  114. package/src/Bars.tsx +10 -807
  115. package/src/Button.tsx +196 -67
  116. package/src/Card.tsx +105 -32
  117. package/src/Checkbox.tsx +98 -0
  118. package/src/Chip.tsx +149 -0
  119. package/src/Collapsible.tsx +66 -0
  120. package/src/ContextMenu.tsx +103 -0
  121. package/src/Dialog.tsx +85 -335
  122. package/src/DropdownMenu.tsx +103 -0
  123. package/src/Field.tsx +65 -0
  124. package/src/Glass.tsx +15 -5
  125. package/src/Group.tsx +98 -0
  126. package/src/IconButton.tsx +110 -0
  127. package/src/Input.tsx +139 -87
  128. package/src/Label.tsx +56 -0
  129. package/src/MorphGroup.tsx +134 -0
  130. package/src/Popover.tsx +81 -0
  131. package/src/Progress.tsx +83 -0
  132. package/src/RadioGroup.tsx +122 -0
  133. package/src/Scrim.tsx +94 -0
  134. package/src/SegmentedControl.tsx +132 -99
  135. package/src/Select.tsx +136 -0
  136. package/src/Separator.tsx +52 -0
  137. package/src/Sheet.tsx +139 -0
  138. package/src/Skeleton.tsx +77 -0
  139. package/src/Slider.tsx +84 -47
  140. package/src/Stepper.tsx +315 -0
  141. package/src/Switch.tsx +81 -73
  142. package/src/TabBar.tsx +106 -93
  143. package/src/Textarea.tsx +34 -0
  144. package/src/Toast.tsx +131 -0
  145. package/src/Toggle.tsx +113 -0
  146. package/src/ToggleGroup.tsx +129 -0
  147. package/src/Toolbar.tsx +111 -0
  148. package/src/Tooltip.tsx +79 -0
  149. package/src/engine/CHANGELOG.md +430 -0
  150. package/src/engine/NOTICE +54 -0
  151. package/src/engine/README.md +975 -0
  152. package/src/engine/android/build.gradle +18 -0
  153. package/src/engine/android/src/main/AndroidManifest.xml +2 -0
  154. package/src/engine/android/src/main/java/expo/modules/liquidglass/ExpoLiquidGlassModule.kt +174 -0
  155. package/src/engine/android/src/main/java/expo/modules/liquidglass/GlassConstants.kt +7 -0
  156. package/src/engine/android/src/main/java/expo/modules/liquidglass/LiquidGlassContainerView.kt +16 -0
  157. package/src/engine/android/src/main/java/expo/modules/liquidglass/LiquidGlassProviderView.kt +165 -0
  158. package/src/engine/android/src/main/java/expo/modules/liquidglass/LiquidGlassView.kt +1731 -0
  159. package/src/engine/android/src/main/java/expo/modules/liquidglass/enums/GlassEnums.kt +171 -0
  160. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/BackdropGraph.kt +146 -0
  161. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/BackdropSource.kt +53 -0
  162. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/ContinuousCorners.kt +188 -0
  163. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/CornerRadii.kt +62 -0
  164. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassAppearance.kt +352 -0
  165. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassDebug.kt +109 -0
  166. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassEnvironment.kt +139 -0
  167. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassHdr.kt +85 -0
  168. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassLuminanceProbe.kt +189 -0
  169. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassPressAnimator.kt +264 -0
  170. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassProgressiveBlur.kt +249 -0
  171. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassShaderCache.kt +256 -0
  172. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassShaderSource.kt +845 -0
  173. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassTier.kt +63 -0
  174. package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/ProviderRegistry.kt +71 -0
  175. package/src/engine/android/src/main/java/expo/modules/liquidglass/records/GlassRecords.kt +288 -0
  176. package/src/engine/index.ts +24 -0
  177. package/src/engine/ios/Enums/GlassBlurDirection.swift +21 -0
  178. package/src/engine/ios/Enums/GlassVariant.swift +86 -0
  179. package/src/engine/ios/ExpoLiquidGlass.podspec +93 -0
  180. package/src/engine/ios/ExpoLiquidGlassModule.swift +77 -0
  181. package/src/engine/ios/Glass/BackdropCapturer.swift +811 -0
  182. package/src/engine/ios/Glass/ContinuousCorners.swift +165 -0
  183. package/src/engine/ios/Glass/GlassBackdrop.swift +176 -0
  184. package/src/engine/ios/Glass/GlassFramePhase.swift +126 -0
  185. package/src/engine/ios/Glass/GlassFrameScheduler.swift +261 -0
  186. package/src/engine/ios/Glass/GlassPressAnimator.swift +250 -0
  187. package/src/engine/ios/Glass/GlassRenderContext.swift +168 -0
  188. package/src/engine/ios/Glass/GlassRenderer.swift +186 -0
  189. package/src/engine/ios/Glass/GlassSurfaceView.swift +452 -0
  190. package/src/engine/ios/Glass/NonRenderableView.swift +54 -0
  191. package/src/engine/ios/Glass/StripCache.swift +545 -0
  192. package/src/engine/ios/Records/GlassCornerRadii.swift +79 -0
  193. package/src/engine/ios/Records/GlassMetalOptions.swift +180 -0
  194. package/src/engine/ios/Records/GlassRefractionCurve.swift +14 -0
  195. package/src/engine/ios/Shaders/LiquidGlass.metal +480 -0
  196. package/src/engine/ios/Shaders/bundle-marker.txt +6 -0
  197. package/src/engine/ios/Views/LiquidGlassContainerView.swift +99 -0
  198. package/src/engine/ios/Views/LiquidGlassView.swift +859 -0
  199. package/src/engine/package.json +70 -0
  200. package/src/engine/src/components/LiquidGlassButton/LiquidGlassButton.tsx +424 -0
  201. package/src/engine/src/components/LiquidGlassCard/LiquidGlassCard.tsx +98 -0
  202. package/src/engine/src/components/LiquidGlassChip/LiquidGlassChip.tsx +65 -0
  203. package/src/engine/src/components/LiquidGlassGroup/LiquidGlassGroup.tsx +350 -0
  204. package/src/engine/src/components/LiquidGlassIconButton/LiquidGlassIconButton.tsx +24 -0
  205. package/src/engine/src/components/LiquidGlassMorphGroup/LiquidGlassMorphGroup.tsx +434 -0
  206. package/src/engine/src/components/LiquidGlassScrim/LiquidGlassScrim.tsx +100 -0
  207. package/src/engine/src/components/LiquidGlassSegmentedControl/LiquidGlassSegmentedControl.tsx +213 -0
  208. package/src/engine/src/components/LiquidGlassSheet/LiquidGlassSheet.tsx +218 -0
  209. package/src/engine/src/components/LiquidGlassSlider/LiquidGlassSlider.tsx +327 -0
  210. package/src/engine/src/components/LiquidGlassStepper/LiquidGlassStepper.tsx +321 -0
  211. package/src/engine/src/components/LiquidGlassSwitch/LiquidGlassSwitch.tsx +296 -0
  212. package/src/engine/src/components/LiquidGlassTabBar/LiquidGlassTabBar.tsx +952 -0
  213. package/src/engine/src/components/LiquidGlassTextInput/LiquidGlassTextInput.tsx +151 -0
  214. package/src/engine/src/components/LiquidGlassToast/LiquidGlassToast.tsx +169 -0
  215. package/src/engine/src/components/LiquidGlassToolbar/LiquidGlassToolbar.tsx +124 -0
  216. package/src/engine/src/components/index.ts +16 -0
  217. package/src/engine/src/constants/index.ts +4 -0
  218. package/src/engine/src/constants/metal.constants.ts +327 -0
  219. package/src/engine/src/constants/metrics.constants.ts +325 -0
  220. package/src/engine/src/constants/springs.constants.ts +107 -0
  221. package/src/engine/src/constants/styles.constants.ts +12 -0
  222. package/src/engine/src/context/glass-group.context.ts +65 -0
  223. package/src/engine/src/context/index.ts +6 -0
  224. package/src/engine/src/core/components/LiquidGlassContainer/LiquidGlassContainer.tsx +32 -0
  225. package/src/engine/src/core/components/LiquidGlassContainer/index.ts +1 -0
  226. package/src/engine/src/core/components/LiquidGlassProvider/LiquidGlassProvider.tsx +66 -0
  227. package/src/engine/src/core/components/LiquidGlassProvider/index.ts +1 -0
  228. package/src/engine/src/core/components/LiquidGlassStack/LiquidGlassStack.tsx +184 -0
  229. package/src/engine/src/core/components/LiquidGlassStack/index.ts +1 -0
  230. package/src/engine/src/core/components/LiquidGlassView/LiquidGlassView.tsx +126 -0
  231. package/src/engine/src/core/components/LiquidGlassView/index.ts +1 -0
  232. package/src/engine/src/core/components/index.ts +4 -0
  233. package/src/engine/src/core/constants/glass.constants.ts +57 -0
  234. package/src/engine/src/core/constants/index.ts +20 -0
  235. package/src/engine/src/core/constants/native.constants.ts +16 -0
  236. package/src/engine/src/core/context/glass-stack.context.ts +30 -0
  237. package/src/engine/src/core/context/index.ts +4 -0
  238. package/src/engine/src/core/enum/index.ts +12 -0
  239. package/src/engine/src/core/index.ts +1 -0
  240. package/src/engine/src/core/interfaces/glass-hdr.interface.ts +15 -0
  241. package/src/engine/src/core/interfaces/glass-metal.interface.ts +248 -0
  242. package/src/engine/src/core/interfaces/glass-surface.interface.ts +9 -0
  243. package/src/engine/src/core/interfaces/index.ts +31 -0
  244. package/src/engine/src/core/interfaces/liquid-glass-container.interface.ts +6 -0
  245. package/src/engine/src/core/interfaces/liquid-glass-provider.interface.ts +14 -0
  246. package/src/engine/src/core/interfaces/liquid-glass-stack.interface.ts +21 -0
  247. package/src/engine/src/core/interfaces/liquid-glass-view.interface.ts +129 -0
  248. package/src/engine/src/core/interfaces/native-liquid-glass-view.interface.ts +19 -0
  249. package/src/engine/src/core/modules/ExpoLiquidGlassModule.ts +26 -0
  250. package/src/engine/src/core/modules/index.ts +2 -0
  251. package/src/engine/src/core/root/index.ts +51 -0
  252. package/src/engine/src/core/types/glass.types.ts +25 -0
  253. package/src/engine/src/core/types/index.ts +8 -0
  254. package/src/engine/src/core/utils/debug.utils.ts +17 -0
  255. package/src/engine/src/core/utils/dev-warn.utils.ts +17 -0
  256. package/src/engine/src/core/utils/hdr.utils.ts +37 -0
  257. package/src/engine/src/core/utils/index.ts +5 -0
  258. package/src/engine/src/core/utils/native-view.utils.ts +33 -0
  259. package/src/engine/src/core/utils/platform.utils.ts +34 -0
  260. package/src/engine/src/core/views/NativeGlassBackdropView.ts +24 -0
  261. package/src/engine/src/core/views/NativeLiquidGlassContainerView.ts +13 -0
  262. package/src/engine/src/core/views/NativeLiquidGlassContainerView.web.ts +10 -0
  263. package/src/engine/src/core/views/NativeLiquidGlassProviderView.ts +13 -0
  264. package/src/engine/src/core/views/NativeLiquidGlassProviderView.web.ts +10 -0
  265. package/src/engine/src/core/views/NativeLiquidGlassView.ts +19 -0
  266. package/src/engine/src/core/views/NativeLiquidGlassView.web.ts +14 -0
  267. package/src/engine/src/core/views/index.ts +4 -0
  268. package/src/engine/src/hooks/index.ts +18 -0
  269. package/src/engine/src/hooks/use-adaptive-glass.ts +91 -0
  270. package/src/engine/src/hooks/use-damped-drag.ts +332 -0
  271. package/src/engine/src/hooks/use-echo-filter.ts +55 -0
  272. package/src/engine/src/hooks/use-glass-group-member.ts +169 -0
  273. package/src/engine/src/hooks/use-gravity-highlight.ts +79 -0
  274. package/src/engine/src/hooks/use-press-progress.ts +44 -0
  275. package/src/engine/src/index.ts +120 -0
  276. package/src/engine/src/interfaces/index.ts +28 -0
  277. package/src/engine/src/interfaces/liquid-glass-button.interface.ts +94 -0
  278. package/src/engine/src/interfaces/liquid-glass-card.interface.ts +40 -0
  279. package/src/engine/src/interfaces/liquid-glass-chip.interface.ts +29 -0
  280. package/src/engine/src/interfaces/liquid-glass-group.interface.ts +32 -0
  281. package/src/engine/src/interfaces/liquid-glass-icon-button.interface.ts +19 -0
  282. package/src/engine/src/interfaces/liquid-glass-morph-group.interface.ts +59 -0
  283. package/src/engine/src/interfaces/liquid-glass-scrim.interface.ts +36 -0
  284. package/src/engine/src/interfaces/liquid-glass-segmented-control.interface.ts +32 -0
  285. package/src/engine/src/interfaces/liquid-glass-sheet.interface.ts +38 -0
  286. package/src/engine/src/interfaces/liquid-glass-slider.interface.ts +37 -0
  287. package/src/engine/src/interfaces/liquid-glass-stepper.interface.ts +35 -0
  288. package/src/engine/src/interfaces/liquid-glass-switch.interface.ts +27 -0
  289. package/src/engine/src/interfaces/liquid-glass-tab-bar.interface.ts +116 -0
  290. package/src/engine/src/interfaces/liquid-glass-text-input.interface.ts +42 -0
  291. package/src/engine/src/interfaces/liquid-glass-toast.interface.ts +36 -0
  292. package/src/engine/src/interfaces/liquid-glass-toolbar.interface.ts +33 -0
  293. package/src/engine/src/theme/glass-ui-theme.ts +100 -0
  294. package/src/engine/src/theme/index.ts +2 -0
  295. package/src/engine/src/utils/button-press.utils.ts +63 -0
  296. package/src/engine/src/utils/index.ts +3 -0
  297. package/src/engine/src/utils/metal.utils.ts +164 -0
  298. package/src/glass-provider.tsx +60 -0
  299. package/src/glass-stack.tsx +115 -0
  300. package/src/index.ts +47 -190
  301. package/src/internal/GlassBackdrop.tsx +60 -0
  302. package/src/internal/GlassView.tsx +53 -18
  303. package/src/internal/blur-community.ts +19 -0
  304. package/src/internal/blur-community.web.ts +7 -0
  305. package/src/internal/blur.ts +7 -8
  306. package/src/internal/glass-routing.ts +211 -34
  307. package/src/internal/initials.ts +7 -0
  308. package/src/internal/overlay.tsx +258 -0
  309. package/src/internal/primitives.ts +23 -0
  310. package/lib/module/Carousel.js +0 -103
  311. package/lib/module/Display.js +0 -318
  312. package/lib/module/Feedback.js +0 -395
  313. package/lib/module/Form.js +0 -160
  314. package/lib/module/Forms2.js +0 -471
  315. package/lib/module/Message.js +0 -84
  316. package/lib/module/Overlays.js +0 -344
  317. package/lib/module/Pickers.js +0 -243
  318. package/lib/module/Table.js +0 -100
  319. package/lib/module/ai.js +0 -283
  320. package/lib/module/charts/AreaChart.js +0 -32
  321. package/lib/module/charts/BarChart.js +0 -75
  322. package/lib/module/charts/FunnelChart.js +0 -50
  323. package/lib/module/charts/HeatmapChart.js +0 -71
  324. package/lib/module/charts/LineChart.js +0 -81
  325. package/lib/module/charts/PlotChart.js +0 -52
  326. package/lib/module/charts/RadarChart.js +0 -78
  327. package/lib/module/charts/RingChart.js +0 -52
  328. package/lib/module/charts/ScatterChart.js +0 -95
  329. package/lib/module/charts/WaterfallChart.js +0 -85
  330. package/lib/module/charts/advanced.js +0 -313
  331. package/lib/module/charts/extra.js +0 -108
  332. package/lib/module/charts/index.js +0 -50
  333. package/lib/module/charts/scales.js +0 -140
  334. package/lib/typescript/Carousel.d.ts +0 -47
  335. package/lib/typescript/Display.d.ts +0 -178
  336. package/lib/typescript/Feedback.d.ts +0 -196
  337. package/lib/typescript/Form.d.ts +0 -97
  338. package/lib/typescript/Forms2.d.ts +0 -209
  339. package/lib/typescript/Message.d.ts +0 -67
  340. package/lib/typescript/Overlays.d.ts +0 -146
  341. package/lib/typescript/Pickers.d.ts +0 -105
  342. package/lib/typescript/Table.d.ts +0 -64
  343. package/lib/typescript/ai.d.ts +0 -166
  344. package/lib/typescript/charts/AreaChart.d.ts +0 -44
  345. package/lib/typescript/charts/BarChart.d.ts +0 -19
  346. package/lib/typescript/charts/FunnelChart.d.ts +0 -25
  347. package/lib/typescript/charts/HeatmapChart.d.ts +0 -23
  348. package/lib/typescript/charts/LineChart.d.ts +0 -30
  349. package/lib/typescript/charts/PlotChart.d.ts +0 -31
  350. package/lib/typescript/charts/RadarChart.d.ts +0 -27
  351. package/lib/typescript/charts/RingChart.d.ts +0 -28
  352. package/lib/typescript/charts/ScatterChart.d.ts +0 -34
  353. package/lib/typescript/charts/WaterfallChart.d.ts +0 -22
  354. package/lib/typescript/charts/advanced.d.ts +0 -107
  355. package/lib/typescript/charts/extra.d.ts +0 -63
  356. package/lib/typescript/charts/index.d.ts +0 -13
  357. package/lib/typescript/charts/scales.d.ts +0 -35
  358. package/src/Carousel.tsx +0 -233
  359. package/src/Display.tsx +0 -781
  360. package/src/Feedback.tsx +0 -992
  361. package/src/Form.tsx +0 -445
  362. package/src/Forms2.tsx +0 -1055
  363. package/src/Message.tsx +0 -218
  364. package/src/Overlays.tsx +0 -704
  365. package/src/Pickers.tsx +0 -595
  366. package/src/Table.tsx +0 -232
  367. package/src/ai.tsx +0 -715
  368. package/src/charts/AreaChart.tsx +0 -73
  369. package/src/charts/BarChart.tsx +0 -221
  370. package/src/charts/FunnelChart.tsx +0 -125
  371. package/src/charts/HeatmapChart.tsx +0 -155
  372. package/src/charts/LineChart.tsx +0 -247
  373. package/src/charts/PlotChart.tsx +0 -168
  374. package/src/charts/RadarChart.tsx +0 -208
  375. package/src/charts/RingChart.tsx +0 -133
  376. package/src/charts/ScatterChart.tsx +0 -223
  377. package/src/charts/WaterfallChart.tsx +0 -201
  378. package/src/charts/advanced.tsx +0 -676
  379. package/src/charts/extra.tsx +0 -242
  380. package/src/charts/index.ts +0 -86
  381. package/src/charts/scales.ts +0 -163
@@ -0,0 +1,63 @@
1
+ package expo.modules.liquidglass.glass
2
+
3
+ import android.os.Build
4
+
5
+ /**
6
+ * The Android rendering ladder.
7
+ *
8
+ * Android has no equivalent of Apple's `UIGlassEffect` — no primitive lets an in-app view sample
9
+ * the pixels of its siblings. Everything here comes from the capture-and-refract route, which is
10
+ * the *fallback* path on iOS. What we can do is bounded purely by the API level:
11
+ *
12
+ * | API | Tier | Primitive that gates it |
13
+ * |-------|---------|------------------------------------------------------------|
14
+ * | 33+ | [FULL] | `RuntimeShader` / `RenderEffect.createRuntimeShaderEffect` |
15
+ * | 31–32 | [BLUR] | `RenderEffect.createBlurEffect` |
16
+ * | 29–30 | [SCRIM] | `RenderNode` |
17
+ * | < 29 | [NONE] | — nothing; a plain tinted view |
18
+ *
19
+ * A view's *effective* tier is the minimum of [supported] and whatever degradation the view has
20
+ * applied to itself (shader compile failure, screen-coverage budget, an explicit prop). The name
21
+ * carried by each constant is what crosses the bridge in `onRendererChange`.
22
+ */
23
+ enum class GlassTier(val rendererName: String) {
24
+ /** Blur, refraction, chromatic dispersion, angular highlight, tint, frost, noise. */
25
+ FULL("agsl"),
26
+
27
+ /** Blur, saturation, tint and frost, clipped to the view outline. No refraction. */
28
+ BLUR("fallback-blur"),
29
+
30
+ /** The live backdrop drawn straight through, plus a translucent scrim. No blur, no shader. */
31
+ SCRIM("scrim"),
32
+
33
+ /** No hardware path at all. JS degrades to a plain view. */
34
+ NONE("none");
35
+
36
+ /** True when this tier still draws a live copy of the content behind the view. */
37
+ val hasLiveBackdrop: Boolean
38
+ get() = this != NONE
39
+
40
+ companion object {
41
+ /** The ceiling for this device, resolved once from the API level. */
42
+ @JvmStatic
43
+ val supported: GlassTier by lazy { forApiLevel(Build.VERSION.SDK_INT) }
44
+
45
+ /**
46
+ * The weaker of two tiers.
47
+ *
48
+ * Entries are declared strongest-first, so "weaker" is the higher ordinal — which is what makes
49
+ * a ceiling composable with the device's own ceiling without either one needing to know about
50
+ * the other.
51
+ */
52
+ @JvmStatic
53
+ fun weakest(a: GlassTier, b: GlassTier): GlassTier = if (a.ordinal >= b.ordinal) a else b
54
+
55
+ @JvmStatic
56
+ fun forApiLevel(sdkInt: Int): GlassTier = when {
57
+ sdkInt >= Build.VERSION_CODES.TIRAMISU -> FULL // 33 — RuntimeShader
58
+ sdkInt >= Build.VERSION_CODES.S -> BLUR // 31 — RenderEffect
59
+ sdkInt >= Build.VERSION_CODES.Q -> SCRIM // 29 — RenderNode
60
+ else -> NONE
61
+ }
62
+ }
63
+ }
@@ -0,0 +1,71 @@
1
+ package expo.modules.liquidglass.glass
2
+
3
+ import android.view.View
4
+ import java.util.concurrent.CopyOnWriteArrayList
5
+
6
+ /**
7
+ * Process-level map from `providerId` to the providers currently attached.
8
+ *
9
+ * This is the `expo-blur` `<BlurTargetView>` pattern. It exists so that pairing is **explicit**:
10
+ * we never walk up the view hierarchy looking for a provider, which is what `expo-blur` did before
11
+ * SDK 55 and is precisely why it broke inside `Modal` (expo/expo#44165).
12
+ *
13
+ * Touched only from the UI thread in practice, but held in a copy-on-write list so that iterating
14
+ * consumers during a draw can never trip over a concurrent registration.
15
+ */
16
+ internal object ProviderRegistry {
17
+ private val providers = CopyOnWriteArrayList<BackdropSource>()
18
+
19
+ fun register(provider: BackdropSource) {
20
+ providers.addIfAbsent(provider)
21
+ }
22
+
23
+ fun unregister(provider: BackdropSource) {
24
+ providers.remove(provider)
25
+ }
26
+
27
+ /**
28
+ * Resolves [id] to a provider **in the same window as [consumer]**.
29
+ *
30
+ * The window check is not an optimisation — a `RenderNode` recorded in another window's tree is
31
+ * positioned in that window's coordinate space, so drawing it here would be wrong even when it
32
+ * does not fail outright. An RN `Modal` is a separate window and needs its own provider; this is
33
+ * where that gets enforced rather than silently producing garbage.
34
+ *
35
+ * [warnOnMiss] is false only for the eager attach-time resolve, where a miss is expected — a
36
+ * provider mounted in the same commit may not be registered yet. The draw-path resolve, the one
37
+ * a *persistent* miss always reaches, keeps the warnings.
38
+ */
39
+ fun find(id: String, consumer: View, warnOnMiss: Boolean = true): BackdropSource? {
40
+ val root = consumer.rootView
41
+ var idMatchedInAnotherWindow = false
42
+
43
+ for (provider in providers) {
44
+ if (provider.providerId != id) continue
45
+ if (provider.sourceView.rootView === root) return provider
46
+ idMatchedInAnotherWindow = true
47
+ }
48
+
49
+ if (!warnOnMiss) return null
50
+
51
+ // R9 / R10. Not gated on `GlassDebug.enabled`: a glass view that resolves no provider simply
52
+ // renders as a plain scrim, which reads as "the library is broken" rather than as a mistake.
53
+ // Resolves dev-mode here rather than relying on GlassEnvironment's posted check, because a view
54
+ // can reach this on its first draw — or never be laid out at all.
55
+ GlassDebug.resolveDevMode(consumer.context)
56
+ if (idMatchedInAnotherWindow) {
57
+ GlassDebug.warnOnce(
58
+ "provider-other-window:$id",
59
+ "A <LiquidGlassProvider providerId=\"$id\"> exists, but in a different window. A React " +
60
+ "Native <Modal> is its own window — put a <LiquidGlassProvider> inside it."
61
+ )
62
+ } else {
63
+ GlassDebug.warnOnce(
64
+ "provider-missing:$id",
65
+ "No <LiquidGlassProvider providerId=\"$id\"> is mounted. Glass views need one as a " +
66
+ "SIBLING, wrapping the content that should show through them."
67
+ )
68
+ }
69
+ return null
70
+ }
71
+ }
@@ -0,0 +1,288 @@
1
+ package expo.modules.liquidglass.records
2
+
3
+ import expo.modules.kotlin.records.Field
4
+ import expo.modules.kotlin.records.Record
5
+ import expo.modules.kotlin.types.OptimizedRecord
6
+ import expo.modules.liquidglass.enums.GlassBlurDirection
7
+ import expo.modules.liquidglass.enums.GlassQuality
8
+ import expo.modules.liquidglass.enums.GlassTierCeiling
9
+
10
+ /**
11
+ * Mirrors `src/interfaces/glass-metal.interface.ts` and `ios/Records/GlassMetalOptions.swift`.
12
+ *
13
+ * Every field is nullable so that "not supplied" is distinguishable from a supplied value — the
14
+ * per-variant defaults in [expo.modules.liquidglass.enums.MetalDefaults] only apply to fields the
15
+ * caller left out. Keys the caller omits leave the initializer untouched, exactly as on Swift.
16
+ *
17
+ * Every Record in this file is [OptimizedRecord]. Without it `RecordTypeConverter` falls back to
18
+ * **reflection** for each conversion and logs a warning per class — and `metal` is a four-deep
19
+ * nest, so one prop commit converts up to eight Records. The annotation is what makes the
20
+ * expo-module-gradle-plugin's KSP pass emit introspection metadata for the class; the runtime
21
+ * warning names `Introspectable`, which is the capability, not the annotation.
22
+ */
23
+ @OptimizedRecord
24
+ class GlassMetalOptions : Record {
25
+ @Field var blurRadius: Double? = null
26
+
27
+ /**
28
+ * Accepted and ignored on Android. On iOS this scales the rasterized backdrop capture; the
29
+ * Android path records a display list rather than pixels, so there is nothing to scale.
30
+ */
31
+ @Field var captureQuality: Double? = null
32
+
33
+ @Field var opacity: Double? = null
34
+ @Field var frost: Double? = null
35
+ @Field var saturation: Double? = null
36
+ @Field var noise: Double? = null
37
+ @Field var light: Double? = null
38
+
39
+ /**
40
+ * A whole-surface lens: the backdrop reads enlarged through the pane, contracting toward the
41
+ * shape's center. 1 = none; clamped to [1, 4] — below 1 would sample outside the padded node.
42
+ * Shader tier only.
43
+ */
44
+ @Field var magnification: Double? = null
45
+
46
+ @Field var refraction: GlassRefractionOptions? = null
47
+ @Field var dispersion: GlassDispersionOptions? = null
48
+ @Field var highlight: GlassHighlightOptions? = null
49
+ @Field var border: GlassBorderOptions? = null
50
+ @Field var innerShadow: GlassInnerShadowOptions? = null
51
+ @Field var shape: GlassShapeOptions? = null
52
+ @Field var morph: GlassMorphOptions? = null
53
+ @Field var progressiveBlur: GlassProgressiveBlurOptions? = null
54
+
55
+ /**
56
+ * The wash over the glass, as a processed ARGB colour — the JS wrapper `processColor`s it, as
57
+ * it does the view's own `tint`. Present, it overrides that prop: a recipe carries its own
58
+ * colour, so `lerpMetal` can crossfade it between two recipes on the UI thread (a pill that
59
+ * turns blue as it is grabbed) and a `metal` object fully describes a look.
60
+ */
61
+ @Field var tint: Int? = null
62
+
63
+ /** Android-only. iOS drops the key, because its Record has no matching field. */
64
+ @Field var android: GlassAndroidOptions? = null
65
+ }
66
+
67
+ @OptimizedRecord
68
+ class GlassAndroidOptions : Record {
69
+ /** Which compiled shader variant to draw with. Defaults to the iOS-parity tier. */
70
+ @Field var quality: GlassQuality? = null
71
+
72
+ /**
73
+ * A ceiling on the rendering ladder. Only ever lowers the tier — it cannot raise a device past
74
+ * what its API level supports. Intended for capping the cost of very large glass surfaces, and
75
+ * for exercising the fallbacks on a device that would otherwise never take them.
76
+ */
77
+ @Field var maxTier: GlassTierCeiling? = null
78
+ }
79
+
80
+ @OptimizedRecord
81
+ class GlassRefractionOptions : Record {
82
+ @Field var amount: Double? = null
83
+ @Field var width: Double? = null
84
+ @Field var height: Double? = null
85
+ @Field var depth: Double? = null
86
+
87
+ /**
88
+ * How far the edge refraction leans toward the highlight's light axis, unitless like [depth].
89
+ * Default 0 (measured: real iOS 26 carries no lean — research/04). Android-only — the iOS Record has
90
+ * no such field, so the key is silently dropped there.
91
+ */
92
+ @Field var swirl: Double? = null
93
+
94
+ @Field var curve: GlassRefractionCurve? = null
95
+ }
96
+
97
+ /**
98
+ * `curve` is **all-or-nothing** on iOS: `refraction?.curve?.simd ?? defaults.profile`. Supplying
99
+ * `{ power: 2 }` therefore silently takes this Record's `bias` default rather than the variant's.
100
+ * Reproduced deliberately — see PLAN.md Phase 2.
101
+ */
102
+ @OptimizedRecord
103
+ class GlassRefractionCurve : Record {
104
+ @Field var power: Double = 1.0
105
+ @Field var bias: Double = 0.0
106
+ }
107
+
108
+ @OptimizedRecord
109
+ class GlassDispersionOptions : Record {
110
+ @Field var amount: Double? = null
111
+ @Field var reach: Double? = null
112
+
113
+ /**
114
+ * How much of the fringe follows Kyant's quadrant weighting, `0..1`. Default 0 — an even rim
115
+ * fringe the whole way round, which is what iOS does.
116
+ *
117
+ * At 1 the spread is scaled by `(cx * cy) / (hx * hy)`: nothing along either centre line, full
118
+ * strength at the corners, and the sign — hence the hue order — flipping between neighbours. On
119
+ * a capsule that puts all the colour at the two ends and none along the flanks. Android-only.
120
+ */
121
+ @Field var quadrant: Double? = null
122
+ }
123
+
124
+ /**
125
+ * A press that happened somewhere else.
126
+ *
127
+ * [expo.modules.liquidglass.LiquidGlassView.isInteractive] handles a press on *this* view, driving
128
+ * the same shader uniforms off its own touch stream. This record is for the other case: a control
129
+ * choreographed by the app, whose press this glass should respond to. Kyant's `InteractiveHighlight`
130
+ * is exactly that — it lives on the tab bar, but the finger is on the pill.
131
+ *
132
+ * Unlike `interactive` this never touches the view's transform, so it composes with an app-owned
133
+ * `transform` style (a Reanimated one included) instead of fighting it.
134
+ */
135
+ @OptimizedRecord
136
+ class GlassGlowOptions : Record {
137
+ /** 0 = at rest and the shader's branch is off; 1 = fully lit. */
138
+ @Field var progress: Double = 0.0
139
+
140
+ /** Hotspot, view-local dp. Both default to the view's centre. */
141
+ @Field var x: Double? = null
142
+ @Field var y: Double? = null
143
+
144
+ /**
145
+ * Whether the press also bends the glass — the backdrop dent under the hotspot and the 1.35x
146
+ * lens boost that `interactive` applies.
147
+ *
148
+ * Default false, which is Kyant's behaviour and the reason this defaults the way it does: a bar
149
+ * hosting a grabbed pill should light up, not start refracting harder. Set it when the press
150
+ * really is on this glass and you are only driving it by hand.
151
+ */
152
+ @Field var lens: Boolean = false
153
+ }
154
+
155
+ @OptimizedRecord
156
+ class GlassHighlightOptions : Record {
157
+ @Field var intensity: Double? = null
158
+
159
+ /** Degrees, screen-space with y increasing downward. Converted to radians during resolution. */
160
+ @Field var angle: Double? = null
161
+
162
+ /**
163
+ * Depth of the glass border light, in dp. Defaults to 0.75. Android-only — the iOS Record has
164
+ * no such field, so the key is silently dropped there, like `android.*`.
165
+ */
166
+ @Field var width: Double? = null
167
+
168
+ /**
169
+ * Angular falloff exponent of the two light lobes (Kyant's `falloff`). Default 1. Higher
170
+ * concentrates the light at the lobes; floored at 0.01. Android-only, like `width`.
171
+ */
172
+ @Field var falloff: Double? = null
173
+ }
174
+
175
+ @OptimizedRecord
176
+ class GlassBorderOptions : Record {
177
+ @Field var width: Double? = null
178
+ @Field var opacity: Double? = null
179
+ }
180
+
181
+ /**
182
+ * The inner shadow: a soft dark band along the inside of the silhouette — the shape minus itself
183
+ * translated by the cast offset, blurred by [radius] (Kyant's `InnerShadow`, see NOTICE). Shader
184
+ * tier only; the blur and scrim tiers draw no band. `radius` 0 (or absent) is off.
185
+ */
186
+ @OptimizedRecord
187
+ class GlassInnerShadowOptions : Record {
188
+ /** Blur radius, dp. 0 disables. */
189
+ @Field var radius: Double? = null
190
+
191
+ /**
192
+ * Where the shadow is cast, dp. Defaults: x 0, y = [radius] — lit from above, so the pane's
193
+ * top lip shades the top inner edge, which is Kyant's default and the kit's.
194
+ */
195
+ @Field var offsetX: Double? = null
196
+ @Field var offsetY: Double? = null
197
+
198
+ /** Strength of the (black) shadow, 0..1. Default 0.15. */
199
+ @Field var opacity: Double? = null
200
+ }
201
+
202
+ /**
203
+ * A blur whose radius ramps across the view — iOS 26's "content melts into blur" scroll-edge
204
+ * look. The ramp runs along [direction], from [startRadius] at the leading edge to [endRadius]
205
+ * at the trailing one, with the transition confined to the [start]..[end] fraction window and
206
+ * eased with a Hermite step.
207
+ *
208
+ * On the `agsl` tier this is a blur pyramid: one hwui blur per doubling of radius up to the
209
+ * ramp's maximum, cross-faded per pixel by the ramp, so each pixel mixes the two levels that
210
+ * bracket its radius (see `GlassProgressiveBlur`). Radii are in the Metal `sigma = 0.5 * r`
211
+ * convention — visually matched to iOS, deliberately *not* the hwui radius convention. It
212
+ * replaces the uniform `blurRadius` stage when present; equal radii collapse to the plain
213
+ * uniform stage. The `fallback-blur` tier approximates it with a uniform hwui blur at the mean
214
+ * radius; scrim ignores it. Animatable per-frame via `useAnimatedProps`, like the rest of `metal`.
215
+ */
216
+ @OptimizedRecord
217
+ class GlassProgressiveBlurOptions : Record {
218
+ /** Radius at the leading edge, dp. Default 0 — sharp. */
219
+ @Field var startRadius: Double? = null
220
+
221
+ /** Radius at the trailing edge, dp. Default 0. */
222
+ @Field var endRadius: Double? = null
223
+
224
+ @Field var direction: GlassBlurDirection? = null
225
+
226
+ /** Where the ramp begins, as a fraction of the view's extent along [direction]. Default 0. */
227
+ @Field var start: Double? = null
228
+
229
+ /** Where the ramp completes, same units. Default 1. */
230
+ @Field var end: Double? = null
231
+ }
232
+
233
+ /**
234
+ * The primary shape as a sub-rect of the view — view-local dp, top-left origin. Absent (or
235
+ * degenerate), the shape fills the view: the historical behaviour, bit for bit.
236
+ *
237
+ * This is what makes a *canvas* view possible: a view larger than its glass, inside which a
238
+ * [GlassMorphOptions] partner has room to approach, neck and separate — both platforms clip
239
+ * their draw at the view's bounds, so the extra room must come from the view itself. Shader
240
+ * tiers only; the corner radii resolve against this rect, while the drawn border and the
241
+ * content clipping still track the view (a canvas hosts its own chrome).
242
+ */
243
+ @OptimizedRecord
244
+ class GlassShapeOptions : Record {
245
+ @Field var x: Double? = null
246
+ @Field var y: Double? = null
247
+ @Field var width: Double? = null
248
+ @Field var height: Double? = null
249
+ }
250
+
251
+ /**
252
+ * The morph partner: a second rounded rect folded into this view's shape with a polynomial
253
+ * smooth-min, so the two read as one connected pane of liquid — refraction, dispersion and the
254
+ * border light all follow the merged silhouette. Shader tiers only (`agsl` here, the Metal
255
+ * renderer on iOS); the BLUR/SCRIM tiers and iOS 26's native glass ignore it.
256
+ *
257
+ * View-local dp, top-left origin, RN layout style. All-or-nothing: [width], [height] and a
258
+ * positive [smoothing] make it live; anything less and the shape is bit-identical to before.
259
+ * Keep the partner inside the view's bounds — iOS clips the drawable at them — and pair it
260
+ * with [GlassShapeOptions] when it needs room outside the primary shape.
261
+ */
262
+ @OptimizedRecord
263
+ class GlassMorphOptions : Record {
264
+ @Field var x: Double? = null
265
+ @Field var y: Double? = null
266
+ @Field var width: Double? = null
267
+ @Field var height: Double? = null
268
+
269
+ /** One radius for all four partner corners, clamped to half the partner's short side. */
270
+ @Field var cornerRadius: Double? = null
271
+
272
+ /** The distance at which the two shapes begin to merge, dp. 0 disables. */
273
+ @Field var smoothing: Double? = null
274
+ }
275
+
276
+ /**
277
+ * The object form of `cornerRadius`.
278
+ *
279
+ * Mind the swizzle contract shared with the shader: `.x` = bottom-left, `.y` = bottom-right,
280
+ * `.z` = top-right, `.w` = top-left, with y increasing downward.
281
+ */
282
+ @OptimizedRecord
283
+ class GlassCornerRadii : Record {
284
+ @Field var topLeft: Double = 0.0
285
+ @Field var topRight: Double = 0.0
286
+ @Field var bottomRight: Double = 0.0
287
+ @Field var bottomLeft: Double = 0.0
288
+ }
@@ -0,0 +1,24 @@
1
+ /**
2
+ * The Glacia Native glass engine — vendored, not depended upon.
3
+ *
4
+ * This directory is a verbatim copy of the engine source from
5
+ * `https://github.com/capthndsme/expo-liquid-glass-ui` (MIT, maintained by
6
+ * capthndsme and contributors; the `NOTICE` and `LICENSE` files here carry its
7
+ * copyright and attribution, including the AndroidLiquidGlass derivation noted
8
+ * there).
9
+ *
10
+ * The engine is the design core of the rebuild: the glass surface
11
+ * (`LiquidGlassView`), the backdrop provider (`LiquidGlassProvider`), the merge
12
+ * container (`LiquidGlassContainer`) and the stacked-glass primitive
13
+ * (`LiquidGlassStack`), the renderer tier machinery (iOS native / iOS Metal /
14
+ * Android AGSL / fallback) and the capability helpers
15
+ * (`supportsGlass`, `supportsNativeGlass`, `useAdaptiveGlass`, the luminance and
16
+ * adaptive system).
17
+ *
18
+ * It is vendored *into* `glacia-native` because the rebuild patches the iOS
19
+ * backdrop capture path (§6 of the rebuild brief); a GitHub dependency could not
20
+ * receive those patches through the npm package. Nothing in this directory is
21
+ * authored by Glacia.
22
+ */
23
+
24
+ export * from "./src/index";
@@ -0,0 +1,21 @@
1
+ import ExpoModulesCore
2
+
3
+ /// `metal.progressiveBlur.direction` — the axis the blur ramp travels along, named for where the
4
+ /// blur *increases* toward. `down` is the classic bottom-bar scrim: sharp at the top of the view,
5
+ /// melting into blur at its bottom edge. Mirrors Android's `GlassBlurDirection`.
6
+ public enum GlassBlurDirection: String, Enumerable {
7
+
8
+ case down
9
+
10
+ case up
11
+
12
+ case left
13
+
14
+ case right
15
+
16
+ /// Whether the ramp runs along y.
17
+ var vertical: Bool { self == .down || self == .up }
18
+
19
+ /// Whether the ramp starts from the far edge of its axis (bottom or right).
20
+ var reversed: Bool { self == .up || self == .left }
21
+ }
@@ -0,0 +1,86 @@
1
+ import ExpoModulesCore
2
+ import UIKit
3
+
4
+ public enum GlassVariant: String, Enumerable {
5
+
6
+ case regular
7
+
8
+ case clear
9
+
10
+ struct MetalDefaults {
11
+ var blur: CGFloat
12
+
13
+ var width: CGFloat
14
+ var height: CGFloat
15
+
16
+ var amount: CGFloat
17
+
18
+ var depthEffect: CGFloat
19
+
20
+ var profile: SIMD2<Float>
21
+
22
+ var dispersion: CGFloat
23
+ var light: CGFloat
24
+
25
+ var frost: CGFloat
26
+ var saturation: CGFloat
27
+ var highlight: CGFloat
28
+ var noise: CGFloat
29
+ var borderOpacity: CGFloat
30
+ }
31
+
32
+ var metalDefaults: MetalDefaults {
33
+ switch self {
34
+ case .regular:
35
+ return MetalDefaults(
36
+ blur: 0,
37
+ width: 20,
38
+ height: 20,
39
+ amount: 60,
40
+ depthEffect: 1,
41
+ profile: SIMD2<Float>(1, 0),
42
+ dispersion: 6,
43
+ light: 0.0,
44
+ frost: 0.36,
45
+ saturation: 1.8,
46
+ highlight: 0.25,
47
+ noise: 0.05,
48
+ borderOpacity: 0.28
49
+ )
50
+ case .clear:
51
+ return MetalDefaults(
52
+ blur: 0,
53
+ width: 10,
54
+ height: 10,
55
+ amount: 30,
56
+ depthEffect: 0,
57
+ profile: SIMD2<Float>(1, 0),
58
+ dispersion: 10,
59
+ light: 0.0,
60
+ frost: 0.06,
61
+ saturation: 1.15,
62
+ highlight: 0.35,
63
+ noise: 0.06,
64
+ borderOpacity: 0.4
65
+ )
66
+ }
67
+ }
68
+ }
69
+
70
+ public enum GlassBackend: String, Enumerable {
71
+
72
+ case auto
73
+
74
+ case native
75
+
76
+ case metal
77
+ }
78
+
79
+ public enum GlassCornerStyle: String, Enumerable {
80
+ case continuous
81
+ case circular
82
+
83
+ var layerCurve: CALayerCornerCurve {
84
+ self == .circular ? .circular : .continuous
85
+ }
86
+ }
@@ -0,0 +1,93 @@
1
+ require 'json'
2
+
3
+ package = JSON.parse(File.read(File.join(__dir__, '..', 'package.json')))
4
+
5
+ Pod::Spec.new do |s|
6
+ s.name = 'ExpoLiquidGlass'
7
+ s.version = package['version']
8
+ s.summary = package['description']
9
+ s.description = package['description']
10
+ s.license = package['license']
11
+ s.author = package['author']
12
+ s.homepage = package['homepage']
13
+ s.platforms = {
14
+ :ios => '15.1',
15
+ :tvos => '15.1'
16
+ }
17
+ s.swift_version = '5.4'
18
+ s.source = { git: 'https://github.com/capthndsme/expo-liquid-glass-ui' }
19
+ s.static_framework = true
20
+
21
+ s.dependency 'ExpoModulesCore'
22
+
23
+ s.pod_target_xcconfig = {
24
+ 'DEFINES_MODULE' => 'YES',
25
+ }
26
+
27
+ s.source_files = "**/*.{h,m,mm,swift,hpp,cpp,metal}"
28
+
29
+ s.resource_bundles = {
30
+ 'ExpoLiquidGlassShaders' => ['Shaders/bundle-marker.txt']
31
+ }
32
+
33
+ s.script_phases = [
34
+ {
35
+ :name => 'Bundle compiled Metal shaders',
36
+ :execution_position => :after_compile,
37
+ :shell_path => '/bin/sh',
38
+ :script => <<-SCRIPT.gsub(/^ {8}/, '')
39
+ set -e
40
+
41
+ BUNDLE="${TARGET_BUILD_DIR}/ExpoLiquidGlassShaders.bundle"
42
+
43
+ if [ ! -d "$BUNDLE" ]; then
44
+ echo "error: ExpoLiquidGlassShaders.bundle not found at $BUNDLE"
45
+ exit 1
46
+ fi
47
+
48
+ # Xcode's implicit .metal compilation does not land in one predictable
49
+ # place. In a normal build it appears in TARGET_BUILD_DIR; in an ARCHIVE
50
+ # TARGET_BUILD_DIR points at .../UninstalledProducts/<platform> and the
51
+ # library is emitted elsewhere (or not at all for a static pod target).
52
+ # Assuming TARGET_BUILD_DIR meant every archive build failed with
53
+ # "default.metallib not found" the first time anyone shipped this.
54
+ for CANDIDATE in \
55
+ "${TARGET_BUILD_DIR}/default.metallib" \
56
+ "${BUILT_PRODUCTS_DIR}/default.metallib" \
57
+ "${METAL_LIBRARY_OUTPUT_DIR}/default.metallib" \
58
+ "${CONFIGURATION_BUILD_DIR}/default.metallib"; do
59
+ if [ -n "$CANDIDATE" ] && [ -f "$CANDIDATE" ]; then
60
+ cp "$CANDIDATE" "$BUNDLE/default.metallib"
61
+ echo "note: bundled metallib from $CANDIDATE"
62
+ exit 0
63
+ fi
64
+ done
65
+
66
+ # Nothing implicit to copy — compile the shaders ourselves. Deterministic
67
+ # across configurations, and the only path that works when Xcode skips
68
+ # metal compilation for the pod target entirely.
69
+ SHADER_ROOT="${PODS_TARGET_SRCROOT}"
70
+ [ -d "$SHADER_ROOT" ] || SHADER_ROOT="${PODS_ROOT}"
71
+
72
+ METAL_SOURCES=$(find "$SHADER_ROOT" -name '*.metal' 2>/dev/null || true)
73
+ if [ -z "$METAL_SOURCES" ]; then
74
+ echo "error: no .metal sources found under $SHADER_ROOT"
75
+ exit 1
76
+ fi
77
+
78
+ WORK="${DERIVED_FILE_DIR}/expo-liquid-glass-metal"
79
+ rm -rf "$WORK" && mkdir -p "$WORK"
80
+
81
+ AIR_FILES=""
82
+ for METAL in $METAL_SOURCES; do
83
+ AIR="$WORK/$(basename "${METAL%.metal}").air"
84
+ xcrun -sdk "${PLATFORM_NAME}" metal -c "$METAL" -o "$AIR"
85
+ AIR_FILES="$AIR_FILES $AIR"
86
+ done
87
+
88
+ xcrun -sdk "${PLATFORM_NAME}" metallib $AIR_FILES -o "$BUNDLE/default.metallib"
89
+ echo "note: compiled metallib from source ($METAL_SOURCES)"
90
+ SCRIPT
91
+ }
92
+ ]
93
+ end