@funnest/charts-ui 0.6.23 → 0.6.24

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
@@ -1,4 +1,4 @@
1
- import type { Locale, Resolution } from '@funnest/charts';
1
+ import type { Locale } from '@funnest/charts';
2
2
  export declare const STRINGS: {
3
3
  ko: {
4
4
  searchSymbol: string;
@@ -304,8 +304,4 @@ export declare function stringsOf(s: {
304
304
  locale: Locale;
305
305
  strings?: Partial<Strings> | undefined;
306
306
  }): Strings;
307
- /**
308
- * '1' → 1분, '60' → 1시간, '1D' → 일 (short) / 1일 (long), '12M' → 1년.
309
- * Short labels are for the toolbar chips, long ones for the interval menu.
310
- */
311
- export declare function resolutionLabel(resolution: Resolution, locale: Locale, form?: 'short' | 'long'): string;
307
+ export { resolutionLabel } from '@funnest/charts';
package/dist/index.js CHANGED
@@ -424,6 +424,7 @@ function G2(n2, t3) {
424
424
  }
425
425
 
426
426
  // src/i18n.ts
427
+ import { resolutionLabel } from "@funnest/charts";
427
428
  var STRINGS = {
428
429
  ko: {
429
430
  searchSymbol: "\uC885\uBAA9 \uAC80\uC0C9",
@@ -729,28 +730,6 @@ function stringsOf(s3) {
729
730
  if (!byLocale) merged.set(s3.strings, byLocale = {});
730
731
  return byLocale[s3.locale] ??= { ...STRINGS[s3.locale], ...s3.strings };
731
732
  }
732
- function resolutionLabel(resolution, locale, form = "short") {
733
- const match = /^(\d*)([SDWM]?)$/i.exec(resolution.trim());
734
- if (!match) return resolution;
735
- const n2 = match[1] ? Number(match[1]) : 1;
736
- const unit = (match[2] ?? "").toUpperCase();
737
- const ko = locale === "ko";
738
- const long = form === "long";
739
- switch (unit) {
740
- case "S":
741
- return ko ? `${n2}\uCD08` : `${n2}s`;
742
- case "D":
743
- return ko ? n2 === 1 && !long ? "\uC77C" : `${n2}\uC77C` : `${n2}D`;
744
- case "W":
745
- return ko ? n2 === 1 && !long ? "\uC8FC" : `${n2}\uC8FC` : `${n2}W`;
746
- case "M":
747
- if (n2 % 12 === 0) return ko ? `${n2 / 12}\uB144` : `${n2 / 12}Y`;
748
- return ko ? n2 === 1 && !long ? "\uC6D4" : `${n2}\uAC1C\uC6D4` : `${n2}M`;
749
- default:
750
- if (n2 >= 60 && n2 % 60 === 0) return ko ? `${n2 / 60}\uC2DC\uAC04` : `${n2 / 60}h`;
751
- return ko ? `${n2}\uBD84` : `${n2}m`;
752
- }
753
- }
754
733
 
755
734
  // ../../node_modules/.pnpm/preact@11.2.0/node_modules/preact/jsx-runtime/dist/jsxRuntime.mjs
756
735
  var f3 = /* @__PURE__ */ Symbol.for("pv");
@@ -4404,7 +4383,7 @@ function createPane(shell, config) {
4404
4383
  setSearchOpen: (open, target = "symbol") => store.set(open ? { searchOpen: true, searchTarget: target } : { searchOpen: false }),
4405
4384
  screenshot: () => {
4406
4385
  const s3 = store.get();
4407
- chart.takeScreenshot().toBlob((blob) => {
4386
+ chart.takeScreenshot({ legend: true }).toBlob((blob) => {
4408
4387
  if (!blob) return;
4409
4388
  const a4 = document.createElement("a");
4410
4389
  a4.href = URL.createObjectURL(blob);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funnest/charts-ui",
3
- "version": "0.6.23",
3
+ "version": "0.6.24",
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.6.23"
45
+ "@funnest/charts": "0.6.24"
46
46
  },
47
47
  "devDependencies": {
48
48
  "preact": "^11.2.0"