@fileverse-dev/ddoc 2.1.9-patch-4 → 2.2.0-patch-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.
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-CIQcYg2P.mjs";
1
+ import { D as d, P as r, h as s, u as t } from "./index-CYe21jbr.mjs";
2
2
  export {
3
3
  d as DdocEditor,
4
4
  r as PreviewDdocEditor,
@@ -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;