feat(split-screen): redesign split screen with free-form panes and pane picker

This commit is contained in:
LukeGus committed 2026-09-28 19:49:04 -05:00
1 parent 5f3372f9f6
commit 81e7aa6274
46 files changed
+5027 -2537

No files matched your search

+7
View File
@@ -0,0 +1,7 @@
/** A random id, with a fallback for insecure contexts that lack randomUUID. */
export function createId(): string {
if (typeof globalThis.crypto?.randomUUID === "function") {
return globalThis.crypto.randomUUID();
}
return `${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}-${Math.random().toString(36).slice(2)}`;
}
-10
View File
@@ -1,10 +0,0 @@
// Module-level flag: true while a split pane divider is being dragged.
// TerminalTab reads this to suppress fit() calls during drag.
export const splitDragState = { active: false };
// Callbacks registered by terminal instances to trigger a fit after drag ends.
const fitCallbacks = new Set<() => void>();
export function notifyDragEnd() {
for (const fn of fitCallbacks) fn();
}
-23
View File
@@ -2,7 +2,6 @@ import type {
DashboardCardConfig,
FontSizeId,
UiFontId,
SplitMode,
} from "@/types/ui-types";
export const DASHBOARD_CARDS: DashboardCardConfig[] = [
@@ -134,25 +133,3 @@ export const FOLDER_COLORS = [
"#ec4899",
"#6b7280",
];
export const SPLIT_MODES: { id: SplitMode; label: string }[] = [
{ id: "none", label: "None" },
{ id: "2-way", label: "2-Way" },
{ id: "2-way-horizontal", label: "2-Way (H)" },
{ id: "3-way", label: "3-Way (V)" },
{ id: "3-way-horizontal", label: "3-Way (H)" },
{ id: "4-way", label: "4-Way" },
{ id: "5-way", label: "5-Way" },
{ id: "6-way", label: "6-Way" },
];
export const PANE_COUNTS: Record<SplitMode, number> = {
none: 0,
"2-way": 2,
"2-way-horizontal": 2,
"3-way": 3,
"3-way-horizontal": 3,
"4-way": 4,
"5-way": 5,
"6-way": 6,
};