Significant tiptap updates

This commit is contained in:
2026-02-28 17:11:33 -06:00
parent 5bf00de940
commit 6de09411a1
8 changed files with 546 additions and 5 deletions
+11 -1
View File
@@ -1,4 +1,4 @@
import { type Component, type JSX, createSignal, createEffect, Show, lazy, Suspense, onMount } from "solid-js";
import { type Component, type JSX, createSignal, createEffect, Show, lazy, Suspense, onMount, onCleanup } from "solid-js";
import { Sidebar, BottomNav, ContextSwitcher } from "./Navigation";
import { store, setStore, activeTaskId, setActiveTaskId } from "@/store";
import { PanelLeftOpen, PanelLeftClose } from "lucide-solid";
@@ -30,6 +30,16 @@ export const Layout: Component<LayoutProps> = (props) => {
});
onMount(() => {
const handleOpenNote = (e: Event) => {
const detail = (e as CustomEvent).detail;
if (detail && detail.noteId) {
setStore('isNotepadMode', true);
setSelectedNoteId(detail.noteId);
}
};
window.addEventListener('open-note', handleOpenNote);
onCleanup(() => window.removeEventListener('open-note', handleOpenNote));
// Preload heavy components in background when idle
const idleCallback = (window as any).requestIdleCallback || ((cb: any) => setTimeout(cb, 2000));
idleCallback(() => {