@tradecanvas/chart 1.72.2 → 1.73.1
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/dist/{LayoutSession-BrazGVET.js → LayoutSession-D9PnPT6B.js} +2 -2
- package/dist/{LayoutSession-BrazGVET.js.map → LayoutSession-D9PnPT6B.js.map} +1 -1
- package/dist/{LayoutSession-BrXo314m.cjs → LayoutSession-DqKeuucc.cjs} +2 -2
- package/dist/{LayoutSession-BrXo314m.cjs.map → LayoutSession-DqKeuucc.cjs.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/widget/ChartWidget.d.ts +2 -2
- package/dist/widget/WidgetDrawingSidebar.d.ts +2 -0
- package/dist/widget/WidgetDrawingSidebar.d.ts.map +1 -1
- package/dist/widget/index.cjs +107 -55
- package/dist/widget/index.cjs.map +1 -1
- package/dist/widget/index.js +856 -818
- package/dist/widget/index.js.map +1 -1
- package/dist/widget/toolFit.d.ts +26 -0
- package/dist/widget/toolFit.d.ts.map +1 -0
- package/dist/widget/widgetUI.d.ts +12 -6
- package/dist/widget/widgetUI.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The drawing tools' column on a short screen. Its buttons are a size over
|
|
3
|
+
* the widget's others; where the column is too short for all of them, they
|
|
4
|
+
* give back what it lacks, down to the others' size, before it scrolls.
|
|
5
|
+
*/
|
|
6
|
+
export interface ToolFitInput {
|
|
7
|
+
/** A tool button's height at its own size (px). */
|
|
8
|
+
button: number;
|
|
9
|
+
/** How many tool buttons the column shows. */
|
|
10
|
+
count: number;
|
|
11
|
+
/** How much taller its content is than the column (px); 0 or less when it fits. */
|
|
12
|
+
overflow: number;
|
|
13
|
+
/** The smallest the buttons go: the widget's other buttons (px). */
|
|
14
|
+
min: number;
|
|
15
|
+
}
|
|
16
|
+
/** The buttons' size that makes the column fit, or null to leave them at their own. */
|
|
17
|
+
export declare function toolFitSize({ button, count, overflow, min }: ToolFitInput): number | null;
|
|
18
|
+
/**
|
|
19
|
+
* Keep the tools in `column` fitted: as it resizes, as tools come and go
|
|
20
|
+
* (favourites), and as the widget's root changes what sizes or shows them (a
|
|
21
|
+
* look or density, a feature switch, the scale on a wide screen, a phone's
|
|
22
|
+
* layout), which leaves the column's own size as it was. Returns the
|
|
23
|
+
* function that stops watching.
|
|
24
|
+
*/
|
|
25
|
+
export declare function watchToolFit(column: HTMLElement): () => void;
|
|
26
|
+
//# sourceMappingURL=toolFit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolFit.d.ts","sourceRoot":"","sources":["../../src/widget/toolFit.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,MAAM,WAAW,YAAY;IAC3B,mDAAmD;IACnD,MAAM,EAAE,MAAM,CAAC;IACf,8CAA8C;IAC9C,KAAK,EAAE,MAAM,CAAC;IACd,mFAAmF;IACnF,QAAQ,EAAE,MAAM,CAAC;IACjB,oEAAoE;IACpE,GAAG,EAAE,MAAM,CAAC;CACb;AAED,uFAAuF;AACvF,wBAAgB,WAAW,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,EAAE,YAAY,GAAG,MAAM,GAAG,IAAI,CAGzF;AAgBD;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,IAAI,CA+B5D"}
|
|
@@ -43,6 +43,11 @@ export interface WidgetUISizes {
|
|
|
43
43
|
control: number;
|
|
44
44
|
controlSmall: number;
|
|
45
45
|
icon: number;
|
|
46
|
+
/**
|
|
47
|
+
* The drawing tools' column. Its buttons are a half step of φ over `control`
|
|
48
|
+
* and their icons over `icon` (but in compact), and never wider than the
|
|
49
|
+
* column less 6 px a side.
|
|
50
|
+
*/
|
|
46
51
|
sidebar: number;
|
|
47
52
|
menuItem: number;
|
|
48
53
|
}
|
|
@@ -66,11 +71,12 @@ export interface WidgetUIShadows {
|
|
|
66
71
|
tooltip: string;
|
|
67
72
|
}
|
|
68
73
|
/**
|
|
69
|
-
* How roomy the look is: its controls' sizes, and
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
* with
|
|
73
|
-
*
|
|
74
|
+
* How roomy the look is: its controls' sizes, and the chart's bars. The
|
|
75
|
+
* chart opens with golden bars (the body φ⁻¹ of its slot), except when
|
|
76
|
+
* `'compact'`, which keeps the classic 2 px gap. `'airy'` is spacious
|
|
77
|
+
* controls with the figures (legend, axes) in the look's sans face too.
|
|
78
|
+
* `chartOptions.barLayout` and a `chartOptions.font.family` win over it, and
|
|
79
|
+
* sizes alone in `chartOptions.font` keep the look's face.
|
|
74
80
|
*/
|
|
75
81
|
export type WidgetUIDensity = 'compact' | 'comfortable' | 'spacious' | 'airy';
|
|
76
82
|
/** The whole look, every token set. */
|
|
@@ -110,7 +116,7 @@ export interface WidgetUITheme {
|
|
|
110
116
|
/**
|
|
111
117
|
* Control sizes at once: compact, comfortable (the preset's) or spacious;
|
|
112
118
|
* `sizes` win over it. `'airy'`: spacious, with the chart's figures in the
|
|
113
|
-
* sans face
|
|
119
|
+
* sans face. Compact also keeps the chart's classic bars (see `WidgetUIDensity`).
|
|
114
120
|
*/
|
|
115
121
|
density?: WidgetUIDensity;
|
|
116
122
|
sizes?: Partial<WidgetUISizes>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widgetUI.d.ts","sourceRoot":"","sources":["../../src/widget/widgetUI.ts"],"names":[],"mappings":"AAOA,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,QAAQ,GAAG,UAAU,GAAG,SAAS,GAAG,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"widgetUI.d.ts","sourceRoot":"","sources":["../../src/widget/widgetUI.ts"],"names":[],"mappings":"AAOA,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,QAAQ,GAAG,UAAU,GAAG,SAAS,GAAG,MAAM,C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G;AACH,wBAAgB,aAAa,CAAC,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,gBAAgB,EAAE,OAAO,GAAE;IAAE,SAAS,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,IAAI,CAYhH"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tradecanvas/chart",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.73.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "High-performance canvas trading chart with built-in indicators, drawing tools, and real-time streaming. Zero external dependencies.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
"README.md"
|
|
64
64
|
],
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@tradecanvas/commons": "1.
|
|
67
|
-
"@tradecanvas/core": "1.
|
|
66
|
+
"@tradecanvas/commons": "1.73.1",
|
|
67
|
+
"@tradecanvas/core": "1.73.1"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
70
|
"jsdom": "^25.0.1",
|