@funnest/charts-ui 0.11.39 → 0.11.40
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/index.d.ts +1 -1
- package/dist/index.js +43 -25
- package/dist/multi-chart.d.ts +3 -1
- package/dist/trading-chart.d.ts +15 -0
- package/package.json +2 -2
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
|
@@ -7240,31 +7240,43 @@ function AppItem({ ctx, item }) {
|
|
|
7240
7240
|
}
|
|
7241
7241
|
function VolumeItem({ ctx, value, averages, locale }) {
|
|
7242
7242
|
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
|
-
|
|
7243
|
+
const open = () => ctx.store.set({ dialog: { kind: "volumeSettings" } });
|
|
7244
|
+
return /* @__PURE__ */ a3(
|
|
7245
|
+
"div",
|
|
7246
|
+
{
|
|
7247
|
+
class: "fnc-ind fnc-volume-item",
|
|
7248
|
+
role: "button",
|
|
7249
|
+
tabIndex: 0,
|
|
7250
|
+
"aria-label": t3.volumeSettings,
|
|
7251
|
+
onClick: (e3) => !e3.target.closest(".fnc-ind-actions") && open(),
|
|
7252
|
+
onKeyDown: (e3) => e3.key === "Enter" && open(),
|
|
7253
|
+
children: [
|
|
7254
|
+
/* @__PURE__ */ a3("span", { class: "fnc-ind-title", children: t3.settingVolume }),
|
|
7255
|
+
value !== null && /* @__PURE__ */ a3("b", { class: "fnc-flat", children: value }),
|
|
7256
|
+
averages.map((a4) => /* @__PURE__ */ a3("span", { class: "fnc-volume-ma", children: [
|
|
7257
|
+
"MA",
|
|
7258
|
+
a4.period,
|
|
7259
|
+
" ",
|
|
7260
|
+
/* @__PURE__ */ a3("b", { style: { color: a4.color }, children: a4.value === null ? "\u2014" : formatCompact(a4.value, locale) })
|
|
7261
|
+
] })),
|
|
7262
|
+
/* @__PURE__ */ a3("span", { class: "fnc-ind-actions", children: [
|
|
7263
|
+
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, {}) }),
|
|
7264
|
+
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, {}) }),
|
|
7265
|
+
/* @__PURE__ */ a3(
|
|
7266
|
+
"button",
|
|
7267
|
+
{
|
|
7268
|
+
class: "fnc-ind-btn",
|
|
7269
|
+
"data-tip": t3.volumeSettings,
|
|
7270
|
+
"aria-label": t3.volumeSettings,
|
|
7271
|
+
onClick: () => ctx.store.set({ dialog: { kind: "volumeSettings" } }),
|
|
7272
|
+
children: /* @__PURE__ */ a3(GearIcon, {})
|
|
7273
|
+
}
|
|
7274
|
+
),
|
|
7275
|
+
/* @__PURE__ */ a3("button", { class: "fnc-ind-btn", "data-tip": t3.hideVolume, "aria-label": t3.hideVolume, onClick: () => ctx.chart.setVolumeVisible(false), children: /* @__PURE__ */ a3(SmallCloseIcon, {}) })
|
|
7276
|
+
] })
|
|
7277
|
+
]
|
|
7278
|
+
}
|
|
7279
|
+
);
|
|
7268
7280
|
}
|
|
7269
7281
|
function Legend({ ctx }) {
|
|
7270
7282
|
const s3 = useStore(ctx.store);
|
|
@@ -7810,6 +7822,10 @@ function createPane(shell, config) {
|
|
|
7810
7822
|
}
|
|
7811
7823
|
|
|
7812
7824
|
// src/trading-chart.tsx
|
|
7825
|
+
function openWidgetDialog(pane, kind) {
|
|
7826
|
+
if (kind === "volumeSettings" && !pane.chart.settings.volume) pane.chart.setSettings({ volume: true });
|
|
7827
|
+
pane.store.set({ dialog: { kind } });
|
|
7828
|
+
}
|
|
7813
7829
|
var DEFAULT_INTERVAL_GROUPS = [
|
|
7814
7830
|
{ id: "ticks", intervals: ["10T", "100T", "1000T"] },
|
|
7815
7831
|
{ id: "minutes", intervals: ["1", "5", "15", "30"] },
|
|
@@ -7904,6 +7920,7 @@ function createTradingChart(container, options) {
|
|
|
7904
7920
|
return {
|
|
7905
7921
|
chart: pane.chart,
|
|
7906
7922
|
slots: shell.slots,
|
|
7923
|
+
openDialog: (kind) => openWidgetDialog(pane, kind),
|
|
7907
7924
|
setSymbol: (sym, res) => pane.load(sym, res ?? pane.store.get().resolution),
|
|
7908
7925
|
setResolution: (res) => {
|
|
7909
7926
|
const current = pane.store.get().symbol;
|
|
@@ -8352,6 +8369,7 @@ function createMultiChart(container, options) {
|
|
|
8352
8369
|
get sync() {
|
|
8353
8370
|
return { ...store.get().sync };
|
|
8354
8371
|
},
|
|
8372
|
+
openDialog: (kind) => openWidgetDialog(panes[store.get().active], kind),
|
|
8355
8373
|
setLayout,
|
|
8356
8374
|
setSync,
|
|
8357
8375
|
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.40",
|
|
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.40"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"preact": "^11.2.0"
|