Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 115 additions & 0 deletions playground/src/fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,4 +238,119 @@ export const FIXTURES: Fixture[] = [
},
],
},
{
id: "data-visualization",
label: "Data visualization · charts",
blocks: [
{
type: "data_visualization",
block_id: "viz-line-multi",
title: "Weekly active users by platform",
chart: {
type: "line",
series: [
{
name: "Desktop",
data: [
{ label: "Mon", value: 800 },
{ label: "Tue", value: 920 },
{ label: "Wed", value: 880 },
{ label: "Thu", value: 1010 },
{ label: "Fri", value: 1120 },
],
},
{
name: "Mobile",
data: [
{ label: "Mon", value: 400 },
{ label: "Tue", value: 530 },
{ label: "Wed", value: 500 },
{ label: "Thu", value: 590 },
{ label: "Fri", value: 600 },
],
},
],
axis_config: {
categories: ["Mon", "Tue", "Wed", "Thu", "Fri"],
x_label: "Day",
y_label: "Users",
},
},
},
{
type: "data_visualization",
block_id: "viz-bar-negative",
title: "Net headcount change",
chart: {
type: "bar",
series: [
{
name: "Delta",
data: [
{ label: "Mon", value: 4 },
{ label: "Tue", value: -2 },
{ label: "Wed", value: 6 },
{ label: "Thu", value: -1 },
{ label: "Fri", value: 3 },
],
},
],
axis_config: {
categories: ["Mon", "Tue", "Wed", "Thu", "Fri"],
x_label: "Day",
y_label: "People (delta)",
},
},
},
{
type: "data_visualization",
block_id: "viz-area-multi",
title: "Concurrent users by platform",
chart: {
type: "area",
series: [
{
name: "Desktop",
data: [
{ label: "Mon", value: 2800 },
{ label: "Tue", value: 3000 },
{ label: "Wed", value: 3400 },
{ label: "Thu", value: 3200 },
{ label: "Fri", value: 3500 },
],
},
{
name: "Mobile",
data: [
{ label: "Mon", value: 1400 },
{ label: "Tue", value: 1500 },
{ label: "Wed", value: 1700 },
{ label: "Thu", value: 1600 },
{ label: "Fri", value: 1800 },
],
},
],
axis_config: {
categories: ["Mon", "Tue", "Wed", "Thu", "Fri"],
x_label: "Day",
y_label: "Users",
},
},
},
{
type: "data_visualization",
block_id: "viz-pie-multi",
title: "Plan distribution by tier",
chart: {
type: "pie",
segments: [
{ label: "Free", value: 4200 },
{ label: "Pro", value: 2300 },
{ label: "Business+", value: 1100 },
{ label: "Enterprise", value: 480 },
],
},
},
],
},
];
43 changes: 26 additions & 17 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,23 +125,27 @@ const blocks: Block[] = [

## Supported Blocks

| Block Type | Status | Notes |
| --------------- | ------- | ------------------------------------------------------------ |
| Section | ✅ Full | Text, fields, accessories, `expand` property |
| Divider | ✅ Full | Horizontal divider |
| Image | ✅ Full | Collapsible with alt text, `slack_file` support |
| Context | ✅ Full | Images and text elements |
| Header | ✅ Full | Large bold text |
| Rich Text | ✅ Full | Lists, quotes, preformatted, sections, color elements |
| Video | ✅ Full | Collapsible video embed |
| Table | ✅ Full | Rows, columns, alignment |
| Actions | ✅ Full | All interactive element types supported |
| Input | ✅ Full | All input element types supported |
| File | ✅ Full | Remote file display |
| Context Actions | ✅ Full | Feedback buttons and icon buttons |
| Markdown | ✅ Full | Standard markdown with GFM (tables, task lists, code blocks) |
| Plan | ✅ Full | Sequential task display with status indicators |
| Task Card | ✅ Full | Individual task with title, details, output, sources, status |
| Block Type | Status | Notes |
| ------------------ | ------- | ------------------------------------------------------------ |
| Section | ✅ Full | Text, fields, accessories, `expand` property |
| Divider | ✅ Full | Horizontal divider |
| Image | ✅ Full | Collapsible with alt text, `slack_file` support |
| Context | ✅ Full | Images and text elements |
| Header | ✅ Full | Large bold text with `level` (H1–H4) heading sizes |
| Rich Text | ✅ Full | Lists, quotes, preformatted, sections, color elements |
| Video | ✅ Full | Collapsible video embed |
| Table | ✅ Full | Rows, columns, alignment |
| Actions | ✅ Full | All interactive element types supported |
| Input | ✅ Full | All input element types supported |
| File | ✅ Full | Remote file display |
| Context Actions | ✅ Full | Feedback buttons and icon buttons |
| Markdown | ✅ Full | Standard markdown with GFM (tables, task lists, code blocks) |
| Alert | ✅ Full | Status banner with info / warning / error / success levels |
| Card | ✅ Full | Title, subtitle, body, image, icon, and action buttons |
| Carousel | ✅ Full | Horizontally-scrollable gallery of up to 10 cards |
| Plan | ✅ Full | Sequential task display with status indicators |
| Task Card | ✅ Full | Individual task with title, details, output, sources, status |
| Data Visualization | ✅ Full | Line, bar, area, and pie charts; legend, axes, table & CSV |

## Supported Elements

Expand Down Expand Up @@ -408,11 +412,16 @@ import type {
InputBlock,
RichTextBlock,
VideoBlock,
TableBlock,
FileBlock,
ContextActionsBlock,
MarkdownBlock,
PlanBlock,
TaskCardBlock,
AlertBlock,
CardBlock,
CarouselBlock,
DataVisualizationBlock,

// Element types
ButtonElement,
Expand Down
Loading
Loading