@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/shim.d.cts
CHANGED
|
@@ -37,39 +37,64 @@ interface WalineEmojiInfo {
|
|
|
37
37
|
items: string[];
|
|
38
38
|
}
|
|
39
39
|
declare type WalineEmojiMaps = Record<string, string>;
|
|
40
|
-
interface
|
|
40
|
+
interface WalineSearchImageData extends Record<string, unknown> {
|
|
41
41
|
/**
|
|
42
|
+
* 图片链接
|
|
43
|
+
*
|
|
42
44
|
* Image link
|
|
43
45
|
*/
|
|
44
46
|
src: string;
|
|
45
47
|
/**
|
|
46
|
-
*
|
|
48
|
+
* 图片标题
|
|
49
|
+
*
|
|
50
|
+
* @description 用于图片的 alt 属性
|
|
51
|
+
*
|
|
52
|
+
* Image title
|
|
53
|
+
*
|
|
54
|
+
* @description Used for alt attribute of image
|
|
47
55
|
*/
|
|
48
56
|
title?: string;
|
|
49
57
|
/**
|
|
50
|
-
*
|
|
58
|
+
* 图片缩略图
|
|
59
|
+
*
|
|
60
|
+
* @description 为了更好的加载性能,我们会优先在列表中使用此缩略图
|
|
61
|
+
*
|
|
62
|
+
* Image preview link
|
|
63
|
+
*
|
|
64
|
+
* @description For better loading performance, we will use this thumbnail first in the list
|
|
51
65
|
*
|
|
52
66
|
* @default src
|
|
53
67
|
*/
|
|
54
68
|
preview?: string;
|
|
55
69
|
}
|
|
70
|
+
declare type WalineSearchResult = WalineSearchImageData[];
|
|
56
71
|
interface WalineSearchOptions {
|
|
57
72
|
/**
|
|
73
|
+
* 搜索操作
|
|
74
|
+
*
|
|
58
75
|
* Search action
|
|
59
76
|
*/
|
|
60
|
-
search: (word: string) => Promise<WalineSearchResult
|
|
77
|
+
search: (word: string) => Promise<WalineSearchResult>;
|
|
61
78
|
/**
|
|
62
|
-
*
|
|
79
|
+
* 打开列表时展示的默认结果
|
|
80
|
+
*
|
|
81
|
+
* Default result when opening list
|
|
63
82
|
*
|
|
64
83
|
* @default () => search('')
|
|
65
84
|
*/
|
|
66
|
-
default?: () => Promise<WalineSearchResult
|
|
85
|
+
default?: () => Promise<WalineSearchResult>;
|
|
67
86
|
/**
|
|
87
|
+
* 获取更多的操作
|
|
88
|
+
*
|
|
89
|
+
* @description 会在列表滚动到底部时触发,如果你的搜索服务支持分页功能,你应该设置此项实现无限滚动
|
|
90
|
+
*
|
|
68
91
|
* Fetch more action
|
|
69
92
|
*
|
|
93
|
+
* @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
|
|
94
|
+
*
|
|
70
95
|
* @default (word) => search(word)
|
|
71
96
|
*/
|
|
72
|
-
more?: (word: string, currectCount: number) => Promise<WalineSearchResult
|
|
97
|
+
more?: (word: string, currectCount: number) => Promise<WalineSearchResult>;
|
|
73
98
|
}
|
|
74
99
|
declare type WalineMeta = 'nick' | 'mail' | 'link';
|
|
75
100
|
declare type WalineImageUploader = (image: File) => Promise<string>;
|
|
@@ -160,37 +185,37 @@ interface WalineDateLocale {
|
|
|
160
185
|
now: string;
|
|
161
186
|
}
|
|
162
187
|
declare type WalineLevelLocale = Record<`level${number}`, string>;
|
|
163
|
-
interface
|
|
188
|
+
interface WalineReactionLocale {
|
|
189
|
+
reactionTitle: string;
|
|
190
|
+
reaction0: string;
|
|
191
|
+
reaction1: string;
|
|
192
|
+
reaction2: string;
|
|
193
|
+
reaction3: string;
|
|
194
|
+
reaction4: string;
|
|
195
|
+
reaction5: string;
|
|
196
|
+
reaction6: string;
|
|
197
|
+
reaction7: string;
|
|
198
|
+
reaction8: string;
|
|
199
|
+
}
|
|
200
|
+
interface WalineLocale extends WalineDateLocale, WalineLevelLocale, WalineReactionLocale {
|
|
164
201
|
nick: string;
|
|
165
|
-
nickError: string;
|
|
166
202
|
mail: string;
|
|
167
|
-
mailError: string;
|
|
168
203
|
link: string;
|
|
169
204
|
optional: string;
|
|
170
205
|
placeholder: string;
|
|
171
206
|
sofa: string;
|
|
172
207
|
submit: string;
|
|
173
|
-
like: string;
|
|
174
|
-
cancelLike: string;
|
|
175
|
-
reply: string;
|
|
176
|
-
cancelReply: string;
|
|
177
208
|
comment: string;
|
|
178
209
|
refresh: string;
|
|
179
210
|
more: string;
|
|
180
|
-
preview: string;
|
|
181
|
-
emoji: string;
|
|
182
|
-
uploadImage: string;
|
|
183
211
|
uploading: string;
|
|
184
212
|
login: string;
|
|
185
|
-
logout: string;
|
|
186
213
|
admin: string;
|
|
187
214
|
sticky: string;
|
|
188
215
|
word: string;
|
|
189
|
-
wordHint: string;
|
|
190
216
|
anonymous: string;
|
|
191
217
|
gif: string;
|
|
192
218
|
gifSearchPlaceholder: string;
|
|
193
|
-
profile: string;
|
|
194
219
|
approved: string;
|
|
195
220
|
waiting: string;
|
|
196
221
|
spam: string;
|
|
@@ -198,16 +223,18 @@ interface WalineLocale extends WalineDateLocale, WalineLevelLocale {
|
|
|
198
223
|
oldest: string;
|
|
199
224
|
latest: string;
|
|
200
225
|
hottest: string;
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
226
|
+
nickError: string;
|
|
227
|
+
mailError: string;
|
|
228
|
+
wordHint: string;
|
|
229
|
+
like: string;
|
|
230
|
+
cancelLike: string;
|
|
231
|
+
reply: string;
|
|
232
|
+
cancelReply: string;
|
|
233
|
+
preview: string;
|
|
234
|
+
emoji: string;
|
|
235
|
+
uploadImage: string;
|
|
236
|
+
profile: string;
|
|
237
|
+
logout: string;
|
|
211
238
|
}
|
|
212
239
|
|
|
213
240
|
interface WalineProps {
|
|
@@ -601,4 +628,4 @@ interface WalineRecentCommentsResult {
|
|
|
601
628
|
}
|
|
602
629
|
declare const RecentComments: ({ el, serverURL, count, lang, }: WalineRecentCommentsOptions) => Promise<WalineRecentCommentsResult>;
|
|
603
630
|
|
|
604
|
-
export { RecentComments, WalineAbort, WalineComment, WalineCommentCountOptions, WalineCommentData, WalineCommentStatus, WalineDateLocale, WalineEmojiInfo, WalineEmojiMaps, WalineHighlighter, WalineImageUploader, WalineInitOptions, WalineInstance, WalineLevelLocale, WalineLocale, WalineMeta, WalinePageviewCountOptions, WalineProps, WalineRecentCommentsOptions, WalineRecentCommentsResult, WalineSearchOptions, WalineSearchResult, WalineTexRenderer, commentCount, defaultLocales, init, pageviewCount, version };
|
|
631
|
+
export { RecentComments, WalineAbort, WalineComment, WalineCommentCountOptions, WalineCommentData, WalineCommentStatus, WalineDateLocale, WalineEmojiInfo, WalineEmojiMaps, WalineHighlighter, WalineImageUploader, WalineInitOptions, WalineInstance, WalineLevelLocale, WalineLocale, WalineMeta, WalinePageviewCountOptions, WalineProps, WalineReactionLocale, WalineRecentCommentsOptions, WalineRecentCommentsResult, WalineSearchImageData, WalineSearchOptions, WalineSearchResult, WalineTexRenderer, commentCount, defaultLocales, init, pageviewCount, version };
|
package/dist/shim.d.mts
CHANGED
|
@@ -37,39 +37,64 @@ interface WalineEmojiInfo {
|
|
|
37
37
|
items: string[];
|
|
38
38
|
}
|
|
39
39
|
declare type WalineEmojiMaps = Record<string, string>;
|
|
40
|
-
interface
|
|
40
|
+
interface WalineSearchImageData extends Record<string, unknown> {
|
|
41
41
|
/**
|
|
42
|
+
* 图片链接
|
|
43
|
+
*
|
|
42
44
|
* Image link
|
|
43
45
|
*/
|
|
44
46
|
src: string;
|
|
45
47
|
/**
|
|
46
|
-
*
|
|
48
|
+
* 图片标题
|
|
49
|
+
*
|
|
50
|
+
* @description 用于图片的 alt 属性
|
|
51
|
+
*
|
|
52
|
+
* Image title
|
|
53
|
+
*
|
|
54
|
+
* @description Used for alt attribute of image
|
|
47
55
|
*/
|
|
48
56
|
title?: string;
|
|
49
57
|
/**
|
|
50
|
-
*
|
|
58
|
+
* 图片缩略图
|
|
59
|
+
*
|
|
60
|
+
* @description 为了更好的加载性能,我们会优先在列表中使用此缩略图
|
|
61
|
+
*
|
|
62
|
+
* Image preview link
|
|
63
|
+
*
|
|
64
|
+
* @description For better loading performance, we will use this thumbnail first in the list
|
|
51
65
|
*
|
|
52
66
|
* @default src
|
|
53
67
|
*/
|
|
54
68
|
preview?: string;
|
|
55
69
|
}
|
|
70
|
+
declare type WalineSearchResult = WalineSearchImageData[];
|
|
56
71
|
interface WalineSearchOptions {
|
|
57
72
|
/**
|
|
73
|
+
* 搜索操作
|
|
74
|
+
*
|
|
58
75
|
* Search action
|
|
59
76
|
*/
|
|
60
|
-
search: (word: string) => Promise<WalineSearchResult
|
|
77
|
+
search: (word: string) => Promise<WalineSearchResult>;
|
|
61
78
|
/**
|
|
62
|
-
*
|
|
79
|
+
* 打开列表时展示的默认结果
|
|
80
|
+
*
|
|
81
|
+
* Default result when opening list
|
|
63
82
|
*
|
|
64
83
|
* @default () => search('')
|
|
65
84
|
*/
|
|
66
|
-
default?: () => Promise<WalineSearchResult
|
|
85
|
+
default?: () => Promise<WalineSearchResult>;
|
|
67
86
|
/**
|
|
87
|
+
* 获取更多的操作
|
|
88
|
+
*
|
|
89
|
+
* @description 会在列表滚动到底部时触发,如果你的搜索服务支持分页功能,你应该设置此项实现无限滚动
|
|
90
|
+
*
|
|
68
91
|
* Fetch more action
|
|
69
92
|
*
|
|
93
|
+
* @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
|
|
94
|
+
*
|
|
70
95
|
* @default (word) => search(word)
|
|
71
96
|
*/
|
|
72
|
-
more?: (word: string, currectCount: number) => Promise<WalineSearchResult
|
|
97
|
+
more?: (word: string, currectCount: number) => Promise<WalineSearchResult>;
|
|
73
98
|
}
|
|
74
99
|
declare type WalineMeta = 'nick' | 'mail' | 'link';
|
|
75
100
|
declare type WalineImageUploader = (image: File) => Promise<string>;
|
|
@@ -160,37 +185,37 @@ interface WalineDateLocale {
|
|
|
160
185
|
now: string;
|
|
161
186
|
}
|
|
162
187
|
declare type WalineLevelLocale = Record<`level${number}`, string>;
|
|
163
|
-
interface
|
|
188
|
+
interface WalineReactionLocale {
|
|
189
|
+
reactionTitle: string;
|
|
190
|
+
reaction0: string;
|
|
191
|
+
reaction1: string;
|
|
192
|
+
reaction2: string;
|
|
193
|
+
reaction3: string;
|
|
194
|
+
reaction4: string;
|
|
195
|
+
reaction5: string;
|
|
196
|
+
reaction6: string;
|
|
197
|
+
reaction7: string;
|
|
198
|
+
reaction8: string;
|
|
199
|
+
}
|
|
200
|
+
interface WalineLocale extends WalineDateLocale, WalineLevelLocale, WalineReactionLocale {
|
|
164
201
|
nick: string;
|
|
165
|
-
nickError: string;
|
|
166
202
|
mail: string;
|
|
167
|
-
mailError: string;
|
|
168
203
|
link: string;
|
|
169
204
|
optional: string;
|
|
170
205
|
placeholder: string;
|
|
171
206
|
sofa: string;
|
|
172
207
|
submit: string;
|
|
173
|
-
like: string;
|
|
174
|
-
cancelLike: string;
|
|
175
|
-
reply: string;
|
|
176
|
-
cancelReply: string;
|
|
177
208
|
comment: string;
|
|
178
209
|
refresh: string;
|
|
179
210
|
more: string;
|
|
180
|
-
preview: string;
|
|
181
|
-
emoji: string;
|
|
182
|
-
uploadImage: string;
|
|
183
211
|
uploading: string;
|
|
184
212
|
login: string;
|
|
185
|
-
logout: string;
|
|
186
213
|
admin: string;
|
|
187
214
|
sticky: string;
|
|
188
215
|
word: string;
|
|
189
|
-
wordHint: string;
|
|
190
216
|
anonymous: string;
|
|
191
217
|
gif: string;
|
|
192
218
|
gifSearchPlaceholder: string;
|
|
193
|
-
profile: string;
|
|
194
219
|
approved: string;
|
|
195
220
|
waiting: string;
|
|
196
221
|
spam: string;
|
|
@@ -198,16 +223,18 @@ interface WalineLocale extends WalineDateLocale, WalineLevelLocale {
|
|
|
198
223
|
oldest: string;
|
|
199
224
|
latest: string;
|
|
200
225
|
hottest: string;
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
226
|
+
nickError: string;
|
|
227
|
+
mailError: string;
|
|
228
|
+
wordHint: string;
|
|
229
|
+
like: string;
|
|
230
|
+
cancelLike: string;
|
|
231
|
+
reply: string;
|
|
232
|
+
cancelReply: string;
|
|
233
|
+
preview: string;
|
|
234
|
+
emoji: string;
|
|
235
|
+
uploadImage: string;
|
|
236
|
+
profile: string;
|
|
237
|
+
logout: string;
|
|
211
238
|
}
|
|
212
239
|
|
|
213
240
|
interface WalineProps {
|
|
@@ -601,4 +628,4 @@ interface WalineRecentCommentsResult {
|
|
|
601
628
|
}
|
|
602
629
|
declare const RecentComments: ({ el, serverURL, count, lang, }: WalineRecentCommentsOptions) => Promise<WalineRecentCommentsResult>;
|
|
603
630
|
|
|
604
|
-
export { RecentComments, WalineAbort, WalineComment, WalineCommentCountOptions, WalineCommentData, WalineCommentStatus, WalineDateLocale, WalineEmojiInfo, WalineEmojiMaps, WalineHighlighter, WalineImageUploader, WalineInitOptions, WalineInstance, WalineLevelLocale, WalineLocale, WalineMeta, WalinePageviewCountOptions, WalineProps, WalineRecentCommentsOptions, WalineRecentCommentsResult, WalineSearchOptions, WalineSearchResult, WalineTexRenderer, commentCount, defaultLocales, init, pageviewCount, version };
|
|
631
|
+
export { RecentComments, WalineAbort, WalineComment, WalineCommentCountOptions, WalineCommentData, WalineCommentStatus, WalineDateLocale, WalineEmojiInfo, WalineEmojiMaps, WalineHighlighter, WalineImageUploader, WalineInitOptions, WalineInstance, WalineLevelLocale, WalineLocale, WalineMeta, WalinePageviewCountOptions, WalineProps, WalineReactionLocale, WalineRecentCommentsOptions, WalineRecentCommentsResult, WalineSearchImageData, WalineSearchOptions, WalineSearchResult, WalineTexRenderer, commentCount, defaultLocales, init, pageviewCount, version };
|