@overdoser/react-toolkit 0.0.12 → 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/components/inputs/Select/Select.d.ts +6 -0
- package/index.js +1336 -1323
- package/llms.txt +2 -1
- package/manifest.json +2 -1
- package/package.json +1 -1
package/llms.txt
CHANGED
|
@@ -384,6 +384,7 @@ Props:
|
|
|
384
384
|
- `onValueChange?: (value: string) => void` — single-mode value-only callback.
|
|
385
385
|
- `onValuesChange?: (values: string[]) => void` — multi-mode callback.
|
|
386
386
|
- `clearSearchOnSelect?: boolean` — default `true`. Multi-mode only.
|
|
387
|
+
- `closeOnSelect?: boolean` — default `true`. Multi-mode only. The menu closes after each add/remove (and after a `Create` row click). Set to `false` for the "stay open until done" pattern when picking many values rapidly.
|
|
387
388
|
- `allowCreate?: boolean` — default `false`. Multi-mode only. Adds a "Create '<query>'" row when the search query doesn't match an existing option. Pressing Enter (or clicking the row) pushes the trimmed query into `onValuesChange` and fires `onCreate`.
|
|
388
389
|
- `onCreate?: (value: string) => void` — Multi-mode only, paired with `allowCreate`. Fires with the new value; consumers typically persist it (e.g. push it back into `options`).
|
|
389
390
|
- `createLabel?: (query: string) => ReactNode` — Multi-mode only. Custom render for the create row. Default: `Create "<query>"`.
|
|
@@ -732,7 +733,7 @@ Props:
|
|
|
732
733
|
- `datafeed: Datafeed` — required. Plug-in adapter (see contract below).
|
|
733
734
|
- `symbol: string` — required.
|
|
734
735
|
- `resolution: Resolution` — bar size (the "tick interval"). TradingView-style: numeric strings are minutes (`'1'`, `'5'`, `'60'`); `'D'`, `'W'`, `'M'` for day/week/month; any other string passes through.
|
|
735
|
-
- `period?: Period` — visible time-range window (the "chart interval"): `'1D' | '5D' | '1M' | '3M' | '6M' | '1Y' | '5Y'` or any `<n><unit>` string (`'30d'`, `'48h'`, `'2y'`). When set, the chart fetches bars covering the period and the initial visible window spans all of them. Overrides `initialLookback`. Note: the chart does NOT auto-adjust `resolution` for you — pair with `suggestResolutionForPeriod()` / `suggestPeriodForResolution()` if you want them coupled.
|
|
736
|
+
- `period?: Period` — visible time-range window (the "chart interval"): `'1D' | '5D' | '1M' | '3M' | '6M' | '1Y' | '5Y' | '10Y' | '20Y' | 'MAX'` or any `<n><unit>` string (`'30d'`, `'48h'`, `'2y'`). When set, the chart fetches bars covering the period and the initial visible window spans all of them. Overrides `initialLookback`. `'MAX'` requests `from: 0` (epoch) and renders whatever the datafeed returns — pair with a coarse `resolution` (`'W'` / `'M'`). Note: the chart does NOT auto-adjust `resolution` for you — pair with `suggestResolutionForPeriod()` / `suggestPeriodForResolution()` if you want them coupled.
|
|
736
737
|
- `seriesType?: 'candle' | 'bar' | 'line' | 'area'` — main pane style. @default `'candle'`. `'bar'` = OHLC bars (vertical high-low line, left tick at open, right tick at close).
|
|
737
738
|
- `timezone?: Timezone` / `defaultTimezone?: Timezone` / `onTimezoneChange?: (tz) => void` — controlled / uncontrolled / notification trio for the crosshair time label. `Timezone = 'local' | 'utc' | IANA-name`. Default `'local'`. Local mode renders `YYYY-MM-DD HH:MM:SS +HH:MM`, UTC renders `… UTC`, IANA strings render `… EST` (short timezone via `Intl.DateTimeFormat`).
|
|
738
739
|
- `showConfigPanel?: boolean` — show the gear button in the chart header + a Popover with a Timezone selector. @default `true`. Hide it if you want to manage timezone purely externally.
|
package/manifest.json
CHANGED
|
@@ -256,6 +256,7 @@
|
|
|
256
256
|
"onValueChange": { "type": "(value: string) => void", "notes": "Single-mode value-only callback." },
|
|
257
257
|
"onValuesChange": { "type": "(values: string[]) => void", "notes": "Multi-mode callback." },
|
|
258
258
|
"clearSearchOnSelect": { "type": "boolean", "default": true, "notes": "Multi-mode only." },
|
|
259
|
+
"closeOnSelect": { "type": "boolean", "default": true, "notes": "Multi-mode only. Menu closes after each add/remove/create. Set false for the stay-open pattern." },
|
|
259
260
|
"allowCreate": { "type": "boolean", "default": false, "notes": "Multi-mode only. Adds a 'Create <query>' row when the query doesn't match an existing option; pressing Enter (or clicking it) pushes the trimmed query into onValuesChange and fires onCreate." },
|
|
260
261
|
"onCreate": { "type": "(value: string) => void", "notes": "Multi-mode only. Paired with allowCreate." },
|
|
261
262
|
"createLabel": { "type": "(query: string) => ReactNode", "notes": "Multi-mode only. Custom render for the Create row." },
|
|
@@ -557,7 +558,7 @@
|
|
|
557
558
|
"datafeed": { "type": "Datafeed", "required": true },
|
|
558
559
|
"symbol": { "type": "string", "required": true },
|
|
559
560
|
"resolution": { "type": "Resolution", "required": true, "notes": "Bar size (the 'tick interval'). TradingView-style: numeric minutes ('1', '5', '60') or 'D'/'W'/'M'. Any other string passes through to the datafeed." },
|
|
560
|
-
"period": { "type": "Period", "notes": "Visible time-range window (the 'chart interval'): '1D' | '5D' | '1M' | '3M' | '6M' | '1Y' | '5Y' or a `<n><unit>` string. Overrides initialLookback when set. The chart does not auto-adjust resolution; pair with suggestResolutionForPeriod() / suggestPeriodForResolution() to couple the two." },
|
|
561
|
+
"period": { "type": "Period", "notes": "Visible time-range window (the 'chart interval'): '1D' | '5D' | '1M' | '3M' | '6M' | '1Y' | '5Y' | '10Y' | '20Y' | 'MAX' or a `<n><unit>` string. Overrides initialLookback when set. 'MAX' fetches from epoch and renders whatever the datafeed returns — pair with a coarse resolution. The chart does not auto-adjust resolution; pair with suggestResolutionForPeriod() / suggestPeriodForResolution() to couple the two." },
|
|
561
562
|
"seriesType": { "type": "enum", "values": ["candle", "bar", "line", "area"], "default": "candle", "notes": "'bar' = OHLC bars (vertical high-low line, left tick at open, right tick at close)." },
|
|
562
563
|
"timezone": { "type": "Timezone", "notes": "Controlled timezone for the crosshair time label. 'local' | 'utc' | IANA name. Pair with onTimezoneChange." },
|
|
563
564
|
"defaultTimezone": { "type": "Timezone", "default": "local", "notes": "Initial timezone when uncontrolled." },
|