funhi-chart 1.3.1 → 1.3.3

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.
@@ -9,5 +9,9 @@ export interface ChartProps {
9
9
  analyticsConnected?: boolean;
10
10
  analyticsLoading?: boolean;
11
11
  }
12
+ /**
13
+ * FunhiChart - OOP-based implementation using FunhiChartController
14
+ * This version eliminates code duplication and uses clean OOP architecture
15
+ */
12
16
  declare const FunhiChart: React.FC<ChartProps>;
13
17
  export default FunhiChart;
@@ -60,6 +60,8 @@ export declare class CandleManager {
60
60
  getLastCandleTime(): number;
61
61
  /**
62
62
  * Loads candles from storage
63
+ * CRITICAL: Merges with existing candles instead of replacing them
64
+ * Preserves current candle if it's newer than loaded candles
63
65
  */
64
66
  loadCandles(candles: CandleData[]): void;
65
67
  /**
@@ -32,7 +32,7 @@ interface OHLCVNewCandleData {
32
32
  * Users should provide their own socket instance via props
33
33
  */
34
34
  export declare const useSocket: (socketInstance?: Socket | null) => {
35
- socket: Socket<import("@socket.io/component-emitter").DefaultEventsMap, import("@socket.io/component-emitter").DefaultEventsMap> | null;
35
+ socket: Socket<import("@socket.io/component-emitter/lib/cjs").DefaultEventsMap, import("@socket.io/component-emitter/lib/cjs").DefaultEventsMap> | null;
36
36
  isConnected: boolean;
37
37
  isConnecting: boolean;
38
38
  connect: () => void;
@@ -7,7 +7,6 @@
7
7
  * @packageDocumentation
8
8
  */
9
9
  export { default as FunhiChart } from './components/FunhiChart';
10
- export { default as FunhiChartOOP } from './components/FunhiChartOOP';
11
10
  export type { ChartProps } from './components/FunhiChart';
12
11
  export { useSocket } from './hooks/useSocket';
13
12
  export { useOptimizedTokenAnalytics } from './hooks/useOptimizedTokenAnalytics';
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import * as _socket_io_component_emitter from '@socket.io/component-emitter';
2
+ import * as _socket_io_component_emitter_lib_cjs from '@socket.io/component-emitter/lib/cjs';
3
3
  import { Socket } from 'socket.io-client';
4
4
 
5
5
  interface ChartProps {
@@ -12,13 +12,11 @@ interface ChartProps {
12
12
  analyticsConnected?: boolean;
13
13
  analyticsLoading?: boolean;
14
14
  }
15
- declare const FunhiChart: React.FC<ChartProps>;
16
-
17
15
  /**
18
- * FunhiChartOOP - OOP-based implementation using FunhiChartController
16
+ * FunhiChart - OOP-based implementation using FunhiChartController
19
17
  * This version eliminates code duplication and uses clean OOP architecture
20
18
  */
21
- declare const FunhiChartOOP: React.FC<ChartProps>;
19
+ declare const FunhiChart: React.FC<ChartProps>;
22
20
 
23
21
  interface OHLCVCandle {
24
22
  time: number;
@@ -53,7 +51,7 @@ interface OHLCVNewCandleData {
53
51
  * Users should provide their own socket instance via props
54
52
  */
55
53
  declare const useSocket: (socketInstance?: Socket | null) => {
56
- socket: Socket<_socket_io_component_emitter.DefaultEventsMap, _socket_io_component_emitter.DefaultEventsMap> | null;
54
+ socket: Socket<_socket_io_component_emitter_lib_cjs.DefaultEventsMap, _socket_io_component_emitter_lib_cjs.DefaultEventsMap> | null;
57
55
  isConnected: boolean;
58
56
  isConnecting: boolean;
59
57
  connect: () => void;
@@ -297,5 +295,5 @@ declare const API_CONFIG: {
297
295
  readonly RETRY_DELAY: 1000;
298
296
  };
299
297
 
300
- export { API_CONFIG, FunhiChart, FunhiChartOOP, candleAggregation, candleStorageService, useOptimizedTokenAnalytics, useSocket };
298
+ export { API_CONFIG, FunhiChart, candleAggregation, candleStorageService, useOptimizedTokenAnalytics, useSocket };
301
299
  export type { CandleData$1 as CandleData, ChartProps, GetCandlesRequest, SaveCandleRequest, SaveCandlesRequest, TimeFrame };