mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-05-26 09:44:45 -07:00
kibo: snapshot
This commit is contained in:
@@ -268,7 +268,6 @@
|
||||
--negative-main-padding: calc(-1 * var(--main-padding));
|
||||
|
||||
--font-weight-base: 400;
|
||||
--font-weight-bold: 700;
|
||||
|
||||
--transform-scale-active: scaleY(0.9);
|
||||
|
||||
@@ -377,7 +376,7 @@
|
||||
}
|
||||
|
||||
b {
|
||||
font-weight: var(--font-weight-bold);
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
body {
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
* @import { Option, PartialChartOption, ChartOption, AnyPartialOption, ProcessedOptionAddons, OptionsTree, SimulationOption, Unit } from "./options"
|
||||
* @import {Valued, SingleValueData, CandlestickData, ChartData, OHLCTuple} from "../packages/lightweight-charts/wrapper"
|
||||
* @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 { 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 {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,
|
||||
webSockets,
|
||||
vecsResources,
|
||||
vecIdToIndexes: vecIdToIndexes,
|
||||
vecIdToIndexes,
|
||||
}),
|
||||
),
|
||||
),
|
||||
@@ -2023,6 +2023,7 @@ function main() {
|
||||
lightweightCharts,
|
||||
signals,
|
||||
utils,
|
||||
vecsResources,
|
||||
}),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -1,17 +1,5 @@
|
||||
// @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 {"" |
|
||||
* "Bitcoin" |
|
||||
|
||||
@@ -7,8 +7,16 @@
|
||||
* @param {Signals} args.signals
|
||||
* @param {Utilities} args.utils
|
||||
* @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
|
||||
* @property {string} name
|
||||
@@ -255,7 +263,7 @@ export function init({ colors, elements, lightweightCharts, signals, utils }) {
|
||||
* @param {string} param0.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(
|
||||
@@ -688,8 +696,13 @@ export function init({ colors, elements, lightweightCharts, signals, utils }) {
|
||||
],
|
||||
});
|
||||
|
||||
const closes = datasets.getOrCreate("date", "date-to-close");
|
||||
closes.fetchRange(2009, new Date().getUTCFullYear()).then(() => {
|
||||
const closes = vecsResources.getOrCreate(
|
||||
/** @satisfies {Dateindex} */ (1),
|
||||
"close",
|
||||
);
|
||||
|
||||
closes.fetch().then((_closes) => {
|
||||
const closes = /** @type {OHLCTuple[] | null} */ (_closes);
|
||||
signals.runWithOwner(owner, () => {
|
||||
signals.createEffect(
|
||||
() => ({
|
||||
|
||||
@@ -60,7 +60,9 @@
|
||||
display: block;
|
||||
}
|
||||
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