openalgo-charts 2.5.4 → 2.5.5

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/README.md CHANGED
@@ -25,7 +25,7 @@ with no runtime dependencies.
25
25
  npm install openalgo-charts
26
26
  ```
27
27
 
28
- Current version: **2.5.4**. Go to any date, lay out a grid of charts, collapse panes, route study output and lock host drawings.
28
+ Current version: **2.5.5**. Watchlists, news and account panels, a movable price pane, drawings pinned to the screen, price tick bands, and studies that recover after a missing bar.
29
29
  See the [changelog](./CHANGELOG.md) for release notes.
30
30
 
31
31
  ## Quick start
@@ -56,7 +56,7 @@ for live data, or [the widget example](#the-whole-terminal-in-one-call) for char
56
56
 
57
57
  ## Architecture
58
58
 
59
- <a href="docs/architecture-diagram.svg"><img src="docs/architecture-diagram.svg" alt="OpenAlgo Charts 2.5.4 architecture: host responsibilities, the base data-to-rendering pipeline with alerts and shared replay, and eight optional tiers including workspace storage, trading tools and the widget" width="920" /></a>
59
+ <a href="docs/architecture-diagram.svg"><img src="docs/architecture-diagram.svg" alt="OpenAlgo Charts 2.5.5 architecture: host responsibilities, the base data-to-rendering pipeline with alerts and shared replay, and eight optional tiers including workspace storage, trading tools and the widget" width="920" /></a>
60
60
 
61
61
  How data reaches the chart, what your app owns, and which features you can import.
62
62
  [Open the full-size diagram](docs/architecture-diagram.svg).
@@ -107,7 +107,7 @@ You can also load the library from a CDN in a plain HTML page:
107
107
  ```html
108
108
  <div id="chart" style="width:100vw;height:100vh"></div>
109
109
  <script type="module">
110
- import { createChart, generateBars } from 'https://unpkg.com/openalgo-charts@2.5.4/dist/openalgo-charts.mjs';
110
+ import { createChart, generateBars } from 'https://unpkg.com/openalgo-charts@2.5.5/dist/openalgo-charts.mjs';
111
111
  const chart = createChart(document.getElementById('chart'), { timezone: 'Asia/Kolkata' });
112
112
  chart.addSeries('candlestick').setData(generateBars(1700000000, 200, 3600));
113
113
  chart.fitContent();
@@ -145,7 +145,9 @@ toolbar, settings, indicators, a status line, mobile controls and layout persist
145
145
  Its dialogs use the chart's settings schemas and follow the active theme. **Go to**
146
146
  jumps to a date or a range, loading older history first (`widget.goTo`), and
147
147
  `createChartGrid` lays out one widget per cell, from `1x1` to `2x2`, with splitters,
148
- linked charts and portable workspace documents.
148
+ linked charts and portable workspace documents. The panel dock also holds named
149
+ **Watchlists** with live quote rows and a **News** reader when the host supplies a
150
+ quote or news feed, and an account summary when its broker declares accounts.
149
151
 
150
152
  The widget uses the same public API as a custom interface. Your app supplies the
151
153
  data feed and handles order requests; the widget does not choose a broker or send
@@ -160,17 +162,17 @@ Unused optional tiers stay out of the base chart download.
160
162
 
161
163
  | Import | Contents | Brotli |
162
164
  |---|---|---|
163
- | `openalgo-charts` | Engine, 13 chart types, panes and scales, custom indicator registry, primitives, alerts, replay, comparisons, chart linking, state, feeds, bar cache, trading overlays, CSV and SVG export | 117.42 kB |
164
- | `openalgo-charts/indicators` | 105 built-in indicators, calculation helpers and helpers for studies that use external data | 36.27 kB |
165
- | `openalgo-charts/draw` | 87 drawing tools + a headless drawing controller, clipboard, settings schema, level palette, freehand geometry and SVG icons | 42.53 kB |
165
+ | `openalgo-charts` | Engine, 13 chart types, panes and scales, custom indicator registry, primitives, alerts, replay, comparisons, chart linking, state, feeds, bar cache, trading overlays, CSV and SVG export | 119.15 kB |
166
+ | `openalgo-charts/indicators` | 105 built-in indicators, calculation helpers and helpers for studies that use external data | 36.34 kB |
167
+ | `openalgo-charts/draw` | 87 drawing tools + a headless drawing controller, clipboard, settings schema, level palette, freehand geometry and SVG icons | 44.87 kB |
166
168
  | `openalgo-charts/transform` | Heikin Ashi, Renko, Range bars, Line Break, Point &amp; Figure, Kagi, and symbol arithmetic (`AAPL/MSFT`) | 4.50 kB |
167
169
  | `openalgo-charts/profile` | Volume Profile, Market Profile (TPO) with compact pixel letters, Footprint, order flow | 14.96 kB |
168
- | `openalgo-charts/trade` | Order, position and bracket tools, plus a depth-of-market ladder | 8.01 kB |
170
+ | `openalgo-charts/trade` | Order, position and bracket tools, account state, order preview and position commands, plus a depth-of-market ladder | 16.64 kB |
169
171
  | `openalgo-charts/webgl` | GPU drawing for supported series, with Canvas 2D fallback | 6.39 kB |
170
- | `openalgo-charts/widget` | `createWidget`: toolbar, Data and Objects dock, symbol search, dialogs, mobile controls, shortcuts and optional layout persistence | 71.33 kB |
171
- | `openalgo-charts/workspace` | Validated workspace and indicator-template documents, named catalogs with revision checks, asynchronous storage and an IndexedDB adapter; no DOM | 8.67 kB |
172
+ | `openalgo-charts/widget` | `createWidget`: toolbar, Data, Objects, Watchlist and News dock, account summary, symbol search, dialogs, mobile controls, shortcuts and optional layout persistence | 82.30 kB |
173
+ | `openalgo-charts/workspace` | Validated workspace and indicator-template documents, named watchlists, named catalogs with revision checks, asynchronous storage and an IndexedDB adapter; no DOM | 9.99 kB |
172
174
 
173
- Everything together is **310.09 kB Brotli**; a widget terminal with built-in indicators (base + draw + indicators + widget) is 267.55 kB. Figures are measured from the 2.5.4 release build. The trade tier is 8.01 kB on its own; base + trade costs 125.42 kB. Sizes use decimal kB.
175
+ Everything together is **335.15 kB Brotli**; a widget terminal with built-in indicators (base + draw + indicators + widget) is 282.67 kB. Figures are measured from the 2.5.5 release build. The trade tier is 16.64 kB on its own; base + trade costs 135.79 kB. Sizes use decimal kB.
174
176
 
175
177
  ## What's built
176
178
 
@@ -228,7 +230,7 @@ draw.setTool('trend-line'); // the next two clicks place it
228
230
 
229
231
  87 tools. Lines, channels and four pitchfork variants. Fibonacci levels, time projections, fans, circles, arcs, wedges and spirals. Gann fans, boxes and squares. Harmonic patterns, Elliott waves and Head and Shoulders. Geometric wavefronts and tessellation. Shapes, paths, forecasts, positions, measurements, text, tables and freehand brushes. Every tool appears in the [editable drawing gallery](https://marketcalls.github.io/openalgo-charts/demos/drawings/index.html), with simulated NIFTY prices near 23800 and desktop or touch controls.
230
232
 
231
- Headless by design: no toolbar, no dialogs. Placement with live preview, selection, whole-shape and per-anchor dragging, magnet snap to O/H/L/C, undo/redo (a drag is one step), and persistence. A drawing's `policy` makes it read-only, unselectable, transient or unlisted, for levels the host places and the user should not move. Anchors are `{ time, price }`, never pixels, so they survive zoom and resolve inside collapsed session gaps and past the last bar.
233
+ Headless by design: no toolbar, no dialogs. Placement with live preview, selection, whole-shape and per-anchor dragging, magnet snap to O/H/L/C, undo/redo (a drag is one step), and persistence. A drawing can be pinned to the screen (`space: 'viewport'`), so pan and zoom leave it where it is. A drawing's `policy` makes it read-only, unselectable, transient or unlisted, for levels the host places and the user should not move. Anchors are `{ time, price }`, never pixels, so they survive zoom and resolve inside collapsed session gaps and past the last bar.
232
234
 
233
235
  `draw.copy()`, `draw.cut()` and `draw.paste()` move drawings through the OS clipboard, including between two charts on the page. The payload is JSON under one namespaced key, so foreign text pastes nothing instead of throwing at your Ctrl+V handler, and every field is validated before it reaches the model. A refused clipboard permission does not lose the copy: every write also lands in a shared in-memory clipboard, and a cut deletes only after the write succeeds. A paste is one undo step of fresh objects, nudged two bars and 16 px so it is visibly a second shape. The key bindings stay yours; the engine installs no listeners.
234
236
 
@@ -255,7 +257,7 @@ A drawing carries a paint order (`zIndex`: below zero paints under the series, a
255
257
  Under the hand: the drawing under the pointer shows its handles faintly before it is grabbed (`hovered()`, `drawing:hover`), at the cost of the overlay tier only; Shift locks a line to 45 degree steps while placing or dragging a handle; the magnet paints a ring on the bar centre where the next click will land, and `'weak'` pulls only when an O/H/L/C is within a few pixels; grab targets grow for a touch pointer; Escape, Enter and Backspace cancel, finish or pop an anchor while placing, through `keyToDrawingAction`, which also maps undo, redo, copy, cut, paste, duplicate, delete and arrow nudge as a pure function you wire yourself. Line tools take a `showStats` readout of change, percent, bars and angle. The brush and highlighter ink every coalesced pointer sample, thin on release and paint as a spline, with pen pressure driving the width when `style.pressure` is on. Every tool icon and a chrome set ship as path data with builders for an inline `<svg>`, a sprite with `<use>` and a CSS cursor (`iconSvg`, `iconSprite`, `iconUse`, `toolCursor`), so a rail, a flyout and the armed cursor derive from one registry.
256
258
 
257
259
  ### Panes, scales &amp; legends
258
- Draggable pane dividers, move / maximize / collapse to a strip / remove, and pane legends showing one reading per plot in that plot's own colour, with inline show-hide / settings / move / delete controls revealed on hover. The status line is switchable field by field (logo, title, market status, OHLC, bar change, volume, last day change, last value) over a host-supplied data source.
260
+ Draggable pane dividers, move / maximize / collapse to a strip / remove (and, on a chart that opts in with `movablePrimaryPane`, move the price pane below its studies), and pane legends showing one reading per plot in that plot's own colour, with inline show-hide / settings / move / delete controls revealed on hover. The status line is switchable field by field (logo, title, market status, OHLC, bar change, volume, last day change, last value) over a host-supplied data source.
259
261
 
260
262
  Each pane carries a right, a left and a hidden overlay price scale, in four modes: linear, logarithmic, and the two rebasing modes **percentage** (`+3.42%`) and **indexed-to-100** (`103.42`), which quote every price against a baseline taken from the first visible bar, so panning re-bases the axis.
261
263
 
@@ -335,7 +337,7 @@ Symbol sync remains a host partnership even when using optional instrument metad
335
337
  `chart.on('contextmenu', ...)` reports the pane, price, time, logical index and what sits under the pointer: a drawing, an indicator instance, a legend, a primitive, a series, a price scale (with the side and the scale id it names), the time scale, or empty plot. For a menu raised on a price axis, `chart.priceAxisState(pane, scaleId)` reads back every item that menu draws (auto-fit, invert, scale mode, price-per-bar lock, whether the axis is movable) and `setPriceAxisOptions`, `setPriceAxisAutoFit`, `setPriceAxisLockRatio` and `movePriceAxis` act on it, so no row is ticked with nothing behind it.
336
338
 
337
339
  ### Trading
338
- Order, position, and bracket lines with live P&amp;L, one-click and drag-to-modify, OCO, validation, an order state machine, analyzer (sandbox) mode, and a depth-of-market ladder (5 to 200 levels).
340
+ Order, position, and bracket lines with live P&amp;L, one-click and drag-to-modify, OCO, validation, an order state machine, analyzer (sandbox) mode, and a depth-of-market ladder (5 to 200 levels). Instruments can carry a price-dependent tick schedule that validation, dragging and the ladder follow, and brokers that declare them get account state, order preview, durations and native close, reverse and bracket commands.
339
341
 
340
342
  ### Depth of market: simulated live example
341
343
 
@@ -494,17 +496,17 @@ Enforced in CI by [`size-limit`](./.size-limit.json). Nothing is excluded, becau
494
496
 
495
497
  | Bundle | Limit | Actual |
496
498
  |---|---|---|
497
- | Base engine | 117.42 kB | 117.42 kB |
498
- | Base + trade | 125.43 kB | 125.42 kB |
499
- | Indicators tier | 36.3 kB | 36.27 kB |
500
- | Draw tier | 42.53 kB | 42.53 kB |
499
+ | Base engine | 119.15 kB | 119.15 kB |
500
+ | Base + trade | 135.79 kB | 135.79 kB |
501
+ | Indicators tier | 36.35 kB | 36.34 kB |
502
+ | Draw tier | 44.87 kB | 44.87 kB |
501
503
  | Transform tier | 6 kB | 4.50 kB |
502
504
  | Profile tier | 15 kB | 14.96 kB |
503
505
  | WebGL2 tier | 7 kB | 6.39 kB |
504
- | Widget tier | 71.34 kB | 71.33 kB |
505
- | Widget terminal (base + draw + indicators + widget) | 267.56 kB | 267.55 kB |
506
- | Workspace tier | 8.75 kB | 8.67 kB |
507
- | **Everything** | 310.09 kB | 310.09 kB |
506
+ | Widget tier | 82.31 kB | 82.30 kB |
507
+ | Widget terminal (base + draw + indicators + widget) | 282.67 kB | 282.67 kB |
508
+ | Workspace tier | 9.99 kB | 9.99 kB |
509
+ | **Everything** | 335.15 kB | 335.15 kB |
508
510
 
509
511
  ## Documentation
510
512
 
@@ -549,8 +551,8 @@ See [Contributing](./CONTRIBUTING.md) for setup, targeted checks, documentation
549
551
  ```bash
550
552
  npm install # install dev toolchain
551
553
  npm run typecheck # strict TypeScript check
552
- npm test # engine unit tests (Vitest): 8228 across 359 files
553
- npm run test:demo # reference-host tests: 542 across 50 files
554
+ npm test # engine unit tests (Vitest): 8660 across 381 files
555
+ npm run test:demo # reference-host tests: 589 across 56 files
554
556
  npm run test:endurance # node endurance-harness tests: 7 cases
555
557
  npm run build # Rollup -> dist/ (minified ESM per tier + types)
556
558
  npm run size # size-limit (Brotli) against the budget
@@ -568,7 +570,7 @@ npm run verify # lint + types + unit + endurance harness + build + demo + dt
568
570
 
569
571
  ## Status &amp; limitations
570
572
 
571
- Version **2.5.4**. All engine build phases are implemented. Upgrading a 1.9.x host: [Migrating to 2.0](./docs/migrating-to-2.md).
573
+ Version **2.5.5**. All engine build phases are implemented. Upgrading a 1.9.x host: [Migrating to 2.0](./docs/migrating-to-2.md).
572
574
 
573
575
  Known gaps, stated plainly:
574
576
 
@@ -3,7 +3,7 @@ import { AlertDrawingValue, AlertDrawingLevel, PrimitiveRenderContext, Bar, IPri
3
3
  /**
4
4
  * The per-tool settings schema: what a host may show in a drawing's settings
5
5
  * dialog, expressed as dot paths into the drawing (`style.color`,
6
- * `text.fontSize`, `props.foo`, `zIndex`) with a control kind and a label.
6
+ * `text.fontSize`, `props.foo`, `zIndex`, `space`) with a control kind and a label.
7
7
  *
8
8
  * The rule the whole module exists for: a tool declares only fields its `draw`
9
9
  * actually reads. A schema is not a wish list. A host renders exactly what is
@@ -20,8 +20,8 @@ type FieldGroup = 'line' | 'fill' | 'text' | 'levels' | 'behavior';
20
20
  interface SettingsField {
21
21
  /**
22
22
  * Dot path into the drawing. Two segments under `style`, `text` or `props`
23
- * (`style.lineWidth`), or one of the top-level flags `locked`, `visible`,
24
- * `zIndex`.
23
+ * (`style.lineWidth`), or one of the top-level fields `locked`, `visible`,
24
+ * `zIndex`, `space`.
25
25
  */
26
26
  path: string;
27
27
  label: string;
@@ -63,6 +63,11 @@ declare const TEXT_POSITION_OPTIONS: ReadonlyArray<{
63
63
  value: string;
64
64
  label: string;
65
65
  }>;
66
+ /** The two coordinate spaces, as a host offers them: follow the bars, or stay on screen. */
67
+ declare const SPACE_OPTIONS: ReadonlyArray<{
68
+ value: DrawingSpace;
69
+ label: string;
70
+ }>;
66
71
  /**
67
72
  * Font stacks a host can offer. Values are real CSS stacks, so a drawing's
68
73
  * `text.fontFamily` needs no translation before it reaches `ctx.font`; a host
@@ -79,6 +84,13 @@ declare const LINE_STYLE_FIELD: SettingsField;
79
84
  declare const LINE_FIELDS: readonly SettingsField[];
80
85
  declare const FILL_FIELDS: readonly SettingsField[];
81
86
  declare const EXTEND_FIELDS: readonly SettingsField[];
87
+ /**
88
+ * Where the drawing is anchored: to time and price, or to the screen. Declared
89
+ * only by tools that set `viewport`, since the controller converts nothing
90
+ * else. Writing it converts the anchors at the view on screen, so the drawing
91
+ * keeps its place and only stops (or starts) following the bars.
92
+ */
93
+ declare const SPACE_FIELD: SettingsField;
82
94
  declare const SHOW_LABELS_FIELD: SettingsField;
83
95
  declare const LEVEL_FIELDS: readonly SettingsField[];
84
96
  /**
@@ -153,6 +165,13 @@ declare function applyDrawingSettings(d: Drawing, patch: Record<string, unknown>
153
165
  * {@link DrawingText}, made `levels` a list of {@link FibLevel} rather than bare
154
166
  * ratios, and gave every drawing a `zIndex`. A 1.9.x document is upgraded by
155
167
  * `migrateDrawings` on the way in; nothing downstream sees the old shape.
168
+ *
169
+ * The one exception to data space is a drawing whose `space` is `'viewport'`:
170
+ * a note or a box that belongs to the screen rather than to a bar. Its anchors
171
+ * are {@link ViewportPoint} fractions of its pane's plot, kept in a field of
172
+ * their own so a time or a price never has to mean a pixel. The field is
173
+ * optional and additive, which is why the document stays version 2: a save
174
+ * with no viewport drawing is byte for byte what it was.
156
175
  */
157
176
 
158
177
  /** One anchor, in data space. */
@@ -167,6 +186,30 @@ interface DrawingPoint {
167
186
  */
168
187
  pressure?: number;
169
188
  }
189
+ /**
190
+ * Which coordinates a drawing's anchors are in. `'data'`, the default, is time
191
+ * and price: the drawing moves with the bars when the chart pans or zooms.
192
+ * `'viewport'` pins it to the screen: its anchors are fractions of its pane's
193
+ * plot, so pan and zoom leave it where it is and a resize keeps it in
194
+ * proportion.
195
+ */
196
+ type DrawingSpace = 'data' | 'viewport';
197
+ /**
198
+ * One anchor of a viewport drawing, as a fraction of the plot area of the pane
199
+ * that holds the drawing. Pane-relative, not whole-chart-relative: the pane's
200
+ * layer paints, clips and hit-tests the drawing, so these are the coordinates
201
+ * that follow the pane when it moves, resizes or folds.
202
+ *
203
+ * `x` is 0 at the plot's left edge and 1 at its right edge; the price axes are
204
+ * outside that span. `y` is 0 at the top of the pane and 1 at the bottom of its
205
+ * plot, which on the lowest pane is the top of the time axis. Sizes that a tool
206
+ * sets in pixels (a font size, a wrap width) stay in pixels: a resize moves a
207
+ * note in proportion without scaling its type.
208
+ */
209
+ interface ViewportPoint {
210
+ x: number;
211
+ y: number;
212
+ }
170
213
  /**
171
214
  * How new anchors snap to the bar under the cursor. `weak` snaps only when an
172
215
  * O/H/L/C sits within a few pixels of the pointer, so a click on empty space
@@ -289,7 +332,15 @@ interface Drawing {
289
332
  id: string;
290
333
  /** Registered tool id. */
291
334
  tool: string;
335
+ /** Anchors in time and price. Empty on a viewport drawing, whose anchors are `viewportPoints`. */
292
336
  points: DrawingPoint[];
337
+ /**
338
+ * Which coordinates the anchors are in. Absent means `'data'`. Only a tool
339
+ * that declares {@link DrawingTool.viewport} can be anchored to the viewport.
340
+ */
341
+ space?: DrawingSpace;
342
+ /** The anchors of a viewport drawing, one per handle. Present only when `space` is `'viewport'`. */
343
+ viewportPoints?: ViewportPoint[];
293
344
  style: DrawingStyle;
294
345
  /** The label (or, for the text tool, the whole content). */
295
346
  text?: DrawingText;
@@ -332,8 +383,16 @@ type DrawingInput = Omit<Drawing, 'id' | 'zIndex' | 'createdAt'> & {
332
383
  /**
333
384
  * The fields `DrawingController.update` and `updateMany` can change. `policy`
334
385
  * merges flag by flag, the way `style` does.
335
- */
336
- type DrawingPatch = Partial<Pick<Drawing, 'points' | 'style' | 'text' | 'props' | 'locked' | 'visible' | 'zIndex' | 'policy'>>;
386
+ *
387
+ * `space` on its own converts the anchors at the view on screen, so the
388
+ * drawing stays exactly where it is and only stops (or starts) following the
389
+ * bars. With the new space's anchors in the same patch (`viewportPoints` for
390
+ * the viewport, `points` for data) they are taken as given. A conversion the
391
+ * controller cannot make (a tool without viewport support, a pane with no
392
+ * place on screen) is left out of the patch and the rest of it applies, and
393
+ * `DrawingController.update` returns false.
394
+ */
395
+ type DrawingPatch = Partial<Pick<Drawing, 'points' | 'style' | 'text' | 'props' | 'locked' | 'visible' | 'zIndex' | 'policy' | 'space' | 'viewportPoints'>>;
337
396
  /** The persisted shape's version; bumped when {@link Drawing} changes. */
338
397
  declare const DRAWING_STATE_VERSION = 2;
339
398
  /**
@@ -428,6 +487,33 @@ interface DrawingTool {
428
487
  * not what Shift means there.
429
488
  */
430
489
  angleLock?: boolean;
490
+ /**
491
+ * The tool can be anchored to the viewport (`Drawing.space`). Declare it
492
+ * only when `draw` and `distance` read the screen anchors (`pts`) and never
493
+ * `drawing.points`, which is empty in that space, and when nothing the tool
494
+ * prints is a price or a time: a label that reads the axis under a pinned
495
+ * shape would change every time the chart panned. `expand`, `constrain` and
496
+ * `alertValue` apply to data space only.
497
+ */
498
+ viewport?: boolean;
499
+ /**
500
+ * The box the drawing covers at `pts`, its anchors in media px (the space
501
+ * of {@link HitContext}). A drawing anchored to the viewport is always
502
+ * painted, hit-tested and moved with this box inside its pane's plot, so it
503
+ * can be seen and grabbed at every edge and after the chart resizes, and no
504
+ * drag, nudge or handle can take it out. Declare it on a `viewport` tool
505
+ * that paints beyond its anchors, as the text note and the table do from
506
+ * their one corner, and the rectangle and the ellipse do for a label above
507
+ * them or wider than they are; without it the box is the anchors' own
508
+ * bounds. A handle dragged toward an edge the box reaches first stops short
509
+ * of it, so the other anchors stay where they are.
510
+ */
511
+ bounds?(pts: readonly ScreenPoint[], drawing: Drawing): {
512
+ x0: number;
513
+ y0: number;
514
+ x1: number;
515
+ y1: number;
516
+ };
431
517
  /**
432
518
  * Turn the anchors actually clicked into the full anchor set. Lets a tool drop
433
519
  * a complete, immediately editable default from fewer clicks: the position
@@ -567,6 +653,13 @@ declare function fixedRangeVolumeProfileAnalysis(bars: readonly Bar[], fromTime:
567
653
  * The payload body is a drawings document (`DrawingsDocument`), so a copy made
568
654
  * by a 1.9.x build (a version 1 body carrying the old style-bag text fields)
569
655
  * is upgraded by the same migration a saved layout goes through.
656
+ *
657
+ * A `paneIndex` in the payload counts the price pane as 0 and the study panes
658
+ * after it in their order, whatever slot the price pane holds on the chart it
659
+ * came from: `DrawingController` converts on copy and on paste, so a drawing
660
+ * copied beside the candles pastes beside the candles on a chart that keeps
661
+ * its price pane below its studies. On a chart with the price pane on top,
662
+ * the default, that is the chart's own slot, as it always was.
570
663
  */
571
664
 
572
665
  /**
@@ -728,6 +821,28 @@ interface DrawingChartHost {
728
821
  */
729
822
  timeToCoordinate?(time: number): number;
730
823
  coordinateToTime?(x: number): number;
824
+ /**
825
+ * Optional, for drawings anchored to the viewport (`space: 'viewport'`):
826
+ * the time axis, whose `width` is the plot width a viewport `x` is a
827
+ * fraction of. A host without it still paints them, since the layer reads
828
+ * the plot size from its render context, but cannot place, move or convert
829
+ * them.
830
+ */
831
+ readonly timeScale?: {
832
+ readonly width: number;
833
+ indexToX(index: number): number;
834
+ xToIndex(x: number): number;
835
+ };
836
+ /**
837
+ * Optional: a pane's price columns in container px. On a chart with no bars
838
+ * to measure against, the innermost left column is where the plot, and so
839
+ * a viewport drawing's `x`, begins.
840
+ */
841
+ priceAxisLayout?(paneIndex?: number): readonly {
842
+ side: 'left' | 'right';
843
+ x: number;
844
+ width: number;
845
+ }[];
731
846
  /**
732
847
  * Optional. It keeps a paste from a chart with more panes than this one
733
848
  * landing on a pane the user cannot see: adding a primitive creates the pane
@@ -737,6 +852,12 @@ interface DrawingChartHost {
737
852
  * pane the chart maps no price for, one collapsed to its header strip.
738
853
  */
739
854
  panes?(): readonly unknown[];
855
+ /**
856
+ * Optional. Slot of the price pane, the one pane whose drawings the magnet
857
+ * snaps to candle prices and a drawing link shares. It moves when a host
858
+ * puts the price pane below its studies; without it the price pane is slot 0.
859
+ */
860
+ primaryPaneIndex?(): number;
740
861
  }
741
862
  interface DrawingControllerOptions {
742
863
  /**
@@ -779,6 +900,16 @@ interface DrawingControllerOptions {
779
900
  pasteOffsetBars?: number;
780
901
  pasteOffsetPixels?: number;
781
902
  }
903
+ /** How `DrawingController.setTool` arms a tool. */
904
+ interface DrawingPlacementOptions {
905
+ /**
906
+ * The space the placed drawing is anchored in. `'viewport'` pins it to the
907
+ * screen: the anchors are placed where they are clicked, as usual, and kept
908
+ * as fractions of the pane's plot from then on. Only a tool that declares
909
+ * `viewport` accepts it. Default `'data'`.
910
+ */
911
+ space?: DrawingSpace;
912
+ }
782
913
  /** What `drawing:change` reports happened to the listed ids. */
783
914
  type DrawingChangeKind = 'add' | 'update' | 'remove' | 'reorder' | 'undo' | 'redo';
784
915
  /** Options for a call that changes, groups or deletes drawings. */
@@ -818,6 +949,8 @@ declare class DrawingController {
818
949
  private readonly _linkedPreviews;
819
950
  private _destroyed;
820
951
  private _tool;
952
+ /** The space the armed tool places in; data whenever no tool is armed. */
953
+ private _toolSpace;
821
954
  private _pending;
822
955
  private _pendingPane;
823
956
  /** Selected ids, in the order they were picked. The first is the primary. */
@@ -856,8 +989,16 @@ declare class DrawingController {
856
989
  */
857
990
  private _lastBar;
858
991
  constructor(chart: DrawingChartHost, options?: DrawingControllerOptions);
859
- /** Arm a tool for placement, or pass null to return to the cursor. */
860
- setTool(toolId: string | null): void;
992
+ /**
993
+ * Arm a tool for placement, or pass null to return to the cursor. With
994
+ * `options.space` set to `'viewport'` the drawing it places is pinned to the
995
+ * screen; a tool that cannot be (see `DrawingTool.viewport`) throws.
996
+ */
997
+ setTool(toolId: string | null, options?: DrawingPlacementOptions): void;
998
+ /** The space the armed tool places in: `'data'` unless it was armed for the viewport. */
999
+ activeToolSpace(): DrawingSpace;
1000
+ /** `draw:tool`, carrying the space only when it is not the default, as the payload always has. */
1001
+ private _emitTool;
861
1002
  /**
862
1003
  * Ask the chart to stop panning and report gestures as anchor placement.
863
1004
  * Guarded so a base bundle predating `setPlacementMode` still loads the tier.
@@ -934,6 +1075,12 @@ declare class DrawingController {
934
1075
  * Patch one drawing. False when there is no such drawing, or when it is
935
1076
  * read-only to the user and `options.force` is not set. A patch that
936
1077
  * carries `policy` is the host's, and like a forced one records no step.
1078
+ *
1079
+ * Also false when the patch asks for a `space` the drawing could not be
1080
+ * moved to (a tool without viewport support, or a pane with no place on
1081
+ * screen, folded or hidden behind a maximized pane): the rest of the patch
1082
+ * still applies, and the false tells a host that the drawing is not in the
1083
+ * space it asked for, which a control showing that space has to say.
937
1084
  */
938
1085
  update(id: string, patch: DrawingPatch, options?: DrawingEditOptions): boolean;
939
1086
  /**
@@ -947,6 +1094,14 @@ declare class DrawingController {
947
1094
  id: string;
948
1095
  patch: DrawingPatch;
949
1096
  }>, options?: DrawingEditOptions): void;
1097
+ /**
1098
+ * A patch as it applies to `d`. A change of space comes out complete, with
1099
+ * the anchors of the new space (converted at the view on screen unless the
1100
+ * patch gives them), or is left out when it cannot be made; anchors of the
1101
+ * space the drawing will not be in are left out too, so one drawing never
1102
+ * carries two positions.
1103
+ */
1104
+ private _spacePatch;
950
1105
  private _applyPatch;
951
1106
  /** Delete one drawing. A read-only one goes only with `options.force`. */
952
1107
  remove(id: string, options?: DrawingEditOptions): boolean;
@@ -1029,8 +1184,30 @@ declare class DrawingController {
1029
1184
  paste(): Promise<Drawing[]>;
1030
1185
  /** Resolve an id list to live drawings; defaults to the selection. */
1031
1186
  private _targets;
1032
- /** Fold a pane index from another chart onto a pane this one actually has. */
1187
+ /** The slot this chart keeps its price pane in, read at each use because a host can move it. */
1188
+ private _pricePane;
1189
+ /**
1190
+ * Drawings as the clipboard carries them: panes counted price pane first,
1191
+ * the study panes after it in their order, the way a portable template
1192
+ * counts them. A price pane at the top, where every build before the move
1193
+ * kept it, is written exactly as before, and a drawing copied beside the
1194
+ * candles pastes beside the candles on any chart in any arrangement.
1195
+ */
1196
+ private _portable;
1197
+ /**
1198
+ * Fold a clipboard pane onto a pane this chart actually has: clamped to the
1199
+ * pane count in clipboard order, so a study drawing from a taller stack
1200
+ * lands on the last study pane rather than on the price pane, then put in
1201
+ * this chart's own slots around its price pane.
1202
+ */
1033
1203
  private _clampPane;
1204
+ /**
1205
+ * A copy's anchors, offset from the original's in its own space. A viewport
1206
+ * copy moves the paste offset in pixels on both axes, as a fraction of the
1207
+ * pane it lands on, so it reads the same on a chart of any size, and stays
1208
+ * on that pane's plot when the original sits at its edge.
1209
+ */
1210
+ private _offsetAnchors;
1034
1211
  /** Nudge every anchor so a pasted copy is not hidden under its original. */
1035
1212
  private _offsetPoints;
1036
1213
  /**
@@ -1177,6 +1354,72 @@ declare class DrawingController {
1177
1354
  private _toPixel;
1178
1355
  /** The inverse of `_toPixel`. */
1179
1356
  private _fromPixel;
1357
+ /**
1358
+ * The drawing's anchors in container media px, the space `timeToCoordinate`
1359
+ * and `priceToCoordinate` answer in, whichever space it is anchored in. What
1360
+ * a host places an overlay by (an inline editor, a popover). Null for an
1361
+ * unknown id, or when the drawing's pane has no place on screen (folded to
1362
+ * a strip, or hidden behind a maximized pane).
1363
+ */
1364
+ screenPoints(id: string): ScreenPoint[] | null;
1365
+ /** A pane's price projection, when the host exposes one. */
1366
+ private _pane;
1367
+ /**
1368
+ * Where a pane's plot is and how big, or null when it has none on screen:
1369
+ * a folded pane maps no price, and a pane hidden by a maximize has no
1370
+ * height. A fraction of either would be a fraction of nothing.
1371
+ */
1372
+ private _plotFrame;
1373
+ /**
1374
+ * The plot's left edge in container px: the chart-wide left axis column.
1375
+ * Any bar maps to both a container x and a plot x, and their gap is the
1376
+ * column; a chart with no bars reads it off the left price columns.
1377
+ */
1378
+ private _plotLeft;
1379
+ /**
1380
+ * A gesture's position on its pane's plot, in media px. y reads the price
1381
+ * back through the pane's readout scale, the exact inverse of how the chart
1382
+ * read it; x is the pointer's container x less the left column, or, for a
1383
+ * payload without one, the time through the time axis.
1384
+ */
1385
+ private _gesturePlot;
1386
+ /**
1387
+ * Where a drag was pressed, on its pane's plot. Read from the press's time
1388
+ * and price when the chart reports them, so the first move is measured from
1389
+ * the press and not from itself; a chart with fewer than two bars has no
1390
+ * time axis to read a position back from, so it measures from the first move.
1391
+ */
1392
+ private _dragOrigin;
1393
+ /**
1394
+ * Data anchors as fractions of their pane's plot at the view on screen, or
1395
+ * null when it has none. What is on screen stays where it is; a drawing part
1396
+ * way or wholly off the plot comes onto it, since once pinned no pan could
1397
+ * bring it back. One that fits moves in whole. One wider or taller than the
1398
+ * plot is cut to it on that axis instead, so every handle of a pinned box
1399
+ * is on screen to be grabbed.
1400
+ */
1401
+ private _toViewport;
1402
+ /**
1403
+ * The inverse of `_toViewport`: fractions back to time and price at the view
1404
+ * on screen, from where the drawing is painted, so it does not move.
1405
+ */
1406
+ private _fromViewport;
1407
+ /**
1408
+ * Anchors in plot px as the fractions a pinned drawing stores, moved first
1409
+ * so its box lies inside the plot. Every gesture ends here, so what is
1410
+ * stored is what is painted, and no drag can leave the box where the
1411
+ * pointer cannot reach it.
1412
+ */
1413
+ private _pinPlot;
1414
+ /**
1415
+ * Pinned anchors moved by a screen distance in media px, from where the
1416
+ * drawing is painted rather than from what it stores: a note the layer
1417
+ * holds in from a stored place off the plot (a host's value, a larger
1418
+ * chart) moves at once, with no dead travel before it starts.
1419
+ */
1420
+ private _shiftPinned;
1421
+ /** Put a drawing's anchors back as a gesture found them. */
1422
+ private _restoreAnchors;
1180
1423
  /**
1181
1424
  * `free` projected onto the nearest 45 degree ray from `anchor`, all in
1182
1425
  * screen space: the angle the eye reads is the one on the canvas, and a log
@@ -1250,7 +1493,7 @@ type DrawingLinkContextSource = DrawingLinkContext | (() => DrawingLinkContext |
1250
1493
  interface DrawingLinkOptions {
1251
1494
  enabled?: boolean;
1252
1495
  }
1253
- interface DrawingLinkChart extends Pick<DrawingChartHost, 'on'> {
1496
+ interface DrawingLinkChart extends Pick<DrawingChartHost, 'on' | 'primaryPaneIndex'> {
1254
1497
  readonly isDestroyed?: boolean;
1255
1498
  getDataContext?(): Readonly<DrawingLinkContext> | undefined;
1256
1499
  }
@@ -1258,6 +1501,14 @@ interface DrawingLinkChart extends Pick<DrawingChartHost, 'on'> {
1258
1501
  * Existing local drawings stay local until `share` is called. Persisted shared
1259
1502
  * lineage reconnects across restores. Only price-pane drawings participate; time anchors
1260
1503
  * cross the boundary unchanged so each interval uses its own coordinate map.
1504
+ *
1505
+ * The price pane is each chart's own, in whatever slot that chart keeps it: one
1506
+ * chart can hold it at the top and another below its studies. A shared drawing
1507
+ * is therefore kept on slot 0 and put on each member's price pane as it is
1508
+ * applied there, never copied across by slot.
1509
+ *
1510
+ * A drawing pinned to the viewport never participates, and pinning a shared one
1511
+ * takes it out of the link on that chart alone: the other charts keep their copy.
1261
1512
  */
1262
1513
  declare class DrawingLinkGroup {
1263
1514
  private readonly _members;
@@ -1276,10 +1527,32 @@ declare class DrawingLinkGroup {
1276
1527
  /** Committed drawings remain on peers; transient previews are discarded. */
1277
1528
  remove(chart: DrawingLinkChart): void;
1278
1529
  destroy(): void;
1530
+ /** The slot this member keeps its price pane in, read at each use because it moves. */
1531
+ private _pricePane;
1532
+ /** A shared drawing as it lands on one member: on that member's own price pane. */
1533
+ private _onPricePane;
1279
1534
  private _eligible;
1280
1535
  private _create;
1281
1536
  private _reconnect;
1282
1537
  private _change;
1538
+ /**
1539
+ * A shared drawing pinned to the screen leaves the link on this chart. Its
1540
+ * lineage mark goes too, or a restore would find the peers' copy by it and
1541
+ * pull the drawing back to where they keep it.
1542
+ */
1543
+ private _unlink;
1544
+ /**
1545
+ * An unbound drawing that carries this chart's lineage mark, while a peer
1546
+ * still holds that lineage, is one that left the link by being pinned and
1547
+ * came back by undo: the undo put the mark back but no binding. It joins
1548
+ * again, as the newest edit, so its state goes to the peers the way any
1549
+ * other undo on a linked drawing does. If the peers have since deleted
1550
+ * their copies it stays on this chart alone and loses the mark, since an
1551
+ * edit never brings back another chart's deletion, and a later restore
1552
+ * must not apply that deletion here. A mark no peer holds is left for a
1553
+ * peer that has yet to join, as after any restore.
1554
+ */
1555
+ private _rejoin;
1283
1556
  private _commit;
1284
1557
  private _preview;
1285
1558
  private _syncOrder;
@@ -1807,6 +2080,13 @@ declare function toolCursor(id: string, opts?: ToolCursorOptions): string;
1807
2080
  * Hit ids are `draw:<id>` for the body and `draw:<id>#<n>` for anchor `n`, so
1808
2081
  * the controller can tell "move the whole shape" from "move this handle".
1809
2082
  *
2083
+ * A viewport drawing (`space: 'viewport'`) skips the time and price mapping:
2084
+ * its anchors are fractions of this pane's plot and scale by the plot size in
2085
+ * the render context, which is all that pan and zoom never touch. The one step
2086
+ * added is keeping its box inside the plot. Everything after the projection
2087
+ * (paint, handles, hit-testing) is shared, so the two spaces cannot drift
2088
+ * apart in how they are grabbed.
2089
+ *
1810
2090
  * The hover ring, the magnet ring and the hover handles are all overlay
1811
2091
  * state: they change on every pointer move, so they must only ever cost the
1812
2092
  * top canvas. The layer that paints them is the one whose `requestUpdate`
@@ -2008,6 +2288,11 @@ declare function keyToDrawingAction(e: DrawingKeyEvent, ctx: DrawingKeyContext):
2008
2288
  * - An unregistered tool is not a reason to drop anything: a plugin tool may
2009
2289
  * register after the layout is restored. This module never consults the
2010
2290
  * registry, which also keeps it pure.
2291
+ * - A viewport drawing keeps its `viewportPoints` and carries no data
2292
+ * anchors; one without usable viewport anchors is dropped, since falling
2293
+ * back to its data anchors would put it somewhere it never was. Data is the
2294
+ * default space and is never written out, so a document with no viewport
2295
+ * drawing comes back exactly as it went in.
2011
2296
  * - Garbage yields an empty document. This runs on the load path, where an
2012
2297
  * exception would take the whole chart down with it.
2013
2298
  *
@@ -2117,4 +2402,4 @@ declare const PATTERN_DRAWING_TOOLS: readonly DrawingTool[];
2117
2402
 
2118
2403
  declare const DRAW_TIER: "draw";
2119
2404
 
2120
- export { ADVANCED_GEOMETRY_TOOLS, ADVANCED_LINE_TOOLS, ALIGN_OPTIONS, ANCHORED_VWAP, ARC, ARROW, ARROW_DOWN, ARROW_LEFT, ARROW_RIGHT, ARROW_UP, type AnalysisProfileRow, type AnalysisStatus, type AnchoredVwapOptions, type AnchoredVwapPoint, type AnchoredVwapResult, type AnchoredVwapSource, BALLOON, BRUSH, BUILTIN_DRAWING_TOOLS, CALLOUT, CHROME_ICONS, CHROME_ICON_ATTRS, CHROME_ICON_FILLED, CHROME_ICON_STROKE, CHROME_ICON_VIEWBOX, CIRCLE, COLOR_FIELD, COMMENT, CROSS_LINE, CURVE, CYCLE_PALETTE, CYCLIC_LINES, type ClipboardPort, DATE_RANGE, DEFAULT_FIB, DEFAULT_FIB_FAN, DEFAULT_FIB_TIME_ZONE, DEFAULT_GANN_BOX, DEFAULT_GANN_FAN, DOUBLE_CURVE, DRAWING_CLIPBOARD_KEY, DRAWING_CLIPBOARD_VERSION, DRAWING_STATE_VERSION, DRAWING_TOOL_ICONS, DRAW_TIER, type DrawContext, type Drawing, type DrawingChangeKind, type DrawingChartHost, DrawingClipboard, type DrawingClipboardOptions, DrawingController, type DrawingControllerOptions, type DrawingEditOptions, type DrawingGroup, type DrawingInput, type DrawingKeyAction, type DrawingKeyContext, type DrawingKeyEvent, DrawingLayer, type DrawingLayerOrder, type DrawingLinkChart, type DrawingLinkContext, type DrawingLinkContextSource, DrawingLinkGroup, type DrawingLinkOptions, type DrawingPatch, type DrawingPoint, type DrawingPointerKind, type DrawingPolicy, type DrawingStyle, type DrawingText, type DrawingTool, type DrawingValueContext, type DrawingsDocument, ELLIPSE, EXTENDED_LINE, EXTEND_FIELDS, type ExpandContext, FIB_CHANNEL, FIB_EXTENSION, FIB_FAN, FIB_RETRACEMENT, FIB_TIME_ZONE, FILL_FIELDS, FIXED_RANGE_VOLUME_PROFILE, FLAG_MARK, FONT_FIELDS, FONT_OPTIONS, FORECAST, type FibLevel, type FieldGroup, type FieldKind, type FixedRangeVolumeProfileOptions, type FixedRangeVolumeProfileResult, GANN_BOX, GANN_FAN, HIGHLIGHTER, HORIZONTAL_LINE, HORIZONTAL_RAY, type HitContext, ICON_ATTRS, ICON_STROKE, ICON_SYMBOL_PREFIX, ICON_VIEWBOX, type IconAttrs, type IconSvgOptions, LEVEL_FIELDS, LEVEL_NEUTRAL, LINE_FIELDS, LINE_STYLE_FIELD, LINE_STYLE_OPTIONS, LINE_WIDTH_FIELD, LONG_POSITION, MEASURE, type MagnetMode, NOTE, NUDGE_STEP_PX, NUDGE_STEP_SHIFT_PX, PARALLEL_CHANNEL, PATH, PATTERN_DRAWING_TOOLS, PLATE_TEXT_FIELDS, POLYLINE, PRICE_LABEL, PRICE_NOTE, PRICE_RANGE, RAY, RECTANGLE, ROTATED_RECTANGLE, SHAPE_TEXT_FIELDS, SHORT_POSITION, SHOW_LABELS_FIELD, SIGNPOST, SINE_LINE, type ScreenPoint, type SettingsField, type SettingsSchema, type ShortcutEvent, TABLE, TEXT, TEXT_FIELDS, TEXT_POSITION_OPTIONS, TEXT_VALUE_FIELD, TIME_CYCLES, TREND_LINE, TRIANGLE, type ToolCursorOptions, VALIGN_OPTIONS, VERTICAL_LINE, anchoredVwapAnalysis, applyDrawingSettings, boundsOf, catmullRom, chromeIcon, chromeIconIds, chromeIconSvg, clearMemoryClipboard, cloneDrawing, cloneLevels, coerceSettingValue, composeSettings, createDrawingLinkGroup, cycleColor, decodeClipboardPayload, distToEllipse, distToLine, distToPolyline, distToRect, distToSegment, drawingSettingsSchema, drawingShortcuts, drawingToolIcon, drawingToolIconIds, encodeClipboardPayload, extendSegment, fixedRangeVolumeProfileAnalysis, formatRatio, gannLabel, getDrawingTool, hasDrawingTool, iconSprite, iconSvg, iconUse, keyToDrawingAction, levelColor, matchDrawingShortcut, migrateDrawings, pressureWidth, rdpSimplify, readDrawingSetting, readDrawingSettings, rectOf, registerBuiltinDrawingTools, registerDrawingTool, registeredDrawingTools, sanitizeDrawing, sortByZIndex, systemClipboard, toolCursor };
2405
+ export { ADVANCED_GEOMETRY_TOOLS, ADVANCED_LINE_TOOLS, ALIGN_OPTIONS, ANCHORED_VWAP, ARC, ARROW, ARROW_DOWN, ARROW_LEFT, ARROW_RIGHT, ARROW_UP, type AnalysisProfileRow, type AnalysisStatus, type AnchoredVwapOptions, type AnchoredVwapPoint, type AnchoredVwapResult, type AnchoredVwapSource, BALLOON, BRUSH, BUILTIN_DRAWING_TOOLS, CALLOUT, CHROME_ICONS, CHROME_ICON_ATTRS, CHROME_ICON_FILLED, CHROME_ICON_STROKE, CHROME_ICON_VIEWBOX, CIRCLE, COLOR_FIELD, COMMENT, CROSS_LINE, CURVE, CYCLE_PALETTE, CYCLIC_LINES, type ClipboardPort, DATE_RANGE, DEFAULT_FIB, DEFAULT_FIB_FAN, DEFAULT_FIB_TIME_ZONE, DEFAULT_GANN_BOX, DEFAULT_GANN_FAN, DOUBLE_CURVE, DRAWING_CLIPBOARD_KEY, DRAWING_CLIPBOARD_VERSION, DRAWING_STATE_VERSION, DRAWING_TOOL_ICONS, DRAW_TIER, type DrawContext, type Drawing, type DrawingChangeKind, type DrawingChartHost, DrawingClipboard, type DrawingClipboardOptions, DrawingController, type DrawingControllerOptions, type DrawingEditOptions, type DrawingGroup, type DrawingInput, type DrawingKeyAction, type DrawingKeyContext, type DrawingKeyEvent, DrawingLayer, type DrawingLayerOrder, type DrawingLinkChart, type DrawingLinkContext, type DrawingLinkContextSource, DrawingLinkGroup, type DrawingLinkOptions, type DrawingPatch, type DrawingPlacementOptions, type DrawingPoint, type DrawingPointerKind, type DrawingPolicy, type DrawingSpace, type DrawingStyle, type DrawingText, type DrawingTool, type DrawingValueContext, type DrawingsDocument, ELLIPSE, EXTENDED_LINE, EXTEND_FIELDS, type ExpandContext, FIB_CHANNEL, FIB_EXTENSION, FIB_FAN, FIB_RETRACEMENT, FIB_TIME_ZONE, FILL_FIELDS, FIXED_RANGE_VOLUME_PROFILE, FLAG_MARK, FONT_FIELDS, FONT_OPTIONS, FORECAST, type FibLevel, type FieldGroup, type FieldKind, type FixedRangeVolumeProfileOptions, type FixedRangeVolumeProfileResult, GANN_BOX, GANN_FAN, HIGHLIGHTER, HORIZONTAL_LINE, HORIZONTAL_RAY, type HitContext, ICON_ATTRS, ICON_STROKE, ICON_SYMBOL_PREFIX, ICON_VIEWBOX, type IconAttrs, type IconSvgOptions, LEVEL_FIELDS, LEVEL_NEUTRAL, LINE_FIELDS, LINE_STYLE_FIELD, LINE_STYLE_OPTIONS, LINE_WIDTH_FIELD, LONG_POSITION, MEASURE, type MagnetMode, NOTE, NUDGE_STEP_PX, NUDGE_STEP_SHIFT_PX, PARALLEL_CHANNEL, PATH, PATTERN_DRAWING_TOOLS, PLATE_TEXT_FIELDS, POLYLINE, PRICE_LABEL, PRICE_NOTE, PRICE_RANGE, RAY, RECTANGLE, ROTATED_RECTANGLE, SHAPE_TEXT_FIELDS, SHORT_POSITION, SHOW_LABELS_FIELD, SIGNPOST, SINE_LINE, SPACE_FIELD, SPACE_OPTIONS, type ScreenPoint, type SettingsField, type SettingsSchema, type ShortcutEvent, TABLE, TEXT, TEXT_FIELDS, TEXT_POSITION_OPTIONS, TEXT_VALUE_FIELD, TIME_CYCLES, TREND_LINE, TRIANGLE, type ToolCursorOptions, VALIGN_OPTIONS, VERTICAL_LINE, type ViewportPoint, anchoredVwapAnalysis, applyDrawingSettings, boundsOf, catmullRom, chromeIcon, chromeIconIds, chromeIconSvg, clearMemoryClipboard, cloneDrawing, cloneLevels, coerceSettingValue, composeSettings, createDrawingLinkGroup, cycleColor, decodeClipboardPayload, distToEllipse, distToLine, distToPolyline, distToRect, distToSegment, drawingSettingsSchema, drawingShortcuts, drawingToolIcon, drawingToolIconIds, encodeClipboardPayload, extendSegment, fixedRangeVolumeProfileAnalysis, formatRatio, gannLabel, getDrawingTool, hasDrawingTool, iconSprite, iconSvg, iconUse, keyToDrawingAction, levelColor, matchDrawingShortcut, migrateDrawings, pressureWidth, rdpSimplify, readDrawingSetting, readDrawingSettings, rectOf, registerBuiltinDrawingTools, registerDrawingTool, registeredDrawingTools, sanitizeDrawing, sortByZIndex, systemClipboard, toolCursor };