@funnest/charts-ui 0.11.61 → 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 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",
@@ -2993,6 +2995,8 @@ var CSS = (
2993
2995
  .fnc-menu.fnc-brush-pop { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; }
2994
2996
  .fnc-brush-pop .fnc-swatch { width: 24px; height: 24px; }
2995
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; }
2996
3000
  .fnc-note-menu .fnc-ss-row { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--fnc-text-2); }
2997
3001
  .fnc-tool-row .fnc-menu-item { flex: 1; padding-right: 36px; }
2998
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; }
@@ -4501,9 +4505,16 @@ var writeJson = (key, value) => {
4501
4505
  } catch {
4502
4506
  }
4503
4507
  };
4504
- function DashGlyph({ dash }) {
4508
+ function DashGlyph({ dash, width = 2 }) {
4505
4509
  const pattern = dash === "dashed" ? "4 3" : dash === "dotted" ? "1 3" : void 0;
4506
- return /* @__PURE__ */ a3("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "aria-hidden": "true", children: /* @__PURE__ */ a3("path", { d: "M3 10h14", "stroke-dasharray": pattern }) });
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
+ ] });
4507
4518
  }
4508
4519
  function DrawingCoords({ ctx, drawing, t: t3 }) {
4509
4520
  const tz = ctx.chart.timeZone;
@@ -4984,6 +4995,19 @@ function SelectionBar({ ctx }) {
4984
4995
  ] })
4985
4996
  ] }) : noteBody() })
4986
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
+ ] }),
4987
5011
  phone && /* @__PURE__ */ a3(
4988
5012
  "button",
4989
5013
  {
@@ -5164,6 +5188,10 @@ function SelectionBar({ ctx }) {
5164
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() })
5165
5189
  ] })
5166
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
+ ] }),
5167
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 }) }),
5168
5196
  /* @__PURE__ */ a3(
5169
5197
  "button",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funnest/charts-ui",
3
- "version": "0.11.61",
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.61"
45
+ "@funnest/charts": "0.11.62"
46
46
  },
47
47
  "devDependencies": {
48
48
  "preact": "^11.2.0"