react-native-livechart 4.30.1 → 5.0.0-rc.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/README.md +48 -4
- package/dist/components/AnimatedLabel.d.ts +1 -1
- package/dist/components/AnimatedLabel.d.ts.map +1 -1
- package/dist/components/AreaDotsOverlay.d.ts +1 -1
- package/dist/components/AreaDotsOverlay.d.ts.map +1 -1
- package/dist/components/BadgeOverlay.d.ts +1 -1
- package/dist/components/BadgeOverlay.d.ts.map +1 -1
- package/dist/components/CrosshairOverlay.d.ts +1 -1
- package/dist/components/CrosshairOverlay.d.ts.map +1 -1
- package/dist/components/CustomReferenceLineOverlay.d.ts.map +1 -1
- package/dist/components/DotOverlay.d.ts +2 -3
- package/dist/components/DotOverlay.d.ts.map +1 -1
- package/dist/components/LiveChart.d.ts.map +1 -1
- package/dist/components/LiveChartSeries.d.ts.map +1 -1
- package/dist/components/LoadingOverlay.d.ts +1 -1
- package/dist/components/LoadingOverlay.d.ts.map +1 -1
- package/dist/components/MarkerOverlay.d.ts +1 -1
- package/dist/components/MarkerOverlay.d.ts.map +1 -1
- package/dist/components/MultiSeriesDots.d.ts.map +1 -1
- package/dist/components/MultiSeriesStroke.d.ts +1 -1
- package/dist/components/MultiSeriesStroke.d.ts.map +1 -1
- package/dist/components/MultiSeriesTooltipStack.d.ts +1 -1
- package/dist/components/MultiSeriesTooltipStack.d.ts.map +1 -1
- package/dist/components/MultiSeriesValueLabels.d.ts +1 -1
- package/dist/components/MultiSeriesValueLabels.d.ts.map +1 -1
- package/dist/components/PerSeriesTooltipOverlay.d.ts +1 -1
- package/dist/components/PerSeriesTooltipOverlay.d.ts.map +1 -1
- package/dist/components/ReferenceLineGroupOverlay.d.ts +1 -1
- package/dist/components/ReferenceLineGroupOverlay.d.ts.map +1 -1
- package/dist/components/ReferenceLineOverlay.d.ts +1 -1
- package/dist/components/ReferenceLineOverlay.d.ts.map +1 -1
- package/dist/components/ReferenceLineSeriesOverlay.d.ts +1 -1
- package/dist/components/ReferenceLineSeriesOverlay.d.ts.map +1 -1
- package/dist/components/ReferenceValueBadge.d.ts +1 -1
- package/dist/components/ReferenceValueBadge.d.ts.map +1 -1
- package/dist/components/ScrubActionOverlay.d.ts +1 -1
- package/dist/components/ScrubActionOverlay.d.ts.map +1 -1
- package/dist/components/SegmentDividerOverlay.d.ts +1 -1
- package/dist/components/SegmentDividerOverlay.d.ts.map +1 -1
- package/dist/components/ThresholdLineOverlay.d.ts +1 -1
- package/dist/components/ThresholdLineOverlay.d.ts.map +1 -1
- package/dist/components/ThresholdSplitShader.d.ts +1 -1
- package/dist/components/ThresholdSplitShader.d.ts.map +1 -1
- package/dist/components/TradeStreamOverlay.d.ts +1 -1
- package/dist/components/TradeStreamOverlay.d.ts.map +1 -1
- package/dist/components/ValueTextOverlay.d.ts +1 -1
- package/dist/components/ValueTextOverlay.d.ts.map +1 -1
- package/dist/components/XAxisOverlay.d.ts +1 -1
- package/dist/components/XAxisOverlay.d.ts.map +1 -1
- package/dist/components/YAxisOverlay.d.ts +1 -1
- package/dist/components/YAxisOverlay.d.ts.map +1 -1
- package/dist/draw/candleBodyPath.d.ts +2 -2
- package/dist/draw/candleBodyPath.d.ts.map +1 -1
- package/dist/draw/grid.d.ts +1 -1
- package/dist/draw/grid.d.ts.map +1 -1
- package/dist/draw/imageFromPicture.d.ts +4 -0
- package/dist/draw/imageFromPicture.d.ts.map +1 -0
- package/dist/draw/lineFillPaths.d.ts +1 -1
- package/dist/draw/lineFillPaths.d.ts.map +1 -1
- package/dist/draw/markerAtlas.d.ts +1 -1
- package/dist/draw/markerAtlas.d.ts.map +1 -1
- package/dist/draw/particleAtlas.d.ts +1 -1
- package/dist/draw/particleAtlas.d.ts.map +1 -1
- package/dist/hooks/crosshairSeries.d.ts +1 -1
- package/dist/hooks/crosshairSeries.d.ts.map +1 -1
- package/dist/hooks/crosshairShared.d.ts +1 -1
- package/dist/hooks/crosshairShared.d.ts.map +1 -1
- package/dist/hooks/referenceBadgeFont.d.ts +1 -1
- package/dist/hooks/referenceBadgeFont.d.ts.map +1 -1
- package/dist/hooks/resolveChartLayout.d.ts +1 -1
- package/dist/hooks/resolveChartLayout.d.ts.map +1 -1
- package/dist/hooks/useBadge.d.ts +2 -2
- package/dist/hooks/useBadge.d.ts.map +1 -1
- package/dist/hooks/useCandleGapPaths.d.ts +3 -3
- package/dist/hooks/useCandlePaths.d.ts +6 -6
- package/dist/hooks/useChartPaths.d.ts +1 -1
- package/dist/hooks/useChartPaths.d.ts.map +1 -1
- package/dist/hooks/useChartSkiaFont.d.ts +1 -1
- package/dist/hooks/useChartSkiaFont.d.ts.map +1 -1
- package/dist/hooks/useCrosshair.d.ts +1 -1
- package/dist/hooks/useCrosshair.d.ts.map +1 -1
- package/dist/hooks/useCrosshairSeries.d.ts +1 -1
- package/dist/hooks/useCrosshairSeries.d.ts.map +1 -1
- package/dist/hooks/useLineGapPaths.d.ts +3 -3
- package/dist/hooks/useMultiSeriesLinePaths.d.ts +1 -1
- package/dist/hooks/useMultiSeriesLinePaths.d.ts.map +1 -1
- package/dist/hooks/usePathBuilder.d.ts +1 -1
- package/dist/hooks/usePathBuilder.d.ts.map +1 -1
- package/dist/hooks/useReferenceLine.d.ts +1 -1
- package/dist/hooks/useReferenceLine.d.ts.map +1 -1
- package/dist/hooks/useReferenceLinePress.d.ts +1 -1
- package/dist/hooks/useReferenceLinePress.d.ts.map +1 -1
- package/dist/hooks/useReferenceTagStack.d.ts +1 -1
- package/dist/hooks/useReferenceTagStack.d.ts.map +1 -1
- package/dist/hooks/useSegmentDivider.d.ts +1 -1
- package/dist/hooks/useSegmentDivider.d.ts.map +1 -1
- package/dist/hooks/useSegmentLineGradient.d.ts +1 -1
- package/dist/hooks/useThreshold.d.ts +1 -1
- package/dist/hooks/useThreshold.d.ts.map +1 -1
- package/dist/hooks/useXAxis.d.ts +1 -1
- package/dist/hooks/useXAxis.d.ts.map +1 -1
- package/dist/hooks/useYAxis.d.ts +1 -1
- package/dist/hooks/useYAxis.d.ts.map +1 -1
- package/dist/hooks/useYAxisLabelWidth.d.ts +1 -1
- package/dist/hooks/useYAxisLabelWidth.d.ts.map +1 -1
- package/dist/hooks/useYAxisScaleGesture.d.ts +1 -1
- package/dist/hooks/useYAxisScaleGesture.d.ts.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/lib/measureFontTextWidth.d.ts +1 -1
- package/dist/lib/measureFontTextWidth.d.ts.map +1 -1
- package/dist/types.d.ts +8 -6
- package/dist/types.d.ts.map +1 -1
- package/package.json +7 -5
- package/src/components/AnimatedLabel.tsx +1 -1
- package/src/components/AreaDotsOverlay.tsx +1 -1
- package/src/components/BadgeOverlay.tsx +1 -1
- package/src/components/CrosshairLine.tsx +1 -1
- package/src/components/CrosshairOverlay.tsx +1 -1
- package/src/components/CustomReferenceLineOverlay.tsx +5 -1
- package/src/components/DegenParticlesOverlay.tsx +1 -1
- package/src/components/DotOverlay.tsx +5 -12
- package/src/components/ExtremaConnectorOverlay.tsx +1 -1
- package/src/components/LeftEdgeFade.tsx +1 -1
- package/src/components/LiveChart.tsx +5 -2
- package/src/components/LiveChartSeries.tsx +5 -2
- package/src/components/LoadingOverlay.tsx +1 -1
- package/src/components/MarkerOverlay.tsx +1 -1
- package/src/components/MultiSeriesDots.tsx +25 -6
- package/src/components/MultiSeriesStroke.tsx +2 -2
- package/src/components/MultiSeriesTooltipStack.tsx +1 -1
- package/src/components/MultiSeriesValueLabels.tsx +1 -1
- package/src/components/MultiSeriesValueLines.tsx +1 -1
- package/src/components/PerSeriesTooltipOverlay.tsx +1 -1
- package/src/components/ReferenceLineGroupOverlay.tsx +1 -1
- package/src/components/ReferenceLineOverlay.tsx +1 -1
- package/src/components/ReferenceLineSeriesOverlay.tsx +1 -1
- package/src/components/ReferenceValueBadge.tsx +1 -1
- package/src/components/ScrubActionOverlay.tsx +1 -1
- package/src/components/SegmentDividerOverlay.tsx +1 -1
- package/src/components/SegmentLineGradient.tsx +1 -1
- package/src/components/SelectionDot.tsx +1 -1
- package/src/components/ThresholdLineOverlay.tsx +1 -1
- package/src/components/ThresholdSplitShader.tsx +1 -1
- package/src/components/TradeStreamOverlay.tsx +1 -1
- package/src/components/ValueLineOverlay.tsx +1 -1
- package/src/components/ValueTextOverlay.tsx +1 -1
- package/src/components/XAxisOverlay.tsx +1 -1
- package/src/components/YAxisOverlay.tsx +1 -1
- package/src/draw/candleBodyPath.ts +1 -1
- package/src/draw/grid.ts +1 -1
- package/src/draw/imageFromPicture.ts +12 -0
- package/src/draw/lineFillPaths.ts +1 -1
- package/src/draw/markerAtlas.ts +3 -3
- package/src/draw/particleAtlas.ts +3 -3
- package/src/hooks/crosshairSeries.ts +1 -1
- package/src/hooks/crosshairShared.ts +1 -1
- package/src/hooks/referenceBadgeFont.ts +1 -1
- package/src/hooks/resolveChartLayout.ts +1 -1
- package/src/hooks/useBadge.ts +1 -1
- package/src/hooks/useChartPaths.ts +1 -1
- package/src/hooks/useChartSkiaFont.ts +1 -1
- package/src/hooks/useCrosshair.ts +1 -1
- package/src/hooks/useCrosshairSeries.ts +1 -1
- package/src/hooks/useMultiSeriesLinePaths.ts +1 -1
- package/src/hooks/usePathBuilder.ts +1 -1
- package/src/hooks/useReferenceLine.ts +1 -1
- package/src/hooks/useReferenceLinePress.ts +1 -1
- package/src/hooks/useReferenceTagStack.ts +1 -1
- package/src/hooks/useSegmentDivider.ts +1 -1
- package/src/hooks/useSegmentLineGradient.ts +1 -1
- package/src/hooks/useThreshold.ts +1 -1
- package/src/hooks/useXAxis.ts +1 -1
- package/src/hooks/useYAxis.ts +1 -1
- package/src/hooks/useYAxisLabelWidth.ts +1 -1
- package/src/hooks/useYAxisScaleGesture.ts +1 -1
- package/src/index.ts +4 -0
- package/src/lib/measureFontTextWidth.ts +1 -1
- package/src/types.ts +8 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Text as SkiaText, type SkFont } from "
|
|
1
|
+
import { Text as SkiaText, type SkFont } from "react-native-skia";
|
|
2
2
|
import { useDerivedValue, type SharedValue } from "react-native-reanimated";
|
|
3
3
|
import type { ChartEngineWithLiveValue } from "../core/useLiveChartEngine";
|
|
4
4
|
import type { ChartPadding } from "../draw/line";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
Path,
|
|
5
5
|
type SkFont,
|
|
6
6
|
type SkPath,
|
|
7
|
-
} from "
|
|
7
|
+
} from "react-native-skia";
|
|
8
8
|
import { useDerivedValue, type SharedValue } from "react-native-reanimated";
|
|
9
9
|
import { X_AXIS_LABEL_OFFSET_Y } from "../constants";
|
|
10
10
|
import type { ResolvedGridStyleConfig } from "../core/resolveConfig";
|
package/src/draw/grid.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GRID_METRICS_DEFAULTS, MAX_Y_LABELS } from "../constants";
|
|
2
|
-
import type { SkFont } from "
|
|
2
|
+
import type { SkFont } from "react-native-skia";
|
|
3
3
|
import { measureFontTextWidth } from "../lib/measureFontTextWidth";
|
|
4
4
|
import { lerp } from "../math/lerp";
|
|
5
5
|
import type { GridMetrics } from "../types";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Skia, type SkImage, type SkPicture, type SkSize } from "react-native-skia";
|
|
2
|
+
|
|
3
|
+
/** Build a shared GPU atlas once, without an asynchronous CPU readback. */
|
|
4
|
+
export function imageFromPicture(picture: SkPicture, size: SkSize): SkImage | null {
|
|
5
|
+
const surface = Skia.Surface.MakeOffscreen(size.width, size.height);
|
|
6
|
+
if (!surface) return null;
|
|
7
|
+
surface.getCanvas().drawPicture(picture);
|
|
8
|
+
surface.flush();
|
|
9
|
+
const image = surface.makeImageSnapshot();
|
|
10
|
+
surface.dispose();
|
|
11
|
+
return image;
|
|
12
|
+
}
|
package/src/draw/markerAtlas.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
+
import { imageFromPicture } from "./imageFromPicture";
|
|
1
2
|
import {
|
|
2
3
|
Skia,
|
|
3
4
|
PaintStyle,
|
|
4
5
|
StrokeCap,
|
|
5
6
|
StrokeJoin,
|
|
6
|
-
drawAsImageFromPicture,
|
|
7
7
|
type SkCanvas,
|
|
8
8
|
type SkFont,
|
|
9
9
|
type SkImage,
|
|
10
10
|
type SkPaint,
|
|
11
11
|
type SkRect,
|
|
12
|
-
} from "
|
|
12
|
+
} from "react-native-skia";
|
|
13
13
|
import type {
|
|
14
14
|
LiveChartPalette,
|
|
15
15
|
Marker,
|
|
@@ -493,6 +493,6 @@ export function buildMarkerAtlas(
|
|
|
493
493
|
x += spec.w;
|
|
494
494
|
}
|
|
495
495
|
const picture = recorder.finishRecordingAsPicture();
|
|
496
|
-
const image =
|
|
496
|
+
const image = imageFromPicture(picture, { width: texW, height: texH });
|
|
497
497
|
return { image, cells, scale, digitWidths };
|
|
498
498
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { imageFromPicture } from "./imageFromPicture";
|
|
1
2
|
import {
|
|
2
3
|
Skia,
|
|
3
4
|
PaintStyle,
|
|
4
|
-
drawAsImageFromPicture,
|
|
5
5
|
type SkImage,
|
|
6
|
-
} from "
|
|
6
|
+
} from "react-native-skia";
|
|
7
7
|
import { DEGEN_STRIDE } from "../constants";
|
|
8
8
|
|
|
9
9
|
/** Reference radius of the rasterized white circle sprite (px). */
|
|
@@ -39,7 +39,7 @@ export function buildParticleSprite(): ParticleSprite {
|
|
|
39
39
|
const canvas = recorder.beginRecording(Skia.XYWHRect(0, 0, S, S));
|
|
40
40
|
canvas.drawCircle(S / 2, S / 2, R, paint);
|
|
41
41
|
const picture = recorder.finishRecordingAsPicture();
|
|
42
|
-
const image =
|
|
42
|
+
const image = imageFromPicture(picture, { width: S, height: S });
|
|
43
43
|
return { image, size: S, radius: R };
|
|
44
44
|
}
|
|
45
45
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type SkFont } from "
|
|
1
|
+
import { type SkFont } from "react-native-skia";
|
|
2
2
|
import { MAX_MULTI_SERIES } from "../constants";
|
|
3
3
|
import type { ResolvedPerSeriesTooltipConfig } from "../core/resolveConfig";
|
|
4
4
|
import { type ChartPadding } from "../draw/line";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type SkFont } from "
|
|
1
|
+
import { type SkFont } from "react-native-skia";
|
|
2
2
|
import { type Gesture } from "react-native-gesture-handler";
|
|
3
3
|
import type { DerivedValue, SharedValue } from "react-native-reanimated";
|
|
4
4
|
import { measureFontTextWidth } from "../lib/measureFontTextWidth";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { matchFont, Skia, type SkFont } from "
|
|
1
|
+
import { matchFont, Skia, type SkFont } from "react-native-skia";
|
|
2
2
|
import { resolveFontConfig } from "../core/resolveConfig";
|
|
3
3
|
import { MONO_FONT_FAMILY } from "../lib/monoFontFamily";
|
|
4
4
|
import type { BadgeStyleConfig, FontConfig } from "../types";
|
package/src/hooks/useBadge.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { buildLineFillPaths } from "../draw/lineFillPaths";
|
|
2
|
-
import { Skia, type SkPath } from "
|
|
2
|
+
import { Skia, type SkPath } from "react-native-skia";
|
|
3
3
|
import { useRef } from "react";
|
|
4
4
|
import { useDerivedValue, type SharedValue } from "react-native-reanimated";
|
|
5
5
|
import type {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Skia, type SkPath } from "
|
|
1
|
+
import { Skia, type SkPath } from "react-native-skia";
|
|
2
2
|
import { useRef } from "react";
|
|
3
3
|
import { useDerivedValue, type SharedValue } from "react-native-reanimated";
|
|
4
4
|
import { MAX_MULTI_SERIES } from "../constants";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useDerivedValue, type SharedValue } from "react-native-reanimated";
|
|
2
2
|
import { useRef } from "react";
|
|
3
3
|
|
|
4
|
-
import type { SkFont } from "
|
|
4
|
+
import type { SkFont } from "react-native-skia";
|
|
5
5
|
import type { ChartEngineLayout } from "../core/useLiveChartEngine";
|
|
6
6
|
import { rightAnchoredYAxisColumnLayout, type YAxisEntry } from "../draw/grid";
|
|
7
7
|
import type { ChartPadding } from "../draw/line";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReferenceTagStack } from "../math/referenceTagStack";
|
|
2
2
|
import { useMemo } from "react";
|
|
3
|
-
import type { SkFont } from "
|
|
3
|
+
import type { SkFont } from "react-native-skia";
|
|
4
4
|
import { Gesture } from "react-native-gesture-handler";
|
|
5
5
|
import { useDerivedValue, type SharedValue } from "react-native-reanimated";
|
|
6
6
|
import { scheduleOnRN } from "react-native-worklets";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useMemo, useRef } from "react";
|
|
2
|
-
import type { SkFont } from "
|
|
2
|
+
import type { SkFont } from "react-native-skia";
|
|
3
3
|
import { useAnimatedReaction, type SharedValue } from "react-native-reanimated";
|
|
4
4
|
import type { ChartEngineLayout } from "../core/useLiveChartEngine";
|
|
5
5
|
import type { ChartPadding } from "../draw/line";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useDerivedValue, type SharedValue } from "react-native-reanimated";
|
|
2
|
-
import type { SkFont } from "
|
|
2
|
+
import type { SkFont } from "react-native-skia";
|
|
3
3
|
|
|
4
4
|
import type { ChartEngineLayout } from "../core/useLiveChartEngine";
|
|
5
5
|
import type { ResolvedSegment } from "../core/resolveSegment";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useDerivedValue, type SharedValue } from "react-native-reanimated";
|
|
2
|
-
import { vec } from "
|
|
2
|
+
import { vec } from "react-native-skia";
|
|
3
3
|
|
|
4
4
|
import type { ChartEngineLayout } from "../core/useLiveChartEngine";
|
|
5
5
|
import type { ResolvedSegment } from "../core/resolveSegment";
|
package/src/hooks/useXAxis.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useEffect } from "react";
|
|
2
2
|
import { useDerivedValue, useSharedValue } from "react-native-reanimated";
|
|
3
3
|
|
|
4
|
-
import type { SkFont } from "
|
|
4
|
+
import type { SkFont } from "react-native-skia";
|
|
5
5
|
import { MS_PER_FRAME_60FPS } from "../constants";
|
|
6
6
|
import type { ChartEngineLayout } from "../core/useLiveChartEngine";
|
|
7
7
|
import type { ChartPadding } from "../draw/line";
|
package/src/hooks/useYAxis.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useDerivedValue, useSharedValue } from "react-native-reanimated";
|
|
2
2
|
|
|
3
|
-
import type { SkFont } from "
|
|
3
|
+
import type { SkFont } from "react-native-skia";
|
|
4
4
|
import { GRID_METRICS_DEFAULTS, MS_PER_FRAME_60FPS } from "../constants";
|
|
5
5
|
import type { ChartEngineLayout } from "../core/useLiveChartEngine";
|
|
6
6
|
import { computeGridEntries } from "../draw/grid";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SkFont } from "
|
|
1
|
+
import type { SkFont } from "react-native-skia";
|
|
2
2
|
import { useAnimatedReaction, type SharedValue } from "react-native-reanimated";
|
|
3
3
|
import { scheduleOnRN } from "react-native-worklets";
|
|
4
4
|
import { widestYAxisLabelWidth, type YAxisEntry } from "../draw/grid";
|
package/src/index.ts
CHANGED
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
* @remarks Conceptually inspired by [liveline](https://github.com/benjitaylor/liveline)
|
|
5
5
|
* (Benji Taylor) — live charts for React. This package is a separate React Native
|
|
6
6
|
* implementation on Skia and Reanimated, not a fork of the web library.
|
|
7
|
+
*
|
|
8
|
+
* LiveChart 5 uses `react-native-skia` 3.9.1+. Fonts, images and custom canvas
|
|
9
|
+
* children must come from that same renderer package. LiveChart 4.x uses the
|
|
10
|
+
* separate `@shopify/react-native-skia` peer.
|
|
7
11
|
*/
|
|
8
12
|
|
|
9
13
|
// ── Components ───────────────────────────────────────────────────────────────
|
package/src/types.ts
CHANGED
|
@@ -6,7 +6,7 @@ import type {
|
|
|
6
6
|
DataSourceParam,
|
|
7
7
|
SkFontMgr,
|
|
8
8
|
SkImage,
|
|
9
|
-
} from "
|
|
9
|
+
} from "react-native-skia";
|
|
10
10
|
|
|
11
11
|
/** A single data point on the chart timeline. */
|
|
12
12
|
export interface LiveChartPoint {
|
|
@@ -55,7 +55,8 @@ export type FontWeight =
|
|
|
55
55
|
export type ThemeMode = "light" | "dark";
|
|
56
56
|
|
|
57
57
|
/** Skia canvas composition mode. Android uses TextureView for `"transparent"`
|
|
58
|
-
* and an opaque SurfaceView for `"opaque"
|
|
58
|
+
* and an opaque SurfaceView for `"opaque"`, selected through Skia's
|
|
59
|
+
* `android.backingView` and `android.opaque` options (Skia 3.9.1+). */
|
|
59
60
|
export type CanvasMode = "transparent" | "opaque";
|
|
60
61
|
|
|
61
62
|
/**
|
|
@@ -1542,8 +1543,9 @@ export interface FontConfig {
|
|
|
1542
1543
|
*/
|
|
1543
1544
|
typeface?: DataSourceParam;
|
|
1544
1545
|
/**
|
|
1545
|
-
* Custom Skia font manager from `useFonts` (e.g. bundled
|
|
1546
|
-
* names). Passed as the second argument
|
|
1546
|
+
* Custom Skia font manager from `react-native-skia`'s `useFonts` (e.g. bundled
|
|
1547
|
+
* `.ttf` files registered under family names). Passed as the second argument
|
|
1548
|
+
* to `matchFont`. When `null` or omitted, the system
|
|
1547
1549
|
* font manager is used.
|
|
1548
1550
|
*/
|
|
1549
1551
|
fontManager?: SkFontMgr | null;
|
|
@@ -1608,7 +1610,7 @@ export interface Marker {
|
|
|
1608
1610
|
*/
|
|
1609
1611
|
icon?: string;
|
|
1610
1612
|
/**
|
|
1611
|
-
* Image icon drawn centered at the marker (e.g. from
|
|
1613
|
+
* Image icon drawn centered at the marker (e.g. from `react-native-skia`'s `useImage`). Takes
|
|
1612
1614
|
* precedence over `icon` and the built-in `kind` shape.
|
|
1613
1615
|
*/
|
|
1614
1616
|
image?: SkImage;
|
|
@@ -1706,7 +1708,7 @@ export interface MarkerGroupBadge {
|
|
|
1706
1708
|
* to the optional corner count on a custom group badge. Default `0`.
|
|
1707
1709
|
*/
|
|
1708
1710
|
letterSpacing?: number;
|
|
1709
|
-
/** Custom Skia image for the collapsed group (e.g. from `useImage`). Takes
|
|
1711
|
+
/** Custom Skia image for the collapsed group (e.g. from `react-native-skia`'s `useImage`). Takes
|
|
1710
1712
|
* precedence over {@link icon}. */
|
|
1711
1713
|
image?: SkImage;
|
|
1712
1714
|
/** Text / emoji glyph for the collapsed group (used when {@link image} is unset).
|