glacia-native 0.3.3 → 0.3.5

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.
Files changed (67) hide show
  1. package/lib/module/Dialog.js +128 -0
  2. package/lib/module/Form.js +125 -0
  3. package/lib/module/Input.js +64 -0
  4. package/lib/module/Table.js +81 -0
  5. package/lib/module/ai.js +246 -0
  6. package/lib/module/charts/AreaChart.js +32 -0
  7. package/lib/module/charts/BarChart.js +65 -0
  8. package/lib/module/charts/FunnelChart.js +48 -0
  9. package/lib/module/charts/HeatmapChart.js +69 -0
  10. package/lib/module/charts/LineChart.js +79 -0
  11. package/lib/module/charts/PlotChart.js +44 -0
  12. package/lib/module/charts/RadarChart.js +76 -0
  13. package/lib/module/charts/RingChart.js +50 -0
  14. package/lib/module/charts/ScatterChart.js +78 -0
  15. package/lib/module/charts/WaterfallChart.js +76 -0
  16. package/lib/module/charts/advanced.js +307 -0
  17. package/lib/module/charts/extra.js +105 -0
  18. package/lib/module/charts/index.js +50 -0
  19. package/lib/module/charts/primitives.js +212 -0
  20. package/lib/module/charts/scales.js +140 -0
  21. package/lib/module/index.js +48 -1
  22. package/lib/module/internal/tokens.js +3 -0
  23. package/lib/typescript/Dialog.d.ts +71 -0
  24. package/lib/typescript/Form.d.ts +81 -0
  25. package/lib/typescript/Input.d.ts +47 -0
  26. package/lib/typescript/Table.d.ts +55 -0
  27. package/lib/typescript/ai.d.ts +163 -0
  28. package/lib/typescript/charts/AreaChart.d.ts +44 -0
  29. package/lib/typescript/charts/BarChart.d.ts +19 -0
  30. package/lib/typescript/charts/FunnelChart.d.ts +25 -0
  31. package/lib/typescript/charts/HeatmapChart.d.ts +23 -0
  32. package/lib/typescript/charts/LineChart.d.ts +30 -0
  33. package/lib/typescript/charts/PlotChart.d.ts +31 -0
  34. package/lib/typescript/charts/RadarChart.d.ts +27 -0
  35. package/lib/typescript/charts/RingChart.d.ts +28 -0
  36. package/lib/typescript/charts/ScatterChart.d.ts +34 -0
  37. package/lib/typescript/charts/WaterfallChart.d.ts +22 -0
  38. package/lib/typescript/charts/advanced.d.ts +107 -0
  39. package/lib/typescript/charts/extra.d.ts +63 -0
  40. package/lib/typescript/charts/index.d.ts +13 -0
  41. package/lib/typescript/charts/primitives.d.ts +23 -0
  42. package/lib/typescript/charts/scales.d.ts +35 -0
  43. package/lib/typescript/index.d.ts +6 -0
  44. package/lib/typescript/internal/tokens.d.ts +2 -0
  45. package/package.json +10 -3
  46. package/src/Dialog.tsx +345 -0
  47. package/src/Form.tsx +360 -0
  48. package/src/Input.tsx +172 -0
  49. package/src/Table.tsx +207 -0
  50. package/src/ai.tsx +655 -0
  51. package/src/charts/AreaChart.tsx +73 -0
  52. package/src/charts/BarChart.tsx +181 -0
  53. package/src/charts/FunnelChart.tsx +123 -0
  54. package/src/charts/HeatmapChart.tsx +153 -0
  55. package/src/charts/LineChart.tsx +245 -0
  56. package/src/charts/PlotChart.tsx +148 -0
  57. package/src/charts/RadarChart.tsx +206 -0
  58. package/src/charts/RingChart.tsx +131 -0
  59. package/src/charts/ScatterChart.tsx +202 -0
  60. package/src/charts/WaterfallChart.tsx +183 -0
  61. package/src/charts/advanced.tsx +670 -0
  62. package/src/charts/extra.tsx +239 -0
  63. package/src/charts/index.ts +86 -0
  64. package/src/charts/primitives.ts +262 -0
  65. package/src/charts/scales.ts +163 -0
  66. package/src/index.ts +68 -0
  67. package/src/internal/tokens.ts +3 -0
@@ -0,0 +1,81 @@
1
+ import { type ReactNode } from "react";
2
+ export interface LabelProps {
3
+ children?: ReactNode;
4
+ /** Marks the field required with a visible asterisk. */
5
+ required?: boolean;
6
+ disabled?: boolean;
7
+ /** Ties the label to the control for screen readers. */
8
+ htmlFor?: string;
9
+ isDark?: boolean;
10
+ style?: any;
11
+ }
12
+ /** The text above a control. */
13
+ export declare const Label: import("react").ForwardRefExoticComponent<LabelProps & import("react").RefAttributes<any>>;
14
+ export interface FieldProps {
15
+ label?: string;
16
+ /** Helper text shown under the control. */
17
+ description?: string;
18
+ /** Error text. Overrides `description` and tints the label. */
19
+ error?: string;
20
+ required?: boolean;
21
+ disabled?: boolean;
22
+ isDark?: boolean;
23
+ children?: ReactNode;
24
+ style?: any;
25
+ }
26
+ /**
27
+ * Label, control and message stacked in the order assistive tech announces
28
+ * them, so a caller never has to place these three by hand.
29
+ */
30
+ export declare function Field({ label, description, error, required, disabled, isDark, children, style, }: FieldProps): import("react").JSX.Element;
31
+ export interface CheckboxProps {
32
+ checked?: boolean;
33
+ onCheckedChange?: (checked: boolean) => void;
34
+ label?: string;
35
+ description?: string;
36
+ indeterminate?: boolean;
37
+ disabled?: boolean;
38
+ isDark?: boolean;
39
+ style?: any;
40
+ }
41
+ /** 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;
43
+ export interface RadioOption {
44
+ value: string;
45
+ label: string;
46
+ description?: string;
47
+ disabled?: boolean;
48
+ }
49
+ export interface RadioGroupProps {
50
+ value?: string;
51
+ onValueChange?: (value: string) => void;
52
+ options: RadioOption[];
53
+ /** Lay the options out in a row instead of a column. */
54
+ horizontal?: boolean;
55
+ disabled?: boolean;
56
+ isDark?: boolean;
57
+ style?: any;
58
+ }
59
+ /** 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;
61
+ export interface SelectOption {
62
+ value: string;
63
+ label: string;
64
+ }
65
+ export interface SelectProps {
66
+ value?: string;
67
+ onValueChange?: (value: string) => void;
68
+ options: SelectOption[];
69
+ placeholder?: string;
70
+ disabled?: boolean;
71
+ isDark?: boolean;
72
+ style?: any;
73
+ }
74
+ /**
75
+ * A dropdown of mutually exclusive options.
76
+ *
77
+ * Native has no built-in picker that looks the same on iOS and Android, so the
78
+ * list opens inline: predictable across platforms and reachable without a
79
+ * modal. A long list scrolls naturally with the page.
80
+ */
81
+ export declare function Select({ value, onValueChange, options, placeholder, disabled, isDark, style, }: SelectProps): import("react").JSX.Element;
@@ -0,0 +1,47 @@
1
+ import { type ReactNode } from "react";
2
+ export interface InputProps {
3
+ value?: string;
4
+ onChangeText?: (text: string) => void;
5
+ placeholder?: string;
6
+ /** Renders the field in an error state. Pair with a Field message. */
7
+ invalid?: boolean;
8
+ disabled?: boolean;
9
+ secureTextEntry?: boolean;
10
+ keyboardType?: "default" | "email-address" | "numeric" | "phone-pad" | "url";
11
+ autoCapitalize?: "none" | "sentences" | "words" | "characters";
12
+ autoCorrect?: boolean;
13
+ multiline?: boolean;
14
+ /** Grows with its content when `multiline` is set. */
15
+ minLines?: number;
16
+ size?: "sm" | "md" | "lg";
17
+ accessibilityLabel?: string;
18
+ returnKeyType?: "done" | "next" | "go" | "search" | "send";
19
+ onSubmitEditing?: () => void;
20
+ prefix?: ReactNode;
21
+ suffix?: ReactNode;
22
+ isDark?: boolean;
23
+ style?: any;
24
+ maxLength?: number;
25
+ editable?: boolean;
26
+ onFocus?: () => void;
27
+ onBlur?: () => void;
28
+ }
29
+ /**
30
+ * A single-line or multiline text field.
31
+ *
32
+ * The native TextInput has no placeholder styling prop, so the placeholder is
33
+ * drawn as a sibling Text: that keeps its colour tied to the theme instead of
34
+ * the OS default, which changes between iOS versions.
35
+ */
36
+ export declare const Input: import("react").ForwardRefExoticComponent<InputProps & import("react").RefAttributes<any>>;
37
+ export interface TextareaProps extends Omit<InputProps, "size" | "multiline" | "minLines"> {
38
+ /** Visible height in text lines. */
39
+ rows?: number;
40
+ }
41
+ /**
42
+ * A multi-line field.
43
+ *
44
+ * Separate from Input so `multiline` cannot silently turn off the single-line
45
+ * sizing, and so callers get a `rows` prop instead of guessing a pixel height.
46
+ */
47
+ export declare const Textarea: import("react").ForwardRefExoticComponent<TextareaProps & import("react").RefAttributes<any>>;
@@ -0,0 +1,55 @@
1
+ import type { ReactNode } from "react";
2
+ export interface NativeTableColumn {
3
+ key: string;
4
+ header: string;
5
+ /** Relative width. Columns without one share the remainder. */
6
+ width?: number;
7
+ /** Right-align numeric columns so digits line up. */
8
+ align?: "left" | "right" | "center";
9
+ /** Renders the cell as a caption under the row on a narrow screen. */
10
+ primary?: boolean;
11
+ }
12
+ export interface NativeTableRow {
13
+ id: string;
14
+ cells: Record<string, ReactNode>;
15
+ }
16
+ export interface NativeTableProps {
17
+ columns: NativeTableColumn[];
18
+ rows: NativeTableRow[];
19
+ /** Tap handler for a whole row. */
20
+ onRowPress?: (row: NativeTableRow) => void;
21
+ /** Text direction for right-aligned columns; defaults to left. */
22
+ caption?: string;
23
+ isDark?: boolean;
24
+ style?: any;
25
+ emptyMessage?: string;
26
+ }
27
+ /**
28
+ * Tabular data laid out for a phone.
29
+ *
30
+ * A wide table cannot simply shrink: at phone width the columns become
31
+ * unreadable. Instead the first column is promoted to a row title and the rest
32
+ * are laid out as labelled pairs beneath it, which keeps every value readable
33
+ * without horizontal scrolling.
34
+ */
35
+ export declare function NativeTable({ columns, rows, onRowPress, caption, isDark, style, emptyMessage, }: NativeTableProps): import("react").JSX.Element;
36
+ export interface NativeScrollAreaProps {
37
+ children?: ReactNode;
38
+ /** Fixed height. Without one the area grows with its content. */
39
+ maxHeight?: number;
40
+ /** Adds a bordered, tinted frame around the content. */
41
+ bordered?: boolean;
42
+ horizontal?: boolean;
43
+ isDark?: boolean;
44
+ style?: any;
45
+ /** Announced to screen readers. */
46
+ accessibilityLabel?: string;
47
+ }
48
+ /**
49
+ * A bounded scroll region.
50
+ *
51
+ * Uses the platform ScrollView rather than drawing a custom scrollbar: the OS
52
+ * scroll indicator is the one users already recognise, and it stays correct
53
+ * under momentum, bouncing and accessibility settings.
54
+ */
55
+ export declare function NativeScrollArea({ children, maxHeight, bordered, horizontal, isDark, style, accessibilityLabel, }: NativeScrollAreaProps): import("react").JSX.Element;
@@ -0,0 +1,163 @@
1
+ import { type ReactNode } from "react";
2
+ export interface NativePlanStep {
3
+ id: string;
4
+ title: string;
5
+ detail?: string;
6
+ status: "pending" | "running" | "done" | "failed";
7
+ }
8
+ export interface NativePlanProps {
9
+ title?: string;
10
+ steps: NativePlanStep[];
11
+ isDark?: boolean;
12
+ style?: any;
13
+ }
14
+ /**
15
+ * The ordered steps a model intends to take.
16
+ *
17
+ * Each step carries its own status, so a half-finished plan is legible instead
18
+ * of appearing blank until the whole thing completes.
19
+ */
20
+ export declare function NativePlan({ title, steps, isDark, style }: NativePlanProps): import("react").JSX.Element;
21
+ export interface NativeSource {
22
+ id: string;
23
+ title: string;
24
+ url: string;
25
+ snippet?: string;
26
+ domain?: string;
27
+ }
28
+ export interface NativeSourcesProps {
29
+ sources: NativeSource[];
30
+ title?: string;
31
+ isDark?: boolean;
32
+ style?: any;
33
+ onSourcePress?: (source: NativeSource) => void;
34
+ }
35
+ /**
36
+ * Citations behind an answer, so a claim can be traced to its origin.
37
+ *
38
+ * Native has no anchor element, so a row hands the source to the caller's
39
+ * `onSourcePress` instead of opening a browser the component cannot control.
40
+ */
41
+ export declare function NativeSources({ sources, title, isDark, style, onSourcePress, }: NativeSourcesProps): import("react").JSX.Element | null;
42
+ export interface NativeResponseProps {
43
+ text: string;
44
+ /** Characters to reveal. Omit to show the whole string. */
45
+ revealed?: number;
46
+ streaming?: boolean;
47
+ isDark?: boolean;
48
+ style?: any;
49
+ }
50
+ /**
51
+ * Text revealed progressively as a streamed answer arrives.
52
+ *
53
+ * The caller owns the streaming clock (usually a network stream); this only
54
+ * renders the first `revealed` characters and shows a caret while incomplete.
55
+ */
56
+ export declare function NativeResponse({ text, revealed, streaming, isDark, style, }: NativeResponseProps): import("react").JSX.Element;
57
+ export interface NativeTaskProps {
58
+ task: {
59
+ /** 0–1, or omit for an indeterminate task. */
60
+ progress?: number;
61
+ label?: string;
62
+ detail?: string;
63
+ status?: "running" | "done" | "failed" | "queued";
64
+ };
65
+ isDark?: boolean;
66
+ style?: any;
67
+ }
68
+ /** Progress of a long-running background task. */
69
+ export declare function NativeTask({ task, isDark, style }: NativeTaskProps): import("react").JSX.Element;
70
+ export interface NativeSoundwaveProps {
71
+ levels?: number[];
72
+ bars?: number;
73
+ active?: boolean;
74
+ height?: number;
75
+ color?: string;
76
+ isDark?: boolean;
77
+ style?: any;
78
+ label?: string;
79
+ }
80
+ /**
81
+ * A waveform driven by real amplitude.
82
+ *
83
+ * Bars follow `levels` when supplied, so it can show live microphone input.
84
+ * Without levels it rests at a low, static profile instead of animating:
85
+ * continuous motion with no audio behind it would be decorative noise.
86
+ */
87
+ export declare function NativeSoundwave({ levels, bars, active, height, color, isDark, style, label, }: NativeSoundwaveProps): import("react").JSX.Element;
88
+ export interface NativeThinkingOrbProps {
89
+ label?: string;
90
+ size?: number;
91
+ paused?: boolean;
92
+ isDark?: boolean;
93
+ style?: any;
94
+ }
95
+ /**
96
+ * A pulsing indicator shown while a model is working.
97
+ *
98
+ * Purely decorative, so it is hidden from screen readers and the label is
99
+ * exposed as text instead of relying on the motion being perceived.
100
+ */
101
+ export declare function NativeThinkingOrb({ label, size, paused, isDark, style, }: NativeThinkingOrbProps): import("react").JSX.Element;
102
+ export interface NativePanelNavItem {
103
+ id: string;
104
+ label: string;
105
+ count?: number;
106
+ }
107
+ export interface NativePanelsideProps {
108
+ items: NativePanelNavItem[];
109
+ value?: string;
110
+ onValueChange?: (id: string) => void;
111
+ isDark?: boolean;
112
+ style?: any;
113
+ title?: string;
114
+ }
115
+ /**
116
+ * A rail for an AI workspace: conversations, saved prompts or tasks.
117
+ *
118
+ * Selection is a press rather than navigation because the panel's content is
119
+ * client state; the caller decides what a selection means.
120
+ */
121
+ export declare function NativePanelside({ items, value, onValueChange, isDark, style, title, }: NativePanelsideProps): import("react").JSX.Element;
122
+ export interface NativeAIInputProps {
123
+ value?: string;
124
+ onChangeText?: (text: string) => void;
125
+ onSubmit?: () => void;
126
+ placeholder?: string;
127
+ disabled?: boolean;
128
+ /** Shown as a spinner-free label while a response is pending. */
129
+ busy?: boolean;
130
+ sendLabel?: string;
131
+ isDark?: boolean;
132
+ style?: any;
133
+ footer?: ReactNode;
134
+ }
135
+ /**
136
+ * The composer for an AI conversation.
137
+ *
138
+ * Send stays disabled until there is non-whitespace to send, which is the rule
139
+ * that prevents empty submissions rather than a validation message afterwards.
140
+ */
141
+ export declare function NativeAIInput({ value, onChangeText, onSubmit, placeholder, disabled, busy, sendLabel, isDark, style, footer, }: NativeAIInputProps): import("react").JSX.Element;
142
+ export interface NativeGeneratedImage {
143
+ url: string;
144
+ alt: string;
145
+ width?: number;
146
+ height?: number;
147
+ /** Shown under the image while generation is still running. */
148
+ progress?: number;
149
+ }
150
+ export interface NativeImageGenerationProps {
151
+ image?: NativeGeneratedImage;
152
+ prompt?: string;
153
+ status?: "queued" | "generating" | "done" | "failed";
154
+ isDark?: boolean;
155
+ style?: any;
156
+ }
157
+ /**
158
+ * A generated image with its prompt and state.
159
+ *
160
+ * While generating, a placeholder with the same aspect ratio holds the space so
161
+ * the layout does not jump when the image arrives.
162
+ */
163
+ export declare function NativeImageGeneration({ image, prompt, status, isDark, style, }: NativeImageGenerationProps): import("react").JSX.Element;
@@ -0,0 +1,44 @@
1
+ import { type NativeLineSeries } from "./LineChart";
2
+ export interface NativeAreaChartProps {
3
+ labels: string[];
4
+ series: NativeLineSeries[];
5
+ width?: number;
6
+ height?: number;
7
+ smooth?: boolean;
8
+ isDark?: boolean;
9
+ palette?: readonly string[];
10
+ style?: any;
11
+ onPointPress?: (index: number) => void;
12
+ }
13
+ /**
14
+ * A continuous series with its area filled.
15
+ *
16
+ * This is NativeLineChart drawing filled: the same scales, axis ticks and
17
+ * touch targets, so the two stay consistent when used side by side.
18
+ */
19
+ export declare function NativeAreaChart(props: NativeAreaChartProps): import("react").JSX.Element;
20
+ export interface NativeMirrorAreaSeries {
21
+ name: string;
22
+ /** Positive values drawn upward. */
23
+ above: number[];
24
+ /** Positive values drawn downward. */
25
+ below: number[];
26
+ }
27
+ export interface NativeMirrorAreaChartProps {
28
+ labels: string[];
29
+ series: NativeMirrorAreaSeries;
30
+ width?: number;
31
+ height?: number;
32
+ aboveColor?: string;
33
+ belowColor?: string;
34
+ isDark?: boolean;
35
+ style?: any;
36
+ }
37
+ /**
38
+ * Two series mirrored across a shared centre line.
39
+ *
40
+ * The below series is negated and drawn on the same axis as the above series,
41
+ * so both directions are measured against one honest scale rather than two
42
+ * charts that could be scaled differently.
43
+ */
44
+ export declare function NativeMirrorAreaChart({ labels, series, aboveColor, belowColor, ...rest }: NativeMirrorAreaChartProps): import("react").JSX.Element;
@@ -0,0 +1,19 @@
1
+ export interface NativeBarSeries {
2
+ name: string;
3
+ values: number[];
4
+ color?: string;
5
+ }
6
+ export interface NativeBarChartProps {
7
+ labels: string[];
8
+ series: NativeBarSeries[];
9
+ width?: number;
10
+ height?: number;
11
+ stacked?: boolean;
12
+ radius?: number;
13
+ isDark?: boolean;
14
+ palette?: readonly string[];
15
+ style?: any;
16
+ onBarPress?: (index: number) => void;
17
+ }
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;
@@ -0,0 +1,25 @@
1
+ export interface NativeFunnelStage {
2
+ label: string;
3
+ value: number;
4
+ color?: string;
5
+ }
6
+ export interface NativeFunnelChartProps {
7
+ stages: NativeFunnelStage[];
8
+ width?: number;
9
+ stageHeight?: number;
10
+ /** Value the first stage is measured against. Defaults to its own value. */
11
+ baseline?: number;
12
+ isDark?: boolean;
13
+ palette?: readonly string[];
14
+ style?: any;
15
+ onStagePress?: (index: number) => void;
16
+ }
17
+ /**
18
+ * A sequence of stages where each narrows the one before it.
19
+ *
20
+ * Built from plain Views rather than SVG: a funnel is a set of proportional
21
+ * rectangles, so vector drawing would add a dependency for nothing. Each row
22
+ * shows its own value, its share of entry, and the step conversion — the three
23
+ * numbers a funnel is actually read for.
24
+ */
25
+ export declare function NativeFunnelChart({ stages, width, stageHeight, baseline, isDark, palette, style, onStagePress, }: NativeFunnelChartProps): import("react").JSX.Element;
@@ -0,0 +1,23 @@
1
+ export interface NativeHeatmapChartProps {
2
+ /** One row per series, each holding one value per column. */
3
+ rows: {
4
+ label: string;
5
+ values: number[];
6
+ }[];
7
+ columns: string[];
8
+ cellSize?: number;
9
+ cellGap?: number;
10
+ isDark?: boolean;
11
+ /** Colour for the lowest and highest values. Defaults to a blue ramp. */
12
+ minColor?: string;
13
+ maxColor?: string;
14
+ style?: any;
15
+ onCellPress?: (rowIndex: number, columnIndex: number) => void;
16
+ }
17
+ /**
18
+ * A grid where colour encodes magnitude.
19
+ *
20
+ * Cells are Views rather than SVG rects: the grid is uniform, so native layout
21
+ * positions it exactly and text stays crisp without vector text.
22
+ */
23
+ export declare function NativeHeatmapChart({ rows, columns, cellSize, cellGap, isDark, minColor, maxColor, style, onCellPress, }: NativeHeatmapChartProps): import("react").JSX.Element;
@@ -0,0 +1,30 @@
1
+ export interface NativeLineSeries {
2
+ name: string;
3
+ values: number[];
4
+ color?: string;
5
+ }
6
+ export interface NativeLineChartProps {
7
+ labels: string[];
8
+ series: NativeLineSeries[];
9
+ width?: number;
10
+ height?: number;
11
+ /** Fill beneath each line. */
12
+ area?: boolean;
13
+ smooth?: boolean;
14
+ showDots?: boolean;
15
+ isDark?: boolean;
16
+ palette?: readonly string[];
17
+ style?: StyleProps;
18
+ /** Called with the index of the touched point. */
19
+ onPointPress?: (index: number) => void;
20
+ }
21
+ type StyleProps = any;
22
+ /**
23
+ * A line chart drawn with react-native-svg.
24
+ *
25
+ * Uses the same scale maths as the web LineChart, so the same series produces
26
+ * the same axis values on both platforms. Touching a column selects that
27
+ * point, which is the touch equivalent of hovering on the web.
28
+ */
29
+ export declare function NativeLineChart({ labels, series, width, height, area, smooth, showDots, isDark, palette, style, onPointPress, }: NativeLineChartProps): import("react").JSX.Element;
30
+ export {};
@@ -0,0 +1,31 @@
1
+ export interface NativePlotPoint {
2
+ x: number;
3
+ y: number;
4
+ label?: string;
5
+ }
6
+ export interface NativePlotRenderArgs {
7
+ x: (value: number) => number;
8
+ y: (value: number) => number;
9
+ points: NativePlotPoint[];
10
+ width: number;
11
+ height: number;
12
+ }
13
+ export interface NativePlotChartProps {
14
+ points: NativePlotPoint[];
15
+ /** Draws the marks. Receives real pixel scales, not a fabricated viewBox. */
16
+ renderMark?: (args: NativePlotRenderArgs) => any;
17
+ width?: number;
18
+ height?: number;
19
+ xLabel?: string;
20
+ yLabel?: string;
21
+ isDark?: boolean;
22
+ style?: any;
23
+ }
24
+ /**
25
+ * A numeric plot you supply the marks for.
26
+ *
27
+ * The axes, ticks and padding are handled here and the caller receives real
28
+ * pixel scales. That keeps stroke widths and text sizes honest regardless of
29
+ * the chart's width, instead of a scaled viewBox that would distort them.
30
+ */
31
+ export declare function NativePlotChart({ points, renderMark, width, height, xLabel, yLabel, isDark, style, }: NativePlotChartProps): import("react").JSX.Element;
@@ -0,0 +1,27 @@
1
+ export interface NativeRadarSeries {
2
+ name: string;
3
+ /** One value per axis, in the same order as `axes`. */
4
+ values: number[];
5
+ color?: string;
6
+ }
7
+ export interface NativeRadarChartProps {
8
+ axes: string[];
9
+ series: NativeRadarSeries[];
10
+ size?: number;
11
+ /** Number of concentric rings behind the data. */
12
+ rings?: number;
13
+ /** Fixed maximum; defaults to the largest value across series. */
14
+ max?: number;
15
+ isDark?: boolean;
16
+ palette?: readonly string[];
17
+ style?: any;
18
+ onAxisPress?: (index: number) => void;
19
+ }
20
+ /**
21
+ * Several axes around a circle, one closed shape per series.
22
+ *
23
+ * Reading many dimensions off a phone is hard, so every axis label is also a
24
+ * touch target: tapping one lists that axis's values for all series instead of
25
+ * relying on a hover tooltip.
26
+ */
27
+ export declare function NativeRadarChart({ axes, series, size, rings, max, isDark, palette, style, onAxisPress, }: NativeRadarChartProps): import("react").JSX.Element;
@@ -0,0 +1,28 @@
1
+ export interface NativeRingSlice {
2
+ label: string;
3
+ value: number;
4
+ color?: string;
5
+ }
6
+ export interface NativeRingChartProps {
7
+ data: NativeRingSlice[];
8
+ size?: number;
9
+ /**
10
+ * Ring thickness. Larger leaves a bigger hole.
11
+ * A pie is the same shape with no hole: pass `size` to fill it.
12
+ */
13
+ thickness?: number;
14
+ isDark?: boolean;
15
+ palette?: readonly string[];
16
+ /** Show the slice list beneath the ring. */
17
+ showLegend?: boolean;
18
+ style?: any;
19
+ onSlicePress?: (index: number) => void;
20
+ }
21
+ /**
22
+ * Proportional slices as a ring, drawn with react-native-svg.
23
+ *
24
+ * Shares the arc maths with the web RingChart, so slices land in the same
25
+ * places on both platforms. A legend is on by default: on a phone there is no
26
+ * hover, so colour alone cannot identify a slice.
27
+ */
28
+ export declare function NativeRingChart({ data, size, thickness, isDark, palette, showLegend, style, onSlicePress, }: NativeRingChartProps): import("react").JSX.Element;
@@ -0,0 +1,34 @@
1
+ export interface NativeScatterPoint {
2
+ x: number;
3
+ y: number;
4
+ label?: string;
5
+ /** Bubble radius driver; ignored when `bubble` is not set. */
6
+ size?: number;
7
+ }
8
+ export interface NativeScatterSeries {
9
+ name: string;
10
+ points: NativeScatterPoint[];
11
+ color?: string;
12
+ }
13
+ export interface NativeScatterChartProps {
14
+ series: NativeScatterSeries[];
15
+ width?: number;
16
+ height?: number;
17
+ /** Fixed dot radius. */
18
+ radius?: number;
19
+ /** Size each mark by its `size` value instead of a fixed radius. */
20
+ bubble?: boolean;
21
+ isDark?: boolean;
22
+ palette?: readonly string[];
23
+ style?: any;
24
+ onPointPress?: (seriesIndex: number, pointIndex: number) => void;
25
+ }
26
+ /**
27
+ * Two numeric axes, drawn with react-native-svg.
28
+ *
29
+ * BubbleChart is this component with `bubble` set, so the two share their
30
+ * axes, padding and touch behaviour instead of drifting apart.
31
+ */
32
+ export declare function NativeScatterChart({ series, width, height, radius, bubble, isDark, palette, style, onPointPress, }: NativeScatterChartProps): import("react").JSX.Element;
33
+ /** Scatter marks sized by a third value. */
34
+ export declare function NativeBubbleChart(props: Omit<NativeScatterChartProps, "bubble" | "radius">): import("react").JSX.Element;
@@ -0,0 +1,22 @@
1
+ export interface NativeWaterfallStep {
2
+ label: string;
3
+ /** Signed change. A step with `isTotal` set is drawn as an absolute bar. */
4
+ value: number;
5
+ isTotal?: boolean;
6
+ }
7
+ export interface NativeWaterfallChartProps {
8
+ steps: NativeWaterfallStep[];
9
+ width?: number;
10
+ height?: number;
11
+ isDark?: boolean;
12
+ style?: any;
13
+ onStepPress?: (index: number) => void;
14
+ }
15
+ /**
16
+ * How a running total moves step by step.
17
+ *
18
+ * Each bar starts where the previous one ended, so the reader sees the bridge
19
+ * from opening to closing balance rather than a set of unrelated changes.
20
+ * Increases and decreases are coloured differently, and totals span the axis.
21
+ */
22
+ export declare function NativeWaterfallChart({ steps, width, height, isDark, style, onStepPress, }: NativeWaterfallChartProps): import("react").JSX.Element;