@opendata-ai/openchart-vue 7.11.0 → 8.0.0-rc.1

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/index.d.ts CHANGED
@@ -1,10 +1,11 @@
1
- import { BarListSpec, ThemeConfig, DarkMode, ChartSpec, LayerSpec, GraphSpec, ElementRef, MarkEvent, Annotation, TextAnnotation, AnnotationOffset, ElementEdit, ChartLayout, TableSpec, SortState, SankeySpec, TileMapSpec, VizSpec } from '@opendata-ai/openchart-core';
1
+ import { BarListSpec, ThemeConfig, DarkMode, ChartSpec, LayerSpec, GraphSpec, ElementRef, MarkEvent, Annotation, TextAnnotation, AnnotationOffset, ElementEdit, MapSpec, ChartLayout, TableSpec, SortState, SankeySpec, TileMapSpec, VizSpec } from '@opendata-ai/openchart-core';
2
2
  export * from '@opendata-ai/openchart-core';
3
3
  import { MountOptions, ChartInstance, GraphInstance, TableInstance, TableState, TableMountOptions } from '@opendata-ai/openchart-vanilla';
4
4
  export { JPGExportOptions, PNGExportOptions, exportCSV, exportJPG, exportPNG, exportSVG } from '@opendata-ai/openchart-vanilla';
5
- export { ChartRenderer, CompileResult, CompiledGraphEdge, CompiledGraphNode, GraphCompilation, NormalizedBarListSpec, NormalizedChartSpec, NormalizedChrome, NormalizedGraphSpec, NormalizedSankeySpec, NormalizedSpec, NormalizedTableSpec, SimulationConfig, ValidationError, ValidationErrorCode, ValidationResult, clearRenderers, compile, compileBarList, compileChart, compileGraph, compileSankey, compileTable, getChartRenderer, normalizeSpec, registerChartRenderer, validateSpec } from '@opendata-ai/openchart-engine';
5
+ export { ChartRenderer, CompileResult, CompiledGraphEdge, CompiledGraphNode, GraphCompilation, NormalizedBarListSpec, NormalizedChartSpec, NormalizedChrome, NormalizedGraphSpec, NormalizedMapSpec, NormalizedSankeySpec, NormalizedSpec, NormalizedTableSpec, SimulationConfig, ValidationError, ValidationErrorCode, ValidationResult, clearRenderers, compile, compileBarList, compileChart, compileGraph, compileMap, compileSankey, compileTable, getChartRenderer, normalizeSpec, registerChartRenderer, validateSpec } from '@opendata-ai/openchart-engine';
6
6
  import * as vue from 'vue';
7
- import { PropType, CSSProperties, Ref, ShallowRef, InjectionKey, ComputedRef } from 'vue';
7
+ import { PropType, CSSProperties, VNode, Ref, ShallowRef, InjectionKey, ComputedRef } from 'vue';
8
+ import { ChartStoryOptions } from '@opendata-ai/openchart-vanilla/story';
8
9
 
9
10
  interface BarListRowEvent {
10
11
  label: string;
@@ -175,6 +176,85 @@ declare const Chart: vue.DefineComponent<vue.ExtractPropTypes<{
175
176
  highlight: string[] | null;
176
177
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
177
178
 
179
+ interface ChartStoryProps {
180
+ spec: ChartSpec | LayerSpec | GraphSpec | MapSpec;
181
+ steps: ChartStoryOptions['steps'];
182
+ narrative?: VNode[];
183
+ step?: number;
184
+ triggerPosition?: number;
185
+ cameraMode?: 'step' | 'scrub';
186
+ mountOptions?: MountOptions;
187
+ }
188
+ declare const ChartStory: vue.DefineComponent<vue.ExtractPropTypes<{
189
+ spec: {
190
+ type: PropType<ChartSpec | LayerSpec | GraphSpec | MapSpec>;
191
+ required: true;
192
+ };
193
+ steps: {
194
+ type: PropType<ChartStoryOptions["steps"]>;
195
+ required: true;
196
+ };
197
+ narrative: {
198
+ type: PropType<VNode[]>;
199
+ default: undefined;
200
+ };
201
+ step: {
202
+ type: NumberConstructor;
203
+ default: undefined;
204
+ };
205
+ triggerPosition: {
206
+ type: NumberConstructor;
207
+ default: undefined;
208
+ };
209
+ cameraMode: {
210
+ type: PropType<"step" | "scrub">;
211
+ default: undefined;
212
+ };
213
+ mountOptions: {
214
+ type: PropType<MountOptions>;
215
+ default: undefined;
216
+ };
217
+ }>, () => VNode<vue.RendererNode, vue.RendererElement, {
218
+ [key: string]: any;
219
+ }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
220
+ spec: {
221
+ type: PropType<ChartSpec | LayerSpec | GraphSpec | MapSpec>;
222
+ required: true;
223
+ };
224
+ steps: {
225
+ type: PropType<ChartStoryOptions["steps"]>;
226
+ required: true;
227
+ };
228
+ narrative: {
229
+ type: PropType<VNode[]>;
230
+ default: undefined;
231
+ };
232
+ step: {
233
+ type: NumberConstructor;
234
+ default: undefined;
235
+ };
236
+ triggerPosition: {
237
+ type: NumberConstructor;
238
+ default: undefined;
239
+ };
240
+ cameraMode: {
241
+ type: PropType<"step" | "scrub">;
242
+ default: undefined;
243
+ };
244
+ mountOptions: {
245
+ type: PropType<MountOptions>;
246
+ default: undefined;
247
+ };
248
+ }>> & Readonly<{}>, {
249
+ step: number;
250
+ narrative: VNode<vue.RendererNode, vue.RendererElement, {
251
+ [key: string]: any;
252
+ }>[];
253
+ triggerPosition: number;
254
+ cameraMode: "step" | "scrub";
255
+ mountOptions: MountOptions;
256
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
257
+
178
258
  /**
179
259
  * useChart: composable for manual chart lifecycle control.
180
260
  *
@@ -526,6 +606,76 @@ declare const Graph: vue.DefineComponent<vue.ExtractPropTypes<{
526
606
  style: string | CSSProperties;
527
607
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
528
608
 
609
+ type MapFeatureEvent = {
610
+ id: string | number;
611
+ name?: string;
612
+ data: Record<string, unknown> | null;
613
+ };
614
+
615
+ interface MapProps {
616
+ spec: MapSpec;
617
+ theme?: ThemeConfig;
618
+ darkMode?: DarkMode;
619
+ class?: string;
620
+ style?: string | CSSProperties;
621
+ }
622
+ declare const GeoMap: vue.DefineComponent<vue.ExtractPropTypes<{
623
+ spec: {
624
+ type: PropType<MapSpec>;
625
+ required: true;
626
+ };
627
+ theme: {
628
+ type: PropType<ThemeConfig>;
629
+ default: undefined;
630
+ };
631
+ darkMode: {
632
+ type: PropType<DarkMode>;
633
+ default: undefined;
634
+ };
635
+ class: {
636
+ type: StringConstructor;
637
+ default: undefined;
638
+ };
639
+ style: {
640
+ type: PropType<string | CSSProperties>;
641
+ default: undefined;
642
+ };
643
+ }>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
644
+ [key: string]: any;
645
+ }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
646
+ 'mark-click': (_event: MapFeatureEvent) => true;
647
+ 'mark-hover': (_event: MapFeatureEvent | null) => true;
648
+ }, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
649
+ spec: {
650
+ type: PropType<MapSpec>;
651
+ required: true;
652
+ };
653
+ theme: {
654
+ type: PropType<ThemeConfig>;
655
+ default: undefined;
656
+ };
657
+ darkMode: {
658
+ type: PropType<DarkMode>;
659
+ default: undefined;
660
+ };
661
+ class: {
662
+ type: StringConstructor;
663
+ default: undefined;
664
+ };
665
+ style: {
666
+ type: PropType<string | CSSProperties>;
667
+ default: undefined;
668
+ };
669
+ }>> & Readonly<{
670
+ "onMark-click"?: ((_event: MapFeatureEvent) => any) | undefined;
671
+ "onMark-hover"?: ((_event: MapFeatureEvent | null) => any) | undefined;
672
+ }>, {
673
+ theme: ThemeConfig;
674
+ darkMode: DarkMode;
675
+ class: string;
676
+ style: string | CSSProperties;
677
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
678
+
529
679
  interface SankeyProps {
530
680
  spec: SankeySpec;
531
681
  theme?: ThemeConfig;
@@ -751,4 +901,4 @@ declare const Visualization: vue.DefineComponent<vue.ExtractPropTypes<{
751
901
  style: string | CSSProperties;
752
902
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
753
903
 
754
- export { BarList, type BarListProps, type BarListRowEvent, Chart, type ChartProps, DataTable, type DataTableProps, Graph, type GraphHandle, type GraphProps, Sankey, type SankeyProps, TileMap, type TileMapProps, type UseChartOptions, type UseChartReturn, type UseGraphReturn, type UseTableReturn, type UseTableStateOptions, type UseTableStateReturn, Visualization, type VisualizationProps, VizDarkModeKey, VizThemeKey, VizThemeProvider, type VizThemeProviderProps, useChart, useDarkMode, useGraph, useTable, useTableState, useVizDarkMode, useVizTheme };
904
+ export { BarList, type BarListProps, type BarListRowEvent, Chart, type ChartProps, ChartStory, type ChartStoryProps, DataTable, type DataTableProps, GeoMap, Graph, type GraphHandle, type GraphProps, type MapProps, Sankey, type SankeyProps, TileMap, type TileMapProps, type UseChartOptions, type UseChartReturn, type UseGraphReturn, type UseTableReturn, type UseTableStateOptions, type UseTableStateReturn, Visualization, type VisualizationProps, VizDarkModeKey, VizThemeKey, VizThemeProvider, type VizThemeProviderProps, useChart, useDarkMode, useGraph, useTable, useTableState, useVizDarkMode, useVizTheme };