notebook_types/v0/
cell.rs

1use serde::{Deserialize, Serialize};
2use tsify::{Tsify, declare};
3use uuid::Uuid;
4
5#[derive(PartialEq, Eq, Debug, Serialize, Deserialize, Tsify)]
6#[serde(tag = "tag")]
7#[tsify(into_wasm_abi, from_wasm_abi)]
8pub enum NotebookCell<T> {
9    #[serde(rename = "rich-text")]
10    RichText { id: Uuid, content: String },
11    #[serde(rename = "formal")]
12    Formal { id: Uuid, content: T },
13    #[serde(rename = "stem")]
14    Stem { id: Uuid },
15}
16
17#[declare]
18pub type Cell<T> = NotebookCell<T>;