Files
writingkit/dist/react/SuggestionCard.d.ts
CatoandClaude Opus 5.5 0f3f481a3b feat: charts in articles and suggestions the writer accepts or rejects (0.3.0) (#14)
* feat: charts in articles and suggestions the writer accepts or rejects (0.3.0)

- ```chart blocks (JSON or CSV spec): parseChartBlock, splitChartBlocks,
  table fallbacks for RSS/share cards (chartsToTables), chartValuesNotInText
  so a proposed chart draws only the writer's own numbers
- @bitbaum/writingkit/react/chart: ArticleChart / ArticleChartBlock drawn by
  @bitbaum/chartkit (new optional peer)
- Suggestion, applySuggestion (refuses stale text), wordDiff, SuggestionCard
- suggestMedia: a chart beside the paragraph with figures, else an illustration
- ArticleComposer: renderChart in Preview; draft-from-brief is a suggestion

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmvT2nQyPBK4EfWf3Rn

* feat(chart): read bip-kit's series-line format too

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmvT2nQyPBK4EfWf3Rn

* fix(suggestions): show a rewrite whole; keep Publish the one primary action

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmvT2nQyPBK4EfWf3Rn

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-15 02:26:30 +01:00

27 lines
1.0 KiB
TypeScript

import { type Suggestion } from "../suggest.js";
export interface SuggestionCardLabels {
heading: (label: string) => string;
accept: string;
reject: string;
pick: string;
replaces: string;
added: string;
removed: string;
}
export declare const DEFAULT_SUGGESTION_LABELS: SuggestionCardLabels;
/**
* A proposal from writing help, shown as what changes (or, when most of the
* text changes, as the new text whole). Both buttons are equal cells: the
* screen's one primary action stays Publish. Nothing reaches the
* text until the writer taps "Use this"; "Keep mine" drops it. Options (a few
* titles) are one list of equal rows, the first chosen. The host applies the
* choice with `applySuggestion`, which refuses when the text moved on.
*/
export declare function SuggestionCard({ suggestion, onAccept, onReject, busy, labels: overrides, }: {
suggestion: Suggestion;
onAccept: (chosen: string) => void;
onReject: () => void;
busy?: boolean;
labels?: Partial<SuggestionCardLabels>;
}): import("react").JSX.Element;