@fileverse-dev/ddoc 3.0.53-patch-20 → 3.0.53-styles-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.
@@ -1,10 +1,8 @@
1
1
  import { default as React } from 'react';
2
2
  import { Editor } from '@tiptap/react';
3
3
  import { IpfsImageFetchPayload, IpfsImageUploadResponse } from '../types';
4
- import { Tab } from './tabs/utils/tab-utils';
5
4
 
6
- import * as Y from 'yjs';
7
- declare const TiptapToolBar: ({ editor, onError, zoomLevel, setZoomLevel, isNavbarVisible, setIsNavbarVisible, ipfsImageUploadFn, onMarkdownExport, onMarkdownImport, onPdfExport, onHtmlExport, onTxtExport, onDocxImport, isLoading, ipfsImageFetchFn, fetchV1ImageFn, isConnected, tabs, ydoc, }: {
5
+ declare const TiptapToolBar: ({ editor, onError, zoomLevel, setZoomLevel, isNavbarVisible, setIsNavbarVisible, ipfsImageUploadFn, onMarkdownExport, onMarkdownImport, onPdfExport, onHtmlExport, onTxtExport, onDocxImport, isLoading, ipfsImageFetchFn, fetchV1ImageFn, isConnected, }: {
8
6
  editor: Editor | null;
9
7
  onError?: (errorString: string) => void;
10
8
  zoomLevel: string;
@@ -25,7 +23,5 @@ declare const TiptapToolBar: ({ editor, onError, zoomLevel, setZoomLevel, isNavb
25
23
  file: File;
26
24
  }>;
27
25
  isConnected?: boolean;
28
- tabs: Tab[];
29
- ydoc: Y.Doc;
30
26
  }) => import("react/jsx-runtime").JSX.Element;
31
27
  export default TiptapToolBar;
@@ -1,16 +1,10 @@
1
1
  import { IEditorToolElement } from './editor-utils';
2
- import { Editor } from '@tiptap/react';
3
- import { Tab } from './tabs/utils/tab-utils';
4
2
 
5
- import * as Y from 'yjs';
6
- declare const ImportExportButton: ({ fileExportsOpen, setFileExportsOpen, exportOptions, importOptions, setDropdownOpen, editor, tabs, ydoc, }: {
3
+ declare const ImportExportButton: ({ fileExportsOpen, setFileExportsOpen, exportOptions, importOptions, setDropdownOpen, }: {
7
4
  fileExportsOpen: boolean;
8
5
  setFileExportsOpen: React.Dispatch<React.SetStateAction<boolean>>;
9
6
  exportOptions: (IEditorToolElement | null)[];
10
7
  importOptions: (IEditorToolElement | null)[];
11
8
  setDropdownOpen: React.Dispatch<React.SetStateAction<boolean>>;
12
- editor: Editor | null;
13
- tabs: Tab[];
14
- ydoc: Y.Doc;
15
9
  }) => import("react/jsx-runtime").JSX.Element;
16
10
  export { ImportExportButton };
@@ -1,4 +1,4 @@
1
1
  import { CommentContextType, CommentProviderProps } from './types';
2
2
 
3
- export declare const CommentProvider: ({ children, editor, initialComments, setInitialComments, username, setUsername, activeCommentId, setActiveCommentId, activeTabId, focusCommentWithActiveId, onNewComment, onCommentReply, ensResolutionUrl, onResolveComment, onUnresolveComment, onDeleteComment, isConnected, connectViaWallet, isLoading, connectViaUsername, isDDocOwner, onInlineComment, onComment, setCommentDrawerOpen, }: CommentProviderProps) => import("react/jsx-runtime").JSX.Element;
3
+ export declare const CommentProvider: ({ children, editor, initialComments, setInitialComments, username, setUsername, activeCommentId, setActiveCommentId, focusCommentWithActiveId, onNewComment, onCommentReply, ensResolutionUrl, onResolveComment, onUnresolveComment, onDeleteComment, isConnected, connectViaWallet, isLoading, connectViaUsername, isDDocOwner, onInlineComment, onComment, setCommentDrawerOpen, }: CommentProviderProps) => import("react/jsx-runtime").JSX.Element;
4
4
  export declare const useComments: () => CommentContextType;
@@ -50,7 +50,6 @@ export interface CommentContextType extends CommentAccountProps {
50
50
  isCommentActive: boolean;
51
51
  isCommentResolved: boolean;
52
52
  ensResolutionUrl: string;
53
- activeTabId: string;
54
53
  onCommentReply?: (activeCommentId: string, reply: IComment) => void;
55
54
  onComment?: () => void;
56
55
  setCommentDrawerOpen?: React.Dispatch<React.SetStateAction<boolean>>;
@@ -79,7 +78,6 @@ export interface CommentProviderProps extends CommentAccountProps {
79
78
  setUsername?: React.Dispatch<SetStateAction<string>>;
80
79
  activeCommentId: string | null;
81
80
  setActiveCommentId: React.Dispatch<React.SetStateAction<string | null>>;
82
- activeTabId: string;
83
81
  focusCommentWithActiveId: (id: string) => void;
84
82
  ensResolutionUrl: string;
85
83
  onInlineComment?: () => void;
@@ -1,3 +1,3 @@
1
1
  import { DocumentOutlineProps } from './types';
2
2
 
3
- export declare const DocumentOutline: ({ editor, hasToC, items, setItems, showTOC, setShowTOC, isPreviewMode, orientation, tabs, setTabs, activeTabId, setActiveTabId, createTab, renameTab, duplicateTab, orderTab, ydoc, tabCommentCounts, tabSectionContainer, isVersionHistoryMode, tabConfig, }: DocumentOutlineProps) => import("react/jsx-runtime").JSX.Element;
3
+ export declare const DocumentOutline: ({ editor, hasToC, items, setItems, showTOC, setShowTOC, isPreviewMode, orientation, }: DocumentOutlineProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,8 +1,6 @@
1
1
  import { Editor } from '@tiptap/react';
2
- import { default as React, Dispatch, SetStateAction } from 'react';
3
- import { Tab } from '../tabs/utils/tab-utils';
2
+ import { SetStateAction } from 'react';
4
3
 
5
- import * as Y from 'yjs';
6
4
  export interface ToCItemType {
7
5
  id: string;
8
6
  level: number;
@@ -29,26 +27,7 @@ export interface DocumentOutlineProps {
29
27
  items: ToCItemType[];
30
28
  setItems: (items: ToCItemType[] | ((prev: ToCItemType[]) => ToCItemType[])) => void;
31
29
  showTOC: boolean | undefined;
32
- setShowTOC: Dispatch<SetStateAction<boolean>> | undefined;
30
+ setShowTOC: React.Dispatch<SetStateAction<boolean>> | undefined;
33
31
  isPreviewMode: boolean;
34
32
  orientation?: 'portrait' | 'landscape';
35
- tabs: Tab[];
36
- setTabs: Dispatch<SetStateAction<Tab[]>>;
37
- activeTabId: string;
38
- setActiveTabId: (id: string) => void;
39
- createTab: () => void;
40
- renameTab: (tabId: string, payload: {
41
- newName?: string;
42
- emoji?: string;
43
- }) => void;
44
- duplicateTab: (tabId: string) => void;
45
- orderTab: (destinationTabId: string, activeTabId: string) => void;
46
- ydoc: Y.Doc;
47
- tabCommentCounts: Record<string, number>;
48
- tabSectionContainer?: HTMLElement;
49
- isVersionHistoryMode?: boolean;
50
- tabConfig?: {
51
- onCopyTabLink?: (tabId: string) => void;
52
- defaultTabId?: string;
53
- };
54
33
  }
@@ -47,7 +47,6 @@ export interface CommentStorage {
47
47
  }
48
48
  export interface IComment {
49
49
  id?: string;
50
- tabId?: string;
51
50
  username?: string;
52
51
  reactions?: {
53
52
  count: number;
@@ -1,6 +1,6 @@
1
1
  import { SyncMachineContext } from '.';
2
2
 
3
- export interface IConnectConf {
3
+ interface IConnectConf {
4
4
  username?: string;
5
5
  roomKey: string;
6
6
  roomId: string;
@@ -36,3 +36,4 @@ export declare const useSyncMachine: (config: Partial<SyncMachineContext>) => {
36
36
  data: any;
37
37
  }, import('xstate').BaseActionObject, import('xstate').ServiceMap>>;
38
38
  };
39
+ export {};
@@ -71,16 +71,6 @@ export interface DocumentStyling {
71
71
  orientation?: 'portrait' | 'landscape';
72
72
  }
73
73
  export interface DdocProps extends CommentAccountProps {
74
- tabConfig?: {
75
- onCopyTabLink?: (tabId: string) => void;
76
- defaultTabId?: string;
77
- };
78
- versionHistoryState?: {
79
- enabled: boolean;
80
- versionId: string;
81
- content: string | string[];
82
- };
83
- tabSectionContainer?: HTMLElement;
84
74
  isCollabDocumentPublished?: boolean;
85
75
  ipfsImageFetchFn?: (_data: IpfsImageFetchPayload) => Promise<{
86
76
  url: string;
@@ -106,6 +96,7 @@ export interface DdocProps extends CommentAccountProps {
106
96
  setIsCommentSectionOpen?: React.Dispatch<SetStateAction<boolean>>;
107
97
  inlineCommentData?: InlineCommentData;
108
98
  setInlineCommentData?: React.Dispatch<React.SetStateAction<InlineCommentData>>;
99
+ theme?: 'dark' | 'light';
109
100
  zoomLevel: string;
110
101
  setZoomLevel: React.Dispatch<SetStateAction<string>>;
111
102
  isNavbarVisible: boolean;
@@ -1,36 +1,20 @@
1
1
  import { DdocProps } from './types';
2
+ import { ToCItemType } from './components/toc/types';
2
3
 
3
- export declare const useDdocEditor: ({ isPreviewMode, initialContent, versionHistoryState, enableCollaboration, onChange, onCollaboratorChange, onCommentInteraction, onError, setCharacterCount, setWordCount, ipfsImageUploadFn, ddocId, enableIndexeddbSync, unFocused, zoomLevel, onInvalidContentError, ignoreCorruptedData, isPresentationMode, metadataProxyUrl, extensions: externalExtensions, onCopyHeadingLink, ipfsImageFetchFn, fetchV1ImageFn, isConnected, activeModel, maxTokens, isAIAgentEnabled, collabConfig, onIndexedDbError, disableInlineComment, ...rest }: Partial<DdocProps>) => {
4
- ydoc: import('yjs').Doc;
5
- awareness: any;
6
- refreshYjsIndexedDbProvider: () => Promise<void>;
7
- terminateSession: () => void;
8
- isContentLoading: boolean;
9
- tabs: import('./components/tabs/utils/tab-utils').Tab[];
10
- hasTabState: boolean;
11
- isVersionMode: boolean;
12
- activeTabId: string;
13
- setTabs: import('react').Dispatch<import('react').SetStateAction<import('./components/tabs/utils/tab-utils').Tab[]>>;
14
- setActiveTabId: (id: string) => void;
15
- createTab: () => string;
16
- deleteTab: (tabId: string) => void;
17
- renameTab: (tabId: string, { newName, emoji }: {
18
- newName?: string;
19
- emoji?: string;
20
- }) => void;
21
- duplicateTab: (tabId: string) => string | undefined;
22
- orderTab: (destinationTabId: string, movedTabId: string) => void;
23
- onConnect: (connectConfig: import('./sync-local/useSyncMachine').IConnectConf) => void;
24
- isReady: boolean;
25
- hasCollabContentInitialised: boolean;
26
- initialiseYjsIndexedDbProvider: () => Promise<void>;
4
+ import * as Y from 'yjs';
5
+ export declare const useDdocEditor: ({ isPreviewMode, initialContent, enableCollaboration, onChange, onCollaboratorChange, onCommentInteraction, onError, setCharacterCount, setWordCount, ipfsImageUploadFn, ddocId, enableIndexeddbSync, unFocused, theme, zoomLevel, onInvalidContentError, ignoreCorruptedData, isPresentationMode, metadataProxyUrl, extensions: externalExtensions, onCopyHeadingLink, ipfsImageFetchFn, fetchV1ImageFn, isConnected, activeModel, maxTokens, isAIAgentEnabled, collabConfig, onIndexedDbError, disableInlineComment, ...rest }: Partial<DdocProps>) => {
27
6
  editor: import('@tiptap/core').Editor | null;
7
+ isContentLoading: boolean;
28
8
  ref: import('react').RefObject<HTMLDivElement>;
29
- slides: string[];
30
- setSlides: import('react').Dispatch<import('react').SetStateAction<string[]>>;
31
- tocItems: import('./components/toc/types').ToCItemType[];
32
- setTocItems: import('react').Dispatch<import('react').SetStateAction<import('./components/toc/types').ToCItemType[]>>;
9
+ ydoc: Y.Doc;
10
+ refreshYjsIndexedDbProvider: () => Promise<void>;
33
11
  activeCommentId: string | null;
34
12
  setActiveCommentId: import('react').Dispatch<import('react').SetStateAction<string | null>>;
35
13
  focusCommentWithActiveId: (id: string) => void;
14
+ slides: string[];
15
+ setSlides: import('react').Dispatch<import('react').SetStateAction<string[]>>;
16
+ tocItems: ToCItemType[];
17
+ setTocItems: import('react').Dispatch<import('react').SetStateAction<ToCItemType[]>>;
18
+ terminateSession: () => void;
19
+ awareness: any;
36
20
  };