react-native-livechart 4.25.0 → 4.27.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/dist/components/CustomReferenceLineOverlay.d.ts +8 -1
- package/dist/components/CustomReferenceLineOverlay.d.ts.map +1 -1
- package/dist/components/CustomTooltipOverlay.d.ts +3 -2
- package/dist/components/CustomTooltipOverlay.d.ts.map +1 -1
- package/dist/components/LiveChart.d.ts +1 -1
- package/dist/components/LiveChart.d.ts.map +1 -1
- package/dist/components/LiveChartSeries.d.ts.map +1 -1
- package/dist/components/ReferenceLineOverlay.d.ts +4 -0
- package/dist/components/ReferenceLineOverlay.d.ts.map +1 -1
- package/dist/components/ReferenceValueBadge.d.ts +15 -0
- package/dist/components/ReferenceValueBadge.d.ts.map +1 -0
- package/dist/components/XAxisOverlay.d.ts +17 -0
- package/dist/components/XAxisOverlay.d.ts.map +1 -1
- package/dist/core/liveChartEngineTick.d.ts +6 -1
- package/dist/core/liveChartEngineTick.d.ts.map +1 -1
- package/dist/core/liveChartSeriesEngineTick.d.ts +4 -1
- package/dist/core/liveChartSeriesEngineTick.d.ts.map +1 -1
- package/dist/core/resolveConfig.d.ts +28 -1
- package/dist/core/resolveConfig.d.ts.map +1 -1
- package/dist/core/useLiveChartEngine.d.ts +10 -1
- package/dist/core/useLiveChartEngine.d.ts.map +1 -1
- package/dist/core/useLiveChartSeriesEngine.d.ts +5 -1
- package/dist/core/useLiveChartSeriesEngine.d.ts.map +1 -1
- package/dist/draw/grid.d.ts +2 -2
- package/dist/draw/line.d.ts +15 -1
- package/dist/draw/line.d.ts.map +1 -1
- package/dist/hooks/crosshairShared.d.ts +24 -1
- package/dist/hooks/crosshairShared.d.ts.map +1 -1
- package/dist/hooks/referenceBadgeFont.d.ts +5 -0
- package/dist/hooks/referenceBadgeFont.d.ts.map +1 -0
- package/dist/hooks/resolveChartLayout.d.ts +8 -0
- package/dist/hooks/resolveChartLayout.d.ts.map +1 -1
- package/dist/hooks/useBadge.d.ts +16 -1
- package/dist/hooks/useBadge.d.ts.map +1 -1
- package/dist/hooks/useChartSkiaFont.d.ts +1 -0
- package/dist/hooks/useChartSkiaFont.d.ts.map +1 -1
- package/dist/hooks/useCrosshair.d.ts +7 -2
- package/dist/hooks/useCrosshair.d.ts.map +1 -1
- package/dist/hooks/useCrosshairSeries.d.ts +4 -1
- package/dist/hooks/useCrosshairSeries.d.ts.map +1 -1
- package/dist/hooks/useLatestCallback.d.ts +6 -0
- package/dist/hooks/useLatestCallback.d.ts.map +1 -0
- package/dist/hooks/useMarkers.d.ts.map +1 -1
- package/dist/hooks/usePanScroll.d.ts +3 -1
- package/dist/hooks/usePanScroll.d.ts.map +1 -1
- package/dist/hooks/usePinchZoom.d.ts.map +1 -1
- package/dist/hooks/useReferenceDrag.d.ts +23 -7
- package/dist/hooks/useReferenceDrag.d.ts.map +1 -1
- package/dist/hooks/useReferenceLine.d.ts +24 -12
- package/dist/hooks/useReferenceLine.d.ts.map +1 -1
- package/dist/hooks/useReferenceLineGrouping.d.ts +19 -0
- package/dist/hooks/useReferenceLineGrouping.d.ts.map +1 -0
- package/dist/hooks/useReferenceLinePress.d.ts +4 -2
- package/dist/hooks/useReferenceLinePress.d.ts.map +1 -1
- package/dist/hooks/useReferenceTagStack.d.ts +31 -0
- package/dist/hooks/useReferenceTagStack.d.ts.map +1 -0
- package/dist/hooks/useScrubMarkers.d.ts +12 -0
- package/dist/hooks/useScrubMarkers.d.ts.map +1 -0
- package/dist/hooks/useXAxis.d.ts +1 -1
- package/dist/hooks/useXAxis.d.ts.map +1 -1
- package/dist/hooks/useYAxisScaleGesture.d.ts +34 -0
- package/dist/hooks/useYAxisScaleGesture.d.ts.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/math/axisBadgeLayout.d.ts +16 -0
- package/dist/math/axisBadgeLayout.d.ts.map +1 -0
- package/dist/math/markers.d.ts +3 -0
- package/dist/math/markers.d.ts.map +1 -1
- package/dist/math/range.d.ts +1 -1
- package/dist/math/range.d.ts.map +1 -1
- package/dist/math/rangeAnimation.d.ts +4 -0
- package/dist/math/rangeAnimation.d.ts.map +1 -0
- package/dist/math/referenceDrag.d.ts +17 -5
- package/dist/math/referenceDrag.d.ts.map +1 -1
- package/dist/math/referenceGroup.d.ts +2 -2
- package/dist/math/referenceTagStack.d.ts +36 -0
- package/dist/math/referenceTagStack.d.ts.map +1 -0
- package/dist/math/scrubMarkers.d.ts +12 -0
- package/dist/math/scrubMarkers.d.ts.map +1 -0
- package/dist/types.d.ts +240 -30
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/CustomReferenceLineOverlay.tsx +50 -8
- package/src/components/CustomTooltipOverlay.tsx +5 -1
- package/src/components/LiveChart.tsx +563 -200
- package/src/components/LiveChartSeries.tsx +117 -13
- package/src/components/ReferenceLineOverlay.tsx +62 -26
- package/src/components/ReferenceValueBadge.tsx +102 -0
- package/src/components/XAxisOverlay.tsx +104 -1
- package/src/core/liveChartEngineTick.ts +66 -10
- package/src/core/liveChartSeriesEngineTick.ts +55 -5
- package/src/core/resolveConfig.ts +95 -2
- package/src/core/useLiveChartEngine.ts +53 -11
- package/src/core/useLiveChartSeriesEngine.ts +11 -1
- package/src/draw/grid.ts +2 -2
- package/src/draw/line.ts +23 -1
- package/src/hooks/crosshairShared.ts +85 -1
- package/src/hooks/referenceBadgeFont.ts +35 -0
- package/src/hooks/resolveChartLayout.ts +17 -0
- package/src/hooks/useBadge.ts +44 -5
- package/src/hooks/useChartSkiaFont.ts +1 -1
- package/src/hooks/useCrosshair.ts +446 -300
- package/src/hooks/useCrosshairSeries.ts +29 -10
- package/src/hooks/useLatestCallback.ts +15 -0
- package/src/hooks/useMarkers.ts +51 -39
- package/src/hooks/usePanScroll.ts +155 -127
- package/src/hooks/usePinchZoom.ts +84 -63
- package/src/hooks/useReferenceDrag.ts +395 -146
- package/src/hooks/useReferenceLine.ts +453 -277
- package/src/hooks/useReferenceLineGrouping.ts +72 -0
- package/src/hooks/useReferenceLinePress.ts +121 -53
- package/src/hooks/useReferenceTagStack.ts +81 -0
- package/src/hooks/useScrubMarkers.ts +79 -0
- package/src/hooks/useXAxis.ts +11 -2
- package/src/hooks/useYAxisScaleGesture.ts +263 -0
- package/src/index.ts +11 -0
- package/src/math/axisBadgeLayout.ts +37 -0
- package/src/math/markers.ts +28 -3
- package/src/math/range.ts +35 -0
- package/src/math/rangeAnimation.ts +28 -0
- package/src/math/referenceDrag.ts +21 -4
- package/src/math/referenceGroup.ts +2 -2
- package/src/math/referenceTagStack.ts +112 -0
- package/src/math/scrubMarkers.ts +55 -0
- package/src/types.ts +246 -30
package/dist/hooks/useXAxis.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ export declare function reformatXAxisLabels(cache: Record<number, {
|
|
|
25
25
|
}>;
|
|
26
26
|
/** Insertion sort — worklet-safe, no callback functions. */
|
|
27
27
|
export declare function insertionSortByX(arr: XAxisEntry[]): void;
|
|
28
|
-
export declare function useXAxis(engine: ChartEngineLayout, padding: ChartPadding, formatTime: (t: number) => string, font: SkFont): {
|
|
28
|
+
export declare function useXAxis(engine: ChartEngineLayout, padding: ChartPadding, formatTime: (t: number) => string, font: SkFont, minGap?: number): {
|
|
29
29
|
xAxisEntries: import("react-native-reanimated").DerivedValue<XAxisEntry[]>;
|
|
30
30
|
font: SkFont;
|
|
31
31
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useXAxis.d.ts","sourceRoot":"","sources":["../../src/hooks/useXAxis.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAEzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAKjD,MAAM,WAAW,UAAU;IACzB,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CA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AC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAMjD;AAUD,4DAA4D;AAC5D,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,UAAU,EAAE,QAajD;AAED,wBAAgB,QAAQ,CACtB,MAAM,EAAE,iBAAiB,EACzB,OAAO,EAAE,YAAY,EACrB,UAAU,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,EACjC,IAAI,EAAE,MAAM,EACZ,MAAM,SAAK;;;EAiLZ;AAED,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,EACzD,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,GACpD,OAAO,CAST"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { SkFont } from "@shopify/react-native-skia";
|
|
2
|
+
import { type ComposedGesture, type GestureType } from "react-native-gesture-handler";
|
|
3
|
+
import { type SharedValue } from "react-native-reanimated";
|
|
4
|
+
import type { ResolvedYAxisConfig } from "../core/resolveConfig";
|
|
5
|
+
import type { ChartEngineLayout } from "../core/useLiveChartEngine";
|
|
6
|
+
import { type YAxisEntry } from "../draw/grid";
|
|
7
|
+
import type { ChartPadding } from "../draw/line";
|
|
8
|
+
/** Preserve private scale state across gesture/axis toggles on a mounted chart. */
|
|
9
|
+
export declare function useYAxisScaleValue(external?: SharedValue<number>): SharedValue<number>;
|
|
10
|
+
/** The reserved gutter, or the actual measured price column when it floats. */
|
|
11
|
+
export declare function isYAxisScaleHit(x: number, y: number, width: number, height: number, padding: ChartPadding, side: "left" | "right", floating: boolean, labelRightMargin: number | undefined, entries: readonly YAxisEntry[], font: SkFont): boolean;
|
|
12
|
+
/** Log-space clamping avoids overflow even for very large drag translations. */
|
|
13
|
+
export declare function draggedYAxisScale(start: number, dy: number, distance: number, min: number, max: number): number;
|
|
14
|
+
type Options = {
|
|
15
|
+
engine: Pick<ChartEngineLayout, "canvasWidth" | "canvasHeight"> & {
|
|
16
|
+
wake?: () => void;
|
|
17
|
+
};
|
|
18
|
+
padding: ChartPadding;
|
|
19
|
+
axis: ResolvedYAxisConfig | null;
|
|
20
|
+
floating?: boolean;
|
|
21
|
+
entries: SharedValue<YAxisEntry[]> | null;
|
|
22
|
+
font: SkFont;
|
|
23
|
+
scale: SharedValue<number>;
|
|
24
|
+
/** Existing plot gesture graph, including pinch. */
|
|
25
|
+
gesture: GestureType | ComposedGesture;
|
|
26
|
+
/** Interactive chart overlays retain their normal tap/drag behavior. */
|
|
27
|
+
deferHit?: (x: number, y: number) => boolean;
|
|
28
|
+
onStart?: () => void;
|
|
29
|
+
active?: SharedValue<boolean>;
|
|
30
|
+
};
|
|
31
|
+
/** Owns gutter touches at touch-down; fails immediately everywhere else. */
|
|
32
|
+
export declare function useYAxisScaleGesture({ engine, padding, axis, floating, entries, font, scale, gesture, deferHit, onStart, active, }: Options): import("react-native-gesture-handler/lib/typescript/handlers/gestures/gesture").BaseGesture<Record<string, unknown>> | import("react-native-gesture-handler/lib/typescript/handlers/gestures/gesture").BaseGesture<Record<string, never>> | import("react-native-gesture-handler/lib/typescript/handlers/gestures/gesture").BaseGesture<import("react-native-gesture-handler").TapGestureHandlerEventPayload> | import("react-native-gesture-handler/lib/typescript/handlers/gestures/gesture").BaseGesture<import("react-native-gesture-handler").PanGestureHandlerEventPayload> | import("react-native-gesture-handler/lib/typescript/handlers/gestures/gesture").BaseGesture<import("react-native-gesture-handler").LongPressGestureHandlerEventPayload> | import("react-native-gesture-handler/lib/typescript/handlers/gestures/gesture").BaseGesture<import("react-native-gesture-handler").RotationGestureHandlerEventPayload> | import("react-native-gesture-handler/lib/typescript/handlers/gestures/gesture").BaseGesture<import("react-native-gesture-handler").PinchGestureHandlerEventPayload> | import("react-native-gesture-handler/lib/typescript/handlers/gestures/gesture").BaseGesture<import("react-native-gesture-handler").ForceTouchGestureHandlerEventPayload> | import("react-native-gesture-handler/lib/typescript/handlers/gestures/gesture").BaseGesture<import("react-native-gesture-handler").NativeViewGestureHandlerPayload> | import("react-native-gesture-handler/lib/typescript/handlers/gestures/gesture").BaseGesture<import("react-native-gesture-handler/lib/typescript/handlers/GestureHandlerEventPayload").HoverGestureHandlerEventPayload> | import("react-native-gesture-handler/lib/typescript/handlers/gestures/gestureComposition").ComposedGesture;
|
|
33
|
+
export {};
|
|
34
|
+
//# sourceMappingURL=useYAxisScaleGesture.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useYAxisScaleGesture.d.ts","sourceRoot":"","sources":["../../src/hooks/useYAxisScaleGesture.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAEzD,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,WAAW,EACjB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAIL,KAAK,WAAW,EACjB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAkC,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEjD,mFAAmF;AACnF,wBAAgB,kBAAkB,CAAC,QAAQ,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,uBAGhE;AAED,+EAA+E;AAC/E,wBAAgB,eAAe,CAC7B,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,YAAY,EACrB,IAAI,EAAE,MAAM,GAAG,OAAO,EACtB,QAAQ,EAAE,OAAO,EACjB,gBAA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oFontFamily";
|
|
|
15
15
|
export { useDegen } from "./hooks/useDegen";
|
|
16
16
|
export { useTradeStream } from "./hooks/useTradeStream";
|
|
17
17
|
export { usePriceY, useTimeX } from "./hooks/useChartOverlayContext";
|
|
18
|
-
export type { AreaDotsConfig, AxisAutoHideConfig, AxisLabelConfig, BadgeConfig, BadgeMetrics, BadgeStyleConfig, BadgeVariant, CandleGap, CandleGapBandStyle, CandleGapBridgeStyle, CandleGapKind, CandleGapLabelStyle, CandleGapStyle, CandleGapsConfig, CandleMetrics, CandlePoint, CanvasMode, ChartGap, ChartGapBandStyle, ChartGapBridgeStyle, ChartGapKind, ChartGapLabelStyle, ChartGapsConfig, ChartGapStyle, ChartInsets, ChartOverlayContext, ChartPlotRect, ChartScale, ChartSegment, DegenOptions, DegenShakePayload, DotGlowConfig, EmptyStateMetrics, FontConfig, FontWeight, GradientConfig, GridMetrics, GridStyleConfig, LeftEdgeFadeConfig, LegendConfig, LegendStyle, LineConfig, LiveChartCoreProps, LiveChartFrameStats, LiveChartHandle, LiveChartMetrics, LiveChartMetricsOverride, LiveChartPalette, LiveChartPoint, LiveChartProps, LiveChartSeriesProps, LoadingConfig, Marker, MarkerClusterConfig, MarkerGroupBadge, MarkerKind, MarkerPressEvent, MarkerRenderContext, MarkerSide, Momentum, MomentumConfig, MotionMetrics, MultiSeriesDotConfig, PerSeriesTooltipConfig, PulseConfig, ReferenceLine, ReferenceLineBadgeConfig, ReferenceLineGroupingConfig, ReferenceLineRenderProps, ReturnToLiveConfig, ScrubActionConfig, ScrubActionPoint, ScrubConfig, ScrubPoint, ScrubPointCore, ScrubPointMulti, ScrubSeriesValue, SelectionDotConfig, SelectionDotProps, SelectionDotRingConfig, SeriesConfig, ThemeMode, ThresholdConfig, ThresholdBadgeRenderProps, ThresholdLineConfig, TooltipRenderProps, TradeEvent, TransitionConfig, ValueLineConfig, VisibleRange, VolumeConfig, XAxisConfig, YAxisConfig, ZoomConfig, } from "./types";
|
|
18
|
+
export type { AreaDotsConfig, AxisAutoHideConfig, AxisLabelConfig, BadgeConfig, BadgeMetrics, BadgeStyleConfig, BadgeVariant, CandleGap, CandleGapBandStyle, CandleGapBridgeStyle, CandleGapKind, CandleGapLabelStyle, CandleGapStyle, CandleGapsConfig, CandleMetrics, CandlePoint, CanvasMode, ChartGap, ChartGapBandStyle, ChartGapBridgeStyle, ChartGapKind, ChartGapLabelStyle, ChartGapsConfig, ChartGapStyle, ChartInsets, ChartOverlayContext, ChartPlotRect, ChartScale, ChartSegment, ChartViewportControl, DegenOptions, DegenShakePayload, DotConfig, DotGlowConfig, DotRingConfig, EmptyStateMetrics, FontConfig, FontWeight, GradientConfig, GridMetrics, GridStyleConfig, LeftEdgeFadeConfig, LegendConfig, LegendStyle, LineConfig, LineStyleConfig, LiveChartCoreProps, LiveChartFrameStats, LiveChartHandle, LiveChartMetrics, LiveChartMetricsOverride, LiveChartPalette, LiveChartPoint, LiveChartProps, LiveChartSeriesProps, LoadingConfig, Marker, MarkerClusterConfig, MarkerGroupBadge, MarkerKind, MarkerPressEvent, MarkerRenderContext, MarkerSide, Momentum, MomentumConfig, MotionMetrics, MultiSeriesDotConfig, PerSeriesTooltipConfig, PulseConfig, RangeAnimationConfig, ReferenceLine, ReferenceLineBadgeConfig, ReferenceLineValueBadgeConfig, ReferenceLineGroupingConfig, ReferenceLineRenderProps, ReturnToLiveConfig, ScrubActionConfig, ScrubActionPoint, ScrubConfig, ScrubMarkerConfig, ScrubPoint, ScrubPointCore, ScrubPointMulti, ScrubSeriesValue, SelectionDotConfig, SelectionDotProps, SelectionDotRingConfig, SeriesConfig, ThemeMode, ThresholdConfig, ThresholdBadgeRenderProps, ThresholdFillConfig, ThresholdLineConfig, TimeScrollConfig, TooltipRenderProps, TradeEvent, TransitionConfig, ValueLineConfig, ViewportConfig, VisibleRange, VolumeConfig, XAxisConfig, YAxisConfig, YAxisScaleGestureConfig, ZoomConfig, } from "./types";
|
|
19
19
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/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B,EACzB,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,UAAU,EACV,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,WAAW,EACX,uBAAuB,EACvB,UAAU,GACX,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { BadgeMetrics } from "../types";
|
|
2
|
+
/** Horizontal price-column geometry, independent of the value's vertical position. */
|
|
3
|
+
export interface AxisBadgeConfig {
|
|
4
|
+
float?: boolean;
|
|
5
|
+
alignTextWithYAxis?: boolean;
|
|
6
|
+
showTail?: boolean;
|
|
7
|
+
fontSize?: number;
|
|
8
|
+
metrics?: BadgeMetrics;
|
|
9
|
+
offsetX?: number;
|
|
10
|
+
}
|
|
11
|
+
export declare function axisBadgeBounds(width: number, paddingRight: number, textWidth: number, fontSize: number, config?: AxisBadgeConfig): {
|
|
12
|
+
left: number;
|
|
13
|
+
right: number;
|
|
14
|
+
textX: number;
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=axisBadgeLayout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"axisBadgeLayout.d.ts","sourceRoot":"","sources":["../../src/math/axisBadgeLayout.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,sFAAsF;AACtF,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,eAAe,CAC7B,KAAK,EAAE,MAAM,EACb,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,MAAM,CAAC,EAAE,eAAe;;;;EAiBzB"}
|
package/dist/math/markers.d.ts
CHANGED
|
@@ -3,6 +3,9 @@ import type { LiveChartPoint, Marker, SeriesConfig } from "../types";
|
|
|
3
3
|
export interface ProjectedMarker {
|
|
4
4
|
x: number;
|
|
5
5
|
y: number;
|
|
6
|
+
/** The anchor is on the plot: across within `EDGE_SLOP` of it, up and down
|
|
7
|
+
* within `CULL_MARGIN`. Only visible markers are drawn, clustered, or
|
|
8
|
+
* hit-tested. */
|
|
6
9
|
visible: boolean;
|
|
7
10
|
/** Collapsed cluster member that the representative stands in for — not drawn,
|
|
8
11
|
* not hit-tested. Set by the cluster pass; `false` outside `markerCluster`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markers.d.ts","sourceRoot":"","sources":["../../src/math/markers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAIrE,iFAAiF;AACjF,MAAM,WAAW,eAAe;IAC9B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,OAAO,EAAE,OAAO,CAAC;IACjB;oFACgF;IAChF,MAAM,EAAE,OAAO,CAAC;IAChB,8EAA8E;IAC9E,SAAS,EAAE,OAAO,CAAC;IACnB,mFAAmF;IACnF,UAAU,EAAE,MAAM,CAAC;IACnB;4EACwE;IACxE,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,UAA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;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,MAAM,EAAE,EACjB,GAAG,EAAE,eAAe,EAAE,EACtB,IAAI,EAAE,kBAAkB,GACvB,eAAe,EAAE,CAqBnB;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAC1B,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,IAAI,EAAE,kBAAkB,GACvB,eAAe,CAajB;AAED;qCACqC;AACrC,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,MAAM,CAS1D;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,eAAe,EAAE,EAC5B,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,MAAM,EAAE,MAAM,GACb,MAAM,CAgBR"}
|
package/dist/math/range.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { LiveChartPoint } from "../types";
|
|
|
3
3
|
* Compute visible Y range from data points + current value.
|
|
4
4
|
* Returns { min, max } with margin applied.
|
|
5
5
|
*/
|
|
6
|
-
export declare function computeRange(visible: LiveChartPoint[], currentValue: number, referenceValue?: number, exaggerate?: boolean, nonNegative?: boolean, maxValue?: number): {
|
|
6
|
+
export declare function computeRange(visible: LiveChartPoint[], currentValue: number, referenceValue?: number, exaggerate?: boolean, nonNegative?: boolean, maxValue?: number, floorRange?: number): {
|
|
7
7
|
min: number;
|
|
8
8
|
max: number;
|
|
9
9
|
};
|
package/dist/math/range.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"range.d.ts","sourceRoot":"","sources":["../../src/math/range.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C;;;GAGG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,cAAc,EAAE,EACzB,YAAY,EAAE,MAAM,EACpB,cAAc,CAAC,EAAE,MAAM,EACvB,UAAU,CAAC,EAAE,OAAO,EACpB,WAAW,CAAC,EAAE,OAAO,EACrB,QAAQ,CAAC,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"range.d.ts","sourceRoot":"","sources":["../../src/math/range.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C;;;GAGG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,cAAc,EAAE,EACzB,YAAY,EAAE,MAAM,EACpB,cAAc,CAAC,EAAE,MAAM,EACvB,UAAU,CAAC,EAAE,OAAO,EACpB,WAAW,CAAC,EAAE,OAAO,EACrB,QAAQ,CAAC,EAAE,MAAM,EACjB,UAAU,CAAC,EAAE,MAAM,GAClB;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CA0E9B"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { RangeAnimationConfig } from "../types";
|
|
2
|
+
/** Select per-bound easing while preserving immediate expansion and reduced motion. */
|
|
3
|
+
export declare function rangeAnimationSpeed(smoothing: number, config: RangeAnimationConfig | undefined, expanding: boolean, disjoint?: boolean): number;
|
|
4
|
+
//# sourceMappingURL=rangeAnimation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rangeAnimation.d.ts","sourceRoot":"","sources":["../../src/math/rangeAnimation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAUrD,uFAAuF;AACvF,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,oBAAoB,GAAG,SAAS,EACxC,SAAS,EAAE,OAAO,EAClB,QAAQ,UAAQ,GACf,MAAM,CAWR"}
|
|
@@ -6,22 +6,34 @@
|
|
|
6
6
|
/** Clamp a value to an optional `[min, max]` bound (order-independent). No-op when
|
|
7
7
|
* `bounds` is omitted. */
|
|
8
8
|
export declare function clampToBounds(value: number, bounds?: [number, number]): number;
|
|
9
|
+
/**
|
|
10
|
+
* Where a touch may grab each line: the touch `x` and, index-aligned with the
|
|
11
|
+
* chart's `referenceLines`, each line's `grabRange` (`[from, to]`, canvas px) —
|
|
12
|
+
* `null` / `undefined` for a line grabbed anywhere along it.
|
|
13
|
+
*/
|
|
14
|
+
export interface GrabRangeProbe {
|
|
15
|
+
x: number;
|
|
16
|
+
ranges: readonly (readonly [number, number] | null | undefined)[];
|
|
17
|
+
}
|
|
9
18
|
/**
|
|
10
19
|
* Index of the draggable line whose handle-Y is nearest the touch `y`, within
|
|
11
20
|
* `slop` px — or `-1` when none is in reach. `handleYs` is index-aligned with the
|
|
12
|
-
* chart's `referenceLines`; entries `< 0` (not draggable /
|
|
13
|
-
*
|
|
21
|
+
* chart's `referenceLines`; entries `< 0` (not draggable / not laid out) are
|
|
22
|
+
* skipped; off-screen lines pin to the nearest plot edge. Ties favor the later
|
|
23
|
+
* (topmost-drawn) line. With `grab`, a line
|
|
24
|
+
* whose `grabRange` does not contain the touch `x` is skipped too.
|
|
14
25
|
*/
|
|
15
|
-
export declare function nearestDraggableIndex(handleYs: number[], y: number, slop: number): number;
|
|
26
|
+
export declare function nearestDraggableIndex(handleYs: number[], y: number, slop: number, grab?: GrabRangeProbe): number;
|
|
16
27
|
/**
|
|
17
28
|
* Whether the reference-drag gesture owns the current touch — the answer the
|
|
18
29
|
* scrub's activation guard needs. A **grabbed** line (`dragIndex >= 0`, pressed
|
|
19
30
|
* or already dragging) owns the touch outright, wherever the asking gesture says
|
|
20
31
|
* the finger is: the scrub pan can activate mid-drag and asks with its
|
|
21
32
|
* touch-DOWN point, which a longer drag has carried the line away from. With no
|
|
22
|
-
* line grabbed, it is the geometric reach test around the handles
|
|
33
|
+
* line grabbed, it is the geometric reach test around the handles (and, with
|
|
34
|
+
* `grab`, inside each line's `grabRange`).
|
|
23
35
|
*/
|
|
24
|
-
export declare function referenceDragOwnsTouch(dragIndex: number, handleYs: number[], y: number, slop: number): boolean;
|
|
36
|
+
export declare function referenceDragOwnsTouch(dragIndex: number, handleYs: number[], y: number, slop: number, grab?: GrabRangeProbe): boolean;
|
|
25
37
|
/**
|
|
26
38
|
* Resolve a grabbed line's drag intent from the touch travel (px) since the grab.
|
|
27
39
|
* Once a line is grabbed it **owns** the touch: any drag past `threshold` px in
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"referenceDrag.d.ts","sourceRoot":"","sources":["../../src/math/referenceDrag.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;2BAC2B;AAC3B,wBAAgB,aAAa,CAC3B,KAAK,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,GACxB,MAAM,CAMR;AAED
|
|
1
|
+
{"version":3,"file":"referenceDrag.d.ts","sourceRoot":"","sources":["../../src/math/referenceDrag.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;2BAC2B;AAC3B,wBAAgB,aAAa,CAC3B,KAAK,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,GACxB,MAAM,CAMR;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,CAAC,EAAE,MAAM,CAAC;IACV,MAAM,EAAE,SAAS,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC,EAAE,CAAC;CACnE;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,MAAM,EAAE,EAClB,CAAC,EAAE,MAAM,EACT,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,cAAc,GACpB,MAAM,CAgBR;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAAE,EAClB,CAAC,EAAE,MAAM,EACT,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,cAAc,GACpB,OAAO,CAIT;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,SAAS,EAAE,MAAM,GAChB,UAAU,GAAG,MAAM,CAKrB;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,MAAM,EACb,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,GACxB,OAAO,CAQT"}
|
|
@@ -23,8 +23,8 @@ export interface ReferenceGrouping {
|
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
25
|
* Single-linkage cluster of reference-line handle Ys: lines whose sorted Y gaps are
|
|
26
|
-
* all `<= radius` chain into one group. Entries `< 0` (not a Form-A line /
|
|
27
|
-
*
|
|
26
|
+
* all `<= radius` chain into one group. Entries `< 0` (not a Form-A line / not laid
|
|
27
|
+
* out) are ignored. Returns which lines are collapsed (`hidden`) plus a centroid
|
|
28
28
|
* + count per multi-line cluster. A non-positive `radius` disables grouping.
|
|
29
29
|
*/
|
|
30
30
|
export declare function groupReferenceLines(ys: number[], radius: number): ReferenceGrouping;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/** Screen rectangles shared by reference-tag drawing and interaction. */
|
|
2
|
+
export interface TagRect {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
w: number;
|
|
6
|
+
h: number;
|
|
7
|
+
}
|
|
8
|
+
export interface ReferenceTag extends TagRect {
|
|
9
|
+
index: number;
|
|
10
|
+
lineId?: string;
|
|
11
|
+
key: string;
|
|
12
|
+
kind: "name" | "value" | "custom";
|
|
13
|
+
/** Original projected price Y; displacement never changes the price. */
|
|
14
|
+
lineY: number;
|
|
15
|
+
}
|
|
16
|
+
export interface StackedReferenceTag extends ReferenceTag {
|
|
17
|
+
offsetY: number;
|
|
18
|
+
}
|
|
19
|
+
export interface ReferenceTagStack {
|
|
20
|
+
offsets: number[];
|
|
21
|
+
valueOffsets: number[];
|
|
22
|
+
tags: StackedReferenceTag[];
|
|
23
|
+
}
|
|
24
|
+
export declare const EMPTY_TAG_STACK: ReferenceTagStack;
|
|
25
|
+
export declare function overlapsX(a: TagRect, b: TagRect): boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Pack only horizontally intersecting columns. Opposite edges stay independent.
|
|
28
|
+
* A fixed value-badge obstacle divides a column into above/below slots; choose
|
|
29
|
+
* the feasible split with the smallest total squared displacement. If there is
|
|
30
|
+
* physically insufficient height, retain every tag in bounds with best-effort
|
|
31
|
+
* spacing rather than hiding levels or moving their prices.
|
|
32
|
+
*/
|
|
33
|
+
export declare function stackReferenceTags(input: ReferenceTag[], top: number, bottom: number, radius?: number, obstacle?: TagRect | null): ReferenceTagStack;
|
|
34
|
+
/** Exact rectangles beat inflated targets when adjacent tags have a small gap. */
|
|
35
|
+
export declare function stackedTagAt(tags: StackedReferenceTag[], x: number, y: number): StackedReferenceTag | null;
|
|
36
|
+
//# sourceMappingURL=referenceTagStack.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"referenceTagStack.d.ts","sourceRoot":"","sources":["../../src/math/referenceTagStack.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,MAAM,WAAW,OAAO;IAAG,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE;AACvE,MAAM,WAAW,YAAa,SAAQ,OAAO;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;IAClC,wEAAwE;IACxE,KAAK,EAAE,MAAM,CAAC;CACf;AACD,MAAM,WAAW,mBAAoB,SAAQ,YAAY;IAAG,OAAO,EAAE,MAAM,CAAA;CAAE;AAC7E,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,IAAI,EAAE,mBAAmB,EAAE,CAAC;CAC7B;AACD,eAAO,MAAM,eAAe,EAAE,iBAA+D,CAAC;AAE9F,wBAAgB,SAAS,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,GAAG,OAAO,CAGzD;AAkBD;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,YAAY,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,SAAK,EAAE,QAAQ,GAAE,OAAO,GAAG,IAAW,GAC/F,iBAAiB,CAoDnB;AAED,kFAAkF;AAClF,wBAAgB,YAAY,CAAC,IAAI,EAAE,mBAAmB,EAAE,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,mBAAmB,GAAG,IAAI,CAQ1G"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Marker } from "../types";
|
|
2
|
+
export interface ScrubMarkerRange {
|
|
3
|
+
from: number;
|
|
4
|
+
to: number;
|
|
5
|
+
/** Candle buckets are [start, end); line proximity includes both edges. */
|
|
6
|
+
exclusiveEnd: boolean;
|
|
7
|
+
}
|
|
8
|
+
/** Timestamp matching deliberately ignores glyph offsets, Y, and clustering. */
|
|
9
|
+
export declare function matchScrubMarkers(markers: Marker[], range: ScrubMarkerRange | null): Marker[];
|
|
10
|
+
/** Convert a horizontal touch tolerance to time using the drawn viewport. */
|
|
11
|
+
export declare function scrubMarkerRange(time: number, now: number, window: number, plotWidth: number, radius: number, candleMode: boolean, candleTime: number | null, candleWidth: number): ScrubMarkerRange | null;
|
|
12
|
+
//# sourceMappingURL=scrubMarkers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scrubMarkers.d.ts","sourceRoot":"","sources":["../../src/math/scrubMarkers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,2EAA2E;IAC3E,YAAY,EAAE,OAAO,CAAC;CACvB;AAED,gFAAgF;AAChF,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,MAAM,EAAE,EACjB,KAAK,EAAE,gBAAgB,GAAG,IAAI,GAC7B,MAAM,EAAE,CAOV;AAED,6EAA6E;AAC7E,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,OAAO,EACnB,UAAU,EAAE,MAAM,GAAG,IAAI,EACzB,WAAW,EAAE,MAAM,GAClB,gBAAgB,GAAG,IAAI,CAsBzB"}
|