feat: integrate luckysheet inline and fullscreen

This commit is contained in:
liaibo
2025-11-23 17:22:35 +08:00
parent c8e479aeab
commit 994dd4e67c
529 changed files with 403413 additions and 201 deletions
+62
View File
@@ -0,0 +1,62 @@
export type ColumnType =
| "text"
| "number"
| "currency"
| "date"
| "select"
| "checkbox"
| "formula"
| "reference";
export interface TableColumn {
id: string; // Unique column ID
name: string; // Column display name
type: ColumnType;
width: number; // Column width for display
options?: { value: string; color: string }[]; // For 'select' type
}
export interface TableSchema {
columns: TableColumn[];
frozenRowCount: number; // 冻结行数
frozenColCount: number; // 冻结列数
// 其他视图偏好设置...
}
export type TableRowData = Record<string, string | number | boolean | null | undefined>;
export interface DocumentTableSnapshot {
rows?: TableRowData[];
// eslint-disable-next-line @typescript-eslint/no-explicit-any
luckysheet?: any;
}
// 对应 Supabase document_tables 表的元数据
export interface DocumentTable {
id: string;
document_id: string;
title: string;
schema: TableSchema;
snapshot?: DocumentTableSnapshot | null;
created_at: string;
updated_at: string;
}
// Blocknote 块的数据结构
export interface OnlineTableBlockProps {
tableId: string;
title: string; // 允许 Blocknote 渲染时显示表格名称
}
// Global declarations for Luckysheet (minimal definition)
declare global {
interface Window {
luckysheet: {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
create: (options: any) => void;
destroy: (id: string) => void;
// 实际功能会通过动态加载的脚本注入
// 最小化声明以通过 TypeScript 检查
};
}
}