exploreda 0.0.5 → 0.1.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 (208) hide show
  1. package/README.md +144 -0
  2. package/dist/ExplorEda.cjs +4608 -10858
  3. package/dist/ExplorEda.cjs.map +1 -1
  4. package/dist/ExplorEda.css +2332 -1653
  5. package/dist/ExplorEda.css.map +1 -1
  6. package/dist/ExplorEda.d.cts +125 -278
  7. package/dist/ExplorEda.d.ts +125 -278
  8. package/dist/ExplorEda.js +4521 -10782
  9. package/dist/ExplorEda.js.map +1 -1
  10. package/dist/calculations.cjs +18 -0
  11. package/dist/calculations.cjs.map +1 -0
  12. package/dist/calculations.d.cts +63 -0
  13. package/dist/calculations.d.ts +63 -0
  14. package/dist/calculations.js +3 -0
  15. package/dist/calculations.js.map +1 -0
  16. package/dist/charts/bar.cjs +27 -0
  17. package/dist/charts/bar.cjs.map +1 -0
  18. package/dist/charts/bar.d.cts +2 -0
  19. package/dist/charts/bar.d.ts +2 -0
  20. package/dist/charts/bar.js +18 -0
  21. package/dist/charts/bar.js.map +1 -0
  22. package/dist/charts/box-plot.cjs +26 -0
  23. package/dist/charts/box-plot.cjs.map +1 -0
  24. package/dist/charts/box-plot.d.cts +2 -0
  25. package/dist/charts/box-plot.d.ts +2 -0
  26. package/dist/charts/box-plot.js +17 -0
  27. package/dist/charts/box-plot.js.map +1 -0
  28. package/dist/charts/color-legend.cjs +22 -0
  29. package/dist/charts/color-legend.cjs.map +1 -0
  30. package/dist/charts/color-legend.d.cts +2 -0
  31. package/dist/charts/color-legend.d.ts +2 -0
  32. package/dist/charts/color-legend.js +13 -0
  33. package/dist/charts/color-legend.js.map +1 -0
  34. package/dist/charts/data-table.cjs +22 -0
  35. package/dist/charts/data-table.cjs.map +1 -0
  36. package/dist/charts/data-table.d.cts +2 -0
  37. package/dist/charts/data-table.d.ts +2 -0
  38. package/dist/charts/data-table.js +13 -0
  39. package/dist/charts/data-table.js.map +1 -0
  40. package/dist/charts/line.cjs +30 -0
  41. package/dist/charts/line.cjs.map +1 -0
  42. package/dist/charts/line.d.cts +2 -0
  43. package/dist/charts/line.d.ts +2 -0
  44. package/dist/charts/line.js +17 -0
  45. package/dist/charts/line.js.map +1 -0
  46. package/dist/charts/markdown.cjs +16 -0
  47. package/dist/charts/markdown.cjs.map +1 -0
  48. package/dist/charts/markdown.css +77 -0
  49. package/dist/charts/markdown.css.map +1 -0
  50. package/dist/charts/markdown.d.cts +2 -0
  51. package/dist/charts/markdown.d.ts +2 -0
  52. package/dist/charts/markdown.js +7 -0
  53. package/dist/charts/markdown.js.map +1 -0
  54. package/dist/charts/pivot-table.cjs +23 -0
  55. package/dist/charts/pivot-table.cjs.map +1 -0
  56. package/dist/charts/pivot-table.d.cts +2 -0
  57. package/dist/charts/pivot-table.d.ts +2 -0
  58. package/dist/charts/pivot-table.js +14 -0
  59. package/dist/charts/pivot-table.js.map +1 -0
  60. package/dist/charts/row.cjs +27 -0
  61. package/dist/charts/row.cjs.map +1 -0
  62. package/dist/charts/row.d.cts +6 -0
  63. package/dist/charts/row.d.ts +6 -0
  64. package/dist/charts/row.js +18 -0
  65. package/dist/charts/row.js.map +1 -0
  66. package/dist/charts/scatter.cjs +24 -0
  67. package/dist/charts/scatter.cjs.map +1 -0
  68. package/dist/charts/scatter.d.cts +2 -0
  69. package/dist/charts/scatter.d.ts +2 -0
  70. package/dist/charts/scatter.js +15 -0
  71. package/dist/charts/scatter.js.map +1 -0
  72. package/dist/charts/summary-table.cjs +19 -0
  73. package/dist/charts/summary-table.cjs.map +1 -0
  74. package/dist/charts/summary-table.d.cts +2 -0
  75. package/dist/charts/summary-table.d.ts +2 -0
  76. package/dist/charts/summary-table.js +10 -0
  77. package/dist/charts/summary-table.js.map +1 -0
  78. package/dist/charts/three-d-scatter.cjs +24 -0
  79. package/dist/charts/three-d-scatter.cjs.map +1 -0
  80. package/dist/charts/three-d-scatter.d.cts +6 -0
  81. package/dist/charts/three-d-scatter.d.ts +6 -0
  82. package/dist/charts/three-d-scatter.js +15 -0
  83. package/dist/charts/three-d-scatter.js.map +1 -0
  84. package/dist/chunk-3PGYFLE3.cjs +499 -0
  85. package/dist/chunk-3PGYFLE3.cjs.map +1 -0
  86. package/dist/chunk-4HNDKMWF.js +167 -0
  87. package/dist/chunk-4HNDKMWF.js.map +1 -0
  88. package/dist/chunk-4QNENKTV.cjs +1214 -0
  89. package/dist/chunk-4QNENKTV.cjs.map +1 -0
  90. package/dist/chunk-54M32JJB.js +132 -0
  91. package/dist/chunk-54M32JJB.js.map +1 -0
  92. package/dist/chunk-5B23JVH3.cjs +2238 -0
  93. package/dist/chunk-5B23JVH3.cjs.map +1 -0
  94. package/dist/chunk-5LH6NSNL.js +456 -0
  95. package/dist/chunk-5LH6NSNL.js.map +1 -0
  96. package/dist/chunk-6DOKKCJ5.cjs +313 -0
  97. package/dist/chunk-6DOKKCJ5.cjs.map +1 -0
  98. package/dist/chunk-6HZX5CBT.cjs +1074 -0
  99. package/dist/chunk-6HZX5CBT.cjs.map +1 -0
  100. package/dist/chunk-6U5DOIQM.js +1071 -0
  101. package/dist/chunk-6U5DOIQM.js.map +1 -0
  102. package/dist/chunk-7GBZIK2R.cjs +80 -0
  103. package/dist/chunk-7GBZIK2R.cjs.map +1 -0
  104. package/dist/chunk-7PTJNIOD.js +520 -0
  105. package/dist/chunk-7PTJNIOD.js.map +1 -0
  106. package/dist/chunk-AHZYQ7FN.js +319 -0
  107. package/dist/chunk-AHZYQ7FN.js.map +1 -0
  108. package/dist/chunk-AOODAOL4.cjs +55 -0
  109. package/dist/chunk-AOODAOL4.cjs.map +1 -0
  110. package/dist/chunk-ASKFIRMC.cjs +165 -0
  111. package/dist/chunk-ASKFIRMC.cjs.map +1 -0
  112. package/dist/chunk-B7OQUBH4.cjs +171 -0
  113. package/dist/chunk-B7OQUBH4.cjs.map +1 -0
  114. package/dist/chunk-BIMEHDLB.js +72 -0
  115. package/dist/chunk-BIMEHDLB.js.map +1 -0
  116. package/dist/chunk-C62KHV7S.js +1225 -0
  117. package/dist/chunk-C62KHV7S.js.map +1 -0
  118. package/dist/chunk-C7GQT65O.cjs +1119 -0
  119. package/dist/chunk-C7GQT65O.cjs.map +1 -0
  120. package/dist/chunk-CGDWDV4Z.js +1211 -0
  121. package/dist/chunk-CGDWDV4Z.js.map +1 -0
  122. package/dist/chunk-CJQQFNEY.js +69 -0
  123. package/dist/chunk-CJQQFNEY.js.map +1 -0
  124. package/dist/chunk-DHYLSXNR.js +964 -0
  125. package/dist/chunk-DHYLSXNR.js.map +1 -0
  126. package/dist/chunk-DKFA4KOJ.cjs +87 -0
  127. package/dist/chunk-DKFA4KOJ.cjs.map +1 -0
  128. package/dist/chunk-DS5BS7PP.cjs +357 -0
  129. package/dist/chunk-DS5BS7PP.cjs.map +1 -0
  130. package/dist/chunk-EGMFQSGK.js +909 -0
  131. package/dist/chunk-EGMFQSGK.js.map +1 -0
  132. package/dist/chunk-EU5EFHO5.cjs +53 -0
  133. package/dist/chunk-EU5EFHO5.cjs.map +1 -0
  134. package/dist/chunk-FM46QSDM.js +837 -0
  135. package/dist/chunk-FM46QSDM.js.map +1 -0
  136. package/dist/chunk-GV2LRR32.cjs +843 -0
  137. package/dist/chunk-GV2LRR32.cjs.map +1 -0
  138. package/dist/chunk-H3XKFSA5.cjs +322 -0
  139. package/dist/chunk-H3XKFSA5.cjs.map +1 -0
  140. package/dist/chunk-H5AVMMCE.js +347 -0
  141. package/dist/chunk-H5AVMMCE.js.map +1 -0
  142. package/dist/chunk-JDMUN4VK.cjs +986 -0
  143. package/dist/chunk-JDMUN4VK.cjs.map +1 -0
  144. package/dist/chunk-JNO7OXCC.js +2171 -0
  145. package/dist/chunk-JNO7OXCC.js.map +1 -0
  146. package/dist/chunk-JQMG4ZR7.js +111 -0
  147. package/dist/chunk-JQMG4ZR7.js.map +1 -0
  148. package/dist/chunk-L2Q2R43U.cjs +118 -0
  149. package/dist/chunk-L2Q2R43U.cjs.map +1 -0
  150. package/dist/chunk-LBTZVERO.js +466 -0
  151. package/dist/chunk-LBTZVERO.js.map +1 -0
  152. package/dist/chunk-LUUGGTTK.cjs +1227 -0
  153. package/dist/chunk-LUUGGTTK.cjs.map +1 -0
  154. package/dist/chunk-MEEPH7ZC.cjs +911 -0
  155. package/dist/chunk-MEEPH7ZC.cjs.map +1 -0
  156. package/dist/chunk-MJPDJ5AS.js +184 -0
  157. package/dist/chunk-MJPDJ5AS.js.map +1 -0
  158. package/dist/chunk-MJROUIDZ.cjs +219 -0
  159. package/dist/chunk-MJROUIDZ.cjs.map +1 -0
  160. package/dist/chunk-MUWSBYJS.js +528 -0
  161. package/dist/chunk-MUWSBYJS.js.map +1 -0
  162. package/dist/chunk-NDF5LCST.js +1088 -0
  163. package/dist/chunk-NDF5LCST.js.map +1 -0
  164. package/dist/chunk-NGWTPED4.js +311 -0
  165. package/dist/chunk-NGWTPED4.js.map +1 -0
  166. package/dist/chunk-PP4VCONW.js +739 -0
  167. package/dist/chunk-PP4VCONW.js.map +1 -0
  168. package/dist/chunk-PRMC2A6P.cjs +488 -0
  169. package/dist/chunk-PRMC2A6P.cjs.map +1 -0
  170. package/dist/chunk-PST6UU6S.cjs +742 -0
  171. package/dist/chunk-PST6UU6S.cjs.map +1 -0
  172. package/dist/chunk-Q7LK2UWH.js +33 -0
  173. package/dist/chunk-Q7LK2UWH.js.map +1 -0
  174. package/dist/chunk-SFV5LZPD.js +162 -0
  175. package/dist/chunk-SFV5LZPD.js.map +1 -0
  176. package/dist/chunk-SKXGYJJG.cjs +370 -0
  177. package/dist/chunk-SKXGYJJG.cjs.map +1 -0
  178. package/dist/chunk-SWLNKY6R.js +477 -0
  179. package/dist/chunk-SWLNKY6R.js.map +1 -0
  180. package/dist/chunk-TGVLNHUB.cjs +483 -0
  181. package/dist/chunk-TGVLNHUB.cjs.map +1 -0
  182. package/dist/chunk-TLLRW6S3.js +74 -0
  183. package/dist/chunk-TLLRW6S3.js.map +1 -0
  184. package/dist/chunk-TRAIXZ6M.cjs +140 -0
  185. package/dist/chunk-TRAIXZ6M.cjs.map +1 -0
  186. package/dist/chunk-U74A5VK5.cjs +74 -0
  187. package/dist/chunk-U74A5VK5.cjs.map +1 -0
  188. package/dist/chunk-UAVDLBTA.cjs +74 -0
  189. package/dist/chunk-UAVDLBTA.cjs.map +1 -0
  190. package/dist/chunk-UJWS6TRV.js +354 -0
  191. package/dist/chunk-UJWS6TRV.js.map +1 -0
  192. package/dist/chunk-UUJMUPB3.cjs +531 -0
  193. package/dist/chunk-UUJMUPB3.cjs.map +1 -0
  194. package/dist/chunk-VTKHZIJB.cjs +549 -0
  195. package/dist/chunk-VTKHZIJB.cjs.map +1 -0
  196. package/dist/chunk-YXPAWUXO.js +51 -0
  197. package/dist/chunk-YXPAWUXO.js.map +1 -0
  198. package/dist/chunk-ZD64SCZB.js +80 -0
  199. package/dist/chunk-ZD64SCZB.js.map +1 -0
  200. package/dist/core.cjs +28 -0
  201. package/dist/core.cjs.map +1 -0
  202. package/dist/core.d.cts +22 -0
  203. package/dist/core.d.ts +22 -0
  204. package/dist/core.js +3 -0
  205. package/dist/core.js.map +1 -0
  206. package/dist/dataLayerState-B4XmQjQN.d.cts +258 -0
  207. package/dist/dataLayerState-B4XmQjQN.d.ts +258 -0
  208. package/package.json +32 -52
@@ -1,287 +1,83 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import * as THREE from 'three';
2
+ import { d as datum, C as ChartSettings, T as ThreeDScatterSettings, F as Filter } from './dataLayerState-B4XmQjQN.cjs';
3
+ import 'three';
3
4
 
4
- interface FilterBase {
5
- type: string;
6
- field: string;
7
- }
8
- interface ValueFilter extends FilterBase {
9
- type: "value";
10
- values: Array<datum$1>;
11
- }
12
- interface RangeFilter extends FilterBase {
13
- type: "range";
14
- min?: number;
15
- max?: number;
16
- }
17
- interface TextFilter extends FilterBase {
18
- type: "text";
19
- operator: "contains" | "equals" | "startsWith" | "endsWith";
20
- value: string;
21
- }
22
- type Filter = ValueFilter | RangeFilter | TextFilter;
23
- type datum$1 = string | number | boolean | undefined;
5
+ type DataType = "numeric" | "categorical" | "datetime" | "boolean";
24
6
 
25
- interface BarChartSettings extends BaseChartSettings {
26
- type: "bar";
27
- binCount?: number;
28
- forceString?: boolean;
29
- filters: Filter[];
30
- }
31
-
32
- interface DataTableSettings extends BaseChartSettings {
33
- type: "data-table";
34
- columns: Array<{
35
- id: string;
36
- field: string;
37
- width?: number;
38
- }>;
39
- pageSize: number;
40
- currentPage: number;
41
- sortBy?: string;
42
- sortDirection: "asc" | "desc";
43
- filters: Filter[];
44
- globalSearch: string;
45
- tableHeight: number;
46
- }
47
-
48
- interface MarkdownSettings extends BaseChartSettings {
49
- type: "markdown";
50
- content: string;
51
- }
52
-
53
- interface PivotTableSettings extends BaseChartSettings {
54
- type: "pivot";
55
- rowFields: string[];
56
- columnField: string;
57
- valueFields: Array<{
58
- field: string;
59
- aggregation: "sum" | "count" | "avg" | "min" | "max" | "median" | "mode" | "stddev" | "variance" | "countUnique" | "singleValue";
60
- formula?: string;
61
- label?: string;
62
- }>;
63
- showTotals: {
64
- row: boolean;
65
- column: boolean;
66
- grand: boolean;
67
- };
68
- dateBinning?: {
69
- field: string;
70
- type: "day" | "month" | "year";
71
- };
72
- }
73
-
74
- interface ScatterPlotSettings extends BaseChartSettings {
75
- type: "scatter";
76
- xField: string;
77
- yField: string;
78
- filters: Filter[];
79
- }
80
-
81
- interface SummaryTableSettings extends BaseChartSettings {
82
- type: "summary";
83
- }
84
-
85
- interface ThreeDScatterSettings extends BaseChartSettings {
86
- type: "3d-scatter";
87
- xField: string;
88
- yField: string;
89
- zField: string;
90
- colorField: string | undefined;
91
- sizeField?: string;
92
- cameraPosition: THREE.Vector3;
93
- cameraTarget: THREE.Vector3;
94
- pointSize: number;
95
- pointOpacity: number;
96
- showGrid: boolean;
97
- showAxes: boolean;
98
- xAxis: AxisSettings & {
99
- zoomLevel: number;
100
- };
101
- yAxis: AxisSettings & {
102
- zoomLevel: number;
103
- };
104
- zAxis: AxisSettings & {
105
- zoomLevel: number;
106
- };
107
- }
108
-
109
- interface BoxPlotStyleSettings {
110
- boxFill: string;
111
- boxStroke: string;
112
- boxStrokeWidth: number;
113
- medianStroke: string;
114
- medianStrokeWidth: number;
115
- whiskerStroke: string;
116
- whiskerStrokeWidth: number;
117
- outlierSize: number;
118
- outlierStroke: string;
119
- outlierFill: string;
120
- }
121
- interface BoxPlotSettings extends BaseChartSettings {
122
- type: "boxplot";
123
- whiskerType: "tukey" | "minmax" | "stdDev";
124
- showOutliers: boolean;
125
- violinOverlay: boolean;
126
- beeSwarmOverlay: boolean;
127
- styles: BoxPlotStyleSettings;
128
- filters: Filter[];
129
- sortBy: "median" | "label";
130
- violinBandwidth: number;
131
- autoBandwidth: boolean;
132
- }
133
-
134
- interface SeriesSettings {
135
- showPoints: boolean;
136
- pointSize: number;
137
- pointOpacity: number;
138
- lineWidth: number;
139
- lineOpacity: number;
140
- lineColor?: string;
141
- lineStyle: "solid" | "dashed" | "dotted";
142
- useRightAxis: boolean;
143
- }
144
- interface LineChartSettings extends BaseChartSettings {
145
- type: "line";
146
- xField: string;
147
- seriesField: string[];
148
- seriesSettings: Record<string, SeriesSettings>;
149
- styles: {
150
- curveType: "linear" | "monotoneX" | "step";
151
- };
152
- showXGrid: boolean;
153
- showYGrid: boolean;
154
- showLegend: boolean;
155
- legendPosition: "top" | "right" | "bottom" | "left";
156
- }
157
-
158
- interface ChartLayout {
159
- x: number;
160
- y: number;
161
- w: number;
162
- h: number;
163
- }
164
- interface BaseFacetSettings {
165
- enabled: boolean;
166
- type: "grid" | "wrap";
167
- }
168
- interface GridFacetSettings extends BaseFacetSettings {
169
- type: "grid";
170
- rowVariable: string;
171
- columnVariable: string;
172
- }
173
- interface WrapFacetSettings extends BaseFacetSettings {
174
- type: "wrap";
175
- rowVariable: string;
176
- columnCount: number;
177
- }
178
- type FacetSettings = GridFacetSettings | WrapFacetSettings;
179
- interface AxisSettings {
180
- title?: string;
181
- scaleType?: "linear" | "log" | "time" | "band";
182
- grid?: boolean;
183
- min?: number;
184
- max?: number;
185
- }
186
- interface MarginSettings {
187
- top?: number;
188
- right?: number;
189
- bottom?: number;
190
- left?: number;
191
- }
192
- interface BaseChartSettings {
193
- id: string;
194
- title: string;
195
- type: string;
196
- field: string;
197
- layout: ChartLayout;
198
- colorScaleId: string | undefined;
199
- colorField: string | undefined;
200
- facet: FacetSettings;
201
- xAxis: AxisSettings;
202
- yAxis: AxisSettings;
203
- margin: MarginSettings;
204
- filters: Filter[];
205
- xAxisLabel: string;
206
- yAxisLabel: string;
207
- xGridLines: number;
208
- yGridLines: number;
209
- }
210
- interface RowChartSettings extends BaseChartSettings {
211
- type: "row";
212
- minRowHeight: number;
213
- maxRowHeight: number;
214
- }
215
- type ChartSettings = RowChartSettings | BarChartSettings | ScatterPlotSettings | PivotTableSettings | ThreeDScatterSettings | SummaryTableSettings | DataTableSettings | MarkdownSettings | BoxPlotSettings | LineChartSettings;
216
- type datum = string | number | boolean | undefined;
217
-
218
- type AggregationType = "sum" | "count" | "min" | "max" | "average" | "countUnique" | "percentile" | "median" | "stddev" | "variance";
219
- interface BaseExpression {
7
+ type AggregateAggregation = "count" | "sum" | "average";
8
+ interface AggregateSpec {
220
9
  id: string;
221
10
  name: string;
222
- expression: string;
223
- dependencies: string[];
224
- rawInput: string;
225
- }
226
- interface BasicExpression extends BaseExpression {
227
- type: "basic";
228
- left: Expression;
229
- right: Expression;
230
- operator: string;
231
- }
232
- interface FunctionExpression extends BaseExpression {
233
- type: "function";
234
- functionName: string;
235
- arguments: Expression[];
236
- functionCategory?: string;
237
- returnType?: string;
238
- parameterTypes?: string[];
239
- }
240
- interface GroupExpression extends BaseExpression {
241
- type: "group";
242
- groupBy: string[];
243
- aggregation: AggregationType;
244
- }
245
- interface RankExpression extends BaseExpression {
246
- type: "rank";
247
- rankBy: string[];
248
- isNormalized: boolean;
249
- isCumulative: boolean;
250
- }
251
- interface AdvancedExpression extends BaseExpression {
252
- type: "advanced";
253
- algorithm: "pca" | "tsne" | "umap" | "som";
254
- parameters?: Record<string, any>;
255
- regressionType?: "linear" | "polynomial";
256
- degree?: number;
257
- predictors?: string[];
258
- response?: string;
259
- }
260
- interface TernaryExpression extends BaseExpression {
261
- type: "ternary";
262
- condition: Expression;
263
- trueBranch: Expression;
264
- falseBranch: Expression;
265
- }
266
- interface UnaryExpression extends BaseExpression {
267
- type: "unary";
268
- operand: Expression;
269
- operator: string;
270
- }
271
- interface LiteralExpression extends BaseExpression {
272
- type: "literal";
273
- value: any;
274
- }
275
- type Expression = BasicExpression | FunctionExpression | GroupExpression | RankExpression | AdvancedExpression | TernaryExpression | UnaryExpression | LiteralExpression;
276
-
277
- interface CalculationDefinition {
278
- expression: Expression;
279
- resultColumnName: string;
11
+ groupField: string;
12
+ measureField?: string;
13
+ aggregation: AggregateAggregation;
14
+ }
15
+ interface AggregateContributor {
16
+ sourceId: number;
17
+ input: datum;
18
+ rawInput?: datum;
19
+ included: boolean;
20
+ exclusionReason?: string;
21
+ }
22
+ interface AggregateResultRow {
23
+ id: string;
24
+ groupValue: datum;
25
+ groupLabel: string;
26
+ value: number | undefined;
27
+ rowCount: number;
28
+ contributors: AggregateContributor[];
29
+ }
30
+ interface AggregateResult {
31
+ spec: AggregateSpec;
32
+ rows: AggregateResultRow[];
33
+ sourceRowCount: number;
34
+ }
35
+
36
+ type DatePreset = "iso" | "month-day-year" | "day-month-year";
37
+ type FieldFormat = "auto" | "number" | "currency" | "percent" | "date" | "datetime";
38
+ interface FieldSettings {
39
+ type?: DataType;
40
+ label?: string;
41
+ description?: string;
42
+ format?: FieldFormat;
43
+ precision?: number;
44
+ unit?: string;
45
+ currency?: string;
46
+ datePreset?: DatePreset;
47
+ nullTokens?: string[];
48
+ }
49
+ type FieldSettingsMap = Record<string, FieldSettings>;
50
+ interface ConversionFailure {
51
+ row: number;
52
+ raw: datum;
53
+ reason: string;
54
+ }
55
+ interface ConversionPreview {
56
+ field: string;
57
+ inferredType: DataType;
58
+ effectiveType: DataType;
59
+ totalCount: number;
60
+ validCount: number;
61
+ missingCount: number;
62
+ failedCount: number;
63
+ examples: Array<{
64
+ row: number;
65
+ raw: datum;
66
+ value: datum;
67
+ }>;
68
+ failures: ConversionFailure[];
280
69
  }
70
+ /** Return the validation error shown before settings are saved. */
71
+ declare function getFieldSettingsError(settings: FieldSettings): string | undefined;
72
+ declare function getFieldLabel(field: string, settings?: FieldSettings): string;
73
+ declare function hasFieldDisplayFormat(settings?: FieldSettings): boolean;
74
+ declare function formatFieldValue(field: string, value: datum, settings?: FieldSettings): string;
281
75
 
282
76
  interface BaseColorScale {
283
77
  id: string;
284
78
  name: string;
79
+ /** Source field used to create this scale. Display names may change. */
80
+ sourceField?: string;
285
81
  }
286
82
  interface NumericalColorScale extends BaseColorScale {
287
83
  type: "numerical";
@@ -295,6 +91,18 @@ interface CategoricalColorScale extends BaseColorScale {
295
91
  mapping: Map<string, string>;
296
92
  }
297
93
 
94
+ interface SavedColumnSettings {
95
+ id: string;
96
+ field: string;
97
+ width?: number;
98
+ }
99
+ interface SavedRowsSettings {
100
+ columns: SavedColumnSettings[];
101
+ sortBy?: string;
102
+ sortDirection: "asc" | "desc";
103
+ filters: Filter[];
104
+ globalSearch: string;
105
+ }
298
106
  interface GridSettings {
299
107
  columnCount: number;
300
108
  rowHeight: number;
@@ -312,21 +120,60 @@ interface SerializedCategoricalColorScale extends Omit<CategoricalColorScale, "m
312
120
  mapping: [string, string][];
313
121
  }
314
122
  type SerializedColorScale = NumericalColorScale | SerializedCategoricalColorScale;
123
+ interface SerializedVector3 {
124
+ x: number;
125
+ y: number;
126
+ z: number;
127
+ }
128
+ type SerializedThreeDScatterSettings = Omit<ThreeDScatterSettings, "cameraPosition" | "cameraTarget"> & {
129
+ cameraPosition: SerializedVector3;
130
+ cameraTarget: SerializedVector3;
131
+ };
132
+ type SavedChartSettings = Exclude<ChartSettings, ThreeDScatterSettings> | SerializedThreeDScatterSettings;
133
+
134
+ interface SavedCalculation {
135
+ resultColumnName: string;
136
+ expression: string;
137
+ }
138
+ type SavedDatum = string | number | boolean | null | undefined;
139
+ type SavedRow = Record<string, SavedDatum>;
140
+ type SavedSpecialValue = "undefined" | "NaN" | "Infinity" | "-Infinity";
315
141
  interface SavedDataStructure {
316
- charts: ChartSettings[];
317
- calculations: CalculationDefinition[];
142
+ charts: SavedChartSettings[];
143
+ calculations: SavedCalculation[];
318
144
  gridSettings: GridSettings;
319
145
  metadata: ViewMetadata;
320
146
  colorScales: SerializedColorScale[];
147
+ rowsSettings?: SavedRowsSettings;
148
+ fieldSettings?: FieldSettingsMap;
149
+ aggregates?: AggregateSpec[];
150
+ }
151
+ interface SavedAnalysisStructure {
152
+ format: "exploreda-analysis";
153
+ version: 1;
154
+ data: SavedRow[];
155
+ settings: SavedDataStructure;
156
+ specialValues?: Record<string, SavedSpecialValue>;
321
157
  }
322
158
 
323
159
  type DatumObject = {
324
160
  [key: string]: datum;
325
161
  };
326
162
 
327
- declare function ExplorEda({ data, savedData, }: {
163
+ declare function saveToClipboard(data: SavedDataStructure): Promise<void>;
164
+ declare function stringifySavedData(data: SavedDataStructure): string;
165
+ declare function parseSavedData(text: string): SavedDataStructure;
166
+ declare function stringifySavedAnalysis(data: SavedAnalysisStructure): string;
167
+ declare function parseSavedAnalysis(text: string): SavedAnalysisStructure;
168
+ declare function saveAnalysisToClipboard(data: SavedAnalysisStructure): Promise<void>;
169
+ declare function validateSavedData(data: unknown): data is SavedDataStructure;
170
+ declare function validateSavedAnalysis(data: unknown): data is SavedAnalysisStructure;
171
+ declare function validateSavedAnalysisForData(analysis: SavedAnalysisStructure): boolean;
172
+
173
+ declare function ExplorEda({ data, savedData, onStateChange, }: {
328
174
  data: DatumObject[];
329
175
  savedData: SavedDataStructure | undefined;
176
+ onStateChange?: (state: SavedDataStructure) => void;
330
177
  }): react_jsx_runtime.JSX.Element;
331
178
 
332
- export { ExplorEda };
179
+ export { type AggregateResult, type AggregateSpec, type ConversionPreview, type DatePreset, ExplorEda, type FieldFormat, type FieldSettings, type FieldSettingsMap, type SavedAnalysisStructure, type SavedCalculation, type SavedColumnSettings, type SavedDataStructure, type SavedDatum, type SavedRow, type SavedRowsSettings, type SavedSpecialValue, type ViewMetadata, formatFieldValue, getFieldLabel, getFieldSettingsError, hasFieldDisplayFormat, parseSavedAnalysis, parseSavedData, saveAnalysisToClipboard, saveToClipboard, stringifySavedAnalysis, stringifySavedData, validateSavedAnalysis, validateSavedAnalysisForData, validateSavedData };