@funnest/charts-ui 0.6.7 → 0.6.9
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/components/drawing-toolbar.d.ts +1 -1
- package/dist/icons.d.ts +1 -0
- package/dist/index.js +19 -7
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type JSX } from 'preact';
|
|
2
2
|
import type { WidgetContext } from '../context';
|
|
3
3
|
/** Left vertical tool bar (TradingView layout). On narrow screens it slides in over the chart. */
|
|
4
4
|
export declare function DrawingToolbar({ ctx }: {
|
package/dist/icons.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export declare const ChevronDownIcon: () => import("preact").JSX.Element;
|
|
|
13
13
|
export declare const CursorIcon: () => import("preact").JSX.Element;
|
|
14
14
|
export declare const TrendLineIcon: () => import("preact").JSX.Element;
|
|
15
15
|
export declare const HorizontalLineIcon: () => import("preact").JSX.Element;
|
|
16
|
+
/** Retracement levels at their real (uneven) spacing, with the swing they're drawn on. */
|
|
16
17
|
export declare const FibonacciIcon: () => import("preact").JSX.Element;
|
|
17
18
|
export declare const TrashIcon: () => import("preact").JSX.Element;
|
|
18
19
|
export declare const PencilIcon: () => import("preact").JSX.Element;
|
package/dist/index.js
CHANGED
|
@@ -771,7 +771,10 @@ var HorizontalLineIcon = () => /* @__PURE__ */ a3(Icon, { children: [
|
|
|
771
771
|
/* @__PURE__ */ a3("path", { d: "M3 10h14" }),
|
|
772
772
|
/* @__PURE__ */ a3("circle", { cx: "10", cy: "10", r: "1.6", fill: "currentColor" })
|
|
773
773
|
] });
|
|
774
|
-
var FibonacciIcon = () => /* @__PURE__ */ a3(Icon, { children:
|
|
774
|
+
var FibonacciIcon = () => /* @__PURE__ */ a3(Icon, { children: [
|
|
775
|
+
/* @__PURE__ */ a3("path", { d: "M3 3.5h14M3 7.4h14M3 9.9h14M3 12.3h14M3 16.5h14" }),
|
|
776
|
+
/* @__PURE__ */ a3("path", { d: "M4.5 16.5 15.5 3.5", "stroke-dasharray": "1.6 1.8", opacity: "0.7" })
|
|
777
|
+
] });
|
|
775
778
|
var TrashIcon = () => /* @__PURE__ */ a3(Icon, { children: /* @__PURE__ */ a3("path", { d: "M4.5 6h11M8 6V4.5h4V6M6 6l.7 9.5h6.6L14 6" }) });
|
|
776
779
|
var PencilIcon = () => /* @__PURE__ */ a3(Icon, { children: /* @__PURE__ */ a3("path", { d: "M12.8 4.2l3 3L7.5 15.5 4 16l.5-3.5z" }) });
|
|
777
780
|
var CandlesIcon = () => /* @__PURE__ */ a3(Icon, { children: [
|
|
@@ -941,10 +944,17 @@ function ToolGroup({
|
|
|
941
944
|
return /* @__PURE__ */ a3("div", { class: "fnc-tool-group", ref, "data-open": open, children: [
|
|
942
945
|
/* @__PURE__ */ a3("button", { class: "fnc-btn", "data-tip": name, "aria-label": name, "aria-pressed": !!armed, onClick: () => pick(current), children: /* @__PURE__ */ a3(ToolIcon, { def: current, locale: s3.locale }) }),
|
|
943
946
|
tools.length > 1 && /* @__PURE__ */ a3("button", { class: "fnc-tool-more", "aria-label": `${t3.moreTools}: ${name}`, "aria-haspopup": "menu", "aria-expanded": open, onClick: () => onOpen(!open), children: /* @__PURE__ */ a3(CornerIcon, {}) }),
|
|
944
|
-
open && /* @__PURE__ */ a3("div", { class: "fnc-menu fnc-tool-menu", role: "menu", children: tools.map((def
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
947
|
+
open && /* @__PURE__ */ a3("div", { class: "fnc-menu fnc-tool-menu", role: "menu", children: tools.map((def, i3) => {
|
|
948
|
+
const section = def.section?.[s3.locale];
|
|
949
|
+
const heading = section && section !== tools[i3 - 1]?.section?.[s3.locale];
|
|
950
|
+
return /* @__PURE__ */ a3($, { children: [
|
|
951
|
+
heading && /* @__PURE__ */ a3("div", { class: `fnc-tool-section${i3 > 0 ? " is-after" : ""}`, role: "presentation", children: section }),
|
|
952
|
+
/* @__PURE__ */ a3("button", { class: "fnc-menu-item", role: "menuitemradio", "aria-checked": def.type === current.type, onClick: () => pick(def), children: [
|
|
953
|
+
/* @__PURE__ */ a3(ToolIcon, { def, locale: s3.locale }),
|
|
954
|
+
/* @__PURE__ */ a3("span", { children: def.name[s3.locale] })
|
|
955
|
+
] })
|
|
956
|
+
] }, def.type);
|
|
957
|
+
}) })
|
|
948
958
|
] });
|
|
949
959
|
}
|
|
950
960
|
function DrawingToolbar({ ctx }) {
|
|
@@ -1210,7 +1220,7 @@ function IndicatorPicker({ ctx }) {
|
|
|
1210
1220
|
ctx.chart.addIndicator(type);
|
|
1211
1221
|
close();
|
|
1212
1222
|
};
|
|
1213
|
-
const all = ctx.chart.indicatorDefinitions();
|
|
1223
|
+
const all = ctx.chart.indicatorDefinitions().filter((d3) => !d3.hidden);
|
|
1214
1224
|
const q2 = query.trim().toLowerCase();
|
|
1215
1225
|
const matches = (d3) => !q2 || [d3.type, d3.name.ko, d3.name.en, d3.description[locale]].some((s3) => s3.toLowerCase().includes(q2));
|
|
1216
1226
|
const groups = [
|
|
@@ -3466,7 +3476,9 @@ var CSS = (
|
|
|
3466
3476
|
opacity: 0.7;
|
|
3467
3477
|
}
|
|
3468
3478
|
.fnc-tool-more:hover, .fnc-tool-more[aria-expanded='true'] { opacity: 1; color: var(--fnc-text); }
|
|
3469
|
-
.fnc-tool-menu { top: 0; left: calc(100% + 8px); min-width:
|
|
3479
|
+
.fnc-tool-menu { top: 0; left: calc(100% + 8px); min-width: 200px; max-height: min(640px, calc(100vh - 120px)); overflow-y: auto; }
|
|
3480
|
+
.fnc-tool-section { padding: 8px 10px 4px; color: var(--fnc-text-2); font-size: 11px; font-weight: 600; }
|
|
3481
|
+
.fnc-tool-section.is-after { margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--fnc-border); }
|
|
3470
3482
|
.fnc-tool-menu .fnc-menu-item { white-space: nowrap; }
|
|
3471
3483
|
.fnc-tool-letter { font-size: 13px; font-weight: 700; }
|
|
3472
3484
|
.fnc-svg-icon { display: inline-flex; }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@funnest/charts-ui",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.9",
|
|
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.6.
|
|
45
|
+
"@funnest/charts": "0.6.9"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"preact": "^11.2.0"
|