@rokkit/chart 1.0.0-next.155 → 1.0.0-next.159
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/package.json +1 -1
- package/LICENSE +0 -21
- package/dist/Plot/index.d.ts +0 -9
- package/dist/PlotState.svelte.d.ts +0 -75
- package/dist/crossfilter/createCrossFilter.svelte.d.ts +0 -13
- package/dist/elements/index.d.ts +0 -6
- package/dist/geoms/lib/areas.d.ts +0 -52
- package/dist/geoms/lib/bars.d.ts +0 -3
- package/dist/index.d.ts +0 -56
- package/dist/lib/brewer.d.ts +0 -9
- package/dist/lib/brewing/BoxBrewer.svelte.d.ts +0 -8
- package/dist/lib/brewing/CartesianBrewer.svelte.d.ts +0 -8
- package/dist/lib/brewing/PieBrewer.svelte.d.ts +0 -8
- package/dist/lib/brewing/QuartileBrewer.svelte.d.ts +0 -9
- package/dist/lib/brewing/ViolinBrewer.svelte.d.ts +0 -8
- package/dist/lib/brewing/axes.svelte.d.ts +0 -66
- package/dist/lib/brewing/bars.svelte.d.ts +0 -56
- package/dist/lib/brewing/brewer.svelte.d.ts +0 -114
- package/dist/lib/brewing/colors.d.ts +0 -26
- package/dist/lib/brewing/dimensions.svelte.d.ts +0 -35
- package/dist/lib/brewing/index.svelte.d.ts +0 -118
- package/dist/lib/brewing/legends.svelte.d.ts +0 -48
- package/dist/lib/brewing/marks/arcs.d.ts +0 -17
- package/dist/lib/brewing/marks/areas.d.ts +0 -31
- package/dist/lib/brewing/marks/bars.d.ts +0 -1
- package/dist/lib/brewing/marks/boxes.d.ts +0 -24
- package/dist/lib/brewing/marks/lines.d.ts +0 -24
- package/dist/lib/brewing/marks/points.d.ts +0 -55
- package/dist/lib/brewing/marks/violins.d.ts +0 -20
- package/dist/lib/brewing/patterns.d.ts +0 -14
- package/dist/lib/brewing/scales.d.ts +0 -28
- package/dist/lib/brewing/scales.svelte.d.ts +0 -24
- package/dist/lib/brewing/stats.d.ts +0 -23
- package/dist/lib/brewing/symbols.d.ts +0 -7
- package/dist/lib/brewing/types.d.ts +0 -162
- package/dist/lib/chart.d.ts +0 -38
- package/dist/lib/context.d.ts +0 -13
- package/dist/lib/grid.d.ts +0 -72
- package/dist/lib/keyboard-nav.d.ts +0 -15
- package/dist/lib/plot/chartProps.d.ts +0 -177
- package/dist/lib/plot/crossfilter.d.ts +0 -13
- package/dist/lib/plot/facet.d.ts +0 -24
- package/dist/lib/plot/frames.d.ts +0 -47
- package/dist/lib/plot/helpers.d.ts +0 -3
- package/dist/lib/plot/preset.d.ts +0 -29
- package/dist/lib/plot/scales.d.ts +0 -5
- package/dist/lib/plot/stat.d.ts +0 -32
- package/dist/lib/plot/types.d.ts +0 -89
- package/dist/lib/preset.d.ts +0 -30
- package/dist/lib/scales.svelte.d.ts +0 -35
- package/dist/lib/swatch.d.ts +0 -12
- package/dist/lib/ticks.d.ts +0 -36
- package/dist/lib/utils.d.ts +0 -61
- package/dist/lib/xscale.d.ts +0 -11
- package/dist/patterns/index.d.ts +0 -4
- package/dist/patterns/patterns.d.ts +0 -72
- package/dist/patterns/scale.d.ts +0 -30
- package/dist/symbols/constants/index.d.ts +0 -1
- package/dist/symbols/index.d.ts +0 -5
- package/src/patterns/README.md +0 -3
package/dist/lib/utils.d.ts
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Creates appropriate scales based on data and dimensions
|
|
3
|
-
*
|
|
4
|
-
* @param {Array} data The dataset
|
|
5
|
-
* @param {Object} dimensions Chart dimensions
|
|
6
|
-
* @param {Object} [options] Additional options
|
|
7
|
-
* @param {string} options.xKey Field to use for x-axis
|
|
8
|
-
* @param {string} options.yKey Field to use for y-axis
|
|
9
|
-
* @param {string} [options.colorKey] Field to use for color mapping
|
|
10
|
-
* @returns {Object} Object containing xScale, yScale, and colorScale
|
|
11
|
-
*/
|
|
12
|
-
export function createScales(data: any[], dimensions: Object, options?: {
|
|
13
|
-
xKey: string;
|
|
14
|
-
yKey: string;
|
|
15
|
-
colorKey?: string | undefined;
|
|
16
|
-
}): Object;
|
|
17
|
-
/**
|
|
18
|
-
* Calculates the actual chart dimensions after applying margins
|
|
19
|
-
*
|
|
20
|
-
* @param {Object} dimensions Original dimensions
|
|
21
|
-
* @returns {Object} Dimensions with calculated inner width and height
|
|
22
|
-
*/
|
|
23
|
-
export function calculateChartDimensions(dimensions: Object): Object;
|
|
24
|
-
/**
|
|
25
|
-
* Normalizes data for use with D3 charts
|
|
26
|
-
*
|
|
27
|
-
* @param {Array|Object} inputData Raw data or dataset object
|
|
28
|
-
* @returns {Array} Normalized data array
|
|
29
|
-
*/
|
|
30
|
-
export function normalizeData(inputData: any[] | Object): any[];
|
|
31
|
-
/**
|
|
32
|
-
* Generates a unique ID for SVG elements
|
|
33
|
-
*
|
|
34
|
-
* @param {string} prefix Prefix for the ID
|
|
35
|
-
* @returns {string} A unique ID
|
|
36
|
-
*/
|
|
37
|
-
export function uniqueId(prefix?: string): string;
|
|
38
|
-
/**
|
|
39
|
-
* Formats tooltip content for a data point
|
|
40
|
-
*
|
|
41
|
-
* @param {Object} d Data point
|
|
42
|
-
* @param {Object} options Tooltip format options
|
|
43
|
-
* @returns {string} Formatted tooltip HTML content
|
|
44
|
-
*/
|
|
45
|
-
export function formatTooltipContent(d: Object, options?: Object): string;
|
|
46
|
-
/**
|
|
47
|
-
* Generates a tooltip formatter function
|
|
48
|
-
*
|
|
49
|
-
* @param {Object} options Tooltip format options
|
|
50
|
-
* @returns {Function} A function that formats tooltip content
|
|
51
|
-
*/
|
|
52
|
-
export function createTooltipFormatter(options?: Object): Function;
|
|
53
|
-
/**
|
|
54
|
-
* Calculates the transform attribute for SVG elements
|
|
55
|
-
*
|
|
56
|
-
* @param {number} x X position
|
|
57
|
-
* @param {number} y Y position
|
|
58
|
-
* @returns {string} Transform attribute value
|
|
59
|
-
*/
|
|
60
|
-
export function transform(x: number, y: number): string;
|
|
61
|
-
export function scaledPathCollection(paths: any): {};
|
package/dist/lib/xscale.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Builds an appropriate D3 x-axis scale based on value types.
|
|
3
|
-
* Returns scaleTime for Date values, scaleLinear for numeric values,
|
|
4
|
-
* or scaleBand for categorical values.
|
|
5
|
-
*
|
|
6
|
-
* @param {Array} xValues
|
|
7
|
-
* @param {Object} dimensions
|
|
8
|
-
* @param {number} padding
|
|
9
|
-
* @returns {import('d3-scale').ScaleContinuousNumeric|import('d3-scale').ScaleBand}
|
|
10
|
-
*/
|
|
11
|
-
export function buildXScale(xValues: any[], dimensions: Object, padding: number): any | any;
|
package/dist/patterns/index.d.ts
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Unified pattern library.
|
|
3
|
-
*
|
|
4
|
-
* Each entry is an array of mark descriptors. All geometry is in normalized
|
|
5
|
-
* 0–1 coordinates; the renderer scales by `size` at paint time.
|
|
6
|
-
*
|
|
7
|
-
* Mark types
|
|
8
|
-
* ----------
|
|
9
|
-
* circle { cx, cy, r }
|
|
10
|
-
* line { x1, y1, x2, y2 } coordinates may exceed 0–1 for seamless tiling
|
|
11
|
-
* polygon { points: [x,y][] }
|
|
12
|
-
* rect { x, y, w, h }
|
|
13
|
-
* path { d: [cmd, ...args][] } SVG path commands as nested arrays (H/V take one arg)
|
|
14
|
-
*
|
|
15
|
-
* Appearance
|
|
16
|
-
* ----------
|
|
17
|
-
* fill: true → element uses fill color (stroke: none)
|
|
18
|
-
* fill: false → element uses stroke color (fill: none) ← default
|
|
19
|
-
* fillOpacity: n → applied as fill-opacity on filled marks
|
|
20
|
-
* opacity: n → applied as opacity on any mark
|
|
21
|
-
*/
|
|
22
|
-
/** @typedef {{ type: 'circle', cx: number, cy: number, r: number, fill?: boolean, fillOpacity?: number, opacity?: number }} CircleMark */
|
|
23
|
-
/** @typedef {{ type: 'line', x1: number, y1: number, x2: number, y2: number, fill?: false, strokeWidth?: number }} LineMark */
|
|
24
|
-
/** @typedef {{ type: 'polygon', points: [number,number][], fill?: boolean, fillOpacity?: number, opacity?: number }} PolygonMark */
|
|
25
|
-
/** @typedef {{ type: 'rect', x: number, y: number, w: number, h: number, fill?: boolean, fillOpacity?: number, opacity?: number }} RectMark */
|
|
26
|
-
/** @typedef {{ type: 'path', d: (string|number)[][], fill?: boolean, fillOpacity?: number, opacity?: number }} PathMark */
|
|
27
|
-
/** @typedef {CircleMark | LineMark | PolygonMark | RectMark | PathMark} PatternMark */
|
|
28
|
-
/** @type {Record<string, PatternMark[]>} */
|
|
29
|
-
export const PATTERNS: Record<string, PatternMark[]>;
|
|
30
|
-
export type CircleMark = {
|
|
31
|
-
type: "circle";
|
|
32
|
-
cx: number;
|
|
33
|
-
cy: number;
|
|
34
|
-
r: number;
|
|
35
|
-
fill?: boolean;
|
|
36
|
-
fillOpacity?: number;
|
|
37
|
-
opacity?: number;
|
|
38
|
-
};
|
|
39
|
-
export type LineMark = {
|
|
40
|
-
type: "line";
|
|
41
|
-
x1: number;
|
|
42
|
-
y1: number;
|
|
43
|
-
x2: number;
|
|
44
|
-
y2: number;
|
|
45
|
-
fill?: false;
|
|
46
|
-
strokeWidth?: number;
|
|
47
|
-
};
|
|
48
|
-
export type PolygonMark = {
|
|
49
|
-
type: "polygon";
|
|
50
|
-
points: [number, number][];
|
|
51
|
-
fill?: boolean;
|
|
52
|
-
fillOpacity?: number;
|
|
53
|
-
opacity?: number;
|
|
54
|
-
};
|
|
55
|
-
export type RectMark = {
|
|
56
|
-
type: "rect";
|
|
57
|
-
x: number;
|
|
58
|
-
y: number;
|
|
59
|
-
w: number;
|
|
60
|
-
h: number;
|
|
61
|
-
fill?: boolean;
|
|
62
|
-
fillOpacity?: number;
|
|
63
|
-
opacity?: number;
|
|
64
|
-
};
|
|
65
|
-
export type PathMark = {
|
|
66
|
-
type: "path";
|
|
67
|
-
d: (string | number)[][];
|
|
68
|
-
fill?: boolean;
|
|
69
|
-
fillOpacity?: number;
|
|
70
|
-
opacity?: number;
|
|
71
|
-
};
|
|
72
|
-
export type PatternMark = CircleMark | LineMark | PolygonMark | RectMark | PathMark;
|
package/dist/patterns/scale.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Scale all geometric coordinates in a mark by `size`.
|
|
3
|
-
* Renames rect `w`/`h` to `width`/`height` and converts polygon/path to strings.
|
|
4
|
-
* @param {PatternMark} mark
|
|
5
|
-
* @param {number} size
|
|
6
|
-
* @returns {object}
|
|
7
|
-
*/
|
|
8
|
-
export function scaleMark(mark: PatternMark, size: number): object;
|
|
9
|
-
/**
|
|
10
|
-
* Resolve a scaled mark into SVG-ready `{ type, attrs }`.
|
|
11
|
-
* `attrs` can be spread directly onto the SVG element.
|
|
12
|
-
*
|
|
13
|
-
* Per-mark overrides respected:
|
|
14
|
-
* mark.strokeWidth → `stroke-width` (takes precedence over `thickness`)
|
|
15
|
-
* mark.fillOpacity → `fill-opacity`
|
|
16
|
-
* mark.opacity → `opacity`
|
|
17
|
-
*
|
|
18
|
-
* @param {object} scaledMark Output of scaleMark
|
|
19
|
-
* @param {{ fill: string, stroke: string, thickness: number }} appearance
|
|
20
|
-
* @returns {{ type: string, attrs: object }}
|
|
21
|
-
*/
|
|
22
|
-
export function resolveMarkAttrs(scaledMark: object, { fill, stroke, thickness }: {
|
|
23
|
-
fill: string;
|
|
24
|
-
stroke: string;
|
|
25
|
-
thickness: number;
|
|
26
|
-
}): {
|
|
27
|
-
type: string;
|
|
28
|
-
attrs: object;
|
|
29
|
-
};
|
|
30
|
-
import type { PatternMark } from './patterns.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const namedShapes: {};
|
package/dist/symbols/index.d.ts
DELETED
package/src/patterns/README.md
DELETED