feat: publish HoloLake model-native living system source

This commit is contained in:
冰朔 2026-08-03 10:04:41 +08:00
commit c395dd3a99
2467 changed files with 615073 additions and 0 deletions

View file

@ -0,0 +1,26 @@
import { BlockNoteEditor } from '@blocknote/core'
import { describe, expect, it } from 'vitest'
import { schema } from '../components/editorSchema'
type TiptapExtension = {
name: string
options?: {
openOnClick?: unknown
}
}
function findLinkExtension(editor: BlockNoteEditor<typeof schema.blockSchema, typeof schema.inlineContentSchema, typeof schema.styleSchema>) {
const extensions = editor._tiptapEditor.extensionManager.extensions as TiptapExtension[]
return extensions.find((extension) => extension.name === 'link')
}
describe('patched BlockNote link click handling', () => {
it('disables Tiptap direct window.open handling for editor links', () => {
const editor = BlockNoteEditor.create({ schema })
const linkExtension = findLinkExtension(editor)
expect(linkExtension?.options?.openOnClick).toBe(false)
editor._tiptapEditor.destroy()
})
})