@tradecanvas/core 1.23.0 → 1.25.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.
Files changed (42) hide show
  1. package/README.md +5 -4
  2. package/dist/{WebGLSeriesRenderer-BNrnoMHq.js → WebGLSeriesRenderer-C9lMIDnL.js} +2 -2
  3. package/dist/{WebGLSeriesRenderer-BNrnoMHq.js.map → WebGLSeriesRenderer-C9lMIDnL.js.map} +1 -1
  4. package/dist/{WebGLSeriesRenderer-Bclv4lzZ.cjs → WebGLSeriesRenderer-Hwer7mph.cjs} +2 -2
  5. package/dist/{WebGLSeriesRenderer-Bclv4lzZ.cjs.map → WebGLSeriesRenderer-Hwer7mph.cjs.map} +1 -1
  6. package/dist/axis/TimeAxis.d.ts.map +1 -1
  7. package/dist/charts/CompareRenderer.d.ts.map +1 -1
  8. package/dist/drawings/DrawingManager.d.ts +5 -4
  9. package/dist/drawings/DrawingManager.d.ts.map +1 -1
  10. package/dist/features/DataExporter.d.ts.map +1 -1
  11. package/dist/features/MeasureOverlay.d.ts.map +1 -1
  12. package/dist/{gpuContexts-Bn58hj7u.js → gpuContexts-B3iynnAn.js} +106 -93
  13. package/dist/gpuContexts-B3iynnAn.js.map +1 -0
  14. package/dist/gpuContexts-X-Q3OVWF.cjs +2 -0
  15. package/dist/gpuContexts-X-Q3OVWF.cjs.map +1 -0
  16. package/dist/index.cjs +5 -5
  17. package/dist/index.cjs.map +1 -1
  18. package/dist/index.js +3020 -3003
  19. package/dist/index.js.map +1 -1
  20. package/dist/indicators/symbols/SymbolSeriesStore.d.ts +4 -3
  21. package/dist/indicators/symbols/SymbolSeriesStore.d.ts.map +1 -1
  22. package/dist/indicators/symbols/symbolIndicators.d.ts.map +1 -1
  23. package/dist/interaction/CrosshairHandler.d.ts +8 -0
  24. package/dist/interaction/CrosshairHandler.d.ts.map +1 -1
  25. package/dist/interaction/CrosshairTooltip.d.ts +4 -2
  26. package/dist/interaction/CrosshairTooltip.d.ts.map +1 -1
  27. package/dist/interaction/PinnedTooltip.d.ts +3 -2
  28. package/dist/interaction/PinnedTooltip.d.ts.map +1 -1
  29. package/dist/trading/fillMarks.d.ts.map +1 -1
  30. package/dist/ui/BarCountdown.d.ts.map +1 -1
  31. package/dist/ui/ChartLegend.d.ts +6 -1
  32. package/dist/ui/ChartLegend.d.ts.map +1 -1
  33. package/dist/ui/SessionBreaks.d.ts +0 -1
  34. package/dist/ui/SessionBreaks.d.ts.map +1 -1
  35. package/dist/viewport/ScaleMapping.d.ts +11 -5
  36. package/dist/viewport/ScaleMapping.d.ts.map +1 -1
  37. package/dist/viewport/index.d.ts +1 -1
  38. package/dist/viewport/index.d.ts.map +1 -1
  39. package/package.json +2 -2
  40. package/dist/gpuContexts-Bn58hj7u.js.map +0 -1
  41. package/dist/gpuContexts-DYrOp3uo.cjs +0 -2
  42. package/dist/gpuContexts-DYrOp3uo.cjs.map +0 -1
package/README.md CHANGED
@@ -42,19 +42,20 @@ Indicator parameters are read through `getNumberParam` / `getIntParam` helpers,
42
42
 
43
43
  Extensible via `IndicatorBase` for custom indicators.
44
44
 
45
- ### Web Worker offload
45
+ ### Indicator math in a worker
46
46
 
47
- `IndicatorWorkerHost` wraps a `Worker` and exposes a Promise-based `calculate()` so heavy charts can run indicator math off the main thread:
47
+ `IndicatorWorkerHost` wraps a `Worker` you create and exposes a Promise-based `calculate()`, with a per-request timeout and a `ping()` health check:
48
48
 
49
49
  ```ts
50
50
  import { IndicatorWorkerHost } from '@tradecanvas/core'
51
51
 
52
- const worker = new Worker(new URL('./dist/indicator.worker.js', import.meta.url), { type: 'module' })
52
+ // Your own worker, built from src/indicators/worker/indicator.worker.ts in the repository
53
+ const worker = new Worker(new URL('./indicator.worker.ts', import.meta.url), { type: 'module' })
53
54
  const host = new IndicatorWorkerHost(worker)
54
55
  const output = await host.calculate('rsi', config, bars)
55
56
  ```
56
57
 
57
- Pass `null` instead of a worker for synchronous fallback (SSR, tests). The shipped `indicator.worker.js` registers all 33 built-in indicators and supports `calculate` and `ping` requests.
58
+ Pass `null` instead of a worker to calculate synchronously (SSR, tests). The package does not ship a built worker script, and the chart computes its own indicators on the main thread; it does not route them through this host yet.
58
59
 
59
60
  ### Drawing Tools (24)
60
61
 
@@ -1,4 +1,4 @@
1
- import { c as e, d as t, f as n, h as r, l as i, m as a, n as o } from "./gpuContexts-Bn58hj7u.js";
1
+ import { c as e, d as t, f as n, h as r, l as i, m as a, n as o } from "./gpuContexts-B3iynnAn.js";
2
2
  import { resolveVolumeColors as s } from "@tradecanvas/commons";
3
3
  var c = (e, t) => e.time === t.time && e.open === t.open && e.high === t.high && e.low === t.low && e.close === t.close && e.volume === t.volume, l = class {
4
4
  buffer = new Float32Array();
@@ -1780,4 +1780,4 @@ function $(e) {
1780
1780
  //#endregion
1781
1781
  export { Ee as WebGLSeriesRenderer };
1782
1782
 
1783
- //# sourceMappingURL=WebGLSeriesRenderer-BNrnoMHq.js.map
1783
+ //# sourceMappingURL=WebGLSeriesRenderer-C9lMIDnL.js.map