mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-05-26 17:54:44 -07:00
kibo: snapshot
This commit is contained in:
@@ -268,7 +268,6 @@
|
|||||||
--negative-main-padding: calc(-1 * var(--main-padding));
|
--negative-main-padding: calc(-1 * var(--main-padding));
|
||||||
|
|
||||||
--font-weight-base: 400;
|
--font-weight-base: 400;
|
||||||
--font-weight-bold: 700;
|
|
||||||
|
|
||||||
--transform-scale-active: scaleY(0.9);
|
--transform-scale-active: scaleY(0.9);
|
||||||
|
|
||||||
@@ -377,7 +376,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
b {
|
b {
|
||||||
font-weight: var(--font-weight-bold);
|
font-weight: 700;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
|
|||||||
@@ -4,10 +4,10 @@
|
|||||||
* @import { Option, PartialChartOption, ChartOption, AnyPartialOption, ProcessedOptionAddons, OptionsTree, SimulationOption, Unit } from "./options"
|
* @import { Option, PartialChartOption, ChartOption, AnyPartialOption, ProcessedOptionAddons, OptionsTree, SimulationOption, Unit } from "./options"
|
||||||
* @import {Valued, SingleValueData, CandlestickData, ChartData, OHLCTuple} from "../packages/lightweight-charts/wrapper"
|
* @import {Valued, SingleValueData, CandlestickData, ChartData, OHLCTuple} from "../packages/lightweight-charts/wrapper"
|
||||||
* @import * as _ from "../packages/ufuzzy/v1.0.14/types"
|
* @import * as _ from "../packages/ufuzzy/v1.0.14/types"
|
||||||
* @import { createChart as CreateClassicChart, LineStyleOptions, DeepPartial, ChartOptions, IChartApi, IHorzScaleBehavior, WhitespaceData, ISeriesApi, Time, LineData, LogicalRange, SeriesType, BaselineStyleOptions, SeriesOptionsCommon } from "../packages/lightweight-charts/v5.0.5-treeshaked/types"
|
* @import { createChart as CreateClassicChart, LineStyleOptions, DeepPartial, ChartOptions, IChartApi, IHorzScaleBehavior, WhitespaceData, ISeriesApi, Time, LineData, LogicalRange, SeriesType, BaselineStyleOptions, SeriesOptionsCommon, BaselineData, CandlestickStyleOptions } from "../packages/lightweight-charts/v5.0.5-treeshaked/types"
|
||||||
* @import { SignalOptions } from "../packages/solid-signals/v0.2.4-treeshaked/types/core/core"
|
* @import { SignalOptions } from "../packages/solid-signals/v0.2.4-treeshaked/types/core/core"
|
||||||
* @import { getOwner as GetOwner, onCleanup as OnCleanup, Owner } from "../packages/solid-signals/v0.2.4-treeshaked/types/core/owner"
|
* @import { getOwner as GetOwner, onCleanup as OnCleanup, Owner } from "../packages/solid-signals/v0.2.4-treeshaked/types/core/owner"
|
||||||
* @import { createSignal as CreateSignal, createEffect as CreateEffect, Accessor, Setter, createMemo as CreateMemo, createRoot as CreateRoot, runWithOwner as RunWithOwner } from "../packages/solid-signals/v0.2.4-treeshaked/types/signals";
|
* @import { createSignal as CreateSignal, createEffect as CreateEffect, Accessor, Setter, createMemo as CreateMemo } from "../packages/solid-signals/v0.2.4-treeshaked/types/signals";
|
||||||
* @import {Signal, Signals} from "../packages/solid-signals/types";
|
* @import {Signal, Signals} from "../packages/solid-signals/types";
|
||||||
* @import {Addressindex, Dateindex, Decadeindex, Difficultyepoch, Index, Halvingepoch, Height, Monthindex, P2PK33index, P2PK65index, P2PKHindex, P2SHindex, P2TRindex, P2WPKHindex, P2WSHindex, Txindex, Txinindex, Txoutindex, VecId, Weekindex, Yearindex, VecIdToIndexes, Quarterindex} from "./vecid-to-indexes"
|
* @import {Addressindex, Dateindex, Decadeindex, Difficultyepoch, Index, Halvingepoch, Height, Monthindex, P2PK33index, P2PK65index, P2PKHindex, P2SHindex, P2TRindex, P2WPKHindex, P2WSHindex, Txindex, Txinindex, Txoutindex, VecId, Weekindex, Yearindex, VecIdToIndexes, Quarterindex} from "./vecid-to-indexes"
|
||||||
*/
|
*/
|
||||||
@@ -1991,7 +1991,7 @@ function main() {
|
|||||||
utils,
|
utils,
|
||||||
webSockets,
|
webSockets,
|
||||||
vecsResources,
|
vecsResources,
|
||||||
vecIdToIndexes: vecIdToIndexes,
|
vecIdToIndexes,
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -2023,6 +2023,7 @@ function main() {
|
|||||||
lightweightCharts,
|
lightweightCharts,
|
||||||
signals,
|
signals,
|
||||||
utils,
|
utils,
|
||||||
|
vecsResources,
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -1,17 +1,5 @@
|
|||||||
// @ts-check
|
// @ts-check
|
||||||
|
|
||||||
/** @import {
|
|
||||||
DeepPartial,
|
|
||||||
BaselineStyleOptions,
|
|
||||||
CandlestickStyleOptions,
|
|
||||||
LineStyleOptions,
|
|
||||||
SeriesOptionsCommon,
|
|
||||||
Time,
|
|
||||||
SingleValueData as _SingleValueData,
|
|
||||||
CandlestickData as _CandlestickData,
|
|
||||||
BaselineData,
|
|
||||||
} from "../packages/lightweight-charts/v5.0.5-treeshaked/types"} */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {"" |
|
* @typedef {"" |
|
||||||
* "Bitcoin" |
|
* "Bitcoin" |
|
||||||
|
|||||||
@@ -7,8 +7,16 @@
|
|||||||
* @param {Signals} args.signals
|
* @param {Signals} args.signals
|
||||||
* @param {Utilities} args.utils
|
* @param {Utilities} args.utils
|
||||||
* @param {Elements} args.elements
|
* @param {Elements} args.elements
|
||||||
|
* @param {VecsResources} args.vecsResources
|
||||||
*/
|
*/
|
||||||
export function init({ colors, elements, lightweightCharts, signals, utils }) {
|
export function init({
|
||||||
|
colors,
|
||||||
|
elements,
|
||||||
|
lightweightCharts,
|
||||||
|
signals,
|
||||||
|
utils,
|
||||||
|
vecsResources,
|
||||||
|
}) {
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} Frequency
|
* @typedef {Object} Frequency
|
||||||
* @property {string} name
|
* @property {string} name
|
||||||
@@ -255,7 +263,7 @@ export function init({ colors, elements, lightweightCharts, signals, utils }) {
|
|||||||
* @param {string} param0.text
|
* @param {string} param0.text
|
||||||
*/
|
*/
|
||||||
function createColoredSpan({ color, text }) {
|
function createColoredSpan({ color, text }) {
|
||||||
return `<span style="color: ${colors[color]()}; font-weight: var(--font-weight-bold)">${text}</span>`;
|
return `<span style="color: ${colors[color]()}; font-weight: 500">${text}</span>`;
|
||||||
}
|
}
|
||||||
|
|
||||||
parametersElement.append(
|
parametersElement.append(
|
||||||
@@ -688,8 +696,13 @@ export function init({ colors, elements, lightweightCharts, signals, utils }) {
|
|||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
const closes = datasets.getOrCreate("date", "date-to-close");
|
const closes = vecsResources.getOrCreate(
|
||||||
closes.fetchRange(2009, new Date().getUTCFullYear()).then(() => {
|
/** @satisfies {Dateindex} */ (1),
|
||||||
|
"close",
|
||||||
|
);
|
||||||
|
|
||||||
|
closes.fetch().then((_closes) => {
|
||||||
|
const closes = /** @type {OHLCTuple[] | null} */ (_closes);
|
||||||
signals.runWithOwner(owner, () => {
|
signals.runWithOwner(owner, () => {
|
||||||
signals.createEffect(
|
signals.createEffect(
|
||||||
() => ({
|
() => ({
|
||||||
|
|||||||
@@ -60,7 +60,9 @@
|
|||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
small {
|
small {
|
||||||
font-size: var(--font-size-base);
|
font-size: var(--font-size-sm);
|
||||||
|
line-height: var(--line-height-sm);
|
||||||
|
display: block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user