@christtrade/depth 0.12.21

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.
Files changed (171) hide show
  1. package/LICENSE.md +201 -0
  2. package/NOTICE +15 -0
  3. package/README.md +159 -0
  4. package/depth.cjs +1136 -0
  5. package/depth.css +2 -0
  6. package/depth.mjs +1136 -0
  7. package/depth.nopreflight.css +2 -0
  8. package/index.d.ts +1 -0
  9. package/package.json +32 -0
  10. package/types/ChartInner.d.ts +114 -0
  11. package/types/ChartOuter.d.ts +31 -0
  12. package/types/components/account/AccountSummary.d.ts +8 -0
  13. package/types/components/chart/chart-context-menu.d.ts +30 -0
  14. package/types/components/chart/chart-settings-dialog.d.ts +15 -0
  15. package/types/components/chart/chart-status-overlay.d.ts +24 -0
  16. package/types/components/chart/data-status.d.ts +10 -0
  17. package/types/components/chart/pane-legend.d.ts +37 -0
  18. package/types/components/chart/session-status-badge.d.ts +14 -0
  19. package/types/components/chart/status-bar.d.ts +9 -0
  20. package/types/components/chart/symbol-icon.d.ts +9 -0
  21. package/types/components/chart/tz.d.ts +10 -0
  22. package/types/components/drawings/drawing-icons.d.ts +2 -0
  23. package/types/components/drawings/drawing-settings-bar.d.ts +15 -0
  24. package/types/components/drawings/drawing-settings-dialog.d.ts +268 -0
  25. package/types/components/drawings/drawing-toolbar.d.ts +14 -0
  26. package/types/components/drawings/drawing-tools.d.ts +23 -0
  27. package/types/components/indicators/indicators-dialog.d.ts +20 -0
  28. package/types/components/indicators/indicators-settings-dialog.d.ts +164 -0
  29. package/types/components/multi-chart/GridDividers.d.ts +12 -0
  30. package/types/components/multi-chart/LayoutPicker.d.ts +19 -0
  31. package/types/components/plugin-panels/BottomBarPluginHost.d.ts +7 -0
  32. package/types/components/plugin-panels/PluginFixedPanelHost.d.ts +18 -0
  33. package/types/components/plugin-panels/PluginToolbarHost.d.ts +7 -0
  34. package/types/components/plugin-panels/PluginWindowsDropdown.d.ts +7 -0
  35. package/types/components/plugins/plugin-manager-dialog.d.ts +14 -0
  36. package/types/components/toolbar/SymbolSwitcher.d.ts +8 -0
  37. package/types/components/toolbar/chart-icons.d.ts +16 -0
  38. package/types/components/toolbar/chart-type-selector.d.ts +11 -0
  39. package/types/components/toolbar/timeframe-selector.d.ts +15 -0
  40. package/types/components/trading/OrderPanel.d.ts +36 -0
  41. package/types/components/trading/QuickTradingButtons.d.ts +7 -0
  42. package/types/components/trading/order-math.d.ts +94 -0
  43. package/types/components/ui/button.d.ts +11 -0
  44. package/types/components/ui/checkbox.d.ts +4 -0
  45. package/types/components/ui/color-picker.d.ts +12 -0
  46. package/types/components/ui/dialog.d.ts +19 -0
  47. package/types/components/ui/dropdown-menu.d.ts +27 -0
  48. package/types/components/ui/hover-card.d.ts +6 -0
  49. package/types/components/ui/input.d.ts +4 -0
  50. package/types/components/ui/popover.d.ts +7 -0
  51. package/types/components/ui/resizable.d.ts +23 -0
  52. package/types/components/ui/separator.d.ts +4 -0
  53. package/types/components/ui/slider.d.ts +4 -0
  54. package/types/components/ui/switch.d.ts +4 -0
  55. package/types/components/ui/tooltip.d.ts +7 -0
  56. package/types/core/AccountManager.d.ts +142 -0
  57. package/types/core/ChartModel.d.ts +84 -0
  58. package/types/core/ChartState.d.ts +51 -0
  59. package/types/core/ChartTypeRegistry.d.ts +27 -0
  60. package/types/core/DataEngine.d.ts +143 -0
  61. package/types/core/DataSourceRegistry.d.ts +106 -0
  62. package/types/core/DepthChart.d.ts +458 -0
  63. package/types/core/DrawingRegistry.d.ts +133 -0
  64. package/types/core/DrawingStore.d.ts +26 -0
  65. package/types/core/ExecutionEngine.d.ts +95 -0
  66. package/types/core/GlobalChartBus.d.ts +32 -0
  67. package/types/core/Playback.d.ts +48 -0
  68. package/types/core/PlaybackStateRegistry.d.ts +25 -0
  69. package/types/core/PluginRegistry.d.ts +67 -0
  70. package/types/core/PluginSchedule.d.ts +15 -0
  71. package/types/core/RenderEngine.d.ts +143 -0
  72. package/types/core/ScriptedPlugin.d.ts +153 -0
  73. package/types/core/SessionMapper.d.ts +54 -0
  74. package/types/core/SessionUtils.d.ts +53 -0
  75. package/types/core/TypedEventBus.d.ts +691 -0
  76. package/types/core/WasmPluginHost.d.ts +39 -0
  77. package/types/core/index.d.ts +70 -0
  78. package/types/core/plugin-startup.d.ts +33 -0
  79. package/types/core/processing/data-chunk.d.ts +37 -0
  80. package/types/core/processing/data-level.d.ts +13 -0
  81. package/types/core/processing/l2-processor.d.ts +10 -0
  82. package/types/core/processing/l3-processor.d.ts +26 -0
  83. package/types/core/processing/ohlcv-processor.d.ts +14 -0
  84. package/types/core/processing/tick-processor.d.ts +14 -0
  85. package/types/core/script-dsl.d.ts +20 -0
  86. package/types/core/script-scope.d.ts +4 -0
  87. package/types/core/script.worker.d.ts +1 -0
  88. package/types/hooks/useCellBridges.d.ts +36 -0
  89. package/types/hooks/useChartData.d.ts +153 -0
  90. package/types/hooks/useChartHandlers.d.ts +94 -0
  91. package/types/hooks/useChartInteraction.d.ts +160 -0
  92. package/types/hooks/useChartLayout.d.ts +21 -0
  93. package/types/hooks/useChartPlugin.d.ts +34 -0
  94. package/types/hooks/useChartSettings.d.ts +44 -0
  95. package/types/hooks/useChartSubscriptions.d.ts +64 -0
  96. package/types/hooks/useChartView.d.ts +47 -0
  97. package/types/hooks/usePlaybackEngine.d.ts +85 -0
  98. package/types/hooks/useRenderEngine.d.ts +64 -0
  99. package/types/hooks/useTradeLines.d.ts +80 -0
  100. package/types/hooks/useTradingState.d.ts +135 -0
  101. package/types/interfaces/IAccountAdapter.d.ts +38 -0
  102. package/types/interfaces/ICoordinateTransformer.d.ts +105 -0
  103. package/types/interfaces/IDataAdapter.d.ts +402 -0
  104. package/types/interfaces/IExecutionAdapter.d.ts +71 -0
  105. package/types/interfaces/plugins/IChartPlugin.d.ts +254 -0
  106. package/types/interfaces/plugins/IChartTypePlugin.d.ts +126 -0
  107. package/types/interfaces/plugins/IDataSourcePlugin.d.ts +20 -0
  108. package/types/interfaces/plugins/IDrawingPlugin.d.ts +62 -0
  109. package/types/interfaces/plugins/IIndicatorPlugin.d.ts +97 -0
  110. package/types/interfaces/plugins/index.d.ts +5 -0
  111. package/types/lib/bar-grid.d.ts +6 -0
  112. package/types/lib/book.d.ts +5 -0
  113. package/types/lib/clock.d.ts +7 -0
  114. package/types/lib/compact-buffer.d.ts +66 -0
  115. package/types/lib/constants.d.ts +5 -0
  116. package/types/lib/createSimulatedAdapter.d.ts +42 -0
  117. package/types/lib/dpr.d.ts +27 -0
  118. package/types/lib/heatmap.worker.d.ts +1 -0
  119. package/types/lib/indicator-stdlib.d.ts +426 -0
  120. package/types/lib/indicator-worker.d.ts +65 -0
  121. package/types/lib/matchingEngine.d.ts +144 -0
  122. package/types/lib/notifications/tradeToast.d.ts +31 -0
  123. package/types/lib/pointer-lock.d.ts +5 -0
  124. package/types/lib/priceFormat.d.ts +17 -0
  125. package/types/lib/priceTransition.d.ts +22 -0
  126. package/types/lib/renderers/drawFootprintChart.d.ts +5 -0
  127. package/types/lib/renderers/drawTradeLines.d.ts +112 -0
  128. package/types/lib/renderers/drawings-renderer.d.ts +57 -0
  129. package/types/lib/renderers/renderer.d.ts +113 -0
  130. package/types/lib/sampler.d.ts +7 -0
  131. package/types/lib/series/japaneseCharts.d.ts +88 -0
  132. package/types/lib/slice-worker-client.d.ts +138 -0
  133. package/types/lib/slice.worker.d.ts +139 -0
  134. package/types/lib/storage.d.ts +108 -0
  135. package/types/lib/symbol-info.d.ts +12 -0
  136. package/types/lib/symbol-search.d.ts +29 -0
  137. package/types/lib/timeframes.d.ts +46 -0
  138. package/types/lib/tradingview-import.d.ts +32 -0
  139. package/types/lib/types/chart-settings.d.ts +90 -0
  140. package/types/lib/types/drawing-types.d.ts +393 -0
  141. package/types/lib/types/footprint.d.ts +119 -0
  142. package/types/lib/types/heatmap-types.d.ts +30 -0
  143. package/types/lib/types/index.d.ts +147 -0
  144. package/types/lib/types/indicator-types.d.ts +123 -0
  145. package/types/lib/types/layout-sync.d.ts +43 -0
  146. package/types/lib/types/trading-types.d.ts +323 -0
  147. package/types/lib/use-forwarded-ref.d.ts +1 -0
  148. package/types/lib/utils.d.ts +2 -0
  149. package/types/plugins/alligator.d.ts +1 -0
  150. package/types/plugins/atr.d.ts +1 -0
  151. package/types/plugins/awesome-oscillator.d.ts +1 -0
  152. package/types/plugins/bollinger-bands.d.ts +1 -0
  153. package/types/plugins/cci.d.ts +1 -0
  154. package/types/plugins/cvd.d.ts +1 -0
  155. package/types/plugins/donchian.d.ts +1 -0
  156. package/types/plugins/ichimoku.d.ts +1 -0
  157. package/types/plugins/index.d.ts +25 -0
  158. package/types/plugins/keltner.d.ts +1 -0
  159. package/types/plugins/macd.d.ts +1 -0
  160. package/types/plugins/mfi.d.ts +1 -0
  161. package/types/plugins/moving-average.d.ts +1 -0
  162. package/types/plugins/obv.d.ts +1 -0
  163. package/types/plugins/psar.d.ts +1 -0
  164. package/types/plugins/rsi.d.ts +1 -0
  165. package/types/plugins/sessions.d.ts +1 -0
  166. package/types/plugins/stochastic.d.ts +1 -0
  167. package/types/plugins/supertrend.d.ts +1 -0
  168. package/types/plugins/volume.d.ts +1 -0
  169. package/types/plugins/vwap.d.ts +1 -0
  170. package/types/plugins/williams-r.d.ts +1 -0
  171. package/types/react/useDepthChart.d.ts +6 -0
@@ -0,0 +1,9 @@
1
+ import type { TypedEventBus } from '../../core/TypedEventBus';
2
+ import type { ChartType } from '../../lib/types';
3
+ import type { ChartSettings } from '../../lib/types/chart-settings';
4
+ export declare function StatusBar({ cellId, eventBus, chartType, chartSettings, }: {
5
+ cellId: number;
6
+ eventBus: TypedEventBus;
7
+ chartType: ChartType;
8
+ chartSettings: ChartSettings;
9
+ }): import("react").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import type { SymbolIcon as SymbolIconSpec } from '../../interfaces/IDataAdapter';
2
+ interface SymbolIconProps {
3
+ icon?: SymbolIconSpec;
4
+ size?: number;
5
+ className?: string;
6
+ fallback?: string;
7
+ }
8
+ export declare function SymbolIcon({ icon, size, className, fallback }: SymbolIconProps): import("react").JSX.Element;
9
+ export {};
@@ -0,0 +1,10 @@
1
+ interface TimezoneSelectProps {
2
+ value: string;
3
+ onChange: (tz: string) => void;
4
+ use24Hour?: boolean;
5
+ onOpenChange?: (open: boolean) => void;
6
+ compact?: boolean;
7
+ horizon: bigint;
8
+ }
9
+ export declare function TimezoneSelect({ value, onChange, use24Hour, onOpenChange, compact, horizon, }: TimezoneSelectProps): import("react").JSX.Element;
10
+ export {};
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const DrawIcons: Record<string, React.ReactNode>;
@@ -0,0 +1,15 @@
1
+ import type { Drawing } from '../../lib/types/drawing-types';
2
+ interface DrawingSettingsBarProps {
3
+ drawing: Drawing;
4
+ containerRef: React.RefObject<HTMLElement>;
5
+ onUpdate: (patch: Partial<Drawing>) => void;
6
+ onDelete: () => void;
7
+ onDuplicate: () => void;
8
+ onClose: () => void;
9
+ onMouseEnter?: () => void;
10
+ onMouseLeave?: () => void;
11
+ onRequestOrderTicket?: (drawingId: string) => void;
12
+ openDialog?: boolean;
13
+ }
14
+ export declare function DrawingSettingsBar({ drawing, containerRef, onUpdate, onDelete, onDuplicate, onClose, onMouseEnter, onMouseLeave, onRequestOrderTicket, openDialog: openDialogProp, }: DrawingSettingsBarProps): import("react").JSX.Element;
15
+ export {};
@@ -0,0 +1,268 @@
1
+ import type { Drawing } from '../../lib/types/drawing-types';
2
+ export type StyleField = {
3
+ type: 'color';
4
+ key: string;
5
+ label: string;
6
+ disabledWhenFalse?: string;
7
+ } | {
8
+ type: 'lineWidth';
9
+ key: string;
10
+ label: string;
11
+ } | {
12
+ type: 'dash';
13
+ key: string;
14
+ label: string;
15
+ } | {
16
+ type: 'opacity';
17
+ key: string;
18
+ label: string;
19
+ } | {
20
+ type: 'fontSize';
21
+ key: string;
22
+ label: string;
23
+ } | {
24
+ type: 'slider';
25
+ key: string;
26
+ label: string;
27
+ max: number;
28
+ min: number;
29
+ step: number;
30
+ step1: string;
31
+ step2: string;
32
+ step3: string;
33
+ prefix?: string;
34
+ suffix?: string;
35
+ } | {
36
+ type: 'extend';
37
+ leftKey: string;
38
+ rightKey: string;
39
+ label: string;
40
+ } | {
41
+ type: 'toggle';
42
+ key: string;
43
+ label: string;
44
+ } | {
45
+ type: 'customLevels';
46
+ label: string;
47
+ } | {
48
+ type: 'channelLevels';
49
+ label: string;
50
+ } | {
51
+ type: 'numberInput';
52
+ key: string;
53
+ label: string;
54
+ min?: number;
55
+ max?: number;
56
+ step?: number;
57
+ unit?: string;
58
+ } | {
59
+ type: 'textInput';
60
+ key: string;
61
+ label: string;
62
+ placeholder?: string;
63
+ maxLength?: number;
64
+ } | {
65
+ type: 'select';
66
+ key: string;
67
+ label: string;
68
+ options: {
69
+ value: string;
70
+ label: string;
71
+ }[];
72
+ } | {
73
+ type: 'buttonGroup';
74
+ key: string;
75
+ label: string;
76
+ options: {
77
+ value: string;
78
+ label: string;
79
+ icon?: React.ReactNode;
80
+ }[];
81
+ } | {
82
+ type: 'stepperInt';
83
+ key: string;
84
+ label: string;
85
+ min?: number;
86
+ max?: number;
87
+ step?: number;
88
+ } | {
89
+ type: 'rangeWithSteps';
90
+ key: string;
91
+ label: string;
92
+ min: number;
93
+ max: number;
94
+ steps: {
95
+ value: number;
96
+ label: string;
97
+ }[];
98
+ } | {
99
+ type: 'dualColor';
100
+ keyA: string;
101
+ labelA: string;
102
+ keyB: string;
103
+ labelB: string;
104
+ label: string;
105
+ } | {
106
+ type: 'dualOpacity';
107
+ keyA: string;
108
+ labelA: string;
109
+ keyB: string;
110
+ labelB: string;
111
+ label: string;
112
+ } | {
113
+ type: 'colorGradient';
114
+ keyStart: string;
115
+ keyEnd: string;
116
+ label: string;
117
+ } | {
118
+ type: 'marginInput';
119
+ keys: {
120
+ top: string;
121
+ right: string;
122
+ bottom: string;
123
+ left: string;
124
+ };
125
+ label: string;
126
+ unit?: string;
127
+ } | {
128
+ type: 'anchorAlign';
129
+ key: string;
130
+ label: string;
131
+ } | {
132
+ type: 'capStyle';
133
+ key: string;
134
+ label: string;
135
+ } | {
136
+ type: 'joinStyle';
137
+ key: string;
138
+ label: string;
139
+ } | {
140
+ type: 'arrowHead';
141
+ startKey: string;
142
+ endKey: string;
143
+ label: string;
144
+ } | {
145
+ type: 'checkbox';
146
+ key: string;
147
+ label: string;
148
+ description?: string;
149
+ } | {
150
+ type: 'toggledInput';
151
+ toggleKey: string;
152
+ toggleLabel: string;
153
+ inputKey: string;
154
+ inputLabel: string;
155
+ min?: number;
156
+ max?: number;
157
+ step?: number;
158
+ unit?: string;
159
+ } | {
160
+ type: 'colorWithOpacity';
161
+ colorKey: string;
162
+ opacityKey: string;
163
+ label: string;
164
+ } | {
165
+ type: 'toggledColor';
166
+ toggleKey: string;
167
+ colorKey: string;
168
+ label: string;
169
+ } | {
170
+ type: 'inlineFields';
171
+ label: string;
172
+ fields: Array | {
173
+ type: 'stepperInt';
174
+ key: string;
175
+ label: string;
176
+ min?: number;
177
+ max?: number;
178
+ step?: number;
179
+ } | {
180
+ type: 'buttonGroup';
181
+ key: string;
182
+ options: {
183
+ value: string;
184
+ label: string;
185
+ icon?: React.ReactNode;
186
+ }[];
187
+ } | {
188
+ type: 'checkbox';
189
+ key: string;
190
+ label: string;
191
+ };
192
+ };
193
+ export declare const color: (key: string, label?: string, disabledWhenFalse?: string) => StyleField;
194
+ export declare const lineWidth: (key: string, label?: string) => StyleField;
195
+ export declare const dash: (key: string, label?: string) => StyleField;
196
+ export declare const opacity: (key: string, label: string) => StyleField;
197
+ export declare const fontSize: (key: string, label: string) => StyleField;
198
+ export declare const slider: (key: string, label: string, max: number, min: number, step: number, step1: string, step2: string, step3: string, prefix?: string, suffix?: string) => StyleField;
199
+ export declare const extend: (leftKey: string, rightKey: string, label?: string) => StyleField;
200
+ export declare const toggle: (key: string, label: string) => StyleField;
201
+ export declare const numberInput: (key: string, label: string, opts?: {
202
+ min?: number;
203
+ max?: number;
204
+ step?: number;
205
+ unit?: string;
206
+ }) => StyleField;
207
+ export declare const textInput: (key: string, label: string, opts?: {
208
+ placeholder?: string;
209
+ maxLength?: number;
210
+ }) => StyleField;
211
+ export declare const select: (key: string, label: string, options: {
212
+ value: string;
213
+ label: string;
214
+ }[]) => StyleField;
215
+ export declare const buttonGroup: (key: string, label: string, options: {
216
+ value: string;
217
+ label: string;
218
+ icon?: React.ReactNode;
219
+ }[]) => StyleField;
220
+ export declare const stepperInt: (key: string, label: string, opts?: {
221
+ min?: number;
222
+ max?: number;
223
+ step?: number;
224
+ }) => StyleField;
225
+ export declare const rangeWithSteps: (key: string, label: string, min: number, max: number, steps: {
226
+ value: number;
227
+ label: string;
228
+ }[]) => StyleField;
229
+ export declare const dualColor: (keyA: string, labelA: string, keyB: string, labelB: string, label: string) => StyleField;
230
+ export declare const dualOpacity: (keyA: string, labelA: string, keyB: string, labelB: string, label: string) => StyleField;
231
+ export declare const colorGradient: (keyStart: string, keyEnd: string, label: string) => StyleField;
232
+ export declare const marginInput: (keys: {
233
+ top: string;
234
+ right: string;
235
+ bottom: string;
236
+ left: string;
237
+ }, label: string, unit?: string) => StyleField;
238
+ export declare const anchorAlign: (key: string, label?: string) => StyleField;
239
+ export declare const capStyle: (key: string, label?: string) => StyleField;
240
+ export declare const joinStyle: (key: string, label?: string) => StyleField;
241
+ export declare const arrowHead: (startKey: string, endKey: string, label?: string) => StyleField;
242
+ export declare const checkbox: (key: string, label: string, description?: string) => StyleField;
243
+ export declare const toggledInput: (toggleKey: string, toggleLabel: string, inputKey: string, inputLabel: string, opts?: {
244
+ min?: number;
245
+ max?: number;
246
+ step?: number;
247
+ unit?: string;
248
+ }) => StyleField;
249
+ export declare const colorWithOpacity: (colorKey: string, opacityKey: string, label: string) => StyleField;
250
+ export declare const toggledColor: (toggleKey: string, colorKey: string, label: string) => StyleField;
251
+ export declare const inlineFields: (label: string, fields: Extract<StyleField, {
252
+ type: "inlineFields";
253
+ }>["fields"]) => StyleField;
254
+ export declare function fieldKey(field: StyleField, i: number): string;
255
+ interface DrawingSettingsDialogProps {
256
+ drawing: Drawing;
257
+ onUpdate: (patch: Partial<Drawing>) => void;
258
+ onClose: () => void;
259
+ onMouseEnter?: () => void;
260
+ onMouseLeave?: () => void;
261
+ }
262
+ export declare function DrawingSettingsDialog({ drawing, onUpdate, onClose, onMouseEnter, onMouseLeave, }: DrawingSettingsDialogProps): import("react").JSX.Element;
263
+ export declare function StyleFieldControl({ field, drawing, onUpdate, }: {
264
+ field: StyleField;
265
+ drawing: any;
266
+ onUpdate: (patch: any) => void;
267
+ }): import("react").JSX.Element;
268
+ export {};
@@ -0,0 +1,14 @@
1
+ import type { DrawingTool } from '../../lib/types/drawing-types';
2
+ import React from 'react';
3
+ import type { PluginIcon } from '../../core';
4
+ export { TOOL_SHORTCUTS } from './drawing-tools';
5
+ interface DrawingToolbarProps {
6
+ activeTool: DrawingTool;
7
+ onToolChange: (tool: DrawingTool) => void;
8
+ pluginDrawings: {
9
+ id: DrawingTool;
10
+ name: string;
11
+ icon?: PluginIcon;
12
+ }[];
13
+ }
14
+ export declare function DrawingToolbar({ activeTool, onToolChange, pluginDrawings }: DrawingToolbarProps): React.JSX.Element;
@@ -0,0 +1,23 @@
1
+ import type { DrawingTool } from '../../lib/types/drawing-types';
2
+ import React from 'react';
3
+ export type DrawingItem = {
4
+ tool: DrawingTool;
5
+ label: string;
6
+ icon: React.ReactNode;
7
+ shortcut?: string;
8
+ implemented?: boolean;
9
+ };
10
+ export type DrawingGroup = {
11
+ label: string;
12
+ items: DrawingItem[];
13
+ };
14
+ export type DrawingCategory = {
15
+ id: string;
16
+ label: string;
17
+ icon: React.ReactNode;
18
+ groups: DrawingGroup[];
19
+ };
20
+ export declare const DRAWING_CATEGORIES: DrawingCategory[];
21
+ export declare const ALL_DRAWING_ITEMS: DrawingItem[];
22
+ export declare function findDrawingItem(tool: string): DrawingItem | undefined;
23
+ export declare const TOOL_SHORTCUTS: Record<string, DrawingTool>;
@@ -0,0 +1,20 @@
1
+ import type { ChartPane, Indicator } from '../../lib/types/indicator-types';
2
+ import type { DataLevel } from '../../interfaces/IDataAdapter';
3
+ export interface PluginIndicatorDef {
4
+ indicator: Indicator;
5
+ pane?: ChartPane;
6
+ activeByDefault?: boolean;
7
+ }
8
+ export type BuiltinCategory = 'volume' | 'orderflow' | 'momentum' | 'trend' | 'volatility' | 'experimental' | 'other';
9
+ interface IndicatorsButtonProps {
10
+ indicators: Indicator[];
11
+ dataLevel: DataLevel;
12
+ onAdd: (defId: string) => void;
13
+ onToggle: (indicatorId: string) => void;
14
+ onRemove: (indicatorId: string) => void;
15
+ onOpenChange?: (open: boolean) => void;
16
+ pluginIndicators?: PluginIndicatorDef[];
17
+ onActivatePlugin?: (def: PluginIndicatorDef) => void;
18
+ }
19
+ export declare function IndicatorsButton({ indicators, dataLevel, onAdd, onToggle, onRemove, onOpenChange, pluginIndicators, onActivatePlugin, }: IndicatorsButtonProps): import("react").JSX.Element;
20
+ export {};
@@ -0,0 +1,164 @@
1
+ import type { Indicator } from '../../lib/types/indicator-types';
2
+ type FieldTab = 'params' | 'style';
3
+ type BaseField = {
4
+ tab?: FieldTab;
5
+ };
6
+ export type IndicatorSettingField = BaseField & ({
7
+ type: 'color';
8
+ key: string;
9
+ label: string;
10
+ } | {
11
+ type: 'toggle';
12
+ key: string;
13
+ label: string;
14
+ description?: string;
15
+ } | {
16
+ type: 'opacity';
17
+ key: string;
18
+ label: string;
19
+ } | {
20
+ type: 'fontSize';
21
+ key: string;
22
+ label: string;
23
+ } | {
24
+ type: 'slider';
25
+ key: string;
26
+ label: string;
27
+ min: number;
28
+ max: number;
29
+ step: number;
30
+ suffix?: string;
31
+ } | {
32
+ type: 'numberInput';
33
+ key: string;
34
+ label: string;
35
+ min?: number;
36
+ max?: number;
37
+ step?: number;
38
+ unit?: string;
39
+ } | {
40
+ type: 'textInput';
41
+ key: string;
42
+ label: string;
43
+ placeholder?: string;
44
+ maxLength?: number;
45
+ } | {
46
+ type: 'select';
47
+ key: string;
48
+ label: string;
49
+ options: {
50
+ value: string;
51
+ label: string;
52
+ }[];
53
+ } | {
54
+ type: 'buttonGroup';
55
+ key: string;
56
+ label: string;
57
+ options: {
58
+ value: string;
59
+ label: string;
60
+ icon?: React.ReactNode;
61
+ }[];
62
+ } | {
63
+ type: 'stepperInt';
64
+ key: string;
65
+ label: string;
66
+ min?: number;
67
+ max?: number;
68
+ step?: number;
69
+ } | {
70
+ type: 'rangeWithSteps';
71
+ key: string;
72
+ label: string;
73
+ min: number;
74
+ max: number;
75
+ steps: {
76
+ value: number;
77
+ label: string;
78
+ }[];
79
+ } | {
80
+ type: 'dualColor';
81
+ keyA: string;
82
+ labelA: string;
83
+ keyB: string;
84
+ labelB: string;
85
+ label: string;
86
+ } | {
87
+ type: 'dualOpacity';
88
+ keyA: string;
89
+ labelA: string;
90
+ keyB: string;
91
+ labelB: string;
92
+ label: string;
93
+ } | {
94
+ type: 'colorGradient';
95
+ keyStart: string;
96
+ keyEnd: string;
97
+ label: string;
98
+ } | {
99
+ type: 'checkbox';
100
+ key: string;
101
+ label: string;
102
+ description?: string;
103
+ } | {
104
+ type: 'toggledInput';
105
+ toggleKey: string;
106
+ toggleLabel: string;
107
+ inputKey: string;
108
+ inputLabel: string;
109
+ min?: number;
110
+ max?: number;
111
+ step?: number;
112
+ unit?: string;
113
+ } | {
114
+ type: 'colorWithOpacity';
115
+ colorKey: string;
116
+ opacityKey: string;
117
+ label: string;
118
+ } | {
119
+ type: 'toggledColor';
120
+ toggleKey: string;
121
+ colorKey: string;
122
+ label: string;
123
+ } | {
124
+ type: 'inlineFields';
125
+ label: string;
126
+ fields: Array<{
127
+ type: 'stepperInt';
128
+ key: string;
129
+ label: string;
130
+ min?: number;
131
+ max?: number;
132
+ step?: number;
133
+ } | {
134
+ type: 'buttonGroup';
135
+ key: string;
136
+ options: {
137
+ value: string;
138
+ label: string;
139
+ icon?: React.ReactNode;
140
+ }[];
141
+ } | {
142
+ type: 'checkbox';
143
+ key: string;
144
+ label: string;
145
+ }>;
146
+ } | {
147
+ type: 'section';
148
+ label: string;
149
+ });
150
+ declare module '../../lib/types/indicator-types' {
151
+ interface Indicator {
152
+ settingsSchema?: IndicatorSettingField[];
153
+ }
154
+ }
155
+ interface IndicatorSettingsDialogProps {
156
+ indicator: Indicator;
157
+ onUpdate: (patch: Record<string, unknown>) => void;
158
+ onClose: () => void;
159
+ onMouseEnter?: () => void;
160
+ onMouseLeave?: () => void;
161
+ redrawDebounceMs?: number;
162
+ }
163
+ export declare function IndicatorSettingsDialog({ indicator, onUpdate, onClose, onMouseEnter, onMouseLeave, redrawDebounceMs, }: IndicatorSettingsDialogProps): import("react").JSX.Element;
164
+ export {};
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ export declare function resizeSizes(sizes: number[], i: number, deltaPx: number, totalPx: number): number[];
3
+ export declare function resizeSizesAbsolute(sizes: number[], i: number, targetPx: number, totalPx: number): number[];
4
+ export declare const toFr: (s: number[]) => string;
5
+ export declare function Dividers({ dir, sizes, containerRef, onDrag, areas, colSizes: colSizesProp, }: {
6
+ dir: 'col' | 'row';
7
+ sizes: number[];
8
+ containerRef: React.RefObject<HTMLDivElement>;
9
+ onDrag: (i: number, targetPx: number) => void;
10
+ areas?: string;
11
+ colSizes?: number[];
12
+ }): React.JSX.Element;
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ import type { SyncInLayout } from '../../lib/types/layout-sync';
3
+ export type Preset = {
4
+ id: string;
5
+ label: string;
6
+ count: number;
7
+ cols: number;
8
+ rows: number;
9
+ areas: string;
10
+ };
11
+ export type { SyncInLayout };
12
+ export declare const PRESETS: Preset[];
13
+ export declare const LETTERS: string[];
14
+ export declare function LayoutPicker({ current, onChange, syncInLayout, setSyncInLayout, }: {
15
+ current: Preset;
16
+ onChange: (p: Preset) => void;
17
+ syncInLayout: SyncInLayout;
18
+ setSyncInLayout: (patch: SyncInLayout) => void;
19
+ }): React.JSX.Element;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { TypedEventBus } from '../../core/TypedEventBus';
3
+ import { DepthChart } from '../../core';
4
+ export declare function BottomBarPluginHost({ eventBus, chart, }: {
5
+ eventBus: TypedEventBus;
6
+ chart: DepthChart;
7
+ }): React.JSX.Element;
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import { TypedEventBus } from '../../core/TypedEventBus';
3
+ import { DepthChart } from '../../core';
4
+ export interface PanelEntry {
5
+ id: string;
6
+ title: string;
7
+ element: React.ReactNode;
8
+ visible: boolean;
9
+ }
10
+ export declare function DomPortal({ element }: {
11
+ element: React.ReactNode;
12
+ }): React.JSX.Element;
13
+ export declare function PluginFixedPanelHost({ eventBus, chart, onFixedPanelsChange, override, }: {
14
+ eventBus: TypedEventBus;
15
+ chart: DepthChart;
16
+ onFixedPanelsChange: (hasFixed: boolean) => void;
17
+ override: boolean;
18
+ }): React.JSX.Element;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { TypedEventBus } from '../../core/TypedEventBus';
3
+ import { DepthChart } from '../../core';
4
+ export declare function PluginToolbarHost({ eventBus, chart, }: {
5
+ eventBus: TypedEventBus;
6
+ chart: DepthChart;
7
+ }): React.JSX.Element;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { TypedEventBus } from '../../core/TypedEventBus';
3
+ import { DepthChart } from '../../core';
4
+ export declare function PluginWindowsDropdown({ eventBus, chart, }: {
5
+ eventBus: TypedEventBus;
6
+ chart: DepthChart;
7
+ }): React.JSX.Element;
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import type { TypedEventBus } from '../../core/TypedEventBus';
3
+ import type { DepthChart } from '../../core';
4
+ export declare function PluginManagerDialog({ chart, eventBus, open, onOpenChange, loaded }: {
5
+ chart: DepthChart;
6
+ eventBus: TypedEventBus;
7
+ open: boolean;
8
+ onOpenChange: (open: boolean) => void;
9
+ loaded: number;
10
+ }): React.JSX.Element;
11
+ export declare function PluginManagerButton({ chart, eventBus, }: {
12
+ chart: DepthChart;
13
+ eventBus: TypedEventBus;
14
+ }): React.JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { TypedEventBus } from '../../core';
2
+ interface SymbolSwitcherProps {
3
+ eventBus: TypedEventBus;
4
+ symbol: string;
5
+ onSymbolChange: (symbol: string) => void;
6
+ }
7
+ export default function SymbolSwitcher({ eventBus, symbol, onSymbolChange }: SymbolSwitcherProps): import("react").JSX.Element;
8
+ export {};
@@ -0,0 +1,16 @@
1
+ type IconProps = {
2
+ className?: string;
3
+ };
4
+ export declare function CandlesIcon({ className }: IconProps): import("react").JSX.Element;
5
+ export declare function HollowIcon({ className }: IconProps): import("react").JSX.Element;
6
+ export declare function HeikinAshiIcon({ className }: IconProps): import("react").JSX.Element;
7
+ export declare function BarsIcon({ className }: IconProps): import("react").JSX.Element;
8
+ export declare function BaselineIcon({ className }: IconProps): import("react").JSX.Element;
9
+ export declare function AreaIcon({ className }: IconProps): import("react").JSX.Element;
10
+ export declare function LineIcon({ className }: IconProps): import("react").JSX.Element;
11
+ export declare function StepIcon({ className }: IconProps): import("react").JSX.Element;
12
+ export declare function RenkoIcon({ className }: IconProps): import("react").JSX.Element;
13
+ export declare function KagiIcon({ className }: IconProps): import("react").JSX.Element;
14
+ export declare function LineBreakIcon({ className }: IconProps): import("react").JSX.Element;
15
+ export declare function FootprintIcon({ className }: IconProps): import("react").JSX.Element;
16
+ export {};
@@ -0,0 +1,11 @@
1
+ import type { ChartType } from '../../lib/types';
2
+ import { DataLevel } from '../../core';
3
+ interface ChartTypeSelectorProps {
4
+ value: ChartType;
5
+ pluginChartTypes: any;
6
+ dataLevel: DataLevel;
7
+ onChange: (t: ChartType) => void;
8
+ onOpenChange?: (open: boolean) => void;
9
+ }
10
+ export declare function ChartTypeSelector({ value, pluginChartTypes, dataLevel, onChange, onOpenChange, }: ChartTypeSelectorProps): import("react").JSX.Element;
11
+ export {};