@fileverse-dev/ddoc 2.2.8-byom-2 → 2.2.8-hotfix-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/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { D as d, P as r, h as s, u as t } from "./index-BGIFsev3.mjs";
1
+ import { D as d, P as r, h as s, u as t } from "./index-2NliVzGa.mjs";
2
2
  export {
3
3
  d as DdocEditor,
4
4
  r as PreviewDdocEditor,
@@ -4,7 +4,6 @@ export interface DBlockOptions {
4
4
  HTMLAttributes: Record<string, any>;
5
5
  secureImageUploadUrl?: string;
6
6
  onCopyHeadingLink?: (link: string) => void;
7
- hasAvailableModels?: boolean;
8
7
  }
9
8
  declare module '@tiptap/core' {
10
9
  interface Commands<ReturnType> {
@@ -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, hasAvailableModels?: boolean) => Extension<any, any>;
4
+ declare const SlashCommand: (onError?: (errorString: string) => void, secureImageUploadUrl?: string) => Extension<any, any>;
5
5
  export default SlashCommand;
@@ -1,25 +1,15 @@
1
1
  import { CommandProps } from './types';
2
2
 
3
- export declare const getSuggestionItems: ({ query, onError, secureImageUploadUrl, hasAvailableModels, }: {
3
+ export declare const getSuggestionItems: ({ query, onError, secureImageUploadUrl, }: {
4
4
  query: string;
5
5
  onError?: (errorString: string) => void;
6
6
  secureImageUploadUrl?: string;
7
- hasAvailableModels?: boolean;
8
- }) => ({
7
+ }) => {
9
8
  title: string;
10
9
  description: string;
11
10
  searchTerms: string[];
12
11
  icon: import("react/jsx-runtime").JSX.Element;
13
12
  image: string;
14
13
  command: ({ editor, range }: CommandProps) => void;
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
- })[];
14
+ }[];
25
15
  export declare const updateScrollView: (container: HTMLElement, item: HTMLElement) => void;
@@ -6,7 +6,6 @@ export interface CommandItemProps {
6
6
  description: string;
7
7
  icon: ReactNode;
8
8
  image?: string;
9
- isDisabled?: boolean;
10
9
  }
11
10
  export interface CommandProps {
12
11
  editor: Editor;
@@ -23,15 +23,6 @@ export interface CommentAccountProps {
23
23
  connectViaUsername?: (username: string) => Promise<void>;
24
24
  isDDocOwner?: boolean;
25
25
  }
26
- export interface CustomModel {
27
- id?: string;
28
- label: string;
29
- modelName: string;
30
- endpoint: string;
31
- contextSize: number;
32
- apiKey: string;
33
- systemPrompt: string;
34
- }
35
26
  export interface DdocProps extends CommentAccountProps {
36
27
  isCollabDocumentPublished?: boolean;
37
28
  disableInlineComment?: boolean;
@@ -95,7 +86,6 @@ export interface DdocProps extends CommentAccountProps {
95
86
  onMarkdownExport?: () => void;
96
87
  onMarkdownImport?: () => void;
97
88
  onPdfExport?: () => void;
98
- onPromptUsage?: () => void;
99
89
  sharedSlidesLink?: string;
100
90
  documentName?: string;
101
91
  onInvalidContentError?: (e: unknown) => void;
@@ -105,8 +95,6 @@ export interface DdocProps extends CommentAccountProps {
105
95
  metadataProxyUrl?: string;
106
96
  onCopyHeadingLink?: (link: string) => void;
107
97
  footerHeight?: string;
108
- activeModel?: CustomModel;
109
- maxTokens?: number;
110
98
  }
111
99
  export interface IEditorSelectionData {
112
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, ddocId, enableIndexeddbSync, unFocused, zoomLevel, onInvalidContentError, ignoreCorruptedData, isPresentationMode, proExtensions, metadataProxyUrl, onCopyHeadingLink, activeModel, maxTokens, }: Partial<DdocProps>) => {
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, }: Partial<DdocProps>) => {
5
5
  editor: import('@tiptap/core').Editor | null;
6
6
  isContentLoading: boolean;
7
7
  ref: import('react').RefObject<HTMLDivElement>;