viainti-chart 1.0.0 → 1.0.1
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 +17 -4
- package/dist/index.cjs +1 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,10 +5,12 @@ Advanced React OHLC charting library with TradingView-style interface, built by
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm install
|
|
8
|
+
npm install viainti-chart
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
> The package ships ESM, CommonJS and type definitions. Requires React, React DOM, and Framer Motion as peer dependencies.
|
|
12
|
+
>
|
|
13
|
+
> If npm reports `ERR! 404 Not Found`, run `npm view viainti-chart version` to confirm the package exists, check your registry with `npm config get registry`, and clear any stale cache via `npm cache verify` (or `npm cache clean --force`) before retrying the install.
|
|
12
14
|
|
|
13
15
|
## Usage
|
|
14
16
|
|
|
@@ -16,7 +18,7 @@ npm install intitrading
|
|
|
16
18
|
|
|
17
19
|
```tsx
|
|
18
20
|
import React from 'react';
|
|
19
|
-
import { TradingViewChart, OHLCData } from '
|
|
21
|
+
import { TradingViewChart, OHLCData } from 'viainti-chart';
|
|
20
22
|
|
|
21
23
|
const data: OHLCData[] = [
|
|
22
24
|
{ open: 100, high: 110, low: 95, close: 105, volume: 1200, timestamp: Date.now() - 60000 },
|
|
@@ -37,7 +39,7 @@ export default function Demo() {
|
|
|
37
39
|
```tsx
|
|
38
40
|
'use client';
|
|
39
41
|
|
|
40
|
-
import { TradingViewChart, OHLCData } from '
|
|
42
|
+
import { TradingViewChart, OHLCData } from 'viainti-chart';
|
|
41
43
|
|
|
42
44
|
const data: OHLCData[] = [
|
|
43
45
|
{ open: 100, high: 110, low: 95, close: 105, volume: 1200, timestamp: Date.now() },
|
|
@@ -55,7 +57,7 @@ export default function ChartBlock() {
|
|
|
55
57
|
### Minimal canvas
|
|
56
58
|
|
|
57
59
|
```tsx
|
|
58
|
-
import { Chart, OHLCData } from '
|
|
60
|
+
import { Chart, OHLCData } from 'viainti-chart';
|
|
59
61
|
|
|
60
62
|
const sample: OHLCData[] = [{ open: 10, high: 12, low: 9, close: 11 }];
|
|
61
63
|
|
|
@@ -74,6 +76,7 @@ export function Spark() {
|
|
|
74
76
|
- `data: OHLCData[]`
|
|
75
77
|
- `width?: number` (default `800`)
|
|
76
78
|
- `height?: number` (default `400`)
|
|
79
|
+
- Available through both `Chart` and the alias `OHLCChart` for backwards compatibility.
|
|
77
80
|
|
|
78
81
|
### `OHLCData`
|
|
79
82
|
```ts
|
|
@@ -118,6 +121,16 @@ These entry points are referenced in `package.json` exports, so they can be publ
|
|
|
118
121
|
npm run dev # launches the Vite example in /example
|
|
119
122
|
```
|
|
120
123
|
|
|
124
|
+
## Publishing a new version
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
npm run build # ensure dist/ is up to date
|
|
128
|
+
npm version patch # or minor/major as needed
|
|
129
|
+
npm publish --access public
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
> If `npm publish` returns `Access token expired or revoked`, run `npm logout`, then authenticate again with `npm login` (or `npm adduser`) before retrying. Use `npm whoami` to confirm the session is active and `npm config get registry` to ensure you're pushing to `https://registry.npmjs.org/`.
|
|
133
|
+
|
|
121
134
|
## Credits
|
|
122
135
|
|
|
123
136
|
Built by [Viainti](https://www.viainti.com) - Advanced fintech solutions and trading tools.
|
package/dist/index.cjs
CHANGED
|
@@ -3807,5 +3807,6 @@ const TradingViewChart = ({ data, symbol = 'BTC/USDT', onTimeframeChange }) => {
|
|
|
3807
3807
|
var TradingViewChart_default = React.memo(TradingViewChart);
|
|
3808
3808
|
|
|
3809
3809
|
exports.Chart = Chart;
|
|
3810
|
+
exports.OHLCChart = Chart;
|
|
3810
3811
|
exports.TradingViewChart = TradingViewChart_default;
|
|
3811
3812
|
//# sourceMappingURL=index.cjs.map
|