UNPKG

@liveblocks/react-blocknote

Version:

An integration of BlockNote + React to enable collaboration, comments, live cursors, and more with Liveblocks.

1 lines 1.18 kB
{"version":3,"file":"FloatingComposer.cjs","sources":["../../src/comments/FloatingComposer.tsx"],"sourcesContent":["import type {\n BlockNoteEditor,\n BlockSchema,\n DefaultBlockSchema,\n DefaultInlineContentSchema,\n DefaultStyleSchema,\n InlineContentSchema,\n StyleSchema,\n} from \"@blocknote/core\";\nimport { FloatingComposer as TipTapFloatingComposer } from \"@liveblocks/react-tiptap\";\nimport type { Editor } from \"@tiptap/core\";\n\ntype FloatingComposerProps<\n B extends BlockSchema = DefaultBlockSchema,\n I extends InlineContentSchema = DefaultInlineContentSchema,\n S extends StyleSchema = DefaultStyleSchema,\n> = Omit<Parameters<typeof TipTapFloatingComposer>[0], \"editor\"> & {\n editor: BlockNoteEditor<B, I, S>;\n};\n\nexport function FloatingComposer(props: FloatingComposerProps) {\n return (\n <TipTapFloatingComposer\n {...props}\n editor={props.editor._tiptapEditor as unknown as Editor}\n />\n );\n}\n"],"names":["jsx","TipTapFloatingComposer"],"mappings":";;;;;AAoBO,SAAS,iBAAiB,KAA8B,EAAA;AAC7D,EAAA,uBACGA,cAAA,CAAAC,4BAAA,EAAA;AAAA,IACE,GAAG,KAAA;AAAA,IACJ,MAAA,EAAQ,MAAM,MAAO,CAAA,aAAA;AAAA,GACvB,CAAA,CAAA;AAEJ;;;;"}