@fileverse-dev/ddoc 2.2.0-patch-3 → 2.2.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.
package/dist/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { D as d, P as r, h as s, u as t } from "./index-DnGHJ8zU.mjs";
1
+ import { D as d, P as r, h as s, u as t } from "./index-C46fjVjD.mjs";
2
2
  export {
3
3
  d as DdocEditor,
4
4
  r as PreviewDdocEditor,
@@ -1,8 +1,8 @@
1
1
  import { default as React } from 'react';
2
2
  import { Editor } from '@tiptap/react';
3
3
 
4
- declare const TiptapToolBar: ({ editor, onError, zoomLevel, setZoomLevel, isNavbarVisible, setIsNavbarVisible, secureImageUploadUrl, onMarkdownExport, onMarkdownImport, onPdfExport, }: {
5
- editor: Editor;
4
+ declare const TiptapToolBar: ({ editor, onError, zoomLevel, setZoomLevel, isNavbarVisible, setIsNavbarVisible, secureImageUploadUrl, onMarkdownExport, onMarkdownImport, onPdfExport, isLoading, }: {
5
+ editor: Editor | null;
6
6
  onError?: (errorString: string) => void;
7
7
  zoomLevel: string;
8
8
  setZoomLevel: (zoom: string) => void;
@@ -12,5 +12,6 @@ declare const TiptapToolBar: ({ editor, onError, zoomLevel, setZoomLevel, isNavb
12
12
  onMarkdownExport?: () => void;
13
13
  onMarkdownImport?: () => void;
14
14
  onPdfExport?: () => void;
15
+ isLoading: boolean;
15
16
  }) => import("react/jsx-runtime").JSX.Element;
16
17
  export default TiptapToolBar;
@@ -28,7 +28,7 @@ export declare const IMG_UPLOAD_SETTINGS: {
28
28
  };
29
29
  };
30
30
  export declare const useEditorToolbar: ({ editor, onError, secureImageUploadUrl, onMarkdownExport, onMarkdownImport, onPdfExport, }: {
31
- editor: Editor;
31
+ editor: Editor | null;
32
32
  onError?: (errorString: string) => void;
33
33
  secureImageUploadUrl?: string;
34
34
  onMarkdownExport?: () => void;
@@ -98,7 +98,7 @@ export declare const ScriptsPopup: ({ elementRef, editor, }: {
98
98
  editor: Editor;
99
99
  }) => import("react/jsx-runtime").JSX.Element;
100
100
  export declare const TextColor: ({ editor, setVisibility, elementRef, }: {
101
- editor: Editor;
101
+ editor: Editor | null;
102
102
  elementRef: React.RefObject<HTMLDivElement>;
103
103
  setVisibility: Dispatch<SetStateAction<IEditorTool>>;
104
104
  }) => import("react/jsx-runtime").JSX.Element;
@@ -108,7 +108,7 @@ export declare const TextHeading: ({ editor, setVisibility, elementRef, }: {
108
108
  setVisibility: Dispatch<SetStateAction<IEditorTool>>;
109
109
  }) => import("react/jsx-runtime").JSX.Element;
110
110
  export declare const TextFormatingPopup: ({ editor, isOpen, setIsOpen, setToolVisibility, }: {
111
- editor: Editor;
111
+ editor: Editor | null;
112
112
  isOpen: boolean;
113
113
  setIsOpen: (open: boolean) => void;
114
114
  setToolVisibility: Dispatch<SetStateAction<IEditorTool>>;
@@ -1,11 +1,12 @@
1
1
  import { Editor } from '@tiptap/react';
2
2
 
3
- declare const MobileToolbar: ({ editor, onError, isKeyboardVisible, isNavbarVisible, setIsNavbarVisible, secureImageUploadUrl, }: {
4
- editor: Editor;
3
+ declare const MobileToolbar: ({ editor, onError, isKeyboardVisible, isNavbarVisible, setIsNavbarVisible, secureImageUploadUrl, isLoading, }: {
4
+ editor: Editor | null;
5
5
  onError?: (errorString: string) => void;
6
6
  isKeyboardVisible: boolean;
7
7
  isNavbarVisible: boolean;
8
8
  setIsNavbarVisible: React.Dispatch<React.SetStateAction<boolean>>;
9
9
  secureImageUploadUrl?: string;
10
+ isLoading: boolean;
10
11
  }) => import("react/jsx-runtime").JSX.Element;
11
12
  export default MobileToolbar;
@@ -1,6 +1,4 @@
1
1
  import { default as React } from 'react';
2
2
  import { NodeViewProps } from '@tiptap/react';
3
3
 
4
- export declare const DBlockNodeView: React.FC<NodeViewProps & {
5
- secureImageUploadUrl?: string;
6
- }>;
4
+ export declare const DBlockNodeView: React.FC<NodeViewProps>;
@@ -3,6 +3,7 @@ import { Node } from '@tiptap/core';
3
3
  export interface DBlockOptions {
4
4
  HTMLAttributes: Record<string, any>;
5
5
  secureImageUploadUrl?: string;
6
+ onCopyHeadingLink?: (link: string) => void;
6
7
  }
7
8
  declare module '@tiptap/core' {
8
9
  interface Commands<ReturnType> {
@@ -1,5 +1,5 @@
1
1
  import { NodeType } from '@tiptap/pm/model';
2
2
  import { InputRule } from '@tiptap/core';
3
3
 
4
- export declare const defaultExtensions: (onError: (error: string) => void, secureImageUploadUrl?: string, metadataProxyUrl?: string) => (import('@tiptap/core').Extension<any, any> | import('@tiptap/core').Node<any, any> | import('@tiptap/core').Mark<any, any>)[];
4
+ export declare const defaultExtensions: (onError: (error: string) => void, secureImageUploadUrl?: string, metadataProxyUrl?: string, onCopyHeadingLink?: (link: string) => void) => (import('@tiptap/core').Extension<any, any> | import('@tiptap/core').Node<any, any> | import('@tiptap/core').Mark<any, any>)[];
5
5
  export declare const createInputRule: (pattern: RegExp, data: string, type: NodeType) => InputRule;
@@ -94,6 +94,7 @@ export interface DdocProps extends CommentAccountProps {
94
94
  onSlidesShare?: () => void;
95
95
  renderThemeToggle?: () => JSX.Element;
96
96
  metadataProxyUrl?: string;
97
+ onCopyHeadingLink?: (link: string) => void;
97
98
  }
98
99
  export interface IEditorSelectionData {
99
100
  from: number;
@@ -1,7 +1,7 @@
1
1
  import { DdocProps } from './types';
2
2
 
3
3
  import * as Y from 'yjs';
4
- export declare const useDdocEditor: ({ isPreviewMode, initialContent, enableCollaboration, collaborationId, walletAddress, username, onChange, onCollaboratorChange, onCommentInteraction, ensResolutionUrl, onError, setCharacterCount, setWordCount, secureImageUploadUrl, scrollPosition, ddocId, enableIndexeddbSync, unFocused, zoomLevel, onInvalidContentError, ignoreCorruptedData, isPresentationMode, proExtensions, metadataProxyUrl, }: Partial<DdocProps>) => {
4
+ export declare const useDdocEditor: ({ isPreviewMode, initialContent, enableCollaboration, collaborationId, walletAddress, username, onChange, onCollaboratorChange, onCommentInteraction, ensResolutionUrl, onError, setCharacterCount, setWordCount, secureImageUploadUrl, scrollPosition, ddocId, enableIndexeddbSync, unFocused, zoomLevel, onInvalidContentError, ignoreCorruptedData, isPresentationMode, proExtensions, metadataProxyUrl, onCopyHeadingLink, }: Partial<DdocProps>) => {
5
5
  editor: import('@tiptap/core').Editor | null;
6
6
  isContentLoading: boolean;
7
7
  ref: import('react').RefObject<HTMLDivElement>;
@@ -0,0 +1 @@
1
+ export declare function headingToSlug(heading: string): string;