@opendata-ai/openchart-core 9.1.0 → 9.2.1

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 CHANGED
@@ -1071,6 +1071,8 @@ interface TextMarkLayout extends MarkMetadata {
1071
1071
  dominantBaseline?: 'auto' | 'hanging' | 'central' | 'text-after-edge';
1072
1072
  /** Rotation angle in degrees. */
1073
1073
  angle?: number;
1074
+ /** Opacity (0..1), as a playback fade in static output. Omit for fully opaque. */
1075
+ opacity?: number;
1074
1076
  /** Original data row. */
1075
1077
  data: Record<string, unknown>;
1076
1078
  /** Resolved label. */
@@ -2782,6 +2784,12 @@ interface CompileOptions {
2782
2784
  * If not provided, the engine falls back to heuristic estimation.
2783
2785
  */
2784
2786
  measureText?: MeasureTextFn;
2787
+ /**
2788
+ * Charts with `encoding.time`: the continuous period index to draw (0 is the
2789
+ * first period, 1.5 halfway between the second and third). Clamped to the
2790
+ * periods present. Defaults to the final period. Ignored without `time`.
2791
+ */
2792
+ playbackT?: number;
2785
2793
  }
2786
2794
  /** Extended compile options for table visualizations. */
2787
2795
  interface CompileTableOptions extends CompileOptions {
@@ -3260,6 +3268,12 @@ interface MarkOptions {
3260
3268
  interpolate?: 'linear' | 'monotone' | 'step' | 'step-before' | 'step-after' | 'basis' | 'cardinal' | 'natural';
3261
3269
  /** Explicit orientation override for bar marks. */
3262
3270
  orient?: 'horizontal' | 'vertical';
3271
+ /**
3272
+ * Mirror horizontal bars around a shared center axis (a population pyramid).
3273
+ * Only meaningful when `type` is `'bar'`; needs a color field with exactly two
3274
+ * values, the first drawn to the left. Defaults to false.
3275
+ */
3276
+ mirror?: boolean;
3263
3277
  /** Inner radius for arc marks. >0 produces a donut, 0 or omitted produces a pie. */
3264
3278
  innerRadius?: number;
3265
3279
  /** Outer radius for arc marks. */
@@ -3354,7 +3368,7 @@ interface MarkOptions {
3354
3368
  * Defaults to true. Set `mark: { type: 'point', trendline: false }` to
3355
3369
  * suppress it when the chart already carries its own reference line (e.g. a
3356
3370
  * manual x=y diagonal in a separate layer), which would otherwise produce
3357
- * two competing diagonals.
3371
+ * two competing diagonals. In a faceted chart each panel gets its own fit.
3358
3372
  *
3359
3373
  * Pass an object to control stacking order: the line renders `below` the
3360
3374
  * points by default, but a dense scatter (thousands of overlapping dots)
@@ -3479,7 +3493,7 @@ type SharedMarkOptions = Pick<MarkOptions, 'size' | 'filled' | 'opacity' | 'fill
3479
3493
  */
3480
3494
  type MarkDef = (SharedMarkOptions & {
3481
3495
  type: 'bar';
3482
- } & Pick<MarkOptions, 'orient' | 'cornerRadius'>) | (SharedMarkOptions & {
3496
+ } & Pick<MarkOptions, 'orient' | 'cornerRadius' | 'mirror'>) | (SharedMarkOptions & {
3483
3497
  type: 'line';
3484
3498
  } & Pick<MarkOptions, 'point' | 'interpolate'>) | (SharedMarkOptions & {
3485
3499
  type: 'area';
@@ -3901,8 +3915,8 @@ interface Encoding<TData extends DataRow = DataRow> {
3901
3915
  /**
3902
3916
  * Facet channel: partitions data into a grid of small-multiple panels.
3903
3917
  * Each unique value of the facet field produces one panel. Panels share
3904
- * scales by default; use `resolve: { scale: { y: 'independent' } }` for
3905
- * per-panel axes.
3918
+ * x, y, color and size scales by default; use
3919
+ * `resolve: { scale: { y: 'independent' } }` for per-panel axes.
3906
3920
  */
3907
3921
  facet?: FacetChannel<TData>;
3908
3922
  /**
@@ -4862,6 +4876,13 @@ interface LineEncoding<TData extends DataRow = DataRow> extends Encoding<TData>
4862
4876
  interface BarEncoding<TData extends DataRow = DataRow> extends Encoding<TData> {
4863
4877
  x: EncodingChannel<TData>;
4864
4878
  y: EncodingChannel<TData>;
4879
+ /**
4880
+ * Playback field. Each distinct value is one period, and the chart animates
4881
+ * through them with the shared `playback` controls. Temporal and
4882
+ * quantitative periods sort by value; ordinal periods follow `sort` or
4883
+ * first-seen order.
4884
+ */
4885
+ time?: EncodingChannel<TData>;
4865
4886
  }
4866
4887
  /**
4867
4888
  * Encoding for area marks.
@@ -4880,6 +4901,13 @@ interface AreaEncoding<TData extends DataRow = DataRow> extends Encoding<TData>
4880
4901
  interface PointEncoding<TData extends DataRow = DataRow> extends Encoding<TData> {
4881
4902
  x: EncodingChannel<TData>;
4882
4903
  y: EncodingChannel<TData>;
4904
+ /**
4905
+ * Playback field. Each distinct value is one period, and the chart animates
4906
+ * through them with the shared `playback` controls. Temporal and
4907
+ * quantitative periods sort by value; ordinal periods follow `sort` or
4908
+ * first-seen order.
4909
+ */
4910
+ time?: EncodingChannel<TData>;
4883
4911
  }
4884
4912
  /**
4885
4913
  * Encoding for circle marks (dot plots).
@@ -4889,6 +4917,13 @@ interface PointEncoding<TData extends DataRow = DataRow> extends Encoding<TData>
4889
4917
  interface CircleEncoding<TData extends DataRow = DataRow> extends Encoding<TData> {
4890
4918
  x: EncodingChannel<TData>;
4891
4919
  y: EncodingChannel<TData>;
4920
+ /**
4921
+ * Playback field. Each distinct value is one period, and the chart animates
4922
+ * through them with the shared `playback` controls. Temporal and
4923
+ * quantitative periods sort by value; ordinal periods follow `sort` or
4924
+ * first-seen order.
4925
+ */
4926
+ time?: EncodingChannel<TData>;
4892
4927
  }
4893
4928
  /**
4894
4929
  * Encoding for lollipop marks.
@@ -5212,6 +5247,12 @@ interface BaseChartSpec<TData extends DataRow = DataRow> {
5212
5247
  * not zIndex.
5213
5248
  */
5214
5249
  zIndex?: number;
5250
+ /**
5251
+ * Playback timing, controls and period label for a chart with
5252
+ * `encoding.time` (point, circle and bar marks). Ignored with a warning
5253
+ * when the chart has no time channel.
5254
+ */
5255
+ playback?: PlaybackConfig;
5215
5256
  }
5216
5257
  /**
5217
5258
  * Chart specification: the primary input for standard chart types.
@@ -5842,6 +5883,8 @@ interface TileMapEncoding {
5842
5883
  color?: EncodingChannel;
5843
5884
  /** Tooltip encoding (optional). */
5844
5885
  tooltip?: EncodingChannel | EncodingChannel[];
5886
+ /** Playback field (optional). Each distinct value is one period; tiles recolor as the map plays. */
5887
+ time?: EncodingChannel;
5845
5888
  }
5846
5889
  /** Sequential color palette names available for tile maps. */
5847
5890
  type TileMapPalette = 'blue' | 'green' | 'orange' | 'purple' | 'teal';
@@ -5889,6 +5932,8 @@ interface TileMapSpec {
5889
5932
  * Examples: ".1f" for one decimal, "$,.0f" for currency, "~s" for SI.
5890
5933
  */
5891
5934
  valueFormat?: string;
5935
+ /** Playback timing, controls and period label. Applies when `encoding.time` is set. */
5936
+ playback?: PlaybackConfig;
5892
5937
  }
5893
5938
  /** Supported map projections. */
5894
5939
  type GeoMapProjection = 'albersUsa' | 'mercator' | 'equalEarth' | 'identity';
@@ -6004,6 +6049,8 @@ interface GeoMapEncoding {
6004
6049
  textPriority?: EncodingChannel;
6005
6050
  /** Tooltip encoding (optional). */
6006
6051
  tooltip?: EncodingChannel | EncodingChannel[];
6052
+ /** Playback field (optional). Each distinct value is one period; features recolor as the map plays. */
6053
+ time?: EncodingChannel;
6007
6054
  }
6008
6055
  /** Point/symbol layer rendered above choropleth features. */
6009
6056
  interface GeoMapPointsLayer {
@@ -6028,6 +6075,8 @@ interface GeoMapPointsLayer {
6028
6075
  key?: EncodingChannel;
6029
6076
  /** Fill opacity for point circles. Default 0.65. Range 0-1. */
6030
6077
  opacity?: number;
6078
+ /** Playback field (optional). Point size and color follow each period; requires `key`. */
6079
+ time?: EncodingChannel;
6031
6080
  }
6032
6081
  interface GeoMapSpec {
6033
6082
  /** Optional authored measure, unit, provenance, and supplied interval metadata. */
@@ -6064,6 +6113,8 @@ interface GeoMapSpec {
6064
6113
  * animate, and prefers-reduced-motion always wins.
6065
6114
  */
6066
6115
  animation?: AnimationSpec;
6116
+ /** Playback timing, controls and period label. Applies when `encoding.time` or `points.time` is set. */
6117
+ playback?: PlaybackConfig;
6067
6118
  }
6068
6119
  interface BarListSpec {
6069
6120
  /** Discriminant: always "barlist". */
@@ -6125,6 +6176,41 @@ interface BarListEncoding {
6125
6176
  /** Tooltip encoding (optional). */
6126
6177
  tooltip?: EncodingChannel | EncodingChannel[];
6127
6178
  }
6179
+ /** Placement of the large faint period label behind a playback chart. */
6180
+ type PlaybackPeriodPosition = 'auto' | 'center' | 'top-right' | 'bottom-left';
6181
+ /**
6182
+ * Playback options for charts and maps with a `time` channel. Fields shared
6183
+ * with the race's `race` block have the same names, types and defaults.
6184
+ */
6185
+ interface PlaybackConfig {
6186
+ /** Total playback duration in milliseconds at 1× speed. Defaults to 700ms per period, clamped to 8000–90000ms. Mutually exclusive with `step`. */
6187
+ duration?: number;
6188
+ /** Duration per period in milliseconds. Omitted by default and mutually exclusive with `duration`. */
6189
+ step?: number;
6190
+ /** Interior gap policy. Defaults to `interpolate`. Use `hold` to carry the previous value or `drop` to leave the value absent. */
6191
+ gaps?: 'interpolate' | 'hold' | 'drop';
6192
+ /** Time to dwell on the final frame in milliseconds. Defaults to 1500. */
6193
+ holdEnd?: number;
6194
+ /** Restart after the final hold. Defaults to false. */
6195
+ loop?: boolean;
6196
+ /** Start when 25% visible (`visible`, the default), immediately (`true`), or on demand (`false`). Reduced motion disables autoplay. */
6197
+ autoplay?: 'visible' | boolean;
6198
+ /** Show play/pause, scrubber, and period readout. Defaults to true. */
6199
+ controls?: boolean;
6200
+ /** Large period label. On by default with automatic placement and the time channel's format. Set false to hide it. */
6201
+ period?: false | {
6202
+ /** Overrides the time channel's format. */
6203
+ format?: string;
6204
+ /** Where the label sits. Defaults to `auto`: centered for point charts, upper right for bars, and the corner that covers the least geography on maps. */
6205
+ position?: PlaybackPeriodPosition;
6206
+ };
6207
+ /** Point marks only: keys whose name is drawn next to the mark for the whole run. */
6208
+ labels?: string[];
6209
+ /** Point marks only: draw past positions as a trail. `true` is every key; an array names keys. Defaults to false. */
6210
+ trails?: boolean | string[];
6211
+ }
6212
+ /** The playback timing fields a race accepts in its top-level `playback` block. */
6213
+ type PlaybackTimingConfig = Pick<PlaybackConfig, 'duration' | 'step' | 'gaps' | 'holdEnd' | 'loop' | 'autoplay' | 'controls' | 'period'>;
6128
6214
  /** Mark used to draw each frame of a race. */
6129
6215
  type RaceMarkType = 'bar' | 'line' | 'table';
6130
6216
  interface RaceBarMarkDef {
@@ -6155,7 +6241,7 @@ type RaceFieldEncoding<TType extends FieldType = FieldType> = Omit<EncodingChann
6155
6241
  };
6156
6242
  /** Field mappings shared by bar, line, and table races. */
6157
6243
  interface RaceEncoding {
6158
- /** Playback field. Temporal dates or years and quantitative values sort by value. Ordinal values use `sort` or first-seen order. */
6244
+ /** Playback field. Temporal dates or years and quantitative values sort by value. Ordinal values use a `sort` array, first-seen order, or the reverse of first-seen order with `sort: "descending"`. */
6159
6245
  time: RaceFieldEncoding<'temporal' | 'ordinal' | 'quantitative'>;
6160
6246
  /** Stable identity across periods. Also the display name by default. */
6161
6247
  key: RaceFieldEncoding;
@@ -6212,6 +6298,8 @@ interface RaceSpec {
6212
6298
  encoding: RaceEncoding;
6213
6299
  /** Ranking and playback options. Omit to use the race defaults. */
6214
6300
  race?: RaceConfig;
6301
+ /** Playback timing in the shared form. Setting a field here and in `race` is an error. */
6302
+ playback?: PlaybackTimingConfig;
6215
6303
  /** Editorial chrome. Omit to draw without authored title, subtitle, or other chrome text. */
6216
6304
  chrome?: Chrome;
6217
6305
  /** Theme overrides. Omit to use the default theme. */
@@ -6759,6 +6847,8 @@ interface EncodingRule {
6759
6847
  theta?: ChannelRule;
6760
6848
  detail: ChannelRule;
6761
6849
  description?: ChannelRule;
6850
+ /** Playback period channel. Declared only on marks that support playback. */
6851
+ time?: ChannelRule;
6762
6852
  }
6763
6853
  /**
6764
6854
  * Encoding rules per mark type.
@@ -9172,4 +9262,4 @@ declare const CSS_TOKEN_ROOT_SELECTORS: readonly string[];
9172
9262
  declare const CSS_TOKENS: readonly CssTokenDef[];
9173
9263
  declare function cssTokenDefault(name: string, mode: 'light' | 'dark'): string;
9174
9264
 
9175
- export { type A11yConfig, type A11yMetadata, ACHROMATIC_RAMP, AXIS_TITLE_GAP, AXIS_TITLE_OFFSET_COMPACT, AXIS_TITLE_OFFSET_DEFAULT, AXIS_TITLE_TRAILING_PAD, type AggregateOp, type AggregateTransform, type AnimationConfig, type AnimationEase, type AnimationPhaseConfig, type AnimationPreset, type AnimationSpec, type AnimationStagger, type Annotation, type AnnotationAnchor, type AnnotationFootnote, type AnnotationOffset, type AnnotationPosition, type ArcEncoding, type ArcMark, type AreaEncoding, type AreaMark, type AxisConfig, type AxisLabelDensity, type AxisLayout, type AxisTick, BRAND_FONT_SIZE, BRAND_MIN_WIDTH, BRAND_RESERVE_WIDTH, BREAKPOINT_COMPACT_MAX, BREAKPOINT_MEDIUM_MAX, type BarColumnConfig, type BarEncoding, type BarListEncoding, type BarListLayout, type BarListRowMark, type BarListSpec, type BarListSpecWithoutData, type BarTableCell, type BaseLegendLayout, type BeeswarmEncoding, type BinParams, type BinTransform, type Breakpoint, CATEGORICAL_EXTENDED_PALETTE, CATEGORICAL_FILL_PALETTE, CATEGORICAL_FILL_PALETTE_DARK, CATEGORICAL_PALETTE, CATEGORICAL_PALETTE_DARK, CELL_SWEEP_BUDGET_MS, COMPACT_MAX_X_TICKS, COMPACT_WIDTH, CSS_TOKENS, CSS_TOKEN_ROOT_SELECTORS, CURVE_NAMES, type CalculateExpression, type CalculateTransform, type CalendarEncoding, type CategoricalLegendLayout, type CategoricalPalette, type CategoryColorsConfig, type CategoryTableCell, type CellStyle, type ChannelRule, type ChartBuilderOptions, type ChartEventHandlers, type ChartLayout, type ChartSpec, type ChartSpecOverride, type ChartSpecWithoutData, type Chrome, type ChromeDefaults, type ChromeEconomy, type ChromeKey, type ChromeMode, type ChromeText, type ChromeTextStyle, type ChromeThemeOverride, type CircleEncoding, type ColorBlindnessType, type ColumnConfig, type CompileOptions, type CompileTableOptions, type CompileWarning, type CompositionRecommendation, type Condition, type ConditionalValueDef, type ConnectorConfig, type ConnectorType, type ContinuousLegendBin, type ContinuousLegendLayout, type ContinuousLegendTick, type CssTokenDef, type CurveInput, type CurveName, type CurveStop, DEFAULT_THEME, DIVERGING_PALETTES, type DarkMode, type DataRow, type DatasetBinding, type DateGranularity, type DelayAnchor, type DelayRule, type DeltaColumnConfig, type DeltaTableCell, type DensityEncoding, type DensityTransform, type DescriptionEncoding, type DesignDiagnostic, type DesignQuestion, type Display, type DivergingPalette, type DurationRule, ENTRANCE_ROLES, EXIT_CURVE, EXIT_FADE_MS, EXTENDED_OFFSET_STRATEGIES, type EditOp, type EditTransaction, type EditTransactionResult, type ElementRef, type Encoding, type EncodingChannel, type EncodingRule, type EndpointLabelContent, type EndpointLabelEntry, type EndpointLabelsConfig, type EndpointLabelsLayout, type EnterPhaseConfig, type EntranceEndContext, type EntranceRole, type EntranceRoleDef, type EntranceRoleExtent, type EntranceRoleRow, type EntranceTiming, type EntranceTimingContext, type ErrorbarEncoding, FADE_CURVE, FLUID_SPRING, FOOTNOTE_LINE_HEIGHT, type FacetChannel, type FacetLayout, type FacetPanelLayout, type FieldFormatContext, type FieldMetadata, type FieldPredicate, type FieldRef, type FieldType, type FillPatternType, type FilterPredicate, type FilterTransform, type FlagTableCell, type FoldTransform, type FrameConfig, GRAPH_ENCODING_RULES, type GeoAnchor, type GeoCallout, type GeoCalloutNoteSlot, type GeoColorKeyDescriptor, type GeoColorKeyLayout, type GeoDetailLayer, type GeoDetailLayerLayout, type GeoEntityRef, type GeoInset, type GeoLabelAffine, type GeoLabelCandidate, type GeoLabelComponent, type GeoLabelGeometry, type GeoLabelInventoryEntry, type GeoLabelOverlay, type GeoLabelVisibility, type GeoLabelsBundle, type GeoLabelsInput, type GeoMapBorders, type GeoMapEncoding, type GeoMapFeatureMark, type GeoMapFocus, type GeoMapFocusLayout, type GeoMapGeo, type GeoMapLayout, type GeoMapPointMark, type GeoMapPointsLayer, type GeoMapProjection, type GeoMapSpec, type GeoMapSpecWithoutData, type GeoMapZoomConfig, type GeoPlacedLabel, type GeoProjectionContext, type GeoReaderObservation, type GeoReaderSelection, type GeoTextBlock, type GeoViewLayout, type GradientColorStop, type GradientDef, type GradientLegendLayout, type GradientStop, type GraphAnimationConfig, type GraphAnimationSpec, type GraphChannelRule, type GraphEdge, type GraphEdgeLayout, type GraphEncoding, type GraphEncodingChannel, type GraphEnterPhaseConfig, type GraphInteractionConfig, type GraphLayout, type GraphLayoutConfig, type GraphNode, type GraphNodeLayout, type GraphPhaseConfig, type GraphSpec, type GraphSpecWithoutData, type Gridline, HEIGHT_CRAMPED_MAX, HEIGHT_MINIMAL_MAX, HEIGHT_NO_GRID_MAX, HEIGHT_SHORT_MAX, HPAD_COMPACT_FRACTION, HPAD_COMPACT_MIN, type HeatmapColumnConfig, type HeatmapTableCell, type HeightClass, type HistogramEncoding, type ImageColumnConfig, type ImageTableCell, type JoinAggregateTransform, KEYFRAMES, type KeyframeDef, type KeyframeName, type KeyframeProperty, type KeyframeStop, type KeyframeValue, LABEL_GAP_COMPACT, LABEL_GAP_DEFAULT, LINE_POINT_CASCADE_MS, type LabelCandidate, type LabelConfig, type LabelDensity, type LabelMode, type LabelPriority, type LabelSpec, type LayerSpec, type LayoutStrategy, type LegendChannel, type LegendConfig, type LegendEntry, type LegendEntryPosition, type LegendLayout, type LegendPosition, type LineEncoding, type LineMark, type LinearGradient, type LogicalAnd, type LogicalNot, type LogicalOr, type LollipopEncoding, MAP_FEATURE_MAX_DURATION_MS, MAP_POINT_STAGGER_FALLBACK_MS, MAP_SWEEP_BUDGET_MS, MARK_DISPLAY_NAMES, MARK_ENCODING_RULES, MARK_TYPES, MAX_LEFT_LABEL_FRACTION_COMPACT, MAX_LEFT_LABEL_FRACTION_DEFAULT, MAX_LEFT_LABEL_FRACTION_MEDIUM, MAX_LEFT_LABEL_FRACTION_MEDIUM_MAX, MAX_SPRING_DURATION, MAX_SR_TABLE_ROWS, MAX_TOTAL_STAGGER_MS, MOTION_REST_THRESHOLD, type MapSweepTiming, type Margins, type Mark, type MarkAria, type MarkDef, type MarkEvent, type MarkFocusEvent, type MarkMetadata, type MarkType, type MeasureTextFn, type Metric, type MonotoneCurveName, type MotionPhase, type MotionSample, NARROW_VIEWPORT_MAX, type NeutralRamp, type NodeOverride, type NumberFormatter, OFFSET_STRATEGIES, type ObservationIdentity, type OffsetStrategy, type PaginationState, type ParliamentEncoding, type Point, type PointEncoding, type PointMark, type RaceBarGeometry, type RaceBarMarkDef, type RaceBarRow, type RaceBarStatic, type RaceConfig, type RaceEncoding, type RaceFrame, type RaceGeometry, type RaceItem, type RaceLayout, type RaceLineGeometry, type RaceLineMarkDef, type RaceLineStatic, type RaceMarkDef, type RaceMarkType, type RacePlayback, type RaceSpec, type RaceSpecWithoutData, type RaceTableCell, type RaceTableColumn, type RaceTableGeometry, type RaceTableMarkDef, type RaceTableStatic, type RaceTick, type RadialGradient, type RangeAnnotation, type RangeEncoding, type ReaderBindingScope, type ReaderChangeMeta, type ReaderComparisonOperand, type ReaderComparisonResult, type ReaderComparisonScope, type ReaderDomainValue, type ReaderObservation, type ReaderPanelScope, type ReaderSelection, type ReaderSeries, type ReaderSlice, type ReaderSliceIndexOptions, type ReaderSliceMember, type ReaderSliceSelection, type Rect, type RectEncoding, type RectMark, type RefLineAnnotation, type RelativeTimeRef, type ResolveConfig, type ResolveMode, type ResolvedAnimation, type ResolvedAnimationPhase, type ResolvedAnnotation, type ResolvedChrome, type ResolvedChromeElement, type ResolvedChromeRule, type ResolvedColumn, type ResolvedFillPattern, type ResolvedLabel, type ResolvedMetricBar, type ResolvedMetricCell, type ResolvedSeriesSearch, type ResolvedTheme, type ResolvedThemeColors, type ResolvedYouDrawIt, type ResponsiveConfig, type RoleTiming, type RuleMarkLayout, SEQUENTIAL_PALETTES, SUPPORTED_SCHEME_NAMES, type SankeyEncoding, type SankeyLayout, type SankeyLinkColor, type SankeyLinkMark, type SankeyNodeAlign, type SankeyNodeMark, type SankeySpec, type SankeySpecOverride, type SankeySpecWithoutData, type ScaleConfig, type ScaleInvert, type ScaleType, type SequentialPalette, type SeriesSearchConfig, type SeriesStrategy, type SeriesStyle, type SizeLegendCircle, type SizeLegendLayout, type SortByField, type SortState, type SparklineColumnConfig, type SparklineData, type SparklineTableCell, type SpecPatch, type SpringConfig, type StaggerRule, type StoredVizSpec, TICK_LABEL_OFFSET, TICK_LINE_HEIGHT_FACTOR, TOP_PAD_EXTRA_NARROW, type TableBuilderOptions, type TableCell, type TableCellBase, type TableDensity, type TableLayout, type TableRow, type TableSpec, type TableSpecWithoutData, type TableTotalRow, type TextAnnotation, type TextEncoding, type TextMarkLayout, type TextStyle, type TextTableCell, type ThemeChromeDefaults, type ThemeColors, type ThemeConfig, type ThemeFontSizes, type ThemeFontWeights, type ThemeFonts, type ThemeRule, type ThemeSpacing, type TickEncoding, type TickMarkLayout, type TileMapBuilderOptions, type TileMapEncoding, type TileMapLayout, type TileMapPalette, type TileMapSpec, type TileMapSpecWithoutData, type TileMapTileMark, type TimeUnit, type TimeUnitTransform, type TokenValue, type TooltipContent, type TooltipField, type Transform, UPDATE_ENTER_START, type UpdatePhaseConfig, type UpdateTimeline, type ValueDef, type VizSpec, type WaffleEncoding, type WindowFieldDef, type WindowOp, type WindowSortField, type WindowTransform, type XAxisExtentInput, X_AXIS_BAND_HEIGHT, X_AXIS_ROTATED_EXTENT_CAP, X_AXIS_TITLE_BAND, X_AXIS_TITLE_BAND_ROTATED, type YouDrawItConfig, type YouDrawItSample, type YouDrawItYInvert, abbreviateNumber, adaptColorForDarkMode, adaptForLightLineStroke, adaptTheme, anchorMs, annotationSource, applyEditTransaction, areaChart, axisTitleOffset, barChart, broadsheet, buildCompactStepFormatter, buildD3Formatter, buildTemporalFormatter, checkPaletteDistinguishability, clampStaggerDelay, clarity, columnChart, computeChrome, computeFieldFormatContext, computeLabelBounds, computeNoteBandHeight, computeXAxisExtentFromLabels, contrastRatio, cssTokenDefault, curveStops, curveToCSSLinear, dataTable, deepMergeSpec, defaultNumberFormatter, deriveNeutralRamp, detectCollision, donutChart, dotChart, elementRef, encodePointerToken, entranceAnchorVars, entranceEndMs, entranceRole, entranceTiming, essay, estimateTextWidth, evalCubicBezier, evalCurve, evalKeyframes, evalRoleEase, evalValueCurve, findAccessibleColor, formatCurrency, formatDate, formatNumber, formatOrdinal, formatPercent, generateAltText, generateAriaLabels, generateDataTable, getAxisTitleOffset, getBreakpoint, getHeightClass, getLayoutStrategy, getRepresentativeColor, heuristicMeasure, inferFieldType, invertCurve, invertRoleEase, isAxislessMark, isBarListSpec, isChartSpec, isConditionalDef, isEncodingChannel, isGeoMapSpec, isGradientDef, isGraphSpec, isLayerSpec, isMonotoneCurve, isOpaqueColor, isRaceSpec, isRangeAnnotation, isRefLineAnnotation, isSankeySpec, isTableSpec, isTextAnnotation, isTileMapSpec, isValueDef, isYearContext, jsonPointer, keyframeProperties, keyframeValueToCSS, legacyEditorial, lineChart, mapFeatureDuration, mapSweepTiming, maxRotatedLabelWidth, meetsAA, mergeThemeConfig, motionCSS, overlapArea, pickLabelColor, pieChart, progressTimeMs, resolveChromeEconomy, resolveCollisions, resolveMarkDef, resolveMarkType, resolveMeasurer, resolveNumberFormatter, resolveSchemeName, resolveTheme, roleBaseDuration, roleVars, sampleMotion, scatterChart, shuffledSweepDelays, simulateColorBlindness, springDuration, terminal, textAscent, tileMap, tilemapTileDelays, truncateRotatedLabel, truncateToWidth, updateTimeline, wire, wrapText };
9265
+ export { type A11yConfig, type A11yMetadata, ACHROMATIC_RAMP, AXIS_TITLE_GAP, AXIS_TITLE_OFFSET_COMPACT, AXIS_TITLE_OFFSET_DEFAULT, AXIS_TITLE_TRAILING_PAD, type AggregateOp, type AggregateTransform, type AnimationConfig, type AnimationEase, type AnimationPhaseConfig, type AnimationPreset, type AnimationSpec, type AnimationStagger, type Annotation, type AnnotationAnchor, type AnnotationFootnote, type AnnotationOffset, type AnnotationPosition, type ArcEncoding, type ArcMark, type AreaEncoding, type AreaMark, type AxisConfig, type AxisLabelDensity, type AxisLayout, type AxisTick, BRAND_FONT_SIZE, BRAND_MIN_WIDTH, BRAND_RESERVE_WIDTH, BREAKPOINT_COMPACT_MAX, BREAKPOINT_MEDIUM_MAX, type BarColumnConfig, type BarEncoding, type BarListEncoding, type BarListLayout, type BarListRowMark, type BarListSpec, type BarListSpecWithoutData, type BarTableCell, type BaseLegendLayout, type BeeswarmEncoding, type BinParams, type BinTransform, type Breakpoint, CATEGORICAL_EXTENDED_PALETTE, CATEGORICAL_FILL_PALETTE, CATEGORICAL_FILL_PALETTE_DARK, CATEGORICAL_PALETTE, CATEGORICAL_PALETTE_DARK, CELL_SWEEP_BUDGET_MS, COMPACT_MAX_X_TICKS, COMPACT_WIDTH, CSS_TOKENS, CSS_TOKEN_ROOT_SELECTORS, CURVE_NAMES, type CalculateExpression, type CalculateTransform, type CalendarEncoding, type CategoricalLegendLayout, type CategoricalPalette, type CategoryColorsConfig, type CategoryTableCell, type CellStyle, type ChannelRule, type ChartBuilderOptions, type ChartEventHandlers, type ChartLayout, type ChartSpec, type ChartSpecOverride, type ChartSpecWithoutData, type Chrome, type ChromeDefaults, type ChromeEconomy, type ChromeKey, type ChromeMode, type ChromeText, type ChromeTextStyle, type ChromeThemeOverride, type CircleEncoding, type ColorBlindnessType, type ColumnConfig, type CompileOptions, type CompileTableOptions, type CompileWarning, type CompositionRecommendation, type Condition, type ConditionalValueDef, type ConnectorConfig, type ConnectorType, type ContinuousLegendBin, type ContinuousLegendLayout, type ContinuousLegendTick, type CssTokenDef, type CurveInput, type CurveName, type CurveStop, DEFAULT_THEME, DIVERGING_PALETTES, type DarkMode, type DataRow, type DatasetBinding, type DateGranularity, type DelayAnchor, type DelayRule, type DeltaColumnConfig, type DeltaTableCell, type DensityEncoding, type DensityTransform, type DescriptionEncoding, type DesignDiagnostic, type DesignQuestion, type Display, type DivergingPalette, type DurationRule, ENTRANCE_ROLES, EXIT_CURVE, EXIT_FADE_MS, EXTENDED_OFFSET_STRATEGIES, type EditOp, type EditTransaction, type EditTransactionResult, type ElementRef, type Encoding, type EncodingChannel, type EncodingRule, type EndpointLabelContent, type EndpointLabelEntry, type EndpointLabelsConfig, type EndpointLabelsLayout, type EnterPhaseConfig, type EntranceEndContext, type EntranceRole, type EntranceRoleDef, type EntranceRoleExtent, type EntranceRoleRow, type EntranceTiming, type EntranceTimingContext, type ErrorbarEncoding, FADE_CURVE, FLUID_SPRING, FOOTNOTE_LINE_HEIGHT, type FacetChannel, type FacetLayout, type FacetPanelLayout, type FieldFormatContext, type FieldMetadata, type FieldPredicate, type FieldRef, type FieldType, type FillPatternType, type FilterPredicate, type FilterTransform, type FlagTableCell, type FoldTransform, type FrameConfig, GRAPH_ENCODING_RULES, type GeoAnchor, type GeoCallout, type GeoCalloutNoteSlot, type GeoColorKeyDescriptor, type GeoColorKeyLayout, type GeoDetailLayer, type GeoDetailLayerLayout, type GeoEntityRef, type GeoInset, type GeoLabelAffine, type GeoLabelCandidate, type GeoLabelComponent, type GeoLabelGeometry, type GeoLabelInventoryEntry, type GeoLabelOverlay, type GeoLabelVisibility, type GeoLabelsBundle, type GeoLabelsInput, type GeoMapBorders, type GeoMapEncoding, type GeoMapFeatureMark, type GeoMapFocus, type GeoMapFocusLayout, type GeoMapGeo, type GeoMapLayout, type GeoMapPointMark, type GeoMapPointsLayer, type GeoMapProjection, type GeoMapSpec, type GeoMapSpecWithoutData, type GeoMapZoomConfig, type GeoPlacedLabel, type GeoProjectionContext, type GeoReaderObservation, type GeoReaderSelection, type GeoTextBlock, type GeoViewLayout, type GradientColorStop, type GradientDef, type GradientLegendLayout, type GradientStop, type GraphAnimationConfig, type GraphAnimationSpec, type GraphChannelRule, type GraphEdge, type GraphEdgeLayout, type GraphEncoding, type GraphEncodingChannel, type GraphEnterPhaseConfig, type GraphInteractionConfig, type GraphLayout, type GraphLayoutConfig, type GraphNode, type GraphNodeLayout, type GraphPhaseConfig, type GraphSpec, type GraphSpecWithoutData, type Gridline, HEIGHT_CRAMPED_MAX, HEIGHT_MINIMAL_MAX, HEIGHT_NO_GRID_MAX, HEIGHT_SHORT_MAX, HPAD_COMPACT_FRACTION, HPAD_COMPACT_MIN, type HeatmapColumnConfig, type HeatmapTableCell, type HeightClass, type HistogramEncoding, type ImageColumnConfig, type ImageTableCell, type JoinAggregateTransform, KEYFRAMES, type KeyframeDef, type KeyframeName, type KeyframeProperty, type KeyframeStop, type KeyframeValue, LABEL_GAP_COMPACT, LABEL_GAP_DEFAULT, LINE_POINT_CASCADE_MS, type LabelCandidate, type LabelConfig, type LabelDensity, type LabelMode, type LabelPriority, type LabelSpec, type LayerSpec, type LayoutStrategy, type LegendChannel, type LegendConfig, type LegendEntry, type LegendEntryPosition, type LegendLayout, type LegendPosition, type LineEncoding, type LineMark, type LinearGradient, type LogicalAnd, type LogicalNot, type LogicalOr, type LollipopEncoding, MAP_FEATURE_MAX_DURATION_MS, MAP_POINT_STAGGER_FALLBACK_MS, MAP_SWEEP_BUDGET_MS, MARK_DISPLAY_NAMES, MARK_ENCODING_RULES, MARK_TYPES, MAX_LEFT_LABEL_FRACTION_COMPACT, MAX_LEFT_LABEL_FRACTION_DEFAULT, MAX_LEFT_LABEL_FRACTION_MEDIUM, MAX_LEFT_LABEL_FRACTION_MEDIUM_MAX, MAX_SPRING_DURATION, MAX_SR_TABLE_ROWS, MAX_TOTAL_STAGGER_MS, MOTION_REST_THRESHOLD, type MapSweepTiming, type Margins, type Mark, type MarkAria, type MarkDef, type MarkEvent, type MarkFocusEvent, type MarkMetadata, type MarkType, type MeasureTextFn, type Metric, type MonotoneCurveName, type MotionPhase, type MotionSample, NARROW_VIEWPORT_MAX, type NeutralRamp, type NodeOverride, type NumberFormatter, OFFSET_STRATEGIES, type ObservationIdentity, type OffsetStrategy, type PaginationState, type ParliamentEncoding, type PlaybackConfig, type PlaybackPeriodPosition, type PlaybackTimingConfig, type Point, type PointEncoding, type PointMark, type RaceBarGeometry, type RaceBarMarkDef, type RaceBarRow, type RaceBarStatic, type RaceConfig, type RaceEncoding, type RaceFrame, type RaceGeometry, type RaceItem, type RaceLayout, type RaceLineGeometry, type RaceLineMarkDef, type RaceLineStatic, type RaceMarkDef, type RaceMarkType, type RacePlayback, type RaceSpec, type RaceSpecWithoutData, type RaceTableCell, type RaceTableColumn, type RaceTableGeometry, type RaceTableMarkDef, type RaceTableStatic, type RaceTick, type RadialGradient, type RangeAnnotation, type RangeEncoding, type ReaderBindingScope, type ReaderChangeMeta, type ReaderComparisonOperand, type ReaderComparisonResult, type ReaderComparisonScope, type ReaderDomainValue, type ReaderObservation, type ReaderPanelScope, type ReaderSelection, type ReaderSeries, type ReaderSlice, type ReaderSliceIndexOptions, type ReaderSliceMember, type ReaderSliceSelection, type Rect, type RectEncoding, type RectMark, type RefLineAnnotation, type RelativeTimeRef, type ResolveConfig, type ResolveMode, type ResolvedAnimation, type ResolvedAnimationPhase, type ResolvedAnnotation, type ResolvedChrome, type ResolvedChromeElement, type ResolvedChromeRule, type ResolvedColumn, type ResolvedFillPattern, type ResolvedLabel, type ResolvedMetricBar, type ResolvedMetricCell, type ResolvedSeriesSearch, type ResolvedTheme, type ResolvedThemeColors, type ResolvedYouDrawIt, type ResponsiveConfig, type RoleTiming, type RuleMarkLayout, SEQUENTIAL_PALETTES, SUPPORTED_SCHEME_NAMES, type SankeyEncoding, type SankeyLayout, type SankeyLinkColor, type SankeyLinkMark, type SankeyNodeAlign, type SankeyNodeMark, type SankeySpec, type SankeySpecOverride, type SankeySpecWithoutData, type ScaleConfig, type ScaleInvert, type ScaleType, type SequentialPalette, type SeriesSearchConfig, type SeriesStrategy, type SeriesStyle, type SizeLegendCircle, type SizeLegendLayout, type SortByField, type SortState, type SparklineColumnConfig, type SparklineData, type SparklineTableCell, type SpecPatch, type SpringConfig, type StaggerRule, type StoredVizSpec, TICK_LABEL_OFFSET, TICK_LINE_HEIGHT_FACTOR, TOP_PAD_EXTRA_NARROW, type TableBuilderOptions, type TableCell, type TableCellBase, type TableDensity, type TableLayout, type TableRow, type TableSpec, type TableSpecWithoutData, type TableTotalRow, type TextAnnotation, type TextEncoding, type TextMarkLayout, type TextStyle, type TextTableCell, type ThemeChromeDefaults, type ThemeColors, type ThemeConfig, type ThemeFontSizes, type ThemeFontWeights, type ThemeFonts, type ThemeRule, type ThemeSpacing, type TickEncoding, type TickMarkLayout, type TileMapBuilderOptions, type TileMapEncoding, type TileMapLayout, type TileMapPalette, type TileMapSpec, type TileMapSpecWithoutData, type TileMapTileMark, type TimeUnit, type TimeUnitTransform, type TokenValue, type TooltipContent, type TooltipField, type Transform, UPDATE_ENTER_START, type UpdatePhaseConfig, type UpdateTimeline, type ValueDef, type VizSpec, type WaffleEncoding, type WindowFieldDef, type WindowOp, type WindowSortField, type WindowTransform, type XAxisExtentInput, X_AXIS_BAND_HEIGHT, X_AXIS_ROTATED_EXTENT_CAP, X_AXIS_TITLE_BAND, X_AXIS_TITLE_BAND_ROTATED, type YouDrawItConfig, type YouDrawItSample, type YouDrawItYInvert, abbreviateNumber, adaptColorForDarkMode, adaptForLightLineStroke, adaptTheme, anchorMs, annotationSource, applyEditTransaction, areaChart, axisTitleOffset, barChart, broadsheet, buildCompactStepFormatter, buildD3Formatter, buildTemporalFormatter, checkPaletteDistinguishability, clampStaggerDelay, clarity, columnChart, computeChrome, computeFieldFormatContext, computeLabelBounds, computeNoteBandHeight, computeXAxisExtentFromLabels, contrastRatio, cssTokenDefault, curveStops, curveToCSSLinear, dataTable, deepMergeSpec, defaultNumberFormatter, deriveNeutralRamp, detectCollision, donutChart, dotChart, elementRef, encodePointerToken, entranceAnchorVars, entranceEndMs, entranceRole, entranceTiming, essay, estimateTextWidth, evalCubicBezier, evalCurve, evalKeyframes, evalRoleEase, evalValueCurve, findAccessibleColor, formatCurrency, formatDate, formatNumber, formatOrdinal, formatPercent, generateAltText, generateAriaLabels, generateDataTable, getAxisTitleOffset, getBreakpoint, getHeightClass, getLayoutStrategy, getRepresentativeColor, heuristicMeasure, inferFieldType, invertCurve, invertRoleEase, isAxislessMark, isBarListSpec, isChartSpec, isConditionalDef, isEncodingChannel, isGeoMapSpec, isGradientDef, isGraphSpec, isLayerSpec, isMonotoneCurve, isOpaqueColor, isRaceSpec, isRangeAnnotation, isRefLineAnnotation, isSankeySpec, isTableSpec, isTextAnnotation, isTileMapSpec, isValueDef, isYearContext, jsonPointer, keyframeProperties, keyframeValueToCSS, legacyEditorial, lineChart, mapFeatureDuration, mapSweepTiming, maxRotatedLabelWidth, meetsAA, mergeThemeConfig, motionCSS, overlapArea, pickLabelColor, pieChart, progressTimeMs, resolveChromeEconomy, resolveCollisions, resolveMarkDef, resolveMarkType, resolveMeasurer, resolveNumberFormatter, resolveSchemeName, resolveTheme, roleBaseDuration, roleVars, sampleMotion, scatterChart, shuffledSweepDelays, simulateColorBlindness, springDuration, terminal, textAscent, tileMap, tilemapTileDelays, truncateRotatedLabel, truncateToWidth, updateTimeline, wire, wrapText };
package/dist/index.js CHANGED
@@ -152,7 +152,8 @@ var MARK_ENCODING_RULES = {
152
152
  opacity: optional("quantitative"),
153
153
  tooltip: optional(),
154
154
  description: optional(),
155
- detail: optional("nominal")
155
+ detail: optional("nominal"),
156
+ time: optional("temporal", "ordinal", "quantitative")
156
157
  },
157
158
  line: {
158
159
  x: required("temporal", "ordinal"),
@@ -186,7 +187,8 @@ var MARK_ENCODING_RULES = {
186
187
  opacity: optional("quantitative"),
187
188
  tooltip: optional(),
188
189
  description: optional(),
189
- detail: optional("nominal")
190
+ detail: optional("nominal"),
191
+ time: optional("temporal", "ordinal", "quantitative")
190
192
  },
191
193
  circle: {
192
194
  x: required("quantitative"),
@@ -196,7 +198,8 @@ var MARK_ENCODING_RULES = {
196
198
  opacity: optional("quantitative"),
197
199
  tooltip: optional(),
198
200
  description: optional(),
199
- detail: optional("nominal")
201
+ detail: optional("nominal"),
202
+ time: optional("temporal", "ordinal", "quantitative")
200
203
  },
201
204
  lollipop: {
202
205
  x: required("quantitative"),