@funnest/charts-ui 0.11.39 → 0.11.41
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 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +48 -25
- package/dist/multi-chart.d.ts +3 -1
- package/dist/trading-chart.d.ts +15 -0
- package/package.json +2 -2
package/dist/i18n.d.ts
CHANGED
|
@@ -101,6 +101,7 @@ export declare const STRINGS: {
|
|
|
101
101
|
settingsPreviewHint: string;
|
|
102
102
|
settingZoomAnimation: string;
|
|
103
103
|
settingScrollInertia: string;
|
|
104
|
+
settingTouchCrosshairSnap: string;
|
|
104
105
|
settingAxisAnimation: string;
|
|
105
106
|
settingPriceAnimation: string;
|
|
106
107
|
settingDrawOnLoad: string;
|
|
@@ -108,6 +109,7 @@ export declare const STRINGS: {
|
|
|
108
109
|
settingReplayWatermark: string;
|
|
109
110
|
hintZoomAnimation: string;
|
|
110
111
|
hintScrollInertia: string;
|
|
112
|
+
hintTouchCrosshairSnap: string;
|
|
111
113
|
hintAxisAnimation: string;
|
|
112
114
|
hintPriceAnimation: string;
|
|
113
115
|
hintDrawOnLoad: string;
|
|
@@ -476,6 +478,7 @@ export declare const STRINGS: {
|
|
|
476
478
|
settingsPreviewHint: string;
|
|
477
479
|
settingZoomAnimation: string;
|
|
478
480
|
settingScrollInertia: string;
|
|
481
|
+
settingTouchCrosshairSnap: string;
|
|
479
482
|
settingAxisAnimation: string;
|
|
480
483
|
settingPriceAnimation: string;
|
|
481
484
|
settingDrawOnLoad: string;
|
|
@@ -483,6 +486,7 @@ export declare const STRINGS: {
|
|
|
483
486
|
settingReplayWatermark: string;
|
|
484
487
|
hintZoomAnimation: string;
|
|
485
488
|
hintScrollInertia: string;
|
|
489
|
+
hintTouchCrosshairSnap: string;
|
|
486
490
|
hintAxisAnimation: string;
|
|
487
491
|
hintPriceAnimation: string;
|
|
488
492
|
hintDrawOnLoad: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -9,6 +9,6 @@ export type { MultiChart, MultiChartEvents, MultiChartOptions, MultiChartState,
|
|
|
9
9
|
export { LAYOUT_GROUPS, LAYOUTS, MAX_PANES, paneCount } from './layouts.js';
|
|
10
10
|
export type { LayoutId, SplitNode, SplitSizes } from './layouts.js';
|
|
11
11
|
export type { ContextMenuItem, ContextMenuItems, MenuIconName, DrawingAction, DrawingActions, IntervalGroup, PriceAxisActions, SettingsToggle, SettingsToggles, SettingsChoice, SettingsLink, SettingsSection, SettingsSections, LayoutSync, LegendValues, SearchCategory, SearchExchange, ToolsMenuItem, ToolsMenuItems } from './context.js';
|
|
12
|
-
export type { ColorScheme, TradingChart, TradingChartOptions, TradingChartSlots } from './trading-chart.js';
|
|
12
|
+
export type { ColorScheme, TradingChart, TradingChartOptions, TradingChartSlots, WidgetDialog } from './trading-chart.js';
|
|
13
13
|
export type { WidgetPreferences } from './shell.js';
|
|
14
14
|
export { resolutionLabel, STRINGS, stringsOf, type Strings } from './i18n.js';
|
package/dist/index.js
CHANGED
|
@@ -536,6 +536,7 @@ var STRINGS = {
|
|
|
536
536
|
settingsPreviewHint: "\uBC14\uAFBC \uC124\uC815\uC774 \uBC14\uB85C \uBCF4\uC5EC\uC694. \uB04C\uAC70\uB098 \uD720\uB85C \uC6C0\uC9C1\uC5EC \uBCFC \uC218 \uC788\uC5B4\uC694.",
|
|
537
537
|
settingZoomAnimation: "\uD655\uB300\xB7\uCD95\uC18C \uC560\uB2C8\uBA54\uC774\uC158",
|
|
538
538
|
settingScrollInertia: "\uC774\uB3D9 \uAD00\uC131",
|
|
539
|
+
settingTouchCrosshairSnap: "\uD130\uCE58\uD560 \uB54C \uC2ED\uC790\uC120\uC744 \uC885\uAC00\uC5D0 \uBD99\uC774\uAE30",
|
|
539
540
|
settingAxisAnimation: "\uAC00\uACA9 \uCD95 \uC560\uB2C8\uBA54\uC774\uC158",
|
|
540
541
|
settingPriceAnimation: "\uAC00\uACA9 \uBCC0\uB3D9 \uC560\uB2C8\uBA54\uC774\uC158",
|
|
541
542
|
settingDrawOnLoad: "\uB85C\uB4DC \uC2DC \uADF8\uB9AC\uAE30 \uD6A8\uACFC",
|
|
@@ -543,6 +544,7 @@ var STRINGS = {
|
|
|
543
544
|
settingReplayWatermark: "\uB9AC\uD50C\uB808\uC774 \uC6CC\uD130\uB9C8\uD06C",
|
|
544
545
|
hintZoomAnimation: "\uD720\uB85C \uD655\uB300\xB7\uCD95\uC18C\uD560 \uB54C \uD55C \uBC88\uC5D0 \uAC74\uB108\uB6F0\uC9C0 \uC54A\uACE0 \uBD80\uB4DC\uB7FD\uAC8C \uB530\uB77C\uAC00\uC694.",
|
|
545
546
|
hintScrollInertia: "\uB9C8\uC6B0\uC2A4\uB85C \uB04C\uB2E4\uAC00 \uB193\uC73C\uBA74 \uCC28\uD2B8\uAC00 \uC870\uAE08 \uB354 \uBBF8\uB044\uB7EC\uC838\uC694. \uB044\uBA74 \uB193\uC740 \uC790\uB9AC\uC5D0\uC11C \uBC14\uB85C \uBA48\uCDB0\uC694.",
|
|
547
|
+
hintTouchCrosshairSnap: "\uD3F0\uC5D0\uC11C \uCC28\uD2B8\uB97C \uAE38\uAC8C \uB204\uB974\uBA74 \uC2ED\uC790\uC120 \uAC00\uB85C\uC904\uC774 \uADF8 \uBD09\uC758 \uC885\uAC00\uC5D0 \uBD99\uC5B4 \uC190\uAC00\uB77D\uC5D0 \uAC12\uC774 \uAC00\uB824\uC9C0\uC9C0 \uC54A\uC544\uC694. \uB044\uBA74 \uC190\uAC00\uB77D \uB192\uC774\uB97C \uB530\uB77C\uAC00\uC694.",
|
|
546
548
|
hintAxisAnimation: "\uBCF4\uC774\uB294 \uCE94\uB4E4\uC5D0 \uB9DE\uCDB0 \uAC00\uACA9 \uCD95 \uBC94\uC704\uAC00 \uBC14\uB014 \uB54C \uAC74\uB108\uB6F0\uC9C0 \uC54A\uACE0 \uBD80\uB4DC\uB7FD\uAC8C \uC6C0\uC9C1\uC5EC\uC694.",
|
|
547
549
|
hintPriceAnimation: "\uC0C8 \uAC00\uACA9\uC774 \uB4E4\uC5B4\uC624\uBA74 \uB9C8\uC9C0\uB9C9 \uCE94\uB4E4\uACFC \uD604\uC7AC\uAC00 \uC120\uC774 \uC0C8 \uAC00\uACA9\uAE4C\uC9C0 \uBBF8\uB044\uB7EC\uC9C0\uB4EF \uC6C0\uC9C1\uC5EC\uC694.",
|
|
548
550
|
hintDrawOnLoad: "\uC885\uBAA9\uC774\uB098 \uC8FC\uAE30\uB97C \uBC14\uAFD4 \uCC28\uD2B8\uB97C \uBD88\uB7EC\uC62C \uB54C \uCE94\uB4E4\uC774 \uC67C\uCABD\uBD80\uD130 \uCC28\uB840\uB85C \uADF8\uB824\uC838\uC694.",
|
|
@@ -913,6 +915,7 @@ var STRINGS = {
|
|
|
913
915
|
settingsPreviewHint: "Changes show here right away. Drag or scroll to try them.",
|
|
914
916
|
settingZoomAnimation: "Zoom animation",
|
|
915
917
|
settingScrollInertia: "Scroll inertia",
|
|
918
|
+
settingTouchCrosshairSnap: "Snap touch crosshair to close",
|
|
916
919
|
settingAxisAnimation: "Price axis animation",
|
|
917
920
|
settingPriceAnimation: "Price change animation",
|
|
918
921
|
settingDrawOnLoad: "Draw-in on load",
|
|
@@ -920,6 +923,7 @@ var STRINGS = {
|
|
|
920
923
|
settingReplayWatermark: "Replay watermark",
|
|
921
924
|
hintZoomAnimation: "Wheel zoom eases in instead of jumping.",
|
|
922
925
|
hintScrollInertia: "A mouse drag let go glides on a little. Off: the chart stops where you let go.",
|
|
926
|
+
hintTouchCrosshairSnap: "On a phone, a long press puts the crosshair's price line on the bar's close so your finger doesn't hide it. Off: it follows your finger up and down.",
|
|
923
927
|
hintAxisAnimation: "The price axis slides to its new range as the visible candles change, instead of jumping.",
|
|
924
928
|
hintPriceAnimation: "A new price slides the last candle and the last-price line to it.",
|
|
925
929
|
hintDrawOnLoad: "Candles draw in from the left when a symbol or interval loads.",
|
|
@@ -5435,6 +5439,7 @@ var VIEW_ROWS = [{ key: "volume", label: "settingVolume" }];
|
|
|
5435
5439
|
var CONTROL_ROWS = [
|
|
5436
5440
|
{ key: "navigationButtons", label: "settingNavButtons" },
|
|
5437
5441
|
{ key: "scrollInertia", label: "settingScrollInertia", hint: "hintScrollInertia" },
|
|
5442
|
+
{ key: "touchCrosshairSnap", label: "settingTouchCrosshairSnap", hint: "hintTouchCrosshairSnap" },
|
|
5438
5443
|
{ key: "lockView", label: "lockView" }
|
|
5439
5444
|
];
|
|
5440
5445
|
var WATERMARK_ROWS = [
|
|
@@ -7240,31 +7245,43 @@ function AppItem({ ctx, item }) {
|
|
|
7240
7245
|
}
|
|
7241
7246
|
function VolumeItem({ ctx, value, averages, locale }) {
|
|
7242
7247
|
const t3 = stringsOf(ctx.store.get());
|
|
7243
|
-
|
|
7244
|
-
|
|
7245
|
-
|
|
7246
|
-
|
|
7247
|
-
"
|
|
7248
|
-
|
|
7249
|
-
|
|
7250
|
-
|
|
7251
|
-
|
|
7252
|
-
|
|
7253
|
-
|
|
7254
|
-
|
|
7255
|
-
|
|
7256
|
-
"
|
|
7257
|
-
|
|
7258
|
-
|
|
7259
|
-
"
|
|
7260
|
-
"
|
|
7261
|
-
|
|
7262
|
-
|
|
7263
|
-
|
|
7264
|
-
|
|
7265
|
-
|
|
7266
|
-
|
|
7267
|
-
|
|
7248
|
+
const open = () => ctx.store.set({ dialog: { kind: "volumeSettings" } });
|
|
7249
|
+
return /* @__PURE__ */ a3(
|
|
7250
|
+
"div",
|
|
7251
|
+
{
|
|
7252
|
+
class: "fnc-ind fnc-volume-item",
|
|
7253
|
+
role: "button",
|
|
7254
|
+
tabIndex: 0,
|
|
7255
|
+
"aria-label": t3.volumeSettings,
|
|
7256
|
+
onClick: (e3) => !e3.target.closest(".fnc-ind-actions") && open(),
|
|
7257
|
+
onKeyDown: (e3) => e3.key === "Enter" && open(),
|
|
7258
|
+
children: [
|
|
7259
|
+
/* @__PURE__ */ a3("span", { class: "fnc-ind-title", children: t3.settingVolume }),
|
|
7260
|
+
value !== null && /* @__PURE__ */ a3("b", { class: "fnc-flat", children: value }),
|
|
7261
|
+
averages.map((a4) => /* @__PURE__ */ a3("span", { class: "fnc-volume-ma", children: [
|
|
7262
|
+
"MA",
|
|
7263
|
+
a4.period,
|
|
7264
|
+
" ",
|
|
7265
|
+
/* @__PURE__ */ a3("b", { style: { color: a4.color }, children: a4.value === null ? "\u2014" : formatCompact(a4.value, locale) })
|
|
7266
|
+
] })),
|
|
7267
|
+
/* @__PURE__ */ a3("span", { class: "fnc-ind-actions", children: [
|
|
7268
|
+
ctx.chart.canMoveIndicator("volume", -1) && /* @__PURE__ */ a3("button", { class: "fnc-ind-btn", "data-tip": t3.moveIndicatorUp, "aria-label": `${t3.settingVolume} ${t3.moveIndicatorUp}`, onClick: () => ctx.chart.moveIndicator("volume", -1), children: /* @__PURE__ */ a3(ChevronUpIcon, {}) }),
|
|
7269
|
+
ctx.chart.canMoveIndicator("volume", 1) && /* @__PURE__ */ a3("button", { class: "fnc-ind-btn", "data-tip": t3.moveIndicatorDown, "aria-label": `${t3.settingVolume} ${t3.moveIndicatorDown}`, onClick: () => ctx.chart.moveIndicator("volume", 1), children: /* @__PURE__ */ a3(ChevronDownIcon, {}) }),
|
|
7270
|
+
/* @__PURE__ */ a3(
|
|
7271
|
+
"button",
|
|
7272
|
+
{
|
|
7273
|
+
class: "fnc-ind-btn",
|
|
7274
|
+
"data-tip": t3.volumeSettings,
|
|
7275
|
+
"aria-label": t3.volumeSettings,
|
|
7276
|
+
onClick: () => ctx.store.set({ dialog: { kind: "volumeSettings" } }),
|
|
7277
|
+
children: /* @__PURE__ */ a3(GearIcon, {})
|
|
7278
|
+
}
|
|
7279
|
+
),
|
|
7280
|
+
/* @__PURE__ */ a3("button", { class: "fnc-ind-btn", "data-tip": t3.hideVolume, "aria-label": t3.hideVolume, onClick: () => ctx.chart.setVolumeVisible(false), children: /* @__PURE__ */ a3(SmallCloseIcon, {}) })
|
|
7281
|
+
] })
|
|
7282
|
+
]
|
|
7283
|
+
}
|
|
7284
|
+
);
|
|
7268
7285
|
}
|
|
7269
7286
|
function Legend({ ctx }) {
|
|
7270
7287
|
const s3 = useStore(ctx.store);
|
|
@@ -7810,6 +7827,10 @@ function createPane(shell, config) {
|
|
|
7810
7827
|
}
|
|
7811
7828
|
|
|
7812
7829
|
// src/trading-chart.tsx
|
|
7830
|
+
function openWidgetDialog(pane, kind) {
|
|
7831
|
+
if (kind === "volumeSettings" && !pane.chart.settings.volume) pane.chart.setSettings({ volume: true });
|
|
7832
|
+
pane.store.set({ dialog: { kind } });
|
|
7833
|
+
}
|
|
7813
7834
|
var DEFAULT_INTERVAL_GROUPS = [
|
|
7814
7835
|
{ id: "ticks", intervals: ["10T", "100T", "1000T"] },
|
|
7815
7836
|
{ id: "minutes", intervals: ["1", "5", "15", "30"] },
|
|
@@ -7904,6 +7925,7 @@ function createTradingChart(container, options) {
|
|
|
7904
7925
|
return {
|
|
7905
7926
|
chart: pane.chart,
|
|
7906
7927
|
slots: shell.slots,
|
|
7928
|
+
openDialog: (kind) => openWidgetDialog(pane, kind),
|
|
7907
7929
|
setSymbol: (sym, res) => pane.load(sym, res ?? pane.store.get().resolution),
|
|
7908
7930
|
setResolution: (res) => {
|
|
7909
7931
|
const current = pane.store.get().symbol;
|
|
@@ -8352,6 +8374,7 @@ function createMultiChart(container, options) {
|
|
|
8352
8374
|
get sync() {
|
|
8353
8375
|
return { ...store.get().sync };
|
|
8354
8376
|
},
|
|
8377
|
+
openDialog: (kind) => openWidgetDialog(panes[store.get().active], kind),
|
|
8355
8378
|
setLayout,
|
|
8356
8379
|
setSync,
|
|
8357
8380
|
activate,
|
package/dist/multi-chart.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { type Chart, type ChartState, type Locale, type Resolution, type ThemeTo
|
|
|
3
3
|
import type { LayoutSync } from './context.js';
|
|
4
4
|
import { type LayoutId, type SplitSizes } from './layouts.js';
|
|
5
5
|
import { type ColorScheme, type TradingChartSlots, type WidgetPreferences } from './shell.js';
|
|
6
|
-
import { type TradingChartOptions } from './trading-chart.js';
|
|
6
|
+
import { type WidgetDialog, type TradingChartOptions } from './trading-chart.js';
|
|
7
7
|
export interface PaneSpec {
|
|
8
8
|
symbol: string;
|
|
9
9
|
/** Default: the widget's `resolution`, else '1D'. */
|
|
@@ -56,6 +56,8 @@ export interface MultiChart {
|
|
|
56
56
|
readonly activeIndex: number;
|
|
57
57
|
readonly layout: LayoutId;
|
|
58
58
|
readonly sync: LayoutSync;
|
|
59
|
+
/** Opens 차트 설정, 거래량 설정, the indicator picker or 날짜로 이동 on the active pane. */
|
|
60
|
+
openDialog(kind: WidgetDialog): void;
|
|
59
61
|
setLayout(layout: LayoutId): void;
|
|
60
62
|
setSync(patch: Partial<LayoutSync>): void;
|
|
61
63
|
activate(index: number): void;
|
package/dist/trading-chart.d.ts
CHANGED
|
@@ -4,6 +4,19 @@ import type { ContextMenuItems, DrawingActions, IntervalGroup, LegendValues, Pri
|
|
|
4
4
|
import type { Strings } from './i18n.js';
|
|
5
5
|
import { type ColorScheme, type TradingChartSlots } from './shell.js';
|
|
6
6
|
export type { ColorScheme, TradingChartSlots } from './shell.js';
|
|
7
|
+
/** The widget's own windows an app can open (its search, a menu of its own): see `openDialog`. */
|
|
8
|
+
export type WidgetDialog = 'chartSettings' | 'volumeSettings' | 'indicators' | 'goToDate';
|
|
9
|
+
/** Opens one of the widget's windows on a pane; 거래량 설정 shows the volume pane first if it's hidden. */
|
|
10
|
+
export declare function openWidgetDialog(pane: {
|
|
11
|
+
chart: Chart;
|
|
12
|
+
store: {
|
|
13
|
+
set(patch: {
|
|
14
|
+
dialog: {
|
|
15
|
+
kind: WidgetDialog;
|
|
16
|
+
};
|
|
17
|
+
}): void;
|
|
18
|
+
};
|
|
19
|
+
}, kind: WidgetDialog): void;
|
|
7
20
|
/** Interval menu: 틱 | 분 | 시간 | 일. '12M' is shown as 1년. 틱 shows only on a feed that lists tick intervals. */
|
|
8
21
|
export declare const DEFAULT_INTERVAL_GROUPS: readonly IntervalGroup[];
|
|
9
22
|
/** Toolbar chips until the user stars their own. */
|
|
@@ -103,6 +116,8 @@ export interface TradingChart {
|
|
|
103
116
|
/** The underlying engine, for anything the widget doesn't wrap. */
|
|
104
117
|
readonly chart: Chart;
|
|
105
118
|
readonly slots: TradingChartSlots;
|
|
119
|
+
/** Opens 차트 설정, 거래량 설정, the indicator picker or 날짜로 이동 (e.g. from the app's own search). */
|
|
120
|
+
openDialog(kind: WidgetDialog): void;
|
|
106
121
|
setSymbol(symbol: string, resolution?: Resolution): Promise<void>;
|
|
107
122
|
setResolution(resolution: Resolution): Promise<void>;
|
|
108
123
|
setLocale(locale: Locale): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@funnest/charts-ui",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.41",
|
|
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.41"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"preact": "^11.2.0"
|