@blueprint-chart/lib 1.8.2 → 2.0.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/dist/charts/axis-options.d.ts +3 -0
- package/dist/charts/canvas/canvas.d.ts +2 -5
- package/dist/charts/category-label-line.d.ts +16 -0
- package/dist/charts/chart-helpers.d.ts +2 -3
- package/dist/charts/chart-options.d.ts +2 -0
- package/dist/charts/contrast.d.ts +4 -3
- package/dist/charts/date-parse.d.ts +6 -0
- package/dist/charts/frame/frame.d.ts +6 -0
- package/dist/charts/parse-data.d.ts +2 -0
- package/dist/charts/plugins/annotations/position-helpers.d.ts +7 -0
- package/dist/charts/plugins/highlight.d.ts +9 -3
- package/dist/charts/scale-helpers.d.ts +15 -8
- package/dist/charts/series-helpers.d.ts +22 -1
- package/dist/charts/stack-helpers.d.ts +1 -1
- package/dist/charts/themes/index.d.ts +6 -0
- package/dist/charts/types.d.ts +10 -4
- package/dist/charts/value-label-fit.d.ts +31 -0
- package/dist/dsl/converter.d.ts +5 -0
- package/dist/dsl/quoting.d.ts +16 -0
- package/dist/dsl/types.d.ts +42 -0
- package/dist/dsl/validate.d.ts +6 -0
- package/dist/embed.js +1 -1
- package/dist/enums.d.ts +23 -0
- package/dist/index.d.ts +9 -1
- package/dist/index.js +615 -296
- package/dist/lib/lib.iife.js +44 -15
- package/dist/node-backend/index.js +3192 -2108
- package/dist/render/chart-a11y.d.ts +14 -0
- package/dist/render/frame-svg.d.ts +51 -0
- package/dist/render/index.d.ts +3 -0
- package/dist/render/post-render.d.ts +2 -0
- package/dist/{render-bpc-By-iMMKD.js → render-bpc-BWiUALXY.js} +3976 -2860
- package/dist/runtime/chart-css.d.ts +1 -1
- package/dist/runtime-DDhsXDn5.js +84 -0
- package/dist/runtime.js +2 -2
- package/dist/transforms/applyFilter.d.ts +2 -0
- package/dist/transforms/applyGroupBy.d.ts +2 -0
- package/dist/transforms/applyHideColumns.d.ts +2 -0
- package/dist/transforms/applyParse.d.ts +3 -0
- package/dist/transforms/applyRename.d.ts +2 -0
- package/dist/transforms/applySort.d.ts +2 -0
- package/dist/transforms/applyTranspose.d.ts +2 -0
- package/dist/transforms/index.d.ts +30 -0
- package/dist/transforms/parseOperations.d.ts +15 -0
- package/dist/transforms/shared.d.ts +4 -0
- package/dist/transforms/table.d.ts +22 -0
- package/dist/transforms/transformValue.d.ts +1 -0
- package/dist/transforms/types.d.ts +13 -0
- package/package.json +1 -1
- package/src/charts/chart.scss +29 -4
- package/dist/runtime-BnrDRLyH.js +0 -84
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ChartData, FrameOptions } from '../charts/types';
|
|
2
|
+
export interface ChartAccessibility {
|
|
3
|
+
/** Accessible name: what a screen reader announces for the graphic. */
|
|
4
|
+
label: string;
|
|
5
|
+
/** Long description: the author's own, then a summary of the plotted data. */
|
|
6
|
+
description: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function buildChartAccessibility(chartType: string, frame: FrameOptions | null | undefined, data: ChartData): ChartAccessibility;
|
|
9
|
+
/**
|
|
10
|
+
* Without this the plot is an unlabelled pile of shapes: assistive technology
|
|
11
|
+
* walks into the marks and announces nothing about the graphic. `role="img"`
|
|
12
|
+
* collapses the subtree to one node, and `aria-label` names it.
|
|
13
|
+
*/
|
|
14
|
+
export declare function applyChartAccessibility(svg: SVGSVGElement, a11y: ChartAccessibility): void;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { FrameOptions } from '../charts/types';
|
|
2
|
+
import { ChartAccessibility } from './chart-a11y';
|
|
3
|
+
export interface FrameSvgTextBlock {
|
|
4
|
+
text: string;
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
fontSize: number;
|
|
8
|
+
fontWeight?: string;
|
|
9
|
+
fontStyle?: string;
|
|
10
|
+
fontFamily?: string;
|
|
11
|
+
fill?: string;
|
|
12
|
+
anchor?: 'start' | 'middle' | 'end';
|
|
13
|
+
}
|
|
14
|
+
export interface FrameSvgPlot {
|
|
15
|
+
x: number;
|
|
16
|
+
y: number;
|
|
17
|
+
width: number;
|
|
18
|
+
height: number;
|
|
19
|
+
}
|
|
20
|
+
export interface FrameSvgLayout {
|
|
21
|
+
width: number;
|
|
22
|
+
height: number;
|
|
23
|
+
plot: FrameSvgPlot;
|
|
24
|
+
blocks: FrameSvgTextBlock[];
|
|
25
|
+
background: string | null;
|
|
26
|
+
color: string;
|
|
27
|
+
fontFamily: string;
|
|
28
|
+
}
|
|
29
|
+
export interface FrameTheme {
|
|
30
|
+
background: string;
|
|
31
|
+
color: string;
|
|
32
|
+
}
|
|
33
|
+
export interface FrameSvgLayoutOptions {
|
|
34
|
+
width: number;
|
|
35
|
+
height: number;
|
|
36
|
+
frame?: FrameOptions | null;
|
|
37
|
+
theme?: string;
|
|
38
|
+
}
|
|
39
|
+
export declare function resolveFrameTheme(theme?: string): FrameTheme;
|
|
40
|
+
/**
|
|
41
|
+
* Lay the frame chrome out in SVG user units and reserve what is left for the
|
|
42
|
+
* plot. The caller renders the chart at `plot.width` x `plot.height` and hands
|
|
43
|
+
* the markup back to `buildFrameSvg`.
|
|
44
|
+
*/
|
|
45
|
+
export declare function layoutFrameSvg(opts: FrameSvgLayoutOptions): FrameSvgLayout;
|
|
46
|
+
/**
|
|
47
|
+
* Compose the frame chrome and a rendered plot into one standalone SVG. The
|
|
48
|
+
* chrome is native `<text>`, so the result survives rasterization and a bare
|
|
49
|
+
* `.svg` file with no stylesheet.
|
|
50
|
+
*/
|
|
51
|
+
export declare function buildFrameSvg(layout: FrameSvgLayout, plotSvg: string, a11y: ChartAccessibility): string;
|
package/dist/render/index.d.ts
CHANGED
|
@@ -6,3 +6,6 @@ export type { ChartDefinition, RenderOptions, ResolvedChartState } from './types
|
|
|
6
6
|
export { render } from './public-render';
|
|
7
7
|
export type { ChartHandle, RenderApiOptions, OutputOptions } from './public-render';
|
|
8
8
|
export { ChartParseError, PngBrowserUnsupportedError, MissingNodeRenderDepsError } from './errors';
|
|
9
|
+
export { buildFrameSvg } from './frame-svg';
|
|
10
|
+
export type { FrameSvgLayout, FrameSvgTextBlock, FrameSvgPlot } from './frame-svg';
|
|
11
|
+
export type { ChartAccessibility } from './chart-a11y';
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { LayoutResult } from './layout-constraints';
|
|
2
|
+
import { ChartAccessibility } from './chart-a11y';
|
|
2
3
|
interface PostRenderArgs {
|
|
3
4
|
theme?: string;
|
|
5
|
+
accessibility?: ChartAccessibility;
|
|
4
6
|
}
|
|
5
7
|
export declare function applyPostRender(container: HTMLElement, args: PostRenderArgs, layout: LayoutResult): void;
|
|
6
8
|
export {};
|