diff --git a/README.md b/README.md index a62786bad..3cc8024ac 100644 --- a/README.md +++ b/README.md @@ -36,15 +36,16 @@ API: Adjectives that describe what this project is or strives to be, in no particular order: -- **Best**: Be the go to and replace Glassnode +- **Best**: Replace Glassnode as the go to - **Diverse**: Have as many charts/datasets as possible and something for everyone -- **Transparent**: You can verify and see exactly how each dataset is computed - **Free**: Is and always will be completely free +- **Open**: With a very permissive license +- **Transparent**: You can verify and see exactly how each dataset is computed - **Independent**: Only one, easily swappable, dependency (Price API) - **Timeless**: Be relevant and usable 10 years from now by being independent and not do address tagging - **Sovereign**: Be self-hostable on accessible hardware - **Versatile**: Many many different datasets which can be viewed in chart, dashbards or raw values -- **Accessible**: Huge free API with all the datasets +- **Accessible**: Free Website and API with all the datasets for everyone ## Milestones diff --git a/app/src/app/components/frames/chart/components/timeScale.tsx b/app/src/app/components/frames/chart/components/timeScale.tsx index 95acf1085..6005653d5 100644 --- a/app/src/app/components/frames/chart/components/timeScale.tsx +++ b/app/src/app/components/frames/chart/components/timeScale.tsx @@ -1,7 +1,7 @@ -import { GENESIS_DAY } from "/src/scripts/lightweightCharts/chart/whitespace"; import { ONE_DAY_IN_MS } from "/src/scripts/utils/time"; import { classPropToString } from "/src/solid/classes"; +import { GENESIS_DAY } from "../../../../../scripts/lightweightCharts/whitespace"; import { Box } from "../../box"; import { Scrollable } from "../../scrollable"; diff --git a/app/src/scripts/lightweightCharts/series/creators/area.ts b/app/src/scripts/lightweightCharts/area.ts similarity index 100% rename from app/src/scripts/lightweightCharts/series/creators/area.ts rename to app/src/scripts/lightweightCharts/area.ts diff --git a/app/src/scripts/lightweightCharts/series/creators/baseLine.ts b/app/src/scripts/lightweightCharts/baseLine.ts similarity index 100% rename from app/src/scripts/lightweightCharts/series/creators/baseLine.ts rename to app/src/scripts/lightweightCharts/baseLine.ts diff --git a/app/src/scripts/lightweightCharts/series/creators/candlesticks.ts b/app/src/scripts/lightweightCharts/candlesticks.ts similarity index 100% rename from app/src/scripts/lightweightCharts/series/creators/candlesticks.ts rename to app/src/scripts/lightweightCharts/candlesticks.ts diff --git a/app/src/scripts/lightweightCharts/chart/types.d.ts b/app/src/scripts/lightweightCharts/chart/types.d.ts deleted file mode 100644 index d6ffd078e..000000000 --- a/app/src/scripts/lightweightCharts/chart/types.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -interface PriceSeriesOptions { - placement?: "top" | "bottom"; - title?: string; - id?: string; - inverseColors?: boolean; - seriesOptions?: DeepPartial; - priceScaleOptions?: DeepPartial; -} diff --git a/app/src/scripts/lightweightCharts/chart/create.ts b/app/src/scripts/lightweightCharts/create.ts similarity index 95% rename from app/src/scripts/lightweightCharts/chart/create.ts rename to app/src/scripts/lightweightCharts/create.ts index 2b4c94402..51aabdce6 100644 --- a/app/src/scripts/lightweightCharts/chart/create.ts +++ b/app/src/scripts/lightweightCharts/create.ts @@ -4,8 +4,8 @@ import { CrosshairMode, } from "lightweight-charts"; -import { colors } from "../../utils/colors"; -import { valueToString } from "../../utils/locale"; +import { colors } from "../utils/colors"; +import { valueToString } from "../utils/locale"; import { HorzScaleBehaviorHeight } from "./horzScaleBehavior"; export function createChart( diff --git a/app/src/scripts/lightweightCharts/series/creators/histogram.ts b/app/src/scripts/lightweightCharts/histogram.ts similarity index 100% rename from app/src/scripts/lightweightCharts/series/creators/histogram.ts rename to app/src/scripts/lightweightCharts/histogram.ts diff --git a/app/src/scripts/lightweightCharts/chart/horzScaleBehavior.ts b/app/src/scripts/lightweightCharts/horzScaleBehavior.ts similarity index 100% rename from app/src/scripts/lightweightCharts/chart/horzScaleBehavior.ts rename to app/src/scripts/lightweightCharts/horzScaleBehavior.ts diff --git a/app/src/scripts/lightweightCharts/series/creators/legend.ts b/app/src/scripts/lightweightCharts/legend.ts similarity index 100% rename from app/src/scripts/lightweightCharts/series/creators/legend.ts rename to app/src/scripts/lightweightCharts/legend.ts diff --git a/app/src/scripts/lightweightCharts/series/creators/line.ts b/app/src/scripts/lightweightCharts/line.ts similarity index 100% rename from app/src/scripts/lightweightCharts/series/creators/line.ts rename to app/src/scripts/lightweightCharts/line.ts diff --git a/app/src/scripts/lightweightCharts/chart/markers.ts b/app/src/scripts/lightweightCharts/markers.ts similarity index 98% rename from app/src/scripts/lightweightCharts/chart/markers.ts rename to app/src/scripts/lightweightCharts/markers.ts index e27309c23..2061dfa1c 100644 --- a/app/src/scripts/lightweightCharts/chart/markers.ts +++ b/app/src/scripts/lightweightCharts/markers.ts @@ -1,6 +1,6 @@ import { colors } from "/src/scripts/utils/colors"; -import { chunkIdToIndex } from "../../datasets/resource"; +import { chunkIdToIndex } from "../datasets/resource"; export function setMinMaxMarkers({ scale, diff --git a/app/src/scripts/lightweightCharts/series/creators/options.ts b/app/src/scripts/lightweightCharts/options.ts similarity index 100% rename from app/src/scripts/lightweightCharts/series/creators/options.ts rename to app/src/scripts/lightweightCharts/options.ts diff --git a/app/src/scripts/lightweightCharts/series/creators/types.d.ts b/app/src/scripts/lightweightCharts/series/creators/types.d.ts deleted file mode 100644 index 298c89f77..000000000 --- a/app/src/scripts/lightweightCharts/series/creators/types.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -interface BaselineSeriesOptions { - color?: string; - topColor?: string; - topLineColor?: string; - bottomColor?: string; - bottomLineColor?: string; - lineColor?: string; - base?: number; - options?: DeepPartialBaselineOptions; - title?: string; -} - -type SeriesLegend = ReturnType; diff --git a/app/src/scripts/lightweightCharts/chart/time.ts b/app/src/scripts/lightweightCharts/time.ts similarity index 95% rename from app/src/scripts/lightweightCharts/chart/time.ts rename to app/src/scripts/lightweightCharts/time.ts index 96d8dfd63..fd6bff2a1 100644 --- a/app/src/scripts/lightweightCharts/chart/time.ts +++ b/app/src/scripts/lightweightCharts/time.ts @@ -1,6 +1,6 @@ -import { HEIGHT_CHUNK_SIZE } from "../../datasets"; -import { debounce } from "../../utils/debounce"; -import { writeURLParam } from "../../utils/urlParams"; +import { HEIGHT_CHUNK_SIZE } from "../datasets"; +import { debounce } from "../utils/debounce"; +import { writeURLParam } from "../utils/urlParams"; const LOCAL_STORAGE_RANGE_KEY = "chart-range"; const URL_PARAMS_RANGE_FROM_KEY = "from"; diff --git a/app/src/scripts/lightweightCharts/types.d.ts b/app/src/scripts/lightweightCharts/types.d.ts new file mode 100644 index 000000000..38581c49f --- /dev/null +++ b/app/src/scripts/lightweightCharts/types.d.ts @@ -0,0 +1,24 @@ +interface PriceSeriesOptions { + placement?: "top" | "bottom"; + title?: string; + id?: string; + inverseColors?: boolean; + seriesOptions?: DeepPartial; + priceScaleOptions?: DeepPartial; +} + +interface BaselineSeriesOptions { + color?: string; + topColor?: string; + topLineColor?: string; + bottomColor?: string; + bottomLineColor?: string; + lineColor?: string; + base?: number; + options?: DeepPartialBaselineOptions; + title?: string; +} + +type SeriesLegend = ReturnType< + typeof import("../../chart/legend").createSeriesLegend +>; diff --git a/app/src/scripts/lightweightCharts/chart/whitespace.ts b/app/src/scripts/lightweightCharts/whitespace.ts similarity index 95% rename from app/src/scripts/lightweightCharts/chart/whitespace.ts rename to app/src/scripts/lightweightCharts/whitespace.ts index c1f38e635..e90104157 100644 --- a/app/src/scripts/lightweightCharts/chart/whitespace.ts +++ b/app/src/scripts/lightweightCharts/whitespace.ts @@ -1,5 +1,5 @@ -import { dateToString, getNumberOfDaysBetweenTwoDates } from "../../utils/date"; -import { createLineSeries } from "../series/creators/line"; +import { dateToString, getNumberOfDaysBetweenTwoDates } from "../utils/date"; +import { createLineSeries } from "./line"; export const GENESIS_DAY = "2009-01-03"; diff --git a/app/src/scripts/presets/apply.ts b/app/src/scripts/presets/apply.ts index 9dbdb68eb..ee5246879 100644 --- a/app/src/scripts/presets/apply.ts +++ b/app/src/scripts/presets/apply.ts @@ -1,18 +1,18 @@ import { createRWS } from "/src/solid/rws"; import { chunkIdToIndex } from "../datasets/resource"; -import { createChart } from "../lightweightCharts/chart/create"; -import { setMinMaxMarkers } from "../lightweightCharts/chart/markers"; -import { initTimeScale } from "../lightweightCharts/chart/time"; -import { setWhitespace } from "../lightweightCharts/chart/whitespace"; import { createBaseLineSeries, DEFAULT_BASELINE_COLORS, -} from "../lightweightCharts/series/creators/baseLine"; -import { createCandlesticksSeries } from "../lightweightCharts/series/creators/candlesticks"; -import { createHistogramSeries } from "../lightweightCharts/series/creators/histogram"; -import { createSeriesLegend } from "../lightweightCharts/series/creators/legend"; -import { createLineSeries } from "../lightweightCharts/series/creators/line"; +} from "../lightweightCharts/baseLine"; +import { createCandlesticksSeries } from "../lightweightCharts/candlesticks"; +import { createChart } from "../lightweightCharts/create"; +import { createHistogramSeries } from "../lightweightCharts/histogram"; +import { createSeriesLegend } from "../lightweightCharts/legend"; +import { createLineSeries } from "../lightweightCharts/line"; +import { setMinMaxMarkers } from "../lightweightCharts/markers"; +import { initTimeScale } from "../lightweightCharts/time"; +import { setWhitespace } from "../lightweightCharts/whitespace"; import { colors } from "../utils/colors"; import { debounce } from "../utils/debounce"; import { stringToId } from "../utils/id";