@fileverse-dev/ddoc 2.1.9-patch-4 → 2.2.0-headingFix-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-BX2UCSzO.mjs";
2
2
  export {
3
3
  d as DdocEditor,
4
4
  r as PreviewDdocEditor,
@@ -0,0 +1,12 @@
1
+ export declare const fadeVariants: {
2
+ initial: {
3
+ opacity: number;
4
+ };
5
+ animate: {
6
+ opacity: number;
7
+ };
8
+ exit: {
9
+ opacity: number;
10
+ };
11
+ };
12
+ export declare const fadeInTransition: (element: JSX.Element, key: string) => import("react/jsx-runtime").JSX.Element;
@@ -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> {
@@ -13,5 +13,6 @@ export declare const useHeadingCollapse: ({ node, getPos, editor, collapsedHeadi
13
13
  isThisHeadingCollapsed: boolean;
14
14
  shouldBeHidden: boolean;
15
15
  toggleCollapse: () => void;
16
+ headingAlignment: any;
16
17
  };
17
18
  export {};
@@ -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;
@@ -11,6 +11,6 @@ export declare const useHeadlessEditor: () => {
11
11
  convertJSONContentToYjsEncodedString: (content: JSONContent) => string;
12
12
  cleanup: () => void;
13
13
  };
14
- downloadContentAsMd: (content: string | string[] | JSONContent, title: string) => void;
14
+ downloadContentAsMd: (content: string | string[] | JSONContent, title: string) => Promise<void>;
15
15
  mergeYjsUpdates: (contents: string[]) => string;
16
16
  };
@@ -78,7 +78,6 @@ export interface DdocProps extends CommentAccountProps {
78
78
  color: string;
79
79
  }>;
80
80
  className?: string;
81
- scrollPosition?: number;
82
81
  unFocused?: boolean;
83
82
  isPresentationMode?: boolean;
84
83
  setIsPresentationMode?: React.Dispatch<SetStateAction<boolean>>;
@@ -94,6 +93,8 @@ export interface DdocProps extends CommentAccountProps {
94
93
  onSlidesShare?: () => void;
95
94
  renderThemeToggle?: () => JSX.Element;
96
95
  metadataProxyUrl?: string;
96
+ onCopyHeadingLink?: (link: string) => void;
97
+ footerHeight?: string;
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, 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;