feat(editor): implement next-gen editor with unique gutter drag handle, block actions menu, smart paste transclusion, and redesigned inline structured view block (US-NEXTGEN-EDITOR, US-4)

This commit is contained in:
Antigravity
2026-05-27 21:39:21 +00:00
parent 493108f957
commit 07ace46dd3
17 changed files with 2402 additions and 619 deletions

View File

@@ -14,7 +14,7 @@ import {
Heading1, Heading2, Heading3, List, ListOrdered,
CheckSquare, Quote, CodeXml, Database,
} from 'lucide-react'
import { replaceBlockWithDatabase } from '@/components/tiptap-database-block-extension'
import { replaceBlockWithStructuredView } from '@/components/tiptap-structured-view-block-extension'
interface BlockActionMenuProps {
editor: Editor
@@ -132,7 +132,8 @@ export function BlockActionMenu({
const handleTurnInto = useCallback((option: TurnIntoOption) => {
if (blockPos >= 0 && blockNode) {
if (option.isDatabase) {
replaceBlockWithDatabase(editor, blockPos, blockNode)
const notebookId = (editor.storage as any).structuredViewBlock?.notebookId as string | null
replaceBlockWithStructuredView(editor, blockPos, blockNode, notebookId)
} else if (option.command) {
focusBlock(editor, blockPos)
option.command(editor)