Skip to content

Commit

Permalink
build: v1.0.16 release (^.^)YYa!!
Browse files Browse the repository at this point in the history
  • Loading branch information
yangfuhai committed Sep 3, 2024
1 parent 25e0b44 commit 0593392
Show file tree
Hide file tree
Showing 6 changed files with 2,658 additions and 2,573 deletions.
202 changes: 101 additions & 101 deletions dist/index.cjs

Large diffs are not rendered by default.

18 changes: 13 additions & 5 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export declare type AiEditorOptions = {
onBlur?: (editor: AiEditor) => void;
onDestroy?: (editor: AiEditor) => void;
onSave?: (editor: AiEditor) => boolean;
toolbarKeys?: (string | CustomMenu)[];
toolbarKeys?: (string | CustomMenu | MenuGroup)[];
draggable?: boolean;
codeBlock?: {
languages?: LanguageItem[];
Expand All @@ -117,13 +117,13 @@ export declare type AiEditorOptions = {
class?: string;
bubbleMenuItems?: (string | BubbleMenuItem)[];
};
uploader?: (file: File, uploadUrl: string, headers: Record<string, any>, formName: string) => Promise<Record<string, any>>;
uploader?: Uploader;
image?: {
customMenuInvoke?: (editor: AiEditor) => void;
uploadUrl?: string;
uploadHeaders?: (() => Record<string, any>) | Record<string, any>;
uploadFormName?: string;
uploader?: (file: File, uploadUrl: string, headers: Record<string, any>, formName: string) => Promise<Record<string, any>>;
uploader?: Uploader;
uploaderEvent?: UploaderEvent;
defaultSize?: number;
allowBase64?: boolean;
Expand All @@ -134,15 +134,15 @@ export declare type AiEditorOptions = {
uploadUrl?: string;
uploadHeaders?: (() => Record<string, any>) | Record<string, any>;
uploadFormName?: string;
uploader?: (file: File, uploadUrl: string, headers: Record<string, any>, formName: string) => Promise<Record<string, any>>;
uploader?: Uploader;
uploaderEvent?: UploaderEvent;
};
attachment?: {
customMenuInvoke?: (editor: AiEditor) => void;
uploadUrl?: string;
uploadHeaders?: (() => Record<string, any>) | Record<string, any>;
uploadFormName?: string;
uploader?: (file: File, uploadUrl: string, headers: Record<string, any>, formName: string) => Promise<Record<string, any>>;
uploader?: Uploader;
uploaderEvent?: UploaderEvent;
};
fontFamily?: {
Expand Down Expand Up @@ -300,6 +300,12 @@ declare type LanguageItem = {
alias?: string[];
};

export declare interface MenuGroup {
title?: string;
icon?: string;
toolbarKeys: (string | CustomMenu | MenuGroup)[];
}

export declare interface NameAndValue {
name: string;
value: any;
Expand Down Expand Up @@ -334,6 +340,8 @@ export declare interface SparkAiModelConfig extends AiModelConfig {
version?: string;
}

export declare type Uploader = (file: File, uploadUrl: string, headers: Record<string, any>, formName: string) => Promise<Record<string, any>>;

export declare interface UploaderEvent {
onUploadBefore?: (file: File, uploadUrl: string, headers: Record<string, any>) => void | boolean;
onSuccess?: (file: File, response: any) => any;
Expand Down
Loading

0 comments on commit 0593392

Please sign in to comment.