bbdata-cli 0.2.0 → 0.3.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.
@@ -71,6 +71,51 @@ interface ValidationResult {
71
71
  */
72
72
  declare function report(options: ReportOptions): Promise<ReportResult>;
73
73
 
74
+ type ChartType = 'movement' | 'spray' | 'zone' | 'rolling';
75
+ type VizFormat = 'svg' | 'png' | 'pdf' | 'html';
76
+ /**
77
+ * Audience vocabulary for visualization styling.
78
+ * This is a superset of the report Audience type. The report layer uses
79
+ * 'gm'/'scout' as role labels; the viz layer uses 'frontoffice'/'presentation'
80
+ * as presentation-style labels. `resolveVizAudience` maps between them.
81
+ */
82
+ type VizAudience = 'coach' | 'analyst' | 'frontoffice' | 'presentation';
83
+ interface VizOptions {
84
+ type: ChartType;
85
+ player?: string;
86
+ players?: string[];
87
+ season?: number;
88
+ audience?: Audience | VizAudience;
89
+ format?: VizFormat;
90
+ width?: number;
91
+ height?: number;
92
+ colorblind?: boolean;
93
+ output?: string;
94
+ source?: string;
95
+ stdin?: boolean;
96
+ cache?: boolean;
97
+ title?: string;
98
+ }
99
+ interface VizResult {
100
+ svg: string;
101
+ spec: object;
102
+ meta: {
103
+ chartType: ChartType;
104
+ player: string;
105
+ season: number;
106
+ audience: VizAudience;
107
+ rowCount: number;
108
+ source: string;
109
+ width: number;
110
+ height: number;
111
+ };
112
+ }
113
+
114
+ /**
115
+ * Programmatic API — skills and agents call this directly.
116
+ */
117
+ declare function viz(options: VizOptions): Promise<VizResult>;
118
+
74
119
  declare const ConfigSchema: z.ZodObject<{
75
120
  defaultTeam: z.ZodOptional<z.ZodString>;
76
121
  defaultFormat: z.ZodDefault<z.ZodEnum<["json", "table", "csv", "markdown"]>>;
@@ -225,6 +270,8 @@ declare const PitchDataSchema: z.ZodObject<{
225
270
  plate_z: z.ZodNumber;
226
271
  launch_speed: z.ZodNullable<z.ZodNumber>;
227
272
  launch_angle: z.ZodNullable<z.ZodNumber>;
273
+ hc_x: z.ZodNullable<z.ZodNumber>;
274
+ hc_y: z.ZodNullable<z.ZodNumber>;
228
275
  description: z.ZodString;
229
276
  events: z.ZodNullable<z.ZodString>;
230
277
  bb_type: z.ZodNullable<z.ZodString>;
@@ -247,6 +294,8 @@ declare const PitchDataSchema: z.ZodObject<{
247
294
  plate_z: number;
248
295
  launch_speed: number | null;
249
296
  launch_angle: number | null;
297
+ hc_x: number | null;
298
+ hc_y: number | null;
250
299
  description: string;
251
300
  events: string | null;
252
301
  bb_type: string | null;
@@ -269,6 +318,8 @@ declare const PitchDataSchema: z.ZodObject<{
269
318
  plate_z: number;
270
319
  launch_speed: number | null;
271
320
  launch_angle: number | null;
321
+ hc_x: number | null;
322
+ hc_y: number | null;
272
323
  description: string;
273
324
  events: string | null;
274
325
  bb_type: string | null;
@@ -346,4 +397,4 @@ interface DataAdapter {
346
397
  resolvePlayer(name: string): Promise<PlayerId | null>;
347
398
  }
348
399
 
349
- export { type AdapterQuery, type BbdataConfig, type DataAdapter, type OutputFormat, type PitchData, type PlayerStats, type QueryOptions, type QueryResult, type ReportOptions, type ReportResult, getConfig, query, report, setConfig };
400
+ export { type AdapterQuery, type BbdataConfig, type ChartType, type DataAdapter, type OutputFormat, type PitchData, type PlayerStats, type QueryOptions, type QueryResult, type ReportOptions, type ReportResult, type VizAudience, type VizOptions, type VizResult, getConfig, query, report, setConfig, viz };