@fileverse-dev/ddoc 3.4.6-mp-fixes-3 → 3.4.6-pdf-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 +136625 -137193
- package/dist/package/components/editor-bubble-menu/editor-bubble-menu.d.ts +1 -2
- package/dist/package/components/editor-toolbar.d.ts +3 -3
- package/dist/package/components/editor-utils.d.ts +1 -0
- package/dist/package/components/mobile-toolbar.d.ts +3 -4
- package/dist/package/extensions/d-block/dblock-node-view.d.ts +3 -34
- package/dist/package/extensions/d-block/dblock.d.ts +0 -3
- package/dist/package/extensions/default-extension.d.ts +2 -5
- package/dist/package/hooks/use-content-item-actions.d.ts +1 -6
- package/dist/package/hooks/use-tab-editor.d.ts +1 -10
- package/dist/package/use-ddoc-editor.d.ts +1 -6
- package/dist/style.css +1 -1
- package/package.json +2 -1
- package/dist/package/extensions/d-block/dblock-collapse.d.ts +0 -32
- package/dist/package/extensions/d-block/dblock-media-plugin.d.ts +0 -22
- package/dist/package/extensions/d-block/dblock-runtime.d.ts +0 -11
- package/dist/package/extensions/d-block/dblock-toolbar.d.ts +0 -9
- package/dist/package/extensions/d-block/dblock-view-registry.d.ts +0 -49
- package/dist/package/extensions/table-of-contents.d.ts +0 -11
- package/dist/package/utils/y-prosemirror-cleanup.d.ts +0 -5
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.4.6-
|
|
5
|
+
"version": "3.4.6-pdf-1",
|
|
6
6
|
"main": "dist/index.es.js",
|
|
7
7
|
"module": "dist/index.es.js",
|
|
8
8
|
"exports": {
|
|
@@ -86,6 +86,7 @@
|
|
|
86
86
|
"embla-carousel-react": "^8.1.5",
|
|
87
87
|
"emojibase-data": "^16.0.3",
|
|
88
88
|
"highlight.js": "^11.11.1",
|
|
89
|
+
"html2pdf.js": "^0.14.0",
|
|
89
90
|
"js-base64": "^3.7.7",
|
|
90
91
|
"katex": "^0.16.11",
|
|
91
92
|
"lib0": "^0.2.95",
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { Editor } from '@tiptap/core';
|
|
2
|
-
import { Node as ProseMirrorNode } from '@tiptap/pm/model';
|
|
3
|
-
import { EditorState, Plugin, PluginKey, Transaction } from '@tiptap/pm/state';
|
|
4
|
-
import { DecorationSet } from '@tiptap/pm/view';
|
|
5
|
-
|
|
6
|
-
export declare const DBLOCK_HIDDEN_CLASS = "d-block-hidden";
|
|
7
|
-
export interface HeadingLookup {
|
|
8
|
-
id: string;
|
|
9
|
-
level: number;
|
|
10
|
-
position: number;
|
|
11
|
-
children: string[];
|
|
12
|
-
parent?: string;
|
|
13
|
-
}
|
|
14
|
-
export type HeadingLookupMap = Map<string, HeadingLookup>;
|
|
15
|
-
export interface DBlockRenderMeta {
|
|
16
|
-
isHeading: boolean;
|
|
17
|
-
headingId: string | null;
|
|
18
|
-
isThisHeadingCollapsed: boolean;
|
|
19
|
-
headingAlignment?: string;
|
|
20
|
-
isTable: boolean;
|
|
21
|
-
}
|
|
22
|
-
export declare const getDBlockRenderMeta: (node: ProseMirrorNode, pos: number) => DBlockRenderMeta;
|
|
23
|
-
export declare const getHeadingAlignmentClass: (alignment?: string) => "justify-center" | "justify-end" | "justify-start";
|
|
24
|
-
export declare const getHeadingLinkSlug: (node: ProseMirrorNode, pos: number) => string | null;
|
|
25
|
-
export declare const buildHeadingMap: (doc: ProseMirrorNode) => HeadingLookupMap;
|
|
26
|
-
export declare const shouldHideDBlock: (doc: ProseMirrorNode, node: ProseMirrorNode, position: number, headingMap: HeadingLookupMap) => boolean;
|
|
27
|
-
export declare const findEndOfCollapsedContent: (doc: ProseMirrorNode, headingPos: number) => number;
|
|
28
|
-
export declare const buildToggleHeadingCollapseTransaction: (state: EditorState, position: number) => Transaction | null;
|
|
29
|
-
export declare const toggleHeadingCollapse: (editor: Editor, position: number) => boolean;
|
|
30
|
-
export declare const expandHeadingContent: (editor: Editor, nodePos: number) => boolean;
|
|
31
|
-
export declare const dBlockCollapsePluginKey: PluginKey<DecorationSet>;
|
|
32
|
-
export declare const createDBlockCollapsePlugin: () => Plugin<DecorationSet>;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Node as ProseMirrorNode } from '@tiptap/pm/model';
|
|
2
|
-
import { Plugin } from '@tiptap/pm/state';
|
|
3
|
-
import { DBlockRuntimeState } from './dblock-runtime';
|
|
4
|
-
|
|
5
|
-
type MediaCandidate = {
|
|
6
|
-
type: 'img';
|
|
7
|
-
src: string;
|
|
8
|
-
from: number;
|
|
9
|
-
to: number;
|
|
10
|
-
} | {
|
|
11
|
-
type: 'iframe';
|
|
12
|
-
src: string;
|
|
13
|
-
from: number;
|
|
14
|
-
to: number;
|
|
15
|
-
};
|
|
16
|
-
interface MediaPluginState {
|
|
17
|
-
version: number;
|
|
18
|
-
shouldScan: boolean;
|
|
19
|
-
}
|
|
20
|
-
export declare const getDBlockMediaCandidate: (node: ProseMirrorNode, position: number) => MediaCandidate | null;
|
|
21
|
-
export declare const createDBlockMediaConversionPlugin: (getRuntimeState?: () => DBlockRuntimeState) => Plugin<MediaPluginState>;
|
|
22
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export interface DBlockRuntimeState {
|
|
2
|
-
isPreviewMode: boolean;
|
|
3
|
-
isPresentationMode: boolean;
|
|
4
|
-
isPreviewEditor: boolean;
|
|
5
|
-
isCollaboratorsDoc: boolean;
|
|
6
|
-
}
|
|
7
|
-
export declare const DEFAULT_DBLOCK_RUNTIME_STATE: DBlockRuntimeState;
|
|
8
|
-
export type DBlockRuntimeStateRef = {
|
|
9
|
-
current: DBlockRuntimeState;
|
|
10
|
-
};
|
|
11
|
-
export declare const getDBlockRuntimeState: (getRuntimeState?: () => DBlockRuntimeState) => DBlockRuntimeState;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
import { Editor } from '@tiptap/react';
|
|
3
|
-
import { DBlockRuntimeState } from './dblock-runtime';
|
|
4
|
-
|
|
5
|
-
export declare const DBlockToolbarProvider: ({ children, editor, runtimeState, }: {
|
|
6
|
-
children: React.ReactNode;
|
|
7
|
-
editor: Editor | null;
|
|
8
|
-
runtimeState?: DBlockRuntimeState;
|
|
9
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { Node as ProseMirrorNode } from '@tiptap/pm/model';
|
|
2
|
-
|
|
3
|
-
export interface DBlockViewHandle {
|
|
4
|
-
id: string;
|
|
5
|
-
dom: HTMLElement;
|
|
6
|
-
gutterElement: HTMLElement;
|
|
7
|
-
contentElement: HTMLElement;
|
|
8
|
-
getPos: () => number;
|
|
9
|
-
getNode: () => ProseMirrorNode;
|
|
10
|
-
refresh: () => void;
|
|
11
|
-
onCopyHeadingLink?: (link: string) => void;
|
|
12
|
-
}
|
|
13
|
-
type DBlockDebugExtra = Record<string, boolean | number | string | null | undefined>;
|
|
14
|
-
interface DestroyedDBlockNodeViewTargets {
|
|
15
|
-
nodeView: object;
|
|
16
|
-
dom: HTMLElement;
|
|
17
|
-
gutterElement: HTMLElement;
|
|
18
|
-
contentElement: HTMLElement;
|
|
19
|
-
contentDOM: HTMLElement;
|
|
20
|
-
}
|
|
21
|
-
export interface DBlockDebugSnapshot {
|
|
22
|
-
event: string;
|
|
23
|
-
label?: string;
|
|
24
|
-
created: number;
|
|
25
|
-
destroyed: number;
|
|
26
|
-
registered: number;
|
|
27
|
-
connected: number;
|
|
28
|
-
detached: number;
|
|
29
|
-
maxRegistered: number;
|
|
30
|
-
unregisterMisses: number;
|
|
31
|
-
[key: string]: boolean | number | string | null | undefined;
|
|
32
|
-
}
|
|
33
|
-
declare global {
|
|
34
|
-
interface Window {
|
|
35
|
-
__ddocDBlockDebug?: {
|
|
36
|
-
snapshot: (label?: string) => DBlockDebugSnapshot;
|
|
37
|
-
destroyedRefsSnapshot: (label?: string) => DBlockDebugSnapshot;
|
|
38
|
-
getStats: () => DBlockDebugSnapshot;
|
|
39
|
-
reset: () => DBlockDebugSnapshot;
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
export declare const logDBlockLifecycleSnapshot: (label: string, extra?: DBlockDebugExtra) => DBlockDebugSnapshot;
|
|
44
|
-
export declare const trackDestroyedDBlockNodeViewRefs: (targets: DestroyedDBlockNodeViewTargets) => void;
|
|
45
|
-
export declare const registerDBlockView: (handle: DBlockViewHandle) => () => void;
|
|
46
|
-
export declare const getDBlockViewFromElement: (element: Element | null) => DBlockViewHandle | null;
|
|
47
|
-
export declare const getDBlockViewFromEventTarget: (target: EventTarget | null) => DBlockViewHandle | null;
|
|
48
|
-
export declare const refreshRegisteredDBlockViews: () => void;
|
|
49
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Editor } from '@tiptap/core';
|
|
2
|
-
import { TableOfContentsStorage } from '@tiptap/extension-table-of-contents';
|
|
3
|
-
|
|
4
|
-
type EditorWithTableOfContentsStorage = {
|
|
5
|
-
storage?: {
|
|
6
|
-
tableOfContents?: TableOfContentsStorage | null;
|
|
7
|
-
};
|
|
8
|
-
};
|
|
9
|
-
export declare const clearTableOfContentsStorage: (target: Editor | EditorWithTableOfContentsStorage | TableOfContentsStorage | null | undefined) => boolean;
|
|
10
|
-
export declare const DdocTableOfContents: import('@tiptap/core').Extension<import('@tiptap/extension-table-of-contents').TableOfContentsOptions, TableOfContentsStorage>;
|
|
11
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { Editor } from '@tiptap/core';
|
|
2
|
-
|
|
3
|
-
export declare const cleanupYProsemirrorBinding: (editor: Editor | null | undefined) => void;
|
|
4
|
-
export declare const cleanupYUndoManager: (editor: Editor | null | undefined) => void;
|
|
5
|
-
export declare const destroyEditorWithYSyncCleanup: (editor: Editor | null | undefined) => void;
|