@opendata-ai/openchart-vanilla 8.8.0 → 8.9.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.
Files changed (37) hide show
  1. package/dist/{chunk-SXTHPXG6.js → chunk-APMUBW72.js} +174 -65
  2. package/dist/chunk-APMUBW72.js.map +1 -0
  3. package/dist/{chunk-QBTRAQAX.js → chunk-CCRFYGHU.js} +2299 -1766
  4. package/dist/chunk-CCRFYGHU.js.map +1 -0
  5. package/dist/{chunk-5IMVUHVC.js → chunk-GX6BWMJD.js} +23 -21
  6. package/dist/chunk-GX6BWMJD.js.map +1 -0
  7. package/dist/{chunk-DFKLAB67.js → chunk-MGFXAROR.js} +20 -8
  8. package/dist/chunk-MGFXAROR.js.map +1 -0
  9. package/dist/{chunk-EZQDCLZN.js → chunk-Q7YEEF2X.js} +3 -2
  10. package/dist/{chunk-EZQDCLZN.js.map → chunk-Q7YEEF2X.js.map} +1 -1
  11. package/dist/{chunk-I73B3DJI.js → chunk-R5TZHNTG.js} +23 -5
  12. package/dist/chunk-R5TZHNTG.js.map +1 -0
  13. package/dist/{chunk-2OJZBMXM.js → chunk-REH5UQCL.js} +46 -46
  14. package/dist/{chunk-2OJZBMXM.js.map → chunk-REH5UQCL.js.map} +1 -1
  15. package/dist/{chunk-NG7CVCI2.js → chunk-UC4IHEUO.js} +16 -1
  16. package/dist/chunk-UC4IHEUO.js.map +1 -0
  17. package/dist/export-gif.d.ts +2 -2
  18. package/dist/export-gif.js +2 -2
  19. package/dist/graph-3d/index.d.ts +0 -27
  20. package/dist/graph-3d/index.js +9 -5
  21. package/dist/graph-3d/index.js.map +1 -1
  22. package/dist/index.d.ts +27 -5
  23. package/dist/index.js +635 -214
  24. package/dist/index.js.map +1 -1
  25. package/dist/{mount-WiY9BIr9.d.ts → mount-TEjIdF0m.d.ts} +16 -1
  26. package/dist/static.js +3 -3
  27. package/dist/story/index.d.ts +2 -2
  28. package/dist/story/index.js +5 -5
  29. package/dist/styles.css +1 -1
  30. package/dist/styles.css.map +1 -1
  31. package/package.json +4 -4
  32. package/dist/chunk-5IMVUHVC.js.map +0 -1
  33. package/dist/chunk-DFKLAB67.js.map +0 -1
  34. package/dist/chunk-I73B3DJI.js.map +0 -1
  35. package/dist/chunk-NG7CVCI2.js.map +0 -1
  36. package/dist/chunk-QBTRAQAX.js.map +0 -1
  37. package/dist/chunk-SXTHPXG6.js.map +0 -1
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  export { ChartLayout, ChartSpec, CompileOptions, TableLayout, TableSpec, VizSpec } from '@opendata-ai/openchart-engine';
2
- import { BarListSpec, BarListLayout, ThemeConfig, DarkMode, ChartLayout, ChartSpec, LayerSpec, GeoMapSpec, GeoMapLayout, RectMark, Mark, BarTableCell, CategoryTableCell, TableCell, FlagTableCell, HeatmapTableCell, ImageTableCell, SparklineTableCell, TextTableCell, SankeySpec, SankeyLayout, TableSpec, SortState, TableLayout, TileMapSpec, TileMapLayout, ResolvedYouDrawIt } from '@opendata-ai/openchart-core';
3
- import { J as JPGExportOptions, S as SVGExportOptions, C as Camera } from './mount-WiY9BIr9.js';
4
- export { a as ChartInstance, E as ExportOptions, M as MountOptions, P as PNGExportOptions, U as UpdateOptions, c as createChart, e as exportCSV, b as exportJPG, d as exportPNG, f as exportSVG, g as exportSVGWithFonts } from './mount-WiY9BIr9.js';
2
+ import { BarListSpec, BarListLayout, ThemeConfig, DarkMode, ChartLayout, ChartSpec, LayerSpec, GeoMapSpec, GeoMapLayout, ReaderSelection, DataRow, RectMark, Mark, BarTableCell, CategoryTableCell, TableCell, FlagTableCell, HeatmapTableCell, ImageTableCell, SparklineTableCell, TextTableCell, SankeySpec, SankeyLayout, TableSpec, SortState, TableLayout, TileMapSpec, TileMapLayout, ResolvedYouDrawIt } from '@opendata-ai/openchart-core';
3
+ import { J as JPGExportOptions, S as SVGExportOptions, C as Camera, a as ChartInstance } from './mount-TEjIdF0m.js';
4
+ export { E as ExportOptions, M as MountOptions, P as PNGExportOptions, U as UpdateOptions, c as createChart, e as exportCSV, b as exportJPG, d as exportPNG, f as exportSVG, g as exportSVGWithFonts } from './mount-TEjIdF0m.js';
5
5
  export { C as CameraFlightOptions, G as GRAPH_3D_NOT_REGISTERED_ERROR, a as GraphCamera, b as GraphFlyTarget, c as GraphHighlightTarget, d as GraphInstance, e as GraphLegendData, f as GraphMountOptions, g as GraphRendererContext, h as GraphRendererFactory, i as GraphShell, j as GraphTooltipFormatter, k as GraphTooltipItem, T as TooltipManager, l as createGraph, m as createTooltipManager, r as registerGraphRenderer } from './renderer-registry-Cng76n8F.js';
6
6
  import './export-gif.js';
7
7
  import '@floating-ui/dom';
@@ -269,6 +269,21 @@ declare const DEFAULT_UPDATE_MAX_MARKS = 500;
269
269
  */
270
270
  declare const CANVAS_DEFAULT_UPDATE_MAX_MARKS = 20000;
271
271
 
272
+ interface ReaderController {
273
+ readonly selection: ReaderSelection;
274
+ /** Call after chart.update(). Without an override, visibility follows compiled marks. */
275
+ update(spec: ChartSpec | LayerSpec, visibleKeys?: ReadonlySet<string>): void;
276
+ pin(datum: DataRow): void;
277
+ clear(): void;
278
+ destroy(): void;
279
+ }
280
+ /**
281
+ * Persistent reader interaction, separate from editor ElementRef selection.
282
+ * Layered specs clear/disable inspection and announce the unsupported binding;
283
+ * updating back to a single chart resumes inspection without choosing a leaf.
284
+ */
285
+ declare function createReader(container: HTMLElement, instance: ChartInstance, initial: ChartSpec | LayerSpec, onChange: (selection: ReaderSelection) => void): ReaderController;
286
+
272
287
  /**
273
288
  * Mark rendering: dispatches to per-mark-type sub-renderers (line, area, rect,
274
289
  * arc, point, text, rule, tick).
@@ -372,7 +387,7 @@ interface SankeyInstance {
372
387
  /** Re-compile at current container dimensions. */
373
388
  resize(): void;
374
389
  /** Export the sankey diagram. */
375
- export(format: 'svg' | 'svg-with-fonts' | 'png' | 'jpg', options?: JPGExportOptions): string | Promise<Blob> | Promise<string>;
390
+ export(format: 'svg' | 'svg-with-fonts' | 'png' | 'jpg', options?: JPGExportOptions | SVGExportOptions): string | Promise<Blob> | Promise<string>;
376
391
  /** Remove all DOM elements and disconnect observers. */
377
392
  destroy(): void;
378
393
  /** The current compiled layout. */
@@ -417,8 +432,15 @@ declare function renderChartSVG(layout: ChartLayout, container: HTMLElement, opt
417
432
  interface KeyboardNavOptions {
418
433
  /** The wrapper element containing the whole table UI. */
419
434
  wrapper: HTMLElement;
435
+ /** Logical cell to restore after a resize, sort, or data update. */
436
+ initialCell?: {
437
+ rowId: string;
438
+ columnKey: string;
439
+ };
420
440
  /** Callback to trigger sort on a column. */
421
441
  onSort: (columnKey: string) => void;
442
+ /** Activate the focused row through the host's existing row-click callback. */
443
+ onRowActivate?: (rowId: string) => void;
422
444
  /** Callback to clear search and return focus to the table body. */
423
445
  onClearSearch: () => void;
424
446
  /** Callback to announce text to screen readers via the live region. */
@@ -632,4 +654,4 @@ interface YouDrawItController {
632
654
  */
633
655
  declare function createYouDrawIt(options: YouDrawItOptions): YouDrawItController;
634
656
 
635
- export { type BarListInstance, type BarListMountOptions, CANVAS_DEFAULT_UPDATE_MAX_MARKS, Camera, DEFAULT_UPDATE_MAX_MARKS, type GeoMapCameraOptions, type GeoMapInstance, type GeoMapMarkEvent, type GeoMapMountOptions, JPGExportOptions, type KeyboardNavOptions, SVGExportOptions, type SankeyInstance, type SankeyMountOptions, type SpecSequenceOptions, type TableInstance, type TableMountOptions, type TableState, type TextEditOverlayConfig, type TileMapInstance, type TileMapMountOptions, VECTOR_EXPORT_MAX_POINTS, type YouDrawItController, type YouDrawItOptions, attachKeyboardNav, createBarList, createGeoMap, createSankey, createSimulationWorker, createTable, createTextEditOverlay, createTileMap, createYouDrawIt, exportSpecSequence, materializeCanvasModeSVG, observeResize, rectPathWithCorners, registerMarkRenderer, renderBarCell, renderCategoryCell, renderCell, renderChartSVG, renderFlagCell, renderHeatmapCell, renderImageCell, renderSparklineCell, renderTable, renderTextCell };
657
+ export { type BarListInstance, type BarListMountOptions, CANVAS_DEFAULT_UPDATE_MAX_MARKS, Camera, ChartInstance, DEFAULT_UPDATE_MAX_MARKS, type GeoMapCameraOptions, type GeoMapInstance, type GeoMapMarkEvent, type GeoMapMountOptions, JPGExportOptions, type KeyboardNavOptions, type ReaderController, SVGExportOptions, type SankeyInstance, type SankeyMountOptions, type SpecSequenceOptions, type TableInstance, type TableMountOptions, type TableState, type TextEditOverlayConfig, type TileMapInstance, type TileMapMountOptions, VECTOR_EXPORT_MAX_POINTS, type YouDrawItController, type YouDrawItOptions, attachKeyboardNav, createBarList, createGeoMap, createReader, createSankey, createSimulationWorker, createTable, createTextEditOverlay, createTileMap, createYouDrawIt, exportSpecSequence, materializeCanvasModeSVG, observeResize, rectPathWithCorners, registerMarkRenderer, renderBarCell, renderCategoryCell, renderCell, renderChartSVG, renderFlagCell, renderHeatmapCell, renderImageCell, renderSparklineCell, renderTable, renderTextCell };