@opendata-ai/openchart-core 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.
Files changed (51) hide show
  1. package/README.md +130 -0
  2. package/dist/index.d.ts +2030 -0
  3. package/dist/index.js +1176 -0
  4. package/dist/index.js.map +1 -0
  5. package/dist/styles.css +757 -0
  6. package/package.json +61 -0
  7. package/src/accessibility/__tests__/alt-text.test.ts +110 -0
  8. package/src/accessibility/__tests__/aria.test.ts +125 -0
  9. package/src/accessibility/alt-text.ts +120 -0
  10. package/src/accessibility/aria.ts +73 -0
  11. package/src/accessibility/index.ts +6 -0
  12. package/src/colors/__tests__/colorblind.test.ts +63 -0
  13. package/src/colors/__tests__/contrast.test.ts +71 -0
  14. package/src/colors/__tests__/palettes.test.ts +54 -0
  15. package/src/colors/colorblind.ts +122 -0
  16. package/src/colors/contrast.ts +94 -0
  17. package/src/colors/index.ts +27 -0
  18. package/src/colors/palettes.ts +118 -0
  19. package/src/helpers/__tests__/spec-builders.test.ts +336 -0
  20. package/src/helpers/spec-builders.ts +410 -0
  21. package/src/index.ts +129 -0
  22. package/src/labels/__tests__/collision.test.ts +197 -0
  23. package/src/labels/collision.ts +154 -0
  24. package/src/labels/index.ts +6 -0
  25. package/src/layout/__tests__/chrome.test.ts +114 -0
  26. package/src/layout/__tests__/text-measure.test.ts +49 -0
  27. package/src/layout/chrome.ts +223 -0
  28. package/src/layout/index.ts +6 -0
  29. package/src/layout/text-measure.ts +54 -0
  30. package/src/locale/__tests__/format.test.ts +90 -0
  31. package/src/locale/format.ts +132 -0
  32. package/src/locale/index.ts +6 -0
  33. package/src/responsive/__tests__/breakpoints.test.ts +58 -0
  34. package/src/responsive/breakpoints.ts +92 -0
  35. package/src/responsive/index.ts +18 -0
  36. package/src/styles/viz.css +757 -0
  37. package/src/theme/__tests__/dark-mode.test.ts +68 -0
  38. package/src/theme/__tests__/defaults.test.ts +47 -0
  39. package/src/theme/__tests__/resolve.test.ts +61 -0
  40. package/src/theme/dark-mode.ts +123 -0
  41. package/src/theme/defaults.ts +85 -0
  42. package/src/theme/index.ts +7 -0
  43. package/src/theme/resolve.ts +190 -0
  44. package/src/types/__tests__/spec.test.ts +387 -0
  45. package/src/types/encoding.ts +144 -0
  46. package/src/types/events.ts +96 -0
  47. package/src/types/index.ts +141 -0
  48. package/src/types/layout.ts +794 -0
  49. package/src/types/spec.ts +563 -0
  50. package/src/types/table.ts +105 -0
  51. package/src/types/theme.ts +159 -0
@@ -0,0 +1,141 @@
1
+ /**
2
+ * @opendata-ai/openchart-core type system barrel export.
3
+ *
4
+ * Re-exports all types from the type modules so consumers can import
5
+ * from '@opendata-ai/openchart-core' directly.
6
+ */
7
+
8
+ // Encoding rules
9
+ export type {
10
+ ChannelRule,
11
+ EncodingRule,
12
+ GraphChannelRule,
13
+ } from './encoding';
14
+ export {
15
+ CHART_ENCODING_RULES,
16
+ GRAPH_ENCODING_RULES,
17
+ } from './encoding';
18
+ // Event types (chart interaction callbacks)
19
+ export type {
20
+ ChartEventHandlers,
21
+ ChromeKey,
22
+ ElementEdit,
23
+ MarkEvent,
24
+ } from './events';
25
+ // Layout types (engine output)
26
+ export type {
27
+ A11yMetadata,
28
+ ArcMark,
29
+ AreaMark,
30
+ AxisLayout,
31
+ AxisTick,
32
+ BarTableCell,
33
+ CategoryTableCell,
34
+ CellStyle,
35
+ ChartLayout,
36
+ CompileOptions,
37
+ CompileTableOptions,
38
+ FlagTableCell,
39
+ GraphEdgeLayout,
40
+ GraphLayout,
41
+ GraphNodeLayout,
42
+ Gridline,
43
+ HeatmapTableCell,
44
+ ImageTableCell,
45
+ LegendEntry,
46
+ LegendLayout,
47
+ LineMark,
48
+ Margins,
49
+ Mark,
50
+ MarkAria,
51
+ MeasureTextFn,
52
+ PaginationState,
53
+ Point,
54
+ PointMark,
55
+ Rect,
56
+ RectMark,
57
+ ResolvedAnnotation,
58
+ ResolvedChrome,
59
+ ResolvedChromeElement,
60
+ ResolvedColumn,
61
+ ResolvedLabel,
62
+ SortState,
63
+ SparklineData,
64
+ SparklineTableCell,
65
+ TableCell,
66
+ TableCellBase,
67
+ TableLayout,
68
+ TableRow,
69
+ TextStyle,
70
+ TextTableCell,
71
+ TooltipContent,
72
+ TooltipField,
73
+ } from './layout';
74
+ // Spec types (user input)
75
+ export type {
76
+ AggregateOp,
77
+ Annotation,
78
+ AnnotationAnchor,
79
+ AnnotationOffset,
80
+ AxisConfig,
81
+ ChartSpec,
82
+ ChartSpecWithoutData,
83
+ ChartType,
84
+ Chrome,
85
+ ChromeText,
86
+ ChromeTextStyle,
87
+ DarkMode,
88
+ DataRow,
89
+ Encoding,
90
+ EncodingChannel,
91
+ FieldType,
92
+ GraphEdge,
93
+ GraphEncoding,
94
+ GraphEncodingChannel,
95
+ GraphLayoutConfig,
96
+ GraphNode,
97
+ GraphSpec,
98
+ GraphSpecWithoutData,
99
+ LabelConfig,
100
+ LabelDensity,
101
+ LegendConfig,
102
+ RangeAnnotation,
103
+ RefLineAnnotation,
104
+ ScaleConfig,
105
+ StoredVizSpec,
106
+ TableSpec,
107
+ TableSpecWithoutData,
108
+ TextAnnotation,
109
+ ThemeConfig,
110
+ VizSpec,
111
+ } from './spec';
112
+ export {
113
+ CHART_TYPES,
114
+ isChartSpec,
115
+ isGraphSpec,
116
+ isRangeAnnotation,
117
+ isRefLineAnnotation,
118
+ isTableSpec,
119
+ isTextAnnotation,
120
+ } from './spec';
121
+ // Table types
122
+ export type {
123
+ BarColumnConfig,
124
+ CategoryColorsConfig,
125
+ ColumnConfig,
126
+ HeatmapColumnConfig,
127
+ ImageColumnConfig,
128
+ SparklineColumnConfig,
129
+ } from './table';
130
+ // Theme types
131
+ export type {
132
+ ChromeDefaults,
133
+ ResolvedTheme,
134
+ Theme,
135
+ ThemeChromeDefaults,
136
+ ThemeColors,
137
+ ThemeFontSizes,
138
+ ThemeFonts,
139
+ ThemeFontWeights,
140
+ ThemeSpacing,
141
+ } from './theme';