@funnest/charts-ui 0.11.34 → 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 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;
@@ -633,6 +635,8 @@ export declare const STRINGS: {
633
635
  lockView: string;
634
636
  unlockView: string;
635
637
  lockRatio: string;
638
+ settingAutoScale: string;
639
+ hintAutoScale: string;
636
640
  levelValuesLabel: string;
637
641
  note: string;
638
642
  noteText: 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",
@@ -1070,6 +1072,8 @@ var STRINGS = {
1070
1072
  lockView: "Lock chart",
1071
1073
  unlockView: "Unlock chart",
1072
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.",
1073
1077
  levelValuesLabel: "Level values",
1074
1078
  note: "Text",
1075
1079
  noteText: "Type text",
@@ -5220,6 +5224,25 @@ function SettingsDialog({ ctx }) {
5220
5224
  hint && /* @__PURE__ */ a3(Info, { text: t3[hint] }),
5221
5225
  /* @__PURE__ */ a3("input", { type: "checkbox", role: "switch", class: "fnc-switch", checked: settings[key], onChange: (e3) => setRow(key, e3.currentTarget.checked) })
5222
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
+ ] });
5223
5246
  const anchor = T2(null);
5224
5247
  const layer = usePageLayer(anchor, settings);
5225
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: [
@@ -5293,6 +5316,7 @@ function SettingsDialog({ ctx }) {
5293
5316
  shown === "scale" && /* @__PURE__ */ a3($, { children: [
5294
5317
  /* @__PURE__ */ a3("div", { class: "fnc-section", children: t3.settingsAxis }),
5295
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,
5296
5320
  toggles(AXIS_ROWS),
5297
5321
  /* @__PURE__ */ a3("div", { class: "fnc-section", children: t3.settingsPriceMarks }),
5298
5322
  toggles(PRICE_MARK_ROWS),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funnest/charts-ui",
3
- "version": "0.11.34",
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.34"
45
+ "@funnest/charts": "0.11.35"
46
46
  },
47
47
  "devDependencies": {
48
48
  "preact": "^11.2.0"