@funnest/charts-ui 0.11.33 → 0.11.35
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 +4 -2
- package/dist/index.js +32 -13
- package/package.json +2 -2
package/dist/i18n.d.ts
CHANGED
|
@@ -273,6 +273,8 @@ export declare const STRINGS: {
|
|
|
273
273
|
lockView: string;
|
|
274
274
|
unlockView: string;
|
|
275
275
|
lockRatio: string;
|
|
276
|
+
settingAutoScale: string;
|
|
277
|
+
hintAutoScale: string;
|
|
276
278
|
levelValuesLabel: string;
|
|
277
279
|
note: string;
|
|
278
280
|
noteText: string;
|
|
@@ -328,7 +330,6 @@ export declare const STRINGS: {
|
|
|
328
330
|
syncIndicators: string;
|
|
329
331
|
syncHint: string;
|
|
330
332
|
syncOff: string;
|
|
331
|
-
syncOnePane: string;
|
|
332
333
|
maximizePane: string;
|
|
333
334
|
restorePane: string;
|
|
334
335
|
pane: string;
|
|
@@ -634,6 +635,8 @@ export declare const STRINGS: {
|
|
|
634
635
|
lockView: string;
|
|
635
636
|
unlockView: string;
|
|
636
637
|
lockRatio: string;
|
|
638
|
+
settingAutoScale: string;
|
|
639
|
+
hintAutoScale: string;
|
|
637
640
|
levelValuesLabel: string;
|
|
638
641
|
note: string;
|
|
639
642
|
noteText: string;
|
|
@@ -689,7 +692,6 @@ export declare const STRINGS: {
|
|
|
689
692
|
syncIndicators: string;
|
|
690
693
|
syncHint: string;
|
|
691
694
|
syncOff: string;
|
|
692
|
-
syncOnePane: string;
|
|
693
695
|
maximizePane: string;
|
|
694
696
|
restorePane: string;
|
|
695
697
|
pane: string;
|
package/dist/index.js
CHANGED
|
@@ -708,6 +708,8 @@ var STRINGS = {
|
|
|
708
708
|
lockView: "\uCC28\uD2B8 \uACE0\uC815",
|
|
709
709
|
unlockView: "\uCC28\uD2B8 \uACE0\uC815 \uD480\uAE30",
|
|
710
710
|
lockRatio: "\uAC00\uACA9 \uCD95 \uBE44\uC728 \uACE0\uC815",
|
|
711
|
+
settingAutoScale: "\uC790\uB3D9 \uB9DE\uCDA4",
|
|
712
|
+
hintAutoScale: "\uD654\uBA74\uC5D0 \uBCF4\uC774\uB294 \uCE94\uB4E4\uC5D0 \uB9DE\uCDB0 \uAC00\uACA9 \uCD95\uC744 \uB298\uC774\uACE0 \uC904\uC5EC\uC694. \uAC00\uACA9 \uCD95\uC744 \uB04C\uC5B4 \uC9C1\uC811 \uB9DE\uCD94\uBA74 \uAEBC\uC9C0\uACE0, \uAC00\uACA9 \uCD95\uC744 \uB354\uBE14\uD074\uB9AD\uD558\uBA74 \uB2E4\uC2DC \uCF1C\uC838\uC694.",
|
|
711
713
|
levelValuesLabel: "\uAE30\uC900\uC120 \uAC12",
|
|
712
714
|
note: "\uD14D\uC2A4\uD2B8",
|
|
713
715
|
noteText: "\uD14D\uC2A4\uD2B8 \uC785\uB825",
|
|
@@ -765,7 +767,6 @@ var STRINGS = {
|
|
|
765
767
|
syncIndicators: "\uC9C0\uD45C",
|
|
766
768
|
syncHint: "\uCF1C\uBA74 \uBAA8\uB4E0 \uCE78\uC774 \uAC19\uC774 \uC6C0\uC9C1\uC5EC\uC694",
|
|
767
769
|
syncOff: "\uAEBC\uC9D0",
|
|
768
|
-
syncOnePane: "\uD654\uBA74\uC744 \uB450 \uCE78 \uC774\uC0C1\uC73C\uB85C \uB098\uB204\uBA74 \uCF20 \uAC83\uB07C\uB9AC \uB9DE\uCDB0\uC838\uC694.",
|
|
769
770
|
maximizePane: "\uC774 \uCE78 \uD06C\uAC8C \uBCF4\uAE30",
|
|
770
771
|
restorePane: "\uBD84\uD560 \uD654\uBA74\uC73C\uB85C",
|
|
771
772
|
pane: "\uCE78",
|
|
@@ -1071,6 +1072,8 @@ var STRINGS = {
|
|
|
1071
1072
|
lockView: "Lock chart",
|
|
1072
1073
|
unlockView: "Unlock chart",
|
|
1073
1074
|
lockRatio: "Lock price to bar ratio",
|
|
1075
|
+
settingAutoScale: "Auto (fit to screen)",
|
|
1076
|
+
hintAutoScale: "The price axis stretches to fit the candles on screen. Dragging the axis turns it off; double-click the axis to turn it back on.",
|
|
1074
1077
|
levelValuesLabel: "Level values",
|
|
1075
1078
|
note: "Text",
|
|
1076
1079
|
noteText: "Type text",
|
|
@@ -1126,7 +1129,6 @@ var STRINGS = {
|
|
|
1126
1129
|
syncIndicators: "Indicators",
|
|
1127
1130
|
syncHint: "Linked panes move together",
|
|
1128
1131
|
syncOff: "Off",
|
|
1129
|
-
syncOnePane: "Split the screen into two or more panes and what\u2019s on stays in step.",
|
|
1130
1132
|
maximizePane: "Maximize pane",
|
|
1131
1133
|
restorePane: "Back to split view",
|
|
1132
1134
|
pane: "Pane",
|
|
@@ -4287,7 +4289,8 @@ var CSS = (
|
|
|
4287
4289
|
.fnc-menu-title { display: flex; flex-direction: column; gap: 2px; padding: 6px 10px 8px; font-size: 13px; font-weight: 600; color: var(--fnc-text); }
|
|
4288
4290
|
.fnc-menu-title small { font-size: 12px; font-weight: 400; color: var(--fnc-text-2); }
|
|
4289
4291
|
.fnc-sync-item { justify-content: space-between; }
|
|
4290
|
-
.fnc-sync-item[aria-checked='true'] { background: none; color: var(--fnc-text); }
|
|
4292
|
+
.fnc-sync-item[aria-checked='true'] { background: none; color: var(--fnc-text-2); }
|
|
4293
|
+
.fnc-sync-item:hover { color: var(--fnc-text); }
|
|
4291
4294
|
.fnc-sync-item:hover { background: var(--fnc-surface); }
|
|
4292
4295
|
.fnc-sync-item .fnc-switch { display: inline-block; transform: scale(0.8); transform-origin: right center; }
|
|
4293
4296
|
.fnc-switch[data-on='true'] { background: var(--fnc-text-2); }
|
|
@@ -4307,14 +4310,13 @@ var CSS = (
|
|
|
4307
4310
|
.fnc-tools-section { padding: 8px 6px 6px; font-size: 12px; font-weight: 700; color: var(--fnc-text-2); }
|
|
4308
4311
|
.fnc-tools-fold { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 6px; border-radius: 6px; text-align: left; cursor: pointer; }
|
|
4309
4312
|
/* The sections read as rows of the menu (as big as the items under them), not as small captions. */
|
|
4310
|
-
.fnc-tools-section.fnc-tools-fold { font-size: 14px; font-weight:
|
|
4313
|
+
.fnc-tools-section.fnc-tools-fold { height: 36px; padding: 0 10px; font-size: 14px; font-weight: 400; color: var(--fnc-text-2); }
|
|
4311
4314
|
.fnc-tools-fold .fnc-tools-fold-now { font-size: 13px; font-weight: 400; }
|
|
4312
4315
|
.fnc-tools-fold:hover { background: var(--fnc-surface); color: var(--fnc-text); }
|
|
4313
4316
|
.fnc-tools-fold > span:first-child { flex: 1; }
|
|
4314
|
-
.fnc-tools-fold-now { display: inline-flex; align-items: center; gap: 5px; font-weight:
|
|
4317
|
+
.fnc-tools-fold-now { display: inline-flex; align-items: center; gap: 5px; font-weight: 400; color: var(--fnc-text-2); }
|
|
4315
4318
|
.fnc-tools-fold-now svg { width: 15px; height: 15px; }
|
|
4316
4319
|
.fnc-tools-fold-now { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
4317
|
-
.fnc-tools-note { margin: 2px 8px 6px; font-size: 12px; line-height: 1.45; color: var(--fnc-text-2); }
|
|
4318
4320
|
.fnc-tools-fold > svg { width: 14px; height: 14px; transition: transform 0.15s; transform: rotate(-90deg); }
|
|
4319
4321
|
.fnc-tools-fold[aria-expanded="true"] > svg { transform: none; }
|
|
4320
4322
|
.fnc-tools-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; margin: 0 2px 4px; }
|
|
@@ -5222,6 +5224,25 @@ function SettingsDialog({ ctx }) {
|
|
|
5222
5224
|
hint && /* @__PURE__ */ a3(Info, { text: t3[hint] }),
|
|
5223
5225
|
/* @__PURE__ */ a3("input", { type: "checkbox", role: "switch", class: "fnc-switch", checked: settings[key], onChange: (e3) => setRow(key, e3.currentTarget.checked) })
|
|
5224
5226
|
] }));
|
|
5227
|
+
const [autoScale, setAutoScale] = d2(() => ctx.chart.priceAutoScale);
|
|
5228
|
+
const autoScaleRow = /* @__PURE__ */ a3("label", { class: "fnc-row fnc-toggle-row", children: [
|
|
5229
|
+
/* @__PURE__ */ a3("span", { class: "fnc-toggle-label", children: t3.settingAutoScale }),
|
|
5230
|
+
/* @__PURE__ */ a3(Info, { text: t3.hintAutoScale }),
|
|
5231
|
+
/* @__PURE__ */ a3(
|
|
5232
|
+
"input",
|
|
5233
|
+
{
|
|
5234
|
+
type: "checkbox",
|
|
5235
|
+
role: "switch",
|
|
5236
|
+
class: "fnc-switch",
|
|
5237
|
+
checked: autoScale,
|
|
5238
|
+
disabled: settings.lockView,
|
|
5239
|
+
onChange: (e3) => {
|
|
5240
|
+
ctx.chart.setPriceAutoScale(e3.currentTarget.checked);
|
|
5241
|
+
setAutoScale(ctx.chart.priceAutoScale);
|
|
5242
|
+
}
|
|
5243
|
+
}
|
|
5244
|
+
)
|
|
5245
|
+
] });
|
|
5225
5246
|
const anchor = T2(null);
|
|
5226
5247
|
const layer = usePageLayer(anchor, settings);
|
|
5227
5248
|
const dialog = /* @__PURE__ */ a3("div", { class: "fnc-backdrop", onPointerDown: (e3) => e3.target === e3.currentTarget && close(), children: /* @__PURE__ */ a3("div", { class: "fnc-dialog fnc-settings-dialog", role: "dialog", "aria-modal": "true", "aria-label": t3.chartSettings, onKeyDown: (e3) => e3.key === "Escape" && close(), children: [
|
|
@@ -5295,6 +5316,7 @@ function SettingsDialog({ ctx }) {
|
|
|
5295
5316
|
shown === "scale" && /* @__PURE__ */ a3($, { children: [
|
|
5296
5317
|
/* @__PURE__ */ a3("div", { class: "fnc-section", children: t3.settingsAxis }),
|
|
5297
5318
|
/* @__PURE__ */ a3("div", { class: "fnc-seg fnc-settings-seg", role: "radiogroup", "aria-label": t3.settingsScale, children: SCALES.map(({ mode, label }) => /* @__PURE__ */ a3("button", { type: "button", role: "radio", "aria-checked": settings.priceScale === mode, onClick: () => set({ priceScale: mode }), children: t3[label] })) }),
|
|
5319
|
+
autoScaleRow,
|
|
5298
5320
|
toggles(AXIS_ROWS),
|
|
5299
5321
|
/* @__PURE__ */ a3("div", { class: "fnc-section", children: t3.settingsPriceMarks }),
|
|
5300
5322
|
toggles(PRICE_MARK_ROWS),
|
|
@@ -6291,13 +6313,10 @@ function SyncSection({ ctx, multi, open, onToggle }) {
|
|
|
6291
6313
|
const now = on.length === 0 ? t3.syncOff : on.length <= 2 ? on.join(" \xB7 ") : `${on[0]} +${on.length - 1}`;
|
|
6292
6314
|
return /* @__PURE__ */ a3($, { children: [
|
|
6293
6315
|
/* @__PURE__ */ a3(Fold, { label: t3.sync, open, onToggle, children: now }),
|
|
6294
|
-
open && /* @__PURE__ */ a3($, { children: [
|
|
6295
|
-
|
|
6296
|
-
|
|
6297
|
-
|
|
6298
|
-
/* @__PURE__ */ a3("span", { class: "fnc-switch", "data-on": m3.sync[key] ? "true" : "false", "aria-hidden": "true" })
|
|
6299
|
-
] }))
|
|
6300
|
-
] })
|
|
6316
|
+
open && /* @__PURE__ */ a3($, { children: SYNC_KEYS.map(({ key, label }) => /* @__PURE__ */ a3("button", { class: "fnc-menu-item fnc-sync-item", role: "menuitemcheckbox", "aria-checked": m3.sync[key], onClick: () => multi.setSync({ [key]: !m3.sync[key] }), children: [
|
|
6317
|
+
/* @__PURE__ */ a3("span", { children: t3[label] }),
|
|
6318
|
+
/* @__PURE__ */ a3("span", { class: "fnc-switch", "data-on": m3.sync[key] ? "true" : "false", "aria-hidden": "true" })
|
|
6319
|
+
] })) })
|
|
6301
6320
|
] });
|
|
6302
6321
|
}
|
|
6303
6322
|
function ToolsMenu({ ctx }) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@funnest/charts-ui",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.35",
|
|
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.35"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"preact": "^11.2.0"
|