zs_library 0.7.8 → 0.7.9

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.
Files changed (31) hide show
  1. package/dist/components/md-editor/editor.d.ts +1 -0
  2. package/dist/components/md-editor/index.d.ts +1 -0
  3. package/dist/components/tiptap-editor/simple/components/tiptap-node/code-block-node/code-block-node-view.d.ts +2 -0
  4. package/dist/components/tiptap-editor/simple/components/tiptap-node/table-node/table-menu.d.ts +6 -0
  5. package/dist/components/tiptap-editor/simple/components/tiptap-node/table-node/table-node-extension.d.ts +2 -0
  6. package/dist/components/tiptap-editor/simple/components/tiptap-ui/blockquote-button/use-blockquote.d.ts +1 -1
  7. package/dist/components/tiptap-editor/simple/components/tiptap-ui/code-block-button/use-code-block.d.ts +1 -1
  8. package/dist/components/tiptap-editor/simple/components/tiptap-ui/image-upload-button/image-upload-button.d.ts +1 -1
  9. package/dist/components/tiptap-editor/simple/components/tiptap-ui/table-trigger-button/index.d.ts +2 -0
  10. package/dist/components/tiptap-editor/simple/components/tiptap-ui/table-trigger-button/table-trigger-button.d.ts +8 -0
  11. package/dist/components/tiptap-editor/simple/components/tiptap-ui/table-trigger-button/use-table-trigger-button.d.ts +16 -0
  12. package/dist/components/tiptap-editor/simple/components/tiptap-ui/text-color-button/index.d.ts +2 -0
  13. package/dist/components/tiptap-editor/simple/components/tiptap-ui/text-color-button/text-color-button.d.ts +6 -0
  14. package/dist/components/tiptap-editor/simple/components/tiptap-ui/text-color-button/use-text-color.d.ts +103 -0
  15. package/dist/components/tiptap-editor/simple/components/tiptap-ui/text-color-popover/index.d.ts +1 -0
  16. package/dist/components/tiptap-editor/simple/components/tiptap-ui/text-color-popover/text-color-popover.d.ts +14 -0
  17. package/dist/components/tiptap-editor/simple/i18n/en-US.json.d.ts +62 -33
  18. package/dist/components/tiptap-editor/simple/i18n/zh-CN.json.d.ts +62 -33
  19. package/dist/components/tiptap-editor/simple/lib/feature-utils.d.ts +5 -0
  20. package/dist/components/tiptap-editor/simple/lib/image-upload-handler.d.ts +2 -1
  21. package/dist/index.css +10 -1
  22. package/dist/index.js +6148 -4272
  23. package/package.json +8 -1
  24. package/dist/components/tiptap-editor/simple/components/tiptap-icons/arrow-left-icon.d.ts +0 -3
  25. package/dist/components/tiptap-editor/simple/components/tiptap-icons/blockquote-icon.d.ts +0 -3
  26. package/dist/components/tiptap-editor/simple/components/tiptap-icons/chevron-down-icon.d.ts +0 -3
  27. package/dist/components/tiptap-editor/simple/components/tiptap-icons/close-icon.d.ts +0 -3
  28. package/dist/components/tiptap-editor/simple/components/tiptap-icons/code-block-icon.d.ts +0 -3
  29. package/dist/components/tiptap-editor/simple/components/tiptap-icons/corner-down-left-icon.d.ts +0 -3
  30. package/dist/components/tiptap-editor/simple/components/tiptap-icons/external-link-icon.d.ts +0 -3
  31. package/dist/components/tiptap-editor/simple/components/tiptap-icons/trash-icon.d.ts +0 -3
@@ -47,6 +47,7 @@ export interface MdEditorPluginConfig {
47
47
  }
48
48
  /**
49
49
  * Markdown 编辑器
50
+ * @deprecated 请使用 SimpleEditor 组件代替
50
51
  */
51
52
  export interface MdEditorProps extends Omit<MDXEditorProps, "markdown" | "onChange"> {
52
53
  /**
@@ -2,6 +2,7 @@ import { PrivMdEditor } from './editor';
2
2
  import { default as MDXEditorPreview } from './preview';
3
3
  /**
4
4
  * Markdown 编辑器
5
+ * @deprecated 请使用 SimpleEditor 组件代替
5
6
  */
6
7
  export type MdEditorType = typeof PrivMdEditor & {
7
8
  /**
@@ -0,0 +1,2 @@
1
+ import { NodeViewProps } from '@tiptap/react';
2
+ export declare const CodeBlockNodeView: ({ node, updateAttributes }: NodeViewProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { Editor } from '@tiptap/react';
2
+ interface TableMenuProps {
3
+ editor: Editor | null;
4
+ }
5
+ export declare function TableMenu({ editor }: TableMenuProps): import("react/jsx-runtime").JSX.Element | null;
6
+ export {};
@@ -0,0 +1,2 @@
1
+ import { Extension } from '@tiptap/core';
2
+ export declare const TableExtensions: (Extension<any, any> | import('@tiptap/core').Node<import('@tiptap/extension-table').TableOptions, any> | import('@tiptap/core').Node<import('@tiptap/extension-table').TableRowOptions, any>)[];
@@ -76,5 +76,5 @@ export declare function useBlockquote(config?: UseBlockquoteConfig): {
76
76
  canToggle: boolean;
77
77
  label: string;
78
78
  shortcutKeys: string;
79
- Icon: import('react').MemoExoticComponent<({ className, ...props }: Omit<import('react').SVGProps<SVGSVGElement>, "ref">) => import("react/jsx-runtime").JSX.Element>;
79
+ Icon: import('@remixicon/react').RemixiconComponentType;
80
80
  };
@@ -83,5 +83,5 @@ export declare function useCodeBlock(config?: UseCodeBlockConfig): {
83
83
  canToggle: boolean;
84
84
  label: string;
85
85
  shortcutKeys: string;
86
- Icon: import('react').MemoExoticComponent<({ className, ...props }: Omit<import('react').SVGProps<SVGSVGElement>, "ref">) => import("react/jsx-runtime").JSX.Element>;
86
+ Icon: import('@remixicon/react').RemixiconComponentType;
87
87
  };
@@ -2,7 +2,7 @@ import { UseImageUploadConfig } from './use-image-upload';
2
2
  import { ButtonProps } from '../../tiptap-ui-primitive/button';
3
3
  type IconProps = React.SVGProps<SVGSVGElement>;
4
4
  type IconComponent = ({ className, ...props }: IconProps) => React.ReactElement;
5
- export interface ImageUploadButtonProps extends Omit<ButtonProps, "type">, UseImageUploadConfig {
5
+ export interface ImageUploadButtonProps extends Omit<ButtonProps, "type" | "onError">, UseImageUploadConfig {
6
6
  /**
7
7
  * Optional text to display alongside the icon.
8
8
  */
@@ -0,0 +1,2 @@
1
+ export * from './table-trigger-button';
2
+ export * from './use-table-trigger-button';
@@ -0,0 +1,8 @@
1
+ import { Button } from '../../tiptap-ui-primitive/button';
2
+ import { UseTableTriggerButtonConfig } from './use-table-trigger-button';
3
+ export interface TableTriggerButtonProps extends Omit<React.ComponentProps<typeof Button>, "type">, UseTableTriggerButtonConfig {
4
+ maxRows?: number;
5
+ maxCols?: number;
6
+ onInserted?: (rows: number, cols: number) => void;
7
+ }
8
+ export declare const TableTriggerButton: import('react').ForwardRefExoticComponent<Omit<TableTriggerButtonProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,16 @@
1
+ import { Editor } from '@tiptap/react';
2
+ export interface UseTableTriggerButtonConfig {
3
+ editor?: Editor | null;
4
+ hideWhenUnavailable?: boolean;
5
+ }
6
+ export declare function canInsertTable(editor: Editor | null): boolean;
7
+ export declare function shouldShowButton(props: {
8
+ editor: Editor | null;
9
+ hideWhenUnavailable: boolean;
10
+ }): boolean;
11
+ export declare function useTableTriggerButton(config?: UseTableTriggerButtonConfig): {
12
+ editor: Editor | null;
13
+ isVisible: boolean;
14
+ canInsert: boolean;
15
+ label: string;
16
+ };
@@ -0,0 +1,2 @@
1
+ export * from './text-color-button';
2
+ export * from './use-text-color';
@@ -0,0 +1,6 @@
1
+ import { ButtonProps } from '../../tiptap-ui-primitive/button';
2
+ import { UseTextColorConfig } from './use-text-color';
3
+ export interface TextColorButtonProps extends Omit<ButtonProps, "type">, UseTextColorConfig {
4
+ text?: string;
5
+ }
6
+ export declare const TextColorButton: import('react').ForwardRefExoticComponent<TextColorButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,103 @@
1
+ import { Editor } from '@tiptap/react';
2
+ export declare const TEXT_COLORS: readonly [{
3
+ readonly label: "gray";
4
+ readonly value: "var(--tt-color-text-gray)";
5
+ readonly contrast: "var(--tt-color-text-gray-contrast)";
6
+ }, {
7
+ readonly label: "brown";
8
+ readonly value: "var(--tt-color-text-brown)";
9
+ readonly contrast: "var(--tt-color-text-brown-contrast)";
10
+ }, {
11
+ readonly label: "orange";
12
+ readonly value: "var(--tt-color-text-orange)";
13
+ readonly contrast: "var(--tt-color-text-orange-contrast)";
14
+ }, {
15
+ readonly label: "yellow";
16
+ readonly value: "var(--tt-color-text-yellow)";
17
+ readonly contrast: "var(--tt-color-text-yellow-contrast)";
18
+ }, {
19
+ readonly label: "green";
20
+ readonly value: "var(--tt-color-text-green)";
21
+ readonly contrast: "var(--tt-color-text-green-contrast)";
22
+ }, {
23
+ readonly label: "blue";
24
+ readonly value: "var(--tt-color-text-blue)";
25
+ readonly contrast: "var(--tt-color-text-blue-contrast)";
26
+ }, {
27
+ readonly label: "purple";
28
+ readonly value: "var(--tt-color-text-purple)";
29
+ readonly contrast: "var(--tt-color-text-purple-contrast)";
30
+ }, {
31
+ readonly label: "pink";
32
+ readonly value: "var(--tt-color-text-pink)";
33
+ readonly contrast: "var(--tt-color-text-pink-contrast)";
34
+ }, {
35
+ readonly label: "red";
36
+ readonly value: "var(--tt-color-text-red)";
37
+ readonly contrast: "var(--tt-color-text-red-contrast)";
38
+ }];
39
+ export type TextColor = (typeof TEXT_COLORS)[number];
40
+ export interface UseTextColorConfig {
41
+ editor?: Editor | null;
42
+ color?: string;
43
+ label?: string;
44
+ hideWhenUnavailable?: boolean;
45
+ onApplied?: ({ color, label }: {
46
+ color: string;
47
+ label: string;
48
+ }) => void;
49
+ }
50
+ export declare function pickTextColorsByValue(values: string[]): ({
51
+ readonly label: "gray";
52
+ readonly value: "var(--tt-color-text-gray)";
53
+ readonly contrast: "var(--tt-color-text-gray-contrast)";
54
+ } | {
55
+ readonly label: "brown";
56
+ readonly value: "var(--tt-color-text-brown)";
57
+ readonly contrast: "var(--tt-color-text-brown-contrast)";
58
+ } | {
59
+ readonly label: "orange";
60
+ readonly value: "var(--tt-color-text-orange)";
61
+ readonly contrast: "var(--tt-color-text-orange-contrast)";
62
+ } | {
63
+ readonly label: "yellow";
64
+ readonly value: "var(--tt-color-text-yellow)";
65
+ readonly contrast: "var(--tt-color-text-yellow-contrast)";
66
+ } | {
67
+ readonly label: "green";
68
+ readonly value: "var(--tt-color-text-green)";
69
+ readonly contrast: "var(--tt-color-text-green-contrast)";
70
+ } | {
71
+ readonly label: "blue";
72
+ readonly value: "var(--tt-color-text-blue)";
73
+ readonly contrast: "var(--tt-color-text-blue-contrast)";
74
+ } | {
75
+ readonly label: "purple";
76
+ readonly value: "var(--tt-color-text-purple)";
77
+ readonly contrast: "var(--tt-color-text-purple-contrast)";
78
+ } | {
79
+ readonly label: "pink";
80
+ readonly value: "var(--tt-color-text-pink)";
81
+ readonly contrast: "var(--tt-color-text-pink-contrast)";
82
+ } | {
83
+ readonly label: "red";
84
+ readonly value: "var(--tt-color-text-red)";
85
+ readonly contrast: "var(--tt-color-text-red-contrast)";
86
+ })[];
87
+ export declare function canSetTextColor(editor: Editor | null): boolean;
88
+ export declare function isTextColorActive(editor: Editor | null, color?: string): boolean;
89
+ export declare function removeTextColor(editor: Editor | null): boolean;
90
+ export declare function shouldShowTextColorButton(props: {
91
+ editor: Editor | null;
92
+ hideWhenUnavailable: boolean;
93
+ }): boolean;
94
+ export declare function useTextColor(config: UseTextColorConfig): {
95
+ isVisible: boolean;
96
+ isActive: boolean;
97
+ canSetTextColor: boolean;
98
+ handleSetTextColor: () => boolean;
99
+ handleRemoveTextColor: () => boolean;
100
+ label: string;
101
+ Icon: import('@remixicon/react').RemixiconComponentType;
102
+ currentColor: string | undefined;
103
+ };
@@ -0,0 +1 @@
1
+ export * from './text-color-popover';
@@ -0,0 +1,14 @@
1
+ import { Editor } from '@tiptap/react';
2
+ import { ButtonProps } from '../../tiptap-ui-primitive/button';
3
+ import { TextColor, UseTextColorConfig } from '../text-color-button';
4
+ export interface TextColorPopoverContentProps {
5
+ editor?: Editor | null;
6
+ colors?: TextColor[];
7
+ }
8
+ export interface TextColorPopoverProps extends Omit<ButtonProps, "type">, Pick<UseTextColorConfig, "editor" | "hideWhenUnavailable" | "onApplied"> {
9
+ colors?: TextColor[];
10
+ }
11
+ export declare const TextColorPopoverButton: import('react').ForwardRefExoticComponent<ButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
12
+ export declare function TextColorPopoverContent({ editor, colors, }: TextColorPopoverContentProps): import("react/jsx-runtime").JSX.Element;
13
+ export declare function TextColorPopover({ editor: providedEditor, colors, hideWhenUnavailable, onApplied, ...props }: TextColorPopoverProps): import("react/jsx-runtime").JSX.Element | null;
14
+ export default TextColorPopover;
@@ -18,32 +18,48 @@ declare const _default: {
18
18
  },
19
19
  "blockquote": "Blockquote",
20
20
  "codeBlock": "Code Block",
21
- "marks": {
22
- "bold": "Bold",
23
- "italic": "Italic",
24
- "strike": "Strike",
25
- "code": "Code",
26
- "underline": "Underline",
27
- "superscript": "Superscript",
28
- "subscript": "Subscript"
29
- },
30
- "highlight": {
31
- "label": "Highlight",
32
- "toggle": "Toggle highlight ({{color}})",
33
- "remove": "Remove highlight",
34
- "colors": {
35
- "default": "Default background",
36
- "gray": "Gray background",
37
- "brown": "Brown background",
38
- "orange": "Orange background",
39
- "yellow": "Yellow background",
40
- "green": "Green background",
41
- "blue": "Blue background",
42
- "purple": "Purple background",
43
- "pink": "Pink background",
44
- "red": "Red background"
45
- }
46
- },
21
+ "marks": {
22
+ "bold": "Bold",
23
+ "italic": "Italic",
24
+ "strike": "Strike",
25
+ "code": "Code",
26
+ "underline": "Underline",
27
+ "superscript": "Superscript",
28
+ "subscript": "Subscript"
29
+ },
30
+ "textColor": {
31
+ "label": "Text color",
32
+ "toggle": "Set text color ({{color}})",
33
+ "remove": "Clear text color",
34
+ "colors": {
35
+ "gray": "Gray text",
36
+ "brown": "Brown text",
37
+ "orange": "Orange text",
38
+ "yellow": "Yellow text",
39
+ "green": "Green text",
40
+ "blue": "Blue text",
41
+ "purple": "Purple text",
42
+ "pink": "Pink text",
43
+ "red": "Red text"
44
+ }
45
+ },
46
+ "highlight": {
47
+ "label": "Highlight",
48
+ "toggle": "Toggle highlight ({{color}})",
49
+ "remove": "Remove highlight",
50
+ "colors": {
51
+ "default": "Default background",
52
+ "gray": "Gray background",
53
+ "brown": "Brown background",
54
+ "orange": "Orange background",
55
+ "yellow": "Yellow background",
56
+ "green": "Green background",
57
+ "blue": "Blue background",
58
+ "purple": "Purple background",
59
+ "pink": "Pink background",
60
+ "red": "Red background"
61
+ }
62
+ },
47
63
  "link": {
48
64
  "label": "Link",
49
65
  "placeholder": "Paste a link...",
@@ -57,13 +73,26 @@ declare const _default: {
57
73
  "right": "Align right",
58
74
  "justify": "Align justify"
59
75
  },
60
- "image": {
61
- "label": "Add image"
62
- },
63
- "ai": {
64
- "label": "AI Assistant",
65
- "placeholder": "Ask AI to write something...",
66
- "apiKeyPlaceholder": "sk-...",
76
+ "image": {
77
+ "label": "Add image"
78
+ },
79
+ "table": {
80
+ "insertTable": "Insert table",
81
+ "size": "{{cols}} x {{rows}}",
82
+ "addColumnBefore": "Add column before",
83
+ "addColumnAfter": "Add column after",
84
+ "deleteColumn": "Delete column",
85
+ "addRowBefore": "Add row before",
86
+ "addRowAfter": "Add row after",
87
+ "deleteRow": "Delete row",
88
+ "mergeCells": "Merge cells",
89
+ "splitCell": "Split cell",
90
+ "deleteTable": "Delete table"
91
+ },
92
+ "ai": {
93
+ "label": "AI Assistant",
94
+ "placeholder": "Ask AI to write something...",
95
+ "apiKeyPlaceholder": "sk-...",
67
96
  "generate": "Generate",
68
97
  "generating": "Generating...",
69
98
  "insert": "Insert",
@@ -18,32 +18,48 @@ declare const _default: {
18
18
  },
19
19
  "blockquote": "引用",
20
20
  "codeBlock": "代码块",
21
- "marks": {
22
- "bold": "粗体",
23
- "italic": "斜体",
24
- "strike": "删除线",
25
- "code": "行内代码",
26
- "underline": "下划线",
27
- "superscript": "上标",
28
- "subscript": "下标"
29
- },
30
- "highlight": {
31
- "label": "高亮",
32
- "toggle": "切换高亮 ({{color}})",
33
- "remove": "移除高亮",
34
- "colors": {
35
- "default": "默认背景",
36
- "gray": "灰色背景",
37
- "brown": "棕色背景",
38
- "orange": "橙色背景",
39
- "yellow": "黄色背景",
40
- "green": "绿色背景",
41
- "blue": "蓝色背景",
42
- "purple": "紫色背景",
43
- "pink": "粉色背景",
44
- "red": "红色背景"
45
- }
46
- },
21
+ "marks": {
22
+ "bold": "粗体",
23
+ "italic": "斜体",
24
+ "strike": "删除线",
25
+ "code": "行内代码",
26
+ "underline": "下划线",
27
+ "superscript": "上标",
28
+ "subscript": "下标"
29
+ },
30
+ "textColor": {
31
+ "label": "文字颜色",
32
+ "toggle": "设置文字颜色 ({{color}})",
33
+ "remove": "清除文字颜色",
34
+ "colors": {
35
+ "gray": "灰色文字",
36
+ "brown": "棕色文字",
37
+ "orange": "橙色文字",
38
+ "yellow": "黄色文字",
39
+ "green": "绿色文字",
40
+ "blue": "蓝色文字",
41
+ "purple": "紫色文字",
42
+ "pink": "粉色文字",
43
+ "red": "红色文字"
44
+ }
45
+ },
46
+ "highlight": {
47
+ "label": "高亮",
48
+ "toggle": "切换高亮 ({{color}})",
49
+ "remove": "移除高亮",
50
+ "colors": {
51
+ "default": "默认背景",
52
+ "gray": "灰色背景",
53
+ "brown": "棕色背景",
54
+ "orange": "橙色背景",
55
+ "yellow": "黄色背景",
56
+ "green": "绿色背景",
57
+ "blue": "蓝色背景",
58
+ "purple": "紫色背景",
59
+ "pink": "粉色背景",
60
+ "red": "红色背景"
61
+ }
62
+ },
47
63
  "link": {
48
64
  "label": "链接",
49
65
  "placeholder": "粘贴链接...",
@@ -57,13 +73,26 @@ declare const _default: {
57
73
  "right": "右对齐",
58
74
  "justify": "两端对齐"
59
75
  },
60
- "image": {
61
- "label": "添加图片"
62
- },
63
- "ai": {
64
- "label": "AI 助手",
65
- "placeholder": " AI 写点什么...",
66
- "apiKeyPlaceholder": "sk-...",
76
+ "image": {
77
+ "label": "添加图片"
78
+ },
79
+ "table": {
80
+ "insertTable": "插入表格",
81
+ "size": "{{cols}} x {{rows}}",
82
+ "addColumnBefore": "在左侧插入一列",
83
+ "addColumnAfter": "在右侧插入一列",
84
+ "deleteColumn": "删除列",
85
+ "addRowBefore": "在上方插入一行",
86
+ "addRowAfter": "在下方插入一行",
87
+ "deleteRow": "删除行",
88
+ "mergeCells": "合并单元格",
89
+ "splitCell": "拆分单元格",
90
+ "deleteTable": "删除表格"
91
+ },
92
+ "ai": {
93
+ "label": "AI 助手",
94
+ "placeholder": "让 AI 写点什么...",
95
+ "apiKeyPlaceholder": "sk-...",
67
96
  "generate": "生成",
68
97
  "generating": "生成中...",
69
98
  "insert": "插入",
@@ -1,6 +1,7 @@
1
1
  import { Level } from '../components/tiptap-ui/heading-button';
2
2
  import { ListType } from '../components/tiptap-ui/list-button';
3
3
  import { HighlightColor } from '../components/tiptap-ui/color-highlight-button';
4
+ import { TextColor } from '../components/tiptap-ui/text-color-button';
4
5
  import { ImageUploadProps } from './image-upload-handler';
5
6
  import { AiCompletionOptions } from './ai-service';
6
7
  export interface FeatureConfig<T = unknown> {
@@ -22,6 +23,9 @@ export interface HighlightConfig extends BaseButtonConfig {
22
23
  multicolor?: boolean;
23
24
  colors?: HighlightColor[];
24
25
  }
26
+ export interface TextColorConfig extends BaseButtonConfig {
27
+ colors?: TextColor[];
28
+ }
25
29
  export interface LinkConfig extends BaseButtonConfig {
26
30
  openOnClick?: boolean;
27
31
  enableClickSelection?: boolean;
@@ -111,6 +115,7 @@ export interface SimpleEditorFeatures {
111
115
  strike?: boolean | FeatureConfig<BaseButtonConfig>;
112
116
  code?: boolean | FeatureConfig<BaseButtonConfig>;
113
117
  underline?: boolean | FeatureConfig<BaseButtonConfig>;
118
+ textColor?: boolean | FeatureConfig<TextColorConfig>;
114
119
  highlight?: boolean | FeatureConfig<HighlightConfig>;
115
120
  link?: boolean | FeatureConfig<LinkConfig>;
116
121
  subscript?: boolean | FeatureConfig<BaseButtonConfig>;
@@ -1,3 +1,4 @@
1
+ import { UploadOptions } from '../components/tiptap-node/image-upload-node/image-upload-node';
1
2
  export type RequestMethod = "POST" | "PUT" | "PATCH" | "post" | "put" | "patch";
2
3
  export interface UploadRequestOption {
3
4
  action: string;
@@ -10,7 +11,7 @@ export interface UploadRequestOption {
10
11
  onSuccess: (body: unknown) => void;
11
12
  withCredentials?: boolean;
12
13
  }
13
- export interface ImageUploadProps {
14
+ export interface ImageUploadProps extends Partial<Omit<UploadOptions, "upload">> {
14
15
  /** Upload URL */
15
16
  action?: string | ((file: File) => Promise<string>);
16
17
  /** HTTP method */