@glass-sdk/liquid-glass 0.0.2 → 0.0.3-beta.1
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/CHANGELOG.md +124 -0
- package/README.md +66 -149
- package/dist/core/concentric.js +20 -3
- package/dist/core/corner-options.js +12 -0
- package/dist/core/corner-path.js +118 -0
- package/dist/core/materials.js +264 -32
- package/dist/core/optics.js +1 -2
- package/dist/core/progressive.js +1 -2
- package/dist/core/shape.js +18 -28
- package/dist/core/spring.js +5 -10
- package/dist/core.js +5 -6
- package/dist/dom/backdrop-glass.js +46 -0
- package/dist/dom/compose-layers.js +42 -31
- package/dist/dom/composited.js +136 -0
- package/dist/dom/control-motion.js +58 -47
- package/dist/dom/engine.js +1 -2
- package/dist/dom/escaped-layers.js +179 -0
- package/dist/dom/filter-bounds.js +42 -13
- package/dist/dom/filter-budget.js +1 -2
- package/dist/dom/filter-chain.js +40 -0
- package/dist/dom/filter-groups.js +33 -14
- package/dist/dom/filter-paint-root.js +8 -6
- package/dist/dom/filter-patch.js +94 -55
- package/dist/dom/filter-reach.js +32 -19
- package/dist/dom/filter-stages.js +1 -2
- package/dist/dom/fixed-shape.js +23 -16
- package/dist/dom/foreground.js +16 -17
- package/dist/dom/interaction.js +65 -92
- package/dist/dom/layout-rect.js +42 -0
- package/dist/dom/layout-size.js +28 -0
- package/dist/dom/lens-layers.js +250 -136
- package/dist/dom/map-encoder.js +16 -13
- package/dist/dom/map-encoder.worker.js +2 -3
- package/dist/dom/map-encoding.js +49 -12
- package/dist/dom/map-image.js +29 -7
- package/dist/dom/map-store.js +1 -2
- package/dist/dom/maps.js +133 -83
- package/dist/dom/material-graph.js +108 -29
- package/dist/dom/media-mirror.js +244 -0
- package/dist/dom/page-zoom.js +19 -18
- package/dist/dom/png.js +1 -2
- package/dist/dom/progressive.js +152 -147
- package/dist/dom/renderer.js +1 -2
- package/dist/dom/sampling-bounds.js +1 -2
- package/dist/dom/selection.js +133 -79
- package/dist/dom/shape-attributes.js +9 -0
- package/dist/dom/shape-effects.js +14 -0
- package/dist/dom/shape-geometry.js +3 -0
- package/dist/dom/shape-layout.js +115 -116
- package/dist/dom/shared-backdrop.js +33 -25
- package/dist/dom/specular.js +116 -0
- package/dist/dom/ticker.js +28 -19
- package/dist/dom/tint-color.js +24 -0
- package/dist/dom/warm.js +63 -59
- package/dist/dom.js +591 -505
- package/dist/gpu/geometry.js +2 -3
- package/dist/gpu/maps.js +1109 -7
- package/dist/gpu/planes.js +2 -3
- package/dist/gpu.js +66 -64
- package/dist/index.js +12 -10
- package/dist/react/button.js +12 -11
- package/dist/react/color-picker.js +199 -0
- package/dist/react/control-thumb.js +4 -5
- package/dist/react/menu.js +82 -111
- package/dist/react/merged-ref.js +1 -2
- package/dist/react/progressive.js +1 -2
- package/dist/react/scene.js +71 -55
- package/dist/react/shape.js +67 -47
- package/dist/react/slider.js +81 -0
- package/dist/react/surface.js +90 -56
- package/dist/react/switch.js +101 -0
- package/dist/react/tabs.js +85 -63
- package/dist/react/toolbar.js +38 -123
- package/dist/react/value-control-motion.js +1 -2
- package/dist/styles.css +517 -111
- package/dist/types/core/concentric.d.ts +8 -0
- package/dist/types/core/corner-options.d.ts +4 -0
- package/dist/types/core/corner-path.d.ts +8 -0
- package/dist/types/core/index.d.ts +3 -5
- package/dist/types/core/materials.d.ts +100 -28
- package/dist/types/core/shape.d.ts +4 -6
- package/dist/types/core/spring.d.ts +8 -12
- package/dist/types/dom/backdrop-glass.d.ts +38 -0
- package/dist/types/dom/compose-layers.d.ts +4 -0
- package/dist/types/dom/composited.d.ts +61 -0
- package/dist/types/dom/escaped-layers.d.ts +32 -0
- package/dist/types/dom/filter-bounds.d.ts +4 -0
- package/dist/types/dom/filter-chain.d.ts +6 -0
- package/dist/types/dom/filter-groups.d.ts +1 -1
- package/dist/types/dom/filter-paint-root.d.ts +3 -0
- package/dist/types/dom/filter-patch.d.ts +5 -0
- package/dist/types/dom/filter-reach.d.ts +9 -9
- package/dist/types/dom/foreground.d.ts +2 -1
- package/dist/types/dom/index.d.ts +8 -19
- package/dist/types/dom/interaction.d.ts +8 -8
- package/dist/types/dom/layout-rect.d.ts +17 -0
- package/dist/types/dom/layout-size.d.ts +11 -0
- package/dist/types/dom/lens-layers.d.ts +18 -10
- package/dist/types/dom/map-encoder.d.ts +5 -2
- package/dist/types/dom/map-encoding.d.ts +12 -3
- package/dist/types/dom/map-image.d.ts +7 -1
- package/dist/types/dom/maps.d.ts +25 -7
- package/dist/types/dom/material-graph.d.ts +73 -10
- package/dist/types/dom/media-mirror.d.ts +49 -0
- package/dist/types/dom/progressive.d.ts +2 -5
- package/dist/types/dom/sampling-bounds.d.ts +1 -3
- package/dist/types/dom/selection.d.ts +29 -4
- package/dist/types/dom/shape-attributes.d.ts +6 -0
- package/dist/types/dom/shape-effects.d.ts +10 -0
- package/dist/types/dom/shape-geometry.d.ts +6 -0
- package/dist/types/dom/shape-layout.d.ts +2 -4
- package/dist/types/dom/shared-backdrop.d.ts +7 -3
- package/dist/types/dom/specular.d.ts +50 -0
- package/dist/types/dom/ticker.d.ts +4 -1
- package/dist/types/dom/tint-color.d.ts +11 -0
- package/dist/types/dom/warm.d.ts +8 -2
- package/dist/types/gpu/geometry.d.ts +2 -0
- package/dist/types/gpu/planes.d.ts +3 -2
- package/dist/types/index.d.ts +1 -1
- package/dist/types/react/button.d.ts +1 -1
- package/dist/types/react/color-picker.d.ts +26 -0
- package/dist/types/react/index.d.ts +14 -10
- package/dist/types/react/menu.d.ts +4 -5
- package/dist/types/react/progressive.d.ts +1 -1
- package/dist/types/react/scene.d.ts +4 -2
- package/dist/types/react/shape.d.ts +11 -1
- package/dist/types/react/slider.d.ts +14 -0
- package/dist/types/react/surface.d.ts +11 -22
- package/dist/types/react/switch.d.ts +9 -0
- package/dist/types/react/tabs.d.ts +3 -3
- package/dist/types/react/toolbar.d.ts +1 -1
- package/package.json +46 -40
- package/dist/core/morph-path.js +0 -206
- package/dist/core/union.js +0 -117
- package/dist/dom/compound-field.js +0 -23
- package/dist/dom/exit-handoff.js +0 -14
- package/dist/dom/map-blend.js +0 -8
- package/dist/dom/morph.js +0 -296
- package/dist/react/value-controls.js +0 -176
- package/dist/types/core/morph-path.d.ts +0 -110
- package/dist/types/core/union.d.ts +0 -20
- package/dist/types/dom/compound-field.d.ts +0 -35
- package/dist/types/dom/exit-handoff.d.ts +0 -7
- package/dist/types/dom/map-blend.d.ts +0 -22
- package/dist/types/dom/morph.d.ts +0 -78
- package/dist/types/react/value-controls.d.ts +0 -20
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import type { ShapePoint } from "./concentric.js";
|
|
2
|
-
import type { GlassRadius } from "./shape.js";
|
|
3
|
-
/** A box in any shared coordinate space. */
|
|
4
|
-
export interface Box {
|
|
5
|
-
left: number;
|
|
6
|
-
top: number;
|
|
7
|
-
width: number;
|
|
8
|
-
height: number;
|
|
9
|
-
}
|
|
10
|
-
/** A rounded box: the outline of glass in motion. */
|
|
11
|
-
export interface MorphShape extends Box {
|
|
12
|
-
radius: number;
|
|
13
|
-
}
|
|
14
|
-
/** A shape whose maps can be prepared: dimensions, corners, and an optional
|
|
15
|
-
* traced outline in the shape's own box. */
|
|
16
|
-
export interface MorphGeometry {
|
|
17
|
-
width: number;
|
|
18
|
-
height: number;
|
|
19
|
-
radius: GlassRadius;
|
|
20
|
-
outline?: ShapePoint[];
|
|
21
|
-
/** Map density. Resting shapes match their surface exactly; shapes passed
|
|
22
|
-
* through in motion use one pixel per CSS pixel. */
|
|
23
|
-
dpr?: number;
|
|
24
|
-
/** A resting shape, whose maps are worth keeping across loads. */
|
|
25
|
-
resting?: boolean;
|
|
26
|
-
}
|
|
27
|
-
export declare const mix: (a: number, b: number, t: number) => number;
|
|
28
|
-
export declare function smoothstep(edge0: number, edge1: number, x: number): number;
|
|
29
|
-
/** Pixel radius of a declared glass shape at a given size. */
|
|
30
|
-
export declare function radiusPixels(radius: GlassRadius | string | null | undefined, width: number, height: number): number;
|
|
31
|
-
/** How far apart two shapes are: relative size, then corners. */
|
|
32
|
-
export declare function shapeDistance(a: {
|
|
33
|
-
width: number;
|
|
34
|
-
height: number;
|
|
35
|
-
radius: GlassRadius;
|
|
36
|
-
}, b: {
|
|
37
|
-
width: number;
|
|
38
|
-
height: number;
|
|
39
|
-
radius: GlassRadius;
|
|
40
|
-
}): number;
|
|
41
|
-
/** Gap between two boxes, or zero when they overlap. */
|
|
42
|
-
export declare const boxGap: (a: Box, b: Box) => number;
|
|
43
|
-
/** Where glass grows from and where it grows to. */
|
|
44
|
-
export interface MorphEndpoints {
|
|
45
|
-
from: Box;
|
|
46
|
-
fromRadius: GlassRadius;
|
|
47
|
-
to: Box;
|
|
48
|
-
toRadius: GlassRadius;
|
|
49
|
-
/** The axis the surface opens along leads the growth; the other follows.
|
|
50
|
-
* Undefined: both axes move together, as for a layout change. */
|
|
51
|
-
along?: "x" | "y";
|
|
52
|
-
}
|
|
53
|
-
/** The axis along which `to` lies beyond `from`: the direction a popup opens. */
|
|
54
|
-
export declare function openingAxis(from: Box, to: Box): "x" | "y";
|
|
55
|
-
/** The outline at progress `p` along the path: it leaves its source with
|
|
56
|
-
* fully rounded, drop-like corners, stretches along the opening axis before
|
|
57
|
-
* it widens, and only takes its final corners once it has nearly arrived. */
|
|
58
|
-
export declare function morphShape(e: MorphEndpoints, p: number): MorphShape;
|
|
59
|
-
/** Visibility of a popup's content: it appears once the glass has room. */
|
|
60
|
-
export declare const contentReveal: (p: number) => number;
|
|
61
|
-
/** How far the source's own content has withdrawn into the glass that left it. */
|
|
62
|
-
export declare const sourceConceal: (p: number) => number;
|
|
63
|
-
/** How far apart a drop and its glass can be and still flow together; the
|
|
64
|
-
* neck thins as the drop reaches its place, so it pinches off and rests as
|
|
65
|
-
* its own shape even right beside its source. */
|
|
66
|
-
export declare const neckWidth: (p: number, neck: number) => number;
|
|
67
|
-
/** One prepared shape on the path. */
|
|
68
|
-
export interface MorphStop {
|
|
69
|
-
p: number;
|
|
70
|
-
shape: MorphGeometry;
|
|
71
|
-
/** Drawn in this box rather than stretched to the live outline: a traced
|
|
72
|
-
* union, or the glass a drop is still inside. */
|
|
73
|
-
box?: Box;
|
|
74
|
-
/** Draws the source glass as part of itself. */
|
|
75
|
-
absorbs: boolean;
|
|
76
|
-
}
|
|
77
|
-
export interface MorphPlanOptions {
|
|
78
|
-
/** Shapes prepared between the endpoints. */
|
|
79
|
-
stops?: number;
|
|
80
|
-
/** Union samples while a drop is joined to its glass. */
|
|
81
|
-
unions?: number;
|
|
82
|
-
/** Neck reach in pixels. */
|
|
83
|
-
neck?: number;
|
|
84
|
-
/** Map density of the shapes in motion. */
|
|
85
|
-
dpr?: number;
|
|
86
|
-
/** Map density of the resting endpoints. */
|
|
87
|
-
restDpr?: number;
|
|
88
|
-
}
|
|
89
|
-
/** The glass a drop detaches from. `width` and `height` are its layout size
|
|
90
|
-
* and `radius` its declared corners, so its stop matches its own resting map. */
|
|
91
|
-
export interface MorphGlass extends Box {
|
|
92
|
-
radius: GlassRadius;
|
|
93
|
-
layoutWidth: number;
|
|
94
|
-
layoutHeight: number;
|
|
95
|
-
}
|
|
96
|
-
/** Plan the shapes an animation passes through, so their maps can be
|
|
97
|
-
* prepared together before it starts. Stops are spaced evenly by how much
|
|
98
|
-
* the shape changes between them; the endpoints are exact. A drop leaving
|
|
99
|
-
* glass adds the traced unions of the two while they are joined, beginning
|
|
100
|
-
* with the glass's own shape while the drop is still inside it. */
|
|
101
|
-
export declare function planMorph(e: MorphEndpoints, glass: MorphGlass | undefined, options?: MorphPlanOptions): MorphStop[];
|
|
102
|
-
/** What to draw at progress `p`: the two stops around it and their blend,
|
|
103
|
-
* plus how much of the source glass the frame draws in its place. */
|
|
104
|
-
export interface MorphDraw {
|
|
105
|
-
a: MorphStop;
|
|
106
|
-
b?: MorphStop;
|
|
107
|
-
mix: number;
|
|
108
|
-
absorb: number;
|
|
109
|
-
}
|
|
110
|
-
export declare function morphDraw(stops: readonly MorphStop[], p: number): MorphDraw | undefined;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { ShapePoint } from "./concentric.js";
|
|
2
|
-
/** An axis-aligned rounded rectangle in any shared coordinate space. */
|
|
3
|
-
export interface RoundRect {
|
|
4
|
-
x: number;
|
|
5
|
-
y: number;
|
|
6
|
-
width: number;
|
|
7
|
-
height: number;
|
|
8
|
-
radius: number;
|
|
9
|
-
}
|
|
10
|
-
/** Signed distance to a rounded rectangle: negative inside. */
|
|
11
|
-
export declare function roundRectDistance(px: number, py: number, r: RoundRect): number;
|
|
12
|
-
/** Polynomial smooth minimum: shapes closer than `k` flow into each other. */
|
|
13
|
-
export declare function smoothMin(a: number, b: number, k: number): number;
|
|
14
|
-
/** Twice the signed area; positive for the clockwise-on-screen winding the
|
|
15
|
-
* renderer expects (top edge left to right, with y pointing down). */
|
|
16
|
-
export declare function windingArea(points: readonly ShapePoint[]): number;
|
|
17
|
-
/** Outlines of the smooth union of rounded rectangles, traced with marching
|
|
18
|
-
* squares at `step` pixels. Returns one loop per connected body, wound the way
|
|
19
|
-
* the renderer expects and simplified to at most `limit` edges each. */
|
|
20
|
-
export declare function smoothUnion(shapes: readonly RoundRect[], k: number, step?: number, limit?: number): ShapePoint[][];
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import type { MaterialOptions } from "../core/materials.js";
|
|
2
|
-
import type { FilterBounds } from "./filter-bounds.js";
|
|
3
|
-
import type { MapPlane } from "./map-image.js";
|
|
4
|
-
interface FieldSurface {
|
|
5
|
-
element: Element;
|
|
6
|
-
options: MaterialOptions;
|
|
7
|
-
maps?: unknown;
|
|
8
|
-
x: number;
|
|
9
|
-
y: number;
|
|
10
|
-
w: number;
|
|
11
|
-
h: number;
|
|
12
|
-
opacity: number;
|
|
13
|
-
baseOpacity?: number;
|
|
14
|
-
}
|
|
15
|
-
interface FieldContext<T> {
|
|
16
|
-
source(surface: T): Element | undefined;
|
|
17
|
-
nested(surface: T): boolean;
|
|
18
|
-
refraction(surface: T): number;
|
|
19
|
-
reach(surface: T): number;
|
|
20
|
-
}
|
|
21
|
-
export declare const fieldTouches: (a: Pick<FieldSurface, "x" | "y" | "w" | "h">, b: Pick<FieldSurface, "x" | "y" | "w" | "h">, reach?: number) => boolean;
|
|
22
|
-
/** A detached popup and its source can share one optical field when they
|
|
23
|
-
* have the same opaque material. Moving the source to the popup's paint
|
|
24
|
-
* position must not change any intervening surface's sampled backdrop. */
|
|
25
|
-
export declare function compoundSources<T extends FieldSurface>(ordered: readonly T[], context: FieldContext<T>): Map<T, T>;
|
|
26
|
-
interface FieldMember {
|
|
27
|
-
serial: number;
|
|
28
|
-
opacity: number;
|
|
29
|
-
baseOpacity?: number;
|
|
30
|
-
}
|
|
31
|
-
/** Draw one plane of a compound field: the source's glass, faded as the
|
|
32
|
-
* popup absorbs it, under the popup's. A field's alpha is its coverage, so
|
|
33
|
-
* fading and merging fields also merges the shapes the material fills. */
|
|
34
|
-
export declare function compoundFieldImage<T extends FieldMember>(source: T, popup: T, plane: MapPlane, result: string, box: FilterBounds, image: (member: T, plane: MapPlane, result: string) => string): string;
|
|
35
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/** Once a replacement starts entering, its sibling no longer owns the
|
|
2
|
-
* submenu slot. Finish the old return before painting the new glass. */
|
|
3
|
-
export declare function finishRetainedExit(parent: Element): void;
|
|
4
|
-
/** A submenu's newest outgoing sibling keeps its return animation. Older
|
|
5
|
-
* exits have already been superseded: finish them before another panel
|
|
6
|
-
* starts returning, rather than accumulating overlapping optical layers. */
|
|
7
|
-
export declare function retainLatestExit(parent: Element, complete: () => void): () => void;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { MapPlane } from "./map-image.js";
|
|
2
|
-
import type { MaterialMaps } from "./maps.js";
|
|
3
|
-
export interface PlacedMap {
|
|
4
|
-
maps: MaterialMaps;
|
|
5
|
-
x: number;
|
|
6
|
-
y: number;
|
|
7
|
-
w: number;
|
|
8
|
-
h: number;
|
|
9
|
-
}
|
|
10
|
-
/** Emit an animation's material map, retaining both inputs unless they name
|
|
11
|
-
* the same pixels at the same position. This cuts redundant Gecko filter
|
|
12
|
-
* operations during map preparation and at the end of a spring. */
|
|
13
|
-
export declare function blendMapImage(plane: MapPlane, result: string, placement: {
|
|
14
|
-
a: PlacedMap;
|
|
15
|
-
b: PlacedMap;
|
|
16
|
-
mix: number;
|
|
17
|
-
}, bounds: {
|
|
18
|
-
x: number;
|
|
19
|
-
y: number;
|
|
20
|
-
w: number;
|
|
21
|
-
h: number;
|
|
22
|
-
}, collapseIdentical?: boolean): string;
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import type { GlassRadius } from "../core/shape.js";
|
|
2
|
-
import type { Box, MorphGeometry } from "../core/morph-path.js";
|
|
3
|
-
import type { GlassMotion, SurfaceAnimator } from "./interaction.js";
|
|
4
|
-
export { radiusPixels } from "../core/morph-path.js";
|
|
5
|
-
/** A shape an animation passes through, for its maps to be prepared ahead. */
|
|
6
|
-
export type LensWaypoint = MorphGeometry;
|
|
7
|
-
/** A prepared shape drawn in a box: stretched to the live outline, or fixed
|
|
8
|
-
* where a traced union or an absorbed glass lies. */
|
|
9
|
-
export interface LensPlacement extends Box {
|
|
10
|
-
shape: LensWaypoint;
|
|
11
|
-
}
|
|
12
|
-
/** One frame of an animated outline. */
|
|
13
|
-
export interface LensFrame extends Box {
|
|
14
|
-
/** Pixels, or a capsule whose ends stay exact at every width. */
|
|
15
|
-
radius: number | "capsule";
|
|
16
|
-
/** The material to draw: the two prepared shapes around this frame,
|
|
17
|
-
* blended by `mix`. Absent while nothing should be drawn yet. */
|
|
18
|
-
draw?: {
|
|
19
|
-
a: LensPlacement;
|
|
20
|
-
b?: LensPlacement;
|
|
21
|
-
mix: number;
|
|
22
|
-
};
|
|
23
|
-
/** Glass this frame draws in its place, and how much of it. */
|
|
24
|
-
absorbs?: {
|
|
25
|
-
element: Element;
|
|
26
|
-
weight: number;
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
export interface GeometryAnimator extends SurfaceAnimator {
|
|
30
|
-
/** The animated outline, or undefined when the surface rests at its layout box. */
|
|
31
|
-
geometry(): LensFrame | undefined;
|
|
32
|
-
/** Source of a joined detachment, retained while the popup rests open. */
|
|
33
|
-
detachedSource(): Element | undefined;
|
|
34
|
-
/** Shapes along the current animation's path. A new array starts a new path. */
|
|
35
|
-
waypoints(): readonly LensWaypoint[];
|
|
36
|
-
/** Material opacity while materializing or leaving a non-glass source. */
|
|
37
|
-
opacity(): number;
|
|
38
|
-
/** Waiting for the maps of its path before moving. */
|
|
39
|
-
pending(): boolean;
|
|
40
|
-
/** Initial popup placement has not settled enough to request its maps. */
|
|
41
|
-
positioning(): boolean;
|
|
42
|
-
}
|
|
43
|
-
/** How a surface relates to the glass it grows out of. */
|
|
44
|
-
export type GlassMorph = "become" | "detach";
|
|
45
|
-
export interface GeometryMotionOptions {
|
|
46
|
-
/** Grow out of this element on entry and shrink back into it on exit. */
|
|
47
|
-
from?: () => Element | null | undefined;
|
|
48
|
-
/** `become`: the source's glass is this surface, and withdraws its own
|
|
49
|
-
* content while the surface is present. `detach`: this surface leaves the
|
|
50
|
-
* source's glass as a drop, joined by a liquid neck until they part.
|
|
51
|
-
* Default: a glass source is become; a source inside glass is detached from. */
|
|
52
|
-
morph?: GlassMorph;
|
|
53
|
-
/** Spring between layout boxes when the surface moves or resizes within its parent. */
|
|
54
|
-
layout?: boolean;
|
|
55
|
-
radius: GlassRadius;
|
|
56
|
-
motion: () => GlassMotion;
|
|
57
|
-
/** Whether a shape's maps are ready to draw. An entrance waits briefly for its path. */
|
|
58
|
-
prepared?: (shape: LensWaypoint) => boolean;
|
|
59
|
-
/** How far a detaching drop stays joined to its glass by a liquid neck, in
|
|
60
|
-
* pixels. `0` lets it grow as a plain shape, with no union to trace. */
|
|
61
|
-
neck?: number;
|
|
62
|
-
/** Grow out of the source when attached. `false` only runs the exit back
|
|
63
|
-
* into it, for an element that was already in place. Default: true. */
|
|
64
|
-
enter?: boolean;
|
|
65
|
-
/** Submenus fade in place and share the previous sibling's outline. */
|
|
66
|
-
submenu?: boolean;
|
|
67
|
-
}
|
|
68
|
-
/** Keep the current panel while Base UI waits to open a hovered sibling. */
|
|
69
|
-
export declare function prepareSubmenuHandoff(trigger: HTMLElement): () => void;
|
|
70
|
-
/** Animate a surface's optical outline independently of its layout box.
|
|
71
|
-
* Entry grows the glass out of a source shape along a planned path; Base UI
|
|
72
|
-
* `data-ending-style` runs the same path back before the popup unmounts, so
|
|
73
|
-
* an exit needs no new maps. Each frame names the two prepared shapes around
|
|
74
|
-
* it, which the scene blends, so the material never jumps between maps.
|
|
75
|
-
* Layout changes spring along a path from the previous outline. Content is
|
|
76
|
-
* clipped by the outline, so the glass opens to reveal it rather than
|
|
77
|
-
* scaling it. */
|
|
78
|
-
export declare function attachGeometryMotion(element: HTMLElement, options: GeometryMotionOptions): GeometryAnimator;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { ComponentPropsWithRef, CSSProperties } from "react";
|
|
2
|
-
import { Slider } from "@base-ui/react/slider";
|
|
3
|
-
import { Switch } from "@base-ui/react/switch";
|
|
4
|
-
import type { ControlMotionOptions } from "../dom/control-motion.js";
|
|
5
|
-
import type { MaterialOptions } from "../core/materials.js";
|
|
6
|
-
export interface GlassSliderProps extends Omit<Slider.Root.Props<number>, "className" | "style" | "children" | "disabled">, MaterialOptions, ControlMotionOptions {
|
|
7
|
-
className?: string;
|
|
8
|
-
style?: CSSProperties;
|
|
9
|
-
/** Visible marks at each step. Limited to 101 marks. */
|
|
10
|
-
ticks?: boolean;
|
|
11
|
-
/** Props and accessible name forwarded to the slider input. */
|
|
12
|
-
thumbProps?: Omit<ComponentPropsWithRef<typeof Slider.Thumb>, "render" | "children" | "disabled">;
|
|
13
|
-
}
|
|
14
|
-
/** Single-value slider; use a small numeric step for continuous pointer travel. */
|
|
15
|
-
export declare function GlassSlider({ material, appearance, tint, refraction, radius, motion, interactive, className, style, ticks, min, max, step, thumbProps, "aria-label": ariaLabel, "aria-labelledby": labelledBy, ...props }: GlassSliderProps): import("react").JSX.Element;
|
|
16
|
-
export interface GlassSwitchProps extends Omit<ComponentPropsWithRef<typeof Switch.Root>, "className" | "style" | "children" | "render" | "nativeButton" | "disabled">, MaterialOptions, ControlMotionOptions {
|
|
17
|
-
className?: string;
|
|
18
|
-
style?: CSSProperties;
|
|
19
|
-
}
|
|
20
|
-
export declare function GlassSwitch({ material, appearance, tint, refraction, radius, motion, interactive, className, style, ...props }: GlassSwitchProps): import("react").JSX.Element;
|