@iccandle/selector 0.0.1 → 0.0.43

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
@@ -1,4 +1,4 @@
1
- # widget-iccandle
1
+ # @iccandle/selector
2
2
 
3
3
  React component that wraps an existing [TradingView Charting Library](https://www.tradingview.com/charting-library-docs/) widget and adds ICCandle’s **scanner UI**: a draggable popup to run pattern search over a user-selected bar range, with theming loaded from ICCandle’s API.
4
4
 
@@ -7,21 +7,29 @@ Published as ESM and CommonJS; component styles are bundled and injected at runt
7
7
  ## Install
8
8
 
9
9
  ```bash
10
- npm install widget-iccandle
10
+ npm install @iccandle/selector
11
11
  ```
12
12
 
13
+ ### How to get an API key
14
+
15
+ 1. Register or sign in at the [ICCandle corporate portal](https://corporate-iccandle.vercel.app/).
16
+ 2. Use **Create API key** in the dashboard.
17
+ 3. When selecting a service, choose **search** so the key is valid for this widget (remote theming, candle cache, and scanner validation).
18
+
19
+ Issued keys use the format `icc_search_` followed by 48 hexadecimal characters.
20
+
13
21
  ### Prerequisites
14
22
 
15
23
  - **React 18+** — `react` and `react-dom` are **peer dependencies** (install them in your app).
16
24
  - **TradingView Charting Library** — obtain it under your own license from TradingView, host the static assets (e.g. under `/charting_library/` in your public folder), and load the library at runtime. **This package does not ship the charting library.**
17
- - **ICCandle API key** — format `icc_search_` followed by 48 hex characters, issued by ICCandle for theme, candle cache, and scanner validation.
25
+ - **ICCandle API key** — required for theme, candle cache, and scanner validation; format `icc_search_` plus 48 hex characters. See [How to get an API key](#how-to-get-an-api-key) above.
18
26
 
19
27
  ## Quick start
20
28
 
21
29
  ```tsx
22
30
  import { useState } from "react";
23
31
  import type { IChartingLibraryWidget } from "charting_library/charting_library";
24
- import { SelectorWidget } from "widget-iccandle";
32
+ import { SelectorWidget } from "@iccandle/selector";
25
33
 
26
34
  function App() {
27
35
  const [chartWidget, setChartWidget] = useState<IChartingLibraryWidget | null>(
@@ -53,7 +61,7 @@ Replace the chart placeholder with your TradingView initialization and pass the
53
61
  ### Step 1 — Install the package
54
62
 
55
63
  ```bash
56
- npm install widget-iccandle
64
+ npm install @iccandle/selector
57
65
  ```
58
66
 
59
67
  Ensure `react` and `react-dom` are installed and meet the peer version range.
@@ -61,7 +69,7 @@ Ensure `react` and `react-dom` are installed and meet the peer version range.
61
69
  ### Step 2 — Host the Charting Library
62
70
 
63
71
  1. Copy the TradingView Charting Library build into a path your app can serve as static files (e.g. `public/charting_library/` in Vite or Create React App).
64
- 2. Import the library constructor from that path in your bundler setup (see TradingView’s integration docs for your framework). The library is **not** bundled inside `widget-iccandle`; it loads at runtime via `library_path` (or equivalent) on the widget options.
72
+ 2. Import the library constructor from that path in your bundler setup (see TradingView’s integration docs for your framework). The library is **not** bundled inside `@iccandle/selector`; it loads at runtime via `library_path` (or equivalent) on the widget options.
65
73
 
66
74
  ### Step 3 — Bootstrap TradingView and capture the widget instance
67
75
 
@@ -119,7 +127,7 @@ You must supply a valid `datafeed`, `symbol`, `interval`, `locale`, and any othe
119
127
  `SelectorWidget` must wrap the same subtree that contains the chart container so the scanner overlay positions correctly. Pass the live widget instance (or `null` while mounting):
120
128
 
121
129
  ```tsx
122
- import { SelectorWidget } from "widget-iccandle";
130
+ import { SelectorWidget } from "@iccandle/selector";
123
131
 
124
132
  const widgetKey = "icc_search_..."; // your ICCandle key
125
133
 
@@ -177,7 +185,7 @@ import type {
177
185
  ResolutionString,
178
186
  } from "charting_library/charting_library";
179
187
  import { widget } from "charting_library/charting_library";
180
- import { SelectorWidget } from "widget-iccandle";
188
+ import { SelectorWidget } from "@iccandle/selector";
181
189
 
182
190
  const LIBRARY_PATH = "/charting_library/";
183
191
  const WIDGET_KEY = "icc_search_your48hexcharactershere............";