@tradecanvas/svelte 1.0.7 → 1.0.13
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 +44 -44
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
# @tradecanvas/svelte
|
|
2
|
-
|
|
3
|
-
Svelte 5 component for [`@tradecanvas/chart`](https://www.npmjs.com/package/@tradecanvas/chart) — reactive props, runes, zero boilerplate.
|
|
4
|
-
|
|
5
|
-
## Install
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm install @tradecanvas/svelte @tradecanvas/chart
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
`svelte` (>= 5) is a peer dependency.
|
|
12
|
-
|
|
13
|
-
## Usage
|
|
14
|
-
|
|
15
|
-
```svelte
|
|
16
|
-
<script lang="ts">
|
|
17
|
-
import { TradeCanvas } from '@tradecanvas/svelte'
|
|
18
|
-
import type { Chart } from '@tradecanvas/chart'
|
|
19
|
-
|
|
20
|
-
let chart = $state<Chart | null>(null)
|
|
21
|
-
</script>
|
|
22
|
-
|
|
23
|
-
<div style="height: 500px">
|
|
24
|
-
<TradeCanvas
|
|
25
|
-
symbol="BTCUSDT"
|
|
26
|
-
timeframe="5m"
|
|
27
|
-
theme="dark"
|
|
28
|
-
indicators={['rsi', 'macd']}
|
|
29
|
-
bind:chart
|
|
30
|
-
/>
|
|
31
|
-
</div>
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
Streams live Binance data by default. Pass `data={bars}` for static OHLC, or `adapter={...}` for any feed. `bind:chart` gives you the underlying `Chart` (or use `onReady`).
|
|
35
|
-
|
|
36
|
-
## Props
|
|
37
|
-
|
|
38
|
-
`symbol`, `timeframe`, `theme`, `chartType`, `indicators`, `data`, `adapter`, `historyLimit`, `features`, `autoScale`, `signalMarkers`, `signalMarkerStyle`, `tradeZones`, `tradeZoneStyle`, `watermarkText`, `onReady`, and `bind:chart`.
|
|
39
|
-
|
|
40
|
-
Reach the underlying `Chart` (drawings, trading, execution adapters, plugins, resizable panes) via `bind:chart` or `onReady`. See the [main docs](https://github.com/bonguynvan/tradecanvas).
|
|
41
|
-
|
|
42
|
-
## License
|
|
43
|
-
|
|
44
|
-
MIT
|
|
1
|
+
# @tradecanvas/svelte
|
|
2
|
+
|
|
3
|
+
Svelte 5 component for [`@tradecanvas/chart`](https://www.npmjs.com/package/@tradecanvas/chart) — reactive props, runes, zero boilerplate.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @tradecanvas/svelte @tradecanvas/chart
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
`svelte` (>= 5) is a peer dependency.
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```svelte
|
|
16
|
+
<script lang="ts">
|
|
17
|
+
import { TradeCanvas } from '@tradecanvas/svelte'
|
|
18
|
+
import type { Chart } from '@tradecanvas/chart'
|
|
19
|
+
|
|
20
|
+
let chart = $state<Chart | null>(null)
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<div style="height: 500px">
|
|
24
|
+
<TradeCanvas
|
|
25
|
+
symbol="BTCUSDT"
|
|
26
|
+
timeframe="5m"
|
|
27
|
+
theme="dark"
|
|
28
|
+
indicators={['rsi', 'macd']}
|
|
29
|
+
bind:chart
|
|
30
|
+
/>
|
|
31
|
+
</div>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Streams live Binance data by default. Pass `data={bars}` for static OHLC, or `adapter={...}` for any feed. `bind:chart` gives you the underlying `Chart` (or use `onReady`).
|
|
35
|
+
|
|
36
|
+
## Props
|
|
37
|
+
|
|
38
|
+
`symbol`, `timeframe`, `theme`, `chartType`, `indicators`, `data`, `adapter`, `historyLimit`, `features`, `autoScale`, `signalMarkers`, `signalMarkerStyle`, `tradeZones`, `tradeZoneStyle`, `watermarkText`, `onReady`, and `bind:chart`.
|
|
39
|
+
|
|
40
|
+
Reach the underlying `Chart` (drawings, trading, execution adapters, plugins, resizable panes) via `bind:chart` or `onReady`. See the [main docs](https://github.com/bonguynvan/tradecanvas).
|
|
41
|
+
|
|
42
|
+
## License
|
|
43
|
+
|
|
44
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tradecanvas/svelte",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.13",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Svelte 5 component for @tradecanvas/chart — reactive props, runes, zero boilerplate.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"README.md"
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@tradecanvas/chart": "1.
|
|
38
|
+
"@tradecanvas/chart": "1.10.0"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"svelte": ">=5.0.0"
|