@christtrade/depth 0.12.21 → 0.12.23
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/depth.cjs +44 -44
- package/depth.mjs +40 -40
- package/package.json +1 -1
- package/types/assets/star-icon.d.ts +1 -0
- package/types/components/chart/symbol-icon.d.ts +1 -1
- package/types/core/index.d.ts +29 -0
- package/types/interfaces/IDataAdapter.d.ts +3 -3
- package/types/lib/symbol-info.d.ts +1 -1
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const STAR_ICON_DATA_URI = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAOsElEQVR4nO3debBXZR3H8ZvaKLiAwjguaYk7LuA2mSiaK5qGuaWSVpqUkhq5YJmUlqHiWqSSI5rmVqaWiAK541ZaaubSyDQ0muICighN5VOf5z7e8Xq9y+/8fs853+ec837NfP7mPM/vfL7c+7tnaWsDAAAAAAAAAFSLc24HZabyjvI/5dfKAOvjApAzFX0DZcn7xe+cGdbHBiBnKvrV3ZS/I1taHx+AnKjgK/VSfp/zrY8RQE5U8P37GADzrY8RQE5U8Ml9DACfUdbHCSAHKvdDDQyAKdbHCSAyFXs55T8NDIBnrY8VQGQq9vYNlL8jg62PF0BEKvUJGQbA3tbHCyAilfoXGQbAROvjBRCR/90+wwC40/p4AUSiQq+Qofw+C6yPGUAkKvSIjAPAZ0Pr4wYQgcp8fBMD4FDr4wYQgco8rYkBcJ71cQOIQGV+qokBMNP6uAG0SEX+uPJeEwPgFetjB9AiFXm7JsrfkUHWxw+gBSrx2BYGwC7Wxw+gBSrxZS0MgHHWxw+gBSrxYy0MgKnWxw+gSSrwMsq/WxgAj1qvAUCTVOChLZTf513rNQBokgp8eIsDwGdd63UAaILKOynCANjDeh0AmqDyTo8wAI63XgeAJqi8/4gwAC6zXgeAjFTcVSKU3+d+67UAyEjF3SnSAHjDei0AMnLNPQOgp6xhvR4AGai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bHBQAAAAAAAACI7P8qEjZb+qufwAAAAABJRU5ErkJggg==";
|
package/types/core/index.d.ts
CHANGED
|
@@ -56,11 +56,14 @@ export { OrderPanel } from '../components/trading/OrderPanel';
|
|
|
56
56
|
export type { OrderPanelProps } from '../components/trading/OrderPanel';
|
|
57
57
|
export { AMOUNT_MODES, amountFromQty, contractValue, deriveTicket, levelPrice, levelTicks, moneyPerTick, priceDecimals, qtyFromAmount, roundQty, roundToTick, specForSymbol, tickSizeOf, tickValueOf, ticketFromPosition, ticksBetween, } from '../components/trading/order-math';
|
|
58
58
|
export type { AmountMode, Ticket, TicketInput, TicketProblem, } from '../components/trading/order-math';
|
|
59
|
+
export type { OrderSide, OrderType, OrderStatus, Order, Fill, PositionSide, PositionStatus, Position, PositionClose, PositionsSnapshot, CloseReason, TimeInForce, BracketLevel, BracketSpec, BracketAmendment, CommissionConfig, SlippageConfig, CreatePositionParams, ClosePositionParams, CreateOrderParams, PriceTick, TradingEvent, TradingEventKind, } from '../lib/types/trading-types';
|
|
60
|
+
export { getTickValue, calcUnrealizedPnl, calcUnrealizedPnlPct, formatPnl, formatPnlPct, } from '../lib/types/trading-types';
|
|
59
61
|
export { isMarketOpen, nextOpenNs, prevCloseNs, clipToSession, getSessionStatus, } from './SessionUtils';
|
|
60
62
|
export type { SessionWindow, SessionStatus } from './SessionUtils';
|
|
61
63
|
export type { SymbolInfo, SymbolType, SymbolSearchMode, SymbolSearchRequest, SymbolSearchResponse, AdapterCapabilities, TradingSession, TradingSubsession, DayOfWeek, SessionCorrection, PriceFormat, FractionalFormat, ContractSpec, } from '../interfaces/IDataAdapter';
|
|
62
64
|
/** The built-in matcher, so server-side adapters can rank like the picker does. */
|
|
63
65
|
export { searchSymbolsLocally, normalizeSymbolSearchResponse } from '../lib/symbol-search';
|
|
66
|
+
export { toTransferableSymbolInfo } from '../lib/symbol-info';
|
|
64
67
|
export { SessionMapper, createSessionMapper } from './SessionMapper';
|
|
65
68
|
export type { SessionSegment } from './SessionMapper';
|
|
66
69
|
export { walkBackMarketNs } from './SessionUtils';
|
|
@@ -68,3 +71,29 @@ export { STORAGE_NAMESPACE, StorageKey, isPersistenceEnabled, setPersistenceEnab
|
|
|
68
71
|
export type { ChartPreferences, ChartStorageBackend } from '../lib/storage';
|
|
69
72
|
export { importTradingViewSettings, hasTradingViewSettings, readTradingViewChartSettings, readTradingViewFavoriteDrawings, resetTradingViewImport, } from '../lib/tradingview-import';
|
|
70
73
|
export type { TradingViewImportResult } from '../lib/tradingview-import';
|
|
74
|
+
export { DataAdapterError, makeTimeRange, nsToIso } from '../interfaces/IDataAdapter';
|
|
75
|
+
export { isoToNs } from '../lib/sampler';
|
|
76
|
+
export type { BarPreviewResponse, BarResponse, DataAdapterErrorCode, FetchRequest, PreProcessedPayload, SupplementalBarSet, SymbolIconSpec, TimeRange, } from '../interfaces/IDataAdapter';
|
|
77
|
+
export { SymbolIcon } from '../components/chart/symbol-icon';
|
|
78
|
+
export type { BottomBarHandle, BottomBarItem, ContextMenuItem, FloatingPanelOpts, NotifyLevel, NotifyOptions, PaneOptions, PluginExecutionSurface, PluginLifecycle, PluginServices, PluginStorage, ServiceApi, ServiceObserver, SettingSchema, SettingSchemaType, ThemeDef, ToolbarItem, } from '../interfaces/plugins/IChartPlugin';
|
|
79
|
+
export type { ChartTypeActiveContext, ChartTypeKeyEvent, ChartTypePointerEvent, } from '../interfaces/plugins/IChartTypePlugin';
|
|
80
|
+
export type { AnchorConfig, Point } from '../interfaces/plugins/IDrawingPlugin';
|
|
81
|
+
export type { IndicatorCrosshair } from '../interfaces/plugins/IIndicatorPlugin';
|
|
82
|
+
export type { PluginDrawingHitContext, PluginDrawingRenderContext } from './DrawingRegistry';
|
|
83
|
+
export type { PluginStateSnapshot } from './PlaybackStateRegistry';
|
|
84
|
+
export type { PluginSchedule } from './PluginSchedule';
|
|
85
|
+
export { DataSourceRegistry } from './DataSourceRegistry';
|
|
86
|
+
export { GlobalChartBus } from './GlobalChartBus';
|
|
87
|
+
export { DEFAULT_FILL_SEARCH } from '../lib/matchingEngine';
|
|
88
|
+
export type { FillAmbiguity, FillSearchOptions, L3MatchingEngine } from '../lib/matchingEngine';
|
|
89
|
+
export type { OrderGuard } from './ExecutionEngine';
|
|
90
|
+
export type { AccountStats, EquityPoint, LedgerAdjustment, LedgerFill, LedgerOrder, LedgerPosition, } from './AccountManager';
|
|
91
|
+
export type { ActiveDrawingTool, Anchor, Drawing } from '../lib/types/drawing-types';
|
|
92
|
+
export type { SerialTrade, TradeLine } from '../lib/types';
|
|
93
|
+
export type { ChartPane, Indicator, Rect } from '../lib/types/indicator-types';
|
|
94
|
+
export type { CrosshairSync, TimeRangeSync } from '../lib/types/layout-sync';
|
|
95
|
+
export type { TradeLineHitMap } from '../lib/renderers/drawTradeLines';
|
|
96
|
+
export type { PlaybackMode } from '../hooks/usePlaybackEngine';
|
|
97
|
+
export type { DrawHook } from './RenderEngine';
|
|
98
|
+
export type { InterceptableEvent, Interceptor } from './TypedEventBus';
|
|
99
|
+
export { ChartState } from './ChartState';
|
|
@@ -85,7 +85,7 @@ export interface ContractSpec {
|
|
|
85
85
|
/** True for continuous/front-month contracts (/NQ1 etc.) */
|
|
86
86
|
continuous?: boolean;
|
|
87
87
|
}
|
|
88
|
-
export type
|
|
88
|
+
export type SymbolIconSpec =
|
|
89
89
|
/** Shorthand for { src }. */
|
|
90
90
|
string
|
|
91
91
|
/** Image URL, data: URI, or imported SVG path. */
|
|
@@ -117,8 +117,8 @@ export interface SymbolInfo {
|
|
|
117
117
|
/** Data level this adapter produces. */
|
|
118
118
|
dataLevel: DataLevel;
|
|
119
119
|
/** Icon for this symbol. */
|
|
120
|
-
icon?:
|
|
121
|
-
legendIcon?:
|
|
120
|
+
icon?: SymbolIconSpec;
|
|
121
|
+
legendIcon?: SymbolIconSpec;
|
|
122
122
|
/**
|
|
123
123
|
* Price formatting. When omitted, tickSize is used as a fallback for
|
|
124
124
|
* minTick and precision is inferred from it.
|
|
@@ -2,7 +2,7 @@ import type { SymbolInfo } from '../interfaces/IDataAdapter';
|
|
|
2
2
|
/**
|
|
3
3
|
* A structured-clone-safe copy of a SymbolInfo, with `icon` stripped.
|
|
4
4
|
*
|
|
5
|
-
* `
|
|
5
|
+
* `SymbolIconSpec` may carry a `render` callback, and functions cannot cross a
|
|
6
6
|
* `postMessage` boundary - the clone throws before the worker ever sees it.
|
|
7
7
|
* Icons are a presentation concern, so nothing off the main thread needs them.
|
|
8
8
|
*
|