@overdoser/react-toolkit 0.0.13 → 0.0.14
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/components/Chart/TradingChart.d.ts +8 -3
- package/components/Chart/trading/period.d.ts +3 -0
- package/components/Chart/trading/types.d.ts +5 -1
- package/index.js +753 -741
- package/llms.txt +1 -1
- package/manifest.json +1 -1
- package/package.json +1 -1
|
@@ -5,9 +5,14 @@ export interface TradingChartProps {
|
|
|
5
5
|
symbol: string;
|
|
6
6
|
resolution: Resolution;
|
|
7
7
|
/**
|
|
8
|
-
* Visible time-range window (e.g. `'1D'`, `'5D'`, `'1M'`, `'1Y'`, `'5Y'
|
|
9
|
-
* When set, the chart fetches bars for the last `period` of time
|
|
10
|
-
* initial visible range covers the whole window. Overrides
|
|
8
|
+
* Visible time-range window (e.g. `'1D'`, `'5D'`, `'1M'`, `'1Y'`, `'5Y'`,
|
|
9
|
+
* `'10Y'`, `'20Y'`, `'MAX'`). When set, the chart fetches bars for the last `period` of time
|
|
10
|
+
* and the initial visible range covers the whole window. Overrides
|
|
11
|
+
* `initialLookback`.
|
|
12
|
+
*
|
|
13
|
+
* `'MAX'` requests `from: 0` (epoch) — the chart renders whatever the
|
|
14
|
+
* datafeed returns. Pair with a coarse `resolution` (`'W'` or `'M'`) so the
|
|
15
|
+
* bar count stays manageable.
|
|
11
16
|
*
|
|
12
17
|
* The chart does not auto-adjust `resolution` when `period` changes — use
|
|
13
18
|
* `suggestResolutionForPeriod()` / `suggestPeriodForResolution()` if you
|
|
@@ -3,6 +3,9 @@ import { Period, Resolution } from './types';
|
|
|
3
3
|
* Convert a `Period` string to seconds. Accepts the typed presets as well as
|
|
4
4
|
* any `<n><unit>` string where unit is `h` / `d` / `w` / `m` / `y`
|
|
5
5
|
* (case-insensitive). Falls back to 30 days on unparseable input.
|
|
6
|
+
*
|
|
7
|
+
* `'MAX'` is reported as 100 years — large enough to cover any realistic
|
|
8
|
+
* asset history. The chart special-cases it to fetch `from: 0` (epoch).
|
|
6
9
|
*/
|
|
7
10
|
export declare function periodToSeconds(period: Period): number;
|
|
8
11
|
/**
|
|
@@ -26,8 +26,12 @@ export type Resolution = '1' | '3' | '5' | '15' | '30' | '60' | '120' | '240' |
|
|
|
26
26
|
* Visible time-range window. Drives the initial X-axis span of the chart.
|
|
27
27
|
* Common presets are typed; any other `<n><unit>` string (`'30d'`, `'2y'`,
|
|
28
28
|
* `'48h'`, …) is accepted and parsed.
|
|
29
|
+
*
|
|
30
|
+
* `'MAX'` is a special preset: the chart requests bars `from: 0` (epoch) to
|
|
31
|
+
* now and renders whatever range the datafeed supplies. Best paired with a
|
|
32
|
+
* coarse `resolution` ('W' or 'M') so the bar count stays reasonable.
|
|
29
33
|
*/
|
|
30
|
-
export type Period = '1D' | '5D' | '1M' | '3M' | '6M' | '1Y' | '5Y' | (string & {});
|
|
34
|
+
export type Period = '1D' | '5D' | '1M' | '3M' | '6M' | '1Y' | '5Y' | '10Y' | '20Y' | 'MAX' | (string & {});
|
|
31
35
|
/**
|
|
32
36
|
* Timezone used to render the crosshair date/time label.
|
|
33
37
|
* - `'local'` — the user's local timezone (offset shown as `+HH:MM`).
|