@funnest/charts-ui 0.11.1 → 0.11.3
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/components/menu-icon.d.ts +5 -0
- package/dist/context.d.ts +8 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +141 -24
- package/package.json +2 -2
package/dist/context.d.ts
CHANGED
|
@@ -59,13 +59,19 @@ export interface UiState {
|
|
|
59
59
|
legendItems: readonly LegendItem[];
|
|
60
60
|
replay: ReplayStatus;
|
|
61
61
|
}
|
|
62
|
+
/**
|
|
63
|
+
* A menu row's glyph (before the label): 'alert' a bell, 'line' a horizontal line, 'date' a
|
|
64
|
+
* calendar, 'eye' display, 'clock' time, and the chart's own rows' (undo, redo, smooth, lock,
|
|
65
|
+
* ratio, reset, settings).
|
|
66
|
+
*/
|
|
67
|
+
export type MenuIconName = 'alert' | 'line' | 'date' | 'eye' | 'clock' | 'undo' | 'redo' | 'smooth' | 'lock' | 'ratio' | 'reset' | 'settings';
|
|
62
68
|
/** A row in the chart's right-click menu, or a divider. */
|
|
63
69
|
export type ContextMenuItem = {
|
|
64
70
|
label: string;
|
|
65
71
|
shortcut?: string;
|
|
66
72
|
disabled?: boolean;
|
|
67
|
-
/**
|
|
68
|
-
icon?:
|
|
73
|
+
/** A glyph before the label (see MenuIconName). Rows without one keep the space, so labels line up. */
|
|
74
|
+
icon?: MenuIconName;
|
|
69
75
|
/** A setting that's on or off: a check mark, and it reads as a checkbox. */
|
|
70
76
|
checked?: boolean;
|
|
71
77
|
onSelect(): void;
|
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, 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, 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
|
@@ -248,6 +248,12 @@ function Q(t3, r3) {
|
|
|
248
248
|
var u3, i3, f4, o4;
|
|
249
249
|
n.__ && n.__(t3, r3), 9 == r3.nodeType && (r3 = r3.documentElement), i3 = (u3 = t3 && 32 & t3.__u) ? null : r3.__k, r3.__k = m($, { children: [t3] }), f4 = [], o4 = [], z(r3, r3.__k, i3 || p, p, r3.namespaceURI, i3 ? null : r3.firstChild ? d.call(r3.childNodes) : null, f4, i3 ? i3.__e : r3.firstChild, u3, o4), E(f4, r3.__k, o4), r3.__k.props.children = null;
|
|
250
250
|
}
|
|
251
|
+
function W(n2) {
|
|
252
|
+
return n2.children;
|
|
253
|
+
}
|
|
254
|
+
function X(n2, t3) {
|
|
255
|
+
return m(W, { __P: t3, children: n2 });
|
|
256
|
+
}
|
|
251
257
|
n = { __e: function(n2, t3, r3, u3) {
|
|
252
258
|
for (var i3, o4, e3; t3 = t3.__; ) if ((i3 = t3.__c) && !(1 & i3.__g)) {
|
|
253
259
|
i3.__g |= 4;
|
|
@@ -2976,7 +2982,9 @@ function SettingsDialog({ ctx }) {
|
|
|
2976
2982
|
hint && /* @__PURE__ */ a3(Info, { text: t3[hint] }),
|
|
2977
2983
|
/* @__PURE__ */ a3("input", { type: "checkbox", role: "switch", class: "fnc-switch", checked: settings[key], onChange: (e3) => set({ [key]: e3.currentTarget.checked }) })
|
|
2978
2984
|
] }));
|
|
2979
|
-
|
|
2985
|
+
const anchor = T2(null);
|
|
2986
|
+
const layer = usePageLayer(anchor, settings);
|
|
2987
|
+
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: [
|
|
2980
2988
|
/* @__PURE__ */ a3("div", { class: "fnc-dialog-head", children: [
|
|
2981
2989
|
/* @__PURE__ */ a3("b", { children: t3.chartSettings }),
|
|
2982
2990
|
/* @__PURE__ */ a3("button", { class: "fnc-btn", "aria-label": t3.close, onClick: close, children: /* @__PURE__ */ a3(CloseIcon, {}) })
|
|
@@ -3058,6 +3066,45 @@ function SettingsDialog({ ctx }) {
|
|
|
3058
3066
|
/* @__PURE__ */ a3("button", { type: "button", class: "fnc-action fnc-action-primary", onClick: close, children: t3.done })
|
|
3059
3067
|
] })
|
|
3060
3068
|
] }) });
|
|
3069
|
+
return /* @__PURE__ */ a3($, { children: [
|
|
3070
|
+
/* @__PURE__ */ a3("span", { ref: anchor, hidden: true }),
|
|
3071
|
+
layer && X(dialog, layer)
|
|
3072
|
+
] });
|
|
3073
|
+
}
|
|
3074
|
+
var LOOK_VARS = ["--fnc-accent", "--fnc-bg", "--fnc-border", "--fnc-danger", "--fnc-down", "--fnc-font", "--fnc-radius", "--fnc-shadow", "--fnc-surface", "--fnc-text", "--fnc-text-2", "--fnc-text-3", "--fnc-tip-bg", "--fnc-tip-text", "--fnc-up"];
|
|
3075
|
+
function usePageLayer(anchor, settings) {
|
|
3076
|
+
const [layer, setLayer] = d2(null);
|
|
3077
|
+
F2(() => {
|
|
3078
|
+
const at = anchor.current;
|
|
3079
|
+
if (!at) return;
|
|
3080
|
+
const doc = at.ownerDocument;
|
|
3081
|
+
const el = doc.createElement("div");
|
|
3082
|
+
el.className = "fnc-root fnc-layer";
|
|
3083
|
+
(doc.fullscreenElement ?? doc.body).appendChild(el);
|
|
3084
|
+
setLayer(el);
|
|
3085
|
+
return () => el.remove();
|
|
3086
|
+
}, []);
|
|
3087
|
+
F2(() => {
|
|
3088
|
+
const at = anchor.current;
|
|
3089
|
+
if (!at || !layer) return;
|
|
3090
|
+
const copy = () => {
|
|
3091
|
+
const widget = at.closest(".fnc-root");
|
|
3092
|
+
const from = at.closest(".fnc-stage") ?? widget ?? at;
|
|
3093
|
+
if (widget?.dataset.colorScheme) layer.dataset.colorScheme = widget.dataset.colorScheme;
|
|
3094
|
+
const dir = widget?.closest("[dir]")?.getAttribute("dir");
|
|
3095
|
+
if (dir) layer.setAttribute("dir", dir);
|
|
3096
|
+
const cs = getComputedStyle(from);
|
|
3097
|
+
for (const name of LOOK_VARS) {
|
|
3098
|
+
const value = cs.getPropertyValue(name).trim();
|
|
3099
|
+
if (value) layer.style.setProperty(name, value);
|
|
3100
|
+
else layer.style.removeProperty(name);
|
|
3101
|
+
}
|
|
3102
|
+
};
|
|
3103
|
+
copy();
|
|
3104
|
+
const frame = requestAnimationFrame(copy);
|
|
3105
|
+
return () => cancelAnimationFrame(frame);
|
|
3106
|
+
}, [layer, settings]);
|
|
3107
|
+
return layer;
|
|
3061
3108
|
}
|
|
3062
3109
|
function Info({ text }) {
|
|
3063
3110
|
return /* @__PURE__ */ a3("span", { class: "fnc-info", tabIndex: 0, role: "img", "aria-label": text, onClick: (e3) => e3.preventDefault(), children: [
|
|
@@ -4188,6 +4235,53 @@ import { formatCompact, formatPrice as formatPrice4 } from "@funnest/charts";
|
|
|
4188
4235
|
|
|
4189
4236
|
// src/components/context-menu.tsx
|
|
4190
4237
|
import { formatPrice as formatPrice2 } from "@funnest/charts";
|
|
4238
|
+
|
|
4239
|
+
// src/components/menu-icon.tsx
|
|
4240
|
+
function Glyph({ children }) {
|
|
4241
|
+
return /* @__PURE__ */ a3("svg", { width: "16", height: "16", viewBox: "0 0 20 20", fill: "none", stroke: "currentColor", "stroke-width": "1.6", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true", children });
|
|
4242
|
+
}
|
|
4243
|
+
var GLYPHS = {
|
|
4244
|
+
undo: /* @__PURE__ */ a3($, { children: [
|
|
4245
|
+
/* @__PURE__ */ a3("path", { d: "M7 5.5 3.5 9 7 12.5" }),
|
|
4246
|
+
/* @__PURE__ */ a3("path", { d: "M3.5 9h8a4.5 4.5 0 0 1 0 9H9" })
|
|
4247
|
+
] }),
|
|
4248
|
+
redo: /* @__PURE__ */ a3($, { children: [
|
|
4249
|
+
/* @__PURE__ */ a3("path", { d: "M13 5.5 16.5 9 13 12.5" }),
|
|
4250
|
+
/* @__PURE__ */ a3("path", { d: "M16.5 9h-8a4.5 4.5 0 0 0 0 9H11" })
|
|
4251
|
+
] }),
|
|
4252
|
+
// Motion lines behind a dot: something gliding.
|
|
4253
|
+
smooth: /* @__PURE__ */ a3($, { children: [
|
|
4254
|
+
/* @__PURE__ */ a3("path", { d: "M3 7h6M2 10h5M3 13h6" }),
|
|
4255
|
+
/* @__PURE__ */ a3("circle", { cx: "13.5", cy: "10", r: "3.5" })
|
|
4256
|
+
] }),
|
|
4257
|
+
lock: /* @__PURE__ */ a3($, { children: [
|
|
4258
|
+
/* @__PURE__ */ a3("rect", { x: "4.5", y: "9", width: "11", height: "8", rx: "1.8" }),
|
|
4259
|
+
/* @__PURE__ */ a3("path", { d: "M7 9V6.5a3 3 0 0 1 6 0V9" })
|
|
4260
|
+
] }),
|
|
4261
|
+
// A diagonal across a box: price to bar kept in step.
|
|
4262
|
+
ratio: /* @__PURE__ */ a3($, { children: [
|
|
4263
|
+
/* @__PURE__ */ a3("rect", { x: "3.5", y: "3.5", width: "13", height: "13", rx: "2" }),
|
|
4264
|
+
/* @__PURE__ */ a3("path", { d: "M6.5 13.5l7-7M10.5 6.5h3v3" })
|
|
4265
|
+
] }),
|
|
4266
|
+
settings: /* @__PURE__ */ a3($, { children: [
|
|
4267
|
+
/* @__PURE__ */ a3("circle", { cx: "10", cy: "10", r: "2.6" }),
|
|
4268
|
+
/* @__PURE__ */ a3("path", { d: "M10 2.8v2.1M10 15.1v2.1M2.8 10h2.1M15.1 10h2.1M4.9 4.9l1.5 1.5M13.6 13.6l1.5 1.5M4.9 15.1l1.5-1.5M13.6 6.4l1.5-1.5" })
|
|
4269
|
+
] }),
|
|
4270
|
+
eye: /* @__PURE__ */ a3($, { children: [
|
|
4271
|
+
/* @__PURE__ */ a3("path", { d: "M2 10s3-5.5 8-5.5S18 10 18 10s-3 5.5-8 5.5S2 10 2 10z" }),
|
|
4272
|
+
/* @__PURE__ */ a3("circle", { cx: "10", cy: "10", r: "2.3" })
|
|
4273
|
+
] }),
|
|
4274
|
+
clock: /* @__PURE__ */ a3($, { children: [
|
|
4275
|
+
/* @__PURE__ */ a3("circle", { cx: "10", cy: "10", r: "7" }),
|
|
4276
|
+
/* @__PURE__ */ a3("path", { d: "M10 6v4l2.5 1.5" })
|
|
4277
|
+
] })
|
|
4278
|
+
};
|
|
4279
|
+
function MenuIcon({ name }) {
|
|
4280
|
+
const shared = name === "alert" ? /* @__PURE__ */ a3(BellIcon, {}) : name === "line" ? /* @__PURE__ */ a3(HorizontalLineIcon, {}) : name === "date" ? /* @__PURE__ */ a3(CalendarIcon, {}) : name === "reset" ? /* @__PURE__ */ a3(ResetIcon, {}) : null;
|
|
4281
|
+
return /* @__PURE__ */ a3("span", { class: "fnc-menu-icon", children: shared ?? /* @__PURE__ */ a3(Glyph, { children: GLYPHS[name] }) });
|
|
4282
|
+
}
|
|
4283
|
+
|
|
4284
|
+
// src/components/context-menu.tsx
|
|
4191
4285
|
var MARGIN2 = 8;
|
|
4192
4286
|
function ContextMenu({ ctx }) {
|
|
4193
4287
|
const s3 = useStore(ctx.store);
|
|
@@ -4229,8 +4323,8 @@ function ContextMenu({ ctx }) {
|
|
|
4229
4323
|
const precision = s3.symbol?.pricePrecision ?? 2;
|
|
4230
4324
|
const extra = ctx.contextMenuItems?.({ ...target, chart: ctx.chart }) ?? [];
|
|
4231
4325
|
const items = [
|
|
4232
|
-
{ label: t3.undo, shortcut: `${mod}Z`, disabled: !s3.canUndo, onSelect: () => ctx.chart.undo() },
|
|
4233
|
-
{ label: t3.redo, shortcut: `${mod}${mac ? "\u21E7" : "Shift+"}Z`, disabled: !s3.canRedo, onSelect: () => ctx.chart.redo() },
|
|
4326
|
+
{ label: t3.undo, icon: "undo", shortcut: `${mod}Z`, disabled: !s3.canUndo, onSelect: () => ctx.chart.undo() },
|
|
4327
|
+
{ label: t3.redo, icon: "redo", shortcut: `${mod}${mac ? "\u21E7" : "Shift+"}Z`, disabled: !s3.canRedo, onSelect: () => ctx.chart.redo() },
|
|
4234
4328
|
"separator",
|
|
4235
4329
|
...extra.length ? [...extra, "separator"] : []
|
|
4236
4330
|
];
|
|
@@ -4238,19 +4332,20 @@ function ContextMenu({ ctx }) {
|
|
|
4238
4332
|
const time = target.time ?? ctx.chart.bars[ctx.chart.bars.length - 1]?.time ?? Date.now();
|
|
4239
4333
|
items.push({
|
|
4240
4334
|
label: t3.horizontalAt.replace("{price}", formatPrice2(price, precision)),
|
|
4335
|
+
icon: "line",
|
|
4241
4336
|
onSelect: () => ctx.chart.addDrawing({ type: "horizontal", points: [{ time, price }] })
|
|
4242
4337
|
});
|
|
4243
4338
|
}
|
|
4244
4339
|
const { zoomAnimation, scrollInertia, lockView, lockRatio } = ctx.chart.settings;
|
|
4245
4340
|
const smooth = zoomAnimation && scrollInertia;
|
|
4246
4341
|
items.push(
|
|
4247
|
-
{ label: t3.goToDateMore, onSelect: () => ctx.store.set({ dialog: { kind: "goToDate" } }) },
|
|
4248
|
-
{ label: t3.smoothScroll, checked: smooth, onSelect: () => ctx.chart.setSettings({ smoothScroll: !smooth }) },
|
|
4249
|
-
{ label: t3.lockView, checked: lockView, onSelect: () => ctx.chart.setSettings({ lockView: !lockView }) },
|
|
4250
|
-
{ label: t3.lockRatio, checked: lockRatio, onSelect: () => ctx.chart.setSettings({ lockRatio: !lockRatio }) },
|
|
4342
|
+
{ label: t3.goToDateMore, icon: "date", onSelect: () => ctx.store.set({ dialog: { kind: "goToDate" } }) },
|
|
4343
|
+
{ label: t3.smoothScroll, icon: "smooth", checked: smooth, onSelect: () => ctx.chart.setSettings({ smoothScroll: !smooth }) },
|
|
4344
|
+
{ label: t3.lockView, icon: "lock", checked: lockView, onSelect: () => ctx.chart.setSettings({ lockView: !lockView }) },
|
|
4345
|
+
{ label: t3.lockRatio, icon: "ratio", checked: lockRatio, onSelect: () => ctx.chart.setSettings({ lockRatio: !lockRatio }) },
|
|
4251
4346
|
"separator",
|
|
4252
|
-
{ label: t3.resetChart, disabled: lockView, onSelect: () => ctx.chart.resetView() },
|
|
4253
|
-
{ label: t3.chartSettingsMore, onSelect: () => ctx.store.set({ dialog: { kind: "chartSettings" } }) }
|
|
4347
|
+
{ label: t3.resetChart, icon: "reset", disabled: lockView, onSelect: () => ctx.chart.resetView() },
|
|
4348
|
+
{ label: t3.chartSettingsMore, icon: "settings", onSelect: () => ctx.store.set({ dialog: { kind: "chartSettings" } }) }
|
|
4254
4349
|
);
|
|
4255
4350
|
return /* @__PURE__ */ a3("div", { class: "fnc-menu fnc-ctx-menu", role: "menu", ref, onContextMenu: (e3) => e3.preventDefault(), children: items.map(
|
|
4256
4351
|
(item) => item === "separator" ? /* @__PURE__ */ a3("div", { class: "fnc-ctx-sep", role: "separator" }) : /* @__PURE__ */ a3(
|
|
@@ -4265,10 +4360,10 @@ function ContextMenu({ ctx }) {
|
|
|
4265
4360
|
item.onSelect();
|
|
4266
4361
|
},
|
|
4267
4362
|
children: [
|
|
4268
|
-
item.icon
|
|
4269
|
-
/* @__PURE__ */ a3("span", { children: item.label }),
|
|
4363
|
+
item.icon ? /* @__PURE__ */ a3(MenuIcon, { name: item.icon }) : /* @__PURE__ */ a3("span", { class: "fnc-menu-icon" }),
|
|
4364
|
+
/* @__PURE__ */ a3("span", { class: "fnc-menu-label", children: item.label }),
|
|
4270
4365
|
item.shortcut && /* @__PURE__ */ a3("kbd", { children: item.shortcut }),
|
|
4271
|
-
item.checked && /* @__PURE__ */ a3(CheckIcon, {})
|
|
4366
|
+
item.checked && /* @__PURE__ */ a3("span", { class: "fnc-menu-check-mark", children: /* @__PURE__ */ a3(CheckIcon, {}) })
|
|
4272
4367
|
]
|
|
4273
4368
|
}
|
|
4274
4369
|
)
|
|
@@ -4345,7 +4440,7 @@ function PriceAxisPlus({ ctx }) {
|
|
|
4345
4440
|
item.onSelect();
|
|
4346
4441
|
},
|
|
4347
4442
|
children: [
|
|
4348
|
-
item.icon
|
|
4443
|
+
item.icon && /* @__PURE__ */ a3(MenuIcon, { name: item.icon }),
|
|
4349
4444
|
/* @__PURE__ */ a3("span", { children: item.label })
|
|
4350
4445
|
]
|
|
4351
4446
|
}
|
|
@@ -4502,18 +4597,31 @@ function Legend({ ctx }) {
|
|
|
4502
4597
|
const ref = T2(null);
|
|
4503
4598
|
const tracking = T2(false);
|
|
4504
4599
|
tracking.current = ctx.legendValues === "crosshair" && !!hover;
|
|
4600
|
+
const hovering = T2(false);
|
|
4601
|
+
hovering.current = !!hover;
|
|
4602
|
+
const measure = T2(() => {
|
|
4603
|
+
});
|
|
4604
|
+
const kept = T2({ key: "", px: 0 });
|
|
4505
4605
|
A2(() => {
|
|
4506
4606
|
const el = ref.current;
|
|
4507
4607
|
if (!el) return;
|
|
4508
4608
|
const update = () => {
|
|
4509
|
-
if (tracking.current) return;
|
|
4609
|
+
if (tracking.current || hovering.current) return;
|
|
4510
4610
|
const floating = ctx.legendValues === "crosshair" ? el.querySelector(".fnc-legend-values") : null;
|
|
4511
|
-
|
|
4611
|
+
const px = el.offsetTop + el.offsetHeight - (floating ? floating.offsetHeight + 2 : 0) + 4;
|
|
4612
|
+
const { symbol, resolution } = ctx.store.get();
|
|
4613
|
+
const key = `${symbol?.symbol ?? ""}|${resolution}|${el.offsetWidth}|${el.getElementsByTagName("*").length}`;
|
|
4614
|
+
kept.current = key === kept.current.key ? { key, px: Math.max(kept.current.px, px) } : { key, px };
|
|
4615
|
+
ctx.chart.setTopInset(kept.current.px);
|
|
4512
4616
|
};
|
|
4617
|
+
measure.current = update;
|
|
4513
4618
|
const ro = new ResizeObserver(update);
|
|
4514
4619
|
ro.observe(el);
|
|
4515
4620
|
return () => ro.disconnect();
|
|
4516
4621
|
}, [ctx.chart]);
|
|
4622
|
+
A2(() => {
|
|
4623
|
+
if (!hover) measure.current();
|
|
4624
|
+
}, [!!hover]);
|
|
4517
4625
|
if (!s3.symbol) return /* @__PURE__ */ a3("div", { class: "fnc-legend", ref });
|
|
4518
4626
|
const bars = ctx.chart.bars;
|
|
4519
4627
|
const bar = hover?.bar ?? bars[bars.length - 1];
|
|
@@ -5556,6 +5664,8 @@ var CSS = (
|
|
|
5556
5664
|
|
|
5557
5665
|
/* A setting in a menu (\uBD80\uB4DC\uB7EC\uC6B4 \uC2A4\uD06C\uB864\xB7\uD655\uB300): the check at the end. */
|
|
5558
5666
|
.fnc-menu-check svg { margin-left: auto; color: var(--fnc-accent); }
|
|
5667
|
+
/* The row's own glyph stays neutral; only the check mark is in the accent. */
|
|
5668
|
+
.fnc-menu-check .fnc-menu-icon svg { margin-left: 0; color: var(--fnc-text-2); }
|
|
5559
5669
|
|
|
5560
5670
|
/* \uB0A0\uC9DC\uB85C \uC774\uB3D9: a date typed or picked on a month calendar. */
|
|
5561
5671
|
.fnc-goto-dialog { width: min(320px, calc(100% - 32px)); }
|
|
@@ -5588,8 +5698,10 @@ var CSS = (
|
|
|
5588
5698
|
.fnc-selbar-action.is-text { width: auto; padding: 0 8px; font-size: 12px; font-weight: 600; }
|
|
5589
5699
|
.fnc-selbar-action.is-on { color: var(--fnc-accent); }
|
|
5590
5700
|
.fnc-selbar-action.is-on svg path:first-child { fill: currentColor; }
|
|
5591
|
-
.fnc-axis-plus-menu .fnc-menu-item
|
|
5592
|
-
|
|
5701
|
+
.fnc-axis-plus-menu .fnc-menu-item { color: var(--fnc-text); font-weight: 600; }
|
|
5702
|
+
/* A menu row's glyph: one 18px column, so every label starts at the same x. */
|
|
5703
|
+
.fnc-menu-icon { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 18px; height: 18px; color: var(--fnc-text-2); }
|
|
5704
|
+
.fnc-menu-icon svg { width: 16px; height: 16px; }
|
|
5593
5705
|
|
|
5594
5706
|
/* \uAE30\uAC04 \xB7 \uB0A0\uC9DC\uB85C \uC774\uB3D9: a row under the chart. */
|
|
5595
5707
|
.fnc-rangebar-host { flex: none; border-top: 1px solid var(--fnc-border); }
|
|
@@ -5973,7 +6085,9 @@ var CSS = (
|
|
|
5973
6085
|
|
|
5974
6086
|
/* \u2500\u2500 Right-click menu \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
5975
6087
|
.fnc-ctx-menu { top: 0; left: 0; z-index: 40; min-width: 220px; pointer-events: auto; }
|
|
5976
|
-
.fnc-ctx-menu .fnc-menu-item {
|
|
6088
|
+
.fnc-ctx-menu .fnc-menu-item { gap: 10px; color: var(--fnc-text); }
|
|
6089
|
+
.fnc-ctx-menu .fnc-menu-label { flex: 1; min-width: 0; margin-right: 14px; }
|
|
6090
|
+
.fnc-menu-check-mark { display: inline-flex; flex: none; color: var(--fnc-accent); }
|
|
5977
6091
|
.fnc-ctx-menu .fnc-menu-item:disabled { color: var(--fnc-text-2); }
|
|
5978
6092
|
.fnc-ctx-menu kbd { font: inherit; font-size: 12px; color: var(--fnc-text-2); }
|
|
5979
6093
|
.fnc-ctx-sep { height: 1px; margin: 4px 6px; background: var(--fnc-border); }
|
|
@@ -6103,10 +6217,14 @@ var CSS = (
|
|
|
6103
6217
|
.fnc-seg-sm button { min-width: 36px; height: 26px; padding: 0 6px; font-size: 12px; }
|
|
6104
6218
|
|
|
6105
6219
|
/* \u2500\u2500 \uCC28\uD2B8 \uC124\uC815: tabs and settings on the left, a live demo chart on the right (on top on a phone) \u2500\u2500 */
|
|
6220
|
+
/* The settings dialog's own layer over the page (above a fullscreen chart too). */
|
|
6221
|
+
.fnc-root.fnc-layer { position: fixed; inset: 0; z-index: 2147483001; width: auto; height: auto; background: transparent; overflow: visible; }
|
|
6106
6222
|
.fnc-dialog.fnc-settings-dialog { width: min(940px, calc(100% - 32px)); height: min(660px, 100%); max-height: none; }
|
|
6107
6223
|
.fnc-settings-body { display: flex; flex: 1; min-height: 0; }
|
|
6108
6224
|
.fnc-settings-side { display: flex; flex-direction: column; flex: 1 1 0; min-width: 0; border-right: 1px solid var(--fnc-border); }
|
|
6109
|
-
.fnc-settings-side .fnc-settings-tabs { flex: none; padding: 12px
|
|
6225
|
+
.fnc-settings-side .fnc-settings-tabs { flex: none; justify-content: center; justify-content: safe center; gap: 4px; padding: 12px 16px 0; }
|
|
6226
|
+
/* The tabs as wide as their words (the pill hugs the label), the row of them in the middle. */
|
|
6227
|
+
.fnc-settings-tabs .fnc-tab { display: inline-flex; align-items: center; justify-content: center; flex: none; padding: 0 14px; }
|
|
6110
6228
|
.fnc-root .fnc-dialog form.fnc-settings-form { flex: 1; min-height: 0; overflow-y: auto; }
|
|
6111
6229
|
.fnc-settings-preview { display: flex; flex-direction: column; gap: 8px; flex: 1.2 1 0; min-width: 0; padding: 20px; }
|
|
6112
6230
|
.fnc-settings-preview-chart { position: relative; flex: 1; min-height: 160px; border: 1px solid var(--fnc-border); border-radius: 12px; overflow: hidden; }
|
|
@@ -6115,8 +6233,8 @@ var CSS = (
|
|
|
6115
6233
|
.fnc-backdrop:has(> .fnc-settings-dialog) { padding: 0; align-items: stretch; }
|
|
6116
6234
|
.fnc-dialog.fnc-settings-dialog { width: 100%; height: 100%; border-radius: 0; }
|
|
6117
6235
|
.fnc-settings-dialog .fnc-dialog-head { height: 44px; }
|
|
6118
|
-
.fnc-settings-side .fnc-settings-tabs {
|
|
6119
|
-
.fnc-settings-tabs .fnc-tab {
|
|
6236
|
+
.fnc-settings-side .fnc-settings-tabs { padding: 6px 12px 0; }
|
|
6237
|
+
.fnc-settings-tabs .fnc-tab { padding: 0 12px; }
|
|
6120
6238
|
.fnc-settings-preview { padding: 8px 12px; }
|
|
6121
6239
|
.fnc-settings-preview .fnc-section, .fnc-settings-preview .fnc-toggle-hint { display: none; }
|
|
6122
6240
|
.fnc-settings-preview-chart .fnc-ranges { display: none; }
|
|
@@ -6182,9 +6300,8 @@ var CSS = (
|
|
|
6182
6300
|
.fnc-settings-preview-chart { flex: none; height: clamp(170px, 34dvh, 280px); min-height: 0; }
|
|
6183
6301
|
.fnc-settings-preview-chart .fnc-ranges { display: none; }
|
|
6184
6302
|
.fnc-settings-side { flex: 1; min-height: 0; border-right: 0; }
|
|
6185
|
-
.fnc-settings-side .fnc-settings-tabs {
|
|
6186
|
-
|
|
6187
|
-
.fnc-settings-tabs .fnc-tab { flex: 1 1 auto; padding: 0 6px; font-size: 12.5px; }
|
|
6303
|
+
.fnc-settings-side .fnc-settings-tabs { padding: 8px 12px 0; }
|
|
6304
|
+
.fnc-settings-tabs .fnc-tab { padding: 0 12px; }
|
|
6188
6305
|
.fnc-form-actions.fnc-settings-actions { padding: 8px 16px; }
|
|
6189
6306
|
}
|
|
6190
6307
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@funnest/charts-ui",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.3",
|
|
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.3"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"preact": "^11.2.0"
|