react-klinecharts-ui 0.5.0 → 1.0.0
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 +201 -54
- package/dist/{chunk-DTBNTO4M.js → chunk-JD4NBJ5F.js} +149 -17
- package/dist/chunk-JD4NBJ5F.js.map +1 -0
- package/dist/{chunk-UJNJH3BS.cjs → chunk-LGYYJ2GP.cjs} +158 -23
- package/dist/chunk-LGYYJ2GP.cjs.map +1 -0
- package/dist/extensions.cjs +18 -6
- package/dist/extensions.d.cts +46 -10
- package/dist/extensions.d.ts +46 -10
- package/dist/extensions.js +1 -1
- package/dist/index.cjs +308 -168
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +76 -5
- package/dist/index.d.ts +76 -5
- package/dist/index.js +258 -124
- package/dist/index.js.map +1 -1
- package/package.json +15 -6
- package/dist/chunk-DTBNTO4M.js.map +0 -1
- package/dist/chunk-UJNJH3BS.cjs.map +0 -1
package/dist/extensions.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { OverlayTemplate } from '
|
|
1
|
+
import * as klinecharts from 'klinecharts';
|
|
2
|
+
import { OverlayTemplate } from 'klinecharts';
|
|
3
3
|
|
|
4
4
|
interface OrderLineFontStyle {
|
|
5
5
|
size?: number;
|
|
@@ -37,8 +37,11 @@ interface OrderLineLabelStyle {
|
|
|
37
37
|
offset?: OrderLinePadding;
|
|
38
38
|
}
|
|
39
39
|
interface OrderLineLineStyle {
|
|
40
|
-
/**
|
|
41
|
-
|
|
40
|
+
/**
|
|
41
|
+
* Line dash style. Default: "dashed". Note klinecharts only supports
|
|
42
|
+
* "solid" and "dashed"; a dotted effect is achieved via `dashedValue`.
|
|
43
|
+
*/
|
|
44
|
+
style?: "solid" | "dashed";
|
|
42
45
|
/** Line thickness. Default: 1 */
|
|
43
46
|
width?: number;
|
|
44
47
|
/** Dash pattern [dash, gap]. Default: [4, 2] (matches chart built-in lines) */
|
|
@@ -58,6 +61,22 @@ interface OrderLineExtendData {
|
|
|
58
61
|
}
|
|
59
62
|
declare const orderLine: OverlayTemplate;
|
|
60
63
|
|
|
64
|
+
interface AlertLineExtendData {
|
|
65
|
+
/** Primary color for the line, the y-axis mark bg, and label fallback. Default: "#ff9800" */
|
|
66
|
+
color?: string;
|
|
67
|
+
/** Text label displayed above the line. Defaults to the formatted price. */
|
|
68
|
+
text?: string;
|
|
69
|
+
/** Line style overrides. Default: dashed. */
|
|
70
|
+
line?: OrderLineLineStyle;
|
|
71
|
+
/** Y-axis price mark style overrides. */
|
|
72
|
+
mark?: OrderLineMarkStyle;
|
|
73
|
+
/** Text label style overrides. */
|
|
74
|
+
label?: OrderLineLabelStyle;
|
|
75
|
+
/** Whether to show a bell marker before the label text. Default: true */
|
|
76
|
+
showBell?: boolean;
|
|
77
|
+
}
|
|
78
|
+
declare const alertLine: OverlayTemplate;
|
|
79
|
+
|
|
61
80
|
interface DepthOverlayRow {
|
|
62
81
|
price: number;
|
|
63
82
|
qty: number;
|
|
@@ -76,15 +95,32 @@ interface DepthOverlayExtendData {
|
|
|
76
95
|
declare const depthOverlay: OverlayTemplate;
|
|
77
96
|
|
|
78
97
|
/**
|
|
79
|
-
*
|
|
80
|
-
|
|
81
|
-
|
|
98
|
+
* Drawing-tool overlays registered by default.
|
|
99
|
+
*/
|
|
100
|
+
declare const overlays: klinecharts.OverlayTemplate[];
|
|
101
|
+
/**
|
|
102
|
+
* Optional feature overlays that are also registered automatically, so
|
|
103
|
+
* consumers don't have to pass them through the `overlays` provider prop:
|
|
104
|
+
*
|
|
105
|
+
* - `orderLine` — drawn by `useOrderLines`.
|
|
106
|
+
* - `alertLine` — drawn by `useAlerts`.
|
|
107
|
+
* - `depthOverlay` — order-book depth visualization.
|
|
108
|
+
*
|
|
109
|
+
* `useAlerts` additionally registers `alertLine` lazily (see
|
|
110
|
+
* `ensureAlertLineRegistered`) so it works even when automatic registration
|
|
111
|
+
* is disabled on the provider.
|
|
82
112
|
*/
|
|
83
|
-
declare const
|
|
113
|
+
declare const featureOverlays: klinecharts.OverlayTemplate[];
|
|
84
114
|
/**
|
|
85
115
|
* Custom indicator templates (TradingView-style) registered by default.
|
|
86
116
|
*/
|
|
87
|
-
declare const indicators:
|
|
117
|
+
declare const indicators: klinecharts.IndicatorTemplate[];
|
|
88
118
|
declare function registerExtensions(): void;
|
|
119
|
+
/**
|
|
120
|
+
* Idempotently registers the `alertLine` overlay. Called by `useAlerts` before
|
|
121
|
+
* creating its first overlay so the template is always available regardless of
|
|
122
|
+
* whether the provider ran `registerExtensions()`.
|
|
123
|
+
*/
|
|
124
|
+
declare function ensureAlertLineRegistered(): void;
|
|
89
125
|
|
|
90
|
-
export { type DepthOverlayExtendData, type DepthOverlayRow, type OrderLineExtendData, type OrderLineFontStyle, type OrderLineLabelStyle, type OrderLineLineStyle, type OrderLineMarkStyle, type OrderLinePadding, depthOverlay, indicators, orderLine, overlays, registerExtensions };
|
|
126
|
+
export { type AlertLineExtendData, type DepthOverlayExtendData, type DepthOverlayRow, type OrderLineExtendData, type OrderLineFontStyle, type OrderLineLabelStyle, type OrderLineLineStyle, type OrderLineMarkStyle, type OrderLinePadding, alertLine, depthOverlay, ensureAlertLineRegistered, featureOverlays, indicators, orderLine, overlays, registerExtensions };
|
package/dist/extensions.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { depthOverlay_default as depthOverlay, indicators, orderLine_default as orderLine, overlays, registerExtensions } from './chunk-
|
|
1
|
+
export { alertLine_default as alertLine, depthOverlay_default as depthOverlay, ensureAlertLineRegistered, featureOverlays, indicators, orderLine_default as orderLine, overlays, registerExtensions } from './chunk-JD4NBJ5F.js';
|
|
2
2
|
//# sourceMappingURL=extensions.js.map
|
|
3
3
|
//# sourceMappingURL=extensions.js.map
|