@opendata-ai/openchart-vanilla 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/index.d.ts +327 -0
- package/dist/index.js +4745 -0
- package/dist/index.js.map +1 -0
- package/dist/simulation-worker.js +1196 -0
- package/package.json +58 -0
- package/src/__test-fixtures__/dom.ts +42 -0
- package/src/__test-fixtures__/specs.ts +187 -0
- package/src/__tests__/edit-events.test.ts +747 -0
- package/src/__tests__/events.test.ts +336 -0
- package/src/__tests__/export.test.ts +150 -0
- package/src/__tests__/mount.test.ts +219 -0
- package/src/__tests__/svg-renderer.test.ts +609 -0
- package/src/__tests__/table-mount.test.ts +484 -0
- package/src/__tests__/tooltip.test.ts +201 -0
- package/src/export.ts +105 -0
- package/src/graph/__tests__/canvas-renderer.test.ts +704 -0
- package/src/graph/__tests__/graph-mount.test.ts +213 -0
- package/src/graph/__tests__/interaction.test.ts +205 -0
- package/src/graph/__tests__/keyboard.test.ts +653 -0
- package/src/graph/__tests__/search.test.ts +88 -0
- package/src/graph/__tests__/simulation.test.ts +233 -0
- package/src/graph/__tests__/spatial-index.test.ts +142 -0
- package/src/graph/__tests__/zoom.test.ts +195 -0
- package/src/graph/canvas-renderer.ts +660 -0
- package/src/graph/interaction.ts +359 -0
- package/src/graph/keyboard.ts +208 -0
- package/src/graph/search.ts +50 -0
- package/src/graph/simulation-worker-url.ts +30 -0
- package/src/graph/simulation-worker.ts +265 -0
- package/src/graph/simulation.ts +350 -0
- package/src/graph/spatial-index.ts +121 -0
- package/src/graph/types.ts +44 -0
- package/src/graph/worker-protocol.ts +67 -0
- package/src/graph/zoom.ts +104 -0
- package/src/graph-mount.ts +675 -0
- package/src/index.ts +56 -0
- package/src/mount.ts +1639 -0
- package/src/renderers/table-cells.ts +444 -0
- package/src/resize-observer.ts +46 -0
- package/src/svg-renderer.ts +914 -0
- package/src/table-keyboard.ts +266 -0
- package/src/table-mount.ts +532 -0
- package/src/table-renderer.ts +350 -0
- package/src/tooltip.ts +120 -0
package/src/index.ts
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @opendata-ai/openchart-vanilla
|
|
3
|
+
*
|
|
4
|
+
* Vanilla JS adapter for openchart. Renders ChartLayout and TableLayout
|
|
5
|
+
* objects into real DOM elements using imperative SVG/HTML creation.
|
|
6
|
+
*
|
|
7
|
+
* Provides createChart() for mounting visualizations, ResizeObserver integration
|
|
8
|
+
* for responsive behavior, tooltip management, and SVG/PNG/CSV export.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
// Re-export core types for convenience
|
|
12
|
+
export type {
|
|
13
|
+
ChartLayout,
|
|
14
|
+
ChartSpec,
|
|
15
|
+
CompileOptions,
|
|
16
|
+
TableLayout,
|
|
17
|
+
TableSpec,
|
|
18
|
+
VizSpec,
|
|
19
|
+
} from '@opendata-ai/openchart-engine';
|
|
20
|
+
export type { PNGExportOptions } from './export';
|
|
21
|
+
// Export utilities
|
|
22
|
+
export { exportCSV, exportPNG, exportSVG } from './export';
|
|
23
|
+
// Graph simulation worker
|
|
24
|
+
export { createSimulationWorker } from './graph/simulation-worker-url';
|
|
25
|
+
export type { GraphInstance, GraphMountOptions } from './graph-mount';
|
|
26
|
+
// Graph mount API
|
|
27
|
+
export { createGraph } from './graph-mount';
|
|
28
|
+
export type { ChartInstance, ExportOptions, MountOptions } from './mount';
|
|
29
|
+
// Main mount API
|
|
30
|
+
export { createChart } from './mount';
|
|
31
|
+
// Cell renderers
|
|
32
|
+
export {
|
|
33
|
+
renderBarCell,
|
|
34
|
+
renderCategoryCell,
|
|
35
|
+
renderCell,
|
|
36
|
+
renderFlagCell,
|
|
37
|
+
renderHeatmapCell,
|
|
38
|
+
renderImageCell,
|
|
39
|
+
renderSparklineCell,
|
|
40
|
+
renderTextCell,
|
|
41
|
+
} from './renderers/table-cells';
|
|
42
|
+
// Resize observer
|
|
43
|
+
export { observeResize } from './resize-observer';
|
|
44
|
+
// SVG renderer (for advanced usage / custom rendering)
|
|
45
|
+
export { registerMarkRenderer, renderChartSVG } from './svg-renderer';
|
|
46
|
+
export type { KeyboardNavOptions } from './table-keyboard';
|
|
47
|
+
// Table keyboard navigation
|
|
48
|
+
export { attachKeyboardNav } from './table-keyboard';
|
|
49
|
+
export type { TableInstance, TableMountOptions, TableState } from './table-mount';
|
|
50
|
+
// Table mount API
|
|
51
|
+
export { createTable } from './table-mount';
|
|
52
|
+
// Table renderer (for advanced usage / custom rendering)
|
|
53
|
+
export { renderTable } from './table-renderer';
|
|
54
|
+
export type { TooltipManager } from './tooltip';
|
|
55
|
+
// Tooltip
|
|
56
|
+
export { createTooltipManager } from './tooltip';
|