/**
* Table slide layout with various size/alignment options
*/
import type { SlideLayout } from "./types.js";
export const tableLayout: SlideLayout = {
name: "table",
description: "Table slide with fixed center-tiny layout",
params: {
heading: {
type: "string",
description: "Slide heading (max 40 chars, ~22 chars for Japanese)",
required: true,
maxLength: 40,
},
tableMarkdown: {
type: "string",
description: "Table in markdown format (max 7 rows excluding header, total ~40 chars/~23 Japanese chars across columns recommended)",
required: true,
},
description: {
type: "string",
description: "Table description below table (max 55 chars, ~33 chars for Japanese, no line break)",
required: false,
maxLength: 55,
},
citations: {
type: "string",
description: "Citation (max 50 chars, ~30 chars for Japanese, no line break)",
required: false,
maxLength: 50,
},
},
template: (params) => {
let slide = "";
if (params.heading) {
slide += `## ${params.heading}\n\n`;
}
slide += params.tableMarkdown;
// Table description (optional)
if (params.description) {
slide += `\n\n${params.description}`;
}
// Fixed table class
slide += `\n\n<!-- _class: table-center table-tiny -->`;
// Citation (single, no line break)
if (params.citations) {
slide += `\n\n> ${params.citations}`;
}
return slide;
},
};