@blueprint-chart/lib 0.1.27 → 0.1.29

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.
@@ -0,0 +1,7 @@
1
+ import { Intent, RecommendationFitness, ShapeSignature } from './types';
2
+ export interface RawRec {
3
+ type: string;
4
+ fitness: RecommendationFitness;
5
+ reason: string;
6
+ }
7
+ export declare function resolveCell(shape: ShapeSignature, intent: Intent, rowCount: number): RawRec[];
@@ -0,0 +1,10 @@
1
+ import { ColumnType } from './types';
2
+ export interface RecommendFixture {
3
+ id: string;
4
+ columnTypes: ColumnType[];
5
+ rowCount: number;
6
+ goal: string;
7
+ expectedType: string;
8
+ allowedMiss?: boolean;
9
+ }
10
+ export declare const RECOMMEND_FIXTURES: RecommendFixture[];
@@ -0,0 +1,2 @@
1
+ import { Intent } from './types';
2
+ export declare function classifyIntent(goal?: string): Intent;
@@ -1,9 +1,4 @@
1
- export type ColumnType = 'string' | 'number' | 'date';
2
- export type RecommendationFitness = 'best' | 'good' | 'alternative';
3
- export interface ChartRecommendation {
4
- chartType: string;
5
- label: string;
6
- fitness: RecommendationFitness;
7
- reason: string;
8
- }
9
- export declare function recommendCharts(columnTypes: ColumnType[], rowCount: number): ChartRecommendation[];
1
+ import { ChartRecommendation, ColumnType } from './types';
2
+ export type { ChartRecommendation, ColumnType, RecommendationFitness } from './types';
3
+ export type { Intent, ShapeSignature } from './types';
4
+ export declare function recommendCharts(columnTypes: ColumnType[], rowCount: number, goal?: string): ChartRecommendation[];
@@ -0,0 +1,2 @@
1
+ import { ColumnType, ShapeSignature } from './types';
2
+ export declare function shapeOf(columnTypes: ColumnType[], _rowCount: number): ShapeSignature;
@@ -0,0 +1,11 @@
1
+ export type ColumnType = 'string' | 'number' | 'date';
2
+ export type RecommendationFitness = 'best' | 'good' | 'alternative';
3
+ export interface ChartRecommendation {
4
+ chartType: string;
5
+ label: string;
6
+ fitness: RecommendationFitness;
7
+ reason: string;
8
+ }
9
+ export type Intent = 'trend' | 'comparison' | 'ranking' | 'composition-over-time' | 'part-to-whole' | 'range' | 'none';
10
+ export type ShapeSignature = '1cat+1num' | '1cat+Nnum' | '1date+1num' | '1date+Nnum' | 'other';
11
+ export declare const CHART_LABELS: Record<string, string>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blueprint-chart/lib",
3
- "version": "0.1.27",
3
+ "version": "0.1.29",
4
4
  "description": "DSL-driven charting library built on D3. Define charts as text, render them anywhere.",
5
5
  "keywords": [
6
6
  "chart",