@funnest/charts-ui 0.11.23 → 0.11.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/context.d.ts +28 -0
- package/dist/i18n.d.ts +18 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +93 -13
- package/dist/pane.d.ts +2 -1
- package/dist/trading-chart.d.ts +3 -1
- package/package.json +2 -2
package/dist/context.d.ts
CHANGED
|
@@ -118,6 +118,33 @@ export interface SettingsToggle {
|
|
|
118
118
|
}
|
|
119
119
|
/** The app's switches for 차트 설정, asked when it opens (for the pane's chart); none: no section. */
|
|
120
120
|
export type SettingsToggles = (chart: Chart) => SettingsToggle[];
|
|
121
|
+
/** A pick-one row in an app's section of 차트 설정 (a select on the right). */
|
|
122
|
+
export interface SettingsChoice {
|
|
123
|
+
label: string;
|
|
124
|
+
hint?: string;
|
|
125
|
+
value: string;
|
|
126
|
+
options: {
|
|
127
|
+
value: string;
|
|
128
|
+
label: string;
|
|
129
|
+
}[];
|
|
130
|
+
onChange(value: string): void;
|
|
131
|
+
}
|
|
132
|
+
/** A row that opens something of the app's (its own dialog), shown as a button. */
|
|
133
|
+
export interface SettingsLink {
|
|
134
|
+
label: string;
|
|
135
|
+
hint?: string;
|
|
136
|
+
/** The button's text. */
|
|
137
|
+
action: string;
|
|
138
|
+
onSelect(): void;
|
|
139
|
+
}
|
|
140
|
+
/** One of the app's sections in a tab of 차트 설정: a title and its rows. */
|
|
141
|
+
export interface SettingsSection {
|
|
142
|
+
tab: 'scale' | 'view';
|
|
143
|
+
title: string;
|
|
144
|
+
rows: (SettingsToggle | SettingsChoice | SettingsLink)[];
|
|
145
|
+
}
|
|
146
|
+
/** The app's own sections for 차트 설정, asked when it opens (for the pane's chart). */
|
|
147
|
+
export type SettingsSections = (chart: Chart) => SettingsSection[];
|
|
121
148
|
/** The app's rows for the 도구 menu, asked each time it opens (for the pane's chart). */
|
|
122
149
|
export type ToolsMenuItems = (chart: Chart) => ToolsMenuItem[];
|
|
123
150
|
/**
|
|
@@ -170,6 +197,7 @@ export interface WidgetContext {
|
|
|
170
197
|
drawingActions: DrawingActions | undefined;
|
|
171
198
|
toolsMenuItems: ToolsMenuItems | undefined;
|
|
172
199
|
settingsToggles: SettingsToggles | undefined;
|
|
200
|
+
settingsSections: SettingsSections | undefined;
|
|
173
201
|
legendValues: LegendValues;
|
|
174
202
|
/** The app's own indicator browser for the 지표 button (instead of the built-in picker). */
|
|
175
203
|
onIndicatorsClick: ((chart: Chart) => void) | undefined;
|
package/dist/i18n.d.ts
CHANGED
|
@@ -113,6 +113,15 @@ export declare const STRINGS: {
|
|
|
113
113
|
hintDrawOnLoad: string;
|
|
114
114
|
hintSymbolWatermark: string;
|
|
115
115
|
settingsSplitLayout: string;
|
|
116
|
+
settingsScope: string;
|
|
117
|
+
scopeOne: string;
|
|
118
|
+
scopeAll: string;
|
|
119
|
+
hintScopeOne: string;
|
|
120
|
+
hintScopeAll: string;
|
|
121
|
+
settingsAxis: string;
|
|
122
|
+
settingsPriceMarks: string;
|
|
123
|
+
settingsShown: string;
|
|
124
|
+
settingsControl: string;
|
|
116
125
|
settingsSplit: string;
|
|
117
126
|
splitSyncCrosshair: string;
|
|
118
127
|
hintSplitSyncCrosshair: string;
|
|
@@ -462,6 +471,15 @@ export declare const STRINGS: {
|
|
|
462
471
|
hintDrawOnLoad: string;
|
|
463
472
|
hintSymbolWatermark: string;
|
|
464
473
|
settingsSplitLayout: string;
|
|
474
|
+
settingsScope: string;
|
|
475
|
+
scopeOne: string;
|
|
476
|
+
scopeAll: string;
|
|
477
|
+
hintScopeOne: string;
|
|
478
|
+
hintScopeAll: string;
|
|
479
|
+
settingsAxis: string;
|
|
480
|
+
settingsPriceMarks: string;
|
|
481
|
+
settingsShown: string;
|
|
482
|
+
settingsControl: string;
|
|
465
483
|
settingsSplit: string;
|
|
466
484
|
splitSyncCrosshair: string;
|
|
467
485
|
hintSplitSyncCrosshair: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -8,6 +8,6 @@ export { createMultiChart } from './multi-chart.js';
|
|
|
8
8
|
export type { MultiChart, MultiChartEvents, MultiChartOptions, MultiChartState, PaneSpec } from './multi-chart.js';
|
|
9
9
|
export { LAYOUT_GROUPS, LAYOUTS, MAX_PANES, paneCount } from './layouts.js';
|
|
10
10
|
export type { LayoutId, SplitNode, SplitSizes } from './layouts.js';
|
|
11
|
-
export type { ContextMenuItem, ContextMenuItems, MenuIconName, DrawingAction, DrawingActions, IntervalGroup, PriceAxisActions, SettingsToggle, SettingsToggles, LayoutSync, LegendValues, SearchCategory, SearchExchange, ToolsMenuItem, ToolsMenuItems } from './context.js';
|
|
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
12
|
export type { ColorScheme, TradingChart, TradingChartOptions, TradingChartSlots } from './trading-chart.js';
|
|
13
13
|
export { resolutionLabel, STRINGS, stringsOf, type Strings } from './i18n.js';
|
package/dist/index.js
CHANGED
|
@@ -548,6 +548,15 @@ var STRINGS = {
|
|
|
548
548
|
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.",
|
|
549
549
|
hintSymbolWatermark: "\uAC00\uACA9 \uC601\uC5ED \uAC00\uC6B4\uB370\uC5D0 \uC885\uBAA9 \uC774\uB984\uACFC \uC8FC\uAE30\uB97C \uD750\uB9AC\uAC8C \uBCF4\uC5EC\uC918\uC694.",
|
|
550
550
|
settingsSplitLayout: "\uB808\uC774\uC544\uC6C3",
|
|
551
|
+
settingsScope: "\uC801\uC6A9 \uBC94\uC704",
|
|
552
|
+
scopeOne: "\uC774 \uCC28\uD2B8\uB9CC",
|
|
553
|
+
scopeAll: "\uBAA8\uB4E0 \uCC28\uD2B8",
|
|
554
|
+
hintScopeOne: "\uBC14\uAFBC \uC124\uC815\uC774 \uC120\uD0DD\uB41C \uCC28\uD2B8 \uD558\uB098\uC5D0\uB9CC \uC801\uC6A9\uB3FC\uC694.",
|
|
555
|
+
hintScopeAll: "\uBC14\uAFBC \uC124\uC815\uC774 \uD654\uBA74\uC758 \uBAA8\uB4E0 \uCC28\uD2B8\uC5D0 \uC801\uC6A9\uB3FC\uC694.",
|
|
556
|
+
settingsAxis: "\uB208\uAE08",
|
|
557
|
+
settingsPriceMarks: "\uAC00\uACA9 \uD45C\uC2DC",
|
|
558
|
+
settingsShown: "\uBCF4\uC774\uB294 \uAC83",
|
|
559
|
+
settingsControl: "\uC870\uC791",
|
|
551
560
|
settingsSplit: "\uAC19\uC774 \uBC14\uAFB8\uAE30",
|
|
552
561
|
splitSyncCrosshair: "\uC2ED\uC790\uC120 \uAC19\uC774 \uBCF4\uAE30",
|
|
553
562
|
hintSplitSyncCrosshair: "\uD55C \uCC28\uD2B8\uC5D0 \uB9C8\uC6B0\uC2A4\uB97C \uC62C\uB9AC\uBA74 \uB098\uBA38\uC9C0 \uCC28\uD2B8\uC5D0\uB3C4 \uAC19\uC740 \uC2DC\uAC01\uC5D0 \uC138\uB85C\uC120\uC774 \uBCF4\uC5EC\uC694.",
|
|
@@ -899,6 +908,15 @@ var STRINGS = {
|
|
|
899
908
|
hintDrawOnLoad: "Candles draw in from the left when a symbol or interval loads.",
|
|
900
909
|
hintSymbolWatermark: "The symbol and interval, faint in the middle of the price pane.",
|
|
901
910
|
settingsSplitLayout: "Layout",
|
|
911
|
+
settingsScope: "Apply to",
|
|
912
|
+
scopeOne: "This chart",
|
|
913
|
+
scopeAll: "All charts",
|
|
914
|
+
hintScopeOne: "Changes apply to the selected chart only.",
|
|
915
|
+
hintScopeAll: "Changes apply to every chart on screen.",
|
|
916
|
+
settingsAxis: "Scale",
|
|
917
|
+
settingsPriceMarks: "Price marks",
|
|
918
|
+
settingsShown: "Shown",
|
|
919
|
+
settingsControl: "Controls",
|
|
902
920
|
settingsSplit: "Change together",
|
|
903
921
|
splitSyncCrosshair: "Crosshair on every chart",
|
|
904
922
|
hintSplitSyncCrosshair: "Hovering one chart shows a line at the same time on the others.",
|
|
@@ -4292,6 +4310,12 @@ var CSS = (
|
|
|
4292
4310
|
.fnc-settings-layouts { padding: 2px 0 6px; }
|
|
4293
4311
|
.fnc-settings-layouts .fnc-layout-opt { width: 40px; height: 32px; }
|
|
4294
4312
|
.fnc-section-info { display: flex; align-items: center; gap: 4px; }
|
|
4313
|
+
/* \uC801\uC6A9 \uBC94\uC704 (split view), in the dialog's head between its title and \xD7. */
|
|
4314
|
+
.fnc-settings-dialog .fnc-dialog-head { gap: 12px; }
|
|
4315
|
+
.fnc-settings-dialog .fnc-dialog-head > b { flex: 1; }
|
|
4316
|
+
.fnc-scope-seg button { min-width: 0; height: 28px; padding: 0 10px; font-size: 12.5px; }
|
|
4317
|
+
.fnc-app-select { max-width: 55%; }
|
|
4318
|
+
.fnc-app-link { flex: none; height: 30px; padding: 0 12px; font-size: 12.5px; }
|
|
4295
4319
|
/* \uC2DC\uC810 \uC5F0\uB3D9's i: a button that opens what each choice does right under the title. */
|
|
4296
4320
|
.fnc-info-btn { border: 0; padding: 0; cursor: pointer; }
|
|
4297
4321
|
.fnc-info-btn[aria-expanded='true'] { color: var(--fnc-text); }
|
|
@@ -4442,6 +4466,8 @@ var CSS = (
|
|
|
4442
4466
|
.fnc-settings-form .fnc-section:first-child { margin-top: 0; }
|
|
4443
4467
|
.fnc-settings-form .fnc-toggle-row { min-height: 40px; }
|
|
4444
4468
|
.fnc-settings-form .fnc-themes, .fnc-settings-form .fnc-settings-seg { margin-bottom: 4px; }
|
|
4469
|
+
/* A choice bar right under its title: as far from it as a switch row's text is (a row has its own air). */
|
|
4470
|
+
.fnc-settings-form .fnc-section + .fnc-settings-seg, .fnc-settings-form .fnc-help + .fnc-settings-seg { margin-top: 6px; }
|
|
4445
4471
|
/* Color rows: the name, then (when changed) back-to-theme, then the square. */
|
|
4446
4472
|
.fnc-color-row { gap: 8px; min-height: 40px; }
|
|
4447
4473
|
.fnc-color-reset { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; color: var(--fnc-text-2); }
|
|
@@ -5019,16 +5045,17 @@ var GRID = [
|
|
|
5019
5045
|
{ key: "gridHorizontal", label: "settingGridH" },
|
|
5020
5046
|
{ key: "gridVertical", label: "settingGridV" }
|
|
5021
5047
|
];
|
|
5022
|
-
var
|
|
5048
|
+
var AXIS_ROWS = [{ key: "lockRatio", label: "lockRatio" }];
|
|
5049
|
+
var PRICE_MARK_ROWS = [
|
|
5023
5050
|
{ key: "lastPriceLine", label: "settingLastPrice" },
|
|
5024
5051
|
{ key: "countdown", label: "settingCountdown" },
|
|
5025
5052
|
{ key: "extendedPriceLine", label: "settingExtendedPrice" },
|
|
5026
|
-
{ key: "highLowMarkers", label: "settingHighLow" }
|
|
5027
|
-
{ key: "lockRatio", label: "lockRatio" }
|
|
5053
|
+
{ key: "highLowMarkers", label: "settingHighLow" }
|
|
5028
5054
|
];
|
|
5029
|
-
var VIEW_ROWS = [
|
|
5030
|
-
|
|
5055
|
+
var VIEW_ROWS = [{ key: "volume", label: "settingVolume" }];
|
|
5056
|
+
var CONTROL_ROWS = [
|
|
5031
5057
|
{ key: "navigationButtons", label: "settingNavButtons" },
|
|
5058
|
+
{ key: "scrollInertia", label: "settingScrollInertia", hint: "hintScrollInertia" },
|
|
5032
5059
|
{ key: "lockView", label: "lockView" }
|
|
5033
5060
|
];
|
|
5034
5061
|
var WATERMARK_ROWS = [
|
|
@@ -5048,7 +5075,6 @@ var TIME_LINK_CHOICES = [
|
|
|
5048
5075
|
];
|
|
5049
5076
|
var MOTION_ROWS = [
|
|
5050
5077
|
{ key: "zoomAnimation", label: "settingZoomAnimation", hint: "hintZoomAnimation" },
|
|
5051
|
-
{ key: "scrollInertia", label: "settingScrollInertia", hint: "hintScrollInertia" },
|
|
5052
5078
|
{ key: "priceAxisAnimation", label: "settingAxisAnimation", hint: "hintAxisAnimation" },
|
|
5053
5079
|
{ key: "priceAnimation", label: "settingPriceAnimation", hint: "hintPriceAnimation" },
|
|
5054
5080
|
{ key: "drawOnLoad", label: "settingDrawOnLoad", hint: "hintDrawOnLoad" }
|
|
@@ -5087,7 +5113,14 @@ function SettingsDialog({ ctx }) {
|
|
|
5087
5113
|
const appToggles = ctx.settingsToggles?.(ctx.chart) ?? [];
|
|
5088
5114
|
A2(() => ctx.chart.on("settingsChange", setSettings), [ctx.chart]);
|
|
5089
5115
|
const close = () => ctx.store.set({ dialog: null });
|
|
5090
|
-
const
|
|
5116
|
+
const split = useSplitCount(ctx) > 1;
|
|
5117
|
+
const [scope, setScope] = d2(() => readScope() === "one" ? "one" : "all");
|
|
5118
|
+
const pickScope = (next) => {
|
|
5119
|
+
setScope(next);
|
|
5120
|
+
writeScope(next);
|
|
5121
|
+
};
|
|
5122
|
+
const set = (patch) => split && scope === "all" && ctx.multi ? ctx.multi.applySettings(patch) : ctx.chart.setSettings(patch);
|
|
5123
|
+
const appSections = ctx.settingsSections?.(ctx.chart) ?? [];
|
|
5091
5124
|
const themeColor = (name) => toHex(getComputedStyle(ctx.root).getPropertyValue(name).trim());
|
|
5092
5125
|
const currentTheme = matchChartTheme(settings);
|
|
5093
5126
|
const palette = ctx.chart.paletteInUse;
|
|
@@ -5107,6 +5140,24 @@ function SettingsDialog({ ctx }) {
|
|
|
5107
5140
|
];
|
|
5108
5141
|
const shown = tabs.some(([k2]) => k2 === tab) ? tab : "look";
|
|
5109
5142
|
const setRow = (key, on) => ctx.multi && WATERMARK_ROWS.some((r3) => r3.key === key) ? ctx.multi.applySettings({ [key]: on }) : set({ [key]: on });
|
|
5143
|
+
const appRows = (tab2) => appSections.filter((sec) => sec.tab === tab2 && sec.rows.length).map((sec) => /* @__PURE__ */ a3($, { children: [
|
|
5144
|
+
/* @__PURE__ */ a3("div", { class: "fnc-section", children: sec.title }),
|
|
5145
|
+
sec.rows.map(
|
|
5146
|
+
(row2) => "checked" in row2 ? /* @__PURE__ */ a3("label", { class: "fnc-row fnc-toggle-row", children: [
|
|
5147
|
+
/* @__PURE__ */ a3("span", { class: "fnc-toggle-label", children: row2.label }),
|
|
5148
|
+
row2.hint && /* @__PURE__ */ a3(Info, { text: row2.hint }),
|
|
5149
|
+
/* @__PURE__ */ a3("input", { type: "checkbox", role: "switch", class: "fnc-switch", checked: row2.checked, onChange: (e3) => (row2.onChange(e3.currentTarget.checked), bump((n2) => n2 + 1)) })
|
|
5150
|
+
] }) : "options" in row2 ? /* @__PURE__ */ a3("label", { class: "fnc-row fnc-toggle-row", children: [
|
|
5151
|
+
/* @__PURE__ */ a3("span", { class: "fnc-toggle-label", children: row2.label }),
|
|
5152
|
+
row2.hint && /* @__PURE__ */ a3(Info, { text: row2.hint }),
|
|
5153
|
+
/* @__PURE__ */ a3("select", { class: "fnc-settings-select fnc-app-select", value: row2.value, onChange: (e3) => (row2.onChange(e3.currentTarget.value), bump((n2) => n2 + 1)), children: row2.options.map((o4) => /* @__PURE__ */ a3("option", { value: o4.value, children: o4.label })) })
|
|
5154
|
+
] }) : /* @__PURE__ */ a3("div", { class: "fnc-row fnc-toggle-row", children: [
|
|
5155
|
+
/* @__PURE__ */ a3("span", { class: "fnc-toggle-label", children: row2.label }),
|
|
5156
|
+
row2.hint && /* @__PURE__ */ a3(Info, { text: row2.hint }),
|
|
5157
|
+
/* @__PURE__ */ a3("button", { type: "button", class: "fnc-action fnc-app-link", onClick: () => (close(), row2.onSelect()), children: row2.action })
|
|
5158
|
+
] })
|
|
5159
|
+
)
|
|
5160
|
+
] }));
|
|
5110
5161
|
const toggles = (rows) => rows.map(({ key, label, hint }) => /* @__PURE__ */ a3("label", { class: "fnc-row fnc-toggle-row", children: [
|
|
5111
5162
|
/* @__PURE__ */ a3("span", { class: "fnc-toggle-label", children: t3[label] }),
|
|
5112
5163
|
hint && /* @__PURE__ */ a3(Info, { text: t3[hint] }),
|
|
@@ -5117,6 +5168,7 @@ function SettingsDialog({ ctx }) {
|
|
|
5117
5168
|
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: [
|
|
5118
5169
|
/* @__PURE__ */ a3("div", { class: "fnc-dialog-head", children: [
|
|
5119
5170
|
/* @__PURE__ */ a3("b", { children: t3.chartSettings }),
|
|
5171
|
+
split && /* @__PURE__ */ a3("div", { class: "fnc-seg fnc-scope-seg", role: "radiogroup", "aria-label": t3.settingsScope, children: ["one", "all"].map((k2) => /* @__PURE__ */ a3("button", { type: "button", role: "radio", "aria-checked": scope === k2, "data-tip": k2 === "one" ? t3.hintScopeOne : t3.hintScopeAll, onClick: () => pickScope(k2), children: k2 === "one" ? t3.scopeOne : t3.scopeAll })) }),
|
|
5120
5172
|
/* @__PURE__ */ a3("button", { class: "fnc-btn", "aria-label": t3.close, onClick: close, children: /* @__PURE__ */ a3(CloseIcon, {}) })
|
|
5121
5173
|
] }),
|
|
5122
5174
|
/* @__PURE__ */ a3("div", { class: "fnc-settings-body", children: [
|
|
@@ -5182,16 +5234,21 @@ function SettingsDialog({ ctx }) {
|
|
|
5182
5234
|
toggles(GRID)
|
|
5183
5235
|
] }),
|
|
5184
5236
|
shown === "scale" && /* @__PURE__ */ a3($, { children: [
|
|
5185
|
-
/* @__PURE__ */ a3("div", { class: "fnc-section", children: t3.
|
|
5237
|
+
/* @__PURE__ */ a3("div", { class: "fnc-section", children: t3.settingsAxis }),
|
|
5186
5238
|
/* @__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] })) }),
|
|
5187
|
-
|
|
5188
|
-
|
|
5239
|
+
toggles(AXIS_ROWS),
|
|
5240
|
+
/* @__PURE__ */ a3("div", { class: "fnc-section", children: t3.settingsPriceMarks }),
|
|
5241
|
+
toggles(PRICE_MARK_ROWS),
|
|
5242
|
+
appRows("scale")
|
|
5189
5243
|
] }),
|
|
5190
5244
|
shown === "view" && /* @__PURE__ */ a3($, { children: [
|
|
5191
|
-
/* @__PURE__ */ a3("div", { class: "fnc-section", children: t3.
|
|
5245
|
+
/* @__PURE__ */ a3("div", { class: "fnc-section", children: t3.settingsShown }),
|
|
5192
5246
|
toggles(VIEW_ROWS),
|
|
5247
|
+
/* @__PURE__ */ a3("div", { class: "fnc-section", children: t3.settingsControl }),
|
|
5248
|
+
toggles(CONTROL_ROWS),
|
|
5193
5249
|
/* @__PURE__ */ a3("div", { class: "fnc-section", children: t3.settingsWatermark }),
|
|
5194
|
-
toggles(WATERMARK_ROWS)
|
|
5250
|
+
toggles(WATERMARK_ROWS),
|
|
5251
|
+
appRows("view")
|
|
5195
5252
|
] }),
|
|
5196
5253
|
shown === "split" && ctx.multi && /* @__PURE__ */ a3(SplitSettings, { multi: ctx.multi, timeLink: settings.timeLink, t: t3 }),
|
|
5197
5254
|
shown === "motion" && /* @__PURE__ */ a3($, { children: [
|
|
@@ -5222,7 +5279,7 @@ function SettingsDialog({ ctx }) {
|
|
|
5222
5279
|
/* @__PURE__ */ a3(Preview, { ctx, settings, t: t3 })
|
|
5223
5280
|
] }),
|
|
5224
5281
|
/* @__PURE__ */ a3("div", { class: "fnc-form-actions fnc-settings-actions", children: [
|
|
5225
|
-
/* @__PURE__ */ a3("button", { type: "button", class: "fnc-action fnc-action-danger", onClick: () =>
|
|
5282
|
+
/* @__PURE__ */ a3("button", { type: "button", class: "fnc-action fnc-action-danger", onClick: () => set(DEFAULT_CHART_SETTINGS), children: t3.resetDefaults }),
|
|
5226
5283
|
/* @__PURE__ */ a3("button", { type: "button", class: "fnc-action fnc-action-primary", onClick: close, children: t3.done })
|
|
5227
5284
|
] })
|
|
5228
5285
|
] }) });
|
|
@@ -5423,6 +5480,24 @@ function SplitSettings({ multi, timeLink, t: t3 }) {
|
|
|
5423
5480
|
/* @__PURE__ */ a3("div", { class: "fnc-seg fnc-settings-seg fnc-timelink-seg", role: "radiogroup", "aria-label": t3.settingsTimeLink, children: TIME_LINK_CHOICES.map(({ link, label, hint }) => /* @__PURE__ */ a3("button", { type: "button", role: "radio", "aria-checked": timeLink === link, "data-tip": t3[hint], onClick: () => multi.applySettings({ timeLink: link }), children: t3[label] })) })
|
|
5424
5481
|
] });
|
|
5425
5482
|
}
|
|
5483
|
+
var SCOPE_KEY = "fnc-settings-scope";
|
|
5484
|
+
var readScope = () => {
|
|
5485
|
+
try {
|
|
5486
|
+
return localStorage.getItem(SCOPE_KEY);
|
|
5487
|
+
} catch {
|
|
5488
|
+
return null;
|
|
5489
|
+
}
|
|
5490
|
+
};
|
|
5491
|
+
var writeScope = (v3) => {
|
|
5492
|
+
try {
|
|
5493
|
+
localStorage.setItem(SCOPE_KEY, v3);
|
|
5494
|
+
} catch {
|
|
5495
|
+
}
|
|
5496
|
+
};
|
|
5497
|
+
function useSplitCount(ctx) {
|
|
5498
|
+
const m3 = ctx.multi ? useStore(ctx.multi.store) : null;
|
|
5499
|
+
return m3 ? paneCount(LAYOUTS[m3.layout]) : 0;
|
|
5500
|
+
}
|
|
5426
5501
|
|
|
5427
5502
|
// src/components/indicator-dialogs.tsx
|
|
5428
5503
|
function Dialog({ title, onClose, children, wide }) {
|
|
@@ -7150,6 +7225,7 @@ function createPane(shell, config) {
|
|
|
7150
7225
|
drawingActions: config.drawingActions,
|
|
7151
7226
|
toolsMenuItems: config.toolsMenuItems,
|
|
7152
7227
|
settingsToggles: config.settingsToggles,
|
|
7228
|
+
settingsSections: config.settingsSections,
|
|
7153
7229
|
legendValues: config.legendValues ?? "always",
|
|
7154
7230
|
onIndicatorsClick: config.onIndicatorsClick,
|
|
7155
7231
|
slots: shell.slots,
|
|
@@ -7243,6 +7319,7 @@ function createTradingChart(container, options) {
|
|
|
7243
7319
|
priceAxisActions,
|
|
7244
7320
|
drawingActions,
|
|
7245
7321
|
settingsToggles,
|
|
7322
|
+
settingsSections,
|
|
7246
7323
|
toolsMenuItems,
|
|
7247
7324
|
legendValues,
|
|
7248
7325
|
onIndicatorsClick,
|
|
@@ -7280,6 +7357,7 @@ function createTradingChart(container, options) {
|
|
|
7280
7357
|
priceAxisActions,
|
|
7281
7358
|
drawingActions,
|
|
7282
7359
|
settingsToggles,
|
|
7360
|
+
settingsSections,
|
|
7283
7361
|
toolsMenuItems,
|
|
7284
7362
|
legendValues,
|
|
7285
7363
|
onIndicatorsClick,
|
|
@@ -7362,6 +7440,7 @@ function createMultiChart(container, options) {
|
|
|
7362
7440
|
priceAxisActions,
|
|
7363
7441
|
drawingActions,
|
|
7364
7442
|
settingsToggles,
|
|
7443
|
+
settingsSections,
|
|
7365
7444
|
toolsMenuItems,
|
|
7366
7445
|
legendValues,
|
|
7367
7446
|
onIndicatorsClick,
|
|
@@ -7444,6 +7523,7 @@ function createMultiChart(container, options) {
|
|
|
7444
7523
|
priceAxisActions,
|
|
7445
7524
|
drawingActions,
|
|
7446
7525
|
settingsToggles,
|
|
7526
|
+
settingsSections,
|
|
7447
7527
|
toolsMenuItems,
|
|
7448
7528
|
legendValues,
|
|
7449
7529
|
onIndicatorsClick,
|
package/dist/pane.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @jsxImportSource preact */
|
|
2
2
|
import { type Chart, type ChartOptions, type ChartType, type Datafeed, type Resolution } from '@funnest/charts';
|
|
3
|
-
import type { ContextMenuItems, DrawingActions, IntervalGroup, LegendValues, MultiControls, PriceAxisActions, SearchCategory, SearchExchange, SettingsToggles, ToolsMenuItems, UiState, WidgetContext } from './context.js';
|
|
3
|
+
import type { ContextMenuItems, DrawingActions, IntervalGroup, LegendValues, MultiControls, PriceAxisActions, SearchCategory, SearchExchange, SettingsSections, SettingsToggles, ToolsMenuItems, UiState, WidgetContext } from './context.js';
|
|
4
4
|
import { type Shell } from './shell.js';
|
|
5
5
|
import type { Strings } from './i18n.js';
|
|
6
6
|
import { Store } from './store.js';
|
|
@@ -24,6 +24,7 @@ export interface PaneConfig {
|
|
|
24
24
|
drawingActions?: DrawingActions | undefined;
|
|
25
25
|
toolsMenuItems?: ToolsMenuItems | undefined;
|
|
26
26
|
settingsToggles?: SettingsToggles | undefined;
|
|
27
|
+
settingsSections?: SettingsSections | undefined;
|
|
27
28
|
legendValues?: LegendValues | undefined;
|
|
28
29
|
onIndicatorsClick?: ((chart: Chart) => void) | undefined;
|
|
29
30
|
multi?: MultiControls | undefined;
|
package/dist/trading-chart.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @jsxImportSource preact */
|
|
2
2
|
import { type Chart, type ChartOptions, type ChartType, type Datafeed, type DirectionPreset, type Locale, type ChartState, type Resolution, type ThemeTokens } from '@funnest/charts';
|
|
3
|
-
import type { ContextMenuItems, DrawingActions, IntervalGroup, LegendValues, PriceAxisActions, SearchCategory, SearchExchange, SettingsToggles, ToolsMenuItems } from './context.js';
|
|
3
|
+
import type { ContextMenuItems, DrawingActions, IntervalGroup, LegendValues, PriceAxisActions, SearchCategory, SearchExchange, SettingsSections, SettingsToggles, ToolsMenuItems } from './context.js';
|
|
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';
|
|
@@ -66,6 +66,8 @@ export interface TradingChartOptions extends Omit<ChartOptions, 'datafeed'> {
|
|
|
66
66
|
drawingActions?: DrawingActions;
|
|
67
67
|
/** The app's own switches in 차트 설정 (e.g. extended hours for US stocks), asked when it opens. */
|
|
68
68
|
settingsToggles?: SettingsToggles;
|
|
69
|
+
/** The app's own sections in 차트 설정 (가격 축 / 표시 tabs): switches, choices, links to its dialogs. */
|
|
70
|
+
settingsSections?: SettingsSections;
|
|
69
71
|
/**
|
|
70
72
|
* Extra rows for the 도구 (tools) menu, above 차트 설정 — e.g. the app's own display settings.
|
|
71
73
|
* Called each time the menu opens, with the pane's chart.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@funnest/charts-ui",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.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.11.
|
|
45
|
+
"@funnest/charts": "0.11.24"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"preact": "^11.2.0"
|