@luckylca/react-native-liquid-glass 0.0.0-stage → 0.3.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/LICENSE +21 -0
- package/README.md +294 -2
- package/README.zh-CN.md +297 -0
- package/THIRD_PARTY_NOTICES.md +98 -0
- package/android/build.gradle +19 -0
- package/android/src/main/AndroidManifest.xml +1 -0
- package/android/src/main/java/expo/modules/liquidglass/EffectiveScrollInputBridge.kt +47 -0
- package/android/src/main/java/expo/modules/liquidglass/GlassCaptureView.kt +1125 -0
- package/android/src/main/java/expo/modules/liquidglass/GlassRegistry.kt +75 -0
- package/android/src/main/java/expo/modules/liquidglass/GlassSurfaceView.kt +571 -0
- package/android/src/main/java/expo/modules/liquidglass/LiquidGlassModule.kt +205 -0
- package/android/src/main/java/expo/modules/liquidglass/LocalMaterialView.kt +138 -0
- package/android/src/main/java/expo/modules/liquidglass/PassSurfaceSuppression.kt +39 -0
- package/android/src/main/java/expo/modules/liquidglass/SharedGlassPassProbeLog.kt +23 -0
- package/android/src/main/java/expo/modules/liquidglass/SharedGlassPassWiring.kt +59 -0
- package/android-core/build.gradle +36 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/backdrop/BackdropRecorder.kt +930 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/backdrop/FrozenBackdrop.kt +66 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/backdrop/GlassBackdropCoordinator.kt +624 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/backdrop/GlassBackdropSourceHandle.kt +8 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/backdrop/GlassScrollSource.kt +13 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/backdrop/GlassViewController.kt +1002 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/backdrop/LiquidGlassProviderLayout.kt +340 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/backdrop/LiquidGlassView.kt +103 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/backdrop/ReferenceSourceWindowPolicy.kt +13 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/backdrop/StableSceneTexturePolicy.kt +43 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/backdrop/SurfaceFrameBuilder.kt +278 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/backdrop/SurfaceInteraction.kt +359 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/backdrop/internal/GlassFrame.kt +110 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/backdrop/internal/GlassViewRenderer.kt +728 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/backdrop/internal/ReferenceParityPasses.kt +705 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/backdrop/internal/ReferenceTabSampling.kt +15 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/backdrop/internal/SharedSceneCapture.kt +163 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/core/GlassCapabilities.kt +21 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/core/GlassEngine.kt +131 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/core/GlassMaterial.kt +89 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/core/GlassMath.kt +131 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/core/GlassOpticalInsets.kt +8 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/core/GlassRenderTier.kt +54 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/core/GlassShapePacker.kt +77 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/core/GlassSurfaceState.kt +11 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/core/GlassUniforms.kt +113 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/core/LiquidGlassShaders.kt +234 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/core/SharedGlassPass.kt +456 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/core/geometry/G2RoundedRectangle.kt +207 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/core/geometry/ReferenceG2MaskTexture.kt +334 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/core/shader/HeightFieldGlassShader.kt +7 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/core/shader/ReferenceBackdropBlurShader.kt +58 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/core/shader/ReferenceGaussianDiscBackdropBlur.kt +42 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/core/shader/ReferenceGlassUniforms.kt +111 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/core/shader/ReferenceParityGlassShader.kt +613 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/core/shader/ReferenceParityMultiShapeShader.kt +128 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/core/shader/SdfScaleLensShader.kt +144 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/local/LocalGlassHardwareLayerExperiment.kt +29 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/local/LocalGlassMaterial.kt +14 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/local/LocalGlassRenderer.kt +126 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/local/LocalGlassRuntimeShader.kt +50 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/local/LocalGlassShader.kt +59 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/local/LocalGlassView.kt +47 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/motion/GlassMotionDriver.kt +824 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/motion/GlassMotionState.kt +359 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/motion/PointerVelocityTracker.kt +109 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/motion/SpringSpec.kt +209 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/optics/G2Corner.kt +194 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/optics/GlassMaterial.kt +250 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/optics/GlassOpticsShader.kt +696 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/optics/GlassParityProbe.kt +342 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/optics/GlassShapeGeometry.kt +317 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/optics/GlassUniformBinder.kt +308 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/optics/PixelDiff.kt +363 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/optics/ReferenceOptics.kt +568 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/rendering/GlassSurfaceHost.kt +317 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/rendering/GlassSurfaceRenderer.kt +847 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/rendering/RetainedBackdropLayer.kt +83 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/scheduler/GlassFrameScheduler.kt +27 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/telemetry/EffectiveScrollFpsProbe.kt +965 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/telemetry/GlassTelemetry.kt +16 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/telemetry/LiquidGlassPerfTelemetry.kt +676 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/telemetry/LiquidGlassTrace.kt +30 -0
- package/android-core/src/main/java/io/github/luckylca/liquidglass/telemetry/LocalGlassTelemetry.kt +55 -0
- package/app.plugin.js +25 -0
- package/docs/architecture.md +61 -0
- package/docs/images/buttons.webp +0 -0
- package/docs/images/controls.webp +0 -0
- package/docs/images/tabs.webp +0 -0
- package/docs/migration-0.3.md +19 -0
- package/docs/publishing.md +106 -0
- package/expo-module.config.json +10 -0
- package/lib/commonjs/GlassSurface.js +404 -0
- package/lib/commonjs/GlassSurface.js.map +1 -0
- package/lib/commonjs/GlassTabBar.js +37 -0
- package/lib/commonjs/GlassTabBar.js.map +1 -0
- package/lib/commonjs/GlassTabLens.js +67 -0
- package/lib/commonjs/GlassTabLens.js.map +1 -0
- package/lib/commonjs/LiquidGlassProvider.js +40 -0
- package/lib/commonjs/LiquidGlassProvider.js.map +1 -0
- package/lib/commonjs/LocalGlassMaterial.js +188 -0
- package/lib/commonjs/LocalGlassMaterial.js.map +1 -0
- package/lib/commonjs/adaptiveLuminance.js +14 -0
- package/lib/commonjs/adaptiveLuminance.js.map +1 -0
- package/lib/commonjs/badgePalette.js +46 -0
- package/lib/commonjs/badgePalette.js.map +1 -0
- package/lib/commonjs/buttonGesturePolicy.js +22 -0
- package/lib/commonjs/buttonGesturePolicy.js.map +1 -0
- package/lib/commonjs/components/AdaptiveLuminance.js +20 -0
- package/lib/commonjs/components/AdaptiveLuminance.js.map +1 -0
- package/lib/commonjs/components/BottomSheet.js +222 -0
- package/lib/commonjs/components/BottomSheet.js.map +1 -0
- package/lib/commonjs/components/Button.js +20 -0
- package/lib/commonjs/components/Button.js.map +1 -0
- package/lib/commonjs/components/Card.js +206 -0
- package/lib/commonjs/components/Card.js.map +1 -0
- package/lib/commonjs/components/Checkbox.js +123 -0
- package/lib/commonjs/components/Checkbox.js.map +1 -0
- package/lib/commonjs/components/ControlPressContext.js +8 -0
- package/lib/commonjs/components/ControlPressContext.js.map +1 -0
- package/lib/commonjs/components/Dialog.js +122 -0
- package/lib/commonjs/components/Dialog.js.map +1 -0
- package/lib/commonjs/components/DialogAction.js +124 -0
- package/lib/commonjs/components/DialogAction.js.map +1 -0
- package/lib/commonjs/components/DialogContent.js +23 -0
- package/lib/commonjs/components/DialogContent.js.map +1 -0
- package/lib/commonjs/components/GlassButton.js +96 -0
- package/lib/commonjs/components/GlassButton.js.map +1 -0
- package/lib/commonjs/components/GlassFab.js +43 -0
- package/lib/commonjs/components/GlassFab.js.map +1 -0
- package/lib/commonjs/components/GlassMagnifier.js +135 -0
- package/lib/commonjs/components/GlassMagnifier.js.map +1 -0
- package/lib/commonjs/components/GlassPlayground.js +158 -0
- package/lib/commonjs/components/GlassPlayground.js.map +1 -0
- package/lib/commonjs/components/GlassSlider.js +364 -0
- package/lib/commonjs/components/GlassSlider.js.map +1 -0
- package/lib/commonjs/components/GlassSwitch.js +334 -0
- package/lib/commonjs/components/GlassSwitch.js.map +1 -0
- package/lib/commonjs/components/GlassTabBar.js +387 -0
- package/lib/commonjs/components/GlassTabBar.js.map +1 -0
- package/lib/commonjs/components/Input.js +180 -0
- package/lib/commonjs/components/Input.js.map +1 -0
- package/lib/commonjs/components/ListRow.js +64 -0
- package/lib/commonjs/components/ListRow.js.map +1 -0
- package/lib/commonjs/components/Menu.js +214 -0
- package/lib/commonjs/components/Menu.js.map +1 -0
- package/lib/commonjs/components/NavigationBar.js +20 -0
- package/lib/commonjs/components/NavigationBar.js.map +1 -0
- package/lib/commonjs/components/NumberWheel.js +273 -0
- package/lib/commonjs/components/NumberWheel.js.map +1 -0
- package/lib/commonjs/components/PageFeedList.js +25 -0
- package/lib/commonjs/components/PageFeedList.js.map +1 -0
- package/lib/commonjs/components/PageScaffold.js +161 -0
- package/lib/commonjs/components/PageScaffold.js.map +1 -0
- package/lib/commonjs/components/PreferenceGroup.js +34 -0
- package/lib/commonjs/components/PreferenceGroup.js.map +1 -0
- package/lib/commonjs/components/ProgressIndicator.js +79 -0
- package/lib/commonjs/components/ProgressIndicator.js.map +1 -0
- package/lib/commonjs/components/ProgressiveBlur.js +29 -0
- package/lib/commonjs/components/ProgressiveBlur.js.map +1 -0
- package/lib/commonjs/components/ReferenceSlider.js +304 -0
- package/lib/commonjs/components/ReferenceSlider.js.map +1 -0
- package/lib/commonjs/components/ReferenceTabBar.js +381 -0
- package/lib/commonjs/components/ReferenceTabBar.js.map +1 -0
- package/lib/commonjs/components/SearchBar.js +200 -0
- package/lib/commonjs/components/SearchBar.js.map +1 -0
- package/lib/commonjs/components/SegmentedControl.js +62 -0
- package/lib/commonjs/components/SegmentedControl.js.map +1 -0
- package/lib/commonjs/components/Slider.js +12 -0
- package/lib/commonjs/components/Slider.js.map +1 -0
- package/lib/commonjs/components/Snackbar.js +11 -0
- package/lib/commonjs/components/Snackbar.js.map +1 -0
- package/lib/commonjs/components/SurfaceEnvironmentContext.js +35 -0
- package/lib/commonjs/components/SurfaceEnvironmentContext.js.map +1 -0
- package/lib/commonjs/components/SurfaceGroup.js +39 -0
- package/lib/commonjs/components/SurfaceGroup.js.map +1 -0
- package/lib/commonjs/components/Switch.js +11 -0
- package/lib/commonjs/components/Switch.js.map +1 -0
- package/lib/commonjs/components/Toast.js +110 -0
- package/lib/commonjs/components/Toast.js.map +1 -0
- package/lib/commonjs/components/TopAppBar.js +107 -0
- package/lib/commonjs/components/TopAppBar.js.map +1 -0
- package/lib/commonjs/components/bottomSheetMotion.js +14 -0
- package/lib/commonjs/components/bottomSheetMotion.js.map +1 -0
- package/lib/commonjs/components/glassControlMaterial.js +22 -0
- package/lib/commonjs/components/glassControlMaterial.js.map +1 -0
- package/lib/commonjs/components/menuPosition.js +42 -0
- package/lib/commonjs/components/menuPosition.js.map +1 -0
- package/lib/commonjs/components/pages/FeedPage.js +15 -0
- package/lib/commonjs/components/pages/FeedPage.js.map +1 -0
- package/lib/commonjs/components/pages/PageBenchmarkContext.js +123 -0
- package/lib/commonjs/components/pages/PageBenchmarkContext.js.map +1 -0
- package/lib/commonjs/components/pages/SettingsPage.js +47 -0
- package/lib/commonjs/components/pages/SettingsPage.js.map +1 -0
- package/lib/commonjs/components/pages/SettingsSection.js +14 -0
- package/lib/commonjs/components/pages/SettingsSection.js.map +1 -0
- package/lib/commonjs/components/pages/StaticSettingsPage.js +16 -0
- package/lib/commonjs/components/pages/StaticSettingsPage.js.map +1 -0
- package/lib/commonjs/fallbackKnobGeometry.js +19 -0
- package/lib/commonjs/fallbackKnobGeometry.js.map +1 -0
- package/lib/commonjs/glassController.js +61 -0
- package/lib/commonjs/glassController.js.map +1 -0
- package/lib/commonjs/glassNativeEngine.js +16 -0
- package/lib/commonjs/glassNativeEngine.js.map +1 -0
- package/lib/commonjs/glassRuntime.js +15 -0
- package/lib/commonjs/glassRuntime.js.map +1 -0
- package/lib/commonjs/index.js +218 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/inputPresentation.js +17 -0
- package/lib/commonjs/inputPresentation.js.map +1 -0
- package/lib/commonjs/localGlassTelemetry.js +104 -0
- package/lib/commonjs/localGlassTelemetry.js.map +1 -0
- package/lib/commonjs/motion/MotionProvider.js +15 -0
- package/lib/commonjs/motion/MotionProvider.js.map +1 -0
- package/lib/commonjs/motion/easings.js +71 -0
- package/lib/commonjs/motion/easings.js.map +1 -0
- package/lib/commonjs/motion/folmeSpring.js +24 -0
- package/lib/commonjs/motion/folmeSpring.js.map +1 -0
- package/lib/commonjs/motion/folmeSpringByResponse.js +22 -0
- package/lib/commonjs/motion/folmeSpringByResponse.js.map +1 -0
- package/lib/commonjs/motion/index.js +57 -0
- package/lib/commonjs/motion/index.js.map +1 -0
- package/lib/commonjs/motion/presets.js +101 -0
- package/lib/commonjs/motion/presets.js.map +1 -0
- package/lib/commonjs/nativeGlassViews.js +30 -0
- package/lib/commonjs/nativeGlassViews.js.map +1 -0
- package/lib/commonjs/performanceTelemetry.js +24 -0
- package/lib/commonjs/performanceTelemetry.js.map +1 -0
- package/lib/commonjs/pointerEventBridge.js +17 -0
- package/lib/commonjs/pointerEventBridge.js.map +1 -0
- package/lib/commonjs/pointerGeometry.js +12 -0
- package/lib/commonjs/pointerGeometry.js.map +1 -0
- package/lib/commonjs/pressVelocity.js +34 -0
- package/lib/commonjs/pressVelocity.js.map +1 -0
- package/lib/commonjs/primitives/Divider.js +32 -0
- package/lib/commonjs/primitives/Divider.js.map +1 -0
- package/lib/commonjs/primitives/Icon.js +22 -0
- package/lib/commonjs/primitives/Icon.js.map +1 -0
- package/lib/commonjs/primitives/PressIndication.js +58 -0
- package/lib/commonjs/primitives/PressIndication.js.map +1 -0
- package/lib/commonjs/primitives/Pressable.js +28 -0
- package/lib/commonjs/primitives/Pressable.js.map +1 -0
- package/lib/commonjs/primitives/PressableScale.js +64 -0
- package/lib/commonjs/primitives/PressableScale.js.map +1 -0
- package/lib/commonjs/primitives/Surface.js +122 -0
- package/lib/commonjs/primitives/Surface.js.map +1 -0
- package/lib/commonjs/primitives/Text.js +43 -0
- package/lib/commonjs/primitives/Text.js.map +1 -0
- package/lib/commonjs/primitives/index.js +18 -0
- package/lib/commonjs/primitives/index.js.map +1 -0
- package/lib/commonjs/renderer.js +58 -0
- package/lib/commonjs/renderer.js.map +1 -0
- package/lib/commonjs/sliderValue.js +28 -0
- package/lib/commonjs/sliderValue.js.map +1 -0
- package/lib/commonjs/surface/InlineSurface.js +134 -0
- package/lib/commonjs/surface/InlineSurface.js.map +1 -0
- package/lib/commonjs/surface/MaterialProvider.js +78 -0
- package/lib/commonjs/surface/MaterialProvider.js.map +1 -0
- package/lib/commonjs/surface/NativeSurface.js +55 -0
- package/lib/commonjs/surface/NativeSurface.js.map +1 -0
- package/lib/commonjs/surface/PortalLayers.js +331 -0
- package/lib/commonjs/surface/PortalLayers.js.map +1 -0
- package/lib/commonjs/surface/contexts.js +108 -0
- package/lib/commonjs/surface/contexts.js.map +1 -0
- package/lib/commonjs/surface/registry.js +113 -0
- package/lib/commonjs/surface/registry.js.map +1 -0
- package/lib/commonjs/surface/styles.js +34 -0
- package/lib/commonjs/surface/styles.js.map +1 -0
- package/lib/commonjs/surface/types.js +3 -0
- package/lib/commonjs/surface/types.js.map +1 -0
- package/lib/commonjs/surfaceRendererPolicy.js +32 -0
- package/lib/commonjs/surfaceRendererPolicy.js.map +1 -0
- package/lib/commonjs/tabs/GlassTabItem.js +66 -0
- package/lib/commonjs/tabs/GlassTabItem.js.map +1 -0
- package/lib/commonjs/tabs/InlineTabBar.js +867 -0
- package/lib/commonjs/tabs/InlineTabBar.js.map +1 -0
- package/lib/commonjs/tabs/tabConstants.js +22 -0
- package/lib/commonjs/tabs/tabConstants.js.map +1 -0
- package/lib/commonjs/tabs/tabDebug.js +50 -0
- package/lib/commonjs/tabs/tabDebug.js.map +1 -0
- package/lib/commonjs/tabs/tabStyles.js +107 -0
- package/lib/commonjs/tabs/tabStyles.js.map +1 -0
- package/lib/commonjs/tabs/useInlineTabGesture.js +227 -0
- package/lib/commonjs/tabs/useInlineTabGesture.js.map +1 -0
- package/lib/commonjs/theme/ThemeProvider.js +37 -0
- package/lib/commonjs/theme/ThemeProvider.js.map +1 -0
- package/lib/commonjs/theme/buildTheme.js +157 -0
- package/lib/commonjs/theme/buildTheme.js.map +1 -0
- package/lib/commonjs/theme/glassColors.js +17 -0
- package/lib/commonjs/theme/glassColors.js.map +1 -0
- package/lib/commonjs/theme/index.js +38 -0
- package/lib/commonjs/theme/index.js.map +1 -0
- package/lib/commonjs/theme/liquidGlass.js +24 -0
- package/lib/commonjs/theme/liquidGlass.js.map +1 -0
- package/lib/commonjs/theme/presentation.js +14 -0
- package/lib/commonjs/theme/presentation.js.map +1 -0
- package/lib/commonjs/theme/registry.js +17 -0
- package/lib/commonjs/theme/registry.js.map +1 -0
- package/lib/commonjs/theme/selectVariant.js +13 -0
- package/lib/commonjs/theme/selectVariant.js.map +1 -0
- package/lib/commonjs/theme/tokens.js +266 -0
- package/lib/commonjs/theme/tokens.js.map +1 -0
- package/lib/commonjs/theme/types.js +3 -0
- package/lib/commonjs/theme/types.js.map +1 -0
- package/lib/commonjs/theme/wallpaper.js +91 -0
- package/lib/commonjs/theme/wallpaper.js.map +1 -0
- package/lib/commonjs/types.js +3 -0
- package/lib/commonjs/types.js.map +1 -0
- package/lib/commonjs/useButtonGesture.js +135 -0
- package/lib/commonjs/useButtonGesture.js.map +1 -0
- package/lib/commonjs/useGlassKnobMotion.js +115 -0
- package/lib/commonjs/useGlassKnobMotion.js.map +1 -0
- package/lib/commonjs/useGlassPressMotion.js +147 -0
- package/lib/commonjs/useGlassPressMotion.js.map +1 -0
- package/lib/module/GlassSurface.js +354 -0
- package/lib/module/GlassSurface.js.map +1 -0
- package/lib/module/GlassTabBar.js +32 -0
- package/lib/module/GlassTabBar.js.map +1 -0
- package/lib/module/GlassTabLens.js +64 -0
- package/lib/module/GlassTabLens.js.map +1 -0
- package/lib/module/LiquidGlassProvider.js +37 -0
- package/lib/module/LiquidGlassProvider.js.map +1 -0
- package/lib/module/LocalGlassMaterial.js +185 -0
- package/lib/module/LocalGlassMaterial.js.map +1 -0
- package/lib/module/adaptiveLuminance.js +11 -0
- package/lib/module/adaptiveLuminance.js.map +1 -0
- package/lib/module/badgePalette.js +40 -0
- package/lib/module/badgePalette.js.map +1 -0
- package/lib/module/buttonGesturePolicy.js +17 -0
- package/lib/module/buttonGesturePolicy.js.map +1 -0
- package/lib/module/components/AdaptiveLuminance.js +16 -0
- package/lib/module/components/AdaptiveLuminance.js.map +1 -0
- package/lib/module/components/BottomSheet.js +186 -0
- package/lib/module/components/BottomSheet.js.map +1 -0
- package/lib/module/components/Button.js +17 -0
- package/lib/module/components/Button.js.map +1 -0
- package/lib/module/components/Card.js +170 -0
- package/lib/module/components/Card.js.map +1 -0
- package/lib/module/components/Checkbox.js +84 -0
- package/lib/module/components/Checkbox.js.map +1 -0
- package/lib/module/components/ControlPressContext.js +4 -0
- package/lib/module/components/ControlPressContext.js.map +1 -0
- package/lib/module/components/Dialog.js +86 -0
- package/lib/module/components/Dialog.js.map +1 -0
- package/lib/module/components/DialogAction.js +88 -0
- package/lib/module/components/DialogAction.js.map +1 -0
- package/lib/module/components/DialogContent.js +20 -0
- package/lib/module/components/DialogContent.js.map +1 -0
- package/lib/module/components/GlassButton.js +93 -0
- package/lib/module/components/GlassButton.js.map +1 -0
- package/lib/module/components/GlassFab.js +37 -0
- package/lib/module/components/GlassFab.js.map +1 -0
- package/lib/module/components/GlassMagnifier.js +99 -0
- package/lib/module/components/GlassMagnifier.js.map +1 -0
- package/lib/module/components/GlassPlayground.js +122 -0
- package/lib/module/components/GlassPlayground.js.map +1 -0
- package/lib/module/components/GlassSlider.js +328 -0
- package/lib/module/components/GlassSlider.js.map +1 -0
- package/lib/module/components/GlassSwitch.js +298 -0
- package/lib/module/components/GlassSwitch.js.map +1 -0
- package/lib/module/components/GlassTabBar.js +351 -0
- package/lib/module/components/GlassTabBar.js.map +1 -0
- package/lib/module/components/Input.js +144 -0
- package/lib/module/components/Input.js.map +1 -0
- package/lib/module/components/ListRow.js +61 -0
- package/lib/module/components/ListRow.js.map +1 -0
- package/lib/module/components/Menu.js +178 -0
- package/lib/module/components/Menu.js.map +1 -0
- package/lib/module/components/NavigationBar.js +14 -0
- package/lib/module/components/NavigationBar.js.map +1 -0
- package/lib/module/components/NumberWheel.js +238 -0
- package/lib/module/components/NumberWheel.js.map +1 -0
- package/lib/module/components/PageFeedList.js +19 -0
- package/lib/module/components/PageFeedList.js.map +1 -0
- package/lib/module/components/PageScaffold.js +114 -0
- package/lib/module/components/PageScaffold.js.map +1 -0
- package/lib/module/components/PreferenceGroup.js +28 -0
- package/lib/module/components/PreferenceGroup.js.map +1 -0
- package/lib/module/components/ProgressIndicator.js +44 -0
- package/lib/module/components/ProgressIndicator.js.map +1 -0
- package/lib/module/components/ProgressiveBlur.js +26 -0
- package/lib/module/components/ProgressiveBlur.js.map +1 -0
- package/lib/module/components/ReferenceSlider.js +268 -0
- package/lib/module/components/ReferenceSlider.js.map +1 -0
- package/lib/module/components/ReferenceTabBar.js +344 -0
- package/lib/module/components/ReferenceTabBar.js.map +1 -0
- package/lib/module/components/SearchBar.js +164 -0
- package/lib/module/components/SearchBar.js.map +1 -0
- package/lib/module/components/SegmentedControl.js +26 -0
- package/lib/module/components/SegmentedControl.js.map +1 -0
- package/lib/module/components/Slider.js +9 -0
- package/lib/module/components/Slider.js.map +1 -0
- package/lib/module/components/Snackbar.js +8 -0
- package/lib/module/components/Snackbar.js.map +1 -0
- package/lib/module/components/SurfaceEnvironmentContext.js +27 -0
- package/lib/module/components/SurfaceEnvironmentContext.js.map +1 -0
- package/lib/module/components/SurfaceGroup.js +33 -0
- package/lib/module/components/SurfaceGroup.js.map +1 -0
- package/lib/module/components/Switch.js +8 -0
- package/lib/module/components/Switch.js.map +1 -0
- package/lib/module/components/Toast.js +74 -0
- package/lib/module/components/Toast.js.map +1 -0
- package/lib/module/components/TopAppBar.js +68 -0
- package/lib/module/components/TopAppBar.js.map +1 -0
- package/lib/module/components/bottomSheetMotion.js +11 -0
- package/lib/module/components/bottomSheetMotion.js.map +1 -0
- package/lib/module/components/glassControlMaterial.js +19 -0
- package/lib/module/components/glassControlMaterial.js.map +1 -0
- package/lib/module/components/menuPosition.js +37 -0
- package/lib/module/components/menuPosition.js.map +1 -0
- package/lib/module/components/pages/FeedPage.js +12 -0
- package/lib/module/components/pages/FeedPage.js.map +1 -0
- package/lib/module/components/pages/PageBenchmarkContext.js +84 -0
- package/lib/module/components/pages/PageBenchmarkContext.js.map +1 -0
- package/lib/module/components/pages/SettingsPage.js +11 -0
- package/lib/module/components/pages/SettingsPage.js.map +1 -0
- package/lib/module/components/pages/SettingsSection.js +8 -0
- package/lib/module/components/pages/SettingsSection.js.map +1 -0
- package/lib/module/components/pages/StaticSettingsPage.js +10 -0
- package/lib/module/components/pages/StaticSettingsPage.js.map +1 -0
- package/lib/module/fallbackKnobGeometry.js +16 -0
- package/lib/module/fallbackKnobGeometry.js.map +1 -0
- package/lib/module/glassController.js +54 -0
- package/lib/module/glassController.js.map +1 -0
- package/lib/module/glassNativeEngine.js +11 -0
- package/lib/module/glassNativeEngine.js.map +1 -0
- package/lib/module/glassRuntime.js +10 -0
- package/lib/module/glassRuntime.js.map +1 -0
- package/lib/module/index.js +80 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/inputPresentation.js +14 -0
- package/lib/module/inputPresentation.js.map +1 -0
- package/lib/module/localGlassTelemetry.js +94 -0
- package/lib/module/localGlassTelemetry.js.map +1 -0
- package/lib/module/motion/MotionProvider.js +11 -0
- package/lib/module/motion/MotionProvider.js.map +1 -0
- package/lib/module/motion/easings.js +64 -0
- package/lib/module/motion/easings.js.map +1 -0
- package/lib/module/motion/folmeSpring.js +21 -0
- package/lib/module/motion/folmeSpring.js.map +1 -0
- package/lib/module/motion/folmeSpringByResponse.js +19 -0
- package/lib/module/motion/folmeSpringByResponse.js.map +1 -0
- package/lib/module/motion/index.js +6 -0
- package/lib/module/motion/index.js.map +1 -0
- package/lib/module/motion/presets.js +98 -0
- package/lib/module/motion/presets.js.map +1 -0
- package/lib/module/nativeGlassViews.js +24 -0
- package/lib/module/nativeGlassViews.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/performanceTelemetry.js +19 -0
- package/lib/module/performanceTelemetry.js.map +1 -0
- package/lib/module/pointerEventBridge.js +14 -0
- package/lib/module/pointerEventBridge.js.map +1 -0
- package/lib/module/pointerGeometry.js +9 -0
- package/lib/module/pointerGeometry.js.map +1 -0
- package/lib/module/pressVelocity.js +31 -0
- package/lib/module/pressVelocity.js.map +1 -0
- package/lib/module/primitives/Divider.js +29 -0
- package/lib/module/primitives/Divider.js.map +1 -0
- package/lib/module/primitives/Icon.js +19 -0
- package/lib/module/primitives/Icon.js.map +1 -0
- package/lib/module/primitives/PressIndication.js +22 -0
- package/lib/module/primitives/PressIndication.js.map +1 -0
- package/lib/module/primitives/Pressable.js +25 -0
- package/lib/module/primitives/Pressable.js.map +1 -0
- package/lib/module/primitives/PressableScale.js +28 -0
- package/lib/module/primitives/PressableScale.js.map +1 -0
- package/lib/module/primitives/Surface.js +83 -0
- package/lib/module/primitives/Surface.js.map +1 -0
- package/lib/module/primitives/Text.js +40 -0
- package/lib/module/primitives/Text.js.map +1 -0
- package/lib/module/primitives/index.js +8 -0
- package/lib/module/primitives/index.js.map +1 -0
- package/lib/module/renderer.js +22 -0
- package/lib/module/renderer.js.map +1 -0
- package/lib/module/sliderValue.js +25 -0
- package/lib/module/sliderValue.js.map +1 -0
- package/lib/module/surface/InlineSurface.js +97 -0
- package/lib/module/surface/InlineSurface.js.map +1 -0
- package/lib/module/surface/MaterialProvider.js +74 -0
- package/lib/module/surface/MaterialProvider.js.map +1 -0
- package/lib/module/surface/NativeSurface.js +47 -0
- package/lib/module/surface/NativeSurface.js.map +1 -0
- package/lib/module/surface/PortalLayers.js +292 -0
- package/lib/module/surface/PortalLayers.js.map +1 -0
- package/lib/module/surface/contexts.js +96 -0
- package/lib/module/surface/contexts.js.map +1 -0
- package/lib/module/surface/registry.js +103 -0
- package/lib/module/surface/registry.js.map +1 -0
- package/lib/module/surface/styles.js +31 -0
- package/lib/module/surface/styles.js.map +1 -0
- package/lib/module/surface/types.js +2 -0
- package/lib/module/surface/types.js.map +1 -0
- package/lib/module/surfaceRendererPolicy.js +27 -0
- package/lib/module/surfaceRendererPolicy.js.map +1 -0
- package/lib/module/tabs/GlassTabItem.js +30 -0
- package/lib/module/tabs/GlassTabItem.js.map +1 -0
- package/lib/module/tabs/InlineTabBar.js +829 -0
- package/lib/module/tabs/InlineTabBar.js.map +1 -0
- package/lib/module/tabs/tabConstants.js +19 -0
- package/lib/module/tabs/tabConstants.js.map +1 -0
- package/lib/module/tabs/tabDebug.js +13 -0
- package/lib/module/tabs/tabDebug.js.map +1 -0
- package/lib/module/tabs/tabStyles.js +104 -0
- package/lib/module/tabs/tabStyles.js.map +1 -0
- package/lib/module/tabs/useInlineTabGesture.js +221 -0
- package/lib/module/tabs/useInlineTabGesture.js.map +1 -0
- package/lib/module/theme/ThemeProvider.js +32 -0
- package/lib/module/theme/ThemeProvider.js.map +1 -0
- package/lib/module/theme/buildTheme.js +153 -0
- package/lib/module/theme/buildTheme.js.map +1 -0
- package/lib/module/theme/glassColors.js +14 -0
- package/lib/module/theme/glassColors.js.map +1 -0
- package/lib/module/theme/index.js +9 -0
- package/lib/module/theme/index.js.map +1 -0
- package/lib/module/theme/liquidGlass.js +21 -0
- package/lib/module/theme/liquidGlass.js.map +1 -0
- package/lib/module/theme/presentation.js +11 -0
- package/lib/module/theme/presentation.js.map +1 -0
- package/lib/module/theme/registry.js +13 -0
- package/lib/module/theme/registry.js.map +1 -0
- package/lib/module/theme/selectVariant.js +10 -0
- package/lib/module/theme/selectVariant.js.map +1 -0
- package/lib/module/theme/tokens.js +262 -0
- package/lib/module/theme/tokens.js.map +1 -0
- package/lib/module/theme/types.js +2 -0
- package/lib/module/theme/types.js.map +1 -0
- package/lib/module/theme/wallpaper.js +83 -0
- package/lib/module/theme/wallpaper.js.map +1 -0
- package/lib/module/types.js +2 -0
- package/lib/module/types.js.map +1 -0
- package/lib/module/useButtonGesture.js +132 -0
- package/lib/module/useButtonGesture.js.map +1 -0
- package/lib/module/useGlassKnobMotion.js +112 -0
- package/lib/module/useGlassKnobMotion.js.map +1 -0
- package/lib/module/useGlassPressMotion.js +143 -0
- package/lib/module/useGlassPressMotion.js.map +1 -0
- package/lib/types/GlassSurface.d.ts +147 -0
- package/lib/types/GlassTabBar.d.ts +36 -0
- package/lib/types/GlassTabLens.d.ts +11 -0
- package/lib/types/LiquidGlassProvider.d.ts +47 -0
- package/lib/types/LocalGlassMaterial.d.ts +21 -0
- package/lib/types/adaptiveLuminance.d.ts +2 -0
- package/lib/types/badgePalette.d.ts +9 -0
- package/lib/types/buttonGesturePolicy.d.ts +4 -0
- package/lib/types/components/AdaptiveLuminance.d.ts +23 -0
- package/lib/types/components/BottomSheet.d.ts +33 -0
- package/lib/types/components/Button.d.ts +16 -0
- package/lib/types/components/Card.d.ts +25 -0
- package/lib/types/components/Checkbox.d.ts +11 -0
- package/lib/types/components/ControlPressContext.d.ts +9 -0
- package/lib/types/components/Dialog.d.ts +12 -0
- package/lib/types/components/DialogAction.d.ts +4 -0
- package/lib/types/components/DialogContent.d.ts +12 -0
- package/lib/types/components/GlassButton.d.ts +38 -0
- package/lib/types/components/GlassFab.d.ts +15 -0
- package/lib/types/components/GlassMagnifier.d.ts +41 -0
- package/lib/types/components/GlassPlayground.d.ts +12 -0
- package/lib/types/components/GlassSlider.d.ts +48 -0
- package/lib/types/components/GlassSwitch.d.ts +46 -0
- package/lib/types/components/GlassTabBar.d.ts +44 -0
- package/lib/types/components/Input.d.ts +47 -0
- package/lib/types/components/ListRow.d.ts +17 -0
- package/lib/types/components/Menu.d.ts +41 -0
- package/lib/types/components/NavigationBar.d.ts +14 -0
- package/lib/types/components/NumberWheel.d.ts +11 -0
- package/lib/types/components/PageFeedList.d.ts +6 -0
- package/lib/types/components/PageScaffold.d.ts +64 -0
- package/lib/types/components/PreferenceGroup.d.ts +12 -0
- package/lib/types/components/ProgressIndicator.d.ts +9 -0
- package/lib/types/components/ProgressiveBlur.d.ts +12 -0
- package/lib/types/components/ReferenceSlider.d.ts +31 -0
- package/lib/types/components/ReferenceTabBar.d.ts +61 -0
- package/lib/types/components/SearchBar.d.ts +52 -0
- package/lib/types/components/SegmentedControl.d.ts +10 -0
- package/lib/types/components/Slider.d.ts +19 -0
- package/lib/types/components/Snackbar.d.ts +5 -0
- package/lib/types/components/SurfaceEnvironmentContext.d.ts +17 -0
- package/lib/types/components/SurfaceGroup.d.ts +17 -0
- package/lib/types/components/Switch.d.ts +12 -0
- package/lib/types/components/Toast.d.ts +14 -0
- package/lib/types/components/TopAppBar.d.ts +49 -0
- package/lib/types/components/bottomSheetMotion.d.ts +2 -0
- package/lib/types/components/glassControlMaterial.d.ts +3 -0
- package/lib/types/components/menuPosition.d.ts +22 -0
- package/lib/types/components/pages/FeedPage.d.ts +31 -0
- package/lib/types/components/pages/PageBenchmarkContext.d.ts +30 -0
- package/lib/types/components/pages/SettingsPage.d.ts +20 -0
- package/lib/types/components/pages/SettingsSection.d.ts +9 -0
- package/lib/types/components/pages/StaticSettingsPage.d.ts +18 -0
- package/lib/types/fallbackKnobGeometry.d.ts +7 -0
- package/lib/types/glassController.d.ts +20 -0
- package/lib/types/glassNativeEngine.d.ts +5 -0
- package/lib/types/glassRuntime.d.ts +10 -0
- package/lib/types/index.d.ts +124 -0
- package/lib/types/inputPresentation.d.ts +12 -0
- package/lib/types/localGlassTelemetry.d.ts +28 -0
- package/lib/types/motion/MotionProvider.d.ts +7 -0
- package/lib/types/motion/easings.d.ts +33 -0
- package/lib/types/motion/folmeSpring.d.ts +15 -0
- package/lib/types/motion/folmeSpringByResponse.d.ts +14 -0
- package/lib/types/motion/index.d.ts +7 -0
- package/lib/types/motion/presets.d.ts +103 -0
- package/lib/types/nativeGlassViews.d.ts +112 -0
- package/lib/types/performanceTelemetry.d.ts +65 -0
- package/lib/types/pointerEventBridge.d.ts +17 -0
- package/lib/types/pointerGeometry.d.ts +2 -0
- package/lib/types/pressVelocity.d.ts +11 -0
- package/lib/types/primitives/Divider.d.ts +19 -0
- package/lib/types/primitives/Icon.d.ts +29 -0
- package/lib/types/primitives/PressIndication.d.ts +26 -0
- package/lib/types/primitives/Pressable.d.ts +9 -0
- package/lib/types/primitives/PressableScale.d.ts +19 -0
- package/lib/types/primitives/Surface.d.ts +63 -0
- package/lib/types/primitives/Text.d.ts +35 -0
- package/lib/types/primitives/index.d.ts +14 -0
- package/lib/types/renderer.d.ts +32 -0
- package/lib/types/sliderValue.d.ts +2 -0
- package/lib/types/surface/InlineSurface.d.ts +42 -0
- package/lib/types/surface/MaterialProvider.d.ts +46 -0
- package/lib/types/surface/NativeSurface.d.ts +11 -0
- package/lib/types/surface/PortalLayers.d.ts +33 -0
- package/lib/types/surface/contexts.d.ts +66 -0
- package/lib/types/surface/registry.d.ts +6 -0
- package/lib/types/surface/styles.d.ts +74 -0
- package/lib/types/surface/types.d.ts +118 -0
- package/lib/types/surfaceRendererPolicy.d.ts +14 -0
- package/lib/types/tabs/GlassTabItem.d.ts +20 -0
- package/lib/types/tabs/InlineTabBar.d.ts +5 -0
- package/lib/types/tabs/tabConstants.d.ts +34 -0
- package/lib/types/tabs/tabDebug.d.ts +15 -0
- package/lib/types/tabs/tabStyles.d.ts +119 -0
- package/lib/types/tabs/useInlineTabGesture.d.ts +34 -0
- package/lib/types/theme/ThemeProvider.d.ts +26 -0
- package/lib/types/theme/buildTheme.d.ts +6 -0
- package/lib/types/theme/glassColors.d.ts +13 -0
- package/lib/types/theme/index.d.ts +11 -0
- package/lib/types/theme/liquidGlass.d.ts +5 -0
- package/lib/types/theme/presentation.d.ts +3 -0
- package/lib/types/theme/registry.d.ts +7 -0
- package/lib/types/theme/selectVariant.d.ts +10 -0
- package/lib/types/theme/tokens.d.ts +18 -0
- package/lib/types/theme/types.d.ts +305 -0
- package/lib/types/theme/wallpaper.d.ts +32 -0
- package/lib/types/types.d.ts +127 -0
- package/lib/types/useButtonGesture.d.ts +30 -0
- package/lib/types/useGlassKnobMotion.d.ts +40 -0
- package/lib/types/useGlassPressMotion.d.ts +61 -0
- package/licenses/Apache-2.0-Kyant0-Shapes.txt +191 -0
- package/package.json +131 -4
- package/src/GlassSurface.tsx +676 -0
- package/src/GlassTabBar.tsx +106 -0
- package/src/GlassTabLens.tsx +92 -0
- package/src/LiquidGlassProvider.tsx +135 -0
- package/src/LocalGlassMaterial.tsx +256 -0
- package/src/adaptiveLuminance.ts +15 -0
- package/src/badgePalette.ts +54 -0
- package/src/buttonGesturePolicy.ts +15 -0
- package/src/components/AdaptiveLuminance.tsx +40 -0
- package/src/components/BottomSheet.tsx +291 -0
- package/src/components/Button.tsx +30 -0
- package/src/components/Card.tsx +343 -0
- package/src/components/Checkbox.tsx +141 -0
- package/src/components/ControlPressContext.ts +11 -0
- package/src/components/Dialog.tsx +129 -0
- package/src/components/DialogAction.tsx +109 -0
- package/src/components/DialogContent.tsx +52 -0
- package/src/components/GlassButton.tsx +225 -0
- package/src/components/GlassFab.tsx +98 -0
- package/src/components/GlassMagnifier.tsx +178 -0
- package/src/components/GlassPlayground.tsx +190 -0
- package/src/components/GlassSlider.tsx +448 -0
- package/src/components/GlassSwitch.tsx +391 -0
- package/src/components/GlassTabBar.tsx +522 -0
- package/src/components/Input.tsx +277 -0
- package/src/components/ListRow.tsx +124 -0
- package/src/components/Menu.tsx +322 -0
- package/src/components/NavigationBar.tsx +27 -0
- package/src/components/NumberWheel.tsx +344 -0
- package/src/components/PageFeedList.tsx +37 -0
- package/src/components/PageScaffold.tsx +266 -0
- package/src/components/PreferenceGroup.tsx +65 -0
- package/src/components/ProgressIndicator.tsx +63 -0
- package/src/components/ProgressiveBlur.tsx +56 -0
- package/src/components/ReferenceSlider.tsx +364 -0
- package/src/components/ReferenceTabBar.tsx +564 -0
- package/src/components/SearchBar.tsx +340 -0
- package/src/components/SegmentedControl.tsx +45 -0
- package/src/components/Slider.tsx +25 -0
- package/src/components/Snackbar.tsx +10 -0
- package/src/components/SurfaceEnvironmentContext.tsx +46 -0
- package/src/components/SurfaceGroup.tsx +60 -0
- package/src/components/Switch.tsx +18 -0
- package/src/components/Toast.tsx +110 -0
- package/src/components/TopAppBar.tsx +272 -0
- package/src/components/bottomSheetMotion.ts +10 -0
- package/src/components/glassControlMaterial.ts +20 -0
- package/src/components/menuPosition.ts +58 -0
- package/src/components/pages/FeedPage.tsx +96 -0
- package/src/components/pages/PageBenchmarkContext.tsx +105 -0
- package/src/components/pages/SettingsPage.tsx +55 -0
- package/src/components/pages/SettingsSection.tsx +20 -0
- package/src/components/pages/StaticSettingsPage.tsx +50 -0
- package/src/fallbackKnobGeometry.ts +15 -0
- package/src/glassController.ts +70 -0
- package/src/glassNativeEngine.ts +16 -0
- package/src/glassRuntime.ts +11 -0
- package/src/index.ts +199 -0
- package/src/inputPresentation.ts +32 -0
- package/src/localGlassTelemetry.ts +129 -0
- package/src/motion/MotionProvider.tsx +12 -0
- package/src/motion/easings.ts +71 -0
- package/src/motion/folmeSpring.ts +22 -0
- package/src/motion/folmeSpringByResponse.ts +19 -0
- package/src/motion/index.ts +47 -0
- package/src/motion/presets.ts +128 -0
- package/src/nativeGlassViews.ts +144 -0
- package/src/performanceTelemetry.ts +91 -0
- package/src/pointerEventBridge.ts +27 -0
- package/src/pointerGeometry.ts +8 -0
- package/src/pressVelocity.ts +36 -0
- package/src/primitives/Divider.tsx +42 -0
- package/src/primitives/Icon.tsx +44 -0
- package/src/primitives/PressIndication.tsx +43 -0
- package/src/primitives/Pressable.tsx +75 -0
- package/src/primitives/PressableScale.tsx +50 -0
- package/src/primitives/Surface.tsx +171 -0
- package/src/primitives/Text.tsx +80 -0
- package/src/primitives/index.ts +14 -0
- package/src/renderer.ts +70 -0
- package/src/sliderValue.ts +19 -0
- package/src/surface/InlineSurface.tsx +299 -0
- package/src/surface/MaterialProvider.tsx +235 -0
- package/src/surface/NativeSurface.tsx +115 -0
- package/src/surface/PortalLayers.tsx +574 -0
- package/src/surface/contexts.tsx +188 -0
- package/src/surface/registry.ts +109 -0
- package/src/surface/styles.ts +31 -0
- package/src/surface/types.ts +139 -0
- package/src/surfaceRendererPolicy.ts +32 -0
- package/src/tabs/GlassTabItem.tsx +100 -0
- package/src/tabs/InlineTabBar.tsx +1193 -0
- package/src/tabs/tabConstants.ts +35 -0
- package/src/tabs/tabDebug.ts +29 -0
- package/src/tabs/tabStyles.ts +104 -0
- package/src/tabs/useInlineTabGesture.ts +306 -0
- package/src/theme/ThemeProvider.tsx +52 -0
- package/src/theme/buildTheme.ts +160 -0
- package/src/theme/glassColors.ts +13 -0
- package/src/theme/index.ts +34 -0
- package/src/theme/liquidGlass.ts +25 -0
- package/src/theme/presentation.ts +12 -0
- package/src/theme/registry.ts +16 -0
- package/src/theme/selectVariant.ts +12 -0
- package/src/theme/tokens.ts +309 -0
- package/src/theme/types.ts +345 -0
- package/src/theme/wallpaper.ts +94 -0
- package/src/types.ts +95 -0
- package/src/useButtonGesture.ts +134 -0
- package/src/useGlassKnobMotion.ts +155 -0
- package/src/useGlassPressMotion.ts +209 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { memo } from 'react';
|
|
3
|
+
import { StyleSheet, View } from 'react-native';
|
|
4
|
+
import { GestureDetector } from 'react-native-gesture-handler';
|
|
5
|
+
import { GlassSurface, useGlassInsideScroll } from '../GlassSurface';
|
|
6
|
+
import { useGlassButtonGesture, useGlassPressMotion } from '../useGlassPressMotion';
|
|
7
|
+
import { useTheme } from '../theme';
|
|
8
|
+
import { Text } from '../primitives';
|
|
9
|
+
const BUTTON_HEIGHT = { small: 32, medium: 42, large: 48 };
|
|
10
|
+
const BUTTON_FONT = {
|
|
11
|
+
small: 'body2',
|
|
12
|
+
medium: 'body1',
|
|
13
|
+
large: 'body1',
|
|
14
|
+
};
|
|
15
|
+
const BUTTON_FONT_SIZE = { small: undefined, medium: undefined, large: 15 };
|
|
16
|
+
export const GlassButton = memo(function GlassButton({ appearance = 'transparent', tintColor = '#0088FF', surfaceColor,
|
|
17
|
+
// A button should refract the stable page backdrop, which keeps the visible
|
|
18
|
+
// lens and its content in the same native scroll/transform tree. Callers
|
|
19
|
+
// that want the live route captured behind the control can opt into
|
|
20
|
+
// `routeScene`; that mode uses the provider portal by design.
|
|
21
|
+
samplingSource = 'themeBackdrop', displacementOnlyDebug = false, size = 'medium', height: heightOverride, width: widthOverride, shape = 'capsule', contentPaddingHorizontal, labelFontSize, labelLetterSpacing, labelScaleX, highlight = true, disabled = false, accessibilityLabel, accessibilityState, onPress, style, contentStyle, children, }) {
|
|
22
|
+
const theme = useTheme();
|
|
23
|
+
const height = heightOverride ?? BUTTON_HEIGHT[size];
|
|
24
|
+
const width = shape === 'circle' ? height : widthOverride;
|
|
25
|
+
const radius = shape === 'circle' ? height / 2 : shape === 'rounded' ? Math.min(16, height * 0.32) : height / 2;
|
|
26
|
+
// Ignore zero-distance and sub-pixel MOVE callbacks. Android may emit them
|
|
27
|
+
// repeatedly while a finger is held still; forwarding each one invalidates
|
|
28
|
+
// every route backdrop consumer even though the optical pointer did not move.
|
|
29
|
+
const pressMotion = useGlassPressMotion(height / 2, height / 2, 0.5);
|
|
30
|
+
const fill = surfaceColor ?? (appearance === 'surface'
|
|
31
|
+
// The reference button catalog pins the surface swatch to white @ 0.3
|
|
32
|
+
// in both themes. Only the page background changes with dark mode.
|
|
33
|
+
? 'rgba(255,255,255,0.3)'
|
|
34
|
+
: 'rgba(0,0,0,0)');
|
|
35
|
+
const materialOverrides = {
|
|
36
|
+
opticsModel: 'referenceParity',
|
|
37
|
+
referenceHighlightStyle: highlight ? 'default' : 'plain',
|
|
38
|
+
referenceInteractionProfile: 'button',
|
|
39
|
+
radius,
|
|
40
|
+
surfaceColor: { light: fill, dark: fill },
|
|
41
|
+
opacity: 1,
|
|
42
|
+
blurRadius: 2,
|
|
43
|
+
refractionHeight: 12,
|
|
44
|
+
refractionAmount: -24,
|
|
45
|
+
saturation: 1.5,
|
|
46
|
+
// Pinned catalog values (build-buttons.ts / helpers-elements.ts):
|
|
47
|
+
// dispersion is a switch, Highlight.Default alpha is 0.5, buttons carry
|
|
48
|
+
// no inner shadow, and the default outer shadow is radius 24 / y 4.
|
|
49
|
+
chromaticAberration: 0,
|
|
50
|
+
highlightAlpha: highlight ? 0.5 : 0,
|
|
51
|
+
highlightWidth: highlight ? 0.5 : 0,
|
|
52
|
+
innerShadowStrength: 0,
|
|
53
|
+
shadowOpacity: 0.1,
|
|
54
|
+
shadowRadius: 24,
|
|
55
|
+
shadowOffsetY: 4,
|
|
56
|
+
tintAlpha: appearance === 'tinted' ? 1 : 0,
|
|
57
|
+
};
|
|
58
|
+
const labelColor = appearance === 'tinted' ? '#FFFFFF' : '#000000';
|
|
59
|
+
const label = typeof children === 'string' ? children : null;
|
|
60
|
+
const insideScroll = useGlassInsideScroll();
|
|
61
|
+
const { gesture: pressGesture, onLayout: handleButtonLayout } = useGlassButtonGesture({
|
|
62
|
+
disabled,
|
|
63
|
+
insideScroll,
|
|
64
|
+
defaultWidth: width ?? height,
|
|
65
|
+
defaultHeight: height,
|
|
66
|
+
pressMotion,
|
|
67
|
+
onPress,
|
|
68
|
+
});
|
|
69
|
+
const buttonContent = label ? (_jsx(Text, { type: BUTTON_FONT[size], size: labelFontSize ?? BUTTON_FONT_SIZE[size], color: labelColor, numberOfLines: 1, style: [
|
|
70
|
+
labelLetterSpacing == null ? undefined : { letterSpacing: labelLetterSpacing },
|
|
71
|
+
labelScaleX == null ? undefined : { transform: [{ scaleX: labelScaleX }] },
|
|
72
|
+
], children: label })) : children;
|
|
73
|
+
const buttonContentStyle = {
|
|
74
|
+
width,
|
|
75
|
+
minHeight: height,
|
|
76
|
+
minWidth: width ?? (!label ? height : undefined),
|
|
77
|
+
paddingHorizontal: shape === 'circle' ? 0 : contentPaddingHorizontal ?? (size === 'large' ? 16 : 18),
|
|
78
|
+
alignItems: 'center',
|
|
79
|
+
justifyContent: 'center',
|
|
80
|
+
opacity: disabled ? 0.5 : 1,
|
|
81
|
+
};
|
|
82
|
+
const portalInteractionContent = (_jsx(GestureDetector, { gesture: pressGesture, children: _jsx(View, { onLayout: handleButtonLayout, accessible: true, accessibilityRole: "button", accessibilityLabel: accessibilityLabel ?? label ?? undefined, accessibilityState: { ...accessibilityState, disabled }, style: StyleSheet.absoluteFill }) }));
|
|
83
|
+
const inlineInteractionBody = (_jsx(GestureDetector, { gesture: pressGesture, children: _jsx(View, { onLayout: handleButtonLayout, accessible: true, accessibilityRole: "button", accessibilityLabel: accessibilityLabel ?? label ?? undefined, accessibilityState: { ...accessibilityState, disabled }, style: [buttonContentStyle, contentStyle], children: buttonContent }) }));
|
|
84
|
+
const portalVisualBody = (_jsx(View, { accessible: false, accessibilityElementsHidden: true, importantForAccessibility: "no-hide-descendants", pointerEvents: "none", style: [buttonContentStyle, contentStyle], children: buttonContent }));
|
|
85
|
+
const isInlineBackdrop = samplingSource === 'themeBackdrop';
|
|
86
|
+
return (_jsx(GlassSurface, { variant: "control", positioning: "inFlow", sampling: "backdrop", samplingSource: samplingSource, tintColor: appearance === 'tinted' ? tintColor : undefined,
|
|
87
|
+
// Draw the label above the lens and keep its layout-only source copy
|
|
88
|
+
// transparent. Otherwise routeScene captures the label underneath the
|
|
89
|
+
// glass and the lens refracts its own text/icon a second time.
|
|
90
|
+
contentPlacement: "aboveGlass", portalInteractionContent: portalInteractionContent, displacementOnlyDebug: displacementOnlyDebug, inlineBackdrop: isInlineBackdrop, syncContentTransform: true, interactive: false, opticalProgress: pressMotion.progress, pointerEvent: pressMotion.pointerEvent, pointerEventValue: pressMotion.pointerEventValue, pointerEventSink: pressMotion.pointerEventSink, opticalPointX: pressMotion.pointX, opticalPointY: pressMotion.pointY, opticalVelocityX: pressMotion.velocityX, opticalVelocityY: pressMotion.velocityY, materialOverrides: materialOverrides, style: [{ alignSelf: 'center', width, height, minHeight: height, borderRadius: radius }, style], children: isInlineBackdrop ? inlineInteractionBody : portalVisualBody }));
|
|
91
|
+
});
|
|
92
|
+
GlassButton.displayName = 'GlassButton';
|
|
93
|
+
//# sourceMappingURL=GlassButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GlassButton.js","sourceRoot":"","sources":["../../../src/components/GlassButton.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAEpC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AACpF,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpC,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAsCrC,MAAM,aAAa,GAAoC,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;AAC5F,MAAM,WAAW,GAA6D;IAC1E,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,OAAO;IACf,KAAK,EAAE,OAAO;CACjB,CAAC;AACF,MAAM,gBAAgB,GAAgD,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;AAEzH,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,CAAC,SAAS,WAAW,CAA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,EAAE,WAAW,CAAC,gBAAgB,EAC9C,aAAa,EAAE,WAAW,CAAC,MAAM,EACjC,aAAa,EAAE,WAAW,CAAC,MAAM,EACjC,gBAAgB,EAAE,WAAW,CAAC,SAAS,EACvC,gBAAgB,EAAE,WAAW,CAAC,SAAS,EACvC,iBAAiB,EAAE,iBAAiB,EACpC,KAAK,EAAE,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,EAAE,KAAK,CAAC,YAE9F,gBAAgB,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,gBAAgB,GACjD,CAClB,CAAC;AACN,CAAC,CAAC,CAAC;AAEH,WAAW,CAAC,WAAW,GAAG,aAAa,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { PressIndication } from '../primitives';
|
|
3
|
+
import { useTheme } from '../theme';
|
|
4
|
+
import { GlassSurface, useGlassInsideScroll } from '../GlassSurface';
|
|
5
|
+
import { useGlassButtonGesture, useGlassPressMotion } from '../useGlassPressMotion';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import { View } from 'react-native';
|
|
8
|
+
import { GestureDetector } from 'react-native-gesture-handler';
|
|
9
|
+
import { useSharedValue } from 'react-native-reanimated';
|
|
10
|
+
/** Floating functional control; content remains foreground over the glass lens. */
|
|
11
|
+
export const GlassFab = React.memo(function GlassFab({ accessibilityLabel, onPress, children, size = 48, style, primary = false, interactive = true, }) {
|
|
12
|
+
const theme = useTheme();
|
|
13
|
+
const usesGlassMaterial = theme.glass.enabled;
|
|
14
|
+
const foregroundColor = theme.colors[theme.presentation.controls.floatingActionForeground];
|
|
15
|
+
const foreground = typeof children === 'function' ? children(foregroundColor) : children;
|
|
16
|
+
const radius = size / 2;
|
|
17
|
+
const pressMotion = useGlassPressMotion(radius, radius, 0.5);
|
|
18
|
+
const pressed = useSharedValue(0);
|
|
19
|
+
const insideScroll = useGlassInsideScroll();
|
|
20
|
+
const { gesture: fabGesture, onLayout } = useGlassButtonGesture({
|
|
21
|
+
disabled: !interactive,
|
|
22
|
+
insideScroll,
|
|
23
|
+
defaultWidth: size,
|
|
24
|
+
defaultHeight: size,
|
|
25
|
+
hitSlop: 24,
|
|
26
|
+
pressMotion,
|
|
27
|
+
onPress,
|
|
28
|
+
pressed,
|
|
29
|
+
});
|
|
30
|
+
const content = (_jsx(GestureDetector, { gesture: fabGesture, children: _jsxs(View, { onLayout: onLayout, accessible: interactive, accessibilityRole: "button", accessibilityLabel: accessibilityLabel, style: { width: size, height: size, borderRadius: radius, alignItems: 'center', justifyContent: 'center', overflow: 'hidden', backgroundColor: usesGlassMaterial ? 'transparent' : theme.colors.primary }, children: [usesGlassMaterial && primary ? (_jsx(View, { pointerEvents: "none", style: { position: 'absolute', left: 0, right: 0, top: 0, bottom: 0, borderRadius: radius, backgroundColor: theme.colors.primary, opacity: 0.16 } })) : null, _jsx(PressIndication, { pressed: pressed, color: usesGlassMaterial ? theme.colors.onGlass : theme.colors.onBackground, radius: radius }), foreground] }) }));
|
|
31
|
+
if (usesGlassMaterial) {
|
|
32
|
+
return (_jsx(GlassSurface, { variant: "floating", positioning: "floating", sampling: "backdrop", contentPlacement: "aboveGlass", syncContentTransform: true, materialOverrides: { referenceInteractionProfile: 'button', radius }, interactive: false, opticalProgress: pressMotion.progress, pointerEvent: pressMotion.pointerEvent, pointerEventValue: pressMotion.pointerEventValue, pointerEventSink: pressMotion.pointerEventSink, opticalPointX: pressMotion.pointX, opticalPointY: pressMotion.pointY, opticalVelocityX: pressMotion.velocityX, opticalVelocityY: pressMotion.velocityY, style: [{ width: size, height: size, borderRadius: radius, backgroundColor: 'transparent' }, style], children: content }));
|
|
33
|
+
}
|
|
34
|
+
return _jsx(View, { style: [{ borderRadius: radius, elevation: 4, shadowColor: '#000000', shadowOpacity: 0.16, shadowRadius: 8, shadowOffset: { width: 0, height: 3 } }, style], children: content });
|
|
35
|
+
});
|
|
36
|
+
GlassFab.displayName = 'HyperGlassFab';
|
|
37
|
+
//# sourceMappingURL=GlassFab.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GlassFab.js","sourceRoot":"","sources":["../../../src/components/GlassFab.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AACpF,OAAO,KAAyB,MAAM,OAAO,CAAC;AAE9C,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAczD,mFAAmF;AACnF,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,SAAS,QAAQ,CAAC,EACjD,kBAAkB,EAClB,OAAO,EACP,QAAQ,EACR,IAAI,GAAG,EAAE,EACT,KAAK,EACL,OAAO,GAAG,KAAK,EACf,WAAW,GAAG,IAAI,GACN;IACZ,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,iBAAiB,GAAG,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC;IAC9C,MAAM,eAAe,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,QAAQ,CAAC,wBAAwB,CAAC,CAAC;IAC3F,MAAM,UAAU,GAAG,OAAO,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;IACzF,MAAM,MAAM,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AAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,KAAK,CAAC,YAAG,OAAO,GAAQ,CAAC;AAC/L,CAAC,CAAC,CAAC;AAEH,QAAQ,CAAC,WAAW,GAAG,eAAe,CAAC"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { memo, useCallback, useMemo, useRef, useState } from 'react';
|
|
3
|
+
import { View } from 'react-native';
|
|
4
|
+
import { Gesture, GestureDetector } from 'react-native-gesture-handler';
|
|
5
|
+
import Animated, { runOnJS, useAnimatedStyle, useSharedValue } from 'react-native-reanimated';
|
|
6
|
+
import { GlassSurface } from '../GlassSurface';
|
|
7
|
+
import { useLiquidGlassTheme } from '../theme';
|
|
8
|
+
/**
|
|
9
|
+
* A touch-responsive capsule magnifier. The lens samples the live route scene,
|
|
10
|
+
* scales the content underneath it and moves entirely on the UI thread.
|
|
11
|
+
* The legacy onDrag-only API leaves positioning to its owner; new consumers
|
|
12
|
+
* can omit it, or supply dragPosition to coordinate UI-thread content.
|
|
13
|
+
*/
|
|
14
|
+
export const GlassMagnifier = memo(function GlassMagnifier({ size, width = 128, height = 96, magnification = 1, accessibilityLabel = 'Liquid Glass magnifier', children, onDragStart, onDrag, onDragEnd, dragPosition, showCursor = false, style, }) {
|
|
15
|
+
const lensWidth = Math.max(size === undefined ? 64 : 48, size ?? width);
|
|
16
|
+
const lensHeight = Math.max(size === undefined ? 48 : 48, size ?? height);
|
|
17
|
+
const strength = Math.max(0.5, Math.min(2, magnification));
|
|
18
|
+
const theme = useLiquidGlassTheme();
|
|
19
|
+
const internalX = useSharedValue(0);
|
|
20
|
+
const internalY = useSharedValue(0);
|
|
21
|
+
const x = dragPosition?.x ?? internalX;
|
|
22
|
+
const y = dragPosition?.y ?? internalY;
|
|
23
|
+
const originX = useSharedValue(0);
|
|
24
|
+
const originY = useSharedValue(0);
|
|
25
|
+
const ownsPosition = dragPosition !== undefined || onDrag === undefined;
|
|
26
|
+
const hasDragCallback = onDrag !== undefined;
|
|
27
|
+
const [interacting, setInteracting] = useState(false);
|
|
28
|
+
const translation = useAnimatedStyle(() => ({
|
|
29
|
+
transform: [{ translateX: ownsPosition ? x.value : 0 }, { translateY: ownsPosition ? y.value : 0 }],
|
|
30
|
+
}), [ownsPosition, x, y]);
|
|
31
|
+
const callbacksRef = useRef({ onDragStart, onDrag, onDragEnd });
|
|
32
|
+
callbacksRef.current = { onDragStart, onDrag, onDragEnd };
|
|
33
|
+
const emitDragStart = useCallback(() => {
|
|
34
|
+
setInteracting(true);
|
|
35
|
+
callbacksRef.current.onDragStart?.();
|
|
36
|
+
}, []);
|
|
37
|
+
const emitDrag = useCallback((dx, dy) => callbacksRef.current.onDrag?.({ x: dx, y: dy }), []);
|
|
38
|
+
const emitDragEnd = useCallback(() => {
|
|
39
|
+
setInteracting(false);
|
|
40
|
+
callbacksRef.current.onDragEnd?.();
|
|
41
|
+
}, []);
|
|
42
|
+
const [dragGesture, cursorGesture] = useMemo(() => {
|
|
43
|
+
const create = () => Gesture.Pan()
|
|
44
|
+
.minDistance(0)
|
|
45
|
+
.shouldCancelWhenOutside(false)
|
|
46
|
+
.onBegin(() => {
|
|
47
|
+
originX.value = x.value;
|
|
48
|
+
originY.value = y.value;
|
|
49
|
+
runOnJS(emitDragStart)();
|
|
50
|
+
})
|
|
51
|
+
.onUpdate((event) => {
|
|
52
|
+
if (ownsPosition) {
|
|
53
|
+
x.value = originX.value + event.translationX;
|
|
54
|
+
y.value = originY.value + event.translationY;
|
|
55
|
+
}
|
|
56
|
+
if (hasDragCallback)
|
|
57
|
+
runOnJS(emitDrag)(event.translationX, event.translationY);
|
|
58
|
+
})
|
|
59
|
+
.onFinalize(() => {
|
|
60
|
+
runOnJS(emitDragEnd)();
|
|
61
|
+
});
|
|
62
|
+
return [create(), create()];
|
|
63
|
+
}, [emitDrag, emitDragEnd, emitDragStart, hasDragCallback, originX, originY, ownsPosition, x, y]);
|
|
64
|
+
const material = useMemo(() => ({
|
|
65
|
+
opticsModel: 'referenceParity',
|
|
66
|
+
referenceHighlightStyle: 'default',
|
|
67
|
+
referenceDepthEffect: true,
|
|
68
|
+
// The Android shader maps a screen coordinate back into the sampled
|
|
69
|
+
// backdrop. A 1.5× magnifier therefore uses the inverse coordinate
|
|
70
|
+
// scale (2/3), matching the source Canvas transform's zoom about the
|
|
71
|
+
// lens center. Values above 1 would sample farther away and shrink the
|
|
72
|
+
// scene; they are not a zoom factor in this API.
|
|
73
|
+
referenceContentScaleX: 1 / (strength * 1.5),
|
|
74
|
+
referenceContentScaleY: 1 / (strength * 1.5),
|
|
75
|
+
referenceSampleOffsetY: 80,
|
|
76
|
+
radius: lensHeight / 2,
|
|
77
|
+
surfaceColor: { light: 'rgba(255,255,255,0)', dark: 'rgba(18,18,18,0)' },
|
|
78
|
+
opacity: 1,
|
|
79
|
+
blurRadius: 0,
|
|
80
|
+
refractionHeight: 8 * strength,
|
|
81
|
+
refractionAmount: -24 * strength,
|
|
82
|
+
saturation: 1,
|
|
83
|
+
chromaticAberration: 1,
|
|
84
|
+
// The reference magnifier uses the default highlight at full alpha.
|
|
85
|
+
highlightAlpha: 1,
|
|
86
|
+
highlightWidth: 0.5,
|
|
87
|
+
innerShadowStrength: 0.15,
|
|
88
|
+
shadowOpacity: 0.1,
|
|
89
|
+
shadowRadius: 24,
|
|
90
|
+
shadowOffsetY: 4,
|
|
91
|
+
tintAlpha: 0,
|
|
92
|
+
}), [lensHeight, strength]);
|
|
93
|
+
return (_jsxs(View, { collapsable: false, style: [{ width: lensWidth, height: showCursor ? Math.max(lensHeight, lensHeight / 2 + 104) : lensHeight }, style], children: [_jsx(GlassSurface, { variant: "lens", positioning: "inFlow", sampling: "backdrop",
|
|
94
|
+
// The gesture target travels in the same portal as the lens.
|
|
95
|
+
// Keep the native glass hit-transparent beneath that target.
|
|
96
|
+
interactive: false, continuous: interacting, portalTranslateX: ownsPosition ? x : undefined, portalTranslateY: ownsPosition ? y : undefined, contentPlacement: "aboveGlass", materialOverrides: material, style: { width: lensWidth, height: lensHeight, borderRadius: lensHeight / 2, backgroundColor: 'transparent' }, children: _jsx(GestureDetector, { gesture: dragGesture, children: _jsx(View, { accessible: true, accessibilityRole: "button", accessibilityLabel: accessibilityLabel, collapsable: false, style: { width: lensWidth, height: lensHeight, alignItems: 'center', justifyContent: 'center', borderRadius: lensHeight / 2 }, children: children }) }) }), showCursor ? (_jsx(GestureDetector, { gesture: cursorGesture, children: _jsx(Animated.View, { collapsable: false, accessible: true, accessibilityRole: "button", accessibilityLabel: "Drag the magnifier cursor", style: [{ position: 'absolute', left: lensWidth / 2 - 24, top: lensHeight / 2 + 80 - 24, width: 48, height: 48 }, translation], children: _jsx(View, { pointerEvents: "none", style: { position: 'absolute', left: 22, top: 12, width: 4, height: 24, borderRadius: 2, backgroundColor: theme.dark ? '#0091FF' : '#0088FF' } }) }) })) : null] }));
|
|
97
|
+
});
|
|
98
|
+
GlassMagnifier.displayName = 'GlassMagnifier';
|
|
99
|
+
//# sourceMappingURL=GlassMagnifier.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GlassMagnifier.js","sourceRoot":"","sources":["../../../src/components/GlassMagnifier.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AAE5F,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,QAAQ,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE9F,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AA4B/C;;;;;GAKG;AACH,MA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C,SAAS,EAAE,GAAI,GACjK,GACF,CACrB,CAAC,CAAC,CAAC,IAAI,IACL,CACV,CAAC;AACN,CAAC,CAAC,CAAC;AAEH,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React, { useState } from 'react';
|
|
3
|
+
import { StyleSheet, View, useWindowDimensions } from 'react-native';
|
|
4
|
+
import { Ionicons } from '@expo/vector-icons';
|
|
5
|
+
import { Gesture, GestureDetector } from 'react-native-gesture-handler';
|
|
6
|
+
import { useAnimatedStyle, useSharedValue } from 'react-native-reanimated';
|
|
7
|
+
import { GlassSurface, GlassOverlay } from '../GlassSurface';
|
|
8
|
+
import { useLiquidGlassTheme } from '../theme';
|
|
9
|
+
import { Text } from '../primitives';
|
|
10
|
+
import { GlassButton } from './GlassButton';
|
|
11
|
+
import { ReferenceSlider } from './ReferenceSlider';
|
|
12
|
+
const DEFAULT_VALUES = { corner: 0.5, blur: 0, height: 0.2, amount: 0.2, chromatic: 0, sheet: true };
|
|
13
|
+
/** The same interactive optical playground used by the standalone catalog. */
|
|
14
|
+
export function GlassPlayground({ value: controlledValue, onValueChange, style }) {
|
|
15
|
+
const [internalValue, setInternalValue] = useState(DEFAULT_VALUES);
|
|
16
|
+
const value = controlledValue ?? internalValue;
|
|
17
|
+
const update = (next) => {
|
|
18
|
+
if (controlledValue === undefined)
|
|
19
|
+
setInternalValue(next);
|
|
20
|
+
onValueChange?.(next);
|
|
21
|
+
};
|
|
22
|
+
const onChange = (key, next) => update({ ...value, [key]: next });
|
|
23
|
+
const onToggleSheet = () => update({ ...value, sheet: !value.sheet });
|
|
24
|
+
const onReset = () => update({ ...DEFAULT_VALUES, sheet: value.sheet });
|
|
25
|
+
const theme = useLiquidGlassTheme();
|
|
26
|
+
const { width, height } = useWindowDimensions();
|
|
27
|
+
const translateX = useSharedValue(0);
|
|
28
|
+
const translateY = useSharedValue(0);
|
|
29
|
+
const scale = useSharedValue(1);
|
|
30
|
+
const rotation = useSharedValue(0);
|
|
31
|
+
const startX = useSharedValue(0);
|
|
32
|
+
const startY = useSharedValue(0);
|
|
33
|
+
const startScale = useSharedValue(1);
|
|
34
|
+
const startRotation = useSharedValue(0);
|
|
35
|
+
const transformStyle = useAnimatedStyle(() => ({
|
|
36
|
+
transform: [
|
|
37
|
+
{ translateX: translateX.value },
|
|
38
|
+
{ translateY: translateY.value },
|
|
39
|
+
{ rotate: `${rotation.value}rad` },
|
|
40
|
+
{ scale: scale.value },
|
|
41
|
+
],
|
|
42
|
+
}));
|
|
43
|
+
const pan = React.useMemo(() => (Gesture.Pan()
|
|
44
|
+
.onBegin(() => {
|
|
45
|
+
startX.value = translateX.value;
|
|
46
|
+
startY.value = translateY.value;
|
|
47
|
+
})
|
|
48
|
+
.onUpdate((event) => {
|
|
49
|
+
translateX.value = startX.value + event.translationX;
|
|
50
|
+
translateY.value = startY.value + event.translationY;
|
|
51
|
+
})), [startX, startY, translateX, translateY]);
|
|
52
|
+
const pinch = React.useMemo(() => Gesture.Pinch()
|
|
53
|
+
.onBegin(() => { startScale.value = scale.value; })
|
|
54
|
+
.onUpdate((event) => { scale.value = Math.max(0.25, Math.min(4, startScale.value * event.scale)); }), [scale, startScale]);
|
|
55
|
+
const rotate = React.useMemo(() => Gesture.Rotation()
|
|
56
|
+
.onBegin(() => { startRotation.value = rotation.value; })
|
|
57
|
+
.onUpdate((event) => { rotation.value = startRotation.value + event.rotation; }), [rotation, startRotation]);
|
|
58
|
+
const transformGesture = React.useMemo(() => Gesture.Simultaneous(pan, pinch, rotate), [pan, pinch, rotate]);
|
|
59
|
+
const patchReset = () => {
|
|
60
|
+
translateX.value = 0;
|
|
61
|
+
translateY.value = 0;
|
|
62
|
+
scale.value = 1;
|
|
63
|
+
rotation.value = 0;
|
|
64
|
+
onReset();
|
|
65
|
+
};
|
|
66
|
+
const baseSize = 256;
|
|
67
|
+
const buttonSpace = 20 + 56 + 12;
|
|
68
|
+
const sheetHeight = 24 + 5 * (16 + 12 + 24) + 4 * 16 + 24;
|
|
69
|
+
const squareTop = Math.max(0, (height - buttonSpace - baseSize) / 2);
|
|
70
|
+
const squareX = (width - baseSize) / 2;
|
|
71
|
+
const sliderRows = [
|
|
72
|
+
{ key: 'corner', label: 'Corner radius', min: 0, max: 1 },
|
|
73
|
+
{ key: 'blur', label: 'Blur radius', min: 0, max: 32 },
|
|
74
|
+
{ key: 'height', label: 'Refraction height', min: 0, max: 1 },
|
|
75
|
+
{ key: 'amount', label: 'Refraction amount', min: 0, max: 1 },
|
|
76
|
+
{ key: 'chromatic', label: 'Chromatic aberration', min: 0, max: 1 },
|
|
77
|
+
];
|
|
78
|
+
return (_jsxs(View, { style: [styles.playgroundStage, style], children: [_jsx(GestureDetector, { gesture: transformGesture, children: _jsx(GlassSurface, { variant: "lens", positioning: "floating", sampling: "backdrop", samplingSource: "routeScene", animatedStyle: transformStyle, materialOverrides: {
|
|
79
|
+
opticsModel: 'referenceParity',
|
|
80
|
+
referenceHighlightStyle: 'default',
|
|
81
|
+
referenceDepthEffect: true,
|
|
82
|
+
radius: (baseSize / 2) * value.corner,
|
|
83
|
+
surfaceColor: { light: 'rgba(255,255,255,0)', dark: 'rgba(18,18,18,0)' },
|
|
84
|
+
opacity: 1,
|
|
85
|
+
blurRadius: value.blur,
|
|
86
|
+
refractionHeight: value.height * (baseSize / 2),
|
|
87
|
+
refractionAmount: -value.amount * baseSize,
|
|
88
|
+
saturation: 1.5,
|
|
89
|
+
chromaticAberration: value.chromatic,
|
|
90
|
+
highlightAlpha: 0.5,
|
|
91
|
+
highlightWidth: 0.5,
|
|
92
|
+
innerShadowStrength: 0,
|
|
93
|
+
shadowOpacity: 0.1,
|
|
94
|
+
shadowRadius: 24,
|
|
95
|
+
shadowOffsetY: 4,
|
|
96
|
+
}, style: { position: 'absolute', left: squareX, top: squareTop, width: baseSize, height: baseSize, borderRadius: baseSize / 2, backgroundColor: 'transparent' } }) }), value.sheet ? (_jsx(GlassSurface, { variant: "card", positioning: "floating", sampling: "backdrop", samplingSource: "routeScene", materialOverrides: {
|
|
97
|
+
opticsModel: 'referenceParity',
|
|
98
|
+
referenceHighlightStyle: 'default',
|
|
99
|
+
radius: 32,
|
|
100
|
+
surfaceColor: { light: 'rgba(250,250,250,0.4)', dark: 'rgba(18,18,18,0.4)' },
|
|
101
|
+
opacity: 1,
|
|
102
|
+
blurRadius: 4,
|
|
103
|
+
refractionHeight: 16,
|
|
104
|
+
refractionAmount: -32,
|
|
105
|
+
saturation: 1.5,
|
|
106
|
+
chromaticAberration: 0,
|
|
107
|
+
highlightAlpha: 0.5,
|
|
108
|
+
highlightWidth: 0.5,
|
|
109
|
+
innerShadowStrength: 0,
|
|
110
|
+
shadowOpacity: 0.1,
|
|
111
|
+
shadowRadius: 24,
|
|
112
|
+
shadowOffsetY: 4,
|
|
113
|
+
}, style: [styles.playgroundSheet, { left: 16, right: 16, bottom: buttonSpace, height: sheetHeight, padding: 24 }] })) : null, value.sheet ? (_jsx(GlassOverlay, { children: _jsx(View, { pointerEvents: "box-none", style: [styles.playgroundSheetContent, { left: 16, right: 16, bottom: buttonSpace, height: sheetHeight, padding: 24 }], children: sliderRows.map((row, index) => (_jsxs(View, { style: { height: 52, marginBottom: index === sliderRows.length - 1 ? 0 : 16 }, children: [_jsx(Text, { size: 13, color: theme.dark ? '#FFFFFF' : '#000000', style: { height: 16, lineHeight: 16 }, children: row.label }), _jsx(ReferenceSlider, { fraction: (value[row.key] - row.min) / (row.max - row.min), accessibilityLabel: row.label, style: { height: 24, marginTop: 12 }, onValueChange: (fraction) => onChange(row.key, row.min + (row.max - row.min) * fraction) })] }, row.key))) }) })) : null, _jsx(GlassButton, { appearance: "tinted", tintColor: "#FF8D28", size: "large", height: 56, shape: "circle", accessibilityLabel: value.sheet ? "收起参数面板" : "展开参数面板", onPress: onToggleSheet, style: styles.playgroundExpandButton, children: _jsx(Ionicons, { name: value.sheet ? 'chevron-down' : 'chevron-up', size: 32, color: "#FFFFFF" }) }), _jsx(GlassButton, { appearance: "tinted", tintColor: "#FF8D28", size: "large", height: 56, shape: "circle", accessibilityLabel: "\u91CD\u7F6E\u73BB\u7483\u53C2\u6570\u4E0E\u4F4D\u7F6E", onPress: patchReset, style: styles.playgroundResetButton, children: _jsx(Ionicons, { name: "refresh", size: 32, color: "#FFFFFF" }) })] }));
|
|
114
|
+
}
|
|
115
|
+
const styles = StyleSheet.create({
|
|
116
|
+
playgroundStage: { flex: 1, overflow: 'hidden' },
|
|
117
|
+
playgroundSheet: { position: 'absolute', overflow: 'hidden' },
|
|
118
|
+
playgroundSheetContent: { position: 'absolute', zIndex: 2 },
|
|
119
|
+
playgroundExpandButton: { position: 'absolute', left: 20, bottom: 20, zIndex: 10 },
|
|
120
|
+
playgroundResetButton: { position: 'absolute', right: 20, bottom: 20, zIndex: 10 },
|
|
121
|
+
});
|
|
122
|
+
//# sourceMappingURL=GlassPlayground.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GlassPlayground.js","sourceRoot":"","sources":["../../../src/components/GlassPlayground.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAErE,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAA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