@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 @@
|
|
|
1
|
+
{"version":3,"file":"inputPresentation.js","sourceRoot":"","sources":["../../src/inputPresentation.ts"],"names":[],"mappings":";;AAMA,4DAyBC;AAzBD,SAAgB,wBAAwB,CAAC,EACrC,QAAQ,EACR,qBAAqB,EACrB,OAAO,EACP,OAAO,EACP,WAAW,GAOd;IACG,MAAM,YAAY,GAAG,QAAQ,IAAI,CAAC,CAAC,qBAAqB,IAAI,OAAO,CAAC,CAAC;IACrE,MAAM,QAAQ,GAAG,QAAQ;WAClB,CAAC,qBAAqB;WACtB,CAAC,OAAO,IAAI,OAAO,CAAC,CAAC;IAE5B,OAAO;QACH,YAAY;QACZ,QAAQ;QACR,WAAW,EAAE,CAAC,QAAQ;YAClB,CAAC,CAAC,WAAW;YACb,CAAC,CAAC,CAAC,CAAC,qBAAqB,IAAI,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC;KACtE,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getLocalGlassNativeEngine = getLocalGlassNativeEngine;
|
|
4
|
+
exports.subscribeLocalGlassNativeEngine = subscribeLocalGlassNativeEngine;
|
|
5
|
+
exports.setLocalGlassNativeEngine = setLocalGlassNativeEngine;
|
|
6
|
+
exports.setLocalGlassTelemetryEnabled = setLocalGlassTelemetryEnabled;
|
|
7
|
+
exports.setLocalGlassHardwareLayerExperimentEnabled = setLocalGlassHardwareLayerExperimentEnabled;
|
|
8
|
+
exports.registerLocalGlassMaterial = registerLocalGlassMaterial;
|
|
9
|
+
exports.setLocalGlassVisibleItemCount = setLocalGlassVisibleItemCount;
|
|
10
|
+
exports.getLocalGlassTelemetry = getLocalGlassTelemetry;
|
|
11
|
+
const expo_modules_core_1 = require("expo-modules-core");
|
|
12
|
+
const react_native_1 = require("react-native");
|
|
13
|
+
const glassRuntime_1 = require("./glassRuntime");
|
|
14
|
+
const nativeTelemetryModule = react_native_1.Platform.OS === 'android'
|
|
15
|
+
? (0, expo_modules_core_1.requireNativeModule)('LiquidGlass')
|
|
16
|
+
: null;
|
|
17
|
+
function getLocalGlassNativeEngine() {
|
|
18
|
+
return (0, glassRuntime_1.getGlassRuntime)().engine;
|
|
19
|
+
}
|
|
20
|
+
function subscribeLocalGlassNativeEngine(listener) {
|
|
21
|
+
return (0, glassRuntime_1.subscribeGlassRuntime)(listener);
|
|
22
|
+
}
|
|
23
|
+
function setLocalGlassNativeEngine(next) {
|
|
24
|
+
(0, glassRuntime_1.setGlassRuntime)({ engine: next });
|
|
25
|
+
}
|
|
26
|
+
let enabled = false;
|
|
27
|
+
const mountedByKind = { native: 0, skia: 0, fallback: 0 };
|
|
28
|
+
let snapshot = {
|
|
29
|
+
mountedMaterialCount: 0,
|
|
30
|
+
mountedNativeViewCount: 0,
|
|
31
|
+
mountedSkiaCanvasCount: 0,
|
|
32
|
+
fallbackCount: 0,
|
|
33
|
+
visibleItemCount: 0,
|
|
34
|
+
nativeOnDrawCount: 0,
|
|
35
|
+
nativeInvalidateCount: 0,
|
|
36
|
+
materialApplyCount: 0,
|
|
37
|
+
runtimeShaderCreateCount: 0,
|
|
38
|
+
runtimeShaderReuseCount: 0,
|
|
39
|
+
uniformUpdateCount: 0,
|
|
40
|
+
sizeUniformUpdateCount: 0,
|
|
41
|
+
materialUniformUpdateCount: 0,
|
|
42
|
+
};
|
|
43
|
+
/** Opt-in diagnostics only. Disabled paths do not allocate timers or notify React. */
|
|
44
|
+
function setLocalGlassTelemetryEnabled(next) {
|
|
45
|
+
enabled = next;
|
|
46
|
+
if (next) {
|
|
47
|
+
snapshot = {
|
|
48
|
+
mountedMaterialCount: mountedByKind.native + mountedByKind.skia + mountedByKind.fallback,
|
|
49
|
+
mountedNativeViewCount: mountedByKind.native,
|
|
50
|
+
mountedSkiaCanvasCount: mountedByKind.skia,
|
|
51
|
+
fallbackCount: mountedByKind.fallback,
|
|
52
|
+
visibleItemCount: 0,
|
|
53
|
+
nativeOnDrawCount: 0,
|
|
54
|
+
nativeInvalidateCount: 0,
|
|
55
|
+
materialApplyCount: 0,
|
|
56
|
+
runtimeShaderCreateCount: 0,
|
|
57
|
+
runtimeShaderReuseCount: 0,
|
|
58
|
+
uniformUpdateCount: 0,
|
|
59
|
+
sizeUniformUpdateCount: 0,
|
|
60
|
+
materialUniformUpdateCount: 0,
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
void nativeTelemetryModule?.setLocalPerformanceTelemetryEnabled(next).catch((error) => {
|
|
64
|
+
console.warn('[LiquidGlass] Native Local Glass telemetry unavailable.', error);
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
/** Debug-only A/B switch. Android applies a hardware layer to LocalGlassMaterial views only. */
|
|
68
|
+
function setLocalGlassHardwareLayerExperimentEnabled(next) {
|
|
69
|
+
void nativeTelemetryModule?.setHardwareLayerExperimentEnabled(next).catch((error) => {
|
|
70
|
+
console.warn('[LiquidGlass] Local Glass hardware layer experiment unavailable.', error);
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
function registerLocalGlassMaterial(kind) {
|
|
74
|
+
mountedByKind[kind] += 1;
|
|
75
|
+
if (enabled)
|
|
76
|
+
updateMountedSnapshot();
|
|
77
|
+
let mounted = true;
|
|
78
|
+
return () => {
|
|
79
|
+
if (!mounted)
|
|
80
|
+
return;
|
|
81
|
+
mounted = false;
|
|
82
|
+
mountedByKind[kind] = Math.max(0, mountedByKind[kind] - 1);
|
|
83
|
+
if (enabled)
|
|
84
|
+
updateMountedSnapshot();
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
function updateMountedSnapshot() {
|
|
88
|
+
snapshot.mountedNativeViewCount = mountedByKind.native;
|
|
89
|
+
snapshot.mountedSkiaCanvasCount = mountedByKind.skia;
|
|
90
|
+
snapshot.fallbackCount = mountedByKind.fallback;
|
|
91
|
+
snapshot.mountedMaterialCount = mountedByKind.native + mountedByKind.skia + mountedByKind.fallback;
|
|
92
|
+
}
|
|
93
|
+
function setLocalGlassVisibleItemCount(count) {
|
|
94
|
+
if (enabled)
|
|
95
|
+
snapshot.visibleItemCount = Math.max(0, Math.floor(count));
|
|
96
|
+
}
|
|
97
|
+
async function getLocalGlassTelemetry() {
|
|
98
|
+
if (!enabled)
|
|
99
|
+
return null;
|
|
100
|
+
const nativeModule = nativeTelemetryModule;
|
|
101
|
+
const native = await nativeModule?.getLocalPerformanceTelemetry();
|
|
102
|
+
return { ...snapshot, ...native };
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=localGlassTelemetry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"localGlassTelemetry.js","sourceRoot":"","sources":["../../src/localGlassTelemetry.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MotionProvider = MotionProvider;
|
|
4
|
+
exports.useReducedMotionPreference = useReducedMotionPreference;
|
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
const react_1 = require("react");
|
|
7
|
+
const MotionContext = (0, react_1.createContext)(false);
|
|
8
|
+
function MotionProvider({ reduced, children }) {
|
|
9
|
+
return (0, jsx_runtime_1.jsx)(MotionContext.Provider, { value: reduced, children: children });
|
|
10
|
+
}
|
|
11
|
+
/** True when either the operating system or the in-app setting requests less motion. */
|
|
12
|
+
function useReducedMotionPreference() {
|
|
13
|
+
return (0, react_1.useContext)(MotionContext);
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=MotionProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MotionProvider.js","sourceRoot":"","sources":["../../../src/motion/MotionProvider.tsx"],"names":[],"mappings":";;AAIA,wCAEC;AAGD,gEAEC;;AAXD,iCAAyD;AAEzD,MAAM,aAAa,GAAG,IAAA,qBAAa,EAAC,KAAK,CAAC,CAAC;AAE3C,SAAgB,cAAc,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAmD;IACjG,OAAO,uBAAC,aAAa,CAAC,QAAQ,IAAC,KAAK,EAAE,OAAO,YAAG,QAAQ,GAA0B,CAAC;AACvF,CAAC;AAED,wFAAwF;AACxF,SAAgB,0BAA0B;IACtC,OAAO,IAAA,kBAAU,EAAC,aAAa,CAAC,CAAC;AACrC,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fastOutSlowIn = exports.sinOutEasing = exports.decelerateEasing = exports.accelerateEasing = exports.linearEasing = void 0;
|
|
4
|
+
const react_native_reanimated_1 = require("react-native-reanimated");
|
|
5
|
+
/**
|
|
6
|
+
* Miuix custom easings — 1:1 ports of `anim/easings.kt`.
|
|
7
|
+
*
|
|
8
|
+
* Visual reference:
|
|
9
|
+
* miuix-vue/src/anim/easings.ts
|
|
10
|
+
* miuix `anim/Easings.kt`
|
|
11
|
+
*
|
|
12
|
+
* Pass results directly as `withTiming` easing.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* LinearEasing: x → x. Shared so every linear `withTiming` uses one worklet.
|
|
16
|
+
*/
|
|
17
|
+
const linearEasing = (t) => {
|
|
18
|
+
'worklet';
|
|
19
|
+
return t;
|
|
20
|
+
};
|
|
21
|
+
exports.linearEasing = linearEasing;
|
|
22
|
+
/**
|
|
23
|
+
* AccelerateEasing: x^(2 * factor). Default factor 1 → x².
|
|
24
|
+
*/
|
|
25
|
+
const accelerateEasing = (factor = 1.0) => {
|
|
26
|
+
if (factor === 1.0) {
|
|
27
|
+
return (x) => {
|
|
28
|
+
'worklet';
|
|
29
|
+
return x * x;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
const exp = 2 * factor;
|
|
33
|
+
return (x) => {
|
|
34
|
+
'worklet';
|
|
35
|
+
return x ** exp;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
exports.accelerateEasing = accelerateEasing;
|
|
39
|
+
/**
|
|
40
|
+
* DecelerateEasing: 1 - (1-x)^(2 * factor). Default factor 1.
|
|
41
|
+
* Dialog dim uses factor = 1.5.
|
|
42
|
+
*/
|
|
43
|
+
const decelerateEasing = (factor = 1.0) => {
|
|
44
|
+
if (factor === 1.0) {
|
|
45
|
+
return (x) => {
|
|
46
|
+
'worklet';
|
|
47
|
+
return 1 - (1 - x) * (1 - x);
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
const exp = 2 * factor;
|
|
51
|
+
return (x) => {
|
|
52
|
+
'worklet';
|
|
53
|
+
return 1 - (1 - x) ** exp;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
exports.decelerateEasing = decelerateEasing;
|
|
57
|
+
/**
|
|
58
|
+
* SinOutEasing: sin(x * π / 2).
|
|
59
|
+
*/
|
|
60
|
+
const sinOutEasing = (x) => {
|
|
61
|
+
'worklet';
|
|
62
|
+
return Math.sin((x * Math.PI) / 2);
|
|
63
|
+
};
|
|
64
|
+
exports.sinOutEasing = sinOutEasing;
|
|
65
|
+
/**
|
|
66
|
+
* FastOutSlowIn — used for the 50ms title color tween in TopAppBar.
|
|
67
|
+
* bezierFn (not bezier) returns the plain easing function; `bezier` returns an
|
|
68
|
+
* EasingFunctionFactory (the withTiming sugar) which isn't a (t) => number.
|
|
69
|
+
*/
|
|
70
|
+
exports.fastOutSlowIn = react_native_reanimated_1.Easing.bezierFn(0.4, 0, 0.2, 1);
|
|
71
|
+
//# sourceMappingURL=easings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"easings.js","sourceRoot":"","sources":["../../../src/motion/easings.ts"],"names":[],"mappings":";;;AAAA,qEAAiD;AAIjD;;;;;;;;GAQG;AAEH;;GAEG;AACI,MAAM,YAAY,GAAa,CAAC,CAAC,EAAE,EAAE;IACxC,SAAS,CAAC;IACV,OAAO,CAAC,CAAC;AACb,CAAC,CAAC;AAHW,QAAA,YAAY,gBAGvB;AAEF;;GAEG;AACI,MAAM,gBAAgB,GAAG,CAAC,MAAM,GAAG,GAAG,EAAY,EAAE;IACvD,IAAI,MAAM,KAAK,GAAG,EAAE,CAAC;QACjB,OAAO,CAAC,CAAC,EAAE,EAAE;YACT,SAAS,CAAC;YACV,OAAO,CAAC,GAAG,CAAC,CAAC;QACjB,CAAC,CAAC;IACN,CAAC;IACD,MAAM,GAAG,GAAG,CAAC,GAAG,MAAM,CAAC;IACvB,OAAO,CAAC,CAAC,EAAE,EAAE;QACT,SAAS,CAAC;QACV,OAAO,CAAC,IAAI,GAAG,CAAC;IACpB,CAAC,CAAC;AACN,CAAC,CAAC;AAZW,QAAA,gBAAgB,oBAY3B;AAEF;;;GAGG;AACI,MAAM,gBAAgB,GAAG,CAAC,MAAM,GAAG,GAAG,EAAY,EAAE;IACvD,IAAI,MAAM,KAAK,GAAG,EAAE,CAAC;QACjB,OAAO,CAAC,CAAC,EAAE,EAAE;YACT,SAAS,CAAC;YACV,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QACjC,CAAC,CAAC;IACN,CAAC;IACD,MAAM,GAAG,GAAG,CAAC,GAAG,MAAM,CAAC;IACvB,OAAO,CAAC,CAAC,EAAE,EAAE;QACT,SAAS,CAAC;QACV,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,GAAG,CAAC;IAC9B,CAAC,CAAC;AACN,CAAC,CAAC;AAZW,QAAA,gBAAgB,oBAY3B;AAEF;;GAEG;AACI,MAAM,YAAY,GAAa,CAAC,CAAC,EAAE,EAAE;IACxC,SAAS,CAAC;IACV,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;AACvC,CAAC,CAAC;AAHW,QAAA,YAAY,gBAGvB;AAEF;;;;GAIG;AACU,QAAA,aAAa,GAAa,gCAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.folmeSpring = folmeSpring;
|
|
4
|
+
/**
|
|
5
|
+
* Miuix folme spring — converts the Compose-style
|
|
6
|
+
* `spring(dampingRatio, stiffness)` spec to a Reanimated spring config.
|
|
7
|
+
*
|
|
8
|
+
* damping = 2 * dampingRatio * sqrt(stiffness) (mass = 1)
|
|
9
|
+
*
|
|
10
|
+
* Visual reference:
|
|
11
|
+
* miuix-vue/src/anim/folmeSpring.ts (motion-v spring conversion)
|
|
12
|
+
* miuix `anim/Spring.kt` spring(dampingRatio, stiffness)
|
|
13
|
+
*
|
|
14
|
+
* ⚠️ Use the exact (dampingRatio, stiffness) pairs from the reference
|
|
15
|
+
* components — never approximate them.
|
|
16
|
+
*/
|
|
17
|
+
function folmeSpring(dampingRatio, stiffness) {
|
|
18
|
+
return {
|
|
19
|
+
damping: 2 * dampingRatio * Math.sqrt(stiffness),
|
|
20
|
+
stiffness,
|
|
21
|
+
mass: 1,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=folmeSpring.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"folmeSpring.js","sourceRoot":"","sources":["../../../src/motion/folmeSpring.ts"],"names":[],"mappings":";;AAeA,kCAMC;AAnBD;;;;;;;;;;;;GAYG;AACH,SAAgB,WAAW,CAAC,YAAoB,EAAE,SAAiB;IAC/D,OAAO;QACH,OAAO,EAAE,CAAC,GAAG,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC;QAChD,SAAS;QACT,IAAI,EAAE,CAAC;KACV,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.folmeSpringByResponse = folmeSpringByResponse;
|
|
4
|
+
const folmeSpring_1 = require("./folmeSpring");
|
|
5
|
+
/**
|
|
6
|
+
* Miuix `folmeSpring(damping, response)` — response-based spring spec.
|
|
7
|
+
*
|
|
8
|
+
* stiffness = (2π / response)²
|
|
9
|
+
*
|
|
10
|
+
* Visual reference:
|
|
11
|
+
* miuix-vue/src/anim/folmeSpring.ts (`folmeSpringByResponse`)
|
|
12
|
+
* miuix `anim/MiuixEasing.kt` folmeSpring(damping, response)
|
|
13
|
+
*
|
|
14
|
+
* Used by e.g. TopAppBar small-title (1.0 / 0.3, 1.0 / 0.15), Dialog
|
|
15
|
+
* large enter (0.9 / 0.3) and BottomSheet enter (0.9 / 0.38) / settle
|
|
16
|
+
* (0.85 / 0.4).
|
|
17
|
+
*/
|
|
18
|
+
function folmeSpringByResponse(damping, response) {
|
|
19
|
+
const stiffness = (2 * Math.PI) / response;
|
|
20
|
+
return (0, folmeSpring_1.folmeSpring)(damping, stiffness * stiffness);
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=folmeSpringByResponse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"folmeSpringByResponse.js","sourceRoot":"","sources":["../../../src/motion/folmeSpringByResponse.ts"],"names":[],"mappings":";;AAeA,sDAGC;AAlBD,+CAA4C;AAE5C;;;;;;;;;;;;GAYG;AACH,SAAgB,qBAAqB,CAAC,OAAe,EAAE,QAAgB;IACnE,MAAM,SAAS,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC;IAC3C,OAAO,IAAA,yBAAW,EAAC,OAAO,EAAE,SAAS,GAAG,SAAS,CAAC,CAAC;AACvD,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useReducedMotionPreference = exports.MotionProvider = exports.menuDimOut = exports.menuDimIn = exports.menuAlphaOut = exports.menuAlphaIn = exports.sheetHandleRelease = exports.sheetHandlePress = exports.dialogContentExit = exports.dialogDimExit = exports.dialogDimEnter = exports.titleColorTween = exports.tabIndicator = exports.pressIndication = exports.motion = exports.onboardingEnter = exports.checkboxMarkHide = exports.checkboxMarkShow = exports.checkboxColor = exports.checkboxSink = exports.storageManage = exports.storageEnter = exports.menuFraction = exports.inputMotion = exports.snackbarMotion = exports.searchBarReveal = exports.topAppBarHide = exports.topAppBarShow = exports.dialogMobileEnter = exports.dialogLargeEnter = exports.bottomSheetSettle = exports.bottomSheetEnter = exports.cardTilt = exports.cardSink = exports.sliderDragOverlay = exports.sliderThumbScale = exports.sliderProgressIdle = exports.sliderProgressDrag = exports.switchTrackColor = exports.switchThumbScale = exports.switchThumbOffset = exports.fastOutSlowIn = exports.sinOutEasing = exports.linearEasing = exports.decelerateEasing = exports.accelerateEasing = exports.folmeSpringByResponse = exports.folmeSpring = void 0;
|
|
4
|
+
var folmeSpring_1 = require("./folmeSpring");
|
|
5
|
+
Object.defineProperty(exports, "folmeSpring", { enumerable: true, get: function () { return folmeSpring_1.folmeSpring; } });
|
|
6
|
+
var folmeSpringByResponse_1 = require("./folmeSpringByResponse");
|
|
7
|
+
Object.defineProperty(exports, "folmeSpringByResponse", { enumerable: true, get: function () { return folmeSpringByResponse_1.folmeSpringByResponse; } });
|
|
8
|
+
var easings_1 = require("./easings");
|
|
9
|
+
Object.defineProperty(exports, "accelerateEasing", { enumerable: true, get: function () { return easings_1.accelerateEasing; } });
|
|
10
|
+
Object.defineProperty(exports, "decelerateEasing", { enumerable: true, get: function () { return easings_1.decelerateEasing; } });
|
|
11
|
+
Object.defineProperty(exports, "linearEasing", { enumerable: true, get: function () { return easings_1.linearEasing; } });
|
|
12
|
+
Object.defineProperty(exports, "sinOutEasing", { enumerable: true, get: function () { return easings_1.sinOutEasing; } });
|
|
13
|
+
Object.defineProperty(exports, "fastOutSlowIn", { enumerable: true, get: function () { return easings_1.fastOutSlowIn; } });
|
|
14
|
+
var presets_1 = require("./presets");
|
|
15
|
+
Object.defineProperty(exports, "switchThumbOffset", { enumerable: true, get: function () { return presets_1.switchThumbOffset; } });
|
|
16
|
+
Object.defineProperty(exports, "switchThumbScale", { enumerable: true, get: function () { return presets_1.switchThumbScale; } });
|
|
17
|
+
Object.defineProperty(exports, "switchTrackColor", { enumerable: true, get: function () { return presets_1.switchTrackColor; } });
|
|
18
|
+
Object.defineProperty(exports, "sliderProgressDrag", { enumerable: true, get: function () { return presets_1.sliderProgressDrag; } });
|
|
19
|
+
Object.defineProperty(exports, "sliderProgressIdle", { enumerable: true, get: function () { return presets_1.sliderProgressIdle; } });
|
|
20
|
+
Object.defineProperty(exports, "sliderThumbScale", { enumerable: true, get: function () { return presets_1.sliderThumbScale; } });
|
|
21
|
+
Object.defineProperty(exports, "sliderDragOverlay", { enumerable: true, get: function () { return presets_1.sliderDragOverlay; } });
|
|
22
|
+
Object.defineProperty(exports, "cardSink", { enumerable: true, get: function () { return presets_1.cardSink; } });
|
|
23
|
+
Object.defineProperty(exports, "cardTilt", { enumerable: true, get: function () { return presets_1.cardTilt; } });
|
|
24
|
+
Object.defineProperty(exports, "bottomSheetEnter", { enumerable: true, get: function () { return presets_1.bottomSheetEnter; } });
|
|
25
|
+
Object.defineProperty(exports, "bottomSheetSettle", { enumerable: true, get: function () { return presets_1.bottomSheetSettle; } });
|
|
26
|
+
Object.defineProperty(exports, "dialogLargeEnter", { enumerable: true, get: function () { return presets_1.dialogLargeEnter; } });
|
|
27
|
+
Object.defineProperty(exports, "dialogMobileEnter", { enumerable: true, get: function () { return presets_1.dialogMobileEnter; } });
|
|
28
|
+
Object.defineProperty(exports, "topAppBarShow", { enumerable: true, get: function () { return presets_1.topAppBarShow; } });
|
|
29
|
+
Object.defineProperty(exports, "topAppBarHide", { enumerable: true, get: function () { return presets_1.topAppBarHide; } });
|
|
30
|
+
Object.defineProperty(exports, "searchBarReveal", { enumerable: true, get: function () { return presets_1.searchBarReveal; } });
|
|
31
|
+
Object.defineProperty(exports, "snackbarMotion", { enumerable: true, get: function () { return presets_1.snackbarMotion; } });
|
|
32
|
+
Object.defineProperty(exports, "inputMotion", { enumerable: true, get: function () { return presets_1.inputMotion; } });
|
|
33
|
+
Object.defineProperty(exports, "menuFraction", { enumerable: true, get: function () { return presets_1.menuFraction; } });
|
|
34
|
+
Object.defineProperty(exports, "storageEnter", { enumerable: true, get: function () { return presets_1.storageEnter; } });
|
|
35
|
+
Object.defineProperty(exports, "storageManage", { enumerable: true, get: function () { return presets_1.storageManage; } });
|
|
36
|
+
Object.defineProperty(exports, "checkboxSink", { enumerable: true, get: function () { return presets_1.checkboxSink; } });
|
|
37
|
+
Object.defineProperty(exports, "checkboxColor", { enumerable: true, get: function () { return presets_1.checkboxColor; } });
|
|
38
|
+
Object.defineProperty(exports, "checkboxMarkShow", { enumerable: true, get: function () { return presets_1.checkboxMarkShow; } });
|
|
39
|
+
Object.defineProperty(exports, "checkboxMarkHide", { enumerable: true, get: function () { return presets_1.checkboxMarkHide; } });
|
|
40
|
+
Object.defineProperty(exports, "onboardingEnter", { enumerable: true, get: function () { return presets_1.onboardingEnter; } });
|
|
41
|
+
Object.defineProperty(exports, "motion", { enumerable: true, get: function () { return presets_1.motion; } });
|
|
42
|
+
Object.defineProperty(exports, "pressIndication", { enumerable: true, get: function () { return presets_1.pressIndication; } });
|
|
43
|
+
Object.defineProperty(exports, "tabIndicator", { enumerable: true, get: function () { return presets_1.tabIndicator; } });
|
|
44
|
+
Object.defineProperty(exports, "titleColorTween", { enumerable: true, get: function () { return presets_1.titleColorTween; } });
|
|
45
|
+
Object.defineProperty(exports, "dialogDimEnter", { enumerable: true, get: function () { return presets_1.dialogDimEnter; } });
|
|
46
|
+
Object.defineProperty(exports, "dialogDimExit", { enumerable: true, get: function () { return presets_1.dialogDimExit; } });
|
|
47
|
+
Object.defineProperty(exports, "dialogContentExit", { enumerable: true, get: function () { return presets_1.dialogContentExit; } });
|
|
48
|
+
Object.defineProperty(exports, "sheetHandlePress", { enumerable: true, get: function () { return presets_1.sheetHandlePress; } });
|
|
49
|
+
Object.defineProperty(exports, "sheetHandleRelease", { enumerable: true, get: function () { return presets_1.sheetHandleRelease; } });
|
|
50
|
+
Object.defineProperty(exports, "menuAlphaIn", { enumerable: true, get: function () { return presets_1.menuAlphaIn; } });
|
|
51
|
+
Object.defineProperty(exports, "menuAlphaOut", { enumerable: true, get: function () { return presets_1.menuAlphaOut; } });
|
|
52
|
+
Object.defineProperty(exports, "menuDimIn", { enumerable: true, get: function () { return presets_1.menuDimIn; } });
|
|
53
|
+
Object.defineProperty(exports, "menuDimOut", { enumerable: true, get: function () { return presets_1.menuDimOut; } });
|
|
54
|
+
var MotionProvider_1 = require("./MotionProvider");
|
|
55
|
+
Object.defineProperty(exports, "MotionProvider", { enumerable: true, get: function () { return MotionProvider_1.MotionProvider; } });
|
|
56
|
+
Object.defineProperty(exports, "useReducedMotionPreference", { enumerable: true, get: function () { return MotionProvider_1.useReducedMotionPreference; } });
|
|
57
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/motion/index.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAAnC,0GAAA,WAAW,OAAA;AACpB,iEAAgE;AAAvD,8HAAA,qBAAqB,OAAA;AAC9B,qCAA0G;AAAjG,2GAAA,gBAAgB,OAAA;AAAE,2GAAA,gBAAgB,OAAA;AAAE,uGAAA,YAAY,OAAA;AAAE,uGAAA,YAAY,OAAA;AAAE,wGAAA,aAAa,OAAA;AAEtF,qCAwCmB;AAvCf,4GAAA,iBAAiB,OAAA;AACjB,2GAAA,gBAAgB,OAAA;AAChB,2GAAA,gBAAgB,OAAA;AAChB,6GAAA,kBAAkB,OAAA;AAClB,6GAAA,kBAAkB,OAAA;AAClB,2GAAA,gBAAgB,OAAA;AAChB,4GAAA,iBAAiB,OAAA;AACjB,mGAAA,QAAQ,OAAA;AACR,mGAAA,QAAQ,OAAA;AACR,2GAAA,gBAAgB,OAAA;AAChB,4GAAA,iBAAiB,OAAA;AACjB,2GAAA,gBAAgB,OAAA;AAChB,4GAAA,iBAAiB,OAAA;AACjB,wGAAA,aAAa,OAAA;AACb,wGAAA,aAAa,OAAA;AACb,0GAAA,eAAe,OAAA;AACf,yGAAA,cAAc,OAAA;AACd,sGAAA,WAAW,OAAA;AACX,uGAAA,YAAY,OAAA;AACZ,uGAAA,YAAY,OAAA;AACZ,wGAAA,aAAa,OAAA;AACb,uGAAA,YAAY,OAAA;AACZ,wGAAA,aAAa,OAAA;AACb,2GAAA,gBAAgB,OAAA;AAChB,2GAAA,gBAAgB,OAAA;AAChB,0GAAA,eAAe,OAAA;AACf,iGAAA,MAAM,OAAA;AACN,0GAAA,eAAe,OAAA;AACf,uGAAA,YAAY,OAAA;AACZ,0GAAA,eAAe,OAAA;AACf,yGAAA,cAAc,OAAA;AACd,wGAAA,aAAa,OAAA;AACb,4GAAA,iBAAiB,OAAA;AACjB,2GAAA,gBAAgB,OAAA;AAChB,6GAAA,kBAAkB,OAAA;AAClB,sGAAA,WAAW,OAAA;AACX,uGAAA,YAAY,OAAA;AACZ,oGAAA,SAAS,OAAA;AACT,qGAAA,UAAU,OAAA;AAGd,mDAA8E;AAArE,gHAAA,cAAc,OAAA;AAAE,4HAAA,0BAA0B,OAAA"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.menuDimOut = exports.menuDimIn = exports.menuAlphaOut = exports.menuAlphaIn = exports.sheetHandleRelease = exports.sheetHandlePress = exports.dialogContentExit = exports.dialogDimExit = exports.dialogDimEnter = exports.titleColorTween = exports.tabIndicator = exports.sliderDragOverlay = exports.motion = exports.checkboxMarkHide = exports.checkboxMarkShow = exports.checkboxColor = exports.pressIndication = exports.onboardingEnter = exports.checkboxSink = exports.storageManage = exports.storageEnter = exports.menuFraction = exports.inputMotion = exports.snackbarMotion = exports.searchBarReveal = exports.topAppBarHide = exports.topAppBarShow = exports.dialogMobileEnter = exports.dialogLargeEnter = exports.bottomSheetSettle = exports.bottomSheetEnter = exports.cardTilt = exports.cardSink = exports.sliderThumbScale = exports.sliderProgressIdle = exports.sliderProgressDrag = exports.switchTrackColor = exports.switchThumbScale = exports.switchThumbOffset = void 0;
|
|
4
|
+
const easings_1 = require("./easings");
|
|
5
|
+
const folmeSpring_1 = require("./folmeSpring");
|
|
6
|
+
const folmeSpringByResponse_1 = require("./folmeSpringByResponse");
|
|
7
|
+
/**
|
|
8
|
+
* Named motion presets for every Miuix component.
|
|
9
|
+
*
|
|
10
|
+
* Components must consume these presets instead of writing ad-hoc
|
|
11
|
+
* `withSpring(...)` calls, so the folme parameters stay exact and greppable.
|
|
12
|
+
*
|
|
13
|
+
* ⚠️ These values are the reference implementation — do not unify them into
|
|
14
|
+
* one spring preset (they are intentionally different per component).
|
|
15
|
+
*/
|
|
16
|
+
// ---- Springs (folme) ----
|
|
17
|
+
/** Switch thumb offset. folmeSpring(0.7, 987). */
|
|
18
|
+
exports.switchThumbOffset = (0, folmeSpring_1.folmeSpring)(0.7, 987);
|
|
19
|
+
/** Switch thumb scale. folmeSpring(0.6, 987). */
|
|
20
|
+
exports.switchThumbScale = (0, folmeSpring_1.folmeSpring)(0.6, 987);
|
|
21
|
+
/** Switch track color. folmeSpring(0.99, 438.6). */
|
|
22
|
+
exports.switchTrackColor = (0, folmeSpring_1.folmeSpring)(0.99, 438.6);
|
|
23
|
+
/** Slider progress while dragging. folmeSpring(0.9, 1755). */
|
|
24
|
+
exports.sliderProgressDrag = (0, folmeSpring_1.folmeSpring)(0.9, 1755);
|
|
25
|
+
/** Slider progress while settling. folmeSpring(0.96, 322). */
|
|
26
|
+
exports.sliderProgressIdle = (0, folmeSpring_1.folmeSpring)(0.96, 322);
|
|
27
|
+
/** Slider knob active scale 1 → 1.127. folmeSpring(0.6, 987). */
|
|
28
|
+
exports.sliderThumbScale = (0, folmeSpring_1.folmeSpring)(0.6, 987);
|
|
29
|
+
/** Card sink feedback. scale 1.0 → 0.94. folmeSpring(0.8, 600). */
|
|
30
|
+
exports.cardSink = (0, folmeSpring_1.folmeSpring)(0.8, 600);
|
|
31
|
+
/** Card tilt feedback. folmeSpring(0.6, 400). */
|
|
32
|
+
exports.cardTilt = (0, folmeSpring_1.folmeSpring)(0.6, 400);
|
|
33
|
+
/** BottomSheet enter / exit slide. folmeSpring(damping 0.9, response 0.38). */
|
|
34
|
+
exports.bottomSheetEnter = (0, folmeSpringByResponse_1.folmeSpringByResponse)(0.9, 0.38);
|
|
35
|
+
/** BottomSheet drag-settle return. folmeSpring(damping 0.85, response 0.4). */
|
|
36
|
+
exports.bottomSheetSettle = (0, folmeSpringByResponse_1.folmeSpringByResponse)(0.85, 0.4);
|
|
37
|
+
/** Dialog large-screen enter. scale 0.8→1. folmeSpring(damping 0.9, response 0.3). */
|
|
38
|
+
exports.dialogLargeEnter = (0, folmeSpringByResponse_1.folmeSpringByResponse)(0.9, 0.3);
|
|
39
|
+
/** Dialog mobile slide-up. folmeSpring(0.88, 450). */
|
|
40
|
+
exports.dialogMobileEnter = (0, folmeSpring_1.folmeSpring)(0.88, 450);
|
|
41
|
+
/** TopAppBar small-title show. folmeSpring(damping 1.0, response 0.3). */
|
|
42
|
+
exports.topAppBarShow = (0, folmeSpringByResponse_1.folmeSpringByResponse)(1.0, 0.3);
|
|
43
|
+
/** TopAppBar small-title hide. folmeSpring(damping 1.0, response 0.15). */
|
|
44
|
+
exports.topAppBarHide = (0, folmeSpringByResponse_1.folmeSpringByResponse)(1.0, 0.15);
|
|
45
|
+
/** SearchBar cancel / results reveal. spring(stiffness 400, damping 40). */
|
|
46
|
+
exports.searchBarReveal = (0, folmeSpring_1.folmeSpring)(1, 400);
|
|
47
|
+
/** Snackbar enter / exit. folmeSpring(1, 400). */
|
|
48
|
+
exports.snackbarMotion = (0, folmeSpring_1.folmeSpring)(1, 400);
|
|
49
|
+
/** Input focus / label float. Compose default spring. folmeSpring(1, 1500). */
|
|
50
|
+
exports.inputMotion = (0, folmeSpring_1.folmeSpring)(1, 1500);
|
|
51
|
+
/** Menu / ListPopup popup fraction. spring(dampingRatio 0.82, stiffness 362.5). */
|
|
52
|
+
exports.menuFraction = (0, folmeSpring_1.folmeSpring)(0.82, 362.5);
|
|
53
|
+
/** Storage page sections and donut settle. folmeSpring(damping 0.9, response 0.38). */
|
|
54
|
+
exports.storageEnter = (0, folmeSpringByResponse_1.folmeSpringByResponse)(0.9, 0.38);
|
|
55
|
+
/** Storage management controls. folmeSpring(damping 0.88, response 0.3). */
|
|
56
|
+
exports.storageManage = (0, folmeSpringByResponse_1.folmeSpringByResponse)(0.88, 0.3);
|
|
57
|
+
/** Checkbox SinkFeedback(0.85, spring(0.99, 986.96)). */
|
|
58
|
+
exports.checkboxSink = (0, folmeSpring_1.folmeSpring)(0.99, 986.96);
|
|
59
|
+
/** Onboarding content entrance. Kept short and critically damped. */
|
|
60
|
+
exports.onboardingEnter = (0, folmeSpringByResponse_1.folmeSpringByResponse)(0.92, 0.36);
|
|
61
|
+
/** MiuixIndication overlay. 120ms linear. */
|
|
62
|
+
exports.pressIndication = { duration: 120, easing: easings_1.linearEasing };
|
|
63
|
+
/** Checkbox background/foreground tween. */
|
|
64
|
+
exports.checkboxColor = { duration: 300, easing: easings_1.fastOutSlowIn };
|
|
65
|
+
exports.checkboxMarkShow = { duration: 10, easing: easings_1.fastOutSlowIn };
|
|
66
|
+
exports.checkboxMarkHide = { duration: 150, easing: easings_1.fastOutSlowIn };
|
|
67
|
+
/** Shared durations for page-level motion; component-specific presets remain authoritative. */
|
|
68
|
+
exports.motion = {
|
|
69
|
+
duration: { instant: 0, fast: 120, normal: 200, slow: 300 },
|
|
70
|
+
spring: {
|
|
71
|
+
press: exports.cardSink,
|
|
72
|
+
standard: (0, folmeSpringByResponse_1.folmeSpringByResponse)(0.9, 0.38),
|
|
73
|
+
soft: (0, folmeSpringByResponse_1.folmeSpringByResponse)(0.86, 0.46),
|
|
74
|
+
sheet: exports.bottomSheetEnter,
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
/** Slider drag overlay. 150ms FastOutSlowIn. */
|
|
78
|
+
exports.sliderDragOverlay = { duration: 150, easing: easings_1.fastOutSlowIn };
|
|
79
|
+
/** TabRow indicator slide. 200ms linear. */
|
|
80
|
+
exports.tabIndicator = { duration: 200, easing: easings_1.linearEasing };
|
|
81
|
+
/** TopAppBar title color. 50ms FastOutSlowIn. */
|
|
82
|
+
exports.titleColorTween = { duration: 50, easing: easings_1.fastOutSlowIn };
|
|
83
|
+
/** Dialog dim enter. 300ms DecelerateEasing(1.5). */
|
|
84
|
+
exports.dialogDimEnter = { duration: 300, easing: (0, easings_1.decelerateEasing)(1.5) };
|
|
85
|
+
/** Dialog dim exit. 250ms DecelerateEasing(1.5). */
|
|
86
|
+
exports.dialogDimExit = { duration: 250, easing: (0, easings_1.decelerateEasing)(1.5) };
|
|
87
|
+
/** Dialog content exit. 260ms DecelerateEasing(1.5). */
|
|
88
|
+
exports.dialogContentExit = { duration: 260, easing: (0, easings_1.decelerateEasing)(1.5) };
|
|
89
|
+
/** BottomSheet drag-handle press. 100ms. */
|
|
90
|
+
exports.sheetHandlePress = { duration: 100, easing: easings_1.linearEasing };
|
|
91
|
+
/** BottomSheet drag-handle release. 150ms. */
|
|
92
|
+
exports.sheetHandleRelease = { duration: 150, easing: easings_1.linearEasing };
|
|
93
|
+
/** Menu / ListPopup alpha in. tween 200ms FastOutSlowIn. */
|
|
94
|
+
exports.menuAlphaIn = { duration: 200, easing: easings_1.fastOutSlowIn };
|
|
95
|
+
/** Menu / ListPopup alpha out. tween 150ms FastOutSlowIn. */
|
|
96
|
+
exports.menuAlphaOut = { duration: 150, easing: easings_1.fastOutSlowIn };
|
|
97
|
+
/** Menu / ListPopup dim in. tween 300ms SinOut. */
|
|
98
|
+
exports.menuDimIn = { duration: 300, easing: easings_1.sinOutEasing };
|
|
99
|
+
/** Menu / ListPopup dim out. tween 150ms SinOut. */
|
|
100
|
+
exports.menuDimOut = { duration: 150, easing: easings_1.sinOutEasing };
|
|
101
|
+
//# sourceMappingURL=presets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presets.js","sourceRoot":"","sources":["../../../src/motion/presets.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.NativeGlassSurfaceView = exports.NativeGlassCaptureSource = void 0;
|
|
7
|
+
const expo_modules_core_1 = require("expo-modules-core");
|
|
8
|
+
const react_1 = __importDefault(require("react"));
|
|
9
|
+
const react_native_1 = require("react-native");
|
|
10
|
+
exports.NativeGlassCaptureSource = react_native_1.Platform.OS === 'android'
|
|
11
|
+
? (0, expo_modules_core_1.requireNativeViewManager)('LiquidGlass', 'GlassCaptureSource')
|
|
12
|
+
: null;
|
|
13
|
+
const NativeGlassSurfaceManager = react_native_1.Platform.OS === 'android'
|
|
14
|
+
? (0, expo_modules_core_1.requireNativeViewManager)('LiquidGlass', 'GlassSurface')
|
|
15
|
+
: null;
|
|
16
|
+
exports.NativeGlassSurfaceView = NativeGlassSurfaceManager
|
|
17
|
+
? react_1.default.forwardRef(function NativeGlassSurfaceView({ tint, highlightColor, ...props }, ref) {
|
|
18
|
+
return react_1.default.createElement(NativeGlassSurfaceManager, {
|
|
19
|
+
ref,
|
|
20
|
+
...props,
|
|
21
|
+
tint: tint != null ? (0, react_native_1.processColor)(tint) ?? undefined : undefined,
|
|
22
|
+
surfaceColor: props.surfaceColor != null ? (0, react_native_1.processColor)(props.surfaceColor) ?? undefined : undefined,
|
|
23
|
+
highlightColor: highlightColor != null ? (0, react_native_1.processColor)(highlightColor) ?? undefined : undefined,
|
|
24
|
+
toggleTrackColorOff: props.toggleTrackColorOff != null ? (0, react_native_1.processColor)(props.toggleTrackColorOff) ?? undefined : undefined,
|
|
25
|
+
toggleTrackColorOn: props.toggleTrackColorOn != null ? (0, react_native_1.processColor)(props.toggleTrackColorOn) ?? undefined : undefined,
|
|
26
|
+
toggleSolidBackdropColor: props.toggleSolidBackdropColor != null ? (0, react_native_1.processColor)(props.toggleSolidBackdropColor) ?? undefined : undefined,
|
|
27
|
+
});
|
|
28
|
+
})
|
|
29
|
+
: null;
|
|
30
|
+
//# sourceMappingURL=nativeGlassViews.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nativeGlassViews.js","sourceRoot":"","sources":["../../src/nativeGlassViews.ts"],"names":[],"mappings":";;;;;;AAAA,yDAA6D;AAC7D,kDAA0B;AAC1B,+CAAsD;AA0HzC,QAAA,wBAAwB,GAAwD,uBAAQ,CAAC,EAAE,KAAK,SAAS;IAClH,CAAC,CAAC,IAAA,4CAAwB,EAA0B,aAAa,EAAE,oBAAoB,CAAC;IACxF,CAAC,CAAC,IAAI,CAAC;AACX,MAAM,yBAAyB,GAAoF,uBAAQ,CAAC,EAAE,KAAK,SAAS;IACxI,CAAC,CAAC,IAAA,4CAAwB,EAAsD,aAAa,EAAE,cAAc,CAAC;IAC9G,CAAC,CAAC,IAAI,CAAC;AACE,QAAA,sBAAsB,GAAG,yBAAyB;IAC3D,CAAC,CAAC,eAAK,CAAC,UAAU,CAAgC,SAAS,sBAAsB,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG;QACzH,OAAO,eAAK,CAAC,aAAa,CAAC,yBAAyB,EAAE;YAClD,GAAG;YACH,GAAG,KAAK;YACR,IAAI,EAAE,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,IAAA,2BAAY,EAAC,IAAI,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,SAAS;YAChE,YAAY,EAAE,KAAK,CAAC,YAAY,IAAI,IAAI,CAAC,CAAC,CAAC,IAAA,2BAAY,EAAC,KAAK,CAAC,YAAY,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,SAAS;YACpG,cAAc,EAAE,cAAc,IAAI,IAAI,CAAC,CAAC,CAAC,IAAA,2BAAY,EAAC,cAAc,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,SAAS;YAC9F,mBAAmB,EAAE,KAAK,CAAC,mBAAmB,IAAI,IAAI,CAAC,CAAC,CAAC,IAAA,2BAAY,EAAC,KAAK,CAAC,mBAAmB,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,SAAS;YACzH,kBAAkB,EAAE,KAAK,CAAC,kBAAkB,IAAI,IAAI,CAAC,CAAC,CAAC,IAAA,2BAAY,EAAC,KAAK,CAAC,kBAAkB,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,SAAS;YACtH,wBAAwB,EAAE,KAAK,CAAC,wBAAwB,IAAI,IAAI,CAAC,CAAC,CAAC,IAAA,2BAAY,EAAC,KAAK,CAAC,wBAAwB,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,SAAS;SAC3I,CAAC,CAAC;IACH,CAAC,CAAC;IACF,CAAC,CAAC,IAAI,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setLiquidGlassPerformanceTelemetryEnabled = setLiquidGlassPerformanceTelemetryEnabled;
|
|
4
|
+
exports.beginEffectiveScrollFpsSession = beginEffectiveScrollFpsSession;
|
|
5
|
+
exports.getLiquidGlassPerformanceStats = getLiquidGlassPerformanceStats;
|
|
6
|
+
const expo_modules_core_1 = require("expo-modules-core");
|
|
7
|
+
const react_native_1 = require("react-native");
|
|
8
|
+
const coreNativeModule = react_native_1.Platform.OS === 'android'
|
|
9
|
+
? (0, expo_modules_core_1.requireNativeModule)('LiquidGlass')
|
|
10
|
+
: null;
|
|
11
|
+
function activeModule() {
|
|
12
|
+
return coreNativeModule;
|
|
13
|
+
}
|
|
14
|
+
function setLiquidGlassPerformanceTelemetryEnabled(enabled) {
|
|
15
|
+
activeModule()?.setPerformanceTelemetryEnabled(enabled);
|
|
16
|
+
}
|
|
17
|
+
/** Start a clean Debug-only content-offset cadence window for one benchmark route. */
|
|
18
|
+
function beginEffectiveScrollFpsSession(page) {
|
|
19
|
+
activeModule()?.beginEffectiveScrollFpsSession?.(page);
|
|
20
|
+
}
|
|
21
|
+
async function getLiquidGlassPerformanceStats() {
|
|
22
|
+
return activeModule()?.getPerformanceStats() ?? null;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=performanceTelemetry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"performanceTelemetry.js","sourceRoot":"","sources":["../../src/performanceTelemetry.ts"],"names":[],"mappings":";;AA+EA,8FAEC;AAGD,wEAEC;AAED,wEAEC;AA1FD,yDAAwD;AACxD,+CAAwC;AAsExC,MAAM,gBAAgB,GAAG,uBAAQ,CAAC,EAAE,KAAK,SAAS;IAC9C,CAAC,CAAC,IAAA,uCAAmB,EAAqC,aAAa,CAAC;IACxE,CAAC,CAAC,IAAI,CAAC;AAEX,SAAS,YAAY;IACjB,OAAO,gBAAgB,CAAC;AAC5B,CAAC;AAED,SAAgB,yCAAyC,CAAC,OAAgB;IACtE,YAAY,EAAE,EAAE,8BAA8B,CAAC,OAAO,CAAC,CAAC;AAC5D,CAAC;AAED,sFAAsF;AACtF,SAAgB,8BAA8B,CAAC,IAAY;IACvD,YAAY,EAAE,EAAE,8BAA8B,EAAE,CAAC,IAAI,CAAC,CAAC;AAC3D,CAAC;AAEM,KAAK,UAAU,8BAA8B;IAChD,OAAO,YAAY,EAAE,EAAE,mBAAmB,EAAE,IAAI,IAAI,CAAC;AACzD,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.dispatchGlassValueEvent = dispatchGlassValueEvent;
|
|
4
|
+
/**
|
|
5
|
+
* Keep high-frequency drag packets on the direct path, but publish spring targets
|
|
6
|
+
* through the native view prop. The direct Expo function acknowledges queuing a
|
|
7
|
+
* main-thread callback before it knows whether the view tag still resolves; a
|
|
8
|
+
* dropped release would leave the JS control updated while its native lens stayed
|
|
9
|
+
* at the previous endpoint. A release is rare, so the prop commit is worth the
|
|
10
|
+
* reliable view lookup and also works with legacy renderers.
|
|
11
|
+
*/
|
|
12
|
+
function dispatchGlassValueEvent(payload, animate, sink, publishProp) {
|
|
13
|
+
if (!animate && sink?.(payload))
|
|
14
|
+
return;
|
|
15
|
+
publishProp(payload);
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=pointerEventBridge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pointerEventBridge.js","sourceRoot":"","sources":["../../src/pointerEventBridge.ts"],"names":[],"mappings":";;AAkBA,0DAQC;AAhBD;;;;;;;GAOG;AACH,SAAgB,uBAAuB,CACnC,OAAe,EACf,OAAgB,EAChB,IAAoC,EACpC,WAAsC;IAEtC,IAAI,CAAC,OAAO,IAAI,IAAI,EAAE,CAAC,OAAO,CAAC;QAAE,OAAO;IACxC,WAAW,CAAC,OAAO,CAAC,CAAC;AACzB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.pointerXInView = pointerXInView;
|
|
4
|
+
/** Convert a window-space pointer coordinate into a clamped view-local x. */
|
|
5
|
+
function pointerXInView(absoluteX, viewLeft, viewWidth) {
|
|
6
|
+
'worklet';
|
|
7
|
+
if (!Number.isFinite(absoluteX) || !Number.isFinite(viewLeft) || !Number.isFinite(viewWidth) || viewWidth <= 0) {
|
|
8
|
+
return 0;
|
|
9
|
+
}
|
|
10
|
+
return Math.min(viewWidth, Math.max(0, absoluteX - viewLeft));
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=pointerGeometry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pointerGeometry.js","sourceRoot":"","sources":["../../src/pointerGeometry.ts"],"names":[],"mappings":";;AACA,wCAMC;AAPD,6EAA6E;AAC7E,SAAgB,cAAc,CAAC,SAAiB,EAAE,QAAgB,EAAE,SAAiB;IACjF,SAAS,CAAC;IACV,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,SAAS,IAAI,CAAC,EAAE,CAAC;QAC7G,OAAO,CAAC,CAAC;IACb,CAAC;IACD,OAAO,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC,CAAC,CAAC;AAClE,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.estimateGlassPointerVelocity = estimateGlassPointerVelocity;
|
|
4
|
+
/** Least-squares 2D velocity over the newest 100ms/20 samples, in dp/s. */
|
|
5
|
+
function estimateGlassPointerVelocity(samples, windowSeconds = 0.1) {
|
|
6
|
+
if (samples.length < 2)
|
|
7
|
+
return { x: 0, y: 0 };
|
|
8
|
+
const now = samples[samples.length - 1].timeSeconds;
|
|
9
|
+
const cutoff = now - windowSeconds;
|
|
10
|
+
let n = 0, sumT = 0, sumTT = 0, sumX = 0, sumY = 0, sumTX = 0, sumTY = 0;
|
|
11
|
+
for (let index = samples.length - 1; index >= 0 && n < 20; index--) {
|
|
12
|
+
const sample = samples[index];
|
|
13
|
+
if (sample.timeSeconds < cutoff)
|
|
14
|
+
break;
|
|
15
|
+
const t = sample.timeSeconds - now;
|
|
16
|
+
n++;
|
|
17
|
+
sumT += t;
|
|
18
|
+
sumTT += t * t;
|
|
19
|
+
sumX += sample.x;
|
|
20
|
+
sumY += sample.y;
|
|
21
|
+
sumTX += t * sample.x;
|
|
22
|
+
sumTY += t * sample.y;
|
|
23
|
+
}
|
|
24
|
+
if (n < 2)
|
|
25
|
+
return { x: 0, y: 0 };
|
|
26
|
+
const denominator = n * sumTT - sumT * sumT;
|
|
27
|
+
if (Math.abs(denominator) < 1e-9)
|
|
28
|
+
return { x: 0, y: 0 };
|
|
29
|
+
return {
|
|
30
|
+
x: (n * sumTX - sumT * sumX) / denominator,
|
|
31
|
+
y: (n * sumTY - sumT * sumY) / denominator,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=pressVelocity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pressVelocity.js","sourceRoot":"","sources":["../../src/pressVelocity.ts"],"names":[],"mappings":";;AAQA,oEA2BC;AA5BD,2EAA2E;AAC3E,SAAgB,4BAA4B,CACxC,OAAsC,EACtC,aAAa,GAAG,GAAG;IAEnB,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;IAC9C,MAAM,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,WAAW,CAAC;IACpD,MAAM,MAAM,GAAG,GAAG,GAAG,aAAa,CAAC;IACnC,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,GAAG,CAAC,EAAE,KAAK,GAAG,CAAC,EAAE,IAAI,GAAG,CAAC,EAAE,IAAI,GAAG,CAAC,EAAE,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC;IACzE,KAAK,IAAI,KAAK,GAAG,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,KAAK,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,EAAE,CAAC;QACjE,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;QAC9B,IAAI,MAAM,CAAC,WAAW,GAAG,MAAM;YAAE,MAAM;QACvC,MAAM,CAAC,GAAG,MAAM,CAAC,WAAW,GAAG,GAAG,CAAC;QACnC,CAAC,EAAE,CAAC;QACJ,IAAI,IAAI,CAAC,CAAC;QACV,KAAK,IAAI,CAAC,GAAG,CAAC,CAAC;QACf,IAAI,IAAI,MAAM,CAAC,CAAC,CAAC;QACjB,IAAI,IAAI,MAAM,CAAC,CAAC,CAAC;QACjB,KAAK,IAAI,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC;QACtB,KAAK,IAAI,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC;IAC1B,CAAC;IACD,IAAI,CAAC,GAAG,CAAC;QAAE,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;IACjC,MAAM,WAAW,GAAG,CAAC,GAAG,KAAK,GAAG,IAAI,GAAG,IAAI,CAAC;IAC5C,IAAI,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,GAAG,IAAI;QAAE,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;IACxD,OAAO;QACH,CAAC,EAAE,CAAC,CAAC,GAAG,KAAK,GAAG,IAAI,GAAG,IAAI,CAAC,GAAG,WAAW;QAC1C,CAAC,EAAE,CAAC,CAAC,GAAG,KAAK,GAAG,IAAI,GAAG,IAAI,CAAC,GAAG,WAAW;KAC7C,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Divider = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const theme_1 = require("../theme");
|
|
6
|
+
const react_1 = require("react");
|
|
7
|
+
const react_native_1 = require("react-native");
|
|
8
|
+
/**
|
|
9
|
+
* Design System Divider.
|
|
10
|
+
*
|
|
11
|
+
* Visual reference:
|
|
12
|
+
* miuix-vue/src/components/divider/Divider.vue (Divider.kt)
|
|
13
|
+
*
|
|
14
|
+
* DividerDefaults: thickness 0.75dp, color = dividerLine. Pages must not
|
|
15
|
+
* hardcode `#E0E0E0` — use this.
|
|
16
|
+
*/
|
|
17
|
+
exports.Divider = (0, react_1.memo)(function Divider({ orientation = 'horizontal', thickness = 0.75, color, style }) {
|
|
18
|
+
const theme = (0, theme_1.useTheme)();
|
|
19
|
+
const isHorizontal = orientation === 'horizontal';
|
|
20
|
+
return ((0, jsx_runtime_1.jsx)(react_native_1.View, { style: [
|
|
21
|
+
{
|
|
22
|
+
backgroundColor: color ?? theme.colors.dividerLine,
|
|
23
|
+
opacity: theme.presentation.content.dividerStyle === 'subtle' ? 0.72 : 1,
|
|
24
|
+
},
|
|
25
|
+
isHorizontal
|
|
26
|
+
? { width: '100%', height: thickness }
|
|
27
|
+
: { height: '100%', width: thickness },
|
|
28
|
+
style,
|
|
29
|
+
] }));
|
|
30
|
+
});
|
|
31
|
+
exports.Divider.displayName = 'HyperDivider';
|
|
32
|
+
//# sourceMappingURL=Divider.js.map
|