@zjlab-fe/data-hub-ui 0.20.0 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ export default function NotionEditorDemo(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,22 @@
1
+ import React from 'react';
2
+ import type { PartialBlock, Block } from '@blocknote/core';
3
+ export type { Block, PartialBlock } from '@blocknote/core';
4
+ import '@blocknote/core/fonts/inter.css';
5
+ import '@blocknote/mantine/style.css';
6
+ import './index.scss';
7
+ export interface NotionEditorHandle {
8
+ getContent: () => Block[];
9
+ setContent: (content: Block[]) => void;
10
+ focus: () => void;
11
+ isEmpty: () => boolean;
12
+ }
13
+ export interface NotionEditorProps {
14
+ initContent?: PartialBlock[];
15
+ editable?: boolean;
16
+ className?: string;
17
+ onChange?: (blocks: Block[]) => void;
18
+ onImageUpload?: (file: File) => Promise<string>;
19
+ onFileUpload?: (file: File) => Promise<string>;
20
+ }
21
+ declare const NotionEditor: React.ForwardRefExoticComponent<NotionEditorProps & React.RefAttributes<NotionEditorHandle>>;
22
+ export default NotionEditor;
@@ -41,3 +41,5 @@ export type { CorpusCardProps, ProcessTemplateListItem, ProcessTemplateLabel, La
41
41
  export { default as SDKModal } from './components/SDK-modal';
42
42
  export { default as TagView } from './components/tag-view';
43
43
  export { default as TagGroupFilter } from './components/tag-group-filter';
44
+ export { default as NotionEditor } from './components/notion-editor';
45
+ export type { NotionEditorHandle, NotionEditorProps, Block, PartialBlock } from './components/notion-editor';