@abdullahjaswal/tickyr-charts-solid 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +14 -0
- package/README.md +43 -0
- package/dist/animation/animator.d.ts +52 -0
- package/dist/animation/bar-entry.d.ts +44 -0
- package/dist/animation/bar-update.d.ts +38 -0
- package/dist/animation/easings.d.ts +22 -0
- package/dist/animation/index.d.ts +4 -0
- package/dist/charts/bar-chart-controller.d.ts +98 -0
- package/dist/charts/bar-chart-helpers.d.ts +334 -0
- package/dist/charts/candle-chart-controller.d.ts +353 -0
- package/dist/charts/candle-chart-helpers.d.ts +781 -0
- package/dist/charts/depth-chart-controller.d.ts +84 -0
- package/dist/charts/depth-chart-helpers.d.ts +185 -0
- package/dist/charts/depth-series.d.ts +41 -0
- package/dist/charts/heatmap-chart-controller.d.ts +78 -0
- package/dist/charts/heatmap-chart-helpers.d.ts +174 -0
- package/dist/charts/heatmap-color-compute.d.ts +11 -0
- package/dist/charts/hierarchy.d.ts +49 -0
- package/dist/charts/histogram-binning.d.ts +33 -0
- package/dist/charts/histogram-chart-controller.d.ts +82 -0
- package/dist/charts/histogram-chart-helpers.d.ts +199 -0
- package/dist/charts/kagi-chart-controller.d.ts +154 -0
- package/dist/charts/line-chart-controller.d.ts +209 -0
- package/dist/charts/line-chart-helpers.d.ts +606 -0
- package/dist/charts/mark-buffers.d.ts +105 -0
- package/dist/charts/pie-chart-controller.d.ts +83 -0
- package/dist/charts/pie-chart-helpers.d.ts +155 -0
- package/dist/charts/pie-slice-compute.d.ts +44 -0
- package/dist/charts/pnf-chart-controller.d.ts +153 -0
- package/dist/charts/renko-chart-controller.d.ts +151 -0
- package/dist/charts/sankey-chart-controller.d.ts +176 -0
- package/dist/charts/sankey-layout.d.ts +64 -0
- package/dist/charts/scatter-chart-controller.d.ts +90 -0
- package/dist/charts/scatter-chart-helpers.d.ts +257 -0
- package/dist/charts/scatter-density.d.ts +5 -0
- package/dist/charts/scatter-regression.d.ts +27 -0
- package/dist/charts/sunburst-chart-controller.d.ts +107 -0
- package/dist/charts/sunburst-chart-helpers.d.ts +143 -0
- package/dist/charts/sunburst-layout.d.ts +40 -0
- package/dist/charts/time-off-algorithms.d.ts +53 -0
- package/dist/charts/treemap-chart-controller.d.ts +103 -0
- package/dist/charts/treemap-chart-helpers.d.ts +163 -0
- package/dist/charts/treemap-layout.d.ts +29 -0
- package/dist/charts/types.d.ts +38 -0
- package/dist/clock/clock.d.ts +10 -0
- package/dist/composition/chart-group-state.d.ts +46 -0
- package/dist/composition/index.d.ts +1 -0
- package/dist/composition/pane.d.ts +33 -0
- package/dist/domain/concat.d.ts +18 -0
- package/dist/domain/drawings.d.ts +44 -0
- package/dist/domain/heikin-ashi.d.ts +9 -0
- package/dist/domain/index.d.ts +7 -0
- package/dist/domain/ingestion.d.ts +7 -0
- package/dist/domain/live-state.d.ts +12 -0
- package/dist/domain/markers.d.ts +38 -0
- package/dist/domain/series.d.ts +22 -0
- package/dist/domain/values.d.ts +32 -0
- package/dist/engine/aggregation.d.ts +15 -0
- package/dist/engine/downsampling.d.ts +3 -0
- package/dist/engine/events.d.ts +14 -0
- package/dist/engine/index.d.ts +13 -0
- package/dist/engine/indicators.d.ts +37 -0
- package/dist/engine/markets.d.ts +8 -0
- package/dist/engine/module.d.ts +8 -0
- package/dist/engine/quadtree.d.ts +18 -0
- package/dist/engine/session.d.ts +11 -0
- package/dist/engine/signals.d.ts +52 -0
- package/dist/engine/streaming.d.ts +20 -0
- package/dist/engine/time-axis.d.ts +16 -0
- package/dist/engine/version.d.ts +16 -0
- package/dist/engine/views.d.ts +3 -0
- package/dist/index.js +17026 -0
- package/dist/interaction/keyboard.d.ts +16 -0
- package/dist/interaction/touch.d.ts +27 -0
- package/dist/perf/adaptive-complexity.d.ts +45 -0
- package/dist/perf/memory-pressure.d.ts +16 -0
- package/dist/perf/offscreen-canvas-host.d.ts +32 -0
- package/dist/perf/offscreen-canvas.d.ts +50 -0
- package/dist/perf/offscreen-canvas.worker.d.ts +1 -0
- package/dist/perf/shared-array-buffer.d.ts +10 -0
- package/dist/perf/visibility.d.ts +39 -0
- package/dist/perf/webgl-renderer.d.ts +24 -0
- package/dist/perf/wire-memory-pressure.d.ts +2 -0
- package/dist/personalization/accessibility.d.ts +16 -0
- package/dist/personalization/axes/animation.d.ts +33 -0
- package/dist/personalization/axes/area-baseline.d.ts +8 -0
- package/dist/personalization/axes/axis-labels.d.ts +3 -0
- package/dist/personalization/axes/bin-algorithm.d.ts +3 -0
- package/dist/personalization/axes/box-sizing.d.ts +22 -0
- package/dist/personalization/axes/cell-shape.d.ts +3 -0
- package/dist/personalization/axes/curve-type.d.ts +11 -0
- package/dist/personalization/axes/density.d.ts +4 -0
- package/dist/personalization/axes/depth-fill-type.d.ts +3 -0
- package/dist/personalization/axes/depth-limit.d.ts +2 -0
- package/dist/personalization/axes/glow.d.ts +21 -0
- package/dist/personalization/axes/heatmap-color-scale.d.ts +31 -0
- package/dist/personalization/axes/histogram-overlay.d.ts +18 -0
- package/dist/personalization/axes/indicator-pane-spec.d.ts +85 -0
- package/dist/personalization/axes/label-behavior.d.ts +3 -0
- package/dist/personalization/axes/label-content.d.ts +17 -0
- package/dist/personalization/axes/label-placement.d.ts +3 -0
- package/dist/personalization/axes/label-rotation.d.ts +3 -0
- package/dist/personalization/axes/level-highlight.d.ts +14 -0
- package/dist/personalization/axes/line-dash.d.ts +2 -0
- package/dist/personalization/axes/mid-line.d.ts +14 -0
- package/dist/personalization/axes/node-alignment.d.ts +3 -0
- package/dist/personalization/axes/null-behavior.d.ts +3 -0
- package/dist/personalization/axes/number-format.d.ts +18 -0
- package/dist/personalization/axes/pan-zoom.d.ts +42 -0
- package/dist/personalization/axes/pattern.d.ts +26 -0
- package/dist/personalization/axes/point-markers.d.ts +55 -0
- package/dist/personalization/axes/point-opacity.d.ts +6 -0
- package/dist/personalization/axes/point-size.d.ts +23 -0
- package/dist/personalization/axes/price-range.d.ts +9 -0
- package/dist/personalization/axes/radius-proportion.d.ts +3 -0
- package/dist/personalization/axes/regression-line.d.ts +36 -0
- package/dist/personalization/axes/sankey-link-color.d.ts +10 -0
- package/dist/personalization/axes/sankey-value-display.d.ts +4 -0
- package/dist/personalization/axes/small-slice-threshold.d.ts +15 -0
- package/dist/personalization/axes/sort-order.d.ts +3 -0
- package/dist/personalization/axes/spread-display.d.ts +4 -0
- package/dist/personalization/axes/stacking.d.ts +17 -0
- package/dist/personalization/axes/tile-layout.d.ts +3 -0
- package/dist/personalization/axes/time-off-axes.d.ts +19 -0
- package/dist/personalization/axes/treemap-color-scale.d.ts +3 -0
- package/dist/personalization/axes/value-labels.d.ts +21 -0
- package/dist/personalization/axes/view-mode.d.ts +3 -0
- package/dist/personalization/axes/volume-coloring.d.ts +24 -0
- package/dist/personalization/axes/y-axis-mode.d.ts +3 -0
- package/dist/personalization/index.d.ts +38 -0
- package/dist/personalization/locale/formatter.d.ts +45 -0
- package/dist/personalization/locale/resolver.d.ts +22 -0
- package/dist/personalization/palette/built-ins.d.ts +10 -0
- package/dist/personalization/palette/derive.d.ts +35 -0
- package/dist/personalization/palette/index.d.ts +6 -0
- package/dist/personalization/palette/oklch.d.ts +19 -0
- package/dist/personalization/palette/registry.d.ts +7 -0
- package/dist/personalization/palette/tonal-symmetry.d.ts +32 -0
- package/dist/personalization/palette/types.d.ts +63 -0
- package/dist/personalization/personalization.d.ts +137 -0
- package/dist/personalization/tooltip-props.d.ts +40 -0
- package/dist/rendering/canvas.d.ts +6 -0
- package/dist/rendering/color-tables.d.ts +52 -0
- package/dist/rendering/dirty-rect-tracker.d.ts +49 -0
- package/dist/rendering/dirty-rect.d.ts +17 -0
- package/dist/rendering/draw/area-fill-threshold.d.ts +19 -0
- package/dist/rendering/draw/area-fill.d.ts +47 -0
- package/dist/rendering/draw/area-gradient.d.ts +35 -0
- package/dist/rendering/draw/axis.d.ts +65 -0
- package/dist/rendering/draw/bar.d.ts +31 -0
- package/dist/rendering/draw/candle-live-treatment.d.ts +43 -0
- package/dist/rendering/draw/candle.d.ts +101 -0
- package/dist/rendering/draw/connection-indicator.d.ts +30 -0
- package/dist/rendering/draw/crosshair.d.ts +27 -0
- package/dist/rendering/draw/drawings.d.ts +64 -0
- package/dist/rendering/draw/grid.d.ts +20 -0
- package/dist/rendering/draw/indicator-band.d.ts +17 -0
- package/dist/rendering/draw/indicator-line.d.ts +15 -0
- package/dist/rendering/draw/last-price.d.ts +36 -0
- package/dist/rendering/draw/line.d.ts +16 -0
- package/dist/rendering/draw/live-bar.d.ts +31 -0
- package/dist/rendering/draw/markers.d.ts +53 -0
- package/dist/rendering/draw/pane-divider.d.ts +22 -0
- package/dist/rendering/draw/point-markers.d.ts +23 -0
- package/dist/rendering/glow/glow.d.ts +40 -0
- package/dist/rendering/index.d.ts +9 -0
- package/dist/rendering/layers/should-split.d.ts +12 -0
- package/dist/rendering/patterns/cross-hatch.d.ts +4 -0
- package/dist/rendering/patterns/pattern-tiles.d.ts +25 -0
- package/dist/rendering/pipeline.d.ts +21 -0
- package/dist/rendering/stacked-layout.d.ts +23 -0
- package/dist/rendering/standardization-tokens.d.ts +26 -0
- package/dist/rendering/static-layer-cache.d.ts +34 -0
- package/dist/rendering/threshold-split.d.ts +14 -0
- package/dist/shared/binary-search.d.ts +2 -0
- package/dist/shared/typed.d.ts +8 -0
- package/dist/solid/chart-group.d.ts +16 -0
- package/dist/solid/charts-provider.d.ts +38 -0
- package/dist/solid/components/area-chart.d.ts +21 -0
- package/dist/solid/components/bar-chart.d.ts +84 -0
- package/dist/solid/components/candle-chart.d.ts +142 -0
- package/dist/solid/components/chart-group-brush.d.ts +13 -0
- package/dist/solid/components/chart-group-navigator.d.ts +12 -0
- package/dist/solid/components/depth-chart.d.ts +8 -0
- package/dist/solid/components/heatmap-chart.d.ts +8 -0
- package/dist/solid/components/histogram-chart.d.ts +8 -0
- package/dist/solid/components/kagi-chart.d.ts +8 -0
- package/dist/solid/components/line-chart.d.ts +110 -0
- package/dist/solid/components/pie-chart.d.ts +20 -0
- package/dist/solid/components/point-figure-chart.d.ts +8 -0
- package/dist/solid/components/renko-chart.d.ts +8 -0
- package/dist/solid/components/sankey-chart.d.ts +8 -0
- package/dist/solid/components/scatter-chart.d.ts +8 -0
- package/dist/solid/components/sunburst-chart.d.ts +8 -0
- package/dist/solid/components/treemap-chart.d.ts +8 -0
- package/dist/solid/hooks/use-chart-theme.d.ts +2 -0
- package/dist/solid/hooks/use-streaming-candles.d.ts +33 -0
- package/dist/solid/index.d.ts +73 -0
- package/dist/solid/tooltips/default-candle-tooltip.d.ts +4 -0
- package/dist/solid/tooltips/default-extreme-tooltip.d.ts +6 -0
- package/dist/solid/tooltips/default-tooltip.d.ts +4 -0
- package/dist/solid/tooltips/default-volume-bar-tooltip.d.ts +4 -0
- package/dist/solid/tooltips/index.d.ts +4 -0
- package/dist/tickyr_charts_wasm-C-sFYtmv.js +828 -0
- package/dist/viewport/category-axis.d.ts +32 -0
- package/dist/viewport/clip-ticks.d.ts +8 -0
- package/dist/viewport/index.d.ts +6 -0
- package/dist/viewport/nice-ticks.d.ts +9 -0
- package/dist/viewport/nice-time-ticks.d.ts +7 -0
- package/dist/viewport/orientation.d.ts +56 -0
- package/dist/viewport/padded-domain.d.ts +16 -0
- package/dist/viewport/scales/linear.d.ts +9 -0
- package/dist/viewport/scales/log.d.ts +9 -0
- package/dist/viewport/scales/time.d.ts +7 -0
- package/dist/viewport/viewport-sizer.d.ts +15 -0
- package/dist/viewport/visible-window.d.ts +5 -0
- package/package.json +41 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { XAxisTick } from '../rendering/draw/axis';
|
|
2
|
+
/** Breathing room (CSS px) between the y-axis spine and the leftmost /
|
|
3
|
+
* rightmost bar's edge. Without it, the first bar visually touches the
|
|
4
|
+
* axis (the half-slot inset alone gives a tiny gap that disappears at
|
|
5
|
+
* high bar counts). 6 px matches the cross-chart `gapUnit × 3` rhythm -
|
|
6
|
+
* same breathing room the spec wants between any two adjacent
|
|
7
|
+
* rectangular marks, applied at the chart edges. */
|
|
8
|
+
export declare const AXIS_BAR_GAP_PX = 6;
|
|
9
|
+
export interface CategoryLayout {
|
|
10
|
+
/** Pixel position of each bar's center. Bar `i` is at `centerPx[i]`. */
|
|
11
|
+
readonly centerPx: Float64Array;
|
|
12
|
+
/** Slot width in CSS px - the equal share each bar gets along the
|
|
13
|
+
* category axis after `AXIS_BAR_GAP_PX` is reserved on each side. */
|
|
14
|
+
readonly slotWidth: number;
|
|
15
|
+
/** First bar's center pixel. Equals `innerLeft + halfSlot` where
|
|
16
|
+
* `halfSlot = slotWidth/2 + AXIS_BAR_GAP_PX`. */
|
|
17
|
+
readonly firstCenterPx: number;
|
|
18
|
+
/** Last bar's center pixel. */
|
|
19
|
+
readonly lastCenterPx: number;
|
|
20
|
+
}
|
|
21
|
+
/** Compute the per-slot layout for N bars across the [innerLeft,
|
|
22
|
+
* innerRight] range, leaving `AXIS_BAR_GAP_PX` of breathing room at
|
|
23
|
+
* each edge. */
|
|
24
|
+
export declare function computeCategoryLayout(N: number, innerLeft: number, innerRight: number): CategoryLayout;
|
|
25
|
+
/** Generate an x-axis tick per bar (or every Kth at high N). Each tick
|
|
26
|
+
* carries the bar's actual time as `atMs` and a formatted label.
|
|
27
|
+
* Stride = `ceil(N / targetLabelCount)` so the rendered label count
|
|
28
|
+
* stays close to the requested target regardless of bar count.
|
|
29
|
+
*
|
|
30
|
+
* Caller is responsible for `xToPx` mapping (the lib's `xToPxLinear`
|
|
31
|
+
* does the work consistently with `computeCategoryLayout`). */
|
|
32
|
+
export declare function buildBarPositionTicks(times: Float64Array, N: number, targetLabelCount: number, formatLabel: (atMs: number) => string): XAxisTick[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Filter ticks to those whose mapped pixel position lies in `[loPx, hiPx]`.
|
|
3
|
+
* Bounds inclusive on both ends - a tick exactly at the boundary is on the
|
|
4
|
+
* chart frame and should render.
|
|
5
|
+
*
|
|
6
|
+
* Allocates a fresh array; called at layout time, not per frame.
|
|
7
|
+
*/
|
|
8
|
+
export declare function clipTicks<T>(ticks: readonly T[], mapToPx: (tick: T) => number, loPx: number, hiPx: number): T[];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { type LinearScale, linearScale } from './scales/linear';
|
|
2
|
+
export { type TimeScale, createWallClockTimeScale } from './scales/time';
|
|
3
|
+
export { type Viewport, type ViewportSizerOptions, computeViewport, } from './viewport-sizer';
|
|
4
|
+
export { type VisibleWindow, visibleWindow } from './visible-window';
|
|
5
|
+
export { niceTicks, type NiceTick, type NiceTicksOptions } from './nice-ticks';
|
|
6
|
+
export { clipTicks } from './clip-ticks';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface NiceTick {
|
|
2
|
+
value: number;
|
|
3
|
+
label: string;
|
|
4
|
+
}
|
|
5
|
+
export interface NiceTicksOptions {
|
|
6
|
+
target?: number;
|
|
7
|
+
format?: (v: number, step: number) => string;
|
|
8
|
+
}
|
|
9
|
+
export declare function niceTicks(min: number, max: number, options?: NiceTicksOptions): NiceTick[];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { XAxisTick } from '../rendering/draw/axis';
|
|
2
|
+
export interface NiceTimeTicksOptions {
|
|
3
|
+
target?: number;
|
|
4
|
+
locale?: string;
|
|
5
|
+
timeZone?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function niceTimeTicks(startMs: number, endMs: number, options?: NiceTimeTicksOptions): XAxisTick[];
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export type Orientation = "vertical" | "horizontal";
|
|
2
|
+
/** Per-corner radii for `drawBar` - top-left, top-right, bottom-right,
|
|
3
|
+
* bottom-left. Following the Canvas2D convention: the first two are
|
|
4
|
+
* the top edge corners (left → right), the last two are the bottom
|
|
5
|
+
* edge corners (right → left). */
|
|
6
|
+
export interface CornerRadii {
|
|
7
|
+
tl: number;
|
|
8
|
+
tr: number;
|
|
9
|
+
br: number;
|
|
10
|
+
bl: number;
|
|
11
|
+
}
|
|
12
|
+
/** Bar-on-baseline corner rule. The corners
|
|
13
|
+
* on the away-from-baseline edge round; the corners that sit flush on
|
|
14
|
+
* the baseline stay sharp.
|
|
15
|
+
*
|
|
16
|
+
* Vertical positive (bar rises UP from baseline at bottom):
|
|
17
|
+
* away-from-baseline edge = top → tl, tr round; bl, br flush.
|
|
18
|
+
* Vertical negative (bar drops DOWN from baseline at top):
|
|
19
|
+
* away-from-baseline edge = bottom → bl, br round; tl, tr flush.
|
|
20
|
+
* Horizontal positive (bar extends RIGHT from baseline at left):
|
|
21
|
+
* away-from-baseline edge = right → tr, br round; tl, bl flush.
|
|
22
|
+
* Horizontal negative (bar extends LEFT from baseline at right):
|
|
23
|
+
* away-from-baseline edge = left → tl, bl round; tr, br flush.
|
|
24
|
+
*
|
|
25
|
+
* Caller passes `r` = the resolved cornerRadius; the helper picks the
|
|
26
|
+
* two corners that round and zeros the others. */
|
|
27
|
+
export declare function cornersForBaseline(orientation: Orientation, positive: boolean, r: number): CornerRadii;
|
|
28
|
+
/** Stacked-segment edge-only corner rule (stack
|
|
29
|
+
* variant). Only the OUTERMOST band in a stack rounds the corners that
|
|
30
|
+
* face away from the baseline; all inner segment-to-segment edges stay
|
|
31
|
+
* sharp so neighbors butt together cleanly.
|
|
32
|
+
*
|
|
33
|
+
* Vertical positive stack: outermost = max-top band → round tl, tr.
|
|
34
|
+
* Vertical negative stack: outermost = min-top band → round bl, br.
|
|
35
|
+
* Horizontal positive stack: outermost = max-right band → round tr, br.
|
|
36
|
+
* Horizontal negative stack: outermost = min-left band → round tl, bl.
|
|
37
|
+
*
|
|
38
|
+
* Inner bands return all-zero radii. */
|
|
39
|
+
export declare function cornersForStackBand(orientation: Orientation, stackPositive: boolean, isOutermost: boolean, r: number): CornerRadii;
|
|
40
|
+
/** Computes a bar's pixel rect given:
|
|
41
|
+
* - `slotCenter`: pixel position on the category axis (x in vert,
|
|
42
|
+
* y in horz)
|
|
43
|
+
* - `slotMarkSpan`: the bar's extent ALONG the category axis (its
|
|
44
|
+
* "thickness")
|
|
45
|
+
* - `pxA`, `pxB`: two pixel positions along the value axis (e.g.,
|
|
46
|
+
* the baseline pixel and the value pixel; or the segment top and
|
|
47
|
+
* segment baseline for a stacked band). Order doesn't matter -
|
|
48
|
+
* the smaller becomes the rect's "top/left" edge.
|
|
49
|
+
*
|
|
50
|
+
* Returns `{ x, y, w, h }` ready for `drawBar`. */
|
|
51
|
+
export declare function barRect(orientation: Orientation, slotCenter: number, slotMarkSpan: number, pxA: number, pxB: number): {
|
|
52
|
+
x: number;
|
|
53
|
+
y: number;
|
|
54
|
+
w: number;
|
|
55
|
+
h: number;
|
|
56
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface PadDomainOpts {
|
|
2
|
+
/** Domain-space value where the chart anchors visual content (e.g.,
|
|
3
|
+
* bars sit on `0`, area fill sits at `baselineY`). When this value
|
|
4
|
+
* is at or below `min`, the lower side gets no padding (the anchor
|
|
5
|
+
* sits flush with the bottom edge). When at or above `max`, the
|
|
6
|
+
* upper side gets no padding. Both-extreme is also supported (no
|
|
7
|
+
* padding applied at all - degenerate case, lib clamps it). */
|
|
8
|
+
readonly anchorValue?: number;
|
|
9
|
+
/** Padding ratio of the visible range. Default `0.05`. */
|
|
10
|
+
readonly padding?: number;
|
|
11
|
+
}
|
|
12
|
+
export interface PaddedDomain {
|
|
13
|
+
readonly min: number;
|
|
14
|
+
readonly max: number;
|
|
15
|
+
}
|
|
16
|
+
export declare function padDomain(min: number, max: number, opts?: PadDomainOpts): PaddedDomain;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface LinearScale {
|
|
2
|
+
toPx(v: number): number;
|
|
3
|
+
fromPx(p: number): number;
|
|
4
|
+
readonly domainMin: number;
|
|
5
|
+
readonly domainMax: number;
|
|
6
|
+
readonly rangeStart: number;
|
|
7
|
+
readonly rangeEnd: number;
|
|
8
|
+
}
|
|
9
|
+
export declare function linearScale(domainMin: number, domainMax: number, rangeStart: number, rangeEnd: number): LinearScale;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface LogScale {
|
|
2
|
+
toPx(v: number): number;
|
|
3
|
+
fromPx(p: number): number;
|
|
4
|
+
readonly domainMin: number;
|
|
5
|
+
readonly domainMax: number;
|
|
6
|
+
readonly rangeStart: number;
|
|
7
|
+
readonly rangeEnd: number;
|
|
8
|
+
}
|
|
9
|
+
export declare function logScale(domainMin: number, domainMax: number, rangeStart: number, rangeEnd: number): LogScale;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface TimeScale {
|
|
2
|
+
toPx(tMs: number): number;
|
|
3
|
+
fromPx(p: number): number;
|
|
4
|
+
free(): void;
|
|
5
|
+
[Symbol.dispose](): void;
|
|
6
|
+
}
|
|
7
|
+
export declare function createWallClockTimeScale(startMs: number, endMs: number, rangeStart: number, rangeEnd: number): Promise<TimeScale>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface Viewport {
|
|
2
|
+
cssWidth: number;
|
|
3
|
+
cssHeight: number;
|
|
4
|
+
dpr: number;
|
|
5
|
+
backingWidth: number;
|
|
6
|
+
backingHeight: number;
|
|
7
|
+
}
|
|
8
|
+
export interface ViewportSizerOptions {
|
|
9
|
+
cssWidth: number;
|
|
10
|
+
cssHeight: number;
|
|
11
|
+
dpr: number;
|
|
12
|
+
dprCap?: number;
|
|
13
|
+
fastMode?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare function computeViewport(opts: ViewportSizerOptions): Viewport;
|
package/package.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@abdullahjaswal/tickyr-charts-solid",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Tickyr Charts for SolidJS: opinionated, canvas-rendered trading and financial-data charts, powered by a vendored Rust/WASM engine.",
|
|
5
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/AbdullahJaswal/tickyr-charts.git",
|
|
10
|
+
"directory": "packages/solid"
|
|
11
|
+
},
|
|
12
|
+
"publishConfig": {
|
|
13
|
+
"access": "public"
|
|
14
|
+
},
|
|
15
|
+
"main": "./dist/index.js",
|
|
16
|
+
"module": "./dist/index.js",
|
|
17
|
+
"types": "./dist/solid/index.d.ts",
|
|
18
|
+
"exports": {
|
|
19
|
+
".": {
|
|
20
|
+
"types": "./dist/solid/index.d.ts",
|
|
21
|
+
"import": "./dist/index.js"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
"dist"
|
|
26
|
+
],
|
|
27
|
+
"engines": {
|
|
28
|
+
"node": ">=22.13.0"
|
|
29
|
+
},
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"d3-array": "^3.2.4",
|
|
32
|
+
"d3-format": "^3.1.2",
|
|
33
|
+
"d3-scale": "^4.0.2",
|
|
34
|
+
"d3-shape": "^3.2.0",
|
|
35
|
+
"d3-time-format": "^4.1.0",
|
|
36
|
+
"d3-zoom": "^3.0.0"
|
|
37
|
+
},
|
|
38
|
+
"peerDependencies": {
|
|
39
|
+
"solid-js": "^1.9.0"
|
|
40
|
+
}
|
|
41
|
+
}
|