@trdrs/quickcharts 2.4.0 → 4.0.0

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 (80) hide show
  1. package/CHANGELOG.md +121 -0
  2. package/README.md +326 -25
  3. package/dist/adapters/rest.d.ts +1 -1
  4. package/dist/{ar-KSXQ2USS.js → ar-FXZ5QJUR.js} +206 -56
  5. package/dist/ar-FXZ5QJUR.js.map +1 -0
  6. package/dist/{assets-M5emOz5c.d.ts → assets-Gg-UquDA.d.ts} +285 -61
  7. package/dist/{ca_ES-JG4FM55E.js → ca_ES-3WVKFBIF.js} +206 -56
  8. package/dist/ca_ES-3WVKFBIF.js.map +1 -0
  9. package/dist/chunk-C4MEVUNK.js +11449 -0
  10. package/dist/chunk-C4MEVUNK.js.map +1 -0
  11. package/dist/{de-VSW2LHNF.js → de-V72Q3OI7.js} +206 -56
  12. package/dist/de-V72Q3OI7.js.map +1 -0
  13. package/dist/drawings.d.ts +24 -13
  14. package/dist/drawings.js +5 -1
  15. package/dist/{es-5ZXIPVOB.js → es-CNQ3OJ6E.js} +206 -56
  16. package/dist/es-CNQ3OJ6E.js.map +1 -0
  17. package/dist/feature-manifest.json +94 -11
  18. package/dist/{fr-4F6DAWGD.js → fr-5WQBCGR4.js} +206 -56
  19. package/dist/fr-5WQBCGR4.js.map +1 -0
  20. package/dist/{he_IL-B7PBQUEV.js → he_IL-WXKA77UE.js} +206 -56
  21. package/dist/he_IL-WXKA77UE.js.map +1 -0
  22. package/dist/{id_ID-CYJRMXPC.js → id_ID-XPBAYSWK.js} +206 -56
  23. package/dist/id_ID-XPBAYSWK.js.map +1 -0
  24. package/dist/index.d.ts +1834 -1671
  25. package/dist/index.js +5405 -2619
  26. package/dist/index.js.map +1 -1
  27. package/dist/{it-KTX4SG5P.js → it-DR2EBNWX.js} +206 -56
  28. package/dist/it-DR2EBNWX.js.map +1 -0
  29. package/dist/{ja-V7OURU5D.js → ja-URB2CPXO.js} +206 -56
  30. package/dist/ja-URB2CPXO.js.map +1 -0
  31. package/dist/{ko-2RNEBYVE.js → ko-OE47NYVP.js} +206 -56
  32. package/dist/ko-OE47NYVP.js.map +1 -0
  33. package/dist/{ms_MY-EY235E7Q.js → ms_MY-BKCFRK2K.js} +206 -56
  34. package/dist/ms_MY-BKCFRK2K.js.map +1 -0
  35. package/dist/{pl-ADNVRP55.js → pl-3IKQRG3Y.js} +206 -56
  36. package/dist/pl-3IKQRG3Y.js.map +1 -0
  37. package/dist/{pt-OL2DR3DO.js → pt-PZHV5EZE.js} +206 -56
  38. package/dist/pt-PZHV5EZE.js.map +1 -0
  39. package/dist/quickcharts.css +2060 -717
  40. package/dist/{resources-C0cYryO9.d.ts → resources-Le6flcEn.d.ts} +1 -1
  41. package/dist/{ru-V6YFEPAF.js → ru-BAL6RQUV.js} +206 -56
  42. package/dist/ru-BAL6RQUV.js.map +1 -0
  43. package/dist/{sv-TORXQVE7.js → sv-Y6GBGDHM.js} +206 -56
  44. package/dist/sv-Y6GBGDHM.js.map +1 -0
  45. package/dist/{symbols-BL1fD4CS.d.ts → symbols-6V22WaRX.d.ts} +1 -1
  46. package/dist/symbols.d.ts +1 -1
  47. package/dist/{th-K6SJSYSY.js → th-MAMLMZKU.js} +206 -56
  48. package/dist/th-MAMLMZKU.js.map +1 -0
  49. package/dist/theme-manifest.json +204 -16
  50. package/dist/{tr-4AEM66KW.js → tr-3LQHINUZ.js} +206 -56
  51. package/dist/tr-3LQHINUZ.js.map +1 -0
  52. package/dist/{vi-YU5XCEUU.js → vi-GR4PSDKP.js} +206 -56
  53. package/dist/vi-GR4PSDKP.js.map +1 -0
  54. package/dist/{zh-QXKRYHU5.js → zh-2RJ5VNAI.js} +206 -56
  55. package/dist/zh-2RJ5VNAI.js.map +1 -0
  56. package/dist/{zh_TW-AYPDKG4Q.js → zh_TW-XEBSACHU.js} +206 -56
  57. package/dist/zh_TW-XEBSACHU.js.map +1 -0
  58. package/package.json +1 -1
  59. package/dist/ar-KSXQ2USS.js.map +0 -1
  60. package/dist/ca_ES-JG4FM55E.js.map +0 -1
  61. package/dist/chunk-YR7NT5ZW.js +0 -6997
  62. package/dist/chunk-YR7NT5ZW.js.map +0 -1
  63. package/dist/de-VSW2LHNF.js.map +0 -1
  64. package/dist/es-5ZXIPVOB.js.map +0 -1
  65. package/dist/fr-4F6DAWGD.js.map +0 -1
  66. package/dist/he_IL-B7PBQUEV.js.map +0 -1
  67. package/dist/id_ID-CYJRMXPC.js.map +0 -1
  68. package/dist/it-KTX4SG5P.js.map +0 -1
  69. package/dist/ja-V7OURU5D.js.map +0 -1
  70. package/dist/ko-2RNEBYVE.js.map +0 -1
  71. package/dist/ms_MY-EY235E7Q.js.map +0 -1
  72. package/dist/pl-ADNVRP55.js.map +0 -1
  73. package/dist/pt-OL2DR3DO.js.map +0 -1
  74. package/dist/ru-V6YFEPAF.js.map +0 -1
  75. package/dist/sv-TORXQVE7.js.map +0 -1
  76. package/dist/th-K6SJSYSY.js.map +0 -1
  77. package/dist/tr-4AEM66KW.js.map +0 -1
  78. package/dist/vi-YU5XCEUU.js.map +0 -1
  79. package/dist/zh-QXKRYHU5.js.map +0 -1
  80. package/dist/zh_TW-AYPDKG4Q.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import { Time, IChartApi, ISeriesApi, SeriesType } from 'lightweight-charts';
2
- import { R as ResourceStore, T as TemplateMeta, a as TemplateBody, b as ResourceRef, W as WriteOutcome } from './resources-C0cYryO9.js';
2
+ import { i as ResourceStore, j as TemplateMeta, T as TemplateBody, R as ResourceRef, W as WriteOutcome } from './resources-Le6flcEn.js';
3
3
 
4
4
  /** One timeframe bucket's visibility rule: enabled + the inclusive value range it covers. */
5
5
  interface VisibilityRange {
@@ -47,6 +47,41 @@ declare function normalizeVisibility(partial?: Partial<TimeframeVisibility>): Ti
47
47
  /** Whether a drawing with this visibility config shows at the given timeframe. */
48
48
  declare function visibleAt(visibility: TimeframeVisibility, context: TimeframeContext): boolean;
49
49
 
50
+ /** What an inline edit shows on the chart, as the field reports it: the words typed so far, the
51
+ * selection, the run an input method is composing, and whether the caret is lit. */
52
+ interface TextDraft {
53
+ /** The words as they stand in the field. */
54
+ value: string;
55
+ /** The selection as offsets into `value`; equal offsets are a caret. */
56
+ selectionStart: number;
57
+ selectionEnd: number;
58
+ /** The run an input method is composing, as offsets into `value`, or null. */
59
+ composition: {
60
+ start: number;
61
+ end: number;
62
+ } | null;
63
+ /** Whether the caret paints: the field has the focus and the blink is in its lit half. */
64
+ caret: boolean;
65
+ }
66
+ /** Where a drawing's words stand on the pane, which is where an inline editor lays its field. */
67
+ interface TextEditFrame {
68
+ /** The first line's top-left, in pane-local CSS pixels. */
69
+ x: number;
70
+ y: number;
71
+ /** The widest line's width. */
72
+ width: number;
73
+ /** How many lines the words take. */
74
+ lines: number;
75
+ lineHeight: number;
76
+ /** The CSS font the words paint in. */
77
+ font: string;
78
+ align: 'left' | 'center' | 'right';
79
+ /** The width the words wrap at, or null when each line runs its own length. */
80
+ wrapWidth: number | null;
81
+ /** Radians the words turn about their top-left. */
82
+ angle: number;
83
+ }
84
+
50
85
  /** How the host writes a price: the symbol's own formatter, injected so every drawing label,
51
86
  * pill and readout carries the market's declared precision. The drawings package never derives a
52
87
  * precision from a price's magnitude. */
@@ -95,6 +130,8 @@ interface DrawingOptions {
95
130
  zIndex: number;
96
131
  /** Which chart timeframes the drawing shows on (independent of the manual `visible` switch). */
97
132
  visibility: TimeframeVisibility;
133
+ /** The name the viewer gave the drawing. Absent, the drawing is called by its tool's name. */
134
+ name?: string;
98
135
  }
99
136
  declare const DEFAULT_OPTIONS: DrawingOptions;
100
137
  /**
@@ -102,7 +139,10 @@ declare const DEFAULT_OPTIONS: DrawingOptions;
102
139
  * its COMPLETE state through this shape (the schema exists so nothing is ever dropped on save).
103
140
  */
104
141
  interface SerializedDrawing {
105
- v: 2;
142
+ /** The format's version. A drawing saves at 3. A save at 2 carries the props and style of the
143
+ * looks format 2 painted, and restores with that look: a tool whose factory values, prop
144
+ * meanings or paint rules differ at 3 writes the values that paint the save as it painted. */
145
+ v: 2 | 3;
106
146
  id: string;
107
147
  type: string;
108
148
  anchors: Anchor[];
@@ -133,6 +173,8 @@ interface Viewport {
133
173
  logicalOf(time: Time): number | null;
134
174
  /** The time at a bar index (null in whitespace beyond the loaded range). */
135
175
  timeOfLogical(logical: number): Time | null;
176
+ /** Whether the pane's price scale is logarithmic. Absent, it is read as linear. */
177
+ logScale?: boolean;
136
178
  }
137
179
  /** A draggable handle over an anchor, in pane-local CSS pixels. */
138
180
  interface ControlPoint {
@@ -152,6 +194,8 @@ interface IDrawing {
152
194
  state: DrawingState;
153
195
  setAnchors(anchors: Anchor[]): void;
154
196
  updateAnchor(index: number, anchor: Anchor): void;
197
+ /** The symbol's tick as the host stated it, or null without one. */
198
+ getTickSize?(): number | null;
155
199
  appendAnchor(anchor: Anchor): void;
156
200
  removeAnchor(index: number): void;
157
201
  updateStyle(patch: Partial<DrawingStyle>): void;
@@ -168,6 +212,10 @@ interface IDrawing {
168
212
  setGlobalHidden(hidden: boolean): void;
169
213
  /** The symbol's smallest price move (tick-denominated readouts); null omits those readouts. */
170
214
  setTickSize(tick: number | null): void;
215
+ /** The currency the symbol is quoted in (an amount's unit); null where the host states none. */
216
+ setCurrencyCode(code: string | null): void;
217
+ /** The currency the symbol is quoted in, or null where the host states none. */
218
+ getCurrencyCode?(): string | null;
171
219
  /** The symbol's price formatter (the manager broadcasts it); null returns to the declared
172
220
  * stand-in. */
173
221
  setPriceFormatter(format: PriceFormatPort | null): void;
@@ -192,6 +240,28 @@ interface IDrawing {
192
240
  } | null;
193
241
  /** An inline text editor is open on this drawing — the hint stays hidden underneath it. */
194
242
  textEditing: boolean;
243
+ /** The draft an open inline edit shows on a drawing that types its words on the chart. */
244
+ readonly textDraft: TextDraft | null;
245
+ /** Show an inline edit's draft, or end it with null; `onFrame` hears where the words stand each
246
+ * time a repaint moves them. */
247
+ setTextDraft(draft: TextDraft | null, onFrame?: (frame: TextEditFrame | null) => void): void;
248
+ /** Where the drawing's words stand, for an editor laid over them; null for a tool that does not
249
+ * type its words on the chart. */
250
+ textFrame(viewport: Viewport): TextEditFrame | null;
251
+ /** Where the words an empty drawing shows come from, read as it paints. */
252
+ setTextPlaceholder(source: (() => string) | null): void;
253
+ /** The anchors a drag that grabs the drawing at a point moves: null for all of them. */
254
+ grabbedAnchors(point: Point, viewport: Viewport): number[] | null;
255
+ /** Whether a point is on the drawing's words, where a click on the selected drawing types. */
256
+ wordsAt(point: Point, viewport: Viewport): boolean;
257
+ /** Move an anchor by its handle: to the point, unless the tool holds a handle to a line. */
258
+ dragAnchorTo(index: number, anchor: Anchor): void;
259
+ /** Whether the pointer rests on the drawing. */
260
+ readonly hovered: boolean;
261
+ setHovered(on: boolean): void;
262
+ /** Where a mouse rests over the chart while the drawing is selected, or null. */
263
+ readonly pointer: Point | null;
264
+ setPointer(point: Point | null): void;
195
265
  getViewport(): Viewport | null;
196
266
  requestUpdate(): void;
197
267
  toJSON(): SerializedDrawing;
@@ -371,6 +441,8 @@ declare const en: {
371
441
  readonly 'command.drawingTemplateRemove': "Remove drawing template";
372
442
  readonly 'command.drawingTableAddRow': "Add table row";
373
443
  readonly 'command.drawingTableAddColumn': "Add table column";
444
+ readonly 'command.drawingTableRemoveRow': "Remove table row";
445
+ readonly 'command.drawingTableRemoveColumn': "Remove table column";
374
446
  readonly 'command.drawingCancel': "Cancel drawing";
375
447
  readonly 'command.compareOpen': "Compare or add symbol";
376
448
  readonly 'command.compareAdd': "Add comparison";
@@ -493,8 +565,6 @@ declare const en: {
493
565
  readonly 'drawing.applyDefaultTemplate': "Apply default drawing template";
494
566
  readonly 'drawing.removeTemplateNamed': "Remove template {name}";
495
567
  readonly 'drawing.remove': "Remove";
496
- readonly 'drawing.addRowShort': "+ Row";
497
- readonly 'drawing.addColumnShort': "+ Col";
498
568
  readonly 'drawing.drawingColor': "Drawing color";
499
569
  readonly 'drawing.backgroundColor': "Background color";
500
570
  readonly 'drawing.thickness': "Thickness";
@@ -547,14 +617,15 @@ declare const en: {
547
617
  readonly 'drawing.deleteTemplateTitle': "Delete this template?";
548
618
  readonly 'drawing.deleteTemplateBody': "Doing this will permanently delete your \"{name}\" drawing template.";
549
619
  readonly 'drawing.settingsTitle': "{tool} settings";
620
+ readonly 'drawing.rename': "Rename";
621
+ readonly 'drawing.name': "Name";
550
622
  readonly 'drawing.tabInputs': "Inputs";
551
623
  readonly 'drawing.tabStyle': "Style";
552
624
  readonly 'drawing.tabText': "Text";
553
- readonly 'drawing.tabTable': "Table";
554
625
  readonly 'drawing.tabCoordinates': "Coordinates";
555
626
  readonly 'drawing.tabVisibility': "Visibility";
556
627
  readonly 'drawing.template': "Template";
557
- readonly 'drawing.saveAs': "Save as...";
628
+ readonly 'drawing.saveAs': "Save as…";
558
629
  readonly 'drawing.applyDefaults': "Apply defaults";
559
630
  readonly 'drawing.cancel': "Cancel";
560
631
  readonly 'drawing.ok': "Ok";
@@ -564,15 +635,14 @@ declare const en: {
564
635
  readonly 'drawing.rowLine': "Line";
565
636
  readonly 'drawing.background': "Background";
566
637
  readonly 'drawing.border': "Border";
567
- readonly 'drawing.profitColor': "Target zone color";
568
- readonly 'drawing.stopColor': "Stop zone color";
638
+ readonly 'drawing.profitColor': "Target color";
639
+ readonly 'drawing.stopColor': "Stop color";
569
640
  readonly 'drawing.textColor': "Text color";
570
641
  readonly 'drawing.fontSize': "Font size";
571
- readonly 'drawing.size': "Size";
572
- readonly 'drawing.width': "Width";
573
642
  readonly 'drawing.opacity': "Opacity";
574
643
  readonly 'drawing.transparency': "Transparency";
575
644
  readonly 'drawing.label': "Label";
645
+ readonly 'drawing.labelColor': "Label color";
576
646
  readonly 'drawing.labels': "Labels";
577
647
  readonly 'drawing.left': "Left";
578
648
  readonly 'drawing.center': "Center";
@@ -606,9 +676,7 @@ declare const en: {
606
676
  readonly 'drawing.variantModifiedSchiff': "Modified Schiff";
607
677
  readonly 'drawing.variantInside': "Inside";
608
678
  readonly 'drawing.sectionStats': "Stats";
609
- readonly 'drawing.priceChange': "Price change";
610
679
  readonly 'drawing.percentChange': "Percent change";
611
- readonly 'drawing.bars': "Bars";
612
680
  readonly 'drawing.dateTimeRange': "Date/time range";
613
681
  readonly 'drawing.volume': "Volume";
614
682
  readonly 'drawing.sectionInfo': "Info";
@@ -616,58 +684,49 @@ declare const en: {
616
684
  readonly 'drawing.barsRange': "Bars range";
617
685
  readonly 'drawing.angle': "Angle";
618
686
  readonly 'drawing.statsPosition': "Stats position";
687
+ readonly 'drawing.statsHidden': "Hidden";
688
+ readonly 'drawing.changeInPips': "Change in pips";
689
+ readonly 'drawing.alwaysShowStats': "Always show stats";
690
+ readonly 'drawing.auto': "Auto";
691
+ readonly 'drawing.extendLeftLine': "Extend left line";
692
+ readonly 'drawing.extendRightLine': "Extend right line";
619
693
  readonly 'drawing.direction': "Direction";
620
694
  readonly 'drawing.prices': "Prices";
621
695
  readonly 'drawing.levels': "Levels";
622
696
  readonly 'drawing.reverse': "Reverse";
623
697
  readonly 'drawing.fullCircles': "Full circles";
624
698
  readonly 'drawing.coeffsAsPercents': "Coeffs as percents";
625
- readonly 'drawing.glyph': "Glyph";
626
699
  readonly 'drawing.image': "Image";
627
- readonly 'drawing.replaceEllipsis': "Replace...";
628
- readonly 'drawing.chooseEllipsis': "Choose...";
629
- readonly 'drawing.link': "Link";
630
- readonly 'drawing.rowsLayout': "Rows layout";
631
- readonly 'drawing.rowsByNumber': "Number of rows";
632
- readonly 'drawing.ticksPerRow': "Ticks per row";
633
- readonly 'drawing.rowSize': "Row size";
700
+ readonly 'drawing.rowsLayout': "Rows Layout";
701
+ readonly 'drawing.rowsByNumber': "Number Of Rows";
702
+ readonly 'drawing.ticksPerRow': "Ticks Per Row";
703
+ readonly 'drawing.rowSize': "Row Size";
634
704
  readonly 'drawing.upDown': "Up/Down";
635
705
  readonly 'drawing.total': "Total";
636
706
  readonly 'drawing.delta': "Delta";
637
- readonly 'drawing.valueAreaVolume': "Value area volume";
638
- readonly 'drawing.widthPercent': "Width %";
707
+ readonly 'drawing.valueAreaVolume': "Value Area Volume";
708
+ readonly 'drawing.widthPercent': "Width (% of the box)";
639
709
  readonly 'drawing.placement': "Placement";
640
- readonly 'drawing.upDownVolume': "Up/Down volume";
641
- readonly 'drawing.valueAreaUpDown': "Value area up/down";
642
- readonly 'drawing.pointOfControl': "Point of control";
643
- readonly 'drawing.valueAreaHigh': "Value area high";
644
- readonly 'drawing.valueAreaLow': "Value area low";
645
- readonly 'drawing.developingPoc': "Developing PoC";
710
+ readonly 'drawing.developingPoc': "Developing POC";
646
711
  readonly 'drawing.developingVa': "Developing VA";
647
712
  readonly 'drawing.source': "Source";
648
713
  readonly 'drawing.mode': "Mode";
649
- readonly 'drawing.modeLineOpen': "Line (Open)";
650
- readonly 'drawing.modeLineHigh': "Line (High)";
651
- readonly 'drawing.modeLineLow': "Line (Low)";
652
- readonly 'drawing.modeLineClose': "Line (Close)";
653
- readonly 'drawing.modeLineHl2': "Line (HL2)";
714
+ readonly 'drawing.modeHlBars': "HL bars";
715
+ readonly 'drawing.modeOcBars': "OC bars";
716
+ readonly 'drawing.modeLineOpen': "Line - open";
717
+ readonly 'drawing.modeLineHigh': "Line - high";
718
+ readonly 'drawing.modeLineLow': "Line - low";
719
+ readonly 'drawing.modeLineClose': "Line - close";
720
+ readonly 'drawing.modeLineHl2': "Line - HL/2";
654
721
  readonly 'drawing.mirrored': "Mirrored";
655
722
  readonly 'drawing.flipped': "Flipped";
656
- readonly 'drawing.target': "Target";
657
- readonly 'drawing.success': "Success";
658
- readonly 'drawing.failure': "Failure";
659
- readonly 'drawing.avgHl': "Avg HL";
723
+ readonly 'drawing.avgHlMinticks': "Avg HL in minticks";
660
724
  readonly 'drawing.variance': "Variance";
661
- readonly 'drawing.body': "Body";
725
+ readonly 'drawing.candles': "Candles";
662
726
  readonly 'drawing.borders': "Borders";
663
- readonly 'drawing.drawBorders': "Draw borders";
664
727
  readonly 'drawing.wick': "Wick";
665
- readonly 'drawing.drawWicks': "Draw wicks";
666
- readonly 'drawing.sectionDeviation': "Deviation";
667
- readonly 'drawing.upper': "Upper";
668
- readonly 'drawing.lower': "Lower";
669
- readonly 'drawing.useUpperDeviation': "Use upper deviation";
670
- readonly 'drawing.useLowerDeviation': "Use lower deviation";
728
+ readonly 'drawing.useUpperDeviation': "Use Upper Deviation";
729
+ readonly 'drawing.useLowerDeviation': "Use Lower Deviation";
671
730
  readonly 'drawing.risk': "Risk";
672
731
  readonly 'drawing.accountSize': "Account size";
673
732
  readonly 'drawing.lotSize': "Lot size";
@@ -677,20 +736,168 @@ declare const en: {
677
736
  readonly 'drawing.levelText': "Level {value} text";
678
737
  readonly 'drawing.removeLevel': "Remove level {value}";
679
738
  readonly 'drawing.addLevel': "Add level";
680
- readonly 'drawing.weight': "Weight";
739
+ readonly 'drawing.trendLine': "Trend line";
740
+ readonly 'drawing.levelsLine': "Levels line";
741
+ readonly 'drawing.extendLinesLeft': "Extend lines left";
742
+ readonly 'drawing.extendLinesRight': "Extend lines right";
743
+ readonly 'drawing.levelOn': "Level {n}";
744
+ readonly 'drawing.levelValue': "Level {n} value";
745
+ readonly 'drawing.levelColor': "Level {n} color";
746
+ readonly 'drawing.useOneColor': "Use one color";
747
+ readonly 'drawing.backgroundOpacity': "Background opacity";
748
+ readonly 'drawing.values': "Values";
749
+ readonly 'drawing.percents': "Percents";
750
+ readonly 'drawing.levelWords': "Text";
751
+ readonly 'drawing.levelsOnLogScale': "Fib levels based on log scale";
752
+ readonly 'drawing.median': "Median";
753
+ readonly 'drawing.counterclockwise': "Counterclockwise";
754
+ readonly 'drawing.fans': "Fans";
755
+ readonly 'drawing.arcs': "Arcs";
756
+ readonly 'drawing.fanOn': "Fan {n}";
757
+ readonly 'drawing.fanColor': "Fan {n} color";
758
+ readonly 'drawing.arcOn': "Arc {n}";
759
+ readonly 'drawing.arcColor': "Arc {n} color";
760
+ readonly 'drawing.priceBarRatio': "Price/bar ratio";
761
+ readonly 'drawing.rangesAndRatio': "Ranges and ratio";
762
+ readonly 'drawing.wave': "Wave";
763
+ readonly 'drawing.lines': "Lines";
764
+ readonly 'drawing.degree': "Degree";
765
+ readonly 'drawing.degreeSupermillennium': "Supermillennium";
766
+ readonly 'drawing.degreeMillennium': "Millennium";
767
+ readonly 'drawing.degreeSubmillennium': "Submillennium";
768
+ readonly 'drawing.degreeGrandSupercycle': "Grand supercycle";
769
+ readonly 'drawing.degreeSupercycle': "Supercycle";
770
+ readonly 'drawing.degreeCycle': "Cycle";
771
+ readonly 'drawing.degreePrimary': "Primary";
772
+ readonly 'drawing.degreeIntermediate': "Intermediate";
773
+ readonly 'drawing.degreeMinor': "Minor";
774
+ readonly 'drawing.degreeMinute': "Minute";
775
+ readonly 'drawing.degreeMinuette': "Minuette";
776
+ readonly 'drawing.degreeSubminuette': "Subminuette";
777
+ readonly 'drawing.degreeMicro': "Micro";
778
+ readonly 'drawing.degreeSubmicro': "Submicro";
779
+ readonly 'drawing.degreeMinuscule': "Minuscule";
780
+ readonly 'drawing.upperDeviation': "Upper Deviation";
781
+ readonly 'drawing.lowerDeviation': "Lower Deviation";
782
+ readonly 'drawing.base': "Base";
783
+ readonly 'drawing.pearsonsR': "Pearson's R";
784
+ readonly 'drawing.sourceOpen': "Open";
785
+ readonly 'drawing.sourceHigh': "High";
786
+ readonly 'drawing.sourceLow': "Low";
787
+ readonly 'drawing.sourceClose': "Close";
788
+ readonly 'drawing.sourceVolume': "Volume";
789
+ readonly 'drawing.sourceHl2': "(H + L)/2";
790
+ readonly 'drawing.sourceHlc3': "(H + L + C)/3";
791
+ readonly 'drawing.sourceOhlc4': "(O + H + L + C)/4";
792
+ readonly 'drawing.sourceHlcc4': "(H + L + C + C)/4";
793
+ readonly 'drawing.pricesColor': "Prices color";
794
+ readonly 'drawing.priceOffset': "Price offset";
795
+ readonly 'drawing.textWrap': "Text wrap";
796
+ readonly 'drawing.labelBorder': "Label border";
797
+ readonly 'drawing.labelText': "Label text";
798
+ readonly 'drawing.lineColor': "Line color";
799
+ readonly 'drawing.emojiPin': "Emoji pin";
800
+ readonly 'drawing.emoji': "Emoji";
801
+ readonly 'drawing.plateColor': "Plate color";
802
+ readonly 'drawing.arrowMark': "Arrow";
803
+ readonly 'drawing.flag': "Flag";
804
+ readonly 'drawing.coordPositionBar': "#{n} (vertical position %, bar)";
805
+ readonly 'drawing.verticalPosition': "Vertical position %";
806
+ readonly 'drawing.riskUnit': "Risk unit";
807
+ readonly 'drawing.riskAmount': "Amount";
808
+ readonly 'drawing.entryPrice': "Entry price";
809
+ readonly 'drawing.profitLevel': "Profit level";
810
+ readonly 'drawing.stopLevel': "Stop level";
811
+ readonly 'drawing.ticks': "Ticks";
812
+ readonly 'drawing.price': "Price";
813
+ readonly 'drawing.qtyPrecision': "QTY precision";
814
+ readonly 'drawing.qtyDefault': "Default";
815
+ readonly 'drawing.qtyInteger': "Integer";
816
+ readonly 'drawing.qtyOneDecimal': "1 decimal";
817
+ readonly 'drawing.qtyDecimals': "{n} decimals";
818
+ readonly 'drawing.text': "Text";
819
+ readonly 'drawing.statTpPriceOffset': "TP price offset";
820
+ readonly 'drawing.statTpPercentOffset': "TP percent offset";
821
+ readonly 'drawing.statTpTickOffset': "TP tick offset";
822
+ readonly 'drawing.statTpAmount': "TP amount";
823
+ readonly 'drawing.statTpPl': "TP PL";
824
+ readonly 'drawing.statOpenClosePl': "Open/closed PL";
825
+ readonly 'drawing.statQty': "Qty";
826
+ readonly 'drawing.statRiskRewardRatio': "Risk/reward ratio";
827
+ readonly 'drawing.statSlPriceOffset': "SL price offset";
828
+ readonly 'drawing.statSlPercentOffset': "SL percent offset";
829
+ readonly 'drawing.statSlTickOffset': "SL tick offset";
830
+ readonly 'drawing.statSlAmount': "SL amount";
831
+ readonly 'drawing.statSlPl': "SL PL";
832
+ readonly 'drawing.profileExtendRight': "Extend Right";
833
+ readonly 'drawing.volumeProfile': "Volume profile";
834
+ readonly 'drawing.valuesColor': "Values color";
835
+ readonly 'drawing.upVolume': "Up Volume";
836
+ readonly 'drawing.downVolume': "Down Volume";
837
+ readonly 'drawing.valueAreaUp': "Value Area Up";
838
+ readonly 'drawing.valueAreaDown': "Value Area Down";
839
+ readonly 'drawing.vah': "VAH";
840
+ readonly 'drawing.val': "VAL";
841
+ readonly 'drawing.poc': "POC";
842
+ readonly 'drawing.histogramBox': "Histogram Box";
843
+ readonly 'drawing.labelsOnPriceScale': "Labels on price scale";
844
+ readonly 'drawing.bandsSettings': "Bands Settings";
845
+ readonly 'drawing.bandsMode': "Bands Calculation Mode";
846
+ readonly 'drawing.bandsStdev': "Standard Deviation";
847
+ readonly 'drawing.bandsPercent': "Percentage";
848
+ readonly 'drawing.bandsMultiplier': "Bands Multiplier #{n}";
849
+ readonly 'drawing.vwap': "VWAP";
850
+ readonly 'drawing.upperBand': "Upper band #{n}";
851
+ readonly 'drawing.lowerBand': "Lower band #{n}";
852
+ readonly 'drawing.bandBackground': "Background #{n}";
853
+ readonly 'drawing.extendTop': "Extend top";
854
+ readonly 'drawing.extendBottom': "Extend bottom";
855
+ readonly 'drawing.labelBackground': "Label background";
856
+ readonly 'drawing.sourceText': "Source text";
857
+ readonly 'drawing.sourceBackground': "Source background";
858
+ readonly 'drawing.sourceBorder': "Source border";
859
+ readonly 'drawing.targetText': "Target text";
860
+ readonly 'drawing.targetBackground': "Target background";
861
+ readonly 'drawing.targetBorder': "Target border";
862
+ readonly 'drawing.successText': "Success text";
863
+ readonly 'drawing.successBackground': "Success background";
864
+ readonly 'drawing.failureText': "Failure text";
865
+ readonly 'drawing.failureBackground': "Failure background";
866
+ readonly 'drawing.backgroundFirst': "First background";
867
+ readonly 'drawing.backgroundSecond': "Second background";
868
+ readonly 'drawing.priceLevels': "Price levels";
869
+ readonly 'drawing.timeLevels': "Time levels";
870
+ readonly 'drawing.priceLevelOn': "Price level {n}";
871
+ readonly 'drawing.priceLevelValue': "Price level {n} value";
872
+ readonly 'drawing.priceLevelColor': "Price level {n} color";
873
+ readonly 'drawing.timeLevelOn': "Time level {n}";
874
+ readonly 'drawing.timeLevelValue': "Time level {n} value";
875
+ readonly 'drawing.timeLevelColor': "Time level {n} color";
876
+ readonly 'drawing.leftLabels': "Left labels";
877
+ readonly 'drawing.rightLabels': "Right labels";
878
+ readonly 'drawing.topLabels': "Top labels";
879
+ readonly 'drawing.bottomLabels': "Bottom labels";
880
+ readonly 'drawing.grid': "Grid";
881
+ readonly 'drawing.angles': "Angles";
681
882
  readonly 'drawing.bold': "Bold";
682
883
  readonly 'drawing.italic': "Italic";
683
884
  readonly 'drawing.addText': "Add text";
684
- readonly 'drawing.alignment': "Alignment";
885
+ readonly 'drawing.textAlignment': "Text alignment";
886
+ readonly 'drawing.top': "Top";
887
+ readonly 'drawing.middle': "Middle";
888
+ readonly 'drawing.bottom': "Bottom";
889
+ readonly 'drawing.inside': "Inside";
890
+ readonly 'drawing.textOrientation': "Text orientation";
891
+ readonly 'drawing.horizontal': "Horizontal";
892
+ readonly 'drawing.vertical': "Vertical";
685
893
  readonly 'drawing.textPlaceholder': "Text";
686
894
  readonly 'drawing.textEditor': "Drawing text";
687
- readonly 'drawing.headerRow': "Header row";
688
- readonly 'drawing.tableCell': "Cell {row},{col}";
689
- readonly 'drawing.addRow': "Add row";
895
+ readonly 'drawing.addColumnRight': "Add column to right";
896
+ readonly 'drawing.addRowBelow': "Add row below";
690
897
  readonly 'drawing.removeRow': "Remove row";
691
- readonly 'drawing.addColumn': "Add column";
692
898
  readonly 'drawing.removeColumn': "Remove column";
693
899
  readonly 'drawing.coordBar': "#{n} (bar)";
900
+ readonly 'drawing.coordPrice': "#{n} (price)";
694
901
  readonly 'drawing.coordPriceBar': "#{n} (price, bar)";
695
902
  readonly 'drawing.unitTicks': "Ticks";
696
903
  readonly 'drawing.unitSeconds': "Seconds";
@@ -701,7 +908,7 @@ declare const en: {
701
908
  readonly 'drawing.unitMonths': "Months";
702
909
  readonly 'drawing.timeframePinnedNote': "A drawing stays on at least one timeframe, so it can always be reached again.";
703
910
  readonly 'drawing.colorSwatch': "Color {hex}";
704
- readonly 'drawing.customColor': "Custom color";
911
+ readonly 'drawing.addCustomColor': "Add custom color";
705
912
  readonly 'drawing.saturationValue': "Saturation and brightness";
706
913
  readonly 'drawing.hue': "Hue";
707
914
  readonly 'drawing.hexColor': "Hex color";
@@ -729,10 +936,10 @@ declare const en: {
729
936
  readonly 'drawing.glyphCatIconSymbols': "Symbols and flags";
730
937
  readonly 'drawing.imageReading': "Reading...";
731
938
  readonly 'drawing.chooseImage': "Choose image";
732
- readonly 'drawing.imageFormats': "JPG or PNG";
939
+ readonly 'drawing.imageFormats': "JPG, PNG or WEBP";
733
940
  readonly 'drawing.imageMaxSize': "Max size 2MB";
734
941
  readonly 'drawing.imageDimensions': "{width} x {height}";
735
- readonly 'drawing.imageErrorType': "That file is not a JPG or PNG. Pick one of those two formats.";
942
+ readonly 'drawing.imageErrorType': "That file is not a JPG, PNG or WEBP. Pick one of those three formats.";
736
943
  readonly 'drawing.imageErrorSize': "That image is {size}. The limit is 2MB.";
737
944
  readonly 'drawing.imageErrorRead': "That file could not be read. Try picking it again.";
738
945
  readonly 'drawing.imageErrorDecode': "That image could not be opened. It may be damaged.";
@@ -755,6 +962,7 @@ declare const en: {
755
962
  readonly 'search.compareEmpty': "No symbols here yet. Why not add some?";
756
963
  readonly 'search.allClasses': "All";
757
964
  readonly 'search.classFilter': "Asset class";
965
+ readonly 'search.limitToScope': "Limit search to {scope}";
758
966
  readonly 'search.opDivision': "Division";
759
967
  readonly 'search.opSubtraction': "Subtraction";
760
968
  readonly 'search.opAddition': "Addition";
@@ -1053,12 +1261,25 @@ declare const en: {
1053
1261
  readonly 'replay.startDate': "Date…";
1054
1262
  readonly 'replay.startFirst': "First available date";
1055
1263
  readonly 'replay.startRandom': "Random bar";
1264
+ readonly 'replay.close': "Close";
1056
1265
  readonly 'replay.startDateField': "Replay start date";
1057
1266
  readonly 'replay.startTimeField': "Replay start time (UTC, optional)";
1058
1267
  readonly 'replay.dateMask': "YYYY-MM-DD";
1059
1268
  readonly 'replay.timeMask': "HH:MM";
1060
- readonly 'replay.previousMonth': "Previous month";
1061
- readonly 'replay.nextMonth': "Next month";
1269
+ readonly 'replay.chooseTime': "Choose a time";
1270
+ readonly 'replay.previousMonth': "Previous month, {month}";
1271
+ readonly 'replay.nextMonth': "Next month, {month}";
1272
+ readonly 'replay.previousYear': "Previous year, {year}";
1273
+ readonly 'replay.nextYear': "Next year, {year}";
1274
+ readonly 'replay.previousYears': "Previous years, {years}";
1275
+ readonly 'replay.nextYears': "Next years, {years}";
1276
+ readonly 'replay.showMonths': "Switch to months, {year}";
1277
+ readonly 'replay.showYears': "Switch to years, {years}";
1278
+ readonly 'replay.showDates': "Switch to dates, {month}";
1279
+ readonly 'replay.yearRange': "{from} - {to}";
1280
+ readonly 'replay.months': "Months";
1281
+ readonly 'replay.years': "Years";
1282
+ readonly 'replay.firstAvailableDay': "Select the first available day";
1062
1283
  readonly 'replay.cancel': "Cancel";
1063
1284
  readonly 'replay.select': "Select";
1064
1285
  readonly 'replay.weekdayMon': "Mo";
@@ -1165,7 +1386,6 @@ declare const en: {
1165
1386
  readonly 'tool.fixed_range_volume_profile': "Fixed range volume profile";
1166
1387
  readonly 'tool.anchored_volume_profile': "Anchored volume profile";
1167
1388
  readonly 'tool.image': "Image";
1168
- readonly 'tool.content_card': "Content card";
1169
1389
  readonly 'tool.emoji': "Emoji";
1170
1390
  readonly 'tool.sticker': "Sticker";
1171
1391
  readonly 'tool.icon': "Icon";
@@ -1396,9 +1616,11 @@ declare class DrawingTemplates {
1396
1616
  declare const IMAGE_MAX_BYTES: number;
1397
1617
  /** Longest edge, in pixels. A larger picture is downscaled rather than refused. */
1398
1618
  declare const IMAGE_MAX_EDGE = 2000;
1619
+ /** The pictures the intake takes: a JPG, a PNG or a WEBP. A WEBP is stored re-encoded, as a PNG or a
1620
+ * JPEG, so a saved chart opens in every browser. */
1399
1621
  declare const IMAGE_TYPES: readonly string[];
1400
1622
  /** The `accept` attribute for a file input, kept beside the types it mirrors. */
1401
- declare const IMAGE_ACCEPT = "image/jpeg,image/png";
1623
+ declare const IMAGE_ACCEPT = "image/jpeg,image/png,image/webp";
1402
1624
  /** Why an intake failed. A CODE, not a sentence: the host renders it through the catalog, so the
1403
1625
  * reason reaches a viewer in their own language and no English lives in the port. */
1404
1626
  type ImageIntakeError = 'wrong-type' | 'too-large' | 'unreadable' | 'undecodable';
@@ -1406,7 +1628,7 @@ type ImageIntakeError = 'wrong-type' | 'too-large' | 'unreadable' | 'undecodable
1406
1628
  declare const IMAGE_ERROR_MESSAGES: Readonly<Record<ImageIntakeError, ChartMessageKey>>;
1407
1629
  /** A picture that is ready to store on a drawing. */
1408
1630
  interface ImageAsset {
1409
- /** A data URL sized within the caps. */
1631
+ /** A PNG or JPEG data URL sized within the caps, whatever the picked file was. */
1410
1632
  dataUrl: string;
1411
1633
  width: number;
1412
1634
  height: number;
@@ -1425,7 +1647,9 @@ type ImageIntakeResult = {
1425
1647
  interface DrawingAssetPort {
1426
1648
  /** Validate a picked file and turn it into a payload within the caps, or say why it cannot be
1427
1649
  * used. The host owns the decode and the resample; `checkImageFile` and `fitScale` below are the
1428
- * library's rules it applies. */
1650
+ * library's rules it applies. The stored `dataUrl` is always a PNG or a JPEG, whatever the picked
1651
+ * file was, so a saved chart opens everywhere: a WEBP is decoded and re-encoded on a canvas, as a
1652
+ * PNG where it has transparency and a JPEG otherwise. */
1429
1653
  intakeImage(file: File): Promise<ImageIntakeResult>;
1430
1654
  /** Optional replacement for the bundled Twemoji artwork. Artwork for one emoji or sticker glyph, as a URL the canvas can draw, or null to fall back to
1431
1655
  * drawing the glyph as text. Icon marks always stay text: their ink is tinted by the stroke
@@ -1449,4 +1673,4 @@ declare function fittedSize(width: number, height: number, maxEdge?: number): {
1449
1673
  height: number;
1450
1674
  };
1451
1675
 
1452
- export { clampFavoritesPosition as $, type Anchor as A, type ImageIntakeResult as B, type ChartMessageKey as C, type DrawingStyle as D, MAX_FAVORITE_TOOLS as E, type FavoritesPort as F, type GlyphSourcePort as G, TRANSIENT_LABELS as H, type IDrawing as I, TRANSIENT_TOOLS as J, type TimeframeBucket as K, type LineStyle as L, type MagnetMode as M, type TimeframeContext as N, type OhlcBar as O, type Point as P, type TimeframeVisibility as Q, type RemoveRow as R, type SerializedDrawing as S, type ToolCategory as T, type ToolPreset as U, type ToolTemplate as V, type TransientTool as W, type Viewport as X, type VisibilityPreset as Y, type VisibilityRange as Z, checkImageFile as _, CURSOR_LABELS as a, cursorButtonArmed as a0, decodePreset as a1, favoritesBarShown as a2, fitScale as a3, fittedSize as a4, isFavorite as a5, isTransientTool as a6, magnetSnap as a7, normalizeVisibility as a8, parseDrawingPreferences as a9, parseTimeframeContext as aa, pruneFavorites as ab, removableDrawings as ac, removeRows as ad, serializeDrawingPreferences as ae, snapToBar as af, toggleFavorite as ag, toolAfterPlacement as ah, transientSurvives as ai, visibilityPreset as aj, visibleAt as ak, en as al, CURSOR_MODES as b, type ControlPoint as c, type CursorMode as d, DEFAULT_DRAWING_PREFERENCES as e, DEFAULT_FAVORITES as f, DEFAULT_OPTIONS as g, DEFAULT_PRESET_NAME as h, DEFAULT_STYLE as i, DEFAULT_VISIBILITY as j, DRAWING_PREFERENCES_KEY as k, type DrawingAssetPort as l, type DrawingCounts as m, type DrawingOptions as n, type DrawingPreferences as o, type DrawingState as p, DrawingTemplates as q, type FavoritesPosition as r, type FavoritesState as s, IMAGE_ACCEPT as t, IMAGE_ERROR_MESSAGES as u, IMAGE_MAX_BYTES as v, IMAGE_MAX_EDGE as w, IMAGE_TYPES as x, type ImageAsset as y, type ImageIntakeError as z };
1676
+ export { type VisibilityRange as $, type Anchor as A, type ImageIntakeResult as B, type ChartMessageKey as C, type DrawingStyle as D, MAX_FAVORITE_TOOLS as E, type FavoritesPort as F, type GlyphSourcePort as G, TRANSIENT_LABELS as H, type IDrawing as I, TRANSIENT_TOOLS as J, type TextDraft as K, type LineStyle as L, type MagnetMode as M, type TextEditFrame as N, type OhlcBar as O, type Point as P, type TimeframeBucket as Q, type RemoveRow as R, type SerializedDrawing as S, type ToolCategory as T, type TimeframeContext as U, type TimeframeVisibility as V, type ToolPreset as W, type ToolTemplate as X, type TransientTool as Y, type Viewport as Z, type VisibilityPreset as _, CURSOR_LABELS as a, checkImageFile as a0, clampFavoritesPosition as a1, cursorButtonArmed as a2, decodePreset as a3, favoritesBarShown as a4, fitScale as a5, fittedSize as a6, isFavorite as a7, isTransientTool as a8, magnetSnap as a9, normalizeVisibility as aa, parseDrawingPreferences as ab, parseTimeframeContext as ac, pruneFavorites as ad, removableDrawings as ae, removeRows as af, serializeDrawingPreferences as ag, snapToBar as ah, toggleFavorite as ai, toolAfterPlacement as aj, transientSurvives as ak, visibilityPreset as al, visibleAt as am, en as an, CURSOR_MODES as b, type ControlPoint as c, type CursorMode as d, DEFAULT_DRAWING_PREFERENCES as e, DEFAULT_FAVORITES as f, DEFAULT_OPTIONS as g, DEFAULT_PRESET_NAME as h, DEFAULT_STYLE as i, DEFAULT_VISIBILITY as j, DRAWING_PREFERENCES_KEY as k, type DrawingAssetPort as l, type DrawingCounts as m, type DrawingOptions as n, type DrawingPreferences as o, type DrawingState as p, DrawingTemplates as q, type FavoritesPosition as r, type FavoritesState as s, IMAGE_ACCEPT as t, IMAGE_ERROR_MESSAGES as u, IMAGE_MAX_BYTES as v, IMAGE_MAX_EDGE as w, IMAGE_TYPES as x, type ImageAsset as y, type ImageIntakeError as z };