@tradecanvas/chart 1.14.0 → 1.16.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.
- package/README.md +2 -1
- package/dist/{LayoutSession-DG3i7kbY.cjs → LayoutSession-DTuRPKS5.cjs} +2 -2
- package/dist/{LayoutSession-DG3i7kbY.cjs.map → LayoutSession-DTuRPKS5.cjs.map} +1 -1
- package/dist/{LayoutSession-BTfv1oBV.js → LayoutSession-DdX4GEPK.js} +2 -2
- package/dist/{LayoutSession-BTfv1oBV.js.map → LayoutSession-DdX4GEPK.js.map} +1 -1
- package/dist/{i18n-BU-BoBDZ.js → i18n-BH0McEvQ.js} +59 -1
- package/dist/i18n-BH0McEvQ.js.map +1 -0
- package/dist/{i18n-DkzAxytR.cjs → i18n-D0C88QUR.cjs} +2 -2
- package/dist/i18n-D0C88QUR.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/widget/ChartWidget.d.ts +30 -4
- package/dist/widget/ChartWidget.d.ts.map +1 -1
- package/dist/widget/WidgetHotkeySheet.d.ts +12 -1
- package/dist/widget/WidgetHotkeySheet.d.ts.map +1 -1
- package/dist/widget/WidgetSettings.d.ts +16 -3
- package/dist/widget/WidgetSettings.d.ts.map +1 -1
- package/dist/widget/hostHotkeys.d.ts +34 -0
- package/dist/widget/hostHotkeys.d.ts.map +1 -0
- package/dist/widget/index.cjs +48 -9
- package/dist/widget/index.cjs.map +1 -1
- package/dist/widget/index.d.ts +1 -1
- package/dist/widget/index.d.ts.map +1 -1
- package/dist/widget/index.js +1379 -1022
- package/dist/widget/index.js.map +1 -1
- package/dist/widget/locales/ar.d.ts.map +1 -1
- package/dist/widget/locales/cs.d.ts.map +1 -1
- package/dist/widget/locales/da.d.ts.map +1 -1
- package/dist/widget/locales/de.d.ts.map +1 -1
- package/dist/widget/locales/el.d.ts.map +1 -1
- package/dist/widget/locales/en.d.ts +29 -0
- package/dist/widget/locales/en.d.ts.map +1 -1
- package/dist/widget/locales/es.d.ts.map +1 -1
- package/dist/widget/locales/et.d.ts.map +1 -1
- package/dist/widget/locales/fa.d.ts.map +1 -1
- package/dist/widget/locales/fr.d.ts.map +1 -1
- package/dist/widget/locales/he.d.ts.map +1 -1
- package/dist/widget/locales/hu.d.ts.map +1 -1
- package/dist/widget/locales/id.d.ts.map +1 -1
- package/dist/widget/locales/index.cjs +1 -1
- package/dist/widget/locales/index.cjs.map +1 -1
- package/dist/widget/locales/index.js +813 -1
- package/dist/widget/locales/index.js.map +1 -1
- package/dist/widget/locales/it.d.ts.map +1 -1
- package/dist/widget/locales/ja.d.ts.map +1 -1
- package/dist/widget/locales/ko.d.ts.map +1 -1
- package/dist/widget/locales/ms.d.ts.map +1 -1
- package/dist/widget/locales/nb.d.ts.map +1 -1
- package/dist/widget/locales/nl.d.ts.map +1 -1
- package/dist/widget/locales/pl.d.ts.map +1 -1
- package/dist/widget/locales/pt.d.ts.map +1 -1
- package/dist/widget/locales/ro.d.ts.map +1 -1
- package/dist/widget/locales/ru.d.ts.map +1 -1
- package/dist/widget/locales/sk.d.ts.map +1 -1
- package/dist/widget/locales/sv.d.ts.map +1 -1
- package/dist/widget/locales/th.d.ts.map +1 -1
- package/dist/widget/locales/tr.d.ts.map +1 -1
- package/dist/widget/locales/vi.d.ts.map +1 -1
- package/dist/widget/locales/zh.d.ts.map +1 -1
- package/dist/widget/locales/zhHant.d.ts.map +1 -1
- package/dist/widget/settingsControls.d.ts.map +1 -1
- package/dist/widget/types.d.ts +17 -6
- package/dist/widget/types.d.ts.map +1 -1
- package/dist/widget/widgetConfig.d.ts +0 -12
- package/dist/widget/widgetConfig.d.ts.map +1 -1
- package/dist/widget/widgetSettingsLook.d.ts +35 -0
- package/dist/widget/widgetSettingsLook.d.ts.map +1 -0
- package/package.json +3 -3
- package/dist/i18n-BU-BoBDZ.js.map +0 -1
- package/dist/i18n-DkzAxytR.cjs.map +0 -1
|
@@ -15,6 +15,8 @@ export declare class WidgetSettings {
|
|
|
15
15
|
private tabButtons;
|
|
16
16
|
/** The chart's type, whose settings the Style tab offers. */
|
|
17
17
|
private chartType;
|
|
18
|
+
/** The look's rows on view, each showing the chart's value again (a change to one moves others: a wick with its body). */
|
|
19
|
+
private lookRows;
|
|
18
20
|
/**
|
|
19
21
|
* `barCountdown` / `logScale` false leave out the controls for features the
|
|
20
22
|
* chart has switched off.
|
|
@@ -24,25 +26,36 @@ export declare class WidgetSettings {
|
|
|
24
26
|
logScale?: boolean;
|
|
25
27
|
/** Offer the exchange's time zone; returns it (null while unknown). */
|
|
26
28
|
exchangeZone?: () => string | null;
|
|
29
|
+
/** false: the chart doesn't trade, so the orders' colours aren't offered. */
|
|
30
|
+
trading?: boolean;
|
|
27
31
|
},
|
|
28
32
|
/** Where the panel mounts (the widget's portal: themed, and inside it when fullscreen). */
|
|
29
33
|
host?: () => HTMLElement);
|
|
30
34
|
open(currentSettings: ChartSettingsState, chartType?: ChartType | null): void;
|
|
31
35
|
isOpen(): boolean;
|
|
32
|
-
/** The settings as they are now (after an undo), on the tab that's open. */
|
|
33
|
-
refresh(settings: ChartSettingsState): void;
|
|
36
|
+
/** The settings as they are now (after an undo), on the tab that's open; `chartType` when it changed. */
|
|
37
|
+
refresh(settings: ChartSettingsState, chartType?: ChartType | null): void;
|
|
34
38
|
close(): void;
|
|
35
39
|
private buildModal;
|
|
36
40
|
private renderTabContent;
|
|
37
41
|
private renderStyleTab;
|
|
42
|
+
private renderLookSection;
|
|
43
|
+
/** A row of the look: a colour, a switch, a dash or a width, as its key takes it, on the user's layer. */
|
|
44
|
+
private lookRow;
|
|
45
|
+
private lineStyles;
|
|
38
46
|
private renderDisplayTab;
|
|
39
47
|
private renderScaleTab;
|
|
40
|
-
/** The
|
|
48
|
+
/** The chart's type: its settings (Renko's box, Kagi's reversal…) and its colours and widths. */
|
|
41
49
|
private renderChartTypeSection;
|
|
42
50
|
/** A number field; empty means "worked out from the data" (shown as Auto). Only numbers above 0 are taken. */
|
|
43
51
|
private numberRow;
|
|
44
52
|
private patch;
|
|
45
53
|
private section;
|
|
54
|
+
/**
|
|
55
|
+
* A colour of the look, shown again from `look.read()`. With `look.start`,
|
|
56
|
+
* null is the part's own colour: shown as Auto, the picker starting from
|
|
57
|
+
* `start()`, and once set a button takes it back.
|
|
58
|
+
*/
|
|
46
59
|
private colorRow;
|
|
47
60
|
private toggleRow;
|
|
48
61
|
private selectRow;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WidgetSettings.d.ts","sourceRoot":"","sources":["../../src/widget/WidgetSettings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"WidgetSettings.d.ts","sourceRoot":"","sources":["../../src/widget/WidgetSettings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,SAAS,EAAyC,MAAM,sBAAsB,CAAC;AAC/G,OAAO,KAAK,EAAE,kBAAkB,EAAE,iBAAiB,EAAsB,MAAM,YAAY,CAAC;AAQ5F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAO5C,qBAAa,cAAc;IAqBvB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAQ1B,2FAA2F;IAC3F,OAAO,CAAC,QAAQ,CAAC,IAAI;IA7BvB,OAAO,CAAC,SAAS,CAAoB;IACrC,OAAO,CAAC,CAAC,CAAa;IACtB,OAAO,CAAC,QAAQ,CAA+B;IAC/C,OAAO,CAAC,KAAK,CAA+B;IAC5C,OAAO,CAAC,UAAU,CAAgB;IAClC,OAAO,CAAC,eAAe,CAAmC;IAC1D,OAAO,CAAC,MAAM,CAA+B;IAC7C,OAAO,CAAC,UAAU,CAA2B;IAC7C,6DAA6D;IAC7D,OAAO,CAAC,SAAS,CAA0B;IAC3C,0HAA0H;IAC1H,OAAO,CAAC,QAAQ,CAA+C;IAE/D;;;OAGG;gBAED,SAAS,EAAE,iBAAiB,EAC5B,CAAC,EAAE,UAAU,EACI,SAAS,GAAE;QAC1B,YAAY,CAAC,EAAE,OAAO,CAAC;QACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,uEAAuE;QACvE,YAAY,CAAC,EAAE,MAAM,MAAM,GAAG,IAAI,CAAC;QACnC,6EAA6E;QAC7E,OAAO,CAAC,EAAE,OAAO,CAAC;KACd;IACN,2FAA2F;IAC1E,IAAI,GAAE,MAAM,WAAiC;IAMhE,IAAI,CAAC,eAAe,EAAE,kBAAkB,EAAE,SAAS,GAAE,SAAS,GAAG,IAAW,GAAG,IAAI;IAOnF,MAAM,IAAI,OAAO;IAIjB,yGAAyG;IACzG,OAAO,CAAC,QAAQ,EAAE,kBAAkB,EAAE,SAAS,CAAC,EAAE,SAAS,GAAG,IAAI,GAAG,IAAI;IAOzE,KAAK,IAAI,IAAI;IASb,OAAO,CAAC,UAAU;IA8FlB,OAAO,CAAC,gBAAgB;IAuBxB,OAAO,CAAC,cAAc;IAMtB,OAAO,CAAC,iBAAiB;IAOzB,0GAA0G;IAC1G,OAAO,CAAC,OAAO;IAoDf,OAAO,CAAC,UAAU;IAQlB,OAAO,CAAC,gBAAgB;IAqDxB,OAAO,CAAC,cAAc;IAmBtB,iGAAiG;IACjG,OAAO,CAAC,sBAAsB;IA+C9B,8GAA8G;IAC9G,OAAO,CAAC,SAAS;IA+BjB,OAAO,CAAC,KAAK;IAOb,OAAO,CAAC,OAAO;IAef;;;;OAIG;IACH,OAAO,CAAC,QAAQ;IA+DhB,OAAO,CAAC,SAAS;IAyBjB,OAAO,CAAC,SAAS;IA+BjB,OAAO,CAAC,QAAQ;IA2ChB,OAAO,IAAI,IAAI;CAGhB"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/** A shortcut as typed in `addHotkey`, read for matching key presses. */
|
|
2
|
+
export interface ParsedHotkey {
|
|
3
|
+
ctrl: boolean;
|
|
4
|
+
alt: boolean;
|
|
5
|
+
shift: boolean;
|
|
6
|
+
/** A letter or digit: its place on the keyboard (`KeyN`, `Digit1`)… */
|
|
7
|
+
code?: string;
|
|
8
|
+
/** …and the character itself, in lower case. */
|
|
9
|
+
char?: string;
|
|
10
|
+
/** Any other key, as it types (`f2`, `/`, `?`, `arrowup`), in lower case. */
|
|
11
|
+
key?: string;
|
|
12
|
+
/** The keys as the shortcut sheet shows them. */
|
|
13
|
+
display: string[];
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Reads a shortcut: modifiers (`Ctrl`, which is Cmd on a Mac, `Alt`,
|
|
17
|
+
* `Shift`) and a key, joined by `+`, in any case. `null` for one it can't
|
|
18
|
+
* use: no key, an unknown modifier, or Shift with a symbol (name the symbol
|
|
19
|
+
* it types: `?`, not `Shift+/`).
|
|
20
|
+
*/
|
|
21
|
+
export declare function parseHotkey(keys: string): ParsedHotkey | null;
|
|
22
|
+
/**
|
|
23
|
+
* Whether a key press is the shortcut. Ctrl takes Cmd too. A letter or
|
|
24
|
+
* digit is the one the layout types (Ctrl+Y is the Y key on a German
|
|
25
|
+
* keyboard too), by its place only with Alt (macOS types another character
|
|
26
|
+
* then) or where the key types no Latin letter; it needs Shift exactly as
|
|
27
|
+
* given. Another key ignores an unasked Shift (a `?` is typed with it).
|
|
28
|
+
*/
|
|
29
|
+
export declare function matchesHotkey(e: KeyboardEvent, hk: ParsedHotkey): boolean;
|
|
30
|
+
/** Whether the chart answers the shortcut's keys itself (a press there runs both). */
|
|
31
|
+
export declare function isChartKey(hk: ParsedHotkey): boolean;
|
|
32
|
+
/** Whether the key went into a field (looked for through shadow roots, which hide it from `activeElement`). */
|
|
33
|
+
export declare function typedIntoField(e: KeyboardEvent): boolean;
|
|
34
|
+
//# sourceMappingURL=hostHotkeys.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hostHotkeys.d.ts","sourceRoot":"","sources":["../../src/widget/hostHotkeys.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,OAAO,CAAC;IACd,GAAG,EAAE,OAAO,CAAC;IACb,KAAK,EAAE,OAAO,CAAC;IACf,uEAAuE;IACvE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gDAAgD;IAChD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6EAA6E;IAC7E,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,iDAAiD;IACjD,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAgBD;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI,CA6B7D;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,aAAa,EAAE,EAAE,EAAE,YAAY,GAAG,OAAO,CAUzE;AASD,sFAAsF;AACtF,wBAAgB,UAAU,CAAC,EAAE,EAAE,YAAY,GAAG,OAAO,CAGpD;AAED,+GAA+G;AAC/G,wBAAgB,cAAc,CAAC,CAAC,EAAE,aAAa,GAAG,OAAO,CAIxD"}
|