@funnest/charts-ui 0.9.3 → 0.9.6
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 +12 -0
- package/dist/icons.d.ts +2 -0
- package/dist/index.js +47 -8
- package/package.json +2 -2
package/dist/i18n.d.ts
CHANGED
|
@@ -107,11 +107,17 @@ export declare const STRINGS: {
|
|
|
107
107
|
resetColors: string;
|
|
108
108
|
templates: string;
|
|
109
109
|
levels: string;
|
|
110
|
+
drawingOrder: string;
|
|
111
|
+
bringToFront: string;
|
|
112
|
+
bringForward: string;
|
|
113
|
+
sendBackward: string;
|
|
114
|
+
sendToBack: string;
|
|
110
115
|
drawingOptions: string;
|
|
111
116
|
resetOptions: string;
|
|
112
117
|
levelShown: string;
|
|
113
118
|
levelValue: string;
|
|
114
119
|
levelColor: string;
|
|
120
|
+
levelText: string;
|
|
115
121
|
removeLevel: string;
|
|
116
122
|
addLevel: string;
|
|
117
123
|
resetLevels: string;
|
|
@@ -328,11 +334,17 @@ export declare const STRINGS: {
|
|
|
328
334
|
resetColors: string;
|
|
329
335
|
templates: string;
|
|
330
336
|
levels: string;
|
|
337
|
+
drawingOrder: string;
|
|
338
|
+
bringToFront: string;
|
|
339
|
+
bringForward: string;
|
|
340
|
+
sendBackward: string;
|
|
341
|
+
sendToBack: string;
|
|
331
342
|
drawingOptions: string;
|
|
332
343
|
resetOptions: string;
|
|
333
344
|
levelShown: string;
|
|
334
345
|
levelValue: string;
|
|
335
346
|
levelColor: string;
|
|
347
|
+
levelText: string;
|
|
336
348
|
removeLevel: string;
|
|
337
349
|
addLevel: string;
|
|
338
350
|
resetLevels: string;
|
package/dist/icons.d.ts
CHANGED
|
@@ -34,6 +34,8 @@ export declare const LineBreakIcon: () => import("preact").JSX.Element;
|
|
|
34
34
|
export declare const PointFigureIcon: () => import("preact").JSX.Element;
|
|
35
35
|
export declare const IndicatorIcon: () => import("preact").JSX.Element;
|
|
36
36
|
export declare const GearIcon: () => import("preact").JSX.Element;
|
|
37
|
+
/** 순서 (layers): two stacked sheets, the top one filled. */
|
|
38
|
+
export declare const LayersIcon: () => import("preact").JSX.Element;
|
|
37
39
|
/** 레벨 설정: lines at different heights with a value tick. */
|
|
38
40
|
export declare const LevelsIcon: () => import("preact").JSX.Element;
|
|
39
41
|
/** 그리기 템플릿: stacked cards. */
|
package/dist/index.js
CHANGED
|
@@ -536,11 +536,17 @@ var STRINGS = {
|
|
|
536
536
|
resetColors: "\uAE30\uBCF8 \uC0C9\uC73C\uB85C",
|
|
537
537
|
templates: "\uD15C\uD50C\uB9BF",
|
|
538
538
|
levels: "\uB808\uBCA8 \uC124\uC815",
|
|
539
|
+
drawingOrder: "\uC21C\uC11C",
|
|
540
|
+
bringToFront: "\uB9E8 \uC55E\uC73C\uB85C",
|
|
541
|
+
bringForward: "\uC55E\uC73C\uB85C",
|
|
542
|
+
sendBackward: "\uB4A4\uB85C",
|
|
543
|
+
sendToBack: "\uB9E8 \uB4A4\uB85C",
|
|
539
544
|
drawingOptions: "\uB3C4\uAD6C \uC124\uC815",
|
|
540
545
|
resetOptions: "\uAE30\uBCF8 \uC124\uC815\uC73C\uB85C",
|
|
541
546
|
levelShown: "\uB808\uBCA8 \uBCF4\uC774\uAE30",
|
|
542
547
|
levelValue: "\uB808\uBCA8 \uAC12",
|
|
543
548
|
levelColor: "\uB808\uBCA8 \uC0C9",
|
|
549
|
+
levelText: "\uBB38\uC790",
|
|
544
550
|
removeLevel: "\uB808\uBCA8 \uBE7C\uAE30",
|
|
545
551
|
addLevel: "\uB808\uBCA8 \uCD94\uAC00",
|
|
546
552
|
resetLevels: "\uAE30\uBCF8 \uB808\uBCA8\uB85C",
|
|
@@ -759,11 +765,17 @@ var STRINGS = {
|
|
|
759
765
|
resetColors: "Reset colors",
|
|
760
766
|
templates: "Templates",
|
|
761
767
|
levels: "Levels",
|
|
768
|
+
drawingOrder: "Order",
|
|
769
|
+
bringToFront: "Bring to front",
|
|
770
|
+
bringForward: "Bring forward",
|
|
771
|
+
sendBackward: "Send backward",
|
|
772
|
+
sendToBack: "Send to back",
|
|
762
773
|
drawingOptions: "Settings",
|
|
763
774
|
resetOptions: "Default settings",
|
|
764
775
|
levelShown: "Show level",
|
|
765
776
|
levelValue: "Level value",
|
|
766
777
|
levelColor: "Level color",
|
|
778
|
+
levelText: "Text",
|
|
767
779
|
removeLevel: "Remove level",
|
|
768
780
|
addLevel: "Add level",
|
|
769
781
|
resetLevels: "Default levels",
|
|
@@ -1016,6 +1028,10 @@ var GearIcon = () => /* @__PURE__ */ a3(Icon, { size: 14, children: [
|
|
|
1016
1028
|
/* @__PURE__ */ a3("circle", { cx: "10", cy: "10", r: "2.4" }),
|
|
1017
1029
|
/* @__PURE__ */ a3("path", { d: "M10 3v2M10 15v2M3 10h2M15 10h2M5 5l1.4 1.4M13.6 13.6L15 15M5 15l1.4-1.4M13.6 6.4L15 5" })
|
|
1018
1030
|
] });
|
|
1031
|
+
var LayersIcon = () => /* @__PURE__ */ a3(Icon, { children: [
|
|
1032
|
+
/* @__PURE__ */ a3("path", { d: "M10 4 3 7.5 10 11l7-3.5z", fill: "currentColor", "fill-opacity": "0.25" }),
|
|
1033
|
+
/* @__PURE__ */ a3("path", { d: "M3 11l7 3.5 7-3.5" })
|
|
1034
|
+
] });
|
|
1019
1035
|
var LevelsIcon = () => /* @__PURE__ */ a3(Icon, { children: [
|
|
1020
1036
|
/* @__PURE__ */ a3("path", { d: "M3 5h9M3 10h14M3 15h11" }),
|
|
1021
1037
|
/* @__PURE__ */ a3("circle", { cx: "15", cy: "5", r: "1.4" }),
|
|
@@ -1561,9 +1577,9 @@ function SelectionBar({ ctx }) {
|
|
|
1561
1577
|
children: /* @__PURE__ */ a3(GripIcon, {})
|
|
1562
1578
|
}
|
|
1563
1579
|
),
|
|
1564
|
-
[...SWATCHES, ...recent.filter((c3) => !SWATCHES.includes(c3))].map((color) => /* @__PURE__ */ a3("button", { class: "fnc-swatch", style: { background: color }, "data-tip": t3.color, "aria-label": `${t3.color} ${color}`, "aria-pressed": current === color, onClick: () => pickColor(color) })),
|
|
1565
|
-
/* @__PURE__ */ a3("label", { class: "fnc-swatch fnc-swatch-add", "data-tip": t3.customColor, "aria-label": t3.customColor, children: [
|
|
1566
|
-
"
|
|
1580
|
+
!def?.levels && [...SWATCHES, ...recent.filter((c3) => !SWATCHES.includes(c3))].map((color) => /* @__PURE__ */ a3("button", { class: "fnc-swatch", style: { background: color }, "data-tip": t3.color, "aria-label": `${t3.color} ${color}`, "aria-pressed": current === color, onClick: () => pickColor(color) })),
|
|
1581
|
+
!def?.levels && /* @__PURE__ */ a3("label", { class: "fnc-swatch fnc-swatch-add", "data-tip": t3.customColor, "aria-label": t3.customColor, children: [
|
|
1582
|
+
/* @__PURE__ */ a3("svg", { width: "10", height: "10", viewBox: "0 0 10 10", "aria-hidden": "true", children: /* @__PURE__ */ a3("path", { d: "M5 1.5v7M1.5 5h7", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round" }) }),
|
|
1567
1583
|
/* @__PURE__ */ a3(
|
|
1568
1584
|
"input",
|
|
1569
1585
|
{
|
|
@@ -1610,7 +1626,7 @@ function SelectionBar({ ctx }) {
|
|
|
1610
1626
|
] })
|
|
1611
1627
|
] }),
|
|
1612
1628
|
def?.options && def.options.length > 0 && /* @__PURE__ */ a3("div", { class: "fnc-selbar-menu", children: [
|
|
1613
|
-
/* @__PURE__ */ a3("button", { class: "fnc-btn", "data-tip": t3.drawingOptions, "aria-label": t3.drawingOptions, "aria-expanded": menu === "options", onClick: () => setMenu(menu === "options" ? null : "options"), children: /* @__PURE__ */ a3(
|
|
1629
|
+
/* @__PURE__ */ a3("button", { class: "fnc-btn", "data-tip": t3.drawingOptions, "aria-label": t3.drawingOptions, "aria-expanded": menu === "options", onClick: () => setMenu(menu === "options" ? null : "options"), children: /* @__PURE__ */ a3(SettingsIcon, {}) }),
|
|
1614
1630
|
menu === "options" && /* @__PURE__ */ a3("div", { class: "fnc-menu fnc-selbar-pop fnc-options-menu", role: "menu", onKeyDown: (e3) => e3.key !== "Escape" && e3.stopPropagation(), children: [
|
|
1615
1631
|
def.options.map((o4) => {
|
|
1616
1632
|
const value = drawingOption(def, d3, o4.key);
|
|
@@ -1696,6 +1712,18 @@ function SelectionBar({ ctx }) {
|
|
|
1696
1712
|
onInput: (e3) => setLevels(levelRows.map((x2, j2) => j2 === i3 ? { ...x2, color: e3.target.value } : x2))
|
|
1697
1713
|
}
|
|
1698
1714
|
) }),
|
|
1715
|
+
/* @__PURE__ */ a3(
|
|
1716
|
+
"input",
|
|
1717
|
+
{
|
|
1718
|
+
class: "fnc-input fnc-level-text",
|
|
1719
|
+
type: "text",
|
|
1720
|
+
maxLength: 40,
|
|
1721
|
+
defaultValue: l3.text ?? "",
|
|
1722
|
+
placeholder: t3.levelText,
|
|
1723
|
+
"aria-label": `${l3.value} ${t3.levelText}`,
|
|
1724
|
+
onChange: (e3) => setLevels(levelRows.map((x2, j2) => j2 === i3 ? { ...x2, text: e3.target.value.trim() } : x2))
|
|
1725
|
+
}
|
|
1726
|
+
),
|
|
1699
1727
|
/* @__PURE__ */ a3("button", { class: "fnc-ind-btn", "data-tip": t3.removeLevel, "aria-label": `${l3.value} ${t3.removeLevel}`, onClick: () => setLevels(levelRows.filter((_3, j2) => j2 !== i3)), children: /* @__PURE__ */ a3(SmallCloseIcon, {}) })
|
|
1700
1728
|
] }, `${i3}:${l3.value}`)) }),
|
|
1701
1729
|
/* @__PURE__ */ a3("div", { class: "fnc-menu-sep" }),
|
|
@@ -1862,6 +1890,15 @@ function SelectionBar({ ctx }) {
|
|
|
1862
1890
|
}
|
|
1863
1891
|
)),
|
|
1864
1892
|
/* @__PURE__ */ a3("div", { class: "fnc-sep" }),
|
|
1893
|
+
/* @__PURE__ */ a3("div", { class: "fnc-selbar-menu", children: [
|
|
1894
|
+
/* @__PURE__ */ a3("button", { class: "fnc-btn", "data-tip": t3.drawingOrder, "aria-label": t3.drawingOrder, "aria-expanded": menu === "order", onClick: () => setMenu(menu === "order" ? null : "order"), children: /* @__PURE__ */ a3(LayersIcon, {}) }),
|
|
1895
|
+
menu === "order" && /* @__PURE__ */ a3("div", { class: "fnc-menu fnc-selbar-pop", role: "menu", children: [
|
|
1896
|
+
["front", t3.bringToFront],
|
|
1897
|
+
["forward", t3.bringForward],
|
|
1898
|
+
["backward", t3.sendBackward],
|
|
1899
|
+
["back", t3.sendToBack]
|
|
1900
|
+
].map(([where, label]) => /* @__PURE__ */ a3("button", { class: "fnc-menu-item", role: "menuitem", disabled: !ctx.chart.canMoveDrawing(d3.id, where), onClick: () => ctx.chart.moveDrawing(d3.id, where), children: label })) })
|
|
1901
|
+
] }),
|
|
1865
1902
|
/* @__PURE__ */ a3("button", { class: "fnc-btn", "data-tip": locked ? t3.unlock : t3.lock, "aria-label": locked ? t3.unlock : t3.lock, "aria-pressed": locked, onClick: () => setStyle({ locked: !locked }), children: /* @__PURE__ */ a3(LockIcon, { open: !locked }) }),
|
|
1866
1903
|
/* @__PURE__ */ a3(
|
|
1867
1904
|
"button",
|
|
@@ -4323,7 +4360,8 @@ var CSS = (
|
|
|
4323
4360
|
.fnc-selbar { padding-left: 4px; }
|
|
4324
4361
|
.fnc-selbar-grip { cursor: grab; touch-action: none; }
|
|
4325
4362
|
.fnc-selbar-grip:active { cursor: grabbing; }
|
|
4326
|
-
.fnc-swatch-add { position: relative; display: grid; place-items: center; overflow: hidden; border: 1px dashed var(--fnc-text-2); color: var(--fnc-text-2);
|
|
4363
|
+
.fnc-swatch-add { position: relative; display: grid; place-items: center; box-sizing: border-box; overflow: hidden; border: 1px dashed var(--fnc-text-2); color: var(--fnc-text-2); cursor: pointer; }
|
|
4364
|
+
.fnc-swatch-add svg { display: block; }
|
|
4327
4365
|
.fnc-swatch-add input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
|
|
4328
4366
|
.fnc-selbar-menu { position: relative; }
|
|
4329
4367
|
.fnc-selbar-pop { top: calc(100% + 6px); left: 50%; transform: translateX(-50%); min-width: 110px; }
|
|
@@ -5141,8 +5179,9 @@ var CSS = (
|
|
|
5141
5179
|
.fnc-tools-seg button { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 0; padding: 0 6px; }
|
|
5142
5180
|
.fnc-tools-seg svg { width: 16px; height: 16px; flex: none; }
|
|
5143
5181
|
.fnc-template-menu { min-width: 220px; }
|
|
5144
|
-
.fnc-levels-menu { min-width:
|
|
5145
|
-
.fnc-
|
|
5182
|
+
.fnc-levels-menu { min-width: 340px; }
|
|
5183
|
+
.fnc-level-text { flex: 1; min-width: 0; width: 110px; height: 28px; padding: 0 8px; font-size: 13px; }
|
|
5184
|
+
.fnc-options-menu { min-width: 280px; max-height: min(70vh, 560px); overflow-y: auto; }
|
|
5146
5185
|
.fnc-option-row { display: flex; align-items: center; gap: 8px; }
|
|
5147
5186
|
.fnc-option-row input[type='checkbox'] { width: 15px; height: 15px; margin: 0; accent-color: var(--fnc-accent, #3182f6); }
|
|
5148
5187
|
.fnc-option-field { justify-content: space-between; padding: 4px 10px; font-size: 13px; color: var(--fnc-text); }
|
|
@@ -5150,7 +5189,7 @@ var CSS = (
|
|
|
5150
5189
|
.fnc-option-number { flex: none; width: 90px; height: 28px; padding: 0 8px; font-size: 13px; }
|
|
5151
5190
|
.fnc-option-unit { color: var(--fnc-text-2); font-size: 12px; }
|
|
5152
5191
|
.fnc-option-field .fnc-select { height: 28px; font-size: 13px; }
|
|
5153
|
-
.fnc-levels-list { max-height:
|
|
5192
|
+
.fnc-levels-list { max-height: min(55vh, 420px); overflow-y: auto; padding: 2px 0; }
|
|
5154
5193
|
.fnc-level-row { display: flex; align-items: center; gap: 8px; padding: 3px 8px; }
|
|
5155
5194
|
.fnc-level-row input[type='checkbox'] { width: 15px; height: 15px; margin: 0; accent-color: var(--fnc-accent, #3182f6); }
|
|
5156
5195
|
.fnc-level-value { flex: none; width: 84px; height: 28px; padding: 0 8px; font-size: 13px; }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@funnest/charts-ui",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.6",
|
|
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.9.
|
|
45
|
+
"@funnest/charts": "0.9.6"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"preact": "^11.2.0"
|