@ylzcc/editor 0.0.1

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 (55) hide show
  1. package/README.md +27 -0
  2. package/dist/Editor/index.d.ts +18 -0
  3. package/dist/api/index.d.ts +1 -0
  4. package/dist/components/Active/index.d.ts +3 -0
  5. package/dist/components/Catalogue/index.d.ts +10 -0
  6. package/dist/components/CodeBlockView/index.d.ts +3 -0
  7. package/dist/components/FloatingMenu/ChangeMenu/index.d.ts +9 -0
  8. package/dist/components/FloatingMenu/Menu/index.d.ts +9 -0
  9. package/dist/components/FloatingMenu/SlashMenu/index.d.ts +11 -0
  10. package/dist/components/FloatingMenu/TableSelect/index.d.ts +10 -0
  11. package/dist/components/FloatingMenu/Tip/index.d.ts +10 -0
  12. package/dist/components/LinkComponent/index.d.ts +12 -0
  13. package/dist/components/PdfViewShow/index.d.ts +4 -0
  14. package/dist/components/QuestionView/index.d.ts +3 -0
  15. package/dist/components/RichEditor/index.d.ts +2 -0
  16. package/dist/components/hyperlinkContent/index.d.ts +11 -0
  17. package/dist/editor.es.js +139953 -0
  18. package/dist/editor.umd.js +675 -0
  19. package/dist/extensions/ActiveComtent/active.d.ts +25 -0
  20. package/dist/extensions/ActiveComtent/index.d.ts +3 -0
  21. package/dist/extensions/ActiveQustion/index.d.ts +5 -0
  22. package/dist/extensions/CodeBlock/code-block.d.ts +43 -0
  23. package/dist/extensions/CodeBlock/index.d.ts +3 -0
  24. package/dist/extensions/CodeBlockLowlight/index.d.ts +6 -0
  25. package/dist/extensions/CodeBlockLowlight/lowlight-plugin.d.ts +6 -0
  26. package/dist/extensions/Document/index.d.ts +2 -0
  27. package/dist/extensions/FloatingMenu/FloatingMenuPlugin.d.ts +9 -0
  28. package/dist/extensions/FloatingMenu/handle.d.ts +30 -0
  29. package/dist/extensions/FloatingMenu/index.d.ts +13 -0
  30. package/dist/extensions/Fragment/index.d.ts +2 -0
  31. package/dist/extensions/Heading/index.d.ts +26 -0
  32. package/dist/extensions/Image/index.d.ts +25 -0
  33. package/dist/extensions/Link/helpers/autolink.d.ts +8 -0
  34. package/dist/extensions/Link/helpers/clickHandler.d.ts +7 -0
  35. package/dist/extensions/Link/helpers/pasteHandler.d.ts +9 -0
  36. package/dist/extensions/Link/index.d.ts +3 -0
  37. package/dist/extensions/Link/link.d.ts +69 -0
  38. package/dist/extensions/Paragraph/index.d.ts +13 -0
  39. package/dist/extensions/Pdf/index.d.ts +3 -0
  40. package/dist/extensions/Pdf/pdf.d.ts +18 -0
  41. package/dist/extensions/PdfView/index.d.ts +4 -0
  42. package/dist/extensions/Placeholder/index.d.ts +3 -0
  43. package/dist/extensions/Slash/index.d.ts +19 -0
  44. package/dist/extensions/Text/index.d.ts +2 -0
  45. package/dist/extensions/Title/index.d.ts +3 -0
  46. package/dist/extensions/bubble-menu/bubble-menu-style.d.ts +3 -0
  47. package/dist/extensions/bubble-menu/bubble-menu.d.ts +24 -0
  48. package/dist/extensions/bubble-menu/dropdownItem.d.ts +10 -0
  49. package/dist/extensions/bubble-menu/index.d.ts +5 -0
  50. package/dist/index.d.ts +2 -0
  51. package/dist/style.css +1 -0
  52. package/dist/utils/event-emitter.d.ts +11 -0
  53. package/dist/utils/index.d.ts +5 -0
  54. package/dist/utils/utils.d.ts +7 -0
  55. package/package.json +92 -0
@@ -0,0 +1,25 @@
1
+ import { Node } from '@tiptap/core';
2
+ export interface ActiveOptions {
3
+ xternUrl: string | null;
4
+ }
5
+ declare module '@tiptap/core' {
6
+ interface Commands<ReturnType> {
7
+ active: {
8
+ /**
9
+ * Set a code block
10
+ */
11
+ setQuestion: (attributes?: {
12
+ id: string;
13
+ language: string;
14
+ }) => ReturnType;
15
+ /**
16
+ * Toggle a code block
17
+ */
18
+ unsetQuestion: (attributes?: {
19
+ language: string;
20
+ }) => ReturnType;
21
+ };
22
+ }
23
+ }
24
+ export declare const backtickInputRegex: RegExp;
25
+ export declare const Active: Node<ActiveOptions, any>;
@@ -0,0 +1,3 @@
1
+ import { Active } from './active.js';
2
+ export * from './active.js';
3
+ export default Active;
@@ -0,0 +1,5 @@
1
+ import { ActiveOptions } from '../ActiveComtent';
2
+ export interface QuestionOptions extends ActiveOptions {
3
+ xternUrl: string | null;
4
+ }
5
+ export declare const Question: import("@tiptap/core").Node<QuestionOptions, any>;
@@ -0,0 +1,43 @@
1
+ import { Node } from '@tiptap/core';
2
+ export interface CodeBlockOptions {
3
+ /**
4
+ * Adds a prefix to language classes that are applied to code tags.
5
+ * Defaults to `'language-'`.
6
+ */
7
+ languageClassPrefix: string;
8
+ /**
9
+ * Define whether the node should be exited on triple enter.
10
+ * Defaults to `true`.
11
+ */
12
+ exitOnTripleEnter: boolean;
13
+ /**
14
+ * Define whether the node should be exited on arrow down if there is no node after it.
15
+ * Defaults to `true`.
16
+ */
17
+ exitOnArrowDown: boolean;
18
+ /**
19
+ * Custom HTML attributes that should be added to the rendered HTML tag.
20
+ */
21
+ HTMLAttributes: Record<string, any>;
22
+ }
23
+ declare module '@tiptap/core' {
24
+ interface Commands<ReturnType> {
25
+ codeBlock: {
26
+ /**
27
+ * Set a code block
28
+ */
29
+ setCodeBlock: (attributes?: {
30
+ language: string;
31
+ }) => ReturnType;
32
+ /**
33
+ * Toggle a code block
34
+ */
35
+ toggleCodeBlock: (attributes?: {
36
+ language: string;
37
+ }) => ReturnType;
38
+ };
39
+ }
40
+ }
41
+ export declare const backtickInputRegex: RegExp;
42
+ export declare const tildeInputRegex: RegExp;
43
+ export declare const CodeBlock: Node<CodeBlockOptions, any>;
@@ -0,0 +1,3 @@
1
+ import { CodeBlock } from './code-block.js';
2
+ export * from './code-block.js';
3
+ export default CodeBlock;
@@ -0,0 +1,6 @@
1
+ import { CodeBlockOptions } from '../CodeBlock';
2
+ export interface CodeBlockLowlightOptions extends CodeBlockOptions {
3
+ lowlight: any;
4
+ defaultLanguage: string | null | undefined;
5
+ }
6
+ export declare const CodeBlockLowlight: import("@tiptap/react").Node<CodeBlockLowlightOptions, any>;
@@ -0,0 +1,6 @@
1
+ import { Plugin } from '@tiptap/pm/state';
2
+ export declare function LowlightPlugin({ name, lowlight, defaultLanguage, }: {
3
+ name: string;
4
+ lowlight: any;
5
+ defaultLanguage: string | null | undefined;
6
+ }): Plugin<any>;
@@ -0,0 +1,2 @@
1
+ import { Node } from '@tiptap/core';
2
+ export declare const Document: Node<any, any>;
@@ -0,0 +1,9 @@
1
+ import { Editor } from '@tiptap/core';
2
+ import { Plugin } from '@tiptap/pm/state';
3
+ import { Handle } from './handle';
4
+ export type FloatingMenuPluginProps = {
5
+ pluginKey: string;
6
+ editor: Editor;
7
+ tip: Handle | null;
8
+ };
9
+ export declare const FloatingMenuPlugin: (options: FloatingMenuPluginProps) => Plugin<any>;
@@ -0,0 +1,30 @@
1
+ /// <reference types="react" />
2
+ import { Editor } from '@tiptap/core';
3
+ import { EditorView } from '@tiptap/pm/view';
4
+ import { Instance, Props } from 'tippy.js';
5
+ import { EventEmitter } from '../../utils/event-emitter';
6
+ export declare class Handle {
7
+ editor: Editor;
8
+ tippy: Instance | null;
9
+ component: React.FunctionComponent;
10
+ tippyOptions: Partial<Props>;
11
+ ignoreType: string[];
12
+ isShow: boolean;
13
+ emitter: EventEmitter<{
14
+ hover: any;
15
+ type: any;
16
+ show: any;
17
+ }>;
18
+ private lastPos;
19
+ prevent: boolean;
20
+ constructor(editor: Editor, component: React.FunctionComponent, tippyOptions: Partial<Props>, ignoreType?: string[]);
21
+ build(): Element;
22
+ createTippy(cover?: boolean): void;
23
+ mouseLeave(): void;
24
+ show(): void;
25
+ hide(): void;
26
+ setProps(location: Partial<Props>): void;
27
+ setPrevent(type: boolean): void;
28
+ move(view: EditorView, event: MouseEvent): false | undefined;
29
+ destroy(): void;
30
+ }
@@ -0,0 +1,13 @@
1
+ import { Extension } from '@tiptap/core';
2
+ import { FloatingMenuPluginProps } from './FloatingMenuPlugin';
3
+ export type FloatingMenuOptions = Omit<FloatingMenuPluginProps, 'editor'>;
4
+ declare module "@tiptap/core" {
5
+ interface Commands<ReturnType> {
6
+ floatingMenu: {
7
+ showTip: () => ReturnType;
8
+ hideTip: () => ReturnType;
9
+ changeTip: (type?: boolean) => ReturnType;
10
+ };
11
+ }
12
+ }
13
+ export declare const FloatingMenu: Extension<FloatingMenuOptions, any>;
@@ -0,0 +1,2 @@
1
+ import { Node } from '@tiptap/core';
2
+ export declare const Fragment: Node<any, any>;
@@ -0,0 +1,26 @@
1
+ import { Node } from '@tiptap/core';
2
+ import './index.less';
3
+ export type Level = 1 | 2 | 3 | 4 | 5 | 6;
4
+ export interface HeadingOptions {
5
+ levels: Level[];
6
+ HTMLAttributes: Record<string, any>;
7
+ }
8
+ declare module '@tiptap/core' {
9
+ interface Commands<ReturnType> {
10
+ heading: {
11
+ /**
12
+ * Set a heading node
13
+ */
14
+ setHeading: (attributes: {
15
+ level: Level;
16
+ }) => ReturnType;
17
+ /**
18
+ * Toggle a heading node
19
+ */
20
+ toggleHeading: (attributes: {
21
+ level: Level;
22
+ }) => ReturnType;
23
+ };
24
+ }
25
+ }
26
+ export declare const Heading: Node<HeadingOptions, any>;
@@ -0,0 +1,25 @@
1
+ import { Node } from '@tiptap/core';
2
+ import './index.less';
3
+ export interface ImageOptions {
4
+ oss: string;
5
+ inline: boolean;
6
+ allowBase64: boolean;
7
+ HTMLAttributes: Record<string, any>;
8
+ }
9
+ declare module '@tiptap/core' {
10
+ interface Commands<ReturnType> {
11
+ image: {
12
+ /**
13
+ * Add an image
14
+ */
15
+ setImage: (options: {
16
+ src: string;
17
+ alt?: string;
18
+ title?: string;
19
+ }) => ReturnType;
20
+ uploadImage: () => ReturnType;
21
+ };
22
+ }
23
+ }
24
+ export declare const inputRegex: RegExp;
25
+ export declare const Image: Node<ImageOptions, any>;
@@ -0,0 +1,8 @@
1
+ import { MarkType } from '@tiptap/pm/model';
2
+ import { Plugin } from '@tiptap/pm/state';
3
+ type AutolinkOptions = {
4
+ type: MarkType;
5
+ validate?: (url: string) => boolean;
6
+ };
7
+ export declare function autolink(options: AutolinkOptions): Plugin;
8
+ export {};
@@ -0,0 +1,7 @@
1
+ import { MarkType } from '@tiptap/pm/model';
2
+ import { Plugin } from '@tiptap/pm/state';
3
+ type ClickHandlerOptions = {
4
+ type: MarkType;
5
+ };
6
+ export declare function clickHandler(options: ClickHandlerOptions): Plugin;
7
+ export {};
@@ -0,0 +1,9 @@
1
+ import { Editor } from '@tiptap/core';
2
+ import { MarkType } from '@tiptap/pm/model';
3
+ import { Plugin } from '@tiptap/pm/state';
4
+ type PasteHandlerOptions = {
5
+ editor: Editor;
6
+ type: MarkType;
7
+ };
8
+ export declare function pasteHandler(options: PasteHandlerOptions): Plugin;
9
+ export {};
@@ -0,0 +1,3 @@
1
+ import { Link } from './link.ts';
2
+ export * from './link.ts';
3
+ export default Link;
@@ -0,0 +1,69 @@
1
+ import { Mark } from '@tiptap/core';
2
+ import './index.less';
3
+ import { Instance } from "tippy.js";
4
+ export interface LinkProtocolOptions {
5
+ scheme: string;
6
+ optionalSlashes?: boolean;
7
+ }
8
+ export declare const pasteRegex: RegExp;
9
+ export interface LinkOptions {
10
+ /**
11
+ * If enabled, it adds links as you type.
12
+ */
13
+ autolink: boolean;
14
+ /**
15
+ * An array of custom protocols to be registered with linkifyjs.
16
+ */
17
+ protocols: Array<LinkProtocolOptions | string>;
18
+ /**
19
+ * If enabled, links will be opened on click.
20
+ */
21
+ openOnClick: boolean;
22
+ /**
23
+ * Adds a link to the current selection if the pasted content only contains an url.
24
+ */
25
+ linkOnPaste: boolean;
26
+ /**
27
+ * A list of HTML attributes to be rendered.
28
+ */
29
+ HTMLAttributes: Record<string, any>;
30
+ tip: Instance | null;
31
+ id: string;
32
+ /**
33
+ * A validation function that modifies link verification for the auto linker.
34
+ * @param url - The url to be validated.
35
+ * @returns - True if the url is valid, false otherwise.
36
+ */
37
+ validate?: (url: string) => boolean;
38
+ }
39
+ declare module '@tiptap/core' {
40
+ interface Commands<ReturnType> {
41
+ link: {
42
+ /**
43
+ * Set a link mark
44
+ */
45
+ setLink: (attributes: {
46
+ href: string;
47
+ target?: string | null;
48
+ rel?: string | null;
49
+ class?: string | null;
50
+ }) => ReturnType;
51
+ /**
52
+ * Toggle a link mark
53
+ */
54
+ toggleLink: (attributes: {
55
+ href: string;
56
+ target?: string | null;
57
+ rel?: string | null;
58
+ class?: string | null;
59
+ }) => ReturnType;
60
+ /**
61
+ * Unset a link mark
62
+ */
63
+ unsetLink: () => ReturnType;
64
+ showLinkTip: () => ReturnType;
65
+ hideLinkTip: () => ReturnType;
66
+ };
67
+ }
68
+ }
69
+ export declare const Link: Mark<LinkOptions, any>;
@@ -0,0 +1,13 @@
1
+ import { Node } from '@tiptap/core';
2
+ import './index.less';
3
+ declare module '@tiptap/core' {
4
+ interface Commands<ReturnType> {
5
+ paragraph: {
6
+ /**
7
+ * Toggle a paragraph
8
+ */
9
+ setParagraph: () => ReturnType;
10
+ };
11
+ }
12
+ }
13
+ export declare const Paragraph: Node<any, any>;
@@ -0,0 +1,3 @@
1
+ import { Pdf } from './pdf.js';
2
+ export * from './pdf.js';
3
+ export default Pdf;
@@ -0,0 +1,18 @@
1
+ import { Node } from '@tiptap/core';
2
+ import './index.less';
3
+ export interface PdfOptions {
4
+ url: string | undefined;
5
+ }
6
+ declare module '@tiptap/core' {
7
+ interface Commands<ReturnType> {
8
+ pdf: {
9
+ /**
10
+ * Add an image
11
+ */
12
+ setPdf: (attributes?: {
13
+ pdfUrl: string;
14
+ }) => ReturnType;
15
+ };
16
+ }
17
+ }
18
+ export declare const Pdf: Node<PdfOptions, any>;
@@ -0,0 +1,4 @@
1
+ import { PdfOptions } from '../Pdf';
2
+ export interface PdfViewOptions extends PdfOptions {
3
+ }
4
+ export declare const PdfView: import("@tiptap/core").Node<PdfViewOptions, any>;
@@ -0,0 +1,3 @@
1
+ import './index.less';
2
+ import { Extension } from '@tiptap/core';
3
+ export declare const Placeholder: Extension<any, any>;
@@ -0,0 +1,19 @@
1
+ import { Extension } from "@tiptap/core";
2
+ import { SuggestionOptions } from "@tiptap/suggestion";
3
+ import { Instance } from 'tippy.js';
4
+ import { EventEmitter } from "../../utils/event-emitter";
5
+ export type SlashOptions = Omit<SuggestionOptions, 'editor'> & {
6
+ tip: Instance | null;
7
+ emitter: EventEmitter<{
8
+ show: any;
9
+ }> | null;
10
+ };
11
+ declare module "@tiptap/core" {
12
+ interface Commands<ReturnType> {
13
+ Slash: {
14
+ showMenu: () => ReturnType;
15
+ hideMenu: () => ReturnType;
16
+ };
17
+ }
18
+ }
19
+ export declare const Slash: Extension<SlashOptions, any>;
@@ -0,0 +1,2 @@
1
+ import { Node } from '@tiptap/core';
2
+ export declare const Text: Node<any, any>;
@@ -0,0 +1,3 @@
1
+ import { Node } from '@tiptap/core';
2
+ import './index.less';
3
+ export declare const Title: Node<any, any>;
@@ -0,0 +1,3 @@
1
+ import './style.css';
2
+ declare const BubbleMenuView: (props: any) => import("react/jsx-runtime").JSX.Element;
3
+ export default BubbleMenuView;
@@ -0,0 +1,24 @@
1
+ /// <reference types="react" />
2
+ import { Editor, Extension } from "@tiptap/core";
3
+ import { Instance } from "tippy.js";
4
+ declare module "@tiptap/core" {
5
+ interface Commands<ReturnType> {
6
+ bubbleMenu: {
7
+ showBubbleMenu: () => ReturnType;
8
+ hideBubbleMenu: () => ReturnType;
9
+ };
10
+ }
11
+ }
12
+ export type BubbleMenuProps = {
13
+ ignoreTypes: string[];
14
+ zIndex: number;
15
+ component: (({ editor, from, to }: {
16
+ editor: Editor;
17
+ from: number;
18
+ to: number;
19
+ }) => React.JSX.Element) | null;
20
+ tippy: Instance | null;
21
+ delay: number;
22
+ debounce: any | null;
23
+ };
24
+ export declare const BubbleMenu: Extension<BubbleMenuProps, any>;
@@ -0,0 +1,10 @@
1
+ export declare const textDropDown: (editor: any) => {
2
+ label: import("react/jsx-runtime").JSX.Element;
3
+ key: string;
4
+ onClick: () => void;
5
+ }[];
6
+ export declare const alignDropDown: (editor: any) => {
7
+ label: import("react/jsx-runtime").JSX.Element;
8
+ key: string;
9
+ onClick: () => void;
10
+ }[];
@@ -0,0 +1,5 @@
1
+ declare const _default: {
2
+ BubbleMenu: import("@tiptap/core").Extension<import("./bubble-menu").BubbleMenuProps, any>;
3
+ BubbleMenuView: (props: any) => import("react/jsx-runtime").JSX.Element;
4
+ };
5
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import Editor from './Editor';
2
+ export default Editor;
package/dist/style.css ADDED
@@ -0,0 +1 @@
1
+ .tiptap{padding:30px 26px}.tiptap:focus{outline:none}.tiptap *{padding:0;margin:0}.tiptap .ant-btn{padding:0 16px;height:24px;background:#1677ff;border-radius:2px;font-size:12px;line-height:24px}.tiptap .inline-code{padding:2px 8px;background:#fff5ec;color:#f0861d;border-radius:2px}.tiptap .node-codeBlock{margin:20px 0}.tiptap blockquote{margin:20px 0;margin-inline-start:0!important;padding:8px 10px 8px 16px;background:#f0f2f5;color:#888;position:relative}.tiptap blockquote:after{position:absolute;left:0;bottom:0;width:4px;height:100%;background:#dcdee0;content:""}.tiptap .tableWrapper{margin:20px 0;max-width:100%;overflow-x:auto}.tiptap .tableWrapper table{max-width:100%}.tiptap table{border-collapse:collapse;text-align:left}.tiptap table th{background:#f0f2f5}.tiptap table th p{font-weight:700;color:#333!important}.tiptap table th,.tiptap table td{border:.5px solid #d9d9d9!important;padding:8px 20px!important;color:#666!important}.tiptap>ul{margin:20px 0;padding-left:18px!important}.tiptap ul{padding-left:14px}.tiptap ul li p{line-height:28px}.tiptap ul li::marker{color:#1677ff}.tiptap ul ul ul ul{list-style-type:disc}.tiptap ul ul ul ul ul{list-style-type:circle}.tiptap ul ul ul ul ul ul{list-style-type:square}.tiptap ul ul ul ul ul ul ul{list-style-type:disc}.tiptap ul ul ul ul ul ul ul ul{list-style-type:circle}.tiptap ul ul ul ul ul ul ul ul ul{list-style-type:square}.tiptap>ol{margin:20px 0;padding-left:18px!important}.tiptap ol{padding-left:14px}.tiptap ol li p{line-height:28px}.tiptap ol li::marker{color:#1677ff}.tiptap ol ol{list-style-type:lower-alpha}.tiptap ol ol ol{list-style-type:lower-roman}.tiptap ol ol ol ol{list-style-type:decimal}.tiptap ol ol ol ol ol{list-style-type:lower-alpha}.tiptap ol ol ol ol ol ol{list-style-type:lower-roman}.tiptap ol ol ol ol ol ol ol{list-style-type:decimal}.tiptap ol ol ol ol ol ol ol ol{list-style-type:lower-alpha}.tiptap ol ol ol ol ol ol ol ol ol{list-style-type:lower-roman}.tiptap hr{margin:20px 0;border-top:.5px solid #d9d9d9}.ylz-editor{position:relative;height:100%;max-height:100vh;min-height:100vh;background:#fafcff;display:flex;overflow:hidden}.ylz-editor-container{margin:0 0 0 10px;flex:1;overflow-y:auto}.ylz-editor-container>div{width:calc(100% - 268px)}.ylz-editor-container::-webkit-scrollbar{width:6px}.ylz-editor-container::-webkit-scrollbar-track{background-color:transparent}.ylz-editor-container::-webkit-scrollbar-thumb{background-color:#ededed;border-radius:10px}.ylz-editor-container::-webkit-scrollbar-thumb:hover{background-color:#e0e0e0}.ylz-editor-container-max>div{width:100%}.ylz-editor-tooltip{background:#fff;border:.5px solid #e5e5e5;border-radius:2px;box-shadow:1px 1px 2px #5c75991a;overflow:hidden}.ylz-editor-tooltip .ant-tooltip-inner{min-height:24px!important;padding:4px 8px;font-size:12px;font-weight:400;text-align:LEFT;color:#666;line-height:16px;border-radius:2px}.tiptap h1,.tiptap h2,.tiptap h3,.tiptap h4,.tiptap h5,.tiptap h6{margin:20px 0!important;color:#333;font-weight:600}.tiptap h1{font-size:28px;line-height:38px}.tiptap h2{font-size:24px;line-height:34px}.tiptap h3{font-size:20px;line-height:30px}.tiptap h4{font-size:18px;line-height:28px}.tiptap h5{font-size:16px;line-height:26px}.tiptap h6{font-size:15px;line-height:24px}.tiptap-paragraph{font-size:14px;font-weight:400;color:#666;line-height:26px}.tiptap-title{font-size:28px;font-weight:600;color:block;line-height:38px;padding-bottom:20px;border-bottom:.5px solid #d9d9d9;margin-bottom:20px}.tiptap .tiptap-editor-nofocus-is-empty:before{content:attr(data-placeholder);float:left;pointer-events:none;height:0;font-size:14px;font-weight:400;color:#ccc;line-height:26px}.tiptap .tiptap-title-is-empty:before{content:attr(data-placeholder);float:left;pointer-events:none;height:0;font-size:28px;font-weight:600;color:#ccc;line-height:38px}.tiptap .tiptap-is-empty:before{content:attr(data-placeholder);float:left;pointer-events:none;height:0;font-size:14px;font-weight:400;color:#ccc;line-height:26px}.bubble-menu{display:flex;justify-content:center;align-items:center;position:relative;background:#fff;border:.5px solid #e5e5e5;border-radius:4px;box-shadow:0 2px 8px #615c9926;height:28px;z-index:1;padding:0 4px}.bubble-menu .dropdownLine{height:14px;border-left:.5px solid #d9d9d9}.bubble-menu .bubble-menu-item{display:flex;justify-content:center;align-items:center;width:20px;height:20px;border-radius:2px}.bubble-menu .bubble-menu-item:hover{background:#f0f2f5}.bubble-menu .bubble-menu-other-item{display:flex;justify-content:center;align-items:center;width:30px;height:20px;border-radius:2px;cursor:pointer}.bubble-menu .bubble-menu-other-item .bubble-menu-other-item-icon{transition:transform .5s ease-in-out}.bubble-menu .bubble-menu-other-item:hover{background:#f0f2f5}.floating-menu{width:16px;height:16px;display:flex;justify-content:center;align-items:center;border-radius:4px;border:1px solid #e0e0e0;background:#fff;padding:4px;z-index:1}.floating-menu button{width:14px;height:14px;display:flex;align-items:center;justify-content:center}.tom{margin-top:1rem;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:20px;box-sizing:border-box}.bubbleMenuDropdown{margin-top:10px}.bubbleMenuDropdown .ant-dropdown-menu{border:.5px solid #e5e5e5;border-radius:4px;box-shadow:0 2px 8px #615c9926}.bubbleMenuDropdown .ant-dropdown-menu-item{width:180px;height:28px;border-radius:2px}.bubbleMenuDropdown .ant-dropdown-menu-item:hover .MenuProps-item-left .MenuProps-item-left-text{color:#333!important}.bubbleMenuDropdown .ant-dropdown-menu-item:hover .MenuProps-item-left .MenuProps-item-left-svg svg{fill:#333}.bubbleMenuDropdown .MenuProps-item{display:flex;align-items:center;justify-content:space-between}.bubbleMenuDropdown .MenuProps-item .MenuProps-item-left{display:flex;align-items:center}.code-block{position:relative}.code-block .hljs-comment,.code-block .hljs-quote{color:#616161}.code-block .hljs-variable,.code-block .hljs-template-variable,.code-block .hljs-attribute,.code-block .hljs-tag,.code-block .hljs-name,.code-block .hljs-regexp,.code-block .hljs-link,.code-block .hljs-selector-id,.code-block .hljs-selector-class{color:#f98181}.code-block .hljs-number,.code-block .hljs-meta,.code-block .hljs-built_in,.code-block .hljs-builtin-name,.code-block .hljs-literal,.code-block .hljs-type,.code-block .hljs-params{color:#fbbc88}.code-block .hljs-string,.code-block .hljs-symbol,.code-block .hljs-bullet{color:#b9f18d}.code-block .hljs-title,.code-block .hljs-section{color:#faf594}.code-block .hljs-keyword,.code-block .hljs-selector-tag{color:#70cff8}.code-block .hljs-emphasis{font-style:italic}.code-block .hljs-strong{font-weight:700}.code-block pre{background:#0d0d0d;color:#fff;font-family:JetBrainsMono,monospace;margin:0;padding:0}.code-block pre code{color:inherit;background:none;font-size:.8rem}.code-block pre code div{padding-left:10px}.code-block .code-block-header{display:flex;flex-direction:row;align-items:center;justify-content:space-between;width:100%;padding:10px;background:#0d0d0d;box-shadow:0 1px 5px 5px #fff;flex-wrap:nowrap}.code-block .code-block-header .ant-space-item button{background:#fff;display:flex;width:24px;height:24px;align-items:center;justify-content:center}.code-block .code-block-header .ant-space-item button:hover{color:#fff}.code-block .code-block-body,.code-block .code-block-footer{box-shadow:0 3px 5px #fff}.title{cursor:pointer;font-weight:600;box-sizing:border-box;margin-bottom:10px}.content-title h1:first-child:has(br):before{content:attr(data-placeholder);float:left;color:#ced4da;pointer-events:none;height:0}.h-link{width:400px;background:#fff;border:.5px solid #e5e5e5;border-radius:4px;box-shadow:0 2px 8px #615c9926;padding:24px;box-sizing:border-box}.h-link .h-link-bottoms{display:flex;justify-content:end;align-items:center;margin-top:10px}.h-link .h-link-bottoms .cancleBtn{display:flex;align-items:center;justify-content:center;width:64px;height:32px;background:#fff;border:1px solid #d9d9d9;border-radius:2px;color:#666;font-size:14px;cursor:pointer}.h-link .h-link-bottoms .conBtn{cursor:pointer;display:flex;align-items:center;justify-content:center;width:64px;height:32px;background:#1677ff;border-radius:2px;font-size:14px;color:#fff;margin-left:10px}.h-link .h-link-line{display:flex;align-items:center;font-size:14px;color:#333;margin-bottom:20px}.h-link .h-link-line .text{text-wrap:nowrap;margin-right:16px}.h-link .h-link-line .ant-input{border:1px solid #e5e5e5;border-radius:2px;color:#666;font-size:14px}.h-link .h-link-line .ant-input-outlined:focus{border:1px solid #1677ff}.tippy-box[data-animation=scale-extreme][data-placement^=top]{transform-origin:bottom}.tippy-box[data-animation=scale-extreme][data-placement^=bottom]{transform-origin:top}.tippy-box[data-animation=scale-extreme][data-placement^=left]{transform-origin:right}.tippy-box[data-animation=scale-extreme][data-placement^=right]{transform-origin:left}.tippy-box[data-animation=scale-extreme][data-state=hidden]{transform:scale(0);opacity:.25}.catalogue{position:absolute;top:0;right:0;bottom:0;width:268px}.catalogue-header{padding:40px 30px 20px;display:flex;align-items:center}.catalogue-header>span{font-size:16px;font-weight:500;color:#333;line-height:16px}.catalogue-header svg{margin-left:12px;cursor:pointer}.catalogue-main{max-height:calc(100% - 76px);padding-right:10px;border-left:1px solid #d9d9d9;overflow-y:auto}.catalogue-main::-webkit-scrollbar{width:6px}.catalogue-main::-webkit-scrollbar-track{background-color:transparent}.catalogue-main::-webkit-scrollbar-thumb{background-color:#ededed;border-radius:10px}.catalogue-main::-webkit-scrollbar-thumb:hover{background-color:#e0e0e0}.catalogue-main>div{padding-right:8px;height:28px;display:flex;align-items:center;cursor:pointer;position:relative}.catalogue-main>div .catalogue-collapse{margin-right:8px;width:14px;height:14px;display:flex}.catalogue-main>div .catalogue-collapse svg{fill:#999;transform:rotate(0);transition:all .5s}.catalogue-main>div .catalogue-collapse svg:hover{fill:#1677ff}.catalogue-main>div .collapsed svg{transform:rotate(-90deg)}.catalogue-main>div .catalogue-text{flex:1;font-size:13px;color:#666;line-height:initial;white-space:nowrap;word-break:break-all;text-overflow:ellipsis;overflow:hidden}.catalogue-main>div .catalogue-text:hover{color:#1677ff}.catalogue-main .active .catalogue-text{color:#1677ff!important}.catalogue-main .indent-level-1{padding-left:8px}.catalogue-main .indent-level-2{padding-left:16px}.catalogue-main .indent-level-3{padding-left:24px}.catalogue-main .indent-level-4{padding-left:32px}.catalogue-main .indent-level-5{padding-left:40px}.catalogue-main .indent-level-6{padding-left:48px}.catalogue-hover{background:#fafcff;box-shadow:-4px 0 10px #0000000d}.catalogue-folded{position:absolute;top:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.catalogue-folded div{width:27px;height:47px;background:#fff;border:.5px solid #e5e5e5;border-radius:2px;box-shadow:1px 1px 2px #5c75991a;font-size:14px;font-weight:400;color:#666;line-height:16px;writing-mode:vertical-lr;letter-spacing:2px;display:flex;align-items:center;justify-content:center;cursor:pointer}.tiptap .code-block{padding:32px 10px 0;border-radius:4px}.tiptap .code-block-header{position:absolute;left:10px;top:4px;right:10px;padding:0;width:auto;box-shadow:none}.tiptap .code-block-header-left .ant-select{margin-right:10px}.tiptap .code-block-header .ant-select-single{height:24px}.tiptap .code-block-header .ant-select .ant-select-selector{padding:0 10px;border-radius:2px;font-size:12px}.tiptap .code-block-header .ant-select .ant-select-selector .ant-select-selection-item{line-height:24px}.tiptap .code-block-header .ant-select .ant-select-selector .ant-select-selection-search-input{height:24px}.tiptap .code-block-header .ant-checkbox-wrapper{align-items:center}.tiptap .code-block-header .ant-checkbox .ant-checkbox-inner{border-radius:2px}.tiptap .code-block-header .ant-checkbox+span{padding-inline-start:4px;padding-inline-end:4px;font-size:12px}.tiptap .code-block-body{box-shadow:none;max-height:500px;overflow-y:auto}.tiptap .code-block-body::-webkit-scrollbar{width:6px}.tiptap .code-block-body::-webkit-scrollbar-track{background-color:transparent}.tiptap .code-block-body::-webkit-scrollbar-thumb{border-radius:10px}.tiptap .code-block-action{padding:10px 0;display:flex;justify-content:flex-end}.tiptap .code-block-action .ant-btn{margin-left:10px}.tiptap .code-block-action-copy{position:relative}.tiptap .code-block-action-copy .copy-tip{position:absolute;left:10px;top:-28px;width:88px;height:24px;background:#fff;border-radius:2px;box-shadow:4px 4px 10px #615c9926;display:flex;align-items:center;justify-content:center}.tiptap .code-block-action-copy .copy-tip span{margin-left:4px;color:#666;font-size:12px}.tiptap .code-block-light,.tiptap .code-block-light .code-block-header{background:#f0f2f5}.tiptap .code-block-light .code-block-header .ant-select .ant-select-selector{background:#fff;border:.5px solid #d9d9d9}.tiptap .code-block-light .code-block-header .ant-select .ant-select-selection-item{color:#333}.tiptap .code-block-light .code-block-header .ant-checkbox .ant-checkbox-inner{border:1px solid #999999}.tiptap .code-block-light .code-block-header .ant-checkbox+span{color:#666}.tiptap .code-block-light .code-block-body{background:#f0f2f5;color:#666}.tiptap .code-block-light .code-block-body::-webkit-scrollbar-thumb{background-color:#ededed}.tiptap .code-block-light .code-block-body::-webkit-scrollbar-thumb:hover{background-color:#e0e0e0}.tiptap .code-block-dark,.tiptap .code-block-dark .code-block-header{background:#252525}.tiptap .code-block-dark .code-block-header .ant-select .ant-select-selector{background:#333;border:.5px solid #454545}.tiptap .code-block-dark .code-block-header .ant-select .ant-select-selection-item,.tiptap .code-block-dark .code-block-header .ant-select .ant-select-arrow{color:#ccc}.tiptap .code-block-dark .code-block-header .ant-checkbox .ant-checkbox-inner{border:1px solid #cccccc}.tiptap .code-block-dark .code-block-header .ant-checkbox+span{color:#ccc}.tiptap .code-block-dark .code-block-header .ant-checkbox-checked .ant-checkbox-inner{background-color:#1677ff;border-color:#1677ff}.tiptap .code-block-dark .code-block-body{background:#252525}.tiptap .code-block-dark .code-block-body::-webkit-scrollbar-thumb{background-color:#444}.tiptap .code-block-dark .code-block-body::-webkit-scrollbar-thumb:hover{background-color:#666}.floatingmenu-tip{width:16px;height:16px;border:.5px solid #d9d9d9;border-radius:2px;display:flex;align-items:center;justify-content:center;cursor:pointer}.floatingmenu-tip:hover{background:#f0f2f5}.tiptap-menu{width:182px;box-sizing:border-box;background:#fff;border:.5px solid #e5e5e5;border-radius:4px;box-shadow:0 2px 8px #615c9926;padding:10px 4px 4px}.tiptap-menu-item:not(:last-child){margin-bottom:20px}.tiptap-menu-item-title{font-size:12px;font-weight:400;text-align:LEFT;color:#999;line-height:12px;padding-bottom:10px;padding-left:16px}.tiptap-menu-item-menus{display:flex;flex-wrap:wrap;gap:10px;padding:0 16px}.tiptap-menu-item-menus-light{background:#f0f2f5!important}.tiptap-menu-item-menus-item{width:20px;height:20px;border-radius:2px;cursor:pointer;display:flex;align-items:center;justify-content:center;--color: #666666;position:relative}.tiptap-menu-item-menus-item svg{fill:var(--color)}.tiptap-menu-item-menus-item:hover{background:#f0f2f5}.tiptap-menu-item-menus-item:hover:before{box-sizing:border-box;position:absolute;content:attr(data-tip);width:fit-content;left:50%;transform:translate(-50%);top:100%;white-space:nowrap;background:#fff;border:.5px solid #e5e5e5;border-radius:2px;font-size:12px;font-weight:400;color:#666;line-height:12px;padding:4px;box-shadow:1px 1px 2px #5c75991a;z-index:100}.tiptap-menu-item-list-item{height:28px;border-radius:2px;cursor:pointer;display:flex;align-items:center}.tiptap-menu-item-list-item:hover{background:#f0f2f5}.tiptap-menu-item-list-item svg{margin:0 18px}.tiptap-menu-item-list-item span{font-size:13px;font-weight:400;text-align:LEFT;color:#666;line-height:13px}.tiptap-table-select{background-color:#fff;border:.5px solid #e5e5e5;border-radius:4px;box-shadow:0 2px 8px #615c9926;padding:15px;width:250px}.tiptap-table-select-title{padding-bottom:10px;display:flex;align-items:center;justify-content:space-between}.tiptap-table-select-title-left{font-size:14px}.tiptap-table-select-title-right{font-size:14px;color:#8a8a8a;letter-spacing:2px}.tiptap-table-select-content{border:1px solid #e5e5e5;display:flex;flex-wrap:wrap;padding:10px;gap:6px;cursor:pointer}.tiptap-table-select-content div{width:20px;height:20px;background-color:#e9e9e9;box-sizing:border-box;border:1px solid #e1e1e1}.tiptap-table-select-content div.light{background-color:#72fc9d;border-color:#72fc9d}.tiptap-changemenu{background:#fff;border:.5px solid #e5e5e5;border-radius:4px;padding:4px;box-shadow:0 2px 8px #615c9926}.tiptap-changemenu-item{width:72px;height:28px;border-radius:2px;display:flex;align-items:center;justify-content:left;font-size:13px;font-weight:400;text-align:LEFT;color:#666;line-height:13px;cursor:pointer}.tiptap-changemenu-item:hover{background:#f0f2f5}.tiptap-changemenu-item svg{margin-left:10px;margin-right:8px}.tiptap-changemenu-item-del svg{fill:#999!important}.tiptap-changemenu-item-del:hover{color:#f5222d!important}.tiptap-changemenu-item-del:hover svg{fill:#f5222d!important}.tiptap .tiptap-image{display:block;object-fit:contain;max-width:100%;max-height:100%;height:auto;margin:20px 0}.tiptap-paragraph a{position:relative;display:inline-block;color:#1677ff;text-decoration:none;cursor:pointer}.tiptap-paragraph a:hover{color:#1677ff;text-decoration:underline}.hoveValue{background:#fff;border:.5px solid #e5e5e5;border-radius:2px;box-shadow:0 2px 8px #615c9926;height:20px;box-sizing:border-box;padding:0 4px;color:#666;font-size:12px;display:flex;align-items:center}.lintView{height:28px;display:flex;align-items:center;padding:0 10px;background:#fff;border:.5px solid #e5e5e5;border-radius:2px;box-shadow:0 2px 8px #615c9926;max-width:400px;cursor:pointer}.lintView .lineValue{max-width:260px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#999;font-size:14px;box-sizing:border-box}.lintView .lineIcon{display:flex;justify-content:center;align-items:center;width:20px!important;height:20px!important;box-sizing:border-box;border-radius:2px}.lintView .lineIcon:hover{background:#f0f2f5}.link-tooltip{background:#f5f6fa!important;border:.5px solid #e5e5e5;border-radius:2px;box-shadow:1px 1px 1px #5c75991a;overflow:hidden}.link-tooltip .ant-tooltip-inner{min-height:16px!important;padding:2px 4px;font-size:12px;font-weight:400;text-align:LEFT;color:#999;line-height:20px;border-radius:2px}.activeMd{box-shadow:0 2px 8px #615c9926;width:100%;padding:24px 30px;box-sizing:border-box;white-space:break-spaces;min-height:180px;display:flex;flex-direction:column;justify-content:center;max-width:600px;min-width:380px;font-family:none!important;line-height:26px;font-size:14px;color:#666}.activeMd img{margin:0!important}.EditorClass{position:relative;width:100%}*:focus{outline:none;box-shadow:none}.EditorMark{position:absolute;width:100%;height:100%;z-index:999}.validateTitle img{max-width:100%}.questionTitle{width:100%;display:flex;align-items:center}.validateTitle{width:100%;margin-bottom:14px;position:relative}.validate-prompt{position:absolute;bottom:-20px}.validate-prompt-success{display:flex;align-items:center;color:#30c213;font-size:12px}.question-title-rigth{flex:1;font-size:15px;color:#333;line-height:21px;display:flex;align-items:center}.question-value{background:#fff;border:.5px solid #faad14;border-radius:2px;margin-bottom:-1px;margin-left:4px;font-size:11px;color:#faad14;box-sizing:border-box;padding:0 4px;background:#faad140d;line-height:16px}.question-type{background:#fff;border:.5px solid #1677ff;background:#1677ff0d;border-radius:2px;margin-bottom:-1px;margin-left:4px;font-size:11px;color:#1677ff;box-sizing:border-box;padding:0 4px;display:flex;justify-content:center;align-items:center;line-height:16px}.questSelect{width:100%;margin-top:20px;position:relative}.questSelectitem{width:100%;display:flex;margin-bottom:16px;align-items:center}.questSelectitem-left{width:16px;height:16px;border:1px solid #666;box-sizing:border-box;cursor:pointer;display:flex;justify-content:center;align-items:center;min-width:16px}.questSelectitem-left:hover{border:1px solid #1677FF!important}.questSelectitem-click{background:#1677ff;width:10px;height:10px;border-radius:50%}.questSelectitem-rigth{color:#666;font-size:14px;margin-left:10px;line-height:20px}.qusetion-prompt{position:absolute;bottom:-20px}.qusetion-prompt-success{display:flex;align-items:center;color:#30c213;font-size:12px}.qusetion-prompt-error{display:flex;align-items:center;color:#f5222d;font-size:12px}.questionSumbit{width:100%;padding-top:14px;display:flex;justify-content:center}.questionSumbit-btn{display:flex;color:#fff;font-size:14px;justify-content:center;align-items:center;padding:5px 30px;background:#1677ff;border-radius:2px;box-sizing:border-box;cursor:pointer}.novalue-btn{display:flex;color:#00000040;font-size:14px;justify-content:center;align-items:center;padding:4px 29px;background:#0000000a;box-sizing:border-box;border:1px solid #d9d9d9;border-radius:2px;cursor:pointer}.exec-btn{display:flex;color:#fff;font-size:14px;justify-content:center;align-items:center;padding:5px 30px;background:#1677ff;border-radius:2px;box-sizing:border-box;cursor:pointer}.last-btn{border:1px solid #d9d9d9;border-radius:2px;box-sizing:border-box;padding:5px 23px;color:#333;font-size:14px;cursor:pointer}.last-btn:hover{border:1px solid #1677FF;color:#1677ff}.questionSumbit-btn:hover{background:#4592ff}.tipContent{margin-top:40px;margin-bottom:14px}.tipValue{position:relative;width:100%;padding:10px 16px;border:.5px solid;border-image:linear-gradient(90deg,#faad141a,#faad1480 100%,#faad141a) .5 .5;border-radius:2px;box-shadow:0 2px 8px #faad141a;box-sizing:border-box;color:#666;font-size:14px;margin-top:8px}.tipIcon{position:absolute;right:0;top:0}.instructTip{margin-top:15px;margin-bottom:14px}.instructValue{background:#f5f6fa;border-radius:2px;padding:10px 16px;box-sizing:border-box;font-size:14px;color:#666;line-height:20px;margin-top:8px}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#abb2bf;background:#282c34}.hljs-comment,.hljs-quote{color:#5c6370;font-style:italic}.hljs-doctag,.hljs-keyword,.hljs-formula{color:#c678dd}.hljs-section,.hljs-name,.hljs-selector-tag,.hljs-deletion,.hljs-subst{color:#e06c75}.hljs-literal{color:#56b6c2}.hljs-string,.hljs-regexp,.hljs-addition,.hljs-attribute,.hljs-meta .hljs-string{color:#98c379}.hljs-attr,.hljs-variable,.hljs-template-variable,.hljs-type,.hljs-selector-class,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-number{color:#d19a66}.hljs-symbol,.hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-title{color:#61aeee}.hljs-built_in,.hljs-title.class_,.hljs-class .hljs-title{color:#e6c07b}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-link{text-decoration:underline}.pdfShow{position:relative}.pdfShow .annotationLayer{display:none}.pdfShow .react-pdf__Page__canvas{max-width:100%!important;height:100%!important}.pdfShow .react-pdf__Page__annotations{display:none}.pagechange{display:flex;align-items:center;font-size:12px;color:#666;justify-content:center;width:100%;background:#fff;cursor:pointer}.react-pdf__Page{display:flex;justify-content:center}.nowPage{width:24px;height:24px;background:#fff;border:1px solid #d9d9d9;border-radius:2px;display:flex;justify-content:center;align-items:center;margin:0 6px}.nowPageInput{border:none;background:transparent;width:100%;text-align:center;font-size:12px;color:#666}.rpv-toolbar__pagination{display:none}
@@ -0,0 +1,11 @@
1
+ type StringKeyOf<T> = Extract<keyof T, string>;
2
+ type CallbackType<T extends Record<string, any>, EventName extends StringKeyOf<T>> = T[EventName] extends any[] ? T[EventName] : [T[EventName]];
3
+ type CallbackFunction<T extends Record<string, any>, EventName extends StringKeyOf<T>> = (...props: CallbackType<T, EventName>) => any;
4
+ export declare class EventEmitter<T extends Record<string, any>> {
5
+ private callbacks;
6
+ on<EventName extends StringKeyOf<T>>(event: EventName, fn: CallbackFunction<T, EventName>): this;
7
+ emit<EventName extends StringKeyOf<T>>(event: EventName, ...args: CallbackType<T, EventName>): this;
8
+ off<EventName extends StringKeyOf<T>>(event: EventName, fn?: CallbackFunction<T, EventName>): this;
9
+ removeAllListeners(): void;
10
+ }
11
+ export {};
@@ -0,0 +1,5 @@
1
+ export declare const base64ToText: (base64: any) => string;
2
+ export declare const textToBase64: (text: string) => string;
3
+ export declare const toEditorJSON: (value: any) => any;
4
+ export declare const getFileSuffix: (v: string) => string;
5
+ export declare const toMarkdownJson: (value: any) => any;
@@ -0,0 +1,7 @@
1
+ export declare const getQueryStringValue: (key: string) => string | null;
2
+ export declare const getPathnameValue: any;
3
+ export declare const isJsonString: (str: string) => boolean;
4
+ export declare const base64ToText: (base64: any) => string;
5
+ export declare const textToBase64: (text: string) => string;
6
+ export declare const getFileSuffix: (v: string) => string;
7
+ export declare const toBase64: (file: Blob) => Promise<string>;
package/package.json ADDED
@@ -0,0 +1,92 @@
1
+ {
2
+ "name": "@ylzcc/editor",
3
+ "version": "0.0.1",
4
+ "type": "module",
5
+ "description": "editor ui components",
6
+ "keywords": [
7
+ "editor"
8
+ ],
9
+ "author": "zengyijing",
10
+ "main": "dist/editor.umd.js",
11
+ "module": "dist/editor.es.js",
12
+ "types": "dist/index.d.ts",
13
+ "files": [
14
+ "dist"
15
+ ],
16
+ "publishConfig": {
17
+ "access": "public",
18
+ "registry": "https://registry.npmjs.org/"
19
+ },
20
+ "scripts": {
21
+ "dev": "vite --open",
22
+ "start": "vite --open",
23
+ "build": "tsc && vite build",
24
+ "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
25
+ "preview": "vite preview"
26
+ },
27
+ "dependencies": {
28
+ "@tiptap/core": "^2.2.4",
29
+ "@tiptap/extension-blockquote": "^2.2.4",
30
+ "@tiptap/extension-bold": "^2.2.4",
31
+ "@tiptap/extension-bullet-list": "^2.2.4",
32
+ "@tiptap/extension-code": "^2.2.4",
33
+ "@tiptap/extension-color": "^2.2.4",
34
+ "@tiptap/extension-document": "^2.2.4",
35
+ "@tiptap/extension-gapcursor": "^2.2.4",
36
+ "@tiptap/extension-hard-break": "^2.2.4",
37
+ "@tiptap/extension-history": "^2.2.4",
38
+ "@tiptap/extension-horizontal-rule": "^2.2.4",
39
+ "@tiptap/extension-italic": "^2.2.4",
40
+ "@tiptap/extension-link": "^2.2.4",
41
+ "@tiptap/extension-list-item": "^2.2.4",
42
+ "@tiptap/extension-ordered-list": "^2.2.4",
43
+ "@tiptap/extension-paragraph": "^2.2.4",
44
+ "@tiptap/extension-placeholder": "^2.2.4",
45
+ "@tiptap/extension-strike": "^2.2.4",
46
+ "@tiptap/extension-subscript": "^2.2.4",
47
+ "@tiptap/extension-superscript": "^2.2.4",
48
+ "@tiptap/extension-table": "^2.2.4",
49
+ "@tiptap/extension-table-cell": "^2.2.4",
50
+ "@tiptap/extension-table-header": "^2.2.4",
51
+ "@tiptap/extension-table-row": "^2.2.4",
52
+ "@tiptap/extension-text": "^2.2.4",
53
+ "@tiptap/extension-text-align": "^2.2.4",
54
+ "@tiptap/extension-text-style": "^2.2.4",
55
+ "@tiptap/extension-underline": "^2.2.4",
56
+ "@tiptap/pm": "^2.2.4",
57
+ "@tiptap/react": "^2.2.4",
58
+ "@tiptap/suggestion": "^2.2.4",
59
+ "@wangeditor/editor": "^5.1.23",
60
+ "@ylzcc/remark-code": "^0.0.5",
61
+ "@ylzcc/xterm": "1.4.2",
62
+ "antd": "^5.15.0",
63
+ "axios": "^1.6.7",
64
+ "lowlight": "^3.1.0",
65
+ "micromark-util-types": "^2.0.0",
66
+ "react": "^18.2.0",
67
+ "react-dom": "^18.2.0",
68
+ "react-pdf": "^7.7.1",
69
+ "remark-gfm": "3.0.1",
70
+ "remark-parse": "^10.0.1",
71
+ "remark-stringify": "^10.0.3",
72
+ "unified": "^10.1.2",
73
+ "uuid": "^9.0.1"
74
+ },
75
+ "devDependencies": {
76
+ "@rollup/plugin-typescript": "^11.1.6",
77
+ "@types/node": "^20.11.24",
78
+ "@types/react": "^18.2.56",
79
+ "@types/react-dom": "^18.2.19",
80
+ "@types/uuid": "^9.0.8",
81
+ "@typescript-eslint/eslint-plugin": "^7.0.2",
82
+ "@typescript-eslint/parser": "^7.0.2",
83
+ "@vitejs/plugin-react": "^4.2.1",
84
+ "eslint": "^8.56.0",
85
+ "eslint-plugin-react-hooks": "^4.6.0",
86
+ "eslint-plugin-react-refresh": "^0.4.5",
87
+ "less": "^4.2.0",
88
+ "typescript": "^5.2.2",
89
+ "vite": "^5.1.4",
90
+ "vite-plugin-libcss": "^1.1.1"
91
+ }
92
+ }