zs_library 0.7.8 → 0.7.10
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/components/desktop/modal/base-modal.d.ts +1 -0
- package/dist/components/md-editor/editor.d.ts +1 -0
- package/dist/components/md-editor/index.d.ts +1 -0
- package/dist/components/tiptap-editor/simple/components/tiptap-node/code-block-node/code-block-node-view.d.ts +2 -0
- package/dist/components/tiptap-editor/simple/components/tiptap-node/table-node/table-menu.d.ts +6 -0
- package/dist/components/tiptap-editor/simple/components/tiptap-node/table-node/table-node-extension.d.ts +2 -0
- package/dist/components/tiptap-editor/simple/components/tiptap-ui/blockquote-button/use-blockquote.d.ts +1 -1
- package/dist/components/tiptap-editor/simple/components/tiptap-ui/code-block-button/use-code-block.d.ts +1 -1
- package/dist/components/tiptap-editor/simple/components/tiptap-ui/image-upload-button/image-upload-button.d.ts +1 -1
- package/dist/components/tiptap-editor/simple/components/tiptap-ui/table-trigger-button/index.d.ts +2 -0
- package/dist/components/tiptap-editor/simple/components/tiptap-ui/table-trigger-button/table-trigger-button.d.ts +8 -0
- package/dist/components/tiptap-editor/simple/components/tiptap-ui/table-trigger-button/use-table-trigger-button.d.ts +16 -0
- package/dist/components/tiptap-editor/simple/components/tiptap-ui/text-color-button/index.d.ts +2 -0
- package/dist/components/tiptap-editor/simple/components/tiptap-ui/text-color-button/text-color-button.d.ts +6 -0
- package/dist/components/tiptap-editor/simple/components/tiptap-ui/text-color-button/use-text-color.d.ts +103 -0
- package/dist/components/tiptap-editor/simple/components/tiptap-ui/text-color-popover/index.d.ts +1 -0
- package/dist/components/tiptap-editor/simple/components/tiptap-ui/text-color-popover/text-color-popover.d.ts +14 -0
- package/dist/components/tiptap-editor/simple/i18n/en-US.json.d.ts +134 -104
- package/dist/components/tiptap-editor/simple/i18n/zh-CN.json.d.ts +134 -104
- package/dist/components/tiptap-editor/simple/lib/feature-utils.d.ts +5 -0
- package/dist/components/tiptap-editor/simple/lib/image-upload-handler.d.ts +2 -1
- package/dist/components/tiptap-editor/simple/simple-editor.d.ts +1 -0
- package/dist/components/tiptap-editor/simple/use-simple-editor.d.ts +2 -1
- package/dist/i18n/locales/en-US.d.ts +0 -8
- package/dist/i18n/locales/zh-CN.d.ts +0 -8
- package/dist/index.css +10 -1
- package/dist/index.js +5612 -3740
- package/package.json +8 -1
- package/dist/components/tiptap-editor/simple/components/tiptap-icons/arrow-left-icon.d.ts +0 -3
- package/dist/components/tiptap-editor/simple/components/tiptap-icons/blockquote-icon.d.ts +0 -3
- package/dist/components/tiptap-editor/simple/components/tiptap-icons/chevron-down-icon.d.ts +0 -3
- package/dist/components/tiptap-editor/simple/components/tiptap-icons/close-icon.d.ts +0 -3
- package/dist/components/tiptap-editor/simple/components/tiptap-icons/code-block-icon.d.ts +0 -3
- package/dist/components/tiptap-editor/simple/components/tiptap-icons/corner-down-left-icon.d.ts +0 -3
- package/dist/components/tiptap-editor/simple/components/tiptap-icons/external-link-icon.d.ts +0 -3
- package/dist/components/tiptap-editor/simple/components/tiptap-icons/trash-icon.d.ts +0 -3
|
@@ -1,107 +1,137 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
"editor": {
|
|
3
|
-
"contentAriaLabel": "主要内容区域,开始输入文字。"
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
"gray": "
|
|
37
|
-
"brown": "
|
|
38
|
-
"orange": "
|
|
39
|
-
"yellow": "
|
|
40
|
-
"green": "
|
|
41
|
-
"blue": "
|
|
42
|
-
"purple": "
|
|
43
|
-
"pink": "
|
|
44
|
-
"red": "
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
"
|
|
48
|
-
"label": "
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
"
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
"
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
"
|
|
97
|
-
"
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
"
|
|
101
|
-
"
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}
|
|
1
|
+
declare const _default: {
|
|
2
|
+
"editor": {
|
|
3
|
+
"contentAriaLabel": "主要内容区域,开始输入文字。",
|
|
4
|
+
"placeholder": "写点什么…"
|
|
5
|
+
},
|
|
6
|
+
"toolbar": {
|
|
7
|
+
"add": "添加",
|
|
8
|
+
"undo": "撤销",
|
|
9
|
+
"redo": "重做",
|
|
10
|
+
"heading": {
|
|
11
|
+
"label": "标题",
|
|
12
|
+
"level": "标题 {{level}}"
|
|
13
|
+
},
|
|
14
|
+
"list": {
|
|
15
|
+
"label": "列表",
|
|
16
|
+
"bullet": "无序列表",
|
|
17
|
+
"ordered": "有序列表",
|
|
18
|
+
"task": "任务列表"
|
|
19
|
+
},
|
|
20
|
+
"blockquote": "引用",
|
|
21
|
+
"codeBlock": "代码块",
|
|
22
|
+
"marks": {
|
|
23
|
+
"bold": "粗体",
|
|
24
|
+
"italic": "斜体",
|
|
25
|
+
"strike": "删除线",
|
|
26
|
+
"code": "行内代码",
|
|
27
|
+
"underline": "下划线",
|
|
28
|
+
"superscript": "上标",
|
|
29
|
+
"subscript": "下标"
|
|
30
|
+
},
|
|
31
|
+
"textColor": {
|
|
32
|
+
"label": "文字颜色",
|
|
33
|
+
"toggle": "设置文字颜色 ({{color}})",
|
|
34
|
+
"remove": "清除文字颜色",
|
|
35
|
+
"colors": {
|
|
36
|
+
"gray": "灰色文字",
|
|
37
|
+
"brown": "棕色文字",
|
|
38
|
+
"orange": "橙色文字",
|
|
39
|
+
"yellow": "黄色文字",
|
|
40
|
+
"green": "绿色文字",
|
|
41
|
+
"blue": "蓝色文字",
|
|
42
|
+
"purple": "紫色文字",
|
|
43
|
+
"pink": "粉色文字",
|
|
44
|
+
"red": "红色文字"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"highlight": {
|
|
48
|
+
"label": "高亮",
|
|
49
|
+
"toggle": "切换高亮 ({{color}})",
|
|
50
|
+
"remove": "移除高亮",
|
|
51
|
+
"colors": {
|
|
52
|
+
"default": "默认背景",
|
|
53
|
+
"gray": "灰色背景",
|
|
54
|
+
"brown": "棕色背景",
|
|
55
|
+
"orange": "橙色背景",
|
|
56
|
+
"yellow": "黄色背景",
|
|
57
|
+
"green": "绿色背景",
|
|
58
|
+
"blue": "蓝色背景",
|
|
59
|
+
"purple": "紫色背景",
|
|
60
|
+
"pink": "粉色背景",
|
|
61
|
+
"red": "红色背景"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"link": {
|
|
65
|
+
"label": "链接",
|
|
66
|
+
"placeholder": "粘贴链接...",
|
|
67
|
+
"apply": "应用链接",
|
|
68
|
+
"open": "在新窗口打开",
|
|
69
|
+
"remove": "移除链接"
|
|
70
|
+
},
|
|
71
|
+
"align": {
|
|
72
|
+
"left": "左对齐",
|
|
73
|
+
"center": "居中对齐",
|
|
74
|
+
"right": "右对齐",
|
|
75
|
+
"justify": "两端对齐"
|
|
76
|
+
},
|
|
77
|
+
"image": {
|
|
78
|
+
"label": "添加图片"
|
|
79
|
+
},
|
|
80
|
+
"table": {
|
|
81
|
+
"insertTable": "插入表格",
|
|
82
|
+
"size": "{{cols}} x {{rows}}",
|
|
83
|
+
"addColumnBefore": "在左侧插入一列",
|
|
84
|
+
"addColumnAfter": "在右侧插入一列",
|
|
85
|
+
"deleteColumn": "删除列",
|
|
86
|
+
"addRowBefore": "在上方插入一行",
|
|
87
|
+
"addRowAfter": "在下方插入一行",
|
|
88
|
+
"deleteRow": "删除行",
|
|
89
|
+
"mergeCells": "合并单元格",
|
|
90
|
+
"splitCell": "拆分单元格",
|
|
91
|
+
"deleteTable": "删除表格"
|
|
92
|
+
},
|
|
93
|
+
"ai": {
|
|
94
|
+
"label": "AI 助手",
|
|
95
|
+
"placeholder": "让 AI 写点什么...",
|
|
96
|
+
"apiKeyPlaceholder": "sk-...",
|
|
97
|
+
"generate": "生成",
|
|
98
|
+
"generating": "生成中...",
|
|
99
|
+
"insert": "插入",
|
|
100
|
+
"replace": "替换选中内容",
|
|
101
|
+
"apiKeyLabel": "API Key (DeepSeek)",
|
|
102
|
+
"promptLabel": "提示词",
|
|
103
|
+
"error": "生成失败",
|
|
104
|
+
"optimizeSelection": "选中内容: {{text}}",
|
|
105
|
+
"isWriting": "AI 正在写作",
|
|
106
|
+
"refinePlaceholder": "告诉 AI 还需要修改什么...",
|
|
107
|
+
"tryAgain": "重试",
|
|
108
|
+
"discard": "放弃",
|
|
109
|
+
"apply": "应用",
|
|
110
|
+
"presets": {
|
|
111
|
+
"edit": "编辑",
|
|
112
|
+
"improve": "润色",
|
|
113
|
+
"fix": "修复拼写和语法",
|
|
114
|
+
"shorter": "缩短",
|
|
115
|
+
"longer": "扩写"
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"imageUpload": {
|
|
120
|
+
"clickToUpload": "点击上传",
|
|
121
|
+
"dragAndDrop": "或拖拽上传",
|
|
122
|
+
"limitInfo": "最多 {{limit}} 个文件,每个 {{size}}MB。",
|
|
123
|
+
"uploading": "正在上传 {{count}} 个文件",
|
|
124
|
+
"clearAll": "全部清除",
|
|
125
|
+
"errors": {
|
|
126
|
+
"tooLarge": "文件大小超过限制 ({{size}}MB)",
|
|
127
|
+
"limitExceeded": "最多允许 {{limit}} 个文件",
|
|
128
|
+
"noFile": "未选择文件",
|
|
129
|
+
"noFiles": "没有可上传的文件",
|
|
130
|
+
"uploadFailed": "上传失败",
|
|
131
|
+
"noUrl": "上传失败:未返回 URL"
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
105
135
|
;
|
|
106
136
|
|
|
107
137
|
export default _default;
|
|
@@ -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 */
|
|
@@ -4,6 +4,7 @@ import { EditorOutputFormat } from './lib/format-utils';
|
|
|
4
4
|
export interface SimpleEditorProps {
|
|
5
5
|
value?: string | JSONContent;
|
|
6
6
|
onChange?: (value: string | JSONContent) => void;
|
|
7
|
+
placeholder?: string;
|
|
7
8
|
className?: string;
|
|
8
9
|
style?: React.CSSProperties;
|
|
9
10
|
features?: SimpleEditorFeatures;
|
|
@@ -4,7 +4,8 @@ import { EditorOutputFormat } from './lib/format-utils';
|
|
|
4
4
|
export interface UseSimpleEditorProps {
|
|
5
5
|
value?: string | JSONContent;
|
|
6
6
|
onChange?: (value: string | JSONContent) => void;
|
|
7
|
+
placeholder?: string;
|
|
7
8
|
features?: SimpleEditorFeatures;
|
|
8
9
|
output?: EditorOutputFormat;
|
|
9
10
|
}
|
|
10
|
-
export declare function useSimpleEditor({ value, onChange, features, output }: UseSimpleEditorProps): import('@tiptap/core').Editor | null;
|
|
11
|
+
export declare function useSimpleEditor({ value, onChange, placeholder, features, output }: UseSimpleEditorProps): import('@tiptap/core').Editor | null;
|