feat: add slides generation tool with multiple slide types
- Add slides.tool.ts with support for title, bullets, chart, stats, table, cards, timeline, quote, comparison, equation, image, summary slide types - Chart types: bar, horizontal-bar, line, donut, radar - Integrate with agent executor and canvas system - Add multilingual support (en/fr) - Various UI improvements and bug fixes Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
67
memento-note/lib/types/presentation.ts
Normal file
67
memento-note/lib/types/presentation.ts
Normal file
@@ -0,0 +1,67 @@
|
||||
/**
|
||||
* Shared types for the Presentation / Slides system.
|
||||
* Used by both the server-side tool (slides.tool.ts) and the client renderer (slides-renderer.tsx).
|
||||
*/
|
||||
|
||||
export interface SlideChart {
|
||||
type: 'bar' | 'line' | 'area' | 'pie' | 'radar' | 'waterfall' | 'funnel' | 'combo' | 'stacked-bar' | 'gauge' | 'treemap'
|
||||
data: Array<Record<string, string | number>>
|
||||
/** Key in data objects used for the X-axis / labels (defaults to "name") */
|
||||
xKey?: string
|
||||
/** Keys for data series. Defaults to all keys except xKey */
|
||||
yKeys?: string[]
|
||||
colors?: string[]
|
||||
showLegend?: boolean
|
||||
showGrid?: boolean
|
||||
/** For combo charts: which yKeys to render as lines (others as bars) */
|
||||
lineKeys?: string[]
|
||||
/** For gauge: target value (0-100) */
|
||||
gaugeValue?: number
|
||||
/** For gauge: label below the value */
|
||||
gaugeLabel?: string
|
||||
}
|
||||
|
||||
export interface SlideSpec {
|
||||
title: string
|
||||
subtitle?: string
|
||||
/** Bullet points, stat values, card items, etc. */
|
||||
content: string[]
|
||||
layout?: 'title' | 'content' | 'section' | 'two-column' | 'cards' | 'stats' | 'quote' | 'toc' | 'summary' | 'image' | 'chart' | 'diagram' | 'timeline' | 'kpi-dashboard' | 'data-table'
|
||||
imageUrl?: string
|
||||
/** Speaker notes / talking points for the presenter (2-3 sentences) */
|
||||
notes?: string
|
||||
/** Recharts-compatible chart spec — used with layout="chart" */
|
||||
chart?: SlideChart
|
||||
/** Mermaid diagram source — used with layout="diagram" */
|
||||
mermaid?: string
|
||||
/** react-icons identifier e.g. "FaRocket" — decorative icon */
|
||||
icon?: string
|
||||
/** For data-table layout: column headers */
|
||||
tableHeaders?: string[]
|
||||
/** For data-table layout: rows of data (each row is array of cell values) */
|
||||
tableRows?: string[][]
|
||||
}
|
||||
|
||||
/** Executive presentation template types */
|
||||
export type SlideTemplate = 'auto' | 'board-update' | 'project-status' | 'strategy-review' | 'quarterly-results'
|
||||
|
||||
export interface PresentationSpec {
|
||||
title: string
|
||||
slides: SlideSpec[]
|
||||
/** Palette key — one of the PALETTES keys or alias */
|
||||
theme?: string
|
||||
/** "sharp" | "brutalist" | "creative" | "rounded" | "pill" — affects border radius */
|
||||
style?: string
|
||||
author?: string
|
||||
/** Executive template used for structure guidance */
|
||||
template?: SlideTemplate
|
||||
}
|
||||
|
||||
export interface Palette {
|
||||
primary: string
|
||||
secondary: string
|
||||
accent: string
|
||||
light: string
|
||||
bg: string
|
||||
isDark: boolean
|
||||
}
|
||||
Reference in New Issue
Block a user