hyperprop-charting-library 0.1.144 → 0.1.146

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/docs/API.md CHANGED
@@ -625,6 +625,7 @@ link.click();
625
625
 
626
626
  - `startReplay(options?: ReplayStartOptions): void` / `stopReplay(): void`
627
627
  - `replayStep(bars?: number): void` — negative rewinds.
628
+ - `replaySeek(index: number): void` — absolute jump, clamped to the series.
628
629
  - `replayPlay(speed?: number): void` / `replayPause(): void` / `setReplaySpeed(speed: number): void`
629
630
  - `getReplayState(): ReplayState` / `onReplayStateChange(handler)`
630
631
 
@@ -724,6 +725,7 @@ chart.startReplay({ fromTimeMs: Date.parse("2026-07-14T13:30:00Z"), speed: 4 });
724
725
  chart.replayPlay(); // 4 bars per second
725
726
  chart.replayStep(1); // or step by hand
726
727
  chart.replayStep(-1); // rewind
728
+ chart.replaySeek(1200); // jump straight to a bar (scrubbers, "replay from here")
727
729
  chart.onReplayStateChange((s) => {
728
730
  label.textContent = `${s.index + 1}/${s.total}${s.atEnd ? " (end)" : ""}`;
729
731
  });
@@ -734,6 +736,16 @@ Live bars arriving during replay are buffered rather than shown, and are all
734
736
  present when replay stops. Without `fromIndex`/`fromTimeMs` replay starts 70%
735
737
  of the way through the series.
736
738
 
739
+ While replay is active the chart also takes the arrow keys and Space: arrows
740
+ step the tape (Shift steps 10) instead of panning, and Space toggles playback.
741
+ Both revert to normal as soon as replay stops, and `keyboard.replay: false`
742
+ turns them off. Stepping one bar at a time is the wrong tool for covering
743
+ distance, so pair them with `replaySeek` for a scrubber:
744
+
745
+ ```ts
746
+ scrubber.oninput = () => chart.replaySeek(Number(scrubber.value));
747
+ ```
748
+
737
749
  ---
738
750
 
739
751
  ## Price alerts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hyperprop-charting-library",
3
- "version": "0.1.144",
3
+ "version": "0.1.146",
4
4
  "description": "Lightweight TypeScript charting core",
5
5
  "type": "module",
6
6
  "main": "./dist/hyperprop-charting-library.cjs",
@@ -22,7 +22,7 @@
22
22
  "build": "tsup src/index.ts --format esm,cjs --dts --clean && cp \"./dist/index.js\" \"./dist/hyperprop-charting-library.js\" && cp \"./dist/index.cjs\" \"./dist/hyperprop-charting-library.cjs\" && cp \"./dist/index.d.ts\" \"./dist/hyperprop-charting-library.d.ts\"",
23
23
  "dev": "tsup src/index.ts --format esm,cjs --dts --watch --onSuccess \"cp ./dist/index.js ./dist/hyperprop-charting-library.js && cp ./dist/index.cjs ./dist/hyperprop-charting-library.cjs && cp ./dist/index.d.ts ./dist/hyperprop-charting-library.d.ts\"",
24
24
  "typecheck": "tsc -p tsconfig.json --noEmit",
25
- "test": "npx tsx src/time.test.mjs"
25
+ "test": "npx tsx src/time.test.mjs && npx tsx src/indicators.test.mjs"
26
26
  },
27
27
  "devDependencies": {
28
28
  "tsup": "^8.5.0"