@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.
- package/dist/types/components/tip-tap/actions/action-image.d.ts +4 -0
- package/dist/types/components/tip-tap/actions/action-link.d.ts +5 -0
- package/dist/types/components/tip-tap/actions/action-list.d.ts +4 -0
- package/dist/types/components/tip-tap/actions/action-table.d.ts +4 -0
- package/dist/types/components/tip-tap/actions/bold-italic-strike-underline.d.ts +4 -0
- package/dist/types/components/tip-tap/actions/code-quote-horizontalRule.d.ts +4 -0
- package/dist/types/components/tip-tap/actions/link-modifier.d.ts +4 -0
- package/dist/types/components/tip-tap/actions/paragraph-headings.d.ts +13 -0
- package/dist/types/components/tip-tap/actions/text-aligment.d.ts +4 -0
- package/dist/types/components/tip-tap/actions/undo-redo.d.ts +4 -0
- package/dist/types/components/tip-tap/extensions/drop-handler.d.ts +2 -0
- package/dist/types/components/tip-tap/extensions/font-size.d.ts +20 -0
- package/dist/types/components/tip-tap/extensions/patse-handler.d.ts +3 -0
- package/dist/types/components/tip-tap/menus/bubble-menu.d.ts +7 -0
- package/dist/types/components/tip-tap/menus/fixed-menu.d.ts +9 -0
- package/dist/types/components/tip-tap/menus/link-floating-menu.d.ts +6 -0
- package/dist/types/components/tip-tap/menus/paragraph-floating-menu.d.ts +6 -0
- package/dist/types/components/tip-tap/utils/add-image-to-editor.d.ts +2 -0
- package/dist/types/components/tip-tap/utils/markdown-detector.d.ts +33 -0
- package/dist/types/components/tip-tap/utils/parse-markdown.d.ts +2 -0
- package/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/package.json +137 -136
|
@@ -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,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,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 {};
|