@funnest/charts-ui 0.11.49 → 0.11.50
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/i18n.d.ts +18 -0
- package/dist/icons.d.ts +4 -0
- package/dist/index.js +70 -1
- package/package.json +2 -2
package/dist/i18n.d.ts
CHANGED
|
@@ -236,6 +236,15 @@ export declare const STRINGS: {
|
|
|
236
236
|
onIndicatorSection: string;
|
|
237
237
|
moveIndicatorUp: string;
|
|
238
238
|
moveIndicatorDown: string;
|
|
239
|
+
moveToChart: string;
|
|
240
|
+
moveToPane: string;
|
|
241
|
+
placement: string;
|
|
242
|
+
placementMain: string;
|
|
243
|
+
placementPane: string;
|
|
244
|
+
scaleLabel: string;
|
|
245
|
+
scalePrice: string;
|
|
246
|
+
scaleOwn: string;
|
|
247
|
+
scaleLeft: string;
|
|
239
248
|
textEditHint: string;
|
|
240
249
|
hideVolume: string;
|
|
241
250
|
volumeSettings: string;
|
|
@@ -626,6 +635,15 @@ export declare const STRINGS: {
|
|
|
626
635
|
onIndicatorSection: string;
|
|
627
636
|
moveIndicatorUp: string;
|
|
628
637
|
moveIndicatorDown: string;
|
|
638
|
+
moveToChart: string;
|
|
639
|
+
moveToPane: string;
|
|
640
|
+
placement: string;
|
|
641
|
+
placementMain: string;
|
|
642
|
+
placementPane: string;
|
|
643
|
+
scaleLabel: string;
|
|
644
|
+
scalePrice: string;
|
|
645
|
+
scaleOwn: string;
|
|
646
|
+
scaleLeft: string;
|
|
629
647
|
textEditHint: string;
|
|
630
648
|
hideVolume: string;
|
|
631
649
|
volumeSettings: string;
|
package/dist/icons.d.ts
CHANGED
|
@@ -47,6 +47,10 @@ export declare const SmallCloseIcon: () => import("preact").JSX.Element;
|
|
|
47
47
|
export declare const EyeIcon: () => import("preact").JSX.Element;
|
|
48
48
|
export declare const EyeOffIcon: () => import("preact").JSX.Element;
|
|
49
49
|
export declare const ChevronUpIcon: () => import("preact").JSX.Element;
|
|
50
|
+
/** 차트 위로: up out of its pane onto the candles. */
|
|
51
|
+
export declare const ToChartIcon: () => import("preact").JSX.Element;
|
|
52
|
+
/** 아래 칸으로: down into a pane of its own. */
|
|
53
|
+
export declare const ToPaneIcon: () => import("preact").JSX.Element;
|
|
50
54
|
/** A sturdy horseshoe: wide arms, the poles filled in (a thin U read as faint next to the other tools). */
|
|
51
55
|
export declare const MagnetIcon: () => import("preact").JSX.Element;
|
|
52
56
|
export declare const StarIcon: ({ filled }: {
|
package/dist/index.js
CHANGED
|
@@ -671,6 +671,15 @@ var STRINGS = {
|
|
|
671
671
|
onIndicatorSection: "{name} \uC704\uC5D0 \uD45C\uC2DC",
|
|
672
672
|
moveIndicatorUp: "\uC704\uB85C \uC62E\uAE30\uAE30",
|
|
673
673
|
moveIndicatorDown: "\uC544\uB798\uB85C \uC62E\uAE30\uAE30",
|
|
674
|
+
moveToChart: "\uCC28\uD2B8 \uC704\uB85C \uC62E\uAE30\uAE30",
|
|
675
|
+
moveToPane: "\uC544\uB798 \uCE78\uC73C\uB85C \uC62E\uAE30\uAE30",
|
|
676
|
+
placement: "\uC704\uCE58",
|
|
677
|
+
placementMain: "\uCC28\uD2B8 \uC704",
|
|
678
|
+
placementPane: "\uC544\uB798 \uCE78",
|
|
679
|
+
scaleLabel: "\uB208\uAE08",
|
|
680
|
+
scalePrice: "\uAC00\uACA9 \uB208\uAE08",
|
|
681
|
+
scaleOwn: "\uC790\uAE30 \uB208\uAE08 (\uC228\uAE40)",
|
|
682
|
+
scaleLeft: "\uC790\uAE30 \uB208\uAE08 (\uC67C\uCABD\uC5D0 \uD45C\uC2DC)",
|
|
674
683
|
textEditHint: "Enter\uB85C \uC800\uC7A5 \xB7 Shift+Enter \uC904\uBC14\uAFC8 \xB7 Esc \uCDE8\uC18C",
|
|
675
684
|
hideVolume: "\uAC70\uB798\uB7C9 \uC228\uAE30\uAE30",
|
|
676
685
|
volumeSettings: "\uAC70\uB798\uB7C9 \uC124\uC815",
|
|
@@ -1063,6 +1072,15 @@ var STRINGS = {
|
|
|
1063
1072
|
onIndicatorSection: "Drawn on {name}",
|
|
1064
1073
|
moveIndicatorUp: "Move up",
|
|
1065
1074
|
moveIndicatorDown: "Move down",
|
|
1075
|
+
moveToChart: "Move onto the chart",
|
|
1076
|
+
moveToPane: "Move to its own pane",
|
|
1077
|
+
placement: "Place",
|
|
1078
|
+
placementMain: "On the chart",
|
|
1079
|
+
placementPane: "Own pane",
|
|
1080
|
+
scaleLabel: "Scale",
|
|
1081
|
+
scalePrice: "Price scale",
|
|
1082
|
+
scaleOwn: "Own scale (hidden)",
|
|
1083
|
+
scaleLeft: "Own scale (on the left)",
|
|
1066
1084
|
textEditHint: "Enter to save \xB7 Shift+Enter for a new line \xB7 Esc to cancel",
|
|
1067
1085
|
hideVolume: "Hide volume",
|
|
1068
1086
|
volumeSettings: "Volume settings",
|
|
@@ -1711,6 +1729,8 @@ var EyeIcon = () => /* @__PURE__ */ a3(Icon, { size: 14, children: [
|
|
|
1711
1729
|
] });
|
|
1712
1730
|
var EyeOffIcon = () => /* @__PURE__ */ a3(Icon, { size: 14, children: /* @__PURE__ */ a3("path", { d: "M3 3l14 14M8.2 5a8 8 0 0 1 1.8-.5c5 0 8 5.5 8 5.5a14 14 0 0 1-2.2 2.9M5.4 6.4A14 14 0 0 0 2 10s3 5.5 8 5.5a7.7 7.7 0 0 0 3.6-.9" }) });
|
|
1713
1731
|
var ChevronUpIcon = () => /* @__PURE__ */ a3(Icon, { size: 14, children: /* @__PURE__ */ a3("path", { d: "M5 12l5-5 5 5" }) });
|
|
1732
|
+
var ToChartIcon = () => /* @__PURE__ */ a3(Icon, { size: 14, children: /* @__PURE__ */ a3("path", { d: "M4 16h12M10 13V4M6.5 7.5L10 4l3.5 3.5" }) });
|
|
1733
|
+
var ToPaneIcon = () => /* @__PURE__ */ a3(Icon, { size: 14, children: /* @__PURE__ */ a3("path", { d: "M4 16h12M10 4v9M6.5 9.5L10 13l3.5-3.5" }) });
|
|
1714
1734
|
var MagnetIcon = () => /* @__PURE__ */ a3(Icon, { children: [
|
|
1715
1735
|
/* @__PURE__ */ a3("path", { d: "M3 3h4.5v7a2.5 2.5 0 0 0 5 0V3H17v7a7 7 0 0 1-14 0z" }),
|
|
1716
1736
|
/* @__PURE__ */ a3("path", { d: "M3 3h4.5v3.2H3zM12.5 3H17v3.2h-4.5z", fill: "currentColor" })
|
|
@@ -3649,6 +3669,9 @@ function IndicatorSettings({ ctx, id, Dialog: Dialog2 }) {
|
|
|
3649
3669
|
const [display, setDisplay] = d2(() => ({ ...config?.display ?? {} }));
|
|
3650
3670
|
const [timeframe, setTimeframe] = d2(config?.timeframe ?? "");
|
|
3651
3671
|
const [waitClose, setWaitClose] = d2(config?.waitClose !== false);
|
|
3672
|
+
const nativeMain = !!def?.overlay;
|
|
3673
|
+
const [placement, setPlacement] = d2(config?.placement ?? (nativeMain ? "main" : "pane"));
|
|
3674
|
+
const [scale, setScale] = d2(config?.scale);
|
|
3652
3675
|
const [menu, setMenu] = d2(false);
|
|
3653
3676
|
const close = () => ctx.store.set({ dialog: null });
|
|
3654
3677
|
if (!config || !def) return null;
|
|
@@ -3708,7 +3731,14 @@ function IndicatorSettings({ ctx, id, Dialog: Dialog2 }) {
|
|
|
3708
3731
|
const apply = (e3) => {
|
|
3709
3732
|
e3.preventDefault();
|
|
3710
3733
|
const c3 = collect();
|
|
3711
|
-
ctx.chart.updateIndicator(id, {
|
|
3734
|
+
ctx.chart.updateIndicator(id, {
|
|
3735
|
+
params: c3.params,
|
|
3736
|
+
styles: c3.styles,
|
|
3737
|
+
display: c3.display,
|
|
3738
|
+
timeframe: c3.timeframe,
|
|
3739
|
+
waitClose: c3.waitClose,
|
|
3740
|
+
...onIndicator ? {} : { placement, ...scale ? { scale } : {} }
|
|
3741
|
+
});
|
|
3712
3742
|
close();
|
|
3713
3743
|
};
|
|
3714
3744
|
const reset = () => {
|
|
@@ -3859,6 +3889,32 @@ function IndicatorSettings({ ctx, id, Dialog: Dialog2 }) {
|
|
|
3859
3889
|
/* @__PURE__ */ a3(ColorField, { t: t3, value: display.fillColor ?? (/^#[0-9a-f]{6}$/i.test(probe.fill?.color ?? "") ? `${probe.fill.color}26` : "#3182f626"), label: t3.color, onChange: (fillColor) => setD({ fillColor }) })
|
|
3860
3890
|
] })
|
|
3861
3891
|
] }),
|
|
3892
|
+
!onIndicator && /* @__PURE__ */ a3($, { children: [
|
|
3893
|
+
/* @__PURE__ */ a3("div", { class: "fnc-row", children: [
|
|
3894
|
+
/* @__PURE__ */ a3("span", { class: "fnc-row-label fnc-row-label-wide", children: t3.placement }),
|
|
3895
|
+
/* @__PURE__ */ a3("select", { class: "fnc-select fnc-select-source", value: placement, "aria-label": t3.placement, onChange: (e3) => setPlacement(e3.currentTarget.value), children: [
|
|
3896
|
+
/* @__PURE__ */ a3("option", { value: "main", children: t3.placementMain }),
|
|
3897
|
+
/* @__PURE__ */ a3("option", { value: "pane", children: t3.placementPane })
|
|
3898
|
+
] })
|
|
3899
|
+
] }),
|
|
3900
|
+
placement === "main" && /* @__PURE__ */ a3("div", { class: "fnc-row", children: [
|
|
3901
|
+
/* @__PURE__ */ a3("span", { class: "fnc-row-label fnc-row-label-wide", children: t3.scaleLabel }),
|
|
3902
|
+
/* @__PURE__ */ a3(
|
|
3903
|
+
"select",
|
|
3904
|
+
{
|
|
3905
|
+
class: "fnc-select fnc-select-source",
|
|
3906
|
+
value: scale ?? (nativeMain ? "price" : "own"),
|
|
3907
|
+
"aria-label": t3.scaleLabel,
|
|
3908
|
+
onChange: (e3) => setScale(e3.currentTarget.value),
|
|
3909
|
+
children: [
|
|
3910
|
+
/* @__PURE__ */ a3("option", { value: "price", children: t3.scalePrice }),
|
|
3911
|
+
/* @__PURE__ */ a3("option", { value: "own", children: t3.scaleOwn }),
|
|
3912
|
+
/* @__PURE__ */ a3("option", { value: "left", children: t3.scaleLeft })
|
|
3913
|
+
]
|
|
3914
|
+
}
|
|
3915
|
+
)
|
|
3916
|
+
] })
|
|
3917
|
+
] }),
|
|
3862
3918
|
/* @__PURE__ */ a3("div", { class: "fnc-section", children: t3.outputValues }),
|
|
3863
3919
|
/* @__PURE__ */ a3("div", { class: "fnc-row", children: [
|
|
3864
3920
|
/* @__PURE__ */ a3("span", { class: "fnc-row-label fnc-row-label-wide", children: t3.precision }),
|
|
@@ -7821,6 +7877,19 @@ function IndicatorItem({ ctx, item, values = true }) {
|
|
|
7821
7877
|
e3.stopPropagation();
|
|
7822
7878
|
ctx.chart.moveIndicator(item.id, 1);
|
|
7823
7879
|
}, children: /* @__PURE__ */ a3(ChevronDownIcon, {}) }),
|
|
7880
|
+
!item.parent && /* @__PURE__ */ a3(
|
|
7881
|
+
"button",
|
|
7882
|
+
{
|
|
7883
|
+
class: "fnc-ind-btn",
|
|
7884
|
+
"data-tip": item.placement === "main" ? t3.moveToPane : t3.moveToChart,
|
|
7885
|
+
"aria-label": `${item.title} ${item.placement === "main" ? t3.moveToPane : t3.moveToChart}`,
|
|
7886
|
+
onClick: (e3) => {
|
|
7887
|
+
e3.stopPropagation();
|
|
7888
|
+
ctx.chart.setIndicatorPlacement(item.id, item.placement === "main" ? "pane" : "main");
|
|
7889
|
+
},
|
|
7890
|
+
children: item.placement === "main" ? /* @__PURE__ */ a3(ToPaneIcon, {}) : /* @__PURE__ */ a3(ToChartIcon, {})
|
|
7891
|
+
}
|
|
7892
|
+
),
|
|
7824
7893
|
item.hostable && ctx.chart.indicatorsOnIndicator().length > 0 && /* @__PURE__ */ a3(
|
|
7825
7894
|
"button",
|
|
7826
7895
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@funnest/charts-ui",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.50",
|
|
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.50"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"preact": "^11.2.0"
|