mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-07-24 17:38:09 -07:00
website: snapshot
This commit is contained in:
@@ -17,15 +17,15 @@ import {
|
||||
createPriceLines,
|
||||
constantLine,
|
||||
} from "./constants.js";
|
||||
import { colors } from "../chart/colors.js";
|
||||
|
||||
/**
|
||||
* Create a context object with all dependencies for building partial options
|
||||
* @param {Object} args
|
||||
* @param {Colors} args.colors
|
||||
* @param {BrkClient} args.brk
|
||||
* @returns {PartialContext}
|
||||
*/
|
||||
export function createContext({ colors, brk }) {
|
||||
export function createContext({ brk }) {
|
||||
const constants = brk.metrics.constants;
|
||||
|
||||
return {
|
||||
|
||||
@@ -10,12 +10,11 @@ import { collect, markUsed, logUnused } from "./unused.js";
|
||||
|
||||
/**
|
||||
* @param {Object} args
|
||||
* @param {Colors} args.colors
|
||||
* @param {Signals} args.signals
|
||||
* @param {BrkClient} args.brk
|
||||
* @param {Signal<string | null>} args.qrcode
|
||||
*/
|
||||
export function initOptions({ colors, signals, brk, qrcode }) {
|
||||
export function initOptions({ signals, brk, qrcode }) {
|
||||
collect(brk.metrics);
|
||||
|
||||
const LS_SELECTED_KEY = `selected_path`;
|
||||
@@ -33,7 +32,6 @@ export function initOptions({ colors, signals, brk, qrcode }) {
|
||||
const selected = signals.createSignal(/** @type {any} */ (undefined));
|
||||
|
||||
const partialOptions = createPartialOptions({
|
||||
colors,
|
||||
brk,
|
||||
});
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ import {
|
||||
import { createMarketSection } from "./market/index.js";
|
||||
import { createChainSection } from "./chain.js";
|
||||
import { createCointimeSection } from "./cointime.js";
|
||||
import { colors } from "../chart/colors.js";
|
||||
|
||||
// Re-export types for external consumers
|
||||
export * from "./types.js";
|
||||
@@ -20,13 +21,12 @@ export * from "./types.js";
|
||||
/**
|
||||
* Create partial options tree
|
||||
* @param {Object} args
|
||||
* @param {Colors} args.colors
|
||||
* @param {BrkClient} args.brk
|
||||
* @returns {PartialOptionsTree}
|
||||
*/
|
||||
export function createPartialOptions({ colors, brk }) {
|
||||
export function createPartialOptions({ brk }) {
|
||||
// Create context with all helpers
|
||||
const ctx = createContext({ colors, brk });
|
||||
const ctx = createContext({ brk });
|
||||
|
||||
// Build cohort data
|
||||
const {
|
||||
|
||||
Reference in New Issue
Block a user