
Security News
pnpm 11.5 Adds Support for Recognizing npm Staged Publishes
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.
@tradecanvas/commons
Advanced tools
Shared types, utilities, constants, themes, i18n, and market presets for the @tradecanvas/chart library.
Live Demo | GitHub | Documentation
You don't need to install this package directly. It's included as a dependency of @tradecanvas/chart.
npm install @tradecanvas/chart
All TypeScript interfaces and types used across the library:
OHLCBar, DataSeries, TimeFrame -- data formatChartOptions, ChartType, FeaturesConfig -- chart configurationTheme, ThemeName -- themingIndicatorPlugin, IndicatorDescriptor, IndicatorConfig -- indicatorsDrawingToolType, DrawingState, DrawingStyle -- drawing toolsTradingPosition, TradingOrder, TradingConfig -- trading overlayDataAdapter, StreamConfig, ConnectionState -- real-time streamingChartEventType, ChartEvent -- eventsMarketConfig, TradingSession -- market configurationimport { DARK_THEME, LIGHT_THEME } from '@tradecanvas/commons'
19 customizable properties: background, text, candleUp, candleDown, grid, crosshair, volumeUp, volumeDown, and more.
MARKET_HOSE, MARKET_HNX, MARKET_UPCOM, MARKET_CRYPTO, MARKET_NYSEcomputePriceRange() -- compute visible price range from OHLC datatimeframeToMs() -- convert timeframe string to millisecondsformatNumber(), formatVND(), formatVolumeLoc() -- number formattingBuilt-in locales: English (en), Vietnamese (vi). Extensible via registerLocale().
If you need just the types or utilities without the full chart:
import type { OHLCBar, TimeFrame, ChartType } from '@tradecanvas/commons'
import { DARK_THEME, computePriceRange, timeframeToMs } from '@tradecanvas/commons'
FAQs
Shared types and utilities for @tradecanvas/chart
We found that @tradecanvas/commons demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.

Security News
Federal audit finds NIST lacked a plan to clear the NVD backlog, wasted funds on duplicate work, and delayed use of CISA data.

Research
/Security News
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.