@zjlab-fe/data-hub-ui 0.5.15 → 0.5.17

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.
Files changed (23) hide show
  1. package/dist/types/components/tip-tap/actions/action-image.d.ts +4 -0
  2. package/dist/types/components/tip-tap/actions/action-link.d.ts +5 -0
  3. package/dist/types/components/tip-tap/actions/action-list.d.ts +4 -0
  4. package/dist/types/components/tip-tap/actions/action-table.d.ts +4 -0
  5. package/dist/types/components/tip-tap/actions/bold-italic-strike-underline.d.ts +4 -0
  6. package/dist/types/components/tip-tap/actions/code-quote-horizontalRule.d.ts +4 -0
  7. package/dist/types/components/tip-tap/actions/link-modifier.d.ts +4 -0
  8. package/dist/types/components/tip-tap/actions/paragraph-headings.d.ts +13 -0
  9. package/dist/types/components/tip-tap/actions/text-aligment.d.ts +4 -0
  10. package/dist/types/components/tip-tap/actions/undo-redo.d.ts +4 -0
  11. package/dist/types/components/tip-tap/extensions/drop-handler.d.ts +2 -0
  12. package/dist/types/components/tip-tap/extensions/font-size.d.ts +20 -0
  13. package/dist/types/components/tip-tap/extensions/patse-handler.d.ts +3 -0
  14. package/dist/types/components/tip-tap/menus/bubble-menu.d.ts +7 -0
  15. package/dist/types/components/tip-tap/menus/fixed-menu.d.ts +9 -0
  16. package/dist/types/components/tip-tap/menus/link-floating-menu.d.ts +6 -0
  17. package/dist/types/components/tip-tap/menus/paragraph-floating-menu.d.ts +6 -0
  18. package/dist/types/components/tip-tap/utils/add-image-to-editor.d.ts +2 -0
  19. package/dist/types/components/tip-tap/utils/markdown-detector.d.ts +33 -0
  20. package/dist/types/components/tip-tap/utils/parse-markdown.d.ts +2 -0
  21. package/es/index.js +1 -1
  22. package/lib/index.js +1 -1
  23. package/package.json +137 -136
@@ -0,0 +1,4 @@
1
+ import { Editor } from '@tiptap/react';
2
+ export default function Image({ editor }: {
3
+ editor: Editor;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { Editor } from '@tiptap/react';
2
+ export default function Link({ editor, inline }: {
3
+ editor: Editor;
4
+ inline?: boolean;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { Editor } from '@tiptap/react';
2
+ export default function List({ editor }: {
3
+ editor: Editor;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { Editor } from '@tiptap/react';
2
+ export default function Table({ editor }: {
3
+ editor: Editor;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { Editor } from '@tiptap/react';
2
+ export default function BoldItalicStrikeUnderline({ editor }: {
3
+ editor: Editor;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { Editor } from '@tiptap/react';
2
+ export default function CodeQuoteHorizontalRule({ editor }: {
3
+ editor: Editor;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { Editor } from '@tiptap/react';
2
+ export default function LinkModifier({ editor }: {
3
+ editor: Editor;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,13 @@
1
+ import { Editor } from '@tiptap/react';
2
+ export declare const ICON_MAP: {
3
+ paragraph: import("react/jsx-runtime").JSX.Element;
4
+ 1: import("react/jsx-runtime").JSX.Element;
5
+ 2: import("react/jsx-runtime").JSX.Element;
6
+ 3: import("react/jsx-runtime").JSX.Element;
7
+ 4: import("react/jsx-runtime").JSX.Element;
8
+ 5: import("react/jsx-runtime").JSX.Element;
9
+ 6: import("react/jsx-runtime").JSX.Element;
10
+ };
11
+ export default function ParagraphHeadings({ editor }: {
12
+ editor: Editor;
13
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { Editor } from '@tiptap/react';
2
+ export default function TextAlignment({ editor }: {
3
+ editor: Editor;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { Editor } from '@tiptap/react';
2
+ export default function UndoRedo({ editor }: {
3
+ editor: Editor;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { Extension } from '@tiptap/react';
2
+ export declare const DropHandler: Extension<any, any>;
@@ -0,0 +1,20 @@
1
+ import { Extension } from '@tiptap/react';
2
+ declare module '@tiptap/core' {
3
+ interface Commands<ReturnType> {
4
+ fontSize: {
5
+ /**
6
+ * Set the font size
7
+ */
8
+ setFontSize: (size: string) => ReturnType;
9
+ /**
10
+ * Unset the font size
11
+ */
12
+ unsetFontSize: () => ReturnType;
13
+ };
14
+ }
15
+ }
16
+ export interface FontSizeOptions {
17
+ types: string[];
18
+ defaultFontSize: string;
19
+ }
20
+ export declare const FontSize: Extension<FontSizeOptions, any>;
@@ -0,0 +1,3 @@
1
+ import { Editor, Extension } from '@tiptap/react';
2
+ export declare const PasteHandler: Extension<any, any>;
3
+ export declare function handleImage(editor: Editor, files: FileList): void;
@@ -0,0 +1,7 @@
1
+ import './bubble-menu.css';
2
+ /**
3
+ * 选中文本后显示
4
+ */
5
+ export default function BubbleMenu({ className }: {
6
+ className?: string;
7
+ }): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * 固定菜单
3
+ */
4
+ declare const _default: import("react").ForwardRefExoticComponent<{
5
+ className?: string;
6
+ } & import("react").RefAttributes<{
7
+ getContent: () => string;
8
+ }>>;
9
+ export default _default;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * 链接修改菜单
3
+ */
4
+ export default function LinkFloatingMenu({ className }: {
5
+ className?: string;
6
+ }): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * 新段落菜单
3
+ */
4
+ export default function ParagraphFloatingMenu({ className }: {
5
+ className?: string;
6
+ }): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,2 @@
1
+ import { Editor } from '@tiptap/react';
2
+ export declare function addImageToEditor(editor: Editor, file: File, onAdded?: () => void): boolean;
@@ -0,0 +1,33 @@
1
+ declare class MarkdownDetector {
2
+ private patterns;
3
+ /**
4
+ * Checks if text is NOT in Markdown format
5
+ * @param text - The text to analyze
6
+ * @param threshold - Minimum percentage of Markdown patterns needed (0-100)
7
+ * @returns true if text is NOT Markdown, false if it likely is Markdown
8
+ */
9
+ isNotMarkdown(text: string, threshold?: number): boolean;
10
+ /**
11
+ * Calculates a score (0-100) indicating how much the text looks like Markdown
12
+ * @param text - The text to analyze
13
+ * @returns Score from 0 (no Markdown) to 100 (heavy Markdown usage)
14
+ */
15
+ calculateMarkdownScore(text: string): number;
16
+ /**
17
+ * Get detailed analysis of what Markdown patterns were found
18
+ * @param text - The text to analyze
19
+ * @returns Object with pattern match counts
20
+ */
21
+ analyzeMarkdownPatterns(text: string): Record<string, number>;
22
+ /**
23
+ * Simple boolean check with common Markdown indicators
24
+ * @param text - The text to check
25
+ * @returns true if text appears to be plain text (not Markdown)
26
+ */
27
+ isPlainText(text: string): boolean;
28
+ }
29
+ export declare const markdownDetector: MarkdownDetector;
30
+ export declare function isNotMarkdown(text: string, threshold?: number): boolean;
31
+ export declare function isPlainText(text: string): boolean;
32
+ export declare function getMarkdownScore(text: string): number;
33
+ export {};
@@ -0,0 +1,2 @@
1
+ export declare const ALREADY_PARSED_TAG = "<!--- this is file is already parsed -->";
2
+ export declare function parseMarkDown(content: string): string;