acttrader-charts 1.3.0-beta.17 → 1.3.0-beta.18
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.cjs +13 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +13 -1
- package/dist/index.js.map +1 -1
- package/dist/webview/chart.html +16 -16
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -336,6 +336,7 @@ function resolveCssVarsInTheme(theme, container) {
|
|
|
336
336
|
drawing: resolveDrawingThemeVars(theme.drawing, resolve)
|
|
337
337
|
};
|
|
338
338
|
container.removeChild(tmp);
|
|
339
|
+
tmp.remove();
|
|
339
340
|
return result;
|
|
340
341
|
}
|
|
341
342
|
function resolveDrawingThemeVars(drawing, resolve) {
|
|
@@ -4426,7 +4427,8 @@ function withAlpha4(color, alpha) {
|
|
|
4426
4427
|
}
|
|
4427
4428
|
const rgb = /^rgba?\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)/i.exec(c);
|
|
4428
4429
|
if (rgb) return `rgba(${rgb[1]}, ${rgb[2]}, ${rgb[3]}, ${alpha})`;
|
|
4429
|
-
|
|
4430
|
+
const pct = Math.round(Math.min(1, Math.max(0, alpha)) * 100);
|
|
4431
|
+
return `color-mix(in srgb, ${c} ${pct}%, transparent)`;
|
|
4430
4432
|
}
|
|
4431
4433
|
|
|
4432
4434
|
// src/ui/keyboardAware.ts
|
|
@@ -5426,6 +5428,14 @@ var TopBar = class {
|
|
|
5426
5428
|
};
|
|
5427
5429
|
|
|
5428
5430
|
// src/ui/AdvancedToolbar.ts
|
|
5431
|
+
function resolveToolbarTheme(theme) {
|
|
5432
|
+
if (typeof document === "undefined" || !document.body) return theme;
|
|
5433
|
+
try {
|
|
5434
|
+
return resolveCssVarsInTheme(theme, document.body);
|
|
5435
|
+
} catch {
|
|
5436
|
+
return theme;
|
|
5437
|
+
}
|
|
5438
|
+
}
|
|
5429
5439
|
var TF_PILLS = ["1m", "5m", "15m", "1h", "4h", "1D", "1W"];
|
|
5430
5440
|
var TF_PILLS_COMPACT = ["1m", "5m", "15m", "1h", "4h", "1D"];
|
|
5431
5441
|
var TF_MORE = ["30m", "2h", "8h", "1W", "1M"];
|
|
@@ -5584,6 +5594,7 @@ var AdvancedToolbar = class {
|
|
|
5584
5594
|
this.priceSourceOptions = [];
|
|
5585
5595
|
this.currentPriceSource = "bid";
|
|
5586
5596
|
this.openFlyout = null;
|
|
5597
|
+
theme = resolveToolbarTheme(theme);
|
|
5587
5598
|
this.theme = theme;
|
|
5588
5599
|
this.overflowMenu = overflowMenu;
|
|
5589
5600
|
this.showSnapshotItem = showSnapshotBtn;
|
|
@@ -5923,6 +5934,7 @@ var AdvancedToolbar = class {
|
|
|
5923
5934
|
this.volHasData = hasVol;
|
|
5924
5935
|
}
|
|
5925
5936
|
setTheme(theme) {
|
|
5937
|
+
theme = resolveToolbarTheme(theme);
|
|
5926
5938
|
this.theme = theme;
|
|
5927
5939
|
this.applyBarStyles(theme);
|
|
5928
5940
|
this.applyFlyoutStyles(theme);
|