glacia-native 0.3.4 → 0.4.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/lib/module/Button.js +15 -2
- package/lib/module/Card.js +29 -14
- package/lib/module/Dialog.js +43 -32
- package/lib/module/Form.js +51 -12
- package/lib/module/Glass.js +11 -2
- package/lib/module/Input.js +19 -7
- package/lib/module/SegmentedControl.js +65 -21
- package/lib/module/Slider.js +121 -25
- package/lib/module/Switch.js +33 -15
- package/lib/module/TabBar.js +63 -25
- package/lib/module/Table.js +24 -6
- package/lib/module/Tabs.js +55 -33
- package/lib/module/ai.js +49 -20
- package/lib/module/charts/BarChart.js +4 -2
- package/lib/module/charts/FunnelChart.js +4 -2
- package/lib/module/charts/HeatmapChart.js +4 -2
- package/lib/module/charts/LineChart.js +4 -2
- package/lib/module/charts/PlotChart.js +11 -3
- package/lib/module/charts/RadarChart.js +4 -2
- package/lib/module/charts/RingChart.js +4 -2
- package/lib/module/charts/ScatterChart.js +20 -3
- package/lib/module/charts/WaterfallChart.js +12 -3
- package/lib/module/charts/advanced.js +12 -6
- package/lib/module/charts/extra.js +6 -3
- package/lib/module/internal/GlassView.js +17 -19
- package/lib/module/internal/fallback.js +14 -3
- package/lib/module/internal/glass-routing.js +56 -0
- package/lib/module/internal/motion.js +55 -0
- package/lib/module/internal/primitives.js +408 -0
- package/lib/typescript/Button.d.ts +11 -1
- package/lib/typescript/Card.d.ts +20 -8
- package/lib/typescript/Dialog.d.ts +19 -6
- package/lib/typescript/Form.d.ts +27 -11
- package/lib/typescript/Glass.d.ts +9 -0
- package/lib/typescript/Input.d.ts +11 -1
- package/lib/typescript/SegmentedControl.d.ts +11 -1
- package/lib/typescript/Slider.d.ts +13 -1
- package/lib/typescript/Switch.d.ts +12 -1
- package/lib/typescript/TabBar.d.ts +13 -1
- package/lib/typescript/Table.d.ts +14 -5
- package/lib/typescript/Tabs.d.ts +8 -5
- package/lib/typescript/ai.d.ts +12 -9
- package/lib/typescript/charts/BarChart.d.ts +1 -1
- package/lib/typescript/charts/FunnelChart.d.ts +1 -1
- package/lib/typescript/charts/HeatmapChart.d.ts +1 -1
- package/lib/typescript/charts/LineChart.d.ts +1 -1
- package/lib/typescript/charts/PlotChart.d.ts +1 -1
- package/lib/typescript/charts/RadarChart.d.ts +1 -1
- package/lib/typescript/charts/RingChart.d.ts +1 -1
- package/lib/typescript/charts/ScatterChart.d.ts +1 -1
- package/lib/typescript/charts/WaterfallChart.d.ts +1 -1
- package/lib/typescript/charts/advanced.d.ts +5 -5
- package/lib/typescript/charts/extra.d.ts +2 -2
- package/lib/typescript/internal/GlassView.d.ts +11 -3
- package/lib/typescript/internal/fallback.d.ts +10 -1
- package/lib/typescript/internal/glass-routing.d.ts +30 -0
- package/lib/typescript/internal/motion.d.ts +19 -0
- package/lib/typescript/internal/primitives.d.ts +41 -0
- package/package.json +2 -2
- package/src/Button.tsx +47 -22
- package/src/Card.tsx +52 -31
- package/src/Dialog.tsx +99 -64
- package/src/Form.tsx +90 -25
- package/src/Glass.tsx +24 -1
- package/src/Input.tsx +33 -12
- package/src/SegmentedControl.tsx +104 -32
- package/src/Slider.tsx +151 -47
- package/src/Switch.tsx +56 -32
- package/src/TabBar.tsx +100 -30
- package/src/Table.tsx +38 -14
- package/src/Tabs.tsx +85 -32
- package/src/ai.tsx +77 -31
- package/src/charts/BarChart.tsx +4 -2
- package/src/charts/FunnelChart.tsx +4 -2
- package/src/charts/HeatmapChart.tsx +4 -2
- package/src/charts/LineChart.tsx +4 -2
- package/src/charts/PlotChart.tsx +23 -3
- package/src/charts/RadarChart.tsx +4 -2
- package/src/charts/RingChart.tsx +4 -2
- package/src/charts/ScatterChart.tsx +24 -3
- package/src/charts/WaterfallChart.tsx +21 -3
- package/src/charts/advanced.tsx +12 -6
- package/src/charts/extra.tsx +6 -3
- package/src/internal/GlassView.tsx +31 -21
- package/src/internal/fallback.tsx +23 -8
- package/src/internal/glass-routing.ts +68 -0
- package/src/internal/motion.ts +60 -0
- package/src/internal/primitives.ts +477 -0
- package/lib/module/charts/primitives.js +0 -212
- package/lib/typescript/charts/primitives.d.ts +0 -23
- package/src/charts/primitives.ts +0 -262
package/lib/typescript/Form.d.ts
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
+
import type { StyleProp, TextStyle, ViewStyle } from "react-native";
|
|
2
3
|
export interface LabelProps {
|
|
3
4
|
children?: ReactNode;
|
|
4
5
|
/** Marks the field required with a visible asterisk. */
|
|
5
6
|
required?: boolean;
|
|
6
7
|
disabled?: boolean;
|
|
7
|
-
/**
|
|
8
|
-
|
|
8
|
+
/**
|
|
9
|
+
* The id of the control this label describes. Same meaning and prop name as
|
|
10
|
+
* React Native's `nativeID`.
|
|
11
|
+
*/
|
|
12
|
+
nativeID?: string;
|
|
9
13
|
isDark?: boolean;
|
|
10
|
-
style?:
|
|
14
|
+
style?: StyleProp<TextStyle>;
|
|
11
15
|
}
|
|
12
16
|
/** The text above a control. */
|
|
13
17
|
export declare const Label: import("react").ForwardRefExoticComponent<LabelProps & import("react").RefAttributes<any>>;
|
|
@@ -21,25 +25,29 @@ export interface FieldProps {
|
|
|
21
25
|
disabled?: boolean;
|
|
22
26
|
isDark?: boolean;
|
|
23
27
|
children?: ReactNode;
|
|
24
|
-
style?:
|
|
28
|
+
style?: StyleProp<ViewStyle>;
|
|
25
29
|
}
|
|
26
30
|
/**
|
|
27
31
|
* Label, control and message stacked in the order assistive tech announces
|
|
28
32
|
* them, so a caller never has to place these three by hand.
|
|
29
33
|
*/
|
|
30
|
-
export declare function Field({ label, description, error, required, disabled, isDark, children, style, }: FieldProps): import("react").JSX.Element;
|
|
34
|
+
export declare function Field({ label, description, error, required, disabled, isDark: isDarkProp, children, style, }: FieldProps): import("react").JSX.Element;
|
|
31
35
|
export interface CheckboxProps {
|
|
32
36
|
checked?: boolean;
|
|
37
|
+
/** Starting state for uncontrolled use. */
|
|
38
|
+
defaultChecked?: boolean;
|
|
33
39
|
onCheckedChange?: (checked: boolean) => void;
|
|
34
40
|
label?: string;
|
|
35
41
|
description?: string;
|
|
36
42
|
indeterminate?: boolean;
|
|
37
43
|
disabled?: boolean;
|
|
38
44
|
isDark?: boolean;
|
|
39
|
-
style?:
|
|
45
|
+
style?: StyleProp<ViewStyle>;
|
|
46
|
+
/** Passed through to the pressable row so it is testable. */
|
|
47
|
+
testID?: string;
|
|
40
48
|
}
|
|
41
49
|
/** A tick box for a single boolean, with an optional label and description. */
|
|
42
|
-
export declare function Checkbox({ checked, onCheckedChange, label, description, indeterminate, disabled, isDark, style, }: CheckboxProps): import("react").JSX.Element;
|
|
50
|
+
export declare function Checkbox({ checked: checkedProp, defaultChecked, onCheckedChange, label, description, indeterminate, disabled, isDark: isDarkProp, style, testID, }: CheckboxProps): import("react").JSX.Element;
|
|
43
51
|
export interface RadioOption {
|
|
44
52
|
value: string;
|
|
45
53
|
label: string;
|
|
@@ -48,28 +56,36 @@ export interface RadioOption {
|
|
|
48
56
|
}
|
|
49
57
|
export interface RadioGroupProps {
|
|
50
58
|
value?: string;
|
|
59
|
+
/** Starting selection for uncontrolled use. */
|
|
60
|
+
defaultValue?: string;
|
|
51
61
|
onValueChange?: (value: string) => void;
|
|
52
62
|
options: RadioOption[];
|
|
53
63
|
/** Lay the options out in a row instead of a column. */
|
|
54
64
|
horizontal?: boolean;
|
|
55
65
|
disabled?: boolean;
|
|
56
66
|
isDark?: boolean;
|
|
57
|
-
style?:
|
|
67
|
+
style?: StyleProp<ViewStyle>;
|
|
68
|
+
/** Passed through to the group so it is testable. */
|
|
69
|
+
testID?: string;
|
|
58
70
|
}
|
|
59
71
|
/** One choice from a small, always-visible set. */
|
|
60
|
-
export declare function RadioGroup({ value, onValueChange, options, horizontal, disabled, isDark, style, }: RadioGroupProps): import("react").JSX.Element;
|
|
72
|
+
export declare function RadioGroup({ value: valueProp, defaultValue, onValueChange, options, horizontal, disabled, isDark: isDarkProp, style, testID, }: RadioGroupProps): import("react").JSX.Element;
|
|
61
73
|
export interface SelectOption {
|
|
62
74
|
value: string;
|
|
63
75
|
label: string;
|
|
64
76
|
}
|
|
65
77
|
export interface SelectProps {
|
|
66
78
|
value?: string;
|
|
79
|
+
/** Starting selection for uncontrolled use. */
|
|
80
|
+
defaultValue?: string;
|
|
67
81
|
onValueChange?: (value: string) => void;
|
|
68
82
|
options: SelectOption[];
|
|
69
83
|
placeholder?: string;
|
|
70
84
|
disabled?: boolean;
|
|
71
85
|
isDark?: boolean;
|
|
72
|
-
style?:
|
|
86
|
+
style?: StyleProp<ViewStyle>;
|
|
87
|
+
/** Passed through to the trigger so it is testable. */
|
|
88
|
+
testID?: string;
|
|
73
89
|
}
|
|
74
90
|
/**
|
|
75
91
|
* A dropdown of mutually exclusive options.
|
|
@@ -78,4 +94,4 @@ export interface SelectProps {
|
|
|
78
94
|
* list opens inline: predictable across platforms and reachable without a
|
|
79
95
|
* modal. A long list scrolls naturally with the page.
|
|
80
96
|
*/
|
|
81
|
-
export declare function Select({ value, onValueChange, options, placeholder, disabled, isDark, style, }: SelectProps): import("react").JSX.Element;
|
|
97
|
+
export declare function Select({ value: valueProp, defaultValue, onValueChange, options, placeholder, disabled, isDark: isDarkProp, style, testID, }: SelectProps): import("react").JSX.Element;
|
|
@@ -1,5 +1,14 @@
|
|
|
1
|
+
import type { StyleProp, ViewStyle } from "react-native";
|
|
1
2
|
import { type NativeGlassProps } from "./internal/GlassView";
|
|
2
3
|
export interface GlassProps extends NativeGlassProps {
|
|
3
4
|
testID?: string;
|
|
5
|
+
style?: StyleProp<ViewStyle>;
|
|
4
6
|
}
|
|
7
|
+
/**
|
|
8
|
+
* A glass surface.
|
|
9
|
+
*
|
|
10
|
+
* Routes through the package's single switch: Apple's real `UIGlassEffect` on
|
|
11
|
+
* iOS 26+, Glacia's translucent fallback of identical shape on older iOS and
|
|
12
|
+
* Android. `testID` is passed to whichever surface renders.
|
|
13
|
+
*/
|
|
5
14
|
export declare const Glass: import("react").ForwardRefExoticComponent<GlassProps & import("react").RefAttributes<any>>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
+
import type { StyleProp, ViewStyle } from "react-native";
|
|
2
3
|
export interface InputProps {
|
|
3
4
|
value?: string;
|
|
4
5
|
onChangeText?: (text: string) => void;
|
|
@@ -17,10 +18,14 @@ export interface InputProps {
|
|
|
17
18
|
accessibilityLabel?: string;
|
|
18
19
|
returnKeyType?: "done" | "next" | "go" | "search" | "send";
|
|
19
20
|
onSubmitEditing?: () => void;
|
|
21
|
+
/** Starting text for uncontrolled use, like React Native's `defaultValue`. */
|
|
22
|
+
defaultValue?: string;
|
|
20
23
|
prefix?: ReactNode;
|
|
21
24
|
suffix?: ReactNode;
|
|
22
25
|
isDark?: boolean;
|
|
23
|
-
style?:
|
|
26
|
+
style?: StyleProp<ViewStyle>;
|
|
27
|
+
/** Passed through to the text field so it is testable. */
|
|
28
|
+
testID?: string;
|
|
24
29
|
maxLength?: number;
|
|
25
30
|
editable?: boolean;
|
|
26
31
|
onFocus?: () => void;
|
|
@@ -32,6 +37,11 @@ export interface InputProps {
|
|
|
32
37
|
* The native TextInput has no placeholder styling prop, so the placeholder is
|
|
33
38
|
* drawn as a sibling Text: that keeps its colour tied to the theme instead of
|
|
34
39
|
* the OS default, which changes between iOS versions.
|
|
40
|
+
*
|
|
41
|
+
* The field works controlled (`value` + `onChangeText`) or uncontrolled (no
|
|
42
|
+
* `value` prop). In uncontrolled use it tracks its own text so the themed
|
|
43
|
+
* placeholder disappears as soon as the user types; without that state the
|
|
44
|
+
* overlay would sit on top of the typed text until the parent re-rendered.
|
|
35
45
|
*/
|
|
36
46
|
export declare const Input: import("react").ForwardRefExoticComponent<InputProps & import("react").RefAttributes<any>>;
|
|
37
47
|
export interface TextareaProps extends Omit<InputProps, "size" | "multiline" | "minLines"> {
|
|
@@ -1,9 +1,19 @@
|
|
|
1
|
+
import type { StyleProp, ViewStyle } from "react-native";
|
|
1
2
|
export interface SegmentedControlProps {
|
|
2
3
|
values: string[];
|
|
3
4
|
selectedIndex?: number;
|
|
4
5
|
defaultIndex?: number;
|
|
5
6
|
onValueChange?: (value: string, index: number) => void;
|
|
6
|
-
style?:
|
|
7
|
+
style?: StyleProp<ViewStyle>;
|
|
7
8
|
isDark?: boolean;
|
|
9
|
+
/** Passed through to the control so it is testable. */
|
|
10
|
+
testID?: string;
|
|
8
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* A row of mutually exclusive segments on one glass container.
|
|
14
|
+
*
|
|
15
|
+
* The selected segment is marked by a pill that slides on the springs token.
|
|
16
|
+
* The pill's colours come from the theme tokens, so it reads correctly in both
|
|
17
|
+
* light and dark instead of assuming a white-on-light palette.
|
|
18
|
+
*/
|
|
9
19
|
export declare const SegmentedControl: import("react").ForwardRefExoticComponent<SegmentedControlProps & import("react").RefAttributes<any>>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { StyleProp, ViewStyle } from "react-native";
|
|
1
2
|
export interface SliderProps {
|
|
2
3
|
value?: number;
|
|
3
4
|
defaultValue?: number;
|
|
@@ -7,7 +8,18 @@ export interface SliderProps {
|
|
|
7
8
|
onValueChange?: (value: number) => void;
|
|
8
9
|
disabled?: boolean;
|
|
9
10
|
accessibilityLabel: string;
|
|
10
|
-
style?:
|
|
11
|
+
style?: StyleProp<ViewStyle>;
|
|
11
12
|
isDark?: boolean;
|
|
13
|
+
/** Passed through to the draggable track so it is testable. */
|
|
14
|
+
testID?: string;
|
|
12
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* A continuous value chosen by dragging.
|
|
18
|
+
*
|
|
19
|
+
* The interaction is Glacia's own: the track and thumb are Views and dragging
|
|
20
|
+
* is a PanResponder reading the touch position against the track's measured
|
|
21
|
+
* width. React Native has no DOM `<input type="range">` and the platform
|
|
22
|
+
* sliders are not used, so the control looks and behaves the same on every
|
|
23
|
+
* platform; only the glass material changes.
|
|
24
|
+
*/
|
|
13
25
|
export declare const Slider: import("react").ForwardRefExoticComponent<SliderProps & import("react").RefAttributes<any>>;
|
|
@@ -1,10 +1,21 @@
|
|
|
1
|
+
import type { StyleProp, ViewStyle } from "react-native";
|
|
1
2
|
export interface SwitchProps {
|
|
2
3
|
checked?: boolean;
|
|
3
4
|
defaultChecked?: boolean;
|
|
4
5
|
onCheckedChange?: (checked: boolean) => void;
|
|
5
6
|
disabled?: boolean;
|
|
6
7
|
accessibilityLabel: string;
|
|
7
|
-
style?:
|
|
8
|
+
style?: StyleProp<ViewStyle>;
|
|
8
9
|
isDark?: boolean;
|
|
10
|
+
/** Passed through to the switch track so it is testable. */
|
|
11
|
+
testID?: string;
|
|
9
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* An on/off switch.
|
|
15
|
+
*
|
|
16
|
+
* The track is Glacia's glass; the thumb is one of our own Views, animated on
|
|
17
|
+
* the springs token. The material changes by platform (Apple's glass on
|
|
18
|
+
* iOS 26+, Glacia's tint elsewhere) but the control is always ours — React
|
|
19
|
+
* Native's built-in Switch is never used.
|
|
20
|
+
*/
|
|
10
21
|
export declare const Switch: import("react").ForwardRefExoticComponent<SwitchProps & import("react").RefAttributes<any>>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
+
import type { StyleProp, ViewStyle } from "react-native";
|
|
2
3
|
export interface TabBarItem {
|
|
3
4
|
id: string;
|
|
4
5
|
label: string;
|
|
@@ -9,7 +10,18 @@ export interface TabBarProps {
|
|
|
9
10
|
activeId?: string;
|
|
10
11
|
defaultActiveId?: string;
|
|
11
12
|
onTabChange?: (id: string) => void;
|
|
12
|
-
style?:
|
|
13
|
+
style?: StyleProp<ViewStyle>;
|
|
13
14
|
isDark?: boolean;
|
|
15
|
+
/** Passed through to the bar so it is testable. */
|
|
16
|
+
testID?: string;
|
|
14
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* The bottom bar of an app: a row of tabs on one glass surface.
|
|
20
|
+
*
|
|
21
|
+
* The platform rule is the point of this component. On iOS 26+ the surface is
|
|
22
|
+
* Apple's real Liquid Glass (`UIGlassEffect` via `@callstack/liquid-glass`)
|
|
23
|
+
* with Glacia's own items inside it; on older iOS and on Android it is
|
|
24
|
+
* Glacia's bar. The items are always our Pressables and Texts — no native tab
|
|
25
|
+
* bar is used on any platform.
|
|
26
|
+
*/
|
|
15
27
|
export declare const TabBar: import("react").ForwardRefExoticComponent<TabBarProps & import("react").RefAttributes<any>>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
|
+
import type { StyleProp, ViewStyle } from "react-native";
|
|
2
3
|
export interface NativeTableColumn {
|
|
3
4
|
key: string;
|
|
4
5
|
header: string;
|
|
@@ -12,17 +13,25 @@ export interface NativeTableColumn {
|
|
|
12
13
|
export interface NativeTableRow {
|
|
13
14
|
id: string;
|
|
14
15
|
cells: Record<string, ReactNode>;
|
|
16
|
+
/**
|
|
17
|
+
* What screen readers announce when the row is pressable. Use it when the
|
|
18
|
+
* cells hold elements rather than text; without it the primary cell is used
|
|
19
|
+
* only if it is a string or number.
|
|
20
|
+
*/
|
|
21
|
+
accessibilityLabel?: string;
|
|
15
22
|
}
|
|
16
23
|
export interface NativeTableProps {
|
|
17
24
|
columns: NativeTableColumn[];
|
|
18
25
|
rows: NativeTableRow[];
|
|
19
26
|
/** Tap handler for a whole row. */
|
|
20
27
|
onRowPress?: (row: NativeTableRow) => void;
|
|
21
|
-
/**
|
|
28
|
+
/** A caption describing the table's contents, shown above it. */
|
|
22
29
|
caption?: string;
|
|
23
30
|
isDark?: boolean;
|
|
24
|
-
style?:
|
|
31
|
+
style?: StyleProp<ViewStyle>;
|
|
25
32
|
emptyMessage?: string;
|
|
33
|
+
/** Passed through to the table root so it is testable. */
|
|
34
|
+
testID?: string;
|
|
26
35
|
}
|
|
27
36
|
/**
|
|
28
37
|
* Tabular data laid out for a phone.
|
|
@@ -32,7 +41,7 @@ export interface NativeTableProps {
|
|
|
32
41
|
* are laid out as labelled pairs beneath it, which keeps every value readable
|
|
33
42
|
* without horizontal scrolling.
|
|
34
43
|
*/
|
|
35
|
-
export declare function NativeTable({ columns, rows, onRowPress, caption, isDark, style, emptyMessage, }: NativeTableProps): import("react").JSX.Element;
|
|
44
|
+
export declare function NativeTable({ columns, rows, onRowPress, caption, isDark: isDarkProp, style, emptyMessage, testID, }: NativeTableProps): import("react").JSX.Element;
|
|
36
45
|
export interface NativeScrollAreaProps {
|
|
37
46
|
children?: ReactNode;
|
|
38
47
|
/** Fixed height. Without one the area grows with its content. */
|
|
@@ -41,7 +50,7 @@ export interface NativeScrollAreaProps {
|
|
|
41
50
|
bordered?: boolean;
|
|
42
51
|
horizontal?: boolean;
|
|
43
52
|
isDark?: boolean;
|
|
44
|
-
style?:
|
|
53
|
+
style?: StyleProp<ViewStyle>;
|
|
45
54
|
/** Announced to screen readers. */
|
|
46
55
|
accessibilityLabel?: string;
|
|
47
56
|
}
|
|
@@ -52,4 +61,4 @@ export interface NativeScrollAreaProps {
|
|
|
52
61
|
* scroll indicator is the one users already recognise, and it stays correct
|
|
53
62
|
* under momentum, bouncing and accessibility settings.
|
|
54
63
|
*/
|
|
55
|
-
export declare function NativeScrollArea({ children, maxHeight, bordered, horizontal, isDark, style, accessibilityLabel, }: NativeScrollAreaProps): import("react").JSX.Element;
|
|
64
|
+
export declare function NativeScrollArea({ children, maxHeight, bordered, horizontal, isDark: isDarkProp, style, accessibilityLabel, }: NativeScrollAreaProps): import("react").JSX.Element;
|
package/lib/typescript/Tabs.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
+
import type { StyleProp, ViewStyle } from "react-native";
|
|
2
3
|
export interface TabItem {
|
|
3
4
|
/** Stable identifier for the tab. */
|
|
4
5
|
id: string;
|
|
@@ -13,16 +14,18 @@ export interface TabsProps {
|
|
|
13
14
|
activeId?: string;
|
|
14
15
|
defaultActiveId?: string;
|
|
15
16
|
onTabChange?: (id: string) => void;
|
|
16
|
-
style?:
|
|
17
|
+
style?: StyleProp<ViewStyle>;
|
|
17
18
|
isDark?: boolean;
|
|
19
|
+
/** Passed through to the rail so it is testable. */
|
|
20
|
+
testID?: string;
|
|
18
21
|
}
|
|
19
22
|
/**
|
|
20
23
|
* A row of tabs on a glass rail, in the reference implementation's style: the
|
|
21
24
|
* selected tab is a lifted inner pane rather than a flat highlight.
|
|
22
25
|
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
26
|
+
* Same conventions as every other component here — React Native primitives
|
|
27
|
+
* only, no browser APIs. The rail is Apple's real glass on iOS 26+ and
|
|
28
|
+
* Glacia's translucent fallback of the same shape on older iOS and Android, so
|
|
29
|
+
* the layout never shifts between platforms.
|
|
27
30
|
*/
|
|
28
31
|
export declare const Tabs: import("react").ForwardRefExoticComponent<TabsProps & import("react").RefAttributes<any>>;
|
package/lib/typescript/ai.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export interface NativePlanProps {
|
|
|
17
17
|
* Each step carries its own status, so a half-finished plan is legible instead
|
|
18
18
|
* of appearing blank until the whole thing completes.
|
|
19
19
|
*/
|
|
20
|
-
export declare function NativePlan({ title, steps, isDark, style }: NativePlanProps): import("react").JSX.Element;
|
|
20
|
+
export declare function NativePlan({ title, steps, isDark: isDarkProp, style }: NativePlanProps): import("react").JSX.Element;
|
|
21
21
|
export interface NativeSource {
|
|
22
22
|
id: string;
|
|
23
23
|
title: string;
|
|
@@ -38,7 +38,7 @@ export interface NativeSourcesProps {
|
|
|
38
38
|
* Native has no anchor element, so a row hands the source to the caller's
|
|
39
39
|
* `onSourcePress` instead of opening a browser the component cannot control.
|
|
40
40
|
*/
|
|
41
|
-
export declare function NativeSources({ sources, title, isDark, style, onSourcePress, }: NativeSourcesProps): import("react").JSX.Element | null;
|
|
41
|
+
export declare function NativeSources({ sources, title, isDark: isDarkProp, style, onSourcePress, }: NativeSourcesProps): import("react").JSX.Element | null;
|
|
42
42
|
export interface NativeResponseProps {
|
|
43
43
|
text: string;
|
|
44
44
|
/** Characters to reveal. Omit to show the whole string. */
|
|
@@ -53,7 +53,7 @@ export interface NativeResponseProps {
|
|
|
53
53
|
* The caller owns the streaming clock (usually a network stream); this only
|
|
54
54
|
* renders the first `revealed` characters and shows a caret while incomplete.
|
|
55
55
|
*/
|
|
56
|
-
export declare function NativeResponse({ text, revealed, streaming, isDark, style, }: NativeResponseProps): import("react").JSX.Element;
|
|
56
|
+
export declare function NativeResponse({ text, revealed, streaming, isDark: isDarkProp, style, }: NativeResponseProps): import("react").JSX.Element;
|
|
57
57
|
export interface NativeTaskProps {
|
|
58
58
|
task: {
|
|
59
59
|
/** 0–1, or omit for an indeterminate task. */
|
|
@@ -66,7 +66,7 @@ export interface NativeTaskProps {
|
|
|
66
66
|
style?: any;
|
|
67
67
|
}
|
|
68
68
|
/** Progress of a long-running background task. */
|
|
69
|
-
export declare function NativeTask({ task, isDark, style }: NativeTaskProps): import("react").JSX.Element;
|
|
69
|
+
export declare function NativeTask({ task, isDark: isDarkProp, style }: NativeTaskProps): import("react").JSX.Element;
|
|
70
70
|
export interface NativeSoundwaveProps {
|
|
71
71
|
levels?: number[];
|
|
72
72
|
bars?: number;
|
|
@@ -84,7 +84,7 @@ export interface NativeSoundwaveProps {
|
|
|
84
84
|
* Without levels it rests at a low, static profile instead of animating:
|
|
85
85
|
* continuous motion with no audio behind it would be decorative noise.
|
|
86
86
|
*/
|
|
87
|
-
export declare function NativeSoundwave({ levels, bars, active, height, color, isDark, style, label, }: NativeSoundwaveProps): import("react").JSX.Element;
|
|
87
|
+
export declare function NativeSoundwave({ levels, bars, active, height, color, isDark: isDarkProp, style, label, }: NativeSoundwaveProps): import("react").JSX.Element;
|
|
88
88
|
export interface NativeThinkingOrbProps {
|
|
89
89
|
label?: string;
|
|
90
90
|
size?: number;
|
|
@@ -98,7 +98,7 @@ export interface NativeThinkingOrbProps {
|
|
|
98
98
|
* Purely decorative, so it is hidden from screen readers and the label is
|
|
99
99
|
* exposed as text instead of relying on the motion being perceived.
|
|
100
100
|
*/
|
|
101
|
-
export declare function NativeThinkingOrb({ label, size, paused, isDark, style, }: NativeThinkingOrbProps): import("react").JSX.Element;
|
|
101
|
+
export declare function NativeThinkingOrb({ label, size, paused, isDark: isDarkProp, style, }: NativeThinkingOrbProps): import("react").JSX.Element;
|
|
102
102
|
export interface NativePanelNavItem {
|
|
103
103
|
id: string;
|
|
104
104
|
label: string;
|
|
@@ -118,9 +118,12 @@ export interface NativePanelsideProps {
|
|
|
118
118
|
* Selection is a press rather than navigation because the panel's content is
|
|
119
119
|
* client state; the caller decides what a selection means.
|
|
120
120
|
*/
|
|
121
|
-
export declare function NativePanelside({ items, value, onValueChange, isDark, style, title, }: NativePanelsideProps): import("react").JSX.Element;
|
|
121
|
+
export declare function NativePanelside({ items, value, onValueChange, isDark: isDarkProp, style, title, }: NativePanelsideProps): import("react").JSX.Element;
|
|
122
122
|
export interface NativeAIInputProps {
|
|
123
|
+
/** Controlled text. Omit it and the composer keeps its own. */
|
|
123
124
|
value?: string;
|
|
125
|
+
/** Starting text for uncontrolled use. */
|
|
126
|
+
defaultValue?: string;
|
|
124
127
|
onChangeText?: (text: string) => void;
|
|
125
128
|
onSubmit?: () => void;
|
|
126
129
|
placeholder?: string;
|
|
@@ -138,7 +141,7 @@ export interface NativeAIInputProps {
|
|
|
138
141
|
* Send stays disabled until there is non-whitespace to send, which is the rule
|
|
139
142
|
* that prevents empty submissions rather than a validation message afterwards.
|
|
140
143
|
*/
|
|
141
|
-
export declare function NativeAIInput({ value, onChangeText, onSubmit, placeholder, disabled, busy, sendLabel, isDark, style, footer, }: NativeAIInputProps): import("react").JSX.Element;
|
|
144
|
+
export declare function NativeAIInput({ value: valueProp, defaultValue, onChangeText, onSubmit, placeholder, disabled, busy, sendLabel, isDark: isDarkProp, style, footer, }: NativeAIInputProps): import("react").JSX.Element;
|
|
142
145
|
export interface NativeGeneratedImage {
|
|
143
146
|
url: string;
|
|
144
147
|
alt: string;
|
|
@@ -160,4 +163,4 @@ export interface NativeImageGenerationProps {
|
|
|
160
163
|
* While generating, a placeholder with the same aspect ratio holds the space so
|
|
161
164
|
* the layout does not jump when the image arrives.
|
|
162
165
|
*/
|
|
163
|
-
export declare function NativeImageGeneration({ image, prompt, status, isDark, style, }: NativeImageGenerationProps): import("react").JSX.Element;
|
|
166
|
+
export declare function NativeImageGeneration({ image, prompt, status, isDark: isDarkProp, style, }: NativeImageGenerationProps): import("react").JSX.Element;
|
|
@@ -16,4 +16,4 @@ export interface NativeBarChartProps {
|
|
|
16
16
|
onBarPress?: (index: number) => void;
|
|
17
17
|
}
|
|
18
18
|
/** Grouped or stacked bars, drawn with react-native-svg. */
|
|
19
|
-
export declare function NativeBarChart({ labels, series, width, height, stacked, radius, isDark, palette, style, onBarPress, }: NativeBarChartProps): import("react").JSX.Element;
|
|
19
|
+
export declare function NativeBarChart({ labels, series, width, height, stacked, radius, isDark: isDarkProp, palette, style, onBarPress, }: NativeBarChartProps): import("react").JSX.Element;
|
|
@@ -22,4 +22,4 @@ export interface NativeFunnelChartProps {
|
|
|
22
22
|
* shows its own value, its share of entry, and the step conversion — the three
|
|
23
23
|
* numbers a funnel is actually read for.
|
|
24
24
|
*/
|
|
25
|
-
export declare function NativeFunnelChart({ stages, width, stageHeight, baseline, isDark, palette, style, onStagePress, }: NativeFunnelChartProps): import("react").JSX.Element;
|
|
25
|
+
export declare function NativeFunnelChart({ stages, width, stageHeight, baseline, isDark: isDarkProp, palette, style, onStagePress, }: NativeFunnelChartProps): import("react").JSX.Element;
|
|
@@ -20,4 +20,4 @@ export interface NativeHeatmapChartProps {
|
|
|
20
20
|
* Cells are Views rather than SVG rects: the grid is uniform, so native layout
|
|
21
21
|
* positions it exactly and text stays crisp without vector text.
|
|
22
22
|
*/
|
|
23
|
-
export declare function NativeHeatmapChart({ rows, columns, cellSize, cellGap, isDark, minColor, maxColor, style, onCellPress, }: NativeHeatmapChartProps): import("react").JSX.Element;
|
|
23
|
+
export declare function NativeHeatmapChart({ rows, columns, cellSize, cellGap, isDark: isDarkProp, minColor, maxColor, style, onCellPress, }: NativeHeatmapChartProps): import("react").JSX.Element;
|
|
@@ -26,5 +26,5 @@ type StyleProps = any;
|
|
|
26
26
|
* the same axis values on both platforms. Touching a column selects that
|
|
27
27
|
* point, which is the touch equivalent of hovering on the web.
|
|
28
28
|
*/
|
|
29
|
-
export declare function NativeLineChart({ labels, series, width, height, area, smooth, showDots, isDark, palette, style, onPointPress, }: NativeLineChartProps): import("react").JSX.Element;
|
|
29
|
+
export declare function NativeLineChart({ labels, series, width, height, area, smooth, showDots, isDark: isDarkProp, palette, style, onPointPress, }: NativeLineChartProps): import("react").JSX.Element;
|
|
30
30
|
export {};
|
|
@@ -28,4 +28,4 @@ export interface NativePlotChartProps {
|
|
|
28
28
|
* pixel scales. That keeps stroke widths and text sizes honest regardless of
|
|
29
29
|
* the chart's width, instead of a scaled viewBox that would distort them.
|
|
30
30
|
*/
|
|
31
|
-
export declare function NativePlotChart({ points, renderMark, width, height, xLabel, yLabel, isDark, style, }: NativePlotChartProps): import("react").JSX.Element;
|
|
31
|
+
export declare function NativePlotChart({ points, renderMark, width, height, xLabel, yLabel, isDark: isDarkProp, style, }: NativePlotChartProps): import("react").JSX.Element;
|
|
@@ -24,4 +24,4 @@ export interface NativeRadarChartProps {
|
|
|
24
24
|
* touch target: tapping one lists that axis's values for all series instead of
|
|
25
25
|
* relying on a hover tooltip.
|
|
26
26
|
*/
|
|
27
|
-
export declare function NativeRadarChart({ axes, series, size, rings, max, isDark, palette, style, onAxisPress, }: NativeRadarChartProps): import("react").JSX.Element;
|
|
27
|
+
export declare function NativeRadarChart({ axes, series, size, rings, max, isDark: isDarkProp, palette, style, onAxisPress, }: NativeRadarChartProps): import("react").JSX.Element;
|
|
@@ -25,4 +25,4 @@ export interface NativeRingChartProps {
|
|
|
25
25
|
* places on both platforms. A legend is on by default: on a phone there is no
|
|
26
26
|
* hover, so colour alone cannot identify a slice.
|
|
27
27
|
*/
|
|
28
|
-
export declare function NativeRingChart({ data, size, thickness, isDark, palette, showLegend, style, onSlicePress, }: NativeRingChartProps): import("react").JSX.Element;
|
|
28
|
+
export declare function NativeRingChart({ data, size, thickness, isDark: isDarkProp, palette, showLegend, style, onSlicePress, }: NativeRingChartProps): import("react").JSX.Element;
|
|
@@ -29,6 +29,6 @@ export interface NativeScatterChartProps {
|
|
|
29
29
|
* BubbleChart is this component with `bubble` set, so the two share their
|
|
30
30
|
* axes, padding and touch behaviour instead of drifting apart.
|
|
31
31
|
*/
|
|
32
|
-
export declare function NativeScatterChart({ series, width, height, radius, bubble, isDark, palette, style, onPointPress, }: NativeScatterChartProps): import("react").JSX.Element;
|
|
32
|
+
export declare function NativeScatterChart({ series, width, height, radius, bubble, isDark: isDarkProp, palette, style, onPointPress, }: NativeScatterChartProps): import("react").JSX.Element;
|
|
33
33
|
/** Scatter marks sized by a third value. */
|
|
34
34
|
export declare function NativeBubbleChart(props: Omit<NativeScatterChartProps, "bubble" | "radius">): import("react").JSX.Element;
|
|
@@ -19,4 +19,4 @@ export interface NativeWaterfallChartProps {
|
|
|
19
19
|
* from opening to closing balance rather than a set of unrelated changes.
|
|
20
20
|
* Increases and decreases are coloured differently, and totals span the axis.
|
|
21
21
|
*/
|
|
22
|
-
export declare function NativeWaterfallChart({ steps, width, height, isDark, style, onStepPress, }: NativeWaterfallChartProps): import("react").JSX.Element;
|
|
22
|
+
export declare function NativeWaterfallChart({ steps, width, height, isDark: isDarkProp, style, onStepPress, }: NativeWaterfallChartProps): import("react").JSX.Element;
|
|
@@ -20,7 +20,7 @@ export interface NativeCandlestickChartProps {
|
|
|
20
20
|
* down, which is the convention traders read without a legend. Each candle is
|
|
21
21
|
* tappable to reveal the four prices, replacing the web hover tooltip.
|
|
22
22
|
*/
|
|
23
|
-
export declare function NativeCandlestickChart({ candles, width, height, isDark, style, onCandlePress, }: NativeCandlestickChartProps): import("react").JSX.Element;
|
|
23
|
+
export declare function NativeCandlestickChart({ candles, width, height, isDark: isDarkProp, style, onCandlePress, }: NativeCandlestickChartProps): import("react").JSX.Element;
|
|
24
24
|
export interface NativeTreemapItem {
|
|
25
25
|
label: string;
|
|
26
26
|
value: number;
|
|
@@ -36,7 +36,7 @@ export interface NativeTreemapChartProps {
|
|
|
36
36
|
onItemPress?: (index: number) => void;
|
|
37
37
|
}
|
|
38
38
|
/** Proportional rectangles for part-to-whole comparison. */
|
|
39
|
-
export declare function NativeTreemapChart({ items, width, height, isDark, palette, style, onItemPress, }: NativeTreemapChartProps): import("react").JSX.Element;
|
|
39
|
+
export declare function NativeTreemapChart({ items, width, height, isDark: isDarkProp, palette, style, onItemPress, }: NativeTreemapChartProps): import("react").JSX.Element;
|
|
40
40
|
export interface NativeSankeyNode {
|
|
41
41
|
id: string;
|
|
42
42
|
label: string;
|
|
@@ -62,7 +62,7 @@ export interface NativeSankeyChartProps {
|
|
|
62
62
|
* after everything feeding it. Rendering uses Views rather than SVG because the
|
|
63
63
|
* bands are axis-aligned rectangles.
|
|
64
64
|
*/
|
|
65
|
-
export declare function NativeSankeyChart({ nodes, links, width, height, isDark, palette, style, }: NativeSankeyChartProps): import("react").JSX.Element;
|
|
65
|
+
export declare function NativeSankeyChart({ nodes, links, width, height, isDark: isDarkProp, palette, style, }: NativeSankeyChartProps): import("react").JSX.Element;
|
|
66
66
|
export interface NativeBumpSeries {
|
|
67
67
|
name: string;
|
|
68
68
|
/** Rank per period; 1 is best. */
|
|
@@ -80,7 +80,7 @@ export interface NativeBumpChartProps {
|
|
|
80
80
|
onPointPress?: (seriesIndex: number, periodIndex: number) => void;
|
|
81
81
|
}
|
|
82
82
|
/** Rank changes over time, where the vertical position is the rank itself. */
|
|
83
|
-
export declare function NativeBumpChart({ labels, series, width, height, isDark, palette, style, onPointPress, }: NativeBumpChartProps): import("react").JSX.Element;
|
|
83
|
+
export declare function NativeBumpChart({ labels, series, width, height, isDark: isDarkProp, palette, style, onPointPress, }: NativeBumpChartProps): import("react").JSX.Element;
|
|
84
84
|
export interface NativeHexPoint {
|
|
85
85
|
x: number;
|
|
86
86
|
y: number;
|
|
@@ -104,4 +104,4 @@ export interface NativeHexChartProps {
|
|
|
104
104
|
* Binning keeps thousands of points legible: reading one mark's exact position
|
|
105
105
|
* matters less than seeing where density is concentrated.
|
|
106
106
|
*/
|
|
107
|
-
export declare function NativeHexChart({ points, radius, width, height, isDark, style, onBinPress, }: NativeHexChartProps): import("react").JSX.Element;
|
|
107
|
+
export declare function NativeHexChart({ points, radius, width, height, isDark: isDarkProp, style, onBinPress, }: NativeHexChartProps): import("react").JSX.Element;
|
|
@@ -21,7 +21,7 @@ export interface NativePolarAreaChartProps {
|
|
|
21
21
|
* one dimension (radius) rather than area. Each wedge is separately tappable
|
|
22
22
|
* because a phone has no hover.
|
|
23
23
|
*/
|
|
24
|
-
export declare function NativePolarAreaChart({ segments, size, max, isDark, palette, style, onSegmentPress, }: NativePolarAreaChartProps): import("react").JSX.Element;
|
|
24
|
+
export declare function NativePolarAreaChart({ segments, size, max, isDark: isDarkProp, palette, style, onSegmentPress, }: NativePolarAreaChartProps): import("react").JSX.Element;
|
|
25
25
|
export interface NativePyramidLevel {
|
|
26
26
|
label: string;
|
|
27
27
|
value: number;
|
|
@@ -43,7 +43,7 @@ export interface NativePyramidChartProps {
|
|
|
43
43
|
* Bands are Views rather than SVG: each is a centred rectangle whose width is
|
|
44
44
|
* the band's share of the widest level, which native layout computes exactly.
|
|
45
45
|
*/
|
|
46
|
-
export declare function NativePyramidChart({ levels, levelHeight, width, isDark, palette, style, onLevelPress, }: NativePyramidChartProps): import("react").JSX.Element;
|
|
46
|
+
export declare function NativePyramidChart({ levels, levelHeight, width, isDark: isDarkProp, palette, style, onLevelPress, }: NativePyramidChartProps): import("react").JSX.Element;
|
|
47
47
|
export interface NativeLiveLineChartProps {
|
|
48
48
|
labels: string[];
|
|
49
49
|
series: NativeLineSeries[];
|
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
+
import type { StyleProp, ViewStyle } from "react-native";
|
|
2
3
|
export interface NativeGlassProps {
|
|
3
4
|
effect?: "clear" | "regular" | "none";
|
|
4
5
|
tintColor?: string;
|
|
5
6
|
interactive?: boolean;
|
|
6
|
-
|
|
7
|
+
/** Passed to whichever surface renders, so tests can find the glass itself. */
|
|
8
|
+
testID?: string;
|
|
9
|
+
style?: StyleProp<ViewStyle>;
|
|
7
10
|
children?: ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* Explicit dark override for the fallback tint. When omitted the phone's
|
|
13
|
+
* colour scheme decides, so developers never thread this prop themselves.
|
|
14
|
+
*/
|
|
15
|
+
isDark?: boolean;
|
|
8
16
|
}
|
|
9
17
|
export declare const isGlassSupported: boolean;
|
|
10
18
|
/**
|
|
11
|
-
* Platform Glass View:
|
|
19
|
+
* Platform Glass View — the single place a glass surface is chosen:
|
|
12
20
|
* - iOS 26+: Real UIGlassEffect via @callstack/liquid-glass
|
|
13
|
-
* - iOS < 26 / Android / Expo Go
|
|
21
|
+
* - iOS < 26 / Android / Expo Go: translucent tint View with identical layout
|
|
14
22
|
*/
|
|
15
23
|
export declare const GlassView: import("react").ForwardRefExoticComponent<NativeGlassProps & import("react").RefAttributes<any>>;
|
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
+
import type { StyleProp, ViewStyle } from "react-native";
|
|
2
3
|
export interface FallbackGlassProps {
|
|
3
4
|
effect?: "clear" | "regular" | "none";
|
|
4
5
|
tintColor?: string;
|
|
5
|
-
|
|
6
|
+
testID?: string;
|
|
7
|
+
style?: StyleProp<ViewStyle>;
|
|
6
8
|
children?: ReactNode;
|
|
7
9
|
isDark?: boolean;
|
|
8
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* Glacia's own glass surface for every platform where Apple's material is not
|
|
13
|
+
* available: Android, iOS before 26, and Expo Go.
|
|
14
|
+
*
|
|
15
|
+
* It renders the resolver's real React Native `View` with the same shape and
|
|
16
|
+
* layout as the native glass, so switching branches never shifts the layout.
|
|
17
|
+
*/
|
|
9
18
|
export declare const FallbackGlassView: import("react").ForwardRefExoticComponent<FallbackGlassProps & import("react").RefAttributes<any>>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export interface LiquidGlassModule {
|
|
2
|
+
LiquidGlassView?: any;
|
|
3
|
+
isLiquidGlassSupported?: boolean;
|
|
4
|
+
}
|
|
5
|
+
/** The routing decision for one glass surface. */
|
|
6
|
+
export interface GlassRouter {
|
|
7
|
+
/** True when Apple's real glass renders this surface. */
|
|
8
|
+
supported: boolean;
|
|
9
|
+
/** Apple's `LiquidGlassView`, or null when the fallback renders instead. */
|
|
10
|
+
LiquidGlassView: any;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Reads a liquid-glass module and decides which branch renders.
|
|
14
|
+
*
|
|
15
|
+
* A module only counts as supported when it exports the view *and* reports
|
|
16
|
+
* support; a missing export falls back rather than crashing.
|
|
17
|
+
*/
|
|
18
|
+
export declare function routerFor(module: LiquidGlassModule | null | undefined): GlassRouter;
|
|
19
|
+
/**
|
|
20
|
+
* Loads `@callstack/liquid-glass` at runtime.
|
|
21
|
+
*
|
|
22
|
+
* Resolved through `require` rather than a static import so the package stays
|
|
23
|
+
* importable where the native module is absent (jsdom tests, web preview).
|
|
24
|
+
* `isLiquidGlassSupported` is a constant baked by the package's own platform
|
|
25
|
+
* resolution: its iOS build reads the native module and answers true only on
|
|
26
|
+
* iOS 26+; the default build answers false.
|
|
27
|
+
*/
|
|
28
|
+
export declare function loadLiquidGlass(): LiquidGlassModule | null;
|
|
29
|
+
/** The installed module's routing decision, computed once per process. */
|
|
30
|
+
export declare function defaultRouter(): GlassRouter;
|