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.
- package/README.md +84 -17
- package/lib/module/Accordion.js +58 -0
- package/lib/module/ActionSheet.js +38 -0
- package/lib/module/Alert.js +23 -0
- package/lib/module/AlertDialog.js +47 -0
- package/lib/module/Avatar.js +48 -0
- package/lib/module/Badge.js +36 -0
- package/lib/module/Bars.js +13 -268
- package/lib/module/Button.js +57 -39
- package/lib/module/Card.js +31 -19
- package/lib/module/Checkbox.js +42 -0
- package/lib/module/Chip.js +80 -0
- package/lib/module/Collapsible.js +26 -0
- package/lib/module/ContextMenu.js +33 -0
- package/lib/module/Dialog.js +39 -123
- package/lib/module/DropdownMenu.js +33 -0
- package/lib/module/Field.js +22 -0
- package/lib/module/Glass.js +10 -3
- package/lib/module/Group.js +36 -0
- package/lib/module/IconButton.js +40 -0
- package/lib/module/Input.js +43 -38
- package/lib/module/Label.js +17 -0
- package/lib/module/MorphGroup.js +47 -0
- package/lib/module/Popover.js +29 -0
- package/lib/module/Progress.js +32 -0
- package/lib/module/RadioGroup.js +51 -0
- package/lib/module/Scrim.js +44 -0
- package/lib/module/SegmentedControl.js +70 -63
- package/lib/module/Select.js +51 -0
- package/lib/module/Separator.js +25 -0
- package/lib/module/Sheet.js +51 -0
- package/lib/module/Skeleton.js +48 -0
- package/lib/module/Slider.js +45 -34
- package/lib/module/Stepper.js +167 -0
- package/lib/module/Switch.js +45 -55
- package/lib/module/TabBar.js +50 -44
- package/lib/module/Textarea.js +18 -0
- package/lib/module/Toast.js +55 -0
- package/lib/module/Toggle.js +47 -0
- package/lib/module/ToggleGroup.js +56 -0
- package/lib/module/Toolbar.js +37 -0
- package/lib/module/Tooltip.js +31 -0
- package/lib/module/glass-provider.js +28 -0
- package/lib/module/glass-stack.js +61 -0
- package/lib/module/index.js +78 -109
- package/lib/module/internal/GlassBackdrop.js +36 -0
- package/lib/module/internal/GlassView.js +43 -11
- package/lib/module/internal/blur-community.js +20 -0
- package/lib/module/internal/blur-community.web.js +9 -0
- package/lib/module/internal/blur.js +6 -9
- package/lib/module/internal/glass-routing.js +154 -30
- package/lib/module/internal/initials.js +12 -0
- package/lib/module/internal/overlay.js +147 -0
- package/lib/module/internal/primitives.js +16 -0
- package/lib/typescript/Accordion.d.ts +22 -0
- package/lib/typescript/ActionSheet.d.ts +24 -0
- package/lib/typescript/Alert.d.ts +15 -0
- package/lib/typescript/AlertDialog.d.ts +17 -0
- package/lib/typescript/Avatar.d.ts +22 -0
- package/lib/typescript/Badge.d.ts +12 -0
- package/lib/typescript/Bars.d.ts +3 -188
- package/lib/typescript/Button.d.ts +44 -10
- package/lib/typescript/Card.d.ts +30 -3
- package/lib/typescript/Checkbox.d.ts +14 -0
- package/lib/typescript/Chip.d.ts +19 -0
- package/lib/typescript/Collapsible.d.ts +17 -0
- package/lib/typescript/ContextMenu.d.ts +23 -0
- package/lib/typescript/Dialog.d.ts +8 -68
- package/lib/typescript/DropdownMenu.d.ts +23 -0
- package/lib/typescript/Field.d.ts +19 -0
- package/lib/typescript/Glass.d.ts +11 -2
- package/lib/typescript/Group.d.ts +35 -0
- package/lib/typescript/IconButton.d.ts +21 -0
- package/lib/typescript/Input.d.ts +17 -18
- package/lib/typescript/Label.d.ts +14 -0
- package/lib/typescript/MorphGroup.d.ts +46 -0
- package/lib/typescript/Popover.d.ts +17 -0
- package/lib/typescript/Progress.d.ts +13 -0
- package/lib/typescript/RadioGroup.d.ts +21 -0
- package/lib/typescript/Scrim.d.ts +33 -0
- package/lib/typescript/SegmentedControl.d.ts +24 -13
- package/lib/typescript/Select.d.ts +19 -0
- package/lib/typescript/Separator.d.ts +10 -0
- package/lib/typescript/Sheet.d.ts +45 -0
- package/lib/typescript/Skeleton.d.ts +10 -0
- package/lib/typescript/Slider.d.ts +15 -7
- package/lib/typescript/Stepper.d.ts +49 -0
- package/lib/typescript/Switch.d.ts +19 -12
- package/lib/typescript/TabBar.d.ts +18 -6
- package/lib/typescript/Textarea.d.ts +6 -0
- package/lib/typescript/Toast.d.ts +40 -0
- package/lib/typescript/Toggle.d.ts +21 -0
- package/lib/typescript/ToggleGroup.d.ts +22 -0
- package/lib/typescript/Toolbar.d.ts +35 -0
- package/lib/typescript/Tooltip.d.ts +16 -0
- package/lib/typescript/glass-provider.d.ts +34 -0
- package/lib/typescript/glass-stack.d.ts +54 -0
- package/lib/typescript/index.d.ts +38 -17
- package/lib/typescript/internal/GlassBackdrop.d.ts +33 -0
- package/lib/typescript/internal/GlassView.d.ts +18 -2
- package/lib/typescript/internal/blur-community.d.ts +2 -0
- package/lib/typescript/internal/blur-community.web.d.ts +2 -0
- package/lib/typescript/internal/glass-routing.d.ts +83 -15
- package/lib/typescript/internal/initials.d.ts +2 -0
- package/lib/typescript/internal/overlay.d.ts +74 -0
- package/lib/typescript/internal/primitives.d.ts +11 -0
- package/package.json +4 -2
- package/src/Accordion.tsx +165 -0
- package/src/ActionSheet.tsx +149 -0
- package/src/Alert.tsx +85 -0
- package/src/AlertDialog.tsx +124 -0
- package/src/Avatar.tsx +102 -0
- package/src/Badge.tsx +80 -0
- package/src/Bars.tsx +10 -807
- package/src/Button.tsx +196 -67
- package/src/Card.tsx +105 -32
- package/src/Checkbox.tsx +98 -0
- package/src/Chip.tsx +149 -0
- package/src/Collapsible.tsx +66 -0
- package/src/ContextMenu.tsx +103 -0
- package/src/Dialog.tsx +85 -335
- package/src/DropdownMenu.tsx +103 -0
- package/src/Field.tsx +65 -0
- package/src/Glass.tsx +15 -5
- package/src/Group.tsx +98 -0
- package/src/IconButton.tsx +110 -0
- package/src/Input.tsx +139 -87
- package/src/Label.tsx +56 -0
- package/src/MorphGroup.tsx +134 -0
- package/src/Popover.tsx +81 -0
- package/src/Progress.tsx +83 -0
- package/src/RadioGroup.tsx +122 -0
- package/src/Scrim.tsx +94 -0
- package/src/SegmentedControl.tsx +132 -99
- package/src/Select.tsx +136 -0
- package/src/Separator.tsx +52 -0
- package/src/Sheet.tsx +139 -0
- package/src/Skeleton.tsx +77 -0
- package/src/Slider.tsx +84 -47
- package/src/Stepper.tsx +315 -0
- package/src/Switch.tsx +81 -73
- package/src/TabBar.tsx +106 -93
- package/src/Textarea.tsx +34 -0
- package/src/Toast.tsx +131 -0
- package/src/Toggle.tsx +113 -0
- package/src/ToggleGroup.tsx +129 -0
- package/src/Toolbar.tsx +111 -0
- package/src/Tooltip.tsx +79 -0
- package/src/engine/CHANGELOG.md +430 -0
- package/src/engine/NOTICE +54 -0
- package/src/engine/README.md +975 -0
- package/src/engine/android/build.gradle +18 -0
- package/src/engine/android/src/main/AndroidManifest.xml +2 -0
- package/src/engine/android/src/main/java/expo/modules/liquidglass/ExpoLiquidGlassModule.kt +174 -0
- package/src/engine/android/src/main/java/expo/modules/liquidglass/GlassConstants.kt +7 -0
- package/src/engine/android/src/main/java/expo/modules/liquidglass/LiquidGlassContainerView.kt +16 -0
- package/src/engine/android/src/main/java/expo/modules/liquidglass/LiquidGlassProviderView.kt +165 -0
- package/src/engine/android/src/main/java/expo/modules/liquidglass/LiquidGlassView.kt +1731 -0
- package/src/engine/android/src/main/java/expo/modules/liquidglass/enums/GlassEnums.kt +171 -0
- package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/BackdropGraph.kt +146 -0
- package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/BackdropSource.kt +53 -0
- package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/ContinuousCorners.kt +188 -0
- package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/CornerRadii.kt +62 -0
- package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassAppearance.kt +352 -0
- package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassDebug.kt +109 -0
- package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassEnvironment.kt +139 -0
- package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassHdr.kt +85 -0
- package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassLuminanceProbe.kt +189 -0
- package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassPressAnimator.kt +264 -0
- package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassProgressiveBlur.kt +249 -0
- package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassShaderCache.kt +256 -0
- package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassShaderSource.kt +845 -0
- package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/GlassTier.kt +63 -0
- package/src/engine/android/src/main/java/expo/modules/liquidglass/glass/ProviderRegistry.kt +71 -0
- package/src/engine/android/src/main/java/expo/modules/liquidglass/records/GlassRecords.kt +288 -0
- package/src/engine/index.ts +24 -0
- package/src/engine/ios/Enums/GlassBlurDirection.swift +21 -0
- package/src/engine/ios/Enums/GlassVariant.swift +86 -0
- package/src/engine/ios/ExpoLiquidGlass.podspec +93 -0
- package/src/engine/ios/ExpoLiquidGlassModule.swift +77 -0
- package/src/engine/ios/Glass/BackdropCapturer.swift +811 -0
- package/src/engine/ios/Glass/ContinuousCorners.swift +165 -0
- package/src/engine/ios/Glass/GlassBackdrop.swift +176 -0
- package/src/engine/ios/Glass/GlassFramePhase.swift +126 -0
- package/src/engine/ios/Glass/GlassFrameScheduler.swift +261 -0
- package/src/engine/ios/Glass/GlassPressAnimator.swift +250 -0
- package/src/engine/ios/Glass/GlassRenderContext.swift +168 -0
- package/src/engine/ios/Glass/GlassRenderer.swift +186 -0
- package/src/engine/ios/Glass/GlassSurfaceView.swift +452 -0
- package/src/engine/ios/Glass/NonRenderableView.swift +54 -0
- package/src/engine/ios/Glass/StripCache.swift +545 -0
- package/src/engine/ios/Records/GlassCornerRadii.swift +79 -0
- package/src/engine/ios/Records/GlassMetalOptions.swift +180 -0
- package/src/engine/ios/Records/GlassRefractionCurve.swift +14 -0
- package/src/engine/ios/Shaders/LiquidGlass.metal +480 -0
- package/src/engine/ios/Shaders/bundle-marker.txt +6 -0
- package/src/engine/ios/Views/LiquidGlassContainerView.swift +99 -0
- package/src/engine/ios/Views/LiquidGlassView.swift +859 -0
- package/src/engine/package.json +70 -0
- package/src/engine/src/components/LiquidGlassButton/LiquidGlassButton.tsx +424 -0
- package/src/engine/src/components/LiquidGlassCard/LiquidGlassCard.tsx +98 -0
- package/src/engine/src/components/LiquidGlassChip/LiquidGlassChip.tsx +65 -0
- package/src/engine/src/components/LiquidGlassGroup/LiquidGlassGroup.tsx +350 -0
- package/src/engine/src/components/LiquidGlassIconButton/LiquidGlassIconButton.tsx +24 -0
- package/src/engine/src/components/LiquidGlassMorphGroup/LiquidGlassMorphGroup.tsx +434 -0
- package/src/engine/src/components/LiquidGlassScrim/LiquidGlassScrim.tsx +100 -0
- package/src/engine/src/components/LiquidGlassSegmentedControl/LiquidGlassSegmentedControl.tsx +213 -0
- package/src/engine/src/components/LiquidGlassSheet/LiquidGlassSheet.tsx +218 -0
- package/src/engine/src/components/LiquidGlassSlider/LiquidGlassSlider.tsx +327 -0
- package/src/engine/src/components/LiquidGlassStepper/LiquidGlassStepper.tsx +321 -0
- package/src/engine/src/components/LiquidGlassSwitch/LiquidGlassSwitch.tsx +296 -0
- package/src/engine/src/components/LiquidGlassTabBar/LiquidGlassTabBar.tsx +952 -0
- package/src/engine/src/components/LiquidGlassTextInput/LiquidGlassTextInput.tsx +151 -0
- package/src/engine/src/components/LiquidGlassToast/LiquidGlassToast.tsx +169 -0
- package/src/engine/src/components/LiquidGlassToolbar/LiquidGlassToolbar.tsx +124 -0
- package/src/engine/src/components/index.ts +16 -0
- package/src/engine/src/constants/index.ts +4 -0
- package/src/engine/src/constants/metal.constants.ts +327 -0
- package/src/engine/src/constants/metrics.constants.ts +325 -0
- package/src/engine/src/constants/springs.constants.ts +107 -0
- package/src/engine/src/constants/styles.constants.ts +12 -0
- package/src/engine/src/context/glass-group.context.ts +65 -0
- package/src/engine/src/context/index.ts +6 -0
- package/src/engine/src/core/components/LiquidGlassContainer/LiquidGlassContainer.tsx +32 -0
- package/src/engine/src/core/components/LiquidGlassContainer/index.ts +1 -0
- package/src/engine/src/core/components/LiquidGlassProvider/LiquidGlassProvider.tsx +66 -0
- package/src/engine/src/core/components/LiquidGlassProvider/index.ts +1 -0
- package/src/engine/src/core/components/LiquidGlassStack/LiquidGlassStack.tsx +184 -0
- package/src/engine/src/core/components/LiquidGlassStack/index.ts +1 -0
- package/src/engine/src/core/components/LiquidGlassView/LiquidGlassView.tsx +126 -0
- package/src/engine/src/core/components/LiquidGlassView/index.ts +1 -0
- package/src/engine/src/core/components/index.ts +4 -0
- package/src/engine/src/core/constants/glass.constants.ts +57 -0
- package/src/engine/src/core/constants/index.ts +20 -0
- package/src/engine/src/core/constants/native.constants.ts +16 -0
- package/src/engine/src/core/context/glass-stack.context.ts +30 -0
- package/src/engine/src/core/context/index.ts +4 -0
- package/src/engine/src/core/enum/index.ts +12 -0
- package/src/engine/src/core/index.ts +1 -0
- package/src/engine/src/core/interfaces/glass-hdr.interface.ts +15 -0
- package/src/engine/src/core/interfaces/glass-metal.interface.ts +248 -0
- package/src/engine/src/core/interfaces/glass-surface.interface.ts +9 -0
- package/src/engine/src/core/interfaces/index.ts +31 -0
- package/src/engine/src/core/interfaces/liquid-glass-container.interface.ts +6 -0
- package/src/engine/src/core/interfaces/liquid-glass-provider.interface.ts +14 -0
- package/src/engine/src/core/interfaces/liquid-glass-stack.interface.ts +21 -0
- package/src/engine/src/core/interfaces/liquid-glass-view.interface.ts +129 -0
- package/src/engine/src/core/interfaces/native-liquid-glass-view.interface.ts +19 -0
- package/src/engine/src/core/modules/ExpoLiquidGlassModule.ts +26 -0
- package/src/engine/src/core/modules/index.ts +2 -0
- package/src/engine/src/core/root/index.ts +51 -0
- package/src/engine/src/core/types/glass.types.ts +25 -0
- package/src/engine/src/core/types/index.ts +8 -0
- package/src/engine/src/core/utils/debug.utils.ts +17 -0
- package/src/engine/src/core/utils/dev-warn.utils.ts +17 -0
- package/src/engine/src/core/utils/hdr.utils.ts +37 -0
- package/src/engine/src/core/utils/index.ts +5 -0
- package/src/engine/src/core/utils/native-view.utils.ts +33 -0
- package/src/engine/src/core/utils/platform.utils.ts +34 -0
- package/src/engine/src/core/views/NativeGlassBackdropView.ts +24 -0
- package/src/engine/src/core/views/NativeLiquidGlassContainerView.ts +13 -0
- package/src/engine/src/core/views/NativeLiquidGlassContainerView.web.ts +10 -0
- package/src/engine/src/core/views/NativeLiquidGlassProviderView.ts +13 -0
- package/src/engine/src/core/views/NativeLiquidGlassProviderView.web.ts +10 -0
- package/src/engine/src/core/views/NativeLiquidGlassView.ts +19 -0
- package/src/engine/src/core/views/NativeLiquidGlassView.web.ts +14 -0
- package/src/engine/src/core/views/index.ts +4 -0
- package/src/engine/src/hooks/index.ts +18 -0
- package/src/engine/src/hooks/use-adaptive-glass.ts +91 -0
- package/src/engine/src/hooks/use-damped-drag.ts +332 -0
- package/src/engine/src/hooks/use-echo-filter.ts +55 -0
- package/src/engine/src/hooks/use-glass-group-member.ts +169 -0
- package/src/engine/src/hooks/use-gravity-highlight.ts +79 -0
- package/src/engine/src/hooks/use-press-progress.ts +44 -0
- package/src/engine/src/index.ts +120 -0
- package/src/engine/src/interfaces/index.ts +28 -0
- package/src/engine/src/interfaces/liquid-glass-button.interface.ts +94 -0
- package/src/engine/src/interfaces/liquid-glass-card.interface.ts +40 -0
- package/src/engine/src/interfaces/liquid-glass-chip.interface.ts +29 -0
- package/src/engine/src/interfaces/liquid-glass-group.interface.ts +32 -0
- package/src/engine/src/interfaces/liquid-glass-icon-button.interface.ts +19 -0
- package/src/engine/src/interfaces/liquid-glass-morph-group.interface.ts +59 -0
- package/src/engine/src/interfaces/liquid-glass-scrim.interface.ts +36 -0
- package/src/engine/src/interfaces/liquid-glass-segmented-control.interface.ts +32 -0
- package/src/engine/src/interfaces/liquid-glass-sheet.interface.ts +38 -0
- package/src/engine/src/interfaces/liquid-glass-slider.interface.ts +37 -0
- package/src/engine/src/interfaces/liquid-glass-stepper.interface.ts +35 -0
- package/src/engine/src/interfaces/liquid-glass-switch.interface.ts +27 -0
- package/src/engine/src/interfaces/liquid-glass-tab-bar.interface.ts +116 -0
- package/src/engine/src/interfaces/liquid-glass-text-input.interface.ts +42 -0
- package/src/engine/src/interfaces/liquid-glass-toast.interface.ts +36 -0
- package/src/engine/src/interfaces/liquid-glass-toolbar.interface.ts +33 -0
- package/src/engine/src/theme/glass-ui-theme.ts +100 -0
- package/src/engine/src/theme/index.ts +2 -0
- package/src/engine/src/utils/button-press.utils.ts +63 -0
- package/src/engine/src/utils/index.ts +3 -0
- package/src/engine/src/utils/metal.utils.ts +164 -0
- package/src/glass-provider.tsx +60 -0
- package/src/glass-stack.tsx +115 -0
- package/src/index.ts +47 -190
- package/src/internal/GlassBackdrop.tsx +60 -0
- package/src/internal/GlassView.tsx +53 -18
- package/src/internal/blur-community.ts +19 -0
- package/src/internal/blur-community.web.ts +7 -0
- package/src/internal/blur.ts +7 -8
- package/src/internal/glass-routing.ts +211 -34
- package/src/internal/initials.ts +7 -0
- package/src/internal/overlay.tsx +258 -0
- package/src/internal/primitives.ts +23 -0
- package/lib/module/Carousel.js +0 -103
- package/lib/module/Display.js +0 -318
- package/lib/module/Feedback.js +0 -395
- package/lib/module/Form.js +0 -160
- package/lib/module/Forms2.js +0 -471
- package/lib/module/Message.js +0 -84
- package/lib/module/Overlays.js +0 -344
- package/lib/module/Pickers.js +0 -243
- package/lib/module/Table.js +0 -100
- package/lib/module/ai.js +0 -283
- package/lib/module/charts/AreaChart.js +0 -32
- package/lib/module/charts/BarChart.js +0 -75
- package/lib/module/charts/FunnelChart.js +0 -50
- package/lib/module/charts/HeatmapChart.js +0 -71
- package/lib/module/charts/LineChart.js +0 -81
- package/lib/module/charts/PlotChart.js +0 -52
- package/lib/module/charts/RadarChart.js +0 -78
- package/lib/module/charts/RingChart.js +0 -52
- package/lib/module/charts/ScatterChart.js +0 -95
- package/lib/module/charts/WaterfallChart.js +0 -85
- package/lib/module/charts/advanced.js +0 -313
- package/lib/module/charts/extra.js +0 -108
- package/lib/module/charts/index.js +0 -50
- package/lib/module/charts/scales.js +0 -140
- package/lib/typescript/Carousel.d.ts +0 -47
- package/lib/typescript/Display.d.ts +0 -178
- package/lib/typescript/Feedback.d.ts +0 -196
- package/lib/typescript/Form.d.ts +0 -97
- package/lib/typescript/Forms2.d.ts +0 -209
- package/lib/typescript/Message.d.ts +0 -67
- package/lib/typescript/Overlays.d.ts +0 -146
- package/lib/typescript/Pickers.d.ts +0 -105
- package/lib/typescript/Table.d.ts +0 -64
- package/lib/typescript/ai.d.ts +0 -166
- package/lib/typescript/charts/AreaChart.d.ts +0 -44
- package/lib/typescript/charts/BarChart.d.ts +0 -19
- package/lib/typescript/charts/FunnelChart.d.ts +0 -25
- package/lib/typescript/charts/HeatmapChart.d.ts +0 -23
- package/lib/typescript/charts/LineChart.d.ts +0 -30
- package/lib/typescript/charts/PlotChart.d.ts +0 -31
- package/lib/typescript/charts/RadarChart.d.ts +0 -27
- package/lib/typescript/charts/RingChart.d.ts +0 -28
- package/lib/typescript/charts/ScatterChart.d.ts +0 -34
- package/lib/typescript/charts/WaterfallChart.d.ts +0 -22
- package/lib/typescript/charts/advanced.d.ts +0 -107
- package/lib/typescript/charts/extra.d.ts +0 -63
- package/lib/typescript/charts/index.d.ts +0 -13
- package/lib/typescript/charts/scales.d.ts +0 -35
- package/src/Carousel.tsx +0 -233
- package/src/Display.tsx +0 -781
- package/src/Feedback.tsx +0 -992
- package/src/Form.tsx +0 -445
- package/src/Forms2.tsx +0 -1055
- package/src/Message.tsx +0 -218
- package/src/Overlays.tsx +0 -704
- package/src/Pickers.tsx +0 -595
- package/src/Table.tsx +0 -232
- package/src/ai.tsx +0 -715
- package/src/charts/AreaChart.tsx +0 -73
- package/src/charts/BarChart.tsx +0 -221
- package/src/charts/FunnelChart.tsx +0 -125
- package/src/charts/HeatmapChart.tsx +0 -155
- package/src/charts/LineChart.tsx +0 -247
- package/src/charts/PlotChart.tsx +0 -168
- package/src/charts/RadarChart.tsx +0 -208
- package/src/charts/RingChart.tsx +0 -133
- package/src/charts/ScatterChart.tsx +0 -223
- package/src/charts/WaterfallChart.tsx +0 -201
- package/src/charts/advanced.tsx +0 -676
- package/src/charts/extra.tsx +0 -242
- package/src/charts/index.ts +0 -86
- package/src/charts/scales.ts +0 -163
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { StyleProp, TextStyle, ViewStyle } from "react-native";
|
|
3
|
+
export interface ToolbarProps {
|
|
4
|
+
/** The title. A string is set in a glass capsule of its own between the two ends; a node is rendered as given. */
|
|
5
|
+
title?: ReactNode;
|
|
6
|
+
/** Controls at the leading end — a back button, a menu. They merge when pressed. */
|
|
7
|
+
leading?: ReactNode;
|
|
8
|
+
/** Controls at the trailing end — actions. They merge when pressed. */
|
|
9
|
+
trailing?: ReactNode;
|
|
10
|
+
/** The merge distance for each end's group, dp. Defaults to 28. */
|
|
11
|
+
spacing?: number;
|
|
12
|
+
/** Gap between controls at either end, dp. Defaults to 12. */
|
|
13
|
+
gap?: number;
|
|
14
|
+
/** Bar height, dp. Defaults to 48. */
|
|
15
|
+
height?: number;
|
|
16
|
+
/** The title capsule's wash. */
|
|
17
|
+
tint?: string;
|
|
18
|
+
variant?: "regular" | "clear";
|
|
19
|
+
style?: StyleProp<ViewStyle>;
|
|
20
|
+
titleStyle?: StyleProp<TextStyle>;
|
|
21
|
+
isDark?: boolean;
|
|
22
|
+
/** Passed to the control so it is testable. */
|
|
23
|
+
testID?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* A toolbar — ported from the engine's `LiquidGlassToolbar`, the design Binyam
|
|
27
|
+
* approved on real devices this week (48dp row, title capsule between the ends,
|
|
28
|
+
* leading and trailing groups that merge when pressed).
|
|
29
|
+
*
|
|
30
|
+
* With a glass renderer available the engine's own control mounts, carrying the
|
|
31
|
+
* approved material and merge behaviour. Without one — Expo Go, below every
|
|
32
|
+
* tier, or Reduce Transparency — the fallback floor renders the same row with a
|
|
33
|
+
* solid surface, so the toolbar is never invisible.
|
|
34
|
+
*/
|
|
35
|
+
export declare const Toolbar: import("react").ForwardRefExoticComponent<ToolbarProps & import("react").RefAttributes<any>>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { StyleProp, ViewStyle } from "react-native";
|
|
3
|
+
export interface TooltipProps {
|
|
4
|
+
/** The hint text. */
|
|
5
|
+
label: string;
|
|
6
|
+
/** The control the tooltip describes. */
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
open?: boolean;
|
|
9
|
+
defaultOpen?: boolean;
|
|
10
|
+
onOpenChange?: (open: boolean) => void;
|
|
11
|
+
side?: "top" | "bottom";
|
|
12
|
+
isDark?: boolean;
|
|
13
|
+
style?: StyleProp<ViewStyle>;
|
|
14
|
+
testID?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare function Tooltip({ label, children, open: openProp, defaultOpen, onOpenChange, isDark: isDarkProp, style, testID, }: TooltipProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { StyleProp, ViewStyle } from "react-native";
|
|
3
|
+
export interface GlassProviderProps {
|
|
4
|
+
/**
|
|
5
|
+
* The content whose backdrop the glass behind it samples. On Android this is
|
|
6
|
+
* the single direct child of the provider — the one content child — and glass
|
|
7
|
+
* views are its siblings, never its children.
|
|
8
|
+
*/
|
|
9
|
+
children?: ReactNode;
|
|
10
|
+
/** Layout style of the recording container, if any. */
|
|
11
|
+
style?: StyleProp<ViewStyle>;
|
|
12
|
+
/**
|
|
13
|
+
* Pairs this provider with the glass views that read its backdrop. Defaults to
|
|
14
|
+
* the engine's `"default"`.
|
|
15
|
+
*/
|
|
16
|
+
providerId?: string;
|
|
17
|
+
isDark?: boolean;
|
|
18
|
+
/** Passed through to the underlying container so tests can find it. */
|
|
19
|
+
testID?: string;
|
|
20
|
+
[prop: string]: any;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Marks the content that should show through the glass.
|
|
24
|
+
*
|
|
25
|
+
* The engine's provider records the backdrop for the glass views that read it.
|
|
26
|
+
* On Android it is the backdrop source itself — content sits inside it as its
|
|
27
|
+
* one direct child and glass views are its siblings, never inside it, so a glass
|
|
28
|
+
* can never end up refracting its own output. On iOS and on platforms without a
|
|
29
|
+
* glass renderer it renders a plain view, so it is safe to wrap unconditionally.
|
|
30
|
+
*
|
|
31
|
+
* On iOS the default is whole-window capture; the scoped `GlassBackdrop` provider
|
|
32
|
+
* arrives with the strip-cache work (§6 of the rebuild brief).
|
|
33
|
+
*/
|
|
34
|
+
export declare const GlassProvider: import("react").ForwardRefExoticComponent<Omit<GlassProviderProps, "ref"> & import("react").RefAttributes<any>>;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { StyleProp, ViewStyle } from "react-native";
|
|
3
|
+
export interface GlassStackLayerProps {
|
|
4
|
+
/** The layer's content. */
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
/** The layer's own layout. Layers all share the stack's box; this insets or pads inside it. */
|
|
7
|
+
style?: StyleProp<ViewStyle>;
|
|
8
|
+
/** Passed through so a layer is findable in tests and on-device inspectors. */
|
|
9
|
+
testID?: string;
|
|
10
|
+
[prop: string]: any;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* A marker, not a wrapper. `GlassStack` reads the layer props off these elements
|
|
14
|
+
* and builds the real (provider-nested) tree itself, so a bare `Layer` renders
|
|
15
|
+
* its content in a plain view.
|
|
16
|
+
*/
|
|
17
|
+
declare const GlassStackLayer: {
|
|
18
|
+
({ children, style, ...props }: GlassStackLayerProps): import("react").JSX.Element;
|
|
19
|
+
displayName: string;
|
|
20
|
+
};
|
|
21
|
+
export interface GlassStackProps {
|
|
22
|
+
/** The layers, bottom to top. Bare children are treated as layers of their own. */
|
|
23
|
+
children?: ReactNode;
|
|
24
|
+
/**
|
|
25
|
+
* The stack's box. Layers are absolute, so the stack must own a size — pass
|
|
26
|
+
* `flex: 1` or a fixed height. Defaults to `flex: 1`.
|
|
27
|
+
*/
|
|
28
|
+
style?: StyleProp<ViewStyle>;
|
|
29
|
+
/** Passed to the underlying stack so tests can find it. */
|
|
30
|
+
testID?: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Declarative stacked glass — glass that refracts other glass.
|
|
34
|
+
*
|
|
35
|
+
* Layers go bottom to top. Glass inside layer *k* automatically reads a backdrop
|
|
36
|
+
* containing everything below it, including lower layers' finished glass, so a
|
|
37
|
+
* sheet over a glass pill shows the pill's frost re-refracted through its own
|
|
38
|
+
* lens. Layers are direct children of the stack; mount and unmount *content
|
|
39
|
+
* inside* a layer rather than the layer list itself.
|
|
40
|
+
*
|
|
41
|
+
* Every layer occupies the stack's box once, at an explicit z-order — the fix
|
|
42
|
+
* for the smeared, overlapping layers in the lab demo (§7.2). Below every glass
|
|
43
|
+
* tier the layers still render, as plain views, so a stack is never blank.
|
|
44
|
+
*/
|
|
45
|
+
declare const GlassStackBase: import("react").ForwardRefExoticComponent<GlassStackProps & import("react").RefAttributes<any>>;
|
|
46
|
+
/**
|
|
47
|
+
* The stacked-glass primitive. Renders the engine's stack, which builds the
|
|
48
|
+
* nested provider topology for its layers; below every glass tier it renders
|
|
49
|
+
* the plain layer views.
|
|
50
|
+
*/
|
|
51
|
+
export declare const GlassStack: typeof GlassStackBase & {
|
|
52
|
+
Layer: typeof GlassStackLayer;
|
|
53
|
+
};
|
|
54
|
+
export {};
|
|
@@ -1,5 +1,11 @@
|
|
|
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 { supportsGlass, supportsNativeGlass, readCapabilities, loadEngineControl, ENGINE_CONTROL_NAMES, type GlassCapabilities, } from "./internal/glass-routing";
|
|
2
4
|
export type { SurfaceProfile } from "./internal/material";
|
|
5
|
+
export { GlassContainer, type NativeGlassContainerProps } from "./internal/GlassContainer";
|
|
6
|
+
export { GlassProvider, type GlassProviderProps } from "./glass-provider";
|
|
7
|
+
export { GlassBackdrop, type GlassBackdropProps } from "./internal/GlassBackdrop";
|
|
8
|
+
export { GlassStack, type GlassStackProps } from "./glass-stack";
|
|
3
9
|
export { Button, type ButtonProps } from "./Button";
|
|
4
10
|
export { Switch, type SwitchProps } from "./Switch";
|
|
5
11
|
export { Slider, type SliderProps } from "./Slider";
|
|
@@ -7,21 +13,36 @@ export { SegmentedControl, type SegmentedControlProps, } from "./SegmentedContro
|
|
|
7
13
|
export { TabBar, type TabBarProps, type TabBarItem } from "./TabBar";
|
|
8
14
|
export { Tabs, type TabsProps, type TabItem } from "./Tabs";
|
|
9
15
|
export { Card, CardHeader, CardTitle, CardDescription, CardContent, CardBody, CardFooter, type CardProps, } from "./Card";
|
|
10
|
-
export { Input,
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
13
|
-
export {
|
|
14
|
-
export {
|
|
15
|
-
export
|
|
16
|
+
export { Input, type InputProps } from "./Input";
|
|
17
|
+
export { Textarea, type TextareaProps } from "./Textarea";
|
|
18
|
+
export { Label, type LabelProps } from "./Label";
|
|
19
|
+
export { Field, type FieldProps } from "./Field";
|
|
20
|
+
export { Checkbox, type CheckboxProps } from "./Checkbox";
|
|
21
|
+
export { RadioGroup, type RadioOption, type RadioGroupProps } from "./RadioGroup";
|
|
22
|
+
export { Select, type SelectOption, type SelectProps } from "./Select";
|
|
23
|
+
export { Dialog, DialogTrigger, type DialogProps, type DialogTriggerProps } from "./Dialog";
|
|
24
|
+
export { AlertDialog, type AlertDialogProps } from "./AlertDialog";
|
|
25
|
+
export { Alert, type AlertProps, type AlertTone } from "./Alert";
|
|
26
|
+
export { ActionSheet, type ActionSheetProps, type ActionSheetOption } from "./ActionSheet";
|
|
27
|
+
export { Collapsible, type CollapsibleProps } from "./Collapsible";
|
|
28
|
+
export { ContextMenu, type ContextMenuProps, type ContextMenuItem } from "./ContextMenu";
|
|
29
|
+
export { DropdownMenu, type DropdownMenuProps, type DropdownMenuItem } from "./DropdownMenu";
|
|
30
|
+
export { Popover, type PopoverProps } from "./Popover";
|
|
31
|
+
export { Tooltip, type TooltipProps } from "./Tooltip";
|
|
16
32
|
export { Text, type TextProps, type TextVariant } from "./Text";
|
|
17
|
-
export { Avatar,
|
|
18
|
-
export {
|
|
19
|
-
export {
|
|
20
|
-
export {
|
|
21
|
-
export {
|
|
22
|
-
export {
|
|
23
|
-
export {
|
|
24
|
-
export {
|
|
25
|
-
export {
|
|
26
|
-
export {
|
|
33
|
+
export { Avatar, initialsOf, type AvatarProps, type AvatarSize } from "./Avatar";
|
|
34
|
+
export { Badge, type BadgeProps } from "./Badge";
|
|
35
|
+
export { Separator, type SeparatorProps } from "./Separator";
|
|
36
|
+
export { Skeleton, type SkeletonProps } from "./Skeleton";
|
|
37
|
+
export { Progress, type ProgressProps, type ProgressVariant } from "./Progress";
|
|
38
|
+
export { Toast, type ToastProps } from "./Toast";
|
|
39
|
+
export { Accordion, type AccordionProps, type AccordionSection } from "./Accordion";
|
|
40
|
+
export { Chip, IconButton, Toolbar, type ChipProps, type IconButtonProps, type ToolbarProps, } from "./Bars";
|
|
41
|
+
export { Group, type GroupProps } from "./Group";
|
|
42
|
+
export { MorphGroup, type MorphGroupProps, type MorphGroupItem } from "./MorphGroup";
|
|
43
|
+
export { Scrim, type ScrimProps } from "./Scrim";
|
|
44
|
+
export { Sheet, type SheetProps } from "./Sheet";
|
|
45
|
+
export { Stepper, type StepperProps } from "./Stepper";
|
|
46
|
+
export { Toggle, type ToggleProps } from "./Toggle";
|
|
47
|
+
export { ToggleGroup, type ToggleGroupProps, type ToggleGroupItem } from "./ToggleGroup";
|
|
27
48
|
export { colors, controlSizes, palette, radii, springs, typeScale, toneColor, type Tone, } from "./internal/tokens";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { StyleProp, ViewStyle } from "react-native";
|
|
3
|
+
export interface GlassBackdropProps {
|
|
4
|
+
/**
|
|
5
|
+
* The scroll view inside this subtree whose content the glass photographs in
|
|
6
|
+
* content coordinates. Usually left out: the first scroll view found in the
|
|
7
|
+
* subtree is the one tracked, which is what a list screen wants.
|
|
8
|
+
*/
|
|
9
|
+
children?: ReactNode;
|
|
10
|
+
style?: StyleProp<ViewStyle>;
|
|
11
|
+
testID?: string;
|
|
12
|
+
[prop: string]: any;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* A bounded backdrop scope for glass that sits over scrolling content.
|
|
16
|
+
*
|
|
17
|
+
* Inside a `GlassBackdrop`, glass photographs the scroll content in CONTENT
|
|
18
|
+
* coordinates rather than photographing the window. A pane dragged over a list
|
|
19
|
+
* then keeps refracting the right rows while it moves, instead of showing a
|
|
20
|
+
* still frame of where the list used to be until the finger lifts.
|
|
21
|
+
*
|
|
22
|
+
* **iOS 16.4–25 with Metal only.** iOS 26+ uses Apple's own glass, which reads
|
|
23
|
+
* the live window and needs no scope; Android has its own provider contract
|
|
24
|
+
* and this component is a plain wrapper there; below the floor it is the
|
|
25
|
+
* fallback surface and a plain wrapper here. On every platform it lays out its
|
|
26
|
+
* children exactly once, so wrapping is free where it does nothing.
|
|
27
|
+
*
|
|
28
|
+
* The scope is a hint, not a guarantee. Sticky headers, parallax, nested
|
|
29
|
+
* scrollers, video and async image loads do not fit the content-space model;
|
|
30
|
+
* the renderer detects what it can and falls back to fresh window captures for
|
|
31
|
+
* that scope rather than showing stale rows.
|
|
32
|
+
*/
|
|
33
|
+
export declare const GlassBackdrop: import("react").ForwardRefExoticComponent<Omit<GlassBackdropProps, "ref"> & import("react").RefAttributes<any>>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
2
|
import type { StyleProp, ViewStyle } from "react-native";
|
|
3
|
+
import { type GlassRouter, type GlassCapabilities } from "./glass-routing";
|
|
3
4
|
import type { SurfaceProfile } from "./material";
|
|
4
5
|
export interface NativeGlassProps {
|
|
5
6
|
effect?: "clear" | "regular" | "none";
|
|
@@ -35,12 +36,27 @@ export interface NativeGlassProps {
|
|
|
35
36
|
}
|
|
36
37
|
/** Clears the memoised decision. Only tests call this, to drive both branches. */
|
|
37
38
|
export declare function resetGlassRouter(): void;
|
|
39
|
+
/**
|
|
40
|
+
* The memoised routing decision — the package's single source of truth for
|
|
41
|
+
* which glass surface a component may mount. Read through the same router the
|
|
42
|
+
* surface itself uses, so a component and its surface can never disagree about
|
|
43
|
+
* the mount tier.
|
|
44
|
+
*/
|
|
45
|
+
export declare function glassDecision(): GlassRouter;
|
|
46
|
+
/**
|
|
47
|
+
* The capability verdicts the package switches on, read through the same
|
|
48
|
+
* memoised decision as the surface — the one place a component's engine branch
|
|
49
|
+
* and its fallback floor are chosen from.
|
|
50
|
+
*/
|
|
51
|
+
export declare function glassCapabilities(): GlassCapabilities;
|
|
38
52
|
/** Whether this build renders Apple's glass. */
|
|
39
53
|
export declare const isGlassSupported: boolean;
|
|
40
54
|
/**
|
|
41
55
|
* Platform Glass View — the single place a glass surface is chosen:
|
|
42
|
-
* - iOS 26+: Real UIGlassEffect via
|
|
43
|
-
* - iOS
|
|
56
|
+
* - iOS 26+: Real `UIGlassEffect` via the vendored engine's native view
|
|
57
|
+
* - iOS 16.4–25: the engine's Metal renderer over a captured backdrop
|
|
58
|
+
* - Android 13+: the engine's AGSL renderer over a recorded backdrop
|
|
59
|
+
* - Everywhere else: Glacia's own glass fallback of identical shape
|
|
44
60
|
*
|
|
45
61
|
* Reduce Transparency is honoured on the fallback branch only: there the
|
|
46
62
|
* translucent tint is replaced by the theme's solid glass colour, with the same
|
|
@@ -1,40 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The vendored engine's glass module, as the parts Glacia switches on.
|
|
3
|
+
*
|
|
4
|
+
* Mirrors the engine's public surface: the glass view, the merge container, the
|
|
5
|
+
* backdrop provider, the stacked-glass primitive, and the capability flags the
|
|
6
|
+
* renderer tier machinery fills in.
|
|
7
|
+
*/
|
|
1
8
|
export interface LiquidGlassModule {
|
|
2
9
|
LiquidGlassView?: any;
|
|
3
10
|
/**
|
|
4
11
|
* The container that merges nearby glass elements into one connected
|
|
5
|
-
* surface.
|
|
12
|
+
* surface. The engine names it `LiquidGlassContainer`; the older bridge
|
|
13
|
+
* package called it `LiquidGlassContainerView`. Both accepted.
|
|
6
14
|
*/
|
|
15
|
+
LiquidGlassContainer?: any;
|
|
7
16
|
LiquidGlassContainerView?: any;
|
|
17
|
+
/**
|
|
18
|
+
* Marks the content that should show through the glass (the Android backdrop
|
|
19
|
+
* source). Present on the engine module; unused off the Android tier.
|
|
20
|
+
*/
|
|
21
|
+
LiquidGlassProvider?: any;
|
|
22
|
+
LiquidGlassStack?: any;
|
|
23
|
+
/**
|
|
24
|
+
* The iOS backdrop scope view (Metal tier). Absent on the Android and native builds; a scope
|
|
25
|
+
* there would only add a view.
|
|
26
|
+
*/
|
|
27
|
+
NativeGlassBackdropView?: any;
|
|
28
|
+
/** The engine's mount gate: native (iOS 26+), Metal (iOS 16.4–25), AGSL (Android 13+). */
|
|
29
|
+
supportsGlass?: boolean;
|
|
30
|
+
/** Legacy spelling of the mount gate, from the older bridge package. */
|
|
8
31
|
isLiquidGlassSupported?: boolean;
|
|
32
|
+
/** Whether Apple's real `UIGlassEffect` is available (iOS 26+). */
|
|
33
|
+
supportsNativeGlass?: boolean;
|
|
9
34
|
}
|
|
10
35
|
/** The routing decision for one glass surface. */
|
|
11
36
|
export interface GlassRouter {
|
|
12
|
-
/** True when
|
|
37
|
+
/** True when a glass renderer can render at all — native, Metal or AGSL. */
|
|
13
38
|
supported: boolean;
|
|
14
|
-
/**
|
|
39
|
+
/** The engine's `LiquidGlassView`, or null when the fallback renders instead. */
|
|
15
40
|
LiquidGlassView: any;
|
|
16
41
|
/**
|
|
17
|
-
*
|
|
18
|
-
*
|
|
42
|
+
* The engine's container that merges neighbouring glass, or null when the
|
|
43
|
+
* fallback wrapper renders instead. Exposed under the historical field name so
|
|
44
|
+
* the rest of the package keeps reading one decision.
|
|
19
45
|
*/
|
|
20
46
|
LiquidGlassContainerView: any;
|
|
47
|
+
/** The engine's backdrop provider, or null. */
|
|
48
|
+
LiquidGlassProvider: any;
|
|
49
|
+
/** The engine's stacked-glass primitive, or null. */
|
|
50
|
+
LiquidGlassStack: any;
|
|
51
|
+
/**
|
|
52
|
+
* True when the active tier is Apple's own `UIGlassEffect` (iOS 26+) rather
|
|
53
|
+
* than the engine's Metal or AGSL renderer. Optional so a routing decision
|
|
54
|
+
* that only carries the mount gate — the test double, the fallback wrapper —
|
|
55
|
+
* can still be read as a tier.
|
|
56
|
+
*/
|
|
57
|
+
native?: boolean;
|
|
21
58
|
}
|
|
22
59
|
/**
|
|
23
60
|
* Reads a liquid-glass module and decides which branch renders.
|
|
24
61
|
*
|
|
25
62
|
* A module only counts as supported when it exports the view *and* reports
|
|
26
|
-
* support; a missing export falls back rather than crashing.
|
|
63
|
+
* support; a missing export falls back rather than crashing. Below every glass
|
|
64
|
+
* tier the answer is `false`, which is what routes the surface to Glacia's
|
|
65
|
+
* fallback floor.
|
|
27
66
|
*/
|
|
28
67
|
export declare function routerFor(module: LiquidGlassModule | null | undefined): GlassRouter;
|
|
68
|
+
/** The installed engine's routing decision, computed once per process. */
|
|
69
|
+
export declare function defaultRouter(): GlassRouter;
|
|
70
|
+
/** The installed engine's glass module, or null when it cannot be loaded. */
|
|
71
|
+
export declare function loadLiquidGlass(): LiquidGlassModule | null;
|
|
29
72
|
/**
|
|
30
|
-
*
|
|
73
|
+
* The capability verdicts Glacia switches on.
|
|
74
|
+
*/
|
|
75
|
+
export interface GlassCapabilities {
|
|
76
|
+
/** Whether any glass renderer (Apple's native, the Metal renderer, AGSL) exists. */
|
|
77
|
+
supported: boolean;
|
|
78
|
+
/** Whether Apple's own `UIGlassEffect` exists — iOS 26+ only. */
|
|
79
|
+
native: boolean;
|
|
80
|
+
}
|
|
81
|
+
/** Reads the capability verdicts from an explicit module, or from the engine. */
|
|
82
|
+
export declare function readCapabilities(module?: LiquidGlassModule | null): GlassCapabilities;
|
|
83
|
+
/**
|
|
84
|
+
* Whether any glass renderer is available on this device — the mount gate.
|
|
31
85
|
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
* iOS 26+; the default build answers false.
|
|
86
|
+
* Resolves instead of blocking: the caller renders either the glass surface or
|
|
87
|
+
* the fallback floor from this, and the floor is the safe answer, so the check
|
|
88
|
+
* must always be able to finish. When no renderer verdict has arrived the
|
|
89
|
+
* absence *is* the verdict — unsupported — and the fallback floor renders.
|
|
37
90
|
*/
|
|
38
|
-
export declare function
|
|
39
|
-
/**
|
|
40
|
-
|
|
91
|
+
export declare function supportsGlass(module?: LiquidGlassModule | null): Promise<boolean>;
|
|
92
|
+
/**
|
|
93
|
+
* Whether Apple's own glass material (`UIGlassEffect`) is available — iOS 26+.
|
|
94
|
+
* The narrower question behind the mount gate; the renderer tier machinery picks
|
|
95
|
+
* Metal or AGSL below that.
|
|
96
|
+
*/
|
|
97
|
+
export declare function supportsNativeGlass(module?: LiquidGlassModule | null): boolean;
|
|
98
|
+
/**
|
|
99
|
+
* Resolves the scope for the active tier. An explicit module is used by tests, the same way
|
|
100
|
+
* `readCapabilities` takes one: the routing question must be answerable without a device.
|
|
101
|
+
*/
|
|
102
|
+
export declare function loadBackdropScope(module?: LiquidGlassModule | null): any | null;
|
|
103
|
+
/** Clears the memoised backdrop route. Tests call this after flipping the module. */
|
|
104
|
+
export declare function resetBackdropScope(): void;
|
|
105
|
+
/** The Glacia names of every control the vendored engine carries. */
|
|
106
|
+
export declare const ENGINE_CONTROL_NAMES: readonly string[];
|
|
107
|
+
/** Loads one of the vendored engine's control components by Glacia-facing name. */
|
|
108
|
+
export declare function loadEngineControl(key: string): any | null;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { StyleProp, ViewStyle } from "react-native";
|
|
3
|
+
/**
|
|
4
|
+
* Controlled-or-uncontrolled state. The donor's model: a `value` prop makes the
|
|
5
|
+
* component controlled, `defaultValue` seeds it, and `onChange` is called either
|
|
6
|
+
* way. Kept in one place so every component behaves identically.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useControllable<T>(value: T | undefined, defaultValue: T, onChange?: (value: T) => void): [T, (next: T) => void];
|
|
9
|
+
/**
|
|
10
|
+
* Registers Android's hardware back while an overlay is open, so back closes the
|
|
11
|
+
* layer and not the screen behind it.
|
|
12
|
+
*/
|
|
13
|
+
export declare function useBackDismiss(open: boolean, dismiss: () => void): void;
|
|
14
|
+
export interface AnchorRect {
|
|
15
|
+
x: number;
|
|
16
|
+
y: number;
|
|
17
|
+
width: number;
|
|
18
|
+
height: number;
|
|
19
|
+
}
|
|
20
|
+
/** Reads a view's rectangle in window coordinates, when the runtime can. */
|
|
21
|
+
export declare function measureAnchor(node: any): Promise<AnchorRect | null>;
|
|
22
|
+
/**
|
|
23
|
+
* Places a panel beside its trigger. Flips above when there is no room below,
|
|
24
|
+
* and clamps to the viewport otherwise — the donor's collision handling, kept
|
|
25
|
+
* deliberately small.
|
|
26
|
+
*/
|
|
27
|
+
export declare function placePanel(trigger: AnchorRect, panel: {
|
|
28
|
+
width: number;
|
|
29
|
+
height: number;
|
|
30
|
+
}, viewport: {
|
|
31
|
+
width: number;
|
|
32
|
+
height: number;
|
|
33
|
+
}, gap?: number): {
|
|
34
|
+
left: number;
|
|
35
|
+
top: number;
|
|
36
|
+
flipped: boolean;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* A full-screen modal layer with a dimmed backdrop and a glass panel. Used by
|
|
40
|
+
* Dialog, Alert, AlertDialog, Popover, DropdownMenu, ContextMenu, Select and
|
|
41
|
+
* Tooltip, so dismissal, back handling and the surface are one implementation.
|
|
42
|
+
*/
|
|
43
|
+
export declare function OverlayPanel({ open, onClose, dismissOnBackdropPress, anchor, width, panelStyle, children, testID, isDark: isDarkProp, accessibilityLabel, role, }: {
|
|
44
|
+
open: boolean;
|
|
45
|
+
onClose: () => void;
|
|
46
|
+
dismissOnBackdropPress?: boolean;
|
|
47
|
+
anchor?: AnchorRect | null;
|
|
48
|
+
width?: number;
|
|
49
|
+
panelStyle?: StyleProp<ViewStyle>;
|
|
50
|
+
children: ReactNode;
|
|
51
|
+
testID?: string;
|
|
52
|
+
isDark?: boolean;
|
|
53
|
+
accessibilityLabel?: string;
|
|
54
|
+
role?: string;
|
|
55
|
+
}): import("react").JSX.Element | null;
|
|
56
|
+
/** One row inside an overlay panel — the donor's menu/option item. */
|
|
57
|
+
export declare function PanelItem({ label, onPress, icon, destructive, selected, disabled, role, style, testID, isDark: isDarkProp, }: {
|
|
58
|
+
label: string;
|
|
59
|
+
onPress: () => void;
|
|
60
|
+
icon?: ReactNode;
|
|
61
|
+
destructive?: boolean;
|
|
62
|
+
selected?: boolean;
|
|
63
|
+
disabled?: boolean;
|
|
64
|
+
role?: string;
|
|
65
|
+
style?: StyleProp<ViewStyle>;
|
|
66
|
+
testID?: string;
|
|
67
|
+
isDark?: boolean;
|
|
68
|
+
}): import("react").JSX.Element;
|
|
69
|
+
/** A positioned trigger that reports its window rectangle when it is pressed. */
|
|
70
|
+
export declare function useTriggerAnchor(): {
|
|
71
|
+
ref: import("react").RefObject<any>;
|
|
72
|
+
anchor: AnchorRect | null;
|
|
73
|
+
capture: () => Promise<AnchorRect | null>;
|
|
74
|
+
};
|
|
@@ -51,6 +51,17 @@ export interface RNPrimitives {
|
|
|
51
51
|
width: number;
|
|
52
52
|
height: number;
|
|
53
53
|
};
|
|
54
|
+
/**
|
|
55
|
+
* React Native's safe-area insets, or a zero reader off-device. Bottom bars
|
|
56
|
+
* (the TabBar) float the glass above the system inset — the Android nav bar or
|
|
57
|
+
* the iOS home indicator — instead of letting it sink under.
|
|
58
|
+
*/
|
|
59
|
+
useSafeAreaInsets: () => {
|
|
60
|
+
top: number;
|
|
61
|
+
bottom: number;
|
|
62
|
+
left: number;
|
|
63
|
+
right: number;
|
|
64
|
+
};
|
|
54
65
|
}
|
|
55
66
|
/**
|
|
56
67
|
* Records an element's width for gesture maths when the environment has no
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "glacia-native",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Liquid Glass UI components for React Native — real iOS 26 glass, with a clean fallback on Android and older iOS.",
|
|
5
5
|
"author": "Binyam Feyissa (https://github.com/binyamfeyissa)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,9 +22,11 @@
|
|
|
22
22
|
"src"
|
|
23
23
|
],
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"
|
|
25
|
+
"expo": "*",
|
|
26
26
|
"react": ">=18",
|
|
27
27
|
"react-native": ">=0.80",
|
|
28
|
+
"react-native-gesture-handler": ">=2.20.0",
|
|
29
|
+
"react-native-reanimated": ">=3.16.0",
|
|
28
30
|
"react-native-svg": ">=13",
|
|
29
31
|
"expo-blur": ">=12",
|
|
30
32
|
"@react-native-community/blur": ">=4"
|