@fileverse-dev/ddoc 3.0.58-folder-sharing-1 → 3.0.58-patch-15

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,12 +1,12 @@
1
- export interface ExportFormatOption {
1
+ interface ExportFormatOption {
2
2
  id: string;
3
3
  label: string;
4
4
  }
5
- export interface ExportTabOption {
5
+ interface ExportTabOption {
6
6
  id: string;
7
7
  label: string;
8
8
  }
9
- export interface ExportAsModalProps {
9
+ interface ExportAsModalProps {
10
10
  open: boolean;
11
11
  onOpenChange: (open: boolean) => void;
12
12
  onExport?: (data: {
@@ -19,3 +19,4 @@ export interface ExportAsModalProps {
19
19
  initialTab?: string;
20
20
  }
21
21
  export declare const ExportAsModal: ({ open, onOpenChange, onExport, formatOptions, tabOptions, initialFormat, initialTab, }: ExportAsModalProps) => import("react/jsx-runtime").JSX.Element;
22
+ export {};
@@ -6,7 +6,7 @@ import * as Y from 'yjs';
6
6
  interface UseDdocExportArgs {
7
7
  editor: Editor | null;
8
8
  tabs: Tab[];
9
- ydoc: Y.Doc | null;
9
+ ydoc: Y.Doc;
10
10
  exportOptions: (IEditorToolElement | null)[];
11
11
  }
12
12
  declare const useDdocExport: ({ editor, tabs, ydoc, exportOptions, }: UseDdocExportArgs) => {
@@ -20,10 +20,5 @@ declare const useDdocExport: ({ editor, tabs, ydoc, exportOptions, }: UseDdocExp
20
20
  tab: string;
21
21
  name?: string;
22
22
  }) => void;
23
- handleExportAsync: ({ format, tab, name, }: {
24
- format: string;
25
- tab: string;
26
- name?: string;
27
- }) => Promise<void>;
28
23
  };
29
24
  export { useDdocExport };
@@ -3,10 +3,9 @@ import { handleMarkdownContent } from '../extensions/mardown-paste-handler';
3
3
  import { IpfsImageUploadResponse } from '../types';
4
4
 
5
5
  import * as Y from 'yjs';
6
- export interface UseHeadlessEditorProps {
6
+ export declare const useHeadlessEditor: (props?: {
7
7
  optionalExtensions?: string[];
8
- }
9
- export declare const useHeadlessEditor: (props?: UseHeadlessEditorProps) => {
8
+ }) => {
10
9
  setContent: (initialContent: string | string[] | JSONContent, editor: Editor, ydoc: Y.Doc) => void;
11
10
  getEditor: () => {
12
11
  editor: Editor;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@fileverse-dev/ddoc",
3
3
  "private": false,
4
4
  "description": "DDoc",
5
- "version": "3.0.58-folder-sharing-1",
5
+ "version": "3.0.58-patch-15",
6
6
  "main": "dist/index.es.js",
7
7
  "module": "dist/index.es.js",
8
8
  "exports": {
@@ -1,31 +0,0 @@
1
- import { Editor, JSONContent } from '@tiptap/react';
2
- import { ExportAsModalProps } from '../components/export-modal';
3
- import { UseHeadlessEditorProps } from './use-headless-editor';
4
-
5
- import * as Y from 'yjs';
6
- export type HeadlessEditorExportFormat = 'pdf' | 'md' | 'html' | 'txt';
7
- export interface HeadlessEditorExportOption {
8
- content: string;
9
- fileName?: string;
10
- initialFormat?: HeadlessEditorExportFormat;
11
- }
12
- export declare const useExportHeadlessEditorContent: (props?: UseHeadlessEditorProps) => {
13
- exportContent: (option: HeadlessEditorExportOption) => void;
14
- exportModalProps: ExportAsModalProps;
15
- setContent: (initialContent: string | string[] | JSONContent, editor: Editor, ydoc: Y.Doc) => void;
16
- getEditor: () => {
17
- editor: Editor;
18
- ydoc: Y.Doc;
19
- };
20
- getYjsConvertor: () => {
21
- convertJSONContentToYjsEncodedString: (content: JSONContent) => string;
22
- cleanup: () => void;
23
- };
24
- downloadContentAsMd: (content: string | string[] | JSONContent, title: string) => Promise<void>;
25
- downloadContentAsHtml: (content: string | string[] | JSONContent, title: string) => Promise<void>;
26
- downloadContentAsTxt: (content: string | string[] | JSONContent, title: string) => Promise<void>;
27
- mergeYjsUpdates: (contents: string[]) => string;
28
- handleMarkdownContent: typeof import('../extensions/mardown-paste-handler').handleMarkdownContent;
29
- getYjsContentFromMarkdown: (file: File, ipfsImageUploadFn: (file: File) => Promise<import('../types').IpfsImageUploadResponse>) => Promise<string | null>;
30
- getYjsContentFromDocx: (file: File, ipfsImageUploadFn: (file: File) => Promise<import('../types').IpfsImageUploadResponse>) => Promise<string | null>;
31
- };