@blueprint-chart/lib 0.1.8 → 0.1.12
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/dist/charts/frame/frame.d.ts +1 -1
- package/dist/charts/types.d.ts +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3302 -3194
- package/dist/render/ast-to-definition.d.ts +3 -0
- package/dist/render/cross-type-fade.d.ts +3 -0
- package/dist/render/index.d.ts +5 -0
- package/dist/render/layout-constraints.d.ts +6 -0
- package/dist/render/post-render.d.ts +6 -0
- package/dist/render/render-bpc.d.ts +2 -0
- package/dist/render/render-chart.d.ts +2 -0
- package/dist/render/resolve-scene.d.ts +2 -0
- package/dist/render/types.d.ts +42 -0
- package/package.json +9 -9
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare function snapshotIfTypeChanged(container: HTMLElement, newChartType: string, transition: boolean): HTMLElement | null;
|
|
2
|
+
export declare function commitCrossTypeFade(container: HTMLElement, newChartType: string, overlay: HTMLElement | null): void;
|
|
3
|
+
export declare function clearCrossTypeMarker(container: HTMLElement): void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { renderBpc } from './render-bpc';
|
|
2
|
+
export { renderChart } from './render-chart';
|
|
3
|
+
export { astToDefinition } from './ast-to-definition';
|
|
4
|
+
export { resolveScene } from './resolve-scene';
|
|
5
|
+
export type { ChartDefinition, RenderOptions, ResolvedChartState } from './types';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { PropertyNode } from '../dsl/types';
|
|
2
|
+
import { RenderOptions } from './types';
|
|
3
|
+
export interface LayoutResult {
|
|
4
|
+
constrained: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare function applyLayoutConstraints(container: HTMLElement, properties: PropertyNode[] | undefined, options: RenderOptions): LayoutResult;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { SortDirection, SortMode } from '../enums';
|
|
2
|
+
import { ChartData, ChartTypeOptions, ColorizeConfig, HighlightConfig, AreaFillConfig, AnnotationConfig, SeriesOverride, FrameOptions } from '../charts/types';
|
|
3
|
+
import { PropertyNode, SceneNode } from '../dsl/types';
|
|
4
|
+
export interface ChartDefinition {
|
|
5
|
+
chartType: string;
|
|
6
|
+
data: ChartData;
|
|
7
|
+
options?: Partial<ChartTypeOptions>;
|
|
8
|
+
properties?: PropertyNode[];
|
|
9
|
+
frame?: FrameOptions;
|
|
10
|
+
colorizes?: ColorizeConfig[];
|
|
11
|
+
highlights?: HighlightConfig[];
|
|
12
|
+
areaFills?: AreaFillConfig[];
|
|
13
|
+
annotations?: AnnotationConfig[];
|
|
14
|
+
seriesOverrides?: SeriesOverride[];
|
|
15
|
+
scenes?: SceneNode[];
|
|
16
|
+
sort?: SortDirection;
|
|
17
|
+
sortMode?: SortMode;
|
|
18
|
+
theme?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface RenderOptions {
|
|
21
|
+
sceneIndex?: number;
|
|
22
|
+
transition?: boolean;
|
|
23
|
+
thumbnail?: boolean;
|
|
24
|
+
stripColors?: boolean;
|
|
25
|
+
ignoreLayout?: boolean;
|
|
26
|
+
padding?: string;
|
|
27
|
+
theme?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface ResolvedChartState {
|
|
30
|
+
chartType: string;
|
|
31
|
+
data: ChartData;
|
|
32
|
+
options: Partial<ChartTypeOptions>;
|
|
33
|
+
frame?: FrameOptions;
|
|
34
|
+
colorizes: ColorizeConfig[];
|
|
35
|
+
highlights: HighlightConfig[];
|
|
36
|
+
areaFills: AreaFillConfig[];
|
|
37
|
+
annotations: AnnotationConfig[];
|
|
38
|
+
seriesOverrides: SeriesOverride[];
|
|
39
|
+
sort?: SortDirection;
|
|
40
|
+
sortMode?: SortMode;
|
|
41
|
+
theme?: string;
|
|
42
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blueprint-chart/lib",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.12",
|
|
4
4
|
"description": "DSL-driven charting library built on D3. Define charts as text, render them anywhere.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"chart",
|
|
@@ -45,6 +45,13 @@
|
|
|
45
45
|
"access": "public",
|
|
46
46
|
"provenance": true
|
|
47
47
|
},
|
|
48
|
+
"scripts": {
|
|
49
|
+
"generate:parser": "peggy --format es -o src/dsl/grammar.js src/dsl/grammar.peggy",
|
|
50
|
+
"prebuild": "pnpm run generate:parser",
|
|
51
|
+
"pretest": "pnpm run generate:parser",
|
|
52
|
+
"build": "vite build && vite build -c vite.lib.config.ts",
|
|
53
|
+
"test": "vitest run"
|
|
54
|
+
},
|
|
48
55
|
"dependencies": {
|
|
49
56
|
"@floating-ui/dom": "^1.7.5",
|
|
50
57
|
"chroma-js": "^3.2.0",
|
|
@@ -62,12 +69,5 @@
|
|
|
62
69
|
"vite": "^6",
|
|
63
70
|
"vite-plugin-dts": "^5.0.0",
|
|
64
71
|
"vitest": "^3"
|
|
65
|
-
},
|
|
66
|
-
"scripts": {
|
|
67
|
-
"generate:parser": "peggy --format es -o src/dsl/grammar.js src/dsl/grammar.peggy",
|
|
68
|
-
"prebuild": "pnpm run generate:parser",
|
|
69
|
-
"pretest": "pnpm run generate:parser",
|
|
70
|
-
"build": "vite build && vite build -c vite.lib.config.ts",
|
|
71
|
-
"test": "vitest run"
|
|
72
72
|
}
|
|
73
|
-
}
|
|
73
|
+
}
|