website: safari fixes

This commit is contained in:
nym21
2026-02-05 11:43:40 +01:00
parent 897aab032e
commit bbba8f4373
6 changed files with 27 additions and 25 deletions
+1 -1
View File
@@ -4938,7 +4938,7 @@ function createRatioPattern2(client, acc) {
* @extends BrkClientBase
*/
class BrkClient extends BrkClientBase {
VERSION = "v0.1.4";
VERSION = "v0.1.5";
INDEXES = /** @type {const} */ ([
"dateindex",
+1 -1
View File
@@ -34,5 +34,5 @@
"url": "git+https://github.com/bitcoinresearchkit/brk.git"
},
"type": "module",
"version": "0.1.4"
"version": "0.1.5"
}
+1 -1
View File
@@ -4368,7 +4368,7 @@ class MetricsTree:
class BrkClient(BrkClientBase):
"""Main BRK client with metrics tree and API methods."""
VERSION = "v0.1.4"
VERSION = "v0.1.5"
INDEXES = [
"dateindex",
+1 -1
View File
@@ -1,6 +1,6 @@
[project]
name = "brk-client"
version = "0.1.4"
version = "0.1.5"
description = "Python client for the Bitcoin Research Kit"
readme = "README.md"
requires-python = ">=3.9"
+23 -20
View File
@@ -196,7 +196,6 @@ export function createChart({ parent, id: chartId, brk, fitContent }) {
timeScale: {
borderVisible: false,
enableConflation: true,
// conflationThresholdFactor: 8,
...(fitContent
? {
minBarSpacing: 0.001,
@@ -680,27 +679,31 @@ export function createChart({ parent, id: chartId, brk, fitContent }) {
/** @type {number} */ (data.at(-1)?.time) ?? -Infinity;
// Restore saved range or use defaults
const savedRange = getRange();
if (savedRange) {
ichart.timeScale().setVisibleLogicalRange({
from: savedRange.from,
to: savedRange.to,
});
} else if (fitContent) {
ichart.timeScale().fitContent();
} else if (
(minBarSpacingByIndex[idx] ?? 0) >=
/** @type {number} */ (minBarSpacingByIndex.quarterindex)
) {
ichart
.timeScale()
.setVisibleLogicalRange({ from: -1, to: data.length });
}
// Delay until chart has applied the range
// RAF for Safari compatibility
requestAnimationFrame(() => {
if (seriesGeneration !== generation) return;
initialLoadComplete = true;
blueprints.onDataLoaded?.();
const savedRange = getRange();
if (savedRange) {
ichart.timeScale().setVisibleLogicalRange({
from: savedRange.from,
to: savedRange.to,
});
} else if (fitContent) {
ichart.timeScale().fitContent();
} else if (
(minBarSpacingByIndex[idx] ?? 0) >=
/** @type {number} */ (minBarSpacingByIndex.quarterindex)
) {
ichart
.timeScale()
.setVisibleLogicalRange({ from: -1, to: data.length });
}
// Delay until chart has applied the range
requestAnimationFrame(() => {
if (seriesGeneration !== generation) return;
initialLoadComplete = true;
blueprints.onDataLoaded?.();
});
});
} else {
// Incremental update: only process new data points
-1
View File
@@ -109,7 +109,6 @@ export const colors = {
p3: [palette.sky, palette.avocado],
},
// Cointime economics
liveliness: palette.pink,
vaulted: palette.lime,