@waline/client 2.11.2 → 2.12.0
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/api.cjs +1 -1
- package/dist/api.cjs.map +1 -1
- package/dist/api.d.cts +194 -0
- package/dist/api.d.mts +194 -0
- package/dist/api.d.ts +194 -0
- package/dist/api.mjs +1 -1
- package/dist/api.mjs.map +1 -1
- package/dist/comment.cjs +1 -1
- package/dist/comment.cjs.map +1 -1
- package/dist/comment.js +1 -1
- package/dist/comment.js.map +1 -1
- package/dist/comment.mjs +1 -1
- package/dist/comment.mjs.map +1 -1
- package/dist/component.mjs +1 -1
- package/dist/component.mjs.map +1 -1
- package/dist/legacy.umd.d.ts +57 -30
- package/dist/legacy.umd.js +1 -1
- package/dist/legacy.umd.js.map +1 -1
- package/dist/pageview.cjs +1 -1
- package/dist/pageview.cjs.map +1 -1
- package/dist/pageview.js +1 -1
- package/dist/pageview.js.map +1 -1
- package/dist/pageview.mjs +1 -1
- package/dist/pageview.mjs.map +1 -1
- package/dist/shim.cjs +1 -1
- package/dist/shim.cjs.map +1 -1
- package/dist/shim.d.cts +58 -31
- package/dist/shim.d.mts +58 -31
- package/dist/shim.mjs +1 -1
- package/dist/shim.mjs.map +1 -1
- package/dist/waline.cjs +1 -1
- package/dist/waline.cjs.map +1 -1
- package/dist/waline.d.cts +58 -31
- package/dist/waline.d.mts +58 -31
- package/dist/waline.d.ts +58 -31
- package/dist/waline.js +1 -1
- package/dist/waline.js.map +1 -1
- package/dist/waline.mjs +1 -1
- package/dist/waline.mjs.map +1 -1
- package/package.json +22 -20
- package/src/compact/convert.ts +2 -2
- package/src/components/ArticleReaction.vue +36 -24
- package/src/components/CommentBox.vue +6 -5
- package/src/components/ImageWall.vue +7 -2
- package/src/composables/vote.ts +5 -2
- package/src/config/default.ts +45 -83
- package/src/entrys/api.ts +1 -1
- package/src/typings/base.ts +33 -7
- package/src/typings/locale.ts +37 -23
- package/src/utils/config.ts +10 -4
- package/LICENSE +0 -339
package/dist/legacy.umd.d.ts
CHANGED
|
@@ -36,39 +36,64 @@ interface WalineEmojiInfo {
|
|
|
36
36
|
*/
|
|
37
37
|
items: string[];
|
|
38
38
|
}
|
|
39
|
-
interface
|
|
39
|
+
interface WalineSearchImageData extends Record<string, unknown> {
|
|
40
40
|
/**
|
|
41
|
+
* 图片链接
|
|
42
|
+
*
|
|
41
43
|
* Image link
|
|
42
44
|
*/
|
|
43
45
|
src: string;
|
|
44
46
|
/**
|
|
45
|
-
*
|
|
47
|
+
* 图片标题
|
|
48
|
+
*
|
|
49
|
+
* @description 用于图片的 alt 属性
|
|
50
|
+
*
|
|
51
|
+
* Image title
|
|
52
|
+
*
|
|
53
|
+
* @description Used for alt attribute of image
|
|
46
54
|
*/
|
|
47
55
|
title?: string;
|
|
48
56
|
/**
|
|
49
|
-
*
|
|
57
|
+
* 图片缩略图
|
|
58
|
+
*
|
|
59
|
+
* @description 为了更好的加载性能,我们会优先在列表中使用此缩略图
|
|
60
|
+
*
|
|
61
|
+
* Image preview link
|
|
62
|
+
*
|
|
63
|
+
* @description For better loading performance, we will use this thumbnail first in the list
|
|
50
64
|
*
|
|
51
65
|
* @default src
|
|
52
66
|
*/
|
|
53
67
|
preview?: string;
|
|
54
68
|
}
|
|
69
|
+
declare type WalineSearchResult = WalineSearchImageData[];
|
|
55
70
|
interface WalineSearchOptions {
|
|
56
71
|
/**
|
|
72
|
+
* 搜索操作
|
|
73
|
+
*
|
|
57
74
|
* Search action
|
|
58
75
|
*/
|
|
59
|
-
search: (word: string) => Promise<WalineSearchResult
|
|
76
|
+
search: (word: string) => Promise<WalineSearchResult>;
|
|
60
77
|
/**
|
|
61
|
-
*
|
|
78
|
+
* 打开列表时展示的默认结果
|
|
79
|
+
*
|
|
80
|
+
* Default result when opening list
|
|
62
81
|
*
|
|
63
82
|
* @default () => search('')
|
|
64
83
|
*/
|
|
65
|
-
default?: () => Promise<WalineSearchResult
|
|
84
|
+
default?: () => Promise<WalineSearchResult>;
|
|
66
85
|
/**
|
|
86
|
+
* 获取更多的操作
|
|
87
|
+
*
|
|
88
|
+
* @description 会在列表滚动到底部时触发,如果你的搜索服务支持分页功能,你应该设置此项实现无限滚动
|
|
89
|
+
*
|
|
67
90
|
* Fetch more action
|
|
68
91
|
*
|
|
92
|
+
* @description It will be triggered when the list scrolls to the bottom. If your search service supports paging, you should set this to achieve infinite scrolling
|
|
93
|
+
*
|
|
69
94
|
* @default (word) => search(word)
|
|
70
95
|
*/
|
|
71
|
-
more?: (word: string, currectCount: number) => Promise<WalineSearchResult
|
|
96
|
+
more?: (word: string, currectCount: number) => Promise<WalineSearchResult>;
|
|
72
97
|
}
|
|
73
98
|
declare type WalineMeta = 'nick' | 'mail' | 'link';
|
|
74
99
|
declare type WalineImageUploader = (image: File) => Promise<string>;
|
|
@@ -83,37 +108,37 @@ interface WalineDateLocale {
|
|
|
83
108
|
now: string;
|
|
84
109
|
}
|
|
85
110
|
declare type WalineLevelLocale = Record<`level${number}`, string>;
|
|
86
|
-
interface
|
|
111
|
+
interface WalineReactionLocale {
|
|
112
|
+
reactionTitle: string;
|
|
113
|
+
reaction0: string;
|
|
114
|
+
reaction1: string;
|
|
115
|
+
reaction2: string;
|
|
116
|
+
reaction3: string;
|
|
117
|
+
reaction4: string;
|
|
118
|
+
reaction5: string;
|
|
119
|
+
reaction6: string;
|
|
120
|
+
reaction7: string;
|
|
121
|
+
reaction8: string;
|
|
122
|
+
}
|
|
123
|
+
interface WalineLocale extends WalineDateLocale, WalineLevelLocale, WalineReactionLocale {
|
|
87
124
|
nick: string;
|
|
88
|
-
nickError: string;
|
|
89
125
|
mail: string;
|
|
90
|
-
mailError: string;
|
|
91
126
|
link: string;
|
|
92
127
|
optional: string;
|
|
93
128
|
placeholder: string;
|
|
94
129
|
sofa: string;
|
|
95
130
|
submit: string;
|
|
96
|
-
like: string;
|
|
97
|
-
cancelLike: string;
|
|
98
|
-
reply: string;
|
|
99
|
-
cancelReply: string;
|
|
100
131
|
comment: string;
|
|
101
132
|
refresh: string;
|
|
102
133
|
more: string;
|
|
103
|
-
preview: string;
|
|
104
|
-
emoji: string;
|
|
105
|
-
uploadImage: string;
|
|
106
134
|
uploading: string;
|
|
107
135
|
login: string;
|
|
108
|
-
logout: string;
|
|
109
136
|
admin: string;
|
|
110
137
|
sticky: string;
|
|
111
138
|
word: string;
|
|
112
|
-
wordHint: string;
|
|
113
139
|
anonymous: string;
|
|
114
140
|
gif: string;
|
|
115
141
|
gifSearchPlaceholder: string;
|
|
116
|
-
profile: string;
|
|
117
142
|
approved: string;
|
|
118
143
|
waiting: string;
|
|
119
144
|
spam: string;
|
|
@@ -121,16 +146,18 @@ interface WalineLocale extends WalineDateLocale, WalineLevelLocale {
|
|
|
121
146
|
oldest: string;
|
|
122
147
|
latest: string;
|
|
123
148
|
hottest: string;
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
149
|
+
nickError: string;
|
|
150
|
+
mailError: string;
|
|
151
|
+
wordHint: string;
|
|
152
|
+
like: string;
|
|
153
|
+
cancelLike: string;
|
|
154
|
+
reply: string;
|
|
155
|
+
cancelReply: string;
|
|
156
|
+
preview: string;
|
|
157
|
+
emoji: string;
|
|
158
|
+
uploadImage: string;
|
|
159
|
+
profile: string;
|
|
160
|
+
logout: string;
|
|
134
161
|
}
|
|
135
162
|
|
|
136
163
|
interface WalineProps {
|