@funnest/charts-ui 0.11.60 → 0.11.62
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 +67 -31
- package/package.json +2 -2
package/dist/i18n.d.ts
CHANGED
|
@@ -233,6 +233,7 @@ export declare const STRINGS: {
|
|
|
233
233
|
lock: string;
|
|
234
234
|
unlock: string;
|
|
235
235
|
duplicate: string;
|
|
236
|
+
moreActions: string;
|
|
236
237
|
moveBar: string;
|
|
237
238
|
indicators: string;
|
|
238
239
|
addIndicator: string;
|
|
@@ -638,6 +639,7 @@ export declare const STRINGS: {
|
|
|
638
639
|
lock: string;
|
|
639
640
|
unlock: string;
|
|
640
641
|
duplicate: string;
|
|
642
|
+
moreActions: string;
|
|
641
643
|
moveBar: string;
|
|
642
644
|
indicators: string;
|
|
643
645
|
addIndicator: string;
|
package/dist/index.js
CHANGED
|
@@ -668,6 +668,7 @@ var STRINGS = {
|
|
|
668
668
|
lock: "\uC7A0\uADF8\uAE30",
|
|
669
669
|
unlock: "\uC7A0\uAE08 \uD480\uAE30",
|
|
670
670
|
duplicate: "\uBCF5\uC81C",
|
|
671
|
+
moreActions: "\uB354\uBCF4\uAE30",
|
|
671
672
|
moveBar: "\uB04C\uC5B4\uC11C \uC62E\uAE30\uAE30 (\uB450 \uBC88 \uB204\uB974\uBA74 \uC81C\uC790\uB9AC)",
|
|
672
673
|
indicators: "\uC9C0\uD45C",
|
|
673
674
|
addIndicator: "\uC9C0\uD45C \uCD94\uAC00",
|
|
@@ -1075,6 +1076,7 @@ var STRINGS = {
|
|
|
1075
1076
|
lock: "Lock",
|
|
1076
1077
|
unlock: "Unlock",
|
|
1077
1078
|
duplicate: "Duplicate",
|
|
1079
|
+
moreActions: "More",
|
|
1078
1080
|
moveBar: "Drag to move (double-click to reset)",
|
|
1079
1081
|
indicators: "Indicators",
|
|
1080
1082
|
addIndicator: "Add indicator",
|
|
@@ -2990,8 +2992,12 @@ var CSS = (
|
|
|
2990
2992
|
.fnc-ss-body .fnc-menu-item { min-height: 44px; font-size: 15px; }
|
|
2991
2993
|
.fnc-ss-body .fnc-levels-list { max-height: none; }
|
|
2992
2994
|
/* \u{1F58C}'s colors: one row of swatches over the bar. */
|
|
2993
|
-
.fnc-menu.fnc-brush-pop { flex-direction: row; flex-wrap: wrap; align-items: center; gap:
|
|
2994
|
-
.fnc-brush-pop .fnc-swatch { width:
|
|
2995
|
+
.fnc-menu.fnc-brush-pop { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; }
|
|
2996
|
+
.fnc-brush-pop .fnc-swatch { width: 24px; height: 24px; }
|
|
2997
|
+
.fnc-selbar-pop.fnc-note-menu { width: auto; }
|
|
2998
|
+
.fnc-line-pop { padding: 6px 14px; }
|
|
2999
|
+
.fnc-line-pop .fnc-ss-seg button { width: 42px; }
|
|
3000
|
+
.fnc-note-menu .fnc-ss-row { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--fnc-text-2); }
|
|
2995
3001
|
.fnc-tool-row .fnc-menu-item { flex: 1; padding-right: 36px; }
|
|
2996
3002
|
.fnc-tool-fav { position: absolute; right: 6px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; color: var(--fnc-text-2); opacity: 0; cursor: pointer; }
|
|
2997
3003
|
.fnc-tool-row:hover .fnc-tool-fav, .fnc-tool-fav:focus-visible, .fnc-tool-fav[aria-pressed='true'] { opacity: 1; }
|
|
@@ -4499,9 +4505,16 @@ var writeJson = (key, value) => {
|
|
|
4499
4505
|
} catch {
|
|
4500
4506
|
}
|
|
4501
4507
|
};
|
|
4502
|
-
function DashGlyph({ dash }) {
|
|
4508
|
+
function DashGlyph({ dash, width = 2 }) {
|
|
4503
4509
|
const pattern = dash === "dashed" ? "4 3" : dash === "dotted" ? "1 3" : void 0;
|
|
4504
|
-
return /* @__PURE__ */ a3("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", stroke: "currentColor", "stroke-width":
|
|
4510
|
+
return /* @__PURE__ */ a3("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", stroke: "currentColor", "stroke-width": width, "stroke-linecap": "round", "aria-hidden": "true", children: /* @__PURE__ */ a3("path", { d: "M3 10h14", "stroke-dasharray": pattern }) });
|
|
4511
|
+
}
|
|
4512
|
+
function MoreIcon() {
|
|
4513
|
+
return /* @__PURE__ */ a3("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true", children: [
|
|
4514
|
+
/* @__PURE__ */ a3("circle", { cx: "4.5", cy: "10", r: "1.5" }),
|
|
4515
|
+
/* @__PURE__ */ a3("circle", { cx: "10", cy: "10", r: "1.5" }),
|
|
4516
|
+
/* @__PURE__ */ a3("circle", { cx: "15.5", cy: "10", r: "1.5" })
|
|
4517
|
+
] });
|
|
4505
4518
|
}
|
|
4506
4519
|
function DrawingCoords({ ctx, drawing, t: t3 }) {
|
|
4507
4520
|
const tz = ctx.chart.timeZone;
|
|
@@ -4949,6 +4962,52 @@ function SelectionBar({ ctx }) {
|
|
|
4949
4962
|
)
|
|
4950
4963
|
] })
|
|
4951
4964
|
] }),
|
|
4965
|
+
phone && def && (def.text || !def.plain) && /* @__PURE__ */ a3("div", { class: "fnc-selbar-menu", children: [
|
|
4966
|
+
/* @__PURE__ */ a3(
|
|
4967
|
+
"button",
|
|
4968
|
+
{
|
|
4969
|
+
class: style.text ? "fnc-btn fnc-btn-on" : "fnc-btn",
|
|
4970
|
+
"aria-label": def.text ? t3.drawingText : t3.note,
|
|
4971
|
+
"aria-expanded": menu === "note",
|
|
4972
|
+
onClick: () => setMenu(menu === "note" ? null : "note"),
|
|
4973
|
+
children: /* @__PURE__ */ a3(TextIcon, {})
|
|
4974
|
+
}
|
|
4975
|
+
),
|
|
4976
|
+
menu === "note" && /* @__PURE__ */ a3("div", { class: "fnc-menu fnc-selbar-pop fnc-note-menu", role: "menu", onKeyDown: (e3) => e3.key !== "Escape" && e3.stopPropagation(), children: def.text ? /* @__PURE__ */ a3($, { children: [
|
|
4977
|
+
/* @__PURE__ */ a3(
|
|
4978
|
+
"input",
|
|
4979
|
+
{
|
|
4980
|
+
class: "fnc-input fnc-ss-text",
|
|
4981
|
+
value: style.text ?? "",
|
|
4982
|
+
placeholder: t3.textPlaceholder,
|
|
4983
|
+
"aria-label": t3.drawingText,
|
|
4984
|
+
maxLength: 200,
|
|
4985
|
+
onInput: (e3) => setStyle({ text: e3.target.value })
|
|
4986
|
+
}
|
|
4987
|
+
),
|
|
4988
|
+
/* @__PURE__ */ a3("div", { class: "fnc-ss-row", children: [
|
|
4989
|
+
/* @__PURE__ */ a3("span", { children: t3.fontSize }),
|
|
4990
|
+
/* @__PURE__ */ a3("div", { class: "fnc-ss-step", children: [
|
|
4991
|
+
/* @__PURE__ */ a3("button", { "aria-label": `${t3.fontSize} \u2212`, disabled: fontIndex === 0, onClick: () => setStyle({ fontSize: FONT_SIZES[fontIndex - 1] }), children: "\u2212" }),
|
|
4992
|
+
/* @__PURE__ */ a3("b", { children: style.fontSize ?? 14 }),
|
|
4993
|
+
/* @__PURE__ */ a3("button", { "aria-label": `${t3.fontSize} +`, disabled: fontIndex >= FONT_SIZES.length - 1, onClick: () => setStyle({ fontSize: FONT_SIZES[fontIndex + 1] }), children: "+" })
|
|
4994
|
+
] })
|
|
4995
|
+
] })
|
|
4996
|
+
] }) : noteBody() })
|
|
4997
|
+
] }),
|
|
4998
|
+
phone && !def?.plain && /* @__PURE__ */ a3("div", { class: "fnc-selbar-menu", children: [
|
|
4999
|
+
/* @__PURE__ */ a3("button", { class: "fnc-btn", "aria-label": t3.lineStyle, "aria-expanded": menu === "line", onClick: () => setMenu(menu === "line" ? null : "line"), children: /* @__PURE__ */ a3(DashGlyph, { dash, width: style.width ?? 2 }) }),
|
|
5000
|
+
menu === "line" && /* @__PURE__ */ a3("div", { class: "fnc-menu fnc-selbar-pop fnc-line-pop", role: "menu", children: [
|
|
5001
|
+
/* @__PURE__ */ a3("div", { class: "fnc-ss-row", children: [
|
|
5002
|
+
/* @__PURE__ */ a3("span", { children: t3.lineStyle }),
|
|
5003
|
+
/* @__PURE__ */ a3("div", { class: "fnc-ss-seg", role: "radiogroup", "aria-label": t3.lineStyle, children: DASH_ORDER.map((k2) => /* @__PURE__ */ a3("button", { role: "radio", "aria-checked": dash === k2, "aria-label": k2 === "solid" ? t3.lineSolid : k2 === "dashed" ? t3.lineDashed : t3.lineDotted, onClick: () => setStyle({ dash: k2 }), children: /* @__PURE__ */ a3(DashGlyph, { dash: k2 }) })) })
|
|
5004
|
+
] }),
|
|
5005
|
+
/* @__PURE__ */ a3("div", { class: "fnc-ss-row", children: [
|
|
5006
|
+
/* @__PURE__ */ a3("span", { children: t3.lineWidth }),
|
|
5007
|
+
/* @__PURE__ */ a3("div", { class: "fnc-ss-seg", role: "radiogroup", "aria-label": t3.lineWidth, children: WIDTHS.map((w3) => /* @__PURE__ */ a3("button", { role: "radio", "aria-checked": (style.width ?? 2) === w3, "aria-label": `${w3}px`, onClick: () => setStyle({ width: w3 }), children: /* @__PURE__ */ a3(DashGlyph, { dash: "solid", width: w3 }) })) })
|
|
5008
|
+
] })
|
|
5009
|
+
] })
|
|
5010
|
+
] }),
|
|
4952
5011
|
phone && /* @__PURE__ */ a3(
|
|
4953
5012
|
"button",
|
|
4954
5013
|
{
|
|
@@ -5129,6 +5188,10 @@ function SelectionBar({ ctx }) {
|
|
|
5129
5188
|
menu === "visibility" && /* @__PURE__ */ a3("div", { class: "fnc-menu fnc-selbar-pop fnc-visibility-menu", role: "menu", onKeyDown: (e3) => e3.key !== "Escape" && e3.stopPropagation(), children: visibilityBody() })
|
|
5130
5189
|
] })
|
|
5131
5190
|
] }),
|
|
5191
|
+
phone && /* @__PURE__ */ a3("div", { class: "fnc-selbar-menu", children: [
|
|
5192
|
+
/* @__PURE__ */ a3("button", { class: "fnc-btn", "aria-label": t3.moreActions, "aria-expanded": menu === "more", onClick: () => setMenu(menu === "more" ? null : "more"), children: /* @__PURE__ */ a3(MoreIcon, {}) }),
|
|
5193
|
+
menu === "more" && /* @__PURE__ */ a3("div", { class: "fnc-menu fnc-selbar-pop", role: "menu", children: orderBody() })
|
|
5194
|
+
] }),
|
|
5132
5195
|
/* @__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 }) }),
|
|
5133
5196
|
/* @__PURE__ */ a3(
|
|
5134
5197
|
"button",
|
|
@@ -5176,29 +5239,6 @@ function SelectionBar({ ctx }) {
|
|
|
5176
5239
|
] })
|
|
5177
5240
|
] })
|
|
5178
5241
|
] }),
|
|
5179
|
-
def?.text && /* @__PURE__ */ a3("section", { class: "fnc-ss-section", children: [
|
|
5180
|
-
/* @__PURE__ */ a3("h3", { children: t3.drawingText }),
|
|
5181
|
-
/* @__PURE__ */ a3(
|
|
5182
|
-
"input",
|
|
5183
|
-
{
|
|
5184
|
-
class: "fnc-input fnc-ss-text",
|
|
5185
|
-
value: style.text ?? "",
|
|
5186
|
-
placeholder: t3.textPlaceholder,
|
|
5187
|
-
"aria-label": t3.drawingText,
|
|
5188
|
-
maxLength: 200,
|
|
5189
|
-
onInput: (e3) => setStyle({ text: e3.target.value }),
|
|
5190
|
-
onKeyDown: (e3) => e3.stopPropagation()
|
|
5191
|
-
}
|
|
5192
|
-
),
|
|
5193
|
-
/* @__PURE__ */ a3("div", { class: "fnc-ss-row", children: [
|
|
5194
|
-
/* @__PURE__ */ a3("span", { children: t3.fontSize }),
|
|
5195
|
-
/* @__PURE__ */ a3("div", { class: "fnc-ss-step", children: [
|
|
5196
|
-
/* @__PURE__ */ a3("button", { "aria-label": `${t3.fontSize} \u2212`, disabled: fontIndex === 0, onClick: () => setStyle({ fontSize: FONT_SIZES[fontIndex - 1] }), children: "\u2212" }),
|
|
5197
|
-
/* @__PURE__ */ a3("b", { children: style.fontSize ?? 14 }),
|
|
5198
|
-
/* @__PURE__ */ a3("button", { "aria-label": `${t3.fontSize} +`, disabled: fontIndex >= FONT_SIZES.length - 1, onClick: () => setStyle({ fontSize: FONT_SIZES[fontIndex + 1] }), children: "+" })
|
|
5199
|
-
] })
|
|
5200
|
-
] })
|
|
5201
|
-
] }),
|
|
5202
5242
|
slots.length > 0 && /* @__PURE__ */ a3("section", { class: "fnc-ss-section", children: [
|
|
5203
5243
|
/* @__PURE__ */ a3("h3", { children: t3.partColors }),
|
|
5204
5244
|
colorsBody()
|
|
@@ -5211,10 +5251,6 @@ function SelectionBar({ ctx }) {
|
|
|
5211
5251
|
/* @__PURE__ */ a3("h3", { children: t3.levels }),
|
|
5212
5252
|
levelsBody()
|
|
5213
5253
|
] }),
|
|
5214
|
-
def && !def.text && /* @__PURE__ */ a3("section", { class: "fnc-ss-section", children: [
|
|
5215
|
-
/* @__PURE__ */ a3("h3", { children: t3.note }),
|
|
5216
|
-
noteBody()
|
|
5217
|
-
] }),
|
|
5218
5254
|
/* @__PURE__ */ a3("section", { class: "fnc-ss-section", children: [
|
|
5219
5255
|
/* @__PURE__ */ a3("h3", { children: t3.coordinates }),
|
|
5220
5256
|
coordsBody()
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@funnest/charts-ui",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.62",
|
|
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.62"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"preact": "^11.2.0"
|