@opendata-ai/openchart-engine 8.8.0 → 8.9.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 +37 -2
- package/dist/index.js +1090 -382
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _opendata_ai_openchart_core from '@opendata-ai/openchart-core';
|
|
2
|
-
import { AnimationEase, LegendLayout, ResolvedChrome, TooltipContent, A11yMetadata, ResolvedTheme, LegendEntry, CompileOptions, ChartLayout, LayerSpec, CompileTableOptions, TableLayout, ResolvedAnimationPhase, AnimationSpec, ResolvedAnimation, Point, DataRow, BarListEncoding, ThemeConfig, DarkMode, GeoMapGeo, GeoMapProjection, GeoMapEncoding, LegendConfig, GeoMapPointsLayer, SankeyEncoding, SankeyNodeAlign, SankeyLinkColor, TileMapEncoding, TileMapPalette, MarkType, MarkDef, Encoding, ChromeText, Annotation, LabelConfig, Display, ColumnConfig, TableDensity, SortState, GraphSpec, GraphEncoding, GraphLayoutConfig, NodeOverride, GraphAnimationSpec, GraphInteractionConfig, ScaleType, EncodingChannel, FieldFormatContext, Rect, LayoutStrategy, VizSpec, Mark, BinTransform, CalculateTransform, ConditionalValueDef, FilterPredicate, TimeUnitTransform, Transform } from '@opendata-ai/openchart-core';
|
|
2
|
+
import { AnimationEase, LegendLayout, ResolvedChrome, TooltipContent, A11yMetadata, ResolvedTheme, LegendEntry, CompileOptions, ChartLayout, LayerSpec, CompileTableOptions, TableLayout, ResolvedAnimationPhase, AnimationSpec, ResolvedAnimation, Point, DataRow, BarListEncoding, ThemeConfig, DarkMode, GeoMapGeo, GeoMapProjection, GeoMapEncoding, LegendConfig, GeoMapPointsLayer, SankeyEncoding, SankeyNodeAlign, SankeyLinkColor, TileMapEncoding, TileMapPalette, MarkType, MarkDef, Encoding, ChromeText, Annotation, LabelConfig, Display, ColumnConfig, TableDensity, SortState, GraphSpec, GraphEncoding, GraphLayoutConfig, NodeOverride, GraphAnimationSpec, GraphInteractionConfig, ScaleType, EncodingChannel, FieldFormatContext, Rect, LayoutStrategy, VizSpec, Mark, BinTransform, CalculateTransform, ConditionalValueDef, FilterPredicate, TimeUnitTransform, Transform, ChartSpec, DesignDiagnostic, FieldMetadata, DatasetBinding, ReaderSelection, ObservationIdentity, SpecPatch, CompositionRecommendation, DesignQuestion } from '@opendata-ai/openchart-core';
|
|
3
3
|
export { BarListLayout, BarListSpec, ChartLayout, ChartSpec, CompileOptions, CompileTableOptions, GeoMapLayout, GeoMapSpec, GraphLayout, GraphSpec, LayerSpec, SankeyLayout, SankeySpec, TableLayout, TableSpec, TileMapLayout, TileMapSpec, VizSpec } from '@opendata-ai/openchart-core';
|
|
4
4
|
import { ScaleLinear, ScaleTime, ScaleLogarithmic, ScalePower, ScaleSymLog, ScaleBand, ScalePoint, ScaleOrdinal, ScaleQuantile, ScaleQuantize, ScaleThreshold } from 'd3-scale';
|
|
5
5
|
|
|
@@ -1146,4 +1146,39 @@ declare function runTimeUnit(data: DataRow[], transform: TimeUnitTransform): Dat
|
|
|
1146
1146
|
*/
|
|
1147
1147
|
declare function runTransforms(data: DataRow[], transforms: Transform[]): DataRow[];
|
|
1148
1148
|
|
|
1149
|
-
|
|
1149
|
+
/** Checks use resolved geometry and authored metadata, never headline interpretation. */
|
|
1150
|
+
declare function diagnoseChart(spec: ChartSpec, layout: ChartLayout): DesignDiagnostic[];
|
|
1151
|
+
|
|
1152
|
+
/** Type-tagging avoids collisions between e.g. 1 and "1". Missing keys are invalid. */
|
|
1153
|
+
declare function observationKey(value: unknown): string | null;
|
|
1154
|
+
declare function resolveObservationIdentities(data: DataRow[], keyField?: string, seriesField?: string): ObservationIdentity[];
|
|
1155
|
+
/** Filtering supplies all rows plus visible keys; deletion supplies a new full dataset. */
|
|
1156
|
+
declare function reconcileReaderSelection(selection: ReaderSelection, rows: DataRow[], keyField?: string, seriesField?: string, visibleKeys?: ReadonlySet<string>): ReaderSelection;
|
|
1157
|
+
interface ObservationComparison {
|
|
1158
|
+
absolute: number;
|
|
1159
|
+
relative?: number;
|
|
1160
|
+
unit?: string;
|
|
1161
|
+
}
|
|
1162
|
+
/** Explicit metadata is required across views; same-field callers can share it. */
|
|
1163
|
+
declare function compareObservations(before: number, after: number, a: FieldMetadata, b: FieldMetadata): ObservationComparison | null;
|
|
1164
|
+
declare function linkedEntityKeys(row: DataRow, source: DatasetBinding, target: DatasetBinding): string[];
|
|
1165
|
+
|
|
1166
|
+
/** JSON-pointer patch application is atomic: validate all paths before returning a new document. */
|
|
1167
|
+
declare function applySpecPatch(spec: VizSpec, patch: SpecPatch): VizSpec;
|
|
1168
|
+
|
|
1169
|
+
interface RecommendationRoles {
|
|
1170
|
+
measure?: string;
|
|
1171
|
+
category?: string;
|
|
1172
|
+
time?: string;
|
|
1173
|
+
secondMeasure?: string;
|
|
1174
|
+
series?: string;
|
|
1175
|
+
}
|
|
1176
|
+
interface RecommendationResult {
|
|
1177
|
+
recommendations: CompositionRecommendation[];
|
|
1178
|
+
missingRoles: string[];
|
|
1179
|
+
explanation?: string;
|
|
1180
|
+
}
|
|
1181
|
+
/** Deterministic suggestions require an explicit question and field roles. No aggregation is inferred. */
|
|
1182
|
+
declare function recommendCompositions(data: DataRow[], question: DesignQuestion, roles: RecommendationRoles): RecommendationResult;
|
|
1183
|
+
|
|
1184
|
+
export { ARROWHEAD_LENGTH, AUTO_CANVAS_THRESHOLD, type AnnotationContext, type AnnotationMeasureTextFn, type ArrowheadPoints, BOLD_SPAN_FONT_WEIGHT, type ChartRenderer, type CompileResult, type CompiledGraphEdge, type CompiledGraphNode, DEFAULT_ANNOTATION_FONT_SIZE, DEFAULT_LINE_HEIGHT, ENTER_DEFAULTS, EXIT_DEFAULTS, type GraphCompilation, MAX_3D_NODES, type NormalizedBarListSpec, type NormalizedChartSpec, type NormalizedChrome, type NormalizedGeoMapSpec, type NormalizedGraphSpec, type NormalizedSankeySpec, type NormalizedSpec, type NormalizedTableSpec, type NormalizedTileMapSpec, type ObservationComparison, type ObstacleKind, type PlacementObstacle, type RecommendationResult, type RecommendationRoles, type RichSpan, type SimulationConfig, UPDATE_DEFAULTS, type ValidationError, type ValidationErrorCode, type ValidationResult, applySpecPatch, buildArcPath, buildAreaPath, buildEdgeTooltip, buildLinePath, clampStaggerDelay, clearRenderers, compareObservations, compile, compileBarList, compileChart, compileGeoMap, compileGraph, compileLayer, compileSankey, compileTable, compileTileMap, computeArrowheadPoints, dedupeKeys, diagnoseChart, evaluatePredicate, facetMinHeight, getChartRenderer, heuristicMeasure, isConditionalValueDef, legendGap, linkedEntityKeys, normalizeSpec, observationKey, parseAnnotationSpans, recommendCompositions, reconcileReaderSelection, registerChartRenderer, resolveAnimation, resolveConditionalValue, resolveObservationIdentities, runBin, runCalculate, runFilter, runTimeUnit, runTransforms, serializeKeyValue, validateSpec };
|