livegauge 0.0.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/LICENSE +21 -0
- package/README.md +160 -0
- package/dist/index.cjs +1080 -0
- package/dist/index.d.cts +51 -0
- package/dist/index.d.ts +51 -0
- package/dist/index.js +1053 -0
- package/package.json +69 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { CSSProperties } from 'react';
|
|
3
|
+
|
|
4
|
+
type Momentum = 'up' | 'down' | 'flat';
|
|
5
|
+
type ThemeMode = 'light' | 'dark';
|
|
6
|
+
interface DegenOptions {
|
|
7
|
+
/** Multiplier for particle count and size (default 1) */
|
|
8
|
+
scale?: number;
|
|
9
|
+
/** Show particles on down-momentum swings (default false) */
|
|
10
|
+
downMomentum?: boolean;
|
|
11
|
+
}
|
|
12
|
+
interface HoverPoint {
|
|
13
|
+
value: number;
|
|
14
|
+
angle: number;
|
|
15
|
+
}
|
|
16
|
+
interface GaugeZone {
|
|
17
|
+
from: number;
|
|
18
|
+
to: number;
|
|
19
|
+
color: string;
|
|
20
|
+
}
|
|
21
|
+
interface GaugeProps {
|
|
22
|
+
value: number;
|
|
23
|
+
min?: number;
|
|
24
|
+
max?: number;
|
|
25
|
+
theme?: ThemeMode;
|
|
26
|
+
color?: string;
|
|
27
|
+
zones?: GaugeZone[];
|
|
28
|
+
ticks?: boolean | number;
|
|
29
|
+
tickLabels?: boolean;
|
|
30
|
+
arcWidth?: number;
|
|
31
|
+
showValue?: boolean;
|
|
32
|
+
label?: string;
|
|
33
|
+
momentum?: boolean | Momentum;
|
|
34
|
+
degen?: boolean | DegenOptions;
|
|
35
|
+
loading?: boolean;
|
|
36
|
+
lerpSpeed?: number;
|
|
37
|
+
dot?: boolean;
|
|
38
|
+
pointer?: 'needle' | 'circle';
|
|
39
|
+
pulse?: boolean;
|
|
40
|
+
tooltip?: boolean;
|
|
41
|
+
formatValue?: (v: number) => string;
|
|
42
|
+
startAngle?: number;
|
|
43
|
+
endAngle?: number;
|
|
44
|
+
className?: string;
|
|
45
|
+
style?: CSSProperties;
|
|
46
|
+
onHover?: (point: HoverPoint | null) => void;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
declare function Gauge({ value, min, max, theme, color, zones, ticks, tickLabels, arcWidth, showValue, label, momentum, degen: degenProp, loading, lerpSpeed, pointer, dot, pulse, tooltip, formatValue, startAngle, endAngle, className, style, }: GaugeProps): react_jsx_runtime.JSX.Element;
|
|
50
|
+
|
|
51
|
+
export { type DegenOptions, Gauge, type GaugeProps, type GaugeZone, type HoverPoint, type Momentum, type ThemeMode };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { CSSProperties } from 'react';
|
|
3
|
+
|
|
4
|
+
type Momentum = 'up' | 'down' | 'flat';
|
|
5
|
+
type ThemeMode = 'light' | 'dark';
|
|
6
|
+
interface DegenOptions {
|
|
7
|
+
/** Multiplier for particle count and size (default 1) */
|
|
8
|
+
scale?: number;
|
|
9
|
+
/** Show particles on down-momentum swings (default false) */
|
|
10
|
+
downMomentum?: boolean;
|
|
11
|
+
}
|
|
12
|
+
interface HoverPoint {
|
|
13
|
+
value: number;
|
|
14
|
+
angle: number;
|
|
15
|
+
}
|
|
16
|
+
interface GaugeZone {
|
|
17
|
+
from: number;
|
|
18
|
+
to: number;
|
|
19
|
+
color: string;
|
|
20
|
+
}
|
|
21
|
+
interface GaugeProps {
|
|
22
|
+
value: number;
|
|
23
|
+
min?: number;
|
|
24
|
+
max?: number;
|
|
25
|
+
theme?: ThemeMode;
|
|
26
|
+
color?: string;
|
|
27
|
+
zones?: GaugeZone[];
|
|
28
|
+
ticks?: boolean | number;
|
|
29
|
+
tickLabels?: boolean;
|
|
30
|
+
arcWidth?: number;
|
|
31
|
+
showValue?: boolean;
|
|
32
|
+
label?: string;
|
|
33
|
+
momentum?: boolean | Momentum;
|
|
34
|
+
degen?: boolean | DegenOptions;
|
|
35
|
+
loading?: boolean;
|
|
36
|
+
lerpSpeed?: number;
|
|
37
|
+
dot?: boolean;
|
|
38
|
+
pointer?: 'needle' | 'circle';
|
|
39
|
+
pulse?: boolean;
|
|
40
|
+
tooltip?: boolean;
|
|
41
|
+
formatValue?: (v: number) => string;
|
|
42
|
+
startAngle?: number;
|
|
43
|
+
endAngle?: number;
|
|
44
|
+
className?: string;
|
|
45
|
+
style?: CSSProperties;
|
|
46
|
+
onHover?: (point: HoverPoint | null) => void;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
declare function Gauge({ value, min, max, theme, color, zones, ticks, tickLabels, arcWidth, showValue, label, momentum, degen: degenProp, loading, lerpSpeed, pointer, dot, pulse, tooltip, formatValue, startAngle, endAngle, className, style, }: GaugeProps): react_jsx_runtime.JSX.Element;
|
|
50
|
+
|
|
51
|
+
export { type DegenOptions, Gauge, type GaugeProps, type GaugeZone, type HoverPoint, type Momentum, type ThemeMode };
|