@fileverse-dev/ddoc 4.6.6 → 4.6.7
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/README.md +10 -15
- package/dist/{index-CmiE8H2k.mjs → index-BdCbZin7.mjs} +1 -1
- package/dist/{index-DsczUtHy.mjs → index-l71D5B0G.mjs} +17593 -17501
- package/dist/index.es.js +1 -1
- package/dist/{markdown-source-pane-CBIJqve2.mjs → markdown-source-pane-xrs2Ifaf.mjs} +1 -1
- package/dist/package/components/editor-utils.d.ts +2 -0
- package/dist/package/components/import-export-button.d.ts +3 -2
- package/dist/package/extensions/html-export/index.d.ts +4 -0
- package/dist/package/hooks/use-ddoc-export.d.ts +4 -3
- package/dist/{split-view-toolbar-7X5pX0hW.mjs → split-view-toolbar-BXO3h0NX.mjs} +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as e, a as o, E as t, F as d, P as r, f as i, i as n, g as E, j as m, h as C, m as c, e as l, l as p, c as u, d as f, u as D, v as F } from "./index-
|
|
1
|
+
import { D as e, a as o, E as t, F as d, P as r, f as i, i as n, g as E, j as m, h as C, m as c, e as l, l as p, c as u, d as f, u as D, v as F } from "./index-l71D5B0G.mjs";
|
|
2
2
|
export {
|
|
3
3
|
e as DdocEditor,
|
|
4
4
|
o as DdocExportModal,
|
|
@@ -3,7 +3,7 @@ var Wr = (t, e, O) => e in t ? Vr(t, e, { enumerable: !0, configurable: !0, writ
|
|
|
3
3
|
var gt = (t, e, O) => Wr(t, typeof e != "symbol" ? e + "" : e, O);
|
|
4
4
|
import { jsx as Cr } from "react/jsx-runtime";
|
|
5
5
|
import { useRef as pe, useEffect as St } from "react";
|
|
6
|
-
import { s as y, A as pO, T as dO, a as Gr, S as et, b as Lr, P as fO, E as j, i as QO, c as _, D as le, k as tt, F as Ar, M as Pt, W as Er, R as Ur, d as mO, N as oe, e as V, f as Mr, g as Ot, h as ce, p as $O, j as Y, t as h, l as Ir, I as rt, L as at, m as ye, n as ue, o as Qe, q as gO, r as te, u as SO, v as Br, w as Nr, x as PO, y as kO, z as Dr, B as Fr, C as Kr, G as Oe, H as ZO, J as Jr, K as kt, O as Hr, Q as ea, U as ta, V as Oa, X as ra, Y as aa, Z as ia, _ as sa, $ as na, a0 as la, a1 as oa, a2 as ca } from "./index-
|
|
6
|
+
import { s as y, A as pO, T as dO, a as Gr, S as et, b as Lr, P as fO, E as j, i as QO, c as _, D as le, k as tt, F as Ar, M as Pt, W as Er, R as Ur, d as mO, N as oe, e as V, f as Mr, g as Ot, h as ce, p as $O, j as Y, t as h, l as Ir, I as rt, L as at, m as ye, n as ue, o as Qe, q as gO, r as te, u as SO, v as Br, w as Nr, x as PO, y as kO, z as Dr, B as Fr, C as Kr, G as Oe, H as ZO, J as Jr, K as kt, O as Hr, Q as ea, U as ta, V as Oa, X as ra, Y as aa, Z as ia, _ as sa, $ as na, a0 as la, a1 as oa, a2 as ca } from "./index-BdCbZin7.mjs";
|
|
7
7
|
class ua {
|
|
8
8
|
/**
|
|
9
9
|
Create a new completion context. (Mostly useful for testing
|
|
@@ -15,6 +15,7 @@ export interface IEditorToolElement {
|
|
|
15
15
|
notVisible?: number;
|
|
16
16
|
disabled?: boolean;
|
|
17
17
|
}
|
|
18
|
+
export type CopyAo3Html = (getHtml: () => Promise<string>) => Promise<boolean>;
|
|
18
19
|
type PickerEntry = {
|
|
19
20
|
title: string;
|
|
20
21
|
value: string;
|
|
@@ -74,6 +75,7 @@ export declare const useEditorToolbar: ({ editor, onError, isPresentationMode, s
|
|
|
74
75
|
undoRedoTools: (IEditorToolElement | null)[];
|
|
75
76
|
toolbar: (IEditorToolElement | null)[];
|
|
76
77
|
exportOptions: (IEditorToolElement | null)[];
|
|
78
|
+
copyAo3Html: CopyAo3Html;
|
|
77
79
|
printHandler: () => void;
|
|
78
80
|
importOptions: (IEditorToolElement | null)[];
|
|
79
81
|
bottomToolbar: (IEditorToolElement | null)[];
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { IEditorToolElement } from './editor-utils';
|
|
1
|
+
import { CopyAo3Html, IEditorToolElement } from './editor-utils';
|
|
2
2
|
import { Editor } from '@tiptap/react';
|
|
3
3
|
import { Tab } from './tabs/utils/tab-utils';
|
|
4
4
|
|
|
5
5
|
import * as Y from 'yjs';
|
|
6
|
-
declare const ImportExportButton: ({ fileExportsOpen, setFileExportsOpen, exportOptions, importOptions, editor, tabs, ydoc, onRegisterExportTrigger, }: {
|
|
6
|
+
declare const ImportExportButton: ({ fileExportsOpen, setFileExportsOpen, exportOptions, importOptions, editor, tabs, ydoc, copyAo3Html, onRegisterExportTrigger, }: {
|
|
7
7
|
fileExportsOpen: boolean;
|
|
8
8
|
setFileExportsOpen: React.Dispatch<React.SetStateAction<boolean>>;
|
|
9
9
|
exportOptions: (IEditorToolElement | null)[];
|
|
@@ -11,6 +11,7 @@ declare const ImportExportButton: ({ fileExportsOpen, setFileExportsOpen, export
|
|
|
11
11
|
editor: Editor | null;
|
|
12
12
|
tabs: Tab[];
|
|
13
13
|
ydoc: Y.Doc;
|
|
14
|
+
copyAo3Html: CopyAo3Html;
|
|
14
15
|
onRegisterExportTrigger?: ((trigger: ((format?: string, name?: string) => void) | null) => void) | undefined;
|
|
15
16
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
16
17
|
export { ImportExportButton };
|
|
@@ -3,6 +3,9 @@ import { IpfsImageFetchPayload } from '../../types';
|
|
|
3
3
|
|
|
4
4
|
declare module '@tiptap/core' {
|
|
5
5
|
interface Commands {
|
|
6
|
+
exportHtmlContent: {
|
|
7
|
+
exportHtmlContent: () => any;
|
|
8
|
+
};
|
|
6
9
|
exportHtmlFile: {
|
|
7
10
|
exportHtmlFile: (props?: {
|
|
8
11
|
title?: string;
|
|
@@ -10,6 +13,7 @@ declare module '@tiptap/core' {
|
|
|
10
13
|
};
|
|
11
14
|
}
|
|
12
15
|
}
|
|
16
|
+
export declare const sanitizeHtmlExportBody: (html: string) => string;
|
|
13
17
|
declare const HtmlExportExtension: (ipfsImageFetchFn?: (_data: IpfsImageFetchPayload) => Promise<{
|
|
14
18
|
url: string;
|
|
15
19
|
file: File;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Editor } from '@tiptap/react';
|
|
2
|
-
import { IEditorToolElement } from '../components/editor-utils';
|
|
2
|
+
import { CopyAo3Html, IEditorToolElement } from '../components/editor-utils';
|
|
3
3
|
import { Tab } from '../components/tabs/utils/tab-utils';
|
|
4
4
|
|
|
5
5
|
import * as Y from 'yjs';
|
|
@@ -8,9 +8,10 @@ interface UseDdocExportArgs {
|
|
|
8
8
|
tabs: Tab[];
|
|
9
9
|
ydoc: Y.Doc | null;
|
|
10
10
|
exportOptions: (IEditorToolElement | null)[];
|
|
11
|
+
copyAo3Html?: CopyAo3Html;
|
|
11
12
|
}
|
|
12
|
-
declare const useDdocExport: ({ editor, tabs, ydoc, exportOptions, }: UseDdocExportArgs) => {
|
|
13
|
-
getOptionFormat: (title: string) => "" | "md" | "pdf" | "md-css" | "html" | "txt" | "odt";
|
|
13
|
+
declare const useDdocExport: ({ editor, tabs, ydoc, exportOptions, copyAo3Html, }: UseDdocExportArgs) => {
|
|
14
|
+
getOptionFormat: (title: string) => "" | "md" | "pdf" | "ao3-html" | "md-css" | "html" | "txt" | "odt";
|
|
14
15
|
formatSelectOptions: {
|
|
15
16
|
id: string;
|
|
16
17
|
label: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as m, jsxs as L } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as D, useState as E, useEffect as A } from "react";
|
|
3
3
|
import { DynamicDropdown as P, Tooltip as O, IconButton as T } from "@fileverse/ui";
|
|
4
|
-
import { a3 as _, a4 as w, c as R } from "./index-
|
|
4
|
+
import { a3 as _, a4 as w, c as R } from "./index-BdCbZin7.mjs";
|
|
5
5
|
const p = (e, n, o = n) => {
|
|
6
6
|
const { state: i } = e, l = i.changeByRange((t) => {
|
|
7
7
|
const d = i.sliceDoc(t.from, t.to), r = i.sliceDoc(
|