@fileverse-dev/ddoc 2.1.8-ensFix-patch-2 → 2.1.9-headingLinks-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/{ccip-C8lyMrMG.mjs → ccip-DcC5wgF1.mjs} +1 -1
- package/dist/{index-DXQ0eAuK.mjs → index-LSQinfuO.mjs} +27817 -27316
- package/dist/index.es.js +1 -1
- package/dist/package/components/editor-bubble-menu/node-selector.d.ts +18 -0
- package/dist/package/components/editor-utils.d.ts +9 -0
- package/dist/package/extensions/d-block/dblock-node-view.d.ts +1 -3
- package/dist/package/extensions/d-block/dblock.d.ts +1 -0
- package/dist/package/extensions/default-extension.d.ts +1 -1
- package/dist/package/types.d.ts +1 -0
- package/dist/package/use-ddoc-editor.d.ts +1 -1
- package/dist/package/utils/heading-to-slug.d.ts +1 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
@@ -1,3 +1,21 @@
|
|
1
1
|
import { NodeSelectorProps } from './types';
|
2
|
+
import { EditorState, Transaction } from 'prosemirror-state';
|
3
|
+
import { Dispatch } from '@tiptap/react';
|
2
4
|
|
5
|
+
interface ListConfig {
|
6
|
+
type: 'bulletList' | 'orderedList' | 'taskList';
|
7
|
+
itemType: 'listItem' | 'taskItem';
|
8
|
+
hasAttrs?: boolean;
|
9
|
+
}
|
10
|
+
type ListConversionProps = {
|
11
|
+
tr: Transaction;
|
12
|
+
dispatch: Dispatch;
|
13
|
+
state: EditorState;
|
14
|
+
from: number;
|
15
|
+
to: number;
|
16
|
+
listConfig?: ListConfig;
|
17
|
+
};
|
18
|
+
export declare const convertListToParagraphs: ({ tr, dispatch, state, from, to, }: ListConversionProps) => boolean;
|
19
|
+
export declare const convertToList: ({ tr, dispatch, state, from, to, listConfig, }: ListConversionProps) => boolean;
|
3
20
|
export declare const NodeSelector: ({ editor, elementRef }: NodeSelectorProps) => import("react/jsx-runtime").JSX.Element;
|
21
|
+
export {};
|
@@ -116,4 +116,13 @@ export declare const TextFormatingPopup: ({ editor, isOpen, setIsOpen, setToolVi
|
|
116
116
|
export declare const TextColorPicker: ({ editor }: {
|
117
117
|
editor: Editor;
|
118
118
|
}) => import("react/jsx-runtime").JSX.Element;
|
119
|
+
export declare const checkActiveListsAndDBlocks: (editor: Editor) => {
|
120
|
+
activeListTypes: string[];
|
121
|
+
activeListDBlocks: number[];
|
122
|
+
activeDBlocks: number[];
|
123
|
+
from: number;
|
124
|
+
to: number;
|
125
|
+
state: import('prosemirror-state').EditorState;
|
126
|
+
hasMultipleLists: boolean;
|
127
|
+
};
|
119
128
|
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;
|
package/dist/package/types.d.ts
CHANGED
@@ -94,6 +94,7 @@ export interface DdocProps extends CommentAccountProps {
|
|
94
94
|
onSlidesShare?: () => void;
|
95
95
|
renderThemeToggle?: () => JSX.Element;
|
96
96
|
metadataProxyUrl?: string;
|
97
|
+
onCopyHeadingLink?: (link: string) => void;
|
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, scrollPosition, 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;
|