@funnest/charts-ui 0.11.45 → 0.11.46
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/index.js +40 -7
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -2039,6 +2039,14 @@ function DrawingToolbar({ ctx }) {
|
|
|
2039
2039
|
return () => ro.disconnect();
|
|
2040
2040
|
}, []);
|
|
2041
2041
|
const scrollBar = (by) => barRef.current?.scrollBy({ top: by, behavior: "smooth" });
|
|
2042
|
+
F2(() => {
|
|
2043
|
+
const host = barRef.current?.parentElement;
|
|
2044
|
+
if (!host) return;
|
|
2045
|
+
host.setAttribute("data-collapsed", String(s3.drawbarCollapsed));
|
|
2046
|
+
if (host.hasAttribute("data-fold-ready")) return;
|
|
2047
|
+
const frame = requestAnimationFrame(() => requestAnimationFrame(() => host.setAttribute("data-fold-ready", "")));
|
|
2048
|
+
return () => cancelAnimationFrame(frame);
|
|
2049
|
+
}, [s3.drawbarCollapsed]);
|
|
2042
2050
|
const defs = ctx.chart.drawingDefinitions();
|
|
2043
2051
|
const groups = toolGroups(defs);
|
|
2044
2052
|
const favorites = s3.favoriteTools.map((type) => defs.find((d3) => d3.type === type)).filter((d3) => !!d3);
|
|
@@ -3614,7 +3622,15 @@ var CSS = (
|
|
|
3614
3622
|
.fnc-chart-host, .fnc-overlay { position: absolute; inset: 0; }
|
|
3615
3623
|
|
|
3616
3624
|
/* \u2500\u2500 Drawing tool bar (left) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
3617
|
-
|
|
3625
|
+
/* Folding (desktop): the bar's column narrows to the tab while the bar slides out to the left, and
|
|
3626
|
+
back \u2014 the chart widens and narrows along with it instead of jumping. The column says it's folded
|
|
3627
|
+
(data-collapsed, set by DrawingToolbar); the bar sits in it absolutely so it can slide. */
|
|
3628
|
+
.fnc-drawbar-host { position: relative; flex: none; display: flex; width: 48px; }
|
|
3629
|
+
/* Only once it's on screen: a bar folded last time opens the page folded, without sliding shut. */
|
|
3630
|
+
.fnc-drawbar-host[data-fold-ready] { transition: width 0.24s cubic-bezier(0.22, 0.61, 0.36, 1); }
|
|
3631
|
+
.fnc-drawbar-host[data-collapsed='true'] { width: 16px; }
|
|
3632
|
+
.fnc-drawbar-host > .fnc-drawbar { position: absolute; top: 0; bottom: 0; left: 0; }
|
|
3633
|
+
.fnc-drawbar-host[data-fold-ready] > .fnc-drawbar { transition: transform 0.24s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.2s ease, visibility 0s; }
|
|
3618
3634
|
.fnc-drawbar {
|
|
3619
3635
|
/* Above the plot, so a tool list tab (it sticks out over the chart) can be clicked. */
|
|
3620
3636
|
position: relative;
|
|
@@ -3867,9 +3883,19 @@ var CSS = (
|
|
|
3867
3883
|
|
|
3868
3884
|
/* \u2500\u2500 Drawing bar fold (desktop) \u2500\u2500 */
|
|
3869
3885
|
.fnc-drawbar .fnc-spacer { flex: 1; min-height: 8px; }
|
|
3870
|
-
.fnc-drawbar[data-collapsed='true'] {
|
|
3886
|
+
.fnc-drawbar[data-collapsed='true'] {
|
|
3887
|
+
transform: translateX(-100%);
|
|
3888
|
+
opacity: 0;
|
|
3889
|
+
visibility: hidden;
|
|
3890
|
+
pointer-events: none;
|
|
3891
|
+
}
|
|
3892
|
+
.fnc-drawbar-host[data-fold-ready] > .fnc-drawbar[data-collapsed='true'] { transition: transform 0.24s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.2s ease, visibility 0s 0.24s; }
|
|
3871
3893
|
.fnc-drawbar-tab {
|
|
3872
|
-
|
|
3894
|
+
position: absolute;
|
|
3895
|
+
top: 50%;
|
|
3896
|
+
left: 0;
|
|
3897
|
+
margin-top: -28px;
|
|
3898
|
+
animation: fnc-tab-in 0.2s ease 0.1s both;
|
|
3873
3899
|
display: flex;
|
|
3874
3900
|
align-items: center;
|
|
3875
3901
|
justify-content: center;
|
|
@@ -3882,6 +3908,11 @@ var CSS = (
|
|
|
3882
3908
|
background: var(--fnc-bg);
|
|
3883
3909
|
}
|
|
3884
3910
|
.fnc-drawbar-tab:hover { color: var(--fnc-text); background: var(--fnc-surface); }
|
|
3911
|
+
@keyframes fnc-tab-in { from { opacity: 0; transform: translateX(-6px); } }
|
|
3912
|
+
@media (prefers-reduced-motion: reduce) {
|
|
3913
|
+
.fnc-drawbar-host[data-fold-ready], .fnc-drawbar-host[data-fold-ready] > .fnc-drawbar, .fnc-drawbar-host[data-fold-ready] > .fnc-drawbar[data-collapsed='true'] { transition: none; }
|
|
3914
|
+
.fnc-drawbar-tab { animation: none; }
|
|
3915
|
+
}
|
|
3885
3916
|
|
|
3886
3917
|
/* \u2500\u2500 Symbol search \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
3887
3918
|
.fnc-dialog.fnc-search-dialog { width: min(880px, calc(100% - 32px)); height: min(640px, 100%); max-height: none; }
|
|
@@ -4914,8 +4945,9 @@ var CSS = (
|
|
|
4914
4945
|
@media (max-height: 500px) and (pointer: coarse) {
|
|
4915
4946
|
.fnc-btn-drawbar { display: flex; }
|
|
4916
4947
|
.fnc-drawbar-tab, .fnc-drawbar-collapse { display: none; }
|
|
4917
|
-
.fnc-drawbar[data-collapsed='true'] { display: flex; }
|
|
4918
|
-
.fnc-drawbar-host { position: absolute; left: 0; top: 0; bottom: 0; z-index: 5; pointer-events: none; }
|
|
4948
|
+
.fnc-drawbar[data-collapsed='true'] { display: flex; opacity: 1; visibility: visible; pointer-events: auto; }
|
|
4949
|
+
.fnc-drawbar-host { position: absolute; left: 0; top: 0; bottom: 0; z-index: 5; pointer-events: none; width: auto; transition: none; }
|
|
4950
|
+
.fnc-drawbar-host > .fnc-drawbar { position: relative; }
|
|
4919
4951
|
.fnc-drawbar {
|
|
4920
4952
|
pointer-events: auto;
|
|
4921
4953
|
transform: translateX(-100%);
|
|
@@ -4961,9 +4993,10 @@ var CSS = (
|
|
|
4961
4993
|
.fnc-interval-menu { left: auto; right: -40px; }
|
|
4962
4994
|
.fnc-btn-drawbar { display: flex; }
|
|
4963
4995
|
.fnc-drawbar-tab, .fnc-drawbar-collapse { display: none; }
|
|
4964
|
-
.fnc-drawbar[data-collapsed='true'] { display: flex; }
|
|
4996
|
+
.fnc-drawbar[data-collapsed='true'] { display: flex; opacity: 1; visibility: visible; pointer-events: auto; }
|
|
4965
4997
|
/* The drawing bar slides over the chart instead of taking width. */
|
|
4966
|
-
.fnc-drawbar-host { position: absolute; left: 0; top: 0; bottom: 0; z-index: 5; pointer-events: none; }
|
|
4998
|
+
.fnc-drawbar-host { position: absolute; left: 0; top: 0; bottom: 0; z-index: 5; pointer-events: none; width: auto; transition: none; }
|
|
4999
|
+
.fnc-drawbar-host > .fnc-drawbar { position: relative; }
|
|
4967
5000
|
.fnc-drawbar {
|
|
4968
5001
|
pointer-events: auto;
|
|
4969
5002
|
transform: translateX(-100%);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@funnest/charts-ui",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.46",
|
|
4
4
|
"description": "Pro trading UI (toolbar, drawing tools, sheets) for Funnest Charts. Framework-agnostic.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"chart",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"NOTICE"
|
|
43
43
|
],
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@funnest/charts": "0.11.
|
|
45
|
+
"@funnest/charts": "0.11.46"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"preact": "^11.2.0"
|