@fileverse-dev/ddoc 2.2.8-byom-1 → 2.2.8-byom-2
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-Bm_29olh.mjs → ccip-BkTMqsBd.mjs} +1 -1
- package/dist/{index-D6IOHyDa.mjs → index-BGIFsev3.mjs} +20450 -20358
- package/dist/index.es.js +1 -1
- package/dist/package/extensions/ai-writer/ai-writer-node-view.d.ts +3 -1
- package/dist/package/extensions/ai-writer/ai-writer.d.ts +1 -0
- package/dist/package/extensions/default-extension.d.ts +1 -1
- package/dist/package/extensions/slash-command/slash-comand.d.ts +1 -1
- package/dist/package/extensions/slash-command/slash-command-utils.d.ts +13 -3
- package/dist/package/extensions/slash-command/types.d.ts +1 -0
- package/dist/package/types.d.ts +1 -1
- package/dist/package/use-ddoc-editor.d.ts +1 -1
- package/dist/package/utils/is-likely-latex.d.ts +1 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
import { default as React } from 'react';
|
2
2
|
import { NodeViewProps } from '@tiptap/react';
|
3
3
|
|
4
|
-
export declare const AIWriterNodeView: React.MemoExoticComponent<({ node, editor, getPos, updateAttributes }: NodeViewProps
|
4
|
+
export declare const AIWriterNodeView: React.MemoExoticComponent<({ node, editor, getPos, updateAttributes, onPromptUsage, }: NodeViewProps & {
|
5
|
+
onPromptUsage: () => void;
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element | null>;
|
@@ -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, onCopyHeadingLink?: (link: string) => void
|
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;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Extension } from '@tiptap/core';
|
2
2
|
|
3
3
|
export declare const Command: Extension<any, any>;
|
4
|
-
declare const SlashCommand: (onError?: (errorString: string) => void, secureImageUploadUrl?: string) => Extension<any, any>;
|
4
|
+
declare const SlashCommand: (onError?: (errorString: string) => void, secureImageUploadUrl?: string, hasAvailableModels?: boolean) => Extension<any, any>;
|
5
5
|
export default SlashCommand;
|
@@ -1,15 +1,25 @@
|
|
1
1
|
import { CommandProps } from './types';
|
2
2
|
|
3
|
-
export declare const getSuggestionItems: ({ query, onError, secureImageUploadUrl, }: {
|
3
|
+
export declare const getSuggestionItems: ({ query, onError, secureImageUploadUrl, hasAvailableModels, }: {
|
4
4
|
query: string;
|
5
5
|
onError?: (errorString: string) => void;
|
6
6
|
secureImageUploadUrl?: string;
|
7
|
-
|
7
|
+
hasAvailableModels?: boolean;
|
8
|
+
}) => ({
|
8
9
|
title: string;
|
9
10
|
description: string;
|
10
11
|
searchTerms: string[];
|
11
12
|
icon: import("react/jsx-runtime").JSX.Element;
|
12
13
|
image: string;
|
13
14
|
command: ({ editor, range }: CommandProps) => void;
|
14
|
-
|
15
|
+
isDisabled: boolean;
|
16
|
+
} | {
|
17
|
+
title: string;
|
18
|
+
description: string;
|
19
|
+
searchTerms: string[];
|
20
|
+
icon: import("react/jsx-runtime").JSX.Element;
|
21
|
+
image: string;
|
22
|
+
command: ({ editor, range }: CommandProps) => void;
|
23
|
+
isDisabled?: undefined;
|
24
|
+
})[];
|
15
25
|
export declare const updateScrollView: (container: HTMLElement, item: HTMLElement) => void;
|
package/dist/package/types.d.ts
CHANGED
@@ -95,6 +95,7 @@ export interface DdocProps extends CommentAccountProps {
|
|
95
95
|
onMarkdownExport?: () => void;
|
96
96
|
onMarkdownImport?: () => void;
|
97
97
|
onPdfExport?: () => void;
|
98
|
+
onPromptUsage?: () => void;
|
98
99
|
sharedSlidesLink?: string;
|
99
100
|
documentName?: string;
|
100
101
|
onInvalidContentError?: (e: unknown) => void;
|
@@ -104,7 +105,6 @@ export interface DdocProps extends CommentAccountProps {
|
|
104
105
|
metadataProxyUrl?: string;
|
105
106
|
onCopyHeadingLink?: (link: string) => void;
|
106
107
|
footerHeight?: string;
|
107
|
-
hasAvailableModels?: boolean;
|
108
108
|
activeModel?: CustomModel;
|
109
109
|
maxTokens?: number;
|
110
110
|
}
|
@@ -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, ddocId, enableIndexeddbSync, unFocused, zoomLevel, onInvalidContentError, ignoreCorruptedData, isPresentationMode, proExtensions, metadataProxyUrl, onCopyHeadingLink,
|
4
|
+
export declare const useDdocEditor: ({ isPreviewMode, initialContent, enableCollaboration, collaborationId, walletAddress, username, onChange, onCollaboratorChange, onCommentInteraction, ensResolutionUrl, onError, setCharacterCount, setWordCount, secureImageUploadUrl, ddocId, enableIndexeddbSync, unFocused, zoomLevel, onInvalidContentError, ignoreCorruptedData, isPresentationMode, proExtensions, metadataProxyUrl, onCopyHeadingLink, activeModel, maxTokens, }: 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 const isLikelyLatex: (input: string) => boolean;
|