@wick-charts/vue 0.3.4 → 0.3.6

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 CHANGED
@@ -2,6 +2,9 @@
2
2
 
3
3
  <!-- Generated from README.tmpl.md — edit the template, not this file. -->
4
4
 
5
+ [![codecov](https://codecov.io/gh/mo4islona/wick-charts/branch/main/graph/badge.svg)](https://codecov.io/gh/mo4islona/wick-charts) [![license](https://img.shields.io/github/license/mo4islona/wick-charts.svg)](./LICENSE)
6
+ [![npm @wick-charts/vue](https://img.shields.io/npm/v/@wick-charts/vue.svg?label=%40wick-charts%2Fvue)](https://www.npmjs.com/package/@wick-charts/vue)
7
+
5
8
  High-performance timeseries charts for **React**, **Vue**, and **Svelte**. Canvas-rendered, tree-shakeable, zero runtime dependencies.
6
9
 
7
10
  [Live Demo](https://mo4islona.github.io/wick-charts/) · [Docs](https://mo4islona.github.io/wick-charts/#/api/chart-container)
package/dist/index.d.ts CHANGED
@@ -183,6 +183,13 @@ declare type __VLS_Props_3 = {
183
183
  * later changes are ignored.
184
184
  */
185
185
  perf?: PerfOption;
186
+ /**
187
+ * Fired after the user releases a pan/zoom gesture that pulled the viewport
188
+ * past a data edge by more than ~10% of the visible range. Hosts typically
189
+ * respond by prefetching more history. Captured at mount only; changing
190
+ * the prop identity later is ignored.
191
+ */
192
+ onEdgeReached?: (info: EdgeReachedInfo) => void;
186
193
  };
187
194
 
188
195
  declare type __VLS_Props_4 = {
@@ -939,6 +946,36 @@ export declare class ChartInstance extends EventEmitter<ChartEvents> {
939
946
  setVisibleRange(range: VisibleRange | number): void;
940
947
  getYRange(): YRange;
941
948
  getCrosshairPosition(): CrosshairPosition | null;
949
+ /**
950
+ * Programmatically set or clear the crosshair. Same effect as the user
951
+ * hovering over `(timeToX(time), valueToY(y))` — emits `crosshairMove`,
952
+ * marks the overlay layer dirty, and lets `<Crosshair>` / `<Tooltip>`
953
+ * react via their normal store subscriptions.
954
+ *
955
+ * Pass `null` to clear (mirrors the pointer-leave path).
956
+ *
957
+ * `y` is optional. Resolution order when omitted:
958
+ * 1. **current crosshair's y** — preserves whatever the chart already
959
+ * has (real cursor y, or a previously-synthesised value). This is
960
+ * what makes the cross-chart broadcast pattern work: when an echo
961
+ * arrives at the chart that originated the hover, the existing y
962
+ * stays in place and the idempotency check below short-circuits the
963
+ * loop. Without preservation, the echo would overwrite the source's
964
+ * real cursor y with the midpoint default and the tooltip would
965
+ * jitter between cursor and midpoint every mouse-move.
966
+ * 2. **midpoint of the current Y range** — fallback when there is no
967
+ * current crosshair (first programmatic set on a chart that hasn't
968
+ * been hovered yet).
969
+ *
970
+ * Idempotent: a call that produces the same `(time, y)` pair as the
971
+ * current crosshair is a no-op (no emit). Combined with the y-preservation
972
+ * above, this lets N charts broadcast their hover to each other without
973
+ * a feedback-loop guard.
974
+ */
975
+ setCrosshair(pos: {
976
+ time: number;
977
+ y?: number;
978
+ } | null): void;
942
979
  /** Get the last visible value and whether the absolute last point is on screen. */
943
980
  getLastValue(seriesId: string): {
944
981
  value: number;
@@ -1410,6 +1447,13 @@ export declare interface CrosshairPosition {
1410
1447
  y: number;
1411
1448
  }
1412
1449
 
1450
+ /**
1451
+ * @deprecated Use a named preset instead — `catppuccin.theme` is the new
1452
+ * default dark palette, and `dracula`, `nightOwl`, `oneDarkPro`, `gruvbox`,
1453
+ * `monokaiPro`, `materialPalenight`, or `panda` cover the rest of the
1454
+ * dark spectrum. `darkTheme` is kept as an alias for the previous default
1455
+ * and will be removed in a future major release.
1456
+ */
1413
1457
  export declare const darkTheme: ChartTheme;
1414
1458
 
1415
1459
  export declare function detectInterval(times: number[]): number;
@@ -1545,6 +1589,13 @@ declare type LegendMode = 'toggle' | 'isolate' | 'solo';
1545
1589
 
1546
1590
  export declare const lightPink: ThemePreset;
1547
1591
 
1592
+ /**
1593
+ * @deprecated Use a named light preset instead — `quietLight`, `githubLight`,
1594
+ * `solarizedLight`, `minimalLight`, `peachCream`, `sandDune`, `lightPink`,
1595
+ * `lavenderMist`, `mintBreeze`, `rosePineDawn`, or `handwritten`. `lightTheme`
1596
+ * is kept as an alias for the previous default and will be removed in a
1597
+ * future major release.
1598
+ */
1548
1599
  export declare const lightTheme: ChartTheme;
1549
1600
 
1550
1601
  /** @deprecated Use {@link TimePoint} instead. */