@trdrs/quickcharts 3.0.0 → 4.1.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 (76) hide show
  1. package/CHANGELOG.md +117 -0
  2. package/README.md +270 -30
  3. package/dist/{ar-HLKX6L6O.js → ar-VILLYPAA.js} +208 -56
  4. package/dist/ar-VILLYPAA.js.map +1 -0
  5. package/dist/{assets-C1VjN7DP.d.ts → assets-BF-NDyHl.d.ts} +288 -60
  6. package/dist/{ca_ES-3ALUJ2FI.js → ca_ES-EJXLAXOA.js} +208 -56
  7. package/dist/ca_ES-EJXLAXOA.js.map +1 -0
  8. package/dist/chunk-TBOVLJAK.js +12091 -0
  9. package/dist/chunk-TBOVLJAK.js.map +1 -0
  10. package/dist/{de-GXKOZYHP.js → de-PHID4SVN.js} +208 -56
  11. package/dist/de-PHID4SVN.js.map +1 -0
  12. package/dist/drawings.d.ts +34 -12
  13. package/dist/drawings.js +11 -1
  14. package/dist/{es-R7WSUWO2.js → es-KD4FBLOP.js} +208 -56
  15. package/dist/es-KD4FBLOP.js.map +1 -0
  16. package/dist/feature-manifest.json +74 -11
  17. package/dist/{fr-EBUMQLPT.js → fr-KTTX3FF3.js} +208 -56
  18. package/dist/fr-KTTX3FF3.js.map +1 -0
  19. package/dist/{he_IL-GCAXKEWB.js → he_IL-Z3DXMAKZ.js} +208 -56
  20. package/dist/he_IL-Z3DXMAKZ.js.map +1 -0
  21. package/dist/{id_ID-6JYEEKEA.js → id_ID-FFX6X4C5.js} +208 -56
  22. package/dist/id_ID-FFX6X4C5.js.map +1 -0
  23. package/dist/index.d.ts +1852 -1720
  24. package/dist/index.js +4664 -1870
  25. package/dist/index.js.map +1 -1
  26. package/dist/{it-IMLHI5VO.js → it-X2GFCLGU.js} +208 -56
  27. package/dist/it-X2GFCLGU.js.map +1 -0
  28. package/dist/{ja-QDEQ2EYA.js → ja-TG3WO2KH.js} +208 -56
  29. package/dist/ja-TG3WO2KH.js.map +1 -0
  30. package/dist/{ko-MTA7BZI3.js → ko-4HHHO7KV.js} +208 -56
  31. package/dist/ko-4HHHO7KV.js.map +1 -0
  32. package/dist/{ms_MY-K4EAHE5J.js → ms_MY-HPVQKVPY.js} +208 -56
  33. package/dist/ms_MY-HPVQKVPY.js.map +1 -0
  34. package/dist/{pl-CIIDQ3SB.js → pl-2W2HP34O.js} +208 -56
  35. package/dist/pl-2W2HP34O.js.map +1 -0
  36. package/dist/{pt-3HA2PDUN.js → pt-XQUBSXO7.js} +208 -56
  37. package/dist/pt-XQUBSXO7.js.map +1 -0
  38. package/dist/quickcharts.css +1660 -424
  39. package/dist/{ru-2F2VGHMW.js → ru-XKFQPFDM.js} +208 -56
  40. package/dist/ru-XKFQPFDM.js.map +1 -0
  41. package/dist/{sv-HCBRKFRZ.js → sv-ZMEGAPCR.js} +208 -56
  42. package/dist/sv-ZMEGAPCR.js.map +1 -0
  43. package/dist/{th-WWPM2QKB.js → th-4735BUT4.js} +208 -56
  44. package/dist/th-4735BUT4.js.map +1 -0
  45. package/dist/theme-manifest.json +148 -14
  46. package/dist/{tr-M57AMCWK.js → tr-PG3CW2L3.js} +208 -56
  47. package/dist/tr-PG3CW2L3.js.map +1 -0
  48. package/dist/{vi-YJHN2OK7.js → vi-YPRIAJ33.js} +208 -56
  49. package/dist/vi-YPRIAJ33.js.map +1 -0
  50. package/dist/{zh-AIFC65OE.js → zh-RVHEWNSW.js} +208 -56
  51. package/dist/zh-RVHEWNSW.js.map +1 -0
  52. package/dist/{zh_TW-2LLLW4H6.js → zh_TW-ZFJMDA64.js} +208 -56
  53. package/dist/zh_TW-ZFJMDA64.js.map +1 -0
  54. package/package.json +1 -1
  55. package/dist/ar-HLKX6L6O.js.map +0 -1
  56. package/dist/ca_ES-3ALUJ2FI.js.map +0 -1
  57. package/dist/chunk-DBJQXHLQ.js +0 -7003
  58. package/dist/chunk-DBJQXHLQ.js.map +0 -1
  59. package/dist/de-GXKOZYHP.js.map +0 -1
  60. package/dist/es-R7WSUWO2.js.map +0 -1
  61. package/dist/fr-EBUMQLPT.js.map +0 -1
  62. package/dist/he_IL-GCAXKEWB.js.map +0 -1
  63. package/dist/id_ID-6JYEEKEA.js.map +0 -1
  64. package/dist/it-IMLHI5VO.js.map +0 -1
  65. package/dist/ja-QDEQ2EYA.js.map +0 -1
  66. package/dist/ko-MTA7BZI3.js.map +0 -1
  67. package/dist/ms_MY-K4EAHE5J.js.map +0 -1
  68. package/dist/pl-CIIDQ3SB.js.map +0 -1
  69. package/dist/pt-3HA2PDUN.js.map +0 -1
  70. package/dist/ru-2F2VGHMW.js.map +0 -1
  71. package/dist/sv-HCBRKFRZ.js.map +0 -1
  72. package/dist/th-WWPM2QKB.js.map +0 -1
  73. package/dist/tr-M57AMCWK.js.map +0 -1
  74. package/dist/vi-YJHN2OK7.js.map +0 -1
  75. package/dist/zh-AIFC65OE.js.map +0 -1
  76. package/dist/zh_TW-2LLLW4H6.js.map +0 -1
@@ -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,14 +130,21 @@ 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;
137
+ /** The format a drawing saves in: its tool's present look. */
138
+ declare const SERIAL_VERSION = 3;
100
139
  /**
101
140
  * Wire/persistence format. `props` carries the tool-specific payload — every tool round-trips
102
141
  * its COMPLETE state through this shape (the schema exists so nothing is ever dropped on save).
103
142
  */
104
143
  interface SerializedDrawing {
105
- v: 2;
144
+ /** The format's version. A drawing saves at 3. A save at 2 carries the props and style of the
145
+ * looks format 2 painted, and restores with that look: a tool whose factory values, prop
146
+ * meanings or paint rules differ at 3 writes the values that paint the save as it painted. */
147
+ v: 2 | 3;
106
148
  id: string;
107
149
  type: string;
108
150
  anchors: Anchor[];
@@ -133,6 +175,8 @@ interface Viewport {
133
175
  logicalOf(time: Time): number | null;
134
176
  /** The time at a bar index (null in whitespace beyond the loaded range). */
135
177
  timeOfLogical(logical: number): Time | null;
178
+ /** Whether the pane's price scale is logarithmic. Absent, it is read as linear. */
179
+ logScale?: boolean;
136
180
  }
137
181
  /** A draggable handle over an anchor, in pane-local CSS pixels. */
138
182
  interface ControlPoint {
@@ -152,6 +196,8 @@ interface IDrawing {
152
196
  state: DrawingState;
153
197
  setAnchors(anchors: Anchor[]): void;
154
198
  updateAnchor(index: number, anchor: Anchor): void;
199
+ /** The symbol's tick as the host stated it, or null without one. */
200
+ getTickSize?(): number | null;
155
201
  appendAnchor(anchor: Anchor): void;
156
202
  removeAnchor(index: number): void;
157
203
  updateStyle(patch: Partial<DrawingStyle>): void;
@@ -168,6 +214,10 @@ interface IDrawing {
168
214
  setGlobalHidden(hidden: boolean): void;
169
215
  /** The symbol's smallest price move (tick-denominated readouts); null omits those readouts. */
170
216
  setTickSize(tick: number | null): void;
217
+ /** The currency the symbol is quoted in (an amount's unit); null where the host states none. */
218
+ setCurrencyCode(code: string | null): void;
219
+ /** The currency the symbol is quoted in, or null where the host states none. */
220
+ getCurrencyCode?(): string | null;
171
221
  /** The symbol's price formatter (the manager broadcasts it); null returns to the declared
172
222
  * stand-in. */
173
223
  setPriceFormatter(format: PriceFormatPort | null): void;
@@ -192,6 +242,28 @@ interface IDrawing {
192
242
  } | null;
193
243
  /** An inline text editor is open on this drawing — the hint stays hidden underneath it. */
194
244
  textEditing: boolean;
245
+ /** The draft an open inline edit shows on a drawing that types its words on the chart. */
246
+ readonly textDraft: TextDraft | null;
247
+ /** Show an inline edit's draft, or end it with null; `onFrame` hears where the words stand each
248
+ * time a repaint moves them. */
249
+ setTextDraft(draft: TextDraft | null, onFrame?: (frame: TextEditFrame | null) => void): void;
250
+ /** Where the drawing's words stand, for an editor laid over them; null for a tool that does not
251
+ * type its words on the chart. */
252
+ textFrame(viewport: Viewport): TextEditFrame | null;
253
+ /** Where the words an empty drawing shows come from, read as it paints. */
254
+ setTextPlaceholder(source: (() => string) | null): void;
255
+ /** The anchors a drag that grabs the drawing at a point moves: null for all of them. */
256
+ grabbedAnchors(point: Point, viewport: Viewport): number[] | null;
257
+ /** Whether a point is on the drawing's words, where a click on the selected drawing types. */
258
+ wordsAt(point: Point, viewport: Viewport): boolean;
259
+ /** Move an anchor by its handle: to the point, unless the tool holds a handle to a line. */
260
+ dragAnchorTo(index: number, anchor: Anchor): void;
261
+ /** Whether the pointer rests on the drawing. */
262
+ readonly hovered: boolean;
263
+ setHovered(on: boolean): void;
264
+ /** Where a mouse rests over the chart while the drawing is selected, or null. */
265
+ readonly pointer: Point | null;
266
+ setPointer(point: Point | null): void;
195
267
  getViewport(): Viewport | null;
196
268
  requestUpdate(): void;
197
269
  toJSON(): SerializedDrawing;
@@ -371,6 +443,8 @@ declare const en: {
371
443
  readonly 'command.drawingTemplateRemove': "Remove drawing template";
372
444
  readonly 'command.drawingTableAddRow': "Add table row";
373
445
  readonly 'command.drawingTableAddColumn': "Add table column";
446
+ readonly 'command.drawingTableRemoveRow': "Remove table row";
447
+ readonly 'command.drawingTableRemoveColumn': "Remove table column";
374
448
  readonly 'command.drawingCancel': "Cancel drawing";
375
449
  readonly 'command.compareOpen': "Compare or add symbol";
376
450
  readonly 'command.compareAdd': "Add comparison";
@@ -493,8 +567,6 @@ declare const en: {
493
567
  readonly 'drawing.applyDefaultTemplate': "Apply default drawing template";
494
568
  readonly 'drawing.removeTemplateNamed': "Remove template {name}";
495
569
  readonly 'drawing.remove': "Remove";
496
- readonly 'drawing.addRowShort': "+ Row";
497
- readonly 'drawing.addColumnShort': "+ Col";
498
570
  readonly 'drawing.drawingColor': "Drawing color";
499
571
  readonly 'drawing.backgroundColor': "Background color";
500
572
  readonly 'drawing.thickness': "Thickness";
@@ -522,6 +594,8 @@ declare const en: {
522
594
  readonly 'drawing.modifierCommand': "Cmd";
523
595
  readonly 'drawing.hintClone': "{modifier} + Drag";
524
596
  readonly 'drawing.hintCopy': "{modifier} + C";
597
+ readonly 'drawing.hintRemove': "Del";
598
+ readonly 'drawing.drawingMenu': "Drawing menu";
525
599
  readonly 'drawing.hintPaste': "{modifier} + V";
526
600
  readonly 'drawing.deleteWithKey': "Delete (Del)";
527
601
  readonly 'drawing.statusDrawingsHidden': "Drawings hidden";
@@ -547,14 +621,15 @@ declare const en: {
547
621
  readonly 'drawing.deleteTemplateTitle': "Delete this template?";
548
622
  readonly 'drawing.deleteTemplateBody': "Doing this will permanently delete your \"{name}\" drawing template.";
549
623
  readonly 'drawing.settingsTitle': "{tool} settings";
624
+ readonly 'drawing.rename': "Rename";
625
+ readonly 'drawing.name': "Name";
550
626
  readonly 'drawing.tabInputs': "Inputs";
551
627
  readonly 'drawing.tabStyle': "Style";
552
628
  readonly 'drawing.tabText': "Text";
553
- readonly 'drawing.tabTable': "Table";
554
629
  readonly 'drawing.tabCoordinates': "Coordinates";
555
630
  readonly 'drawing.tabVisibility': "Visibility";
556
631
  readonly 'drawing.template': "Template";
557
- readonly 'drawing.saveAs': "Save as...";
632
+ readonly 'drawing.saveAs': "Save as…";
558
633
  readonly 'drawing.applyDefaults': "Apply defaults";
559
634
  readonly 'drawing.cancel': "Cancel";
560
635
  readonly 'drawing.ok': "Ok";
@@ -564,15 +639,14 @@ declare const en: {
564
639
  readonly 'drawing.rowLine': "Line";
565
640
  readonly 'drawing.background': "Background";
566
641
  readonly 'drawing.border': "Border";
567
- readonly 'drawing.profitColor': "Target zone color";
568
- readonly 'drawing.stopColor': "Stop zone color";
642
+ readonly 'drawing.profitColor': "Target color";
643
+ readonly 'drawing.stopColor': "Stop color";
569
644
  readonly 'drawing.textColor': "Text color";
570
645
  readonly 'drawing.fontSize': "Font size";
571
- readonly 'drawing.size': "Size";
572
- readonly 'drawing.width': "Width";
573
646
  readonly 'drawing.opacity': "Opacity";
574
647
  readonly 'drawing.transparency': "Transparency";
575
648
  readonly 'drawing.label': "Label";
649
+ readonly 'drawing.labelColor': "Label color";
576
650
  readonly 'drawing.labels': "Labels";
577
651
  readonly 'drawing.left': "Left";
578
652
  readonly 'drawing.center': "Center";
@@ -606,68 +680,58 @@ declare const en: {
606
680
  readonly 'drawing.variantModifiedSchiff': "Modified Schiff";
607
681
  readonly 'drawing.variantInside': "Inside";
608
682
  readonly 'drawing.sectionStats': "Stats";
609
- readonly 'drawing.priceChange': "Price change";
610
683
  readonly 'drawing.percentChange': "Percent change";
611
- readonly 'drawing.bars': "Bars";
612
684
  readonly 'drawing.dateTimeRange': "Date/time range";
613
685
  readonly 'drawing.volume': "Volume";
614
686
  readonly 'drawing.sectionInfo': "Info";
615
687
  readonly 'drawing.priceRange': "Price range";
616
688
  readonly 'drawing.barsRange': "Bars range";
689
+ readonly 'drawing.distance': "Distance";
617
690
  readonly 'drawing.angle': "Angle";
618
691
  readonly 'drawing.statsPosition': "Stats position";
692
+ readonly 'drawing.statsHidden': "Hidden";
693
+ readonly 'drawing.changeInPips': "Change in pips";
694
+ readonly 'drawing.alwaysShowStats': "Always show stats";
695
+ readonly 'drawing.auto': "Auto";
696
+ readonly 'drawing.extendLeftLine': "Extend left line";
697
+ readonly 'drawing.extendRightLine': "Extend right line";
619
698
  readonly 'drawing.direction': "Direction";
620
699
  readonly 'drawing.prices': "Prices";
621
700
  readonly 'drawing.levels': "Levels";
622
701
  readonly 'drawing.reverse': "Reverse";
623
702
  readonly 'drawing.fullCircles': "Full circles";
624
703
  readonly 'drawing.coeffsAsPercents': "Coeffs as percents";
625
- readonly 'drawing.glyph': "Glyph";
626
704
  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";
705
+ readonly 'drawing.rowsLayout': "Rows Layout";
706
+ readonly 'drawing.rowsByNumber': "Number Of Rows";
707
+ readonly 'drawing.ticksPerRow': "Ticks Per Row";
708
+ readonly 'drawing.rowSize': "Row Size";
634
709
  readonly 'drawing.upDown': "Up/Down";
635
710
  readonly 'drawing.total': "Total";
636
711
  readonly 'drawing.delta': "Delta";
637
- readonly 'drawing.valueAreaVolume': "Value area volume";
638
- readonly 'drawing.widthPercent': "Width %";
712
+ readonly 'drawing.valueAreaVolume': "Value Area Volume";
713
+ readonly 'drawing.widthPercent': "Width (% of the box)";
639
714
  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";
715
+ readonly 'drawing.developingPoc': "Developing POC";
646
716
  readonly 'drawing.developingVa': "Developing VA";
647
717
  readonly 'drawing.source': "Source";
648
718
  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)";
719
+ readonly 'drawing.modeHlBars': "HL bars";
720
+ readonly 'drawing.modeOcBars': "OC bars";
721
+ readonly 'drawing.modeLineOpen': "Line - open";
722
+ readonly 'drawing.modeLineHigh': "Line - high";
723
+ readonly 'drawing.modeLineLow': "Line - low";
724
+ readonly 'drawing.modeLineClose': "Line - close";
725
+ readonly 'drawing.modeLineHl2': "Line - HL/2";
654
726
  readonly 'drawing.mirrored': "Mirrored";
655
727
  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";
728
+ readonly 'drawing.avgHlMinticks': "Avg HL in minticks";
660
729
  readonly 'drawing.variance': "Variance";
661
- readonly 'drawing.body': "Body";
730
+ readonly 'drawing.candles': "Candles";
662
731
  readonly 'drawing.borders': "Borders";
663
- readonly 'drawing.drawBorders': "Draw borders";
664
732
  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";
733
+ readonly 'drawing.useUpperDeviation': "Use Upper Deviation";
734
+ readonly 'drawing.useLowerDeviation': "Use Lower Deviation";
671
735
  readonly 'drawing.risk': "Risk";
672
736
  readonly 'drawing.accountSize': "Account size";
673
737
  readonly 'drawing.lotSize': "Lot size";
@@ -677,20 +741,168 @@ declare const en: {
677
741
  readonly 'drawing.levelText': "Level {value} text";
678
742
  readonly 'drawing.removeLevel': "Remove level {value}";
679
743
  readonly 'drawing.addLevel': "Add level";
680
- readonly 'drawing.weight': "Weight";
744
+ readonly 'drawing.trendLine': "Trend line";
745
+ readonly 'drawing.levelsLine': "Levels line";
746
+ readonly 'drawing.extendLinesLeft': "Extend lines left";
747
+ readonly 'drawing.extendLinesRight': "Extend lines right";
748
+ readonly 'drawing.levelOn': "Level {n}";
749
+ readonly 'drawing.levelValue': "Level {n} value";
750
+ readonly 'drawing.levelColor': "Level {n} color";
751
+ readonly 'drawing.useOneColor': "Use one color";
752
+ readonly 'drawing.backgroundOpacity': "Background opacity";
753
+ readonly 'drawing.values': "Values";
754
+ readonly 'drawing.percents': "Percents";
755
+ readonly 'drawing.levelWords': "Text";
756
+ readonly 'drawing.levelsOnLogScale': "Fib levels based on log scale";
757
+ readonly 'drawing.median': "Median";
758
+ readonly 'drawing.counterclockwise': "Counterclockwise";
759
+ readonly 'drawing.fans': "Fans";
760
+ readonly 'drawing.arcs': "Arcs";
761
+ readonly 'drawing.fanOn': "Fan {n}";
762
+ readonly 'drawing.fanColor': "Fan {n} color";
763
+ readonly 'drawing.arcOn': "Arc {n}";
764
+ readonly 'drawing.arcColor': "Arc {n} color";
765
+ readonly 'drawing.priceBarRatio': "Price/bar ratio";
766
+ readonly 'drawing.rangesAndRatio': "Ranges and ratio";
767
+ readonly 'drawing.wave': "Wave";
768
+ readonly 'drawing.lines': "Lines";
769
+ readonly 'drawing.degree': "Degree";
770
+ readonly 'drawing.degreeSupermillennium': "Supermillennium";
771
+ readonly 'drawing.degreeMillennium': "Millennium";
772
+ readonly 'drawing.degreeSubmillennium': "Submillennium";
773
+ readonly 'drawing.degreeGrandSupercycle': "Grand supercycle";
774
+ readonly 'drawing.degreeSupercycle': "Supercycle";
775
+ readonly 'drawing.degreeCycle': "Cycle";
776
+ readonly 'drawing.degreePrimary': "Primary";
777
+ readonly 'drawing.degreeIntermediate': "Intermediate";
778
+ readonly 'drawing.degreeMinor': "Minor";
779
+ readonly 'drawing.degreeMinute': "Minute";
780
+ readonly 'drawing.degreeMinuette': "Minuette";
781
+ readonly 'drawing.degreeSubminuette': "Subminuette";
782
+ readonly 'drawing.degreeMicro': "Micro";
783
+ readonly 'drawing.degreeSubmicro': "Submicro";
784
+ readonly 'drawing.degreeMinuscule': "Minuscule";
785
+ readonly 'drawing.upperDeviation': "Upper Deviation";
786
+ readonly 'drawing.lowerDeviation': "Lower Deviation";
787
+ readonly 'drawing.base': "Base";
788
+ readonly 'drawing.pearsonsR': "Pearson's R";
789
+ readonly 'drawing.sourceOpen': "Open";
790
+ readonly 'drawing.sourceHigh': "High";
791
+ readonly 'drawing.sourceLow': "Low";
792
+ readonly 'drawing.sourceClose': "Close";
793
+ readonly 'drawing.sourceVolume': "Volume";
794
+ readonly 'drawing.sourceHl2': "(H + L)/2";
795
+ readonly 'drawing.sourceHlc3': "(H + L + C)/3";
796
+ readonly 'drawing.sourceOhlc4': "(O + H + L + C)/4";
797
+ readonly 'drawing.sourceHlcc4': "(H + L + C + C)/4";
798
+ readonly 'drawing.pricesColor': "Prices color";
799
+ readonly 'drawing.priceOffset': "Price offset";
800
+ readonly 'drawing.textWrap': "Text wrap";
801
+ readonly 'drawing.labelBorder': "Label border";
802
+ readonly 'drawing.labelText': "Label text";
803
+ readonly 'drawing.lineColor': "Line color";
804
+ readonly 'drawing.emojiPin': "Emoji pin";
805
+ readonly 'drawing.emoji': "Emoji";
806
+ readonly 'drawing.plateColor': "Plate color";
807
+ readonly 'drawing.arrowMark': "Arrow";
808
+ readonly 'drawing.flag': "Flag";
809
+ readonly 'drawing.coordPositionBar': "#{n} (vertical position %, bar)";
810
+ readonly 'drawing.verticalPosition': "Vertical position %";
811
+ readonly 'drawing.riskUnit': "Risk unit";
812
+ readonly 'drawing.riskAmount': "Amount";
813
+ readonly 'drawing.entryPrice': "Entry price";
814
+ readonly 'drawing.profitLevel': "Profit level";
815
+ readonly 'drawing.stopLevel': "Stop level";
816
+ readonly 'drawing.ticks': "Ticks";
817
+ readonly 'drawing.price': "Price";
818
+ readonly 'drawing.qtyPrecision': "QTY precision";
819
+ readonly 'drawing.qtyDefault': "Default";
820
+ readonly 'drawing.qtyInteger': "Integer";
821
+ readonly 'drawing.qtyOneDecimal': "1 decimal";
822
+ readonly 'drawing.qtyDecimals': "{n} decimals";
823
+ readonly 'drawing.text': "Text";
824
+ readonly 'drawing.statTpPriceOffset': "TP price offset";
825
+ readonly 'drawing.statTpPercentOffset': "TP percent offset";
826
+ readonly 'drawing.statTpTickOffset': "TP tick offset";
827
+ readonly 'drawing.statTpAmount': "TP amount";
828
+ readonly 'drawing.statTpPl': "TP PL";
829
+ readonly 'drawing.statOpenClosePl': "Open/closed PL";
830
+ readonly 'drawing.statQty': "Qty";
831
+ readonly 'drawing.statRiskRewardRatio': "Risk/reward ratio";
832
+ readonly 'drawing.statSlPriceOffset': "SL price offset";
833
+ readonly 'drawing.statSlPercentOffset': "SL percent offset";
834
+ readonly 'drawing.statSlTickOffset': "SL tick offset";
835
+ readonly 'drawing.statSlAmount': "SL amount";
836
+ readonly 'drawing.statSlPl': "SL PL";
837
+ readonly 'drawing.profileExtendRight': "Extend Right";
838
+ readonly 'drawing.volumeProfile': "Volume profile";
839
+ readonly 'drawing.valuesColor': "Values color";
840
+ readonly 'drawing.upVolume': "Up Volume";
841
+ readonly 'drawing.downVolume': "Down Volume";
842
+ readonly 'drawing.valueAreaUp': "Value Area Up";
843
+ readonly 'drawing.valueAreaDown': "Value Area Down";
844
+ readonly 'drawing.vah': "VAH";
845
+ readonly 'drawing.val': "VAL";
846
+ readonly 'drawing.poc': "POC";
847
+ readonly 'drawing.histogramBox': "Histogram Box";
848
+ readonly 'drawing.labelsOnPriceScale': "Labels on price scale";
849
+ readonly 'drawing.bandsSettings': "Bands Settings";
850
+ readonly 'drawing.bandsMode': "Bands Calculation Mode";
851
+ readonly 'drawing.bandsStdev': "Standard Deviation";
852
+ readonly 'drawing.bandsPercent': "Percentage";
853
+ readonly 'drawing.bandsMultiplier': "Bands Multiplier #{n}";
854
+ readonly 'drawing.vwap': "VWAP";
855
+ readonly 'drawing.upperBand': "Upper band #{n}";
856
+ readonly 'drawing.lowerBand': "Lower band #{n}";
857
+ readonly 'drawing.bandBackground': "Background #{n}";
858
+ readonly 'drawing.extendTop': "Extend top";
859
+ readonly 'drawing.extendBottom': "Extend bottom";
860
+ readonly 'drawing.labelBackground': "Label background";
861
+ readonly 'drawing.sourceText': "Source text";
862
+ readonly 'drawing.sourceBackground': "Source background";
863
+ readonly 'drawing.sourceBorder': "Source border";
864
+ readonly 'drawing.targetText': "Target text";
865
+ readonly 'drawing.targetBackground': "Target background";
866
+ readonly 'drawing.targetBorder': "Target border";
867
+ readonly 'drawing.successText': "Success text";
868
+ readonly 'drawing.successBackground': "Success background";
869
+ readonly 'drawing.failureText': "Failure text";
870
+ readonly 'drawing.failureBackground': "Failure background";
871
+ readonly 'drawing.backgroundFirst': "First background";
872
+ readonly 'drawing.backgroundSecond': "Second background";
873
+ readonly 'drawing.priceLevels': "Price levels";
874
+ readonly 'drawing.timeLevels': "Time levels";
875
+ readonly 'drawing.priceLevelOn': "Price level {n}";
876
+ readonly 'drawing.priceLevelValue': "Price level {n} value";
877
+ readonly 'drawing.priceLevelColor': "Price level {n} color";
878
+ readonly 'drawing.timeLevelOn': "Time level {n}";
879
+ readonly 'drawing.timeLevelValue': "Time level {n} value";
880
+ readonly 'drawing.timeLevelColor': "Time level {n} color";
881
+ readonly 'drawing.leftLabels': "Left labels";
882
+ readonly 'drawing.rightLabels': "Right labels";
883
+ readonly 'drawing.topLabels': "Top labels";
884
+ readonly 'drawing.bottomLabels': "Bottom labels";
885
+ readonly 'drawing.grid': "Grid";
886
+ readonly 'drawing.angles': "Angles";
681
887
  readonly 'drawing.bold': "Bold";
682
888
  readonly 'drawing.italic': "Italic";
683
889
  readonly 'drawing.addText': "Add text";
684
- readonly 'drawing.alignment': "Alignment";
890
+ readonly 'drawing.textAlignment': "Text alignment";
891
+ readonly 'drawing.top': "Top";
892
+ readonly 'drawing.middle': "Middle";
893
+ readonly 'drawing.bottom': "Bottom";
894
+ readonly 'drawing.inside': "Inside";
895
+ readonly 'drawing.textOrientation': "Text orientation";
896
+ readonly 'drawing.horizontal': "Horizontal";
897
+ readonly 'drawing.vertical': "Vertical";
685
898
  readonly 'drawing.textPlaceholder': "Text";
686
899
  readonly 'drawing.textEditor': "Drawing text";
687
- readonly 'drawing.headerRow': "Header row";
688
- readonly 'drawing.tableCell': "Cell {row},{col}";
689
- readonly 'drawing.addRow': "Add row";
900
+ readonly 'drawing.addColumnRight': "Add column to right";
901
+ readonly 'drawing.addRowBelow': "Add row below";
690
902
  readonly 'drawing.removeRow': "Remove row";
691
- readonly 'drawing.addColumn': "Add column";
692
903
  readonly 'drawing.removeColumn': "Remove column";
693
904
  readonly 'drawing.coordBar': "#{n} (bar)";
905
+ readonly 'drawing.coordPrice': "#{n} (price)";
694
906
  readonly 'drawing.coordPriceBar': "#{n} (price, bar)";
695
907
  readonly 'drawing.unitTicks': "Ticks";
696
908
  readonly 'drawing.unitSeconds': "Seconds";
@@ -701,7 +913,7 @@ declare const en: {
701
913
  readonly 'drawing.unitMonths': "Months";
702
914
  readonly 'drawing.timeframePinnedNote': "A drawing stays on at least one timeframe, so it can always be reached again.";
703
915
  readonly 'drawing.colorSwatch': "Color {hex}";
704
- readonly 'drawing.customColor': "Custom color";
916
+ readonly 'drawing.addCustomColor': "Add custom color";
705
917
  readonly 'drawing.saturationValue': "Saturation and brightness";
706
918
  readonly 'drawing.hue': "Hue";
707
919
  readonly 'drawing.hexColor': "Hex color";
@@ -729,10 +941,10 @@ declare const en: {
729
941
  readonly 'drawing.glyphCatIconSymbols': "Symbols and flags";
730
942
  readonly 'drawing.imageReading': "Reading...";
731
943
  readonly 'drawing.chooseImage': "Choose image";
732
- readonly 'drawing.imageFormats': "JPG or PNG";
944
+ readonly 'drawing.imageFormats': "JPG, PNG or WEBP";
733
945
  readonly 'drawing.imageMaxSize': "Max size 2MB";
734
946
  readonly 'drawing.imageDimensions': "{width} x {height}";
735
- readonly 'drawing.imageErrorType': "That file is not a JPG or PNG. Pick one of those two formats.";
947
+ readonly 'drawing.imageErrorType': "That file is not a JPG, PNG or WEBP. Pick one of those three formats.";
736
948
  readonly 'drawing.imageErrorSize': "That image is {size}. The limit is 2MB.";
737
949
  readonly 'drawing.imageErrorRead': "That file could not be read. Try picking it again.";
738
950
  readonly 'drawing.imageErrorDecode': "That image could not be opened. It may be damaged.";
@@ -1054,12 +1266,25 @@ declare const en: {
1054
1266
  readonly 'replay.startDate': "Date…";
1055
1267
  readonly 'replay.startFirst': "First available date";
1056
1268
  readonly 'replay.startRandom': "Random bar";
1269
+ readonly 'replay.close': "Close";
1057
1270
  readonly 'replay.startDateField': "Replay start date";
1058
1271
  readonly 'replay.startTimeField': "Replay start time (UTC, optional)";
1059
1272
  readonly 'replay.dateMask': "YYYY-MM-DD";
1060
1273
  readonly 'replay.timeMask': "HH:MM";
1061
- readonly 'replay.previousMonth': "Previous month";
1062
- readonly 'replay.nextMonth': "Next month";
1274
+ readonly 'replay.chooseTime': "Choose a time";
1275
+ readonly 'replay.previousMonth': "Previous month, {month}";
1276
+ readonly 'replay.nextMonth': "Next month, {month}";
1277
+ readonly 'replay.previousYear': "Previous year, {year}";
1278
+ readonly 'replay.nextYear': "Next year, {year}";
1279
+ readonly 'replay.previousYears': "Previous years, {years}";
1280
+ readonly 'replay.nextYears': "Next years, {years}";
1281
+ readonly 'replay.showMonths': "Switch to months, {year}";
1282
+ readonly 'replay.showYears': "Switch to years, {years}";
1283
+ readonly 'replay.showDates': "Switch to dates, {month}";
1284
+ readonly 'replay.yearRange': "{from} - {to}";
1285
+ readonly 'replay.months': "Months";
1286
+ readonly 'replay.years': "Years";
1287
+ readonly 'replay.firstAvailableDay': "Select the first available day";
1063
1288
  readonly 'replay.cancel': "Cancel";
1064
1289
  readonly 'replay.select': "Select";
1065
1290
  readonly 'replay.weekdayMon': "Mo";
@@ -1166,7 +1391,6 @@ declare const en: {
1166
1391
  readonly 'tool.fixed_range_volume_profile': "Fixed range volume profile";
1167
1392
  readonly 'tool.anchored_volume_profile': "Anchored volume profile";
1168
1393
  readonly 'tool.image': "Image";
1169
- readonly 'tool.content_card': "Content card";
1170
1394
  readonly 'tool.emoji': "Emoji";
1171
1395
  readonly 'tool.sticker': "Sticker";
1172
1396
  readonly 'tool.icon': "Icon";
@@ -1397,9 +1621,11 @@ declare class DrawingTemplates {
1397
1621
  declare const IMAGE_MAX_BYTES: number;
1398
1622
  /** Longest edge, in pixels. A larger picture is downscaled rather than refused. */
1399
1623
  declare const IMAGE_MAX_EDGE = 2000;
1624
+ /** The pictures the intake takes: a JPG, a PNG or a WEBP. A WEBP is stored re-encoded, as a PNG or a
1625
+ * JPEG, so a saved chart opens in every browser. */
1400
1626
  declare const IMAGE_TYPES: readonly string[];
1401
1627
  /** The `accept` attribute for a file input, kept beside the types it mirrors. */
1402
- declare const IMAGE_ACCEPT = "image/jpeg,image/png";
1628
+ declare const IMAGE_ACCEPT = "image/jpeg,image/png,image/webp";
1403
1629
  /** Why an intake failed. A CODE, not a sentence: the host renders it through the catalog, so the
1404
1630
  * reason reaches a viewer in their own language and no English lives in the port. */
1405
1631
  type ImageIntakeError = 'wrong-type' | 'too-large' | 'unreadable' | 'undecodable';
@@ -1407,7 +1633,7 @@ type ImageIntakeError = 'wrong-type' | 'too-large' | 'unreadable' | 'undecodable
1407
1633
  declare const IMAGE_ERROR_MESSAGES: Readonly<Record<ImageIntakeError, ChartMessageKey>>;
1408
1634
  /** A picture that is ready to store on a drawing. */
1409
1635
  interface ImageAsset {
1410
- /** A data URL sized within the caps. */
1636
+ /** A PNG or JPEG data URL sized within the caps, whatever the picked file was. */
1411
1637
  dataUrl: string;
1412
1638
  width: number;
1413
1639
  height: number;
@@ -1426,7 +1652,9 @@ type ImageIntakeResult = {
1426
1652
  interface DrawingAssetPort {
1427
1653
  /** Validate a picked file and turn it into a payload within the caps, or say why it cannot be
1428
1654
  * used. The host owns the decode and the resample; `checkImageFile` and `fitScale` below are the
1429
- * library's rules it applies. */
1655
+ * library's rules it applies. The stored `dataUrl` is always a PNG or a JPEG, whatever the picked
1656
+ * file was, so a saved chart opens everywhere: a WEBP is decoded and re-encoded on a canvas, as a
1657
+ * PNG where it has transparency and a JPEG otherwise. */
1430
1658
  intakeImage(file: File): Promise<ImageIntakeResult>;
1431
1659
  /** 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
1432
1660
  * drawing the glyph as text. Icon marks always stay text: their ink is tinted by the stroke
@@ -1450,4 +1678,4 @@ declare function fittedSize(width: number, height: number, maxEdge?: number): {
1450
1678
  height: number;
1451
1679
  };
1452
1680
 
1453
- 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 };
1681
+ export { type VisibilityPreset 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, SERIAL_VERSION as H, type IDrawing as I, TRANSIENT_LABELS as J, TRANSIENT_TOOLS as K, type LineStyle as L, type MagnetMode as M, type TextDraft as N, type OhlcBar as O, type Point as P, type TextEditFrame as Q, type RemoveRow as R, type SerializedDrawing as S, type ToolCategory as T, type TimeframeBucket as U, type TimeframeContext as V, type TimeframeVisibility as W, type ToolPreset as X, type ToolTemplate as Y, type TransientTool as Z, type Viewport as _, CURSOR_LABELS as a, type VisibilityRange as a0, checkImageFile as a1, clampFavoritesPosition as a2, cursorButtonArmed as a3, decodePreset as a4, favoritesBarShown as a5, fitScale as a6, fittedSize as a7, isFavorite as a8, isTransientTool as a9, magnetSnap as aa, normalizeVisibility as ab, parseDrawingPreferences as ac, parseTimeframeContext as ad, pruneFavorites as ae, removableDrawings as af, removeRows as ag, serializeDrawingPreferences as ah, snapToBar as ai, toggleFavorite as aj, toolAfterPlacement as ak, transientSurvives as al, visibilityPreset as am, visibleAt as an, en as ao, 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 };