@buildcanada/charts 0.3.3 → 0.3.4

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 (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.ts +55 -55
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@buildcanada/charts",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "description": "A configurable data visualization library for creating interactive charts.",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
package/src/index.ts CHANGED
@@ -41,49 +41,49 @@ export {
41
41
  createFallbackConfig,
42
42
  reportError,
43
43
  trackEvent,
44
- } from "./config/index.js"
44
+ } from "./config/index.ts"
45
45
 
46
46
  // Re-export grapher components
47
47
  export {
48
48
  Grapher,
49
49
  type GrapherProgrammaticInterface,
50
50
  type GrapherManager,
51
- } from "./grapher/core/Grapher.js"
51
+ } from "./grapher/core/Grapher.tsx"
52
52
 
53
- export { GrapherState } from "./grapher/core/GrapherState.js"
54
- export { FetchingGrapher } from "./grapher/core/FetchingGrapher.js"
53
+ export { GrapherState } from "./grapher/core/GrapherState.ts"
54
+ export { FetchingGrapher } from "./grapher/core/FetchingGrapher.tsx"
55
55
 
56
56
  // Explorer
57
- export { Explorer } from "./explorer/Explorer.js"
58
- export type { ExplorerProps } from "./explorer/Explorer.js"
57
+ export { Explorer } from "./explorer/Explorer.tsx"
58
+ export type { ExplorerProps } from "./explorer/Explorer.tsx"
59
59
 
60
60
  // Chart State types
61
- export type { ChartState, ChartSeries } from "./grapher/chart/ChartInterface.js"
62
- export type { LineChartState } from "./grapher/lineCharts/LineChartState.js"
63
- export type { SlopeChartState } from "./grapher/slopeCharts/SlopeChartState.js"
64
- export type { DiscreteBarChartState } from "./grapher/barCharts/DiscreteBarChartState.js"
65
- export type { StackedAreaChartState } from "./grapher/stackedCharts/StackedAreaChartState.js"
66
- export type { StackedBarChartState } from "./grapher/stackedCharts/StackedBarChartState.js"
67
- export type { StackedDiscreteBarChartState } from "./grapher/stackedCharts/StackedDiscreteBarChartState.js"
68
- export type { ScatterPlotChartState } from "./grapher/scatterCharts/ScatterPlotChartState.js"
69
- export type { MarimekkoChartState } from "./grapher/stackedCharts/MarimekkoChartState.js"
70
- export { MapChartState } from "./grapher/mapCharts/MapChartState.js"
71
- export { MapConfig } from "./grapher/mapCharts/MapConfig.js"
61
+ export type { ChartState, ChartSeries } from "./grapher/chart/ChartInterface.ts"
62
+ export type { LineChartState } from "./grapher/lineCharts/LineChartState.ts"
63
+ export type { SlopeChartState } from "./grapher/slopeCharts/SlopeChartState.ts"
64
+ export type { DiscreteBarChartState } from "./grapher/barCharts/DiscreteBarChartState.ts"
65
+ export type { StackedAreaChartState } from "./grapher/stackedCharts/StackedAreaChartState.ts"
66
+ export type { StackedBarChartState } from "./grapher/stackedCharts/StackedBarChartState.ts"
67
+ export type { StackedDiscreteBarChartState } from "./grapher/stackedCharts/StackedDiscreteBarChartState.ts"
68
+ export type { ScatterPlotChartState } from "./grapher/scatterCharts/ScatterPlotChartState.ts"
69
+ export type { MarimekkoChartState } from "./grapher/stackedCharts/MarimekkoChartState.ts"
70
+ export { MapChartState } from "./grapher/mapCharts/MapChartState.ts"
71
+ export { MapConfig } from "./grapher/mapCharts/MapConfig.ts"
72
72
 
73
73
  // Data loading
74
74
  export {
75
75
  fetchInputTableForConfig,
76
76
  getCachingInputTableFetcher,
77
77
  type FetchInputTableForConfigFn,
78
- } from "./grapher/core/loadGrapherTableHelpers.js"
78
+ } from "./grapher/core/loadGrapherTableHelpers.ts"
79
79
 
80
- export { loadVariableDataAndMetadata } from "./grapher/core/loadVariable.js"
80
+ export { loadVariableDataAndMetadata } from "./grapher/core/loadVariable.ts"
81
81
 
82
82
  // Color system
83
- export { ColorScale } from "./grapher/color/ColorScale.js"
84
- export { ColorScaleConfig } from "./grapher/color/ColorScaleConfig.js"
85
- export { ColorScheme } from "./grapher/color/ColorScheme.js"
86
- export { ColorSchemes, getColorSchemeForChartType } from "./grapher/color/ColorSchemes.js"
83
+ export { ColorScale } from "./grapher/color/ColorScale.ts"
84
+ export { ColorScaleConfig } from "./grapher/color/ColorScaleConfig.ts"
85
+ export { ColorScheme } from "./grapher/color/ColorScheme.ts"
86
+ export { ColorSchemes, getColorSchemeForChartType } from "./grapher/color/ColorSchemes.ts"
87
87
  export {
88
88
  NumericBin,
89
89
  CategoricalBin,
@@ -92,11 +92,11 @@ export {
92
92
  isNumericBin,
93
93
  isNoDataBin,
94
94
  isProjectedDataBin,
95
- } from "./grapher/color/ColorScaleBin.js"
95
+ } from "./grapher/color/ColorScaleBin.ts"
96
96
 
97
97
  // Selection and Focus
98
- export { SelectionArray } from "./grapher/selection/SelectionArray.js"
99
- export { FocusArray } from "./grapher/focus/FocusArray.js"
98
+ export { SelectionArray } from "./grapher/selection/SelectionArray.ts"
99
+ export { FocusArray } from "./grapher/focus/FocusArray.ts"
100
100
 
101
101
  // Constants
102
102
  export {
@@ -108,20 +108,20 @@ export {
108
108
  BASE_FONT_SIZE,
109
109
  Patterns,
110
110
  latestGrapherConfigSchema,
111
- } from "./grapher/core/GrapherConstants.js"
111
+ } from "./grapher/core/GrapherConstants.ts"
112
112
 
113
113
  // Controls
114
- export { EntityPicker } from "./grapher/controls/entityPicker/EntityPicker.js"
115
- export type { EntityPickerManager } from "./grapher/controls/entityPicker/EntityPickerConstants.js"
116
- export { GlobalEntitySelector } from "./grapher/controls/globalEntitySelector/GlobalEntitySelector.js"
117
- export { Dropdown } from "./grapher/controls/Dropdown.js"
114
+ export { EntityPicker } from "./grapher/controls/entityPicker/EntityPicker.tsx"
115
+ export type { EntityPickerManager } from "./grapher/controls/entityPicker/EntityPickerConstants.ts"
116
+ export { GlobalEntitySelector } from "./grapher/controls/globalEntitySelector/GlobalEntitySelector.tsx"
117
+ export { Dropdown } from "./grapher/controls/Dropdown.tsx"
118
118
 
119
119
  // Schema and migrations
120
- export { defaultGrapherConfig } from "./grapher/schema/defaultGrapherConfig.js"
120
+ export { defaultGrapherConfig } from "./grapher/schema/defaultGrapherConfig.ts"
121
121
  export {
122
122
  migrateGrapherConfigToLatestVersion,
123
123
  migrateGrapherConfigToLatestVersionAndFailOnError,
124
- } from "./grapher/schema/migrations/migrate.js"
124
+ } from "./grapher/schema/migrations/migrate.ts"
125
125
 
126
126
  // URL utilities
127
127
  export {
@@ -131,46 +131,46 @@ export {
131
131
  generateSelectedEntityNamesParam,
132
132
  generateFocusedSeriesNamesParam,
133
133
  getEntityNamesParam,
134
- } from "./grapher/core/EntityUrlBuilder.js"
134
+ } from "./grapher/core/EntityUrlBuilder.ts"
135
135
 
136
- export { grapherConfigToQueryParams } from "./grapher/core/GrapherUrl.js"
136
+ export { grapherConfigToQueryParams } from "./grapher/core/GrapherUrl.ts"
137
137
 
138
138
  // Chart utilities
139
- export { ChartDimension } from "./grapher/chart/ChartDimension.js"
140
- export { DimensionSlot } from "./grapher/chart/DimensionSlot.js"
141
- export { makeChartState } from "./grapher/chart/ChartTypeMap.js"
142
- export { generateGrapherImageSrcSet } from "./grapher/chart/ChartUtils.js"
139
+ export { ChartDimension } from "./grapher/chart/ChartDimension.ts"
140
+ export { DimensionSlot } from "./grapher/chart/DimensionSlot.ts"
141
+ export { makeChartState } from "./grapher/chart/ChartTypeMap.tsx"
142
+ export { generateGrapherImageSrcSet } from "./grapher/chart/ChartUtils.tsx"
143
143
 
144
144
  // Slideshow
145
145
  export {
146
146
  type SlideShowManager,
147
147
  SlideShowController,
148
- } from "./grapher/slideshowController/SlideShowController.js"
148
+ } from "./grapher/slideshowController/SlideShowController.tsx"
149
149
 
150
150
  // Analytics
151
- export { GrapherAnalytics } from "./grapher/core/GrapherAnalytics.js"
151
+ export { GrapherAnalytics } from "./grapher/core/GrapherAnalytics.ts"
152
152
 
153
153
  // Rendering helpers
154
154
  export {
155
155
  renderGrapherIntoContainer,
156
156
  renderSingleGrapherOnGrapherPage,
157
- } from "./grapher/core/GrapherUseHelpers.js"
157
+ } from "./grapher/core/GrapherUseHelpers.tsx"
158
158
 
159
159
  // Map features
160
- export { GeoFeatures } from "./grapher/mapCharts/GeoFeatures.js"
160
+ export { GeoFeatures } from "./grapher/mapCharts/GeoFeatures.ts"
161
161
  export {
162
162
  MAP_REGION_LABELS,
163
163
  type GeoFeature,
164
164
  type Direction,
165
165
  type Ellipse,
166
166
  type EllipseCoords,
167
- } from "./grapher/mapCharts/MapChartConstants.js"
167
+ } from "./grapher/mapCharts/MapChartConstants.ts"
168
168
 
169
169
  // Comparison lines
170
- export { isValidVerticalComparisonLineConfig } from "./grapher/comparisonLine/ComparisonLineHelpers.js"
170
+ export { isValidVerticalComparisonLineConfig } from "./grapher/comparisonLine/ComparisonLineHelpers.ts"
171
171
 
172
172
  // Binning strategies
173
- export { hasValidConfigForBinningStrategy } from "./grapher/color/BinningStrategies.js"
173
+ export { hasValidConfigForBinningStrategy } from "./grapher/color/BinningStrategies.ts"
174
174
 
175
175
  // Chart tabs
176
176
  export {
@@ -180,7 +180,7 @@ export {
180
180
  mapGrapherTabNameToQueryParam,
181
181
  mapGrapherTabNameToConfigOption,
182
182
  makeLabelForGrapherTab,
183
- } from "./grapher/chart/ChartTabs.js"
183
+ } from "./grapher/chart/ChartTabs.ts"
184
184
 
185
185
  // Guided chart utilities
186
186
  export {
@@ -190,15 +190,15 @@ export {
190
190
  type GuidedChartContextValue,
191
191
  type ArchiveGuidedChartRegistration,
192
192
  buildArchiveGuidedChartSrc,
193
- } from "./grapher/chart/guidedChartUtils.js"
193
+ } from "./grapher/chart/guidedChartUtils.ts"
194
194
 
195
195
  // Legacy conversion
196
196
  export {
197
197
  legacyToChartsTableAndDimensions,
198
198
  legacyToChartsTableAndDimensionsWithMandatorySlug,
199
- } from "./grapher/core/LegacyToChartsTable.js"
199
+ } from "./grapher/core/LegacyToChartsTable.ts"
200
200
 
201
- export { legacyToCurrentGrapherUrl } from "./grapher/core/GrapherUrlMigrations.js"
201
+ export { legacyToCurrentGrapherUrl } from "./grapher/core/GrapherUrlMigrations.ts"
202
202
 
203
203
  // Test data helpers (useful for demos and testing)
204
204
  export {
@@ -206,8 +206,8 @@ export {
206
206
  createTestDataset,
207
207
  type TestData,
208
208
  type TestMetadata,
209
- } from "./grapher/testData/TestData.js"
210
- export { LifeExpectancyGrapher } from "./grapher/testData/TestData.sample.js"
209
+ } from "./grapher/testData/TestData.ts"
210
+ export { LifeExpectancyGrapher } from "./grapher/testData/TestData.sample.ts"
211
211
 
212
212
  // Types commonly needed for data loading
213
213
  export {
@@ -219,8 +219,8 @@ export {
219
219
  type EntityName,
220
220
  type EntityId,
221
221
  type EntityCode,
222
- } from "./types/index.js"
222
+ } from "./types/index.ts"
223
223
 
224
224
  // Utilities for data loading
225
- export { Bounds } from "./utils/index.js"
226
- export { parseDelimited, ChartsTable, BlankChartsTable } from "./core-table/index.js"
225
+ export { Bounds } from "./utils/index.ts"
226
+ export { parseDelimited, ChartsTable, BlankChartsTable } from "./core-table/index.ts"