@opendata-ai/openchart-core 8.6.3 → 8.7.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 CHANGED
@@ -1561,12 +1561,16 @@ interface ResolvedYouDrawIt {
1561
1561
  fromX: number;
1562
1562
  /** The chart drawing area, for clamping pointer input and sizing the hatch region. */
1563
1563
  area: Rect;
1564
- /** X samples (pixel + data value) at or after `from`, ascending by pixel x. Drawing snaps to these. */
1564
+ /** X samples (pixel + data value) strictly after `from`, ascending by pixel x. The guess is reported at these. */
1565
1565
  samples: YouDrawItSample[];
1566
+ /** Where the visible line ends (the target line at `fromX`). The reader's guess starts here. Absent when `from` precedes the line's first point. */
1567
+ anchor?: Point;
1566
1568
  /** Resolved prompt text for the hatched region. */
1567
1569
  prompt: string;
1568
1570
  /** Resolved skip-to-reveal button label. */
1569
1571
  revealLabel: string;
1572
+ /** Resolved clear-drawing button label. */
1573
+ resetLabel: string;
1570
1574
  /** Stroke color of the target line (the reader's guess uses a distinct pen style, but shares the palette for continuity). */
1571
1575
  lineColor: string;
1572
1576
  /** seriesKey of the target line mark, so the vanilla layer can find its DOM element. Undefined for a single-series line with no color encoding. */
@@ -3551,8 +3555,8 @@ interface Chrome {
3551
3555
  /** Footer text, displayed at the very bottom. */
3552
3556
  footer?: string | ChromeText;
3553
3557
  /**
3554
- * Right-anchored brand block on the footer row, paired with a small accent
3555
- * dot to its left. Visually balances the source/byline left-anchored text.
3558
+ * Right-anchored brand block on the footer row. Visually balances the
3559
+ * source/byline left-anchored text.
3556
3560
  * When set, suppresses the default `OpenData` watermark for this chart.
3557
3561
  */
3558
3562
  brand?: string | ChromeText;
@@ -3978,15 +3982,17 @@ interface SeriesSearchConfig {
3978
3982
  */
3979
3983
  interface YouDrawItConfig {
3980
3984
  /**
3981
- * The x value (matching `encoding.x`'s domain) where drawing starts. Data
3982
- * before this point renders normally; data at or after it is hidden behind
3983
- * a hatched "draw here" region until reveal.
3985
+ * The x value (matching `encoding.x`'s domain) where drawing starts. The
3986
+ * line renders normally up to this point; data after it is hidden behind a
3987
+ * hatched "draw here" region until reveal.
3984
3988
  */
3985
3989
  from: string | number;
3986
3990
  /** Prompt text shown in the hatched drawing region. Defaults to "Draw your guess". */
3987
3991
  prompt?: string;
3988
3992
  /** Label for the skip-to-reveal button. Defaults to "Show me". */
3989
3993
  revealLabel?: string;
3994
+ /** Label for the clear-drawing button, shown once the reader has drawn and hidden on reveal. Defaults to "Clear". */
3995
+ resetLabel?: string;
3990
3996
  /**
3991
3997
  * Optional extra comparison line (e.g. "what everyone else guessed"),
3992
3998
  * supplied by the host app. Rendered in a third, visually distinct style