@luckylca/react-native-liquid-glass 0.2.0 → 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/README.md +20 -33
- package/README.zh-CN.md +20 -33
- package/THIRD_PARTY_NOTICES.md +1 -1
- package/android/build.gradle +4 -4
- package/android/src/main/java/expo/modules/{newhuliquidglass → liquidglass}/EffectiveScrollInputBridge.kt +2 -2
- package/android/src/main/java/expo/modules/{newhuliquidglass/ExpoGlassProviderCoreView.kt → liquidglass/GlassCaptureView.kt} +39 -39
- package/android/src/main/java/expo/modules/{newhuliquidglass/CoreLiquidGlassRegistry.kt → liquidglass/GlassRegistry.kt} +7 -7
- package/android/src/main/java/expo/modules/{newhuliquidglass/ExpoGlassSurfaceCoreView.kt → liquidglass/GlassSurfaceView.kt} +17 -17
- package/android/src/main/java/expo/modules/liquidglass/LiquidGlassModule.kt +205 -0
- package/android/src/main/java/expo/modules/{localglass/ExpoLocalGlassEngineModule.kt → liquidglass/LocalMaterialView.kt} +24 -27
- package/android/src/main/java/expo/modules/{newhuliquidglass → liquidglass}/PassSurfaceSuppression.kt +1 -1
- package/android/src/main/java/expo/modules/{newhuliquidglass → liquidglass}/SharedGlassPassProbeLog.kt +1 -1
- package/android/src/main/java/expo/modules/{newhuliquidglass → liquidglass}/SharedGlassPassWiring.kt +3 -3
- package/android-core/build.gradle +1 -1
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/backdrop/BackdropRecorder.kt +4 -4
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/backdrop/FrozenBackdrop.kt +1 -1
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/backdrop/GlassBackdropCoordinator.kt +5 -5
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/backdrop/GlassBackdropSourceHandle.kt +1 -1
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/backdrop/GlassScrollSource.kt +1 -1
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/backdrop/GlassViewController.kt +119 -722
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/backdrop/LiquidGlassProviderLayout.kt +2 -2
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/backdrop/LiquidGlassView.kt +2 -2
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/backdrop/ReferenceSourceWindowPolicy.kt +1 -1
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/backdrop/StableSceneTexturePolicy.kt +1 -1
- 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/{com/newhu → io/github/luckylca}/liquidglass/backdrop/internal/ReferenceTabSampling.kt +1 -1
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/backdrop/internal/SharedSceneCapture.kt +1 -1
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/core/GlassCapabilities.kt +1 -1
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/core/GlassEngine.kt +7 -7
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/core/GlassMaterial.kt +1 -1
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/core/GlassMath.kt +1 -1
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/core/GlassOpticalInsets.kt +1 -1
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/core/GlassRenderTier.kt +1 -1
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/core/GlassShapePacker.kt +1 -1
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/core/GlassSurfaceState.kt +1 -1
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/core/GlassUniforms.kt +1 -1
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/core/LiquidGlassShaders.kt +1 -1
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/core/SharedGlassPass.kt +6 -6
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/core/geometry/G2RoundedRectangle.kt +2 -2
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/core/geometry/ReferenceG2MaskTexture.kt +1 -1
- package/android-core/src/main/java/io/github/luckylca/liquidglass/core/shader/HeightFieldGlassShader.kt +7 -0
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/core/shader/ReferenceBackdropBlurShader.kt +1 -1
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/core/shader/ReferenceGaussianDiscBackdropBlur.kt +1 -1
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/core/shader/ReferenceGlassUniforms.kt +4 -4
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/core/shader/ReferenceParityGlassShader.kt +1 -1
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/core/shader/ReferenceParityMultiShapeShader.kt +1 -1
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/core/shader/SdfScaleLensShader.kt +1 -1
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/local/LocalGlassHardwareLayerExperiment.kt +1 -1
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/local/LocalGlassMaterial.kt +1 -1
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/local/LocalGlassRenderer.kt +2 -2
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/local/LocalGlassRuntimeShader.kt +2 -2
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/local/LocalGlassShader.kt +1 -1
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/local/LocalGlassView.kt +2 -2
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/motion/GlassMotionDriver.kt +1 -1
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/motion/GlassMotionState.kt +1 -1
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/motion/PointerVelocityTracker.kt +1 -1
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/motion/SpringSpec.kt +1 -1
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/optics/G2Corner.kt +1 -1
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/optics/GlassMaterial.kt +3 -3
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/optics/GlassOpticsShader.kt +3 -3
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/optics/GlassParityProbe.kt +1 -1
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/optics/GlassShapeGeometry.kt +1 -1
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/optics/GlassUniformBinder.kt +2 -2
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/optics/PixelDiff.kt +1 -1
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/optics/ReferenceOptics.kt +1 -1
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/rendering/GlassSurfaceHost.kt +17 -17
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/rendering/GlassSurfaceRenderer.kt +9 -9
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/rendering/RetainedBackdropLayer.kt +1 -1
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/scheduler/GlassFrameScheduler.kt +2 -2
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/telemetry/EffectiveScrollFpsProbe.kt +13 -13
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/telemetry/GlassTelemetry.kt +1 -1
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/telemetry/LiquidGlassPerfTelemetry.kt +13 -13
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/telemetry/LiquidGlassTrace.kt +3 -3
- package/android-core/src/main/java/{com/newhu → io/github/luckylca}/liquidglass/telemetry/LocalGlassTelemetry.kt +1 -1
- package/docs/architecture.md +61 -0
- package/docs/migration-0.3.md +19 -0
- package/docs/publishing.md +29 -7
- package/expo-module.config.json +4 -4
- package/lib/commonjs/GlassSurface.js +157 -585
- package/lib/commonjs/GlassSurface.js.map +1 -1
- package/lib/commonjs/GlassTabBar.js +18 -957
- package/lib/commonjs/GlassTabBar.js.map +1 -1
- package/lib/commonjs/LocalGlassMaterial.js +3 -9
- package/lib/commonjs/LocalGlassMaterial.js.map +1 -1
- package/lib/commonjs/glassController.js +3 -7
- package/lib/commonjs/glassController.js.map +1 -1
- package/lib/commonjs/glassRuntime.js +7 -19
- package/lib/commonjs/glassRuntime.js.map +1 -1
- package/lib/commonjs/localGlassTelemetry.js +4 -13
- package/lib/commonjs/localGlassTelemetry.js.map +1 -1
- package/lib/commonjs/nativeGlassViews.js +8 -11
- package/lib/commonjs/nativeGlassViews.js.map +1 -1
- package/lib/commonjs/performanceTelemetry.js +2 -6
- package/lib/commonjs/performanceTelemetry.js.map +1 -1
- 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/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/buildTheme.js +1 -1
- package/lib/commonjs/theme/buildTheme.js.map +1 -1
- package/lib/module/GlassSurface.js +135 -563
- package/lib/module/GlassSurface.js.map +1 -1
- package/lib/module/GlassTabBar.js +18 -925
- package/lib/module/GlassTabBar.js.map +1 -1
- package/lib/module/LocalGlassMaterial.js +5 -11
- package/lib/module/LocalGlassMaterial.js.map +1 -1
- package/lib/module/glassController.js +3 -7
- package/lib/module/glassController.js.map +1 -1
- package/lib/module/glassRuntime.js +7 -19
- package/lib/module/glassRuntime.js.map +1 -1
- package/lib/module/localGlassTelemetry.js +4 -13
- package/lib/module/localGlassTelemetry.js.map +1 -1
- package/lib/module/nativeGlassViews.js +7 -10
- package/lib/module/nativeGlassViews.js.map +1 -1
- package/lib/module/performanceTelemetry.js +2 -6
- package/lib/module/performanceTelemetry.js.map +1 -1
- 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/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/buildTheme.js +1 -1
- package/lib/module/theme/buildTheme.js.map +1 -1
- package/lib/types/GlassSurface.d.ts +17 -86
- package/lib/types/GlassTabBar.d.ts +1 -0
- package/lib/types/glassNativeEngine.d.ts +1 -1
- package/lib/types/glassRuntime.d.ts +5 -2
- package/lib/types/localGlassTelemetry.d.ts +2 -2
- package/lib/types/nativeGlassViews.d.ts +2 -4
- 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/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/package.json +6 -14
- package/src/GlassSurface.tsx +227 -1337
- package/src/GlassTabBar.tsx +43 -1241
- package/src/LocalGlassMaterial.tsx +5 -11
- package/src/glassController.ts +3 -7
- package/src/glassRuntime.ts +9 -26
- package/src/localGlassTelemetry.ts +6 -15
- package/src/nativeGlassViews.ts +7 -10
- package/src/performanceTelemetry.ts +2 -6
- 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/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/buildTheme.ts +1 -1
- package/android/src/main/java/expo/modules/localglass/ExpoLocalGlassModule.kt +0 -341
- package/android/src/main/java/expo/modules/localglass/LocalGlassShader.kt +0 -59
- package/android/src/main/java/expo/modules/newhuliquidglass/ExpoGlassCoreModule.kt +0 -226
- package/android-core/src/main/java/com/newhu/liquidglass/backdrop/internal/GlassViewRenderer.kt +0 -1459
- package/android-core/src/main/java/com/newhu/liquidglass/core/shader/HeightFieldGlassShader.kt +0 -7
- package/android-core/src/main/java/com/newhu/liquidglass/rendering/GlassEngineSelection.kt +0 -30
- package/patches/liquid-glass-kit+1.0.0.patch +0 -2015
- package/patches/liquid-glass-kit-invalidation-coalescing.diff +0 -249
- package/patches/liquid-glass-kit-native-infra.diff +0 -624
- package/scripts/apply-legacy-patches.mjs +0 -116
|
@@ -3,93 +3,9 @@ import { View } from 'react-native';
|
|
|
3
3
|
import type { ColorValue, StyleProp, ViewProps, ViewStyle } from 'react-native';
|
|
4
4
|
import type { AnimatedStyle, SharedValue } from 'react-native-reanimated';
|
|
5
5
|
import type { GlassSurfaceRole } from './surfaceRendererPolicy';
|
|
6
|
-
import type { GlassMaterialTokens,
|
|
6
|
+
import type { GlassMaterialTokens, GlassVariant } from './types';
|
|
7
7
|
import type { GlassPointerEventSink, GlassValueEventSink } from './pointerEventBridge';
|
|
8
|
-
|
|
9
|
-
tokens: GlassTokens;
|
|
10
|
-
dark: boolean;
|
|
11
|
-
reducedMotion: boolean;
|
|
12
|
-
}
|
|
13
|
-
/** Keeps backdrop surfaces aligned with content inside a scroll container. */
|
|
14
|
-
export declare function GlassPortalScrollScope({ scrollOffset, layoutRevision, children, }: {
|
|
15
|
-
scrollOffset: SharedValue<number>;
|
|
16
|
-
/** Increment after content reflow so surfaces can refresh their window frames. */
|
|
17
|
-
layoutRevision?: number;
|
|
18
|
-
children: React.ReactNode;
|
|
19
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
20
|
-
/**
|
|
21
|
-
* Shares a route's horizontal transition with portaled glass surfaces.
|
|
22
|
-
* Backdrop surfaces live in a host-level overlay, so an ancestor transform is
|
|
23
|
-
* not inherited automatically. This scope keeps their window frames and the
|
|
24
|
-
* visible React Native content on the same animation value.
|
|
25
|
-
*/
|
|
26
|
-
export declare function GlassRouteTransitionScope({ translateX, children, }: {
|
|
27
|
-
translateX: SharedValue<number>;
|
|
28
|
-
children: React.ReactNode;
|
|
29
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
30
|
-
export declare function useGlassReducedMotion(): boolean;
|
|
31
|
-
export declare function useGlassInsideScroll(): boolean;
|
|
32
|
-
export declare function useGlassInsideCaptureScope(): boolean;
|
|
33
|
-
export declare function useGlassAppearance(): GlassRuntime | null;
|
|
34
|
-
/** Resolve the provider that represents the visible scene for a glass consumer. */
|
|
35
|
-
export declare function useGlassSamplingProviderId(source?: GlassSamplingSource): string | null;
|
|
36
|
-
export type GlassSamplingSource = 'routeScene' | 'themeBackdrop';
|
|
37
|
-
export declare function RouteGlassCaptureScope({ children, active, scopeId }: {
|
|
38
|
-
children: React.ReactNode;
|
|
39
|
-
active?: boolean;
|
|
40
|
-
scopeId?: string;
|
|
41
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
42
|
-
export declare function RouteGlassCaptureSource({ children, captureMode, captureOnly, sourceRevision, underlayProviderId, style, }: {
|
|
43
|
-
children: React.ReactNode;
|
|
44
|
-
captureMode?: 'live' | 'oneShotPassThrough' | 'livePassThrough' | 'oneShot' | 'static';
|
|
45
|
-
/** A private pass-through scene used only by other glass consumers. */
|
|
46
|
-
captureOnly?: boolean;
|
|
47
|
-
sourceRevision?: string;
|
|
48
|
-
underlayProviderId?: string | null;
|
|
49
|
-
style?: StyleProp<ViewStyle>;
|
|
50
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
51
|
-
/**
|
|
52
|
-
* A route-scoped host for backdrop-mode surfaces. Theme capability controls
|
|
53
|
-
* whether Glass surfaces exist; capture mode is controlled imperatively by
|
|
54
|
-
* the native provider without changing the React surface tree.
|
|
55
|
-
*/
|
|
56
|
-
export interface GlassMaterialProviderProps {
|
|
57
|
-
children: React.ReactNode;
|
|
58
|
-
/** Scene layer recorded behind route content. When supplied, route views render as normal siblings. */
|
|
59
|
-
backdrop?: React.ReactNode;
|
|
60
|
-
/** Separate visible backdrop/source used by sheets and other stable overlays. */
|
|
61
|
-
themeBackdrop?: React.ReactNode;
|
|
62
|
-
/** Changes only when the theme backdrop image or palette itself changes. */
|
|
63
|
-
themeBackdropRevision?: string;
|
|
64
|
-
/** Render descendant surfaces in place by default. Useful for fixed-scene preview galleries. */
|
|
65
|
-
inlineBackdropByDefault?: boolean;
|
|
66
|
-
/** Default sampling scene for descendants that do not select one explicitly. */
|
|
67
|
-
defaultSamplingSource?: GlassSamplingSource;
|
|
68
|
-
providerId?: string;
|
|
69
|
-
style?: StyleProp<ViewStyle>;
|
|
70
|
-
tokens: GlassTokens;
|
|
71
|
-
dark: boolean;
|
|
72
|
-
reducedMotion?: boolean;
|
|
73
|
-
/**
|
|
74
|
-
* Whether this provider's family is the one the host resolved.
|
|
75
|
-
*
|
|
76
|
-
* A host that keeps several material scopes mounted must pass `false` for the
|
|
77
|
-
* inactive ones. An inactive provider publishes the same contexts and renders
|
|
78
|
-
* the same tree, but records nothing: capture sources attach no native
|
|
79
|
-
* provider and the surface layers stay empty, so there is exactly one
|
|
80
|
-
* recorder in the window.
|
|
81
|
-
*/
|
|
82
|
-
active?: boolean;
|
|
83
|
-
}
|
|
84
|
-
/** Supplies preview optics without mounting another native backdrop recorder. */
|
|
85
|
-
export interface GlassAppearanceProviderProps {
|
|
86
|
-
children: React.ReactNode;
|
|
87
|
-
tokens: GlassTokens;
|
|
88
|
-
dark: boolean;
|
|
89
|
-
reducedMotion?: boolean;
|
|
90
|
-
}
|
|
91
|
-
export declare function GlassAppearanceProvider({ children, tokens, dark, reducedMotion }: GlassAppearanceProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
92
|
-
export declare function GlassMaterialProvider({ children, backdrop, themeBackdrop, themeBackdropRevision, inlineBackdropByDefault, defaultSamplingSource, providerId: providerIdProp, style, tokens, dark, reducedMotion, active }: GlassMaterialProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
import type { GlassSamplingSource } from './surface/types';
|
|
93
9
|
export interface GlassSurfaceProps {
|
|
94
10
|
variant?: GlassVariant;
|
|
95
11
|
/** Surface purpose used by the shared local renderer policy. */
|
|
@@ -214,3 +130,18 @@ export declare function GlassOverlay({ children, zIndex }: {
|
|
|
214
130
|
children: React.ReactNode;
|
|
215
131
|
zIndex?: number;
|
|
216
132
|
}): import("react/jsx-runtime").JSX.Element | null;
|
|
133
|
+
export type { GlassRuntime } from './surface/types';
|
|
134
|
+
export { GlassPortalScrollScope } from './surface/contexts';
|
|
135
|
+
export { GlassRouteTransitionScope } from './surface/contexts';
|
|
136
|
+
export { useGlassReducedMotion } from './surface/contexts';
|
|
137
|
+
export { useGlassInsideScroll } from './surface/contexts';
|
|
138
|
+
export { useGlassInsideCaptureScope } from './surface/contexts';
|
|
139
|
+
export { useGlassAppearance } from './surface/contexts';
|
|
140
|
+
export { useGlassSamplingProviderId } from './surface/contexts';
|
|
141
|
+
export type { GlassSamplingSource } from './surface/types';
|
|
142
|
+
export { RouteGlassCaptureScope } from './surface/contexts';
|
|
143
|
+
export { RouteGlassCaptureSource } from './surface/contexts';
|
|
144
|
+
export type { GlassMaterialProviderProps } from './surface/MaterialProvider';
|
|
145
|
+
export type { GlassAppearanceProviderProps } from './surface/MaterialProvider';
|
|
146
|
+
export { GlassAppearanceProvider } from './surface/MaterialProvider';
|
|
147
|
+
export { GlassMaterialProvider } from './surface/MaterialProvider';
|
|
@@ -33,3 +33,4 @@ export interface GlassTabBarProps {
|
|
|
33
33
|
* selectors retain their content API and independent interaction geometry.
|
|
34
34
|
*/
|
|
35
35
|
export declare function GlassTabBar(props: GlassTabBarProps): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export declare function FloatingGlassTabBar({ items, selected, onSelect, onSelectFromDrag, renderIcon, renderItem, bottomInset, height, width: requestedWidth, accessibilityHint, }: GlassTabBarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { GlassRuntimeEngine } from './glassRuntime';
|
|
2
2
|
export type GlassNativeEngine = GlassRuntimeEngine;
|
|
3
3
|
export declare function getGlassNativeEngine(): GlassNativeEngine;
|
|
4
|
-
export declare function subscribeGlassNativeEngine(listener: () => void): () =>
|
|
4
|
+
export declare function subscribeGlassNativeEngine(listener: () => void): () => void;
|
|
5
5
|
export declare function setGlassNativeEngine(next: GlassNativeEngine): void;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/** Android uses one native renderer; other platforms use local material fallbacks. */
|
|
2
|
+
export type GlassRuntimeEngine = 'core';
|
|
2
3
|
export interface GlassRuntimeConfig {
|
|
3
4
|
engine: GlassRuntimeEngine;
|
|
4
5
|
}
|
|
5
6
|
export declare function getGlassRuntime(): GlassRuntimeConfig;
|
|
6
|
-
|
|
7
|
+
/** @deprecated Renderer selection is automatic. */
|
|
8
|
+
export declare function subscribeGlassRuntime(_listener: () => void): () => void;
|
|
9
|
+
/** @deprecated The native renderer is fixed for the lifetime of the process. */
|
|
7
10
|
export declare function setGlassRuntime(next: GlassRuntimeConfig): void;
|
|
@@ -16,8 +16,8 @@ export type LocalGlassTelemetrySnapshot = {
|
|
|
16
16
|
sizeUniformUpdateCount: number;
|
|
17
17
|
materialUniformUpdateCount: number;
|
|
18
18
|
};
|
|
19
|
-
export declare function getLocalGlassNativeEngine():
|
|
20
|
-
export declare function subscribeLocalGlassNativeEngine(listener: () => void): () =>
|
|
19
|
+
export declare function getLocalGlassNativeEngine(): "core";
|
|
20
|
+
export declare function subscribeLocalGlassNativeEngine(listener: () => void): () => void;
|
|
21
21
|
export declare function setLocalGlassNativeEngine(next: LocalGlassNativeEngine): void;
|
|
22
22
|
/** Opt-in diagnostics only. Disabled paths do not allocate timers or notify React. */
|
|
23
23
|
export declare function setLocalGlassTelemetryEnabled(next: boolean): void;
|
|
@@ -108,7 +108,5 @@ export interface NativeGlassSurfaceProps extends ViewProps {
|
|
|
108
108
|
/** Mirror native interaction transforms onto non-glass foreground sibling content. */
|
|
109
109
|
syncContentTransform?: boolean;
|
|
110
110
|
}
|
|
111
|
-
export declare const
|
|
112
|
-
export declare const
|
|
113
|
-
export declare const CoreGlassCaptureSource: React.ComponentType<GlassCaptureSourceProps> | null;
|
|
114
|
-
export declare const CoreGlassSurfaceView: React.ForwardRefExoticComponent<NativeGlassSurfaceProps & React.RefAttributes<View>> | null;
|
|
111
|
+
export declare const NativeGlassCaptureSource: React.ComponentType<GlassCaptureSourceProps> | null;
|
|
112
|
+
export declare const NativeGlassSurfaceView: React.ForwardRefExoticComponent<NativeGlassSurfaceProps & React.RefAttributes<View>> | null;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ColorValue, StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
import type { SharedValue } from 'react-native-reanimated';
|
|
4
|
+
import type { GlassMaterialTokens, GlassVariant } from '../types';
|
|
5
|
+
import type { GlassPointerEventSink, GlassValueEventSink } from '../pointerEventBridge';
|
|
6
|
+
import type { GlassSurfaceProps } from '../GlassSurface';
|
|
7
|
+
export declare const InlineBackdropSurface: React.NamedExoticComponent<{
|
|
8
|
+
renderingEnabled: boolean;
|
|
9
|
+
providerId: string;
|
|
10
|
+
variant: GlassVariant;
|
|
11
|
+
tintColor?: ColorValue;
|
|
12
|
+
interactive: boolean;
|
|
13
|
+
continuous: boolean;
|
|
14
|
+
opticalProgress?: SharedValue<number>;
|
|
15
|
+
/** Pointer event stream for the native motion driver; it owns the spring. */
|
|
16
|
+
pointerEvent?: SharedValue<string>;
|
|
17
|
+
/** The same stream as plain state; this is what the native prop receives. */
|
|
18
|
+
pointerEventValue?: string;
|
|
19
|
+
/** Direct native path for pointer samples that should not rerender inline surfaces. */
|
|
20
|
+
pointerEventSink?: GlassPointerEventSink;
|
|
21
|
+
/** Knob value stream for value-driven lenses; see useGlassKnobMotion. */
|
|
22
|
+
valueEvent?: string;
|
|
23
|
+
/** Direct native path for knob values that should not rerender portal surfaces. */
|
|
24
|
+
valueEventSink?: GlassValueEventSink;
|
|
25
|
+
opticalToggleFraction?: SharedValue<number>;
|
|
26
|
+
opticalPointX?: SharedValue<number>;
|
|
27
|
+
opticalPointY?: SharedValue<number>;
|
|
28
|
+
opticalVelocityX?: SharedValue<number>;
|
|
29
|
+
opticalVelocityY?: SharedValue<number>;
|
|
30
|
+
opticalMotionX?: SharedValue<number>;
|
|
31
|
+
opticalMotionY?: SharedValue<number>;
|
|
32
|
+
materialOverrides?: Partial<GlassMaterialTokens>;
|
|
33
|
+
displacementOnlyDebug: boolean;
|
|
34
|
+
syncContentTransform?: boolean;
|
|
35
|
+
intrinsicLayout: boolean;
|
|
36
|
+
sharedSource?: boolean;
|
|
37
|
+
captureProbe?: boolean;
|
|
38
|
+
contentStyle?: StyleProp<ViewStyle>;
|
|
39
|
+
placement: "layout" | "bottom" | "center";
|
|
40
|
+
children?: React.ReactNode;
|
|
41
|
+
}>;
|
|
42
|
+
export declare function LocalGlassSurface({ variant, surfaceRole, style, contentStyle, animatedStyle, fallbackAnimatedStyle, pointerEvents, onLayout, children, }: Pick<GlassSurfaceProps, 'variant' | 'surfaceRole' | 'style' | 'contentStyle' | 'animatedStyle' | 'fallbackAnimatedStyle' | 'pointerEvents' | 'onLayout' | 'children'>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
import type { GlassTokens } from '../types';
|
|
4
|
+
import type { GlassSamplingSource } from './types';
|
|
5
|
+
/**
|
|
6
|
+
* A route-scoped host for backdrop-mode surfaces. Theme capability controls
|
|
7
|
+
* whether Glass surfaces exist; capture mode is controlled imperatively by
|
|
8
|
+
* the native provider without changing the React surface tree.
|
|
9
|
+
*/
|
|
10
|
+
export interface GlassMaterialProviderProps {
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
/** Scene layer recorded behind route content. When supplied, route views render as normal siblings. */
|
|
13
|
+
backdrop?: React.ReactNode;
|
|
14
|
+
/** Separate visible backdrop/source used by sheets and other stable overlays. */
|
|
15
|
+
themeBackdrop?: React.ReactNode;
|
|
16
|
+
/** Changes only when the theme backdrop image or palette itself changes. */
|
|
17
|
+
themeBackdropRevision?: string;
|
|
18
|
+
/** Render descendant surfaces in place by default. Useful for fixed-scene preview galleries. */
|
|
19
|
+
inlineBackdropByDefault?: boolean;
|
|
20
|
+
/** Default sampling scene for descendants that do not select one explicitly. */
|
|
21
|
+
defaultSamplingSource?: GlassSamplingSource;
|
|
22
|
+
providerId?: string;
|
|
23
|
+
style?: StyleProp<ViewStyle>;
|
|
24
|
+
tokens: GlassTokens;
|
|
25
|
+
dark: boolean;
|
|
26
|
+
reducedMotion?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Whether this provider's family is the one the host resolved.
|
|
29
|
+
*
|
|
30
|
+
* A host that keeps several material scopes mounted must pass `false` for the
|
|
31
|
+
* inactive ones. An inactive provider publishes the same contexts and renders
|
|
32
|
+
* the same tree, but records nothing: capture sources attach no native
|
|
33
|
+
* provider and the surface layers stay empty, so there is exactly one
|
|
34
|
+
* recorder in the window.
|
|
35
|
+
*/
|
|
36
|
+
active?: boolean;
|
|
37
|
+
}
|
|
38
|
+
/** Supplies preview optics without mounting another native backdrop recorder. */
|
|
39
|
+
export interface GlassAppearanceProviderProps {
|
|
40
|
+
children: React.ReactNode;
|
|
41
|
+
tokens: GlassTokens;
|
|
42
|
+
dark: boolean;
|
|
43
|
+
reducedMotion?: boolean;
|
|
44
|
+
}
|
|
45
|
+
export declare function GlassAppearanceProvider({ children, tokens, dark, reducedMotion, }: GlassAppearanceProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
export declare function GlassMaterialProvider({ children, backdrop, themeBackdrop, themeBackdropRevision, inlineBackdropByDefault, defaultSamplingSource, providerId: providerIdProp, style, tokens, dark, reducedMotion, active, }: GlassMaterialProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import type { GlassCaptureSourceProps } from '../nativeGlassViews';
|
|
4
|
+
import type { NativeBackdropSurfaceProps } from './types';
|
|
5
|
+
export declare const AnimatedNativeGlassSurfaceView: React.ComponentType<import("../nativeGlassViews").NativeGlassSurfaceProps & {
|
|
6
|
+
pointerEventSink?: import("../pointerEventBridge").GlassPointerEventSink;
|
|
7
|
+
valueEventSink?: import("../pointerEventBridge").GlassValueEventSink;
|
|
8
|
+
animatedProps?: Partial<Pick<import("../nativeGlassViews").NativeGlassSurfaceProps, "interactionProgress" | "interactionPointX" | "interactionPointY" | "interactionVelocityX" | "interactionVelocityY" | "motionX" | "motionY" | "toggleFraction">>;
|
|
9
|
+
} & React.RefAttributes<View>> | null;
|
|
10
|
+
export declare function NativeBackdropSurface({ opticsModel, sdfDisplacementMapDebug, sdfContrast, sdfBrightness, sdfSaturation, sdfOuterShadowAlpha, sdfOuterShadowBlurRadius, sdfOuterShadowOffsetY, sdfInnerShadowAlpha, sdfInnerShadowExtent, shapeMaskText, shapeMaskFontSize, shapeMaskFontWeight, sharedPassOrder, sharedPassZIndex, pointerEventSink, valueEventSink, syncContentTransform, renderingEnabled, ...props }: NativeBackdropSurfaceProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function GlassCaptureSourceView({ children, ...props }: GlassCaptureSourceProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { SharedValue } from 'react-native-reanimated';
|
|
3
|
+
import type { GlassTokens } from '../types';
|
|
4
|
+
import type { SurfaceEntry, OverlayEntry, EntryRegistry } from './types';
|
|
5
|
+
export declare function GlassSurfacePortalLayer({ registry, tokens, }: {
|
|
6
|
+
registry: EntryRegistry<SurfaceEntry>;
|
|
7
|
+
tokens: GlassTokens;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
9
|
+
export declare const sharedValueGroupIds: WeakMap<object, number>;
|
|
10
|
+
export declare let nextSharedValueGroupId: number;
|
|
11
|
+
export declare function getSharedValueId(value: SharedValue<number> | null | undefined): number;
|
|
12
|
+
export declare const PortalScrollGroupContainer: React.NamedExoticComponent<{
|
|
13
|
+
offsets: readonly SharedValue<number>[];
|
|
14
|
+
routeTransitionX?: SharedValue<number> | null;
|
|
15
|
+
zIndex: number;
|
|
16
|
+
children: React.ReactNode;
|
|
17
|
+
}>;
|
|
18
|
+
export declare function GlassRouteOverlayLayer({ registry, enabled, }: {
|
|
19
|
+
registry: EntryRegistry<OverlayEntry>;
|
|
20
|
+
enabled: boolean;
|
|
21
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
22
|
+
export declare const RouteOverlayView: React.NamedExoticComponent<{
|
|
23
|
+
entry: OverlayEntry;
|
|
24
|
+
}>;
|
|
25
|
+
export declare const PortalGlassSurface: React.NamedExoticComponent<{
|
|
26
|
+
providerId: string;
|
|
27
|
+
entry: SurfaceEntry;
|
|
28
|
+
drawOrder: number;
|
|
29
|
+
shaderEnabled: boolean;
|
|
30
|
+
}>;
|
|
31
|
+
export declare const PortalFallbackSurface: React.NamedExoticComponent<{
|
|
32
|
+
entry: SurfaceEntry;
|
|
33
|
+
}>;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
import type { SharedValue } from 'react-native-reanimated';
|
|
4
|
+
import type { GlassRuntime, GlassSamplingSource, GlassHostContextValue, GlassOverlayHostContextValue } from './types';
|
|
5
|
+
export declare const GlassRuntimeContext: React.Context<GlassRuntime | null>;
|
|
6
|
+
export declare const GlassCaptureSourceContext: React.Context<string | null>;
|
|
7
|
+
export declare const GlassRouteTransitionContext: React.Context<SharedValue<number> | null>;
|
|
8
|
+
export declare const GlassPortalScrollContext: React.Context<{
|
|
9
|
+
offsets: readonly SharedValue<number>[];
|
|
10
|
+
layoutRevision: number;
|
|
11
|
+
groupKey: string;
|
|
12
|
+
}>;
|
|
13
|
+
export declare const GlassMeasureOnlyContext: React.Context<boolean>;
|
|
14
|
+
/** Keeps backdrop surfaces aligned with content inside a scroll container. */
|
|
15
|
+
export declare function GlassPortalScrollScope({ scrollOffset, layoutRevision, children, }: {
|
|
16
|
+
scrollOffset: SharedValue<number>;
|
|
17
|
+
/** Increment after content reflow so surfaces can refresh their window frames. */
|
|
18
|
+
layoutRevision?: number;
|
|
19
|
+
children: React.ReactNode;
|
|
20
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
/**
|
|
22
|
+
* Shares a route's horizontal transition with portaled glass surfaces.
|
|
23
|
+
* Backdrop surfaces live in a host-level overlay, so an ancestor transform is
|
|
24
|
+
* not inherited automatically. This scope keeps their window frames and the
|
|
25
|
+
* visible React Native content on the same animation value.
|
|
26
|
+
*/
|
|
27
|
+
export declare function GlassRouteTransitionScope({ translateX, children, }: {
|
|
28
|
+
translateX: SharedValue<number>;
|
|
29
|
+
children: React.ReactNode;
|
|
30
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export declare function useGlassReducedMotion(): boolean;
|
|
32
|
+
export declare function useGlassInsideScroll(): boolean;
|
|
33
|
+
export declare function useGlassInsideCaptureScope(): boolean;
|
|
34
|
+
export declare function useGlassAppearance(): GlassRuntime | null;
|
|
35
|
+
/** Resolve the provider that represents the visible scene for a glass consumer. */
|
|
36
|
+
export declare function useGlassSamplingProviderId(source?: GlassSamplingSource): string | null;
|
|
37
|
+
export declare const GlassHostContext: React.Context<GlassHostContextValue | null>;
|
|
38
|
+
export declare function RouteGlassCaptureScope({ children, active, scopeId, }: {
|
|
39
|
+
children: React.ReactNode;
|
|
40
|
+
active?: boolean;
|
|
41
|
+
scopeId?: string;
|
|
42
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
export declare function RouteGlassCaptureSource({ children, captureMode, captureOnly, sourceRevision, underlayProviderId, style, }: {
|
|
44
|
+
children: React.ReactNode;
|
|
45
|
+
captureMode?: 'live' | 'oneShotPassThrough' | 'livePassThrough' | 'oneShot' | 'static';
|
|
46
|
+
/** A private pass-through scene used only by other glass consumers. */
|
|
47
|
+
captureOnly?: boolean;
|
|
48
|
+
sourceRevision?: string;
|
|
49
|
+
underlayProviderId?: string | null;
|
|
50
|
+
style?: StyleProp<ViewStyle>;
|
|
51
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
52
|
+
export declare const GlassOverlayHostContext: React.Context<GlassOverlayHostContextValue | null>;
|
|
53
|
+
/**
|
|
54
|
+
* Page-level scope for glass surfaces.
|
|
55
|
+
*
|
|
56
|
+
* Every page under a PagerView shares one provider id (`host.providerId +
|
|
57
|
+
* ':page-content'`) and one registry, and GlassSurfacePortalLayer draws every
|
|
58
|
+
* registered entry in a provider-level layer above page content. So a kept-alive
|
|
59
|
+
* page's surfaces paint on top of whichever page is actually visible: on Home
|
|
60
|
+
* that showed up as an empty 344x55dp panel under the search bar, which turned
|
|
61
|
+
* out to be the User page's segmented control.
|
|
62
|
+
*
|
|
63
|
+
* A surface whose scope is inactive stops publishing. Layout is untouched; only
|
|
64
|
+
* the registry entry goes away, so nothing is drawn for it.
|
|
65
|
+
*/
|
|
66
|
+
export declare const GlassScopeActiveContext: React.Context<boolean>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { SurfaceEntry, OverlayEntry, EntryRegistry } from './types';
|
|
2
|
+
export declare function createEntryRegistry<Entry>(): EntryRegistry<Entry>;
|
|
3
|
+
export declare function useRegistrySnapshot<Entry>(registry: EntryRegistry<Entry>): [string, Entry][];
|
|
4
|
+
export declare function sameSurface(previous: SurfaceEntry, next: SurfaceEntry): boolean;
|
|
5
|
+
export declare function sameOverlay(previous: OverlayEntry, next: OverlayEntry): boolean;
|
|
6
|
+
export declare function selectBalancedShaderSurfaces(entries: [string, SurfaceEntry][]): Set<string>;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
export declare const styles: {
|
|
2
|
+
root: {
|
|
3
|
+
flex: number;
|
|
4
|
+
};
|
|
5
|
+
routeContent: {
|
|
6
|
+
position: "absolute";
|
|
7
|
+
left: 0;
|
|
8
|
+
right: 0;
|
|
9
|
+
top: 0;
|
|
10
|
+
bottom: 0;
|
|
11
|
+
};
|
|
12
|
+
measureOnly: {};
|
|
13
|
+
localSurface: {
|
|
14
|
+
position: "relative";
|
|
15
|
+
overflow: "hidden";
|
|
16
|
+
};
|
|
17
|
+
localContent: {
|
|
18
|
+
overflow: "hidden";
|
|
19
|
+
};
|
|
20
|
+
portalSurface: {
|
|
21
|
+
position: "absolute";
|
|
22
|
+
overflow: "visible";
|
|
23
|
+
};
|
|
24
|
+
portalContentOverlay: {
|
|
25
|
+
alignItems: "center";
|
|
26
|
+
justifyContent: "center";
|
|
27
|
+
overflow: "hidden";
|
|
28
|
+
};
|
|
29
|
+
contentAboveGlass: {
|
|
30
|
+
overflow: "hidden";
|
|
31
|
+
};
|
|
32
|
+
contentAboveGlassMeasure: {
|
|
33
|
+
alignSelf: "stretch";
|
|
34
|
+
};
|
|
35
|
+
nativeSurface: {
|
|
36
|
+
backgroundColor: string;
|
|
37
|
+
overflow: "hidden";
|
|
38
|
+
};
|
|
39
|
+
fallbackSurface: {
|
|
40
|
+
backgroundColor: string;
|
|
41
|
+
borderWidth: number;
|
|
42
|
+
overflow: "hidden";
|
|
43
|
+
};
|
|
44
|
+
portalContentLayout: {
|
|
45
|
+
flex: number;
|
|
46
|
+
overflow: "hidden";
|
|
47
|
+
};
|
|
48
|
+
portalContentWrap: {
|
|
49
|
+
flexGrow: number;
|
|
50
|
+
flexShrink: number;
|
|
51
|
+
overflow: "hidden";
|
|
52
|
+
};
|
|
53
|
+
portalContentIntrinsic: {
|
|
54
|
+
alignSelf: "stretch";
|
|
55
|
+
overflow: "hidden";
|
|
56
|
+
};
|
|
57
|
+
captureSource: {
|
|
58
|
+
flex: number;
|
|
59
|
+
};
|
|
60
|
+
inlineBackdropSurface: {
|
|
61
|
+
flex: number;
|
|
62
|
+
};
|
|
63
|
+
inlineBackdropIntrinsicSurface: {
|
|
64
|
+
flexGrow: number;
|
|
65
|
+
};
|
|
66
|
+
bottomPlacement: {
|
|
67
|
+
alignItems: "center";
|
|
68
|
+
justifyContent: "flex-end";
|
|
69
|
+
};
|
|
70
|
+
centerPlacement: {
|
|
71
|
+
alignItems: "center";
|
|
72
|
+
justifyContent: "center";
|
|
73
|
+
};
|
|
74
|
+
};
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import type { ColorValue, StyleProp, ViewStyle } from 'react-native';
|
|
4
|
+
import type { AnimatedStyle, SharedValue } from 'react-native-reanimated';
|
|
5
|
+
import type { NativeGlassSurfaceProps } from '../nativeGlassViews';
|
|
6
|
+
import type { GlassMaterialTokens, GlassTokens, GlassVariant } from '../types';
|
|
7
|
+
import type { GlassPointerEventSink, GlassValueEventSink } from '../pointerEventBridge';
|
|
8
|
+
export type NativeBackdropSurfaceProps = NativeGlassSurfaceProps & {
|
|
9
|
+
/** Direct high-frequency event channel; consumed here and never sent as a native prop. */
|
|
10
|
+
pointerEventSink?: GlassPointerEventSink;
|
|
11
|
+
/** Direct high-frequency knob channel; consumed here and never sent as a native prop. */
|
|
12
|
+
valueEventSink?: GlassValueEventSink;
|
|
13
|
+
animatedProps?: Partial<Pick<NativeGlassSurfaceProps, 'interactionProgress' | 'interactionPointX' | 'interactionPointY' | 'interactionVelocityX' | 'interactionVelocityY' | 'motionX' | 'motionY' | 'toggleFraction'>>;
|
|
14
|
+
};
|
|
15
|
+
export interface GlassRuntime {
|
|
16
|
+
tokens: GlassTokens;
|
|
17
|
+
dark: boolean;
|
|
18
|
+
reducedMotion: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface SurfaceFrame {
|
|
21
|
+
x: number;
|
|
22
|
+
y: number;
|
|
23
|
+
width: number;
|
|
24
|
+
height: number;
|
|
25
|
+
}
|
|
26
|
+
export type GlassSamplingSource = 'routeScene' | 'themeBackdrop';
|
|
27
|
+
export interface SurfaceEntry {
|
|
28
|
+
frame: SurfaceFrame;
|
|
29
|
+
positioning: 'inFlow' | 'floating';
|
|
30
|
+
variant: GlassVariant;
|
|
31
|
+
samplingSource: GlassSamplingSource;
|
|
32
|
+
/** Native provider selected when the source-tree surface was registered. */
|
|
33
|
+
samplingProviderId: string;
|
|
34
|
+
tintColor?: ColorValue;
|
|
35
|
+
portalContent?: React.ReactNode;
|
|
36
|
+
/** Paint the surface's own children above the glass instead of into the scene it samples. */
|
|
37
|
+
contentAboveGlass: boolean;
|
|
38
|
+
content?: React.ReactNode;
|
|
39
|
+
/** Layout applied to the visible copy when content is portaled above the glass. */
|
|
40
|
+
contentStyle?: StyleProp<ViewStyle>;
|
|
41
|
+
interactive: boolean;
|
|
42
|
+
continuous: boolean;
|
|
43
|
+
sharedSource: boolean;
|
|
44
|
+
captureProbe: boolean;
|
|
45
|
+
opticalProgress?: SharedValue<number>;
|
|
46
|
+
scrollGroupKey: string;
|
|
47
|
+
scrollOffsets: readonly SharedValue<number>[];
|
|
48
|
+
routeTransitionX?: SharedValue<number> | null;
|
|
49
|
+
portalOffsetStyle?: AnimatedStyle<ViewStyle>;
|
|
50
|
+
portalTranslateX?: SharedValue<number>;
|
|
51
|
+
portalTranslateY?: SharedValue<number>;
|
|
52
|
+
portalScaleX?: SharedValue<number>;
|
|
53
|
+
portalScaleY?: SharedValue<number>;
|
|
54
|
+
/** Pointer event stream for the native motion driver; it owns the spring. */
|
|
55
|
+
pointerEvent?: SharedValue<string>;
|
|
56
|
+
/** The same stream as plain state; this is what the native prop receives. */
|
|
57
|
+
pointerEventValue?: string;
|
|
58
|
+
/** Direct native path for pointer samples that should not rerender portal surfaces. */
|
|
59
|
+
pointerEventSink?: GlassPointerEventSink;
|
|
60
|
+
/** Knob value stream for value-driven lenses; see useGlassKnobMotion. */
|
|
61
|
+
valueEvent?: string;
|
|
62
|
+
/** Direct native path for knob values that should not rerender portal surfaces. */
|
|
63
|
+
valueEventSink?: GlassValueEventSink;
|
|
64
|
+
opticalToggleFraction?: SharedValue<number>;
|
|
65
|
+
/** Deterministic progress used by reference-capture fixtures. */
|
|
66
|
+
opticalProgressValue?: number;
|
|
67
|
+
opticalPointX?: SharedValue<number>;
|
|
68
|
+
opticalPointY?: SharedValue<number>;
|
|
69
|
+
/** UI-thread pointer velocity in local dp/s for the reference release spring. */
|
|
70
|
+
opticalVelocityX?: SharedValue<number>;
|
|
71
|
+
opticalVelocityY?: SharedValue<number>;
|
|
72
|
+
opticalMotionX?: SharedValue<number>;
|
|
73
|
+
opticalMotionY?: SharedValue<number>;
|
|
74
|
+
materialOverrides?: Partial<GlassMaterialTokens>;
|
|
75
|
+
shapeMaskText?: string;
|
|
76
|
+
shapeMaskFontSize?: number;
|
|
77
|
+
shapeMaskFontWeight?: number;
|
|
78
|
+
progressiveBlurIntensity?: number;
|
|
79
|
+
displacementOnlyDebug: boolean;
|
|
80
|
+
syncContentTransform?: boolean;
|
|
81
|
+
animatedStyle?: AnimatedStyle<ViewStyle>;
|
|
82
|
+
placement?: 'layout' | 'bottom' | 'center';
|
|
83
|
+
bottomInset?: number;
|
|
84
|
+
zIndex: number;
|
|
85
|
+
}
|
|
86
|
+
export interface OverlayEntry {
|
|
87
|
+
children: React.ReactNode;
|
|
88
|
+
style?: AnimatedStyle<ViewStyle>;
|
|
89
|
+
frame?: SurfaceFrame;
|
|
90
|
+
scrollOffsets?: readonly SharedValue<number>[];
|
|
91
|
+
routeTransitionX?: SharedValue<number> | null;
|
|
92
|
+
portalOffsetStyle?: AnimatedStyle<ViewStyle>;
|
|
93
|
+
zIndex: number;
|
|
94
|
+
}
|
|
95
|
+
export interface EntryRegistry<Entry> {
|
|
96
|
+
getSnapshot: () => [string, Entry][];
|
|
97
|
+
subscribe: (listener: () => void) => () => void;
|
|
98
|
+
update: (id: string, entry: Entry, equals: (previous: Entry, next: Entry) => boolean) => void;
|
|
99
|
+
remove: (id: string) => void;
|
|
100
|
+
}
|
|
101
|
+
export interface GlassHostContextValue {
|
|
102
|
+
providerId: string;
|
|
103
|
+
routeSceneProviderId: string | null;
|
|
104
|
+
themeBackdropProviderId: string;
|
|
105
|
+
inlineBackdropByDefault: boolean;
|
|
106
|
+
hasSeparateBackdrop: boolean;
|
|
107
|
+
defaultSamplingSource: GlassSamplingSource;
|
|
108
|
+
hostRef: React.RefObject<View | null>;
|
|
109
|
+
updateSurface: (id: string, entry: SurfaceEntry) => void;
|
|
110
|
+
updateOverlay: (id: string, entry: OverlayEntry) => void;
|
|
111
|
+
removeOverlay: (id: string) => void;
|
|
112
|
+
remove: (id: string) => void;
|
|
113
|
+
}
|
|
114
|
+
export interface GlassOverlayHostContextValue {
|
|
115
|
+
providerId: string;
|
|
116
|
+
updateOverlay: (id: string, entry: OverlayEntry) => void;
|
|
117
|
+
remove: (id: string) => void;
|
|
118
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { SharedValue } from 'react-native-reanimated';
|
|
3
|
+
import type { GlassTabBarItem } from '../GlassTabBar';
|
|
4
|
+
import type { GlassTabBarProps } from '../GlassTabBar';
|
|
5
|
+
export declare function TabLensScene({ children }: {
|
|
6
|
+
children: (providerId: string) => ReactNode;
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function GlassTabItem({ item, index, selected, itemWidth, horizontalPadding, barHeight, renderVisual, customContent, sampled, lensLeft, lensRight, }: {
|
|
9
|
+
item: GlassTabBarItem;
|
|
10
|
+
index: number;
|
|
11
|
+
selected: boolean;
|
|
12
|
+
itemWidth: number;
|
|
13
|
+
horizontalPadding: number;
|
|
14
|
+
barHeight: number;
|
|
15
|
+
renderVisual: NonNullable<GlassTabBarProps['renderItem']>;
|
|
16
|
+
customContent: boolean;
|
|
17
|
+
sampled?: boolean;
|
|
18
|
+
lensLeft: SharedValue<number>;
|
|
19
|
+
lensRight: SharedValue<number>;
|
|
20
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { View } from 'react-native';
|
|
2
|
+
import type { GlassTabBarProps } from '../GlassTabBar';
|
|
3
|
+
export declare const AnimatedNativeGlassSurface: import("react").FunctionComponent<import("react-native-reanimated").AnimatedProps<import("../nativeGlassViews").NativeGlassSurfaceProps & import("react").RefAttributes<View>>> | null;
|
|
4
|
+
export declare function withAlpha(color: string, alpha: number, fallback: string): string;
|
|
5
|
+
export declare function InlineGlassTabBar({ items, selected, bottomInset, shellBackgroundColor, onSelect, onSelectFromDrag, renderIcon, renderItem, presentation, height, width: requestedWidth, horizontalPadding, shellRadius, lensMaxWidth, lensRefractionHeight, accessibilityHint, }: GlassTabBarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export declare const TAB_BAR_HEIGHT = 64;
|
|
2
|
+
export declare const TAB_BAR_BOTTOM_GAP = 8;
|
|
3
|
+
export declare const TAB_BAR_SCROLL_CLEARANCE = 12;
|
|
4
|
+
export declare const TAB_BAR_SIDE_MARGIN = 16;
|
|
5
|
+
export declare const TAB_BAR_MAX_WIDTH = 280;
|
|
6
|
+
export declare const TAB_BAR_MIN_WIDTH = 208;
|
|
7
|
+
export declare const TAB_BAR_HORIZONTAL_PADDING = 8;
|
|
8
|
+
export declare const SELECTION_LENS_HEIGHT = 48;
|
|
9
|
+
export declare const SELECTION_LENS_MAX_WIDTH = 94;
|
|
10
|
+
export declare const LONG_PRESS_THRESHOLD_MS = 300;
|
|
11
|
+
export declare const PRE_HOLD_SLOP = 20;
|
|
12
|
+
export declare const DRAG_START_SLOP = 3;
|
|
13
|
+
export declare const TAB_BAR_PORTAL_Z_INDEX = 80;
|
|
14
|
+
export declare const GESTURE_DEBUG_ENABLED: boolean;
|
|
15
|
+
export declare const IDLE_SPRING: {
|
|
16
|
+
damping: number;
|
|
17
|
+
stiffness: number;
|
|
18
|
+
mass: number;
|
|
19
|
+
};
|
|
20
|
+
export declare const TAP_SELECTION_SPRING: {
|
|
21
|
+
damping: number;
|
|
22
|
+
stiffness: number;
|
|
23
|
+
mass: number;
|
|
24
|
+
};
|
|
25
|
+
export declare const EDGE_SPRING_FAST: {
|
|
26
|
+
damping: number;
|
|
27
|
+
stiffness: number;
|
|
28
|
+
mass: number;
|
|
29
|
+
};
|
|
30
|
+
export declare const EDGE_SPRING_SLOW: {
|
|
31
|
+
damping: number;
|
|
32
|
+
stiffness: number;
|
|
33
|
+
mass: number;
|
|
34
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type TabLensState = 'idle' | 'pressing' | 'inflating' | 'dragging' | 'snapping' | 'settling';
|
|
2
|
+
export interface GestureDebugSnapshot {
|
|
3
|
+
phase: TabLensState;
|
|
4
|
+
holdCandidate: boolean;
|
|
5
|
+
holdActivated: boolean;
|
|
6
|
+
dragging: boolean;
|
|
7
|
+
snapStarted: boolean;
|
|
8
|
+
gestureCount: number;
|
|
9
|
+
origin: number;
|
|
10
|
+
hovered: number;
|
|
11
|
+
pending: number;
|
|
12
|
+
touchCount: number;
|
|
13
|
+
}
|
|
14
|
+
export declare function logGlassTabGesture(event: string, detail?: string): void;
|
|
15
|
+
export declare function emitTargetHaptic(_index: number): void;
|