@fileverse-dev/ddoc 2.0.3-sync-patch-2 → 2.0.3-sync-patch-3
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +2 -2
- package/dist/index.d.ts +0 -1
- package/dist/index.es.js +0 -140681
- package/dist/package/common/carousel.d.ts +0 -22
- package/dist/package/common/cutsom-tooltip.d.ts +0 -8
- package/dist/package/common/dropdown.d.ts +0 -12
- package/dist/package/common/spinner.d.ts +0 -1
- package/dist/package/common/surface.d.ts +0 -7
- package/dist/package/common/toolbar-button.d.ts +0 -9
- package/dist/package/common/toolbar.d.ts +0 -13
- package/dist/package/common/types.d.ts +0 -19
- package/dist/package/components/color-selector.d.ts +0 -14
- package/dist/package/components/editor-bubble-menu.d.ts +0 -11
- package/dist/package/components/editor-toolbar.d.ts +0 -10
- package/dist/package/components/editor-utils.d.ts +0 -84
- package/dist/package/components/mobile-toolbar.d.ts +0 -10
- package/dist/package/components/node-selector.d.ts +0 -9
- package/dist/package/components/slash-comand.d.ts +0 -5
- package/dist/package/components/utils-modal.d.ts +0 -9
- package/dist/package/ddoc-editor.d.ts +0 -4
- package/dist/package/extensions/action-button/action-button-node-view.d.ts +0 -3
- package/dist/package/extensions/action-button/action-button.d.ts +0 -16
- package/dist/package/extensions/action-button/index.d.ts +0 -1
- package/dist/package/extensions/action-button/modal.d.ts +0 -8
- package/dist/package/extensions/custom-keymap.d.ts +0 -14
- package/dist/package/extensions/d-block/dblock-node-view.d.ts +0 -4
- package/dist/package/extensions/d-block/dblock.d.ts +0 -13
- package/dist/package/extensions/d-block/index.d.ts +0 -1
- package/dist/package/extensions/default-extension.d.ts +0 -5
- package/dist/package/extensions/doc.d.ts +0 -3
- package/dist/package/extensions/document/document.d.ts +0 -2
- package/dist/package/extensions/document/index.d.ts +0 -1
- package/dist/package/extensions/footnote/footnote.d.ts +0 -4
- package/dist/package/extensions/horizontal-rule.d.ts +0 -2
- package/dist/package/extensions/iframe/iframe.d.ts +0 -27
- package/dist/package/extensions/iframe/index.d.ts +0 -1
- package/dist/package/extensions/mardown-paste-handler/index.d.ts +0 -14
- package/dist/package/extensions/multi-column/column-selection.d.ts +0 -17
- package/dist/package/extensions/multi-column/column.d.ts +0 -4
- package/dist/package/extensions/multi-column/columns.d.ts +0 -18
- package/dist/package/extensions/multi-column/index.d.ts +0 -11
- package/dist/package/extensions/multi-column/menus/columns-menu.d.ts +0 -4
- package/dist/package/extensions/multi-column/menus/index.d.ts +0 -1
- package/dist/package/extensions/multi-column/utils.d.ts +0 -22
- package/dist/package/extensions/resizable-media/index.d.ts +0 -1
- package/dist/package/extensions/resizable-media/media-paste-drop-plugin/index.d.ts +0 -1
- package/dist/package/extensions/resizable-media/media-paste-drop-plugin/media-paste-drop-plugin.d.ts +0 -12
- package/dist/package/extensions/resizable-media/resizable-media-menu-util.d.ts +0 -16
- package/dist/package/extensions/resizable-media/resizable-media-node-view.d.ts +0 -3
- package/dist/package/extensions/resizable-media/resizable-media.d.ts +0 -27
- package/dist/package/extensions/supercharged-table/extension-table/index.d.ts +0 -5
- package/dist/package/extensions/supercharged-table/extension-table/table-view.d.ts +0 -18
- package/dist/package/extensions/supercharged-table/extension-table/table.d.ts +0 -56
- package/dist/package/extensions/supercharged-table/extension-table/utilities/create-cell.d.ts +0 -3
- package/dist/package/extensions/supercharged-table/extension-table/utilities/create-table.d.ts +0 -3
- package/dist/package/extensions/supercharged-table/extension-table/utilities/delete-table-when-all-cells-selected.d.ts +0 -3
- package/dist/package/extensions/supercharged-table/extension-table/utilities/get-table-node-types.d.ts +0 -5
- package/dist/package/extensions/supercharged-table/extension-table/utilities/is-cell-selection.d.ts +0 -3
- package/dist/package/extensions/supercharged-table/extension-table-cell/index.d.ts +0 -4
- package/dist/package/extensions/supercharged-table/extension-table-cell/table-cell-node-view.d.ts +0 -4
- package/dist/package/extensions/supercharged-table/extension-table-cell/table-cell.d.ts +0 -6
- package/dist/package/extensions/supercharged-table/extension-table-header/index.d.ts +0 -4
- package/dist/package/extensions/supercharged-table/extension-table-header/table-header.d.ts +0 -6
- package/dist/package/extensions/supercharged-table/extension-table-row/index.d.ts +0 -4
- package/dist/package/extensions/supercharged-table/extension-table-row/table-row-node-view.d.ts +0 -17
- package/dist/package/extensions/supercharged-table/extension-table-row/table-row.d.ts +0 -7
- package/dist/package/extensions/supercharged-table/index.d.ts +0 -5
- package/dist/package/extensions/supercharged-table/supercharged-table-kit.d.ts +0 -3
- package/dist/package/extensions/sync-cursor.d.ts +0 -28
- package/dist/package/extensions/trailing-node/index.d.ts +0 -1
- package/dist/package/extensions/trailing-node/trailing-node.d.ts +0 -12
- package/dist/package/extensions/twitter-embed/embedded-tweet.d.ts +0 -18
- package/dist/package/extensions/twitter-embed/index.d.ts +0 -1
- package/dist/package/extensions/twitter-embed/tweet-component-node-view.d.ts +0 -3
- package/dist/package/hooks/use-content-item-actions.d.ts +0 -10
- package/dist/package/hooks/use-editing-context.d.ts +0 -10
- package/dist/package/hooks/use-visibility.d.ts +0 -24
- package/dist/package/types.d.ts +0 -48
- package/dist/package/use-ddoc-editor.d.ts +0 -9
- package/dist/package/utils/colors.d.ts +0 -4
- package/dist/package/utils/cursor.d.ts +0 -5
- package/dist/package/utils/debounce.d.ts +0 -1
- package/dist/package/utils/get-render-container.d.ts +0 -4
- package/dist/package/utils/getAddressName.d.ts +0 -7
- package/dist/package/utils/getTemplateContent.d.ts +0 -3
- package/dist/package/utils/template-utils.d.ts +0 -15
- package/dist/package/utils/upload-images.d.ts +0 -7
- package/dist/style.css +0 -1
- package/dist/vite.svg +0 -1
@@ -1,56 +0,0 @@
|
|
1
|
-
import { Node, ParentConfig } from '@tiptap/core';
|
2
|
-
import { NodeView } from 'prosemirror-view';
|
3
|
-
|
4
|
-
export interface TableOptions {
|
5
|
-
HTMLAttributes: Record<string, never>;
|
6
|
-
resizable: boolean;
|
7
|
-
handleWidth: number;
|
8
|
-
cellMinWidth: number;
|
9
|
-
View: NodeView;
|
10
|
-
lastColumnResizable: boolean;
|
11
|
-
allowTableNodeSelection: boolean;
|
12
|
-
}
|
13
|
-
declare module '@tiptap/core' {
|
14
|
-
interface Commands<ReturnType> {
|
15
|
-
table: {
|
16
|
-
insertTable: (options?: {
|
17
|
-
rows?: number;
|
18
|
-
cols?: number;
|
19
|
-
withHeaderRow?: boolean;
|
20
|
-
}) => ReturnType;
|
21
|
-
addColumnBefore: () => ReturnType;
|
22
|
-
addColumnAfter: () => ReturnType;
|
23
|
-
deleteColumn: () => ReturnType;
|
24
|
-
addRowBefore: () => ReturnType;
|
25
|
-
addRowAfter: () => ReturnType;
|
26
|
-
deleteRow: () => ReturnType;
|
27
|
-
deleteTable: () => ReturnType;
|
28
|
-
mergeCells: () => ReturnType;
|
29
|
-
splitCell: () => ReturnType;
|
30
|
-
toggleHeaderColumn: () => ReturnType;
|
31
|
-
toggleHeaderRow: () => ReturnType;
|
32
|
-
toggleHeaderCell: () => ReturnType;
|
33
|
-
mergeOrSplit: () => ReturnType;
|
34
|
-
setCellAttribute: (name: string, value: never) => ReturnType;
|
35
|
-
goToNextCell: () => ReturnType;
|
36
|
-
goToPreviousCell: () => ReturnType;
|
37
|
-
fixTables: () => ReturnType;
|
38
|
-
setCellSelection: (position: {
|
39
|
-
anchorCell: number;
|
40
|
-
headCell?: number;
|
41
|
-
}) => ReturnType;
|
42
|
-
};
|
43
|
-
}
|
44
|
-
interface NodeConfig<Options, Storage> {
|
45
|
-
/**
|
46
|
-
* Table Role
|
47
|
-
*/
|
48
|
-
tableRole?: string | ((this: {
|
49
|
-
name: string;
|
50
|
-
options: Options;
|
51
|
-
storage: Storage;
|
52
|
-
parent: ParentConfig<NodeConfig<Options>>['tableRole'];
|
53
|
-
}) => string);
|
54
|
-
}
|
55
|
-
}
|
56
|
-
export declare const Table: Node<TableOptions, any>;
|
package/dist/package/extensions/supercharged-table/extension-table/utilities/create-table.d.ts
DELETED
@@ -1,3 +0,0 @@
|
|
1
|
-
import { Fragment, Node as ProsemirrorNode, Schema } from 'prosemirror-model';
|
2
|
-
|
3
|
-
export declare function createTable(schema: Schema, rowsCount: number, colsCount: number, withHeaderRow: boolean, cellContent?: Fragment | ProsemirrorNode | Array<ProsemirrorNode>): ProsemirrorNode;
|
package/dist/package/extensions/supercharged-table/extension-table-row/table-row-node-view.d.ts
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
import { Node as ProseMirrorNode } from 'prosemirror-model';
|
2
|
-
import { NodeView } from 'prosemirror-view';
|
3
|
-
|
4
|
-
export declare class TableRowNodeView implements NodeView {
|
5
|
-
node: ProseMirrorNode;
|
6
|
-
cellMinWidth: number;
|
7
|
-
dom: Element;
|
8
|
-
table: HTMLTableElement;
|
9
|
-
colgroup: Element;
|
10
|
-
contentDOM: HTMLElement;
|
11
|
-
constructor(node: ProseMirrorNode, cellMinWidth: number);
|
12
|
-
update(node: ProseMirrorNode): boolean;
|
13
|
-
ignoreMutation(mutation: MutationRecord | {
|
14
|
-
type: 'selection';
|
15
|
-
target: Element;
|
16
|
-
}): boolean;
|
17
|
-
}
|
@@ -1,28 +0,0 @@
|
|
1
|
-
import { Extension } from '@tiptap/core';
|
2
|
-
|
3
|
-
type CollaborationCursorStorage = {
|
4
|
-
users: {
|
5
|
-
clientId: number;
|
6
|
-
[key: string]: any;
|
7
|
-
}[];
|
8
|
-
};
|
9
|
-
export interface CollaborationCursorOptions {
|
10
|
-
provider: any;
|
11
|
-
user: Record<string, any>;
|
12
|
-
render(user: Record<string, any>): HTMLElement;
|
13
|
-
selectionRender(user: Record<string, any>): any;
|
14
|
-
onUpdate: (users: {
|
15
|
-
clientId: number;
|
16
|
-
[key: string]: any;
|
17
|
-
}[]) => null;
|
18
|
-
}
|
19
|
-
declare module '@tiptap/core' {
|
20
|
-
interface Commands<ReturnType> {
|
21
|
-
collaborationCursor: {
|
22
|
-
updateUser: (attributes: Record<string, any>) => ReturnType;
|
23
|
-
user: (attributes: Record<string, any>) => ReturnType;
|
24
|
-
};
|
25
|
-
}
|
26
|
-
}
|
27
|
-
export declare const SyncCursor: Extension<CollaborationCursorOptions, CollaborationCursorStorage>;
|
28
|
-
export {};
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from './trailing-node';
|
@@ -1,12 +0,0 @@
|
|
1
|
-
import { Extension } from '@tiptap/core';
|
2
|
-
|
3
|
-
/**
|
4
|
-
* Extension based on:
|
5
|
-
* - https://github.com/ueberdosis/tiptap/blob/v1/packages/tiptap-extensions/src/extensions/TrailingNode.js
|
6
|
-
* - https://github.com/remirror/remirror/blob/e0f1bec4a1e8073ce8f5500d62193e52321155b9/packages/prosemirror-trailing-node/src/trailing-node-plugin.ts
|
7
|
-
*/
|
8
|
-
export interface TrailingNodeOptions {
|
9
|
-
node: string;
|
10
|
-
notAfter: string[];
|
11
|
-
}
|
12
|
-
export declare const TrailingNode: Extension<TrailingNodeOptions, any>;
|
@@ -1,18 +0,0 @@
|
|
1
|
-
import { Node } from '@tiptap/react';
|
2
|
-
|
3
|
-
export interface EmbeddedTweetOptions {
|
4
|
-
HTMLAttributes: Record<string, any>;
|
5
|
-
}
|
6
|
-
declare module '@tiptap/core' {
|
7
|
-
interface Commands<ReturnType> {
|
8
|
-
embeddedTweet: {
|
9
|
-
/**
|
10
|
-
* Add an tweet embed
|
11
|
-
*/
|
12
|
-
setTweetEmbed: (options: {
|
13
|
-
tweetId: string;
|
14
|
-
}) => ReturnType;
|
15
|
-
};
|
16
|
-
}
|
17
|
-
}
|
18
|
-
export declare const EmbeddedTweet: Node<EmbeddedTweetOptions, any>;
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from './embedded-tweet';
|
@@ -1,10 +0,0 @@
|
|
1
|
-
import { Node } from '@tiptap/pm/model';
|
2
|
-
import { Editor } from '@tiptap/react';
|
3
|
-
|
4
|
-
declare const useContentItemActions: (editor: Editor, currentNode: Node | null, currentNodePos: number) => {
|
5
|
-
resetTextFormatting: () => void;
|
6
|
-
duplicateNode: () => void;
|
7
|
-
copyNodeToClipboard: () => void;
|
8
|
-
deleteNode: () => void;
|
9
|
-
};
|
10
|
-
export default useContentItemActions;
|
@@ -1,10 +0,0 @@
|
|
1
|
-
import { default as React, ReactNode } from 'react';
|
2
|
-
|
3
|
-
type EditingContextType = boolean | null;
|
4
|
-
export declare const useEditingContext: () => EditingContextType;
|
5
|
-
type EditingProviderProps = {
|
6
|
-
children: ReactNode;
|
7
|
-
isPreviewMode: boolean;
|
8
|
-
};
|
9
|
-
export declare const EditingProvider: React.FC<EditingProviderProps>;
|
10
|
-
export {};
|
@@ -1,24 +0,0 @@
|
|
1
|
-
export declare enum IEditorTool {
|
2
|
-
NONE = 0,
|
3
|
-
HEADING = 1,
|
4
|
-
TEXT_COLOR = 2,
|
5
|
-
HIGHLIGHT = 3,
|
6
|
-
LINK = 4,
|
7
|
-
FONT_FAMILY = 5,
|
8
|
-
ALIGNMENT = 6,
|
9
|
-
LIST = 7,
|
10
|
-
TEXT_FORMATING = 8,
|
11
|
-
TEXT_COLOR_PICKER = 9,
|
12
|
-
LINK_POPUP = 10,
|
13
|
-
SCRIPTS = 11
|
14
|
-
}
|
15
|
-
export default function useComponentVisibility(initialIsVisible: boolean): {
|
16
|
-
ref: import('react').RefObject<HTMLDivElement>;
|
17
|
-
isComponentVisible: boolean;
|
18
|
-
setIsComponentVisible: import('react').Dispatch<import('react').SetStateAction<boolean>>;
|
19
|
-
};
|
20
|
-
export declare function useEditorToolVisiibility(initialIsVisible: IEditorTool): {
|
21
|
-
ref: import('react').RefObject<HTMLDivElement>;
|
22
|
-
toolVisibility: IEditorTool;
|
23
|
-
setToolVisibility: import('react').Dispatch<import('react').SetStateAction<IEditorTool>>;
|
24
|
-
};
|
package/dist/package/types.d.ts
DELETED
@@ -1,48 +0,0 @@
|
|
1
|
-
import { JSONContent } from '@tiptap/core';
|
2
|
-
import { EditorProps } from '@tiptap/pm/view';
|
3
|
-
import { Editor } from '@tiptap/react';
|
4
|
-
import { default as React, SetStateAction } from 'react';
|
5
|
-
|
6
|
-
export declare const DdocEditorProps: EditorProps;
|
7
|
-
export interface IDocCollabUsers {
|
8
|
-
name: string;
|
9
|
-
isEns: string;
|
10
|
-
color: string;
|
11
|
-
}
|
12
|
-
export interface DdocProps {
|
13
|
-
enableCollaboration?: boolean;
|
14
|
-
collaborationId?: string;
|
15
|
-
isPreviewMode: boolean;
|
16
|
-
ensResolutionUrl?: string;
|
17
|
-
initialContent?: JSONContent | null;
|
18
|
-
walletAddress?: string | null;
|
19
|
-
username?: string | null;
|
20
|
-
renderNavbar?: ({ editor }: {
|
21
|
-
editor: JSONContent;
|
22
|
-
}) => JSX.Element;
|
23
|
-
onChange?: (changes: Data['editorJSONData']) => void;
|
24
|
-
onCollaboratorChange?: (collaborators: undefined | IDocCollabUsers[]) => void;
|
25
|
-
onTextSelection?: (data: IEditorSelectionData) => void;
|
26
|
-
onCommentInteraction?: (data: IEditorSelectionData) => void;
|
27
|
-
handleCommentButtonClick?: (e: Editor) => void;
|
28
|
-
showCommentButton?: boolean;
|
29
|
-
disableBottomToolbar?: boolean;
|
30
|
-
onError?: (error: string) => void;
|
31
|
-
setCharacterCount?: React.Dispatch<SetStateAction<number>>;
|
32
|
-
setWordCount?: React.Dispatch<SetStateAction<number>>;
|
33
|
-
collaborationKey?: string;
|
34
|
-
}
|
35
|
-
export interface IEditorSelectionData {
|
36
|
-
from: number;
|
37
|
-
to: number;
|
38
|
-
text: string;
|
39
|
-
isHighlightedYellow: boolean;
|
40
|
-
}
|
41
|
-
export interface Data {
|
42
|
-
editorJSONData: JSONContent;
|
43
|
-
}
|
44
|
-
export interface IUser {
|
45
|
-
name: string;
|
46
|
-
color: string;
|
47
|
-
isEns: boolean;
|
48
|
-
}
|
@@ -1,9 +0,0 @@
|
|
1
|
-
import { DdocProps } from './types';
|
2
|
-
|
3
|
-
export declare const useDdocEditor: ({ isPreviewMode, initialContent, enableCollaboration, collaborationId, walletAddress, username, onChange, onCollaboratorChange, onCommentInteraction, onTextSelection, ensResolutionUrl, onError, setCharacterCount, setWordCount, collaborationKey, }: Partial<DdocProps>) => {
|
4
|
-
editor: import('@tiptap/core').Editor | null;
|
5
|
-
isContentLoading: boolean;
|
6
|
-
ref: import('react').RefObject<HTMLDivElement>;
|
7
|
-
connect: (username: string | null | undefined, isEns?: boolean) => void;
|
8
|
-
ydoc: import('yjs').Doc;
|
9
|
-
};
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare function debounce<T extends (...args: any) => any>(func: T, wait: number): T;
|
@@ -1,7 +0,0 @@
|
|
1
|
-
export declare const getAddressName: (address: string, ensProviderUrl: string) => Promise<{
|
2
|
-
name: string;
|
3
|
-
isEns: boolean;
|
4
|
-
}>;
|
5
|
-
export declare const resolveEnsAddress: (address: string, ensProviderUrl: string) => Promise<string | null>;
|
6
|
-
export declare const getEnsProvider: (network: string) => import('ethers').AbstractProvider;
|
7
|
-
export declare const getTrimmedName: (name: string, length: number, limit: number) => string;
|
@@ -1,15 +0,0 @@
|
|
1
|
-
import { JSONContent } from '@tiptap/react';
|
2
|
-
import { LucideIconProps } from '@fileverse/ui';
|
3
|
-
|
4
|
-
type IconType = LucideIconProps['name'] | string;
|
5
|
-
type TemplateButtonProps = {
|
6
|
-
label: string;
|
7
|
-
icon: IconType;
|
8
|
-
onClick: () => void;
|
9
|
-
content: JSONContent | null;
|
10
|
-
}[];
|
11
|
-
declare const renderIcon: (icon: IconType, className?: string) => import("react/jsx-runtime").JSX.Element | null;
|
12
|
-
declare const createTemplateButtons: (addTemplate: (template: JSONContent) => void) => TemplateButtonProps;
|
13
|
-
declare const createMoreTemplates: (addTemplate: (template: JSONContent) => void) => TemplateButtonProps;
|
14
|
-
declare const renderTemplateButtons: (templateButtons: TemplateButtonProps, moreTemplates: TemplateButtonProps, visibleTemplateCount: number, toggleAllTemplates: () => void, isExpanded: boolean) => import("react/jsx-runtime").JSX.Element;
|
15
|
-
export { renderIcon, createTemplateButtons, createMoreTemplates, renderTemplateButtons };
|
@@ -1,7 +0,0 @@
|
|
1
|
-
import { Plugin } from '@tiptap/pm/state';
|
2
|
-
import { DecorationSet, EditorView } from '@tiptap/pm/view';
|
3
|
-
|
4
|
-
declare const UploadImagesPlugin: () => Plugin<DecorationSet>;
|
5
|
-
export default UploadImagesPlugin;
|
6
|
-
export declare function startImageUpload(file: File, view: EditorView, pos: number): void;
|
7
|
-
export declare const uploadFn: (image: File) => Promise<string>;
|