@luxalgo/vela 0.5.1 → 0.5.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.
Files changed (45) hide show
  1. package/dist/{DataProvider-DGesjOJT.d.ts → DataProvider-DTOEXKTI.d.ts} +1 -1
  2. package/dist/{DataProvider-BBQ3Hr21.d.cts → DataProvider-gnzv-dgc.d.cts} +1 -1
  3. package/dist/{chunk-ULIX6AE2.js → chunk-ATPU5CI6.js} +1 -1
  4. package/dist/{chunk-5SE4PL3H.js → chunk-EY63XBFZ.js} +1370 -55
  5. package/dist/{chunk-FNOMKHEZ.js → chunk-L5NTMWPP.js} +1383 -376
  6. package/dist/{chunk-EP6NDJYK.js → chunk-LJLZR44Y.js} +4 -2
  7. package/dist/{chunk-AIW3EJUE.js → chunk-P556H6EA.js} +329 -10
  8. package/dist/{chunk-S6F6SQ2L.js → chunk-WJKLBYRM.js} +74 -7
  9. package/dist/{contributions-BlV3kb0O.d.cts → contributions-Ci_i3IN2.d.cts} +33 -2
  10. package/dist/{contributions-6N0rbrPC.d.ts → contributions-b6AVrqqG.d.ts} +33 -2
  11. package/dist/{history-DX3Zne3a.d.cts → history-Cf1lVsap.d.cts} +15 -3
  12. package/dist/{history-BTd52YMA.d.ts → history-Ci3M0xLV.d.ts} +15 -3
  13. package/dist/index.cjs +1450 -379
  14. package/dist/index.d.cts +60 -21
  15. package/dist/index.d.ts +60 -21
  16. package/dist/index.js +4 -4
  17. package/dist/{options-DbQholFV.d.cts → options-XTBpbx0s.d.cts} +47 -1
  18. package/dist/{options-DbQholFV.d.ts → options-XTBpbx0s.d.ts} +47 -1
  19. package/dist/{plugin-TN3n-9YN.d.ts → plugin-DP6A4t4o.d.ts} +177 -29
  20. package/dist/{plugin-O34MbXf-.d.cts → plugin-DlidwMj6.d.cts} +177 -29
  21. package/dist/plugin.cjs +53 -7
  22. package/dist/plugin.d.cts +4 -4
  23. package/dist/plugin.d.ts +4 -4
  24. package/dist/plugin.js +2 -2
  25. package/dist/providers/binance.d.cts +2 -2
  26. package/dist/providers/binance.d.ts +2 -2
  27. package/dist/providers/coinbase.d.cts +2 -2
  28. package/dist/providers/coinbase.d.ts +2 -2
  29. package/dist/providers/hyperliquid.d.cts +2 -2
  30. package/dist/providers/hyperliquid.d.ts +2 -2
  31. package/dist/ui.cjs +332 -9
  32. package/dist/ui.d.cts +64 -2
  33. package/dist/ui.d.ts +64 -2
  34. package/dist/ui.js +3 -3
  35. package/dist/vela.global.js +1450 -379
  36. package/dist/vela.global.min.js +84 -34
  37. package/dist/widget.cjs +3430 -569
  38. package/dist/widget.d.cts +66 -8
  39. package/dist/widget.d.ts +66 -8
  40. package/dist/widget.js +169 -18
  41. package/dist/workspace.cjs +4332 -1418
  42. package/dist/workspace.d.cts +45 -9
  43. package/dist/workspace.d.ts +45 -9
  44. package/dist/workspace.js +226 -22
  45. package/package.json +1 -1
@@ -420,7 +420,13 @@ type PaneHint = 'price' | 'new';
420
420
  interface IndicatorModel {
421
421
  /** Per-instance id (stable). */
422
422
  id: string;
423
+ /** Full display name (settings dialog, object tree, inspect). */
423
424
  title: string;
425
+ /**
426
+ * Compact legend label when the full {@link title} is too long for the chip.
427
+ * Absent ⇒ the legend uses {@link title}. Mirrors Pine `indicator(..., shorttitle=)`.
428
+ */
429
+ shorttitle?: string;
424
430
  overlay: boolean;
425
431
  paneHint: PaneHint;
426
432
  /**
@@ -1071,7 +1077,14 @@ interface CrosshairOHLC {
1071
1077
  }
1072
1078
  interface CrosshairEvent {
1073
1079
  time: Millis | null;
1080
+ /** Value at the cursor on ITS pane's scale — a price on the price pane, an
1081
+ * indicator value on a study pane (which one: see {@link paneKind}). */
1074
1082
  price: number | null;
1083
+ /** The kind of pane the cursor (and thus `price`) is on — how a consumer tells a
1084
+ * real price from a study-pane value (e.g. crosshair sync only mirrors the
1085
+ * horizontal level from the price pane). Optional and additive: a renderer that
1086
+ * doesn't track panes omits it. */
1087
+ paneKind?: 'price' | 'study' | null;
1075
1088
  /** Value at the crosshair per series, keyed by stable series id. */
1076
1089
  values: ReadonlyMap<string, number>;
1077
1090
  /** The hovered price bar's OHLCV (null when the cursor is off any bar). */
@@ -1081,6 +1094,13 @@ interface ClickEvent {
1081
1094
  time: Millis | null;
1082
1095
  price: number | null;
1083
1096
  }
1097
+ /** A touch long-press on an axis strip — the mobile substitute for a right-click menu. */
1098
+ interface AxisLongPressEvent {
1099
+ axis: 'price' | 'time';
1100
+ /** Plot-local pixel of the press (y maps a multi-pane price scale to its pane). */
1101
+ x: number;
1102
+ y: number;
1103
+ }
1084
1104
  /** One indicator plot's readout line in the data window. */
1085
1105
  interface DataWindowRow {
1086
1106
  label: string;
@@ -1252,6 +1272,22 @@ interface IChartRenderer {
1252
1272
  * renderer without it simply never shows contributed legend actions.
1253
1273
  */
1254
1274
  setLegendActions?(provider: ((indicatorId: string) => LegendActionView[]) | null): void;
1275
+ /**
1276
+ * Replace the indicator legend's fold toggle with a HOST action (or restore it with
1277
+ * null): the chip stays — a list glyph plus the indicator count — but pressing it
1278
+ * runs the action instead of unfolding the rows, which stay hidden while the
1279
+ * override is in force. Multi-chart shells route it to their indicator overview
1280
+ * (e.g. an object-tree panel), where per-indicator controls live instead. Optional —
1281
+ * a renderer without a foldable legend omits it.
1282
+ */
1283
+ setLegendOverviewAction?(action: (() => void) | null): void;
1284
+ /**
1285
+ * Open the settings dialog of one mounted indicator — the programmatic twin of the
1286
+ * legend row's gear button, for host chrome that reaches indicators outside the
1287
+ * legend (an object tree's action menu). Silent no-op for an unknown id. Optional —
1288
+ * a renderer without per-indicator settings UI omits it.
1289
+ */
1290
+ openIndicatorSettings?(indicatorId: string): void;
1255
1291
  /**
1256
1292
  * Hide (`false`) or show (`true`) a mounted indicator's visuals while keeping its legend row
1257
1293
  * (marked hidden). Optional — a renderer that can't suppress an indicator omits it (and the
@@ -1275,6 +1311,9 @@ interface IChartRenderer {
1275
1311
  onToggleIndicatorVisible?(cb: (id: string, visible: boolean) => void): Unsubscribe;
1276
1312
  onCrosshairMove(cb: (e: CrosshairEvent) => void): Unsubscribe;
1277
1313
  onClick(cb: (e: ClickEvent) => void): Unsubscribe;
1314
+ /** Touch long-press on a price or time axis strip. Optional — a renderer without
1315
+ * touch axis gestures omits it; host chrome (timezone / price-scale sheets) keys off it. */
1316
+ onAxisLongPress?(cb: (e: AxisLongPressEvent) => void): Unsubscribe;
1278
1317
  /**
1279
1318
  * Display an EXTERNAL crosshair at a data-space position — a ghost marker driven by
1280
1319
  * another chart (multi-chart crosshair sync), not by this chart's own pointer.
@@ -1362,6 +1401,13 @@ interface IChartRenderer {
1362
1401
  title: string;
1363
1402
  rows: readonly unknown[];
1364
1403
  }>): void;
1404
+ /**
1405
+ * The host shell's chrome size class. `'mobile'` asks the renderer's own chrome
1406
+ * (dialogs, toolbars, buttons) for its touch-first presentation — fullscreen
1407
+ * dialogs, no hover-gated affordances; `'desktop'` (the default) keeps the
1408
+ * pointer-first one. Optional — a renderer without adaptive chrome omits it.
1409
+ */
1410
+ setLayoutMode?(mode: 'mobile' | 'desktop'): void;
1365
1411
  /**
1366
1412
  * Interactive user-drawings surface. Present iff `capabilities.userDrawings`.
1367
1413
  * The core `DrawingController` drives it (commands down) and listens for
@@ -1556,4 +1602,4 @@ interface AddIndicatorOptions {
1556
1602
  title?: string;
1557
1603
  }
1558
1604
 
1559
- export { type DrawingLinefill as $, type AddIndicatorOptions as A, type Background as B, type CrosshairEvent as C, Drawing as D, type CandleBarColor as E, type CandleSeries as F, type CandleStyle as G, type DataWindowGroup as H, type IChartRenderer as I, type DataWindowOHLC as J, type DataWindowRow as K, type LineStyle as L, type MarketConfig as M, type NativeBackend as N, type OHLCV as O, type PriceStyle as P, type DirtyRange as Q, type RendererCapabilities as R, type SerializedDrawing as S, type ThemeName as T, type Unsubscribe as U, type VisibleRangePreset as V, type DrawingBox as W, type DrawingExtend as X, type DrawingIntent as Y, type DrawingLabel as Z, type DrawingLine as _, type VisibleRange as a, type DrawingMode as a0, type DrawingPoint as a1, type DrawingPolyline as a2, type DrawingStyle as a3, type DrawingTable as a4, type DrawingText as a5, type DrawingXLoc as a6, type DrawingsOption as a7, type Fill as a8, type FillGradientStop as a9, type SettingsSchema as aA, type TableCell as aB, type TableMerge as aC, type TablePosition as aD, type ToolbarGroupConfig as aE, type TradeExecution as aF, type ValuePatch as aG, buildToolbar as aH, defaultToolbar as aI, type PaneInfo as aJ, type IndicatorMeta as aa, type InputSchema as ab, type InputType as ac, type LabelStyle as ad, type LabelYLoc as ae, type LineLikeKind as af, type LineLikeSeries as ag, type LineLikeStyle as ah, type MarkerPoint as ai, type MarkerSeries as aj, type MarketSnapshot as ak, type MarketSwitch as al, type PaneHint as am, type PaneKind as an, type PolylinePoint as ao, type PriceLine as ap, type Projector as aq, type ProviderName as ar, type RendererConstructor as as, type Scene as at, type SchemaPatch as au, type SeriesKind as av, type SeriesPoint as aw, type SeriesSpec as ax, type SeriesValueDelta as ay, type SettingsField as az, type VelaOptions as b, type VelaTheme as c, type RendererDisplayOptions as d, type IndicatorRenderHandle as e, type IndicatorStatus as f, type Pane as g, type PaneAction as h, type MoveTarget as i, type IndicatorModel as j, type ScenePatch as k, type InputValue as l, type SymbolPickerFn as m, type LegendActionView as n, type InputChangeEvent as o, type ClickEvent as p, type DataWindowReadout as q, type IDrawingsRendererPort as r, type Millis as s, type SnapMode as t, type DrawingTypeKey as u, type ToolbarDefinition as v, type BoxFontFamily as w, type BoxHAlign as x, type BoxTextSize as y, type BoxVAlign as z };
1605
+ export { type DrawingLine as $, type AxisLongPressEvent as A, type Background as B, type CrosshairEvent as C, Drawing as D, type BoxVAlign as E, type CandleBarColor as F, type CandleSeries as G, type CandleStyle as H, type IChartRenderer as I, type DataWindowGroup as J, type DataWindowOHLC as K, type LineStyle as L, type MarketConfig as M, type NativeBackend as N, type OHLCV as O, type PriceStyle as P, type DataWindowRow as Q, type RendererCapabilities as R, type SerializedDrawing as S, type ThemeName as T, type Unsubscribe as U, type VisibleRangePreset as V, type DirtyRange as W, type DrawingBox as X, type DrawingExtend as Y, type DrawingIntent as Z, type DrawingLabel as _, type VisibleRange as a, type DrawingLinefill as a0, type DrawingMode as a1, type DrawingPoint as a2, type DrawingPolyline as a3, type DrawingStyle as a4, type DrawingTable as a5, type DrawingText as a6, type DrawingXLoc as a7, type DrawingsOption as a8, type Fill as a9, type SettingsField as aA, type SettingsSchema as aB, type TableCell as aC, type TableMerge as aD, type TablePosition as aE, type ToolbarGroupConfig as aF, type TradeExecution as aG, type ValuePatch as aH, buildToolbar as aI, defaultToolbar as aJ, type PaneInfo as aK, type FillGradientStop as aa, type IndicatorMeta as ab, type InputSchema as ac, type InputType as ad, type LabelStyle as ae, type LabelYLoc as af, type LineLikeKind as ag, type LineLikeSeries as ah, type LineLikeStyle as ai, type MarkerPoint as aj, type MarkerSeries as ak, type MarketSnapshot as al, type MarketSwitch as am, type PaneHint as an, type PaneKind as ao, type PolylinePoint as ap, type PriceLine as aq, type Projector as ar, type ProviderName as as, type RendererConstructor as at, type Scene as au, type SchemaPatch as av, type SeriesKind as aw, type SeriesPoint as ax, type SeriesSpec as ay, type SeriesValueDelta as az, type VelaOptions as b, type VelaTheme as c, type RendererDisplayOptions as d, type IndicatorRenderHandle as e, type IndicatorStatus as f, type Pane as g, type PaneAction as h, type MoveTarget as i, type IndicatorModel as j, type ScenePatch as k, type InputValue as l, type SymbolPickerFn as m, type LegendActionView as n, type InputChangeEvent as o, type ClickEvent as p, type DataWindowReadout as q, type IDrawingsRendererPort as r, type Millis as s, type SnapMode as t, type DrawingTypeKey as u, type ToolbarDefinition as v, type AddIndicatorOptions as w, type BoxFontFamily as x, type BoxHAlign as y, type BoxTextSize as z };
@@ -1,9 +1,9 @@
1
- import { u as DrawingTypeKey, a3 as DrawingStyle, S as SerializedDrawing, D as Drawing, av as SeriesKind, O as OHLCV, c as VelaTheme } from './options-DbQholFV.js';
2
- import { b as DataControl } from './contributions-6N0rbrPC.js';
1
+ import { u as DrawingTypeKey, a4 as DrawingStyle, S as SerializedDrawing, D as Drawing, aw as SeriesKind, O as OHLCV, c as VelaTheme } from './options-XTBpbx0s.js';
2
+ import { b as DataControl } from './contributions-b6AVrqqG.js';
3
3
  import './side-panel-CT9ZwIGz.js';
4
4
  import './icons-BZYbJXSV.js';
5
5
  import './keymap-CGOz5F5f.js';
6
- import './DataProvider-DGesjOJT.js';
6
+ import './DataProvider-DTOEXKTI.js';
7
7
 
8
8
  /** What a drawing type contributes to the toolbar + factory (renderer-neutral). */
9
9
  interface DrawingTypeMeta {
@@ -208,7 +208,11 @@ interface SeriesDataEngine {
208
208
  from: number;
209
209
  to: number;
210
210
  }): void;
211
- /** New settings values from the chart-settings dialog (the type's SDK section). */
211
+ /** New settings values from the chart-settings dialog (the type's SDK section).
212
+ * Also delivered once just BEFORE `start()` whenever stored values exist (a
213
+ * persisted config, a market switch recreating the engine) — an engine must
214
+ * accept a pre-start call as pure configuration, so it never fetches on
215
+ * schema defaults the user has edited away. */
212
216
  onSettings?(values: Record<string, unknown>): void;
213
217
  }
214
218
  /** One registered chart type. */
@@ -265,32 +269,126 @@ interface SettingsRowSwatch {
265
269
  /** Names the color for the swatch's tooltip (`'Highlight color'`). */
266
270
  label: string;
267
271
  defval: string;
272
+ /**
273
+ * Optional visibility gate, evaluated live against the values bag exactly like a
274
+ * row's own `when` — lets one toggle row swap its swatch set as another value
275
+ * changes (a mode's two colors while it is on, its one alternative while off).
276
+ * A gated swatch is EXEMPT from the toggle-off dim: its gate already says when
277
+ * it matters, and it may exist specifically for the off state.
278
+ */
279
+ when?: SettingsRowWhen;
280
+ }
281
+ /**
282
+ * An inline LINE-WIDTH dropdown on a toggle row — sits beside the row's color
283
+ * swatches (dimmed with them while the toggle is off) and stores a px number under
284
+ * its own bag key. The control offers the classic drawing-bar weights (1–5 px),
285
+ * each option previewed as a line at that weight.
286
+ */
287
+ interface SettingsRowWidth {
288
+ key: string;
289
+ /** Names the control for its tooltip (`'Line width'`). */
290
+ label: string;
291
+ defval: number;
292
+ }
293
+ /**
294
+ * An inline NUMBER input on a toggle row — sits AHEAD of the row's color swatches
295
+ * (dimmed with them while the toggle is off) and stores a number under its own bag
296
+ * key. For the one value the toggle governs (a percent, a count) — the declarative
297
+ * alternative to a separate `number` row gated on the toggle.
298
+ */
299
+ interface SettingsRowInlineNumber {
300
+ key: string;
301
+ /** Names the input for its tooltip (`'Value area (%)'`). */
302
+ label: string;
303
+ defval: number;
304
+ min?: number;
305
+ max?: number;
306
+ step?: number;
268
307
  }
269
308
  /**
270
- * One declarative settings row. To add a NEW kind, see docs/architecture/settings-rows.md.
309
+ * A select option: a bare string (value = label) or a `[value, label]` pair when the
310
+ * stored id differs from the human-readable text (`['bidAskProfile', 'Bid × Ask Profile']`).
311
+ */
312
+ type SettingsSelectOption = string | readonly [value: string, label: string];
313
+ /**
314
+ * One INLINE CONTROL on a composite `row` — the composable unit every value row is
315
+ * made of. Each keyed control stores under its own bag key; `label` names it for the
316
+ * control's tooltip. A control may carry its own `when` gate (same shape as a row's),
317
+ * evaluated live against the values bag: a gated control appears/disappears as other
318
+ * values change, and is EXEMPT from the row's toggle-off dim — its gate already says
319
+ * when it matters, and it may exist specifically for the off state.
320
+ *
321
+ * - `number` — a compact number input. With `placeholder`, an input at the default
322
+ * value renders EMPTY showing it, and clearing the input stores the default back —
323
+ * the placeholder names the "unset" state (`'Off'` for a 0-disables bound).
324
+ * - `color` — a color swatch opening the shared color picker.
325
+ * - `width` — a line-width dropdown (the classic drawing-bar 1–5 px weights, each
326
+ * option previewed as a line at that weight), storing a px number.
327
+ * - `select` — a dropdown over {@link SettingsSelectOption}s.
328
+ * - `hint` — display-only dimmed text between controls (the `–` of a min–max pair,
329
+ * a unit); stores nothing.
330
+ */
331
+ type SettingsInlineControl = {
332
+ kind: 'number';
333
+ key: string;
334
+ label: string;
335
+ defval: number;
336
+ min?: number;
337
+ max?: number;
338
+ step?: number;
339
+ placeholder?: string;
340
+ when?: SettingsRowWhen;
341
+ } | {
342
+ kind: 'color';
343
+ key: string;
344
+ label: string;
345
+ defval: string;
346
+ when?: SettingsRowWhen;
347
+ } | {
348
+ kind: 'width';
349
+ key: string;
350
+ label: string;
351
+ defval: number;
352
+ when?: SettingsRowWhen;
353
+ } | {
354
+ kind: 'select';
355
+ key: string;
356
+ label: string;
357
+ options: readonly SettingsSelectOption[];
358
+ defval: string;
359
+ when?: SettingsRowWhen;
360
+ } | {
361
+ kind: 'hint';
362
+ text: string;
363
+ };
364
+ /**
365
+ * One declarative settings row. To add a NEW inline control kind, see
366
+ * docs/architecture/settings-rows.md.
271
367
  *
272
368
  * `heading` titles a GROUP of rows: the heading plus everything after it up to the next
273
369
  * heading. In a flat `rows` section headings render as inline group titles; inside
274
- * `instances`/`subsections` they become entries of the pane's group TOC (see
275
- * {@link ChartTypeSettingsSection}).
370
+ * `instances`/`subsections` (or a `layout: 'grouped'` section) they become entries of
371
+ * the pane's group TOC (see {@link ChartTypeSettingsSection}).
276
372
  *
277
373
  * `header` is an in-pane subgroup title: same visual as a flat heading, but inside a
278
374
  * structured pane it stays in the rows column (does NOT become a TOC entry). Use it to
279
375
  * cluster rows inside a TOC group (e.g. Colors / Values under Display).
280
376
  *
281
- * Any row may carry `when` it is shown only while the condition holds.
377
+ * `row` is the COMPOSITE form every value row reduces to: a label, an optional leading
378
+ * `toggle` (a checkbox storing a boolean under `toggle.key`; while off, the row's
379
+ * controls dim and ignore input), and an ordered list of {@link SettingsInlineControl}s
380
+ * in the control column. Any mix of control kinds in any order — no per-combination
381
+ * SDK surface.
282
382
  *
283
- * `range` is a min–max pair on one row (two number inputs storing under `minKey` /
284
- * `maxKey`, both seeded from the shared `defval`). When `placeholder` is given, an
285
- * input holding the default value renders EMPTY showing the placeholder, and clearing
286
- * an input stores the default backso the placeholder names the "unset" state
287
- * (`'Off'` for a 0-disables filter bound).
288
- */
289
- /**
290
- * A select option: a bare string (value = label) or a `[value, label]` pair when the
291
- * stored id differs from the human-readable text (`['bidAskProfile', 'Bid × Ask Profile']`).
383
+ * The remaining kinds are SUGAR over `row` (see {@link normalizeSettingsRow}):
384
+ * - `toggle` a checkbox row; optional inline `number`, color `colors`, and `width`
385
+ * attachments render in that order.
386
+ * - `number` / `color` / `select`one control on its own row.
387
+ * - `range` a min–max pair (two number inputs under `minKey`/`maxKey`, both seeded
388
+ * from the shared `defval`, with `placeholder` naming the unset state).
389
+ *
390
+ * Any row may carry `when` it is shown only while the condition holds.
292
391
  */
293
- type SettingsSelectOption = string | readonly [value: string, label: string];
294
392
  type SettingsRowDescriptor = {
295
393
  kind: 'heading';
296
394
  label: string;
@@ -299,12 +397,23 @@ type SettingsRowDescriptor = {
299
397
  kind: 'header';
300
398
  label: string;
301
399
  when?: SettingsRowWhen;
400
+ } | {
401
+ kind: 'row';
402
+ label: string;
403
+ toggle?: {
404
+ key: string;
405
+ defval: boolean;
406
+ };
407
+ controls: readonly SettingsInlineControl[];
408
+ when?: SettingsRowWhen;
302
409
  } | {
303
410
  kind: 'toggle';
304
411
  key: string;
305
412
  label: string;
306
413
  defval: boolean;
414
+ number?: SettingsRowInlineNumber;
307
415
  colors?: readonly SettingsRowSwatch[];
416
+ width?: SettingsRowWidth;
308
417
  when?: SettingsRowWhen;
309
418
  } | {
310
419
  kind: 'number';
@@ -340,6 +449,39 @@ type SettingsRowDescriptor = {
340
449
  placeholder?: string;
341
450
  when?: SettingsRowWhen;
342
451
  };
452
+ /** A value-carrying row (everything except the key-less `heading`/`header` titles). */
453
+ type SettingsValueRow = Exclude<SettingsRowDescriptor, {
454
+ kind: 'heading' | 'header';
455
+ }>;
456
+ /** The canonical row shape every {@link SettingsValueRow} reduces to (the `row` kind's fields). */
457
+ interface NormalizedSettingsRow {
458
+ label: string;
459
+ toggle?: {
460
+ key: string;
461
+ defval: boolean;
462
+ };
463
+ controls: readonly SettingsInlineControl[];
464
+ when?: SettingsRowWhen;
465
+ }
466
+ /**
467
+ * Reduce a value row to the canonical composite shape — the ONE contract view layers
468
+ * render and the persistence layer enumerates. The sugar kinds map exactly onto their
469
+ * historical rendering: `toggle` attachments in number → colors → width order, `range`
470
+ * as two number controls around a `–` hint (placeholder semantics preserved).
471
+ */
472
+ declare function normalizeSettingsRow(r: SettingsValueRow): NormalizedSettingsRow;
473
+ /** One value a settings row stores: its bag key, runtime type, and registry default. */
474
+ interface SettingsRowValueKey {
475
+ key: string;
476
+ type: 'boolean' | 'number' | 'string';
477
+ defval: boolean | number | string;
478
+ }
479
+ /**
480
+ * EVERY key a row stores (toggle key + each keyed inline control), with its expected
481
+ * type and default — the single enumeration the dialog seeds from and the factory
482
+ * reset restores, so no key can fall through a kind-specific walk.
483
+ */
484
+ declare function settingsRowValueKeys(r: SettingsRowDescriptor): SettingsRowValueKey[];
343
485
  /**
344
486
  * One tab of a section's INSTANCE STRIP — a repeated block of settings (e.g. one of
345
487
  * several overlays a style can paint). The dialog shows a tab per PRESENT instance,
@@ -370,14 +512,15 @@ interface ChartTypeSettingsSubsection {
370
512
  * A chart type's settings tab. Two forms:
371
513
  *
372
514
  * - **Flat**: `rows` only — rendered as one scrollable pane, `heading` rows as inline
373
- * group titles (the historical form).
515
+ * group titles (the historical form). `layout: 'grouped'` upgrades the same rows to
516
+ * the GROUP TOC presentation (below) without declaring an instance strip.
374
517
  * - **Structured**: `instances` (and optionally `subsections`) — the pane opens with an
375
518
  * instance TAB STRIP, and each instance's rows are organized by a GROUP TOC on the
376
- * left built from its `heading` rows (rows before the first heading always show above
377
- * the groups; selecting a TOC entry shows only that group's rows). `subsections` add
378
- * indented rail entries under the section's tab, each a pane with the same TOC
379
- * treatment. A TOC entry hides itself while every row of its group is hidden by
380
- * `when` gates.
519
+ * left of the pane (right of the dialog's tab rail) built from its `heading` rows
520
+ * (rows before the first heading always show above the groups; selecting a TOC entry
521
+ * shows only that group's rows). `subsections` add indented rail entries under the
522
+ * section's tab, each a pane with the same TOC treatment. A TOC entry hides itself
523
+ * while every row of its group is hidden by `when` gates.
381
524
  *
382
525
  * All values — every instance and subsection included — live in the ONE per-type bag
383
526
  * (`config.chartTypes[<id>]`), so consumers keep receiving a single flat object.
@@ -387,6 +530,10 @@ interface ChartTypeSettingsSection {
387
530
  title: string;
388
531
  /** Flat form. Ignored when `instances` is declared. */
389
532
  rows?: readonly SettingsRowDescriptor[];
533
+ /** How `rows` are presented: `'flat'` (default) renders headings as inline group
534
+ * titles; `'grouped'` promotes them to a group TOC beside the rows (the structured
535
+ * pane's presentation, without an instance strip). Ignored with `instances`. */
536
+ layout?: 'flat' | 'grouped';
390
537
  /** Structured form: the pane's instance tab strip. */
391
538
  instances?: readonly ChartTypeSettingsInstance[];
392
539
  /** Indented sub-entries under this section's rail tab. */
@@ -453,7 +600,7 @@ interface RendererLayerArgs {
453
600
  y: number;
454
601
  } | null;
455
602
  }
456
- /** How the active style's layer dims/slims the BASE painting under it (see
603
+ /** How a layer dims/slims the BASE painting under it (see
457
604
  * {@link RendererLayerInstance.modulateBase}). Omitted fields keep their defaults. */
458
605
  interface BasePaintingModulation {
459
606
  /** Candle body width multiplier, (0..1] (1 = full width). */
@@ -474,9 +621,10 @@ interface RendererLayerInstance {
474
621
  /**
475
622
  * How the base painting (candles, grid) should be dimmed/slimmed under this layer for
476
623
  * the CURRENT frame — a gradual counterpart of the chart type's all-or-nothing
477
- * `basePainting: 'none'`. Called after `render`, only for the layer whose id matches
478
- * the active price style; returning null (or omitting the method) leaves the base
479
- * painting untouched. Values are clamped by the renderer.
624
+ * `basePainting: 'none'`. Called after `render` on every mounted layer that implements
625
+ * it (chart-type and overlay alike); returning null (or omitting the method) is no
626
+ * opinion. When several layers speak, each field keeps the strongest (smallest)
627
+ * request. Values are clamped by the renderer.
480
628
  */
481
629
  modulateBase?(args: RendererLayerArgs): BasePaintingModulation | null;
482
630
  /** The renderer unmounted — release everything (the canvas itself is removed by the renderer). */
@@ -552,4 +700,4 @@ declare const CATEGORICAL: readonly string[];
552
700
  /** Pick a stable categorical color for a string key (same key ⇒ same color). */
553
701
  declare function categoricalColor(key: string): string;
554
702
 
555
- export { stableSeriesId as $, ACCENT as A, BEARISH as B, CATEGORICAL as C, type DrawingTypeMeta as D, TRADE_SHORT as E, categoricalColor as F, chartType as G, HIGHLIGHT as H, INFO as I, chartTypes as J, createDrawing as K, deserializeDrawing as L, MARKER as M, NEUTRAL as N, drawingTypes as O, getDrawingType as P, registerChartType as Q, type RendererLayerArgs as R, SERIES_LINE as S, TRADE_EXIT as T, registerDrawingType as U, VALID as V, WARNING as W, registerRendererDefaults as X, registerRendererLayer as Y, rendererDefaults as Z, rendererLayers as _, ACCENT_BRIGHT as a, tickerModifierIds as a0, unregisterChartType as a1, unregisterRendererDefaults as a2, unregisterRendererLayer as a3, BULLISH as b, type BarTransform as c, type BasePaintingModulation as d, CROSSHAIR as e, type ChartTypeDefinition as f, type ChartTypeSettingsInstance as g, type ChartTypeSettingsSection as h, type ChartTypeSettingsSubsection as i, INVALID as j, type IdentifiableKind as k, type RendererLayerDefinition as l, type RendererLayerInstance as m, SESSION_OFF as n, SESSION_POST as o, SESSION_PRE as p, SLATE as q, SLATE_DEEP as r, type SeriesDataEngine as s, type SeriesDataEngineHost as t, type SettingsRowCondition as u, type SettingsRowDescriptor as v, type SettingsRowSwatch as w, type SettingsRowWhen as x, type SettingsSelectOption as y, TRADE_LONG as z };
703
+ export { normalizeSettingsRow as $, ACCENT as A, BEARISH as B, CATEGORICAL as C, type DrawingTypeMeta as D, type SettingsRowValueKey as E, type SettingsRowWhen as F, type SettingsRowWidth as G, HIGHLIGHT as H, INFO as I, type SettingsSelectOption as J, type SettingsValueRow as K, TRADE_LONG as L, MARKER as M, NEUTRAL as N, TRADE_SHORT as O, categoricalColor as P, chartType as Q, type RendererLayerArgs as R, SERIES_LINE as S, TRADE_EXIT as T, chartTypes as U, VALID as V, WARNING as W, createDrawing as X, deserializeDrawing as Y, drawingTypes as Z, getDrawingType as _, ACCENT_BRIGHT as a, registerChartType as a0, registerDrawingType as a1, registerRendererDefaults as a2, registerRendererLayer as a3, rendererDefaults as a4, rendererLayers as a5, settingsRowValueKeys as a6, stableSeriesId as a7, tickerModifierIds as a8, unregisterChartType as a9, unregisterRendererDefaults as aa, unregisterRendererLayer as ab, BULLISH as b, type BarTransform as c, type BasePaintingModulation as d, CROSSHAIR as e, type ChartTypeDefinition as f, type ChartTypeSettingsInstance as g, type ChartTypeSettingsSection as h, type ChartTypeSettingsSubsection as i, INVALID as j, type IdentifiableKind as k, type NormalizedSettingsRow as l, type RendererLayerDefinition as m, type RendererLayerInstance as n, SESSION_OFF as o, SESSION_POST as p, SESSION_PRE as q, SLATE as r, SLATE_DEEP as s, type SeriesDataEngine as t, type SeriesDataEngineHost as u, type SettingsInlineControl as v, type SettingsRowCondition as w, type SettingsRowDescriptor as x, type SettingsRowInlineNumber as y, type SettingsRowSwatch as z };