@waline/client 2.4.2 → 2.6.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/component.esm.js +1 -1
- package/dist/component.esm.js.map +1 -1
- package/dist/component.js +1 -1
- package/dist/component.js.map +1 -1
- package/dist/legacy.d.ts +42 -0
- package/dist/legacy.js +1 -1
- package/dist/legacy.js.map +1 -1
- package/dist/pageview.cjs.js +1 -1
- package/dist/pageview.cjs.js.map +1 -1
- package/dist/pageview.esm.js +1 -1
- package/dist/pageview.esm.js.map +1 -1
- package/dist/pageview.js +1 -1
- package/dist/pageview.js.map +1 -1
- package/dist/shim.d.ts +43 -1
- package/dist/shim.esm.d.ts +43 -1
- package/dist/shim.esm.js +1 -1
- package/dist/shim.esm.js.map +1 -1
- package/dist/shim.js +1 -1
- package/dist/shim.js.map +1 -1
- package/dist/waline.cjs.d.ts +43 -1
- package/dist/waline.cjs.js +1 -1
- package/dist/waline.cjs.js.map +1 -1
- package/dist/waline.css +1 -1
- package/dist/waline.css.map +1 -1
- package/dist/waline.d.ts +43 -1
- package/dist/waline.esm.d.ts +43 -1
- package/dist/waline.esm.js +1 -1
- package/dist/waline.esm.js.map +1 -1
- package/dist/waline.js +1 -1
- package/dist/waline.js.map +1 -1
- package/package.json +21 -22
- package/src/comment.ts +7 -2
- package/src/components/CommentBox.vue +121 -4
- package/src/components/CommentCard.vue +1 -1
- package/src/components/Icons.ts +20 -0
- package/src/components/ImageWall.vue +166 -0
- package/src/composables/like.ts +1 -1
- package/src/config/default.ts +91 -1
- package/src/config/i18n/en.ts +2 -0
- package/src/config/i18n/generate.ts +2 -0
- package/src/config/i18n/jp.ts +8 -0
- package/src/config/i18n/pt-BR.ts +8 -0
- package/src/config/i18n/ru.ts +8 -0
- package/src/config/i18n/vi-VN.ts +8 -0
- package/src/config/i18n/zh-CN.ts +2 -0
- package/src/config/i18n/zh-TW.ts +2 -0
- package/src/init.ts +0 -3
- package/src/pageview.ts +2 -1
- package/src/styles/card.scss +1 -0
- package/src/styles/emoji.scss +112 -94
- package/src/styles/gif.scss +70 -0
- package/src/styles/index.scss +3 -0
- package/src/styles/panel.scss +0 -4
- package/src/typings/base.ts +40 -0
- package/src/typings/locale.ts +2 -0
- package/src/typings/waline.ts +8 -0
- package/src/utils/config.ts +5 -2
package/dist/legacy.d.ts
CHANGED
|
@@ -36,6 +36,40 @@ interface WalineEmojiInfo {
|
|
|
36
36
|
*/
|
|
37
37
|
items: string[];
|
|
38
38
|
}
|
|
39
|
+
interface WalineSearchResult extends Record<string, unknown> {
|
|
40
|
+
/**
|
|
41
|
+
* Image link
|
|
42
|
+
*/
|
|
43
|
+
src: string;
|
|
44
|
+
/**
|
|
45
|
+
* Image title, optional
|
|
46
|
+
*/
|
|
47
|
+
title?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Image preview link, optional
|
|
50
|
+
*
|
|
51
|
+
* @default src
|
|
52
|
+
*/
|
|
53
|
+
preview?: string;
|
|
54
|
+
}
|
|
55
|
+
interface WalineSearchOptions {
|
|
56
|
+
/**
|
|
57
|
+
* Search action
|
|
58
|
+
*/
|
|
59
|
+
search: (word: string) => Promise<WalineSearchResult[]>;
|
|
60
|
+
/**
|
|
61
|
+
* Default search action
|
|
62
|
+
*
|
|
63
|
+
* @default () => search('')
|
|
64
|
+
*/
|
|
65
|
+
default?: () => Promise<WalineSearchResult[]>;
|
|
66
|
+
/**
|
|
67
|
+
* Fetch more action
|
|
68
|
+
*
|
|
69
|
+
* @default (word) => search(word)
|
|
70
|
+
*/
|
|
71
|
+
more?: (word: string, currectCount: number) => Promise<WalineSearchResult[]>;
|
|
72
|
+
}
|
|
39
73
|
declare type WalineMeta = 'nick' | 'mail' | 'link';
|
|
40
74
|
declare type WalineImageUploader = (image: File) => Promise<string>;
|
|
41
75
|
declare type WalineHighlighter = (code: string, lang: string) => string;
|
|
@@ -77,6 +111,8 @@ interface WalineLocale extends WalineDateLocale, WalineLevelLocale {
|
|
|
77
111
|
word: string;
|
|
78
112
|
wordHint: string;
|
|
79
113
|
anonymous: string;
|
|
114
|
+
gif: string;
|
|
115
|
+
gifSearchPlaceholder: string;
|
|
80
116
|
}
|
|
81
117
|
|
|
82
118
|
interface WalineProps {
|
|
@@ -210,6 +246,12 @@ interface WalineProps {
|
|
|
210
246
|
* @default ['//unpkg.com/@waline/emojis@1.0.1/weibo']
|
|
211
247
|
*/
|
|
212
248
|
emoji?: (string | WalineEmojiInfo)[] | false;
|
|
249
|
+
/**
|
|
250
|
+
* 设置搜索功能
|
|
251
|
+
*
|
|
252
|
+
* Customize Search feature
|
|
253
|
+
*/
|
|
254
|
+
search?: WalineSearchOptions | false;
|
|
213
255
|
/**
|
|
214
256
|
* 代码高亮
|
|
215
257
|
*
|