@363045841yyt/klinechart 0.7.1 → 0.7.3-alpha.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.
Files changed (236) hide show
  1. package/README.md +10 -6
  2. package/dist/components/DrawingStyleToolbar.vue.d.ts +28 -0
  3. package/dist/components/DrawingStyleToolbar.vue.d.ts.map +1 -0
  4. package/dist/{src/components → components}/IndicatorParams.vue.d.ts +3 -3
  5. package/dist/components/IndicatorParams.vue.d.ts.map +1 -0
  6. package/dist/{src/components → components}/IndicatorSelector.vue.d.ts +4 -4
  7. package/dist/components/IndicatorSelector.vue.d.ts.map +1 -0
  8. package/dist/components/KLineChart.vue.d.ts +63 -0
  9. package/dist/components/KLineChart.vue.d.ts.map +1 -0
  10. package/dist/components/KLineTooltip.vue.d.ts +30 -0
  11. package/dist/components/KLineTooltip.vue.d.ts.map +1 -0
  12. package/dist/{src/components → components}/LeftToolbar.vue.d.ts +3 -2
  13. package/dist/components/LeftToolbar.vue.d.ts.map +1 -0
  14. package/dist/components/MarkerTooltip.vue.d.ts +26 -0
  15. package/dist/components/MarkerTooltip.vue.d.ts.map +1 -0
  16. package/dist/components/index.d.ts +8 -0
  17. package/dist/components/index.d.ts.map +1 -0
  18. package/dist/{src/composables → composables}/useFullscreenTeleportTarget.d.ts +1 -0
  19. package/dist/composables/useFullscreenTeleportTarget.d.ts.map +1 -0
  20. package/dist/{src/debug → debug}/canvasProfiler.d.ts +1 -0
  21. package/dist/debug/canvasProfiler.d.ts.map +1 -0
  22. package/dist/index.cjs +2 -49
  23. package/dist/index.d.cts +124 -0
  24. package/dist/index.d.ts +124 -2
  25. package/dist/index.d.ts.map +1 -0
  26. package/dist/index.js +1390 -23809
  27. package/dist/klinechart.css +1 -1
  28. package/dist/version.d.ts +3 -0
  29. package/dist/version.d.ts.map +1 -0
  30. package/package.json +75 -112
  31. package/src/__tests__/_mockController.ts +192 -0
  32. package/src/__tests__/contract.test.ts +132 -0
  33. package/src/components/DrawingStyleToolbar.vue +199 -0
  34. package/src/components/IndicatorParams.vue +570 -0
  35. package/src/components/IndicatorSelector.vue +1042 -0
  36. package/src/components/KLineChart.vue +1570 -0
  37. package/src/components/KLineTooltip.vue +200 -0
  38. package/src/components/LeftToolbar.vue +844 -0
  39. package/src/components/MarkerTooltip.vue +155 -0
  40. package/src/components/index.ts +7 -0
  41. package/src/composables/useFullscreenTeleportTarget.ts +18 -0
  42. package/src/debug/canvasProfiler.ts +296 -0
  43. package/src/index.ts +402 -0
  44. package/src/version.ts +3 -0
  45. package/LICENSE +0 -21
  46. package/dist/favicon.ico +0 -0
  47. package/dist/mock-stock-data.json +0 -1
  48. package/dist/schema-CzmPW09E.cjs +0 -1
  49. package/dist/schema-DBMGp6Af.js +0 -437
  50. package/dist/src/App.vue.d.ts +0 -4
  51. package/dist/src/api/data/baostock.d.ts +0 -90
  52. package/dist/src/api/data/baostock.integration.test.d.ts +0 -1
  53. package/dist/src/api/data/index.d.ts +0 -26
  54. package/dist/src/api/data/kLine.d.ts +0 -11
  55. package/dist/src/api/data/types.d.ts +0 -33
  56. package/dist/src/api/data/unified.d.ts +0 -37
  57. package/dist/src/components/DrawingStyleToolbar.vue.d.ts +0 -12
  58. package/dist/src/components/KLineChart.vue.d.ts +0 -100
  59. package/dist/src/components/KLineTooltip.vue.d.ts +0 -17
  60. package/dist/src/components/MarkerTooltip.vue.d.ts +0 -13
  61. package/dist/src/components/index.d.ts +0 -2
  62. package/dist/src/config/chartSettings.d.ts +0 -69
  63. package/dist/src/core/chart-store.d.ts +0 -74
  64. package/dist/src/core/chart.d.ts +0 -617
  65. package/dist/src/core/controller/interaction.d.ts +0 -167
  66. package/dist/src/core/controller/markerInteraction.d.ts +0 -28
  67. package/dist/src/core/controller/pinchTracker.d.ts +0 -18
  68. package/dist/src/core/controller/tooltipPosition.d.ts +0 -21
  69. package/dist/src/core/draw/pixelAlign.d.ts +0 -114
  70. package/dist/src/core/drawing/index.d.ts +0 -47
  71. package/dist/src/core/drawing/interaction.d.ts +0 -75
  72. package/dist/src/core/drawing/plugin.d.ts +0 -27
  73. package/dist/src/core/indicators/atrState.d.ts +0 -16
  74. package/dist/src/core/indicators/bollState.d.ts +0 -34
  75. package/dist/src/core/indicators/calculators.d.ts +0 -465
  76. package/dist/src/core/indicators/cciState.d.ts +0 -15
  77. package/dist/src/core/indicators/chaikinVolState.d.ts +0 -18
  78. package/dist/src/core/indicators/cmfState.d.ts +0 -16
  79. package/dist/src/core/indicators/demaState.d.ts +0 -16
  80. package/dist/src/core/indicators/donchianState.d.ts +0 -23
  81. package/dist/src/core/indicators/eneState.d.ts +0 -30
  82. package/dist/src/core/indicators/expmaState.d.ts +0 -30
  83. package/dist/src/core/indicators/fastkState.d.ts +0 -15
  84. package/dist/src/core/indicators/fibState.d.ts +0 -26
  85. package/dist/src/core/indicators/hmaState.d.ts +0 -16
  86. package/dist/src/core/indicators/hvState.d.ts +0 -18
  87. package/dist/src/core/indicators/ichimokuState.d.ts +0 -44
  88. package/dist/src/core/indicators/indicator.worker.d.ts +0 -5
  89. package/dist/src/core/indicators/indicatorDefinitionRegistry.d.ts +0 -30
  90. package/dist/src/core/indicators/indicatorMetadata.d.ts +0 -81
  91. package/dist/src/core/indicators/indicatorRegistry.d.ts +0 -57
  92. package/dist/src/core/indicators/indicatorRuntime.d.ts +0 -126
  93. package/dist/src/core/indicators/kamaState.d.ts +0 -20
  94. package/dist/src/core/indicators/keltnerState.d.ts +0 -27
  95. package/dist/src/core/indicators/kstState.d.ts +0 -21
  96. package/dist/src/core/indicators/maState.d.ts +0 -26
  97. package/dist/src/core/indicators/macdState.d.ts +0 -58
  98. package/dist/src/core/indicators/mfiState.d.ts +0 -16
  99. package/dist/src/core/indicators/momState.d.ts +0 -15
  100. package/dist/src/core/indicators/obvState.d.ts +0 -14
  101. package/dist/src/core/indicators/parkinsonState.d.ts +0 -18
  102. package/dist/src/core/indicators/pivotState.d.ts +0 -29
  103. package/dist/src/core/indicators/pvtState.d.ts +0 -14
  104. package/dist/src/core/indicators/rocState.d.ts +0 -16
  105. package/dist/src/core/indicators/rsiState.d.ts +0 -43
  106. package/dist/src/core/indicators/sarState.d.ts +0 -26
  107. package/dist/src/core/indicators/scheduler.d.ts +0 -262
  108. package/dist/src/core/indicators/soa.d.ts +0 -115
  109. package/dist/src/core/indicators/stateComposer.d.ts +0 -146
  110. package/dist/src/core/indicators/stochState.d.ts +0 -18
  111. package/dist/src/core/indicators/structureState.d.ts +0 -43
  112. package/dist/src/core/indicators/supertrendState.d.ts +0 -22
  113. package/dist/src/core/indicators/temaState.d.ts +0 -16
  114. package/dist/src/core/indicators/trixState.d.ts +0 -20
  115. package/dist/src/core/indicators/vmaState.d.ts +0 -16
  116. package/dist/src/core/indicators/volumeProfileState.d.ts +0 -34
  117. package/dist/src/core/indicators/vwapState.d.ts +0 -16
  118. package/dist/src/core/indicators/wmaState.d.ts +0 -16
  119. package/dist/src/core/indicators/wmsrState.d.ts +0 -15
  120. package/dist/src/core/indicators/workerProtocol.d.ts +0 -496
  121. package/dist/src/core/indicators/zonesState.d.ts +0 -26
  122. package/dist/src/core/layout/pane.d.ts +0 -103
  123. package/dist/src/core/marker/registry.d.ts +0 -174
  124. package/dist/src/core/paneRenderer.d.ts +0 -45
  125. package/dist/src/core/renderers/Indicator/atr.d.ts +0 -17
  126. package/dist/src/core/renderers/Indicator/boll.d.ts +0 -2
  127. package/dist/src/core/renderers/Indicator/cci.d.ts +0 -22
  128. package/dist/src/core/renderers/Indicator/chaikinVol.d.ts +0 -4
  129. package/dist/src/core/renderers/Indicator/cmf.d.ts +0 -4
  130. package/dist/src/core/renderers/Indicator/dema.d.ts +0 -5
  131. package/dist/src/core/renderers/Indicator/donchian.d.ts +0 -5
  132. package/dist/src/core/renderers/Indicator/ene.d.ts +0 -2
  133. package/dist/src/core/renderers/Indicator/expma.d.ts +0 -2
  134. package/dist/src/core/renderers/Indicator/fastk.d.ts +0 -22
  135. package/dist/src/core/renderers/Indicator/fib.d.ts +0 -4
  136. package/dist/src/core/renderers/Indicator/hma.d.ts +0 -5
  137. package/dist/src/core/renderers/Indicator/hv.d.ts +0 -4
  138. package/dist/src/core/renderers/Indicator/ichimoku.d.ts +0 -5
  139. package/dist/src/core/renderers/Indicator/index.d.ts +0 -59
  140. package/dist/src/core/renderers/Indicator/indicatorData.d.ts +0 -13
  141. package/dist/src/core/renderers/Indicator/kama.d.ts +0 -5
  142. package/dist/src/core/renderers/Indicator/keltner.d.ts +0 -5
  143. package/dist/src/core/renderers/Indicator/kst.d.ts +0 -22
  144. package/dist/src/core/renderers/Indicator/ma.d.ts +0 -3
  145. package/dist/src/core/renderers/Indicator/macd.d.ts +0 -50
  146. package/dist/src/core/renderers/Indicator/macdLegend.d.ts +0 -12
  147. package/dist/src/core/renderers/Indicator/mainIndicatorLegend.d.ts +0 -10
  148. package/dist/src/core/renderers/Indicator/mfi.d.ts +0 -4
  149. package/dist/src/core/renderers/Indicator/mom.d.ts +0 -22
  150. package/dist/src/core/renderers/Indicator/obv.d.ts +0 -4
  151. package/dist/src/core/renderers/Indicator/parkinson.d.ts +0 -4
  152. package/dist/src/core/renderers/Indicator/pivot.d.ts +0 -4
  153. package/dist/src/core/renderers/Indicator/pvt.d.ts +0 -4
  154. package/dist/src/core/renderers/Indicator/roc.d.ts +0 -5
  155. package/dist/src/core/renderers/Indicator/rsi.d.ts +0 -33
  156. package/dist/src/core/renderers/Indicator/sar.d.ts +0 -5
  157. package/dist/src/core/renderers/Indicator/scale/atr_scale.d.ts +0 -11
  158. package/dist/src/core/renderers/Indicator/scale/cci_scale.d.ts +0 -11
  159. package/dist/src/core/renderers/Indicator/scale/fastk_scale.d.ts +0 -11
  160. package/dist/src/core/renderers/Indicator/scale/indicator_scale.d.ts +0 -38
  161. package/dist/src/core/renderers/Indicator/scale/kst_scale.d.ts +0 -11
  162. package/dist/src/core/renderers/Indicator/scale/macd_scale.d.ts +0 -14
  163. package/dist/src/core/renderers/Indicator/scale/mom_scale.d.ts +0 -11
  164. package/dist/src/core/renderers/Indicator/scale/rsi_scale.d.ts +0 -11
  165. package/dist/src/core/renderers/Indicator/scale/stoch_scale.d.ts +0 -11
  166. package/dist/src/core/renderers/Indicator/scale/volume_scale.d.ts +0 -14
  167. package/dist/src/core/renderers/Indicator/scale/wmsr_scale.d.ts +0 -11
  168. package/dist/src/core/renderers/Indicator/stoch.d.ts +0 -22
  169. package/dist/src/core/renderers/Indicator/structure.d.ts +0 -4
  170. package/dist/src/core/renderers/Indicator/subPaneConfig.d.ts +0 -9
  171. package/dist/src/core/renderers/Indicator/supertrend.d.ts +0 -5
  172. package/dist/src/core/renderers/Indicator/tema.d.ts +0 -5
  173. package/dist/src/core/renderers/Indicator/trix.d.ts +0 -5
  174. package/dist/src/core/renderers/Indicator/vma.d.ts +0 -4
  175. package/dist/src/core/renderers/Indicator/volumeProfile.d.ts +0 -4
  176. package/dist/src/core/renderers/Indicator/vwap.d.ts +0 -4
  177. package/dist/src/core/renderers/Indicator/wma.d.ts +0 -5
  178. package/dist/src/core/renderers/Indicator/wmsr.d.ts +0 -22
  179. package/dist/src/core/renderers/Indicator/zones.d.ts +0 -4
  180. package/dist/src/core/renderers/candle.d.ts +0 -21
  181. package/dist/src/core/renderers/crosshair.d.ts +0 -17
  182. package/dist/src/core/renderers/customMarkers.d.ts +0 -6
  183. package/dist/src/core/renderers/extremaMarkers.d.ts +0 -5
  184. package/dist/src/core/renderers/gridLines.d.ts +0 -7
  185. package/dist/src/core/renderers/lastPrice.d.ts +0 -9
  186. package/dist/src/core/renderers/paneTitle.d.ts +0 -40
  187. package/dist/src/core/renderers/subVolume.d.ts +0 -13
  188. package/dist/src/core/renderers/timeAxis.d.ts +0 -14
  189. package/dist/src/core/renderers/webgl/candleSurface.d.ts +0 -80
  190. package/dist/src/core/renderers/webgl/sharedWebGLSurface.d.ts +0 -33
  191. package/dist/src/core/renderers/yAxis.d.ts +0 -14
  192. package/dist/src/core/scale/logFormula.d.ts +0 -66
  193. package/dist/src/core/scale/price.d.ts +0 -11
  194. package/dist/src/core/scale/priceScale.d.ts +0 -87
  195. package/dist/src/core/subPaneManager.d.ts +0 -22
  196. package/dist/src/core/theme/colors.d.ts +0 -222
  197. package/dist/src/core/theme/fonts.d.ts +0 -12
  198. package/dist/src/core/utils/klineConfig.d.ts +0 -28
  199. package/dist/src/core/utils/tickCount.d.ts +0 -8
  200. package/dist/src/core/utils/tickPosition.d.ts +0 -24
  201. package/dist/src/core/utils/zoom.d.ts +0 -30
  202. package/dist/src/core/viewport/viewport.d.ts +0 -31
  203. package/dist/src/index.d.ts +0 -8
  204. package/dist/src/main.d.ts +0 -0
  205. package/dist/src/plugin/ConfigManager.d.ts +0 -31
  206. package/dist/src/plugin/EventBus.d.ts +0 -34
  207. package/dist/src/plugin/HookSystem.d.ts +0 -28
  208. package/dist/src/plugin/PluginHost.d.ts +0 -57
  209. package/dist/src/plugin/PluginRegistry.d.ts +0 -40
  210. package/dist/src/plugin/StateStore.d.ts +0 -37
  211. package/dist/src/plugin/index.d.ts +0 -11
  212. package/dist/src/plugin/rendererPluginManager.d.ts +0 -77
  213. package/dist/src/plugin/stateKeys.d.ts +0 -6
  214. package/dist/src/plugin/types.d.ts +0 -445
  215. package/dist/src/semantic/controller.d.ts +0 -35
  216. package/dist/src/semantic/drawShape.d.ts +0 -14
  217. package/dist/src/semantic/index.d.ts +0 -8
  218. package/dist/src/semantic/types.d.ts +0 -298
  219. package/dist/src/semantic/validator.d.ts +0 -43
  220. package/dist/src/test-setup.d.ts +0 -6
  221. package/dist/src/types/kLine.d.ts +0 -3
  222. package/dist/src/types/price.d.ts +0 -31
  223. package/dist/src/types/volumePrice.d.ts +0 -26
  224. package/dist/src/utils/cache.d.ts +0 -33
  225. package/dist/src/utils/dateFormat.d.ts +0 -83
  226. package/dist/src/utils/http.d.ts +0 -14
  227. package/dist/src/utils/kLineDraw/MA.d.ts +0 -7
  228. package/dist/src/utils/kLineDraw/axis.d.ts +0 -150
  229. package/dist/src/utils/kLineDraw/grid.d.ts +0 -30
  230. package/dist/src/utils/kLineDraw/kLine.d.ts +0 -15
  231. package/dist/src/utils/kline/format.d.ts +0 -11
  232. package/dist/src/utils/kline/viewport.d.ts +0 -10
  233. package/dist/src/utils/logger.d.ts +0 -5
  234. package/dist/src/utils/mock/genRandomPriceData.d.ts +0 -3
  235. package/dist/src/utils/priceToY.d.ts +0 -7
  236. package/dist/src/utils/volumePrice.d.ts +0 -54
@@ -1,22 +0,0 @@
1
- import { RendererPluginWithHost, PluginHost } from '../../../plugin';
2
- import { ChartTheme } from '../../theme/colors';
3
- export interface MOMRendererOptions {
4
- /** 目标 pane ID(默认 'sub') */
5
- paneId?: string;
6
- }
7
- /**
8
- * 创建 MOM 渲染器插件
9
- */
10
- export declare function createMOMRendererPlugin(options?: MOMRendererOptions): RendererPluginWithHost;
11
- /**
12
- * 获取 MOM 标题信息(供 paneTitle 使用)
13
- */
14
- export declare function getMOMTitleInfo(index: number, period: number, pluginHost: PluginHost, paneId?: string, theme?: ChartTheme): {
15
- name: string;
16
- params: number[];
17
- values: Array<{
18
- label: string;
19
- value: number;
20
- color: string;
21
- }>;
22
- } | null;
@@ -1,4 +0,0 @@
1
- import { RendererPluginWithHost } from '../../../plugin';
2
- export declare function createOBVRendererPlugin(options?: {
3
- paneId?: string;
4
- }): RendererPluginWithHost;
@@ -1,4 +0,0 @@
1
- import { RendererPluginWithHost } from '../../../plugin';
2
- export declare function createParkinsonRendererPlugin(options?: {
3
- paneId?: string;
4
- }): RendererPluginWithHost;
@@ -1,4 +0,0 @@
1
- import { RendererPluginWithHost } from '../../../plugin';
2
- export declare function createPivotRendererPlugin(options?: {
3
- paneId?: string;
4
- }): RendererPluginWithHost;
@@ -1,4 +0,0 @@
1
- import { RendererPluginWithHost } from '../../../plugin';
2
- export declare function createPVTRendererPlugin(options?: {
3
- paneId?: string;
4
- }): RendererPluginWithHost;
@@ -1,5 +0,0 @@
1
- import { RendererPluginWithHost } from '../../../plugin';
2
- export interface ROCRendererOptions {
3
- paneId?: string;
4
- }
5
- export declare function createROCRendererPlugin(options?: ROCRendererOptions): RendererPluginWithHost;
@@ -1,33 +0,0 @@
1
- import { RendererPluginWithHost, PluginHost } from '../../../plugin';
2
- import { ThemeColors, ChartTheme } from '../../theme/colors';
3
- type LinePoint = {
4
- x: number;
5
- y: number;
6
- };
7
- export interface RSIRendererOptions {
8
- /** 目标 pane ID(默认 'sub') */
9
- paneId?: string;
10
- }
11
- /**
12
- * 创建 RSI 渲染器插件
13
- */
14
- export declare function createRSIRendererPlugin(options?: RSIRendererOptions): RendererPluginWithHost;
15
- /**
16
- * 获取 RSI 标题信息(供 paneTitle 使用)
17
- * 从 StateStore 读取已计算的 RSI 数据
18
- */
19
- export declare function drawRSILinesWithCanvas2D(ctx: CanvasRenderingContext2D, scrollLeft: number, rsi1Points: LinePoint[], rsi2Points: LinePoint[], rsi3Points: LinePoint[], params: {
20
- showRSI1: boolean;
21
- showRSI2: boolean;
22
- showRSI3: boolean;
23
- }, colors: ThemeColors): void;
24
- export declare function getRSITitleInfo(index: number, period1: number, period2: number, period3: number, pluginHost: PluginHost, paneId?: string, theme?: ChartTheme): {
25
- name: string;
26
- params: number[];
27
- values: Array<{
28
- label: string;
29
- value: number;
30
- color: string;
31
- }>;
32
- } | null;
33
- export {};
@@ -1,5 +0,0 @@
1
- import { RendererPluginWithHost } from '../../../plugin';
2
- export interface SARRendererOptions {
3
- paneId?: string;
4
- }
5
- export declare function createSARRendererPlugin(options?: SARRendererOptions): RendererPluginWithHost;
@@ -1,11 +0,0 @@
1
- import { RendererPluginWithHost } from '../../../../plugin';
2
- export declare function createAtrScaleRendererPlugin(options: {
3
- axisWidth: number;
4
- paneId: string;
5
- yPaddingPx?: number;
6
- getCrosshair?: () => {
7
- y: number;
8
- price: number;
9
- activePaneId: string | null;
10
- } | null;
11
- }): RendererPluginWithHost;
@@ -1,11 +0,0 @@
1
- import { RendererPluginWithHost } from '../../../../plugin';
2
- export declare function createCciScaleRendererPlugin(options: {
3
- axisWidth: number;
4
- paneId: string;
5
- yPaddingPx?: number;
6
- getCrosshair?: () => {
7
- y: number;
8
- price: number;
9
- activePaneId: string | null;
10
- } | null;
11
- }): RendererPluginWithHost;
@@ -1,11 +0,0 @@
1
- import { RendererPluginWithHost } from '../../../../plugin';
2
- export declare function createFastkScaleRendererPlugin(options: {
3
- axisWidth: number;
4
- paneId: string;
5
- yPaddingPx?: number;
6
- getCrosshair?: () => {
7
- y: number;
8
- price: number;
9
- activePaneId: string | null;
10
- } | null;
11
- }): RendererPluginWithHost;
@@ -1,38 +0,0 @@
1
- import { RendererPluginWithHost } from '../../../../plugin';
2
- import { ThemeColors } from '../../../theme/colors';
3
- import { ScaleType } from '../../../utils/tickPosition';
4
- export interface IndicatorScaleRendererOptions {
5
- axisWidth: number;
6
- paneId: string;
7
- indicatorKey: string;
8
- label: string;
9
- decimals?: number;
10
- yPaddingPx?: number;
11
- scaleType?: ScaleType;
12
- getCrosshair?: () => {
13
- y: number;
14
- price: number;
15
- activePaneId: string | null;
16
- } | null;
17
- formatTickLabel?: (value: number) => string;
18
- formatCrosshairLabel?: (value: number) => string;
19
- }
20
- export interface DrawScaleTicksOptions {
21
- ctx: CanvasRenderingContext2D;
22
- dpr: number;
23
- axisWidth: number;
24
- height: number;
25
- paddingTop: number;
26
- paddingBottom: number;
27
- valueMin: number;
28
- valueMax: number;
29
- isMain: boolean;
30
- decimals?: number;
31
- hideEdgeTicks?: boolean;
32
- scaleType?: ScaleType;
33
- formatLabel?: (value: number) => string;
34
- }
35
- export declare function drawScaleTicks(options: DrawScaleTicksOptions & {
36
- colors: ThemeColors;
37
- }): void;
38
- export declare function createIndicatorScaleRendererPlugin(options: IndicatorScaleRendererOptions): RendererPluginWithHost;
@@ -1,11 +0,0 @@
1
- import { RendererPluginWithHost } from '../../../../plugin';
2
- export declare function createKstScaleRendererPlugin(options: {
3
- axisWidth: number;
4
- paneId: string;
5
- yPaddingPx?: number;
6
- getCrosshair?: () => {
7
- y: number;
8
- price: number;
9
- activePaneId: string | null;
10
- } | null;
11
- }): RendererPluginWithHost;
@@ -1,14 +0,0 @@
1
- import { RendererPluginWithHost } from '../../../../plugin';
2
- /**
3
- * 创建 MACD 刻度渲染器插件
4
- */
5
- export declare function createMacdScaleRendererPlugin(options: {
6
- axisWidth: number;
7
- paneId: string;
8
- yPaddingPx?: number;
9
- getCrosshair?: () => {
10
- y: number;
11
- price: number;
12
- activePaneId: string | null;
13
- } | null;
14
- }): RendererPluginWithHost;
@@ -1,11 +0,0 @@
1
- import { RendererPluginWithHost } from '../../../../plugin';
2
- export declare function createMomScaleRendererPlugin(options: {
3
- axisWidth: number;
4
- paneId: string;
5
- yPaddingPx?: number;
6
- getCrosshair?: () => {
7
- y: number;
8
- price: number;
9
- activePaneId: string | null;
10
- } | null;
11
- }): RendererPluginWithHost;
@@ -1,11 +0,0 @@
1
- import { RendererPluginWithHost } from '../../../../plugin';
2
- export declare function createRsiScaleRendererPlugin(options: {
3
- axisWidth: number;
4
- paneId: string;
5
- yPaddingPx?: number;
6
- getCrosshair?: () => {
7
- y: number;
8
- price: number;
9
- activePaneId: string | null;
10
- } | null;
11
- }): RendererPluginWithHost;
@@ -1,11 +0,0 @@
1
- import { RendererPluginWithHost } from '../../../../plugin';
2
- export declare function createStochScaleRendererPlugin(options: {
3
- axisWidth: number;
4
- paneId: string;
5
- yPaddingPx?: number;
6
- getCrosshair?: () => {
7
- y: number;
8
- price: number;
9
- activePaneId: string | null;
10
- } | null;
11
- }): RendererPluginWithHost;
@@ -1,14 +0,0 @@
1
- import { RendererPluginWithHost } from '../../../../plugin';
2
- /**
3
- * 创建成交量刻度渲染器插件
4
- */
5
- export declare function createVolumeScaleRendererPlugin(options: {
6
- axisWidth: number;
7
- paneId: string;
8
- yPaddingPx?: number;
9
- getCrosshair?: () => {
10
- y: number;
11
- price: number;
12
- activePaneId: string | null;
13
- } | null;
14
- }): RendererPluginWithHost;
@@ -1,11 +0,0 @@
1
- import { RendererPluginWithHost } from '../../../../plugin';
2
- export declare function createWmsrScaleRendererPlugin(options: {
3
- axisWidth: number;
4
- paneId: string;
5
- yPaddingPx?: number;
6
- getCrosshair?: () => {
7
- y: number;
8
- price: number;
9
- activePaneId: string | null;
10
- } | null;
11
- }): RendererPluginWithHost;
@@ -1,22 +0,0 @@
1
- import { RendererPluginWithHost, PluginHost } from '../../../plugin';
2
- import { ChartTheme } from '../../theme/colors';
3
- export interface STOCHRendererOptions {
4
- /** 目标 pane ID(默认 'sub') */
5
- paneId?: string;
6
- }
7
- /**
8
- * 创建 STOCH 渲染器插件
9
- */
10
- export declare function createSTOCHRendererPlugin(options?: STOCHRendererOptions): RendererPluginWithHost;
11
- /**
12
- * 获取 STOCH 标题信息(供 paneTitle 使用)
13
- */
14
- export declare function getSTOCHTitleInfo(index: number, n: number, m: number, pluginHost: PluginHost, paneId?: string, theme?: ChartTheme): {
15
- name: string;
16
- params: number[];
17
- values: Array<{
18
- label: string;
19
- value: number;
20
- color: string;
21
- }>;
22
- } | null;
@@ -1,4 +0,0 @@
1
- import { RendererPluginWithHost } from '../../../plugin';
2
- export declare function createStructureRendererPlugin(options?: {
3
- paneId?: string;
4
- }): RendererPluginWithHost;
@@ -1,9 +0,0 @@
1
- import { TitleInfo } from '../paneTitle';
2
- import { PluginHost } from '../../../plugin';
3
- import { SubIndicatorType } from '.';
4
- export interface SubPaneIndicatorConfig {
5
- defaultParams: Record<string, number | boolean | string>;
6
- getTitleInfo: (data: any[], index: number | null, params: Record<string, number | boolean | string>, pluginHost: PluginHost, paneId: string) => TitleInfo | null;
7
- }
8
- export declare const SUB_PANE_INDICATOR_CONFIGS: Record<SubIndicatorType, SubPaneIndicatorConfig>;
9
- export declare const SUB_PANE_INDICATORS: SubIndicatorType[];
@@ -1,5 +0,0 @@
1
- import { RendererPluginWithHost } from '../../../plugin';
2
- export interface SuperTrendRendererOptions {
3
- paneId?: string;
4
- }
5
- export declare function createSuperTrendRendererPlugin(options?: SuperTrendRendererOptions): RendererPluginWithHost;
@@ -1,5 +0,0 @@
1
- import { RendererPluginWithHost } from '../../../plugin';
2
- export interface TEMARendererOptions {
3
- paneId?: string;
4
- }
5
- export declare function createTEMARendererPlugin(options?: TEMARendererOptions): RendererPluginWithHost;
@@ -1,5 +0,0 @@
1
- import { RendererPluginWithHost } from '../../../plugin';
2
- export interface TRIXRendererOptions {
3
- paneId?: string;
4
- }
5
- export declare function createTRIXRendererPlugin(options?: TRIXRendererOptions): RendererPluginWithHost;
@@ -1,4 +0,0 @@
1
- import { RendererPluginWithHost } from '../../../plugin';
2
- export declare function createVMARendererPlugin(options?: {
3
- paneId?: string;
4
- }): RendererPluginWithHost;
@@ -1,4 +0,0 @@
1
- import { RendererPluginWithHost } from '../../../plugin';
2
- export declare function createVolumeProfileRendererPlugin(options?: {
3
- paneId?: string;
4
- }): RendererPluginWithHost;
@@ -1,4 +0,0 @@
1
- import { RendererPluginWithHost } from '../../../plugin';
2
- export declare function createVWAPRendererPlugin(options?: {
3
- paneId?: string;
4
- }): RendererPluginWithHost;
@@ -1,5 +0,0 @@
1
- import { RendererPluginWithHost } from '../../../plugin';
2
- export interface WMARendererOptions {
3
- paneId?: string;
4
- }
5
- export declare function createWMARendererPlugin(options?: WMARendererOptions): RendererPluginWithHost;
@@ -1,22 +0,0 @@
1
- import { RendererPluginWithHost, PluginHost } from '../../../plugin';
2
- import { ChartTheme } from '../../theme/colors';
3
- export interface WMSRRendererOptions {
4
- /** 目标 pane ID(默认 'sub') */
5
- paneId?: string;
6
- }
7
- /**
8
- * 创建 WMSR 渲染器插件
9
- */
10
- export declare function createWMSRRendererPlugin(options?: WMSRRendererOptions): RendererPluginWithHost;
11
- /**
12
- * 获取 WMSR 标题信息(供 paneTitle 使用)
13
- */
14
- export declare function getWMSRTitleInfo(index: number, period: number, pluginHost: PluginHost, paneId?: string, theme?: ChartTheme): {
15
- name: string;
16
- params: number[];
17
- values: Array<{
18
- label: string;
19
- value: number;
20
- color: string;
21
- }>;
22
- } | null;
@@ -1,4 +0,0 @@
1
- import { RendererPluginWithHost } from '../../../plugin';
2
- export declare function createZonesRendererPlugin(options?: {
3
- paneId?: string;
4
- }): RendererPluginWithHost;
@@ -1,21 +0,0 @@
1
- import { RendererPlugin } from '../../plugin';
2
- import { VolumePriceColors } from '../theme/colors';
3
- import { VolumePriceRelation } from '../../types/volumePrice';
4
- import { MarkerManager } from '../marker/registry';
5
- /**
6
- * 创建 K 线蜡烛图渲染器插件
7
- */
8
- export declare function createCandleRenderer(): RendererPlugin;
9
- /**
10
- * 绘制量价关系标记
11
- * 在K线图上标注量价关系标记符号
12
- *
13
- * @param ctx - Canvas绘图上下文
14
- * @param x - 标记的x坐标(三角形水平中心)
15
- * @param y - 标记的y坐标(三角形底边/顶点与K线的接触点)
16
- * @param relation - 量价关系类型
17
- * @param kWidth - K线宽度,作为三角形边长
18
- * @param gap - 三角形与K线的间距,默认为4
19
- * @param dpr - 设备像素比
20
- */
21
- export declare function drawVolumePriceMarker(ctx: CanvasRenderingContext2D, x: number, y: number, relation: VolumePriceRelation, kIndex: number, kWidth: number, gap: number | undefined, markerManager: MarkerManager, dpr: number, volumePriceColors: VolumePriceColors): void;
@@ -1,17 +0,0 @@
1
- import { RendererPlugin } from '../../plugin';
2
- /**
3
- * 创建十字线渲染器插件
4
- * 垂直线绘制到所有面板,水平线只绘制到活跃面板
5
- */
6
- export declare function createCrosshairRendererPlugin(options: {
7
- getCrosshairState: () => {
8
- pos: {
9
- x: number;
10
- y: number;
11
- } | null;
12
- activePaneId: string | null;
13
- isDragging: boolean;
14
- /** 十字线指向的价格(用于价格轴平移时跟随) */
15
- price: number | null;
16
- };
17
- }): RendererPlugin;
@@ -1,6 +0,0 @@
1
- import { RendererPlugin } from '../../plugin';
2
- /**
3
- * 创建自定义标记渲染器插件
4
- * 负责渲染 semanticConfig 中配置的 customMarkers
5
- */
6
- export declare function createCustomMarkersRenderer(): RendererPlugin;
@@ -1,5 +0,0 @@
1
- import { RendererPlugin } from '../../plugin';
2
- /**
3
- * 创建可视区最高/最低价标注渲染器插件
4
- */
5
- export declare function createExtremaMarkersRendererPlugin(): RendererPlugin;
@@ -1,7 +0,0 @@
1
- import { RendererPlugin } from '../../plugin';
2
- /**
3
- * 创建网格线渲染器插件
4
- * 横向按像素均分铺满整个绘图区高度,纵向按月分割(使用预计算的月边界,网格线对齐到K线实体中部)
5
- * 渲染到所有 pane(使用 GLOBAL_PANE_ID)
6
- */
7
- export declare function createGridLinesRendererPlugin(): RendererPlugin;
@@ -1,9 +0,0 @@
1
- import { RendererPlugin } from '../../plugin';
2
- /**
3
- * 最新价 label 注册渲染器(overlay 层,确保悬停时 label 也注册到 yAxisLabels)
4
- */
5
- export declare function createLastPriceLabelRegistrarPlugin(): RendererPlugin;
6
- /**
7
- * 创建最新价虚线渲染器插件(绘制虚线)
8
- */
9
- export declare function createLastPriceLineRendererPlugin(): RendererPlugin;
@@ -1,40 +0,0 @@
1
- import { RendererPlugin } from '../../plugin';
2
- /**
3
- * 单个数值项
4
- */
5
- export interface TitleValueItem {
6
- /** 标签(如 "DIF"、"DEA") */
7
- label: string;
8
- /** 数值 */
9
- value: number;
10
- /** 颜色 */
11
- color: string;
12
- }
13
- /**
14
- * 标题信息(由指标渲染器提供)
15
- */
16
- export interface TitleInfo {
17
- /** 指标名称(如 "MACD") */
18
- name: string;
19
- /** 参数列表(如 [12, 26, 9]) */
20
- params?: number[];
21
- /** 数值项列表 */
22
- values?: TitleValueItem[];
23
- }
24
- export interface PaneTitleOptions {
25
- /** 面板 ID */
26
- paneId: string;
27
- /** 标题文本(静态模式) */
28
- title: string;
29
- /** 副标题/描述 */
30
- description?: string;
31
- /** Y 偏移(逻辑像素) */
32
- yOffset?: number;
33
- /** 动态标题信息提供函数 */
34
- getTitleInfo?: () => TitleInfo | null;
35
- }
36
- /**
37
- * 创建面板标题渲染器插件
38
- * 在面板左上角显示标题,支持动态指标数值显示
39
- */
40
- export declare function createPaneTitleRendererPlugin(options: PaneTitleOptions): RendererPlugin;
@@ -1,13 +0,0 @@
1
- import { RendererPluginWithHost, BaseIndicatorState } from '../../plugin';
2
- export interface VolumeRendererOptions {
3
- /** 目标 pane ID(默认 'sub') */
4
- paneId?: string;
5
- }
6
- export interface VolumeRenderState extends BaseIndicatorState {
7
- valueMin: number;
8
- valueMax: number;
9
- }
10
- /**
11
- * 创建副图成交量渲染器插件
12
- */
13
- export declare function createVolumeRendererPlugin(options?: VolumeRendererOptions): RendererPluginWithHost;
@@ -1,14 +0,0 @@
1
- import { RendererPlugin } from '../../plugin';
2
- /** 时间轴面板 ID(特殊标识,用于单独渲染) */
3
- export declare const TIME_AXIS_PANE_ID: unique symbol;
4
- /**
5
- * 创建时间轴渲染器插件
6
- * 注意:时间轴渲染到 xAxisCanvas,需要特殊处理
7
- */
8
- export declare function createTimeAxisRendererPlugin(options: {
9
- height: number;
10
- getCrosshair?: () => {
11
- x: number;
12
- index: number;
13
- } | null;
14
- }): RendererPlugin;
@@ -1,80 +0,0 @@
1
- import { SharedWebGLSurface, WebGLCompositeOptions, WebGLRegion } from './sharedWebGLSurface';
2
- type Rect = {
3
- x: number;
4
- y: number;
5
- width: number;
6
- height: number;
7
- };
8
- type LineStrip = {
9
- points: Array<{
10
- x: number;
11
- y: number;
12
- }>;
13
- width: number;
14
- };
15
- type ColoredLineStrip = LineStrip & {
16
- color: string;
17
- };
18
- type FilledBand = {
19
- upperPoints: Array<{
20
- x: number;
21
- y: number;
22
- }>;
23
- lowerPoints: Array<{
24
- x: number;
25
- y: number;
26
- }>;
27
- };
28
- export declare class CandleWebGLSurface {
29
- private shared;
30
- private handles;
31
- private logicalWidth;
32
- private logicalHeight;
33
- private available;
34
- private rectCapacity;
35
- private rectScratch;
36
- private region;
37
- constructor(shared: SharedWebGLSurface);
38
- isAvailable(): boolean;
39
- getCanvas(): HTMLCanvasElement;
40
- setRegion(region: WebGLRegion): void;
41
- resize(width: number, height: number, _dpr: number): void;
42
- clear(): void;
43
- compositeTo(ctx: CanvasRenderingContext2D, options?: WebGLCompositeOptions): void;
44
- /** 直接传入已打包的 Float32Array:每 4 个元素为一组 (x, y, width, height) */
45
- drawRectBuffer(rectData: Float32Array, rectCount: number, color: string, scrollLeft: number): boolean;
46
- drawRects(rects: Rect[], color: string, scrollLeft: number): boolean;
47
- destroy(): void;
48
- private initRectHandles;
49
- }
50
- export declare class LineWebGLSurface {
51
- private shared;
52
- private handles;
53
- private logicalWidth;
54
- private logicalHeight;
55
- private dpr;
56
- private available;
57
- private vertexCapacity;
58
- private fillScratch;
59
- private lineScratch;
60
- private region;
61
- private msaaTargets;
62
- private geoCache;
63
- constructor(shared: SharedWebGLSurface);
64
- isAvailable(): boolean;
65
- getCanvas(): HTMLCanvasElement;
66
- setRegion(region: WebGLRegion): void;
67
- resize(width: number, height: number, dpr: number): void;
68
- clear(): void;
69
- compositeTo(ctx: CanvasRenderingContext2D, options?: WebGLCompositeOptions): void;
70
- drawLineStrips(lines: ColoredLineStrip[], scrollLeft: number): boolean;
71
- private getThinLineVertices;
72
- private getLineGeometry;
73
- drawFilledBand(band: FilledBand, color: string, scrollLeft: number): boolean;
74
- destroy(): void;
75
- private ensureLineMsaaTargets;
76
- private destroyLineMsaaTargets;
77
- private resolveLineMsaaToSharedRegion;
78
- private initLineHandles;
79
- }
80
- export {};
@@ -1,33 +0,0 @@
1
- export type WebGLRegion = {
2
- x: number;
3
- y: number;
4
- width: number;
5
- height: number;
6
- dpr: number;
7
- };
8
- export type WebGLCompositeOptions = {
9
- alpha?: number;
10
- imageSmoothingEnabled?: boolean;
11
- };
12
- export type PhysicalRegion = {
13
- sourceX: number;
14
- sourceY: number;
15
- widthPx: number;
16
- heightPx: number;
17
- };
18
- export declare class SharedWebGLSurface {
19
- private canvas;
20
- private gl;
21
- constructor(canvas?: HTMLCanvasElement);
22
- isAvailable(): boolean;
23
- getGL(): WebGL2RenderingContext | null;
24
- getCanvas(): HTMLCanvasElement;
25
- resize(width: number, height: number, dpr: number): void;
26
- getPhysicalRegion(region: WebGLRegion): PhysicalRegion | null;
27
- bindRegion(region: WebGLRegion): boolean;
28
- clearRegion(region: WebGLRegion): void;
29
- compositeRegionTo(ctx: CanvasRenderingContext2D, region: WebGLRegion, options?: WebGLCompositeOptions): void;
30
- destroy(): void;
31
- private toPhysicalRegion;
32
- private initContext;
33
- }