@zjlab-fe/data-hub-ui 0.6.8 → 0.7.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,6 @@
1
+ import { Editor } from '@tiptap/react';
2
+ interface BubbleMenuProps {
3
+ editor: Editor;
4
+ }
5
+ export default function TipTapBubbleMenu({ editor }: BubbleMenuProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -1 +1 @@
1
- export default function Demo(): import("react/jsx-runtime").JSX.Element;
1
+ export default function TipTapEditorDemo(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,20 @@
1
+ export interface TipTapEditorHandle {
2
+ getContent: () => string;
3
+ getJSON: () => Record<string, unknown>;
4
+ getMarkdown: () => string;
5
+ setContent: (content: string) => void;
6
+ setMarkdown: (markdown: string) => void;
7
+ focus: () => void;
8
+ isEmpty: () => boolean;
9
+ }
10
+ interface TipTapEditorProps {
11
+ content?: string;
12
+ placeholder?: string;
13
+ editable?: boolean;
14
+ autofocus?: boolean;
15
+ className?: string;
16
+ toolbarClassName?: string;
17
+ onChange?: (html: string) => void;
18
+ }
19
+ declare const _default: import("react").ForwardRefExoticComponent<TipTapEditorProps & import("react").RefAttributes<TipTapEditorHandle>>;
20
+ export default _default;
@@ -1,2 +1,2 @@
1
- export declare const editorExtensions: (import("@tiptap/core").Extension<any, any> | import("@tiptap/core").Node<import("@tiptap/extension-table-row").TableRowOptions, any> | import("@tiptap/core").Mark<import("@tiptap/extension-underline").UnderlineOptions, any>)[];
2
- export declare const readerExtensions: (import("@tiptap/core").Extension<any, any> | import("@tiptap/core").Node<import("@tiptap/extension-table-row").TableRowOptions, any> | import("@tiptap/core").Mark<import("@tiptap/extension-underline").UnderlineOptions, any>)[];
1
+ export declare const editorExtensions: (placeholder?: string) => (import("@tiptap/core").Extension<import("@tiptap/starter-kit").StarterKitOptions, any> | import("@tiptap/core").Extension<import("@tiptap/extension-placeholder").PlaceholderOptions, any> | import("@tiptap/core").Mark<import("@tiptap/extension-text-style").TextStyleOptions, any> | import("@tiptap/core").Extension<import("@tiptap/extension-text-style").ColorOptions, any> | import("@tiptap/core").Extension<import("@tiptap/extension-text-align").TextAlignOptions, any> | import("@tiptap/core").Mark<import("@tiptap/extension-highlight").HighlightOptions, any> | import("@tiptap/core").Node<import("@tiptap/extension-image").ImageOptions, any> | import("@tiptap/core").Node<import("@tiptap/extension-table").TableOptions, any> | import("@tiptap/core").Node<import("@tiptap/extension-table").TableRowOptions, any> | import("@tiptap/core").Node<import("@tiptap/extension-code-block-lowlight").CodeBlockLowlightOptions, any> | import("@tiptap/core").Extension<import("@tiptap/markdown").MarkdownExtensionOptions, import("@tiptap/markdown").MarkdownExtensionStorage> | import("@tiptap/core").Extension<any, any>)[];
2
+ export declare const readerExtensions: () => (import("@tiptap/core").Extension<import("@tiptap/starter-kit").StarterKitOptions, any> | import("@tiptap/core").Mark<import("@tiptap/extension-text-style").TextStyleOptions, any> | import("@tiptap/core").Extension<import("@tiptap/extension-text-style").ColorOptions, any> | import("@tiptap/core").Extension<import("@tiptap/extension-text-align").TextAlignOptions, any> | import("@tiptap/core").Mark<import("@tiptap/extension-highlight").HighlightOptions, any> | import("@tiptap/core").Node<import("@tiptap/extension-image").ImageOptions, any> | import("@tiptap/core").Node<import("@tiptap/extension-table").TableOptions, any> | import("@tiptap/core").Node<import("@tiptap/extension-table").TableRowOptions, any> | import("@tiptap/core").Node<import("@tiptap/extension-code-block-lowlight").CodeBlockLowlightOptions, any>)[];
@@ -0,0 +1,7 @@
1
+ import { Extension } from '@tiptap/core';
2
+ /**
3
+ * Markdown 粘贴扩展
4
+ * 自动检测粘贴的内容是否为 Markdown 格式,如果是则解析为富文本
5
+ */
6
+ export declare const MarkdownPaste: Extension<any, any>;
7
+ export default MarkdownPaste;
@@ -0,0 +1,6 @@
1
+ import { Editor } from '@tiptap/react';
2
+ interface FloatingMenuProps {
3
+ editor: Editor;
4
+ }
5
+ export default function TipTapFloatingMenu({ editor }: FloatingMenuProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,32 @@
1
+ import type { CSSProperties, SVGProps } from 'react';
2
+ type IconProps = SVGProps<SVGSVGElement> & {
3
+ style?: CSSProperties;
4
+ };
5
+ export declare const IconBold: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
6
+ export declare const IconItalic: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
7
+ export declare const IconUnderline: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
8
+ export declare const IconStrikethrough: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const IconCode: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
10
+ export declare const IconH1: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
11
+ export declare const IconH2: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
12
+ export declare const IconH3: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
13
+ export declare const IconListBullet: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
14
+ export declare const IconListNumbered: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
15
+ export declare const IconQuote: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
16
+ export declare const IconLink: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
17
+ export declare const IconImage: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
18
+ export declare const IconTable: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
19
+ export declare const IconAlignLeft: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
20
+ export declare const IconAlignCenter: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
21
+ export declare const IconAlignRight: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
22
+ export declare const IconHighlight: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
23
+ export declare const IconUndo: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
24
+ export declare const IconRedo: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
25
+ export declare const IconMinus: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
26
+ export declare const IconChevronDown: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
27
+ export declare const IconParagraph: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
28
+ export declare const IconCheck: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
29
+ export declare const IconTrash: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
30
+ export declare const IconPlus: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
31
+ export declare const IconTextColor: (props: IconProps) => import("react/jsx-runtime").JSX.Element;
32
+ export {};
@@ -1,19 +1,4 @@
1
- import './index.css';
2
- import './table.css';
3
- import './code-block.css';
4
- declare const _default: import("react").ForwardRefExoticComponent<{
5
- content: string;
6
- classNames?: {
7
- fixedMenu?: string;
8
- editorContainer?: string;
9
- bubbleMenu?: string;
10
- linkFloatingMenu?: string;
11
- paragraphFloatingMenu?: string;
12
- };
13
- } & import("react").RefAttributes<{
14
- getContent: () => string;
15
- }>>;
16
- export default _default;
17
- export declare function TipTapReader({ content }: {
18
- content: string;
19
- }): import("react/jsx-runtime").JSX.Element;
1
+ import './styles/editor.css';
2
+ import TipTapEditor from './editor';
3
+ import TipTapReader from './reader';
4
+ export { TipTapEditor as default, TipTapReader };
@@ -0,0 +1,4 @@
1
+ export default function TipTapReader({ content, className }: {
2
+ content: string;
3
+ className?: string;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { Editor } from '@tiptap/react';
2
+ interface ColorPickerProps {
3
+ editor: Editor;
4
+ type: 'textColor' | 'highlight';
5
+ tooltip: string;
6
+ }
7
+ export declare function ColorPicker({ editor, type, tooltip }: ColorPickerProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,6 @@
1
+ import { Editor } from '@tiptap/react';
2
+ interface HeadingDropdownProps {
3
+ editor: Editor;
4
+ }
5
+ export declare function HeadingDropdown({ editor }: HeadingDropdownProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,6 @@
1
+ import { Editor } from '@tiptap/react';
2
+ interface ImageButtonProps {
3
+ editor: Editor;
4
+ }
5
+ export declare function ImageButton({ editor }: ImageButtonProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,6 @@
1
+ export { ToolbarButton } from './toolbar-button';
2
+ export { HeadingDropdown } from './heading-dropdown';
3
+ export { ColorPicker } from './color-picker';
4
+ export { LinkButton } from './link-button';
5
+ export { ImageButton } from './image-button';
6
+ export { TableButton } from './table-button';
@@ -0,0 +1,6 @@
1
+ import { Editor } from '@tiptap/react';
2
+ interface LinkButtonProps {
3
+ editor: Editor;
4
+ }
5
+ export declare function LinkButton({ editor }: LinkButtonProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,6 @@
1
+ import { Editor } from '@tiptap/react';
2
+ interface TableButtonProps {
3
+ editor: Editor;
4
+ }
5
+ export declare function TableButton({ editor }: TableButtonProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,9 @@
1
+ interface ToolbarButtonProps {
2
+ icon: React.ReactNode;
3
+ tooltip: string;
4
+ onClick: () => void;
5
+ active?: boolean;
6
+ disabled?: boolean;
7
+ }
8
+ export declare function ToolbarButton({ icon, tooltip, onClick, active, disabled, }: ToolbarButtonProps): import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,7 @@
1
+ import { Editor } from '@tiptap/react';
2
+ interface ToolbarProps {
3
+ editor: Editor;
4
+ className?: string;
5
+ }
6
+ export default function Toolbar({ editor, className }: ToolbarProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1 @@
1
+ export { default } from './toolbar/index';