@funnest/charts-ui 0.9.3 → 0.9.4
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 +2 -0
- package/dist/index.js +24 -8
- package/package.json +2 -2
package/dist/i18n.d.ts
CHANGED
|
@@ -112,6 +112,7 @@ export declare const STRINGS: {
|
|
|
112
112
|
levelShown: string;
|
|
113
113
|
levelValue: string;
|
|
114
114
|
levelColor: string;
|
|
115
|
+
levelText: string;
|
|
115
116
|
removeLevel: string;
|
|
116
117
|
addLevel: string;
|
|
117
118
|
resetLevels: string;
|
|
@@ -333,6 +334,7 @@ export declare const STRINGS: {
|
|
|
333
334
|
levelShown: string;
|
|
334
335
|
levelValue: string;
|
|
335
336
|
levelColor: string;
|
|
337
|
+
levelText: string;
|
|
336
338
|
removeLevel: string;
|
|
337
339
|
addLevel: string;
|
|
338
340
|
resetLevels: string;
|
package/dist/index.js
CHANGED
|
@@ -541,6 +541,7 @@ var STRINGS = {
|
|
|
541
541
|
levelShown: "\uB808\uBCA8 \uBCF4\uC774\uAE30",
|
|
542
542
|
levelValue: "\uB808\uBCA8 \uAC12",
|
|
543
543
|
levelColor: "\uB808\uBCA8 \uC0C9",
|
|
544
|
+
levelText: "\uBB38\uC790",
|
|
544
545
|
removeLevel: "\uB808\uBCA8 \uBE7C\uAE30",
|
|
545
546
|
addLevel: "\uB808\uBCA8 \uCD94\uAC00",
|
|
546
547
|
resetLevels: "\uAE30\uBCF8 \uB808\uBCA8\uB85C",
|
|
@@ -764,6 +765,7 @@ var STRINGS = {
|
|
|
764
765
|
levelShown: "Show level",
|
|
765
766
|
levelValue: "Level value",
|
|
766
767
|
levelColor: "Level color",
|
|
768
|
+
levelText: "Text",
|
|
767
769
|
removeLevel: "Remove level",
|
|
768
770
|
addLevel: "Add level",
|
|
769
771
|
resetLevels: "Default levels",
|
|
@@ -1561,9 +1563,9 @@ function SelectionBar({ ctx }) {
|
|
|
1561
1563
|
children: /* @__PURE__ */ a3(GripIcon, {})
|
|
1562
1564
|
}
|
|
1563
1565
|
),
|
|
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
|
-
"
|
|
1566
|
+
!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) })),
|
|
1567
|
+
!def?.levels && /* @__PURE__ */ a3("label", { class: "fnc-swatch fnc-swatch-add", "data-tip": t3.customColor, "aria-label": t3.customColor, children: [
|
|
1568
|
+
/* @__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
1569
|
/* @__PURE__ */ a3(
|
|
1568
1570
|
"input",
|
|
1569
1571
|
{
|
|
@@ -1610,7 +1612,7 @@ function SelectionBar({ ctx }) {
|
|
|
1610
1612
|
] })
|
|
1611
1613
|
] }),
|
|
1612
1614
|
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(
|
|
1615
|
+
/* @__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
1616
|
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
1617
|
def.options.map((o4) => {
|
|
1616
1618
|
const value = drawingOption(def, d3, o4.key);
|
|
@@ -1696,6 +1698,18 @@ function SelectionBar({ ctx }) {
|
|
|
1696
1698
|
onInput: (e3) => setLevels(levelRows.map((x2, j2) => j2 === i3 ? { ...x2, color: e3.target.value } : x2))
|
|
1697
1699
|
}
|
|
1698
1700
|
) }),
|
|
1701
|
+
/* @__PURE__ */ a3(
|
|
1702
|
+
"input",
|
|
1703
|
+
{
|
|
1704
|
+
class: "fnc-input fnc-level-text",
|
|
1705
|
+
type: "text",
|
|
1706
|
+
maxLength: 40,
|
|
1707
|
+
defaultValue: l3.text ?? "",
|
|
1708
|
+
placeholder: t3.levelText,
|
|
1709
|
+
"aria-label": `${l3.value} ${t3.levelText}`,
|
|
1710
|
+
onChange: (e3) => setLevels(levelRows.map((x2, j2) => j2 === i3 ? { ...x2, text: e3.target.value.trim() } : x2))
|
|
1711
|
+
}
|
|
1712
|
+
),
|
|
1699
1713
|
/* @__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
1714
|
] }, `${i3}:${l3.value}`)) }),
|
|
1701
1715
|
/* @__PURE__ */ a3("div", { class: "fnc-menu-sep" }),
|
|
@@ -4323,7 +4337,8 @@ var CSS = (
|
|
|
4323
4337
|
.fnc-selbar { padding-left: 4px; }
|
|
4324
4338
|
.fnc-selbar-grip { cursor: grab; touch-action: none; }
|
|
4325
4339
|
.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);
|
|
4340
|
+
.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; }
|
|
4341
|
+
.fnc-swatch-add svg { display: block; }
|
|
4327
4342
|
.fnc-swatch-add input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
|
|
4328
4343
|
.fnc-selbar-menu { position: relative; }
|
|
4329
4344
|
.fnc-selbar-pop { top: calc(100% + 6px); left: 50%; transform: translateX(-50%); min-width: 110px; }
|
|
@@ -5141,8 +5156,9 @@ var CSS = (
|
|
|
5141
5156
|
.fnc-tools-seg button { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 0; padding: 0 6px; }
|
|
5142
5157
|
.fnc-tools-seg svg { width: 16px; height: 16px; flex: none; }
|
|
5143
5158
|
.fnc-template-menu { min-width: 220px; }
|
|
5144
|
-
.fnc-levels-menu { min-width:
|
|
5145
|
-
.fnc-
|
|
5159
|
+
.fnc-levels-menu { min-width: 340px; }
|
|
5160
|
+
.fnc-level-text { flex: 1; min-width: 0; width: 110px; height: 28px; padding: 0 8px; font-size: 13px; }
|
|
5161
|
+
.fnc-options-menu { min-width: 280px; max-height: min(70vh, 560px); overflow-y: auto; }
|
|
5146
5162
|
.fnc-option-row { display: flex; align-items: center; gap: 8px; }
|
|
5147
5163
|
.fnc-option-row input[type='checkbox'] { width: 15px; height: 15px; margin: 0; accent-color: var(--fnc-accent, #3182f6); }
|
|
5148
5164
|
.fnc-option-field { justify-content: space-between; padding: 4px 10px; font-size: 13px; color: var(--fnc-text); }
|
|
@@ -5150,7 +5166,7 @@ var CSS = (
|
|
|
5150
5166
|
.fnc-option-number { flex: none; width: 90px; height: 28px; padding: 0 8px; font-size: 13px; }
|
|
5151
5167
|
.fnc-option-unit { color: var(--fnc-text-2); font-size: 12px; }
|
|
5152
5168
|
.fnc-option-field .fnc-select { height: 28px; font-size: 13px; }
|
|
5153
|
-
.fnc-levels-list { max-height:
|
|
5169
|
+
.fnc-levels-list { max-height: min(55vh, 420px); overflow-y: auto; padding: 2px 0; }
|
|
5154
5170
|
.fnc-level-row { display: flex; align-items: center; gap: 8px; padding: 3px 8px; }
|
|
5155
5171
|
.fnc-level-row input[type='checkbox'] { width: 15px; height: 15px; margin: 0; accent-color: var(--fnc-accent, #3182f6); }
|
|
5156
5172
|
.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.4",
|
|
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.4"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"preact": "^11.2.0"
|