@funnest/charts-ui 0.11.14 → 0.11.15

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 CHANGED
@@ -1,4 +1,4 @@
1
- import type { Chart, ChartContextMenu, ChartLayout, ChartType, CompareInfo, CursorMode, Datafeed, Drawing, DrawingType, IndicatorConfig, LegendItem, Locale, ReplayStatus, Resolution, SymbolInfo } from '@funnest/charts';
1
+ import type { Chart, ChartContextMenu, ChartLayout, ChartSettings, ChartType, CompareInfo, CursorMode, Datafeed, Drawing, DrawingType, IndicatorConfig, LegendItem, Locale, ReplayStatus, Resolution, SymbolInfo } from '@funnest/charts';
2
2
  import type { LayoutId } from './layouts.js';
3
3
  import type { WidgetStorage } from './storage.js';
4
4
  import type { Strings } from './i18n.js';
@@ -223,4 +223,6 @@ export interface MultiControls {
223
223
  setSync(patch: Partial<LayoutSync>): void;
224
224
  activate(index: number): void;
225
225
  toggleMaximize(index?: number): void;
226
+ /** Applies a settings patch to every pane (widget-wide looks such as the watermarks). */
227
+ applySettings(patch: Partial<ChartSettings>): void;
226
228
  }
package/dist/index.js CHANGED
@@ -3109,10 +3109,11 @@ function SettingsDialog({ ctx }) {
3109
3109
  ...appToggles.length > 0 ? [["symbol", t3.settingsSymbol]] : []
3110
3110
  ];
3111
3111
  const shown = tabs.some(([k2]) => k2 === tab) ? tab : "look";
3112
+ const setRow = (key, on) => ctx.multi && WATERMARK_ROWS.some((r3) => r3.key === key) ? ctx.multi.applySettings({ [key]: on }) : set({ [key]: on });
3112
3113
  const toggles = (rows) => rows.map(({ key, label, hint }) => /* @__PURE__ */ a3("label", { class: "fnc-row fnc-toggle-row", children: [
3113
3114
  /* @__PURE__ */ a3("span", { class: "fnc-toggle-label", children: t3[label] }),
3114
3115
  hint && /* @__PURE__ */ a3(Info, { text: t3[hint] }),
3115
- /* @__PURE__ */ a3("input", { type: "checkbox", role: "switch", class: "fnc-switch", checked: settings[key], onChange: (e3) => set({ [key]: e3.currentTarget.checked }) })
3116
+ /* @__PURE__ */ a3("input", { type: "checkbox", role: "switch", class: "fnc-switch", checked: settings[key], onChange: (e3) => setRow(key, e3.currentTarget.checked) })
3116
3117
  ] }));
3117
3118
  const anchor = T2(null);
3118
3119
  const layer = usePageLayer(anchor, settings);
@@ -7304,7 +7305,10 @@ function createMultiChart(container, options) {
7304
7305
  setLayout: (layout) => setLayout(layout),
7305
7306
  setSync: (patch) => setSync(patch),
7306
7307
  activate: (index) => activate(index),
7307
- toggleMaximize: (index) => toggleMaximize(index)
7308
+ toggleMaximize: (index) => toggleMaximize(index),
7309
+ applySettings: (patch) => {
7310
+ for (const p3 of panes) p3.chart.setSettings(patch);
7311
+ }
7308
7312
  };
7309
7313
  function makePane(index, spec) {
7310
7314
  const pane = createPane(shell, {
@@ -7382,7 +7386,11 @@ function createMultiChart(container, options) {
7382
7386
  symbol: src?.chart.symbolInfo?.symbol ?? paneSpecs[0].symbol,
7383
7387
  resolution: src?.chart.currentResolution ?? src?.store.get().resolution ?? resolution
7384
7388
  };
7385
- makePane(i3, spec);
7389
+ const pane = makePane(i3, spec);
7390
+ if (src) {
7391
+ const { symbolWatermark, replayWatermark } = src.chart.settings;
7392
+ pane.chart.setSettings({ symbolWatermark, replayWatermark });
7393
+ }
7386
7394
  }
7387
7395
  }
7388
7396
  function buildNode(node, path, layout) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funnest/charts-ui",
3
- "version": "0.11.14",
3
+ "version": "0.11.15",
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.14"
45
+ "@funnest/charts": "0.11.15"
46
46
  },
47
47
  "devDependencies": {
48
48
  "preact": "^11.2.0"